1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package file provides access to the Cloud Filestore API.
8//
9// For product documentation, see: https://cloud.google.com/filestore/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/file/v1"
16//   ...
17//   ctx := context.Background()
18//   fileService, err := file.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   fileService, err := file.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   fileService, err := file.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package file // import "google.golang.org/api/file/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "file:v1"
75const apiName = "file"
76const apiVersion = "v1"
77const basePath = "https://file.googleapis.com/"
78
79// OAuth2 scopes used by this API.
80const (
81	// View and manage your data across Google Cloud Platform services
82	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
83)
84
85// NewService creates a new Service.
86func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
87	scopesOption := option.WithScopes(
88		"https://www.googleapis.com/auth/cloud-platform",
89	)
90	// NOTE: prepend, so we don't override user-specified scopes.
91	opts = append([]option.ClientOption{scopesOption}, opts...)
92	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
93	client, endpoint, err := htransport.NewClient(ctx, opts...)
94	if err != nil {
95		return nil, err
96	}
97	s, err := New(client)
98	if err != nil {
99		return nil, err
100	}
101	if endpoint != "" {
102		s.BasePath = endpoint
103	}
104	return s, nil
105}
106
107// New creates a new Service. It uses the provided http.Client for requests.
108//
109// Deprecated: please use NewService instead.
110// To provide a custom HTTP client, use option.WithHTTPClient.
111// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
112func New(client *http.Client) (*Service, error) {
113	if client == nil {
114		return nil, errors.New("client is nil")
115	}
116	s := &Service{client: client, BasePath: basePath}
117	s.Projects = NewProjectsService(s)
118	return s, nil
119}
120
121type Service struct {
122	client    *http.Client
123	BasePath  string // API endpoint base URL
124	UserAgent string // optional additional User-Agent fragment
125
126	Projects *ProjectsService
127}
128
129func (s *Service) userAgent() string {
130	if s.UserAgent == "" {
131		return googleapi.UserAgent
132	}
133	return googleapi.UserAgent + " " + s.UserAgent
134}
135
136func NewProjectsService(s *Service) *ProjectsService {
137	rs := &ProjectsService{s: s}
138	rs.Locations = NewProjectsLocationsService(s)
139	return rs
140}
141
142type ProjectsService struct {
143	s *Service
144
145	Locations *ProjectsLocationsService
146}
147
148func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
149	rs := &ProjectsLocationsService{s: s}
150	rs.Instances = NewProjectsLocationsInstancesService(s)
151	rs.Operations = NewProjectsLocationsOperationsService(s)
152	return rs
153}
154
155type ProjectsLocationsService struct {
156	s *Service
157
158	Instances *ProjectsLocationsInstancesService
159
160	Operations *ProjectsLocationsOperationsService
161}
162
163func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
164	rs := &ProjectsLocationsInstancesService{s: s}
165	return rs
166}
167
168type ProjectsLocationsInstancesService struct {
169	s *Service
170}
171
172func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
173	rs := &ProjectsLocationsOperationsService{s: s}
174	return rs
175}
176
177type ProjectsLocationsOperationsService struct {
178	s *Service
179}
180
181// CancelOperationRequest: The request message for
182// Operations.CancelOperation.
183type CancelOperationRequest struct {
184}
185
186// Empty: A generic empty message that you can re-use to avoid defining
187// duplicated
188// empty messages in your APIs. A typical example is to use it as the
189// request
190// or the response type of an API method. For instance:
191//
192//     service Foo {
193//       rpc Bar(google.protobuf.Empty) returns
194// (google.protobuf.Empty);
195//     }
196//
197// The JSON representation for `Empty` is empty JSON object `{}`.
198type Empty struct {
199	// ServerResponse contains the HTTP response code and headers from the
200	// server.
201	googleapi.ServerResponse `json:"-"`
202}
203
204// FileShareConfig: File share configuration for the instance.
205type FileShareConfig struct {
206	// CapacityGb: File share capacity in gigabytes (GB).
207	// Cloud Filestore defines 1 GB as 1024^3 bytes.
208	CapacityGb int64 `json:"capacityGb,omitempty,string"`
209
210	// Name: The name of the file share (must be 16 characters or less).
211	Name string `json:"name,omitempty"`
212
213	// ForceSendFields is a list of field names (e.g. "CapacityGb") to
214	// unconditionally include in API requests. By default, fields with
215	// empty values are omitted from API requests. However, any non-pointer,
216	// non-interface field appearing in ForceSendFields will be sent to the
217	// server regardless of whether the field is empty or not. This may be
218	// used to include empty fields in Patch requests.
219	ForceSendFields []string `json:"-"`
220
221	// NullFields is a list of field names (e.g. "CapacityGb") to include in
222	// API requests with the JSON null value. By default, fields with empty
223	// values are omitted from API requests. However, any field with an
224	// empty value appearing in NullFields will be sent to the server as
225	// null. It is an error if a field in this list has a non-empty value.
226	// This may be used to include null fields in Patch requests.
227	NullFields []string `json:"-"`
228}
229
230func (s *FileShareConfig) MarshalJSON() ([]byte, error) {
231	type NoMethod FileShareConfig
232	raw := NoMethod(*s)
233	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
234}
235
236type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct {
237	// ConsumerDefinedName: consumer_defined_name is the name that is set by
238	// the consumer. On the other
239	// hand Name field represents system-assigned id of an instance so
240	// consumers
241	// are not necessarily aware of it.
242	// consumer_defined_name is used for notification/UI purposes for
243	// consumer to
244	// recognize their instances.
245	ConsumerDefinedName string `json:"consumerDefinedName,omitempty"`
246
247	// CreateTime: Output only. Timestamp when the resource was created.
248	CreateTime string `json:"createTime,omitempty"`
249
250	// Labels: Optional. Resource labels to represent user provided
251	// metadata. Each label
252	// is a key-value pair, where both the key and the value are arbitrary
253	// strings
254	// provided by the user.
255	Labels map[string]string `json:"labels,omitempty"`
256
257	// MaintenancePolicyNames: The MaintenancePolicies that have been
258	// attached to the instance.
259	// The key must be of the type name of the oneof policy name defined
260	// in
261	// MaintenancePolicy, and the referenced policy must define the same
262	// policy
263	// type. For complete details of MaintenancePolicy, please refer
264	// to
265	// go/cloud-saas-mw-ug.
266	MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"`
267
268	// MaintenanceSchedules: The MaintenanceSchedule contains the scheduling
269	// information of published
270	// maintenance schedule.
271	MaintenanceSchedules map[string]GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule `json:"maintenanceSchedules,omitempty"`
272
273	// Name: Unique name of the resource. It uses the form:
274	//
275	// `projects/{project_id}/locations/{location_id}/instances/{instance_id}
276	// `
277	Name string `json:"name,omitempty"`
278
279	// ProducerMetadata: Output only. Custom string attributes used
280	// primarily to expose
281	// producer-specific information in monitoring dashboards.
282	// See go/get-instance-metadata.
283	ProducerMetadata map[string]string `json:"producerMetadata,omitempty"`
284
285	// ProvisionedResources: Output only. The list of data plane resources
286	// provisioned for this
287	// instance, e.g. compute VMs. See go/get-instance-metadata.
288	ProvisionedResources []*GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource `json:"provisionedResources,omitempty"`
289
290	// SlmInstanceTemplate: Link to the SLM instance template. Only
291	// populated when updating SLM
292	// instances via SSA's Actuation service adaptor.
293	// Service producers with custom control plane (e.g. Cloud SQL)
294	// doesn't
295	// need to populate this field. Instead they should use
296	// software_versions.
297	SlmInstanceTemplate string `json:"slmInstanceTemplate,omitempty"`
298
299	// SloMetadata: Output only. SLO metadata for instance classification in
300	// the
301	// Standardized dataplane SLO platform.
302	// See go/cloud-ssa-standard-slo for feature description.
303	SloMetadata *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata `json:"sloMetadata,omitempty"`
304
305	// SoftwareVersions: Software versions that are used to deploy this
306	// instance. This can be
307	// mutated by rollout services.
308	SoftwareVersions map[string]string `json:"softwareVersions,omitempty"`
309
310	// State: Output only. Current lifecycle state of the resource (e.g. if
311	// it's being
312	// created or ready to use).
313	//
314	// Possible values:
315	//   "STATE_UNSPECIFIED" - Unspecified state.
316	//   "CREATING" - Instance is being created.
317	//   "READY" - Instance has been created and is ready to use.
318	//   "UPDATING" - Instance is being updated.
319	//   "REPAIRING" - Instance is unheathy and under repair.
320	//   "DELETING" - Instance is being deleted.
321	//   "ERROR" - Instance encountered an error and is in indeterministic
322	// state.
323	State string `json:"state,omitempty"`
324
325	// TenantProjectId: Output only. ID of the associated GCP tenant
326	// project.
327	// See go/get-instance-metadata.
328	TenantProjectId string `json:"tenantProjectId,omitempty"`
329
330	// UpdateTime: Output only. Timestamp when the resource was last
331	// modified.
332	UpdateTime string `json:"updateTime,omitempty"`
333
334	// ForceSendFields is a list of field names (e.g. "ConsumerDefinedName")
335	// to unconditionally include in API requests. By default, fields with
336	// empty values are omitted from API requests. However, any non-pointer,
337	// non-interface field appearing in ForceSendFields will be sent to the
338	// server regardless of whether the field is empty or not. This may be
339	// used to include empty fields in Patch requests.
340	ForceSendFields []string `json:"-"`
341
342	// NullFields is a list of field names (e.g. "ConsumerDefinedName") to
343	// include in API requests with the JSON null value. By default, fields
344	// with empty values are omitted from API requests. However, any field
345	// with an empty value appearing in NullFields will be sent to the
346	// server as null. It is an error if a field in this list has a
347	// non-empty value. This may be used to include null fields in Patch
348	// requests.
349	NullFields []string `json:"-"`
350}
351
352func (s *GoogleCloudSaasacceleratorManagementProvidersV1Instance) MarshalJSON() ([]byte, error) {
353	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1Instance
354	raw := NoMethod(*s)
355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
356}
357
358// GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule:
359// Maintenance schedule which is exposed to customer and potentially end
360// user,
361// indicating published upcoming future maintenance schedule
362type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule struct {
363	// CanReschedule: Can this scheduled update be rescheduled?
364	// By default, it's true and API needs to do explicitly check whether
365	// it's
366	// set, if it's set as false explicitly, it's false
367	CanReschedule bool `json:"canReschedule,omitempty"`
368
369	// EndTime: The scheduled end time for the maintenance.
370	EndTime string `json:"endTime,omitempty"`
371
372	// RolloutManagementPolicy: The rollout management policy this
373	// maintenance schedule is associated
374	// with. When doing reschedule update request, the reschedule should
375	// be
376	// against this given policy.
377	RolloutManagementPolicy string `json:"rolloutManagementPolicy,omitempty"`
378
379	// StartTime: The scheduled start time for the maintenance.
380	StartTime string `json:"startTime,omitempty"`
381
382	// ForceSendFields is a list of field names (e.g. "CanReschedule") to
383	// unconditionally include in API requests. By default, fields with
384	// empty values are omitted from API requests. However, any non-pointer,
385	// non-interface field appearing in ForceSendFields will be sent to the
386	// server regardless of whether the field is empty or not. This may be
387	// used to include empty fields in Patch requests.
388	ForceSendFields []string `json:"-"`
389
390	// NullFields is a list of field names (e.g. "CanReschedule") to include
391	// in API requests with the JSON null value. By default, fields with
392	// empty values are omitted from API requests. However, any field with
393	// an empty value appearing in NullFields will be sent to the server as
394	// null. It is an error if a field in this list has a non-empty value.
395	// This may be used to include null fields in Patch requests.
396	NullFields []string `json:"-"`
397}
398
399func (s *GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule) MarshalJSON() ([]byte, error) {
400	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSchedule
401	raw := NoMethod(*s)
402	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
403}
404
405// GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata: Node
406// information for custom per-node SLO implementations.
407// SSA does not support per-node SLO, but producers can populate
408// per-node
409// information in SloMetadata for custom precomputations.
410// SSA Eligibility Exporter will emit per-node metric based on this
411// information.
412type GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata struct {
413	// Exclusions: By default node is eligible if instance is eligible.
414	// But individual node might be excluded from SLO by adding entry
415	// here.
416	// For semantic see SloMetadata.exclusions.
417	// If both instance and node level exclusions are present for time
418	// period,
419	// the node level's reason will be reported by Eligibility Exporter.
420	Exclusions []*GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion `json:"exclusions,omitempty"`
421
422	// Location: The location of the node, if different from instance
423	// location.
424	Location string `json:"location,omitempty"`
425
426	// NodeId: The id of the node.
427	// This should be equal to SaasInstanceNode.node_id.
428	NodeId string `json:"nodeId,omitempty"`
429
430	// ForceSendFields is a list of field names (e.g. "Exclusions") to
431	// unconditionally include in API requests. By default, fields with
432	// empty values are omitted from API requests. However, any non-pointer,
433	// non-interface field appearing in ForceSendFields will be sent to the
434	// server regardless of whether the field is empty or not. This may be
435	// used to include empty fields in Patch requests.
436	ForceSendFields []string `json:"-"`
437
438	// NullFields is a list of field names (e.g. "Exclusions") to include in
439	// API requests with the JSON null value. By default, fields with empty
440	// values are omitted from API requests. However, any field with an
441	// empty value appearing in NullFields will be sent to the server as
442	// null. It is an error if a field in this list has a non-empty value.
443	// This may be used to include null fields in Patch requests.
444	NullFields []string `json:"-"`
445}
446
447func (s *GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata) MarshalJSON() ([]byte, error) {
448	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata
449	raw := NoMethod(*s)
450	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
451}
452
453// GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource:
454// Describes provisioned dataplane resources.
455type GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource struct {
456	// ResourceType: Type of the resource. This can be either a GCP resource
457	// or a custom one
458	// (e.g. another cloud provider's VM). For GCP compute resources use
459	// singular
460	// form of the names listed in GCP compute API
461	// documentation
462	// (https://cloud.google.com/compute/docs/reference/rest/v1
463	// /), prefixed with
464	// 'compute-', for example: 'compute-instance',
465	// 'compute-disk',
466	// 'compute-autoscaler'.
467	ResourceType string `json:"resourceType,omitempty"`
468
469	// ResourceUrl: URL identifying the resource,
470	// e.g.
471	// "https://www.googleapis.com/compute/v1/projects/...)".
472	ResourceUrl string `json:"resourceUrl,omitempty"`
473
474	// ForceSendFields is a list of field names (e.g. "ResourceType") to
475	// unconditionally include in API requests. By default, fields with
476	// empty values are omitted from API requests. However, any non-pointer,
477	// non-interface field appearing in ForceSendFields will be sent to the
478	// server regardless of whether the field is empty or not. This may be
479	// used to include empty fields in Patch requests.
480	ForceSendFields []string `json:"-"`
481
482	// NullFields is a list of field names (e.g. "ResourceType") to include
483	// in API requests with the JSON null value. By default, fields with
484	// empty values are omitted from API requests. However, any field with
485	// an empty value appearing in NullFields will be sent to the server as
486	// null. It is an error if a field in this list has a non-empty value.
487	// This may be used to include null fields in Patch requests.
488	NullFields []string `json:"-"`
489}
490
491func (s *GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource) MarshalJSON() ([]byte, error) {
492	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1ProvisionedResource
493	raw := NoMethod(*s)
494	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
495}
496
497// GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility:
498// SloEligibility is a tuple containing eligibility value: true if an
499// instance
500// is eligible for SLO calculation or false if it should be excluded
501// from all
502// SLO-related calculations along with a user-defined reason.
503type GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility struct {
504	// Eligible: Whether an instance is eligible or ineligible.
505	Eligible bool `json:"eligible,omitempty"`
506
507	// Reason: User-defined reason for the current value of instance
508	// eligibility. Usually,
509	// this can be directly mapped to the internal state. An empty reason
510	// is
511	// allowed.
512	Reason string `json:"reason,omitempty"`
513
514	// ForceSendFields is a list of field names (e.g. "Eligible") to
515	// unconditionally include in API requests. By default, fields with
516	// empty values are omitted from API requests. However, any non-pointer,
517	// non-interface field appearing in ForceSendFields will be sent to the
518	// server regardless of whether the field is empty or not. This may be
519	// used to include empty fields in Patch requests.
520	ForceSendFields []string `json:"-"`
521
522	// NullFields is a list of field names (e.g. "Eligible") to include in
523	// API requests with the JSON null value. By default, fields with empty
524	// values are omitted from API requests. However, any field with an
525	// empty value appearing in NullFields will be sent to the server as
526	// null. It is an error if a field in this list has a non-empty value.
527	// This may be used to include null fields in Patch requests.
528	NullFields []string `json:"-"`
529}
530
531func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility) MarshalJSON() ([]byte, error) {
532	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility
533	raw := NoMethod(*s)
534	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
535}
536
537// GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion:
538// SloExclusion represents an exclusion in SLI calculation applies to
539// all SLOs.
540type GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion struct {
541	// Duration: Exclusion duration. No restrictions on the possible
542	// values.
543	//
544	// When an ongoing operation is taking longer than initially
545	// expected,
546	// an existing entry in the exclusion list can be updated by extending
547	// the
548	// duration. This is supported by the subsystem exporting eligibility
549	// data
550	// as long as such extension is committed at least 10 minutes before
551	// the
552	// original exclusion expiration - otherwise it is possible that there
553	// will
554	// be "gaps" in the exclusion application in the exported timeseries.
555	Duration string `json:"duration,omitempty"`
556
557	// Reason: Human-readable reason for the exclusion.
558	// This should be a static string (e.g. "Disruptive update in
559	// progress")
560	// and should not contain dynamically generated data (e.g. instance
561	// name).
562	// Can be left empty.
563	Reason string `json:"reason,omitempty"`
564
565	// SliName: Name of an SLI that this exclusion applies to. Can be left
566	// empty,
567	// signaling that the instance should be excluded from all SLIs
568	// defined
569	// in the service SLO configuration.
570	SliName string `json:"sliName,omitempty"`
571
572	// StartTime: Start time of the exclusion. No alignment (e.g. to a full
573	// minute) needed.
574	StartTime string `json:"startTime,omitempty"`
575
576	// ForceSendFields is a list of field names (e.g. "Duration") to
577	// unconditionally include in API requests. By default, fields with
578	// empty values are omitted from API requests. However, any non-pointer,
579	// non-interface field appearing in ForceSendFields will be sent to the
580	// server regardless of whether the field is empty or not. This may be
581	// used to include empty fields in Patch requests.
582	ForceSendFields []string `json:"-"`
583
584	// NullFields is a list of field names (e.g. "Duration") to include in
585	// API requests with the JSON null value. By default, fields with empty
586	// values are omitted from API requests. However, any field with an
587	// empty value appearing in NullFields will be sent to the server as
588	// null. It is an error if a field in this list has a non-empty value.
589	// This may be used to include null fields in Patch requests.
590	NullFields []string `json:"-"`
591}
592
593func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion) MarshalJSON() ([]byte, error) {
594	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion
595	raw := NoMethod(*s)
596	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
597}
598
599// GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata:
600// SloMetadata contains resources required for proper SLO classification
601// of the
602// instance.
603type GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata struct {
604	// Eligibility: Optional. User-defined instance eligibility.
605	Eligibility *GoogleCloudSaasacceleratorManagementProvidersV1SloEligibility `json:"eligibility,omitempty"`
606
607	// Exclusions: List of SLO exclusion windows. When multiple entries in
608	// the list match
609	// (matching the exclusion time-window against current time point)
610	// the exclusion reason used in the first matching entry will be
611	// published.
612	//
613	// It is not needed to include expired exclusion in this list, as only
614	// the
615	// currently applicable exclusions are taken into account by the
616	// eligibility
617	// exporting subsystem (the historical state of exclusions will be
618	// reflected
619	// in the historically produced timeseries regardless of the current
620	// state).
621	//
622	// This field can be used to mark the instance as temporary
623	// ineligible
624	// for the purpose of SLO calculation. For permanent instance SLO
625	// exclusion,
626	// use of custom instance eligibility is recommended. See 'eligibility'
627	// field
628	// below.
629	Exclusions []*GoogleCloudSaasacceleratorManagementProvidersV1SloExclusion `json:"exclusions,omitempty"`
630
631	// Nodes: Optional. List of nodes.
632	// Some producers need to use per-node metadata to calculate SLO.
633	// This field allows such producers to publish per-node SLO meta
634	// data,
635	// which will be consumed by SSA Eligibility Exporter and published in
636	// the
637	// form of per node metric to Monarch.
638	Nodes []*GoogleCloudSaasacceleratorManagementProvidersV1NodeSloMetadata `json:"nodes,omitempty"`
639
640	// Tier: Name of the SLO tier the Instance belongs to. This name will be
641	// expected to
642	// match the tiers specified in the service SLO configuration.
643	//
644	// Field is mandatory and must not be empty.
645	Tier string `json:"tier,omitempty"`
646
647	// ForceSendFields is a list of field names (e.g. "Eligibility") to
648	// unconditionally include in API requests. By default, fields with
649	// empty values are omitted from API requests. However, any non-pointer,
650	// non-interface field appearing in ForceSendFields will be sent to the
651	// server regardless of whether the field is empty or not. This may be
652	// used to include empty fields in Patch requests.
653	ForceSendFields []string `json:"-"`
654
655	// NullFields is a list of field names (e.g. "Eligibility") to include
656	// in API requests with the JSON null value. By default, fields with
657	// empty values are omitted from API requests. However, any field with
658	// an empty value appearing in NullFields will be sent to the server as
659	// null. It is an error if a field in this list has a non-empty value.
660	// This may be used to include null fields in Patch requests.
661	NullFields []string `json:"-"`
662}
663
664func (s *GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata) MarshalJSON() ([]byte, error) {
665	type NoMethod GoogleCloudSaasacceleratorManagementProvidersV1SloMetadata
666	raw := NoMethod(*s)
667	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
668}
669
670// Instance: A Cloud Filestore instance.
671type Instance struct {
672	// CreateTime: Output only. The time when the instance was created.
673	CreateTime string `json:"createTime,omitempty"`
674
675	// Description: The description of the instance (2048 characters or
676	// less).
677	Description string `json:"description,omitempty"`
678
679	// Etag: Server-specified ETag for the instance resource to prevent
680	// simultaneous
681	// updates from overwriting each other.
682	Etag string `json:"etag,omitempty"`
683
684	// FileShares: File system shares on the instance.
685	// For this version, only a single file share is supported.
686	FileShares []*FileShareConfig `json:"fileShares,omitempty"`
687
688	// Labels: Resource labels to represent user provided metadata.
689	Labels map[string]string `json:"labels,omitempty"`
690
691	// Name: Output only. The resource name of the instance, in the
692	// format
693	// projects/{project}/locations/{location}/instances/{instance}.
694	Name string `json:"name,omitempty"`
695
696	// Networks: VPC networks to which the instance is connected.
697	// For this version, only a single network is supported.
698	Networks []*NetworkConfig `json:"networks,omitempty"`
699
700	// State: Output only. The instance state.
701	//
702	// Possible values:
703	//   "STATE_UNSPECIFIED" - State not set.
704	//   "CREATING" - The instance is being created.
705	//   "READY" - The instance is available for use.
706	//   "REPAIRING" - Work is being done on the instance. You can get
707	// further details from the
708	// `statusMessage` field of the `Instance` resource.
709	//   "DELETING" - The instance is shutting down.
710	//   "ERROR" - The instance is experiencing an issue and might be
711	// unusable. You can get
712	// further details from the `statusMessage` field of the
713	// `Instance`
714	// resource.
715	State string `json:"state,omitempty"`
716
717	// StatusMessage: Output only. Additional information about the instance
718	// state, if available.
719	StatusMessage string `json:"statusMessage,omitempty"`
720
721	// Tier: The service tier of the instance.
722	//
723	// Possible values:
724	//   "TIER_UNSPECIFIED" - Not set.
725	//   "STANDARD" - STANDARD tier. BASIC_HDD is the preferred term for
726	// this tier.
727	//   "PREMIUM" - PREMIUM tier. BASIC_SSD is the preferred term for this
728	// tier.
729	//   "BASIC_HDD" - BASIC instances offer a maximum capacity of 63.9
730	// TB.
731	// BASIC_HDD is an alias for STANDARD Tier, offering
732	// economical
733	// performance backed by HDD.
734	//   "BASIC_SSD" - BASIC instances offer a maximum capacity of 63.9
735	// TB.
736	// BASIC_SSD is an alias for PREMIUM Tier, and offers
737	// improved
738	// performance backed by SSD.
739	//   "HIGH_SCALE_SSD" - HIGH_SCALE instances offer expanded capacity and
740	// performance scaling
741	// capabilities.
742	Tier string `json:"tier,omitempty"`
743
744	// ServerResponse contains the HTTP response code and headers from the
745	// server.
746	googleapi.ServerResponse `json:"-"`
747
748	// ForceSendFields is a list of field names (e.g. "CreateTime") to
749	// unconditionally include in API requests. By default, fields with
750	// empty values are omitted from API requests. However, any non-pointer,
751	// non-interface field appearing in ForceSendFields will be sent to the
752	// server regardless of whether the field is empty or not. This may be
753	// used to include empty fields in Patch requests.
754	ForceSendFields []string `json:"-"`
755
756	// NullFields is a list of field names (e.g. "CreateTime") to include in
757	// API requests with the JSON null value. By default, fields with empty
758	// values are omitted from API requests. However, any field with an
759	// empty value appearing in NullFields will be sent to the server as
760	// null. It is an error if a field in this list has a non-empty value.
761	// This may be used to include null fields in Patch requests.
762	NullFields []string `json:"-"`
763}
764
765func (s *Instance) MarshalJSON() ([]byte, error) {
766	type NoMethod Instance
767	raw := NoMethod(*s)
768	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
769}
770
771// ListInstancesResponse: ListInstancesResponse is the result of
772// ListInstancesRequest.
773type ListInstancesResponse struct {
774	// Instances: A list of instances in the project for the specified
775	// location.
776	//
777	// If the {location} value in the request is "-", the response contains
778	// a list
779	// of instances from all locations. If any location is unreachable,
780	// the
781	// response will only return instances in reachable locations and
782	// the
783	// "unreachable" field will be populated with a list of unreachable
784	// locations.
785	Instances []*Instance `json:"instances,omitempty"`
786
787	// NextPageToken: The token you can use to retrieve the next page of
788	// results. Not returned
789	// if there are no more results in the list.
790	NextPageToken string `json:"nextPageToken,omitempty"`
791
792	// Unreachable: Locations that could not be reached.
793	Unreachable []string `json:"unreachable,omitempty"`
794
795	// ServerResponse contains the HTTP response code and headers from the
796	// server.
797	googleapi.ServerResponse `json:"-"`
798
799	// ForceSendFields is a list of field names (e.g. "Instances") to
800	// unconditionally include in API requests. By default, fields with
801	// empty values are omitted from API requests. However, any non-pointer,
802	// non-interface field appearing in ForceSendFields will be sent to the
803	// server regardless of whether the field is empty or not. This may be
804	// used to include empty fields in Patch requests.
805	ForceSendFields []string `json:"-"`
806
807	// NullFields is a list of field names (e.g. "Instances") to include in
808	// API requests with the JSON null value. By default, fields with empty
809	// values are omitted from API requests. However, any field with an
810	// empty value appearing in NullFields will be sent to the server as
811	// null. It is an error if a field in this list has a non-empty value.
812	// This may be used to include null fields in Patch requests.
813	NullFields []string `json:"-"`
814}
815
816func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
817	type NoMethod ListInstancesResponse
818	raw := NoMethod(*s)
819	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
820}
821
822// ListLocationsResponse: The response message for
823// Locations.ListLocations.
824type ListLocationsResponse struct {
825	// Locations: A list of locations that matches the specified filter in
826	// the request.
827	Locations []*Location `json:"locations,omitempty"`
828
829	// NextPageToken: The standard List next-page token.
830	NextPageToken string `json:"nextPageToken,omitempty"`
831
832	// ServerResponse contains the HTTP response code and headers from the
833	// server.
834	googleapi.ServerResponse `json:"-"`
835
836	// ForceSendFields is a list of field names (e.g. "Locations") to
837	// unconditionally include in API requests. By default, fields with
838	// empty values are omitted from API requests. However, any non-pointer,
839	// non-interface field appearing in ForceSendFields will be sent to the
840	// server regardless of whether the field is empty or not. This may be
841	// used to include empty fields in Patch requests.
842	ForceSendFields []string `json:"-"`
843
844	// NullFields is a list of field names (e.g. "Locations") to include in
845	// API requests with the JSON null value. By default, fields with empty
846	// values are omitted from API requests. However, any field with an
847	// empty value appearing in NullFields will be sent to the server as
848	// null. It is an error if a field in this list has a non-empty value.
849	// This may be used to include null fields in Patch requests.
850	NullFields []string `json:"-"`
851}
852
853func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
854	type NoMethod ListLocationsResponse
855	raw := NoMethod(*s)
856	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
857}
858
859// ListOperationsResponse: The response message for
860// Operations.ListOperations.
861type ListOperationsResponse struct {
862	// NextPageToken: The standard List next-page token.
863	NextPageToken string `json:"nextPageToken,omitempty"`
864
865	// Operations: A list of operations that matches the specified filter in
866	// the request.
867	Operations []*Operation `json:"operations,omitempty"`
868
869	// ServerResponse contains the HTTP response code and headers from the
870	// server.
871	googleapi.ServerResponse `json:"-"`
872
873	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
874	// unconditionally include in API requests. By default, fields with
875	// empty values are omitted from API requests. However, any non-pointer,
876	// non-interface field appearing in ForceSendFields will be sent to the
877	// server regardless of whether the field is empty or not. This may be
878	// used to include empty fields in Patch requests.
879	ForceSendFields []string `json:"-"`
880
881	// NullFields is a list of field names (e.g. "NextPageToken") to include
882	// in API requests with the JSON null value. By default, fields with
883	// empty values are omitted from API requests. However, any field with
884	// an empty value appearing in NullFields will be sent to the server as
885	// null. It is an error if a field in this list has a non-empty value.
886	// This may be used to include null fields in Patch requests.
887	NullFields []string `json:"-"`
888}
889
890func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
891	type NoMethod ListOperationsResponse
892	raw := NoMethod(*s)
893	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
894}
895
896// Location: A resource that represents Google Cloud Platform location.
897type Location struct {
898	// DisplayName: The friendly name for this location, typically a nearby
899	// city name.
900	// For example, "Tokyo".
901	DisplayName string `json:"displayName,omitempty"`
902
903	// Labels: Cross-service attributes for the location. For example
904	//
905	//     {"cloud.googleapis.com/region": "us-east1"}
906	Labels map[string]string `json:"labels,omitempty"`
907
908	// LocationId: The canonical id for this location. For example:
909	// "us-east1".
910	LocationId string `json:"locationId,omitempty"`
911
912	// Metadata: Service-specific metadata. For example the available
913	// capacity at the given
914	// location.
915	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
916
917	// Name: Resource name for the location, which may vary between
918	// implementations.
919	// For example: "projects/example-project/locations/us-east1"
920	Name string `json:"name,omitempty"`
921
922	// ServerResponse contains the HTTP response code and headers from the
923	// server.
924	googleapi.ServerResponse `json:"-"`
925
926	// ForceSendFields is a list of field names (e.g. "DisplayName") to
927	// unconditionally include in API requests. By default, fields with
928	// empty values are omitted from API requests. However, any non-pointer,
929	// non-interface field appearing in ForceSendFields will be sent to the
930	// server regardless of whether the field is empty or not. This may be
931	// used to include empty fields in Patch requests.
932	ForceSendFields []string `json:"-"`
933
934	// NullFields is a list of field names (e.g. "DisplayName") to include
935	// in API requests with the JSON null value. By default, fields with
936	// empty values are omitted from API requests. However, any field with
937	// an empty value appearing in NullFields will be sent to the server as
938	// null. It is an error if a field in this list has a non-empty value.
939	// This may be used to include null fields in Patch requests.
940	NullFields []string `json:"-"`
941}
942
943func (s *Location) MarshalJSON() ([]byte, error) {
944	type NoMethod Location
945	raw := NoMethod(*s)
946	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
947}
948
949// NetworkConfig: Network configuration for the instance.
950type NetworkConfig struct {
951	// IpAddresses: Output only. IPv4 addresses in the format
952	// {octet 1}.{octet 2}.{octet 3}.{octet 4} or IPv6 addresses in the
953	// format
954	// {block 1}:{block 2}:{block 3}:{block 4}:{block 5}:{block
955	// 6}:{block
956	// 7}:{block 8}.
957	IpAddresses []string `json:"ipAddresses,omitempty"`
958
959	// Modes: Internet protocol versions for which the instance has IP
960	// addresses
961	// assigned. For this version, only MODE_IPV4 is supported.
962	//
963	// Possible values:
964	//   "ADDRESS_MODE_UNSPECIFIED" - Internet protocol not set.
965	//   "MODE_IPV4" - Use the IPv4 internet protocol.
966	Modes []string `json:"modes,omitempty"`
967
968	// Network: The name of the Google Compute Engine
969	// [VPC network](/compute/docs/networks-and-firewalls#networks) to which
970	// the
971	// instance is connected.
972	Network string `json:"network,omitempty"`
973
974	// ReservedIpRange: A /29 CIDR block in one of the
975	// [internal IP
976	// address
977	// ranges](https://www.arin.net/knowledge/address_filters.html)
978	// that
979	// identifies the range of IP addresses reserved for this instance.
980	// For
981	// example, 10.0.0.0/29 or 192.168.0.0/29. The range you specify can't
982	// overlap
983	// with either existing subnets or assigned IP address ranges for other
984	// Cloud
985	// Filestore instances in the selected VPC network.
986	ReservedIpRange string `json:"reservedIpRange,omitempty"`
987
988	// ForceSendFields is a list of field names (e.g. "IpAddresses") to
989	// unconditionally include in API requests. By default, fields with
990	// empty values are omitted from API requests. However, any non-pointer,
991	// non-interface field appearing in ForceSendFields will be sent to the
992	// server regardless of whether the field is empty or not. This may be
993	// used to include empty fields in Patch requests.
994	ForceSendFields []string `json:"-"`
995
996	// NullFields is a list of field names (e.g. "IpAddresses") to include
997	// in API requests with the JSON null value. By default, fields with
998	// empty values are omitted from API requests. However, any field with
999	// an empty value appearing in NullFields will be sent to the server as
1000	// null. It is an error if a field in this list has a non-empty value.
1001	// This may be used to include null fields in Patch requests.
1002	NullFields []string `json:"-"`
1003}
1004
1005func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
1006	type NoMethod NetworkConfig
1007	raw := NoMethod(*s)
1008	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1009}
1010
1011// Operation: This resource represents a long-running operation that is
1012// the result of a
1013// network API call.
1014type Operation struct {
1015	// Done: If the value is `false`, it means the operation is still in
1016	// progress.
1017	// If `true`, the operation is completed, and either `error` or
1018	// `response` is
1019	// available.
1020	Done bool `json:"done,omitempty"`
1021
1022	// Error: The error result of the operation in case of failure or
1023	// cancellation.
1024	Error *Status `json:"error,omitempty"`
1025
1026	// Metadata: Service-specific metadata associated with the operation.
1027	// It typically
1028	// contains progress information and common metadata such as create
1029	// time.
1030	// Some services might not provide such metadata.  Any method that
1031	// returns a
1032	// long-running operation should document the metadata type, if any.
1033	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1034
1035	// Name: The server-assigned name, which is only unique within the same
1036	// service that
1037	// originally returns it. If you use the default HTTP mapping,
1038	// the
1039	// `name` should be a resource name ending with
1040	// `operations/{unique_id}`.
1041	Name string `json:"name,omitempty"`
1042
1043	// Response: The normal response of the operation in case of success.
1044	// If the original
1045	// method returns no data on success, such as `Delete`, the response
1046	// is
1047	// `google.protobuf.Empty`.  If the original method is
1048	// standard
1049	// `Get`/`Create`/`Update`, the response should be the resource.  For
1050	// other
1051	// methods, the response should have the type `XxxResponse`, where
1052	// `Xxx`
1053	// is the original method name.  For example, if the original method
1054	// name
1055	// is `TakeSnapshot()`, the inferred response type
1056	// is
1057	// `TakeSnapshotResponse`.
1058	Response googleapi.RawMessage `json:"response,omitempty"`
1059
1060	// ServerResponse contains the HTTP response code and headers from the
1061	// server.
1062	googleapi.ServerResponse `json:"-"`
1063
1064	// ForceSendFields is a list of field names (e.g. "Done") to
1065	// unconditionally include in API requests. By default, fields with
1066	// empty values are omitted from API requests. However, any non-pointer,
1067	// non-interface field appearing in ForceSendFields will be sent to the
1068	// server regardless of whether the field is empty or not. This may be
1069	// used to include empty fields in Patch requests.
1070	ForceSendFields []string `json:"-"`
1071
1072	// NullFields is a list of field names (e.g. "Done") to include in API
1073	// requests with the JSON null value. By default, fields with empty
1074	// values are omitted from API requests. However, any field with an
1075	// empty value appearing in NullFields will be sent to the server as
1076	// null. It is an error if a field in this list has a non-empty value.
1077	// This may be used to include null fields in Patch requests.
1078	NullFields []string `json:"-"`
1079}
1080
1081func (s *Operation) MarshalJSON() ([]byte, error) {
1082	type NoMethod Operation
1083	raw := NoMethod(*s)
1084	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1085}
1086
1087// OperationMetadata: Represents the metadata of the long-running
1088// operation.
1089type OperationMetadata struct {
1090	// ApiVersion: [Output only] API version used to start the operation.
1091	ApiVersion string `json:"apiVersion,omitempty"`
1092
1093	// CancelRequested: [Output only] Identifies whether the user has
1094	// requested cancellation
1095	// of the operation. Operations that have successfully been
1096	// cancelled
1097	// have Operation.error value with a google.rpc.Status.code of
1098	// 1,
1099	// corresponding to `Code.CANCELLED`.
1100	CancelRequested bool `json:"cancelRequested,omitempty"`
1101
1102	// CreateTime: [Output only] The time the operation was created.
1103	CreateTime string `json:"createTime,omitempty"`
1104
1105	// EndTime: [Output only] The time the operation finished running.
1106	EndTime string `json:"endTime,omitempty"`
1107
1108	// StatusDetail: [Output only] Human-readable status of the operation,
1109	// if any.
1110	StatusDetail string `json:"statusDetail,omitempty"`
1111
1112	// Target: [Output only] Server-defined resource path for the target of
1113	// the operation.
1114	Target string `json:"target,omitempty"`
1115
1116	// Verb: [Output only] Name of the verb executed by the operation.
1117	Verb string `json:"verb,omitempty"`
1118
1119	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
1120	// unconditionally include in API requests. By default, fields with
1121	// empty values are omitted from API requests. However, any non-pointer,
1122	// non-interface field appearing in ForceSendFields will be sent to the
1123	// server regardless of whether the field is empty or not. This may be
1124	// used to include empty fields in Patch requests.
1125	ForceSendFields []string `json:"-"`
1126
1127	// NullFields is a list of field names (e.g. "ApiVersion") to include in
1128	// API requests with the JSON null value. By default, fields with empty
1129	// values are omitted from API requests. However, any field with an
1130	// empty value appearing in NullFields will be sent to the server as
1131	// null. It is an error if a field in this list has a non-empty value.
1132	// This may be used to include null fields in Patch requests.
1133	NullFields []string `json:"-"`
1134}
1135
1136func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1137	type NoMethod OperationMetadata
1138	raw := NoMethod(*s)
1139	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1140}
1141
1142// Status: The `Status` type defines a logical error model that is
1143// suitable for
1144// different programming environments, including REST APIs and RPC APIs.
1145// It is
1146// used by [gRPC](https://github.com/grpc). Each `Status` message
1147// contains
1148// three pieces of data: error code, error message, and error
1149// details.
1150//
1151// You can find out more about this error model and how to work with it
1152// in the
1153// [API Design Guide](https://cloud.google.com/apis/design/errors).
1154type Status struct {
1155	// Code: The status code, which should be an enum value of
1156	// google.rpc.Code.
1157	Code int64 `json:"code,omitempty"`
1158
1159	// Details: A list of messages that carry the error details.  There is a
1160	// common set of
1161	// message types for APIs to use.
1162	Details []googleapi.RawMessage `json:"details,omitempty"`
1163
1164	// Message: A developer-facing error message, which should be in
1165	// English. Any
1166	// user-facing error message should be localized and sent in
1167	// the
1168	// google.rpc.Status.details field, or localized by the client.
1169	Message string `json:"message,omitempty"`
1170
1171	// ForceSendFields is a list of field names (e.g. "Code") to
1172	// unconditionally include in API requests. By default, fields with
1173	// empty values are omitted from API requests. However, any non-pointer,
1174	// non-interface field appearing in ForceSendFields will be sent to the
1175	// server regardless of whether the field is empty or not. This may be
1176	// used to include empty fields in Patch requests.
1177	ForceSendFields []string `json:"-"`
1178
1179	// NullFields is a list of field names (e.g. "Code") to include in API
1180	// requests with the JSON null value. By default, fields with empty
1181	// values are omitted from API requests. However, any field with an
1182	// empty value appearing in NullFields will be sent to the server as
1183	// null. It is an error if a field in this list has a non-empty value.
1184	// This may be used to include null fields in Patch requests.
1185	NullFields []string `json:"-"`
1186}
1187
1188func (s *Status) MarshalJSON() ([]byte, error) {
1189	type NoMethod Status
1190	raw := NoMethod(*s)
1191	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1192}
1193
1194// method id "file.projects.locations.get":
1195
1196type ProjectsLocationsGetCall struct {
1197	s            *Service
1198	name         string
1199	urlParams_   gensupport.URLParams
1200	ifNoneMatch_ string
1201	ctx_         context.Context
1202	header_      http.Header
1203}
1204
1205// Get: Gets information about a location.
1206func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
1207	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1208	c.name = name
1209	return c
1210}
1211
1212// Fields allows partial responses to be retrieved. See
1213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1214// for more information.
1215func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
1216	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1217	return c
1218}
1219
1220// IfNoneMatch sets the optional parameter which makes the operation
1221// fail if the object's ETag matches the given value. This is useful for
1222// getting updates only after the object has changed since the last
1223// request. Use googleapi.IsNotModified to check whether the response
1224// error from Do is the result of In-None-Match.
1225func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
1226	c.ifNoneMatch_ = entityTag
1227	return c
1228}
1229
1230// Context sets the context to be used in this call's Do method. Any
1231// pending HTTP request will be aborted if the provided context is
1232// canceled.
1233func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
1234	c.ctx_ = ctx
1235	return c
1236}
1237
1238// Header returns an http.Header that can be modified by the caller to
1239// add HTTP headers to the request.
1240func (c *ProjectsLocationsGetCall) Header() http.Header {
1241	if c.header_ == nil {
1242		c.header_ = make(http.Header)
1243	}
1244	return c.header_
1245}
1246
1247func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
1248	reqHeaders := make(http.Header)
1249	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
1250	for k, v := range c.header_ {
1251		reqHeaders[k] = v
1252	}
1253	reqHeaders.Set("User-Agent", c.s.userAgent())
1254	if c.ifNoneMatch_ != "" {
1255		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1256	}
1257	var body io.Reader = nil
1258	c.urlParams_.Set("alt", alt)
1259	c.urlParams_.Set("prettyPrint", "false")
1260	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1261	urls += "?" + c.urlParams_.Encode()
1262	req, err := http.NewRequest("GET", urls, body)
1263	if err != nil {
1264		return nil, err
1265	}
1266	req.Header = reqHeaders
1267	googleapi.Expand(req.URL, map[string]string{
1268		"name": c.name,
1269	})
1270	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1271}
1272
1273// Do executes the "file.projects.locations.get" call.
1274// Exactly one of *Location or error will be non-nil. Any non-2xx status
1275// code is an error. Response headers are in either
1276// *Location.ServerResponse.Header or (if a response was returned at
1277// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1278// to check whether the returned error was because
1279// http.StatusNotModified was returned.
1280func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
1281	gensupport.SetOptions(c.urlParams_, opts...)
1282	res, err := c.doRequest("json")
1283	if res != nil && res.StatusCode == http.StatusNotModified {
1284		if res.Body != nil {
1285			res.Body.Close()
1286		}
1287		return nil, &googleapi.Error{
1288			Code:   res.StatusCode,
1289			Header: res.Header,
1290		}
1291	}
1292	if err != nil {
1293		return nil, err
1294	}
1295	defer googleapi.CloseBody(res)
1296	if err := googleapi.CheckResponse(res); err != nil {
1297		return nil, err
1298	}
1299	ret := &Location{
1300		ServerResponse: googleapi.ServerResponse{
1301			Header:         res.Header,
1302			HTTPStatusCode: res.StatusCode,
1303		},
1304	}
1305	target := &ret
1306	if err := gensupport.DecodeResponse(target, res); err != nil {
1307		return nil, err
1308	}
1309	return ret, nil
1310	// {
1311	//   "description": "Gets information about a location.",
1312	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}",
1313	//   "httpMethod": "GET",
1314	//   "id": "file.projects.locations.get",
1315	//   "parameterOrder": [
1316	//     "name"
1317	//   ],
1318	//   "parameters": {
1319	//     "name": {
1320	//       "description": "Resource name for the location.",
1321	//       "location": "path",
1322	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
1323	//       "required": true,
1324	//       "type": "string"
1325	//     }
1326	//   },
1327	//   "path": "v1/{+name}",
1328	//   "response": {
1329	//     "$ref": "Location"
1330	//   },
1331	//   "scopes": [
1332	//     "https://www.googleapis.com/auth/cloud-platform"
1333	//   ]
1334	// }
1335
1336}
1337
1338// method id "file.projects.locations.list":
1339
1340type ProjectsLocationsListCall struct {
1341	s            *Service
1342	name         string
1343	urlParams_   gensupport.URLParams
1344	ifNoneMatch_ string
1345	ctx_         context.Context
1346	header_      http.Header
1347}
1348
1349// List: Lists information about the supported locations for this
1350// service.
1351func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
1352	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1353	c.name = name
1354	return c
1355}
1356
1357// Filter sets the optional parameter "filter": The standard list
1358// filter.
1359func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
1360	c.urlParams_.Set("filter", filter)
1361	return c
1362}
1363
1364// IncludeUnrevealedLocations sets the optional parameter
1365// "includeUnrevealedLocations": If true, the returned list will include
1366// locations which are not yet
1367// revealed.
1368func (c *ProjectsLocationsListCall) IncludeUnrevealedLocations(includeUnrevealedLocations bool) *ProjectsLocationsListCall {
1369	c.urlParams_.Set("includeUnrevealedLocations", fmt.Sprint(includeUnrevealedLocations))
1370	return c
1371}
1372
1373// PageSize sets the optional parameter "pageSize": The standard list
1374// page size.
1375func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
1376	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
1377	return c
1378}
1379
1380// PageToken sets the optional parameter "pageToken": The standard list
1381// page token.
1382func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
1383	c.urlParams_.Set("pageToken", pageToken)
1384	return c
1385}
1386
1387// Fields allows partial responses to be retrieved. See
1388// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1389// for more information.
1390func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
1391	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1392	return c
1393}
1394
1395// IfNoneMatch sets the optional parameter which makes the operation
1396// fail if the object's ETag matches the given value. This is useful for
1397// getting updates only after the object has changed since the last
1398// request. Use googleapi.IsNotModified to check whether the response
1399// error from Do is the result of In-None-Match.
1400func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
1401	c.ifNoneMatch_ = entityTag
1402	return c
1403}
1404
1405// Context sets the context to be used in this call's Do method. Any
1406// pending HTTP request will be aborted if the provided context is
1407// canceled.
1408func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
1409	c.ctx_ = ctx
1410	return c
1411}
1412
1413// Header returns an http.Header that can be modified by the caller to
1414// add HTTP headers to the request.
1415func (c *ProjectsLocationsListCall) Header() http.Header {
1416	if c.header_ == nil {
1417		c.header_ = make(http.Header)
1418	}
1419	return c.header_
1420}
1421
1422func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
1423	reqHeaders := make(http.Header)
1424	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
1425	for k, v := range c.header_ {
1426		reqHeaders[k] = v
1427	}
1428	reqHeaders.Set("User-Agent", c.s.userAgent())
1429	if c.ifNoneMatch_ != "" {
1430		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1431	}
1432	var body io.Reader = nil
1433	c.urlParams_.Set("alt", alt)
1434	c.urlParams_.Set("prettyPrint", "false")
1435	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
1436	urls += "?" + c.urlParams_.Encode()
1437	req, err := http.NewRequest("GET", urls, body)
1438	if err != nil {
1439		return nil, err
1440	}
1441	req.Header = reqHeaders
1442	googleapi.Expand(req.URL, map[string]string{
1443		"name": c.name,
1444	})
1445	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1446}
1447
1448// Do executes the "file.projects.locations.list" call.
1449// Exactly one of *ListLocationsResponse or error will be non-nil. Any
1450// non-2xx status code is an error. Response headers are in either
1451// *ListLocationsResponse.ServerResponse.Header or (if a response was
1452// returned at all) in error.(*googleapi.Error).Header. Use
1453// googleapi.IsNotModified to check whether the returned error was
1454// because http.StatusNotModified was returned.
1455func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
1456	gensupport.SetOptions(c.urlParams_, opts...)
1457	res, err := c.doRequest("json")
1458	if res != nil && res.StatusCode == http.StatusNotModified {
1459		if res.Body != nil {
1460			res.Body.Close()
1461		}
1462		return nil, &googleapi.Error{
1463			Code:   res.StatusCode,
1464			Header: res.Header,
1465		}
1466	}
1467	if err != nil {
1468		return nil, err
1469	}
1470	defer googleapi.CloseBody(res)
1471	if err := googleapi.CheckResponse(res); err != nil {
1472		return nil, err
1473	}
1474	ret := &ListLocationsResponse{
1475		ServerResponse: googleapi.ServerResponse{
1476			Header:         res.Header,
1477			HTTPStatusCode: res.StatusCode,
1478		},
1479	}
1480	target := &ret
1481	if err := gensupport.DecodeResponse(target, res); err != nil {
1482		return nil, err
1483	}
1484	return ret, nil
1485	// {
1486	//   "description": "Lists information about the supported locations for this service.",
1487	//   "flatPath": "v1/projects/{projectsId}/locations",
1488	//   "httpMethod": "GET",
1489	//   "id": "file.projects.locations.list",
1490	//   "parameterOrder": [
1491	//     "name"
1492	//   ],
1493	//   "parameters": {
1494	//     "filter": {
1495	//       "description": "The standard list filter.",
1496	//       "location": "query",
1497	//       "type": "string"
1498	//     },
1499	//     "includeUnrevealedLocations": {
1500	//       "description": "If true, the returned list will include locations which are not yet\nrevealed.",
1501	//       "location": "query",
1502	//       "type": "boolean"
1503	//     },
1504	//     "name": {
1505	//       "description": "The resource that owns the locations collection, if applicable.",
1506	//       "location": "path",
1507	//       "pattern": "^projects/[^/]+$",
1508	//       "required": true,
1509	//       "type": "string"
1510	//     },
1511	//     "pageSize": {
1512	//       "description": "The standard list page size.",
1513	//       "format": "int32",
1514	//       "location": "query",
1515	//       "type": "integer"
1516	//     },
1517	//     "pageToken": {
1518	//       "description": "The standard list page token.",
1519	//       "location": "query",
1520	//       "type": "string"
1521	//     }
1522	//   },
1523	//   "path": "v1/{+name}/locations",
1524	//   "response": {
1525	//     "$ref": "ListLocationsResponse"
1526	//   },
1527	//   "scopes": [
1528	//     "https://www.googleapis.com/auth/cloud-platform"
1529	//   ]
1530	// }
1531
1532}
1533
1534// Pages invokes f for each page of results.
1535// A non-nil error returned from f will halt the iteration.
1536// The provided context supersedes any context provided to the Context method.
1537func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
1538	c.ctx_ = ctx
1539	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
1540	for {
1541		x, err := c.Do()
1542		if err != nil {
1543			return err
1544		}
1545		if err := f(x); err != nil {
1546			return err
1547		}
1548		if x.NextPageToken == "" {
1549			return nil
1550		}
1551		c.PageToken(x.NextPageToken)
1552	}
1553}
1554
1555// method id "file.projects.locations.instances.create":
1556
1557type ProjectsLocationsInstancesCreateCall struct {
1558	s          *Service
1559	parent     string
1560	instance   *Instance
1561	urlParams_ gensupport.URLParams
1562	ctx_       context.Context
1563	header_    http.Header
1564}
1565
1566// Create: Creates an instance.
1567func (r *ProjectsLocationsInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsInstancesCreateCall {
1568	c := &ProjectsLocationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1569	c.parent = parent
1570	c.instance = instance
1571	return c
1572}
1573
1574// InstanceId sets the optional parameter "instanceId": Required. The
1575// name of the instance to create.
1576// The name must be unique for the specified project and location.
1577func (c *ProjectsLocationsInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsInstancesCreateCall {
1578	c.urlParams_.Set("instanceId", instanceId)
1579	return c
1580}
1581
1582// Fields allows partial responses to be retrieved. See
1583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1584// for more information.
1585func (c *ProjectsLocationsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesCreateCall {
1586	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1587	return c
1588}
1589
1590// Context sets the context to be used in this call's Do method. Any
1591// pending HTTP request will be aborted if the provided context is
1592// canceled.
1593func (c *ProjectsLocationsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesCreateCall {
1594	c.ctx_ = ctx
1595	return c
1596}
1597
1598// Header returns an http.Header that can be modified by the caller to
1599// add HTTP headers to the request.
1600func (c *ProjectsLocationsInstancesCreateCall) Header() http.Header {
1601	if c.header_ == nil {
1602		c.header_ = make(http.Header)
1603	}
1604	return c.header_
1605}
1606
1607func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) {
1608	reqHeaders := make(http.Header)
1609	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
1610	for k, v := range c.header_ {
1611		reqHeaders[k] = v
1612	}
1613	reqHeaders.Set("User-Agent", c.s.userAgent())
1614	var body io.Reader = nil
1615	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
1616	if err != nil {
1617		return nil, err
1618	}
1619	reqHeaders.Set("Content-Type", "application/json")
1620	c.urlParams_.Set("alt", alt)
1621	c.urlParams_.Set("prettyPrint", "false")
1622	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
1623	urls += "?" + c.urlParams_.Encode()
1624	req, err := http.NewRequest("POST", urls, body)
1625	if err != nil {
1626		return nil, err
1627	}
1628	req.Header = reqHeaders
1629	googleapi.Expand(req.URL, map[string]string{
1630		"parent": c.parent,
1631	})
1632	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1633}
1634
1635// Do executes the "file.projects.locations.instances.create" call.
1636// Exactly one of *Operation or error will be non-nil. Any non-2xx
1637// status code is an error. Response headers are in either
1638// *Operation.ServerResponse.Header or (if a response was returned at
1639// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1640// to check whether the returned error was because
1641// http.StatusNotModified was returned.
1642func (c *ProjectsLocationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
1643	gensupport.SetOptions(c.urlParams_, opts...)
1644	res, err := c.doRequest("json")
1645	if res != nil && res.StatusCode == http.StatusNotModified {
1646		if res.Body != nil {
1647			res.Body.Close()
1648		}
1649		return nil, &googleapi.Error{
1650			Code:   res.StatusCode,
1651			Header: res.Header,
1652		}
1653	}
1654	if err != nil {
1655		return nil, err
1656	}
1657	defer googleapi.CloseBody(res)
1658	if err := googleapi.CheckResponse(res); err != nil {
1659		return nil, err
1660	}
1661	ret := &Operation{
1662		ServerResponse: googleapi.ServerResponse{
1663			Header:         res.Header,
1664			HTTPStatusCode: res.StatusCode,
1665		},
1666	}
1667	target := &ret
1668	if err := gensupport.DecodeResponse(target, res); err != nil {
1669		return nil, err
1670	}
1671	return ret, nil
1672	// {
1673	//   "description": "Creates an instance.",
1674	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances",
1675	//   "httpMethod": "POST",
1676	//   "id": "file.projects.locations.instances.create",
1677	//   "parameterOrder": [
1678	//     "parent"
1679	//   ],
1680	//   "parameters": {
1681	//     "instanceId": {
1682	//       "description": "Required. The name of the instance to create.\nThe name must be unique for the specified project and location.",
1683	//       "location": "query",
1684	//       "type": "string"
1685	//     },
1686	//     "parent": {
1687	//       "description": "Required. The instance's project and location, in the format\nprojects/{project_id}/locations/{location}. In Cloud Filestore,\nlocations map to GCP zones, for example **us-west1-b**.",
1688	//       "location": "path",
1689	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
1690	//       "required": true,
1691	//       "type": "string"
1692	//     }
1693	//   },
1694	//   "path": "v1/{+parent}/instances",
1695	//   "request": {
1696	//     "$ref": "Instance"
1697	//   },
1698	//   "response": {
1699	//     "$ref": "Operation"
1700	//   },
1701	//   "scopes": [
1702	//     "https://www.googleapis.com/auth/cloud-platform"
1703	//   ]
1704	// }
1705
1706}
1707
1708// method id "file.projects.locations.instances.delete":
1709
1710type ProjectsLocationsInstancesDeleteCall struct {
1711	s          *Service
1712	name       string
1713	urlParams_ gensupport.URLParams
1714	ctx_       context.Context
1715	header_    http.Header
1716}
1717
1718// Delete: Deletes an instance.
1719func (r *ProjectsLocationsInstancesService) Delete(name string) *ProjectsLocationsInstancesDeleteCall {
1720	c := &ProjectsLocationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1721	c.name = name
1722	return c
1723}
1724
1725// Fields allows partial responses to be retrieved. See
1726// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1727// for more information.
1728func (c *ProjectsLocationsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDeleteCall {
1729	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1730	return c
1731}
1732
1733// Context sets the context to be used in this call's Do method. Any
1734// pending HTTP request will be aborted if the provided context is
1735// canceled.
1736func (c *ProjectsLocationsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDeleteCall {
1737	c.ctx_ = ctx
1738	return c
1739}
1740
1741// Header returns an http.Header that can be modified by the caller to
1742// add HTTP headers to the request.
1743func (c *ProjectsLocationsInstancesDeleteCall) Header() http.Header {
1744	if c.header_ == nil {
1745		c.header_ = make(http.Header)
1746	}
1747	return c.header_
1748}
1749
1750func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
1751	reqHeaders := make(http.Header)
1752	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
1753	for k, v := range c.header_ {
1754		reqHeaders[k] = v
1755	}
1756	reqHeaders.Set("User-Agent", c.s.userAgent())
1757	var body io.Reader = nil
1758	c.urlParams_.Set("alt", alt)
1759	c.urlParams_.Set("prettyPrint", "false")
1760	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1761	urls += "?" + c.urlParams_.Encode()
1762	req, err := http.NewRequest("DELETE", urls, body)
1763	if err != nil {
1764		return nil, err
1765	}
1766	req.Header = reqHeaders
1767	googleapi.Expand(req.URL, map[string]string{
1768		"name": c.name,
1769	})
1770	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1771}
1772
1773// Do executes the "file.projects.locations.instances.delete" call.
1774// Exactly one of *Operation or error will be non-nil. Any non-2xx
1775// status code is an error. Response headers are in either
1776// *Operation.ServerResponse.Header or (if a response was returned at
1777// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1778// to check whether the returned error was because
1779// http.StatusNotModified was returned.
1780func (c *ProjectsLocationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
1781	gensupport.SetOptions(c.urlParams_, opts...)
1782	res, err := c.doRequest("json")
1783	if res != nil && res.StatusCode == http.StatusNotModified {
1784		if res.Body != nil {
1785			res.Body.Close()
1786		}
1787		return nil, &googleapi.Error{
1788			Code:   res.StatusCode,
1789			Header: res.Header,
1790		}
1791	}
1792	if err != nil {
1793		return nil, err
1794	}
1795	defer googleapi.CloseBody(res)
1796	if err := googleapi.CheckResponse(res); err != nil {
1797		return nil, err
1798	}
1799	ret := &Operation{
1800		ServerResponse: googleapi.ServerResponse{
1801			Header:         res.Header,
1802			HTTPStatusCode: res.StatusCode,
1803		},
1804	}
1805	target := &ret
1806	if err := gensupport.DecodeResponse(target, res); err != nil {
1807		return nil, err
1808	}
1809	return ret, nil
1810	// {
1811	//   "description": "Deletes an instance.",
1812	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}",
1813	//   "httpMethod": "DELETE",
1814	//   "id": "file.projects.locations.instances.delete",
1815	//   "parameterOrder": [
1816	//     "name"
1817	//   ],
1818	//   "parameters": {
1819	//     "name": {
1820	//       "description": "Required. The instance resource name, in the format\nprojects/{project_id}/locations/{location}/instances/{instance_id}",
1821	//       "location": "path",
1822	//       "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
1823	//       "required": true,
1824	//       "type": "string"
1825	//     }
1826	//   },
1827	//   "path": "v1/{+name}",
1828	//   "response": {
1829	//     "$ref": "Operation"
1830	//   },
1831	//   "scopes": [
1832	//     "https://www.googleapis.com/auth/cloud-platform"
1833	//   ]
1834	// }
1835
1836}
1837
1838// method id "file.projects.locations.instances.get":
1839
1840type ProjectsLocationsInstancesGetCall struct {
1841	s            *Service
1842	name         string
1843	urlParams_   gensupport.URLParams
1844	ifNoneMatch_ string
1845	ctx_         context.Context
1846	header_      http.Header
1847}
1848
1849// Get: Gets the details of a specific instance.
1850func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall {
1851	c := &ProjectsLocationsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1852	c.name = name
1853	return c
1854}
1855
1856// Fields allows partial responses to be retrieved. See
1857// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1858// for more information.
1859func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall {
1860	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1861	return c
1862}
1863
1864// IfNoneMatch sets the optional parameter which makes the operation
1865// fail if the object's ETag matches the given value. This is useful for
1866// getting updates only after the object has changed since the last
1867// request. Use googleapi.IsNotModified to check whether the response
1868// error from Do is the result of In-None-Match.
1869func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall {
1870	c.ifNoneMatch_ = entityTag
1871	return c
1872}
1873
1874// Context sets the context to be used in this call's Do method. Any
1875// pending HTTP request will be aborted if the provided context is
1876// canceled.
1877func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall {
1878	c.ctx_ = ctx
1879	return c
1880}
1881
1882// Header returns an http.Header that can be modified by the caller to
1883// add HTTP headers to the request.
1884func (c *ProjectsLocationsInstancesGetCall) Header() http.Header {
1885	if c.header_ == nil {
1886		c.header_ = make(http.Header)
1887	}
1888	return c.header_
1889}
1890
1891func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
1892	reqHeaders := make(http.Header)
1893	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
1894	for k, v := range c.header_ {
1895		reqHeaders[k] = v
1896	}
1897	reqHeaders.Set("User-Agent", c.s.userAgent())
1898	if c.ifNoneMatch_ != "" {
1899		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1900	}
1901	var body io.Reader = nil
1902	c.urlParams_.Set("alt", alt)
1903	c.urlParams_.Set("prettyPrint", "false")
1904	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
1905	urls += "?" + c.urlParams_.Encode()
1906	req, err := http.NewRequest("GET", urls, body)
1907	if err != nil {
1908		return nil, err
1909	}
1910	req.Header = reqHeaders
1911	googleapi.Expand(req.URL, map[string]string{
1912		"name": c.name,
1913	})
1914	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1915}
1916
1917// Do executes the "file.projects.locations.instances.get" call.
1918// Exactly one of *Instance or error will be non-nil. Any non-2xx status
1919// code is an error. Response headers are in either
1920// *Instance.ServerResponse.Header or (if a response was returned at
1921// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
1922// to check whether the returned error was because
1923// http.StatusNotModified was returned.
1924func (c *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
1925	gensupport.SetOptions(c.urlParams_, opts...)
1926	res, err := c.doRequest("json")
1927	if res != nil && res.StatusCode == http.StatusNotModified {
1928		if res.Body != nil {
1929			res.Body.Close()
1930		}
1931		return nil, &googleapi.Error{
1932			Code:   res.StatusCode,
1933			Header: res.Header,
1934		}
1935	}
1936	if err != nil {
1937		return nil, err
1938	}
1939	defer googleapi.CloseBody(res)
1940	if err := googleapi.CheckResponse(res); err != nil {
1941		return nil, err
1942	}
1943	ret := &Instance{
1944		ServerResponse: googleapi.ServerResponse{
1945			Header:         res.Header,
1946			HTTPStatusCode: res.StatusCode,
1947		},
1948	}
1949	target := &ret
1950	if err := gensupport.DecodeResponse(target, res); err != nil {
1951		return nil, err
1952	}
1953	return ret, nil
1954	// {
1955	//   "description": "Gets the details of a specific instance.",
1956	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}",
1957	//   "httpMethod": "GET",
1958	//   "id": "file.projects.locations.instances.get",
1959	//   "parameterOrder": [
1960	//     "name"
1961	//   ],
1962	//   "parameters": {
1963	//     "name": {
1964	//       "description": "Required. The instance resource name, in the format\nprojects/{project_id}/locations/{location}/instances/{instance_id}.",
1965	//       "location": "path",
1966	//       "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
1967	//       "required": true,
1968	//       "type": "string"
1969	//     }
1970	//   },
1971	//   "path": "v1/{+name}",
1972	//   "response": {
1973	//     "$ref": "Instance"
1974	//   },
1975	//   "scopes": [
1976	//     "https://www.googleapis.com/auth/cloud-platform"
1977	//   ]
1978	// }
1979
1980}
1981
1982// method id "file.projects.locations.instances.list":
1983
1984type ProjectsLocationsInstancesListCall struct {
1985	s            *Service
1986	parent       string
1987	urlParams_   gensupport.URLParams
1988	ifNoneMatch_ string
1989	ctx_         context.Context
1990	header_      http.Header
1991}
1992
1993// List: Lists all instances in a project for either a specified
1994// location
1995// or for all locations.
1996func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall {
1997	c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1998	c.parent = parent
1999	return c
2000}
2001
2002// Filter sets the optional parameter "filter": List filter.
2003func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall {
2004	c.urlParams_.Set("filter", filter)
2005	return c
2006}
2007
2008// OrderBy sets the optional parameter "orderBy": Sort results.
2009// Supported values are "name", "name desc" or "" (unsorted).
2010func (c *ProjectsLocationsInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesListCall {
2011	c.urlParams_.Set("orderBy", orderBy)
2012	return c
2013}
2014
2015// PageSize sets the optional parameter "pageSize": The maximum number
2016// of items to return.
2017func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall {
2018	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2019	return c
2020}
2021
2022// PageToken sets the optional parameter "pageToken": The
2023// next_page_token value to use if there are additional
2024// results to retrieve for this list request.
2025func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall {
2026	c.urlParams_.Set("pageToken", pageToken)
2027	return c
2028}
2029
2030// Fields allows partial responses to be retrieved. See
2031// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2032// for more information.
2033func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall {
2034	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2035	return c
2036}
2037
2038// IfNoneMatch sets the optional parameter which makes the operation
2039// fail if the object's ETag matches the given value. This is useful for
2040// getting updates only after the object has changed since the last
2041// request. Use googleapi.IsNotModified to check whether the response
2042// error from Do is the result of In-None-Match.
2043func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall {
2044	c.ifNoneMatch_ = entityTag
2045	return c
2046}
2047
2048// Context sets the context to be used in this call's Do method. Any
2049// pending HTTP request will be aborted if the provided context is
2050// canceled.
2051func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall {
2052	c.ctx_ = ctx
2053	return c
2054}
2055
2056// Header returns an http.Header that can be modified by the caller to
2057// add HTTP headers to the request.
2058func (c *ProjectsLocationsInstancesListCall) Header() http.Header {
2059	if c.header_ == nil {
2060		c.header_ = make(http.Header)
2061	}
2062	return c.header_
2063}
2064
2065func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) {
2066	reqHeaders := make(http.Header)
2067	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2068	for k, v := range c.header_ {
2069		reqHeaders[k] = v
2070	}
2071	reqHeaders.Set("User-Agent", c.s.userAgent())
2072	if c.ifNoneMatch_ != "" {
2073		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2074	}
2075	var body io.Reader = nil
2076	c.urlParams_.Set("alt", alt)
2077	c.urlParams_.Set("prettyPrint", "false")
2078	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances")
2079	urls += "?" + c.urlParams_.Encode()
2080	req, err := http.NewRequest("GET", urls, body)
2081	if err != nil {
2082		return nil, err
2083	}
2084	req.Header = reqHeaders
2085	googleapi.Expand(req.URL, map[string]string{
2086		"parent": c.parent,
2087	})
2088	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2089}
2090
2091// Do executes the "file.projects.locations.instances.list" call.
2092// Exactly one of *ListInstancesResponse or error will be non-nil. Any
2093// non-2xx status code is an error. Response headers are in either
2094// *ListInstancesResponse.ServerResponse.Header or (if a response was
2095// returned at all) in error.(*googleapi.Error).Header. Use
2096// googleapi.IsNotModified to check whether the returned error was
2097// because http.StatusNotModified was returned.
2098func (c *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
2099	gensupport.SetOptions(c.urlParams_, opts...)
2100	res, err := c.doRequest("json")
2101	if res != nil && res.StatusCode == http.StatusNotModified {
2102		if res.Body != nil {
2103			res.Body.Close()
2104		}
2105		return nil, &googleapi.Error{
2106			Code:   res.StatusCode,
2107			Header: res.Header,
2108		}
2109	}
2110	if err != nil {
2111		return nil, err
2112	}
2113	defer googleapi.CloseBody(res)
2114	if err := googleapi.CheckResponse(res); err != nil {
2115		return nil, err
2116	}
2117	ret := &ListInstancesResponse{
2118		ServerResponse: googleapi.ServerResponse{
2119			Header:         res.Header,
2120			HTTPStatusCode: res.StatusCode,
2121		},
2122	}
2123	target := &ret
2124	if err := gensupport.DecodeResponse(target, res); err != nil {
2125		return nil, err
2126	}
2127	return ret, nil
2128	// {
2129	//   "description": "Lists all instances in a project for either a specified location\nor for all locations.",
2130	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances",
2131	//   "httpMethod": "GET",
2132	//   "id": "file.projects.locations.instances.list",
2133	//   "parameterOrder": [
2134	//     "parent"
2135	//   ],
2136	//   "parameters": {
2137	//     "filter": {
2138	//       "description": "List filter.",
2139	//       "location": "query",
2140	//       "type": "string"
2141	//     },
2142	//     "orderBy": {
2143	//       "description": "Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).",
2144	//       "location": "query",
2145	//       "type": "string"
2146	//     },
2147	//     "pageSize": {
2148	//       "description": "The maximum number of items to return.",
2149	//       "format": "int32",
2150	//       "location": "query",
2151	//       "type": "integer"
2152	//     },
2153	//     "pageToken": {
2154	//       "description": "The next_page_token value to use if there are additional\nresults to retrieve for this list request.",
2155	//       "location": "query",
2156	//       "type": "string"
2157	//     },
2158	//     "parent": {
2159	//       "description": "Required. The project and location for which to retrieve instance information,\nin the format projects/{project_id}/locations/{location}. In Cloud\nFilestore, locations map to GCP zones, for example **us-west1-b**. To\nretrieve instance information for all locations, use \"-\" for the {location}\nvalue.",
2160	//       "location": "path",
2161	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2162	//       "required": true,
2163	//       "type": "string"
2164	//     }
2165	//   },
2166	//   "path": "v1/{+parent}/instances",
2167	//   "response": {
2168	//     "$ref": "ListInstancesResponse"
2169	//   },
2170	//   "scopes": [
2171	//     "https://www.googleapis.com/auth/cloud-platform"
2172	//   ]
2173	// }
2174
2175}
2176
2177// Pages invokes f for each page of results.
2178// A non-nil error returned from f will halt the iteration.
2179// The provided context supersedes any context provided to the Context method.
2180func (c *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
2181	c.ctx_ = ctx
2182	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2183	for {
2184		x, err := c.Do()
2185		if err != nil {
2186			return err
2187		}
2188		if err := f(x); err != nil {
2189			return err
2190		}
2191		if x.NextPageToken == "" {
2192			return nil
2193		}
2194		c.PageToken(x.NextPageToken)
2195	}
2196}
2197
2198// method id "file.projects.locations.instances.patch":
2199
2200type ProjectsLocationsInstancesPatchCall struct {
2201	s          *Service
2202	name       string
2203	instance   *Instance
2204	urlParams_ gensupport.URLParams
2205	ctx_       context.Context
2206	header_    http.Header
2207}
2208
2209// Patch: Updates the settings of a specific instance.
2210func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsInstancesPatchCall {
2211	c := &ProjectsLocationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2212	c.name = name
2213	c.instance = instance
2214	return c
2215}
2216
2217// UpdateMask sets the optional parameter "updateMask": Mask of fields
2218// to update.  At least one path must be supplied in this
2219// field.  The elements of the repeated paths field may only include
2220// these
2221// fields:
2222//
2223// * "description"
2224// * "file_shares"
2225// * "labels"
2226func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall {
2227	c.urlParams_.Set("updateMask", updateMask)
2228	return c
2229}
2230
2231// Fields allows partial responses to be retrieved. See
2232// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2233// for more information.
2234func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPatchCall {
2235	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2236	return c
2237}
2238
2239// Context sets the context to be used in this call's Do method. Any
2240// pending HTTP request will be aborted if the provided context is
2241// canceled.
2242func (c *ProjectsLocationsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesPatchCall {
2243	c.ctx_ = ctx
2244	return c
2245}
2246
2247// Header returns an http.Header that can be modified by the caller to
2248// add HTTP headers to the request.
2249func (c *ProjectsLocationsInstancesPatchCall) Header() http.Header {
2250	if c.header_ == nil {
2251		c.header_ = make(http.Header)
2252	}
2253	return c.header_
2254}
2255
2256func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) {
2257	reqHeaders := make(http.Header)
2258	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2259	for k, v := range c.header_ {
2260		reqHeaders[k] = v
2261	}
2262	reqHeaders.Set("User-Agent", c.s.userAgent())
2263	var body io.Reader = nil
2264	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
2265	if err != nil {
2266		return nil, err
2267	}
2268	reqHeaders.Set("Content-Type", "application/json")
2269	c.urlParams_.Set("alt", alt)
2270	c.urlParams_.Set("prettyPrint", "false")
2271	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2272	urls += "?" + c.urlParams_.Encode()
2273	req, err := http.NewRequest("PATCH", urls, body)
2274	if err != nil {
2275		return nil, err
2276	}
2277	req.Header = reqHeaders
2278	googleapi.Expand(req.URL, map[string]string{
2279		"name": c.name,
2280	})
2281	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2282}
2283
2284// Do executes the "file.projects.locations.instances.patch" call.
2285// Exactly one of *Operation or error will be non-nil. Any non-2xx
2286// status code is an error. Response headers are in either
2287// *Operation.ServerResponse.Header or (if a response was returned at
2288// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2289// to check whether the returned error was because
2290// http.StatusNotModified was returned.
2291func (c *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2292	gensupport.SetOptions(c.urlParams_, opts...)
2293	res, err := c.doRequest("json")
2294	if res != nil && res.StatusCode == http.StatusNotModified {
2295		if res.Body != nil {
2296			res.Body.Close()
2297		}
2298		return nil, &googleapi.Error{
2299			Code:   res.StatusCode,
2300			Header: res.Header,
2301		}
2302	}
2303	if err != nil {
2304		return nil, err
2305	}
2306	defer googleapi.CloseBody(res)
2307	if err := googleapi.CheckResponse(res); err != nil {
2308		return nil, err
2309	}
2310	ret := &Operation{
2311		ServerResponse: googleapi.ServerResponse{
2312			Header:         res.Header,
2313			HTTPStatusCode: res.StatusCode,
2314		},
2315	}
2316	target := &ret
2317	if err := gensupport.DecodeResponse(target, res); err != nil {
2318		return nil, err
2319	}
2320	return ret, nil
2321	// {
2322	//   "description": "Updates the settings of a specific instance.",
2323	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}",
2324	//   "httpMethod": "PATCH",
2325	//   "id": "file.projects.locations.instances.patch",
2326	//   "parameterOrder": [
2327	//     "name"
2328	//   ],
2329	//   "parameters": {
2330	//     "name": {
2331	//       "description": "Output only. The resource name of the instance, in the format\nprojects/{project}/locations/{location}/instances/{instance}.",
2332	//       "location": "path",
2333	//       "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
2334	//       "required": true,
2335	//       "type": "string"
2336	//     },
2337	//     "updateMask": {
2338	//       "description": "Mask of fields to update.  At least one path must be supplied in this\nfield.  The elements of the repeated paths field may only include these\nfields:\n\n* \"description\"\n* \"file_shares\"\n* \"labels\"",
2339	//       "format": "google-fieldmask",
2340	//       "location": "query",
2341	//       "type": "string"
2342	//     }
2343	//   },
2344	//   "path": "v1/{+name}",
2345	//   "request": {
2346	//     "$ref": "Instance"
2347	//   },
2348	//   "response": {
2349	//     "$ref": "Operation"
2350	//   },
2351	//   "scopes": [
2352	//     "https://www.googleapis.com/auth/cloud-platform"
2353	//   ]
2354	// }
2355
2356}
2357
2358// method id "file.projects.locations.operations.cancel":
2359
2360type ProjectsLocationsOperationsCancelCall struct {
2361	s                      *Service
2362	name                   string
2363	canceloperationrequest *CancelOperationRequest
2364	urlParams_             gensupport.URLParams
2365	ctx_                   context.Context
2366	header_                http.Header
2367}
2368
2369// Cancel: Starts asynchronous cancellation on a long-running operation.
2370//  The server
2371// makes a best effort to cancel the operation, but success is
2372// not
2373// guaranteed.  If the server doesn't support this method, it
2374// returns
2375// `google.rpc.Code.UNIMPLEMENTED`.  Clients can
2376// use
2377// Operations.GetOperation or
2378// other methods to check whether the cancellation succeeded or whether
2379// the
2380// operation completed despite cancellation. On successful
2381// cancellation,
2382// the operation is not deleted; instead, it becomes an operation
2383// with
2384// an Operation.error value with a google.rpc.Status.code of
2385// 1,
2386// corresponding to `Code.CANCELLED`.
2387func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
2388	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2389	c.name = name
2390	c.canceloperationrequest = canceloperationrequest
2391	return c
2392}
2393
2394// Fields allows partial responses to be retrieved. See
2395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2396// for more information.
2397func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
2398	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2399	return c
2400}
2401
2402// Context sets the context to be used in this call's Do method. Any
2403// pending HTTP request will be aborted if the provided context is
2404// canceled.
2405func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
2406	c.ctx_ = ctx
2407	return c
2408}
2409
2410// Header returns an http.Header that can be modified by the caller to
2411// add HTTP headers to the request.
2412func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
2413	if c.header_ == nil {
2414		c.header_ = make(http.Header)
2415	}
2416	return c.header_
2417}
2418
2419func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
2420	reqHeaders := make(http.Header)
2421	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2422	for k, v := range c.header_ {
2423		reqHeaders[k] = v
2424	}
2425	reqHeaders.Set("User-Agent", c.s.userAgent())
2426	var body io.Reader = nil
2427	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
2428	if err != nil {
2429		return nil, err
2430	}
2431	reqHeaders.Set("Content-Type", "application/json")
2432	c.urlParams_.Set("alt", alt)
2433	c.urlParams_.Set("prettyPrint", "false")
2434	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
2435	urls += "?" + c.urlParams_.Encode()
2436	req, err := http.NewRequest("POST", urls, body)
2437	if err != nil {
2438		return nil, err
2439	}
2440	req.Header = reqHeaders
2441	googleapi.Expand(req.URL, map[string]string{
2442		"name": c.name,
2443	})
2444	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2445}
2446
2447// Do executes the "file.projects.locations.operations.cancel" call.
2448// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2449// code is an error. Response headers are in either
2450// *Empty.ServerResponse.Header or (if a response was returned at all)
2451// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2452// check whether the returned error was because http.StatusNotModified
2453// was returned.
2454func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2455	gensupport.SetOptions(c.urlParams_, opts...)
2456	res, err := c.doRequest("json")
2457	if res != nil && res.StatusCode == http.StatusNotModified {
2458		if res.Body != nil {
2459			res.Body.Close()
2460		}
2461		return nil, &googleapi.Error{
2462			Code:   res.StatusCode,
2463			Header: res.Header,
2464		}
2465	}
2466	if err != nil {
2467		return nil, err
2468	}
2469	defer googleapi.CloseBody(res)
2470	if err := googleapi.CheckResponse(res); err != nil {
2471		return nil, err
2472	}
2473	ret := &Empty{
2474		ServerResponse: googleapi.ServerResponse{
2475			Header:         res.Header,
2476			HTTPStatusCode: res.StatusCode,
2477		},
2478	}
2479	target := &ret
2480	if err := gensupport.DecodeResponse(target, res); err != nil {
2481		return nil, err
2482	}
2483	return ret, nil
2484	// {
2485	//   "description": "Starts asynchronous cancellation on a long-running operation.  The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed.  If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.  Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.",
2486	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
2487	//   "httpMethod": "POST",
2488	//   "id": "file.projects.locations.operations.cancel",
2489	//   "parameterOrder": [
2490	//     "name"
2491	//   ],
2492	//   "parameters": {
2493	//     "name": {
2494	//       "description": "The name of the operation resource to be cancelled.",
2495	//       "location": "path",
2496	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
2497	//       "required": true,
2498	//       "type": "string"
2499	//     }
2500	//   },
2501	//   "path": "v1/{+name}:cancel",
2502	//   "request": {
2503	//     "$ref": "CancelOperationRequest"
2504	//   },
2505	//   "response": {
2506	//     "$ref": "Empty"
2507	//   },
2508	//   "scopes": [
2509	//     "https://www.googleapis.com/auth/cloud-platform"
2510	//   ]
2511	// }
2512
2513}
2514
2515// method id "file.projects.locations.operations.delete":
2516
2517type ProjectsLocationsOperationsDeleteCall struct {
2518	s          *Service
2519	name       string
2520	urlParams_ gensupport.URLParams
2521	ctx_       context.Context
2522	header_    http.Header
2523}
2524
2525// Delete: Deletes a long-running operation. This method indicates that
2526// the client is
2527// no longer interested in the operation result. It does not cancel
2528// the
2529// operation. If the server doesn't support this method, it
2530// returns
2531// `google.rpc.Code.UNIMPLEMENTED`.
2532func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
2533	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2534	c.name = name
2535	return c
2536}
2537
2538// Fields allows partial responses to be retrieved. See
2539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2540// for more information.
2541func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
2542	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2543	return c
2544}
2545
2546// Context sets the context to be used in this call's Do method. Any
2547// pending HTTP request will be aborted if the provided context is
2548// canceled.
2549func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
2550	c.ctx_ = ctx
2551	return c
2552}
2553
2554// Header returns an http.Header that can be modified by the caller to
2555// add HTTP headers to the request.
2556func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
2557	if c.header_ == nil {
2558		c.header_ = make(http.Header)
2559	}
2560	return c.header_
2561}
2562
2563func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
2564	reqHeaders := make(http.Header)
2565	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2566	for k, v := range c.header_ {
2567		reqHeaders[k] = v
2568	}
2569	reqHeaders.Set("User-Agent", c.s.userAgent())
2570	var body io.Reader = nil
2571	c.urlParams_.Set("alt", alt)
2572	c.urlParams_.Set("prettyPrint", "false")
2573	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2574	urls += "?" + c.urlParams_.Encode()
2575	req, err := http.NewRequest("DELETE", urls, body)
2576	if err != nil {
2577		return nil, err
2578	}
2579	req.Header = reqHeaders
2580	googleapi.Expand(req.URL, map[string]string{
2581		"name": c.name,
2582	})
2583	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2584}
2585
2586// Do executes the "file.projects.locations.operations.delete" call.
2587// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2588// code is an error. Response headers are in either
2589// *Empty.ServerResponse.Header or (if a response was returned at all)
2590// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2591// check whether the returned error was because http.StatusNotModified
2592// was returned.
2593func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2594	gensupport.SetOptions(c.urlParams_, opts...)
2595	res, err := c.doRequest("json")
2596	if res != nil && res.StatusCode == http.StatusNotModified {
2597		if res.Body != nil {
2598			res.Body.Close()
2599		}
2600		return nil, &googleapi.Error{
2601			Code:   res.StatusCode,
2602			Header: res.Header,
2603		}
2604	}
2605	if err != nil {
2606		return nil, err
2607	}
2608	defer googleapi.CloseBody(res)
2609	if err := googleapi.CheckResponse(res); err != nil {
2610		return nil, err
2611	}
2612	ret := &Empty{
2613		ServerResponse: googleapi.ServerResponse{
2614			Header:         res.Header,
2615			HTTPStatusCode: res.StatusCode,
2616		},
2617	}
2618	target := &ret
2619	if err := gensupport.DecodeResponse(target, res); err != nil {
2620		return nil, err
2621	}
2622	return ret, nil
2623	// {
2624	//   "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.",
2625	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
2626	//   "httpMethod": "DELETE",
2627	//   "id": "file.projects.locations.operations.delete",
2628	//   "parameterOrder": [
2629	//     "name"
2630	//   ],
2631	//   "parameters": {
2632	//     "name": {
2633	//       "description": "The name of the operation resource to be deleted.",
2634	//       "location": "path",
2635	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
2636	//       "required": true,
2637	//       "type": "string"
2638	//     }
2639	//   },
2640	//   "path": "v1/{+name}",
2641	//   "response": {
2642	//     "$ref": "Empty"
2643	//   },
2644	//   "scopes": [
2645	//     "https://www.googleapis.com/auth/cloud-platform"
2646	//   ]
2647	// }
2648
2649}
2650
2651// method id "file.projects.locations.operations.get":
2652
2653type ProjectsLocationsOperationsGetCall struct {
2654	s            *Service
2655	name         string
2656	urlParams_   gensupport.URLParams
2657	ifNoneMatch_ string
2658	ctx_         context.Context
2659	header_      http.Header
2660}
2661
2662// Get: Gets the latest state of a long-running operation.  Clients can
2663// use this
2664// method to poll the operation result at intervals as recommended by
2665// the API
2666// service.
2667func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
2668	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2669	c.name = name
2670	return c
2671}
2672
2673// Fields allows partial responses to be retrieved. See
2674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2675// for more information.
2676func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
2677	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2678	return c
2679}
2680
2681// IfNoneMatch sets the optional parameter which makes the operation
2682// fail if the object's ETag matches the given value. This is useful for
2683// getting updates only after the object has changed since the last
2684// request. Use googleapi.IsNotModified to check whether the response
2685// error from Do is the result of In-None-Match.
2686func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
2687	c.ifNoneMatch_ = entityTag
2688	return c
2689}
2690
2691// Context sets the context to be used in this call's Do method. Any
2692// pending HTTP request will be aborted if the provided context is
2693// canceled.
2694func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
2695	c.ctx_ = ctx
2696	return c
2697}
2698
2699// Header returns an http.Header that can be modified by the caller to
2700// add HTTP headers to the request.
2701func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
2702	if c.header_ == nil {
2703		c.header_ = make(http.Header)
2704	}
2705	return c.header_
2706}
2707
2708func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
2709	reqHeaders := make(http.Header)
2710	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2711	for k, v := range c.header_ {
2712		reqHeaders[k] = v
2713	}
2714	reqHeaders.Set("User-Agent", c.s.userAgent())
2715	if c.ifNoneMatch_ != "" {
2716		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2717	}
2718	var body io.Reader = nil
2719	c.urlParams_.Set("alt", alt)
2720	c.urlParams_.Set("prettyPrint", "false")
2721	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2722	urls += "?" + c.urlParams_.Encode()
2723	req, err := http.NewRequest("GET", urls, body)
2724	if err != nil {
2725		return nil, err
2726	}
2727	req.Header = reqHeaders
2728	googleapi.Expand(req.URL, map[string]string{
2729		"name": c.name,
2730	})
2731	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2732}
2733
2734// Do executes the "file.projects.locations.operations.get" call.
2735// Exactly one of *Operation or error will be non-nil. Any non-2xx
2736// status code is an error. Response headers are in either
2737// *Operation.ServerResponse.Header or (if a response was returned at
2738// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2739// to check whether the returned error was because
2740// http.StatusNotModified was returned.
2741func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2742	gensupport.SetOptions(c.urlParams_, opts...)
2743	res, err := c.doRequest("json")
2744	if res != nil && res.StatusCode == http.StatusNotModified {
2745		if res.Body != nil {
2746			res.Body.Close()
2747		}
2748		return nil, &googleapi.Error{
2749			Code:   res.StatusCode,
2750			Header: res.Header,
2751		}
2752	}
2753	if err != nil {
2754		return nil, err
2755	}
2756	defer googleapi.CloseBody(res)
2757	if err := googleapi.CheckResponse(res); err != nil {
2758		return nil, err
2759	}
2760	ret := &Operation{
2761		ServerResponse: googleapi.ServerResponse{
2762			Header:         res.Header,
2763			HTTPStatusCode: res.StatusCode,
2764		},
2765	}
2766	target := &ret
2767	if err := gensupport.DecodeResponse(target, res); err != nil {
2768		return nil, err
2769	}
2770	return ret, nil
2771	// {
2772	//   "description": "Gets the latest state of a long-running operation.  Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
2773	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
2774	//   "httpMethod": "GET",
2775	//   "id": "file.projects.locations.operations.get",
2776	//   "parameterOrder": [
2777	//     "name"
2778	//   ],
2779	//   "parameters": {
2780	//     "name": {
2781	//       "description": "The name of the operation resource.",
2782	//       "location": "path",
2783	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
2784	//       "required": true,
2785	//       "type": "string"
2786	//     }
2787	//   },
2788	//   "path": "v1/{+name}",
2789	//   "response": {
2790	//     "$ref": "Operation"
2791	//   },
2792	//   "scopes": [
2793	//     "https://www.googleapis.com/auth/cloud-platform"
2794	//   ]
2795	// }
2796
2797}
2798
2799// method id "file.projects.locations.operations.list":
2800
2801type ProjectsLocationsOperationsListCall struct {
2802	s            *Service
2803	name         string
2804	urlParams_   gensupport.URLParams
2805	ifNoneMatch_ string
2806	ctx_         context.Context
2807	header_      http.Header
2808}
2809
2810// List: Lists operations that match the specified filter in the
2811// request. If the
2812// server doesn't support this method, it returns
2813// `UNIMPLEMENTED`.
2814//
2815// NOTE: the `name` binding allows API services to override the
2816// binding
2817// to use different resource name schemes, such as `users/*/operations`.
2818// To
2819// override the binding, API services can add a binding such
2820// as
2821// "/v1/{name=users/*}/operations" to their service configuration.
2822// For backwards compatibility, the default name includes the
2823// operations
2824// collection id, however overriding users must ensure the name
2825// binding
2826// is the parent resource, without the operations collection id.
2827func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
2828	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2829	c.name = name
2830	return c
2831}
2832
2833// Filter sets the optional parameter "filter": The standard list
2834// filter.
2835func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
2836	c.urlParams_.Set("filter", filter)
2837	return c
2838}
2839
2840// PageSize sets the optional parameter "pageSize": The standard list
2841// page size.
2842func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
2843	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2844	return c
2845}
2846
2847// PageToken sets the optional parameter "pageToken": The standard list
2848// page token.
2849func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
2850	c.urlParams_.Set("pageToken", pageToken)
2851	return c
2852}
2853
2854// Fields allows partial responses to be retrieved. See
2855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2856// for more information.
2857func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
2858	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2859	return c
2860}
2861
2862// IfNoneMatch sets the optional parameter which makes the operation
2863// fail if the object's ETag matches the given value. This is useful for
2864// getting updates only after the object has changed since the last
2865// request. Use googleapi.IsNotModified to check whether the response
2866// error from Do is the result of In-None-Match.
2867func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
2868	c.ifNoneMatch_ = entityTag
2869	return c
2870}
2871
2872// Context sets the context to be used in this call's Do method. Any
2873// pending HTTP request will be aborted if the provided context is
2874// canceled.
2875func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
2876	c.ctx_ = ctx
2877	return c
2878}
2879
2880// Header returns an http.Header that can be modified by the caller to
2881// add HTTP headers to the request.
2882func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
2883	if c.header_ == nil {
2884		c.header_ = make(http.Header)
2885	}
2886	return c.header_
2887}
2888
2889func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
2890	reqHeaders := make(http.Header)
2891	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
2892	for k, v := range c.header_ {
2893		reqHeaders[k] = v
2894	}
2895	reqHeaders.Set("User-Agent", c.s.userAgent())
2896	if c.ifNoneMatch_ != "" {
2897		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2898	}
2899	var body io.Reader = nil
2900	c.urlParams_.Set("alt", alt)
2901	c.urlParams_.Set("prettyPrint", "false")
2902	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
2903	urls += "?" + c.urlParams_.Encode()
2904	req, err := http.NewRequest("GET", urls, body)
2905	if err != nil {
2906		return nil, err
2907	}
2908	req.Header = reqHeaders
2909	googleapi.Expand(req.URL, map[string]string{
2910		"name": c.name,
2911	})
2912	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2913}
2914
2915// Do executes the "file.projects.locations.operations.list" call.
2916// Exactly one of *ListOperationsResponse or error will be non-nil. Any
2917// non-2xx status code is an error. Response headers are in either
2918// *ListOperationsResponse.ServerResponse.Header or (if a response was
2919// returned at all) in error.(*googleapi.Error).Header. Use
2920// googleapi.IsNotModified to check whether the returned error was
2921// because http.StatusNotModified was returned.
2922func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
2923	gensupport.SetOptions(c.urlParams_, opts...)
2924	res, err := c.doRequest("json")
2925	if res != nil && res.StatusCode == http.StatusNotModified {
2926		if res.Body != nil {
2927			res.Body.Close()
2928		}
2929		return nil, &googleapi.Error{
2930			Code:   res.StatusCode,
2931			Header: res.Header,
2932		}
2933	}
2934	if err != nil {
2935		return nil, err
2936	}
2937	defer googleapi.CloseBody(res)
2938	if err := googleapi.CheckResponse(res); err != nil {
2939		return nil, err
2940	}
2941	ret := &ListOperationsResponse{
2942		ServerResponse: googleapi.ServerResponse{
2943			Header:         res.Header,
2944			HTTPStatusCode: res.StatusCode,
2945		},
2946	}
2947	target := &ret
2948	if err := gensupport.DecodeResponse(target, res); err != nil {
2949		return nil, err
2950	}
2951	return ret, nil
2952	// {
2953	//   "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.",
2954	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations",
2955	//   "httpMethod": "GET",
2956	//   "id": "file.projects.locations.operations.list",
2957	//   "parameterOrder": [
2958	//     "name"
2959	//   ],
2960	//   "parameters": {
2961	//     "filter": {
2962	//       "description": "The standard list filter.",
2963	//       "location": "query",
2964	//       "type": "string"
2965	//     },
2966	//     "name": {
2967	//       "description": "The name of the operation's parent resource.",
2968	//       "location": "path",
2969	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2970	//       "required": true,
2971	//       "type": "string"
2972	//     },
2973	//     "pageSize": {
2974	//       "description": "The standard list page size.",
2975	//       "format": "int32",
2976	//       "location": "query",
2977	//       "type": "integer"
2978	//     },
2979	//     "pageToken": {
2980	//       "description": "The standard list page token.",
2981	//       "location": "query",
2982	//       "type": "string"
2983	//     }
2984	//   },
2985	//   "path": "v1/{+name}/operations",
2986	//   "response": {
2987	//     "$ref": "ListOperationsResponse"
2988	//   },
2989	//   "scopes": [
2990	//     "https://www.googleapis.com/auth/cloud-platform"
2991	//   ]
2992	// }
2993
2994}
2995
2996// Pages invokes f for each page of results.
2997// A non-nil error returned from f will halt the iteration.
2998// The provided context supersedes any context provided to the Context method.
2999func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
3000	c.ctx_ = ctx
3001	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3002	for {
3003		x, err := c.Do()
3004		if err != nil {
3005			return err
3006		}
3007		if err := f(x); err != nil {
3008			return err
3009		}
3010		if x.NextPageToken == "" {
3011			return nil
3012		}
3013		c.PageToken(x.NextPageToken)
3014	}
3015}
3016