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