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