1// Package compute provides access to the Compute Engine API.
2//
3// See https://developers.google.com/compute/docs/reference/latest/
4//
5// Usage example:
6//
7//   import "google.golang.org/api/compute/v1"
8//   ...
9//   computeService, err := compute.New(oauthHttpClient)
10package compute // import "google.golang.org/api/compute/v1"
11
12import (
13	"bytes"
14	"encoding/json"
15	"errors"
16	"fmt"
17	context "golang.org/x/net/context"
18	ctxhttp "golang.org/x/net/context/ctxhttp"
19	gensupport "google.golang.org/api/gensupport"
20	googleapi "google.golang.org/api/googleapi"
21	"io"
22	"net/http"
23	"net/url"
24	"strconv"
25	"strings"
26)
27
28// Always reference these packages, just in case the auto-generated code
29// below doesn't.
30var _ = bytes.NewBuffer
31var _ = strconv.Itoa
32var _ = fmt.Sprintf
33var _ = json.NewDecoder
34var _ = io.Copy
35var _ = url.Parse
36var _ = gensupport.MarshalJSON
37var _ = googleapi.Version
38var _ = errors.New
39var _ = strings.Replace
40var _ = context.Canceled
41var _ = ctxhttp.Do
42
43const apiId = "compute:v1"
44const apiName = "compute"
45const apiVersion = "v1"
46const basePath = "https://www.googleapis.com/compute/v1/projects/"
47
48// OAuth2 scopes used by this API.
49const (
50	// View and manage your data across Google Cloud Platform services
51	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
52
53	// View and manage your Google Compute Engine resources
54	ComputeScope = "https://www.googleapis.com/auth/compute"
55
56	// View your Google Compute Engine resources
57	ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly"
58
59	// Manage your data and permissions in Google Cloud Storage
60	DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control"
61
62	// View your data in Google Cloud Storage
63	DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only"
64
65	// Manage your data in Google Cloud Storage
66	DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write"
67)
68
69func New(client *http.Client) (*Service, error) {
70	if client == nil {
71		return nil, errors.New("client is nil")
72	}
73	s := &Service{client: client, BasePath: basePath}
74	s.Addresses = NewAddressesService(s)
75	s.Autoscalers = NewAutoscalersService(s)
76	s.BackendServices = NewBackendServicesService(s)
77	s.DiskTypes = NewDiskTypesService(s)
78	s.Disks = NewDisksService(s)
79	s.Firewalls = NewFirewallsService(s)
80	s.ForwardingRules = NewForwardingRulesService(s)
81	s.GlobalAddresses = NewGlobalAddressesService(s)
82	s.GlobalForwardingRules = NewGlobalForwardingRulesService(s)
83	s.GlobalOperations = NewGlobalOperationsService(s)
84	s.HttpHealthChecks = NewHttpHealthChecksService(s)
85	s.HttpsHealthChecks = NewHttpsHealthChecksService(s)
86	s.Images = NewImagesService(s)
87	s.InstanceGroupManagers = NewInstanceGroupManagersService(s)
88	s.InstanceGroups = NewInstanceGroupsService(s)
89	s.InstanceTemplates = NewInstanceTemplatesService(s)
90	s.Instances = NewInstancesService(s)
91	s.Licenses = NewLicensesService(s)
92	s.MachineTypes = NewMachineTypesService(s)
93	s.Networks = NewNetworksService(s)
94	s.Projects = NewProjectsService(s)
95	s.RegionOperations = NewRegionOperationsService(s)
96	s.Regions = NewRegionsService(s)
97	s.Routes = NewRoutesService(s)
98	s.Snapshots = NewSnapshotsService(s)
99	s.SslCertificates = NewSslCertificatesService(s)
100	s.Subnetworks = NewSubnetworksService(s)
101	s.TargetHttpProxies = NewTargetHttpProxiesService(s)
102	s.TargetHttpsProxies = NewTargetHttpsProxiesService(s)
103	s.TargetInstances = NewTargetInstancesService(s)
104	s.TargetPools = NewTargetPoolsService(s)
105	s.TargetVpnGateways = NewTargetVpnGatewaysService(s)
106	s.UrlMaps = NewUrlMapsService(s)
107	s.VpnTunnels = NewVpnTunnelsService(s)
108	s.ZoneOperations = NewZoneOperationsService(s)
109	s.Zones = NewZonesService(s)
110	return s, nil
111}
112
113type Service struct {
114	client    *http.Client
115	BasePath  string // API endpoint base URL
116	UserAgent string // optional additional User-Agent fragment
117
118	Addresses *AddressesService
119
120	Autoscalers *AutoscalersService
121
122	BackendServices *BackendServicesService
123
124	DiskTypes *DiskTypesService
125
126	Disks *DisksService
127
128	Firewalls *FirewallsService
129
130	ForwardingRules *ForwardingRulesService
131
132	GlobalAddresses *GlobalAddressesService
133
134	GlobalForwardingRules *GlobalForwardingRulesService
135
136	GlobalOperations *GlobalOperationsService
137
138	HttpHealthChecks *HttpHealthChecksService
139
140	HttpsHealthChecks *HttpsHealthChecksService
141
142	Images *ImagesService
143
144	InstanceGroupManagers *InstanceGroupManagersService
145
146	InstanceGroups *InstanceGroupsService
147
148	InstanceTemplates *InstanceTemplatesService
149
150	Instances *InstancesService
151
152	Licenses *LicensesService
153
154	MachineTypes *MachineTypesService
155
156	Networks *NetworksService
157
158	Projects *ProjectsService
159
160	RegionOperations *RegionOperationsService
161
162	Regions *RegionsService
163
164	Routes *RoutesService
165
166	Snapshots *SnapshotsService
167
168	SslCertificates *SslCertificatesService
169
170	Subnetworks *SubnetworksService
171
172	TargetHttpProxies *TargetHttpProxiesService
173
174	TargetHttpsProxies *TargetHttpsProxiesService
175
176	TargetInstances *TargetInstancesService
177
178	TargetPools *TargetPoolsService
179
180	TargetVpnGateways *TargetVpnGatewaysService
181
182	UrlMaps *UrlMapsService
183
184	VpnTunnels *VpnTunnelsService
185
186	ZoneOperations *ZoneOperationsService
187
188	Zones *ZonesService
189}
190
191func (s *Service) userAgent() string {
192	if s.UserAgent == "" {
193		return googleapi.UserAgent
194	}
195	return googleapi.UserAgent + " " + s.UserAgent
196}
197
198func NewAddressesService(s *Service) *AddressesService {
199	rs := &AddressesService{s: s}
200	return rs
201}
202
203type AddressesService struct {
204	s *Service
205}
206
207func NewAutoscalersService(s *Service) *AutoscalersService {
208	rs := &AutoscalersService{s: s}
209	return rs
210}
211
212type AutoscalersService struct {
213	s *Service
214}
215
216func NewBackendServicesService(s *Service) *BackendServicesService {
217	rs := &BackendServicesService{s: s}
218	return rs
219}
220
221type BackendServicesService struct {
222	s *Service
223}
224
225func NewDiskTypesService(s *Service) *DiskTypesService {
226	rs := &DiskTypesService{s: s}
227	return rs
228}
229
230type DiskTypesService struct {
231	s *Service
232}
233
234func NewDisksService(s *Service) *DisksService {
235	rs := &DisksService{s: s}
236	return rs
237}
238
239type DisksService struct {
240	s *Service
241}
242
243func NewFirewallsService(s *Service) *FirewallsService {
244	rs := &FirewallsService{s: s}
245	return rs
246}
247
248type FirewallsService struct {
249	s *Service
250}
251
252func NewForwardingRulesService(s *Service) *ForwardingRulesService {
253	rs := &ForwardingRulesService{s: s}
254	return rs
255}
256
257type ForwardingRulesService struct {
258	s *Service
259}
260
261func NewGlobalAddressesService(s *Service) *GlobalAddressesService {
262	rs := &GlobalAddressesService{s: s}
263	return rs
264}
265
266type GlobalAddressesService struct {
267	s *Service
268}
269
270func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService {
271	rs := &GlobalForwardingRulesService{s: s}
272	return rs
273}
274
275type GlobalForwardingRulesService struct {
276	s *Service
277}
278
279func NewGlobalOperationsService(s *Service) *GlobalOperationsService {
280	rs := &GlobalOperationsService{s: s}
281	return rs
282}
283
284type GlobalOperationsService struct {
285	s *Service
286}
287
288func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService {
289	rs := &HttpHealthChecksService{s: s}
290	return rs
291}
292
293type HttpHealthChecksService struct {
294	s *Service
295}
296
297func NewHttpsHealthChecksService(s *Service) *HttpsHealthChecksService {
298	rs := &HttpsHealthChecksService{s: s}
299	return rs
300}
301
302type HttpsHealthChecksService struct {
303	s *Service
304}
305
306func NewImagesService(s *Service) *ImagesService {
307	rs := &ImagesService{s: s}
308	return rs
309}
310
311type ImagesService struct {
312	s *Service
313}
314
315func NewInstanceGroupManagersService(s *Service) *InstanceGroupManagersService {
316	rs := &InstanceGroupManagersService{s: s}
317	return rs
318}
319
320type InstanceGroupManagersService struct {
321	s *Service
322}
323
324func NewInstanceGroupsService(s *Service) *InstanceGroupsService {
325	rs := &InstanceGroupsService{s: s}
326	return rs
327}
328
329type InstanceGroupsService struct {
330	s *Service
331}
332
333func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService {
334	rs := &InstanceTemplatesService{s: s}
335	return rs
336}
337
338type InstanceTemplatesService struct {
339	s *Service
340}
341
342func NewInstancesService(s *Service) *InstancesService {
343	rs := &InstancesService{s: s}
344	return rs
345}
346
347type InstancesService struct {
348	s *Service
349}
350
351func NewLicensesService(s *Service) *LicensesService {
352	rs := &LicensesService{s: s}
353	return rs
354}
355
356type LicensesService struct {
357	s *Service
358}
359
360func NewMachineTypesService(s *Service) *MachineTypesService {
361	rs := &MachineTypesService{s: s}
362	return rs
363}
364
365type MachineTypesService struct {
366	s *Service
367}
368
369func NewNetworksService(s *Service) *NetworksService {
370	rs := &NetworksService{s: s}
371	return rs
372}
373
374type NetworksService struct {
375	s *Service
376}
377
378func NewProjectsService(s *Service) *ProjectsService {
379	rs := &ProjectsService{s: s}
380	return rs
381}
382
383type ProjectsService struct {
384	s *Service
385}
386
387func NewRegionOperationsService(s *Service) *RegionOperationsService {
388	rs := &RegionOperationsService{s: s}
389	return rs
390}
391
392type RegionOperationsService struct {
393	s *Service
394}
395
396func NewRegionsService(s *Service) *RegionsService {
397	rs := &RegionsService{s: s}
398	return rs
399}
400
401type RegionsService struct {
402	s *Service
403}
404
405func NewRoutesService(s *Service) *RoutesService {
406	rs := &RoutesService{s: s}
407	return rs
408}
409
410type RoutesService struct {
411	s *Service
412}
413
414func NewSnapshotsService(s *Service) *SnapshotsService {
415	rs := &SnapshotsService{s: s}
416	return rs
417}
418
419type SnapshotsService struct {
420	s *Service
421}
422
423func NewSslCertificatesService(s *Service) *SslCertificatesService {
424	rs := &SslCertificatesService{s: s}
425	return rs
426}
427
428type SslCertificatesService struct {
429	s *Service
430}
431
432func NewSubnetworksService(s *Service) *SubnetworksService {
433	rs := &SubnetworksService{s: s}
434	return rs
435}
436
437type SubnetworksService struct {
438	s *Service
439}
440
441func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService {
442	rs := &TargetHttpProxiesService{s: s}
443	return rs
444}
445
446type TargetHttpProxiesService struct {
447	s *Service
448}
449
450func NewTargetHttpsProxiesService(s *Service) *TargetHttpsProxiesService {
451	rs := &TargetHttpsProxiesService{s: s}
452	return rs
453}
454
455type TargetHttpsProxiesService struct {
456	s *Service
457}
458
459func NewTargetInstancesService(s *Service) *TargetInstancesService {
460	rs := &TargetInstancesService{s: s}
461	return rs
462}
463
464type TargetInstancesService struct {
465	s *Service
466}
467
468func NewTargetPoolsService(s *Service) *TargetPoolsService {
469	rs := &TargetPoolsService{s: s}
470	return rs
471}
472
473type TargetPoolsService struct {
474	s *Service
475}
476
477func NewTargetVpnGatewaysService(s *Service) *TargetVpnGatewaysService {
478	rs := &TargetVpnGatewaysService{s: s}
479	return rs
480}
481
482type TargetVpnGatewaysService struct {
483	s *Service
484}
485
486func NewUrlMapsService(s *Service) *UrlMapsService {
487	rs := &UrlMapsService{s: s}
488	return rs
489}
490
491type UrlMapsService struct {
492	s *Service
493}
494
495func NewVpnTunnelsService(s *Service) *VpnTunnelsService {
496	rs := &VpnTunnelsService{s: s}
497	return rs
498}
499
500type VpnTunnelsService struct {
501	s *Service
502}
503
504func NewZoneOperationsService(s *Service) *ZoneOperationsService {
505	rs := &ZoneOperationsService{s: s}
506	return rs
507}
508
509type ZoneOperationsService struct {
510	s *Service
511}
512
513func NewZonesService(s *Service) *ZonesService {
514	rs := &ZonesService{s: s}
515	return rs
516}
517
518type ZonesService struct {
519	s *Service
520}
521
522// AccessConfig: An access configuration attached to an instance's
523// network interface.
524type AccessConfig struct {
525	// Kind: [Output Only] Type of the resource. Always compute#accessConfig
526	// for access configs.
527	Kind string `json:"kind,omitempty"`
528
529	// Name: Name of this access configuration.
530	Name string `json:"name,omitempty"`
531
532	// NatIP: An external IP address associated with this instance. Specify
533	// an unused static external IP address available to the project or
534	// leave this field undefined to use an IP from a shared ephemeral IP
535	// address pool. If you specify a static external IP address, it must
536	// live in the same region as the zone of the instance.
537	NatIP string `json:"natIP,omitempty"`
538
539	// Type: The type of configuration. The default and only option is
540	// ONE_TO_ONE_NAT.
541	//
542	// Possible values:
543	//   "ONE_TO_ONE_NAT" (default)
544	Type string `json:"type,omitempty"`
545
546	// ForceSendFields is a list of field names (e.g. "Kind") to
547	// unconditionally include in API requests. By default, fields with
548	// empty values are omitted from API requests. However, any non-pointer,
549	// non-interface field appearing in ForceSendFields will be sent to the
550	// server regardless of whether the field is empty or not. This may be
551	// used to include empty fields in Patch requests.
552	ForceSendFields []string `json:"-"`
553}
554
555func (s *AccessConfig) MarshalJSON() ([]byte, error) {
556	type noMethod AccessConfig
557	raw := noMethod(*s)
558	return gensupport.MarshalJSON(raw, s.ForceSendFields)
559}
560
561// Address: A reserved address resource.
562type Address struct {
563	// Address: The static external IP address represented by this resource.
564	Address string `json:"address,omitempty"`
565
566	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
567	// format.
568	CreationTimestamp string `json:"creationTimestamp,omitempty"`
569
570	// Description: An optional description of this resource. Provide this
571	// property when you create the resource.
572	Description string `json:"description,omitempty"`
573
574	// Id: [Output Only] The unique identifier for the resource. This
575	// identifier is defined by the server.
576	Id uint64 `json:"id,omitempty,string"`
577
578	// Kind: [Output Only] Type of the resource. Always compute#address for
579	// addresses.
580	Kind string `json:"kind,omitempty"`
581
582	// Name: Name of the resource. Provided by the client when the resource
583	// is created. The name must be 1-63 characters long, and comply with
584	// RFC1035. Specifically, the name must be 1-63 characters long and
585	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
586	// the first character must be a lowercase letter, and all following
587	// characters must be a dash, lowercase letter, or digit, except the
588	// last character, which cannot be a dash.
589	Name string `json:"name,omitempty"`
590
591	// Region: [Output Only] URL of the region where the regional address
592	// resides. This field is not applicable to global addresses.
593	Region string `json:"region,omitempty"`
594
595	// SelfLink: [Output Only] Server-defined URL for the resource.
596	SelfLink string `json:"selfLink,omitempty"`
597
598	// Status: [Output Only] The status of the address, which can be either
599	// IN_USE or RESERVED. An address that is RESERVED is currently reserved
600	// and available to use. An IN_USE address is currently being used by
601	// another resource and is not available.
602	//
603	// Possible values:
604	//   "IN_USE"
605	//   "RESERVED"
606	Status string `json:"status,omitempty"`
607
608	// Users: [Output Only] The URLs of the resources that are using this
609	// address.
610	Users []string `json:"users,omitempty"`
611
612	// ServerResponse contains the HTTP response code and headers from the
613	// server.
614	googleapi.ServerResponse `json:"-"`
615
616	// ForceSendFields is a list of field names (e.g. "Address") to
617	// unconditionally include in API requests. By default, fields with
618	// empty values are omitted from API requests. However, any non-pointer,
619	// non-interface field appearing in ForceSendFields will be sent to the
620	// server regardless of whether the field is empty or not. This may be
621	// used to include empty fields in Patch requests.
622	ForceSendFields []string `json:"-"`
623}
624
625func (s *Address) MarshalJSON() ([]byte, error) {
626	type noMethod Address
627	raw := noMethod(*s)
628	return gensupport.MarshalJSON(raw, s.ForceSendFields)
629}
630
631type AddressAggregatedList struct {
632	// Id: [Output Only] Unique identifier for the resource; defined by the
633	// server.
634	Id string `json:"id,omitempty"`
635
636	// Items: [Output Only] A map of scoped address lists.
637	Items map[string]AddressesScopedList `json:"items,omitempty"`
638
639	// Kind: [Output Only] Type of resource. Always
640	// compute#addressAggregatedList for aggregated lists of addresses.
641	Kind string `json:"kind,omitempty"`
642
643	// NextPageToken: [Output Only] This token allows you to get the next
644	// page of results for list requests. If the number of results is larger
645	// than maxResults, use the nextPageToken as a value for the query
646	// parameter pageToken in the next list request. Subsequent list
647	// requests will have their own nextPageToken to continue paging through
648	// the results.
649	NextPageToken string `json:"nextPageToken,omitempty"`
650
651	// SelfLink: [Output Only] Server-defined URL for this resource.
652	SelfLink string `json:"selfLink,omitempty"`
653
654	// ServerResponse contains the HTTP response code and headers from the
655	// server.
656	googleapi.ServerResponse `json:"-"`
657
658	// ForceSendFields is a list of field names (e.g. "Id") to
659	// unconditionally include in API requests. By default, fields with
660	// empty values are omitted from API requests. However, any non-pointer,
661	// non-interface field appearing in ForceSendFields will be sent to the
662	// server regardless of whether the field is empty or not. This may be
663	// used to include empty fields in Patch requests.
664	ForceSendFields []string `json:"-"`
665}
666
667func (s *AddressAggregatedList) MarshalJSON() ([]byte, error) {
668	type noMethod AddressAggregatedList
669	raw := noMethod(*s)
670	return gensupport.MarshalJSON(raw, s.ForceSendFields)
671}
672
673// AddressList: Contains a list of addresses.
674type AddressList struct {
675	// Id: [Output Only] The unique identifier for the resource. This
676	// identifier is defined by the server.
677	Id string `json:"id,omitempty"`
678
679	// Items: [Output Only] A list of addresses.
680	Items []*Address `json:"items,omitempty"`
681
682	// Kind: [Output Only] Type of resource. Always compute#addressList for
683	// lists of addresses.
684	Kind string `json:"kind,omitempty"`
685
686	// NextPageToken: [Output Only] This token allows you to get the next
687	// page of results for list requests. If the number of results is larger
688	// than maxResults, use the nextPageToken as a value for the query
689	// parameter pageToken in the next list request. Subsequent list
690	// requests will have their own nextPageToken to continue paging through
691	// the results.
692	NextPageToken string `json:"nextPageToken,omitempty"`
693
694	// SelfLink: [Output Only] Server-defined URL for the resource.
695	SelfLink string `json:"selfLink,omitempty"`
696
697	// ServerResponse contains the HTTP response code and headers from the
698	// server.
699	googleapi.ServerResponse `json:"-"`
700
701	// ForceSendFields is a list of field names (e.g. "Id") to
702	// unconditionally include in API requests. By default, fields with
703	// empty values are omitted from API requests. However, any non-pointer,
704	// non-interface field appearing in ForceSendFields will be sent to the
705	// server regardless of whether the field is empty or not. This may be
706	// used to include empty fields in Patch requests.
707	ForceSendFields []string `json:"-"`
708}
709
710func (s *AddressList) MarshalJSON() ([]byte, error) {
711	type noMethod AddressList
712	raw := noMethod(*s)
713	return gensupport.MarshalJSON(raw, s.ForceSendFields)
714}
715
716type AddressesScopedList struct {
717	// Addresses: [Output Only] List of addresses contained in this scope.
718	Addresses []*Address `json:"addresses,omitempty"`
719
720	// Warning: [Output Only] Informational warning which replaces the list
721	// of addresses when the list is empty.
722	Warning *AddressesScopedListWarning `json:"warning,omitempty"`
723
724	// ForceSendFields is a list of field names (e.g. "Addresses") to
725	// unconditionally include in API requests. By default, fields with
726	// empty values are omitted from API requests. However, any non-pointer,
727	// non-interface field appearing in ForceSendFields will be sent to the
728	// server regardless of whether the field is empty or not. This may be
729	// used to include empty fields in Patch requests.
730	ForceSendFields []string `json:"-"`
731}
732
733func (s *AddressesScopedList) MarshalJSON() ([]byte, error) {
734	type noMethod AddressesScopedList
735	raw := noMethod(*s)
736	return gensupport.MarshalJSON(raw, s.ForceSendFields)
737}
738
739// AddressesScopedListWarning: [Output Only] Informational warning which
740// replaces the list of addresses when the list is empty.
741type AddressesScopedListWarning struct {
742	// Code: [Output Only] A warning code, if applicable. For example,
743	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
744	// the response.
745	//
746	// Possible values:
747	//   "CLEANUP_FAILED"
748	//   "DEPRECATED_RESOURCE_USED"
749	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
750	//   "INJECTED_KERNELS_DEPRECATED"
751	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
752	//   "NEXT_HOP_CANNOT_IP_FORWARD"
753	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
754	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
755	//   "NEXT_HOP_NOT_RUNNING"
756	//   "NOT_CRITICAL_ERROR"
757	//   "NO_RESULTS_ON_PAGE"
758	//   "REQUIRED_TOS_AGREEMENT"
759	//   "RESOURCE_NOT_DELETED"
760	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
761	//   "UNREACHABLE"
762	Code string `json:"code,omitempty"`
763
764	// Data: [Output Only] Metadata about this warning in key: value format.
765	// For example:
766	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
767	Data []*AddressesScopedListWarningData `json:"data,omitempty"`
768
769	// Message: [Output Only] A human-readable description of the warning
770	// code.
771	Message string `json:"message,omitempty"`
772
773	// ForceSendFields is a list of field names (e.g. "Code") to
774	// unconditionally include in API requests. By default, fields with
775	// empty values are omitted from API requests. However, any non-pointer,
776	// non-interface field appearing in ForceSendFields will be sent to the
777	// server regardless of whether the field is empty or not. This may be
778	// used to include empty fields in Patch requests.
779	ForceSendFields []string `json:"-"`
780}
781
782func (s *AddressesScopedListWarning) MarshalJSON() ([]byte, error) {
783	type noMethod AddressesScopedListWarning
784	raw := noMethod(*s)
785	return gensupport.MarshalJSON(raw, s.ForceSendFields)
786}
787
788type AddressesScopedListWarningData struct {
789	// Key: [Output Only] A key that provides more detail on the warning
790	// being returned. For example, for warnings where there are no results
791	// in a list request for a particular zone, this key might be scope and
792	// the key value might be the zone name. Other examples might be a key
793	// indicating a deprecated resource and a suggested replacement, or a
794	// warning about invalid network settings (for example, if an instance
795	// attempts to perform IP forwarding but is not enabled for IP
796	// forwarding).
797	Key string `json:"key,omitempty"`
798
799	// Value: [Output Only] A warning data value corresponding to the key.
800	Value string `json:"value,omitempty"`
801
802	// ForceSendFields is a list of field names (e.g. "Key") to
803	// unconditionally include in API requests. By default, fields with
804	// empty values are omitted from API requests. However, any non-pointer,
805	// non-interface field appearing in ForceSendFields will be sent to the
806	// server regardless of whether the field is empty or not. This may be
807	// used to include empty fields in Patch requests.
808	ForceSendFields []string `json:"-"`
809}
810
811func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) {
812	type noMethod AddressesScopedListWarningData
813	raw := noMethod(*s)
814	return gensupport.MarshalJSON(raw, s.ForceSendFields)
815}
816
817// AttachedDisk: An instance-attached disk resource.
818type AttachedDisk struct {
819	// AutoDelete: Specifies whether the disk will be auto-deleted when the
820	// instance is deleted (but not when the disk is detached from the
821	// instance).
822	AutoDelete bool `json:"autoDelete,omitempty"`
823
824	// Boot: Indicates that this is a boot disk. The virtual machine will
825	// use the first partition of the disk for its root filesystem.
826	Boot bool `json:"boot,omitempty"`
827
828	// DeviceName: Specifies a unique device name of your choice that is
829	// reflected into the /dev/disk/by-id/google-* tree of a Linux operating
830	// system running within the instance. This name can be used to
831	// reference the device for mounting, resizing, and so on, from within
832	// the instance.
833	//
834	// If not specified, the server chooses a default device name to apply
835	// to this disk, in the form persistent-disks-x, where x is a number
836	// assigned by Google Compute Engine. This field is only applicable for
837	// persistent disks.
838	DeviceName string `json:"deviceName,omitempty"`
839
840	// Index: Assigns a zero-based index to this disk, where 0 is reserved
841	// for the boot disk. For example, if you have many disks attached to an
842	// instance, each disk would have a unique index number. If not
843	// specified, the server will choose an appropriate value.
844	Index int64 `json:"index,omitempty"`
845
846	// InitializeParams: [Input Only] Specifies the parameters for a new
847	// disk that will be created alongside the new instance. Use
848	// initialization parameters to create boot disks or local SSDs attached
849	// to the new instance.
850	//
851	// This property is mutually exclusive with the source property; you can
852	// only define one or the other, but not both.
853	InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"`
854
855	// Interface: Specifies the disk interface to use for attaching this
856	// disk, which is either SCSI or NVME. The default is SCSI. Persistent
857	// disks must always use SCSI and the request will fail if you attempt
858	// to attach a persistent disk in any other format than SCSI. Local SSDs
859	// can use either NVME or SCSI. For performance characteristics of SCSI
860	// over NVMe, see Local SSD performance.
861	//
862	// Possible values:
863	//   "NVME"
864	//   "SCSI"
865	Interface string `json:"interface,omitempty"`
866
867	// Kind: [Output Only] Type of the resource. Always compute#attachedDisk
868	// for attached disks.
869	Kind string `json:"kind,omitempty"`
870
871	// Licenses: [Output Only] Any valid publicly visible licenses.
872	Licenses []string `json:"licenses,omitempty"`
873
874	// Mode: The mode in which to attach this disk, either READ_WRITE or
875	// READ_ONLY. If not specified, the default is to attach the disk in
876	// READ_WRITE mode.
877	//
878	// Possible values:
879	//   "READ_ONLY"
880	//   "READ_WRITE"
881	Mode string `json:"mode,omitempty"`
882
883	// Source: Specifies a valid partial or full URL to an existing
884	// Persistent Disk resource. This field is only applicable for
885	// persistent disks.
886	Source string `json:"source,omitempty"`
887
888	// Type: Specifies the type of the disk, either SCRATCH or PERSISTENT.
889	// If not specified, the default is PERSISTENT.
890	//
891	// Possible values:
892	//   "PERSISTENT"
893	//   "SCRATCH"
894	Type string `json:"type,omitempty"`
895
896	// ForceSendFields is a list of field names (e.g. "AutoDelete") to
897	// unconditionally include in API requests. By default, fields with
898	// empty values are omitted from API requests. However, any non-pointer,
899	// non-interface field appearing in ForceSendFields will be sent to the
900	// server regardless of whether the field is empty or not. This may be
901	// used to include empty fields in Patch requests.
902	ForceSendFields []string `json:"-"`
903}
904
905func (s *AttachedDisk) MarshalJSON() ([]byte, error) {
906	type noMethod AttachedDisk
907	raw := noMethod(*s)
908	return gensupport.MarshalJSON(raw, s.ForceSendFields)
909}
910
911// AttachedDiskInitializeParams: [Input Only] Specifies the parameters
912// for a new disk that will be created alongside the new instance. Use
913// initialization parameters to create boot disks or local SSDs attached
914// to the new instance.
915//
916// This property is mutually exclusive with the source property; you can
917// only define one or the other, but not both.
918type AttachedDiskInitializeParams struct {
919	// DiskName: Specifies the disk name. If not specified, the default is
920	// to use the name of the instance.
921	DiskName string `json:"diskName,omitempty"`
922
923	// DiskSizeGb: Specifies the size of the disk in base-2 GB.
924	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
925
926	// DiskType: Specifies the disk type to use to create the instance. If
927	// not specified, the default is pd-standard, specified using the full
928	// URL. For
929	// example:
930	//
931	// https://www.googleapis.com/compute/v1/projects/project/zones
932	// /zone/diskTypes/pd-standard
933	//
934	// Other values include pd-ssd and local-ssd. If you define this field,
935	// you can provide either the full or partial URL. For example, the
936	// following are valid values:
937	// -
938	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
939	// - projects/project/zones/zone/diskTypes/diskType
940	// - zones/zone/diskTypes/diskType
941	DiskType string `json:"diskType,omitempty"`
942
943	// SourceImage: A source image used to create the disk. You can provide
944	// a private (custom) image, and Compute Engine will use the
945	// corresponding image from your project. For
946	// example:
947	//
948	// global/images/my-private-image
949	//
950	// Or you can provide an image from a publicly-available project. For
951	// example, to use a Debian image from the debian-cloud project, make
952	// sure to include the project in the
953	// URL:
954	//
955	// projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
956	//
957	// where vYYYYMMDD is the image version. The fully-qualified URL will
958	// also work in both cases.
959	SourceImage string `json:"sourceImage,omitempty"`
960
961	// ForceSendFields is a list of field names (e.g. "DiskName") to
962	// unconditionally include in API requests. By default, fields with
963	// empty values are omitted from API requests. However, any non-pointer,
964	// non-interface field appearing in ForceSendFields will be sent to the
965	// server regardless of whether the field is empty or not. This may be
966	// used to include empty fields in Patch requests.
967	ForceSendFields []string `json:"-"`
968}
969
970func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) {
971	type noMethod AttachedDiskInitializeParams
972	raw := noMethod(*s)
973	return gensupport.MarshalJSON(raw, s.ForceSendFields)
974}
975
976// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you
977// to automatically scale virtual machine instances in managed instance
978// groups according to an autoscaling policy that you define. For more
979// information, read Autoscaling Groups of Instances.
980type Autoscaler struct {
981	// AutoscalingPolicy: The configuration parameters for the autoscaling
982	// algorithm. You can define one or more of the policies for an
983	// autoscaler: cpuUtilization, customMetricUtilizations, and
984	// loadBalancingUtilization.
985	//
986	// If none of these are specified, the default will be to autoscale
987	// based on cpuUtilization to 0.8 or 80%.
988	AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"`
989
990	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
991	// format.
992	CreationTimestamp string `json:"creationTimestamp,omitempty"`
993
994	// Description: An optional description of this resource. Provide this
995	// property when you create the resource.
996	Description string `json:"description,omitempty"`
997
998	// Id: [Output Only] The unique identifier for the resource. This
999	// identifier is defined by the server.
1000	Id uint64 `json:"id,omitempty,string"`
1001
1002	// Kind: [Output Only] Type of the resource. Always compute#autoscaler
1003	// for autoscalers.
1004	Kind string `json:"kind,omitempty"`
1005
1006	// Name: Name of the resource. Provided by the client when the resource
1007	// is created. The name must be 1-63 characters long, and comply with
1008	// RFC1035. Specifically, the name must be 1-63 characters long and
1009	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
1010	// the first character must be a lowercase letter, and all following
1011	// characters must be a dash, lowercase letter, or digit, except the
1012	// last character, which cannot be a dash.
1013	Name string `json:"name,omitempty"`
1014
1015	// SelfLink: [Output Only] Server-defined URL for the resource.
1016	SelfLink string `json:"selfLink,omitempty"`
1017
1018	// Target: URL of the managed instance group that this autoscaler will
1019	// scale.
1020	Target string `json:"target,omitempty"`
1021
1022	// Zone: [Output Only] URL of the zone where the instance group resides.
1023	Zone string `json:"zone,omitempty"`
1024
1025	// ServerResponse contains the HTTP response code and headers from the
1026	// server.
1027	googleapi.ServerResponse `json:"-"`
1028
1029	// ForceSendFields is a list of field names (e.g. "AutoscalingPolicy")
1030	// to unconditionally include in API requests. By default, fields with
1031	// empty values are omitted from API requests. However, any non-pointer,
1032	// non-interface field appearing in ForceSendFields will be sent to the
1033	// server regardless of whether the field is empty or not. This may be
1034	// used to include empty fields in Patch requests.
1035	ForceSendFields []string `json:"-"`
1036}
1037
1038func (s *Autoscaler) MarshalJSON() ([]byte, error) {
1039	type noMethod Autoscaler
1040	raw := noMethod(*s)
1041	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1042}
1043
1044type AutoscalerAggregatedList struct {
1045	// Id: [Output Only] The unique identifier for the resource. This
1046	// identifier is defined by the server.
1047	Id string `json:"id,omitempty"`
1048
1049	// Items: A map of scoped autoscaler lists.
1050	Items map[string]AutoscalersScopedList `json:"items,omitempty"`
1051
1052	// Kind: [Output Only] Type of resource. Always
1053	// compute#autoscalerAggregatedList for aggregated lists of autoscalers.
1054	Kind string `json:"kind,omitempty"`
1055
1056	// NextPageToken: [Output Only] This token allows you to get the next
1057	// page of results for list requests. If the number of results is larger
1058	// than maxResults, use the nextPageToken as a value for the query
1059	// parameter pageToken in the next list request. Subsequent list
1060	// requests will have their own nextPageToken to continue paging through
1061	// the results.
1062	NextPageToken string `json:"nextPageToken,omitempty"`
1063
1064	// SelfLink: [Output Only] Server-defined URL for this resource.
1065	SelfLink string `json:"selfLink,omitempty"`
1066
1067	// ServerResponse contains the HTTP response code and headers from the
1068	// server.
1069	googleapi.ServerResponse `json:"-"`
1070
1071	// ForceSendFields is a list of field names (e.g. "Id") to
1072	// unconditionally include in API requests. By default, fields with
1073	// empty values are omitted from API requests. However, any non-pointer,
1074	// non-interface field appearing in ForceSendFields will be sent to the
1075	// server regardless of whether the field is empty or not. This may be
1076	// used to include empty fields in Patch requests.
1077	ForceSendFields []string `json:"-"`
1078}
1079
1080func (s *AutoscalerAggregatedList) MarshalJSON() ([]byte, error) {
1081	type noMethod AutoscalerAggregatedList
1082	raw := noMethod(*s)
1083	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1084}
1085
1086// AutoscalerList: Contains a list of Autoscaler resources.
1087type AutoscalerList struct {
1088	// Id: [Output Only] The unique identifier for the resource. This
1089	// identifier is defined by the server.
1090	Id string `json:"id,omitempty"`
1091
1092	// Items: A list of Autoscaler resources.
1093	Items []*Autoscaler `json:"items,omitempty"`
1094
1095	// Kind: [Output Only] Type of resource. Always compute#autoscalerList
1096	// for lists of autoscalers.
1097	Kind string `json:"kind,omitempty"`
1098
1099	// NextPageToken: [Output Only] This token allows you to get the next
1100	// page of results for list requests. If the number of results is larger
1101	// than maxResults, use the nextPageToken as a value for the query
1102	// parameter pageToken in the next list request. Subsequent list
1103	// requests will have their own nextPageToken to continue paging through
1104	// the results.
1105	NextPageToken string `json:"nextPageToken,omitempty"`
1106
1107	// SelfLink: [Output Only] Server-defined URL for this resource.
1108	SelfLink string `json:"selfLink,omitempty"`
1109
1110	// ServerResponse contains the HTTP response code and headers from the
1111	// server.
1112	googleapi.ServerResponse `json:"-"`
1113
1114	// ForceSendFields is a list of field names (e.g. "Id") to
1115	// unconditionally include in API requests. By default, fields with
1116	// empty values are omitted from API requests. However, any non-pointer,
1117	// non-interface field appearing in ForceSendFields will be sent to the
1118	// server regardless of whether the field is empty or not. This may be
1119	// used to include empty fields in Patch requests.
1120	ForceSendFields []string `json:"-"`
1121}
1122
1123func (s *AutoscalerList) MarshalJSON() ([]byte, error) {
1124	type noMethod AutoscalerList
1125	raw := noMethod(*s)
1126	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1127}
1128
1129type AutoscalersScopedList struct {
1130	// Autoscalers: [Output Only] List of autoscalers contained in this
1131	// scope.
1132	Autoscalers []*Autoscaler `json:"autoscalers,omitempty"`
1133
1134	// Warning: [Output Only] Informational warning which replaces the list
1135	// of autoscalers when the list is empty.
1136	Warning *AutoscalersScopedListWarning `json:"warning,omitempty"`
1137
1138	// ForceSendFields is a list of field names (e.g. "Autoscalers") to
1139	// unconditionally include in API requests. By default, fields with
1140	// empty values are omitted from API requests. However, any non-pointer,
1141	// non-interface field appearing in ForceSendFields will be sent to the
1142	// server regardless of whether the field is empty or not. This may be
1143	// used to include empty fields in Patch requests.
1144	ForceSendFields []string `json:"-"`
1145}
1146
1147func (s *AutoscalersScopedList) MarshalJSON() ([]byte, error) {
1148	type noMethod AutoscalersScopedList
1149	raw := noMethod(*s)
1150	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1151}
1152
1153// AutoscalersScopedListWarning: [Output Only] Informational warning
1154// which replaces the list of autoscalers when the list is empty.
1155type AutoscalersScopedListWarning struct {
1156	// Code: [Output Only] A warning code, if applicable. For example,
1157	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
1158	// the response.
1159	//
1160	// Possible values:
1161	//   "CLEANUP_FAILED"
1162	//   "DEPRECATED_RESOURCE_USED"
1163	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
1164	//   "INJECTED_KERNELS_DEPRECATED"
1165	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
1166	//   "NEXT_HOP_CANNOT_IP_FORWARD"
1167	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
1168	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
1169	//   "NEXT_HOP_NOT_RUNNING"
1170	//   "NOT_CRITICAL_ERROR"
1171	//   "NO_RESULTS_ON_PAGE"
1172	//   "REQUIRED_TOS_AGREEMENT"
1173	//   "RESOURCE_NOT_DELETED"
1174	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
1175	//   "UNREACHABLE"
1176	Code string `json:"code,omitempty"`
1177
1178	// Data: [Output Only] Metadata about this warning in key: value format.
1179	// For example:
1180	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1181	Data []*AutoscalersScopedListWarningData `json:"data,omitempty"`
1182
1183	// Message: [Output Only] A human-readable description of the warning
1184	// code.
1185	Message string `json:"message,omitempty"`
1186
1187	// ForceSendFields is a list of field names (e.g. "Code") to
1188	// unconditionally include in API requests. By default, fields with
1189	// empty values are omitted from API requests. However, any non-pointer,
1190	// non-interface field appearing in ForceSendFields will be sent to the
1191	// server regardless of whether the field is empty or not. This may be
1192	// used to include empty fields in Patch requests.
1193	ForceSendFields []string `json:"-"`
1194}
1195
1196func (s *AutoscalersScopedListWarning) MarshalJSON() ([]byte, error) {
1197	type noMethod AutoscalersScopedListWarning
1198	raw := noMethod(*s)
1199	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1200}
1201
1202type AutoscalersScopedListWarningData struct {
1203	// Key: [Output Only] A key that provides more detail on the warning
1204	// being returned. For example, for warnings where there are no results
1205	// in a list request for a particular zone, this key might be scope and
1206	// the key value might be the zone name. Other examples might be a key
1207	// indicating a deprecated resource and a suggested replacement, or a
1208	// warning about invalid network settings (for example, if an instance
1209	// attempts to perform IP forwarding but is not enabled for IP
1210	// forwarding).
1211	Key string `json:"key,omitempty"`
1212
1213	// Value: [Output Only] A warning data value corresponding to the key.
1214	Value string `json:"value,omitempty"`
1215
1216	// ForceSendFields is a list of field names (e.g. "Key") to
1217	// unconditionally include in API requests. By default, fields with
1218	// empty values are omitted from API requests. However, any non-pointer,
1219	// non-interface field appearing in ForceSendFields will be sent to the
1220	// server regardless of whether the field is empty or not. This may be
1221	// used to include empty fields in Patch requests.
1222	ForceSendFields []string `json:"-"`
1223}
1224
1225func (s *AutoscalersScopedListWarningData) MarshalJSON() ([]byte, error) {
1226	type noMethod AutoscalersScopedListWarningData
1227	raw := noMethod(*s)
1228	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1229}
1230
1231// AutoscalingPolicy: Cloud Autoscaler policy.
1232type AutoscalingPolicy struct {
1233	// CoolDownPeriodSec: The number of seconds that the autoscaler should
1234	// wait before it starts collecting information from a new instance.
1235	// This prevents the autoscaler from collecting information when the
1236	// instance is initializing, during which the collected usage would not
1237	// be reliable. The default time autoscaler waits is 60
1238	// seconds.
1239	//
1240	// Virtual machine initialization times might vary because of numerous
1241	// factors. We recommend that you test how long an instance may take to
1242	// initialize. To do this, create an instance and time the startup
1243	// process.
1244	CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"`
1245
1246	// CpuUtilization: Defines the CPU utilization policy that allows the
1247	// autoscaler to scale based on the average CPU utilization of a managed
1248	// instance group.
1249	CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,omitempty"`
1250
1251	// CustomMetricUtilizations: Configuration parameters of autoscaling
1252	// based on a custom metric.
1253	CustomMetricUtilizations []*AutoscalingPolicyCustomMetricUtilization `json:"customMetricUtilizations,omitempty"`
1254
1255	// LoadBalancingUtilization: Configuration parameters of autoscaling
1256	// based on load balancer.
1257	LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `json:"loadBalancingUtilization,omitempty"`
1258
1259	// MaxNumReplicas: The maximum number of instances that the autoscaler
1260	// can scale up to. This is required when creating or updating an
1261	// autoscaler. The maximum number of replicas should not be lower than
1262	// minimal number of replicas.
1263	MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"`
1264
1265	// MinNumReplicas: The minimum number of replicas that the autoscaler
1266	// can scale down to. This cannot be less than 0. If not provided,
1267	// autoscaler will choose a default value depending on maximum number of
1268	// instances allowed.
1269	MinNumReplicas int64 `json:"minNumReplicas,omitempty"`
1270
1271	// ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec")
1272	// to unconditionally include in API requests. By default, fields with
1273	// empty values are omitted from API requests. However, any non-pointer,
1274	// non-interface field appearing in ForceSendFields will be sent to the
1275	// server regardless of whether the field is empty or not. This may be
1276	// used to include empty fields in Patch requests.
1277	ForceSendFields []string `json:"-"`
1278}
1279
1280func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) {
1281	type noMethod AutoscalingPolicy
1282	raw := noMethod(*s)
1283	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1284}
1285
1286// AutoscalingPolicyCpuUtilization: CPU utilization policy.
1287type AutoscalingPolicyCpuUtilization struct {
1288	// UtilizationTarget: The target CPU utilization that the autoscaler
1289	// should maintain. Must be a float value in the range (0, 1]. If not
1290	// specified, the default is 0.8.
1291	//
1292	// If the CPU level is below the target utilization, the autoscaler
1293	// scales down the number of instances until it reaches the minimum
1294	// number of instances you specified or until the average CPU of your
1295	// instances reaches the target utilization.
1296	//
1297	// If the average CPU is above the target utilization, the autoscaler
1298	// scales up until it reaches the maximum number of instances you
1299	// specified or until the average utilization reaches the target
1300	// utilization.
1301	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
1302
1303	// ForceSendFields is a list of field names (e.g. "UtilizationTarget")
1304	// to unconditionally include in API requests. By default, fields with
1305	// empty values are omitted from API requests. However, any non-pointer,
1306	// non-interface field appearing in ForceSendFields will be sent to the
1307	// server regardless of whether the field is empty or not. This may be
1308	// used to include empty fields in Patch requests.
1309	ForceSendFields []string `json:"-"`
1310}
1311
1312func (s *AutoscalingPolicyCpuUtilization) MarshalJSON() ([]byte, error) {
1313	type noMethod AutoscalingPolicyCpuUtilization
1314	raw := noMethod(*s)
1315	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1316}
1317
1318// AutoscalingPolicyCustomMetricUtilization: Custom utilization metric
1319// policy.
1320type AutoscalingPolicyCustomMetricUtilization struct {
1321	// Metric: The identifier of the Cloud Monitoring metric. The metric
1322	// cannot have negative values and should be a utilization metric, which
1323	// means that the number of virtual machines handling requests should
1324	// increase or decrease proportionally to the metric. The metric must
1325	// also have a label of compute.googleapis.com/resource_id with the
1326	// value of the instance's unique ID, although this alone does not
1327	// guarantee that the metric is valid.
1328	//
1329	// For example, the following is a valid
1330	// metric:
1331	// compute.googleapis.com/instance/network/received_bytes_count
1332	//
1333	//
1334	//
1335	// The following is not a valid metric because it does not increase or
1336	// decrease based on
1337	// usage:
1338	// compute.googleapis.com/instance/cpu/reserved_cores
1339	Metric string `json:"metric,omitempty"`
1340
1341	// UtilizationTarget: Target value of the metric which autoscaler should
1342	// maintain. Must be a positive value.
1343	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
1344
1345	// UtilizationTargetType: Defines how target utilization value is
1346	// expressed for a Cloud Monitoring metric. Either GAUGE,
1347	// DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default
1348	// is GAUGE.
1349	//
1350	// Possible values:
1351	//   "DELTA_PER_MINUTE"
1352	//   "DELTA_PER_SECOND"
1353	//   "GAUGE"
1354	UtilizationTargetType string `json:"utilizationTargetType,omitempty"`
1355
1356	// ForceSendFields is a list of field names (e.g. "Metric") to
1357	// unconditionally include in API requests. By default, fields with
1358	// empty values are omitted from API requests. However, any non-pointer,
1359	// non-interface field appearing in ForceSendFields will be sent to the
1360	// server regardless of whether the field is empty or not. This may be
1361	// used to include empty fields in Patch requests.
1362	ForceSendFields []string `json:"-"`
1363}
1364
1365func (s *AutoscalingPolicyCustomMetricUtilization) MarshalJSON() ([]byte, error) {
1366	type noMethod AutoscalingPolicyCustomMetricUtilization
1367	raw := noMethod(*s)
1368	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1369}
1370
1371// AutoscalingPolicyLoadBalancingUtilization: Configuration parameters
1372// of autoscaling based on load balancing.
1373type AutoscalingPolicyLoadBalancingUtilization struct {
1374	// UtilizationTarget: Fraction of backend capacity utilization (set in
1375	// HTTP(s) load balancing configuration) that autoscaler should
1376	// maintain. Must be a positive float value. If not defined, the default
1377	// is 0.8.
1378	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
1379
1380	// ForceSendFields is a list of field names (e.g. "UtilizationTarget")
1381	// to unconditionally include in API requests. By default, fields with
1382	// empty values are omitted from API requests. However, any non-pointer,
1383	// non-interface field appearing in ForceSendFields will be sent to the
1384	// server regardless of whether the field is empty or not. This may be
1385	// used to include empty fields in Patch requests.
1386	ForceSendFields []string `json:"-"`
1387}
1388
1389func (s *AutoscalingPolicyLoadBalancingUtilization) MarshalJSON() ([]byte, error) {
1390	type noMethod AutoscalingPolicyLoadBalancingUtilization
1391	raw := noMethod(*s)
1392	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1393}
1394
1395// Backend: Message containing information of one individual backend.
1396type Backend struct {
1397	// BalancingMode: Specifies the balancing mode for this backend. For
1398	// global HTTP(S) load balancing, the default is UTILIZATION. Valid
1399	// values are UTILIZATION and RATE.
1400	//
1401	// Possible values:
1402	//   "RATE"
1403	//   "UTILIZATION"
1404	BalancingMode string `json:"balancingMode,omitempty"`
1405
1406	// CapacityScaler: A multiplier applied to the group's maximum servicing
1407	// capacity (either UTILIZATION or RATE). Default value is 1, which
1408	// means the group will serve up to 100% of its configured CPU or RPS
1409	// (depending on balancingMode). A setting of 0 means the group is
1410	// completely drained, offering 0% of its available CPU or RPS. Valid
1411	// range is [0.0,1.0].
1412	CapacityScaler float64 `json:"capacityScaler,omitempty"`
1413
1414	// Description: An optional description of this resource. Provide this
1415	// property when you create the resource.
1416	Description string `json:"description,omitempty"`
1417
1418	// Group: The fully-qualified URL of a zonal Instance Group resource.
1419	// This instance group defines the list of instances that serve traffic.
1420	// Member virtual machine instances from each instance group must live
1421	// in the same zone as the instance group itself. No two backends in a
1422	// backend service are allowed to use same Instance Group
1423	// resource.
1424	//
1425	// Note that you must specify an Instance Group resource using the
1426	// fully-qualified URL, rather than a partial URL.
1427	Group string `json:"group,omitempty"`
1428
1429	// MaxRate: The max requests per second (RPS) of the group. Can be used
1430	// with either RATE or UTILIZATION balancing modes, but required if RATE
1431	// mode. For RATE mode, either maxRate or maxRatePerInstance must be
1432	// set.
1433	MaxRate int64 `json:"maxRate,omitempty"`
1434
1435	// MaxRatePerInstance: The max requests per second (RPS) that a single
1436	// backend instance can handle.This is used to calculate the capacity of
1437	// the group. Can be used in either balancing mode. For RATE mode,
1438	// either maxRate or maxRatePerInstance must be set.
1439	MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"`
1440
1441	// MaxUtilization: Used when balancingMode is UTILIZATION. This ratio
1442	// defines the CPU utilization target for the group. The default is 0.8.
1443	// Valid range is [0.0, 1.0].
1444	MaxUtilization float64 `json:"maxUtilization,omitempty"`
1445
1446	// ForceSendFields is a list of field names (e.g. "BalancingMode") to
1447	// unconditionally include in API requests. By default, fields with
1448	// empty values are omitted from API requests. However, any non-pointer,
1449	// non-interface field appearing in ForceSendFields will be sent to the
1450	// server regardless of whether the field is empty or not. This may be
1451	// used to include empty fields in Patch requests.
1452	ForceSendFields []string `json:"-"`
1453}
1454
1455func (s *Backend) MarshalJSON() ([]byte, error) {
1456	type noMethod Backend
1457	raw := noMethod(*s)
1458	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1459}
1460
1461// BackendService: A BackendService resource. This resource defines a
1462// group of backend virtual machines and their serving capacity.
1463type BackendService struct {
1464	// Backends: The list of backends that serve this BackendService.
1465	Backends []*Backend `json:"backends,omitempty"`
1466
1467	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
1468	// format.
1469	CreationTimestamp string `json:"creationTimestamp,omitempty"`
1470
1471	// Description: An optional description of this resource. Provide this
1472	// property when you create the resource.
1473	Description string `json:"description,omitempty"`
1474
1475	// Fingerprint: Fingerprint of this resource. A hash of the contents
1476	// stored in this object. This field is used in optimistic locking. This
1477	// field will be ignored when inserting a BackendService. An up-to-date
1478	// fingerprint must be provided in order to update the BackendService.
1479	Fingerprint string `json:"fingerprint,omitempty"`
1480
1481	// HealthChecks: The list of URLs to the HttpHealthCheck or
1482	// HttpsHealthCheck resource for health checking this BackendService.
1483	// Currently at most one health check can be specified, and a health
1484	// check is required.
1485	HealthChecks []string `json:"healthChecks,omitempty"`
1486
1487	// Id: [Output Only] The unique identifier for the resource. This
1488	// identifier is defined by the server.
1489	Id uint64 `json:"id,omitempty,string"`
1490
1491	// Kind: [Output Only] Type of resource. Always compute#backendService
1492	// for backend services.
1493	Kind string `json:"kind,omitempty"`
1494
1495	// Name: Name of the resource. Provided by the client when the resource
1496	// is created. The name must be 1-63 characters long, and comply with
1497	// RFC1035. Specifically, the name must be 1-63 characters long and
1498	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
1499	// the first character must be a lowercase letter, and all following
1500	// characters must be a dash, lowercase letter, or digit, except the
1501	// last character, which cannot be a dash.
1502	Name string `json:"name,omitempty"`
1503
1504	// Port: Deprecated in favor of portName. The TCP port to connect on the
1505	// backend. The default value is 80.
1506	Port int64 `json:"port,omitempty"`
1507
1508	// PortName: Name of backend port. The same name should appear in the
1509	// instance groups referenced by this service. Required.
1510	PortName string `json:"portName,omitempty"`
1511
1512	// Protocol: The protocol this BackendService uses to communicate with
1513	// backends.
1514	//
1515	// Possible values are HTTP, HTTPS, HTTP2, TCP and SSL.
1516	//
1517	// Possible values:
1518	//   "HTTP"
1519	//   "HTTPS"
1520	Protocol string `json:"protocol,omitempty"`
1521
1522	// SelfLink: [Output Only] Server-defined URL for the resource.
1523	SelfLink string `json:"selfLink,omitempty"`
1524
1525	// TimeoutSec: How many seconds to wait for the backend before
1526	// considering it a failed request. Default is 30 seconds.
1527	TimeoutSec int64 `json:"timeoutSec,omitempty"`
1528
1529	// ServerResponse contains the HTTP response code and headers from the
1530	// server.
1531	googleapi.ServerResponse `json:"-"`
1532
1533	// ForceSendFields is a list of field names (e.g. "Backends") to
1534	// unconditionally include in API requests. By default, fields with
1535	// empty values are omitted from API requests. However, any non-pointer,
1536	// non-interface field appearing in ForceSendFields will be sent to the
1537	// server regardless of whether the field is empty or not. This may be
1538	// used to include empty fields in Patch requests.
1539	ForceSendFields []string `json:"-"`
1540}
1541
1542func (s *BackendService) MarshalJSON() ([]byte, error) {
1543	type noMethod BackendService
1544	raw := noMethod(*s)
1545	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1546}
1547
1548type BackendServiceGroupHealth struct {
1549	HealthStatus []*HealthStatus `json:"healthStatus,omitempty"`
1550
1551	// Kind: [Output Only] Type of resource. Always
1552	// compute#backendServiceGroupHealth for the health of backend services.
1553	Kind string `json:"kind,omitempty"`
1554
1555	// ServerResponse contains the HTTP response code and headers from the
1556	// server.
1557	googleapi.ServerResponse `json:"-"`
1558
1559	// ForceSendFields is a list of field names (e.g. "HealthStatus") to
1560	// unconditionally include in API requests. By default, fields with
1561	// empty values are omitted from API requests. However, any non-pointer,
1562	// non-interface field appearing in ForceSendFields will be sent to the
1563	// server regardless of whether the field is empty or not. This may be
1564	// used to include empty fields in Patch requests.
1565	ForceSendFields []string `json:"-"`
1566}
1567
1568func (s *BackendServiceGroupHealth) MarshalJSON() ([]byte, error) {
1569	type noMethod BackendServiceGroupHealth
1570	raw := noMethod(*s)
1571	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1572}
1573
1574// BackendServiceList: Contains a list of BackendService resources.
1575type BackendServiceList struct {
1576	// Id: [Output Only] The unique identifier for the resource. This
1577	// identifier is defined by the server.
1578	Id string `json:"id,omitempty"`
1579
1580	// Items: A list of BackendService resources.
1581	Items []*BackendService `json:"items,omitempty"`
1582
1583	// Kind: [Output Only] Type of resource. Always
1584	// compute#backendServiceList for lists of backend services.
1585	Kind string `json:"kind,omitempty"`
1586
1587	// NextPageToken: [Output Only] This token allows you to get the next
1588	// page of results for list requests. If the number of results is larger
1589	// than maxResults, use the nextPageToken as a value for the query
1590	// parameter pageToken in the next list request. Subsequent list
1591	// requests will have their own nextPageToken to continue paging through
1592	// the results.
1593	NextPageToken string `json:"nextPageToken,omitempty"`
1594
1595	// SelfLink: [Output Only] Server-defined URL for this resource.
1596	SelfLink string `json:"selfLink,omitempty"`
1597
1598	// ServerResponse contains the HTTP response code and headers from the
1599	// server.
1600	googleapi.ServerResponse `json:"-"`
1601
1602	// ForceSendFields is a list of field names (e.g. "Id") to
1603	// unconditionally include in API requests. By default, fields with
1604	// empty values are omitted from API requests. However, any non-pointer,
1605	// non-interface field appearing in ForceSendFields will be sent to the
1606	// server regardless of whether the field is empty or not. This may be
1607	// used to include empty fields in Patch requests.
1608	ForceSendFields []string `json:"-"`
1609}
1610
1611func (s *BackendServiceList) MarshalJSON() ([]byte, error) {
1612	type noMethod BackendServiceList
1613	raw := noMethod(*s)
1614	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1615}
1616
1617// DeprecationStatus: Deprecation status for a public resource.
1618type DeprecationStatus struct {
1619	// Deleted: An optional RFC3339 timestamp on or after which the
1620	// deprecation state of this resource will be changed to DELETED.
1621	Deleted string `json:"deleted,omitempty"`
1622
1623	// Deprecated: An optional RFC3339 timestamp on or after which the
1624	// deprecation state of this resource will be changed to DEPRECATED.
1625	Deprecated string `json:"deprecated,omitempty"`
1626
1627	// Obsolete: An optional RFC3339 timestamp on or after which the
1628	// deprecation state of this resource will be changed to OBSOLETE.
1629	Obsolete string `json:"obsolete,omitempty"`
1630
1631	// Replacement: The URL of the suggested replacement for a deprecated
1632	// resource. The suggested replacement resource must be the same kind of
1633	// resource as the deprecated resource.
1634	Replacement string `json:"replacement,omitempty"`
1635
1636	// State: The deprecation state of this resource. This can be
1637	// DEPRECATED, OBSOLETE, or DELETED. Operations which create a new
1638	// resource using a DEPRECATED resource will return successfully, but
1639	// with a warning indicating the deprecated resource and recommending
1640	// its replacement. Operations which use OBSOLETE or DELETED resources
1641	// will be rejected and result in an error.
1642	//
1643	// Possible values:
1644	//   "DELETED"
1645	//   "DEPRECATED"
1646	//   "OBSOLETE"
1647	State string `json:"state,omitempty"`
1648
1649	// ForceSendFields is a list of field names (e.g. "Deleted") to
1650	// unconditionally include in API requests. By default, fields with
1651	// empty values are omitted from API requests. However, any non-pointer,
1652	// non-interface field appearing in ForceSendFields will be sent to the
1653	// server regardless of whether the field is empty or not. This may be
1654	// used to include empty fields in Patch requests.
1655	ForceSendFields []string `json:"-"`
1656}
1657
1658func (s *DeprecationStatus) MarshalJSON() ([]byte, error) {
1659	type noMethod DeprecationStatus
1660	raw := noMethod(*s)
1661	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1662}
1663
1664// Disk: A Disk resource.
1665type Disk struct {
1666	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
1667	// format.
1668	CreationTimestamp string `json:"creationTimestamp,omitempty"`
1669
1670	// Description: An optional description of this resource. Provide this
1671	// property when you create the resource.
1672	Description string `json:"description,omitempty"`
1673
1674	// Id: [Output Only] The unique identifier for the resource. This
1675	// identifier is defined by the server.
1676	Id uint64 `json:"id,omitempty,string"`
1677
1678	// Kind: [Output Only] Type of the resource. Always compute#disk for
1679	// disks.
1680	Kind string `json:"kind,omitempty"`
1681
1682	// LastAttachTimestamp: [Output Only] Last attach timestamp in RFC3339
1683	// text format.
1684	LastAttachTimestamp string `json:"lastAttachTimestamp,omitempty"`
1685
1686	// LastDetachTimestamp: [Output Only] Last detach timestamp in RFC3339
1687	// text format.
1688	LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"`
1689
1690	// Licenses: [Output Only] Any applicable publicly visible licenses.
1691	Licenses []string `json:"licenses,omitempty"`
1692
1693	// Name: Name of the resource. Provided by the client when the resource
1694	// is created. The name must be 1-63 characters long, and comply with
1695	// RFC1035. Specifically, the name must be 1-63 characters long and
1696	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
1697	// the first character must be a lowercase letter, and all following
1698	// characters must be a dash, lowercase letter, or digit, except the
1699	// last character, which cannot be a dash.
1700	Name string `json:"name,omitempty"`
1701
1702	// Options: Internal use only.
1703	Options string `json:"options,omitempty"`
1704
1705	// SelfLink: [Output Only] Server-defined fully-qualified URL for this
1706	// resource.
1707	SelfLink string `json:"selfLink,omitempty"`
1708
1709	// SizeGb: Size of the persistent disk, specified in GB. You can specify
1710	// this field when creating a persistent disk using the sourceImage or
1711	// sourceSnapshot parameter, or specify it alone to create an empty
1712	// persistent disk.
1713	//
1714	// If you specify this field along with sourceImage or sourceSnapshot,
1715	// the value of sizeGb must not be less than the size of the sourceImage
1716	// or the size of the snapshot.
1717	SizeGb int64 `json:"sizeGb,omitempty,string"`
1718
1719	// SourceImage: The source image used to create this disk. If the source
1720	// image is deleted from the system, this field will not be set, even if
1721	// an image with the same name has been re-created.
1722	//
1723	// When creating a disk, you can provide a private (custom) image using
1724	// the following input, and Compute Engine will use the corresponding
1725	// image from your project. For example:
1726	//
1727	// global/images/my-private-image
1728	//
1729	// Or you can provide an image from a publicly-available project. For
1730	// example, to use a Debian image from the debian-cloud project, make
1731	// sure to include the project in the
1732	// URL:
1733	//
1734	// projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
1735	//
1736	// where vYYYYMMDD is the image version. The fully-qualified URL will
1737	// also work in both cases.
1738	//
1739	// You can also specify the latest image for a private image family by
1740	// replacing the image name suffix with family/family-name. For
1741	// example:
1742	//
1743	// global/images/family/my-private-family
1744	//
1745	// Or you can specify an image family from a publicly-available project.
1746	// For example, to use the latest Debian 7 from the debian-cloud
1747	// project, make sure to include the project in the
1748	// URL:
1749	//
1750	// projects/debian-cloud/global/images/family/debian-7
1751	SourceImage string `json:"sourceImage,omitempty"`
1752
1753	// SourceImageId: [Output Only] The ID value of the image used to create
1754	// this disk. This value identifies the exact image that was used to
1755	// create this persistent disk. For example, if you created the
1756	// persistent disk from an image that was later deleted and recreated
1757	// under the same name, the source image ID would identify the exact
1758	// version of the image that was used.
1759	SourceImageId string `json:"sourceImageId,omitempty"`
1760
1761	// SourceSnapshot: The source snapshot used to create this disk. You can
1762	// provide this as a partial or full URL to the resource. For example,
1763	// the following are valid values:
1764	// -
1765	// https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
1766	// - projects/project/global/snapshots/snapshot
1767	// - global/snapshots/snapshot
1768	SourceSnapshot string `json:"sourceSnapshot,omitempty"`
1769
1770	// SourceSnapshotId: [Output Only] The unique ID of the snapshot used to
1771	// create this disk. This value identifies the exact snapshot that was
1772	// used to create this persistent disk. For example, if you created the
1773	// persistent disk from a snapshot that was later deleted and recreated
1774	// under the same name, the source snapshot ID would identify the exact
1775	// version of the snapshot that was used.
1776	SourceSnapshotId string `json:"sourceSnapshotId,omitempty"`
1777
1778	// Status: [Output Only] The status of disk creation. Applicable
1779	// statuses includes: CREATING, FAILED, READY, RESTORING.
1780	//
1781	// Possible values:
1782	//   "CREATING"
1783	//   "FAILED"
1784	//   "READY"
1785	//   "RESTORING"
1786	Status string `json:"status,omitempty"`
1787
1788	// Type: URL of the disk type resource describing which disk type to use
1789	// to create the disk. Provide this when creating the disk.
1790	Type string `json:"type,omitempty"`
1791
1792	// Users: [Output Only] Links to the users of the disk (attached
1793	// instances) in form: project/zones/zone/instances/instance
1794	Users []string `json:"users,omitempty"`
1795
1796	// Zone: [Output Only] URL of the zone where the disk resides.
1797	Zone string `json:"zone,omitempty"`
1798
1799	// ServerResponse contains the HTTP response code and headers from the
1800	// server.
1801	googleapi.ServerResponse `json:"-"`
1802
1803	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
1804	// to unconditionally include in API requests. By default, fields with
1805	// empty values are omitted from API requests. However, any non-pointer,
1806	// non-interface field appearing in ForceSendFields will be sent to the
1807	// server regardless of whether the field is empty or not. This may be
1808	// used to include empty fields in Patch requests.
1809	ForceSendFields []string `json:"-"`
1810}
1811
1812func (s *Disk) MarshalJSON() ([]byte, error) {
1813	type noMethod Disk
1814	raw := noMethod(*s)
1815	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1816}
1817
1818type DiskAggregatedList struct {
1819	// Id: [Output Only] The unique identifier for the resource. This
1820	// identifier is defined by the server.
1821	Id string `json:"id,omitempty"`
1822
1823	// Items: [Output Only] A map of scoped disk lists.
1824	Items map[string]DisksScopedList `json:"items,omitempty"`
1825
1826	// Kind: [Output Only] Type of resource. Always
1827	// compute#diskAggregatedList for aggregated lists of persistent disks.
1828	Kind string `json:"kind,omitempty"`
1829
1830	// NextPageToken: [Output Only] This token allows you to get the next
1831	// page of results for list requests. If the number of results is larger
1832	// than maxResults, use the nextPageToken as a value for the query
1833	// parameter pageToken in the next list request. Subsequent list
1834	// requests will have their own nextPageToken to continue paging through
1835	// the results.
1836	NextPageToken string `json:"nextPageToken,omitempty"`
1837
1838	// SelfLink: [Output Only] Server-defined URL for this resource.
1839	SelfLink string `json:"selfLink,omitempty"`
1840
1841	// ServerResponse contains the HTTP response code and headers from the
1842	// server.
1843	googleapi.ServerResponse `json:"-"`
1844
1845	// ForceSendFields is a list of field names (e.g. "Id") to
1846	// unconditionally include in API requests. By default, fields with
1847	// empty values are omitted from API requests. However, any non-pointer,
1848	// non-interface field appearing in ForceSendFields will be sent to the
1849	// server regardless of whether the field is empty or not. This may be
1850	// used to include empty fields in Patch requests.
1851	ForceSendFields []string `json:"-"`
1852}
1853
1854func (s *DiskAggregatedList) MarshalJSON() ([]byte, error) {
1855	type noMethod DiskAggregatedList
1856	raw := noMethod(*s)
1857	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1858}
1859
1860// DiskList: A list of Disk resources.
1861type DiskList struct {
1862	// Id: [Output Only] The unique identifier for the resource. This
1863	// identifier is defined by the server.
1864	Id string `json:"id,omitempty"`
1865
1866	// Items: [Output Only] A list of persistent disks.
1867	Items []*Disk `json:"items,omitempty"`
1868
1869	// Kind: [Output Only] Type of resource. Always compute#diskList for
1870	// lists of disks.
1871	Kind string `json:"kind,omitempty"`
1872
1873	// NextPageToken: [Output Only] This token allows you to get the next
1874	// page of results for list requests. If the number of results is larger
1875	// than maxResults, use the nextPageToken as a value for the query
1876	// parameter pageToken in the next list request. Subsequent list
1877	// requests will have their own nextPageToken to continue paging through
1878	// the results.
1879	NextPageToken string `json:"nextPageToken,omitempty"`
1880
1881	// SelfLink: [Output Only] Server-defined URL for this resource.
1882	SelfLink string `json:"selfLink,omitempty"`
1883
1884	// ServerResponse contains the HTTP response code and headers from the
1885	// server.
1886	googleapi.ServerResponse `json:"-"`
1887
1888	// ForceSendFields is a list of field names (e.g. "Id") to
1889	// unconditionally include in API requests. By default, fields with
1890	// empty values are omitted from API requests. However, any non-pointer,
1891	// non-interface field appearing in ForceSendFields will be sent to the
1892	// server regardless of whether the field is empty or not. This may be
1893	// used to include empty fields in Patch requests.
1894	ForceSendFields []string `json:"-"`
1895}
1896
1897func (s *DiskList) MarshalJSON() ([]byte, error) {
1898	type noMethod DiskList
1899	raw := noMethod(*s)
1900	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1901}
1902
1903type DiskMoveRequest struct {
1904	// DestinationZone: The URL of the destination zone to move the disk.
1905	// This can be a full or partial URL. For example, the following are all
1906	// valid URLs to a zone:
1907	// - https://www.googleapis.com/compute/v1/projects/project/zones/zone
1908	//
1909	// - projects/project/zones/zone
1910	// - zones/zone
1911	DestinationZone string `json:"destinationZone,omitempty"`
1912
1913	// TargetDisk: The URL of the target disk to move. This can be a full or
1914	// partial URL. For example, the following are all valid URLs to a disk:
1915	//
1916	// -
1917	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
1918	// - projects/project/zones/zone/disks/disk
1919	// - zones/zone/disks/disk
1920	TargetDisk string `json:"targetDisk,omitempty"`
1921
1922	// ForceSendFields is a list of field names (e.g. "DestinationZone") to
1923	// unconditionally include in API requests. By default, fields with
1924	// empty values are omitted from API requests. However, any non-pointer,
1925	// non-interface field appearing in ForceSendFields will be sent to the
1926	// server regardless of whether the field is empty or not. This may be
1927	// used to include empty fields in Patch requests.
1928	ForceSendFields []string `json:"-"`
1929}
1930
1931func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) {
1932	type noMethod DiskMoveRequest
1933	raw := noMethod(*s)
1934	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1935}
1936
1937// DiskType: A DiskType resource.
1938type DiskType struct {
1939	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
1940	// format.
1941	CreationTimestamp string `json:"creationTimestamp,omitempty"`
1942
1943	// DefaultDiskSizeGb: [Output Only] Server-defined default disk size in
1944	// GB.
1945	DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"`
1946
1947	// Deprecated: [Output Only] The deprecation status associated with this
1948	// disk type.
1949	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
1950
1951	// Description: [Output Only] An optional description of this resource.
1952	Description string `json:"description,omitempty"`
1953
1954	// Id: [Output Only] The unique identifier for the resource. This
1955	// identifier is defined by the server.
1956	Id uint64 `json:"id,omitempty,string"`
1957
1958	// Kind: [Output Only] Type of the resource. Always compute#diskType for
1959	// disk types.
1960	Kind string `json:"kind,omitempty"`
1961
1962	// Name: [Output Only] Name of the resource.
1963	Name string `json:"name,omitempty"`
1964
1965	// SelfLink: [Output Only] Server-defined URL for the resource.
1966	SelfLink string `json:"selfLink,omitempty"`
1967
1968	// ValidDiskSize: [Output Only] An optional textual description of the
1969	// valid disk size, such as "10GB-10TB".
1970	ValidDiskSize string `json:"validDiskSize,omitempty"`
1971
1972	// Zone: [Output Only] URL of the zone where the disk type resides.
1973	Zone string `json:"zone,omitempty"`
1974
1975	// ServerResponse contains the HTTP response code and headers from the
1976	// server.
1977	googleapi.ServerResponse `json:"-"`
1978
1979	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
1980	// to unconditionally include in API requests. By default, fields with
1981	// empty values are omitted from API requests. However, any non-pointer,
1982	// non-interface field appearing in ForceSendFields will be sent to the
1983	// server regardless of whether the field is empty or not. This may be
1984	// used to include empty fields in Patch requests.
1985	ForceSendFields []string `json:"-"`
1986}
1987
1988func (s *DiskType) MarshalJSON() ([]byte, error) {
1989	type noMethod DiskType
1990	raw := noMethod(*s)
1991	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1992}
1993
1994type DiskTypeAggregatedList struct {
1995	// Id: [Output Only] The unique identifier for the resource. This
1996	// identifier is defined by the server.
1997	Id string `json:"id,omitempty"`
1998
1999	// Items: [Output Only] A map of scoped disk type lists.
2000	Items map[string]DiskTypesScopedList `json:"items,omitempty"`
2001
2002	// Kind: [Output Only] Type of resource. Always
2003	// compute#diskTypeAggregatedList.
2004	Kind string `json:"kind,omitempty"`
2005
2006	// NextPageToken: [Output Only] This token allows you to get the next
2007	// page of results for list requests. If the number of results is larger
2008	// than maxResults, use the nextPageToken as a value for the query
2009	// parameter pageToken in the next list request. Subsequent list
2010	// requests will have their own nextPageToken to continue paging through
2011	// the results.
2012	NextPageToken string `json:"nextPageToken,omitempty"`
2013
2014	// SelfLink: [Output Only] Server-defined URL for this resource.
2015	SelfLink string `json:"selfLink,omitempty"`
2016
2017	// ServerResponse contains the HTTP response code and headers from the
2018	// server.
2019	googleapi.ServerResponse `json:"-"`
2020
2021	// ForceSendFields is a list of field names (e.g. "Id") to
2022	// unconditionally include in API requests. By default, fields with
2023	// empty values are omitted from API requests. However, any non-pointer,
2024	// non-interface field appearing in ForceSendFields will be sent to the
2025	// server regardless of whether the field is empty or not. This may be
2026	// used to include empty fields in Patch requests.
2027	ForceSendFields []string `json:"-"`
2028}
2029
2030func (s *DiskTypeAggregatedList) MarshalJSON() ([]byte, error) {
2031	type noMethod DiskTypeAggregatedList
2032	raw := noMethod(*s)
2033	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2034}
2035
2036// DiskTypeList: Contains a list of disk types.
2037type DiskTypeList struct {
2038	// Id: [Output Only] The unique identifier for the resource. This
2039	// identifier is defined by the server.
2040	Id string `json:"id,omitempty"`
2041
2042	// Items: [Output Only] A list of Disk Type resources.
2043	Items []*DiskType `json:"items,omitempty"`
2044
2045	// Kind: [Output Only] Type of resource. Always compute#diskTypeList for
2046	// disk types.
2047	Kind string `json:"kind,omitempty"`
2048
2049	// NextPageToken: [Output Only] This token allows you to get the next
2050	// page of results for list requests. If the number of results is larger
2051	// than maxResults, use the nextPageToken as a value for the query
2052	// parameter pageToken in the next list request. Subsequent list
2053	// requests will have their own nextPageToken to continue paging through
2054	// the results.
2055	NextPageToken string `json:"nextPageToken,omitempty"`
2056
2057	// SelfLink: [Output Only] Server-defined URL for this resource.
2058	SelfLink string `json:"selfLink,omitempty"`
2059
2060	// ServerResponse contains the HTTP response code and headers from the
2061	// server.
2062	googleapi.ServerResponse `json:"-"`
2063
2064	// ForceSendFields is a list of field names (e.g. "Id") to
2065	// unconditionally include in API requests. By default, fields with
2066	// empty values are omitted from API requests. However, any non-pointer,
2067	// non-interface field appearing in ForceSendFields will be sent to the
2068	// server regardless of whether the field is empty or not. This may be
2069	// used to include empty fields in Patch requests.
2070	ForceSendFields []string `json:"-"`
2071}
2072
2073func (s *DiskTypeList) MarshalJSON() ([]byte, error) {
2074	type noMethod DiskTypeList
2075	raw := noMethod(*s)
2076	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2077}
2078
2079type DiskTypesScopedList struct {
2080	// DiskTypes: [Output Only] List of disk types contained in this scope.
2081	DiskTypes []*DiskType `json:"diskTypes,omitempty"`
2082
2083	// Warning: [Output Only] Informational warning which replaces the list
2084	// of disk types when the list is empty.
2085	Warning *DiskTypesScopedListWarning `json:"warning,omitempty"`
2086
2087	// ForceSendFields is a list of field names (e.g. "DiskTypes") to
2088	// unconditionally include in API requests. By default, fields with
2089	// empty values are omitted from API requests. However, any non-pointer,
2090	// non-interface field appearing in ForceSendFields will be sent to the
2091	// server regardless of whether the field is empty or not. This may be
2092	// used to include empty fields in Patch requests.
2093	ForceSendFields []string `json:"-"`
2094}
2095
2096func (s *DiskTypesScopedList) MarshalJSON() ([]byte, error) {
2097	type noMethod DiskTypesScopedList
2098	raw := noMethod(*s)
2099	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2100}
2101
2102// DiskTypesScopedListWarning: [Output Only] Informational warning which
2103// replaces the list of disk types when the list is empty.
2104type DiskTypesScopedListWarning struct {
2105	// Code: [Output Only] A warning code, if applicable. For example,
2106	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
2107	// the response.
2108	//
2109	// Possible values:
2110	//   "CLEANUP_FAILED"
2111	//   "DEPRECATED_RESOURCE_USED"
2112	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
2113	//   "INJECTED_KERNELS_DEPRECATED"
2114	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
2115	//   "NEXT_HOP_CANNOT_IP_FORWARD"
2116	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
2117	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
2118	//   "NEXT_HOP_NOT_RUNNING"
2119	//   "NOT_CRITICAL_ERROR"
2120	//   "NO_RESULTS_ON_PAGE"
2121	//   "REQUIRED_TOS_AGREEMENT"
2122	//   "RESOURCE_NOT_DELETED"
2123	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
2124	//   "UNREACHABLE"
2125	Code string `json:"code,omitempty"`
2126
2127	// Data: [Output Only] Metadata about this warning in key: value format.
2128	// For example:
2129	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2130	Data []*DiskTypesScopedListWarningData `json:"data,omitempty"`
2131
2132	// Message: [Output Only] A human-readable description of the warning
2133	// code.
2134	Message string `json:"message,omitempty"`
2135
2136	// ForceSendFields is a list of field names (e.g. "Code") to
2137	// unconditionally include in API requests. By default, fields with
2138	// empty values are omitted from API requests. However, any non-pointer,
2139	// non-interface field appearing in ForceSendFields will be sent to the
2140	// server regardless of whether the field is empty or not. This may be
2141	// used to include empty fields in Patch requests.
2142	ForceSendFields []string `json:"-"`
2143}
2144
2145func (s *DiskTypesScopedListWarning) MarshalJSON() ([]byte, error) {
2146	type noMethod DiskTypesScopedListWarning
2147	raw := noMethod(*s)
2148	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2149}
2150
2151type DiskTypesScopedListWarningData struct {
2152	// Key: [Output Only] A key that provides more detail on the warning
2153	// being returned. For example, for warnings where there are no results
2154	// in a list request for a particular zone, this key might be scope and
2155	// the key value might be the zone name. Other examples might be a key
2156	// indicating a deprecated resource and a suggested replacement, or a
2157	// warning about invalid network settings (for example, if an instance
2158	// attempts to perform IP forwarding but is not enabled for IP
2159	// forwarding).
2160	Key string `json:"key,omitempty"`
2161
2162	// Value: [Output Only] A warning data value corresponding to the key.
2163	Value string `json:"value,omitempty"`
2164
2165	// ForceSendFields is a list of field names (e.g. "Key") to
2166	// unconditionally include in API requests. By default, fields with
2167	// empty values are omitted from API requests. However, any non-pointer,
2168	// non-interface field appearing in ForceSendFields will be sent to the
2169	// server regardless of whether the field is empty or not. This may be
2170	// used to include empty fields in Patch requests.
2171	ForceSendFields []string `json:"-"`
2172}
2173
2174func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) {
2175	type noMethod DiskTypesScopedListWarningData
2176	raw := noMethod(*s)
2177	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2178}
2179
2180type DisksScopedList struct {
2181	// Disks: [Output Only] List of disks contained in this scope.
2182	Disks []*Disk `json:"disks,omitempty"`
2183
2184	// Warning: [Output Only] Informational warning which replaces the list
2185	// of disks when the list is empty.
2186	Warning *DisksScopedListWarning `json:"warning,omitempty"`
2187
2188	// ForceSendFields is a list of field names (e.g. "Disks") to
2189	// unconditionally include in API requests. By default, fields with
2190	// empty values are omitted from API requests. However, any non-pointer,
2191	// non-interface field appearing in ForceSendFields will be sent to the
2192	// server regardless of whether the field is empty or not. This may be
2193	// used to include empty fields in Patch requests.
2194	ForceSendFields []string `json:"-"`
2195}
2196
2197func (s *DisksScopedList) MarshalJSON() ([]byte, error) {
2198	type noMethod DisksScopedList
2199	raw := noMethod(*s)
2200	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2201}
2202
2203// DisksScopedListWarning: [Output Only] Informational warning which
2204// replaces the list of disks when the list is empty.
2205type DisksScopedListWarning struct {
2206	// Code: [Output Only] A warning code, if applicable. For example,
2207	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
2208	// the response.
2209	//
2210	// Possible values:
2211	//   "CLEANUP_FAILED"
2212	//   "DEPRECATED_RESOURCE_USED"
2213	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
2214	//   "INJECTED_KERNELS_DEPRECATED"
2215	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
2216	//   "NEXT_HOP_CANNOT_IP_FORWARD"
2217	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
2218	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
2219	//   "NEXT_HOP_NOT_RUNNING"
2220	//   "NOT_CRITICAL_ERROR"
2221	//   "NO_RESULTS_ON_PAGE"
2222	//   "REQUIRED_TOS_AGREEMENT"
2223	//   "RESOURCE_NOT_DELETED"
2224	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
2225	//   "UNREACHABLE"
2226	Code string `json:"code,omitempty"`
2227
2228	// Data: [Output Only] Metadata about this warning in key: value format.
2229	// For example:
2230	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2231	Data []*DisksScopedListWarningData `json:"data,omitempty"`
2232
2233	// Message: [Output Only] A human-readable description of the warning
2234	// code.
2235	Message string `json:"message,omitempty"`
2236
2237	// ForceSendFields is a list of field names (e.g. "Code") to
2238	// unconditionally include in API requests. By default, fields with
2239	// empty values are omitted from API requests. However, any non-pointer,
2240	// non-interface field appearing in ForceSendFields will be sent to the
2241	// server regardless of whether the field is empty or not. This may be
2242	// used to include empty fields in Patch requests.
2243	ForceSendFields []string `json:"-"`
2244}
2245
2246func (s *DisksScopedListWarning) MarshalJSON() ([]byte, error) {
2247	type noMethod DisksScopedListWarning
2248	raw := noMethod(*s)
2249	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2250}
2251
2252type DisksScopedListWarningData struct {
2253	// Key: [Output Only] A key that provides more detail on the warning
2254	// being returned. For example, for warnings where there are no results
2255	// in a list request for a particular zone, this key might be scope and
2256	// the key value might be the zone name. Other examples might be a key
2257	// indicating a deprecated resource and a suggested replacement, or a
2258	// warning about invalid network settings (for example, if an instance
2259	// attempts to perform IP forwarding but is not enabled for IP
2260	// forwarding).
2261	Key string `json:"key,omitempty"`
2262
2263	// Value: [Output Only] A warning data value corresponding to the key.
2264	Value string `json:"value,omitempty"`
2265
2266	// ForceSendFields is a list of field names (e.g. "Key") to
2267	// unconditionally include in API requests. By default, fields with
2268	// empty values are omitted from API requests. However, any non-pointer,
2269	// non-interface field appearing in ForceSendFields will be sent to the
2270	// server regardless of whether the field is empty or not. This may be
2271	// used to include empty fields in Patch requests.
2272	ForceSendFields []string `json:"-"`
2273}
2274
2275func (s *DisksScopedListWarningData) MarshalJSON() ([]byte, error) {
2276	type noMethod DisksScopedListWarningData
2277	raw := noMethod(*s)
2278	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2279}
2280
2281// Firewall: Represents a Firewall resource.
2282type Firewall struct {
2283	// Allowed: The list of rules specified by this firewall. Each rule
2284	// specifies a protocol and port-range tuple that describes a permitted
2285	// connection.
2286	Allowed []*FirewallAllowed `json:"allowed,omitempty"`
2287
2288	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2289	// format.
2290	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2291
2292	// Description: An optional description of this resource. Provide this
2293	// property when you create the resource.
2294	Description string `json:"description,omitempty"`
2295
2296	// Id: [Output Only] The unique identifier for the resource. This
2297	// identifier is defined by the server.
2298	Id uint64 `json:"id,omitempty,string"`
2299
2300	// Kind: [Output Ony] Type of the resource. Always compute#firewall for
2301	// firewall rules.
2302	Kind string `json:"kind,omitempty"`
2303
2304	// Name: Name of the resource; provided by the client when the resource
2305	// is created. The name must be 1-63 characters long, and comply with
2306	// RFC1035. Specifically, the name must be 1-63 characters long and
2307	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
2308	// the first character must be a lowercase letter, and all following
2309	// characters must be a dash, lowercase letter, or digit, except the
2310	// last character, which cannot be a dash.
2311	Name string `json:"name,omitempty"`
2312
2313	// Network: URL of the network resource for this firewall rule. If not
2314	// specified when creating a firewall rule, the default network is
2315	// used:
2316	// global/networks/default
2317	// If you choose to specify this property, you can specify the network
2318	// as a full or partial URL. For example, the following are all valid
2319	// URLs:
2320	// -
2321	// https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
2322	// - projects/myproject/global/networks/my-network
2323	// - global/networks/default
2324	Network string `json:"network,omitempty"`
2325
2326	// SelfLink: [Output Only] Server-defined URL for the resource.
2327	SelfLink string `json:"selfLink,omitempty"`
2328
2329	// SourceRanges: The IP address blocks that this rule applies to,
2330	// expressed in CIDR format. One or both of sourceRanges and sourceTags
2331	// may be set.
2332	//
2333	// If both properties are set, an inbound connection is allowed if the
2334	// range matches the sourceRanges OR the tag of the source matches the
2335	// sourceTags property. The connection does not need to match both
2336	// properties.
2337	SourceRanges []string `json:"sourceRanges,omitempty"`
2338
2339	// SourceTags: A list of instance tags which this rule applies to. One
2340	// or both of sourceRanges and sourceTags may be set.
2341	//
2342	// If both properties are set, an inbound connection is allowed if the
2343	// range matches the sourceRanges OR the tag of the source matches the
2344	// sourceTags property. The connection does not need to match both
2345	// properties.
2346	SourceTags []string `json:"sourceTags,omitempty"`
2347
2348	// TargetTags: A list of instance tags indicating sets of instances
2349	// located in the network that may make network connections as specified
2350	// in allowed[]. If no targetTags are specified, the firewall rule
2351	// applies to all instances on the specified network.
2352	TargetTags []string `json:"targetTags,omitempty"`
2353
2354	// ServerResponse contains the HTTP response code and headers from the
2355	// server.
2356	googleapi.ServerResponse `json:"-"`
2357
2358	// ForceSendFields is a list of field names (e.g. "Allowed") to
2359	// unconditionally include in API requests. By default, fields with
2360	// empty values are omitted from API requests. However, any non-pointer,
2361	// non-interface field appearing in ForceSendFields will be sent to the
2362	// server regardless of whether the field is empty or not. This may be
2363	// used to include empty fields in Patch requests.
2364	ForceSendFields []string `json:"-"`
2365}
2366
2367func (s *Firewall) MarshalJSON() ([]byte, error) {
2368	type noMethod Firewall
2369	raw := noMethod(*s)
2370	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2371}
2372
2373type FirewallAllowed struct {
2374	// IPProtocol: The IP protocol that is allowed for this rule. The
2375	// protocol type is required when creating a firewall rule. This value
2376	// can either be one of the following well known protocol strings (tcp,
2377	// udp, icmp, esp, ah, sctp), or the IP protocol number.
2378	IPProtocol string `json:"IPProtocol,omitempty"`
2379
2380	// Ports: An optional list of ports which are allowed. This field is
2381	// only applicable for UDP or TCP protocol. Each entry must be either an
2382	// integer or a range. If not specified, connections through any port
2383	// are allowed
2384	//
2385	// Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
2386	Ports []string `json:"ports,omitempty"`
2387
2388	// ForceSendFields is a list of field names (e.g. "IPProtocol") to
2389	// unconditionally include in API requests. By default, fields with
2390	// empty values are omitted from API requests. However, any non-pointer,
2391	// non-interface field appearing in ForceSendFields will be sent to the
2392	// server regardless of whether the field is empty or not. This may be
2393	// used to include empty fields in Patch requests.
2394	ForceSendFields []string `json:"-"`
2395}
2396
2397func (s *FirewallAllowed) MarshalJSON() ([]byte, error) {
2398	type noMethod FirewallAllowed
2399	raw := noMethod(*s)
2400	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2401}
2402
2403// FirewallList: Contains a list of firewalls.
2404type FirewallList struct {
2405	// Id: [Output Only] The unique identifier for the resource. This
2406	// identifier is defined by the server.
2407	Id string `json:"id,omitempty"`
2408
2409	// Items: [Output Only] A list of Firewall resources.
2410	Items []*Firewall `json:"items,omitempty"`
2411
2412	// Kind: [Output Only] Type of resource. Always compute#firewallList for
2413	// lists of firewalls.
2414	Kind string `json:"kind,omitempty"`
2415
2416	// NextPageToken: [Output Only] This token allows you to get the next
2417	// page of results for list requests. If the number of results is larger
2418	// than maxResults, use the nextPageToken as a value for the query
2419	// parameter pageToken in the next list request. Subsequent list
2420	// requests will have their own nextPageToken to continue paging through
2421	// the results.
2422	NextPageToken string `json:"nextPageToken,omitempty"`
2423
2424	// SelfLink: [Output Only] Server-defined URL for this resource.
2425	SelfLink string `json:"selfLink,omitempty"`
2426
2427	// ServerResponse contains the HTTP response code and headers from the
2428	// server.
2429	googleapi.ServerResponse `json:"-"`
2430
2431	// ForceSendFields is a list of field names (e.g. "Id") to
2432	// unconditionally include in API requests. By default, fields with
2433	// empty values are omitted from API requests. However, any non-pointer,
2434	// non-interface field appearing in ForceSendFields will be sent to the
2435	// server regardless of whether the field is empty or not. This may be
2436	// used to include empty fields in Patch requests.
2437	ForceSendFields []string `json:"-"`
2438}
2439
2440func (s *FirewallList) MarshalJSON() ([]byte, error) {
2441	type noMethod FirewallList
2442	raw := noMethod(*s)
2443	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2444}
2445
2446// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource
2447// specifies which pool of target virtual machines to forward a packet
2448// to if it matches the given [IPAddress, IPProtocol, portRange] tuple.
2449type ForwardingRule struct {
2450	// IPAddress: Value of the reserved IP address that this forwarding rule
2451	// is serving on behalf of. For global forwarding rules, the address
2452	// must be a global IP; for regional forwarding rules, the address must
2453	// live in the same region as the forwarding rule. If left empty
2454	// (default value), an ephemeral IP from the same scope (global or
2455	// regional) will be assigned.
2456	IPAddress string `json:"IPAddress,omitempty"`
2457
2458	// IPProtocol: The IP protocol to which this rule applies. Valid options
2459	// are TCP, UDP, ESP, AH or SCTP.
2460	//
2461	// Possible values:
2462	//   "AH"
2463	//   "ESP"
2464	//   "SCTP"
2465	//   "TCP"
2466	//   "UDP"
2467	IPProtocol string `json:"IPProtocol,omitempty"`
2468
2469	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2470	// format.
2471	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2472
2473	// Description: An optional description of this resource. Provide this
2474	// property when you create the resource.
2475	Description string `json:"description,omitempty"`
2476
2477	// Id: [Output Only] The unique identifier for the resource. This
2478	// identifier is defined by the server.
2479	Id uint64 `json:"id,omitempty,string"`
2480
2481	// Kind: [Output Only] Type of the resource. Always
2482	// compute#forwardingRule for Forwarding Rule resources.
2483	Kind string `json:"kind,omitempty"`
2484
2485	// Name: Name of the resource; provided by the client when the resource
2486	// is created. The name must be 1-63 characters long, and comply with
2487	// RFC1035. Specifically, the name must be 1-63 characters long and
2488	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
2489	// the first character must be a lowercase letter, and all following
2490	// characters must be a dash, lowercase letter, or digit, except the
2491	// last character, which cannot be a dash.
2492	Name string `json:"name,omitempty"`
2493
2494	// PortRange: Applicable only when IPProtocol is TCP, UDP, or SCTP, only
2495	// packets addressed to ports in the specified range will be forwarded
2496	// to target. Forwarding rules with the same [IPAddress, IPProtocol]
2497	// pair must have disjoint port ranges.
2498	PortRange string `json:"portRange,omitempty"`
2499
2500	// Region: [Output Only] URL of the region where the regional forwarding
2501	// rule resides. This field is not applicable to global forwarding
2502	// rules.
2503	Region string `json:"region,omitempty"`
2504
2505	// SelfLink: [Output Only] Server-defined URL for the resource.
2506	SelfLink string `json:"selfLink,omitempty"`
2507
2508	// Target: The URL of the target resource to receive the matched
2509	// traffic. For regional forwarding rules, this target must live in the
2510	// same region as the forwarding rule. For global forwarding rules, this
2511	// target must be a global TargetHttpProxy or TargetHttpsProxy resource.
2512	// The forwarded traffic must be of a type appropriate to the target
2513	// object. For example, TargetHttpProxy requires HTTP traffic, and
2514	// TargetHttpsProxy requires HTTPS traffic.
2515	Target string `json:"target,omitempty"`
2516
2517	// ServerResponse contains the HTTP response code and headers from the
2518	// server.
2519	googleapi.ServerResponse `json:"-"`
2520
2521	// ForceSendFields is a list of field names (e.g. "IPAddress") to
2522	// unconditionally include in API requests. By default, fields with
2523	// empty values are omitted from API requests. However, any non-pointer,
2524	// non-interface field appearing in ForceSendFields will be sent to the
2525	// server regardless of whether the field is empty or not. This may be
2526	// used to include empty fields in Patch requests.
2527	ForceSendFields []string `json:"-"`
2528}
2529
2530func (s *ForwardingRule) MarshalJSON() ([]byte, error) {
2531	type noMethod ForwardingRule
2532	raw := noMethod(*s)
2533	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2534}
2535
2536type ForwardingRuleAggregatedList struct {
2537	// Id: [Output Only] The unique identifier for the resource. This
2538	// identifier is defined by the server.
2539	Id string `json:"id,omitempty"`
2540
2541	// Items: A map of scoped forwarding rule lists.
2542	Items map[string]ForwardingRulesScopedList `json:"items,omitempty"`
2543
2544	// Kind: [Output Only] Type of resource. Always
2545	// compute#forwardingRuleAggregatedList for lists of forwarding rules.
2546	Kind string `json:"kind,omitempty"`
2547
2548	// NextPageToken: [Output Only] This token allows you to get the next
2549	// page of results for list requests. If the number of results is larger
2550	// than maxResults, use the nextPageToken as a value for the query
2551	// parameter pageToken in the next list request. Subsequent list
2552	// requests will have their own nextPageToken to continue paging through
2553	// the results.
2554	NextPageToken string `json:"nextPageToken,omitempty"`
2555
2556	// SelfLink: [Output Only] Server-defined URL for this resource.
2557	SelfLink string `json:"selfLink,omitempty"`
2558
2559	// ServerResponse contains the HTTP response code and headers from the
2560	// server.
2561	googleapi.ServerResponse `json:"-"`
2562
2563	// ForceSendFields is a list of field names (e.g. "Id") to
2564	// unconditionally include in API requests. By default, fields with
2565	// empty values are omitted from API requests. However, any non-pointer,
2566	// non-interface field appearing in ForceSendFields will be sent to the
2567	// server regardless of whether the field is empty or not. This may be
2568	// used to include empty fields in Patch requests.
2569	ForceSendFields []string `json:"-"`
2570}
2571
2572func (s *ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) {
2573	type noMethod ForwardingRuleAggregatedList
2574	raw := noMethod(*s)
2575	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2576}
2577
2578// ForwardingRuleList: Contains a list of ForwardingRule resources.
2579type ForwardingRuleList struct {
2580	// Id: [Output Only] Unique identifier for the resource. Set by the
2581	// server.
2582	Id string `json:"id,omitempty"`
2583
2584	// Items: A list of ForwardingRule resources.
2585	Items []*ForwardingRule `json:"items,omitempty"`
2586
2587	// Kind: Type of resource.
2588	Kind string `json:"kind,omitempty"`
2589
2590	// NextPageToken: [Output Only] This token allows you to get the next
2591	// page of results for list requests. If the number of results is larger
2592	// than maxResults, use the nextPageToken as a value for the query
2593	// parameter pageToken in the next list request. Subsequent list
2594	// requests will have their own nextPageToken to continue paging through
2595	// the results.
2596	NextPageToken string `json:"nextPageToken,omitempty"`
2597
2598	// SelfLink: [Output Only] Server-defined URL for this resource.
2599	SelfLink string `json:"selfLink,omitempty"`
2600
2601	// ServerResponse contains the HTTP response code and headers from the
2602	// server.
2603	googleapi.ServerResponse `json:"-"`
2604
2605	// ForceSendFields is a list of field names (e.g. "Id") to
2606	// unconditionally include in API requests. By default, fields with
2607	// empty values are omitted from API requests. However, any non-pointer,
2608	// non-interface field appearing in ForceSendFields will be sent to the
2609	// server regardless of whether the field is empty or not. This may be
2610	// used to include empty fields in Patch requests.
2611	ForceSendFields []string `json:"-"`
2612}
2613
2614func (s *ForwardingRuleList) MarshalJSON() ([]byte, error) {
2615	type noMethod ForwardingRuleList
2616	raw := noMethod(*s)
2617	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2618}
2619
2620type ForwardingRulesScopedList struct {
2621	// ForwardingRules: List of forwarding rules contained in this scope.
2622	ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"`
2623
2624	// Warning: Informational warning which replaces the list of forwarding
2625	// rules when the list is empty.
2626	Warning *ForwardingRulesScopedListWarning `json:"warning,omitempty"`
2627
2628	// ForceSendFields is a list of field names (e.g. "ForwardingRules") to
2629	// unconditionally include in API requests. By default, fields with
2630	// empty values are omitted from API requests. However, any non-pointer,
2631	// non-interface field appearing in ForceSendFields will be sent to the
2632	// server regardless of whether the field is empty or not. This may be
2633	// used to include empty fields in Patch requests.
2634	ForceSendFields []string `json:"-"`
2635}
2636
2637func (s *ForwardingRulesScopedList) MarshalJSON() ([]byte, error) {
2638	type noMethod ForwardingRulesScopedList
2639	raw := noMethod(*s)
2640	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2641}
2642
2643// ForwardingRulesScopedListWarning: Informational warning which
2644// replaces the list of forwarding rules when the list is empty.
2645type ForwardingRulesScopedListWarning struct {
2646	// Code: [Output Only] A warning code, if applicable. For example,
2647	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
2648	// the response.
2649	//
2650	// Possible values:
2651	//   "CLEANUP_FAILED"
2652	//   "DEPRECATED_RESOURCE_USED"
2653	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
2654	//   "INJECTED_KERNELS_DEPRECATED"
2655	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
2656	//   "NEXT_HOP_CANNOT_IP_FORWARD"
2657	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
2658	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
2659	//   "NEXT_HOP_NOT_RUNNING"
2660	//   "NOT_CRITICAL_ERROR"
2661	//   "NO_RESULTS_ON_PAGE"
2662	//   "REQUIRED_TOS_AGREEMENT"
2663	//   "RESOURCE_NOT_DELETED"
2664	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
2665	//   "UNREACHABLE"
2666	Code string `json:"code,omitempty"`
2667
2668	// Data: [Output Only] Metadata about this warning in key: value format.
2669	// For example:
2670	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2671	Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"`
2672
2673	// Message: [Output Only] A human-readable description of the warning
2674	// code.
2675	Message string `json:"message,omitempty"`
2676
2677	// ForceSendFields is a list of field names (e.g. "Code") to
2678	// unconditionally include in API requests. By default, fields with
2679	// empty values are omitted from API requests. However, any non-pointer,
2680	// non-interface field appearing in ForceSendFields will be sent to the
2681	// server regardless of whether the field is empty or not. This may be
2682	// used to include empty fields in Patch requests.
2683	ForceSendFields []string `json:"-"`
2684}
2685
2686func (s *ForwardingRulesScopedListWarning) MarshalJSON() ([]byte, error) {
2687	type noMethod ForwardingRulesScopedListWarning
2688	raw := noMethod(*s)
2689	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2690}
2691
2692type ForwardingRulesScopedListWarningData struct {
2693	// Key: [Output Only] A key that provides more detail on the warning
2694	// being returned. For example, for warnings where there are no results
2695	// in a list request for a particular zone, this key might be scope and
2696	// the key value might be the zone name. Other examples might be a key
2697	// indicating a deprecated resource and a suggested replacement, or a
2698	// warning about invalid network settings (for example, if an instance
2699	// attempts to perform IP forwarding but is not enabled for IP
2700	// forwarding).
2701	Key string `json:"key,omitempty"`
2702
2703	// Value: [Output Only] A warning data value corresponding to the key.
2704	Value string `json:"value,omitempty"`
2705
2706	// ForceSendFields is a list of field names (e.g. "Key") to
2707	// unconditionally include in API requests. By default, fields with
2708	// empty values are omitted from API requests. However, any non-pointer,
2709	// non-interface field appearing in ForceSendFields will be sent to the
2710	// server regardless of whether the field is empty or not. This may be
2711	// used to include empty fields in Patch requests.
2712	ForceSendFields []string `json:"-"`
2713}
2714
2715func (s *ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) {
2716	type noMethod ForwardingRulesScopedListWarningData
2717	raw := noMethod(*s)
2718	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2719}
2720
2721// HealthCheckReference: A full or valid partial URL to a health check.
2722// For example, the following are valid URLs:
2723// -
2724// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check
2725// - projects/project-id/global/httpHealthChecks/health-check
2726// - global/httpHealthChecks/health-check
2727type HealthCheckReference struct {
2728	HealthCheck string `json:"healthCheck,omitempty"`
2729
2730	// ForceSendFields is a list of field names (e.g. "HealthCheck") to
2731	// unconditionally include in API requests. By default, fields with
2732	// empty values are omitted from API requests. However, any non-pointer,
2733	// non-interface field appearing in ForceSendFields will be sent to the
2734	// server regardless of whether the field is empty or not. This may be
2735	// used to include empty fields in Patch requests.
2736	ForceSendFields []string `json:"-"`
2737}
2738
2739func (s *HealthCheckReference) MarshalJSON() ([]byte, error) {
2740	type noMethod HealthCheckReference
2741	raw := noMethod(*s)
2742	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2743}
2744
2745type HealthStatus struct {
2746	// HealthState: Health state of the instance.
2747	//
2748	// Possible values:
2749	//   "HEALTHY"
2750	//   "UNHEALTHY"
2751	HealthState string `json:"healthState,omitempty"`
2752
2753	// Instance: URL of the instance resource.
2754	Instance string `json:"instance,omitempty"`
2755
2756	// IpAddress: The IP address represented by this resource.
2757	IpAddress string `json:"ipAddress,omitempty"`
2758
2759	// Port: The port on the instance.
2760	Port int64 `json:"port,omitempty"`
2761
2762	// ForceSendFields is a list of field names (e.g. "HealthState") to
2763	// unconditionally include in API requests. By default, fields with
2764	// empty values are omitted from API requests. However, any non-pointer,
2765	// non-interface field appearing in ForceSendFields will be sent to the
2766	// server regardless of whether the field is empty or not. This may be
2767	// used to include empty fields in Patch requests.
2768	ForceSendFields []string `json:"-"`
2769}
2770
2771func (s *HealthStatus) MarshalJSON() ([]byte, error) {
2772	type noMethod HealthStatus
2773	raw := noMethod(*s)
2774	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2775}
2776
2777// HostRule: UrlMaps A host-matching rule for a URL. If matched, will
2778// use the named PathMatcher to select the BackendService.
2779type HostRule struct {
2780	// Description: An optional description of this resource. Provide this
2781	// property when you create the resource.
2782	Description string `json:"description,omitempty"`
2783
2784	// Hosts: The list of host patterns to match. They must be valid
2785	// hostnames, except * will match any string of ([a-z0-9-.]*). In that
2786	// case, * must be the first character and must be followed in the
2787	// pattern by either - or ..
2788	Hosts []string `json:"hosts,omitempty"`
2789
2790	// PathMatcher: The name of the PathMatcher to use to match the path
2791	// portion of the URL if the hostRule matches the URL's host portion.
2792	PathMatcher string `json:"pathMatcher,omitempty"`
2793
2794	// ForceSendFields is a list of field names (e.g. "Description") to
2795	// unconditionally include in API requests. By default, fields with
2796	// empty values are omitted from API requests. However, any non-pointer,
2797	// non-interface field appearing in ForceSendFields will be sent to the
2798	// server regardless of whether the field is empty or not. This may be
2799	// used to include empty fields in Patch requests.
2800	ForceSendFields []string `json:"-"`
2801}
2802
2803func (s *HostRule) MarshalJSON() ([]byte, error) {
2804	type noMethod HostRule
2805	raw := noMethod(*s)
2806	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2807}
2808
2809// HttpHealthCheck: An HttpHealthCheck resource. This resource defines a
2810// template for how individual instances should be checked for health,
2811// via HTTP.
2812type HttpHealthCheck struct {
2813	// CheckIntervalSec: How often (in seconds) to send a health check. The
2814	// default value is 5 seconds.
2815	CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"`
2816
2817	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2818	// format.
2819	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2820
2821	// Description: An optional description of this resource. Provide this
2822	// property when you create the resource.
2823	Description string `json:"description,omitempty"`
2824
2825	// HealthyThreshold: A so-far unhealthy instance will be marked healthy
2826	// after this many consecutive successes. The default value is 2.
2827	HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
2828
2829	// Host: The value of the host header in the HTTP health check request.
2830	// If left empty (default value), the public IP on behalf of which this
2831	// health check is performed will be used.
2832	Host string `json:"host,omitempty"`
2833
2834	// Id: [Output Only] The unique identifier for the resource. This
2835	// identifier is defined by the server.
2836	Id uint64 `json:"id,omitempty,string"`
2837
2838	// Kind: [Output Only] Type of the resource. Always
2839	// compute#httpHealthCheck for HTTP health checks.
2840	Kind string `json:"kind,omitempty"`
2841
2842	// Name: Name of the resource. Provided by the client when the resource
2843	// is created. The name must be 1-63 characters long, and comply with
2844	// RFC1035. Specifically, the name must be 1-63 characters long and
2845	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
2846	// the first character must be a lowercase letter, and all following
2847	// characters must be a dash, lowercase letter, or digit, except the
2848	// last character, which cannot be a dash.
2849	Name string `json:"name,omitempty"`
2850
2851	// Port: The TCP port number for the HTTP health check request. The
2852	// default value is 80.
2853	Port int64 `json:"port,omitempty"`
2854
2855	// RequestPath: The request path of the HTTP health check request. The
2856	// default value is /.
2857	RequestPath string `json:"requestPath,omitempty"`
2858
2859	// SelfLink: [Output Only] Server-defined URL for the resource.
2860	SelfLink string `json:"selfLink,omitempty"`
2861
2862	// TimeoutSec: How long (in seconds) to wait before claiming failure.
2863	// The default value is 5 seconds. It is invalid for timeoutSec to have
2864	// greater value than checkIntervalSec.
2865	TimeoutSec int64 `json:"timeoutSec,omitempty"`
2866
2867	// UnhealthyThreshold: A so-far healthy instance will be marked
2868	// unhealthy after this many consecutive failures. The default value is
2869	// 2.
2870	UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
2871
2872	// ServerResponse contains the HTTP response code and headers from the
2873	// server.
2874	googleapi.ServerResponse `json:"-"`
2875
2876	// ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to
2877	// unconditionally include in API requests. By default, fields with
2878	// empty values are omitted from API requests. However, any non-pointer,
2879	// non-interface field appearing in ForceSendFields will be sent to the
2880	// server regardless of whether the field is empty or not. This may be
2881	// used to include empty fields in Patch requests.
2882	ForceSendFields []string `json:"-"`
2883}
2884
2885func (s *HttpHealthCheck) MarshalJSON() ([]byte, error) {
2886	type noMethod HttpHealthCheck
2887	raw := noMethod(*s)
2888	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2889}
2890
2891// HttpHealthCheckList: Contains a list of HttpHealthCheck resources.
2892type HttpHealthCheckList struct {
2893	// Id: [Output Only] Unique identifier for the resource. Defined by the
2894	// server.
2895	Id string `json:"id,omitempty"`
2896
2897	// Items: A list of HttpHealthCheck resources.
2898	Items []*HttpHealthCheck `json:"items,omitempty"`
2899
2900	// Kind: Type of resource.
2901	Kind string `json:"kind,omitempty"`
2902
2903	// NextPageToken: [Output Only] This token allows you to get the next
2904	// page of results for list requests. If the number of results is larger
2905	// than maxResults, use the nextPageToken as a value for the query
2906	// parameter pageToken in the next list request. Subsequent list
2907	// requests will have their own nextPageToken to continue paging through
2908	// the results.
2909	NextPageToken string `json:"nextPageToken,omitempty"`
2910
2911	// SelfLink: [Output Only] Server-defined URL for this resource.
2912	SelfLink string `json:"selfLink,omitempty"`
2913
2914	// ServerResponse contains the HTTP response code and headers from the
2915	// server.
2916	googleapi.ServerResponse `json:"-"`
2917
2918	// ForceSendFields is a list of field names (e.g. "Id") to
2919	// unconditionally include in API requests. By default, fields with
2920	// empty values are omitted from API requests. However, any non-pointer,
2921	// non-interface field appearing in ForceSendFields will be sent to the
2922	// server regardless of whether the field is empty or not. This may be
2923	// used to include empty fields in Patch requests.
2924	ForceSendFields []string `json:"-"`
2925}
2926
2927func (s *HttpHealthCheckList) MarshalJSON() ([]byte, error) {
2928	type noMethod HttpHealthCheckList
2929	raw := noMethod(*s)
2930	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2931}
2932
2933// HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines
2934// a template for how individual instances should be checked for health,
2935// via HTTPS.
2936type HttpsHealthCheck struct {
2937	// CheckIntervalSec: How often (in seconds) to send a health check. The
2938	// default value is 5 seconds.
2939	CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"`
2940
2941	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2942	// format.
2943	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2944
2945	// Description: An optional description of this resource. Provide this
2946	// property when you create the resource.
2947	Description string `json:"description,omitempty"`
2948
2949	// HealthyThreshold: A so-far unhealthy instance will be marked healthy
2950	// after this many consecutive successes. The default value is 2.
2951	HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
2952
2953	// Host: The value of the host header in the HTTPS health check request.
2954	// If left empty (default value), the public IP on behalf of which this
2955	// health check is performed will be used.
2956	Host string `json:"host,omitempty"`
2957
2958	// Id: [Output Only] The unique identifier for the resource. This
2959	// identifier is defined by the server.
2960	Id uint64 `json:"id,omitempty,string"`
2961
2962	// Kind: Type of the resource.
2963	Kind string `json:"kind,omitempty"`
2964
2965	// Name: Name of the resource. Provided by the client when the resource
2966	// is created. The name must be 1-63 characters long, and comply with
2967	// RFC1035. Specifically, the name must be 1-63 characters long and
2968	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
2969	// the first character must be a lowercase letter, and all following
2970	// characters must be a dash, lowercase letter, or digit, except the
2971	// last character, which cannot be a dash.
2972	Name string `json:"name,omitempty"`
2973
2974	// Port: The TCP port number for the HTTPS health check request. The
2975	// default value is 443.
2976	Port int64 `json:"port,omitempty"`
2977
2978	// RequestPath: The request path of the HTTPS health check request. The
2979	// default value is "/".
2980	RequestPath string `json:"requestPath,omitempty"`
2981
2982	// SelfLink: [Output Only] Server-defined URL for the resource.
2983	SelfLink string `json:"selfLink,omitempty"`
2984
2985	// TimeoutSec: How long (in seconds) to wait before claiming failure.
2986	// The default value is 5 seconds. It is invalid for timeoutSec to have
2987	// a greater value than checkIntervalSec.
2988	TimeoutSec int64 `json:"timeoutSec,omitempty"`
2989
2990	// UnhealthyThreshold: A so-far healthy instance will be marked
2991	// unhealthy after this many consecutive failures. The default value is
2992	// 2.
2993	UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
2994
2995	// ServerResponse contains the HTTP response code and headers from the
2996	// server.
2997	googleapi.ServerResponse `json:"-"`
2998
2999	// ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to
3000	// unconditionally include in API requests. By default, fields with
3001	// empty values are omitted from API requests. However, any non-pointer,
3002	// non-interface field appearing in ForceSendFields will be sent to the
3003	// server regardless of whether the field is empty or not. This may be
3004	// used to include empty fields in Patch requests.
3005	ForceSendFields []string `json:"-"`
3006}
3007
3008func (s *HttpsHealthCheck) MarshalJSON() ([]byte, error) {
3009	type noMethod HttpsHealthCheck
3010	raw := noMethod(*s)
3011	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3012}
3013
3014// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources.
3015type HttpsHealthCheckList struct {
3016	// Id: [Output Only] Unique identifier for the resource; defined by the
3017	// server.
3018	Id string `json:"id,omitempty"`
3019
3020	// Items: A list of HttpsHealthCheck resources.
3021	Items []*HttpsHealthCheck `json:"items,omitempty"`
3022
3023	// Kind: Type of resource.
3024	Kind string `json:"kind,omitempty"`
3025
3026	// NextPageToken: [Output Only] This token allows you to get the next
3027	// page of results for list requests. If the number of results is larger
3028	// than maxResults, use the nextPageToken as a value for the query
3029	// parameter pageToken in the next list request. Subsequent list
3030	// requests will have their own nextPageToken to continue paging through
3031	// the results.
3032	NextPageToken string `json:"nextPageToken,omitempty"`
3033
3034	// SelfLink: [Output Only] Server-defined URL for this resource.
3035	SelfLink string `json:"selfLink,omitempty"`
3036
3037	// ServerResponse contains the HTTP response code and headers from the
3038	// server.
3039	googleapi.ServerResponse `json:"-"`
3040
3041	// ForceSendFields is a list of field names (e.g. "Id") to
3042	// unconditionally include in API requests. By default, fields with
3043	// empty values are omitted from API requests. However, any non-pointer,
3044	// non-interface field appearing in ForceSendFields will be sent to the
3045	// server regardless of whether the field is empty or not. This may be
3046	// used to include empty fields in Patch requests.
3047	ForceSendFields []string `json:"-"`
3048}
3049
3050func (s *HttpsHealthCheckList) MarshalJSON() ([]byte, error) {
3051	type noMethod HttpsHealthCheckList
3052	raw := noMethod(*s)
3053	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3054}
3055
3056// Image: An Image resource.
3057type Image struct {
3058	// ArchiveSizeBytes: Size of the image tar.gz archive stored in Google
3059	// Cloud Storage (in bytes).
3060	ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"`
3061
3062	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
3063	// format.
3064	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3065
3066	// Deprecated: The deprecation status associated with this image.
3067	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
3068
3069	// Description: An optional description of this resource. Provide this
3070	// property when you create the resource.
3071	Description string `json:"description,omitempty"`
3072
3073	// DiskSizeGb: Size of the image when restored onto a persistent disk
3074	// (in GB).
3075	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
3076
3077	// Id: [Output Only] The unique identifier for the resource. This
3078	// identifier is defined by the server.
3079	Id uint64 `json:"id,omitempty,string"`
3080
3081	// Kind: [Output Only] Type of the resource. Always compute#image for
3082	// images.
3083	Kind string `json:"kind,omitempty"`
3084
3085	// Licenses: Any applicable publicly visible licenses.
3086	Licenses []string `json:"licenses,omitempty"`
3087
3088	// Name: Name of the resource; provided by the client when the resource
3089	// is created. The name must be 1-63 characters long, and comply with
3090	// RFC1035. Specifically, the name must be 1-63 characters long and
3091	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
3092	// the first character must be a lowercase letter, and all following
3093	// characters must be a dash, lowercase letter, or digit, except the
3094	// last character, which cannot be a dash.
3095	Name string `json:"name,omitempty"`
3096
3097	// RawDisk: The parameters of the raw disk image.
3098	RawDisk *ImageRawDisk `json:"rawDisk,omitempty"`
3099
3100	// SelfLink: [Output Only] Server-defined URL for the resource.
3101	SelfLink string `json:"selfLink,omitempty"`
3102
3103	// SourceDisk: URL of the The source disk used to create this image.
3104	// This can be a full or valid partial URL. You must provide either this
3105	// property or the rawDisk.source property but not both to create an
3106	// image. For example, the following are valid values:
3107	// -
3108	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/disk/disk
3109	// - projects/project/zones/zone/disk/disk
3110	// - zones/zone/disks/disk
3111	SourceDisk string `json:"sourceDisk,omitempty"`
3112
3113	// SourceDiskId: The ID value of the disk used to create this image.
3114	// This value may be used to determine whether the image was taken from
3115	// the current or a previous instance of a given disk name.
3116	SourceDiskId string `json:"sourceDiskId,omitempty"`
3117
3118	// SourceType: The type of the image used to create this disk. The
3119	// default and only value is RAW
3120	//
3121	// Possible values:
3122	//   "RAW" (default)
3123	SourceType string `json:"sourceType,omitempty"`
3124
3125	// Status: [Output Only] The status of the image. An image can be used
3126	// to create other resources, such as instances, only after the image
3127	// has been successfully created and the status is set to READY.
3128	// Possible values are FAILED, PENDING, or READY.
3129	//
3130	// Possible values:
3131	//   "FAILED"
3132	//   "PENDING"
3133	//   "READY"
3134	Status string `json:"status,omitempty"`
3135
3136	// ServerResponse contains the HTTP response code and headers from the
3137	// server.
3138	googleapi.ServerResponse `json:"-"`
3139
3140	// ForceSendFields is a list of field names (e.g. "ArchiveSizeBytes") to
3141	// unconditionally include in API requests. By default, fields with
3142	// empty values are omitted from API requests. However, any non-pointer,
3143	// non-interface field appearing in ForceSendFields will be sent to the
3144	// server regardless of whether the field is empty or not. This may be
3145	// used to include empty fields in Patch requests.
3146	ForceSendFields []string `json:"-"`
3147}
3148
3149func (s *Image) MarshalJSON() ([]byte, error) {
3150	type noMethod Image
3151	raw := noMethod(*s)
3152	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3153}
3154
3155// ImageRawDisk: The parameters of the raw disk image.
3156type ImageRawDisk struct {
3157	// ContainerType: The format used to encode and transmit the block
3158	// device, which should be TAR. This is just a container and
3159	// transmission format and not a runtime format. Provided by the client
3160	// when the disk image is created.
3161	//
3162	// Possible values:
3163	//   "TAR"
3164	ContainerType string `json:"containerType,omitempty"`
3165
3166	// Sha1Checksum: An optional SHA1 checksum of the disk image before
3167	// unpackaging; provided by the client when the disk image is created.
3168	Sha1Checksum string `json:"sha1Checksum,omitempty"`
3169
3170	// Source: The full Google Cloud Storage URL where the disk image is
3171	// stored. You must provide either this property or the sourceDisk
3172	// property but not both.
3173	Source string `json:"source,omitempty"`
3174
3175	// ForceSendFields is a list of field names (e.g. "ContainerType") to
3176	// unconditionally include in API requests. By default, fields with
3177	// empty values are omitted from API requests. However, any non-pointer,
3178	// non-interface field appearing in ForceSendFields will be sent to the
3179	// server regardless of whether the field is empty or not. This may be
3180	// used to include empty fields in Patch requests.
3181	ForceSendFields []string `json:"-"`
3182}
3183
3184func (s *ImageRawDisk) MarshalJSON() ([]byte, error) {
3185	type noMethod ImageRawDisk
3186	raw := noMethod(*s)
3187	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3188}
3189
3190// ImageList: Contains a list of images.
3191type ImageList struct {
3192	// Id: [Output Only] The unique identifier for the resource. This
3193	// identifier is defined by the server.
3194	Id string `json:"id,omitempty"`
3195
3196	// Items: [Output Only] A list of Image resources.
3197	Items []*Image `json:"items,omitempty"`
3198
3199	// Kind: Type of resource.
3200	Kind string `json:"kind,omitempty"`
3201
3202	// NextPageToken: [Output Only] This token allows you to get the next
3203	// page of results for list requests. If the number of results is larger
3204	// than maxResults, use the nextPageToken as a value for the query
3205	// parameter pageToken in the next list request. Subsequent list
3206	// requests will have their own nextPageToken to continue paging through
3207	// the results.
3208	NextPageToken string `json:"nextPageToken,omitempty"`
3209
3210	// SelfLink: [Output Only] Server-defined URL for this resource.
3211	SelfLink string `json:"selfLink,omitempty"`
3212
3213	// ServerResponse contains the HTTP response code and headers from the
3214	// server.
3215	googleapi.ServerResponse `json:"-"`
3216
3217	// ForceSendFields is a list of field names (e.g. "Id") to
3218	// unconditionally include in API requests. By default, fields with
3219	// empty values are omitted from API requests. However, any non-pointer,
3220	// non-interface field appearing in ForceSendFields will be sent to the
3221	// server regardless of whether the field is empty or not. This may be
3222	// used to include empty fields in Patch requests.
3223	ForceSendFields []string `json:"-"`
3224}
3225
3226func (s *ImageList) MarshalJSON() ([]byte, error) {
3227	type noMethod ImageList
3228	raw := noMethod(*s)
3229	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3230}
3231
3232// Instance: An Instance resource.
3233type Instance struct {
3234	// CanIpForward: Allows this instance to send and receive packets with
3235	// non-matching destination or source IPs. This is required if you plan
3236	// to use this instance to forward routes. For more information, see
3237	// Enabling IP Forwarding.
3238	CanIpForward bool `json:"canIpForward,omitempty"`
3239
3240	// CpuPlatform: [Output Only] The CPU platform used by this instance.
3241	CpuPlatform string `json:"cpuPlatform,omitempty"`
3242
3243	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
3244	// format.
3245	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3246
3247	// Description: An optional description of this resource. Provide this
3248	// property when you create the resource.
3249	Description string `json:"description,omitempty"`
3250
3251	// Disks: Array of disks associated with this instance. Persistent disks
3252	// must be created before you can assign them.
3253	Disks []*AttachedDisk `json:"disks,omitempty"`
3254
3255	// Id: [Output Only] The unique identifier for the resource. This
3256	// identifier is defined by the server.
3257	Id uint64 `json:"id,omitempty,string"`
3258
3259	// Kind: [Output Only] Type of the resource. Always compute#instance for
3260	// instances.
3261	Kind string `json:"kind,omitempty"`
3262
3263	// MachineType: Full or partial URL of the machine type resource to use
3264	// for this instance, in the format:
3265	// zones/zone/machineTypes/machine-type. This is provided by the client
3266	// when the instance is created. For example, the following is a valid
3267	// partial url to a predefined machine
3268	// type:
3269	//
3270	// zones/us-central1-f/machineTypes/n1-standard-1
3271	//
3272	// To create a custom machine type, provide a URL to a machine type in
3273	// the following format, where CPUS is 1 or an even number up to 32 (2,
3274	// 4, 6, ... 24, etc), and MEMORY is the total memory for this instance.
3275	// Memory must be a multiple of 256 MB and must be supplied in MB (e.g.
3276	// 5 GB of memory is 5120
3277	// MB):
3278	//
3279	// zones/zone/machineTypes/custom-CPUS-MEMORY
3280	//
3281	// For example: zones/us-central1-f/machineTypes/custom-4-5120
3282	//
3283	// For a full list of restrictions, read the Specifications for custom
3284	// machine types.
3285	MachineType string `json:"machineType,omitempty"`
3286
3287	// Metadata: The metadata key/value pairs assigned to this instance.
3288	// This includes custom metadata and predefined keys.
3289	Metadata *Metadata `json:"metadata,omitempty"`
3290
3291	// Name: The name of the resource, provided by the client when initially
3292	// creating the resource. The resource name must be 1-63 characters
3293	// long, and comply with RFC1035. Specifically, the name must be 1-63
3294	// characters long and match the regular expression
3295	// [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
3296	// lowercase letter, and all following characters must be a dash,
3297	// lowercase letter, or digit, except the last character, which cannot
3298	// be a dash.
3299	Name string `json:"name,omitempty"`
3300
3301	// NetworkInterfaces: An array of configurations for this interface.
3302	// This specifies how this interface is configured to interact with
3303	// other network services, such as connecting to the internet.
3304	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
3305
3306	// Scheduling: Scheduling options for this instance.
3307	Scheduling *Scheduling `json:"scheduling,omitempty"`
3308
3309	// SelfLink: [Output Only] Server-defined URL for this resource.
3310	SelfLink string `json:"selfLink,omitempty"`
3311
3312	// ServiceAccounts: A list of service accounts, with their specified
3313	// scopes, authorized for this instance. Service accounts generate
3314	// access tokens that can be accessed through the metadata server and
3315	// used to authenticate applications on the instance. See Authenticating
3316	// from Google Compute Engine for more information.
3317	ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"`
3318
3319	// Status: [Output Only] The status of the instance. One of the
3320	// following values: PROVISIONING, STAGING, RUNNING, STOPPING, and
3321	// TERMINATED.
3322	//
3323	// Possible values:
3324	//   "PROVISIONING"
3325	//   "RUNNING"
3326	//   "STAGING"
3327	//   "STOPPED"
3328	//   "STOPPING"
3329	//   "SUSPENDED"
3330	//   "SUSPENDING"
3331	//   "TERMINATED"
3332	Status string `json:"status,omitempty"`
3333
3334	// StatusMessage: [Output Only] An optional, human-readable explanation
3335	// of the status.
3336	StatusMessage string `json:"statusMessage,omitempty"`
3337
3338	// Tags: A list of tags to apply to this instance. Tags are used to
3339	// identify valid sources or targets for network firewalls and are
3340	// specified by the client during instance creation. The tags can be
3341	// later modified by the setTags method. Each tag within the list must
3342	// comply with RFC1035.
3343	Tags *Tags `json:"tags,omitempty"`
3344
3345	// Zone: [Output Only] URL of the zone where the instance resides.
3346	Zone string `json:"zone,omitempty"`
3347
3348	// ServerResponse contains the HTTP response code and headers from the
3349	// server.
3350	googleapi.ServerResponse `json:"-"`
3351
3352	// ForceSendFields is a list of field names (e.g. "CanIpForward") to
3353	// unconditionally include in API requests. By default, fields with
3354	// empty values are omitted from API requests. However, any non-pointer,
3355	// non-interface field appearing in ForceSendFields will be sent to the
3356	// server regardless of whether the field is empty or not. This may be
3357	// used to include empty fields in Patch requests.
3358	ForceSendFields []string `json:"-"`
3359}
3360
3361func (s *Instance) MarshalJSON() ([]byte, error) {
3362	type noMethod Instance
3363	raw := noMethod(*s)
3364	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3365}
3366
3367type InstanceAggregatedList struct {
3368	// Id: [Output Only] The unique identifier for the resource. This
3369	// identifier is defined by the server.
3370	Id string `json:"id,omitempty"`
3371
3372	// Items: [Output Only] A map of scoped instance lists.
3373	Items map[string]InstancesScopedList `json:"items,omitempty"`
3374
3375	// Kind: [Output Only] Type of resource. Always
3376	// compute#instanceAggregatedList for aggregated lists of Instance
3377	// resources.
3378	Kind string `json:"kind,omitempty"`
3379
3380	// NextPageToken: [Output Only] This token allows you to get the next
3381	// page of results for list requests. If the number of results is larger
3382	// than maxResults, use the nextPageToken as a value for the query
3383	// parameter pageToken in the next list request. Subsequent list
3384	// requests will have their own nextPageToken to continue paging through
3385	// the results.
3386	NextPageToken string `json:"nextPageToken,omitempty"`
3387
3388	// SelfLink: [Output Only] Server-defined URL for this resource.
3389	SelfLink string `json:"selfLink,omitempty"`
3390
3391	// ServerResponse contains the HTTP response code and headers from the
3392	// server.
3393	googleapi.ServerResponse `json:"-"`
3394
3395	// ForceSendFields is a list of field names (e.g. "Id") to
3396	// unconditionally include in API requests. By default, fields with
3397	// empty values are omitted from API requests. However, any non-pointer,
3398	// non-interface field appearing in ForceSendFields will be sent to the
3399	// server regardless of whether the field is empty or not. This may be
3400	// used to include empty fields in Patch requests.
3401	ForceSendFields []string `json:"-"`
3402}
3403
3404func (s *InstanceAggregatedList) MarshalJSON() ([]byte, error) {
3405	type noMethod InstanceAggregatedList
3406	raw := noMethod(*s)
3407	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3408}
3409
3410type InstanceGroup struct {
3411	// CreationTimestamp: [Output Only] The creation timestamp for this
3412	// instance group in RFC3339 text format.
3413	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3414
3415	// Description: An optional description of this resource. Provide this
3416	// property when you create the resource.
3417	Description string `json:"description,omitempty"`
3418
3419	// Fingerprint: [Output Only] The fingerprint of the named ports. The
3420	// system uses this fingerprint to detect conflicts when multiple users
3421	// change the named ports concurrently.
3422	Fingerprint string `json:"fingerprint,omitempty"`
3423
3424	// Id: [Output Only] A unique identifier for this resource type. The
3425	// server generates this identifier.
3426	Id uint64 `json:"id,omitempty,string"`
3427
3428	// Kind: [Output Only] The resource type, which is always
3429	// compute#instanceGroup for instance groups.
3430	Kind string `json:"kind,omitempty"`
3431
3432	// Name: The name of the instance group. The name must be 1-63
3433	// characters long, and comply with RFC1035.
3434	Name string `json:"name,omitempty"`
3435
3436	// NamedPorts: Assigns a name to a port number. For example: {name:
3437	// "http", port: 80}
3438	//
3439	// This allows the system to reference ports by the assigned name
3440	// instead of a port number. Named ports can also contain multiple
3441	// ports. For example: [{name: "http", port: 80},{name: "http", port:
3442	// 8080}]
3443	//
3444	// Named ports apply to all instances in this instance group.
3445	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
3446
3447	// Network: The URL of the network to which all instances in the
3448	// instance group belong.
3449	Network string `json:"network,omitempty"`
3450
3451	// SelfLink: [Output Only] The URL for this instance group. The server
3452	// generates this URL.
3453	SelfLink string `json:"selfLink,omitempty"`
3454
3455	// Size: [Output Only] The total number of instances in the instance
3456	// group.
3457	Size int64 `json:"size,omitempty"`
3458
3459	// Subnetwork: The URL of the subnetwork to which all instances in the
3460	// instance group belong.
3461	Subnetwork string `json:"subnetwork,omitempty"`
3462
3463	// Zone: [Output Only] The URL of the zone where the instance group is
3464	// located.
3465	Zone string `json:"zone,omitempty"`
3466
3467	// ServerResponse contains the HTTP response code and headers from the
3468	// server.
3469	googleapi.ServerResponse `json:"-"`
3470
3471	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
3472	// to unconditionally include in API requests. By default, fields with
3473	// empty values are omitted from API requests. However, any non-pointer,
3474	// non-interface field appearing in ForceSendFields will be sent to the
3475	// server regardless of whether the field is empty or not. This may be
3476	// used to include empty fields in Patch requests.
3477	ForceSendFields []string `json:"-"`
3478}
3479
3480func (s *InstanceGroup) MarshalJSON() ([]byte, error) {
3481	type noMethod InstanceGroup
3482	raw := noMethod(*s)
3483	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3484}
3485
3486type InstanceGroupAggregatedList struct {
3487	// Id: [Output Only] A unique identifier for this aggregated list of
3488	// instance groups. The server generates this identifier.
3489	Id string `json:"id,omitempty"`
3490
3491	// Items: A map of scoped instance group lists.
3492	Items map[string]InstanceGroupsScopedList `json:"items,omitempty"`
3493
3494	// Kind: [Output Only] The resource type, which is always
3495	// compute#instanceGroupAggregatedList for aggregated lists of instance
3496	// groups.
3497	Kind string `json:"kind,omitempty"`
3498
3499	// NextPageToken: [Output Only] This token allows you to get the next
3500	// page of results for list requests. If the number of results is larger
3501	// than maxResults, use the nextPageToken as a value for the query
3502	// parameter pageToken in the next list request. Subsequent list
3503	// requests will have their own nextPageToken to continue paging through
3504	// the results.
3505	NextPageToken string `json:"nextPageToken,omitempty"`
3506
3507	// SelfLink: [Output Only] The URL for this resource type. The server
3508	// generates this URL.
3509	SelfLink string `json:"selfLink,omitempty"`
3510
3511	// ServerResponse contains the HTTP response code and headers from the
3512	// server.
3513	googleapi.ServerResponse `json:"-"`
3514
3515	// ForceSendFields is a list of field names (e.g. "Id") to
3516	// unconditionally include in API requests. By default, fields with
3517	// empty values are omitted from API requests. However, any non-pointer,
3518	// non-interface field appearing in ForceSendFields will be sent to the
3519	// server regardless of whether the field is empty or not. This may be
3520	// used to include empty fields in Patch requests.
3521	ForceSendFields []string `json:"-"`
3522}
3523
3524func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) {
3525	type noMethod InstanceGroupAggregatedList
3526	raw := noMethod(*s)
3527	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3528}
3529
3530// InstanceGroupList: A list of InstanceGroup resources.
3531type InstanceGroupList struct {
3532	// Id: [Output Only] A unique identifier for this list of instance
3533	// groups. The server generates this identifier.
3534	Id string `json:"id,omitempty"`
3535
3536	// Items: A list of instance groups.
3537	Items []*InstanceGroup `json:"items,omitempty"`
3538
3539	// Kind: [Output Only] The resource type, which is always
3540	// compute#instanceGroupList for instance group lists.
3541	Kind string `json:"kind,omitempty"`
3542
3543	// NextPageToken: [Output Only] This token allows you to get the next
3544	// page of results for list requests. If the number of results is larger
3545	// than maxResults, use the nextPageToken as a value for the query
3546	// parameter pageToken in the next list request. Subsequent list
3547	// requests will have their own nextPageToken to continue paging through
3548	// the results.
3549	NextPageToken string `json:"nextPageToken,omitempty"`
3550
3551	// SelfLink: [Output Only] The URL for this resource type. The server
3552	// generates this URL.
3553	SelfLink string `json:"selfLink,omitempty"`
3554
3555	// ServerResponse contains the HTTP response code and headers from the
3556	// server.
3557	googleapi.ServerResponse `json:"-"`
3558
3559	// ForceSendFields is a list of field names (e.g. "Id") to
3560	// unconditionally include in API requests. By default, fields with
3561	// empty values are omitted from API requests. However, any non-pointer,
3562	// non-interface field appearing in ForceSendFields will be sent to the
3563	// server regardless of whether the field is empty or not. This may be
3564	// used to include empty fields in Patch requests.
3565	ForceSendFields []string `json:"-"`
3566}
3567
3568func (s *InstanceGroupList) MarshalJSON() ([]byte, error) {
3569	type noMethod InstanceGroupList
3570	raw := noMethod(*s)
3571	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3572}
3573
3574type InstanceGroupManager struct {
3575	// BaseInstanceName: The base instance name to use for instances in this
3576	// group. The value must be 1-58 characters long. Instances are named by
3577	// appending a hyphen and a random four-character string to the base
3578	// instance name. The base instance name must comply with RFC1035.
3579	BaseInstanceName string `json:"baseInstanceName,omitempty"`
3580
3581	// CreationTimestamp: [Output Only] The creation timestamp for this
3582	// managed instance group in RFC3339 text format.
3583	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3584
3585	// CurrentActions: [Output Only] The list of instance actions and the
3586	// number of instances in this managed instance group that are scheduled
3587	// for each of those actions.
3588	CurrentActions *InstanceGroupManagerActionsSummary `json:"currentActions,omitempty"`
3589
3590	// Description: An optional description of this resource. Provide this
3591	// property when you create the resource.
3592	Description string `json:"description,omitempty"`
3593
3594	// Fingerprint: [Output Only] The fingerprint of the target pools
3595	// information. You can use this optional field for optimistic locking
3596	// when you update the target pool entries.
3597	Fingerprint string `json:"fingerprint,omitempty"`
3598
3599	// Id: [Output Only] A unique identifier for this resource type. The
3600	// server generates this identifier.
3601	Id uint64 `json:"id,omitempty,string"`
3602
3603	// InstanceGroup: [Output Only] The URL of the Instance Group resource.
3604	InstanceGroup string `json:"instanceGroup,omitempty"`
3605
3606	// InstanceTemplate: The URL of the instance template that is specified
3607	// for this managed instance group. The group uses this template to
3608	// create all new instances in the managed instance group.
3609	InstanceTemplate string `json:"instanceTemplate,omitempty"`
3610
3611	// Kind: [Output Only] The resource type, which is always
3612	// compute#instanceGroupManager for managed instance groups.
3613	Kind string `json:"kind,omitempty"`
3614
3615	// Name: The name of the managed instance group. The name must be 1-63
3616	// characters long, and comply with RFC1035.
3617	Name string `json:"name,omitempty"`
3618
3619	// NamedPorts: Named ports configured for the Instance Groups
3620	// complementary to this Instance Group Manager.
3621	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
3622
3623	// SelfLink: [Output Only] The URL for this managed instance group. The
3624	// server defines this URL.
3625	SelfLink string `json:"selfLink,omitempty"`
3626
3627	// TargetPools: The URLs for all TargetPool resources to which instances
3628	// in the instanceGroup field are added. The target pools automatically
3629	// apply to all of the instances in the managed instance group.
3630	TargetPools []string `json:"targetPools,omitempty"`
3631
3632	// TargetSize: The target number of running instances for this managed
3633	// instance group. Deleting or abandoning instances reduces this number.
3634	// Resizing the group changes this number.
3635	TargetSize int64 `json:"targetSize,omitempty"`
3636
3637	// Zone: The name of the zone where the managed instance group is
3638	// located.
3639	Zone string `json:"zone,omitempty"`
3640
3641	// ServerResponse contains the HTTP response code and headers from the
3642	// server.
3643	googleapi.ServerResponse `json:"-"`
3644
3645	// ForceSendFields is a list of field names (e.g. "BaseInstanceName") to
3646	// unconditionally include in API requests. By default, fields with
3647	// empty values are omitted from API requests. However, any non-pointer,
3648	// non-interface field appearing in ForceSendFields will be sent to the
3649	// server regardless of whether the field is empty or not. This may be
3650	// used to include empty fields in Patch requests.
3651	ForceSendFields []string `json:"-"`
3652}
3653
3654func (s *InstanceGroupManager) MarshalJSON() ([]byte, error) {
3655	type noMethod InstanceGroupManager
3656	raw := noMethod(*s)
3657	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3658}
3659
3660type InstanceGroupManagerActionsSummary struct {
3661	// Abandoning: [Output Only] The total number of instances in the
3662	// managed instance group that are scheduled to be abandoned. Abandoning
3663	// an instance removes it from the managed instance group without
3664	// deleting it.
3665	Abandoning int64 `json:"abandoning,omitempty"`
3666
3667	// Creating: [Output Only] The number of instances in the managed
3668	// instance group that are scheduled to be created or are currently
3669	// being created. If the group fails to create one of these instances,
3670	// it tries again until it creates the instance successfully.
3671	Creating int64 `json:"creating,omitempty"`
3672
3673	// Deleting: [Output Only] The number of instances in the managed
3674	// instance group that are scheduled to be deleted or are currently
3675	// being deleted.
3676	Deleting int64 `json:"deleting,omitempty"`
3677
3678	// None: [Output Only] The number of instances in the managed instance
3679	// group that are running and have no scheduled actions.
3680	None int64 `json:"none,omitempty"`
3681
3682	// Recreating: [Output Only] The number of instances in the managed
3683	// instance group that are scheduled to be recreated or are currently
3684	// being being recreated. Recreating an instance deletes the existing
3685	// root persistent disk and creates a new disk from the image that is
3686	// defined in the instance template.
3687	Recreating int64 `json:"recreating,omitempty"`
3688
3689	// Refreshing: [Output Only] The number of instances in the managed
3690	// instance group that are being reconfigured with properties that do
3691	// not require a restart or a recreate action. For example, setting or
3692	// removing target pools for the instance.
3693	Refreshing int64 `json:"refreshing,omitempty"`
3694
3695	// Restarting: [Output Only] The number of instances in the managed
3696	// instance group that are scheduled to be restarted or are currently
3697	// being restarted.
3698	Restarting int64 `json:"restarting,omitempty"`
3699
3700	// ForceSendFields is a list of field names (e.g. "Abandoning") to
3701	// unconditionally include in API requests. By default, fields with
3702	// empty values are omitted from API requests. However, any non-pointer,
3703	// non-interface field appearing in ForceSendFields will be sent to the
3704	// server regardless of whether the field is empty or not. This may be
3705	// used to include empty fields in Patch requests.
3706	ForceSendFields []string `json:"-"`
3707}
3708
3709func (s *InstanceGroupManagerActionsSummary) MarshalJSON() ([]byte, error) {
3710	type noMethod InstanceGroupManagerActionsSummary
3711	raw := noMethod(*s)
3712	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3713}
3714
3715type InstanceGroupManagerAggregatedList struct {
3716	// Id: [Output Only] A unique identifier for this aggregated list of
3717	// managed instance groups. The server generates this identifier.
3718	Id string `json:"id,omitempty"`
3719
3720	// Items: [Output Only] A map of filtered managed instance group lists.
3721	Items map[string]InstanceGroupManagersScopedList `json:"items,omitempty"`
3722
3723	// Kind: [Output Only] The resource type, which is always
3724	// compute#instanceGroupManagerAggregatedList for an aggregated list of
3725	// managed instance groups.
3726	Kind string `json:"kind,omitempty"`
3727
3728	// NextPageToken: [Output Only] This token allows you to get the next
3729	// page of results for list requests. If the number of results is larger
3730	// than maxResults, use the nextPageToken as a value for the query
3731	// parameter pageToken in the next list request. Subsequent list
3732	// requests will have their own nextPageToken to continue paging through
3733	// the results.
3734	NextPageToken string `json:"nextPageToken,omitempty"`
3735
3736	// SelfLink: [Output Only] The URL for this resource type. The server
3737	// generates this URL.
3738	SelfLink string `json:"selfLink,omitempty"`
3739
3740	// ServerResponse contains the HTTP response code and headers from the
3741	// server.
3742	googleapi.ServerResponse `json:"-"`
3743
3744	// ForceSendFields is a list of field names (e.g. "Id") to
3745	// unconditionally include in API requests. By default, fields with
3746	// empty values are omitted from API requests. However, any non-pointer,
3747	// non-interface field appearing in ForceSendFields will be sent to the
3748	// server regardless of whether the field is empty or not. This may be
3749	// used to include empty fields in Patch requests.
3750	ForceSendFields []string `json:"-"`
3751}
3752
3753func (s *InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) {
3754	type noMethod InstanceGroupManagerAggregatedList
3755	raw := noMethod(*s)
3756	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3757}
3758
3759// InstanceGroupManagerList: [Output Only] A list of managed instance
3760// groups.
3761type InstanceGroupManagerList struct {
3762	// Id: [Output Only] A unique identifier for this resource type. The
3763	// server generates this identifier.
3764	Id string `json:"id,omitempty"`
3765
3766	// Items: [Output Only] A list of managed instance groups.
3767	Items []*InstanceGroupManager `json:"items,omitempty"`
3768
3769	// Kind: [Output Only] The resource type, which is always
3770	// compute#instanceGroupManagerList for a list of managed instance
3771	// groups.
3772	Kind string `json:"kind,omitempty"`
3773
3774	// NextPageToken: [Output Only] This token allows you to get the next
3775	// page of results for list requests. If the number of results is larger
3776	// than maxResults, use the nextPageToken as a value for the query
3777	// parameter pageToken in the next list request. Subsequent list
3778	// requests will have their own nextPageToken to continue paging through
3779	// the results.
3780	NextPageToken string `json:"nextPageToken,omitempty"`
3781
3782	// SelfLink: [Output Only] The URL for this resource type. The server
3783	// generates this URL.
3784	SelfLink string `json:"selfLink,omitempty"`
3785
3786	// ServerResponse contains the HTTP response code and headers from the
3787	// server.
3788	googleapi.ServerResponse `json:"-"`
3789
3790	// ForceSendFields is a list of field names (e.g. "Id") to
3791	// unconditionally include in API requests. By default, fields with
3792	// empty values are omitted from API requests. However, any non-pointer,
3793	// non-interface field appearing in ForceSendFields will be sent to the
3794	// server regardless of whether the field is empty or not. This may be
3795	// used to include empty fields in Patch requests.
3796	ForceSendFields []string `json:"-"`
3797}
3798
3799func (s *InstanceGroupManagerList) MarshalJSON() ([]byte, error) {
3800	type noMethod InstanceGroupManagerList
3801	raw := noMethod(*s)
3802	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3803}
3804
3805type InstanceGroupManagersAbandonInstancesRequest struct {
3806	// Instances: The URL for one or more instances to abandon from the
3807	// managed instance group.
3808	Instances []string `json:"instances,omitempty"`
3809
3810	// ForceSendFields is a list of field names (e.g. "Instances") to
3811	// unconditionally include in API requests. By default, fields with
3812	// empty values are omitted from API requests. However, any non-pointer,
3813	// non-interface field appearing in ForceSendFields will be sent to the
3814	// server regardless of whether the field is empty or not. This may be
3815	// used to include empty fields in Patch requests.
3816	ForceSendFields []string `json:"-"`
3817}
3818
3819func (s *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) {
3820	type noMethod InstanceGroupManagersAbandonInstancesRequest
3821	raw := noMethod(*s)
3822	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3823}
3824
3825type InstanceGroupManagersDeleteInstancesRequest struct {
3826	// Instances: The list of instances to delete from this managed instance
3827	// group. Specify one or more instance URLs.
3828	Instances []string `json:"instances,omitempty"`
3829
3830	// ForceSendFields is a list of field names (e.g. "Instances") to
3831	// unconditionally include in API requests. By default, fields with
3832	// empty values are omitted from API requests. However, any non-pointer,
3833	// non-interface field appearing in ForceSendFields will be sent to the
3834	// server regardless of whether the field is empty or not. This may be
3835	// used to include empty fields in Patch requests.
3836	ForceSendFields []string `json:"-"`
3837}
3838
3839func (s *InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) {
3840	type noMethod InstanceGroupManagersDeleteInstancesRequest
3841	raw := noMethod(*s)
3842	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3843}
3844
3845type InstanceGroupManagersListManagedInstancesResponse struct {
3846	// ManagedInstances: [Output Only] The list of instances in the managed
3847	// instance group.
3848	ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"`
3849
3850	// ServerResponse contains the HTTP response code and headers from the
3851	// server.
3852	googleapi.ServerResponse `json:"-"`
3853
3854	// ForceSendFields is a list of field names (e.g. "ManagedInstances") to
3855	// unconditionally include in API requests. By default, fields with
3856	// empty values are omitted from API requests. However, any non-pointer,
3857	// non-interface field appearing in ForceSendFields will be sent to the
3858	// server regardless of whether the field is empty or not. This may be
3859	// used to include empty fields in Patch requests.
3860	ForceSendFields []string `json:"-"`
3861}
3862
3863func (s *InstanceGroupManagersListManagedInstancesResponse) MarshalJSON() ([]byte, error) {
3864	type noMethod InstanceGroupManagersListManagedInstancesResponse
3865	raw := noMethod(*s)
3866	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3867}
3868
3869type InstanceGroupManagersRecreateInstancesRequest struct {
3870	// Instances: The URL for one or more instances to recreate.
3871	Instances []string `json:"instances,omitempty"`
3872
3873	// ForceSendFields is a list of field names (e.g. "Instances") to
3874	// unconditionally include in API requests. By default, fields with
3875	// empty values are omitted from API requests. However, any non-pointer,
3876	// non-interface field appearing in ForceSendFields will be sent to the
3877	// server regardless of whether the field is empty or not. This may be
3878	// used to include empty fields in Patch requests.
3879	ForceSendFields []string `json:"-"`
3880}
3881
3882func (s *InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, error) {
3883	type noMethod InstanceGroupManagersRecreateInstancesRequest
3884	raw := noMethod(*s)
3885	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3886}
3887
3888type InstanceGroupManagersScopedList struct {
3889	// InstanceGroupManagers: [Output Only] The list of managed instance
3890	// groups that are contained in the specified project and zone.
3891	InstanceGroupManagers []*InstanceGroupManager `json:"instanceGroupManagers,omitempty"`
3892
3893	// Warning: [Output Only] The warning that replaces the list of managed
3894	// instance groups when the list is empty.
3895	Warning *InstanceGroupManagersScopedListWarning `json:"warning,omitempty"`
3896
3897	// ForceSendFields is a list of field names (e.g.
3898	// "InstanceGroupManagers") to unconditionally include in API requests.
3899	// By default, fields with empty values are omitted from API requests.
3900	// However, any non-pointer, non-interface field appearing in
3901	// ForceSendFields will be sent to the server regardless of whether the
3902	// field is empty or not. This may be used to include empty fields in
3903	// Patch requests.
3904	ForceSendFields []string `json:"-"`
3905}
3906
3907func (s *InstanceGroupManagersScopedList) MarshalJSON() ([]byte, error) {
3908	type noMethod InstanceGroupManagersScopedList
3909	raw := noMethod(*s)
3910	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3911}
3912
3913// InstanceGroupManagersScopedListWarning: [Output Only] The warning
3914// that replaces the list of managed instance groups when the list is
3915// empty.
3916type InstanceGroupManagersScopedListWarning struct {
3917	// Code: [Output Only] A warning code, if applicable. For example,
3918	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
3919	// the response.
3920	//
3921	// Possible values:
3922	//   "CLEANUP_FAILED"
3923	//   "DEPRECATED_RESOURCE_USED"
3924	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
3925	//   "INJECTED_KERNELS_DEPRECATED"
3926	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
3927	//   "NEXT_HOP_CANNOT_IP_FORWARD"
3928	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
3929	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
3930	//   "NEXT_HOP_NOT_RUNNING"
3931	//   "NOT_CRITICAL_ERROR"
3932	//   "NO_RESULTS_ON_PAGE"
3933	//   "REQUIRED_TOS_AGREEMENT"
3934	//   "RESOURCE_NOT_DELETED"
3935	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
3936	//   "UNREACHABLE"
3937	Code string `json:"code,omitempty"`
3938
3939	// Data: [Output Only] Metadata about this warning in key: value format.
3940	// For example:
3941	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3942	Data []*InstanceGroupManagersScopedListWarningData `json:"data,omitempty"`
3943
3944	// Message: [Output Only] A human-readable description of the warning
3945	// code.
3946	Message string `json:"message,omitempty"`
3947
3948	// ForceSendFields is a list of field names (e.g. "Code") to
3949	// unconditionally include in API requests. By default, fields with
3950	// empty values are omitted from API requests. However, any non-pointer,
3951	// non-interface field appearing in ForceSendFields will be sent to the
3952	// server regardless of whether the field is empty or not. This may be
3953	// used to include empty fields in Patch requests.
3954	ForceSendFields []string `json:"-"`
3955}
3956
3957func (s *InstanceGroupManagersScopedListWarning) MarshalJSON() ([]byte, error) {
3958	type noMethod InstanceGroupManagersScopedListWarning
3959	raw := noMethod(*s)
3960	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3961}
3962
3963type InstanceGroupManagersScopedListWarningData struct {
3964	// Key: [Output Only] A key that provides more detail on the warning
3965	// being returned. For example, for warnings where there are no results
3966	// in a list request for a particular zone, this key might be scope and
3967	// the key value might be the zone name. Other examples might be a key
3968	// indicating a deprecated resource and a suggested replacement, or a
3969	// warning about invalid network settings (for example, if an instance
3970	// attempts to perform IP forwarding but is not enabled for IP
3971	// forwarding).
3972	Key string `json:"key,omitempty"`
3973
3974	// Value: [Output Only] A warning data value corresponding to the key.
3975	Value string `json:"value,omitempty"`
3976
3977	// ForceSendFields is a list of field names (e.g. "Key") to
3978	// unconditionally include in API requests. By default, fields with
3979	// empty values are omitted from API requests. However, any non-pointer,
3980	// non-interface field appearing in ForceSendFields will be sent to the
3981	// server regardless of whether the field is empty or not. This may be
3982	// used to include empty fields in Patch requests.
3983	ForceSendFields []string `json:"-"`
3984}
3985
3986func (s *InstanceGroupManagersScopedListWarningData) MarshalJSON() ([]byte, error) {
3987	type noMethod InstanceGroupManagersScopedListWarningData
3988	raw := noMethod(*s)
3989	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3990}
3991
3992type InstanceGroupManagersSetInstanceTemplateRequest struct {
3993	// InstanceTemplate: The URL of the instance template that is specified
3994	// for this managed instance group. The group uses this template to
3995	// create all new instances in the managed instance group.
3996	InstanceTemplate string `json:"instanceTemplate,omitempty"`
3997
3998	// ForceSendFields is a list of field names (e.g. "InstanceTemplate") to
3999	// unconditionally include in API requests. By default, fields with
4000	// empty values are omitted from API requests. However, any non-pointer,
4001	// non-interface field appearing in ForceSendFields will be sent to the
4002	// server regardless of whether the field is empty or not. This may be
4003	// used to include empty fields in Patch requests.
4004	ForceSendFields []string `json:"-"`
4005}
4006
4007func (s *InstanceGroupManagersSetInstanceTemplateRequest) MarshalJSON() ([]byte, error) {
4008	type noMethod InstanceGroupManagersSetInstanceTemplateRequest
4009	raw := noMethod(*s)
4010	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4011}
4012
4013type InstanceGroupManagersSetTargetPoolsRequest struct {
4014	// Fingerprint: The fingerprint of the target pools information. Use
4015	// this optional property to prevent conflicts when multiple users
4016	// change the target pools settings concurrently. Obtain the fingerprint
4017	// with the instanceGroupManagers.get method. Then, include the
4018	// fingerprint in your request to ensure that you do not overwrite
4019	// changes that were applied from another concurrent request.
4020	Fingerprint string `json:"fingerprint,omitempty"`
4021
4022	// TargetPools: The list of target pool URLs that instances in this
4023	// managed instance group belong to. The managed instance group applies
4024	// these target pools to all of the instances in the group. Existing
4025	// instances and new instances in the group all receive these target
4026	// pool settings.
4027	TargetPools []string `json:"targetPools,omitempty"`
4028
4029	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
4030	// unconditionally include in API requests. By default, fields with
4031	// empty values are omitted from API requests. However, any non-pointer,
4032	// non-interface field appearing in ForceSendFields will be sent to the
4033	// server regardless of whether the field is empty or not. This may be
4034	// used to include empty fields in Patch requests.
4035	ForceSendFields []string `json:"-"`
4036}
4037
4038func (s *InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) {
4039	type noMethod InstanceGroupManagersSetTargetPoolsRequest
4040	raw := noMethod(*s)
4041	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4042}
4043
4044type InstanceGroupsAddInstancesRequest struct {
4045	// Instances: The list of instances to add to the instance group.
4046	Instances []*InstanceReference `json:"instances,omitempty"`
4047
4048	// ForceSendFields is a list of field names (e.g. "Instances") to
4049	// unconditionally include in API requests. By default, fields with
4050	// empty values are omitted from API requests. However, any non-pointer,
4051	// non-interface field appearing in ForceSendFields will be sent to the
4052	// server regardless of whether the field is empty or not. This may be
4053	// used to include empty fields in Patch requests.
4054	ForceSendFields []string `json:"-"`
4055}
4056
4057func (s *InstanceGroupsAddInstancesRequest) MarshalJSON() ([]byte, error) {
4058	type noMethod InstanceGroupsAddInstancesRequest
4059	raw := noMethod(*s)
4060	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4061}
4062
4063type InstanceGroupsListInstances struct {
4064	// Id: [Output Only] A unique identifier for this list of instance
4065	// groups. The server generates this identifier.
4066	Id string `json:"id,omitempty"`
4067
4068	// Items: [Output Only] A list of instances and any named ports that are
4069	// assigned to those instances.
4070	Items []*InstanceWithNamedPorts `json:"items,omitempty"`
4071
4072	// Kind: [Output Only] The resource type, which is always
4073	// compute#instanceGroupsListInstances for lists of instance groups.
4074	Kind string `json:"kind,omitempty"`
4075
4076	// NextPageToken: [Output Only] This token allows you to get the next
4077	// page of results for list requests. If the number of results is larger
4078	// than maxResults, use the nextPageToken as a value for the query
4079	// parameter pageToken in the next list request. Subsequent list
4080	// requests will have their own nextPageToken to continue paging through
4081	// the results.
4082	NextPageToken string `json:"nextPageToken,omitempty"`
4083
4084	// SelfLink: [Output Only] The URL for this list of instance groups. The
4085	// server generates this URL.
4086	SelfLink string `json:"selfLink,omitempty"`
4087
4088	// ServerResponse contains the HTTP response code and headers from the
4089	// server.
4090	googleapi.ServerResponse `json:"-"`
4091
4092	// ForceSendFields is a list of field names (e.g. "Id") to
4093	// unconditionally include in API requests. By default, fields with
4094	// empty values are omitted from API requests. However, any non-pointer,
4095	// non-interface field appearing in ForceSendFields will be sent to the
4096	// server regardless of whether the field is empty or not. This may be
4097	// used to include empty fields in Patch requests.
4098	ForceSendFields []string `json:"-"`
4099}
4100
4101func (s *InstanceGroupsListInstances) MarshalJSON() ([]byte, error) {
4102	type noMethod InstanceGroupsListInstances
4103	raw := noMethod(*s)
4104	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4105}
4106
4107type InstanceGroupsListInstancesRequest struct {
4108	// InstanceState: A filter for the state of the instances in the
4109	// instance group. Valid options are ALL or RUNNING. If you do not
4110	// specify this parameter the list includes all instances regardless of
4111	// their state.
4112	//
4113	// Possible values:
4114	//   "ALL"
4115	//   "RUNNING"
4116	InstanceState string `json:"instanceState,omitempty"`
4117
4118	// ForceSendFields is a list of field names (e.g. "InstanceState") to
4119	// unconditionally include in API requests. By default, fields with
4120	// empty values are omitted from API requests. However, any non-pointer,
4121	// non-interface field appearing in ForceSendFields will be sent to the
4122	// server regardless of whether the field is empty or not. This may be
4123	// used to include empty fields in Patch requests.
4124	ForceSendFields []string `json:"-"`
4125}
4126
4127func (s *InstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) {
4128	type noMethod InstanceGroupsListInstancesRequest
4129	raw := noMethod(*s)
4130	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4131}
4132
4133type InstanceGroupsRemoveInstancesRequest struct {
4134	// Instances: The list of instances to remove from the instance group.
4135	Instances []*InstanceReference `json:"instances,omitempty"`
4136
4137	// ForceSendFields is a list of field names (e.g. "Instances") to
4138	// unconditionally include in API requests. By default, fields with
4139	// empty values are omitted from API requests. However, any non-pointer,
4140	// non-interface field appearing in ForceSendFields will be sent to the
4141	// server regardless of whether the field is empty or not. This may be
4142	// used to include empty fields in Patch requests.
4143	ForceSendFields []string `json:"-"`
4144}
4145
4146func (s *InstanceGroupsRemoveInstancesRequest) MarshalJSON() ([]byte, error) {
4147	type noMethod InstanceGroupsRemoveInstancesRequest
4148	raw := noMethod(*s)
4149	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4150}
4151
4152type InstanceGroupsScopedList struct {
4153	// InstanceGroups: [Output Only] The list of instance groups that are
4154	// contained in this scope.
4155	InstanceGroups []*InstanceGroup `json:"instanceGroups,omitempty"`
4156
4157	// Warning: [Output Only] An informational warning that replaces the
4158	// list of instance groups when the list is empty.
4159	Warning *InstanceGroupsScopedListWarning `json:"warning,omitempty"`
4160
4161	// ForceSendFields is a list of field names (e.g. "InstanceGroups") to
4162	// unconditionally include in API requests. By default, fields with
4163	// empty values are omitted from API requests. However, any non-pointer,
4164	// non-interface field appearing in ForceSendFields will be sent to the
4165	// server regardless of whether the field is empty or not. This may be
4166	// used to include empty fields in Patch requests.
4167	ForceSendFields []string `json:"-"`
4168}
4169
4170func (s *InstanceGroupsScopedList) MarshalJSON() ([]byte, error) {
4171	type noMethod InstanceGroupsScopedList
4172	raw := noMethod(*s)
4173	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4174}
4175
4176// InstanceGroupsScopedListWarning: [Output Only] An informational
4177// warning that replaces the list of instance groups when the list is
4178// empty.
4179type InstanceGroupsScopedListWarning struct {
4180	// Code: [Output Only] A warning code, if applicable. For example,
4181	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
4182	// the response.
4183	//
4184	// Possible values:
4185	//   "CLEANUP_FAILED"
4186	//   "DEPRECATED_RESOURCE_USED"
4187	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
4188	//   "INJECTED_KERNELS_DEPRECATED"
4189	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
4190	//   "NEXT_HOP_CANNOT_IP_FORWARD"
4191	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
4192	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
4193	//   "NEXT_HOP_NOT_RUNNING"
4194	//   "NOT_CRITICAL_ERROR"
4195	//   "NO_RESULTS_ON_PAGE"
4196	//   "REQUIRED_TOS_AGREEMENT"
4197	//   "RESOURCE_NOT_DELETED"
4198	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
4199	//   "UNREACHABLE"
4200	Code string `json:"code,omitempty"`
4201
4202	// Data: [Output Only] Metadata about this warning in key: value format.
4203	// For example:
4204	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4205	Data []*InstanceGroupsScopedListWarningData `json:"data,omitempty"`
4206
4207	// Message: [Output Only] A human-readable description of the warning
4208	// code.
4209	Message string `json:"message,omitempty"`
4210
4211	// ForceSendFields is a list of field names (e.g. "Code") to
4212	// unconditionally include in API requests. By default, fields with
4213	// empty values are omitted from API requests. However, any non-pointer,
4214	// non-interface field appearing in ForceSendFields will be sent to the
4215	// server regardless of whether the field is empty or not. This may be
4216	// used to include empty fields in Patch requests.
4217	ForceSendFields []string `json:"-"`
4218}
4219
4220func (s *InstanceGroupsScopedListWarning) MarshalJSON() ([]byte, error) {
4221	type noMethod InstanceGroupsScopedListWarning
4222	raw := noMethod(*s)
4223	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4224}
4225
4226type InstanceGroupsScopedListWarningData struct {
4227	// Key: [Output Only] A key that provides more detail on the warning
4228	// being returned. For example, for warnings where there are no results
4229	// in a list request for a particular zone, this key might be scope and
4230	// the key value might be the zone name. Other examples might be a key
4231	// indicating a deprecated resource and a suggested replacement, or a
4232	// warning about invalid network settings (for example, if an instance
4233	// attempts to perform IP forwarding but is not enabled for IP
4234	// forwarding).
4235	Key string `json:"key,omitempty"`
4236
4237	// Value: [Output Only] A warning data value corresponding to the key.
4238	Value string `json:"value,omitempty"`
4239
4240	// ForceSendFields is a list of field names (e.g. "Key") to
4241	// unconditionally include in API requests. By default, fields with
4242	// empty values are omitted from API requests. However, any non-pointer,
4243	// non-interface field appearing in ForceSendFields will be sent to the
4244	// server regardless of whether the field is empty or not. This may be
4245	// used to include empty fields in Patch requests.
4246	ForceSendFields []string `json:"-"`
4247}
4248
4249func (s *InstanceGroupsScopedListWarningData) MarshalJSON() ([]byte, error) {
4250	type noMethod InstanceGroupsScopedListWarningData
4251	raw := noMethod(*s)
4252	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4253}
4254
4255type InstanceGroupsSetNamedPortsRequest struct {
4256	// Fingerprint: The fingerprint of the named ports information for this
4257	// instance group. Use this optional property to prevent conflicts when
4258	// multiple users change the named ports settings concurrently. Obtain
4259	// the fingerprint with the instanceGroups.get method. Then, include the
4260	// fingerprint in your request to ensure that you do not overwrite
4261	// changes that were applied from another concurrent request.
4262	Fingerprint string `json:"fingerprint,omitempty"`
4263
4264	// NamedPorts: The list of named ports to set for this instance group.
4265	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
4266
4267	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
4268	// unconditionally include in API requests. By default, fields with
4269	// empty values are omitted from API requests. However, any non-pointer,
4270	// non-interface field appearing in ForceSendFields will be sent to the
4271	// server regardless of whether the field is empty or not. This may be
4272	// used to include empty fields in Patch requests.
4273	ForceSendFields []string `json:"-"`
4274}
4275
4276func (s *InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) {
4277	type noMethod InstanceGroupsSetNamedPortsRequest
4278	raw := noMethod(*s)
4279	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4280}
4281
4282// InstanceList: Contains a list of instances.
4283type InstanceList struct {
4284	// Id: [Output Only] The unique identifier for the resource. This
4285	// identifier is defined by the server.
4286	Id string `json:"id,omitempty"`
4287
4288	// Items: [Output Only] A list of instances.
4289	Items []*Instance `json:"items,omitempty"`
4290
4291	// Kind: [Output Only] Type of resource. Always compute#instanceList for
4292	// lists of Instance resources.
4293	Kind string `json:"kind,omitempty"`
4294
4295	// NextPageToken: [Output Only] This token allows you to get the next
4296	// page of results for list requests. If the number of results is larger
4297	// than maxResults, use the nextPageToken as a value for the query
4298	// parameter pageToken in the next list request. Subsequent list
4299	// requests will have their own nextPageToken to continue paging through
4300	// the results.
4301	NextPageToken string `json:"nextPageToken,omitempty"`
4302
4303	// SelfLink: [Output Only] Server-defined URL for this resource.
4304	SelfLink string `json:"selfLink,omitempty"`
4305
4306	// ServerResponse contains the HTTP response code and headers from the
4307	// server.
4308	googleapi.ServerResponse `json:"-"`
4309
4310	// ForceSendFields is a list of field names (e.g. "Id") to
4311	// unconditionally include in API requests. By default, fields with
4312	// empty values are omitted from API requests. However, any non-pointer,
4313	// non-interface field appearing in ForceSendFields will be sent to the
4314	// server regardless of whether the field is empty or not. This may be
4315	// used to include empty fields in Patch requests.
4316	ForceSendFields []string `json:"-"`
4317}
4318
4319func (s *InstanceList) MarshalJSON() ([]byte, error) {
4320	type noMethod InstanceList
4321	raw := noMethod(*s)
4322	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4323}
4324
4325type InstanceMoveRequest struct {
4326	// DestinationZone: The URL of the destination zone to move the
4327	// instance. This can be a full or partial URL. For example, the
4328	// following are all valid URLs to a zone:
4329	// - https://www.googleapis.com/compute/v1/projects/project/zones/zone
4330	//
4331	// - projects/project/zones/zone
4332	// - zones/zone
4333	DestinationZone string `json:"destinationZone,omitempty"`
4334
4335	// TargetInstance: The URL of the target instance to move. This can be a
4336	// full or partial URL. For example, the following are all valid URLs to
4337	// an instance:
4338	// -
4339	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
4340	// - projects/project/zones/zone/instances/instance
4341	// - zones/zone/instances/instance
4342	TargetInstance string `json:"targetInstance,omitempty"`
4343
4344	// ForceSendFields is a list of field names (e.g. "DestinationZone") to
4345	// unconditionally include in API requests. By default, fields with
4346	// empty values are omitted from API requests. However, any non-pointer,
4347	// non-interface field appearing in ForceSendFields will be sent to the
4348	// server regardless of whether the field is empty or not. This may be
4349	// used to include empty fields in Patch requests.
4350	ForceSendFields []string `json:"-"`
4351}
4352
4353func (s *InstanceMoveRequest) MarshalJSON() ([]byte, error) {
4354	type noMethod InstanceMoveRequest
4355	raw := noMethod(*s)
4356	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4357}
4358
4359type InstanceProperties struct {
4360	// CanIpForward: Enables instances created based on this template to
4361	// send packets with source IP addresses other than their own and
4362	// receive packets with destination IP addresses other than their own.
4363	// If these instances will be used as an IP gateway or it will be set as
4364	// the next-hop in a Route resource, specify true. If unsure, leave this
4365	// set to false. See the canIpForward documentation for more
4366	// information.
4367	CanIpForward bool `json:"canIpForward,omitempty"`
4368
4369	// Description: An optional text description for the instances that are
4370	// created from this instance template.
4371	Description string `json:"description,omitempty"`
4372
4373	// Disks: An array of disks that are associated with the instances that
4374	// are created from this template.
4375	Disks []*AttachedDisk `json:"disks,omitempty"`
4376
4377	// MachineType: The machine type to use for instances that are created
4378	// from this template.
4379	MachineType string `json:"machineType,omitempty"`
4380
4381	// Metadata: The metadata key/value pairs to assign to instances that
4382	// are created from this template. These pairs can consist of custom
4383	// metadata or predefined keys. See Project and instance metadata for
4384	// more information.
4385	Metadata *Metadata `json:"metadata,omitempty"`
4386
4387	// NetworkInterfaces: An array of network access configurations for this
4388	// interface.
4389	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
4390
4391	// Scheduling: Specifies the scheduling options for the instances that
4392	// are created from this template.
4393	Scheduling *Scheduling `json:"scheduling,omitempty"`
4394
4395	// ServiceAccounts: A list of service accounts with specified scopes.
4396	// Access tokens for these service accounts are available to the
4397	// instances that are created from this template. Use metadata queries
4398	// to obtain the access tokens for these instances.
4399	ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"`
4400
4401	// Tags: A list of tags to apply to the instances that are created from
4402	// this template. The tags identify valid sources or targets for network
4403	// firewalls. The setTags method can modify this list of tags. Each tag
4404	// within the list must comply with RFC1035.
4405	Tags *Tags `json:"tags,omitempty"`
4406
4407	// ForceSendFields is a list of field names (e.g. "CanIpForward") to
4408	// unconditionally include in API requests. By default, fields with
4409	// empty values are omitted from API requests. However, any non-pointer,
4410	// non-interface field appearing in ForceSendFields will be sent to the
4411	// server regardless of whether the field is empty or not. This may be
4412	// used to include empty fields in Patch requests.
4413	ForceSendFields []string `json:"-"`
4414}
4415
4416func (s *InstanceProperties) MarshalJSON() ([]byte, error) {
4417	type noMethod InstanceProperties
4418	raw := noMethod(*s)
4419	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4420}
4421
4422type InstanceReference struct {
4423	// Instance: The URL for a specific instance.
4424	Instance string `json:"instance,omitempty"`
4425
4426	// ForceSendFields is a list of field names (e.g. "Instance") to
4427	// unconditionally include in API requests. By default, fields with
4428	// empty values are omitted from API requests. However, any non-pointer,
4429	// non-interface field appearing in ForceSendFields will be sent to the
4430	// server regardless of whether the field is empty or not. This may be
4431	// used to include empty fields in Patch requests.
4432	ForceSendFields []string `json:"-"`
4433}
4434
4435func (s *InstanceReference) MarshalJSON() ([]byte, error) {
4436	type noMethod InstanceReference
4437	raw := noMethod(*s)
4438	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4439}
4440
4441// InstanceTemplate: An Instance Template resource.
4442type InstanceTemplate struct {
4443	// CreationTimestamp: [Output Only] The creation timestamp for this
4444	// instance template in RFC3339 text format.
4445	CreationTimestamp string `json:"creationTimestamp,omitempty"`
4446
4447	// Description: An optional description of this resource. Provide this
4448	// property when you create the resource.
4449	Description string `json:"description,omitempty"`
4450
4451	// Id: [Output Only] A unique identifier for this instance template. The
4452	// server defines this identifier.
4453	Id uint64 `json:"id,omitempty,string"`
4454
4455	// Kind: [Output Only] The resource type, which is always
4456	// compute#instanceTemplate for instance templates.
4457	Kind string `json:"kind,omitempty"`
4458
4459	// Name: Name of the resource; provided by the client when the resource
4460	// is created. The name must be 1-63 characters long, and comply with
4461	// RFC1035. Specifically, the name must be 1-63 characters long and
4462	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
4463	// the first character must be a lowercase letter, and all following
4464	// characters must be a dash, lowercase letter, or digit, except the
4465	// last character, which cannot be a dash.
4466	Name string `json:"name,omitempty"`
4467
4468	// Properties: The instance properties for this instance template.
4469	Properties *InstanceProperties `json:"properties,omitempty"`
4470
4471	// SelfLink: [Output Only] The URL for this instance template. The
4472	// server defines this URL.
4473	SelfLink string `json:"selfLink,omitempty"`
4474
4475	// ServerResponse contains the HTTP response code and headers from the
4476	// server.
4477	googleapi.ServerResponse `json:"-"`
4478
4479	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
4480	// to unconditionally include in API requests. By default, fields with
4481	// empty values are omitted from API requests. However, any non-pointer,
4482	// non-interface field appearing in ForceSendFields will be sent to the
4483	// server regardless of whether the field is empty or not. This may be
4484	// used to include empty fields in Patch requests.
4485	ForceSendFields []string `json:"-"`
4486}
4487
4488func (s *InstanceTemplate) MarshalJSON() ([]byte, error) {
4489	type noMethod InstanceTemplate
4490	raw := noMethod(*s)
4491	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4492}
4493
4494// InstanceTemplateList: A list of instance templates.
4495type InstanceTemplateList struct {
4496	// Id: [Output Only] A unique identifier for this instance template. The
4497	// server defines this identifier.
4498	Id string `json:"id,omitempty"`
4499
4500	// Items: [Output Only] list of InstanceTemplate resources.
4501	Items []*InstanceTemplate `json:"items,omitempty"`
4502
4503	// Kind: [Output Only] The resource type, which is always
4504	// compute#instanceTemplatesListResponse for instance template lists.
4505	Kind string `json:"kind,omitempty"`
4506
4507	// NextPageToken: [Output Only] This token allows you to get the next
4508	// page of results for list requests. If the number of results is larger
4509	// than maxResults, use the nextPageToken as a value for the query
4510	// parameter pageToken in the next list request. Subsequent list
4511	// requests will have their own nextPageToken to continue paging through
4512	// the results.
4513	NextPageToken string `json:"nextPageToken,omitempty"`
4514
4515	// SelfLink: [Output Only] The URL for this instance template list. The
4516	// server defines this URL.
4517	SelfLink string `json:"selfLink,omitempty"`
4518
4519	// ServerResponse contains the HTTP response code and headers from the
4520	// server.
4521	googleapi.ServerResponse `json:"-"`
4522
4523	// ForceSendFields is a list of field names (e.g. "Id") to
4524	// unconditionally include in API requests. By default, fields with
4525	// empty values are omitted from API requests. However, any non-pointer,
4526	// non-interface field appearing in ForceSendFields will be sent to the
4527	// server regardless of whether the field is empty or not. This may be
4528	// used to include empty fields in Patch requests.
4529	ForceSendFields []string `json:"-"`
4530}
4531
4532func (s *InstanceTemplateList) MarshalJSON() ([]byte, error) {
4533	type noMethod InstanceTemplateList
4534	raw := noMethod(*s)
4535	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4536}
4537
4538type InstanceWithNamedPorts struct {
4539	// Instance: [Output Only] The URL of the instance.
4540	Instance string `json:"instance,omitempty"`
4541
4542	// NamedPorts: [Output Only] The named ports that belong to this
4543	// instance group.
4544	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
4545
4546	// Status: [Output Only] The status of the instance.
4547	//
4548	// Possible values:
4549	//   "PROVISIONING"
4550	//   "RUNNING"
4551	//   "STAGING"
4552	//   "STOPPED"
4553	//   "STOPPING"
4554	//   "SUSPENDED"
4555	//   "SUSPENDING"
4556	//   "TERMINATED"
4557	Status string `json:"status,omitempty"`
4558
4559	// ForceSendFields is a list of field names (e.g. "Instance") to
4560	// unconditionally include in API requests. By default, fields with
4561	// empty values are omitted from API requests. However, any non-pointer,
4562	// non-interface field appearing in ForceSendFields will be sent to the
4563	// server regardless of whether the field is empty or not. This may be
4564	// used to include empty fields in Patch requests.
4565	ForceSendFields []string `json:"-"`
4566}
4567
4568func (s *InstanceWithNamedPorts) MarshalJSON() ([]byte, error) {
4569	type noMethod InstanceWithNamedPorts
4570	raw := noMethod(*s)
4571	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4572}
4573
4574type InstancesScopedList struct {
4575	// Instances: [Output Only] List of instances contained in this scope.
4576	Instances []*Instance `json:"instances,omitempty"`
4577
4578	// Warning: [Output Only] Informational warning which replaces the list
4579	// of instances when the list is empty.
4580	Warning *InstancesScopedListWarning `json:"warning,omitempty"`
4581
4582	// ForceSendFields is a list of field names (e.g. "Instances") to
4583	// unconditionally include in API requests. By default, fields with
4584	// empty values are omitted from API requests. However, any non-pointer,
4585	// non-interface field appearing in ForceSendFields will be sent to the
4586	// server regardless of whether the field is empty or not. This may be
4587	// used to include empty fields in Patch requests.
4588	ForceSendFields []string `json:"-"`
4589}
4590
4591func (s *InstancesScopedList) MarshalJSON() ([]byte, error) {
4592	type noMethod InstancesScopedList
4593	raw := noMethod(*s)
4594	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4595}
4596
4597// InstancesScopedListWarning: [Output Only] Informational warning which
4598// replaces the list of instances when the list is empty.
4599type InstancesScopedListWarning struct {
4600	// Code: [Output Only] A warning code, if applicable. For example,
4601	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
4602	// the response.
4603	//
4604	// Possible values:
4605	//   "CLEANUP_FAILED"
4606	//   "DEPRECATED_RESOURCE_USED"
4607	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
4608	//   "INJECTED_KERNELS_DEPRECATED"
4609	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
4610	//   "NEXT_HOP_CANNOT_IP_FORWARD"
4611	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
4612	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
4613	//   "NEXT_HOP_NOT_RUNNING"
4614	//   "NOT_CRITICAL_ERROR"
4615	//   "NO_RESULTS_ON_PAGE"
4616	//   "REQUIRED_TOS_AGREEMENT"
4617	//   "RESOURCE_NOT_DELETED"
4618	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
4619	//   "UNREACHABLE"
4620	Code string `json:"code,omitempty"`
4621
4622	// Data: [Output Only] Metadata about this warning in key: value format.
4623	// For example:
4624	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4625	Data []*InstancesScopedListWarningData `json:"data,omitempty"`
4626
4627	// Message: [Output Only] A human-readable description of the warning
4628	// code.
4629	Message string `json:"message,omitempty"`
4630
4631	// ForceSendFields is a list of field names (e.g. "Code") to
4632	// unconditionally include in API requests. By default, fields with
4633	// empty values are omitted from API requests. However, any non-pointer,
4634	// non-interface field appearing in ForceSendFields will be sent to the
4635	// server regardless of whether the field is empty or not. This may be
4636	// used to include empty fields in Patch requests.
4637	ForceSendFields []string `json:"-"`
4638}
4639
4640func (s *InstancesScopedListWarning) MarshalJSON() ([]byte, error) {
4641	type noMethod InstancesScopedListWarning
4642	raw := noMethod(*s)
4643	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4644}
4645
4646type InstancesScopedListWarningData struct {
4647	// Key: [Output Only] A key that provides more detail on the warning
4648	// being returned. For example, for warnings where there are no results
4649	// in a list request for a particular zone, this key might be scope and
4650	// the key value might be the zone name. Other examples might be a key
4651	// indicating a deprecated resource and a suggested replacement, or a
4652	// warning about invalid network settings (for example, if an instance
4653	// attempts to perform IP forwarding but is not enabled for IP
4654	// forwarding).
4655	Key string `json:"key,omitempty"`
4656
4657	// Value: [Output Only] A warning data value corresponding to the key.
4658	Value string `json:"value,omitempty"`
4659
4660	// ForceSendFields is a list of field names (e.g. "Key") to
4661	// unconditionally include in API requests. By default, fields with
4662	// empty values are omitted from API requests. However, any non-pointer,
4663	// non-interface field appearing in ForceSendFields will be sent to the
4664	// server regardless of whether the field is empty or not. This may be
4665	// used to include empty fields in Patch requests.
4666	ForceSendFields []string `json:"-"`
4667}
4668
4669func (s *InstancesScopedListWarningData) MarshalJSON() ([]byte, error) {
4670	type noMethod InstancesScopedListWarningData
4671	raw := noMethod(*s)
4672	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4673}
4674
4675type InstancesSetMachineTypeRequest struct {
4676	// MachineType: Full or partial URL of the machine type resource. See
4677	// Machine Types for a full list of machine types. For example:
4678	// zones/us-central1-f/machineTypes/n1-standard-1
4679	MachineType string `json:"machineType,omitempty"`
4680
4681	// ForceSendFields is a list of field names (e.g. "MachineType") to
4682	// unconditionally include in API requests. By default, fields with
4683	// empty values are omitted from API requests. However, any non-pointer,
4684	// non-interface field appearing in ForceSendFields will be sent to the
4685	// server regardless of whether the field is empty or not. This may be
4686	// used to include empty fields in Patch requests.
4687	ForceSendFields []string `json:"-"`
4688}
4689
4690func (s *InstancesSetMachineTypeRequest) MarshalJSON() ([]byte, error) {
4691	type noMethod InstancesSetMachineTypeRequest
4692	raw := noMethod(*s)
4693	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4694}
4695
4696// License: A license resource.
4697type License struct {
4698	// ChargesUseFee: [Output Only] If true, the customer will be charged
4699	// license fee for running software that contains this license on an
4700	// instance.
4701	ChargesUseFee bool `json:"chargesUseFee,omitempty"`
4702
4703	// Kind: [Output Only] Type of resource. Always compute#license for
4704	// licenses.
4705	Kind string `json:"kind,omitempty"`
4706
4707	// Name: [Output Only] Name of the resource. The name is 1-63 characters
4708	// long and complies with RFC1035.
4709	Name string `json:"name,omitempty"`
4710
4711	// SelfLink: [Output Only] Server-defined URL for the resource.
4712	SelfLink string `json:"selfLink,omitempty"`
4713
4714	// ServerResponse contains the HTTP response code and headers from the
4715	// server.
4716	googleapi.ServerResponse `json:"-"`
4717
4718	// ForceSendFields is a list of field names (e.g. "ChargesUseFee") to
4719	// unconditionally include in API requests. By default, fields with
4720	// empty values are omitted from API requests. However, any non-pointer,
4721	// non-interface field appearing in ForceSendFields will be sent to the
4722	// server regardless of whether the field is empty or not. This may be
4723	// used to include empty fields in Patch requests.
4724	ForceSendFields []string `json:"-"`
4725}
4726
4727func (s *License) MarshalJSON() ([]byte, error) {
4728	type noMethod License
4729	raw := noMethod(*s)
4730	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4731}
4732
4733// MachineType: A Machine Type resource.
4734type MachineType struct {
4735	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
4736	// format.
4737	CreationTimestamp string `json:"creationTimestamp,omitempty"`
4738
4739	// Deprecated: [Output Only] The deprecation status associated with this
4740	// machine type.
4741	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
4742
4743	// Description: [Output Only] An optional textual description of the
4744	// resource.
4745	Description string `json:"description,omitempty"`
4746
4747	// GuestCpus: [Output Only] The number of virtual CPUs that are
4748	// available to the instance.
4749	GuestCpus int64 `json:"guestCpus,omitempty"`
4750
4751	// Id: [Output Only] The unique identifier for the resource. This
4752	// identifier is defined by the server.
4753	Id uint64 `json:"id,omitempty,string"`
4754
4755	// ImageSpaceGb: [Deprecated] This property is deprecated and will never
4756	// be populated with any relevant values.
4757	ImageSpaceGb int64 `json:"imageSpaceGb,omitempty"`
4758
4759	// Kind: [Output Only] The type of the resource. Always
4760	// compute#machineType for machine types.
4761	Kind string `json:"kind,omitempty"`
4762
4763	// MaximumPersistentDisks: [Output Only] Maximum persistent disks
4764	// allowed.
4765	MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"`
4766
4767	// MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent
4768	// disks size (GB) allowed.
4769	MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"`
4770
4771	// MemoryMb: [Output Only] The amount of physical memory available to
4772	// the instance, defined in MB.
4773	MemoryMb int64 `json:"memoryMb,omitempty"`
4774
4775	// Name: [Output Only] Name of the resource.
4776	Name string `json:"name,omitempty"`
4777
4778	// ScratchDisks: [Output Only] List of extended scratch disks assigned
4779	// to the instance.
4780	ScratchDisks []*MachineTypeScratchDisks `json:"scratchDisks,omitempty"`
4781
4782	// SelfLink: [Output Only] Server-defined URL for the resource.
4783	SelfLink string `json:"selfLink,omitempty"`
4784
4785	// Zone: [Output Only] The name of the zone where the machine type
4786	// resides, such as us-central1-a.
4787	Zone string `json:"zone,omitempty"`
4788
4789	// ServerResponse contains the HTTP response code and headers from the
4790	// server.
4791	googleapi.ServerResponse `json:"-"`
4792
4793	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
4794	// to unconditionally include in API requests. By default, fields with
4795	// empty values are omitted from API requests. However, any non-pointer,
4796	// non-interface field appearing in ForceSendFields will be sent to the
4797	// server regardless of whether the field is empty or not. This may be
4798	// used to include empty fields in Patch requests.
4799	ForceSendFields []string `json:"-"`
4800}
4801
4802func (s *MachineType) MarshalJSON() ([]byte, error) {
4803	type noMethod MachineType
4804	raw := noMethod(*s)
4805	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4806}
4807
4808type MachineTypeScratchDisks struct {
4809	// DiskGb: Size of the scratch disk, defined in GB.
4810	DiskGb int64 `json:"diskGb,omitempty"`
4811
4812	// ForceSendFields is a list of field names (e.g. "DiskGb") to
4813	// unconditionally include in API requests. By default, fields with
4814	// empty values are omitted from API requests. However, any non-pointer,
4815	// non-interface field appearing in ForceSendFields will be sent to the
4816	// server regardless of whether the field is empty or not. This may be
4817	// used to include empty fields in Patch requests.
4818	ForceSendFields []string `json:"-"`
4819}
4820
4821func (s *MachineTypeScratchDisks) MarshalJSON() ([]byte, error) {
4822	type noMethod MachineTypeScratchDisks
4823	raw := noMethod(*s)
4824	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4825}
4826
4827type MachineTypeAggregatedList struct {
4828	// Id: [Output Only] The unique identifier for the resource. This
4829	// identifier is defined by the server.
4830	Id string `json:"id,omitempty"`
4831
4832	// Items: [Output Only] A map of scoped machine type lists.
4833	Items map[string]MachineTypesScopedList `json:"items,omitempty"`
4834
4835	// Kind: [Output Only] Type of resource. Always
4836	// compute#machineTypeAggregatedList for aggregated lists of machine
4837	// types.
4838	Kind string `json:"kind,omitempty"`
4839
4840	// NextPageToken: [Output Only] This token allows you to get the next
4841	// page of results for list requests. If the number of results is larger
4842	// than maxResults, use the nextPageToken as a value for the query
4843	// parameter pageToken in the next list request. Subsequent list
4844	// requests will have their own nextPageToken to continue paging through
4845	// the results.
4846	NextPageToken string `json:"nextPageToken,omitempty"`
4847
4848	// SelfLink: [Output Only] Server-defined URL for this resource.
4849	SelfLink string `json:"selfLink,omitempty"`
4850
4851	// ServerResponse contains the HTTP response code and headers from the
4852	// server.
4853	googleapi.ServerResponse `json:"-"`
4854
4855	// ForceSendFields is a list of field names (e.g. "Id") to
4856	// unconditionally include in API requests. By default, fields with
4857	// empty values are omitted from API requests. However, any non-pointer,
4858	// non-interface field appearing in ForceSendFields will be sent to the
4859	// server regardless of whether the field is empty or not. This may be
4860	// used to include empty fields in Patch requests.
4861	ForceSendFields []string `json:"-"`
4862}
4863
4864func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) {
4865	type noMethod MachineTypeAggregatedList
4866	raw := noMethod(*s)
4867	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4868}
4869
4870// MachineTypeList: Contains a list of machine types.
4871type MachineTypeList struct {
4872	// Id: [Output Only] The unique identifier for the resource. This
4873	// identifier is defined by the server.
4874	Id string `json:"id,omitempty"`
4875
4876	// Items: [Output Only] A list of Machine Type resources.
4877	Items []*MachineType `json:"items,omitempty"`
4878
4879	// Kind: [Output Only] Type of resource. Always compute#machineTypeList
4880	// for lists of machine types.
4881	Kind string `json:"kind,omitempty"`
4882
4883	// NextPageToken: [Output Only] This token allows you to get the next
4884	// page of results for list requests. If the number of results is larger
4885	// than maxResults, use the nextPageToken as a value for the query
4886	// parameter pageToken in the next list request. Subsequent list
4887	// requests will have their own nextPageToken to continue paging through
4888	// the results.
4889	NextPageToken string `json:"nextPageToken,omitempty"`
4890
4891	// SelfLink: [Output Only] Server-defined URL for this resource.
4892	SelfLink string `json:"selfLink,omitempty"`
4893
4894	// ServerResponse contains the HTTP response code and headers from the
4895	// server.
4896	googleapi.ServerResponse `json:"-"`
4897
4898	// ForceSendFields is a list of field names (e.g. "Id") to
4899	// unconditionally include in API requests. By default, fields with
4900	// empty values are omitted from API requests. However, any non-pointer,
4901	// non-interface field appearing in ForceSendFields will be sent to the
4902	// server regardless of whether the field is empty or not. This may be
4903	// used to include empty fields in Patch requests.
4904	ForceSendFields []string `json:"-"`
4905}
4906
4907func (s *MachineTypeList) MarshalJSON() ([]byte, error) {
4908	type noMethod MachineTypeList
4909	raw := noMethod(*s)
4910	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4911}
4912
4913type MachineTypesScopedList struct {
4914	// MachineTypes: [Output Only] List of machine types contained in this
4915	// scope.
4916	MachineTypes []*MachineType `json:"machineTypes,omitempty"`
4917
4918	// Warning: [Output Only] An informational warning that appears when the
4919	// machine types list is empty.
4920	Warning *MachineTypesScopedListWarning `json:"warning,omitempty"`
4921
4922	// ForceSendFields is a list of field names (e.g. "MachineTypes") to
4923	// unconditionally include in API requests. By default, fields with
4924	// empty values are omitted from API requests. However, any non-pointer,
4925	// non-interface field appearing in ForceSendFields will be sent to the
4926	// server regardless of whether the field is empty or not. This may be
4927	// used to include empty fields in Patch requests.
4928	ForceSendFields []string `json:"-"`
4929}
4930
4931func (s *MachineTypesScopedList) MarshalJSON() ([]byte, error) {
4932	type noMethod MachineTypesScopedList
4933	raw := noMethod(*s)
4934	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4935}
4936
4937// MachineTypesScopedListWarning: [Output Only] An informational warning
4938// that appears when the machine types list is empty.
4939type MachineTypesScopedListWarning struct {
4940	// Code: [Output Only] A warning code, if applicable. For example,
4941	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
4942	// the response.
4943	//
4944	// Possible values:
4945	//   "CLEANUP_FAILED"
4946	//   "DEPRECATED_RESOURCE_USED"
4947	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
4948	//   "INJECTED_KERNELS_DEPRECATED"
4949	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
4950	//   "NEXT_HOP_CANNOT_IP_FORWARD"
4951	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
4952	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
4953	//   "NEXT_HOP_NOT_RUNNING"
4954	//   "NOT_CRITICAL_ERROR"
4955	//   "NO_RESULTS_ON_PAGE"
4956	//   "REQUIRED_TOS_AGREEMENT"
4957	//   "RESOURCE_NOT_DELETED"
4958	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
4959	//   "UNREACHABLE"
4960	Code string `json:"code,omitempty"`
4961
4962	// Data: [Output Only] Metadata about this warning in key: value format.
4963	// For example:
4964	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4965	Data []*MachineTypesScopedListWarningData `json:"data,omitempty"`
4966
4967	// Message: [Output Only] A human-readable description of the warning
4968	// code.
4969	Message string `json:"message,omitempty"`
4970
4971	// ForceSendFields is a list of field names (e.g. "Code") to
4972	// unconditionally include in API requests. By default, fields with
4973	// empty values are omitted from API requests. However, any non-pointer,
4974	// non-interface field appearing in ForceSendFields will be sent to the
4975	// server regardless of whether the field is empty or not. This may be
4976	// used to include empty fields in Patch requests.
4977	ForceSendFields []string `json:"-"`
4978}
4979
4980func (s *MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) {
4981	type noMethod MachineTypesScopedListWarning
4982	raw := noMethod(*s)
4983	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4984}
4985
4986type MachineTypesScopedListWarningData struct {
4987	// Key: [Output Only] A key that provides more detail on the warning
4988	// being returned. For example, for warnings where there are no results
4989	// in a list request for a particular zone, this key might be scope and
4990	// the key value might be the zone name. Other examples might be a key
4991	// indicating a deprecated resource and a suggested replacement, or a
4992	// warning about invalid network settings (for example, if an instance
4993	// attempts to perform IP forwarding but is not enabled for IP
4994	// forwarding).
4995	Key string `json:"key,omitempty"`
4996
4997	// Value: [Output Only] A warning data value corresponding to the key.
4998	Value string `json:"value,omitempty"`
4999
5000	// ForceSendFields is a list of field names (e.g. "Key") to
5001	// unconditionally include in API requests. By default, fields with
5002	// empty values are omitted from API requests. However, any non-pointer,
5003	// non-interface field appearing in ForceSendFields will be sent to the
5004	// server regardless of whether the field is empty or not. This may be
5005	// used to include empty fields in Patch requests.
5006	ForceSendFields []string `json:"-"`
5007}
5008
5009func (s *MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) {
5010	type noMethod MachineTypesScopedListWarningData
5011	raw := noMethod(*s)
5012	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5013}
5014
5015type ManagedInstance struct {
5016	// CurrentAction: [Output Only] The current action that the managed
5017	// instance group has scheduled for the instance. Possible values:
5018	// - NONE The instance is running, and the managed instance group does
5019	// not have any scheduled actions for this instance.
5020	// - CREATING The managed instance group is creating this instance. If
5021	// the group fails to create this instance, it will try again until it
5022	// is successful.
5023	// - CREATING_WITHOUT_RETRIES The managed instance group is attempting
5024	// to create this instance only once. If the group fails to create this
5025	// instance, it does not try again and the group's target_size value is
5026	// decreased.
5027	// - RECREATING The managed instance group is recreating this instance.
5028	//
5029	// - DELETING The managed instance group is permanently deleting this
5030	// instance.
5031	// - ABANDONING The managed instance group is abandoning this instance.
5032	// The instance will be removed from the instance group and from any
5033	// target pools that are associated with this group.
5034	// - RESTARTING The managed instance group is restarting the instance.
5035	//
5036	// - REFRESHING The managed instance group is applying configuration
5037	// changes to the instance without stopping it. For example, the group
5038	// can update the target pool list for an instance without stopping that
5039	// instance.
5040	//
5041	// Possible values:
5042	//   "ABANDONING"
5043	//   "CREATING"
5044	//   "DELETING"
5045	//   "NONE"
5046	//   "RECREATING"
5047	//   "REFRESHING"
5048	//   "RESTARTING"
5049	CurrentAction string `json:"currentAction,omitempty"`
5050
5051	// Id: [Output only] The unique identifier for this resource. This field
5052	// is empty when instance does not exist.
5053	Id uint64 `json:"id,omitempty,string"`
5054
5055	// Instance: [Output Only] The URL of the instance. The URL can exist
5056	// even if the instance has not yet been created.
5057	Instance string `json:"instance,omitempty"`
5058
5059	// InstanceStatus: [Output Only] The status of the instance. This field
5060	// is empty when the instance does not exist.
5061	//
5062	// Possible values:
5063	//   "PROVISIONING"
5064	//   "RUNNING"
5065	//   "STAGING"
5066	//   "STOPPED"
5067	//   "STOPPING"
5068	//   "SUSPENDED"
5069	//   "SUSPENDING"
5070	//   "TERMINATED"
5071	InstanceStatus string `json:"instanceStatus,omitempty"`
5072
5073	// LastAttempt: [Output Only] Information about the last attempt to
5074	// create or delete the instance.
5075	LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"`
5076
5077	// ForceSendFields is a list of field names (e.g. "CurrentAction") to
5078	// unconditionally include in API requests. By default, fields with
5079	// empty values are omitted from API requests. However, any non-pointer,
5080	// non-interface field appearing in ForceSendFields will be sent to the
5081	// server regardless of whether the field is empty or not. This may be
5082	// used to include empty fields in Patch requests.
5083	ForceSendFields []string `json:"-"`
5084}
5085
5086func (s *ManagedInstance) MarshalJSON() ([]byte, error) {
5087	type noMethod ManagedInstance
5088	raw := noMethod(*s)
5089	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5090}
5091
5092type ManagedInstanceLastAttempt struct {
5093	// Errors: [Output Only] Encountered errors during the last attempt to
5094	// create or delete the instance.
5095	Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"`
5096
5097	// ForceSendFields is a list of field names (e.g. "Errors") to
5098	// unconditionally include in API requests. By default, fields with
5099	// empty values are omitted from API requests. However, any non-pointer,
5100	// non-interface field appearing in ForceSendFields will be sent to the
5101	// server regardless of whether the field is empty or not. This may be
5102	// used to include empty fields in Patch requests.
5103	ForceSendFields []string `json:"-"`
5104}
5105
5106func (s *ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) {
5107	type noMethod ManagedInstanceLastAttempt
5108	raw := noMethod(*s)
5109	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5110}
5111
5112// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors
5113// during the last attempt to create or delete the instance.
5114type ManagedInstanceLastAttemptErrors struct {
5115	// Errors: [Output Only] The array of errors encountered while
5116	// processing this operation.
5117	Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"`
5118
5119	// ForceSendFields is a list of field names (e.g. "Errors") to
5120	// unconditionally include in API requests. By default, fields with
5121	// empty values are omitted from API requests. However, any non-pointer,
5122	// non-interface field appearing in ForceSendFields will be sent to the
5123	// server regardless of whether the field is empty or not. This may be
5124	// used to include empty fields in Patch requests.
5125	ForceSendFields []string `json:"-"`
5126}
5127
5128func (s *ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) {
5129	type noMethod ManagedInstanceLastAttemptErrors
5130	raw := noMethod(*s)
5131	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5132}
5133
5134type ManagedInstanceLastAttemptErrorsErrors struct {
5135	// Code: [Output Only] The error type identifier for this error.
5136	Code string `json:"code,omitempty"`
5137
5138	// Location: [Output Only] Indicates the field in the request that
5139	// caused the error. This property is optional.
5140	Location string `json:"location,omitempty"`
5141
5142	// Message: [Output Only] An optional, human-readable error message.
5143	Message string `json:"message,omitempty"`
5144
5145	// ForceSendFields is a list of field names (e.g. "Code") to
5146	// unconditionally include in API requests. By default, fields with
5147	// empty values are omitted from API requests. However, any non-pointer,
5148	// non-interface field appearing in ForceSendFields will be sent to the
5149	// server regardless of whether the field is empty or not. This may be
5150	// used to include empty fields in Patch requests.
5151	ForceSendFields []string `json:"-"`
5152}
5153
5154func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) {
5155	type noMethod ManagedInstanceLastAttemptErrorsErrors
5156	raw := noMethod(*s)
5157	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5158}
5159
5160// Metadata: A metadata key/value entry.
5161type Metadata struct {
5162	// Fingerprint: Specifies a fingerprint for this request, which is
5163	// essentially a hash of the metadata's contents and used for optimistic
5164	// locking. The fingerprint is initially generated by Compute Engine and
5165	// changes after every request to modify or update metadata. You must
5166	// always provide an up-to-date fingerprint hash in order to update or
5167	// change metadata.
5168	Fingerprint string `json:"fingerprint,omitempty"`
5169
5170	// Items: Array of key/value pairs. The total size of all keys and
5171	// values must be less than 512 KB.
5172	Items []*MetadataItems `json:"items,omitempty"`
5173
5174	// Kind: [Output Only] Type of the resource. Always compute#metadata for
5175	// metadata.
5176	Kind string `json:"kind,omitempty"`
5177
5178	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
5179	// unconditionally include in API requests. By default, fields with
5180	// empty values are omitted from API requests. However, any non-pointer,
5181	// non-interface field appearing in ForceSendFields will be sent to the
5182	// server regardless of whether the field is empty or not. This may be
5183	// used to include empty fields in Patch requests.
5184	ForceSendFields []string `json:"-"`
5185}
5186
5187func (s *Metadata) MarshalJSON() ([]byte, error) {
5188	type noMethod Metadata
5189	raw := noMethod(*s)
5190	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5191}
5192
5193type MetadataItems struct {
5194	// Key: Key for the metadata entry. Keys must conform to the following
5195	// regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is
5196	// reflected as part of a URL in the metadata server. Additionally, to
5197	// avoid ambiguity, keys must not conflict with any other metadata keys
5198	// for the project.
5199	Key string `json:"key,omitempty"`
5200
5201	// Value: Value for the metadata entry. These are free-form strings, and
5202	// only have meaning as interpreted by the image running in the
5203	// instance. The only restriction placed on values is that their size
5204	// must be less than or equal to 32768 bytes.
5205	Value *string `json:"value,omitempty"`
5206
5207	// ForceSendFields is a list of field names (e.g. "Key") to
5208	// unconditionally include in API requests. By default, fields with
5209	// empty values are omitted from API requests. However, any non-pointer,
5210	// non-interface field appearing in ForceSendFields will be sent to the
5211	// server regardless of whether the field is empty or not. This may be
5212	// used to include empty fields in Patch requests.
5213	ForceSendFields []string `json:"-"`
5214}
5215
5216func (s *MetadataItems) MarshalJSON() ([]byte, error) {
5217	type noMethod MetadataItems
5218	raw := noMethod(*s)
5219	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5220}
5221
5222// NamedPort: The named port. For example: .
5223type NamedPort struct {
5224	// Name: The name for this named port. The name must be 1-63 characters
5225	// long, and comply with RFC1035.
5226	Name string `json:"name,omitempty"`
5227
5228	// Port: The port number, which can be a value between 1 and 65535.
5229	Port int64 `json:"port,omitempty"`
5230
5231	// ForceSendFields is a list of field names (e.g. "Name") to
5232	// unconditionally include in API requests. By default, fields with
5233	// empty values are omitted from API requests. However, any non-pointer,
5234	// non-interface field appearing in ForceSendFields will be sent to the
5235	// server regardless of whether the field is empty or not. This may be
5236	// used to include empty fields in Patch requests.
5237	ForceSendFields []string `json:"-"`
5238}
5239
5240func (s *NamedPort) MarshalJSON() ([]byte, error) {
5241	type noMethod NamedPort
5242	raw := noMethod(*s)
5243	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5244}
5245
5246// Network: Represents a Network resource. Read Networks and Firewalls
5247// for more information.
5248type Network struct {
5249	// IPv4Range: The range of internal addresses that are legal on this
5250	// network. This range is a CIDR specification, for example:
5251	// 192.168.0.0/16. Provided by the client when the network is created.
5252	IPv4Range string `json:"IPv4Range,omitempty"`
5253
5254	// AutoCreateSubnetworks: When set to true, the network is created in
5255	// "auto subnet mode". When set to false, the network is in "custom
5256	// subnet mode".
5257	//
5258	// In "auto subnet mode", a newly created network is assigned the
5259	// default CIDR of 10.128.0.0/9 and it automatically creates one
5260	// subnetwork per region.
5261	AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"`
5262
5263	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
5264	// format.
5265	CreationTimestamp string `json:"creationTimestamp,omitempty"`
5266
5267	// Description: An optional description of this resource. Provide this
5268	// property when you create the resource.
5269	Description string `json:"description,omitempty"`
5270
5271	// GatewayIPv4: A gateway address for default routing to other networks.
5272	// This value is read only and is selected by the Google Compute Engine,
5273	// typically as the first usable address in the IPv4Range.
5274	GatewayIPv4 string `json:"gatewayIPv4,omitempty"`
5275
5276	// Id: [Output Only] The unique identifier for the resource. This
5277	// identifier is defined by the server.
5278	Id uint64 `json:"id,omitempty,string"`
5279
5280	// Kind: [Output Only] Type of the resource. Always compute#network for
5281	// networks.
5282	Kind string `json:"kind,omitempty"`
5283
5284	// Name: Name of the resource. Provided by the client when the resource
5285	// is created. The name must be 1-63 characters long, and comply with
5286	// RFC1035. Specifically, the name must be 1-63 characters long and
5287	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
5288	// the first character must be a lowercase letter, and all following
5289	// characters must be a dash, lowercase letter, or digit, except the
5290	// last character, which cannot be a dash.
5291	Name string `json:"name,omitempty"`
5292
5293	// SelfLink: [Output Only] Server-defined URL for the resource.
5294	SelfLink string `json:"selfLink,omitempty"`
5295
5296	// Subnetworks: [Output Only] Server-defined fully-qualified URLs for
5297	// all subnetworks in this network.
5298	Subnetworks []string `json:"subnetworks,omitempty"`
5299
5300	// ServerResponse contains the HTTP response code and headers from the
5301	// server.
5302	googleapi.ServerResponse `json:"-"`
5303
5304	// ForceSendFields is a list of field names (e.g. "IPv4Range") to
5305	// unconditionally include in API requests. By default, fields with
5306	// empty values are omitted from API requests. However, any non-pointer,
5307	// non-interface field appearing in ForceSendFields will be sent to the
5308	// server regardless of whether the field is empty or not. This may be
5309	// used to include empty fields in Patch requests.
5310	ForceSendFields []string `json:"-"`
5311}
5312
5313func (s *Network) MarshalJSON() ([]byte, error) {
5314	type noMethod Network
5315	raw := noMethod(*s)
5316	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5317}
5318
5319// NetworkInterface: A network interface resource attached to an
5320// instance.
5321type NetworkInterface struct {
5322	// AccessConfigs: An array of configurations for this interface.
5323	// Currently, ONE_TO_ONE_NAT is the only access config supported. If
5324	// there are no accessConfigs specified, then this instance will have no
5325	// external internet access.
5326	AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"`
5327
5328	// Name: [Output Only] The name of the network interface, generated by
5329	// the server. For network devices, these are eth0, eth1, etc.
5330	Name string `json:"name,omitempty"`
5331
5332	// Network: URL of the network resource for this instance. This is
5333	// required for creating an instance but optional when creating a
5334	// firewall rule. If not specified when creating a firewall rule, the
5335	// default network is used:
5336	//
5337	// global/networks/default
5338	//
5339	// If you specify this property, you can specify the network as a full
5340	// or partial URL. For example, the following are all valid URLs:
5341	// -
5342	// https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5343	// - projects/project/global/networks/network
5344	// - global/networks/default
5345	Network string `json:"network,omitempty"`
5346
5347	// NetworkIP: [Output Only] An optional IPV4 internal network address
5348	// assigned to the instance for this network interface.
5349	NetworkIP string `json:"networkIP,omitempty"`
5350
5351	// Subnetwork: The URL of the Subnetwork resource for this instance. If
5352	// the network resource is in legacy mode, do not provide this property.
5353	// If the network is in auto subnet mode, providing the subnetwork is
5354	// optional. If the network is in custom subnet mode, then this field
5355	// should be specified. If you specify this property, you can specify
5356	// the subnetwork as a full or partial URL. For example, the following
5357	// are all valid URLs:
5358	// -
5359	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/subnetworks/subnetwork
5360	// - zones/zone/subnetworks/subnetwork
5361	Subnetwork string `json:"subnetwork,omitempty"`
5362
5363	// ForceSendFields is a list of field names (e.g. "AccessConfigs") to
5364	// unconditionally include in API requests. By default, fields with
5365	// empty values are omitted from API requests. However, any non-pointer,
5366	// non-interface field appearing in ForceSendFields will be sent to the
5367	// server regardless of whether the field is empty or not. This may be
5368	// used to include empty fields in Patch requests.
5369	ForceSendFields []string `json:"-"`
5370}
5371
5372func (s *NetworkInterface) MarshalJSON() ([]byte, error) {
5373	type noMethod NetworkInterface
5374	raw := noMethod(*s)
5375	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5376}
5377
5378// NetworkList: Contains a list of networks.
5379type NetworkList struct {
5380	// Id: [Output Only] The unique identifier for the resource. This
5381	// identifier is defined by the server.
5382	Id string `json:"id,omitempty"`
5383
5384	// Items: [Output Only] A list of Network resources.
5385	Items []*Network `json:"items,omitempty"`
5386
5387	// Kind: [Output Only] Type of resource. Always compute#networkList for
5388	// lists of networks.
5389	Kind string `json:"kind,omitempty"`
5390
5391	// NextPageToken: [Output Only] This token allows you to get the next
5392	// page of results for list requests. If the number of results is larger
5393	// than maxResults, use the nextPageToken as a value for the query
5394	// parameter pageToken in the next list request. Subsequent list
5395	// requests will have their own nextPageToken to continue paging through
5396	// the results.
5397	NextPageToken string `json:"nextPageToken,omitempty"`
5398
5399	// SelfLink: [Output Only] Server-defined URL for this resource .
5400	SelfLink string `json:"selfLink,omitempty"`
5401
5402	// ServerResponse contains the HTTP response code and headers from the
5403	// server.
5404	googleapi.ServerResponse `json:"-"`
5405
5406	// ForceSendFields is a list of field names (e.g. "Id") to
5407	// unconditionally include in API requests. By default, fields with
5408	// empty values are omitted from API requests. However, any non-pointer,
5409	// non-interface field appearing in ForceSendFields will be sent to the
5410	// server regardless of whether the field is empty or not. This may be
5411	// used to include empty fields in Patch requests.
5412	ForceSendFields []string `json:"-"`
5413}
5414
5415func (s *NetworkList) MarshalJSON() ([]byte, error) {
5416	type noMethod NetworkList
5417	raw := noMethod(*s)
5418	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5419}
5420
5421// Operation: An Operation resource, used to manage asynchronous API
5422// requests.
5423type Operation struct {
5424	// ClientOperationId: [Output Only] Reserved for future use.
5425	ClientOperationId string `json:"clientOperationId,omitempty"`
5426
5427	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
5428	// format.
5429	CreationTimestamp string `json:"creationTimestamp,omitempty"`
5430
5431	// Description: [Output Only] A textual description of the operation,
5432	// which is set when the operation is created.
5433	Description string `json:"description,omitempty"`
5434
5435	// EndTime: [Output Only] The time that this operation was completed.
5436	// This value is in RFC3339 text format.
5437	EndTime string `json:"endTime,omitempty"`
5438
5439	// Error: [Output Only] If errors are generated during processing of the
5440	// operation, this field will be populated.
5441	Error *OperationError `json:"error,omitempty"`
5442
5443	// HttpErrorMessage: [Output Only] If the operation fails, this field
5444	// contains the HTTP error message that was returned, such as NOT FOUND.
5445	HttpErrorMessage string `json:"httpErrorMessage,omitempty"`
5446
5447	// HttpErrorStatusCode: [Output Only] If the operation fails, this field
5448	// contains the HTTP error status code that was returned. For example, a
5449	// 404 means the resource was not found.
5450	HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"`
5451
5452	// Id: [Output Only] The unique identifier for the resource. This
5453	// identifier is defined by the server.
5454	Id uint64 `json:"id,omitempty,string"`
5455
5456	// InsertTime: [Output Only] The time that this operation was requested.
5457	// This value is in RFC3339 text format.
5458	InsertTime string `json:"insertTime,omitempty"`
5459
5460	// Kind: [Output Only] Type of the resource. Always compute#operation
5461	// for operation resources.
5462	Kind string `json:"kind,omitempty"`
5463
5464	// Name: [Output Only] Name of the resource.
5465	Name string `json:"name,omitempty"`
5466
5467	// OperationType: [Output Only] The type of operation, such as insert,
5468	// update, or delete, and so on.
5469	OperationType string `json:"operationType,omitempty"`
5470
5471	// Progress: [Output Only] An optional progress indicator that ranges
5472	// from 0 to 100. There is no requirement that this be linear or support
5473	// any granularity of operations. This should not be used to guess when
5474	// the operation will be complete. This number should monotonically
5475	// increase as the operation progresses.
5476	Progress int64 `json:"progress,omitempty"`
5477
5478	// Region: [Output Only] The URL of the region where the operation
5479	// resides. Only available when performing regional operations.
5480	Region string `json:"region,omitempty"`
5481
5482	// SelfLink: [Output Only] Server-defined URL for the resource.
5483	SelfLink string `json:"selfLink,omitempty"`
5484
5485	// StartTime: [Output Only] The time that this operation was started by
5486	// the server. This value is in RFC3339 text format.
5487	StartTime string `json:"startTime,omitempty"`
5488
5489	// Status: [Output Only] The status of the operation, which can be one
5490	// of the following: PENDING, RUNNING, or DONE.
5491	//
5492	// Possible values:
5493	//   "DONE"
5494	//   "PENDING"
5495	//   "RUNNING"
5496	Status string `json:"status,omitempty"`
5497
5498	// StatusMessage: [Output Only] An optional textual description of the
5499	// current status of the operation.
5500	StatusMessage string `json:"statusMessage,omitempty"`
5501
5502	// TargetId: [Output Only] The unique target ID, which identifies a
5503	// specific incarnation of the target resource.
5504	TargetId uint64 `json:"targetId,omitempty,string"`
5505
5506	// TargetLink: [Output Only] The URL of the resource that the operation
5507	// modifies.
5508	TargetLink string `json:"targetLink,omitempty"`
5509
5510	// User: [Output Only] User who requested the operation, for example:
5511	// user@example.com.
5512	User string `json:"user,omitempty"`
5513
5514	// Warnings: [Output Only] If warning messages are generated during
5515	// processing of the operation, this field will be populated.
5516	Warnings []*OperationWarnings `json:"warnings,omitempty"`
5517
5518	// Zone: [Output Only] The URL of the zone where the operation resides.
5519	// Only available when performing per-zone operations.
5520	Zone string `json:"zone,omitempty"`
5521
5522	// ServerResponse contains the HTTP response code and headers from the
5523	// server.
5524	googleapi.ServerResponse `json:"-"`
5525
5526	// ForceSendFields is a list of field names (e.g. "ClientOperationId")
5527	// to unconditionally include in API requests. By default, fields with
5528	// empty values are omitted from API requests. However, any non-pointer,
5529	// non-interface field appearing in ForceSendFields will be sent to the
5530	// server regardless of whether the field is empty or not. This may be
5531	// used to include empty fields in Patch requests.
5532	ForceSendFields []string `json:"-"`
5533}
5534
5535func (s *Operation) MarshalJSON() ([]byte, error) {
5536	type noMethod Operation
5537	raw := noMethod(*s)
5538	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5539}
5540
5541// OperationError: [Output Only] If errors are generated during
5542// processing of the operation, this field will be populated.
5543type OperationError struct {
5544	// Errors: [Output Only] The array of errors encountered while
5545	// processing this operation.
5546	Errors []*OperationErrorErrors `json:"errors,omitempty"`
5547
5548	// ForceSendFields is a list of field names (e.g. "Errors") to
5549	// unconditionally include in API requests. By default, fields with
5550	// empty values are omitted from API requests. However, any non-pointer,
5551	// non-interface field appearing in ForceSendFields will be sent to the
5552	// server regardless of whether the field is empty or not. This may be
5553	// used to include empty fields in Patch requests.
5554	ForceSendFields []string `json:"-"`
5555}
5556
5557func (s *OperationError) MarshalJSON() ([]byte, error) {
5558	type noMethod OperationError
5559	raw := noMethod(*s)
5560	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5561}
5562
5563type OperationErrorErrors struct {
5564	// Code: [Output Only] The error type identifier for this error.
5565	Code string `json:"code,omitempty"`
5566
5567	// Location: [Output Only] Indicates the field in the request that
5568	// caused the error. This property is optional.
5569	Location string `json:"location,omitempty"`
5570
5571	// Message: [Output Only] An optional, human-readable error message.
5572	Message string `json:"message,omitempty"`
5573
5574	// ForceSendFields is a list of field names (e.g. "Code") to
5575	// unconditionally include in API requests. By default, fields with
5576	// empty values are omitted from API requests. However, any non-pointer,
5577	// non-interface field appearing in ForceSendFields will be sent to the
5578	// server regardless of whether the field is empty or not. This may be
5579	// used to include empty fields in Patch requests.
5580	ForceSendFields []string `json:"-"`
5581}
5582
5583func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) {
5584	type noMethod OperationErrorErrors
5585	raw := noMethod(*s)
5586	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5587}
5588
5589type OperationWarnings struct {
5590	// Code: [Output Only] A warning code, if applicable. For example,
5591	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
5592	// the response.
5593	//
5594	// Possible values:
5595	//   "CLEANUP_FAILED"
5596	//   "DEPRECATED_RESOURCE_USED"
5597	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
5598	//   "INJECTED_KERNELS_DEPRECATED"
5599	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
5600	//   "NEXT_HOP_CANNOT_IP_FORWARD"
5601	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
5602	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
5603	//   "NEXT_HOP_NOT_RUNNING"
5604	//   "NOT_CRITICAL_ERROR"
5605	//   "NO_RESULTS_ON_PAGE"
5606	//   "REQUIRED_TOS_AGREEMENT"
5607	//   "RESOURCE_NOT_DELETED"
5608	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
5609	//   "UNREACHABLE"
5610	Code string `json:"code,omitempty"`
5611
5612	// Data: [Output Only] Metadata about this warning in key: value format.
5613	// For example:
5614	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5615	Data []*OperationWarningsData `json:"data,omitempty"`
5616
5617	// Message: [Output Only] A human-readable description of the warning
5618	// code.
5619	Message string `json:"message,omitempty"`
5620
5621	// ForceSendFields is a list of field names (e.g. "Code") to
5622	// unconditionally include in API requests. By default, fields with
5623	// empty values are omitted from API requests. However, any non-pointer,
5624	// non-interface field appearing in ForceSendFields will be sent to the
5625	// server regardless of whether the field is empty or not. This may be
5626	// used to include empty fields in Patch requests.
5627	ForceSendFields []string `json:"-"`
5628}
5629
5630func (s *OperationWarnings) MarshalJSON() ([]byte, error) {
5631	type noMethod OperationWarnings
5632	raw := noMethod(*s)
5633	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5634}
5635
5636type OperationWarningsData struct {
5637	// Key: [Output Only] A key that provides more detail on the warning
5638	// being returned. For example, for warnings where there are no results
5639	// in a list request for a particular zone, this key might be scope and
5640	// the key value might be the zone name. Other examples might be a key
5641	// indicating a deprecated resource and a suggested replacement, or a
5642	// warning about invalid network settings (for example, if an instance
5643	// attempts to perform IP forwarding but is not enabled for IP
5644	// forwarding).
5645	Key string `json:"key,omitempty"`
5646
5647	// Value: [Output Only] A warning data value corresponding to the key.
5648	Value string `json:"value,omitempty"`
5649
5650	// ForceSendFields is a list of field names (e.g. "Key") to
5651	// unconditionally include in API requests. By default, fields with
5652	// empty values are omitted from API requests. However, any non-pointer,
5653	// non-interface field appearing in ForceSendFields will be sent to the
5654	// server regardless of whether the field is empty or not. This may be
5655	// used to include empty fields in Patch requests.
5656	ForceSendFields []string `json:"-"`
5657}
5658
5659func (s *OperationWarningsData) MarshalJSON() ([]byte, error) {
5660	type noMethod OperationWarningsData
5661	raw := noMethod(*s)
5662	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5663}
5664
5665type OperationAggregatedList struct {
5666	// Id: [Output Only] The unique identifier for the resource. This
5667	// identifier is defined by the server.
5668	Id string `json:"id,omitempty"`
5669
5670	// Items: [Output Only] A map of scoped operation lists.
5671	Items map[string]OperationsScopedList `json:"items,omitempty"`
5672
5673	// Kind: [Output Only] Type of resource. Always
5674	// compute#operationAggregatedList for aggregated lists of operations.
5675	Kind string `json:"kind,omitempty"`
5676
5677	// NextPageToken: [Output Only] This token allows you to get the next
5678	// page of results for list requests. If the number of results is larger
5679	// than maxResults, use the nextPageToken as a value for the query
5680	// parameter pageToken in the next list request. Subsequent list
5681	// requests will have their own nextPageToken to continue paging through
5682	// the results.
5683	NextPageToken string `json:"nextPageToken,omitempty"`
5684
5685	// SelfLink: [Output Only] Server-defined URL for this resource.
5686	SelfLink string `json:"selfLink,omitempty"`
5687
5688	// ServerResponse contains the HTTP response code and headers from the
5689	// server.
5690	googleapi.ServerResponse `json:"-"`
5691
5692	// ForceSendFields is a list of field names (e.g. "Id") to
5693	// unconditionally include in API requests. By default, fields with
5694	// empty values are omitted from API requests. However, any non-pointer,
5695	// non-interface field appearing in ForceSendFields will be sent to the
5696	// server regardless of whether the field is empty or not. This may be
5697	// used to include empty fields in Patch requests.
5698	ForceSendFields []string `json:"-"`
5699}
5700
5701func (s *OperationAggregatedList) MarshalJSON() ([]byte, error) {
5702	type noMethod OperationAggregatedList
5703	raw := noMethod(*s)
5704	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5705}
5706
5707// OperationList: Contains a list of Operation resources.
5708type OperationList struct {
5709	// Id: [Output Only] The unique identifier for the resource. This
5710	// identifier is defined by the server.
5711	Id string `json:"id,omitempty"`
5712
5713	// Items: [Output Only] A list of Operation resources.
5714	Items []*Operation `json:"items,omitempty"`
5715
5716	// Kind: [Output Only] Type of resource. Always compute#operations for
5717	// Operations resource.
5718	Kind string `json:"kind,omitempty"`
5719
5720	// NextPageToken: [Output Only] This token allows you to get the next
5721	// page of results for list requests. If the number of results is larger
5722	// than maxResults, use the nextPageToken as a value for the query
5723	// parameter pageToken in the next list request. Subsequent list
5724	// requests will have their own nextPageToken to continue paging through
5725	// the results.
5726	NextPageToken string `json:"nextPageToken,omitempty"`
5727
5728	// SelfLink: [Output Only] Server-defined URL for this resource.
5729	SelfLink string `json:"selfLink,omitempty"`
5730
5731	// ServerResponse contains the HTTP response code and headers from the
5732	// server.
5733	googleapi.ServerResponse `json:"-"`
5734
5735	// ForceSendFields is a list of field names (e.g. "Id") to
5736	// unconditionally include in API requests. By default, fields with
5737	// empty values are omitted from API requests. However, any non-pointer,
5738	// non-interface field appearing in ForceSendFields will be sent to the
5739	// server regardless of whether the field is empty or not. This may be
5740	// used to include empty fields in Patch requests.
5741	ForceSendFields []string `json:"-"`
5742}
5743
5744func (s *OperationList) MarshalJSON() ([]byte, error) {
5745	type noMethod OperationList
5746	raw := noMethod(*s)
5747	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5748}
5749
5750type OperationsScopedList struct {
5751	// Operations: [Output Only] List of operations contained in this scope.
5752	Operations []*Operation `json:"operations,omitempty"`
5753
5754	// Warning: [Output Only] Informational warning which replaces the list
5755	// of operations when the list is empty.
5756	Warning *OperationsScopedListWarning `json:"warning,omitempty"`
5757
5758	// ForceSendFields is a list of field names (e.g. "Operations") to
5759	// unconditionally include in API requests. By default, fields with
5760	// empty values are omitted from API requests. However, any non-pointer,
5761	// non-interface field appearing in ForceSendFields will be sent to the
5762	// server regardless of whether the field is empty or not. This may be
5763	// used to include empty fields in Patch requests.
5764	ForceSendFields []string `json:"-"`
5765}
5766
5767func (s *OperationsScopedList) MarshalJSON() ([]byte, error) {
5768	type noMethod OperationsScopedList
5769	raw := noMethod(*s)
5770	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5771}
5772
5773// OperationsScopedListWarning: [Output Only] Informational warning
5774// which replaces the list of operations when the list is empty.
5775type OperationsScopedListWarning struct {
5776	// Code: [Output Only] A warning code, if applicable. For example,
5777	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
5778	// the response.
5779	//
5780	// Possible values:
5781	//   "CLEANUP_FAILED"
5782	//   "DEPRECATED_RESOURCE_USED"
5783	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
5784	//   "INJECTED_KERNELS_DEPRECATED"
5785	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
5786	//   "NEXT_HOP_CANNOT_IP_FORWARD"
5787	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
5788	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
5789	//   "NEXT_HOP_NOT_RUNNING"
5790	//   "NOT_CRITICAL_ERROR"
5791	//   "NO_RESULTS_ON_PAGE"
5792	//   "REQUIRED_TOS_AGREEMENT"
5793	//   "RESOURCE_NOT_DELETED"
5794	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
5795	//   "UNREACHABLE"
5796	Code string `json:"code,omitempty"`
5797
5798	// Data: [Output Only] Metadata about this warning in key: value format.
5799	// For example:
5800	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5801	Data []*OperationsScopedListWarningData `json:"data,omitempty"`
5802
5803	// Message: [Output Only] A human-readable description of the warning
5804	// code.
5805	Message string `json:"message,omitempty"`
5806
5807	// ForceSendFields is a list of field names (e.g. "Code") to
5808	// unconditionally include in API requests. By default, fields with
5809	// empty values are omitted from API requests. However, any non-pointer,
5810	// non-interface field appearing in ForceSendFields will be sent to the
5811	// server regardless of whether the field is empty or not. This may be
5812	// used to include empty fields in Patch requests.
5813	ForceSendFields []string `json:"-"`
5814}
5815
5816func (s *OperationsScopedListWarning) MarshalJSON() ([]byte, error) {
5817	type noMethod OperationsScopedListWarning
5818	raw := noMethod(*s)
5819	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5820}
5821
5822type OperationsScopedListWarningData struct {
5823	// Key: [Output Only] A key that provides more detail on the warning
5824	// being returned. For example, for warnings where there are no results
5825	// in a list request for a particular zone, this key might be scope and
5826	// the key value might be the zone name. Other examples might be a key
5827	// indicating a deprecated resource and a suggested replacement, or a
5828	// warning about invalid network settings (for example, if an instance
5829	// attempts to perform IP forwarding but is not enabled for IP
5830	// forwarding).
5831	Key string `json:"key,omitempty"`
5832
5833	// Value: [Output Only] A warning data value corresponding to the key.
5834	Value string `json:"value,omitempty"`
5835
5836	// ForceSendFields is a list of field names (e.g. "Key") to
5837	// unconditionally include in API requests. By default, fields with
5838	// empty values are omitted from API requests. However, any non-pointer,
5839	// non-interface field appearing in ForceSendFields will be sent to the
5840	// server regardless of whether the field is empty or not. This may be
5841	// used to include empty fields in Patch requests.
5842	ForceSendFields []string `json:"-"`
5843}
5844
5845func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) {
5846	type noMethod OperationsScopedListWarningData
5847	raw := noMethod(*s)
5848	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5849}
5850
5851// PathMatcher: A matcher for the path portion of the URL. The
5852// BackendService from the longest-matched rule will serve the URL. If
5853// no rule was matched, the default service will be used.
5854type PathMatcher struct {
5855	// DefaultService: The full or partial URL to the BackendService
5856	// resource. This will be used if none of the pathRules defined by this
5857	// PathMatcher is matched by the URL's path portion. For example, the
5858	// following are all valid URLs to a BackendService resource:
5859	// -
5860	// https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
5861	// - compute/v1/projects/project/global/backendServices/backendService
5862	//
5863	// - global/backendServices/backendService
5864	DefaultService string `json:"defaultService,omitempty"`
5865
5866	// Description: An optional description of this resource. Provide this
5867	// property when you create the resource.
5868	Description string `json:"description,omitempty"`
5869
5870	// Name: The name to which this PathMatcher is referred by the HostRule.
5871	Name string `json:"name,omitempty"`
5872
5873	// PathRules: The list of path rules.
5874	PathRules []*PathRule `json:"pathRules,omitempty"`
5875
5876	// ForceSendFields is a list of field names (e.g. "DefaultService") to
5877	// unconditionally include in API requests. By default, fields with
5878	// empty values are omitted from API requests. However, any non-pointer,
5879	// non-interface field appearing in ForceSendFields will be sent to the
5880	// server regardless of whether the field is empty or not. This may be
5881	// used to include empty fields in Patch requests.
5882	ForceSendFields []string `json:"-"`
5883}
5884
5885func (s *PathMatcher) MarshalJSON() ([]byte, error) {
5886	type noMethod PathMatcher
5887	raw := noMethod(*s)
5888	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5889}
5890
5891// PathRule: A path-matching rule for a URL. If matched, will use the
5892// specified BackendService to handle the traffic arriving at this URL.
5893type PathRule struct {
5894	// Paths: The list of path patterns to match. Each must start with / and
5895	// the only place a * is allowed is at the end following a /. The string
5896	// fed to the path matcher does not include any text after the first ?
5897	// or #, and those chars are not allowed here.
5898	Paths []string `json:"paths,omitempty"`
5899
5900	// Service: The URL of the BackendService resource if this rule is
5901	// matched.
5902	Service string `json:"service,omitempty"`
5903
5904	// ForceSendFields is a list of field names (e.g. "Paths") to
5905	// unconditionally include in API requests. By default, fields with
5906	// empty values are omitted from API requests. However, any non-pointer,
5907	// non-interface field appearing in ForceSendFields will be sent to the
5908	// server regardless of whether the field is empty or not. This may be
5909	// used to include empty fields in Patch requests.
5910	ForceSendFields []string `json:"-"`
5911}
5912
5913func (s *PathRule) MarshalJSON() ([]byte, error) {
5914	type noMethod PathRule
5915	raw := noMethod(*s)
5916	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5917}
5918
5919// Project: A Project resource. Projects can only be created in the
5920// Google Cloud Platform Console. Unless marked otherwise, values can
5921// only be modified in the console.
5922type Project struct {
5923	// CommonInstanceMetadata: Metadata key/value pairs available to all
5924	// instances contained in this project. See Custom metadata for more
5925	// information.
5926	CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"`
5927
5928	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
5929	// format.
5930	CreationTimestamp string `json:"creationTimestamp,omitempty"`
5931
5932	// Description: An optional textual description of the resource.
5933	Description string `json:"description,omitempty"`
5934
5935	// EnabledFeatures: Restricted features enabled for use on this project.
5936	EnabledFeatures []string `json:"enabledFeatures,omitempty"`
5937
5938	// Id: [Output Only] The unique identifier for the resource. This
5939	// identifier is defined by the server. This is not the project ID, and
5940	// is just a unique ID used by Compute Engine to identify resources.
5941	Id uint64 `json:"id,omitempty,string"`
5942
5943	// Kind: [Output Only] Type of the resource. Always compute#project for
5944	// projects.
5945	Kind string `json:"kind,omitempty"`
5946
5947	// Name: The project ID. For example: my-example-project. Use the
5948	// project ID to make requests to Compute Engine.
5949	Name string `json:"name,omitempty"`
5950
5951	// Quotas: [Output Only] Quotas assigned to this project.
5952	Quotas []*Quota `json:"quotas,omitempty"`
5953
5954	// SelfLink: [Output Only] Server-defined URL for the resource.
5955	SelfLink string `json:"selfLink,omitempty"`
5956
5957	// UsageExportLocation: The naming prefix for daily usage reports and
5958	// the Google Cloud Storage bucket where they are stored.
5959	UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"`
5960
5961	// ServerResponse contains the HTTP response code and headers from the
5962	// server.
5963	googleapi.ServerResponse `json:"-"`
5964
5965	// ForceSendFields is a list of field names (e.g.
5966	// "CommonInstanceMetadata") to unconditionally include in API requests.
5967	// By default, fields with empty values are omitted from API requests.
5968	// However, any non-pointer, non-interface field appearing in
5969	// ForceSendFields will be sent to the server regardless of whether the
5970	// field is empty or not. This may be used to include empty fields in
5971	// Patch requests.
5972	ForceSendFields []string `json:"-"`
5973}
5974
5975func (s *Project) MarshalJSON() ([]byte, error) {
5976	type noMethod Project
5977	raw := noMethod(*s)
5978	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5979}
5980
5981// Quota: A quotas entry.
5982type Quota struct {
5983	// Limit: [Output Only] Quota limit for this metric.
5984	Limit float64 `json:"limit,omitempty"`
5985
5986	// Metric: [Output Only] Name of the quota metric.
5987	//
5988	// Possible values:
5989	//   "AUTOSCALERS"
5990	//   "BACKEND_SERVICES"
5991	//   "CPUS"
5992	//   "DISKS_TOTAL_GB"
5993	//   "FIREWALLS"
5994	//   "FORWARDING_RULES"
5995	//   "HEALTH_CHECKS"
5996	//   "IMAGES"
5997	//   "INSTANCES"
5998	//   "INSTANCE_GROUPS"
5999	//   "INSTANCE_GROUP_MANAGERS"
6000	//   "INSTANCE_TEMPLATES"
6001	//   "IN_USE_ADDRESSES"
6002	//   "LOCAL_SSD_TOTAL_GB"
6003	//   "NETWORKS"
6004	//   "ROUTES"
6005	//   "SNAPSHOTS"
6006	//   "SSD_TOTAL_GB"
6007	//   "SSL_CERTIFICATES"
6008	//   "STATIC_ADDRESSES"
6009	//   "SUBNETWORKS"
6010	//   "TARGET_HTTPS_PROXIES"
6011	//   "TARGET_HTTP_PROXIES"
6012	//   "TARGET_INSTANCES"
6013	//   "TARGET_POOLS"
6014	//   "TARGET_VPN_GATEWAYS"
6015	//   "URL_MAPS"
6016	//   "VPN_TUNNELS"
6017	Metric string `json:"metric,omitempty"`
6018
6019	// Usage: [Output Only] Current usage of this metric.
6020	Usage float64 `json:"usage,omitempty"`
6021
6022	// ForceSendFields is a list of field names (e.g. "Limit") to
6023	// unconditionally include in API requests. By default, fields with
6024	// empty values are omitted from API requests. However, any non-pointer,
6025	// non-interface field appearing in ForceSendFields will be sent to the
6026	// server regardless of whether the field is empty or not. This may be
6027	// used to include empty fields in Patch requests.
6028	ForceSendFields []string `json:"-"`
6029}
6030
6031func (s *Quota) MarshalJSON() ([]byte, error) {
6032	type noMethod Quota
6033	raw := noMethod(*s)
6034	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6035}
6036
6037// Region: Region resource.
6038type Region struct {
6039	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6040	// format.
6041	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6042
6043	// Deprecated: [Output Only] The deprecation status associated with this
6044	// region.
6045	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
6046
6047	// Description: [Output Only] Textual description of the resource.
6048	Description string `json:"description,omitempty"`
6049
6050	// Id: [Output Only] The unique identifier for the resource. This
6051	// identifier is defined by the server.
6052	Id uint64 `json:"id,omitempty,string"`
6053
6054	// Kind: [Output Only] Type of the resource. Always compute#region for
6055	// regions.
6056	Kind string `json:"kind,omitempty"`
6057
6058	// Name: [Output Only] Name of the resource.
6059	Name string `json:"name,omitempty"`
6060
6061	// Quotas: [Output Only] Quotas assigned to this region.
6062	Quotas []*Quota `json:"quotas,omitempty"`
6063
6064	// SelfLink: [Output Only] Server-defined URL for the resource.
6065	SelfLink string `json:"selfLink,omitempty"`
6066
6067	// Status: [Output Only] Status of the region, either UP or DOWN.
6068	//
6069	// Possible values:
6070	//   "DOWN"
6071	//   "UP"
6072	Status string `json:"status,omitempty"`
6073
6074	// Zones: [Output Only] A list of zones available in this region, in the
6075	// form of resource URLs.
6076	Zones []string `json:"zones,omitempty"`
6077
6078	// ServerResponse contains the HTTP response code and headers from the
6079	// server.
6080	googleapi.ServerResponse `json:"-"`
6081
6082	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
6083	// to unconditionally include in API requests. By default, fields with
6084	// empty values are omitted from API requests. However, any non-pointer,
6085	// non-interface field appearing in ForceSendFields will be sent to the
6086	// server regardless of whether the field is empty or not. This may be
6087	// used to include empty fields in Patch requests.
6088	ForceSendFields []string `json:"-"`
6089}
6090
6091func (s *Region) MarshalJSON() ([]byte, error) {
6092	type noMethod Region
6093	raw := noMethod(*s)
6094	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6095}
6096
6097// RegionList: Contains a list of region resources.
6098type RegionList struct {
6099	// Id: [Output Only] The unique identifier for the resource. This
6100	// identifier is defined by the server.
6101	Id string `json:"id,omitempty"`
6102
6103	// Items: [Output Only] A list of Region resources.
6104	Items []*Region `json:"items,omitempty"`
6105
6106	// Kind: [Output Only] Type of resource. Always compute#regionList for
6107	// lists of regions.
6108	Kind string `json:"kind,omitempty"`
6109
6110	// NextPageToken: [Output Only] This token allows you to get the next
6111	// page of results for list requests. If the number of results is larger
6112	// than maxResults, use the nextPageToken as a value for the query
6113	// parameter pageToken in the next list request. Subsequent list
6114	// requests will have their own nextPageToken to continue paging through
6115	// the results.
6116	NextPageToken string `json:"nextPageToken,omitempty"`
6117
6118	// SelfLink: [Output Only] Server-defined URL for this resource.
6119	SelfLink string `json:"selfLink,omitempty"`
6120
6121	// ServerResponse contains the HTTP response code and headers from the
6122	// server.
6123	googleapi.ServerResponse `json:"-"`
6124
6125	// ForceSendFields is a list of field names (e.g. "Id") to
6126	// unconditionally include in API requests. By default, fields with
6127	// empty values are omitted from API requests. However, any non-pointer,
6128	// non-interface field appearing in ForceSendFields will be sent to the
6129	// server regardless of whether the field is empty or not. This may be
6130	// used to include empty fields in Patch requests.
6131	ForceSendFields []string `json:"-"`
6132}
6133
6134func (s *RegionList) MarshalJSON() ([]byte, error) {
6135	type noMethod RegionList
6136	raw := noMethod(*s)
6137	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6138}
6139
6140type ResourceGroupReference struct {
6141	// Group: A URI referencing one of the resource views listed in the
6142	// backend service.
6143	Group string `json:"group,omitempty"`
6144
6145	// ForceSendFields is a list of field names (e.g. "Group") to
6146	// unconditionally include in API requests. By default, fields with
6147	// empty values are omitted from API requests. However, any non-pointer,
6148	// non-interface field appearing in ForceSendFields will be sent to the
6149	// server regardless of whether the field is empty or not. This may be
6150	// used to include empty fields in Patch requests.
6151	ForceSendFields []string `json:"-"`
6152}
6153
6154func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) {
6155	type noMethod ResourceGroupReference
6156	raw := noMethod(*s)
6157	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6158}
6159
6160// Route: Represents a Route resource. A route specifies how certain
6161// packets should be handled by the network. Routes are associated with
6162// instances by tags and the set of routes for a particular instance is
6163// called its routing table.
6164//
6165// For each packet leaving a instance, the system searches that
6166// instance's routing table for a single best matching route. Routes
6167// match packets by destination IP address, preferring smaller or more
6168// specific ranges over larger ones. If there is a tie, the system
6169// selects the route with the smallest priority value. If there is still
6170// a tie, it uses the layer three and four packet headers to select just
6171// one of the remaining matching routes. The packet is then forwarded as
6172// specified by the nextHop field of the winning route - either to
6173// another instance destination, a instance gateway or a Google Compute
6174// Engine-operated gateway.
6175//
6176// Packets that do not match any route in the sending instance's routing
6177// table are dropped.
6178type Route struct {
6179	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6180	// format.
6181	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6182
6183	// Description: An optional description of this resource. Provide this
6184	// property when you create the resource.
6185	Description string `json:"description,omitempty"`
6186
6187	// DestRange: The destination range of outgoing packets that this route
6188	// applies to.
6189	DestRange string `json:"destRange,omitempty"`
6190
6191	// Id: [Output Only] The unique identifier for the resource. This
6192	// identifier is defined by the server.
6193	Id uint64 `json:"id,omitempty,string"`
6194
6195	// Kind: [Output Only] Type of this resource. Always compute#routes for
6196	// Route resources.
6197	Kind string `json:"kind,omitempty"`
6198
6199	// Name: Name of the resource. Provided by the client when the resource
6200	// is created. The name must be 1-63 characters long, and comply with
6201	// RFC1035. Specifically, the name must be 1-63 characters long and
6202	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
6203	// the first character must be a lowercase letter, and all following
6204	// characters must be a dash, lowercase letter, or digit, except the
6205	// last character, which cannot be a dash.
6206	Name string `json:"name,omitempty"`
6207
6208	// Network: Fully-qualified URL of the network that this route applies
6209	// to.
6210	Network string `json:"network,omitempty"`
6211
6212	// NextHopGateway: The URL to a gateway that should handle matching
6213	// packets. You can only specify the internet gateway using a full or
6214	// partial valid URL:
6215	// projects/<project-id>/global/gateways/default-internet-gateway
6216	NextHopGateway string `json:"nextHopGateway,omitempty"`
6217
6218	// NextHopInstance: The URL to an instance that should handle matching
6219	// packets. You can specify this as a full or partial URL. For
6220	// example:
6221	// https://www.googleapis.com/compute/v1/projects/project/zones/
6222	// zone/instances/
6223	NextHopInstance string `json:"nextHopInstance,omitempty"`
6224
6225	// NextHopIp: The network IP address of an instance that should handle
6226	// matching packets.
6227	NextHopIp string `json:"nextHopIp,omitempty"`
6228
6229	// NextHopNetwork: The URL of the local network if it should handle
6230	// matching packets.
6231	NextHopNetwork string `json:"nextHopNetwork,omitempty"`
6232
6233	// NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching
6234	// packets.
6235	NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"`
6236
6237	// Priority: The priority of this route. Priority is used to break ties
6238	// in cases where there is more than one matching route of equal prefix
6239	// length. In the case of two routes with equal prefix length, the one
6240	// with the lowest-numbered priority value wins. Default value is 1000.
6241	// Valid range is 0 through 65535.
6242	Priority int64 `json:"priority,omitempty"`
6243
6244	// SelfLink: [Output Only] Server-defined fully-qualified URL for this
6245	// resource.
6246	SelfLink string `json:"selfLink,omitempty"`
6247
6248	// Tags: A list of instance tags to which this route applies.
6249	Tags []string `json:"tags,omitempty"`
6250
6251	// Warnings: [Output Only] If potential misconfigurations are detected
6252	// for this route, this field will be populated with warning messages.
6253	Warnings []*RouteWarnings `json:"warnings,omitempty"`
6254
6255	// ServerResponse contains the HTTP response code and headers from the
6256	// server.
6257	googleapi.ServerResponse `json:"-"`
6258
6259	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
6260	// to unconditionally include in API requests. By default, fields with
6261	// empty values are omitted from API requests. However, any non-pointer,
6262	// non-interface field appearing in ForceSendFields will be sent to the
6263	// server regardless of whether the field is empty or not. This may be
6264	// used to include empty fields in Patch requests.
6265	ForceSendFields []string `json:"-"`
6266}
6267
6268func (s *Route) MarshalJSON() ([]byte, error) {
6269	type noMethod Route
6270	raw := noMethod(*s)
6271	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6272}
6273
6274type RouteWarnings struct {
6275	// Code: [Output Only] A warning code, if applicable. For example,
6276	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
6277	// the response.
6278	//
6279	// Possible values:
6280	//   "CLEANUP_FAILED"
6281	//   "DEPRECATED_RESOURCE_USED"
6282	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
6283	//   "INJECTED_KERNELS_DEPRECATED"
6284	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
6285	//   "NEXT_HOP_CANNOT_IP_FORWARD"
6286	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
6287	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
6288	//   "NEXT_HOP_NOT_RUNNING"
6289	//   "NOT_CRITICAL_ERROR"
6290	//   "NO_RESULTS_ON_PAGE"
6291	//   "REQUIRED_TOS_AGREEMENT"
6292	//   "RESOURCE_NOT_DELETED"
6293	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
6294	//   "UNREACHABLE"
6295	Code string `json:"code,omitempty"`
6296
6297	// Data: [Output Only] Metadata about this warning in key: value format.
6298	// For example:
6299	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6300	Data []*RouteWarningsData `json:"data,omitempty"`
6301
6302	// Message: [Output Only] A human-readable description of the warning
6303	// code.
6304	Message string `json:"message,omitempty"`
6305
6306	// ForceSendFields is a list of field names (e.g. "Code") to
6307	// unconditionally include in API requests. By default, fields with
6308	// empty values are omitted from API requests. However, any non-pointer,
6309	// non-interface field appearing in ForceSendFields will be sent to the
6310	// server regardless of whether the field is empty or not. This may be
6311	// used to include empty fields in Patch requests.
6312	ForceSendFields []string `json:"-"`
6313}
6314
6315func (s *RouteWarnings) MarshalJSON() ([]byte, error) {
6316	type noMethod RouteWarnings
6317	raw := noMethod(*s)
6318	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6319}
6320
6321type RouteWarningsData struct {
6322	// Key: [Output Only] A key that provides more detail on the warning
6323	// being returned. For example, for warnings where there are no results
6324	// in a list request for a particular zone, this key might be scope and
6325	// the key value might be the zone name. Other examples might be a key
6326	// indicating a deprecated resource and a suggested replacement, or a
6327	// warning about invalid network settings (for example, if an instance
6328	// attempts to perform IP forwarding but is not enabled for IP
6329	// forwarding).
6330	Key string `json:"key,omitempty"`
6331
6332	// Value: [Output Only] A warning data value corresponding to the key.
6333	Value string `json:"value,omitempty"`
6334
6335	// ForceSendFields is a list of field names (e.g. "Key") to
6336	// unconditionally include in API requests. By default, fields with
6337	// empty values are omitted from API requests. However, any non-pointer,
6338	// non-interface field appearing in ForceSendFields will be sent to the
6339	// server regardless of whether the field is empty or not. This may be
6340	// used to include empty fields in Patch requests.
6341	ForceSendFields []string `json:"-"`
6342}
6343
6344func (s *RouteWarningsData) MarshalJSON() ([]byte, error) {
6345	type noMethod RouteWarningsData
6346	raw := noMethod(*s)
6347	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6348}
6349
6350// RouteList: Contains a list of Route resources.
6351type RouteList struct {
6352	// Id: [Output Only] Unique identifier for the resource. Defined by the
6353	// server.
6354	Id string `json:"id,omitempty"`
6355
6356	// Items: [Output Only] A list of Route resources.
6357	Items []*Route `json:"items,omitempty"`
6358
6359	// Kind: Type of resource.
6360	Kind string `json:"kind,omitempty"`
6361
6362	// NextPageToken: [Output Only] This token allows you to get the next
6363	// page of results for list requests. If the number of results is larger
6364	// than maxResults, use the nextPageToken as a value for the query
6365	// parameter pageToken in the next list request. Subsequent list
6366	// requests will have their own nextPageToken to continue paging through
6367	// the results.
6368	NextPageToken string `json:"nextPageToken,omitempty"`
6369
6370	// SelfLink: [Output Only] Server-defined URL for this resource.
6371	SelfLink string `json:"selfLink,omitempty"`
6372
6373	// ServerResponse contains the HTTP response code and headers from the
6374	// server.
6375	googleapi.ServerResponse `json:"-"`
6376
6377	// ForceSendFields is a list of field names (e.g. "Id") to
6378	// unconditionally include in API requests. By default, fields with
6379	// empty values are omitted from API requests. However, any non-pointer,
6380	// non-interface field appearing in ForceSendFields will be sent to the
6381	// server regardless of whether the field is empty or not. This may be
6382	// used to include empty fields in Patch requests.
6383	ForceSendFields []string `json:"-"`
6384}
6385
6386func (s *RouteList) MarshalJSON() ([]byte, error) {
6387	type noMethod RouteList
6388	raw := noMethod(*s)
6389	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6390}
6391
6392// Scheduling: Sets the scheduling options for an Instance.
6393type Scheduling struct {
6394	// AutomaticRestart: Specifies whether the instance should be
6395	// automatically restarted if it is terminated by Compute Engine (not
6396	// terminated by a user). You can only set the automatic restart option
6397	// for standard instances. Preemptible instances cannot be automatically
6398	// restarted.
6399	AutomaticRestart bool `json:"automaticRestart,omitempty"`
6400
6401	// OnHostMaintenance: Defines the maintenance behavior for this
6402	// instance. For standard instances, the default behavior is MIGRATE.
6403	// For preemptible instances, the default and only possible behavior is
6404	// TERMINATE. For more information, see Setting Instance Scheduling
6405	// Options.
6406	//
6407	// Possible values:
6408	//   "MIGRATE"
6409	//   "TERMINATE"
6410	OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
6411
6412	// Preemptible: Whether the instance is preemptible.
6413	Preemptible bool `json:"preemptible,omitempty"`
6414
6415	// ForceSendFields is a list of field names (e.g. "AutomaticRestart") to
6416	// unconditionally include in API requests. By default, fields with
6417	// empty values are omitted from API requests. However, any non-pointer,
6418	// non-interface field appearing in ForceSendFields will be sent to the
6419	// server regardless of whether the field is empty or not. This may be
6420	// used to include empty fields in Patch requests.
6421	ForceSendFields []string `json:"-"`
6422}
6423
6424func (s *Scheduling) MarshalJSON() ([]byte, error) {
6425	type noMethod Scheduling
6426	raw := noMethod(*s)
6427	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6428}
6429
6430// SerialPortOutput: An instance's serial console output.
6431type SerialPortOutput struct {
6432	// Contents: [Output Only] The contents of the console output.
6433	Contents string `json:"contents,omitempty"`
6434
6435	// Kind: [Output Only] Type of the resource. Always
6436	// compute#serialPortOutput for serial port output.
6437	Kind string `json:"kind,omitempty"`
6438
6439	// SelfLink: [Output Only] Server-defined URL for the resource.
6440	SelfLink string `json:"selfLink,omitempty"`
6441
6442	// ServerResponse contains the HTTP response code and headers from the
6443	// server.
6444	googleapi.ServerResponse `json:"-"`
6445
6446	// ForceSendFields is a list of field names (e.g. "Contents") to
6447	// unconditionally include in API requests. By default, fields with
6448	// empty values are omitted from API requests. However, any non-pointer,
6449	// non-interface field appearing in ForceSendFields will be sent to the
6450	// server regardless of whether the field is empty or not. This may be
6451	// used to include empty fields in Patch requests.
6452	ForceSendFields []string `json:"-"`
6453}
6454
6455func (s *SerialPortOutput) MarshalJSON() ([]byte, error) {
6456	type noMethod SerialPortOutput
6457	raw := noMethod(*s)
6458	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6459}
6460
6461// ServiceAccount: A service account.
6462type ServiceAccount struct {
6463	// Email: Email address of the service account.
6464	Email string `json:"email,omitempty"`
6465
6466	// Scopes: The list of scopes to be made available for this service
6467	// account.
6468	Scopes []string `json:"scopes,omitempty"`
6469
6470	// ForceSendFields is a list of field names (e.g. "Email") to
6471	// unconditionally include in API requests. By default, fields with
6472	// empty values are omitted from API requests. However, any non-pointer,
6473	// non-interface field appearing in ForceSendFields will be sent to the
6474	// server regardless of whether the field is empty or not. This may be
6475	// used to include empty fields in Patch requests.
6476	ForceSendFields []string `json:"-"`
6477}
6478
6479func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
6480	type noMethod ServiceAccount
6481	raw := noMethod(*s)
6482	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6483}
6484
6485// Snapshot: A persistent disk snapshot resource.
6486type Snapshot struct {
6487	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6488	// format.
6489	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6490
6491	// Description: An optional description of this resource. Provide this
6492	// property when you create the resource.
6493	Description string `json:"description,omitempty"`
6494
6495	// DiskSizeGb: [Output Only] Size of the snapshot, specified in GB.
6496	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
6497
6498	// Id: [Output Only] The unique identifier for the resource. This
6499	// identifier is defined by the server.
6500	Id uint64 `json:"id,omitempty,string"`
6501
6502	// Kind: [Output Only] Type of the resource. Always compute#snapshot for
6503	// Snapshot resources.
6504	Kind string `json:"kind,omitempty"`
6505
6506	// Licenses: [Output Only] A list of public visible licenses that apply
6507	// to this snapshot. This can be because the original image had licenses
6508	// attached (such as a Windows image).
6509	Licenses []string `json:"licenses,omitempty"`
6510
6511	// Name: Name of the resource; provided by the client when the resource
6512	// is created. The name must be 1-63 characters long, and comply with
6513	// RFC1035. Specifically, the name must be 1-63 characters long and
6514	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
6515	// the first character must be a lowercase letter, and all following
6516	// characters must be a dash, lowercase letter, or digit, except the
6517	// last character, which cannot be a dash.
6518	Name string `json:"name,omitempty"`
6519
6520	// SelfLink: [Output Only] Server-defined URL for the resource.
6521	SelfLink string `json:"selfLink,omitempty"`
6522
6523	// SourceDisk: [Output Only] The source disk used to create this
6524	// snapshot.
6525	SourceDisk string `json:"sourceDisk,omitempty"`
6526
6527	// SourceDiskId: [Output Only] The ID value of the disk used to create
6528	// this snapshot. This value may be used to determine whether the
6529	// snapshot was taken from the current or a previous instance of a given
6530	// disk name.
6531	SourceDiskId string `json:"sourceDiskId,omitempty"`
6532
6533	// Status: [Output Only] The status of the snapshot. This can be
6534	// CREATING, DELETING, FAILED, READY, or UPLOADING.
6535	//
6536	// Possible values:
6537	//   "CREATING"
6538	//   "DELETING"
6539	//   "FAILED"
6540	//   "READY"
6541	//   "UPLOADING"
6542	Status string `json:"status,omitempty"`
6543
6544	// StorageBytes: [Output Only] A size of the the storage used by the
6545	// snapshot. As snapshots share storage, this number is expected to
6546	// change with snapshot creation/deletion.
6547	StorageBytes int64 `json:"storageBytes,omitempty,string"`
6548
6549	// StorageBytesStatus: [Output Only] An indicator whether storageBytes
6550	// is in a stable state or it is being adjusted as a result of shared
6551	// storage reallocation. This status can either be UPDATING, meaning the
6552	// size of the snapshot is being updated, or UP_TO_DATE, meaning the
6553	// size of the snapshot is up-to-date.
6554	//
6555	// Possible values:
6556	//   "UPDATING"
6557	//   "UP_TO_DATE"
6558	StorageBytesStatus string `json:"storageBytesStatus,omitempty"`
6559
6560	// ServerResponse contains the HTTP response code and headers from the
6561	// server.
6562	googleapi.ServerResponse `json:"-"`
6563
6564	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
6565	// to unconditionally include in API requests. By default, fields with
6566	// empty values are omitted from API requests. However, any non-pointer,
6567	// non-interface field appearing in ForceSendFields will be sent to the
6568	// server regardless of whether the field is empty or not. This may be
6569	// used to include empty fields in Patch requests.
6570	ForceSendFields []string `json:"-"`
6571}
6572
6573func (s *Snapshot) MarshalJSON() ([]byte, error) {
6574	type noMethod Snapshot
6575	raw := noMethod(*s)
6576	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6577}
6578
6579// SnapshotList: Contains a list of Snapshot resources.
6580type SnapshotList struct {
6581	// Id: [Output Only] The unique identifier for the resource. This
6582	// identifier is defined by the server.
6583	Id string `json:"id,omitempty"`
6584
6585	// Items: [Output Only] A list of Snapshot resources.
6586	Items []*Snapshot `json:"items,omitempty"`
6587
6588	// Kind: Type of resource.
6589	Kind string `json:"kind,omitempty"`
6590
6591	// NextPageToken: [Output Only] This token allows you to get the next
6592	// page of results for list requests. If the number of results is larger
6593	// than maxResults, use the nextPageToken as a value for the query
6594	// parameter pageToken in the next list request. Subsequent list
6595	// requests will have their own nextPageToken to continue paging through
6596	// the results.
6597	NextPageToken string `json:"nextPageToken,omitempty"`
6598
6599	// SelfLink: [Output Only] Server-defined URL for this resource.
6600	SelfLink string `json:"selfLink,omitempty"`
6601
6602	// ServerResponse contains the HTTP response code and headers from the
6603	// server.
6604	googleapi.ServerResponse `json:"-"`
6605
6606	// ForceSendFields is a list of field names (e.g. "Id") to
6607	// unconditionally include in API requests. By default, fields with
6608	// empty values are omitted from API requests. However, any non-pointer,
6609	// non-interface field appearing in ForceSendFields will be sent to the
6610	// server regardless of whether the field is empty or not. This may be
6611	// used to include empty fields in Patch requests.
6612	ForceSendFields []string `json:"-"`
6613}
6614
6615func (s *SnapshotList) MarshalJSON() ([]byte, error) {
6616	type noMethod SnapshotList
6617	raw := noMethod(*s)
6618	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6619}
6620
6621// SslCertificate: An SslCertificate resource. This resource provides a
6622// mechanism to upload an SSL key and certificate to the load balancer
6623// to serve secure connections from the user.
6624type SslCertificate struct {
6625	// Certificate: A local certificate file. The certificate must be in PEM
6626	// format. The certificate chain must be no greater than 5 certs long.
6627	// The chain must include at least one intermediate cert.
6628	Certificate string `json:"certificate,omitempty"`
6629
6630	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6631	// format.
6632	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6633
6634	// Description: An optional description of this resource. Provide this
6635	// property when you create the resource.
6636	Description string `json:"description,omitempty"`
6637
6638	// Id: [Output Only] The unique identifier for the resource. This
6639	// identifier is defined by the server.
6640	Id uint64 `json:"id,omitempty,string"`
6641
6642	// Kind: [Output Only] Type of the resource. Always
6643	// compute#sslCertificate for SSL certificates.
6644	Kind string `json:"kind,omitempty"`
6645
6646	// Name: Name of the resource. Provided by the client when the resource
6647	// is created. The name must be 1-63 characters long, and comply with
6648	// RFC1035. Specifically, the name must be 1-63 characters long and
6649	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
6650	// the first character must be a lowercase letter, and all following
6651	// characters must be a dash, lowercase letter, or digit, except the
6652	// last character, which cannot be a dash.
6653	Name string `json:"name,omitempty"`
6654
6655	// PrivateKey: A write-only private key in PEM format. Only insert RPCs
6656	// will include this field.
6657	PrivateKey string `json:"privateKey,omitempty"`
6658
6659	// SelfLink: [Output only] Server-defined URL for the resource.
6660	SelfLink string `json:"selfLink,omitempty"`
6661
6662	// ServerResponse contains the HTTP response code and headers from the
6663	// server.
6664	googleapi.ServerResponse `json:"-"`
6665
6666	// ForceSendFields is a list of field names (e.g. "Certificate") to
6667	// unconditionally include in API requests. By default, fields with
6668	// empty values are omitted from API requests. However, any non-pointer,
6669	// non-interface field appearing in ForceSendFields will be sent to the
6670	// server regardless of whether the field is empty or not. This may be
6671	// used to include empty fields in Patch requests.
6672	ForceSendFields []string `json:"-"`
6673}
6674
6675func (s *SslCertificate) MarshalJSON() ([]byte, error) {
6676	type noMethod SslCertificate
6677	raw := noMethod(*s)
6678	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6679}
6680
6681// SslCertificateList: Contains a list of SslCertificate resources.
6682type SslCertificateList struct {
6683	// Id: [Output Only] Unique identifier for the resource. Defined by the
6684	// server.
6685	Id string `json:"id,omitempty"`
6686
6687	// Items: A list of SslCertificate resources.
6688	Items []*SslCertificate `json:"items,omitempty"`
6689
6690	// Kind: Type of resource.
6691	Kind string `json:"kind,omitempty"`
6692
6693	// NextPageToken: [Output Only] This token allows you to get the next
6694	// page of results for list requests. If the number of results is larger
6695	// than maxResults, use the nextPageToken as a value for the query
6696	// parameter pageToken in the next list request. Subsequent list
6697	// requests will have their own nextPageToken to continue paging through
6698	// the results.
6699	NextPageToken string `json:"nextPageToken,omitempty"`
6700
6701	// SelfLink: [Output Only] Server-defined URL for this resource.
6702	SelfLink string `json:"selfLink,omitempty"`
6703
6704	// ServerResponse contains the HTTP response code and headers from the
6705	// server.
6706	googleapi.ServerResponse `json:"-"`
6707
6708	// ForceSendFields is a list of field names (e.g. "Id") to
6709	// unconditionally include in API requests. By default, fields with
6710	// empty values are omitted from API requests. However, any non-pointer,
6711	// non-interface field appearing in ForceSendFields will be sent to the
6712	// server regardless of whether the field is empty or not. This may be
6713	// used to include empty fields in Patch requests.
6714	ForceSendFields []string `json:"-"`
6715}
6716
6717func (s *SslCertificateList) MarshalJSON() ([]byte, error) {
6718	type noMethod SslCertificateList
6719	raw := noMethod(*s)
6720	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6721}
6722
6723// Subnetwork: A Subnetwork resource.
6724type Subnetwork struct {
6725	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6726	// format.
6727	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6728
6729	// Description: An optional description of this resource. Provide this
6730	// property when you create the resource.
6731	Description string `json:"description,omitempty"`
6732
6733	// GatewayAddress: [Output Only] The gateway address for default routes
6734	// to reach destination addresses outside this subnetwork.
6735	GatewayAddress string `json:"gatewayAddress,omitempty"`
6736
6737	// Id: [Output Only] The unique identifier for the resource. This
6738	// identifier is defined by the server.
6739	Id uint64 `json:"id,omitempty,string"`
6740
6741	// IpCidrRange: The range of internal addresses that are owned by this
6742	// subnetwork. Provide this property when you create the subnetwork. For
6743	// example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
6744	// non-overlapping within a network.
6745	IpCidrRange string `json:"ipCidrRange,omitempty"`
6746
6747	// Kind: [Output Only] Type of the resource. Always compute#subnetwork
6748	// for Subnetwork resources.
6749	Kind string `json:"kind,omitempty"`
6750
6751	// Name: The name of the resource, provided by the client when initially
6752	// creating the resource. The name must be 1-63 characters long, and
6753	// comply with RFC1035. Specifically, the name must be 1-63 characters
6754	// long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?
6755	// which means the first character must be a lowercase letter, and all
6756	// following characters must be a dash, lowercase letter, or digit,
6757	// except the last character, which cannot be a dash.
6758	Name string `json:"name,omitempty"`
6759
6760	// Network: The URL of the network to which this subnetwork belongs,
6761	// provided by the client when initially creating the subnetwork. Only
6762	// networks that are in the distributed mode can have subnetworks.
6763	Network string `json:"network,omitempty"`
6764
6765	// Region: [Output Only] URL of the region where the Subnetwork resides.
6766	Region string `json:"region,omitempty"`
6767
6768	// SelfLink: [Output Only] Server-defined URL for the resource.
6769	SelfLink string `json:"selfLink,omitempty"`
6770
6771	// ServerResponse contains the HTTP response code and headers from the
6772	// server.
6773	googleapi.ServerResponse `json:"-"`
6774
6775	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
6776	// to unconditionally include in API requests. By default, fields with
6777	// empty values are omitted from API requests. However, any non-pointer,
6778	// non-interface field appearing in ForceSendFields will be sent to the
6779	// server regardless of whether the field is empty or not. This may be
6780	// used to include empty fields in Patch requests.
6781	ForceSendFields []string `json:"-"`
6782}
6783
6784func (s *Subnetwork) MarshalJSON() ([]byte, error) {
6785	type noMethod Subnetwork
6786	raw := noMethod(*s)
6787	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6788}
6789
6790type SubnetworkAggregatedList struct {
6791	// Id: [Output Only] The unique identifier for the resource. This
6792	// identifier is defined by the server.
6793	Id string `json:"id,omitempty"`
6794
6795	// Items: [Output] A map of scoped Subnetwork lists.
6796	Items map[string]SubnetworksScopedList `json:"items,omitempty"`
6797
6798	// Kind: [Output Only] Type of resource. Always
6799	// compute#subnetworkAggregatedList for aggregated lists of subnetworks.
6800	Kind string `json:"kind,omitempty"`
6801
6802	// NextPageToken: [Output Only] This token allows you to get the next
6803	// page of results for list requests. If the number of results is larger
6804	// than maxResults, use the nextPageToken as a value for the query
6805	// parameter pageToken in the next list request. Subsequent list
6806	// requests will have their own nextPageToken to continue paging through
6807	// the results.
6808	NextPageToken string `json:"nextPageToken,omitempty"`
6809
6810	// SelfLink: [Output Only] Server-defined URL for this resource.
6811	SelfLink string `json:"selfLink,omitempty"`
6812
6813	// ServerResponse contains the HTTP response code and headers from the
6814	// server.
6815	googleapi.ServerResponse `json:"-"`
6816
6817	// ForceSendFields is a list of field names (e.g. "Id") to
6818	// unconditionally include in API requests. By default, fields with
6819	// empty values are omitted from API requests. However, any non-pointer,
6820	// non-interface field appearing in ForceSendFields will be sent to the
6821	// server regardless of whether the field is empty or not. This may be
6822	// used to include empty fields in Patch requests.
6823	ForceSendFields []string `json:"-"`
6824}
6825
6826func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) {
6827	type noMethod SubnetworkAggregatedList
6828	raw := noMethod(*s)
6829	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6830}
6831
6832// SubnetworkList: Contains a list of Subnetwork resources.
6833type SubnetworkList struct {
6834	// Id: [Output Only] The unique identifier for the resource. This
6835	// identifier is defined by the server.
6836	Id string `json:"id,omitempty"`
6837
6838	// Items: The Subnetwork resources.
6839	Items []*Subnetwork `json:"items,omitempty"`
6840
6841	// Kind: [Output Only] Type of resource. Always compute#subnetworkList
6842	// for lists of subnetworks.
6843	Kind string `json:"kind,omitempty"`
6844
6845	// NextPageToken: [Output Only] This token allows you to get the next
6846	// page of results for list requests. If the number of results is larger
6847	// than maxResults, use the nextPageToken as a value for the query
6848	// parameter pageToken in the next list request. Subsequent list
6849	// requests will have their own nextPageToken to continue paging through
6850	// the results.
6851	NextPageToken string `json:"nextPageToken,omitempty"`
6852
6853	// SelfLink: [Output Only] Server-defined URL for this resource.
6854	SelfLink string `json:"selfLink,omitempty"`
6855
6856	// ServerResponse contains the HTTP response code and headers from the
6857	// server.
6858	googleapi.ServerResponse `json:"-"`
6859
6860	// ForceSendFields is a list of field names (e.g. "Id") to
6861	// unconditionally include in API requests. By default, fields with
6862	// empty values are omitted from API requests. However, any non-pointer,
6863	// non-interface field appearing in ForceSendFields will be sent to the
6864	// server regardless of whether the field is empty or not. This may be
6865	// used to include empty fields in Patch requests.
6866	ForceSendFields []string `json:"-"`
6867}
6868
6869func (s *SubnetworkList) MarshalJSON() ([]byte, error) {
6870	type noMethod SubnetworkList
6871	raw := noMethod(*s)
6872	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6873}
6874
6875type SubnetworksScopedList struct {
6876	// Subnetworks: List of subnetworks contained in this scope.
6877	Subnetworks []*Subnetwork `json:"subnetworks,omitempty"`
6878
6879	// Warning: An informational warning that appears when the list of
6880	// addresses is empty.
6881	Warning *SubnetworksScopedListWarning `json:"warning,omitempty"`
6882
6883	// ForceSendFields is a list of field names (e.g. "Subnetworks") to
6884	// unconditionally include in API requests. By default, fields with
6885	// empty values are omitted from API requests. However, any non-pointer,
6886	// non-interface field appearing in ForceSendFields will be sent to the
6887	// server regardless of whether the field is empty or not. This may be
6888	// used to include empty fields in Patch requests.
6889	ForceSendFields []string `json:"-"`
6890}
6891
6892func (s *SubnetworksScopedList) MarshalJSON() ([]byte, error) {
6893	type noMethod SubnetworksScopedList
6894	raw := noMethod(*s)
6895	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6896}
6897
6898// SubnetworksScopedListWarning: An informational warning that appears
6899// when the list of addresses is empty.
6900type SubnetworksScopedListWarning struct {
6901	// Code: [Output Only] A warning code, if applicable. For example,
6902	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
6903	// the response.
6904	//
6905	// Possible values:
6906	//   "CLEANUP_FAILED"
6907	//   "DEPRECATED_RESOURCE_USED"
6908	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
6909	//   "INJECTED_KERNELS_DEPRECATED"
6910	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
6911	//   "NEXT_HOP_CANNOT_IP_FORWARD"
6912	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
6913	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
6914	//   "NEXT_HOP_NOT_RUNNING"
6915	//   "NOT_CRITICAL_ERROR"
6916	//   "NO_RESULTS_ON_PAGE"
6917	//   "REQUIRED_TOS_AGREEMENT"
6918	//   "RESOURCE_NOT_DELETED"
6919	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
6920	//   "UNREACHABLE"
6921	Code string `json:"code,omitempty"`
6922
6923	// Data: [Output Only] Metadata about this warning in key: value format.
6924	// For example:
6925	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6926	Data []*SubnetworksScopedListWarningData `json:"data,omitempty"`
6927
6928	// Message: [Output Only] A human-readable description of the warning
6929	// code.
6930	Message string `json:"message,omitempty"`
6931
6932	// ForceSendFields is a list of field names (e.g. "Code") to
6933	// unconditionally include in API requests. By default, fields with
6934	// empty values are omitted from API requests. However, any non-pointer,
6935	// non-interface field appearing in ForceSendFields will be sent to the
6936	// server regardless of whether the field is empty or not. This may be
6937	// used to include empty fields in Patch requests.
6938	ForceSendFields []string `json:"-"`
6939}
6940
6941func (s *SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) {
6942	type noMethod SubnetworksScopedListWarning
6943	raw := noMethod(*s)
6944	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6945}
6946
6947type SubnetworksScopedListWarningData struct {
6948	// Key: [Output Only] A key that provides more detail on the warning
6949	// being returned. For example, for warnings where there are no results
6950	// in a list request for a particular zone, this key might be scope and
6951	// the key value might be the zone name. Other examples might be a key
6952	// indicating a deprecated resource and a suggested replacement, or a
6953	// warning about invalid network settings (for example, if an instance
6954	// attempts to perform IP forwarding but is not enabled for IP
6955	// forwarding).
6956	Key string `json:"key,omitempty"`
6957
6958	// Value: [Output Only] A warning data value corresponding to the key.
6959	Value string `json:"value,omitempty"`
6960
6961	// ForceSendFields is a list of field names (e.g. "Key") to
6962	// unconditionally include in API requests. By default, fields with
6963	// empty values are omitted from API requests. However, any non-pointer,
6964	// non-interface field appearing in ForceSendFields will be sent to the
6965	// server regardless of whether the field is empty or not. This may be
6966	// used to include empty fields in Patch requests.
6967	ForceSendFields []string `json:"-"`
6968}
6969
6970func (s *SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) {
6971	type noMethod SubnetworksScopedListWarningData
6972	raw := noMethod(*s)
6973	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6974}
6975
6976// Tags: A set of instance tags.
6977type Tags struct {
6978	// Fingerprint: Specifies a fingerprint for this request, which is
6979	// essentially a hash of the metadata's contents and used for optimistic
6980	// locking. The fingerprint is initially generated by Compute Engine and
6981	// changes after every request to modify or update metadata. You must
6982	// always provide an up-to-date fingerprint hash in order to update or
6983	// change metadata.
6984	//
6985	// To see the latest fingerprint, make get() request to the instance.
6986	Fingerprint string `json:"fingerprint,omitempty"`
6987
6988	// Items: An array of tags. Each tag must be 1-63 characters long, and
6989	// comply with RFC1035.
6990	Items []string `json:"items,omitempty"`
6991
6992	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
6993	// unconditionally include in API requests. By default, fields with
6994	// empty values are omitted from API requests. However, any non-pointer,
6995	// non-interface field appearing in ForceSendFields will be sent to the
6996	// server regardless of whether the field is empty or not. This may be
6997	// used to include empty fields in Patch requests.
6998	ForceSendFields []string `json:"-"`
6999}
7000
7001func (s *Tags) MarshalJSON() ([]byte, error) {
7002	type noMethod Tags
7003	raw := noMethod(*s)
7004	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7005}
7006
7007// TargetHttpProxy: A TargetHttpProxy resource. This resource defines an
7008// HTTP proxy.
7009type TargetHttpProxy struct {
7010	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7011	// format.
7012	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7013
7014	// Description: An optional description of this resource. Provide this
7015	// property when you create the resource.
7016	Description string `json:"description,omitempty"`
7017
7018	// Id: [Output Only] The unique identifier for the resource. This
7019	// identifier is defined by the server.
7020	Id uint64 `json:"id,omitempty,string"`
7021
7022	// Kind: [Output Only] Type of resource. Always compute#targetHttpProxy
7023	// for target HTTP proxies.
7024	Kind string `json:"kind,omitempty"`
7025
7026	// Name: Name of the resource. Provided by the client when the resource
7027	// is created. The name must be 1-63 characters long, and comply with
7028	// RFC1035. Specifically, the name must be 1-63 characters long and
7029	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
7030	// the first character must be a lowercase letter, and all following
7031	// characters must be a dash, lowercase letter, or digit, except the
7032	// last character, which cannot be a dash.
7033	Name string `json:"name,omitempty"`
7034
7035	// SelfLink: [Output Only] Server-defined URL for the resource.
7036	SelfLink string `json:"selfLink,omitempty"`
7037
7038	// UrlMap: URL to the UrlMap resource that defines the mapping from URL
7039	// to the BackendService.
7040	UrlMap string `json:"urlMap,omitempty"`
7041
7042	// ServerResponse contains the HTTP response code and headers from the
7043	// server.
7044	googleapi.ServerResponse `json:"-"`
7045
7046	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
7047	// to unconditionally include in API requests. By default, fields with
7048	// empty values are omitted from API requests. However, any non-pointer,
7049	// non-interface field appearing in ForceSendFields will be sent to the
7050	// server regardless of whether the field is empty or not. This may be
7051	// used to include empty fields in Patch requests.
7052	ForceSendFields []string `json:"-"`
7053}
7054
7055func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) {
7056	type noMethod TargetHttpProxy
7057	raw := noMethod(*s)
7058	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7059}
7060
7061// TargetHttpProxyList: A list of TargetHttpProxy resources.
7062type TargetHttpProxyList struct {
7063	// Id: [Output Only] The unique identifier for the resource. This
7064	// identifier is defined by the server.
7065	Id string `json:"id,omitempty"`
7066
7067	// Items: A list of TargetHttpProxy resources.
7068	Items []*TargetHttpProxy `json:"items,omitempty"`
7069
7070	// Kind: Type of resource. Always compute#targetHttpProxyList for lists
7071	// of target HTTP proxies.
7072	Kind string `json:"kind,omitempty"`
7073
7074	// NextPageToken: [Output Only] This token allows you to get the next
7075	// page of results for list requests. If the number of results is larger
7076	// than maxResults, use the nextPageToken as a value for the query
7077	// parameter pageToken in the next list request. Subsequent list
7078	// requests will have their own nextPageToken to continue paging through
7079	// the results.
7080	NextPageToken string `json:"nextPageToken,omitempty"`
7081
7082	// SelfLink: [Output Only] Server-defined URL for this resource.
7083	SelfLink string `json:"selfLink,omitempty"`
7084
7085	// ServerResponse contains the HTTP response code and headers from the
7086	// server.
7087	googleapi.ServerResponse `json:"-"`
7088
7089	// ForceSendFields is a list of field names (e.g. "Id") to
7090	// unconditionally include in API requests. By default, fields with
7091	// empty values are omitted from API requests. However, any non-pointer,
7092	// non-interface field appearing in ForceSendFields will be sent to the
7093	// server regardless of whether the field is empty or not. This may be
7094	// used to include empty fields in Patch requests.
7095	ForceSendFields []string `json:"-"`
7096}
7097
7098func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) {
7099	type noMethod TargetHttpProxyList
7100	raw := noMethod(*s)
7101	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7102}
7103
7104type TargetHttpsProxiesSetSslCertificatesRequest struct {
7105	// SslCertificates: New set of SslCertificate resources to associate
7106	// with this TargetHttpsProxy resource. Currently exactly one
7107	// SslCertificate resource must be specified.
7108	SslCertificates []string `json:"sslCertificates,omitempty"`
7109
7110	// ForceSendFields is a list of field names (e.g. "SslCertificates") to
7111	// unconditionally include in API requests. By default, fields with
7112	// empty values are omitted from API requests. However, any non-pointer,
7113	// non-interface field appearing in ForceSendFields will be sent to the
7114	// server regardless of whether the field is empty or not. This may be
7115	// used to include empty fields in Patch requests.
7116	ForceSendFields []string `json:"-"`
7117}
7118
7119func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) {
7120	type noMethod TargetHttpsProxiesSetSslCertificatesRequest
7121	raw := noMethod(*s)
7122	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7123}
7124
7125// TargetHttpsProxy: A TargetHttpsProxy resource. This resource defines
7126// an HTTPS proxy.
7127type TargetHttpsProxy struct {
7128	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7129	// format.
7130	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7131
7132	// Description: An optional description of this resource. Provide this
7133	// property when you create the resource.
7134	Description string `json:"description,omitempty"`
7135
7136	// Id: [Output Only] The unique identifier for the resource. This
7137	// identifier is defined by the server.
7138	Id uint64 `json:"id,omitempty,string"`
7139
7140	// Kind: [Output Only] Type of resource. Always compute#targetHttpsProxy
7141	// for target HTTPS proxies.
7142	Kind string `json:"kind,omitempty"`
7143
7144	// Name: Name of the resource. Provided by the client when the resource
7145	// is created. The name must be 1-63 characters long, and comply with
7146	// RFC1035. Specifically, the name must be 1-63 characters long and
7147	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
7148	// the first character must be a lowercase letter, and all following
7149	// characters must be a dash, lowercase letter, or digit, except the
7150	// last character, which cannot be a dash.
7151	Name string `json:"name,omitempty"`
7152
7153	// SelfLink: [Output Only] Server-defined URL for the resource.
7154	SelfLink string `json:"selfLink,omitempty"`
7155
7156	// SslCertificates: URLs to SslCertificate resources that are used to
7157	// authenticate connections between users and the load balancer.
7158	// Currently, exactly one SSL certificate must be specified.
7159	SslCertificates []string `json:"sslCertificates,omitempty"`
7160
7161	// UrlMap: A fully-qualified or valid partial URL to the UrlMap resource
7162	// that defines the mapping from URL to the BackendService. For example,
7163	// the following are all valid URLs for specifying a URL map:
7164	// -
7165	// https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map
7166	// - projects/project/global/urlMaps/url-map
7167	// - global/urlMaps/url-map
7168	UrlMap string `json:"urlMap,omitempty"`
7169
7170	// ServerResponse contains the HTTP response code and headers from the
7171	// server.
7172	googleapi.ServerResponse `json:"-"`
7173
7174	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
7175	// to unconditionally include in API requests. By default, fields with
7176	// empty values are omitted from API requests. However, any non-pointer,
7177	// non-interface field appearing in ForceSendFields will be sent to the
7178	// server regardless of whether the field is empty or not. This may be
7179	// used to include empty fields in Patch requests.
7180	ForceSendFields []string `json:"-"`
7181}
7182
7183func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) {
7184	type noMethod TargetHttpsProxy
7185	raw := noMethod(*s)
7186	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7187}
7188
7189// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources.
7190type TargetHttpsProxyList struct {
7191	// Id: [Output Only] The unique identifier for the resource. This
7192	// identifier is defined by the server.
7193	Id string `json:"id,omitempty"`
7194
7195	// Items: A list of TargetHttpsProxy resources.
7196	Items []*TargetHttpsProxy `json:"items,omitempty"`
7197
7198	// Kind: Type of resource. Always compute#targetHttpsProxyList for lists
7199	// of target HTTPS proxies.
7200	Kind string `json:"kind,omitempty"`
7201
7202	// NextPageToken: [Output Only] This token allows you to get the next
7203	// page of results for list requests. If the number of results is larger
7204	// than maxResults, use the nextPageToken as a value for the query
7205	// parameter pageToken in the next list request. Subsequent list
7206	// requests will have their own nextPageToken to continue paging through
7207	// the results.
7208	NextPageToken string `json:"nextPageToken,omitempty"`
7209
7210	// SelfLink: [Output Only] Server-defined URL for this resource.
7211	SelfLink string `json:"selfLink,omitempty"`
7212
7213	// ServerResponse contains the HTTP response code and headers from the
7214	// server.
7215	googleapi.ServerResponse `json:"-"`
7216
7217	// ForceSendFields is a list of field names (e.g. "Id") to
7218	// unconditionally include in API requests. By default, fields with
7219	// empty values are omitted from API requests. However, any non-pointer,
7220	// non-interface field appearing in ForceSendFields will be sent to the
7221	// server regardless of whether the field is empty or not. This may be
7222	// used to include empty fields in Patch requests.
7223	ForceSendFields []string `json:"-"`
7224}
7225
7226func (s *TargetHttpsProxyList) MarshalJSON() ([]byte, error) {
7227	type noMethod TargetHttpsProxyList
7228	raw := noMethod(*s)
7229	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7230}
7231
7232// TargetInstance: A TargetInstance resource. This resource defines an
7233// endpoint instance that terminates traffic of certain protocols.
7234type TargetInstance struct {
7235	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7236	// format.
7237	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7238
7239	// Description: An optional description of this resource. Provide this
7240	// property when you create the resource.
7241	Description string `json:"description,omitempty"`
7242
7243	// Id: [Output Only] The unique identifier for the resource. This
7244	// identifier is defined by the server.
7245	Id uint64 `json:"id,omitempty,string"`
7246
7247	// Instance: A URL to the virtual machine instance that handles traffic
7248	// for this target instance. When creating a target instance, you can
7249	// provide the fully-qualified URL or a valid partial URL to the desired
7250	// virtual machine. For example, the following are all valid URLs:
7251	// -
7252	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
7253	// - projects/project/zones/zone/instances/instance
7254	// - zones/zone/instances/instance
7255	Instance string `json:"instance,omitempty"`
7256
7257	// Kind: [Output Only] The type of the resource. Always
7258	// compute#targetInstance for target instances.
7259	Kind string `json:"kind,omitempty"`
7260
7261	// Name: Name of the resource. Provided by the client when the resource
7262	// is created. The name must be 1-63 characters long, and comply with
7263	// RFC1035. Specifically, the name must be 1-63 characters long and
7264	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
7265	// the first character must be a lowercase letter, and all following
7266	// characters must be a dash, lowercase letter, or digit, except the
7267	// last character, which cannot be a dash.
7268	Name string `json:"name,omitempty"`
7269
7270	// NatPolicy: NAT option controlling how IPs are NAT'ed to the instance.
7271	// Currently only NO_NAT (default value) is supported.
7272	//
7273	// Possible values:
7274	//   "NO_NAT"
7275	NatPolicy string `json:"natPolicy,omitempty"`
7276
7277	// SelfLink: [Output Only] Server-defined URL for the resource.
7278	SelfLink string `json:"selfLink,omitempty"`
7279
7280	// Zone: [Output Only] URL of the zone where the target instance
7281	// resides.
7282	Zone string `json:"zone,omitempty"`
7283
7284	// ServerResponse contains the HTTP response code and headers from the
7285	// server.
7286	googleapi.ServerResponse `json:"-"`
7287
7288	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
7289	// to unconditionally include in API requests. By default, fields with
7290	// empty values are omitted from API requests. However, any non-pointer,
7291	// non-interface field appearing in ForceSendFields will be sent to the
7292	// server regardless of whether the field is empty or not. This may be
7293	// used to include empty fields in Patch requests.
7294	ForceSendFields []string `json:"-"`
7295}
7296
7297func (s *TargetInstance) MarshalJSON() ([]byte, error) {
7298	type noMethod TargetInstance
7299	raw := noMethod(*s)
7300	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7301}
7302
7303type TargetInstanceAggregatedList struct {
7304	// Id: [Output Only] Unique identifier for the resource; defined by the
7305	// server.
7306	Id string `json:"id,omitempty"`
7307
7308	// Items: A map of scoped target instance lists.
7309	Items map[string]TargetInstancesScopedList `json:"items,omitempty"`
7310
7311	// Kind: Type of resource.
7312	Kind string `json:"kind,omitempty"`
7313
7314	// NextPageToken: [Output Only] This token allows you to get the next
7315	// page of results for list requests. If the number of results is larger
7316	// than maxResults, use the nextPageToken as a value for the query
7317	// parameter pageToken in the next list request. Subsequent list
7318	// requests will have their own nextPageToken to continue paging through
7319	// the results.
7320	NextPageToken string `json:"nextPageToken,omitempty"`
7321
7322	// SelfLink: [Output Only] Server-defined URL for this resource.
7323	SelfLink string `json:"selfLink,omitempty"`
7324
7325	// ServerResponse contains the HTTP response code and headers from the
7326	// server.
7327	googleapi.ServerResponse `json:"-"`
7328
7329	// ForceSendFields is a list of field names (e.g. "Id") to
7330	// unconditionally include in API requests. By default, fields with
7331	// empty values are omitted from API requests. However, any non-pointer,
7332	// non-interface field appearing in ForceSendFields will be sent to the
7333	// server regardless of whether the field is empty or not. This may be
7334	// used to include empty fields in Patch requests.
7335	ForceSendFields []string `json:"-"`
7336}
7337
7338func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) {
7339	type noMethod TargetInstanceAggregatedList
7340	raw := noMethod(*s)
7341	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7342}
7343
7344// TargetInstanceList: Contains a list of TargetInstance resources.
7345type TargetInstanceList struct {
7346	// Id: [Output Only] The unique identifier for the resource. This
7347	// identifier is defined by the server.
7348	Id string `json:"id,omitempty"`
7349
7350	// Items: A list of TargetInstance resources.
7351	Items []*TargetInstance `json:"items,omitempty"`
7352
7353	// Kind: Type of resource.
7354	Kind string `json:"kind,omitempty"`
7355
7356	// NextPageToken: [Output Only] This token allows you to get the next
7357	// page of results for list requests. If the number of results is larger
7358	// than maxResults, use the nextPageToken as a value for the query
7359	// parameter pageToken in the next list request. Subsequent list
7360	// requests will have their own nextPageToken to continue paging through
7361	// the results.
7362	NextPageToken string `json:"nextPageToken,omitempty"`
7363
7364	// SelfLink: [Output Only] Server-defined URL for this resource.
7365	SelfLink string `json:"selfLink,omitempty"`
7366
7367	// ServerResponse contains the HTTP response code and headers from the
7368	// server.
7369	googleapi.ServerResponse `json:"-"`
7370
7371	// ForceSendFields is a list of field names (e.g. "Id") to
7372	// unconditionally include in API requests. By default, fields with
7373	// empty values are omitted from API requests. However, any non-pointer,
7374	// non-interface field appearing in ForceSendFields will be sent to the
7375	// server regardless of whether the field is empty or not. This may be
7376	// used to include empty fields in Patch requests.
7377	ForceSendFields []string `json:"-"`
7378}
7379
7380func (s *TargetInstanceList) MarshalJSON() ([]byte, error) {
7381	type noMethod TargetInstanceList
7382	raw := noMethod(*s)
7383	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7384}
7385
7386type TargetInstancesScopedList struct {
7387	// TargetInstances: List of target instances contained in this scope.
7388	TargetInstances []*TargetInstance `json:"targetInstances,omitempty"`
7389
7390	// Warning: Informational warning which replaces the list of addresses
7391	// when the list is empty.
7392	Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"`
7393
7394	// ForceSendFields is a list of field names (e.g. "TargetInstances") to
7395	// unconditionally include in API requests. By default, fields with
7396	// empty values are omitted from API requests. However, any non-pointer,
7397	// non-interface field appearing in ForceSendFields will be sent to the
7398	// server regardless of whether the field is empty or not. This may be
7399	// used to include empty fields in Patch requests.
7400	ForceSendFields []string `json:"-"`
7401}
7402
7403func (s *TargetInstancesScopedList) MarshalJSON() ([]byte, error) {
7404	type noMethod TargetInstancesScopedList
7405	raw := noMethod(*s)
7406	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7407}
7408
7409// TargetInstancesScopedListWarning: Informational warning which
7410// replaces the list of addresses when the list is empty.
7411type TargetInstancesScopedListWarning struct {
7412	// Code: [Output Only] A warning code, if applicable. For example,
7413	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
7414	// the response.
7415	//
7416	// Possible values:
7417	//   "CLEANUP_FAILED"
7418	//   "DEPRECATED_RESOURCE_USED"
7419	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
7420	//   "INJECTED_KERNELS_DEPRECATED"
7421	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
7422	//   "NEXT_HOP_CANNOT_IP_FORWARD"
7423	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
7424	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
7425	//   "NEXT_HOP_NOT_RUNNING"
7426	//   "NOT_CRITICAL_ERROR"
7427	//   "NO_RESULTS_ON_PAGE"
7428	//   "REQUIRED_TOS_AGREEMENT"
7429	//   "RESOURCE_NOT_DELETED"
7430	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
7431	//   "UNREACHABLE"
7432	Code string `json:"code,omitempty"`
7433
7434	// Data: [Output Only] Metadata about this warning in key: value format.
7435	// For example:
7436	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
7437	Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"`
7438
7439	// Message: [Output Only] A human-readable description of the warning
7440	// code.
7441	Message string `json:"message,omitempty"`
7442
7443	// ForceSendFields is a list of field names (e.g. "Code") to
7444	// unconditionally include in API requests. By default, fields with
7445	// empty values are omitted from API requests. However, any non-pointer,
7446	// non-interface field appearing in ForceSendFields will be sent to the
7447	// server regardless of whether the field is empty or not. This may be
7448	// used to include empty fields in Patch requests.
7449	ForceSendFields []string `json:"-"`
7450}
7451
7452func (s *TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) {
7453	type noMethod TargetInstancesScopedListWarning
7454	raw := noMethod(*s)
7455	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7456}
7457
7458type TargetInstancesScopedListWarningData struct {
7459	// Key: [Output Only] A key that provides more detail on the warning
7460	// being returned. For example, for warnings where there are no results
7461	// in a list request for a particular zone, this key might be scope and
7462	// the key value might be the zone name. Other examples might be a key
7463	// indicating a deprecated resource and a suggested replacement, or a
7464	// warning about invalid network settings (for example, if an instance
7465	// attempts to perform IP forwarding but is not enabled for IP
7466	// forwarding).
7467	Key string `json:"key,omitempty"`
7468
7469	// Value: [Output Only] A warning data value corresponding to the key.
7470	Value string `json:"value,omitempty"`
7471
7472	// ForceSendFields is a list of field names (e.g. "Key") to
7473	// unconditionally include in API requests. By default, fields with
7474	// empty values are omitted from API requests. However, any non-pointer,
7475	// non-interface field appearing in ForceSendFields will be sent to the
7476	// server regardless of whether the field is empty or not. This may be
7477	// used to include empty fields in Patch requests.
7478	ForceSendFields []string `json:"-"`
7479}
7480
7481func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) {
7482	type noMethod TargetInstancesScopedListWarningData
7483	raw := noMethod(*s)
7484	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7485}
7486
7487// TargetPool: A TargetPool resource. This resource defines a pool of
7488// instances, associated HttpHealthCheck resources, and the fallback
7489// target pool.
7490type TargetPool struct {
7491	// BackupPool: This field is applicable only when the containing target
7492	// pool is serving a forwarding rule as the primary pool, and its
7493	// failoverRatio field is properly set to a value between [0,
7494	// 1].
7495	//
7496	// backupPool and failoverRatio together define the fallback behavior of
7497	// the primary target pool: if the ratio of the healthy instances in the
7498	// primary pool is at or below failoverRatio, traffic arriving at the
7499	// load-balanced IP will be directed to the backup pool.
7500	//
7501	// In case where failoverRatio and backupPool are not set, or all the
7502	// instances in the backup pool are unhealthy, the traffic will be
7503	// directed back to the primary pool in the "force" mode, where traffic
7504	// will be spread to the healthy instances with the best effort, or to
7505	// all instances when no instance is healthy.
7506	BackupPool string `json:"backupPool,omitempty"`
7507
7508	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7509	// format.
7510	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7511
7512	// Description: An optional description of this resource. Provide this
7513	// property when you create the resource.
7514	Description string `json:"description,omitempty"`
7515
7516	// FailoverRatio: This field is applicable only when the containing
7517	// target pool is serving a forwarding rule as the primary pool (i.e.,
7518	// not as a backup pool to some other target pool). The value of the
7519	// field must be in [0, 1].
7520	//
7521	// If set, backupPool must also be set. They together define the
7522	// fallback behavior of the primary target pool: if the ratio of the
7523	// healthy instances in the primary pool is at or below this number,
7524	// traffic arriving at the load-balanced IP will be directed to the
7525	// backup pool.
7526	//
7527	// In case where failoverRatio is not set or all the instances in the
7528	// backup pool are unhealthy, the traffic will be directed back to the
7529	// primary pool in the "force" mode, where traffic will be spread to the
7530	// healthy instances with the best effort, or to all instances when no
7531	// instance is healthy.
7532	FailoverRatio float64 `json:"failoverRatio,omitempty"`
7533
7534	// HealthChecks: A list of URLs to the HttpHealthCheck resource. A
7535	// member instance in this pool is considered healthy if and only if all
7536	// specified health checks pass. An empty list means all member
7537	// instances will be considered healthy at all times.
7538	HealthChecks []string `json:"healthChecks,omitempty"`
7539
7540	// Id: [Output Only] The unique identifier for the resource. This
7541	// identifier is defined by the server.
7542	Id uint64 `json:"id,omitempty,string"`
7543
7544	// Instances: A list of resource URLs to the virtual machine instances
7545	// serving this pool. They must live in zones contained in the same
7546	// region as this pool.
7547	Instances []string `json:"instances,omitempty"`
7548
7549	// Kind: [Output Only] Type of the resource. Always compute#targetPool
7550	// for target pools.
7551	Kind string `json:"kind,omitempty"`
7552
7553	// Name: Name of the resource. Provided by the client when the resource
7554	// is created. The name must be 1-63 characters long, and comply with
7555	// RFC1035. Specifically, the name must be 1-63 characters long and
7556	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
7557	// the first character must be a lowercase letter, and all following
7558	// characters must be a dash, lowercase letter, or digit, except the
7559	// last character, which cannot be a dash.
7560	Name string `json:"name,omitempty"`
7561
7562	// Region: [Output Only] URL of the region where the target pool
7563	// resides.
7564	Region string `json:"region,omitempty"`
7565
7566	// SelfLink: [Output Only] Server-defined URL for the resource.
7567	SelfLink string `json:"selfLink,omitempty"`
7568
7569	// SessionAffinity: Sesssion affinity option, must be one of the
7570	// following values:
7571	// NONE: Connections from the same client IP may go to any instance in
7572	// the pool.
7573	// CLIENT_IP: Connections from the same client IP will go to the same
7574	// instance in the pool while that instance remains
7575	// healthy.
7576	// CLIENT_IP_PROTO: Connections from the same client IP with the same IP
7577	// protocol will go to the same instance in the pool while that instance
7578	// remains healthy.
7579	//
7580	// Possible values:
7581	//   "CLIENT_IP"
7582	//   "CLIENT_IP_PROTO"
7583	//   "NONE"
7584	SessionAffinity string `json:"sessionAffinity,omitempty"`
7585
7586	// ServerResponse contains the HTTP response code and headers from the
7587	// server.
7588	googleapi.ServerResponse `json:"-"`
7589
7590	// ForceSendFields is a list of field names (e.g. "BackupPool") to
7591	// unconditionally include in API requests. By default, fields with
7592	// empty values are omitted from API requests. However, any non-pointer,
7593	// non-interface field appearing in ForceSendFields will be sent to the
7594	// server regardless of whether the field is empty or not. This may be
7595	// used to include empty fields in Patch requests.
7596	ForceSendFields []string `json:"-"`
7597}
7598
7599func (s *TargetPool) MarshalJSON() ([]byte, error) {
7600	type noMethod TargetPool
7601	raw := noMethod(*s)
7602	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7603}
7604
7605type TargetPoolAggregatedList struct {
7606	// Id: [Output Only] Unique identifier for the resource. Defined by the
7607	// server.
7608	Id string `json:"id,omitempty"`
7609
7610	// Items: [Output Only] A map of scoped target pool lists.
7611	Items map[string]TargetPoolsScopedList `json:"items,omitempty"`
7612
7613	// Kind: [Output Only] Type of resource. Always
7614	// compute#targetPoolAggregatedList for aggregated lists of target
7615	// pools.
7616	Kind string `json:"kind,omitempty"`
7617
7618	// NextPageToken: [Output Only] This token allows you to get the next
7619	// page of results for list requests. If the number of results is larger
7620	// than maxResults, use the nextPageToken as a value for the query
7621	// parameter pageToken in the next list request. Subsequent list
7622	// requests will have their own nextPageToken to continue paging through
7623	// the results.
7624	NextPageToken string `json:"nextPageToken,omitempty"`
7625
7626	// SelfLink: [Output Only] Server-defined URL for this resource.
7627	SelfLink string `json:"selfLink,omitempty"`
7628
7629	// ServerResponse contains the HTTP response code and headers from the
7630	// server.
7631	googleapi.ServerResponse `json:"-"`
7632
7633	// ForceSendFields is a list of field names (e.g. "Id") to
7634	// unconditionally include in API requests. By default, fields with
7635	// empty values are omitted from API requests. However, any non-pointer,
7636	// non-interface field appearing in ForceSendFields will be sent to the
7637	// server regardless of whether the field is empty or not. This may be
7638	// used to include empty fields in Patch requests.
7639	ForceSendFields []string `json:"-"`
7640}
7641
7642func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) {
7643	type noMethod TargetPoolAggregatedList
7644	raw := noMethod(*s)
7645	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7646}
7647
7648type TargetPoolInstanceHealth struct {
7649	HealthStatus []*HealthStatus `json:"healthStatus,omitempty"`
7650
7651	// Kind: [Output Only] Type of resource. Always
7652	// compute#targetPoolInstanceHealth when checking the health of an
7653	// instance.
7654	Kind string `json:"kind,omitempty"`
7655
7656	// ServerResponse contains the HTTP response code and headers from the
7657	// server.
7658	googleapi.ServerResponse `json:"-"`
7659
7660	// ForceSendFields is a list of field names (e.g. "HealthStatus") to
7661	// unconditionally include in API requests. By default, fields with
7662	// empty values are omitted from API requests. However, any non-pointer,
7663	// non-interface field appearing in ForceSendFields will be sent to the
7664	// server regardless of whether the field is empty or not. This may be
7665	// used to include empty fields in Patch requests.
7666	ForceSendFields []string `json:"-"`
7667}
7668
7669func (s *TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) {
7670	type noMethod TargetPoolInstanceHealth
7671	raw := noMethod(*s)
7672	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7673}
7674
7675// TargetPoolList: Contains a list of TargetPool resources.
7676type TargetPoolList struct {
7677	// Id: [Output Only] Unique identifier for the resource. Defined by the
7678	// server.
7679	Id string `json:"id,omitempty"`
7680
7681	// Items: A list of TargetPool resources.
7682	Items []*TargetPool `json:"items,omitempty"`
7683
7684	// Kind: [Output Only] Type of resource. Always compute#targetPoolList
7685	// for lists of target pools.
7686	Kind string `json:"kind,omitempty"`
7687
7688	// NextPageToken: [Output Only] This token allows you to get the next
7689	// page of results for list requests. If the number of results is larger
7690	// than maxResults, use the nextPageToken as a value for the query
7691	// parameter pageToken in the next list request. Subsequent list
7692	// requests will have their own nextPageToken to continue paging through
7693	// the results.
7694	NextPageToken string `json:"nextPageToken,omitempty"`
7695
7696	// SelfLink: [Output Only] Server-defined URL for this resource.
7697	SelfLink string `json:"selfLink,omitempty"`
7698
7699	// ServerResponse contains the HTTP response code and headers from the
7700	// server.
7701	googleapi.ServerResponse `json:"-"`
7702
7703	// ForceSendFields is a list of field names (e.g. "Id") to
7704	// unconditionally include in API requests. By default, fields with
7705	// empty values are omitted from API requests. However, any non-pointer,
7706	// non-interface field appearing in ForceSendFields will be sent to the
7707	// server regardless of whether the field is empty or not. This may be
7708	// used to include empty fields in Patch requests.
7709	ForceSendFields []string `json:"-"`
7710}
7711
7712func (s *TargetPoolList) MarshalJSON() ([]byte, error) {
7713	type noMethod TargetPoolList
7714	raw := noMethod(*s)
7715	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7716}
7717
7718type TargetPoolsAddHealthCheckRequest struct {
7719	// HealthChecks: A list of HttpHealthCheck resources to add to the
7720	// target pool.
7721	HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"`
7722
7723	// ForceSendFields is a list of field names (e.g. "HealthChecks") to
7724	// unconditionally include in API requests. By default, fields with
7725	// empty values are omitted from API requests. However, any non-pointer,
7726	// non-interface field appearing in ForceSendFields will be sent to the
7727	// server regardless of whether the field is empty or not. This may be
7728	// used to include empty fields in Patch requests.
7729	ForceSendFields []string `json:"-"`
7730}
7731
7732func (s *TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) {
7733	type noMethod TargetPoolsAddHealthCheckRequest
7734	raw := noMethod(*s)
7735	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7736}
7737
7738type TargetPoolsAddInstanceRequest struct {
7739	// Instances: A full or partial URL to an instance to add to this target
7740	// pool. This can be a full or partial URL. For example, the following
7741	// are valid URLs:
7742	// -
7743	// https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name
7744	// - projects/project-id/zones/zone/instances/instance-name
7745	// - zones/zone/instances/instance-name
7746	Instances []*InstanceReference `json:"instances,omitempty"`
7747
7748	// ForceSendFields is a list of field names (e.g. "Instances") to
7749	// unconditionally include in API requests. By default, fields with
7750	// empty values are omitted from API requests. However, any non-pointer,
7751	// non-interface field appearing in ForceSendFields will be sent to the
7752	// server regardless of whether the field is empty or not. This may be
7753	// used to include empty fields in Patch requests.
7754	ForceSendFields []string `json:"-"`
7755}
7756
7757func (s *TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) {
7758	type noMethod TargetPoolsAddInstanceRequest
7759	raw := noMethod(*s)
7760	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7761}
7762
7763type TargetPoolsRemoveHealthCheckRequest struct {
7764	// HealthChecks: Health check URL to be removed. This can be a full or
7765	// valid partial URL. For example, the following are valid URLs:
7766	// -
7767	// https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check
7768	// - projects/project/global/httpHealthChecks/health-check
7769	// - global/httpHealthChecks/health-check
7770	HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"`
7771
7772	// ForceSendFields is a list of field names (e.g. "HealthChecks") to
7773	// unconditionally include in API requests. By default, fields with
7774	// empty values are omitted from API requests. However, any non-pointer,
7775	// non-interface field appearing in ForceSendFields will be sent to the
7776	// server regardless of whether the field is empty or not. This may be
7777	// used to include empty fields in Patch requests.
7778	ForceSendFields []string `json:"-"`
7779}
7780
7781func (s *TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) {
7782	type noMethod TargetPoolsRemoveHealthCheckRequest
7783	raw := noMethod(*s)
7784	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7785}
7786
7787type TargetPoolsRemoveInstanceRequest struct {
7788	// Instances: URLs of the instances to be removed from target pool.
7789	Instances []*InstanceReference `json:"instances,omitempty"`
7790
7791	// ForceSendFields is a list of field names (e.g. "Instances") to
7792	// unconditionally include in API requests. By default, fields with
7793	// empty values are omitted from API requests. However, any non-pointer,
7794	// non-interface field appearing in ForceSendFields will be sent to the
7795	// server regardless of whether the field is empty or not. This may be
7796	// used to include empty fields in Patch requests.
7797	ForceSendFields []string `json:"-"`
7798}
7799
7800func (s *TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) {
7801	type noMethod TargetPoolsRemoveInstanceRequest
7802	raw := noMethod(*s)
7803	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7804}
7805
7806type TargetPoolsScopedList struct {
7807	// TargetPools: List of target pools contained in this scope.
7808	TargetPools []*TargetPool `json:"targetPools,omitempty"`
7809
7810	// Warning: Informational warning which replaces the list of addresses
7811	// when the list is empty.
7812	Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"`
7813
7814	// ForceSendFields is a list of field names (e.g. "TargetPools") to
7815	// unconditionally include in API requests. By default, fields with
7816	// empty values are omitted from API requests. However, any non-pointer,
7817	// non-interface field appearing in ForceSendFields will be sent to the
7818	// server regardless of whether the field is empty or not. This may be
7819	// used to include empty fields in Patch requests.
7820	ForceSendFields []string `json:"-"`
7821}
7822
7823func (s *TargetPoolsScopedList) MarshalJSON() ([]byte, error) {
7824	type noMethod TargetPoolsScopedList
7825	raw := noMethod(*s)
7826	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7827}
7828
7829// TargetPoolsScopedListWarning: Informational warning which replaces
7830// the list of addresses when the list is empty.
7831type TargetPoolsScopedListWarning struct {
7832	// Code: [Output Only] A warning code, if applicable. For example,
7833	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
7834	// the response.
7835	//
7836	// Possible values:
7837	//   "CLEANUP_FAILED"
7838	//   "DEPRECATED_RESOURCE_USED"
7839	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
7840	//   "INJECTED_KERNELS_DEPRECATED"
7841	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
7842	//   "NEXT_HOP_CANNOT_IP_FORWARD"
7843	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
7844	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
7845	//   "NEXT_HOP_NOT_RUNNING"
7846	//   "NOT_CRITICAL_ERROR"
7847	//   "NO_RESULTS_ON_PAGE"
7848	//   "REQUIRED_TOS_AGREEMENT"
7849	//   "RESOURCE_NOT_DELETED"
7850	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
7851	//   "UNREACHABLE"
7852	Code string `json:"code,omitempty"`
7853
7854	// Data: [Output Only] Metadata about this warning in key: value format.
7855	// For example:
7856	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
7857	Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"`
7858
7859	// Message: [Output Only] A human-readable description of the warning
7860	// code.
7861	Message string `json:"message,omitempty"`
7862
7863	// ForceSendFields is a list of field names (e.g. "Code") to
7864	// unconditionally include in API requests. By default, fields with
7865	// empty values are omitted from API requests. However, any non-pointer,
7866	// non-interface field appearing in ForceSendFields will be sent to the
7867	// server regardless of whether the field is empty or not. This may be
7868	// used to include empty fields in Patch requests.
7869	ForceSendFields []string `json:"-"`
7870}
7871
7872func (s *TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) {
7873	type noMethod TargetPoolsScopedListWarning
7874	raw := noMethod(*s)
7875	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7876}
7877
7878type TargetPoolsScopedListWarningData struct {
7879	// Key: [Output Only] A key that provides more detail on the warning
7880	// being returned. For example, for warnings where there are no results
7881	// in a list request for a particular zone, this key might be scope and
7882	// the key value might be the zone name. Other examples might be a key
7883	// indicating a deprecated resource and a suggested replacement, or a
7884	// warning about invalid network settings (for example, if an instance
7885	// attempts to perform IP forwarding but is not enabled for IP
7886	// forwarding).
7887	Key string `json:"key,omitempty"`
7888
7889	// Value: [Output Only] A warning data value corresponding to the key.
7890	Value string `json:"value,omitempty"`
7891
7892	// ForceSendFields is a list of field names (e.g. "Key") to
7893	// unconditionally include in API requests. By default, fields with
7894	// empty values are omitted from API requests. However, any non-pointer,
7895	// non-interface field appearing in ForceSendFields will be sent to the
7896	// server regardless of whether the field is empty or not. This may be
7897	// used to include empty fields in Patch requests.
7898	ForceSendFields []string `json:"-"`
7899}
7900
7901func (s *TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) {
7902	type noMethod TargetPoolsScopedListWarningData
7903	raw := noMethod(*s)
7904	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7905}
7906
7907type TargetReference struct {
7908	Target string `json:"target,omitempty"`
7909
7910	// ForceSendFields is a list of field names (e.g. "Target") to
7911	// unconditionally include in API requests. By default, fields with
7912	// empty values are omitted from API requests. However, any non-pointer,
7913	// non-interface field appearing in ForceSendFields will be sent to the
7914	// server regardless of whether the field is empty or not. This may be
7915	// used to include empty fields in Patch requests.
7916	ForceSendFields []string `json:"-"`
7917}
7918
7919func (s *TargetReference) MarshalJSON() ([]byte, error) {
7920	type noMethod TargetReference
7921	raw := noMethod(*s)
7922	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7923}
7924
7925// TargetVpnGateway: Represents a Target VPN gateway resource.
7926type TargetVpnGateway struct {
7927	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7928	// format.
7929	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7930
7931	// Description: An optional description of this resource. Provide this
7932	// property when you create the resource.
7933	Description string `json:"description,omitempty"`
7934
7935	// ForwardingRules: [Output Only] A list of URLs to the ForwardingRule
7936	// resources. ForwardingRules are created using
7937	// compute.forwardingRules.insert and associated to a VPN gateway.
7938	ForwardingRules []string `json:"forwardingRules,omitempty"`
7939
7940	// Id: [Output Only] The unique identifier for the resource. This
7941	// identifier is defined by the server.
7942	Id uint64 `json:"id,omitempty,string"`
7943
7944	// Kind: [Output Only] Type of resource. Always compute#targetVpnGateway
7945	// for target VPN gateways.
7946	Kind string `json:"kind,omitempty"`
7947
7948	// Name: Name of the resource. Provided by the client when the resource
7949	// is created. The name must be 1-63 characters long, and comply with
7950	// RFC1035. Specifically, the name must be 1-63 characters long and
7951	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
7952	// the first character must be a lowercase letter, and all following
7953	// characters must be a dash, lowercase letter, or digit, except the
7954	// last character, which cannot be a dash.
7955	Name string `json:"name,omitempty"`
7956
7957	// Network: URL of the network to which this VPN gateway is attached.
7958	// Provided by the client when the VPN gateway is created.
7959	Network string `json:"network,omitempty"`
7960
7961	// Region: [Output Only] URL of the region where the target VPN gateway
7962	// resides.
7963	Region string `json:"region,omitempty"`
7964
7965	// SelfLink: [Output Only] Server-defined URL for the resource.
7966	SelfLink string `json:"selfLink,omitempty"`
7967
7968	// Status: [Output Only] The status of the VPN gateway.
7969	//
7970	// Possible values:
7971	//   "CREATING"
7972	//   "DELETING"
7973	//   "FAILED"
7974	//   "READY"
7975	Status string `json:"status,omitempty"`
7976
7977	// Tunnels: [Output Only] A list of URLs to VpnTunnel resources.
7978	// VpnTunnels are created using compute.vpntunnels.insert method and
7979	// associated to a VPN gateway.
7980	Tunnels []string `json:"tunnels,omitempty"`
7981
7982	// ServerResponse contains the HTTP response code and headers from the
7983	// server.
7984	googleapi.ServerResponse `json:"-"`
7985
7986	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
7987	// to unconditionally include in API requests. By default, fields with
7988	// empty values are omitted from API requests. However, any non-pointer,
7989	// non-interface field appearing in ForceSendFields will be sent to the
7990	// server regardless of whether the field is empty or not. This may be
7991	// used to include empty fields in Patch requests.
7992	ForceSendFields []string `json:"-"`
7993}
7994
7995func (s *TargetVpnGateway) MarshalJSON() ([]byte, error) {
7996	type noMethod TargetVpnGateway
7997	raw := noMethod(*s)
7998	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7999}
8000
8001type TargetVpnGatewayAggregatedList struct {
8002	// Id: [Output Only] The unique identifier for the resource. This
8003	// identifier is defined by the server.
8004	Id string `json:"id,omitempty"`
8005
8006	// Items: A map of scoped target vpn gateway lists.
8007	Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"`
8008
8009	// Kind: [Output Only] Type of resource. Always compute#targetVpnGateway
8010	// for target VPN gateways.
8011	Kind string `json:"kind,omitempty"`
8012
8013	// NextPageToken: [Output Only] This token allows you to get the next
8014	// page of results for list requests. If the number of results is larger
8015	// than maxResults, use the nextPageToken as a value for the query
8016	// parameter pageToken in the next list request. Subsequent list
8017	// requests will have their own nextPageToken to continue paging through
8018	// the results.
8019	NextPageToken string `json:"nextPageToken,omitempty"`
8020
8021	// SelfLink: [Output Only] Server-defined URL for the resource.
8022	SelfLink string `json:"selfLink,omitempty"`
8023
8024	// ServerResponse contains the HTTP response code and headers from the
8025	// server.
8026	googleapi.ServerResponse `json:"-"`
8027
8028	// ForceSendFields is a list of field names (e.g. "Id") to
8029	// unconditionally include in API requests. By default, fields with
8030	// empty values are omitted from API requests. However, any non-pointer,
8031	// non-interface field appearing in ForceSendFields will be sent to the
8032	// server regardless of whether the field is empty or not. This may be
8033	// used to include empty fields in Patch requests.
8034	ForceSendFields []string `json:"-"`
8035}
8036
8037func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) {
8038	type noMethod TargetVpnGatewayAggregatedList
8039	raw := noMethod(*s)
8040	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8041}
8042
8043// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources.
8044type TargetVpnGatewayList struct {
8045	// Id: [Output Only] The unique identifier for the resource. This
8046	// identifier is defined by the server.
8047	Id string `json:"id,omitempty"`
8048
8049	// Items: [Output Only] A list of TargetVpnGateway resources.
8050	Items []*TargetVpnGateway `json:"items,omitempty"`
8051
8052	// Kind: [Output Only] Type of resource. Always compute#targetVpnGateway
8053	// for target VPN gateways.
8054	Kind string `json:"kind,omitempty"`
8055
8056	// NextPageToken: [Output Only] This token allows you to get the next
8057	// page of results for list requests. If the number of results is larger
8058	// than maxResults, use the nextPageToken as a value for the query
8059	// parameter pageToken in the next list request. Subsequent list
8060	// requests will have their own nextPageToken to continue paging through
8061	// the results.
8062	NextPageToken string `json:"nextPageToken,omitempty"`
8063
8064	// SelfLink: [Output Only] Server-defined URL for the resource.
8065	SelfLink string `json:"selfLink,omitempty"`
8066
8067	// ServerResponse contains the HTTP response code and headers from the
8068	// server.
8069	googleapi.ServerResponse `json:"-"`
8070
8071	// ForceSendFields is a list of field names (e.g. "Id") to
8072	// unconditionally include in API requests. By default, fields with
8073	// empty values are omitted from API requests. However, any non-pointer,
8074	// non-interface field appearing in ForceSendFields will be sent to the
8075	// server regardless of whether the field is empty or not. This may be
8076	// used to include empty fields in Patch requests.
8077	ForceSendFields []string `json:"-"`
8078}
8079
8080func (s *TargetVpnGatewayList) MarshalJSON() ([]byte, error) {
8081	type noMethod TargetVpnGatewayList
8082	raw := noMethod(*s)
8083	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8084}
8085
8086type TargetVpnGatewaysScopedList struct {
8087	// TargetVpnGateways: [Output Only] List of target vpn gateways
8088	// contained in this scope.
8089	TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"`
8090
8091	// Warning: [Output Only] Informational warning which replaces the list
8092	// of addresses when the list is empty.
8093	Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"`
8094
8095	// ForceSendFields is a list of field names (e.g. "TargetVpnGateways")
8096	// to unconditionally include in API requests. By default, fields with
8097	// empty values are omitted from API requests. However, any non-pointer,
8098	// non-interface field appearing in ForceSendFields will be sent to the
8099	// server regardless of whether the field is empty or not. This may be
8100	// used to include empty fields in Patch requests.
8101	ForceSendFields []string `json:"-"`
8102}
8103
8104func (s *TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) {
8105	type noMethod TargetVpnGatewaysScopedList
8106	raw := noMethod(*s)
8107	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8108}
8109
8110// TargetVpnGatewaysScopedListWarning: [Output Only] Informational
8111// warning which replaces the list of addresses when the list is empty.
8112type TargetVpnGatewaysScopedListWarning struct {
8113	// Code: [Output Only] A warning code, if applicable. For example,
8114	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
8115	// the response.
8116	//
8117	// Possible values:
8118	//   "CLEANUP_FAILED"
8119	//   "DEPRECATED_RESOURCE_USED"
8120	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
8121	//   "INJECTED_KERNELS_DEPRECATED"
8122	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
8123	//   "NEXT_HOP_CANNOT_IP_FORWARD"
8124	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
8125	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
8126	//   "NEXT_HOP_NOT_RUNNING"
8127	//   "NOT_CRITICAL_ERROR"
8128	//   "NO_RESULTS_ON_PAGE"
8129	//   "REQUIRED_TOS_AGREEMENT"
8130	//   "RESOURCE_NOT_DELETED"
8131	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
8132	//   "UNREACHABLE"
8133	Code string `json:"code,omitempty"`
8134
8135	// Data: [Output Only] Metadata about this warning in key: value format.
8136	// For example:
8137	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
8138	Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"`
8139
8140	// Message: [Output Only] A human-readable description of the warning
8141	// code.
8142	Message string `json:"message,omitempty"`
8143
8144	// ForceSendFields is a list of field names (e.g. "Code") to
8145	// unconditionally include in API requests. By default, fields with
8146	// empty values are omitted from API requests. However, any non-pointer,
8147	// non-interface field appearing in ForceSendFields will be sent to the
8148	// server regardless of whether the field is empty or not. This may be
8149	// used to include empty fields in Patch requests.
8150	ForceSendFields []string `json:"-"`
8151}
8152
8153func (s *TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) {
8154	type noMethod TargetVpnGatewaysScopedListWarning
8155	raw := noMethod(*s)
8156	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8157}
8158
8159type TargetVpnGatewaysScopedListWarningData struct {
8160	// Key: [Output Only] A key that provides more detail on the warning
8161	// being returned. For example, for warnings where there are no results
8162	// in a list request for a particular zone, this key might be scope and
8163	// the key value might be the zone name. Other examples might be a key
8164	// indicating a deprecated resource and a suggested replacement, or a
8165	// warning about invalid network settings (for example, if an instance
8166	// attempts to perform IP forwarding but is not enabled for IP
8167	// forwarding).
8168	Key string `json:"key,omitempty"`
8169
8170	// Value: [Output Only] A warning data value corresponding to the key.
8171	Value string `json:"value,omitempty"`
8172
8173	// ForceSendFields is a list of field names (e.g. "Key") to
8174	// unconditionally include in API requests. By default, fields with
8175	// empty values are omitted from API requests. However, any non-pointer,
8176	// non-interface field appearing in ForceSendFields will be sent to the
8177	// server regardless of whether the field is empty or not. This may be
8178	// used to include empty fields in Patch requests.
8179	ForceSendFields []string `json:"-"`
8180}
8181
8182func (s *TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) {
8183	type noMethod TargetVpnGatewaysScopedListWarningData
8184	raw := noMethod(*s)
8185	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8186}
8187
8188type TestFailure struct {
8189	ActualService string `json:"actualService,omitempty"`
8190
8191	ExpectedService string `json:"expectedService,omitempty"`
8192
8193	Host string `json:"host,omitempty"`
8194
8195	Path string `json:"path,omitempty"`
8196
8197	// ForceSendFields is a list of field names (e.g. "ActualService") to
8198	// unconditionally include in API requests. By default, fields with
8199	// empty values are omitted from API requests. However, any non-pointer,
8200	// non-interface field appearing in ForceSendFields will be sent to the
8201	// server regardless of whether the field is empty or not. This may be
8202	// used to include empty fields in Patch requests.
8203	ForceSendFields []string `json:"-"`
8204}
8205
8206func (s *TestFailure) MarshalJSON() ([]byte, error) {
8207	type noMethod TestFailure
8208	raw := noMethod(*s)
8209	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8210}
8211
8212// UrlMap: A UrlMap resource. This resource defines the mapping from URL
8213// to the BackendService resource, based on the "longest-match" of the
8214// URL's host and path.
8215type UrlMap struct {
8216	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
8217	// format.
8218	CreationTimestamp string `json:"creationTimestamp,omitempty"`
8219
8220	// DefaultService: The URL of the BackendService resource if none of the
8221	// hostRules match.
8222	DefaultService string `json:"defaultService,omitempty"`
8223
8224	// Description: An optional description of this resource. Provide this
8225	// property when you create the resource.
8226	Description string `json:"description,omitempty"`
8227
8228	// Fingerprint: Fingerprint of this resource. A hash of the contents
8229	// stored in this object. This field is used in optimistic locking. This
8230	// field will be ignored when inserting a UrlMap. An up-to-date
8231	// fingerprint must be provided in order to update the UrlMap.
8232	Fingerprint string `json:"fingerprint,omitempty"`
8233
8234	// HostRules: The list of HostRules to use against the URL.
8235	HostRules []*HostRule `json:"hostRules,omitempty"`
8236
8237	// Id: [Output Only] The unique identifier for the resource. This
8238	// identifier is defined by the server.
8239	Id uint64 `json:"id,omitempty,string"`
8240
8241	// Kind: [Output Only] Type of the resource. Always compute#urlMaps for
8242	// url maps.
8243	Kind string `json:"kind,omitempty"`
8244
8245	// Name: Name of the resource. Provided by the client when the resource
8246	// is created. The name must be 1-63 characters long, and comply with
8247	// RFC1035. Specifically, the name must be 1-63 characters long and
8248	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
8249	// the first character must be a lowercase letter, and all following
8250	// characters must be a dash, lowercase letter, or digit, except the
8251	// last character, which cannot be a dash.
8252	Name string `json:"name,omitempty"`
8253
8254	// PathMatchers: The list of named PathMatchers to use against the URL.
8255	PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"`
8256
8257	// SelfLink: [Output Only] Server-defined URL for the resource.
8258	SelfLink string `json:"selfLink,omitempty"`
8259
8260	// Tests: The list of expected URL mappings. Request to update this
8261	// UrlMap will succeed only all of the test cases pass.
8262	Tests []*UrlMapTest `json:"tests,omitempty"`
8263
8264	// ServerResponse contains the HTTP response code and headers from the
8265	// server.
8266	googleapi.ServerResponse `json:"-"`
8267
8268	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
8269	// to unconditionally include in API requests. By default, fields with
8270	// empty values are omitted from API requests. However, any non-pointer,
8271	// non-interface field appearing in ForceSendFields will be sent to the
8272	// server regardless of whether the field is empty or not. This may be
8273	// used to include empty fields in Patch requests.
8274	ForceSendFields []string `json:"-"`
8275}
8276
8277func (s *UrlMap) MarshalJSON() ([]byte, error) {
8278	type noMethod UrlMap
8279	raw := noMethod(*s)
8280	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8281}
8282
8283// UrlMapList: Contains a list of UrlMap resources.
8284type UrlMapList struct {
8285	// Id: [Output Only] Unique identifier for the resource. Set by the
8286	// server.
8287	Id string `json:"id,omitempty"`
8288
8289	// Items: A list of UrlMap resources.
8290	Items []*UrlMap `json:"items,omitempty"`
8291
8292	// Kind: Type of resource.
8293	Kind string `json:"kind,omitempty"`
8294
8295	// NextPageToken: [Output Only] This token allows you to get the next
8296	// page of results for list requests. If the number of results is larger
8297	// than maxResults, use the nextPageToken as a value for the query
8298	// parameter pageToken in the next list request. Subsequent list
8299	// requests will have their own nextPageToken to continue paging through
8300	// the results.
8301	NextPageToken string `json:"nextPageToken,omitempty"`
8302
8303	// SelfLink: [Output Only] Server-defined URL for this resource.
8304	SelfLink string `json:"selfLink,omitempty"`
8305
8306	// ServerResponse contains the HTTP response code and headers from the
8307	// server.
8308	googleapi.ServerResponse `json:"-"`
8309
8310	// ForceSendFields is a list of field names (e.g. "Id") to
8311	// unconditionally include in API requests. By default, fields with
8312	// empty values are omitted from API requests. However, any non-pointer,
8313	// non-interface field appearing in ForceSendFields will be sent to the
8314	// server regardless of whether the field is empty or not. This may be
8315	// used to include empty fields in Patch requests.
8316	ForceSendFields []string `json:"-"`
8317}
8318
8319func (s *UrlMapList) MarshalJSON() ([]byte, error) {
8320	type noMethod UrlMapList
8321	raw := noMethod(*s)
8322	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8323}
8324
8325type UrlMapReference struct {
8326	UrlMap string `json:"urlMap,omitempty"`
8327
8328	// ForceSendFields is a list of field names (e.g. "UrlMap") to
8329	// unconditionally include in API requests. By default, fields with
8330	// empty values are omitted from API requests. However, any non-pointer,
8331	// non-interface field appearing in ForceSendFields will be sent to the
8332	// server regardless of whether the field is empty or not. This may be
8333	// used to include empty fields in Patch requests.
8334	ForceSendFields []string `json:"-"`
8335}
8336
8337func (s *UrlMapReference) MarshalJSON() ([]byte, error) {
8338	type noMethod UrlMapReference
8339	raw := noMethod(*s)
8340	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8341}
8342
8343// UrlMapTest: Message for the expected URL mappings.
8344type UrlMapTest struct {
8345	// Description: Description of this test case.
8346	Description string `json:"description,omitempty"`
8347
8348	// Host: Host portion of the URL.
8349	Host string `json:"host,omitempty"`
8350
8351	// Path: Path portion of the URL.
8352	Path string `json:"path,omitempty"`
8353
8354	// Service: Expected BackendService resource the given URL should be
8355	// mapped to.
8356	Service string `json:"service,omitempty"`
8357
8358	// ForceSendFields is a list of field names (e.g. "Description") to
8359	// unconditionally include in API requests. By default, fields with
8360	// empty values are omitted from API requests. However, any non-pointer,
8361	// non-interface field appearing in ForceSendFields will be sent to the
8362	// server regardless of whether the field is empty or not. This may be
8363	// used to include empty fields in Patch requests.
8364	ForceSendFields []string `json:"-"`
8365}
8366
8367func (s *UrlMapTest) MarshalJSON() ([]byte, error) {
8368	type noMethod UrlMapTest
8369	raw := noMethod(*s)
8370	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8371}
8372
8373// UrlMapValidationResult: Message representing the validation result
8374// for a UrlMap.
8375type UrlMapValidationResult struct {
8376	LoadErrors []string `json:"loadErrors,omitempty"`
8377
8378	// LoadSucceeded: Whether the given UrlMap can be successfully loaded.
8379	// If false, 'loadErrors' indicates the reasons.
8380	LoadSucceeded bool `json:"loadSucceeded,omitempty"`
8381
8382	TestFailures []*TestFailure `json:"testFailures,omitempty"`
8383
8384	// TestPassed: If successfully loaded, this field indicates whether the
8385	// test passed. If false, 'testFailures's indicate the reason of
8386	// failure.
8387	TestPassed bool `json:"testPassed,omitempty"`
8388
8389	// ForceSendFields is a list of field names (e.g. "LoadErrors") to
8390	// unconditionally include in API requests. By default, fields with
8391	// empty values are omitted from API requests. However, any non-pointer,
8392	// non-interface field appearing in ForceSendFields will be sent to the
8393	// server regardless of whether the field is empty or not. This may be
8394	// used to include empty fields in Patch requests.
8395	ForceSendFields []string `json:"-"`
8396}
8397
8398func (s *UrlMapValidationResult) MarshalJSON() ([]byte, error) {
8399	type noMethod UrlMapValidationResult
8400	raw := noMethod(*s)
8401	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8402}
8403
8404type UrlMapsValidateRequest struct {
8405	// Resource: Content of the UrlMap to be validated.
8406	Resource *UrlMap `json:"resource,omitempty"`
8407
8408	// ForceSendFields is a list of field names (e.g. "Resource") to
8409	// unconditionally include in API requests. By default, fields with
8410	// empty values are omitted from API requests. However, any non-pointer,
8411	// non-interface field appearing in ForceSendFields will be sent to the
8412	// server regardless of whether the field is empty or not. This may be
8413	// used to include empty fields in Patch requests.
8414	ForceSendFields []string `json:"-"`
8415}
8416
8417func (s *UrlMapsValidateRequest) MarshalJSON() ([]byte, error) {
8418	type noMethod UrlMapsValidateRequest
8419	raw := noMethod(*s)
8420	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8421}
8422
8423type UrlMapsValidateResponse struct {
8424	Result *UrlMapValidationResult `json:"result,omitempty"`
8425
8426	// ServerResponse contains the HTTP response code and headers from the
8427	// server.
8428	googleapi.ServerResponse `json:"-"`
8429
8430	// ForceSendFields is a list of field names (e.g. "Result") to
8431	// unconditionally include in API requests. By default, fields with
8432	// empty values are omitted from API requests. However, any non-pointer,
8433	// non-interface field appearing in ForceSendFields will be sent to the
8434	// server regardless of whether the field is empty or not. This may be
8435	// used to include empty fields in Patch requests.
8436	ForceSendFields []string `json:"-"`
8437}
8438
8439func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) {
8440	type noMethod UrlMapsValidateResponse
8441	raw := noMethod(*s)
8442	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8443}
8444
8445// UsageExportLocation: The location in Cloud Storage and naming method
8446// of the daily usage report. Contains bucket_name and report_name
8447// prefix.
8448type UsageExportLocation struct {
8449	// BucketName: The name of an existing bucket in Cloud Storage where the
8450	// usage report object is stored. The Google Service Account is granted
8451	// write access to this bucket. This can either be the bucket name by
8452	// itself, such as example-bucket, or the bucket name with gs:// or
8453	// https://storage.googleapis.com/ in front of it, such as
8454	// gs://example-bucket.
8455	BucketName string `json:"bucketName,omitempty"`
8456
8457	// ReportNamePrefix: An optional prefix for the name of the usage report
8458	// object stored in bucketName. If not supplied, defaults to usage. The
8459	// report is stored as a CSV file named
8460	// report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the
8461	// usage according to Pacific Time. If you supply a prefix, it should
8462	// conform to Cloud Storage object naming conventions.
8463	ReportNamePrefix string `json:"reportNamePrefix,omitempty"`
8464
8465	// ForceSendFields is a list of field names (e.g. "BucketName") to
8466	// unconditionally include in API requests. By default, fields with
8467	// empty values are omitted from API requests. However, any non-pointer,
8468	// non-interface field appearing in ForceSendFields will be sent to the
8469	// server regardless of whether the field is empty or not. This may be
8470	// used to include empty fields in Patch requests.
8471	ForceSendFields []string `json:"-"`
8472}
8473
8474func (s *UsageExportLocation) MarshalJSON() ([]byte, error) {
8475	type noMethod UsageExportLocation
8476	raw := noMethod(*s)
8477	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8478}
8479
8480type VpnTunnel struct {
8481	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
8482	// format.
8483	CreationTimestamp string `json:"creationTimestamp,omitempty"`
8484
8485	// Description: An optional description of this resource. Provide this
8486	// property when you create the resource.
8487	Description string `json:"description,omitempty"`
8488
8489	// DetailedStatus: [Output Only] Detailed status message for the VPN
8490	// tunnel.
8491	DetailedStatus string `json:"detailedStatus,omitempty"`
8492
8493	// Id: [Output Only] The unique identifier for the resource. This
8494	// identifier is defined by the server.
8495	Id uint64 `json:"id,omitempty,string"`
8496
8497	// IkeVersion: IKE protocol version to use when establishing the VPN
8498	// tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2.
8499	// Default version is 2.
8500	IkeVersion int64 `json:"ikeVersion,omitempty"`
8501
8502	// Kind: [Output Only] Type of resource. Always compute#vpnTunnel for
8503	// VPN tunnels.
8504	Kind string `json:"kind,omitempty"`
8505
8506	// LocalTrafficSelector: Local traffic selector to use when establishing
8507	// the VPN tunnel with peer VPN gateway. The value should be a CIDR
8508	// formatted string, for example: 192.168.0.0/16. The ranges should be
8509	// disjoint.
8510	LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"`
8511
8512	// Name: Name of the resource. Provided by the client when the resource
8513	// is created. The name must be 1-63 characters long, and comply with
8514	// RFC1035. Specifically, the name must be 1-63 characters long and
8515	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
8516	// the first character must be a lowercase letter, and all following
8517	// characters must be a dash, lowercase letter, or digit, except the
8518	// last character, which cannot be a dash.
8519	Name string `json:"name,omitempty"`
8520
8521	// PeerIp: IP address of the peer VPN gateway.
8522	PeerIp string `json:"peerIp,omitempty"`
8523
8524	// Region: [Output Only] URL of the region where the VPN tunnel resides.
8525	Region string `json:"region,omitempty"`
8526
8527	// SelfLink: [Output Only] Server-defined URL for the resource.
8528	SelfLink string `json:"selfLink,omitempty"`
8529
8530	// SharedSecret: Shared secret used to set the secure session between
8531	// the Cloud VPN gateway and the peer VPN gateway.
8532	SharedSecret string `json:"sharedSecret,omitempty"`
8533
8534	// SharedSecretHash: Hash of the shared secret.
8535	SharedSecretHash string `json:"sharedSecretHash,omitempty"`
8536
8537	// Status: [Output Only] The status of the VPN tunnel.
8538	//
8539	// Possible values:
8540	//   "ALLOCATING_RESOURCES"
8541	//   "AUTHORIZATION_ERROR"
8542	//   "DEPROVISIONING"
8543	//   "ESTABLISHED"
8544	//   "FAILED"
8545	//   "FIRST_HANDSHAKE"
8546	//   "NEGOTIATION_FAILURE"
8547	//   "NETWORK_ERROR"
8548	//   "NO_INCOMING_PACKETS"
8549	//   "PROVISIONING"
8550	//   "REJECTED"
8551	//   "WAITING_FOR_FULL_CONFIG"
8552	Status string `json:"status,omitempty"`
8553
8554	// TargetVpnGateway: URL of the VPN gateway with which this VPN tunnel
8555	// is associated. Provided by the client when the VPN tunnel is created.
8556	TargetVpnGateway string `json:"targetVpnGateway,omitempty"`
8557
8558	// ServerResponse contains the HTTP response code and headers from the
8559	// server.
8560	googleapi.ServerResponse `json:"-"`
8561
8562	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
8563	// to unconditionally include in API requests. By default, fields with
8564	// empty values are omitted from API requests. However, any non-pointer,
8565	// non-interface field appearing in ForceSendFields will be sent to the
8566	// server regardless of whether the field is empty or not. This may be
8567	// used to include empty fields in Patch requests.
8568	ForceSendFields []string `json:"-"`
8569}
8570
8571func (s *VpnTunnel) MarshalJSON() ([]byte, error) {
8572	type noMethod VpnTunnel
8573	raw := noMethod(*s)
8574	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8575}
8576
8577type VpnTunnelAggregatedList struct {
8578	// Id: [Output Only] The unique identifier for the resource. This
8579	// identifier is defined by the server.
8580	Id string `json:"id,omitempty"`
8581
8582	// Items: [Output Only] A map of scoped vpn tunnel lists.
8583	Items map[string]VpnTunnelsScopedList `json:"items,omitempty"`
8584
8585	// Kind: [Output Only] Type of resource. Always compute#vpnTunnel for
8586	// VPN tunnels.
8587	Kind string `json:"kind,omitempty"`
8588
8589	// NextPageToken: [Output Only] This token allows you to get the next
8590	// page of results for list requests. If the number of results is larger
8591	// than maxResults, use the nextPageToken as a value for the query
8592	// parameter pageToken in the next list request. Subsequent list
8593	// requests will have their own nextPageToken to continue paging through
8594	// the results.
8595	NextPageToken string `json:"nextPageToken,omitempty"`
8596
8597	// SelfLink: [Output Only] Server-defined URL for this resource.
8598	SelfLink string `json:"selfLink,omitempty"`
8599
8600	// ServerResponse contains the HTTP response code and headers from the
8601	// server.
8602	googleapi.ServerResponse `json:"-"`
8603
8604	// ForceSendFields is a list of field names (e.g. "Id") to
8605	// unconditionally include in API requests. By default, fields with
8606	// empty values are omitted from API requests. However, any non-pointer,
8607	// non-interface field appearing in ForceSendFields will be sent to the
8608	// server regardless of whether the field is empty or not. This may be
8609	// used to include empty fields in Patch requests.
8610	ForceSendFields []string `json:"-"`
8611}
8612
8613func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) {
8614	type noMethod VpnTunnelAggregatedList
8615	raw := noMethod(*s)
8616	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8617}
8618
8619// VpnTunnelList: Contains a list of VpnTunnel resources.
8620type VpnTunnelList struct {
8621	// Id: [Output Only] The unique identifier for the resource. This
8622	// identifier is defined by the server.
8623	Id string `json:"id,omitempty"`
8624
8625	// Items: [Output Only] A list of VpnTunnel resources.
8626	Items []*VpnTunnel `json:"items,omitempty"`
8627
8628	// Kind: [Output Only] Type of resource. Always compute#vpnTunnel for
8629	// VPN tunnels.
8630	Kind string `json:"kind,omitempty"`
8631
8632	// NextPageToken: [Output Only] This token allows you to get the next
8633	// page of results for list requests. If the number of results is larger
8634	// than maxResults, use the nextPageToken as a value for the query
8635	// parameter pageToken in the next list request. Subsequent list
8636	// requests will have their own nextPageToken to continue paging through
8637	// the results.
8638	NextPageToken string `json:"nextPageToken,omitempty"`
8639
8640	// SelfLink: [Output Only] Server-defined URL for the resource.
8641	SelfLink string `json:"selfLink,omitempty"`
8642
8643	// ServerResponse contains the HTTP response code and headers from the
8644	// server.
8645	googleapi.ServerResponse `json:"-"`
8646
8647	// ForceSendFields is a list of field names (e.g. "Id") to
8648	// unconditionally include in API requests. By default, fields with
8649	// empty values are omitted from API requests. However, any non-pointer,
8650	// non-interface field appearing in ForceSendFields will be sent to the
8651	// server regardless of whether the field is empty or not. This may be
8652	// used to include empty fields in Patch requests.
8653	ForceSendFields []string `json:"-"`
8654}
8655
8656func (s *VpnTunnelList) MarshalJSON() ([]byte, error) {
8657	type noMethod VpnTunnelList
8658	raw := noMethod(*s)
8659	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8660}
8661
8662type VpnTunnelsScopedList struct {
8663	// VpnTunnels: List of vpn tunnels contained in this scope.
8664	VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"`
8665
8666	// Warning: Informational warning which replaces the list of addresses
8667	// when the list is empty.
8668	Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"`
8669
8670	// ForceSendFields is a list of field names (e.g. "VpnTunnels") to
8671	// unconditionally include in API requests. By default, fields with
8672	// empty values are omitted from API requests. However, any non-pointer,
8673	// non-interface field appearing in ForceSendFields will be sent to the
8674	// server regardless of whether the field is empty or not. This may be
8675	// used to include empty fields in Patch requests.
8676	ForceSendFields []string `json:"-"`
8677}
8678
8679func (s *VpnTunnelsScopedList) MarshalJSON() ([]byte, error) {
8680	type noMethod VpnTunnelsScopedList
8681	raw := noMethod(*s)
8682	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8683}
8684
8685// VpnTunnelsScopedListWarning: Informational warning which replaces the
8686// list of addresses when the list is empty.
8687type VpnTunnelsScopedListWarning struct {
8688	// Code: [Output Only] A warning code, if applicable. For example,
8689	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
8690	// the response.
8691	//
8692	// Possible values:
8693	//   "CLEANUP_FAILED"
8694	//   "DEPRECATED_RESOURCE_USED"
8695	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
8696	//   "INJECTED_KERNELS_DEPRECATED"
8697	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
8698	//   "NEXT_HOP_CANNOT_IP_FORWARD"
8699	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
8700	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
8701	//   "NEXT_HOP_NOT_RUNNING"
8702	//   "NOT_CRITICAL_ERROR"
8703	//   "NO_RESULTS_ON_PAGE"
8704	//   "REQUIRED_TOS_AGREEMENT"
8705	//   "RESOURCE_NOT_DELETED"
8706	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
8707	//   "UNREACHABLE"
8708	Code string `json:"code,omitempty"`
8709
8710	// Data: [Output Only] Metadata about this warning in key: value format.
8711	// For example:
8712	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
8713	Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"`
8714
8715	// Message: [Output Only] A human-readable description of the warning
8716	// code.
8717	Message string `json:"message,omitempty"`
8718
8719	// ForceSendFields is a list of field names (e.g. "Code") to
8720	// unconditionally include in API requests. By default, fields with
8721	// empty values are omitted from API requests. However, any non-pointer,
8722	// non-interface field appearing in ForceSendFields will be sent to the
8723	// server regardless of whether the field is empty or not. This may be
8724	// used to include empty fields in Patch requests.
8725	ForceSendFields []string `json:"-"`
8726}
8727
8728func (s *VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) {
8729	type noMethod VpnTunnelsScopedListWarning
8730	raw := noMethod(*s)
8731	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8732}
8733
8734type VpnTunnelsScopedListWarningData struct {
8735	// Key: [Output Only] A key that provides more detail on the warning
8736	// being returned. For example, for warnings where there are no results
8737	// in a list request for a particular zone, this key might be scope and
8738	// the key value might be the zone name. Other examples might be a key
8739	// indicating a deprecated resource and a suggested replacement, or a
8740	// warning about invalid network settings (for example, if an instance
8741	// attempts to perform IP forwarding but is not enabled for IP
8742	// forwarding).
8743	Key string `json:"key,omitempty"`
8744
8745	// Value: [Output Only] A warning data value corresponding to the key.
8746	Value string `json:"value,omitempty"`
8747
8748	// ForceSendFields is a list of field names (e.g. "Key") to
8749	// unconditionally include in API requests. By default, fields with
8750	// empty values are omitted from API requests. However, any non-pointer,
8751	// non-interface field appearing in ForceSendFields will be sent to the
8752	// server regardless of whether the field is empty or not. This may be
8753	// used to include empty fields in Patch requests.
8754	ForceSendFields []string `json:"-"`
8755}
8756
8757func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) {
8758	type noMethod VpnTunnelsScopedListWarningData
8759	raw := noMethod(*s)
8760	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8761}
8762
8763// Zone: A Zone resource.
8764type Zone struct {
8765	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
8766	// format.
8767	CreationTimestamp string `json:"creationTimestamp,omitempty"`
8768
8769	// Deprecated: [Output Only] The deprecation status associated with this
8770	// zone.
8771	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
8772
8773	// Description: [Output Only] Textual description of the resource.
8774	Description string `json:"description,omitempty"`
8775
8776	// Id: [Output Only] The unique identifier for the resource. This
8777	// identifier is defined by the server.
8778	Id uint64 `json:"id,omitempty,string"`
8779
8780	// Kind: [Output Only] Type of the resource. Always compute#zone for
8781	// zones.
8782	Kind string `json:"kind,omitempty"`
8783
8784	// MaintenanceWindows: [Output Only] Any scheduled maintenance windows
8785	// for this zone. When the zone is in a maintenance window, all
8786	// resources which reside in the zone will be unavailable. For more
8787	// information, see Maintenance Windows
8788	MaintenanceWindows []*ZoneMaintenanceWindows `json:"maintenanceWindows,omitempty"`
8789
8790	// Name: [Output Only] Name of the resource.
8791	Name string `json:"name,omitempty"`
8792
8793	// Region: [Output Only] Full URL reference to the region which hosts
8794	// the zone.
8795	Region string `json:"region,omitempty"`
8796
8797	// SelfLink: [Output Only] Server-defined URL for the resource.
8798	SelfLink string `json:"selfLink,omitempty"`
8799
8800	// Status: [Output Only] Status of the zone, either UP or DOWN.
8801	//
8802	// Possible values:
8803	//   "DOWN"
8804	//   "UP"
8805	Status string `json:"status,omitempty"`
8806
8807	// ServerResponse contains the HTTP response code and headers from the
8808	// server.
8809	googleapi.ServerResponse `json:"-"`
8810
8811	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
8812	// to unconditionally include in API requests. By default, fields with
8813	// empty values are omitted from API requests. However, any non-pointer,
8814	// non-interface field appearing in ForceSendFields will be sent to the
8815	// server regardless of whether the field is empty or not. This may be
8816	// used to include empty fields in Patch requests.
8817	ForceSendFields []string `json:"-"`
8818}
8819
8820func (s *Zone) MarshalJSON() ([]byte, error) {
8821	type noMethod Zone
8822	raw := noMethod(*s)
8823	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8824}
8825
8826type ZoneMaintenanceWindows struct {
8827	// BeginTime: [Output Only] Starting time of the maintenance window, in
8828	// RFC3339 format.
8829	BeginTime string `json:"beginTime,omitempty"`
8830
8831	// Description: [Output Only] Textual description of the maintenance
8832	// window.
8833	Description string `json:"description,omitempty"`
8834
8835	// EndTime: [Output Only] Ending time of the maintenance window, in
8836	// RFC3339 format.
8837	EndTime string `json:"endTime,omitempty"`
8838
8839	// Name: [Output Only] Name of the maintenance window.
8840	Name string `json:"name,omitempty"`
8841
8842	// ForceSendFields is a list of field names (e.g. "BeginTime") to
8843	// unconditionally include in API requests. By default, fields with
8844	// empty values are omitted from API requests. However, any non-pointer,
8845	// non-interface field appearing in ForceSendFields will be sent to the
8846	// server regardless of whether the field is empty or not. This may be
8847	// used to include empty fields in Patch requests.
8848	ForceSendFields []string `json:"-"`
8849}
8850
8851func (s *ZoneMaintenanceWindows) MarshalJSON() ([]byte, error) {
8852	type noMethod ZoneMaintenanceWindows
8853	raw := noMethod(*s)
8854	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8855}
8856
8857// ZoneList: Contains a list of zone resources.
8858type ZoneList struct {
8859	// Id: [Output Only] Unique identifier for the resource; defined by the
8860	// server.
8861	Id string `json:"id,omitempty"`
8862
8863	// Items: [Output Only] A list of Zone resources.
8864	Items []*Zone `json:"items,omitempty"`
8865
8866	// Kind: Type of resource.
8867	Kind string `json:"kind,omitempty"`
8868
8869	// NextPageToken: [Output Only] This token allows you to get the next
8870	// page of results for list requests. If the number of results is larger
8871	// than maxResults, use the nextPageToken as a value for the query
8872	// parameter pageToken in the next list request. Subsequent list
8873	// requests will have their own nextPageToken to continue paging through
8874	// the results.
8875	NextPageToken string `json:"nextPageToken,omitempty"`
8876
8877	// SelfLink: [Output Only] Server-defined URL for this resource.
8878	SelfLink string `json:"selfLink,omitempty"`
8879
8880	// ServerResponse contains the HTTP response code and headers from the
8881	// server.
8882	googleapi.ServerResponse `json:"-"`
8883
8884	// ForceSendFields is a list of field names (e.g. "Id") to
8885	// unconditionally include in API requests. By default, fields with
8886	// empty values are omitted from API requests. However, any non-pointer,
8887	// non-interface field appearing in ForceSendFields will be sent to the
8888	// server regardless of whether the field is empty or not. This may be
8889	// used to include empty fields in Patch requests.
8890	ForceSendFields []string `json:"-"`
8891}
8892
8893func (s *ZoneList) MarshalJSON() ([]byte, error) {
8894	type noMethod ZoneList
8895	raw := noMethod(*s)
8896	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8897}
8898
8899// method id "compute.addresses.aggregatedList":
8900
8901type AddressesAggregatedListCall struct {
8902	s            *Service
8903	project      string
8904	urlParams_   gensupport.URLParams
8905	ifNoneMatch_ string
8906	ctx_         context.Context
8907}
8908
8909// AggregatedList: Retrieves an aggregated list of addresses.
8910// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList
8911func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall {
8912	c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8913	c.project = project
8914	return c
8915}
8916
8917// Filter sets the optional parameter "filter": Sets a filter expression
8918// for filtering listed resources, in the form filter={expression}. Your
8919// {expression} must be in the format: field_name comparison_string
8920// literal_string.
8921//
8922// The field_name is the name of the field you want to compare. Only
8923// atomic field types are supported (string, number, boolean). The
8924// comparison_string must be either eq (equals) or ne (not equals). The
8925// literal_string is the string value to filter to. The literal value
8926// must be valid for the type of field you are filtering by (string,
8927// number, boolean). For string fields, the literal value is interpreted
8928// as a regular expression using RE2 syntax. The literal value must
8929// match the entire field.
8930//
8931// For example, to filter for instances that do not have a name of
8932// example-instance, you would use filter=name ne
8933// example-instance.
8934//
8935// Compute Engine Beta API Only: If you use filtering in the Beta API,
8936// you can also filter on nested fields. For example, you could filter
8937// on instances that have set the scheduling.automaticRestart field to
8938// true. In particular, use filtering on nested fields to take advantage
8939// of instance labels to organize and filter results based on label
8940// values.
8941//
8942// The Beta API also supports filtering on multiple expressions by
8943// providing each separate expression within parentheses. For example,
8944// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
8945// Multiple expressions are treated as AND expressions, meaning that
8946// resources must match all expressions to pass the filters.
8947func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall {
8948	c.urlParams_.Set("filter", filter)
8949	return c
8950}
8951
8952// MaxResults sets the optional parameter "maxResults": The maximum
8953// number of results per page that should be returned. If the number of
8954// available results is larger than maxResults, Compute Engine returns a
8955// nextPageToken that can be used to get the next page of results in
8956// subsequent list requests.
8957func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall {
8958	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
8959	return c
8960}
8961
8962// PageToken sets the optional parameter "pageToken": Specifies a page
8963// token to use. Set pageToken to the nextPageToken returned by a
8964// previous list request to get the next page of results.
8965func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall {
8966	c.urlParams_.Set("pageToken", pageToken)
8967	return c
8968}
8969
8970// Fields allows partial responses to be retrieved. See
8971// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8972// for more information.
8973func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall {
8974	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8975	return c
8976}
8977
8978// IfNoneMatch sets the optional parameter which makes the operation
8979// fail if the object's ETag matches the given value. This is useful for
8980// getting updates only after the object has changed since the last
8981// request. Use googleapi.IsNotModified to check whether the response
8982// error from Do is the result of In-None-Match.
8983func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall {
8984	c.ifNoneMatch_ = entityTag
8985	return c
8986}
8987
8988// Context sets the context to be used in this call's Do method. Any
8989// pending HTTP request will be aborted if the provided context is
8990// canceled.
8991func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall {
8992	c.ctx_ = ctx
8993	return c
8994}
8995
8996func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
8997	var body io.Reader = nil
8998	c.urlParams_.Set("alt", alt)
8999	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/addresses")
9000	urls += "?" + c.urlParams_.Encode()
9001	req, _ := http.NewRequest("GET", urls, body)
9002	googleapi.Expand(req.URL, map[string]string{
9003		"project": c.project,
9004	})
9005	req.Header.Set("User-Agent", c.s.userAgent())
9006	if c.ifNoneMatch_ != "" {
9007		req.Header.Set("If-None-Match", c.ifNoneMatch_)
9008	}
9009	if c.ctx_ != nil {
9010		return ctxhttp.Do(c.ctx_, c.s.client, req)
9011	}
9012	return c.s.client.Do(req)
9013}
9014
9015// Do executes the "compute.addresses.aggregatedList" call.
9016// Exactly one of *AddressAggregatedList or error will be non-nil. Any
9017// non-2xx status code is an error. Response headers are in either
9018// *AddressAggregatedList.ServerResponse.Header or (if a response was
9019// returned at all) in error.(*googleapi.Error).Header. Use
9020// googleapi.IsNotModified to check whether the returned error was
9021// because http.StatusNotModified was returned.
9022func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, error) {
9023	gensupport.SetOptions(c.urlParams_, opts...)
9024	res, err := c.doRequest("json")
9025	if res != nil && res.StatusCode == http.StatusNotModified {
9026		if res.Body != nil {
9027			res.Body.Close()
9028		}
9029		return nil, &googleapi.Error{
9030			Code:   res.StatusCode,
9031			Header: res.Header,
9032		}
9033	}
9034	if err != nil {
9035		return nil, err
9036	}
9037	defer googleapi.CloseBody(res)
9038	if err := googleapi.CheckResponse(res); err != nil {
9039		return nil, err
9040	}
9041	ret := &AddressAggregatedList{
9042		ServerResponse: googleapi.ServerResponse{
9043			Header:         res.Header,
9044			HTTPStatusCode: res.StatusCode,
9045		},
9046	}
9047	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
9048		return nil, err
9049	}
9050	return ret, nil
9051	// {
9052	//   "description": "Retrieves an aggregated list of addresses.",
9053	//   "httpMethod": "GET",
9054	//   "id": "compute.addresses.aggregatedList",
9055	//   "parameterOrder": [
9056	//     "project"
9057	//   ],
9058	//   "parameters": {
9059	//     "filter": {
9060	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
9061	//       "location": "query",
9062	//       "type": "string"
9063	//     },
9064	//     "maxResults": {
9065	//       "default": "500",
9066	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
9067	//       "format": "uint32",
9068	//       "location": "query",
9069	//       "maximum": "500",
9070	//       "minimum": "0",
9071	//       "type": "integer"
9072	//     },
9073	//     "pageToken": {
9074	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
9075	//       "location": "query",
9076	//       "type": "string"
9077	//     },
9078	//     "project": {
9079	//       "description": "Project ID for this request.",
9080	//       "location": "path",
9081	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
9082	//       "required": true,
9083	//       "type": "string"
9084	//     }
9085	//   },
9086	//   "path": "{project}/aggregated/addresses",
9087	//   "response": {
9088	//     "$ref": "AddressAggregatedList"
9089	//   },
9090	//   "scopes": [
9091	//     "https://www.googleapis.com/auth/cloud-platform",
9092	//     "https://www.googleapis.com/auth/compute",
9093	//     "https://www.googleapis.com/auth/compute.readonly"
9094	//   ]
9095	// }
9096
9097}
9098
9099// Pages invokes f for each page of results.
9100// A non-nil error returned from f will halt the iteration.
9101// The provided context supersedes any context provided to the Context method.
9102func (c *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) error) error {
9103	c.ctx_ = ctx
9104	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9105	for {
9106		x, err := c.Do()
9107		if err != nil {
9108			return err
9109		}
9110		if err := f(x); err != nil {
9111			return err
9112		}
9113		if x.NextPageToken == "" {
9114			return nil
9115		}
9116		c.PageToken(x.NextPageToken)
9117	}
9118}
9119
9120// method id "compute.addresses.delete":
9121
9122type AddressesDeleteCall struct {
9123	s          *Service
9124	project    string
9125	region     string
9126	address    string
9127	urlParams_ gensupport.URLParams
9128	ctx_       context.Context
9129}
9130
9131// Delete: Deletes the specified address resource.
9132// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/delete
9133func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall {
9134	c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9135	c.project = project
9136	c.region = region
9137	c.address = address
9138	return c
9139}
9140
9141// Fields allows partial responses to be retrieved. See
9142// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9143// for more information.
9144func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall {
9145	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9146	return c
9147}
9148
9149// Context sets the context to be used in this call's Do method. Any
9150// pending HTTP request will be aborted if the provided context is
9151// canceled.
9152func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall {
9153	c.ctx_ = ctx
9154	return c
9155}
9156
9157func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
9158	var body io.Reader = nil
9159	c.urlParams_.Set("alt", alt)
9160	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}")
9161	urls += "?" + c.urlParams_.Encode()
9162	req, _ := http.NewRequest("DELETE", urls, body)
9163	googleapi.Expand(req.URL, map[string]string{
9164		"project": c.project,
9165		"region":  c.region,
9166		"address": c.address,
9167	})
9168	req.Header.Set("User-Agent", c.s.userAgent())
9169	if c.ctx_ != nil {
9170		return ctxhttp.Do(c.ctx_, c.s.client, req)
9171	}
9172	return c.s.client.Do(req)
9173}
9174
9175// Do executes the "compute.addresses.delete" call.
9176// Exactly one of *Operation or error will be non-nil. Any non-2xx
9177// status code is an error. Response headers are in either
9178// *Operation.ServerResponse.Header or (if a response was returned at
9179// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9180// to check whether the returned error was because
9181// http.StatusNotModified was returned.
9182func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9183	gensupport.SetOptions(c.urlParams_, opts...)
9184	res, err := c.doRequest("json")
9185	if res != nil && res.StatusCode == http.StatusNotModified {
9186		if res.Body != nil {
9187			res.Body.Close()
9188		}
9189		return nil, &googleapi.Error{
9190			Code:   res.StatusCode,
9191			Header: res.Header,
9192		}
9193	}
9194	if err != nil {
9195		return nil, err
9196	}
9197	defer googleapi.CloseBody(res)
9198	if err := googleapi.CheckResponse(res); err != nil {
9199		return nil, err
9200	}
9201	ret := &Operation{
9202		ServerResponse: googleapi.ServerResponse{
9203			Header:         res.Header,
9204			HTTPStatusCode: res.StatusCode,
9205		},
9206	}
9207	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
9208		return nil, err
9209	}
9210	return ret, nil
9211	// {
9212	//   "description": "Deletes the specified address resource.",
9213	//   "httpMethod": "DELETE",
9214	//   "id": "compute.addresses.delete",
9215	//   "parameterOrder": [
9216	//     "project",
9217	//     "region",
9218	//     "address"
9219	//   ],
9220	//   "parameters": {
9221	//     "address": {
9222	//       "description": "Name of the address resource to delete.",
9223	//       "location": "path",
9224	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
9225	//       "required": true,
9226	//       "type": "string"
9227	//     },
9228	//     "project": {
9229	//       "description": "Project ID for this request.",
9230	//       "location": "path",
9231	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
9232	//       "required": true,
9233	//       "type": "string"
9234	//     },
9235	//     "region": {
9236	//       "description": "Name of the region for this request.",
9237	//       "location": "path",
9238	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
9239	//       "required": true,
9240	//       "type": "string"
9241	//     }
9242	//   },
9243	//   "path": "{project}/regions/{region}/addresses/{address}",
9244	//   "response": {
9245	//     "$ref": "Operation"
9246	//   },
9247	//   "scopes": [
9248	//     "https://www.googleapis.com/auth/cloud-platform",
9249	//     "https://www.googleapis.com/auth/compute"
9250	//   ]
9251	// }
9252
9253}
9254
9255// method id "compute.addresses.get":
9256
9257type AddressesGetCall struct {
9258	s            *Service
9259	project      string
9260	region       string
9261	address      string
9262	urlParams_   gensupport.URLParams
9263	ifNoneMatch_ string
9264	ctx_         context.Context
9265}
9266
9267// Get: Returns the specified address resource.
9268// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/get
9269func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall {
9270	c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9271	c.project = project
9272	c.region = region
9273	c.address = address
9274	return c
9275}
9276
9277// Fields allows partial responses to be retrieved. See
9278// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9279// for more information.
9280func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall {
9281	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9282	return c
9283}
9284
9285// IfNoneMatch sets the optional parameter which makes the operation
9286// fail if the object's ETag matches the given value. This is useful for
9287// getting updates only after the object has changed since the last
9288// request. Use googleapi.IsNotModified to check whether the response
9289// error from Do is the result of In-None-Match.
9290func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall {
9291	c.ifNoneMatch_ = entityTag
9292	return c
9293}
9294
9295// Context sets the context to be used in this call's Do method. Any
9296// pending HTTP request will be aborted if the provided context is
9297// canceled.
9298func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall {
9299	c.ctx_ = ctx
9300	return c
9301}
9302
9303func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) {
9304	var body io.Reader = nil
9305	c.urlParams_.Set("alt", alt)
9306	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}")
9307	urls += "?" + c.urlParams_.Encode()
9308	req, _ := http.NewRequest("GET", urls, body)
9309	googleapi.Expand(req.URL, map[string]string{
9310		"project": c.project,
9311		"region":  c.region,
9312		"address": c.address,
9313	})
9314	req.Header.Set("User-Agent", c.s.userAgent())
9315	if c.ifNoneMatch_ != "" {
9316		req.Header.Set("If-None-Match", c.ifNoneMatch_)
9317	}
9318	if c.ctx_ != nil {
9319		return ctxhttp.Do(c.ctx_, c.s.client, req)
9320	}
9321	return c.s.client.Do(req)
9322}
9323
9324// Do executes the "compute.addresses.get" call.
9325// Exactly one of *Address or error will be non-nil. Any non-2xx status
9326// code is an error. Response headers are in either
9327// *Address.ServerResponse.Header or (if a response was returned at all)
9328// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9329// check whether the returned error was because http.StatusNotModified
9330// was returned.
9331func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) {
9332	gensupport.SetOptions(c.urlParams_, opts...)
9333	res, err := c.doRequest("json")
9334	if res != nil && res.StatusCode == http.StatusNotModified {
9335		if res.Body != nil {
9336			res.Body.Close()
9337		}
9338		return nil, &googleapi.Error{
9339			Code:   res.StatusCode,
9340			Header: res.Header,
9341		}
9342	}
9343	if err != nil {
9344		return nil, err
9345	}
9346	defer googleapi.CloseBody(res)
9347	if err := googleapi.CheckResponse(res); err != nil {
9348		return nil, err
9349	}
9350	ret := &Address{
9351		ServerResponse: googleapi.ServerResponse{
9352			Header:         res.Header,
9353			HTTPStatusCode: res.StatusCode,
9354		},
9355	}
9356	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
9357		return nil, err
9358	}
9359	return ret, nil
9360	// {
9361	//   "description": "Returns the specified address resource.",
9362	//   "httpMethod": "GET",
9363	//   "id": "compute.addresses.get",
9364	//   "parameterOrder": [
9365	//     "project",
9366	//     "region",
9367	//     "address"
9368	//   ],
9369	//   "parameters": {
9370	//     "address": {
9371	//       "description": "Name of the address resource to return.",
9372	//       "location": "path",
9373	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
9374	//       "required": true,
9375	//       "type": "string"
9376	//     },
9377	//     "project": {
9378	//       "description": "Project ID for this request.",
9379	//       "location": "path",
9380	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
9381	//       "required": true,
9382	//       "type": "string"
9383	//     },
9384	//     "region": {
9385	//       "description": "Name of the region for this request.",
9386	//       "location": "path",
9387	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
9388	//       "required": true,
9389	//       "type": "string"
9390	//     }
9391	//   },
9392	//   "path": "{project}/regions/{region}/addresses/{address}",
9393	//   "response": {
9394	//     "$ref": "Address"
9395	//   },
9396	//   "scopes": [
9397	//     "https://www.googleapis.com/auth/cloud-platform",
9398	//     "https://www.googleapis.com/auth/compute",
9399	//     "https://www.googleapis.com/auth/compute.readonly"
9400	//   ]
9401	// }
9402
9403}
9404
9405// method id "compute.addresses.insert":
9406
9407type AddressesInsertCall struct {
9408	s          *Service
9409	project    string
9410	region     string
9411	address    *Address
9412	urlParams_ gensupport.URLParams
9413	ctx_       context.Context
9414}
9415
9416// Insert: Creates an address resource in the specified project using
9417// the data included in the request.
9418// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/insert
9419func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall {
9420	c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9421	c.project = project
9422	c.region = region
9423	c.address = address
9424	return c
9425}
9426
9427// Fields allows partial responses to be retrieved. See
9428// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9429// for more information.
9430func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall {
9431	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9432	return c
9433}
9434
9435// Context sets the context to be used in this call's Do method. Any
9436// pending HTTP request will be aborted if the provided context is
9437// canceled.
9438func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall {
9439	c.ctx_ = ctx
9440	return c
9441}
9442
9443func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) {
9444	var body io.Reader = nil
9445	body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
9446	if err != nil {
9447		return nil, err
9448	}
9449	ctype := "application/json"
9450	c.urlParams_.Set("alt", alt)
9451	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses")
9452	urls += "?" + c.urlParams_.Encode()
9453	req, _ := http.NewRequest("POST", urls, body)
9454	googleapi.Expand(req.URL, map[string]string{
9455		"project": c.project,
9456		"region":  c.region,
9457	})
9458	req.Header.Set("Content-Type", ctype)
9459	req.Header.Set("User-Agent", c.s.userAgent())
9460	if c.ctx_ != nil {
9461		return ctxhttp.Do(c.ctx_, c.s.client, req)
9462	}
9463	return c.s.client.Do(req)
9464}
9465
9466// Do executes the "compute.addresses.insert" call.
9467// Exactly one of *Operation or error will be non-nil. Any non-2xx
9468// status code is an error. Response headers are in either
9469// *Operation.ServerResponse.Header or (if a response was returned at
9470// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9471// to check whether the returned error was because
9472// http.StatusNotModified was returned.
9473func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9474	gensupport.SetOptions(c.urlParams_, opts...)
9475	res, err := c.doRequest("json")
9476	if res != nil && res.StatusCode == http.StatusNotModified {
9477		if res.Body != nil {
9478			res.Body.Close()
9479		}
9480		return nil, &googleapi.Error{
9481			Code:   res.StatusCode,
9482			Header: res.Header,
9483		}
9484	}
9485	if err != nil {
9486		return nil, err
9487	}
9488	defer googleapi.CloseBody(res)
9489	if err := googleapi.CheckResponse(res); err != nil {
9490		return nil, err
9491	}
9492	ret := &Operation{
9493		ServerResponse: googleapi.ServerResponse{
9494			Header:         res.Header,
9495			HTTPStatusCode: res.StatusCode,
9496		},
9497	}
9498	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
9499		return nil, err
9500	}
9501	return ret, nil
9502	// {
9503	//   "description": "Creates an address resource in the specified project using the data included in the request.",
9504	//   "httpMethod": "POST",
9505	//   "id": "compute.addresses.insert",
9506	//   "parameterOrder": [
9507	//     "project",
9508	//     "region"
9509	//   ],
9510	//   "parameters": {
9511	//     "project": {
9512	//       "description": "Project ID for this request.",
9513	//       "location": "path",
9514	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
9515	//       "required": true,
9516	//       "type": "string"
9517	//     },
9518	//     "region": {
9519	//       "description": "Name of the region for this request.",
9520	//       "location": "path",
9521	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
9522	//       "required": true,
9523	//       "type": "string"
9524	//     }
9525	//   },
9526	//   "path": "{project}/regions/{region}/addresses",
9527	//   "request": {
9528	//     "$ref": "Address"
9529	//   },
9530	//   "response": {
9531	//     "$ref": "Operation"
9532	//   },
9533	//   "scopes": [
9534	//     "https://www.googleapis.com/auth/cloud-platform",
9535	//     "https://www.googleapis.com/auth/compute"
9536	//   ]
9537	// }
9538
9539}
9540
9541// method id "compute.addresses.list":
9542
9543type AddressesListCall struct {
9544	s            *Service
9545	project      string
9546	region       string
9547	urlParams_   gensupport.URLParams
9548	ifNoneMatch_ string
9549	ctx_         context.Context
9550}
9551
9552// List: Retrieves a list of addresses contained within the specified
9553// region.
9554// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list
9555func (r *AddressesService) List(project string, region string) *AddressesListCall {
9556	c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9557	c.project = project
9558	c.region = region
9559	return c
9560}
9561
9562// Filter sets the optional parameter "filter": Sets a filter expression
9563// for filtering listed resources, in the form filter={expression}. Your
9564// {expression} must be in the format: field_name comparison_string
9565// literal_string.
9566//
9567// The field_name is the name of the field you want to compare. Only
9568// atomic field types are supported (string, number, boolean). The
9569// comparison_string must be either eq (equals) or ne (not equals). The
9570// literal_string is the string value to filter to. The literal value
9571// must be valid for the type of field you are filtering by (string,
9572// number, boolean). For string fields, the literal value is interpreted
9573// as a regular expression using RE2 syntax. The literal value must
9574// match the entire field.
9575//
9576// For example, to filter for instances that do not have a name of
9577// example-instance, you would use filter=name ne
9578// example-instance.
9579//
9580// Compute Engine Beta API Only: If you use filtering in the Beta API,
9581// you can also filter on nested fields. For example, you could filter
9582// on instances that have set the scheduling.automaticRestart field to
9583// true. In particular, use filtering on nested fields to take advantage
9584// of instance labels to organize and filter results based on label
9585// values.
9586//
9587// The Beta API also supports filtering on multiple expressions by
9588// providing each separate expression within parentheses. For example,
9589// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
9590// Multiple expressions are treated as AND expressions, meaning that
9591// resources must match all expressions to pass the filters.
9592func (c *AddressesListCall) Filter(filter string) *AddressesListCall {
9593	c.urlParams_.Set("filter", filter)
9594	return c
9595}
9596
9597// MaxResults sets the optional parameter "maxResults": The maximum
9598// number of results per page that should be returned. If the number of
9599// available results is larger than maxResults, Compute Engine returns a
9600// nextPageToken that can be used to get the next page of results in
9601// subsequent list requests.
9602func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall {
9603	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
9604	return c
9605}
9606
9607// PageToken sets the optional parameter "pageToken": Specifies a page
9608// token to use. Set pageToken to the nextPageToken returned by a
9609// previous list request to get the next page of results.
9610func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall {
9611	c.urlParams_.Set("pageToken", pageToken)
9612	return c
9613}
9614
9615// Fields allows partial responses to be retrieved. See
9616// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9617// for more information.
9618func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall {
9619	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9620	return c
9621}
9622
9623// IfNoneMatch sets the optional parameter which makes the operation
9624// fail if the object's ETag matches the given value. This is useful for
9625// getting updates only after the object has changed since the last
9626// request. Use googleapi.IsNotModified to check whether the response
9627// error from Do is the result of In-None-Match.
9628func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall {
9629	c.ifNoneMatch_ = entityTag
9630	return c
9631}
9632
9633// Context sets the context to be used in this call's Do method. Any
9634// pending HTTP request will be aborted if the provided context is
9635// canceled.
9636func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall {
9637	c.ctx_ = ctx
9638	return c
9639}
9640
9641func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) {
9642	var body io.Reader = nil
9643	c.urlParams_.Set("alt", alt)
9644	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses")
9645	urls += "?" + c.urlParams_.Encode()
9646	req, _ := http.NewRequest("GET", urls, body)
9647	googleapi.Expand(req.URL, map[string]string{
9648		"project": c.project,
9649		"region":  c.region,
9650	})
9651	req.Header.Set("User-Agent", c.s.userAgent())
9652	if c.ifNoneMatch_ != "" {
9653		req.Header.Set("If-None-Match", c.ifNoneMatch_)
9654	}
9655	if c.ctx_ != nil {
9656		return ctxhttp.Do(c.ctx_, c.s.client, req)
9657	}
9658	return c.s.client.Do(req)
9659}
9660
9661// Do executes the "compute.addresses.list" call.
9662// Exactly one of *AddressList or error will be non-nil. Any non-2xx
9663// status code is an error. Response headers are in either
9664// *AddressList.ServerResponse.Header or (if a response was returned at
9665// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9666// to check whether the returned error was because
9667// http.StatusNotModified was returned.
9668func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) {
9669	gensupport.SetOptions(c.urlParams_, opts...)
9670	res, err := c.doRequest("json")
9671	if res != nil && res.StatusCode == http.StatusNotModified {
9672		if res.Body != nil {
9673			res.Body.Close()
9674		}
9675		return nil, &googleapi.Error{
9676			Code:   res.StatusCode,
9677			Header: res.Header,
9678		}
9679	}
9680	if err != nil {
9681		return nil, err
9682	}
9683	defer googleapi.CloseBody(res)
9684	if err := googleapi.CheckResponse(res); err != nil {
9685		return nil, err
9686	}
9687	ret := &AddressList{
9688		ServerResponse: googleapi.ServerResponse{
9689			Header:         res.Header,
9690			HTTPStatusCode: res.StatusCode,
9691		},
9692	}
9693	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
9694		return nil, err
9695	}
9696	return ret, nil
9697	// {
9698	//   "description": "Retrieves a list of addresses contained within the specified region.",
9699	//   "httpMethod": "GET",
9700	//   "id": "compute.addresses.list",
9701	//   "parameterOrder": [
9702	//     "project",
9703	//     "region"
9704	//   ],
9705	//   "parameters": {
9706	//     "filter": {
9707	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
9708	//       "location": "query",
9709	//       "type": "string"
9710	//     },
9711	//     "maxResults": {
9712	//       "default": "500",
9713	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
9714	//       "format": "uint32",
9715	//       "location": "query",
9716	//       "maximum": "500",
9717	//       "minimum": "0",
9718	//       "type": "integer"
9719	//     },
9720	//     "pageToken": {
9721	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
9722	//       "location": "query",
9723	//       "type": "string"
9724	//     },
9725	//     "project": {
9726	//       "description": "Project ID for this request.",
9727	//       "location": "path",
9728	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
9729	//       "required": true,
9730	//       "type": "string"
9731	//     },
9732	//     "region": {
9733	//       "description": "Name of the region for this request.",
9734	//       "location": "path",
9735	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
9736	//       "required": true,
9737	//       "type": "string"
9738	//     }
9739	//   },
9740	//   "path": "{project}/regions/{region}/addresses",
9741	//   "response": {
9742	//     "$ref": "AddressList"
9743	//   },
9744	//   "scopes": [
9745	//     "https://www.googleapis.com/auth/cloud-platform",
9746	//     "https://www.googleapis.com/auth/compute",
9747	//     "https://www.googleapis.com/auth/compute.readonly"
9748	//   ]
9749	// }
9750
9751}
9752
9753// Pages invokes f for each page of results.
9754// A non-nil error returned from f will halt the iteration.
9755// The provided context supersedes any context provided to the Context method.
9756func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error {
9757	c.ctx_ = ctx
9758	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9759	for {
9760		x, err := c.Do()
9761		if err != nil {
9762			return err
9763		}
9764		if err := f(x); err != nil {
9765			return err
9766		}
9767		if x.NextPageToken == "" {
9768			return nil
9769		}
9770		c.PageToken(x.NextPageToken)
9771	}
9772}
9773
9774// method id "compute.autoscalers.aggregatedList":
9775
9776type AutoscalersAggregatedListCall struct {
9777	s            *Service
9778	project      string
9779	urlParams_   gensupport.URLParams
9780	ifNoneMatch_ string
9781	ctx_         context.Context
9782}
9783
9784// AggregatedList: Retrieves an aggregated list of autoscalers.
9785func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall {
9786	c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9787	c.project = project
9788	return c
9789}
9790
9791// Filter sets the optional parameter "filter": Sets a filter expression
9792// for filtering listed resources, in the form filter={expression}. Your
9793// {expression} must be in the format: field_name comparison_string
9794// literal_string.
9795//
9796// The field_name is the name of the field you want to compare. Only
9797// atomic field types are supported (string, number, boolean). The
9798// comparison_string must be either eq (equals) or ne (not equals). The
9799// literal_string is the string value to filter to. The literal value
9800// must be valid for the type of field you are filtering by (string,
9801// number, boolean). For string fields, the literal value is interpreted
9802// as a regular expression using RE2 syntax. The literal value must
9803// match the entire field.
9804//
9805// For example, to filter for instances that do not have a name of
9806// example-instance, you would use filter=name ne
9807// example-instance.
9808//
9809// Compute Engine Beta API Only: If you use filtering in the Beta API,
9810// you can also filter on nested fields. For example, you could filter
9811// on instances that have set the scheduling.automaticRestart field to
9812// true. In particular, use filtering on nested fields to take advantage
9813// of instance labels to organize and filter results based on label
9814// values.
9815//
9816// The Beta API also supports filtering on multiple expressions by
9817// providing each separate expression within parentheses. For example,
9818// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
9819// Multiple expressions are treated as AND expressions, meaning that
9820// resources must match all expressions to pass the filters.
9821func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall {
9822	c.urlParams_.Set("filter", filter)
9823	return c
9824}
9825
9826// MaxResults sets the optional parameter "maxResults": The maximum
9827// number of results per page that should be returned. If the number of
9828// available results is larger than maxResults, Compute Engine returns a
9829// nextPageToken that can be used to get the next page of results in
9830// subsequent list requests.
9831func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall {
9832	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
9833	return c
9834}
9835
9836// PageToken sets the optional parameter "pageToken": Specifies a page
9837// token to use. Set pageToken to the nextPageToken returned by a
9838// previous list request to get the next page of results.
9839func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall {
9840	c.urlParams_.Set("pageToken", pageToken)
9841	return c
9842}
9843
9844// Fields allows partial responses to be retrieved. See
9845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9846// for more information.
9847func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall {
9848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9849	return c
9850}
9851
9852// IfNoneMatch sets the optional parameter which makes the operation
9853// fail if the object's ETag matches the given value. This is useful for
9854// getting updates only after the object has changed since the last
9855// request. Use googleapi.IsNotModified to check whether the response
9856// error from Do is the result of In-None-Match.
9857func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall {
9858	c.ifNoneMatch_ = entityTag
9859	return c
9860}
9861
9862// Context sets the context to be used in this call's Do method. Any
9863// pending HTTP request will be aborted if the provided context is
9864// canceled.
9865func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall {
9866	c.ctx_ = ctx
9867	return c
9868}
9869
9870func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
9871	var body io.Reader = nil
9872	c.urlParams_.Set("alt", alt)
9873	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/autoscalers")
9874	urls += "?" + c.urlParams_.Encode()
9875	req, _ := http.NewRequest("GET", urls, body)
9876	googleapi.Expand(req.URL, map[string]string{
9877		"project": c.project,
9878	})
9879	req.Header.Set("User-Agent", c.s.userAgent())
9880	if c.ifNoneMatch_ != "" {
9881		req.Header.Set("If-None-Match", c.ifNoneMatch_)
9882	}
9883	if c.ctx_ != nil {
9884		return ctxhttp.Do(c.ctx_, c.s.client, req)
9885	}
9886	return c.s.client.Do(req)
9887}
9888
9889// Do executes the "compute.autoscalers.aggregatedList" call.
9890// Exactly one of *AutoscalerAggregatedList or error will be non-nil.
9891// Any non-2xx status code is an error. Response headers are in either
9892// *AutoscalerAggregatedList.ServerResponse.Header or (if a response was
9893// returned at all) in error.(*googleapi.Error).Header. Use
9894// googleapi.IsNotModified to check whether the returned error was
9895// because http.StatusNotModified was returned.
9896func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) {
9897	gensupport.SetOptions(c.urlParams_, opts...)
9898	res, err := c.doRequest("json")
9899	if res != nil && res.StatusCode == http.StatusNotModified {
9900		if res.Body != nil {
9901			res.Body.Close()
9902		}
9903		return nil, &googleapi.Error{
9904			Code:   res.StatusCode,
9905			Header: res.Header,
9906		}
9907	}
9908	if err != nil {
9909		return nil, err
9910	}
9911	defer googleapi.CloseBody(res)
9912	if err := googleapi.CheckResponse(res); err != nil {
9913		return nil, err
9914	}
9915	ret := &AutoscalerAggregatedList{
9916		ServerResponse: googleapi.ServerResponse{
9917			Header:         res.Header,
9918			HTTPStatusCode: res.StatusCode,
9919		},
9920	}
9921	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
9922		return nil, err
9923	}
9924	return ret, nil
9925	// {
9926	//   "description": "Retrieves an aggregated list of autoscalers.",
9927	//   "httpMethod": "GET",
9928	//   "id": "compute.autoscalers.aggregatedList",
9929	//   "parameterOrder": [
9930	//     "project"
9931	//   ],
9932	//   "parameters": {
9933	//     "filter": {
9934	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
9935	//       "location": "query",
9936	//       "type": "string"
9937	//     },
9938	//     "maxResults": {
9939	//       "default": "500",
9940	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
9941	//       "format": "uint32",
9942	//       "location": "query",
9943	//       "maximum": "500",
9944	//       "minimum": "0",
9945	//       "type": "integer"
9946	//     },
9947	//     "pageToken": {
9948	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
9949	//       "location": "query",
9950	//       "type": "string"
9951	//     },
9952	//     "project": {
9953	//       "description": "Project ID for this request.",
9954	//       "location": "path",
9955	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
9956	//       "required": true,
9957	//       "type": "string"
9958	//     }
9959	//   },
9960	//   "path": "{project}/aggregated/autoscalers",
9961	//   "response": {
9962	//     "$ref": "AutoscalerAggregatedList"
9963	//   },
9964	//   "scopes": [
9965	//     "https://www.googleapis.com/auth/cloud-platform",
9966	//     "https://www.googleapis.com/auth/compute",
9967	//     "https://www.googleapis.com/auth/compute.readonly"
9968	//   ]
9969	// }
9970
9971}
9972
9973// Pages invokes f for each page of results.
9974// A non-nil error returned from f will halt the iteration.
9975// The provided context supersedes any context provided to the Context method.
9976func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error {
9977	c.ctx_ = ctx
9978	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9979	for {
9980		x, err := c.Do()
9981		if err != nil {
9982			return err
9983		}
9984		if err := f(x); err != nil {
9985			return err
9986		}
9987		if x.NextPageToken == "" {
9988			return nil
9989		}
9990		c.PageToken(x.NextPageToken)
9991	}
9992}
9993
9994// method id "compute.autoscalers.delete":
9995
9996type AutoscalersDeleteCall struct {
9997	s          *Service
9998	project    string
9999	zone       string
10000	autoscaler string
10001	urlParams_ gensupport.URLParams
10002	ctx_       context.Context
10003}
10004
10005// Delete: Deletes the specified autoscaler.
10006func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall {
10007	c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10008	c.project = project
10009	c.zone = zone
10010	c.autoscaler = autoscaler
10011	return c
10012}
10013
10014// Fields allows partial responses to be retrieved. See
10015// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10016// for more information.
10017func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall {
10018	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10019	return c
10020}
10021
10022// Context sets the context to be used in this call's Do method. Any
10023// pending HTTP request will be aborted if the provided context is
10024// canceled.
10025func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall {
10026	c.ctx_ = ctx
10027	return c
10028}
10029
10030func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) {
10031	var body io.Reader = nil
10032	c.urlParams_.Set("alt", alt)
10033	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}")
10034	urls += "?" + c.urlParams_.Encode()
10035	req, _ := http.NewRequest("DELETE", urls, body)
10036	googleapi.Expand(req.URL, map[string]string{
10037		"project":    c.project,
10038		"zone":       c.zone,
10039		"autoscaler": c.autoscaler,
10040	})
10041	req.Header.Set("User-Agent", c.s.userAgent())
10042	if c.ctx_ != nil {
10043		return ctxhttp.Do(c.ctx_, c.s.client, req)
10044	}
10045	return c.s.client.Do(req)
10046}
10047
10048// Do executes the "compute.autoscalers.delete" call.
10049// Exactly one of *Operation or error will be non-nil. Any non-2xx
10050// status code is an error. Response headers are in either
10051// *Operation.ServerResponse.Header or (if a response was returned at
10052// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10053// to check whether the returned error was because
10054// http.StatusNotModified was returned.
10055func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10056	gensupport.SetOptions(c.urlParams_, opts...)
10057	res, err := c.doRequest("json")
10058	if res != nil && res.StatusCode == http.StatusNotModified {
10059		if res.Body != nil {
10060			res.Body.Close()
10061		}
10062		return nil, &googleapi.Error{
10063			Code:   res.StatusCode,
10064			Header: res.Header,
10065		}
10066	}
10067	if err != nil {
10068		return nil, err
10069	}
10070	defer googleapi.CloseBody(res)
10071	if err := googleapi.CheckResponse(res); err != nil {
10072		return nil, err
10073	}
10074	ret := &Operation{
10075		ServerResponse: googleapi.ServerResponse{
10076			Header:         res.Header,
10077			HTTPStatusCode: res.StatusCode,
10078		},
10079	}
10080	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10081		return nil, err
10082	}
10083	return ret, nil
10084	// {
10085	//   "description": "Deletes the specified autoscaler.",
10086	//   "httpMethod": "DELETE",
10087	//   "id": "compute.autoscalers.delete",
10088	//   "parameterOrder": [
10089	//     "project",
10090	//     "zone",
10091	//     "autoscaler"
10092	//   ],
10093	//   "parameters": {
10094	//     "autoscaler": {
10095	//       "description": "Name of the autoscaler to delete.",
10096	//       "location": "path",
10097	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10098	//       "required": true,
10099	//       "type": "string"
10100	//     },
10101	//     "project": {
10102	//       "description": "Project ID for this request.",
10103	//       "location": "path",
10104	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10105	//       "required": true,
10106	//       "type": "string"
10107	//     },
10108	//     "zone": {
10109	//       "description": "Name of the zone for this request.",
10110	//       "location": "path",
10111	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10112	//       "required": true,
10113	//       "type": "string"
10114	//     }
10115	//   },
10116	//   "path": "{project}/zones/{zone}/autoscalers/{autoscaler}",
10117	//   "response": {
10118	//     "$ref": "Operation"
10119	//   },
10120	//   "scopes": [
10121	//     "https://www.googleapis.com/auth/cloud-platform",
10122	//     "https://www.googleapis.com/auth/compute"
10123	//   ]
10124	// }
10125
10126}
10127
10128// method id "compute.autoscalers.get":
10129
10130type AutoscalersGetCall struct {
10131	s            *Service
10132	project      string
10133	zone         string
10134	autoscaler   string
10135	urlParams_   gensupport.URLParams
10136	ifNoneMatch_ string
10137	ctx_         context.Context
10138}
10139
10140// Get: Returns the specified autoscaler resource. Get a list of
10141// available autoscalers by making a list() request.
10142func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall {
10143	c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10144	c.project = project
10145	c.zone = zone
10146	c.autoscaler = autoscaler
10147	return c
10148}
10149
10150// Fields allows partial responses to be retrieved. See
10151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10152// for more information.
10153func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall {
10154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10155	return c
10156}
10157
10158// IfNoneMatch sets the optional parameter which makes the operation
10159// fail if the object's ETag matches the given value. This is useful for
10160// getting updates only after the object has changed since the last
10161// request. Use googleapi.IsNotModified to check whether the response
10162// error from Do is the result of In-None-Match.
10163func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall {
10164	c.ifNoneMatch_ = entityTag
10165	return c
10166}
10167
10168// Context sets the context to be used in this call's Do method. Any
10169// pending HTTP request will be aborted if the provided context is
10170// canceled.
10171func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall {
10172	c.ctx_ = ctx
10173	return c
10174}
10175
10176func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) {
10177	var body io.Reader = nil
10178	c.urlParams_.Set("alt", alt)
10179	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}")
10180	urls += "?" + c.urlParams_.Encode()
10181	req, _ := http.NewRequest("GET", urls, body)
10182	googleapi.Expand(req.URL, map[string]string{
10183		"project":    c.project,
10184		"zone":       c.zone,
10185		"autoscaler": c.autoscaler,
10186	})
10187	req.Header.Set("User-Agent", c.s.userAgent())
10188	if c.ifNoneMatch_ != "" {
10189		req.Header.Set("If-None-Match", c.ifNoneMatch_)
10190	}
10191	if c.ctx_ != nil {
10192		return ctxhttp.Do(c.ctx_, c.s.client, req)
10193	}
10194	return c.s.client.Do(req)
10195}
10196
10197// Do executes the "compute.autoscalers.get" call.
10198// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx
10199// status code is an error. Response headers are in either
10200// *Autoscaler.ServerResponse.Header or (if a response was returned at
10201// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10202// to check whether the returned error was because
10203// http.StatusNotModified was returned.
10204func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) {
10205	gensupport.SetOptions(c.urlParams_, opts...)
10206	res, err := c.doRequest("json")
10207	if res != nil && res.StatusCode == http.StatusNotModified {
10208		if res.Body != nil {
10209			res.Body.Close()
10210		}
10211		return nil, &googleapi.Error{
10212			Code:   res.StatusCode,
10213			Header: res.Header,
10214		}
10215	}
10216	if err != nil {
10217		return nil, err
10218	}
10219	defer googleapi.CloseBody(res)
10220	if err := googleapi.CheckResponse(res); err != nil {
10221		return nil, err
10222	}
10223	ret := &Autoscaler{
10224		ServerResponse: googleapi.ServerResponse{
10225			Header:         res.Header,
10226			HTTPStatusCode: res.StatusCode,
10227		},
10228	}
10229	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10230		return nil, err
10231	}
10232	return ret, nil
10233	// {
10234	//   "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.",
10235	//   "httpMethod": "GET",
10236	//   "id": "compute.autoscalers.get",
10237	//   "parameterOrder": [
10238	//     "project",
10239	//     "zone",
10240	//     "autoscaler"
10241	//   ],
10242	//   "parameters": {
10243	//     "autoscaler": {
10244	//       "description": "Name of the autoscaler to return.",
10245	//       "location": "path",
10246	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10247	//       "required": true,
10248	//       "type": "string"
10249	//     },
10250	//     "project": {
10251	//       "description": "Project ID for this request.",
10252	//       "location": "path",
10253	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10254	//       "required": true,
10255	//       "type": "string"
10256	//     },
10257	//     "zone": {
10258	//       "description": "Name of the zone for this request.",
10259	//       "location": "path",
10260	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10261	//       "required": true,
10262	//       "type": "string"
10263	//     }
10264	//   },
10265	//   "path": "{project}/zones/{zone}/autoscalers/{autoscaler}",
10266	//   "response": {
10267	//     "$ref": "Autoscaler"
10268	//   },
10269	//   "scopes": [
10270	//     "https://www.googleapis.com/auth/cloud-platform",
10271	//     "https://www.googleapis.com/auth/compute",
10272	//     "https://www.googleapis.com/auth/compute.readonly"
10273	//   ]
10274	// }
10275
10276}
10277
10278// method id "compute.autoscalers.insert":
10279
10280type AutoscalersInsertCall struct {
10281	s          *Service
10282	project    string
10283	zone       string
10284	autoscaler *Autoscaler
10285	urlParams_ gensupport.URLParams
10286	ctx_       context.Context
10287}
10288
10289// Insert: Creates an autoscaler in the specified project using the data
10290// included in the request.
10291func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall {
10292	c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10293	c.project = project
10294	c.zone = zone
10295	c.autoscaler = autoscaler
10296	return c
10297}
10298
10299// Fields allows partial responses to be retrieved. See
10300// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10301// for more information.
10302func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall {
10303	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10304	return c
10305}
10306
10307// Context sets the context to be used in this call's Do method. Any
10308// pending HTTP request will be aborted if the provided context is
10309// canceled.
10310func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall {
10311	c.ctx_ = ctx
10312	return c
10313}
10314
10315func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) {
10316	var body io.Reader = nil
10317	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
10318	if err != nil {
10319		return nil, err
10320	}
10321	ctype := "application/json"
10322	c.urlParams_.Set("alt", alt)
10323	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
10324	urls += "?" + c.urlParams_.Encode()
10325	req, _ := http.NewRequest("POST", urls, body)
10326	googleapi.Expand(req.URL, map[string]string{
10327		"project": c.project,
10328		"zone":    c.zone,
10329	})
10330	req.Header.Set("Content-Type", ctype)
10331	req.Header.Set("User-Agent", c.s.userAgent())
10332	if c.ctx_ != nil {
10333		return ctxhttp.Do(c.ctx_, c.s.client, req)
10334	}
10335	return c.s.client.Do(req)
10336}
10337
10338// Do executes the "compute.autoscalers.insert" call.
10339// Exactly one of *Operation or error will be non-nil. Any non-2xx
10340// status code is an error. Response headers are in either
10341// *Operation.ServerResponse.Header or (if a response was returned at
10342// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10343// to check whether the returned error was because
10344// http.StatusNotModified was returned.
10345func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10346	gensupport.SetOptions(c.urlParams_, opts...)
10347	res, err := c.doRequest("json")
10348	if res != nil && res.StatusCode == http.StatusNotModified {
10349		if res.Body != nil {
10350			res.Body.Close()
10351		}
10352		return nil, &googleapi.Error{
10353			Code:   res.StatusCode,
10354			Header: res.Header,
10355		}
10356	}
10357	if err != nil {
10358		return nil, err
10359	}
10360	defer googleapi.CloseBody(res)
10361	if err := googleapi.CheckResponse(res); err != nil {
10362		return nil, err
10363	}
10364	ret := &Operation{
10365		ServerResponse: googleapi.ServerResponse{
10366			Header:         res.Header,
10367			HTTPStatusCode: res.StatusCode,
10368		},
10369	}
10370	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10371		return nil, err
10372	}
10373	return ret, nil
10374	// {
10375	//   "description": "Creates an autoscaler in the specified project using the data included in the request.",
10376	//   "httpMethod": "POST",
10377	//   "id": "compute.autoscalers.insert",
10378	//   "parameterOrder": [
10379	//     "project",
10380	//     "zone"
10381	//   ],
10382	//   "parameters": {
10383	//     "project": {
10384	//       "description": "Project ID for this request.",
10385	//       "location": "path",
10386	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10387	//       "required": true,
10388	//       "type": "string"
10389	//     },
10390	//     "zone": {
10391	//       "description": "Name of the zone for this request.",
10392	//       "location": "path",
10393	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10394	//       "required": true,
10395	//       "type": "string"
10396	//     }
10397	//   },
10398	//   "path": "{project}/zones/{zone}/autoscalers",
10399	//   "request": {
10400	//     "$ref": "Autoscaler"
10401	//   },
10402	//   "response": {
10403	//     "$ref": "Operation"
10404	//   },
10405	//   "scopes": [
10406	//     "https://www.googleapis.com/auth/cloud-platform",
10407	//     "https://www.googleapis.com/auth/compute"
10408	//   ]
10409	// }
10410
10411}
10412
10413// method id "compute.autoscalers.list":
10414
10415type AutoscalersListCall struct {
10416	s            *Service
10417	project      string
10418	zone         string
10419	urlParams_   gensupport.URLParams
10420	ifNoneMatch_ string
10421	ctx_         context.Context
10422}
10423
10424// List: Retrieves a list of autoscalers contained within the specified
10425// zone.
10426func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall {
10427	c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10428	c.project = project
10429	c.zone = zone
10430	return c
10431}
10432
10433// Filter sets the optional parameter "filter": Sets a filter expression
10434// for filtering listed resources, in the form filter={expression}. Your
10435// {expression} must be in the format: field_name comparison_string
10436// literal_string.
10437//
10438// The field_name is the name of the field you want to compare. Only
10439// atomic field types are supported (string, number, boolean). The
10440// comparison_string must be either eq (equals) or ne (not equals). The
10441// literal_string is the string value to filter to. The literal value
10442// must be valid for the type of field you are filtering by (string,
10443// number, boolean). For string fields, the literal value is interpreted
10444// as a regular expression using RE2 syntax. The literal value must
10445// match the entire field.
10446//
10447// For example, to filter for instances that do not have a name of
10448// example-instance, you would use filter=name ne
10449// example-instance.
10450//
10451// Compute Engine Beta API Only: If you use filtering in the Beta API,
10452// you can also filter on nested fields. For example, you could filter
10453// on instances that have set the scheduling.automaticRestart field to
10454// true. In particular, use filtering on nested fields to take advantage
10455// of instance labels to organize and filter results based on label
10456// values.
10457//
10458// The Beta API also supports filtering on multiple expressions by
10459// providing each separate expression within parentheses. For example,
10460// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
10461// Multiple expressions are treated as AND expressions, meaning that
10462// resources must match all expressions to pass the filters.
10463func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall {
10464	c.urlParams_.Set("filter", filter)
10465	return c
10466}
10467
10468// MaxResults sets the optional parameter "maxResults": The maximum
10469// number of results per page that should be returned. If the number of
10470// available results is larger than maxResults, Compute Engine returns a
10471// nextPageToken that can be used to get the next page of results in
10472// subsequent list requests.
10473func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall {
10474	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10475	return c
10476}
10477
10478// PageToken sets the optional parameter "pageToken": Specifies a page
10479// token to use. Set pageToken to the nextPageToken returned by a
10480// previous list request to get the next page of results.
10481func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall {
10482	c.urlParams_.Set("pageToken", pageToken)
10483	return c
10484}
10485
10486// Fields allows partial responses to be retrieved. See
10487// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10488// for more information.
10489func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall {
10490	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10491	return c
10492}
10493
10494// IfNoneMatch sets the optional parameter which makes the operation
10495// fail if the object's ETag matches the given value. This is useful for
10496// getting updates only after the object has changed since the last
10497// request. Use googleapi.IsNotModified to check whether the response
10498// error from Do is the result of In-None-Match.
10499func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall {
10500	c.ifNoneMatch_ = entityTag
10501	return c
10502}
10503
10504// Context sets the context to be used in this call's Do method. Any
10505// pending HTTP request will be aborted if the provided context is
10506// canceled.
10507func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall {
10508	c.ctx_ = ctx
10509	return c
10510}
10511
10512func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) {
10513	var body io.Reader = nil
10514	c.urlParams_.Set("alt", alt)
10515	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
10516	urls += "?" + c.urlParams_.Encode()
10517	req, _ := http.NewRequest("GET", urls, body)
10518	googleapi.Expand(req.URL, map[string]string{
10519		"project": c.project,
10520		"zone":    c.zone,
10521	})
10522	req.Header.Set("User-Agent", c.s.userAgent())
10523	if c.ifNoneMatch_ != "" {
10524		req.Header.Set("If-None-Match", c.ifNoneMatch_)
10525	}
10526	if c.ctx_ != nil {
10527		return ctxhttp.Do(c.ctx_, c.s.client, req)
10528	}
10529	return c.s.client.Do(req)
10530}
10531
10532// Do executes the "compute.autoscalers.list" call.
10533// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx
10534// status code is an error. Response headers are in either
10535// *AutoscalerList.ServerResponse.Header or (if a response was returned
10536// at all) in error.(*googleapi.Error).Header. Use
10537// googleapi.IsNotModified to check whether the returned error was
10538// because http.StatusNotModified was returned.
10539func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) {
10540	gensupport.SetOptions(c.urlParams_, opts...)
10541	res, err := c.doRequest("json")
10542	if res != nil && res.StatusCode == http.StatusNotModified {
10543		if res.Body != nil {
10544			res.Body.Close()
10545		}
10546		return nil, &googleapi.Error{
10547			Code:   res.StatusCode,
10548			Header: res.Header,
10549		}
10550	}
10551	if err != nil {
10552		return nil, err
10553	}
10554	defer googleapi.CloseBody(res)
10555	if err := googleapi.CheckResponse(res); err != nil {
10556		return nil, err
10557	}
10558	ret := &AutoscalerList{
10559		ServerResponse: googleapi.ServerResponse{
10560			Header:         res.Header,
10561			HTTPStatusCode: res.StatusCode,
10562		},
10563	}
10564	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10565		return nil, err
10566	}
10567	return ret, nil
10568	// {
10569	//   "description": "Retrieves a list of autoscalers contained within the specified zone.",
10570	//   "httpMethod": "GET",
10571	//   "id": "compute.autoscalers.list",
10572	//   "parameterOrder": [
10573	//     "project",
10574	//     "zone"
10575	//   ],
10576	//   "parameters": {
10577	//     "filter": {
10578	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
10579	//       "location": "query",
10580	//       "type": "string"
10581	//     },
10582	//     "maxResults": {
10583	//       "default": "500",
10584	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
10585	//       "format": "uint32",
10586	//       "location": "query",
10587	//       "maximum": "500",
10588	//       "minimum": "0",
10589	//       "type": "integer"
10590	//     },
10591	//     "pageToken": {
10592	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
10593	//       "location": "query",
10594	//       "type": "string"
10595	//     },
10596	//     "project": {
10597	//       "description": "Project ID for this request.",
10598	//       "location": "path",
10599	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10600	//       "required": true,
10601	//       "type": "string"
10602	//     },
10603	//     "zone": {
10604	//       "description": "Name of the zone for this request.",
10605	//       "location": "path",
10606	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10607	//       "required": true,
10608	//       "type": "string"
10609	//     }
10610	//   },
10611	//   "path": "{project}/zones/{zone}/autoscalers",
10612	//   "response": {
10613	//     "$ref": "AutoscalerList"
10614	//   },
10615	//   "scopes": [
10616	//     "https://www.googleapis.com/auth/cloud-platform",
10617	//     "https://www.googleapis.com/auth/compute",
10618	//     "https://www.googleapis.com/auth/compute.readonly"
10619	//   ]
10620	// }
10621
10622}
10623
10624// Pages invokes f for each page of results.
10625// A non-nil error returned from f will halt the iteration.
10626// The provided context supersedes any context provided to the Context method.
10627func (c *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error {
10628	c.ctx_ = ctx
10629	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10630	for {
10631		x, err := c.Do()
10632		if err != nil {
10633			return err
10634		}
10635		if err := f(x); err != nil {
10636			return err
10637		}
10638		if x.NextPageToken == "" {
10639			return nil
10640		}
10641		c.PageToken(x.NextPageToken)
10642	}
10643}
10644
10645// method id "compute.autoscalers.patch":
10646
10647type AutoscalersPatchCall struct {
10648	s           *Service
10649	project     string
10650	zone        string
10651	autoscaler2 *Autoscaler
10652	urlParams_  gensupport.URLParams
10653	ctx_        context.Context
10654}
10655
10656// Patch: Updates an autoscaler in the specified project using the data
10657// included in the request. This method supports patch semantics.
10658func (r *AutoscalersService) Patch(project string, zone string, autoscaler string, autoscaler2 *Autoscaler) *AutoscalersPatchCall {
10659	c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10660	c.project = project
10661	c.zone = zone
10662	c.urlParams_.Set("autoscaler", autoscaler)
10663	c.autoscaler2 = autoscaler2
10664	return c
10665}
10666
10667// Fields allows partial responses to be retrieved. See
10668// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10669// for more information.
10670func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall {
10671	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10672	return c
10673}
10674
10675// Context sets the context to be used in this call's Do method. Any
10676// pending HTTP request will be aborted if the provided context is
10677// canceled.
10678func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall {
10679	c.ctx_ = ctx
10680	return c
10681}
10682
10683func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) {
10684	var body io.Reader = nil
10685	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler2)
10686	if err != nil {
10687		return nil, err
10688	}
10689	ctype := "application/json"
10690	c.urlParams_.Set("alt", alt)
10691	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
10692	urls += "?" + c.urlParams_.Encode()
10693	req, _ := http.NewRequest("PATCH", urls, body)
10694	googleapi.Expand(req.URL, map[string]string{
10695		"project": c.project,
10696		"zone":    c.zone,
10697	})
10698	req.Header.Set("Content-Type", ctype)
10699	req.Header.Set("User-Agent", c.s.userAgent())
10700	if c.ctx_ != nil {
10701		return ctxhttp.Do(c.ctx_, c.s.client, req)
10702	}
10703	return c.s.client.Do(req)
10704}
10705
10706// Do executes the "compute.autoscalers.patch" call.
10707// Exactly one of *Operation or error will be non-nil. Any non-2xx
10708// status code is an error. Response headers are in either
10709// *Operation.ServerResponse.Header or (if a response was returned at
10710// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10711// to check whether the returned error was because
10712// http.StatusNotModified was returned.
10713func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10714	gensupport.SetOptions(c.urlParams_, opts...)
10715	res, err := c.doRequest("json")
10716	if res != nil && res.StatusCode == http.StatusNotModified {
10717		if res.Body != nil {
10718			res.Body.Close()
10719		}
10720		return nil, &googleapi.Error{
10721			Code:   res.StatusCode,
10722			Header: res.Header,
10723		}
10724	}
10725	if err != nil {
10726		return nil, err
10727	}
10728	defer googleapi.CloseBody(res)
10729	if err := googleapi.CheckResponse(res); err != nil {
10730		return nil, err
10731	}
10732	ret := &Operation{
10733		ServerResponse: googleapi.ServerResponse{
10734			Header:         res.Header,
10735			HTTPStatusCode: res.StatusCode,
10736		},
10737	}
10738	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10739		return nil, err
10740	}
10741	return ret, nil
10742	// {
10743	//   "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.",
10744	//   "httpMethod": "PATCH",
10745	//   "id": "compute.autoscalers.patch",
10746	//   "parameterOrder": [
10747	//     "project",
10748	//     "zone",
10749	//     "autoscaler"
10750	//   ],
10751	//   "parameters": {
10752	//     "autoscaler": {
10753	//       "description": "Name of the autoscaler to update.",
10754	//       "location": "query",
10755	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10756	//       "required": true,
10757	//       "type": "string"
10758	//     },
10759	//     "project": {
10760	//       "description": "Project ID for this request.",
10761	//       "location": "path",
10762	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10763	//       "required": true,
10764	//       "type": "string"
10765	//     },
10766	//     "zone": {
10767	//       "description": "Name of the zone for this request.",
10768	//       "location": "path",
10769	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10770	//       "required": true,
10771	//       "type": "string"
10772	//     }
10773	//   },
10774	//   "path": "{project}/zones/{zone}/autoscalers",
10775	//   "request": {
10776	//     "$ref": "Autoscaler"
10777	//   },
10778	//   "response": {
10779	//     "$ref": "Operation"
10780	//   },
10781	//   "scopes": [
10782	//     "https://www.googleapis.com/auth/cloud-platform",
10783	//     "https://www.googleapis.com/auth/compute"
10784	//   ]
10785	// }
10786
10787}
10788
10789// method id "compute.autoscalers.update":
10790
10791type AutoscalersUpdateCall struct {
10792	s          *Service
10793	project    string
10794	zone       string
10795	autoscaler *Autoscaler
10796	urlParams_ gensupport.URLParams
10797	ctx_       context.Context
10798}
10799
10800// Update: Updates an autoscaler in the specified project using the data
10801// included in the request.
10802func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall {
10803	c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10804	c.project = project
10805	c.zone = zone
10806	c.autoscaler = autoscaler
10807	return c
10808}
10809
10810// Autoscaler sets the optional parameter "autoscaler": Name of the
10811// autoscaler to update.
10812func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall {
10813	c.urlParams_.Set("autoscaler", autoscaler)
10814	return c
10815}
10816
10817// Fields allows partial responses to be retrieved. See
10818// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10819// for more information.
10820func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall {
10821	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10822	return c
10823}
10824
10825// Context sets the context to be used in this call's Do method. Any
10826// pending HTTP request will be aborted if the provided context is
10827// canceled.
10828func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall {
10829	c.ctx_ = ctx
10830	return c
10831}
10832
10833func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) {
10834	var body io.Reader = nil
10835	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
10836	if err != nil {
10837		return nil, err
10838	}
10839	ctype := "application/json"
10840	c.urlParams_.Set("alt", alt)
10841	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
10842	urls += "?" + c.urlParams_.Encode()
10843	req, _ := http.NewRequest("PUT", urls, body)
10844	googleapi.Expand(req.URL, map[string]string{
10845		"project": c.project,
10846		"zone":    c.zone,
10847	})
10848	req.Header.Set("Content-Type", ctype)
10849	req.Header.Set("User-Agent", c.s.userAgent())
10850	if c.ctx_ != nil {
10851		return ctxhttp.Do(c.ctx_, c.s.client, req)
10852	}
10853	return c.s.client.Do(req)
10854}
10855
10856// Do executes the "compute.autoscalers.update" call.
10857// Exactly one of *Operation or error will be non-nil. Any non-2xx
10858// status code is an error. Response headers are in either
10859// *Operation.ServerResponse.Header or (if a response was returned at
10860// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10861// to check whether the returned error was because
10862// http.StatusNotModified was returned.
10863func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10864	gensupport.SetOptions(c.urlParams_, opts...)
10865	res, err := c.doRequest("json")
10866	if res != nil && res.StatusCode == http.StatusNotModified {
10867		if res.Body != nil {
10868			res.Body.Close()
10869		}
10870		return nil, &googleapi.Error{
10871			Code:   res.StatusCode,
10872			Header: res.Header,
10873		}
10874	}
10875	if err != nil {
10876		return nil, err
10877	}
10878	defer googleapi.CloseBody(res)
10879	if err := googleapi.CheckResponse(res); err != nil {
10880		return nil, err
10881	}
10882	ret := &Operation{
10883		ServerResponse: googleapi.ServerResponse{
10884			Header:         res.Header,
10885			HTTPStatusCode: res.StatusCode,
10886		},
10887	}
10888	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10889		return nil, err
10890	}
10891	return ret, nil
10892	// {
10893	//   "description": "Updates an autoscaler in the specified project using the data included in the request.",
10894	//   "httpMethod": "PUT",
10895	//   "id": "compute.autoscalers.update",
10896	//   "parameterOrder": [
10897	//     "project",
10898	//     "zone"
10899	//   ],
10900	//   "parameters": {
10901	//     "autoscaler": {
10902	//       "description": "Name of the autoscaler to update.",
10903	//       "location": "query",
10904	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10905	//       "type": "string"
10906	//     },
10907	//     "project": {
10908	//       "description": "Project ID for this request.",
10909	//       "location": "path",
10910	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10911	//       "required": true,
10912	//       "type": "string"
10913	//     },
10914	//     "zone": {
10915	//       "description": "Name of the zone for this request.",
10916	//       "location": "path",
10917	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10918	//       "required": true,
10919	//       "type": "string"
10920	//     }
10921	//   },
10922	//   "path": "{project}/zones/{zone}/autoscalers",
10923	//   "request": {
10924	//     "$ref": "Autoscaler"
10925	//   },
10926	//   "response": {
10927	//     "$ref": "Operation"
10928	//   },
10929	//   "scopes": [
10930	//     "https://www.googleapis.com/auth/cloud-platform",
10931	//     "https://www.googleapis.com/auth/compute"
10932	//   ]
10933	// }
10934
10935}
10936
10937// method id "compute.backendServices.delete":
10938
10939type BackendServicesDeleteCall struct {
10940	s              *Service
10941	project        string
10942	backendService string
10943	urlParams_     gensupport.URLParams
10944	ctx_           context.Context
10945}
10946
10947// Delete: Deletes the specified BackendService resource.
10948// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/delete
10949func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall {
10950	c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10951	c.project = project
10952	c.backendService = backendService
10953	return c
10954}
10955
10956// Fields allows partial responses to be retrieved. See
10957// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10958// for more information.
10959func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall {
10960	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10961	return c
10962}
10963
10964// Context sets the context to be used in this call's Do method. Any
10965// pending HTTP request will be aborted if the provided context is
10966// canceled.
10967func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall {
10968	c.ctx_ = ctx
10969	return c
10970}
10971
10972func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
10973	var body io.Reader = nil
10974	c.urlParams_.Set("alt", alt)
10975	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
10976	urls += "?" + c.urlParams_.Encode()
10977	req, _ := http.NewRequest("DELETE", urls, body)
10978	googleapi.Expand(req.URL, map[string]string{
10979		"project":        c.project,
10980		"backendService": c.backendService,
10981	})
10982	req.Header.Set("User-Agent", c.s.userAgent())
10983	if c.ctx_ != nil {
10984		return ctxhttp.Do(c.ctx_, c.s.client, req)
10985	}
10986	return c.s.client.Do(req)
10987}
10988
10989// Do executes the "compute.backendServices.delete" call.
10990// Exactly one of *Operation or error will be non-nil. Any non-2xx
10991// status code is an error. Response headers are in either
10992// *Operation.ServerResponse.Header or (if a response was returned at
10993// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10994// to check whether the returned error was because
10995// http.StatusNotModified was returned.
10996func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10997	gensupport.SetOptions(c.urlParams_, opts...)
10998	res, err := c.doRequest("json")
10999	if res != nil && res.StatusCode == http.StatusNotModified {
11000		if res.Body != nil {
11001			res.Body.Close()
11002		}
11003		return nil, &googleapi.Error{
11004			Code:   res.StatusCode,
11005			Header: res.Header,
11006		}
11007	}
11008	if err != nil {
11009		return nil, err
11010	}
11011	defer googleapi.CloseBody(res)
11012	if err := googleapi.CheckResponse(res); err != nil {
11013		return nil, err
11014	}
11015	ret := &Operation{
11016		ServerResponse: googleapi.ServerResponse{
11017			Header:         res.Header,
11018			HTTPStatusCode: res.StatusCode,
11019		},
11020	}
11021	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11022		return nil, err
11023	}
11024	return ret, nil
11025	// {
11026	//   "description": "Deletes the specified BackendService resource.",
11027	//   "httpMethod": "DELETE",
11028	//   "id": "compute.backendServices.delete",
11029	//   "parameterOrder": [
11030	//     "project",
11031	//     "backendService"
11032	//   ],
11033	//   "parameters": {
11034	//     "backendService": {
11035	//       "description": "Name of the BackendService resource to delete.",
11036	//       "location": "path",
11037	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11038	//       "required": true,
11039	//       "type": "string"
11040	//     },
11041	//     "project": {
11042	//       "description": "Project ID for this request.",
11043	//       "location": "path",
11044	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11045	//       "required": true,
11046	//       "type": "string"
11047	//     }
11048	//   },
11049	//   "path": "{project}/global/backendServices/{backendService}",
11050	//   "response": {
11051	//     "$ref": "Operation"
11052	//   },
11053	//   "scopes": [
11054	//     "https://www.googleapis.com/auth/cloud-platform",
11055	//     "https://www.googleapis.com/auth/compute"
11056	//   ]
11057	// }
11058
11059}
11060
11061// method id "compute.backendServices.get":
11062
11063type BackendServicesGetCall struct {
11064	s              *Service
11065	project        string
11066	backendService string
11067	urlParams_     gensupport.URLParams
11068	ifNoneMatch_   string
11069	ctx_           context.Context
11070}
11071
11072// Get: Returns the specified BackendService resource. Get a list of
11073// available backend services by making a list() request.
11074// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get
11075func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall {
11076	c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11077	c.project = project
11078	c.backendService = backendService
11079	return c
11080}
11081
11082// Fields allows partial responses to be retrieved. See
11083// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11084// for more information.
11085func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall {
11086	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11087	return c
11088}
11089
11090// IfNoneMatch sets the optional parameter which makes the operation
11091// fail if the object's ETag matches the given value. This is useful for
11092// getting updates only after the object has changed since the last
11093// request. Use googleapi.IsNotModified to check whether the response
11094// error from Do is the result of In-None-Match.
11095func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall {
11096	c.ifNoneMatch_ = entityTag
11097	return c
11098}
11099
11100// Context sets the context to be used in this call's Do method. Any
11101// pending HTTP request will be aborted if the provided context is
11102// canceled.
11103func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall {
11104	c.ctx_ = ctx
11105	return c
11106}
11107
11108func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) {
11109	var body io.Reader = nil
11110	c.urlParams_.Set("alt", alt)
11111	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
11112	urls += "?" + c.urlParams_.Encode()
11113	req, _ := http.NewRequest("GET", urls, body)
11114	googleapi.Expand(req.URL, map[string]string{
11115		"project":        c.project,
11116		"backendService": c.backendService,
11117	})
11118	req.Header.Set("User-Agent", c.s.userAgent())
11119	if c.ifNoneMatch_ != "" {
11120		req.Header.Set("If-None-Match", c.ifNoneMatch_)
11121	}
11122	if c.ctx_ != nil {
11123		return ctxhttp.Do(c.ctx_, c.s.client, req)
11124	}
11125	return c.s.client.Do(req)
11126}
11127
11128// Do executes the "compute.backendServices.get" call.
11129// Exactly one of *BackendService or error will be non-nil. Any non-2xx
11130// status code is an error. Response headers are in either
11131// *BackendService.ServerResponse.Header or (if a response was returned
11132// at all) in error.(*googleapi.Error).Header. Use
11133// googleapi.IsNotModified to check whether the returned error was
11134// because http.StatusNotModified was returned.
11135func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) {
11136	gensupport.SetOptions(c.urlParams_, opts...)
11137	res, err := c.doRequest("json")
11138	if res != nil && res.StatusCode == http.StatusNotModified {
11139		if res.Body != nil {
11140			res.Body.Close()
11141		}
11142		return nil, &googleapi.Error{
11143			Code:   res.StatusCode,
11144			Header: res.Header,
11145		}
11146	}
11147	if err != nil {
11148		return nil, err
11149	}
11150	defer googleapi.CloseBody(res)
11151	if err := googleapi.CheckResponse(res); err != nil {
11152		return nil, err
11153	}
11154	ret := &BackendService{
11155		ServerResponse: googleapi.ServerResponse{
11156			Header:         res.Header,
11157			HTTPStatusCode: res.StatusCode,
11158		},
11159	}
11160	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11161		return nil, err
11162	}
11163	return ret, nil
11164	// {
11165	//   "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.",
11166	//   "httpMethod": "GET",
11167	//   "id": "compute.backendServices.get",
11168	//   "parameterOrder": [
11169	//     "project",
11170	//     "backendService"
11171	//   ],
11172	//   "parameters": {
11173	//     "backendService": {
11174	//       "description": "Name of the BackendService resource to return.",
11175	//       "location": "path",
11176	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11177	//       "required": true,
11178	//       "type": "string"
11179	//     },
11180	//     "project": {
11181	//       "description": "Project ID for this request.",
11182	//       "location": "path",
11183	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11184	//       "required": true,
11185	//       "type": "string"
11186	//     }
11187	//   },
11188	//   "path": "{project}/global/backendServices/{backendService}",
11189	//   "response": {
11190	//     "$ref": "BackendService"
11191	//   },
11192	//   "scopes": [
11193	//     "https://www.googleapis.com/auth/cloud-platform",
11194	//     "https://www.googleapis.com/auth/compute",
11195	//     "https://www.googleapis.com/auth/compute.readonly"
11196	//   ]
11197	// }
11198
11199}
11200
11201// method id "compute.backendServices.getHealth":
11202
11203type BackendServicesGetHealthCall struct {
11204	s                      *Service
11205	project                string
11206	backendService         string
11207	resourcegroupreference *ResourceGroupReference
11208	urlParams_             gensupport.URLParams
11209	ctx_                   context.Context
11210}
11211
11212// GetHealth: Gets the most recent health check results for this
11213// BackendService.
11214// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/getHealth
11215func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall {
11216	c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11217	c.project = project
11218	c.backendService = backendService
11219	c.resourcegroupreference = resourcegroupreference
11220	return c
11221}
11222
11223// Fields allows partial responses to be retrieved. See
11224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11225// for more information.
11226func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall {
11227	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11228	return c
11229}
11230
11231// Context sets the context to be used in this call's Do method. Any
11232// pending HTTP request will be aborted if the provided context is
11233// canceled.
11234func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall {
11235	c.ctx_ = ctx
11236	return c
11237}
11238
11239func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) {
11240	var body io.Reader = nil
11241	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference)
11242	if err != nil {
11243		return nil, err
11244	}
11245	ctype := "application/json"
11246	c.urlParams_.Set("alt", alt)
11247	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth")
11248	urls += "?" + c.urlParams_.Encode()
11249	req, _ := http.NewRequest("POST", urls, body)
11250	googleapi.Expand(req.URL, map[string]string{
11251		"project":        c.project,
11252		"backendService": c.backendService,
11253	})
11254	req.Header.Set("Content-Type", ctype)
11255	req.Header.Set("User-Agent", c.s.userAgent())
11256	if c.ctx_ != nil {
11257		return ctxhttp.Do(c.ctx_, c.s.client, req)
11258	}
11259	return c.s.client.Do(req)
11260}
11261
11262// Do executes the "compute.backendServices.getHealth" call.
11263// Exactly one of *BackendServiceGroupHealth or error will be non-nil.
11264// Any non-2xx status code is an error. Response headers are in either
11265// *BackendServiceGroupHealth.ServerResponse.Header or (if a response
11266// was returned at all) in error.(*googleapi.Error).Header. Use
11267// googleapi.IsNotModified to check whether the returned error was
11268// because http.StatusNotModified was returned.
11269func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) {
11270	gensupport.SetOptions(c.urlParams_, opts...)
11271	res, err := c.doRequest("json")
11272	if res != nil && res.StatusCode == http.StatusNotModified {
11273		if res.Body != nil {
11274			res.Body.Close()
11275		}
11276		return nil, &googleapi.Error{
11277			Code:   res.StatusCode,
11278			Header: res.Header,
11279		}
11280	}
11281	if err != nil {
11282		return nil, err
11283	}
11284	defer googleapi.CloseBody(res)
11285	if err := googleapi.CheckResponse(res); err != nil {
11286		return nil, err
11287	}
11288	ret := &BackendServiceGroupHealth{
11289		ServerResponse: googleapi.ServerResponse{
11290			Header:         res.Header,
11291			HTTPStatusCode: res.StatusCode,
11292		},
11293	}
11294	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11295		return nil, err
11296	}
11297	return ret, nil
11298	// {
11299	//   "description": "Gets the most recent health check results for this BackendService.",
11300	//   "httpMethod": "POST",
11301	//   "id": "compute.backendServices.getHealth",
11302	//   "parameterOrder": [
11303	//     "project",
11304	//     "backendService"
11305	//   ],
11306	//   "parameters": {
11307	//     "backendService": {
11308	//       "description": "Name of the BackendService resource to which the queried instance belongs.",
11309	//       "location": "path",
11310	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11311	//       "required": true,
11312	//       "type": "string"
11313	//     },
11314	//     "project": {
11315	//       "location": "path",
11316	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11317	//       "required": true,
11318	//       "type": "string"
11319	//     }
11320	//   },
11321	//   "path": "{project}/global/backendServices/{backendService}/getHealth",
11322	//   "request": {
11323	//     "$ref": "ResourceGroupReference"
11324	//   },
11325	//   "response": {
11326	//     "$ref": "BackendServiceGroupHealth"
11327	//   },
11328	//   "scopes": [
11329	//     "https://www.googleapis.com/auth/cloud-platform",
11330	//     "https://www.googleapis.com/auth/compute",
11331	//     "https://www.googleapis.com/auth/compute.readonly"
11332	//   ]
11333	// }
11334
11335}
11336
11337// method id "compute.backendServices.insert":
11338
11339type BackendServicesInsertCall struct {
11340	s              *Service
11341	project        string
11342	backendservice *BackendService
11343	urlParams_     gensupport.URLParams
11344	ctx_           context.Context
11345}
11346
11347// Insert: Creates a BackendService resource in the specified project
11348// using the data included in the request. There are several
11349// restrictions and guidelines to keep in mind when creating a backend
11350// service. Read  Restrictions and Guidelines for more information.
11351// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert
11352func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall {
11353	c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11354	c.project = project
11355	c.backendservice = backendservice
11356	return c
11357}
11358
11359// Fields allows partial responses to be retrieved. See
11360// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11361// for more information.
11362func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall {
11363	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11364	return c
11365}
11366
11367// Context sets the context to be used in this call's Do method. Any
11368// pending HTTP request will be aborted if the provided context is
11369// canceled.
11370func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall {
11371	c.ctx_ = ctx
11372	return c
11373}
11374
11375func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) {
11376	var body io.Reader = nil
11377	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
11378	if err != nil {
11379		return nil, err
11380	}
11381	ctype := "application/json"
11382	c.urlParams_.Set("alt", alt)
11383	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices")
11384	urls += "?" + c.urlParams_.Encode()
11385	req, _ := http.NewRequest("POST", urls, body)
11386	googleapi.Expand(req.URL, map[string]string{
11387		"project": c.project,
11388	})
11389	req.Header.Set("Content-Type", ctype)
11390	req.Header.Set("User-Agent", c.s.userAgent())
11391	if c.ctx_ != nil {
11392		return ctxhttp.Do(c.ctx_, c.s.client, req)
11393	}
11394	return c.s.client.Do(req)
11395}
11396
11397// Do executes the "compute.backendServices.insert" call.
11398// Exactly one of *Operation or error will be non-nil. Any non-2xx
11399// status code is an error. Response headers are in either
11400// *Operation.ServerResponse.Header or (if a response was returned at
11401// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11402// to check whether the returned error was because
11403// http.StatusNotModified was returned.
11404func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11405	gensupport.SetOptions(c.urlParams_, opts...)
11406	res, err := c.doRequest("json")
11407	if res != nil && res.StatusCode == http.StatusNotModified {
11408		if res.Body != nil {
11409			res.Body.Close()
11410		}
11411		return nil, &googleapi.Error{
11412			Code:   res.StatusCode,
11413			Header: res.Header,
11414		}
11415	}
11416	if err != nil {
11417		return nil, err
11418	}
11419	defer googleapi.CloseBody(res)
11420	if err := googleapi.CheckResponse(res); err != nil {
11421		return nil, err
11422	}
11423	ret := &Operation{
11424		ServerResponse: googleapi.ServerResponse{
11425			Header:         res.Header,
11426			HTTPStatusCode: res.StatusCode,
11427		},
11428	}
11429	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11430		return nil, err
11431	}
11432	return ret, nil
11433	// {
11434	//   "description": "Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read  Restrictions and Guidelines for more information.",
11435	//   "httpMethod": "POST",
11436	//   "id": "compute.backendServices.insert",
11437	//   "parameterOrder": [
11438	//     "project"
11439	//   ],
11440	//   "parameters": {
11441	//     "project": {
11442	//       "description": "Project ID for this request.",
11443	//       "location": "path",
11444	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11445	//       "required": true,
11446	//       "type": "string"
11447	//     }
11448	//   },
11449	//   "path": "{project}/global/backendServices",
11450	//   "request": {
11451	//     "$ref": "BackendService"
11452	//   },
11453	//   "response": {
11454	//     "$ref": "Operation"
11455	//   },
11456	//   "scopes": [
11457	//     "https://www.googleapis.com/auth/cloud-platform",
11458	//     "https://www.googleapis.com/auth/compute"
11459	//   ]
11460	// }
11461
11462}
11463
11464// method id "compute.backendServices.list":
11465
11466type BackendServicesListCall struct {
11467	s            *Service
11468	project      string
11469	urlParams_   gensupport.URLParams
11470	ifNoneMatch_ string
11471	ctx_         context.Context
11472}
11473
11474// List: Retrieves the list of BackendService resources available to the
11475// specified project.
11476// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/list
11477func (r *BackendServicesService) List(project string) *BackendServicesListCall {
11478	c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11479	c.project = project
11480	return c
11481}
11482
11483// Filter sets the optional parameter "filter": Sets a filter expression
11484// for filtering listed resources, in the form filter={expression}. Your
11485// {expression} must be in the format: field_name comparison_string
11486// literal_string.
11487//
11488// The field_name is the name of the field you want to compare. Only
11489// atomic field types are supported (string, number, boolean). The
11490// comparison_string must be either eq (equals) or ne (not equals). The
11491// literal_string is the string value to filter to. The literal value
11492// must be valid for the type of field you are filtering by (string,
11493// number, boolean). For string fields, the literal value is interpreted
11494// as a regular expression using RE2 syntax. The literal value must
11495// match the entire field.
11496//
11497// For example, to filter for instances that do not have a name of
11498// example-instance, you would use filter=name ne
11499// example-instance.
11500//
11501// Compute Engine Beta API Only: If you use filtering in the Beta API,
11502// you can also filter on nested fields. For example, you could filter
11503// on instances that have set the scheduling.automaticRestart field to
11504// true. In particular, use filtering on nested fields to take advantage
11505// of instance labels to organize and filter results based on label
11506// values.
11507//
11508// The Beta API also supports filtering on multiple expressions by
11509// providing each separate expression within parentheses. For example,
11510// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
11511// Multiple expressions are treated as AND expressions, meaning that
11512// resources must match all expressions to pass the filters.
11513func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall {
11514	c.urlParams_.Set("filter", filter)
11515	return c
11516}
11517
11518// MaxResults sets the optional parameter "maxResults": The maximum
11519// number of results per page that should be returned. If the number of
11520// available results is larger than maxResults, Compute Engine returns a
11521// nextPageToken that can be used to get the next page of results in
11522// subsequent list requests.
11523func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall {
11524	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
11525	return c
11526}
11527
11528// PageToken sets the optional parameter "pageToken": Specifies a page
11529// token to use. Set pageToken to the nextPageToken returned by a
11530// previous list request to get the next page of results.
11531func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall {
11532	c.urlParams_.Set("pageToken", pageToken)
11533	return c
11534}
11535
11536// Fields allows partial responses to be retrieved. See
11537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11538// for more information.
11539func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall {
11540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11541	return c
11542}
11543
11544// IfNoneMatch sets the optional parameter which makes the operation
11545// fail if the object's ETag matches the given value. This is useful for
11546// getting updates only after the object has changed since the last
11547// request. Use googleapi.IsNotModified to check whether the response
11548// error from Do is the result of In-None-Match.
11549func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall {
11550	c.ifNoneMatch_ = entityTag
11551	return c
11552}
11553
11554// Context sets the context to be used in this call's Do method. Any
11555// pending HTTP request will be aborted if the provided context is
11556// canceled.
11557func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall {
11558	c.ctx_ = ctx
11559	return c
11560}
11561
11562func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) {
11563	var body io.Reader = nil
11564	c.urlParams_.Set("alt", alt)
11565	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices")
11566	urls += "?" + c.urlParams_.Encode()
11567	req, _ := http.NewRequest("GET", urls, body)
11568	googleapi.Expand(req.URL, map[string]string{
11569		"project": c.project,
11570	})
11571	req.Header.Set("User-Agent", c.s.userAgent())
11572	if c.ifNoneMatch_ != "" {
11573		req.Header.Set("If-None-Match", c.ifNoneMatch_)
11574	}
11575	if c.ctx_ != nil {
11576		return ctxhttp.Do(c.ctx_, c.s.client, req)
11577	}
11578	return c.s.client.Do(req)
11579}
11580
11581// Do executes the "compute.backendServices.list" call.
11582// Exactly one of *BackendServiceList or error will be non-nil. Any
11583// non-2xx status code is an error. Response headers are in either
11584// *BackendServiceList.ServerResponse.Header or (if a response was
11585// returned at all) in error.(*googleapi.Error).Header. Use
11586// googleapi.IsNotModified to check whether the returned error was
11587// because http.StatusNotModified was returned.
11588func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) {
11589	gensupport.SetOptions(c.urlParams_, opts...)
11590	res, err := c.doRequest("json")
11591	if res != nil && res.StatusCode == http.StatusNotModified {
11592		if res.Body != nil {
11593			res.Body.Close()
11594		}
11595		return nil, &googleapi.Error{
11596			Code:   res.StatusCode,
11597			Header: res.Header,
11598		}
11599	}
11600	if err != nil {
11601		return nil, err
11602	}
11603	defer googleapi.CloseBody(res)
11604	if err := googleapi.CheckResponse(res); err != nil {
11605		return nil, err
11606	}
11607	ret := &BackendServiceList{
11608		ServerResponse: googleapi.ServerResponse{
11609			Header:         res.Header,
11610			HTTPStatusCode: res.StatusCode,
11611		},
11612	}
11613	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11614		return nil, err
11615	}
11616	return ret, nil
11617	// {
11618	//   "description": "Retrieves the list of BackendService resources available to the specified project.",
11619	//   "httpMethod": "GET",
11620	//   "id": "compute.backendServices.list",
11621	//   "parameterOrder": [
11622	//     "project"
11623	//   ],
11624	//   "parameters": {
11625	//     "filter": {
11626	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
11627	//       "location": "query",
11628	//       "type": "string"
11629	//     },
11630	//     "maxResults": {
11631	//       "default": "500",
11632	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
11633	//       "format": "uint32",
11634	//       "location": "query",
11635	//       "maximum": "500",
11636	//       "minimum": "0",
11637	//       "type": "integer"
11638	//     },
11639	//     "pageToken": {
11640	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
11641	//       "location": "query",
11642	//       "type": "string"
11643	//     },
11644	//     "project": {
11645	//       "description": "Project ID for this request.",
11646	//       "location": "path",
11647	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11648	//       "required": true,
11649	//       "type": "string"
11650	//     }
11651	//   },
11652	//   "path": "{project}/global/backendServices",
11653	//   "response": {
11654	//     "$ref": "BackendServiceList"
11655	//   },
11656	//   "scopes": [
11657	//     "https://www.googleapis.com/auth/cloud-platform",
11658	//     "https://www.googleapis.com/auth/compute",
11659	//     "https://www.googleapis.com/auth/compute.readonly"
11660	//   ]
11661	// }
11662
11663}
11664
11665// Pages invokes f for each page of results.
11666// A non-nil error returned from f will halt the iteration.
11667// The provided context supersedes any context provided to the Context method.
11668func (c *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error {
11669	c.ctx_ = ctx
11670	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11671	for {
11672		x, err := c.Do()
11673		if err != nil {
11674			return err
11675		}
11676		if err := f(x); err != nil {
11677			return err
11678		}
11679		if x.NextPageToken == "" {
11680			return nil
11681		}
11682		c.PageToken(x.NextPageToken)
11683	}
11684}
11685
11686// method id "compute.backendServices.patch":
11687
11688type BackendServicesPatchCall struct {
11689	s              *Service
11690	project        string
11691	backendService string
11692	backendservice *BackendService
11693	urlParams_     gensupport.URLParams
11694	ctx_           context.Context
11695}
11696
11697// Patch: Updates the entire content of the BackendService resource.
11698// There are several restrictions and guidelines to keep in mind when
11699// updating a backend service. Read  Restrictions and Guidelines for
11700// more information. This method supports patch semantics.
11701// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch
11702func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall {
11703	c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11704	c.project = project
11705	c.backendService = backendService
11706	c.backendservice = backendservice
11707	return c
11708}
11709
11710// Fields allows partial responses to be retrieved. See
11711// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11712// for more information.
11713func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall {
11714	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11715	return c
11716}
11717
11718// Context sets the context to be used in this call's Do method. Any
11719// pending HTTP request will be aborted if the provided context is
11720// canceled.
11721func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall {
11722	c.ctx_ = ctx
11723	return c
11724}
11725
11726func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) {
11727	var body io.Reader = nil
11728	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
11729	if err != nil {
11730		return nil, err
11731	}
11732	ctype := "application/json"
11733	c.urlParams_.Set("alt", alt)
11734	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
11735	urls += "?" + c.urlParams_.Encode()
11736	req, _ := http.NewRequest("PATCH", urls, body)
11737	googleapi.Expand(req.URL, map[string]string{
11738		"project":        c.project,
11739		"backendService": c.backendService,
11740	})
11741	req.Header.Set("Content-Type", ctype)
11742	req.Header.Set("User-Agent", c.s.userAgent())
11743	if c.ctx_ != nil {
11744		return ctxhttp.Do(c.ctx_, c.s.client, req)
11745	}
11746	return c.s.client.Do(req)
11747}
11748
11749// Do executes the "compute.backendServices.patch" call.
11750// Exactly one of *Operation or error will be non-nil. Any non-2xx
11751// status code is an error. Response headers are in either
11752// *Operation.ServerResponse.Header or (if a response was returned at
11753// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11754// to check whether the returned error was because
11755// http.StatusNotModified was returned.
11756func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11757	gensupport.SetOptions(c.urlParams_, opts...)
11758	res, err := c.doRequest("json")
11759	if res != nil && res.StatusCode == http.StatusNotModified {
11760		if res.Body != nil {
11761			res.Body.Close()
11762		}
11763		return nil, &googleapi.Error{
11764			Code:   res.StatusCode,
11765			Header: res.Header,
11766		}
11767	}
11768	if err != nil {
11769		return nil, err
11770	}
11771	defer googleapi.CloseBody(res)
11772	if err := googleapi.CheckResponse(res); err != nil {
11773		return nil, err
11774	}
11775	ret := &Operation{
11776		ServerResponse: googleapi.ServerResponse{
11777			Header:         res.Header,
11778			HTTPStatusCode: res.StatusCode,
11779		},
11780	}
11781	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11782		return nil, err
11783	}
11784	return ret, nil
11785	// {
11786	//   "description": "Updates the entire content of the BackendService resource. There are several restrictions and guidelines to keep in mind when updating a backend service. Read  Restrictions and Guidelines for more information. This method supports patch semantics.",
11787	//   "httpMethod": "PATCH",
11788	//   "id": "compute.backendServices.patch",
11789	//   "parameterOrder": [
11790	//     "project",
11791	//     "backendService"
11792	//   ],
11793	//   "parameters": {
11794	//     "backendService": {
11795	//       "description": "Name of the BackendService resource to update.",
11796	//       "location": "path",
11797	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11798	//       "required": true,
11799	//       "type": "string"
11800	//     },
11801	//     "project": {
11802	//       "description": "Project ID for this request.",
11803	//       "location": "path",
11804	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11805	//       "required": true,
11806	//       "type": "string"
11807	//     }
11808	//   },
11809	//   "path": "{project}/global/backendServices/{backendService}",
11810	//   "request": {
11811	//     "$ref": "BackendService"
11812	//   },
11813	//   "response": {
11814	//     "$ref": "Operation"
11815	//   },
11816	//   "scopes": [
11817	//     "https://www.googleapis.com/auth/cloud-platform",
11818	//     "https://www.googleapis.com/auth/compute"
11819	//   ]
11820	// }
11821
11822}
11823
11824// method id "compute.backendServices.update":
11825
11826type BackendServicesUpdateCall struct {
11827	s              *Service
11828	project        string
11829	backendService string
11830	backendservice *BackendService
11831	urlParams_     gensupport.URLParams
11832	ctx_           context.Context
11833}
11834
11835// Update: Updates the entire content of the BackendService resource.
11836// There are several restrictions and guidelines to keep in mind when
11837// updating a backend service. Read  Restrictions and Guidelines for
11838// more information.
11839// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update
11840func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall {
11841	c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11842	c.project = project
11843	c.backendService = backendService
11844	c.backendservice = backendservice
11845	return c
11846}
11847
11848// Fields allows partial responses to be retrieved. See
11849// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11850// for more information.
11851func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall {
11852	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11853	return c
11854}
11855
11856// Context sets the context to be used in this call's Do method. Any
11857// pending HTTP request will be aborted if the provided context is
11858// canceled.
11859func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall {
11860	c.ctx_ = ctx
11861	return c
11862}
11863
11864func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) {
11865	var body io.Reader = nil
11866	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
11867	if err != nil {
11868		return nil, err
11869	}
11870	ctype := "application/json"
11871	c.urlParams_.Set("alt", alt)
11872	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
11873	urls += "?" + c.urlParams_.Encode()
11874	req, _ := http.NewRequest("PUT", urls, body)
11875	googleapi.Expand(req.URL, map[string]string{
11876		"project":        c.project,
11877		"backendService": c.backendService,
11878	})
11879	req.Header.Set("Content-Type", ctype)
11880	req.Header.Set("User-Agent", c.s.userAgent())
11881	if c.ctx_ != nil {
11882		return ctxhttp.Do(c.ctx_, c.s.client, req)
11883	}
11884	return c.s.client.Do(req)
11885}
11886
11887// Do executes the "compute.backendServices.update" call.
11888// Exactly one of *Operation or error will be non-nil. Any non-2xx
11889// status code is an error. Response headers are in either
11890// *Operation.ServerResponse.Header or (if a response was returned at
11891// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11892// to check whether the returned error was because
11893// http.StatusNotModified was returned.
11894func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11895	gensupport.SetOptions(c.urlParams_, opts...)
11896	res, err := c.doRequest("json")
11897	if res != nil && res.StatusCode == http.StatusNotModified {
11898		if res.Body != nil {
11899			res.Body.Close()
11900		}
11901		return nil, &googleapi.Error{
11902			Code:   res.StatusCode,
11903			Header: res.Header,
11904		}
11905	}
11906	if err != nil {
11907		return nil, err
11908	}
11909	defer googleapi.CloseBody(res)
11910	if err := googleapi.CheckResponse(res); err != nil {
11911		return nil, err
11912	}
11913	ret := &Operation{
11914		ServerResponse: googleapi.ServerResponse{
11915			Header:         res.Header,
11916			HTTPStatusCode: res.StatusCode,
11917		},
11918	}
11919	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11920		return nil, err
11921	}
11922	return ret, nil
11923	// {
11924	//   "description": "Updates the entire content of the BackendService resource. There are several restrictions and guidelines to keep in mind when updating a backend service. Read  Restrictions and Guidelines for more information.",
11925	//   "httpMethod": "PUT",
11926	//   "id": "compute.backendServices.update",
11927	//   "parameterOrder": [
11928	//     "project",
11929	//     "backendService"
11930	//   ],
11931	//   "parameters": {
11932	//     "backendService": {
11933	//       "description": "Name of the BackendService resource to update.",
11934	//       "location": "path",
11935	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11936	//       "required": true,
11937	//       "type": "string"
11938	//     },
11939	//     "project": {
11940	//       "description": "Project ID for this request.",
11941	//       "location": "path",
11942	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11943	//       "required": true,
11944	//       "type": "string"
11945	//     }
11946	//   },
11947	//   "path": "{project}/global/backendServices/{backendService}",
11948	//   "request": {
11949	//     "$ref": "BackendService"
11950	//   },
11951	//   "response": {
11952	//     "$ref": "Operation"
11953	//   },
11954	//   "scopes": [
11955	//     "https://www.googleapis.com/auth/cloud-platform",
11956	//     "https://www.googleapis.com/auth/compute"
11957	//   ]
11958	// }
11959
11960}
11961
11962// method id "compute.diskTypes.aggregatedList":
11963
11964type DiskTypesAggregatedListCall struct {
11965	s            *Service
11966	project      string
11967	urlParams_   gensupport.URLParams
11968	ifNoneMatch_ string
11969	ctx_         context.Context
11970}
11971
11972// AggregatedList: Retrieves an aggregated list of disk types.
11973// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList
11974func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall {
11975	c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11976	c.project = project
11977	return c
11978}
11979
11980// Filter sets the optional parameter "filter": Sets a filter expression
11981// for filtering listed resources, in the form filter={expression}. Your
11982// {expression} must be in the format: field_name comparison_string
11983// literal_string.
11984//
11985// The field_name is the name of the field you want to compare. Only
11986// atomic field types are supported (string, number, boolean). The
11987// comparison_string must be either eq (equals) or ne (not equals). The
11988// literal_string is the string value to filter to. The literal value
11989// must be valid for the type of field you are filtering by (string,
11990// number, boolean). For string fields, the literal value is interpreted
11991// as a regular expression using RE2 syntax. The literal value must
11992// match the entire field.
11993//
11994// For example, to filter for instances that do not have a name of
11995// example-instance, you would use filter=name ne
11996// example-instance.
11997//
11998// Compute Engine Beta API Only: If you use filtering in the Beta API,
11999// you can also filter on nested fields. For example, you could filter
12000// on instances that have set the scheduling.automaticRestart field to
12001// true. In particular, use filtering on nested fields to take advantage
12002// of instance labels to organize and filter results based on label
12003// values.
12004//
12005// The Beta API also supports filtering on multiple expressions by
12006// providing each separate expression within parentheses. For example,
12007// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
12008// Multiple expressions are treated as AND expressions, meaning that
12009// resources must match all expressions to pass the filters.
12010func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall {
12011	c.urlParams_.Set("filter", filter)
12012	return c
12013}
12014
12015// MaxResults sets the optional parameter "maxResults": The maximum
12016// number of results per page that should be returned. If the number of
12017// available results is larger than maxResults, Compute Engine returns a
12018// nextPageToken that can be used to get the next page of results in
12019// subsequent list requests.
12020func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall {
12021	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
12022	return c
12023}
12024
12025// PageToken sets the optional parameter "pageToken": Specifies a page
12026// token to use. Set pageToken to the nextPageToken returned by a
12027// previous list request to get the next page of results.
12028func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall {
12029	c.urlParams_.Set("pageToken", pageToken)
12030	return c
12031}
12032
12033// Fields allows partial responses to be retrieved. See
12034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12035// for more information.
12036func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall {
12037	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12038	return c
12039}
12040
12041// IfNoneMatch sets the optional parameter which makes the operation
12042// fail if the object's ETag matches the given value. This is useful for
12043// getting updates only after the object has changed since the last
12044// request. Use googleapi.IsNotModified to check whether the response
12045// error from Do is the result of In-None-Match.
12046func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall {
12047	c.ifNoneMatch_ = entityTag
12048	return c
12049}
12050
12051// Context sets the context to be used in this call's Do method. Any
12052// pending HTTP request will be aborted if the provided context is
12053// canceled.
12054func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall {
12055	c.ctx_ = ctx
12056	return c
12057}
12058
12059func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
12060	var body io.Reader = nil
12061	c.urlParams_.Set("alt", alt)
12062	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/diskTypes")
12063	urls += "?" + c.urlParams_.Encode()
12064	req, _ := http.NewRequest("GET", urls, body)
12065	googleapi.Expand(req.URL, map[string]string{
12066		"project": c.project,
12067	})
12068	req.Header.Set("User-Agent", c.s.userAgent())
12069	if c.ifNoneMatch_ != "" {
12070		req.Header.Set("If-None-Match", c.ifNoneMatch_)
12071	}
12072	if c.ctx_ != nil {
12073		return ctxhttp.Do(c.ctx_, c.s.client, req)
12074	}
12075	return c.s.client.Do(req)
12076}
12077
12078// Do executes the "compute.diskTypes.aggregatedList" call.
12079// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any
12080// non-2xx status code is an error. Response headers are in either
12081// *DiskTypeAggregatedList.ServerResponse.Header or (if a response was
12082// returned at all) in error.(*googleapi.Error).Header. Use
12083// googleapi.IsNotModified to check whether the returned error was
12084// because http.StatusNotModified was returned.
12085func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) {
12086	gensupport.SetOptions(c.urlParams_, opts...)
12087	res, err := c.doRequest("json")
12088	if res != nil && res.StatusCode == http.StatusNotModified {
12089		if res.Body != nil {
12090			res.Body.Close()
12091		}
12092		return nil, &googleapi.Error{
12093			Code:   res.StatusCode,
12094			Header: res.Header,
12095		}
12096	}
12097	if err != nil {
12098		return nil, err
12099	}
12100	defer googleapi.CloseBody(res)
12101	if err := googleapi.CheckResponse(res); err != nil {
12102		return nil, err
12103	}
12104	ret := &DiskTypeAggregatedList{
12105		ServerResponse: googleapi.ServerResponse{
12106			Header:         res.Header,
12107			HTTPStatusCode: res.StatusCode,
12108		},
12109	}
12110	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12111		return nil, err
12112	}
12113	return ret, nil
12114	// {
12115	//   "description": "Retrieves an aggregated list of disk types.",
12116	//   "httpMethod": "GET",
12117	//   "id": "compute.diskTypes.aggregatedList",
12118	//   "parameterOrder": [
12119	//     "project"
12120	//   ],
12121	//   "parameters": {
12122	//     "filter": {
12123	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
12124	//       "location": "query",
12125	//       "type": "string"
12126	//     },
12127	//     "maxResults": {
12128	//       "default": "500",
12129	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
12130	//       "format": "uint32",
12131	//       "location": "query",
12132	//       "maximum": "500",
12133	//       "minimum": "0",
12134	//       "type": "integer"
12135	//     },
12136	//     "pageToken": {
12137	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
12138	//       "location": "query",
12139	//       "type": "string"
12140	//     },
12141	//     "project": {
12142	//       "description": "Project ID for this request.",
12143	//       "location": "path",
12144	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12145	//       "required": true,
12146	//       "type": "string"
12147	//     }
12148	//   },
12149	//   "path": "{project}/aggregated/diskTypes",
12150	//   "response": {
12151	//     "$ref": "DiskTypeAggregatedList"
12152	//   },
12153	//   "scopes": [
12154	//     "https://www.googleapis.com/auth/cloud-platform",
12155	//     "https://www.googleapis.com/auth/compute",
12156	//     "https://www.googleapis.com/auth/compute.readonly"
12157	//   ]
12158	// }
12159
12160}
12161
12162// Pages invokes f for each page of results.
12163// A non-nil error returned from f will halt the iteration.
12164// The provided context supersedes any context provided to the Context method.
12165func (c *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) error) error {
12166	c.ctx_ = ctx
12167	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12168	for {
12169		x, err := c.Do()
12170		if err != nil {
12171			return err
12172		}
12173		if err := f(x); err != nil {
12174			return err
12175		}
12176		if x.NextPageToken == "" {
12177			return nil
12178		}
12179		c.PageToken(x.NextPageToken)
12180	}
12181}
12182
12183// method id "compute.diskTypes.get":
12184
12185type DiskTypesGetCall struct {
12186	s            *Service
12187	project      string
12188	zone         string
12189	diskType     string
12190	urlParams_   gensupport.URLParams
12191	ifNoneMatch_ string
12192	ctx_         context.Context
12193}
12194
12195// Get: Returns the specified disk type. Get a list of available disk
12196// types by making a list() request.
12197// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get
12198func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall {
12199	c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12200	c.project = project
12201	c.zone = zone
12202	c.diskType = diskType
12203	return c
12204}
12205
12206// Fields allows partial responses to be retrieved. See
12207// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12208// for more information.
12209func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall {
12210	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12211	return c
12212}
12213
12214// IfNoneMatch sets the optional parameter which makes the operation
12215// fail if the object's ETag matches the given value. This is useful for
12216// getting updates only after the object has changed since the last
12217// request. Use googleapi.IsNotModified to check whether the response
12218// error from Do is the result of In-None-Match.
12219func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall {
12220	c.ifNoneMatch_ = entityTag
12221	return c
12222}
12223
12224// Context sets the context to be used in this call's Do method. Any
12225// pending HTTP request will be aborted if the provided context is
12226// canceled.
12227func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall {
12228	c.ctx_ = ctx
12229	return c
12230}
12231
12232func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) {
12233	var body io.Reader = nil
12234	c.urlParams_.Set("alt", alt)
12235	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes/{diskType}")
12236	urls += "?" + c.urlParams_.Encode()
12237	req, _ := http.NewRequest("GET", urls, body)
12238	googleapi.Expand(req.URL, map[string]string{
12239		"project":  c.project,
12240		"zone":     c.zone,
12241		"diskType": c.diskType,
12242	})
12243	req.Header.Set("User-Agent", c.s.userAgent())
12244	if c.ifNoneMatch_ != "" {
12245		req.Header.Set("If-None-Match", c.ifNoneMatch_)
12246	}
12247	if c.ctx_ != nil {
12248		return ctxhttp.Do(c.ctx_, c.s.client, req)
12249	}
12250	return c.s.client.Do(req)
12251}
12252
12253// Do executes the "compute.diskTypes.get" call.
12254// Exactly one of *DiskType or error will be non-nil. Any non-2xx status
12255// code is an error. Response headers are in either
12256// *DiskType.ServerResponse.Header or (if a response was returned at
12257// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12258// to check whether the returned error was because
12259// http.StatusNotModified was returned.
12260func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) {
12261	gensupport.SetOptions(c.urlParams_, opts...)
12262	res, err := c.doRequest("json")
12263	if res != nil && res.StatusCode == http.StatusNotModified {
12264		if res.Body != nil {
12265			res.Body.Close()
12266		}
12267		return nil, &googleapi.Error{
12268			Code:   res.StatusCode,
12269			Header: res.Header,
12270		}
12271	}
12272	if err != nil {
12273		return nil, err
12274	}
12275	defer googleapi.CloseBody(res)
12276	if err := googleapi.CheckResponse(res); err != nil {
12277		return nil, err
12278	}
12279	ret := &DiskType{
12280		ServerResponse: googleapi.ServerResponse{
12281			Header:         res.Header,
12282			HTTPStatusCode: res.StatusCode,
12283		},
12284	}
12285	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12286		return nil, err
12287	}
12288	return ret, nil
12289	// {
12290	//   "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.",
12291	//   "httpMethod": "GET",
12292	//   "id": "compute.diskTypes.get",
12293	//   "parameterOrder": [
12294	//     "project",
12295	//     "zone",
12296	//     "diskType"
12297	//   ],
12298	//   "parameters": {
12299	//     "diskType": {
12300	//       "description": "Name of the disk type to return.",
12301	//       "location": "path",
12302	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12303	//       "required": true,
12304	//       "type": "string"
12305	//     },
12306	//     "project": {
12307	//       "description": "Project ID for this request.",
12308	//       "location": "path",
12309	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12310	//       "required": true,
12311	//       "type": "string"
12312	//     },
12313	//     "zone": {
12314	//       "description": "The name of the zone for this request.",
12315	//       "location": "path",
12316	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12317	//       "required": true,
12318	//       "type": "string"
12319	//     }
12320	//   },
12321	//   "path": "{project}/zones/{zone}/diskTypes/{diskType}",
12322	//   "response": {
12323	//     "$ref": "DiskType"
12324	//   },
12325	//   "scopes": [
12326	//     "https://www.googleapis.com/auth/cloud-platform",
12327	//     "https://www.googleapis.com/auth/compute",
12328	//     "https://www.googleapis.com/auth/compute.readonly"
12329	//   ]
12330	// }
12331
12332}
12333
12334// method id "compute.diskTypes.list":
12335
12336type DiskTypesListCall struct {
12337	s            *Service
12338	project      string
12339	zone         string
12340	urlParams_   gensupport.URLParams
12341	ifNoneMatch_ string
12342	ctx_         context.Context
12343}
12344
12345// List: Retrieves a list of disk types available to the specified
12346// project.
12347// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list
12348func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall {
12349	c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12350	c.project = project
12351	c.zone = zone
12352	return c
12353}
12354
12355// Filter sets the optional parameter "filter": Sets a filter expression
12356// for filtering listed resources, in the form filter={expression}. Your
12357// {expression} must be in the format: field_name comparison_string
12358// literal_string.
12359//
12360// The field_name is the name of the field you want to compare. Only
12361// atomic field types are supported (string, number, boolean). The
12362// comparison_string must be either eq (equals) or ne (not equals). The
12363// literal_string is the string value to filter to. The literal value
12364// must be valid for the type of field you are filtering by (string,
12365// number, boolean). For string fields, the literal value is interpreted
12366// as a regular expression using RE2 syntax. The literal value must
12367// match the entire field.
12368//
12369// For example, to filter for instances that do not have a name of
12370// example-instance, you would use filter=name ne
12371// example-instance.
12372//
12373// Compute Engine Beta API Only: If you use filtering in the Beta API,
12374// you can also filter on nested fields. For example, you could filter
12375// on instances that have set the scheduling.automaticRestart field to
12376// true. In particular, use filtering on nested fields to take advantage
12377// of instance labels to organize and filter results based on label
12378// values.
12379//
12380// The Beta API also supports filtering on multiple expressions by
12381// providing each separate expression within parentheses. For example,
12382// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
12383// Multiple expressions are treated as AND expressions, meaning that
12384// resources must match all expressions to pass the filters.
12385func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall {
12386	c.urlParams_.Set("filter", filter)
12387	return c
12388}
12389
12390// MaxResults sets the optional parameter "maxResults": The maximum
12391// number of results per page that should be returned. If the number of
12392// available results is larger than maxResults, Compute Engine returns a
12393// nextPageToken that can be used to get the next page of results in
12394// subsequent list requests.
12395func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall {
12396	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
12397	return c
12398}
12399
12400// PageToken sets the optional parameter "pageToken": Specifies a page
12401// token to use. Set pageToken to the nextPageToken returned by a
12402// previous list request to get the next page of results.
12403func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall {
12404	c.urlParams_.Set("pageToken", pageToken)
12405	return c
12406}
12407
12408// Fields allows partial responses to be retrieved. See
12409// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12410// for more information.
12411func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall {
12412	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12413	return c
12414}
12415
12416// IfNoneMatch sets the optional parameter which makes the operation
12417// fail if the object's ETag matches the given value. This is useful for
12418// getting updates only after the object has changed since the last
12419// request. Use googleapi.IsNotModified to check whether the response
12420// error from Do is the result of In-None-Match.
12421func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall {
12422	c.ifNoneMatch_ = entityTag
12423	return c
12424}
12425
12426// Context sets the context to be used in this call's Do method. Any
12427// pending HTTP request will be aborted if the provided context is
12428// canceled.
12429func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall {
12430	c.ctx_ = ctx
12431	return c
12432}
12433
12434func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) {
12435	var body io.Reader = nil
12436	c.urlParams_.Set("alt", alt)
12437	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes")
12438	urls += "?" + c.urlParams_.Encode()
12439	req, _ := http.NewRequest("GET", urls, body)
12440	googleapi.Expand(req.URL, map[string]string{
12441		"project": c.project,
12442		"zone":    c.zone,
12443	})
12444	req.Header.Set("User-Agent", c.s.userAgent())
12445	if c.ifNoneMatch_ != "" {
12446		req.Header.Set("If-None-Match", c.ifNoneMatch_)
12447	}
12448	if c.ctx_ != nil {
12449		return ctxhttp.Do(c.ctx_, c.s.client, req)
12450	}
12451	return c.s.client.Do(req)
12452}
12453
12454// Do executes the "compute.diskTypes.list" call.
12455// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx
12456// status code is an error. Response headers are in either
12457// *DiskTypeList.ServerResponse.Header or (if a response was returned at
12458// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12459// to check whether the returned error was because
12460// http.StatusNotModified was returned.
12461func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) {
12462	gensupport.SetOptions(c.urlParams_, opts...)
12463	res, err := c.doRequest("json")
12464	if res != nil && res.StatusCode == http.StatusNotModified {
12465		if res.Body != nil {
12466			res.Body.Close()
12467		}
12468		return nil, &googleapi.Error{
12469			Code:   res.StatusCode,
12470			Header: res.Header,
12471		}
12472	}
12473	if err != nil {
12474		return nil, err
12475	}
12476	defer googleapi.CloseBody(res)
12477	if err := googleapi.CheckResponse(res); err != nil {
12478		return nil, err
12479	}
12480	ret := &DiskTypeList{
12481		ServerResponse: googleapi.ServerResponse{
12482			Header:         res.Header,
12483			HTTPStatusCode: res.StatusCode,
12484		},
12485	}
12486	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12487		return nil, err
12488	}
12489	return ret, nil
12490	// {
12491	//   "description": "Retrieves a list of disk types available to the specified project.",
12492	//   "httpMethod": "GET",
12493	//   "id": "compute.diskTypes.list",
12494	//   "parameterOrder": [
12495	//     "project",
12496	//     "zone"
12497	//   ],
12498	//   "parameters": {
12499	//     "filter": {
12500	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
12501	//       "location": "query",
12502	//       "type": "string"
12503	//     },
12504	//     "maxResults": {
12505	//       "default": "500",
12506	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
12507	//       "format": "uint32",
12508	//       "location": "query",
12509	//       "maximum": "500",
12510	//       "minimum": "0",
12511	//       "type": "integer"
12512	//     },
12513	//     "pageToken": {
12514	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
12515	//       "location": "query",
12516	//       "type": "string"
12517	//     },
12518	//     "project": {
12519	//       "description": "Project ID for this request.",
12520	//       "location": "path",
12521	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12522	//       "required": true,
12523	//       "type": "string"
12524	//     },
12525	//     "zone": {
12526	//       "description": "The name of the zone for this request.",
12527	//       "location": "path",
12528	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12529	//       "required": true,
12530	//       "type": "string"
12531	//     }
12532	//   },
12533	//   "path": "{project}/zones/{zone}/diskTypes",
12534	//   "response": {
12535	//     "$ref": "DiskTypeList"
12536	//   },
12537	//   "scopes": [
12538	//     "https://www.googleapis.com/auth/cloud-platform",
12539	//     "https://www.googleapis.com/auth/compute",
12540	//     "https://www.googleapis.com/auth/compute.readonly"
12541	//   ]
12542	// }
12543
12544}
12545
12546// Pages invokes f for each page of results.
12547// A non-nil error returned from f will halt the iteration.
12548// The provided context supersedes any context provided to the Context method.
12549func (c *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) error) error {
12550	c.ctx_ = ctx
12551	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12552	for {
12553		x, err := c.Do()
12554		if err != nil {
12555			return err
12556		}
12557		if err := f(x); err != nil {
12558			return err
12559		}
12560		if x.NextPageToken == "" {
12561			return nil
12562		}
12563		c.PageToken(x.NextPageToken)
12564	}
12565}
12566
12567// method id "compute.disks.aggregatedList":
12568
12569type DisksAggregatedListCall struct {
12570	s            *Service
12571	project      string
12572	urlParams_   gensupport.URLParams
12573	ifNoneMatch_ string
12574	ctx_         context.Context
12575}
12576
12577// AggregatedList: Retrieves an aggregated list of persistent disks.
12578// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList
12579func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall {
12580	c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12581	c.project = project
12582	return c
12583}
12584
12585// Filter sets the optional parameter "filter": Sets a filter expression
12586// for filtering listed resources, in the form filter={expression}. Your
12587// {expression} must be in the format: field_name comparison_string
12588// literal_string.
12589//
12590// The field_name is the name of the field you want to compare. Only
12591// atomic field types are supported (string, number, boolean). The
12592// comparison_string must be either eq (equals) or ne (not equals). The
12593// literal_string is the string value to filter to. The literal value
12594// must be valid for the type of field you are filtering by (string,
12595// number, boolean). For string fields, the literal value is interpreted
12596// as a regular expression using RE2 syntax. The literal value must
12597// match the entire field.
12598//
12599// For example, to filter for instances that do not have a name of
12600// example-instance, you would use filter=name ne
12601// example-instance.
12602//
12603// Compute Engine Beta API Only: If you use filtering in the Beta API,
12604// you can also filter on nested fields. For example, you could filter
12605// on instances that have set the scheduling.automaticRestart field to
12606// true. In particular, use filtering on nested fields to take advantage
12607// of instance labels to organize and filter results based on label
12608// values.
12609//
12610// The Beta API also supports filtering on multiple expressions by
12611// providing each separate expression within parentheses. For example,
12612// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
12613// Multiple expressions are treated as AND expressions, meaning that
12614// resources must match all expressions to pass the filters.
12615func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall {
12616	c.urlParams_.Set("filter", filter)
12617	return c
12618}
12619
12620// MaxResults sets the optional parameter "maxResults": The maximum
12621// number of results per page that should be returned. If the number of
12622// available results is larger than maxResults, Compute Engine returns a
12623// nextPageToken that can be used to get the next page of results in
12624// subsequent list requests.
12625func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall {
12626	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
12627	return c
12628}
12629
12630// PageToken sets the optional parameter "pageToken": Specifies a page
12631// token to use. Set pageToken to the nextPageToken returned by a
12632// previous list request to get the next page of results.
12633func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall {
12634	c.urlParams_.Set("pageToken", pageToken)
12635	return c
12636}
12637
12638// Fields allows partial responses to be retrieved. See
12639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12640// for more information.
12641func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall {
12642	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12643	return c
12644}
12645
12646// IfNoneMatch sets the optional parameter which makes the operation
12647// fail if the object's ETag matches the given value. This is useful for
12648// getting updates only after the object has changed since the last
12649// request. Use googleapi.IsNotModified to check whether the response
12650// error from Do is the result of In-None-Match.
12651func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall {
12652	c.ifNoneMatch_ = entityTag
12653	return c
12654}
12655
12656// Context sets the context to be used in this call's Do method. Any
12657// pending HTTP request will be aborted if the provided context is
12658// canceled.
12659func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall {
12660	c.ctx_ = ctx
12661	return c
12662}
12663
12664func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) {
12665	var body io.Reader = nil
12666	c.urlParams_.Set("alt", alt)
12667	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/disks")
12668	urls += "?" + c.urlParams_.Encode()
12669	req, _ := http.NewRequest("GET", urls, body)
12670	googleapi.Expand(req.URL, map[string]string{
12671		"project": c.project,
12672	})
12673	req.Header.Set("User-Agent", c.s.userAgent())
12674	if c.ifNoneMatch_ != "" {
12675		req.Header.Set("If-None-Match", c.ifNoneMatch_)
12676	}
12677	if c.ctx_ != nil {
12678		return ctxhttp.Do(c.ctx_, c.s.client, req)
12679	}
12680	return c.s.client.Do(req)
12681}
12682
12683// Do executes the "compute.disks.aggregatedList" call.
12684// Exactly one of *DiskAggregatedList or error will be non-nil. Any
12685// non-2xx status code is an error. Response headers are in either
12686// *DiskAggregatedList.ServerResponse.Header or (if a response was
12687// returned at all) in error.(*googleapi.Error).Header. Use
12688// googleapi.IsNotModified to check whether the returned error was
12689// because http.StatusNotModified was returned.
12690func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) {
12691	gensupport.SetOptions(c.urlParams_, opts...)
12692	res, err := c.doRequest("json")
12693	if res != nil && res.StatusCode == http.StatusNotModified {
12694		if res.Body != nil {
12695			res.Body.Close()
12696		}
12697		return nil, &googleapi.Error{
12698			Code:   res.StatusCode,
12699			Header: res.Header,
12700		}
12701	}
12702	if err != nil {
12703		return nil, err
12704	}
12705	defer googleapi.CloseBody(res)
12706	if err := googleapi.CheckResponse(res); err != nil {
12707		return nil, err
12708	}
12709	ret := &DiskAggregatedList{
12710		ServerResponse: googleapi.ServerResponse{
12711			Header:         res.Header,
12712			HTTPStatusCode: res.StatusCode,
12713		},
12714	}
12715	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12716		return nil, err
12717	}
12718	return ret, nil
12719	// {
12720	//   "description": "Retrieves an aggregated list of persistent disks.",
12721	//   "httpMethod": "GET",
12722	//   "id": "compute.disks.aggregatedList",
12723	//   "parameterOrder": [
12724	//     "project"
12725	//   ],
12726	//   "parameters": {
12727	//     "filter": {
12728	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
12729	//       "location": "query",
12730	//       "type": "string"
12731	//     },
12732	//     "maxResults": {
12733	//       "default": "500",
12734	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
12735	//       "format": "uint32",
12736	//       "location": "query",
12737	//       "maximum": "500",
12738	//       "minimum": "0",
12739	//       "type": "integer"
12740	//     },
12741	//     "pageToken": {
12742	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
12743	//       "location": "query",
12744	//       "type": "string"
12745	//     },
12746	//     "project": {
12747	//       "description": "Project ID for this request.",
12748	//       "location": "path",
12749	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12750	//       "required": true,
12751	//       "type": "string"
12752	//     }
12753	//   },
12754	//   "path": "{project}/aggregated/disks",
12755	//   "response": {
12756	//     "$ref": "DiskAggregatedList"
12757	//   },
12758	//   "scopes": [
12759	//     "https://www.googleapis.com/auth/cloud-platform",
12760	//     "https://www.googleapis.com/auth/compute",
12761	//     "https://www.googleapis.com/auth/compute.readonly"
12762	//   ]
12763	// }
12764
12765}
12766
12767// Pages invokes f for each page of results.
12768// A non-nil error returned from f will halt the iteration.
12769// The provided context supersedes any context provided to the Context method.
12770func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error {
12771	c.ctx_ = ctx
12772	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12773	for {
12774		x, err := c.Do()
12775		if err != nil {
12776			return err
12777		}
12778		if err := f(x); err != nil {
12779			return err
12780		}
12781		if x.NextPageToken == "" {
12782			return nil
12783		}
12784		c.PageToken(x.NextPageToken)
12785	}
12786}
12787
12788// method id "compute.disks.createSnapshot":
12789
12790type DisksCreateSnapshotCall struct {
12791	s          *Service
12792	project    string
12793	zone       string
12794	disk       string
12795	snapshot   *Snapshot
12796	urlParams_ gensupport.URLParams
12797	ctx_       context.Context
12798}
12799
12800// CreateSnapshot: Creates a snapshot of a specified persistent disk.
12801// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/createSnapshot
12802func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall {
12803	c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12804	c.project = project
12805	c.zone = zone
12806	c.disk = disk
12807	c.snapshot = snapshot
12808	return c
12809}
12810
12811// Fields allows partial responses to be retrieved. See
12812// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12813// for more information.
12814func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall {
12815	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12816	return c
12817}
12818
12819// Context sets the context to be used in this call's Do method. Any
12820// pending HTTP request will be aborted if the provided context is
12821// canceled.
12822func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall {
12823	c.ctx_ = ctx
12824	return c
12825}
12826
12827func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) {
12828	var body io.Reader = nil
12829	body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot)
12830	if err != nil {
12831		return nil, err
12832	}
12833	ctype := "application/json"
12834	c.urlParams_.Set("alt", alt)
12835	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot")
12836	urls += "?" + c.urlParams_.Encode()
12837	req, _ := http.NewRequest("POST", urls, body)
12838	googleapi.Expand(req.URL, map[string]string{
12839		"project": c.project,
12840		"zone":    c.zone,
12841		"disk":    c.disk,
12842	})
12843	req.Header.Set("Content-Type", ctype)
12844	req.Header.Set("User-Agent", c.s.userAgent())
12845	if c.ctx_ != nil {
12846		return ctxhttp.Do(c.ctx_, c.s.client, req)
12847	}
12848	return c.s.client.Do(req)
12849}
12850
12851// Do executes the "compute.disks.createSnapshot" call.
12852// Exactly one of *Operation or error will be non-nil. Any non-2xx
12853// status code is an error. Response headers are in either
12854// *Operation.ServerResponse.Header or (if a response was returned at
12855// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12856// to check whether the returned error was because
12857// http.StatusNotModified was returned.
12858func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12859	gensupport.SetOptions(c.urlParams_, opts...)
12860	res, err := c.doRequest("json")
12861	if res != nil && res.StatusCode == http.StatusNotModified {
12862		if res.Body != nil {
12863			res.Body.Close()
12864		}
12865		return nil, &googleapi.Error{
12866			Code:   res.StatusCode,
12867			Header: res.Header,
12868		}
12869	}
12870	if err != nil {
12871		return nil, err
12872	}
12873	defer googleapi.CloseBody(res)
12874	if err := googleapi.CheckResponse(res); err != nil {
12875		return nil, err
12876	}
12877	ret := &Operation{
12878		ServerResponse: googleapi.ServerResponse{
12879			Header:         res.Header,
12880			HTTPStatusCode: res.StatusCode,
12881		},
12882	}
12883	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12884		return nil, err
12885	}
12886	return ret, nil
12887	// {
12888	//   "description": "Creates a snapshot of a specified persistent disk.",
12889	//   "httpMethod": "POST",
12890	//   "id": "compute.disks.createSnapshot",
12891	//   "parameterOrder": [
12892	//     "project",
12893	//     "zone",
12894	//     "disk"
12895	//   ],
12896	//   "parameters": {
12897	//     "disk": {
12898	//       "description": "Name of the persistent disk to snapshot.",
12899	//       "location": "path",
12900	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12901	//       "required": true,
12902	//       "type": "string"
12903	//     },
12904	//     "project": {
12905	//       "description": "Project ID for this request.",
12906	//       "location": "path",
12907	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12908	//       "required": true,
12909	//       "type": "string"
12910	//     },
12911	//     "zone": {
12912	//       "description": "The name of the zone for this request.",
12913	//       "location": "path",
12914	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12915	//       "required": true,
12916	//       "type": "string"
12917	//     }
12918	//   },
12919	//   "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot",
12920	//   "request": {
12921	//     "$ref": "Snapshot"
12922	//   },
12923	//   "response": {
12924	//     "$ref": "Operation"
12925	//   },
12926	//   "scopes": [
12927	//     "https://www.googleapis.com/auth/cloud-platform",
12928	//     "https://www.googleapis.com/auth/compute"
12929	//   ]
12930	// }
12931
12932}
12933
12934// method id "compute.disks.delete":
12935
12936type DisksDeleteCall struct {
12937	s          *Service
12938	project    string
12939	zone       string
12940	disk       string
12941	urlParams_ gensupport.URLParams
12942	ctx_       context.Context
12943}
12944
12945// Delete: Deletes the specified persistent disk. Deleting a disk
12946// removes its data permanently and is irreversible. However, deleting a
12947// disk does not delete any snapshots previously made from the disk. You
12948// must separately delete snapshots.
12949// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/delete
12950func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall {
12951	c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12952	c.project = project
12953	c.zone = zone
12954	c.disk = disk
12955	return c
12956}
12957
12958// Fields allows partial responses to be retrieved. See
12959// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12960// for more information.
12961func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall {
12962	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12963	return c
12964}
12965
12966// Context sets the context to be used in this call's Do method. Any
12967// pending HTTP request will be aborted if the provided context is
12968// canceled.
12969func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall {
12970	c.ctx_ = ctx
12971	return c
12972}
12973
12974func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) {
12975	var body io.Reader = nil
12976	c.urlParams_.Set("alt", alt)
12977	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}")
12978	urls += "?" + c.urlParams_.Encode()
12979	req, _ := http.NewRequest("DELETE", urls, body)
12980	googleapi.Expand(req.URL, map[string]string{
12981		"project": c.project,
12982		"zone":    c.zone,
12983		"disk":    c.disk,
12984	})
12985	req.Header.Set("User-Agent", c.s.userAgent())
12986	if c.ctx_ != nil {
12987		return ctxhttp.Do(c.ctx_, c.s.client, req)
12988	}
12989	return c.s.client.Do(req)
12990}
12991
12992// Do executes the "compute.disks.delete" call.
12993// Exactly one of *Operation or error will be non-nil. Any non-2xx
12994// status code is an error. Response headers are in either
12995// *Operation.ServerResponse.Header or (if a response was returned at
12996// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12997// to check whether the returned error was because
12998// http.StatusNotModified was returned.
12999func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13000	gensupport.SetOptions(c.urlParams_, opts...)
13001	res, err := c.doRequest("json")
13002	if res != nil && res.StatusCode == http.StatusNotModified {
13003		if res.Body != nil {
13004			res.Body.Close()
13005		}
13006		return nil, &googleapi.Error{
13007			Code:   res.StatusCode,
13008			Header: res.Header,
13009		}
13010	}
13011	if err != nil {
13012		return nil, err
13013	}
13014	defer googleapi.CloseBody(res)
13015	if err := googleapi.CheckResponse(res); err != nil {
13016		return nil, err
13017	}
13018	ret := &Operation{
13019		ServerResponse: googleapi.ServerResponse{
13020			Header:         res.Header,
13021			HTTPStatusCode: res.StatusCode,
13022		},
13023	}
13024	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13025		return nil, err
13026	}
13027	return ret, nil
13028	// {
13029	//   "description": "Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.",
13030	//   "httpMethod": "DELETE",
13031	//   "id": "compute.disks.delete",
13032	//   "parameterOrder": [
13033	//     "project",
13034	//     "zone",
13035	//     "disk"
13036	//   ],
13037	//   "parameters": {
13038	//     "disk": {
13039	//       "description": "Name of the persistent disk to delete.",
13040	//       "location": "path",
13041	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13042	//       "required": true,
13043	//       "type": "string"
13044	//     },
13045	//     "project": {
13046	//       "description": "Project ID for this request.",
13047	//       "location": "path",
13048	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13049	//       "required": true,
13050	//       "type": "string"
13051	//     },
13052	//     "zone": {
13053	//       "description": "The name of the zone for this request.",
13054	//       "location": "path",
13055	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13056	//       "required": true,
13057	//       "type": "string"
13058	//     }
13059	//   },
13060	//   "path": "{project}/zones/{zone}/disks/{disk}",
13061	//   "response": {
13062	//     "$ref": "Operation"
13063	//   },
13064	//   "scopes": [
13065	//     "https://www.googleapis.com/auth/cloud-platform",
13066	//     "https://www.googleapis.com/auth/compute"
13067	//   ]
13068	// }
13069
13070}
13071
13072// method id "compute.disks.get":
13073
13074type DisksGetCall struct {
13075	s            *Service
13076	project      string
13077	zone         string
13078	disk         string
13079	urlParams_   gensupport.URLParams
13080	ifNoneMatch_ string
13081	ctx_         context.Context
13082}
13083
13084// Get: Returns a specified persistent disk. Get a list of available
13085// persistent disks by making a list() request.
13086// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get
13087func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall {
13088	c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13089	c.project = project
13090	c.zone = zone
13091	c.disk = disk
13092	return c
13093}
13094
13095// Fields allows partial responses to be retrieved. See
13096// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13097// for more information.
13098func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall {
13099	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13100	return c
13101}
13102
13103// IfNoneMatch sets the optional parameter which makes the operation
13104// fail if the object's ETag matches the given value. This is useful for
13105// getting updates only after the object has changed since the last
13106// request. Use googleapi.IsNotModified to check whether the response
13107// error from Do is the result of In-None-Match.
13108func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall {
13109	c.ifNoneMatch_ = entityTag
13110	return c
13111}
13112
13113// Context sets the context to be used in this call's Do method. Any
13114// pending HTTP request will be aborted if the provided context is
13115// canceled.
13116func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall {
13117	c.ctx_ = ctx
13118	return c
13119}
13120
13121func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) {
13122	var body io.Reader = nil
13123	c.urlParams_.Set("alt", alt)
13124	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}")
13125	urls += "?" + c.urlParams_.Encode()
13126	req, _ := http.NewRequest("GET", urls, body)
13127	googleapi.Expand(req.URL, map[string]string{
13128		"project": c.project,
13129		"zone":    c.zone,
13130		"disk":    c.disk,
13131	})
13132	req.Header.Set("User-Agent", c.s.userAgent())
13133	if c.ifNoneMatch_ != "" {
13134		req.Header.Set("If-None-Match", c.ifNoneMatch_)
13135	}
13136	if c.ctx_ != nil {
13137		return ctxhttp.Do(c.ctx_, c.s.client, req)
13138	}
13139	return c.s.client.Do(req)
13140}
13141
13142// Do executes the "compute.disks.get" call.
13143// Exactly one of *Disk or error will be non-nil. Any non-2xx status
13144// code is an error. Response headers are in either
13145// *Disk.ServerResponse.Header or (if a response was returned at all) in
13146// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13147// whether the returned error was because http.StatusNotModified was
13148// returned.
13149func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) {
13150	gensupport.SetOptions(c.urlParams_, opts...)
13151	res, err := c.doRequest("json")
13152	if res != nil && res.StatusCode == http.StatusNotModified {
13153		if res.Body != nil {
13154			res.Body.Close()
13155		}
13156		return nil, &googleapi.Error{
13157			Code:   res.StatusCode,
13158			Header: res.Header,
13159		}
13160	}
13161	if err != nil {
13162		return nil, err
13163	}
13164	defer googleapi.CloseBody(res)
13165	if err := googleapi.CheckResponse(res); err != nil {
13166		return nil, err
13167	}
13168	ret := &Disk{
13169		ServerResponse: googleapi.ServerResponse{
13170			Header:         res.Header,
13171			HTTPStatusCode: res.StatusCode,
13172		},
13173	}
13174	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13175		return nil, err
13176	}
13177	return ret, nil
13178	// {
13179	//   "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.",
13180	//   "httpMethod": "GET",
13181	//   "id": "compute.disks.get",
13182	//   "parameterOrder": [
13183	//     "project",
13184	//     "zone",
13185	//     "disk"
13186	//   ],
13187	//   "parameters": {
13188	//     "disk": {
13189	//       "description": "Name of the persistent disk to return.",
13190	//       "location": "path",
13191	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13192	//       "required": true,
13193	//       "type": "string"
13194	//     },
13195	//     "project": {
13196	//       "description": "Project ID for this request.",
13197	//       "location": "path",
13198	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13199	//       "required": true,
13200	//       "type": "string"
13201	//     },
13202	//     "zone": {
13203	//       "description": "The name of the zone for this request.",
13204	//       "location": "path",
13205	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13206	//       "required": true,
13207	//       "type": "string"
13208	//     }
13209	//   },
13210	//   "path": "{project}/zones/{zone}/disks/{disk}",
13211	//   "response": {
13212	//     "$ref": "Disk"
13213	//   },
13214	//   "scopes": [
13215	//     "https://www.googleapis.com/auth/cloud-platform",
13216	//     "https://www.googleapis.com/auth/compute",
13217	//     "https://www.googleapis.com/auth/compute.readonly"
13218	//   ]
13219	// }
13220
13221}
13222
13223// method id "compute.disks.insert":
13224
13225type DisksInsertCall struct {
13226	s          *Service
13227	project    string
13228	zone       string
13229	disk       *Disk
13230	urlParams_ gensupport.URLParams
13231	ctx_       context.Context
13232}
13233
13234// Insert: Creates a persistent disk in the specified project using the
13235// data in the request. You can create a disk with a sourceImage, a
13236// sourceSnapshot, or create an empty 200 GB data disk by omitting all
13237// properties. You can also create a disk that is larger than the
13238// default size by specifying the sizeGb property.
13239// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert
13240func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall {
13241	c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13242	c.project = project
13243	c.zone = zone
13244	c.disk = disk
13245	return c
13246}
13247
13248// SourceImage sets the optional parameter "sourceImage": Source image
13249// to restore onto a disk.
13250func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall {
13251	c.urlParams_.Set("sourceImage", sourceImage)
13252	return c
13253}
13254
13255// Fields allows partial responses to be retrieved. See
13256// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13257// for more information.
13258func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall {
13259	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13260	return c
13261}
13262
13263// Context sets the context to be used in this call's Do method. Any
13264// pending HTTP request will be aborted if the provided context is
13265// canceled.
13266func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall {
13267	c.ctx_ = ctx
13268	return c
13269}
13270
13271func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) {
13272	var body io.Reader = nil
13273	body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk)
13274	if err != nil {
13275		return nil, err
13276	}
13277	ctype := "application/json"
13278	c.urlParams_.Set("alt", alt)
13279	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks")
13280	urls += "?" + c.urlParams_.Encode()
13281	req, _ := http.NewRequest("POST", urls, body)
13282	googleapi.Expand(req.URL, map[string]string{
13283		"project": c.project,
13284		"zone":    c.zone,
13285	})
13286	req.Header.Set("Content-Type", ctype)
13287	req.Header.Set("User-Agent", c.s.userAgent())
13288	if c.ctx_ != nil {
13289		return ctxhttp.Do(c.ctx_, c.s.client, req)
13290	}
13291	return c.s.client.Do(req)
13292}
13293
13294// Do executes the "compute.disks.insert" call.
13295// Exactly one of *Operation or error will be non-nil. Any non-2xx
13296// status code is an error. Response headers are in either
13297// *Operation.ServerResponse.Header or (if a response was returned at
13298// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13299// to check whether the returned error was because
13300// http.StatusNotModified was returned.
13301func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13302	gensupport.SetOptions(c.urlParams_, opts...)
13303	res, err := c.doRequest("json")
13304	if res != nil && res.StatusCode == http.StatusNotModified {
13305		if res.Body != nil {
13306			res.Body.Close()
13307		}
13308		return nil, &googleapi.Error{
13309			Code:   res.StatusCode,
13310			Header: res.Header,
13311		}
13312	}
13313	if err != nil {
13314		return nil, err
13315	}
13316	defer googleapi.CloseBody(res)
13317	if err := googleapi.CheckResponse(res); err != nil {
13318		return nil, err
13319	}
13320	ret := &Operation{
13321		ServerResponse: googleapi.ServerResponse{
13322			Header:         res.Header,
13323			HTTPStatusCode: res.StatusCode,
13324		},
13325	}
13326	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13327		return nil, err
13328	}
13329	return ret, nil
13330	// {
13331	//   "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 200 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.",
13332	//   "httpMethod": "POST",
13333	//   "id": "compute.disks.insert",
13334	//   "parameterOrder": [
13335	//     "project",
13336	//     "zone"
13337	//   ],
13338	//   "parameters": {
13339	//     "project": {
13340	//       "description": "Project ID for this request.",
13341	//       "location": "path",
13342	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13343	//       "required": true,
13344	//       "type": "string"
13345	//     },
13346	//     "sourceImage": {
13347	//       "description": "Optional. Source image to restore onto a disk.",
13348	//       "location": "query",
13349	//       "type": "string"
13350	//     },
13351	//     "zone": {
13352	//       "description": "The name of the zone for this request.",
13353	//       "location": "path",
13354	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13355	//       "required": true,
13356	//       "type": "string"
13357	//     }
13358	//   },
13359	//   "path": "{project}/zones/{zone}/disks",
13360	//   "request": {
13361	//     "$ref": "Disk"
13362	//   },
13363	//   "response": {
13364	//     "$ref": "Operation"
13365	//   },
13366	//   "scopes": [
13367	//     "https://www.googleapis.com/auth/cloud-platform",
13368	//     "https://www.googleapis.com/auth/compute"
13369	//   ]
13370	// }
13371
13372}
13373
13374// method id "compute.disks.list":
13375
13376type DisksListCall struct {
13377	s            *Service
13378	project      string
13379	zone         string
13380	urlParams_   gensupport.URLParams
13381	ifNoneMatch_ string
13382	ctx_         context.Context
13383}
13384
13385// List: Retrieves a list of persistent disks contained within the
13386// specified zone.
13387// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list
13388func (r *DisksService) List(project string, zone string) *DisksListCall {
13389	c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13390	c.project = project
13391	c.zone = zone
13392	return c
13393}
13394
13395// Filter sets the optional parameter "filter": Sets a filter expression
13396// for filtering listed resources, in the form filter={expression}. Your
13397// {expression} must be in the format: field_name comparison_string
13398// literal_string.
13399//
13400// The field_name is the name of the field you want to compare. Only
13401// atomic field types are supported (string, number, boolean). The
13402// comparison_string must be either eq (equals) or ne (not equals). The
13403// literal_string is the string value to filter to. The literal value
13404// must be valid for the type of field you are filtering by (string,
13405// number, boolean). For string fields, the literal value is interpreted
13406// as a regular expression using RE2 syntax. The literal value must
13407// match the entire field.
13408//
13409// For example, to filter for instances that do not have a name of
13410// example-instance, you would use filter=name ne
13411// example-instance.
13412//
13413// Compute Engine Beta API Only: If you use filtering in the Beta API,
13414// you can also filter on nested fields. For example, you could filter
13415// on instances that have set the scheduling.automaticRestart field to
13416// true. In particular, use filtering on nested fields to take advantage
13417// of instance labels to organize and filter results based on label
13418// values.
13419//
13420// The Beta API also supports filtering on multiple expressions by
13421// providing each separate expression within parentheses. For example,
13422// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
13423// Multiple expressions are treated as AND expressions, meaning that
13424// resources must match all expressions to pass the filters.
13425func (c *DisksListCall) Filter(filter string) *DisksListCall {
13426	c.urlParams_.Set("filter", filter)
13427	return c
13428}
13429
13430// MaxResults sets the optional parameter "maxResults": The maximum
13431// number of results per page that should be returned. If the number of
13432// available results is larger than maxResults, Compute Engine returns a
13433// nextPageToken that can be used to get the next page of results in
13434// subsequent list requests.
13435func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall {
13436	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13437	return c
13438}
13439
13440// PageToken sets the optional parameter "pageToken": Specifies a page
13441// token to use. Set pageToken to the nextPageToken returned by a
13442// previous list request to get the next page of results.
13443func (c *DisksListCall) PageToken(pageToken string) *DisksListCall {
13444	c.urlParams_.Set("pageToken", pageToken)
13445	return c
13446}
13447
13448// Fields allows partial responses to be retrieved. See
13449// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13450// for more information.
13451func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall {
13452	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13453	return c
13454}
13455
13456// IfNoneMatch sets the optional parameter which makes the operation
13457// fail if the object's ETag matches the given value. This is useful for
13458// getting updates only after the object has changed since the last
13459// request. Use googleapi.IsNotModified to check whether the response
13460// error from Do is the result of In-None-Match.
13461func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall {
13462	c.ifNoneMatch_ = entityTag
13463	return c
13464}
13465
13466// Context sets the context to be used in this call's Do method. Any
13467// pending HTTP request will be aborted if the provided context is
13468// canceled.
13469func (c *DisksListCall) Context(ctx context.Context) *DisksListCall {
13470	c.ctx_ = ctx
13471	return c
13472}
13473
13474func (c *DisksListCall) doRequest(alt string) (*http.Response, error) {
13475	var body io.Reader = nil
13476	c.urlParams_.Set("alt", alt)
13477	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks")
13478	urls += "?" + c.urlParams_.Encode()
13479	req, _ := http.NewRequest("GET", urls, body)
13480	googleapi.Expand(req.URL, map[string]string{
13481		"project": c.project,
13482		"zone":    c.zone,
13483	})
13484	req.Header.Set("User-Agent", c.s.userAgent())
13485	if c.ifNoneMatch_ != "" {
13486		req.Header.Set("If-None-Match", c.ifNoneMatch_)
13487	}
13488	if c.ctx_ != nil {
13489		return ctxhttp.Do(c.ctx_, c.s.client, req)
13490	}
13491	return c.s.client.Do(req)
13492}
13493
13494// Do executes the "compute.disks.list" call.
13495// Exactly one of *DiskList or error will be non-nil. Any non-2xx status
13496// code is an error. Response headers are in either
13497// *DiskList.ServerResponse.Header or (if a response was returned at
13498// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13499// to check whether the returned error was because
13500// http.StatusNotModified was returned.
13501func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) {
13502	gensupport.SetOptions(c.urlParams_, opts...)
13503	res, err := c.doRequest("json")
13504	if res != nil && res.StatusCode == http.StatusNotModified {
13505		if res.Body != nil {
13506			res.Body.Close()
13507		}
13508		return nil, &googleapi.Error{
13509			Code:   res.StatusCode,
13510			Header: res.Header,
13511		}
13512	}
13513	if err != nil {
13514		return nil, err
13515	}
13516	defer googleapi.CloseBody(res)
13517	if err := googleapi.CheckResponse(res); err != nil {
13518		return nil, err
13519	}
13520	ret := &DiskList{
13521		ServerResponse: googleapi.ServerResponse{
13522			Header:         res.Header,
13523			HTTPStatusCode: res.StatusCode,
13524		},
13525	}
13526	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13527		return nil, err
13528	}
13529	return ret, nil
13530	// {
13531	//   "description": "Retrieves a list of persistent disks contained within the specified zone.",
13532	//   "httpMethod": "GET",
13533	//   "id": "compute.disks.list",
13534	//   "parameterOrder": [
13535	//     "project",
13536	//     "zone"
13537	//   ],
13538	//   "parameters": {
13539	//     "filter": {
13540	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
13541	//       "location": "query",
13542	//       "type": "string"
13543	//     },
13544	//     "maxResults": {
13545	//       "default": "500",
13546	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
13547	//       "format": "uint32",
13548	//       "location": "query",
13549	//       "maximum": "500",
13550	//       "minimum": "0",
13551	//       "type": "integer"
13552	//     },
13553	//     "pageToken": {
13554	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
13555	//       "location": "query",
13556	//       "type": "string"
13557	//     },
13558	//     "project": {
13559	//       "description": "Project ID for this request.",
13560	//       "location": "path",
13561	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13562	//       "required": true,
13563	//       "type": "string"
13564	//     },
13565	//     "zone": {
13566	//       "description": "The name of the zone for this request.",
13567	//       "location": "path",
13568	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13569	//       "required": true,
13570	//       "type": "string"
13571	//     }
13572	//   },
13573	//   "path": "{project}/zones/{zone}/disks",
13574	//   "response": {
13575	//     "$ref": "DiskList"
13576	//   },
13577	//   "scopes": [
13578	//     "https://www.googleapis.com/auth/cloud-platform",
13579	//     "https://www.googleapis.com/auth/compute",
13580	//     "https://www.googleapis.com/auth/compute.readonly"
13581	//   ]
13582	// }
13583
13584}
13585
13586// Pages invokes f for each page of results.
13587// A non-nil error returned from f will halt the iteration.
13588// The provided context supersedes any context provided to the Context method.
13589func (c *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error {
13590	c.ctx_ = ctx
13591	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13592	for {
13593		x, err := c.Do()
13594		if err != nil {
13595			return err
13596		}
13597		if err := f(x); err != nil {
13598			return err
13599		}
13600		if x.NextPageToken == "" {
13601			return nil
13602		}
13603		c.PageToken(x.NextPageToken)
13604	}
13605}
13606
13607// method id "compute.firewalls.delete":
13608
13609type FirewallsDeleteCall struct {
13610	s          *Service
13611	project    string
13612	firewall   string
13613	urlParams_ gensupport.URLParams
13614	ctx_       context.Context
13615}
13616
13617// Delete: Deletes the specified firewall.
13618// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete
13619func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall {
13620	c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13621	c.project = project
13622	c.firewall = firewall
13623	return c
13624}
13625
13626// Fields allows partial responses to be retrieved. See
13627// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13628// for more information.
13629func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall {
13630	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13631	return c
13632}
13633
13634// Context sets the context to be used in this call's Do method. Any
13635// pending HTTP request will be aborted if the provided context is
13636// canceled.
13637func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall {
13638	c.ctx_ = ctx
13639	return c
13640}
13641
13642func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) {
13643	var body io.Reader = nil
13644	c.urlParams_.Set("alt", alt)
13645	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
13646	urls += "?" + c.urlParams_.Encode()
13647	req, _ := http.NewRequest("DELETE", urls, body)
13648	googleapi.Expand(req.URL, map[string]string{
13649		"project":  c.project,
13650		"firewall": c.firewall,
13651	})
13652	req.Header.Set("User-Agent", c.s.userAgent())
13653	if c.ctx_ != nil {
13654		return ctxhttp.Do(c.ctx_, c.s.client, req)
13655	}
13656	return c.s.client.Do(req)
13657}
13658
13659// Do executes the "compute.firewalls.delete" call.
13660// Exactly one of *Operation or error will be non-nil. Any non-2xx
13661// status code is an error. Response headers are in either
13662// *Operation.ServerResponse.Header or (if a response was returned at
13663// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13664// to check whether the returned error was because
13665// http.StatusNotModified was returned.
13666func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13667	gensupport.SetOptions(c.urlParams_, opts...)
13668	res, err := c.doRequest("json")
13669	if res != nil && res.StatusCode == http.StatusNotModified {
13670		if res.Body != nil {
13671			res.Body.Close()
13672		}
13673		return nil, &googleapi.Error{
13674			Code:   res.StatusCode,
13675			Header: res.Header,
13676		}
13677	}
13678	if err != nil {
13679		return nil, err
13680	}
13681	defer googleapi.CloseBody(res)
13682	if err := googleapi.CheckResponse(res); err != nil {
13683		return nil, err
13684	}
13685	ret := &Operation{
13686		ServerResponse: googleapi.ServerResponse{
13687			Header:         res.Header,
13688			HTTPStatusCode: res.StatusCode,
13689		},
13690	}
13691	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13692		return nil, err
13693	}
13694	return ret, nil
13695	// {
13696	//   "description": "Deletes the specified firewall.",
13697	//   "httpMethod": "DELETE",
13698	//   "id": "compute.firewalls.delete",
13699	//   "parameterOrder": [
13700	//     "project",
13701	//     "firewall"
13702	//   ],
13703	//   "parameters": {
13704	//     "firewall": {
13705	//       "description": "Name of the firewall rule to delete.",
13706	//       "location": "path",
13707	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13708	//       "required": true,
13709	//       "type": "string"
13710	//     },
13711	//     "project": {
13712	//       "description": "Project ID for this request.",
13713	//       "location": "path",
13714	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13715	//       "required": true,
13716	//       "type": "string"
13717	//     }
13718	//   },
13719	//   "path": "{project}/global/firewalls/{firewall}",
13720	//   "response": {
13721	//     "$ref": "Operation"
13722	//   },
13723	//   "scopes": [
13724	//     "https://www.googleapis.com/auth/cloud-platform",
13725	//     "https://www.googleapis.com/auth/compute"
13726	//   ]
13727	// }
13728
13729}
13730
13731// method id "compute.firewalls.get":
13732
13733type FirewallsGetCall struct {
13734	s            *Service
13735	project      string
13736	firewall     string
13737	urlParams_   gensupport.URLParams
13738	ifNoneMatch_ string
13739	ctx_         context.Context
13740}
13741
13742// Get: Returns the specified firewall.
13743// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get
13744func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall {
13745	c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13746	c.project = project
13747	c.firewall = firewall
13748	return c
13749}
13750
13751// Fields allows partial responses to be retrieved. See
13752// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13753// for more information.
13754func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall {
13755	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13756	return c
13757}
13758
13759// IfNoneMatch sets the optional parameter which makes the operation
13760// fail if the object's ETag matches the given value. This is useful for
13761// getting updates only after the object has changed since the last
13762// request. Use googleapi.IsNotModified to check whether the response
13763// error from Do is the result of In-None-Match.
13764func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall {
13765	c.ifNoneMatch_ = entityTag
13766	return c
13767}
13768
13769// Context sets the context to be used in this call's Do method. Any
13770// pending HTTP request will be aborted if the provided context is
13771// canceled.
13772func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall {
13773	c.ctx_ = ctx
13774	return c
13775}
13776
13777func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) {
13778	var body io.Reader = nil
13779	c.urlParams_.Set("alt", alt)
13780	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
13781	urls += "?" + c.urlParams_.Encode()
13782	req, _ := http.NewRequest("GET", urls, body)
13783	googleapi.Expand(req.URL, map[string]string{
13784		"project":  c.project,
13785		"firewall": c.firewall,
13786	})
13787	req.Header.Set("User-Agent", c.s.userAgent())
13788	if c.ifNoneMatch_ != "" {
13789		req.Header.Set("If-None-Match", c.ifNoneMatch_)
13790	}
13791	if c.ctx_ != nil {
13792		return ctxhttp.Do(c.ctx_, c.s.client, req)
13793	}
13794	return c.s.client.Do(req)
13795}
13796
13797// Do executes the "compute.firewalls.get" call.
13798// Exactly one of *Firewall or error will be non-nil. Any non-2xx status
13799// code is an error. Response headers are in either
13800// *Firewall.ServerResponse.Header or (if a response was returned at
13801// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13802// to check whether the returned error was because
13803// http.StatusNotModified was returned.
13804func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) {
13805	gensupport.SetOptions(c.urlParams_, opts...)
13806	res, err := c.doRequest("json")
13807	if res != nil && res.StatusCode == http.StatusNotModified {
13808		if res.Body != nil {
13809			res.Body.Close()
13810		}
13811		return nil, &googleapi.Error{
13812			Code:   res.StatusCode,
13813			Header: res.Header,
13814		}
13815	}
13816	if err != nil {
13817		return nil, err
13818	}
13819	defer googleapi.CloseBody(res)
13820	if err := googleapi.CheckResponse(res); err != nil {
13821		return nil, err
13822	}
13823	ret := &Firewall{
13824		ServerResponse: googleapi.ServerResponse{
13825			Header:         res.Header,
13826			HTTPStatusCode: res.StatusCode,
13827		},
13828	}
13829	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13830		return nil, err
13831	}
13832	return ret, nil
13833	// {
13834	//   "description": "Returns the specified firewall.",
13835	//   "httpMethod": "GET",
13836	//   "id": "compute.firewalls.get",
13837	//   "parameterOrder": [
13838	//     "project",
13839	//     "firewall"
13840	//   ],
13841	//   "parameters": {
13842	//     "firewall": {
13843	//       "description": "Name of the firewall rule to return.",
13844	//       "location": "path",
13845	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13846	//       "required": true,
13847	//       "type": "string"
13848	//     },
13849	//     "project": {
13850	//       "description": "Project ID for this request.",
13851	//       "location": "path",
13852	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13853	//       "required": true,
13854	//       "type": "string"
13855	//     }
13856	//   },
13857	//   "path": "{project}/global/firewalls/{firewall}",
13858	//   "response": {
13859	//     "$ref": "Firewall"
13860	//   },
13861	//   "scopes": [
13862	//     "https://www.googleapis.com/auth/cloud-platform",
13863	//     "https://www.googleapis.com/auth/compute",
13864	//     "https://www.googleapis.com/auth/compute.readonly"
13865	//   ]
13866	// }
13867
13868}
13869
13870// method id "compute.firewalls.insert":
13871
13872type FirewallsInsertCall struct {
13873	s          *Service
13874	project    string
13875	firewall   *Firewall
13876	urlParams_ gensupport.URLParams
13877	ctx_       context.Context
13878}
13879
13880// Insert: Creates a firewall rule in the specified project using the
13881// data included in the request.
13882// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert
13883func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall {
13884	c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13885	c.project = project
13886	c.firewall = firewall
13887	return c
13888}
13889
13890// Fields allows partial responses to be retrieved. See
13891// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13892// for more information.
13893func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall {
13894	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13895	return c
13896}
13897
13898// Context sets the context to be used in this call's Do method. Any
13899// pending HTTP request will be aborted if the provided context is
13900// canceled.
13901func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall {
13902	c.ctx_ = ctx
13903	return c
13904}
13905
13906func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) {
13907	var body io.Reader = nil
13908	body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall)
13909	if err != nil {
13910		return nil, err
13911	}
13912	ctype := "application/json"
13913	c.urlParams_.Set("alt", alt)
13914	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls")
13915	urls += "?" + c.urlParams_.Encode()
13916	req, _ := http.NewRequest("POST", urls, body)
13917	googleapi.Expand(req.URL, map[string]string{
13918		"project": c.project,
13919	})
13920	req.Header.Set("Content-Type", ctype)
13921	req.Header.Set("User-Agent", c.s.userAgent())
13922	if c.ctx_ != nil {
13923		return ctxhttp.Do(c.ctx_, c.s.client, req)
13924	}
13925	return c.s.client.Do(req)
13926}
13927
13928// Do executes the "compute.firewalls.insert" call.
13929// Exactly one of *Operation or error will be non-nil. Any non-2xx
13930// status code is an error. Response headers are in either
13931// *Operation.ServerResponse.Header or (if a response was returned at
13932// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13933// to check whether the returned error was because
13934// http.StatusNotModified was returned.
13935func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13936	gensupport.SetOptions(c.urlParams_, opts...)
13937	res, err := c.doRequest("json")
13938	if res != nil && res.StatusCode == http.StatusNotModified {
13939		if res.Body != nil {
13940			res.Body.Close()
13941		}
13942		return nil, &googleapi.Error{
13943			Code:   res.StatusCode,
13944			Header: res.Header,
13945		}
13946	}
13947	if err != nil {
13948		return nil, err
13949	}
13950	defer googleapi.CloseBody(res)
13951	if err := googleapi.CheckResponse(res); err != nil {
13952		return nil, err
13953	}
13954	ret := &Operation{
13955		ServerResponse: googleapi.ServerResponse{
13956			Header:         res.Header,
13957			HTTPStatusCode: res.StatusCode,
13958		},
13959	}
13960	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13961		return nil, err
13962	}
13963	return ret, nil
13964	// {
13965	//   "description": "Creates a firewall rule in the specified project using the data included in the request.",
13966	//   "httpMethod": "POST",
13967	//   "id": "compute.firewalls.insert",
13968	//   "parameterOrder": [
13969	//     "project"
13970	//   ],
13971	//   "parameters": {
13972	//     "project": {
13973	//       "description": "Project ID for this request.",
13974	//       "location": "path",
13975	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13976	//       "required": true,
13977	//       "type": "string"
13978	//     }
13979	//   },
13980	//   "path": "{project}/global/firewalls",
13981	//   "request": {
13982	//     "$ref": "Firewall"
13983	//   },
13984	//   "response": {
13985	//     "$ref": "Operation"
13986	//   },
13987	//   "scopes": [
13988	//     "https://www.googleapis.com/auth/cloud-platform",
13989	//     "https://www.googleapis.com/auth/compute"
13990	//   ]
13991	// }
13992
13993}
13994
13995// method id "compute.firewalls.list":
13996
13997type FirewallsListCall struct {
13998	s            *Service
13999	project      string
14000	urlParams_   gensupport.URLParams
14001	ifNoneMatch_ string
14002	ctx_         context.Context
14003}
14004
14005// List: Retrieves the list of firewall rules available to the specified
14006// project.
14007// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list
14008func (r *FirewallsService) List(project string) *FirewallsListCall {
14009	c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14010	c.project = project
14011	return c
14012}
14013
14014// Filter sets the optional parameter "filter": Sets a filter expression
14015// for filtering listed resources, in the form filter={expression}. Your
14016// {expression} must be in the format: field_name comparison_string
14017// literal_string.
14018//
14019// The field_name is the name of the field you want to compare. Only
14020// atomic field types are supported (string, number, boolean). The
14021// comparison_string must be either eq (equals) or ne (not equals). The
14022// literal_string is the string value to filter to. The literal value
14023// must be valid for the type of field you are filtering by (string,
14024// number, boolean). For string fields, the literal value is interpreted
14025// as a regular expression using RE2 syntax. The literal value must
14026// match the entire field.
14027//
14028// For example, to filter for instances that do not have a name of
14029// example-instance, you would use filter=name ne
14030// example-instance.
14031//
14032// Compute Engine Beta API Only: If you use filtering in the Beta API,
14033// you can also filter on nested fields. For example, you could filter
14034// on instances that have set the scheduling.automaticRestart field to
14035// true. In particular, use filtering on nested fields to take advantage
14036// of instance labels to organize and filter results based on label
14037// values.
14038//
14039// The Beta API also supports filtering on multiple expressions by
14040// providing each separate expression within parentheses. For example,
14041// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
14042// Multiple expressions are treated as AND expressions, meaning that
14043// resources must match all expressions to pass the filters.
14044func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall {
14045	c.urlParams_.Set("filter", filter)
14046	return c
14047}
14048
14049// MaxResults sets the optional parameter "maxResults": The maximum
14050// number of results per page that should be returned. If the number of
14051// available results is larger than maxResults, Compute Engine returns a
14052// nextPageToken that can be used to get the next page of results in
14053// subsequent list requests.
14054func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall {
14055	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14056	return c
14057}
14058
14059// PageToken sets the optional parameter "pageToken": Specifies a page
14060// token to use. Set pageToken to the nextPageToken returned by a
14061// previous list request to get the next page of results.
14062func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall {
14063	c.urlParams_.Set("pageToken", pageToken)
14064	return c
14065}
14066
14067// Fields allows partial responses to be retrieved. See
14068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14069// for more information.
14070func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall {
14071	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14072	return c
14073}
14074
14075// IfNoneMatch sets the optional parameter which makes the operation
14076// fail if the object's ETag matches the given value. This is useful for
14077// getting updates only after the object has changed since the last
14078// request. Use googleapi.IsNotModified to check whether the response
14079// error from Do is the result of In-None-Match.
14080func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall {
14081	c.ifNoneMatch_ = entityTag
14082	return c
14083}
14084
14085// Context sets the context to be used in this call's Do method. Any
14086// pending HTTP request will be aborted if the provided context is
14087// canceled.
14088func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall {
14089	c.ctx_ = ctx
14090	return c
14091}
14092
14093func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) {
14094	var body io.Reader = nil
14095	c.urlParams_.Set("alt", alt)
14096	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls")
14097	urls += "?" + c.urlParams_.Encode()
14098	req, _ := http.NewRequest("GET", urls, body)
14099	googleapi.Expand(req.URL, map[string]string{
14100		"project": c.project,
14101	})
14102	req.Header.Set("User-Agent", c.s.userAgent())
14103	if c.ifNoneMatch_ != "" {
14104		req.Header.Set("If-None-Match", c.ifNoneMatch_)
14105	}
14106	if c.ctx_ != nil {
14107		return ctxhttp.Do(c.ctx_, c.s.client, req)
14108	}
14109	return c.s.client.Do(req)
14110}
14111
14112// Do executes the "compute.firewalls.list" call.
14113// Exactly one of *FirewallList or error will be non-nil. Any non-2xx
14114// status code is an error. Response headers are in either
14115// *FirewallList.ServerResponse.Header or (if a response was returned at
14116// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14117// to check whether the returned error was because
14118// http.StatusNotModified was returned.
14119func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) {
14120	gensupport.SetOptions(c.urlParams_, opts...)
14121	res, err := c.doRequest("json")
14122	if res != nil && res.StatusCode == http.StatusNotModified {
14123		if res.Body != nil {
14124			res.Body.Close()
14125		}
14126		return nil, &googleapi.Error{
14127			Code:   res.StatusCode,
14128			Header: res.Header,
14129		}
14130	}
14131	if err != nil {
14132		return nil, err
14133	}
14134	defer googleapi.CloseBody(res)
14135	if err := googleapi.CheckResponse(res); err != nil {
14136		return nil, err
14137	}
14138	ret := &FirewallList{
14139		ServerResponse: googleapi.ServerResponse{
14140			Header:         res.Header,
14141			HTTPStatusCode: res.StatusCode,
14142		},
14143	}
14144	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14145		return nil, err
14146	}
14147	return ret, nil
14148	// {
14149	//   "description": "Retrieves the list of firewall rules available to the specified project.",
14150	//   "httpMethod": "GET",
14151	//   "id": "compute.firewalls.list",
14152	//   "parameterOrder": [
14153	//     "project"
14154	//   ],
14155	//   "parameters": {
14156	//     "filter": {
14157	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
14158	//       "location": "query",
14159	//       "type": "string"
14160	//     },
14161	//     "maxResults": {
14162	//       "default": "500",
14163	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
14164	//       "format": "uint32",
14165	//       "location": "query",
14166	//       "maximum": "500",
14167	//       "minimum": "0",
14168	//       "type": "integer"
14169	//     },
14170	//     "pageToken": {
14171	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
14172	//       "location": "query",
14173	//       "type": "string"
14174	//     },
14175	//     "project": {
14176	//       "description": "Project ID for this request.",
14177	//       "location": "path",
14178	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14179	//       "required": true,
14180	//       "type": "string"
14181	//     }
14182	//   },
14183	//   "path": "{project}/global/firewalls",
14184	//   "response": {
14185	//     "$ref": "FirewallList"
14186	//   },
14187	//   "scopes": [
14188	//     "https://www.googleapis.com/auth/cloud-platform",
14189	//     "https://www.googleapis.com/auth/compute",
14190	//     "https://www.googleapis.com/auth/compute.readonly"
14191	//   ]
14192	// }
14193
14194}
14195
14196// Pages invokes f for each page of results.
14197// A non-nil error returned from f will halt the iteration.
14198// The provided context supersedes any context provided to the Context method.
14199func (c *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error {
14200	c.ctx_ = ctx
14201	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14202	for {
14203		x, err := c.Do()
14204		if err != nil {
14205			return err
14206		}
14207		if err := f(x); err != nil {
14208			return err
14209		}
14210		if x.NextPageToken == "" {
14211			return nil
14212		}
14213		c.PageToken(x.NextPageToken)
14214	}
14215}
14216
14217// method id "compute.firewalls.patch":
14218
14219type FirewallsPatchCall struct {
14220	s          *Service
14221	project    string
14222	firewall   string
14223	firewall2  *Firewall
14224	urlParams_ gensupport.URLParams
14225	ctx_       context.Context
14226}
14227
14228// Patch: Updates the specified firewall rule with the data included in
14229// the request. This method supports patch semantics.
14230// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch
14231func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall {
14232	c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14233	c.project = project
14234	c.firewall = firewall
14235	c.firewall2 = firewall2
14236	return c
14237}
14238
14239// Fields allows partial responses to be retrieved. See
14240// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14241// for more information.
14242func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall {
14243	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14244	return c
14245}
14246
14247// Context sets the context to be used in this call's Do method. Any
14248// pending HTTP request will be aborted if the provided context is
14249// canceled.
14250func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall {
14251	c.ctx_ = ctx
14252	return c
14253}
14254
14255func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) {
14256	var body io.Reader = nil
14257	body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
14258	if err != nil {
14259		return nil, err
14260	}
14261	ctype := "application/json"
14262	c.urlParams_.Set("alt", alt)
14263	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
14264	urls += "?" + c.urlParams_.Encode()
14265	req, _ := http.NewRequest("PATCH", urls, body)
14266	googleapi.Expand(req.URL, map[string]string{
14267		"project":  c.project,
14268		"firewall": c.firewall,
14269	})
14270	req.Header.Set("Content-Type", ctype)
14271	req.Header.Set("User-Agent", c.s.userAgent())
14272	if c.ctx_ != nil {
14273		return ctxhttp.Do(c.ctx_, c.s.client, req)
14274	}
14275	return c.s.client.Do(req)
14276}
14277
14278// Do executes the "compute.firewalls.patch" call.
14279// Exactly one of *Operation or error will be non-nil. Any non-2xx
14280// status code is an error. Response headers are in either
14281// *Operation.ServerResponse.Header or (if a response was returned at
14282// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14283// to check whether the returned error was because
14284// http.StatusNotModified was returned.
14285func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14286	gensupport.SetOptions(c.urlParams_, opts...)
14287	res, err := c.doRequest("json")
14288	if res != nil && res.StatusCode == http.StatusNotModified {
14289		if res.Body != nil {
14290			res.Body.Close()
14291		}
14292		return nil, &googleapi.Error{
14293			Code:   res.StatusCode,
14294			Header: res.Header,
14295		}
14296	}
14297	if err != nil {
14298		return nil, err
14299	}
14300	defer googleapi.CloseBody(res)
14301	if err := googleapi.CheckResponse(res); err != nil {
14302		return nil, err
14303	}
14304	ret := &Operation{
14305		ServerResponse: googleapi.ServerResponse{
14306			Header:         res.Header,
14307			HTTPStatusCode: res.StatusCode,
14308		},
14309	}
14310	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14311		return nil, err
14312	}
14313	return ret, nil
14314	// {
14315	//   "description": "Updates the specified firewall rule with the data included in the request. This method supports patch semantics.",
14316	//   "httpMethod": "PATCH",
14317	//   "id": "compute.firewalls.patch",
14318	//   "parameterOrder": [
14319	//     "project",
14320	//     "firewall"
14321	//   ],
14322	//   "parameters": {
14323	//     "firewall": {
14324	//       "description": "Name of the firewall rule to update.",
14325	//       "location": "path",
14326	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14327	//       "required": true,
14328	//       "type": "string"
14329	//     },
14330	//     "project": {
14331	//       "description": "Project ID for this request.",
14332	//       "location": "path",
14333	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14334	//       "required": true,
14335	//       "type": "string"
14336	//     }
14337	//   },
14338	//   "path": "{project}/global/firewalls/{firewall}",
14339	//   "request": {
14340	//     "$ref": "Firewall"
14341	//   },
14342	//   "response": {
14343	//     "$ref": "Operation"
14344	//   },
14345	//   "scopes": [
14346	//     "https://www.googleapis.com/auth/cloud-platform",
14347	//     "https://www.googleapis.com/auth/compute"
14348	//   ]
14349	// }
14350
14351}
14352
14353// method id "compute.firewalls.update":
14354
14355type FirewallsUpdateCall struct {
14356	s          *Service
14357	project    string
14358	firewall   string
14359	firewall2  *Firewall
14360	urlParams_ gensupport.URLParams
14361	ctx_       context.Context
14362}
14363
14364// Update: Updates the specified firewall rule with the data included in
14365// the request.
14366// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update
14367func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall {
14368	c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14369	c.project = project
14370	c.firewall = firewall
14371	c.firewall2 = firewall2
14372	return c
14373}
14374
14375// Fields allows partial responses to be retrieved. See
14376// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14377// for more information.
14378func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall {
14379	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14380	return c
14381}
14382
14383// Context sets the context to be used in this call's Do method. Any
14384// pending HTTP request will be aborted if the provided context is
14385// canceled.
14386func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall {
14387	c.ctx_ = ctx
14388	return c
14389}
14390
14391func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) {
14392	var body io.Reader = nil
14393	body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
14394	if err != nil {
14395		return nil, err
14396	}
14397	ctype := "application/json"
14398	c.urlParams_.Set("alt", alt)
14399	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
14400	urls += "?" + c.urlParams_.Encode()
14401	req, _ := http.NewRequest("PUT", urls, body)
14402	googleapi.Expand(req.URL, map[string]string{
14403		"project":  c.project,
14404		"firewall": c.firewall,
14405	})
14406	req.Header.Set("Content-Type", ctype)
14407	req.Header.Set("User-Agent", c.s.userAgent())
14408	if c.ctx_ != nil {
14409		return ctxhttp.Do(c.ctx_, c.s.client, req)
14410	}
14411	return c.s.client.Do(req)
14412}
14413
14414// Do executes the "compute.firewalls.update" call.
14415// Exactly one of *Operation or error will be non-nil. Any non-2xx
14416// status code is an error. Response headers are in either
14417// *Operation.ServerResponse.Header or (if a response was returned at
14418// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14419// to check whether the returned error was because
14420// http.StatusNotModified was returned.
14421func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14422	gensupport.SetOptions(c.urlParams_, opts...)
14423	res, err := c.doRequest("json")
14424	if res != nil && res.StatusCode == http.StatusNotModified {
14425		if res.Body != nil {
14426			res.Body.Close()
14427		}
14428		return nil, &googleapi.Error{
14429			Code:   res.StatusCode,
14430			Header: res.Header,
14431		}
14432	}
14433	if err != nil {
14434		return nil, err
14435	}
14436	defer googleapi.CloseBody(res)
14437	if err := googleapi.CheckResponse(res); err != nil {
14438		return nil, err
14439	}
14440	ret := &Operation{
14441		ServerResponse: googleapi.ServerResponse{
14442			Header:         res.Header,
14443			HTTPStatusCode: res.StatusCode,
14444		},
14445	}
14446	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14447		return nil, err
14448	}
14449	return ret, nil
14450	// {
14451	//   "description": "Updates the specified firewall rule with the data included in the request.",
14452	//   "httpMethod": "PUT",
14453	//   "id": "compute.firewalls.update",
14454	//   "parameterOrder": [
14455	//     "project",
14456	//     "firewall"
14457	//   ],
14458	//   "parameters": {
14459	//     "firewall": {
14460	//       "description": "Name of the firewall rule to update.",
14461	//       "location": "path",
14462	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14463	//       "required": true,
14464	//       "type": "string"
14465	//     },
14466	//     "project": {
14467	//       "description": "Project ID for this request.",
14468	//       "location": "path",
14469	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14470	//       "required": true,
14471	//       "type": "string"
14472	//     }
14473	//   },
14474	//   "path": "{project}/global/firewalls/{firewall}",
14475	//   "request": {
14476	//     "$ref": "Firewall"
14477	//   },
14478	//   "response": {
14479	//     "$ref": "Operation"
14480	//   },
14481	//   "scopes": [
14482	//     "https://www.googleapis.com/auth/cloud-platform",
14483	//     "https://www.googleapis.com/auth/compute"
14484	//   ]
14485	// }
14486
14487}
14488
14489// method id "compute.forwardingRules.aggregatedList":
14490
14491type ForwardingRulesAggregatedListCall struct {
14492	s            *Service
14493	project      string
14494	urlParams_   gensupport.URLParams
14495	ifNoneMatch_ string
14496	ctx_         context.Context
14497}
14498
14499// AggregatedList: Retrieves an aggregated list of forwarding rules.
14500// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList
14501func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall {
14502	c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14503	c.project = project
14504	return c
14505}
14506
14507// Filter sets the optional parameter "filter": Sets a filter expression
14508// for filtering listed resources, in the form filter={expression}. Your
14509// {expression} must be in the format: field_name comparison_string
14510// literal_string.
14511//
14512// The field_name is the name of the field you want to compare. Only
14513// atomic field types are supported (string, number, boolean). The
14514// comparison_string must be either eq (equals) or ne (not equals). The
14515// literal_string is the string value to filter to. The literal value
14516// must be valid for the type of field you are filtering by (string,
14517// number, boolean). For string fields, the literal value is interpreted
14518// as a regular expression using RE2 syntax. The literal value must
14519// match the entire field.
14520//
14521// For example, to filter for instances that do not have a name of
14522// example-instance, you would use filter=name ne
14523// example-instance.
14524//
14525// Compute Engine Beta API Only: If you use filtering in the Beta API,
14526// you can also filter on nested fields. For example, you could filter
14527// on instances that have set the scheduling.automaticRestart field to
14528// true. In particular, use filtering on nested fields to take advantage
14529// of instance labels to organize and filter results based on label
14530// values.
14531//
14532// The Beta API also supports filtering on multiple expressions by
14533// providing each separate expression within parentheses. For example,
14534// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
14535// Multiple expressions are treated as AND expressions, meaning that
14536// resources must match all expressions to pass the filters.
14537func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall {
14538	c.urlParams_.Set("filter", filter)
14539	return c
14540}
14541
14542// MaxResults sets the optional parameter "maxResults": The maximum
14543// number of results per page that should be returned. If the number of
14544// available results is larger than maxResults, Compute Engine returns a
14545// nextPageToken that can be used to get the next page of results in
14546// subsequent list requests.
14547func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall {
14548	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14549	return c
14550}
14551
14552// PageToken sets the optional parameter "pageToken": Specifies a page
14553// token to use. Set pageToken to the nextPageToken returned by a
14554// previous list request to get the next page of results.
14555func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall {
14556	c.urlParams_.Set("pageToken", pageToken)
14557	return c
14558}
14559
14560// Fields allows partial responses to be retrieved. See
14561// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14562// for more information.
14563func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall {
14564	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14565	return c
14566}
14567
14568// IfNoneMatch sets the optional parameter which makes the operation
14569// fail if the object's ETag matches the given value. This is useful for
14570// getting updates only after the object has changed since the last
14571// request. Use googleapi.IsNotModified to check whether the response
14572// error from Do is the result of In-None-Match.
14573func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall {
14574	c.ifNoneMatch_ = entityTag
14575	return c
14576}
14577
14578// Context sets the context to be used in this call's Do method. Any
14579// pending HTTP request will be aborted if the provided context is
14580// canceled.
14581func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall {
14582	c.ctx_ = ctx
14583	return c
14584}
14585
14586func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
14587	var body io.Reader = nil
14588	c.urlParams_.Set("alt", alt)
14589	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/forwardingRules")
14590	urls += "?" + c.urlParams_.Encode()
14591	req, _ := http.NewRequest("GET", urls, body)
14592	googleapi.Expand(req.URL, map[string]string{
14593		"project": c.project,
14594	})
14595	req.Header.Set("User-Agent", c.s.userAgent())
14596	if c.ifNoneMatch_ != "" {
14597		req.Header.Set("If-None-Match", c.ifNoneMatch_)
14598	}
14599	if c.ctx_ != nil {
14600		return ctxhttp.Do(c.ctx_, c.s.client, req)
14601	}
14602	return c.s.client.Do(req)
14603}
14604
14605// Do executes the "compute.forwardingRules.aggregatedList" call.
14606// Exactly one of *ForwardingRuleAggregatedList or error will be
14607// non-nil. Any non-2xx status code is an error. Response headers are in
14608// either *ForwardingRuleAggregatedList.ServerResponse.Header or (if a
14609// response was returned at all) in error.(*googleapi.Error).Header. Use
14610// googleapi.IsNotModified to check whether the returned error was
14611// because http.StatusNotModified was returned.
14612func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) {
14613	gensupport.SetOptions(c.urlParams_, opts...)
14614	res, err := c.doRequest("json")
14615	if res != nil && res.StatusCode == http.StatusNotModified {
14616		if res.Body != nil {
14617			res.Body.Close()
14618		}
14619		return nil, &googleapi.Error{
14620			Code:   res.StatusCode,
14621			Header: res.Header,
14622		}
14623	}
14624	if err != nil {
14625		return nil, err
14626	}
14627	defer googleapi.CloseBody(res)
14628	if err := googleapi.CheckResponse(res); err != nil {
14629		return nil, err
14630	}
14631	ret := &ForwardingRuleAggregatedList{
14632		ServerResponse: googleapi.ServerResponse{
14633			Header:         res.Header,
14634			HTTPStatusCode: res.StatusCode,
14635		},
14636	}
14637	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14638		return nil, err
14639	}
14640	return ret, nil
14641	// {
14642	//   "description": "Retrieves an aggregated list of forwarding rules.",
14643	//   "httpMethod": "GET",
14644	//   "id": "compute.forwardingRules.aggregatedList",
14645	//   "parameterOrder": [
14646	//     "project"
14647	//   ],
14648	//   "parameters": {
14649	//     "filter": {
14650	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
14651	//       "location": "query",
14652	//       "type": "string"
14653	//     },
14654	//     "maxResults": {
14655	//       "default": "500",
14656	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
14657	//       "format": "uint32",
14658	//       "location": "query",
14659	//       "maximum": "500",
14660	//       "minimum": "0",
14661	//       "type": "integer"
14662	//     },
14663	//     "pageToken": {
14664	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
14665	//       "location": "query",
14666	//       "type": "string"
14667	//     },
14668	//     "project": {
14669	//       "description": "Project ID for this request.",
14670	//       "location": "path",
14671	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14672	//       "required": true,
14673	//       "type": "string"
14674	//     }
14675	//   },
14676	//   "path": "{project}/aggregated/forwardingRules",
14677	//   "response": {
14678	//     "$ref": "ForwardingRuleAggregatedList"
14679	//   },
14680	//   "scopes": [
14681	//     "https://www.googleapis.com/auth/cloud-platform",
14682	//     "https://www.googleapis.com/auth/compute",
14683	//     "https://www.googleapis.com/auth/compute.readonly"
14684	//   ]
14685	// }
14686
14687}
14688
14689// Pages invokes f for each page of results.
14690// A non-nil error returned from f will halt the iteration.
14691// The provided context supersedes any context provided to the Context method.
14692func (c *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error {
14693	c.ctx_ = ctx
14694	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14695	for {
14696		x, err := c.Do()
14697		if err != nil {
14698			return err
14699		}
14700		if err := f(x); err != nil {
14701			return err
14702		}
14703		if x.NextPageToken == "" {
14704			return nil
14705		}
14706		c.PageToken(x.NextPageToken)
14707	}
14708}
14709
14710// method id "compute.forwardingRules.delete":
14711
14712type ForwardingRulesDeleteCall struct {
14713	s              *Service
14714	project        string
14715	region         string
14716	forwardingRule string
14717	urlParams_     gensupport.URLParams
14718	ctx_           context.Context
14719}
14720
14721// Delete: Deletes the specified ForwardingRule resource.
14722// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/delete
14723func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall {
14724	c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14725	c.project = project
14726	c.region = region
14727	c.forwardingRule = forwardingRule
14728	return c
14729}
14730
14731// Fields allows partial responses to be retrieved. See
14732// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14733// for more information.
14734func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall {
14735	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14736	return c
14737}
14738
14739// Context sets the context to be used in this call's Do method. Any
14740// pending HTTP request will be aborted if the provided context is
14741// canceled.
14742func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall {
14743	c.ctx_ = ctx
14744	return c
14745}
14746
14747func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
14748	var body io.Reader = nil
14749	c.urlParams_.Set("alt", alt)
14750	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}")
14751	urls += "?" + c.urlParams_.Encode()
14752	req, _ := http.NewRequest("DELETE", urls, body)
14753	googleapi.Expand(req.URL, map[string]string{
14754		"project":        c.project,
14755		"region":         c.region,
14756		"forwardingRule": c.forwardingRule,
14757	})
14758	req.Header.Set("User-Agent", c.s.userAgent())
14759	if c.ctx_ != nil {
14760		return ctxhttp.Do(c.ctx_, c.s.client, req)
14761	}
14762	return c.s.client.Do(req)
14763}
14764
14765// Do executes the "compute.forwardingRules.delete" call.
14766// Exactly one of *Operation or error will be non-nil. Any non-2xx
14767// status code is an error. Response headers are in either
14768// *Operation.ServerResponse.Header or (if a response was returned at
14769// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14770// to check whether the returned error was because
14771// http.StatusNotModified was returned.
14772func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14773	gensupport.SetOptions(c.urlParams_, opts...)
14774	res, err := c.doRequest("json")
14775	if res != nil && res.StatusCode == http.StatusNotModified {
14776		if res.Body != nil {
14777			res.Body.Close()
14778		}
14779		return nil, &googleapi.Error{
14780			Code:   res.StatusCode,
14781			Header: res.Header,
14782		}
14783	}
14784	if err != nil {
14785		return nil, err
14786	}
14787	defer googleapi.CloseBody(res)
14788	if err := googleapi.CheckResponse(res); err != nil {
14789		return nil, err
14790	}
14791	ret := &Operation{
14792		ServerResponse: googleapi.ServerResponse{
14793			Header:         res.Header,
14794			HTTPStatusCode: res.StatusCode,
14795		},
14796	}
14797	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14798		return nil, err
14799	}
14800	return ret, nil
14801	// {
14802	//   "description": "Deletes the specified ForwardingRule resource.",
14803	//   "httpMethod": "DELETE",
14804	//   "id": "compute.forwardingRules.delete",
14805	//   "parameterOrder": [
14806	//     "project",
14807	//     "region",
14808	//     "forwardingRule"
14809	//   ],
14810	//   "parameters": {
14811	//     "forwardingRule": {
14812	//       "description": "Name of the ForwardingRule resource to delete.",
14813	//       "location": "path",
14814	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14815	//       "required": true,
14816	//       "type": "string"
14817	//     },
14818	//     "project": {
14819	//       "description": "Project ID for this request.",
14820	//       "location": "path",
14821	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14822	//       "required": true,
14823	//       "type": "string"
14824	//     },
14825	//     "region": {
14826	//       "description": "Name of the region scoping this request.",
14827	//       "location": "path",
14828	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14829	//       "required": true,
14830	//       "type": "string"
14831	//     }
14832	//   },
14833	//   "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}",
14834	//   "response": {
14835	//     "$ref": "Operation"
14836	//   },
14837	//   "scopes": [
14838	//     "https://www.googleapis.com/auth/cloud-platform",
14839	//     "https://www.googleapis.com/auth/compute"
14840	//   ]
14841	// }
14842
14843}
14844
14845// method id "compute.forwardingRules.get":
14846
14847type ForwardingRulesGetCall struct {
14848	s              *Service
14849	project        string
14850	region         string
14851	forwardingRule string
14852	urlParams_     gensupport.URLParams
14853	ifNoneMatch_   string
14854	ctx_           context.Context
14855}
14856
14857// Get: Returns the specified ForwardingRule resource.
14858// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/get
14859func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall {
14860	c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14861	c.project = project
14862	c.region = region
14863	c.forwardingRule = forwardingRule
14864	return c
14865}
14866
14867// Fields allows partial responses to be retrieved. See
14868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14869// for more information.
14870func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall {
14871	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14872	return c
14873}
14874
14875// IfNoneMatch sets the optional parameter which makes the operation
14876// fail if the object's ETag matches the given value. This is useful for
14877// getting updates only after the object has changed since the last
14878// request. Use googleapi.IsNotModified to check whether the response
14879// error from Do is the result of In-None-Match.
14880func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall {
14881	c.ifNoneMatch_ = entityTag
14882	return c
14883}
14884
14885// Context sets the context to be used in this call's Do method. Any
14886// pending HTTP request will be aborted if the provided context is
14887// canceled.
14888func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall {
14889	c.ctx_ = ctx
14890	return c
14891}
14892
14893func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
14894	var body io.Reader = nil
14895	c.urlParams_.Set("alt", alt)
14896	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}")
14897	urls += "?" + c.urlParams_.Encode()
14898	req, _ := http.NewRequest("GET", urls, body)
14899	googleapi.Expand(req.URL, map[string]string{
14900		"project":        c.project,
14901		"region":         c.region,
14902		"forwardingRule": c.forwardingRule,
14903	})
14904	req.Header.Set("User-Agent", c.s.userAgent())
14905	if c.ifNoneMatch_ != "" {
14906		req.Header.Set("If-None-Match", c.ifNoneMatch_)
14907	}
14908	if c.ctx_ != nil {
14909		return ctxhttp.Do(c.ctx_, c.s.client, req)
14910	}
14911	return c.s.client.Do(req)
14912}
14913
14914// Do executes the "compute.forwardingRules.get" call.
14915// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx
14916// status code is an error. Response headers are in either
14917// *ForwardingRule.ServerResponse.Header or (if a response was returned
14918// at all) in error.(*googleapi.Error).Header. Use
14919// googleapi.IsNotModified to check whether the returned error was
14920// because http.StatusNotModified was returned.
14921func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) {
14922	gensupport.SetOptions(c.urlParams_, opts...)
14923	res, err := c.doRequest("json")
14924	if res != nil && res.StatusCode == http.StatusNotModified {
14925		if res.Body != nil {
14926			res.Body.Close()
14927		}
14928		return nil, &googleapi.Error{
14929			Code:   res.StatusCode,
14930			Header: res.Header,
14931		}
14932	}
14933	if err != nil {
14934		return nil, err
14935	}
14936	defer googleapi.CloseBody(res)
14937	if err := googleapi.CheckResponse(res); err != nil {
14938		return nil, err
14939	}
14940	ret := &ForwardingRule{
14941		ServerResponse: googleapi.ServerResponse{
14942			Header:         res.Header,
14943			HTTPStatusCode: res.StatusCode,
14944		},
14945	}
14946	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14947		return nil, err
14948	}
14949	return ret, nil
14950	// {
14951	//   "description": "Returns the specified ForwardingRule resource.",
14952	//   "httpMethod": "GET",
14953	//   "id": "compute.forwardingRules.get",
14954	//   "parameterOrder": [
14955	//     "project",
14956	//     "region",
14957	//     "forwardingRule"
14958	//   ],
14959	//   "parameters": {
14960	//     "forwardingRule": {
14961	//       "description": "Name of the ForwardingRule resource to return.",
14962	//       "location": "path",
14963	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14964	//       "required": true,
14965	//       "type": "string"
14966	//     },
14967	//     "project": {
14968	//       "description": "Project ID for this request.",
14969	//       "location": "path",
14970	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14971	//       "required": true,
14972	//       "type": "string"
14973	//     },
14974	//     "region": {
14975	//       "description": "Name of the region scoping this request.",
14976	//       "location": "path",
14977	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14978	//       "required": true,
14979	//       "type": "string"
14980	//     }
14981	//   },
14982	//   "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}",
14983	//   "response": {
14984	//     "$ref": "ForwardingRule"
14985	//   },
14986	//   "scopes": [
14987	//     "https://www.googleapis.com/auth/cloud-platform",
14988	//     "https://www.googleapis.com/auth/compute",
14989	//     "https://www.googleapis.com/auth/compute.readonly"
14990	//   ]
14991	// }
14992
14993}
14994
14995// method id "compute.forwardingRules.insert":
14996
14997type ForwardingRulesInsertCall struct {
14998	s              *Service
14999	project        string
15000	region         string
15001	forwardingrule *ForwardingRule
15002	urlParams_     gensupport.URLParams
15003	ctx_           context.Context
15004}
15005
15006// Insert: Creates a ForwardingRule resource in the specified project
15007// and region using the data included in the request.
15008// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert
15009func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall {
15010	c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15011	c.project = project
15012	c.region = region
15013	c.forwardingrule = forwardingrule
15014	return c
15015}
15016
15017// Fields allows partial responses to be retrieved. See
15018// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15019// for more information.
15020func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall {
15021	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15022	return c
15023}
15024
15025// Context sets the context to be used in this call's Do method. Any
15026// pending HTTP request will be aborted if the provided context is
15027// canceled.
15028func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall {
15029	c.ctx_ = ctx
15030	return c
15031}
15032
15033func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
15034	var body io.Reader = nil
15035	body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
15036	if err != nil {
15037		return nil, err
15038	}
15039	ctype := "application/json"
15040	c.urlParams_.Set("alt", alt)
15041	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules")
15042	urls += "?" + c.urlParams_.Encode()
15043	req, _ := http.NewRequest("POST", urls, body)
15044	googleapi.Expand(req.URL, map[string]string{
15045		"project": c.project,
15046		"region":  c.region,
15047	})
15048	req.Header.Set("Content-Type", ctype)
15049	req.Header.Set("User-Agent", c.s.userAgent())
15050	if c.ctx_ != nil {
15051		return ctxhttp.Do(c.ctx_, c.s.client, req)
15052	}
15053	return c.s.client.Do(req)
15054}
15055
15056// Do executes the "compute.forwardingRules.insert" call.
15057// Exactly one of *Operation or error will be non-nil. Any non-2xx
15058// status code is an error. Response headers are in either
15059// *Operation.ServerResponse.Header or (if a response was returned at
15060// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15061// to check whether the returned error was because
15062// http.StatusNotModified was returned.
15063func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15064	gensupport.SetOptions(c.urlParams_, opts...)
15065	res, err := c.doRequest("json")
15066	if res != nil && res.StatusCode == http.StatusNotModified {
15067		if res.Body != nil {
15068			res.Body.Close()
15069		}
15070		return nil, &googleapi.Error{
15071			Code:   res.StatusCode,
15072			Header: res.Header,
15073		}
15074	}
15075	if err != nil {
15076		return nil, err
15077	}
15078	defer googleapi.CloseBody(res)
15079	if err := googleapi.CheckResponse(res); err != nil {
15080		return nil, err
15081	}
15082	ret := &Operation{
15083		ServerResponse: googleapi.ServerResponse{
15084			Header:         res.Header,
15085			HTTPStatusCode: res.StatusCode,
15086		},
15087	}
15088	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15089		return nil, err
15090	}
15091	return ret, nil
15092	// {
15093	//   "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.",
15094	//   "httpMethod": "POST",
15095	//   "id": "compute.forwardingRules.insert",
15096	//   "parameterOrder": [
15097	//     "project",
15098	//     "region"
15099	//   ],
15100	//   "parameters": {
15101	//     "project": {
15102	//       "description": "Project ID for this request.",
15103	//       "location": "path",
15104	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15105	//       "required": true,
15106	//       "type": "string"
15107	//     },
15108	//     "region": {
15109	//       "description": "Name of the region scoping this request.",
15110	//       "location": "path",
15111	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15112	//       "required": true,
15113	//       "type": "string"
15114	//     }
15115	//   },
15116	//   "path": "{project}/regions/{region}/forwardingRules",
15117	//   "request": {
15118	//     "$ref": "ForwardingRule"
15119	//   },
15120	//   "response": {
15121	//     "$ref": "Operation"
15122	//   },
15123	//   "scopes": [
15124	//     "https://www.googleapis.com/auth/cloud-platform",
15125	//     "https://www.googleapis.com/auth/compute"
15126	//   ]
15127	// }
15128
15129}
15130
15131// method id "compute.forwardingRules.list":
15132
15133type ForwardingRulesListCall struct {
15134	s            *Service
15135	project      string
15136	region       string
15137	urlParams_   gensupport.URLParams
15138	ifNoneMatch_ string
15139	ctx_         context.Context
15140}
15141
15142// List: Retrieves a list of ForwardingRule resources available to the
15143// specified project and region.
15144// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list
15145func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall {
15146	c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15147	c.project = project
15148	c.region = region
15149	return c
15150}
15151
15152// Filter sets the optional parameter "filter": Sets a filter expression
15153// for filtering listed resources, in the form filter={expression}. Your
15154// {expression} must be in the format: field_name comparison_string
15155// literal_string.
15156//
15157// The field_name is the name of the field you want to compare. Only
15158// atomic field types are supported (string, number, boolean). The
15159// comparison_string must be either eq (equals) or ne (not equals). The
15160// literal_string is the string value to filter to. The literal value
15161// must be valid for the type of field you are filtering by (string,
15162// number, boolean). For string fields, the literal value is interpreted
15163// as a regular expression using RE2 syntax. The literal value must
15164// match the entire field.
15165//
15166// For example, to filter for instances that do not have a name of
15167// example-instance, you would use filter=name ne
15168// example-instance.
15169//
15170// Compute Engine Beta API Only: If you use filtering in the Beta API,
15171// you can also filter on nested fields. For example, you could filter
15172// on instances that have set the scheduling.automaticRestart field to
15173// true. In particular, use filtering on nested fields to take advantage
15174// of instance labels to organize and filter results based on label
15175// values.
15176//
15177// The Beta API also supports filtering on multiple expressions by
15178// providing each separate expression within parentheses. For example,
15179// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
15180// Multiple expressions are treated as AND expressions, meaning that
15181// resources must match all expressions to pass the filters.
15182func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall {
15183	c.urlParams_.Set("filter", filter)
15184	return c
15185}
15186
15187// MaxResults sets the optional parameter "maxResults": The maximum
15188// number of results per page that should be returned. If the number of
15189// available results is larger than maxResults, Compute Engine returns a
15190// nextPageToken that can be used to get the next page of results in
15191// subsequent list requests.
15192func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall {
15193	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15194	return c
15195}
15196
15197// PageToken sets the optional parameter "pageToken": Specifies a page
15198// token to use. Set pageToken to the nextPageToken returned by a
15199// previous list request to get the next page of results.
15200func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall {
15201	c.urlParams_.Set("pageToken", pageToken)
15202	return c
15203}
15204
15205// Fields allows partial responses to be retrieved. See
15206// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15207// for more information.
15208func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall {
15209	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15210	return c
15211}
15212
15213// IfNoneMatch sets the optional parameter which makes the operation
15214// fail if the object's ETag matches the given value. This is useful for
15215// getting updates only after the object has changed since the last
15216// request. Use googleapi.IsNotModified to check whether the response
15217// error from Do is the result of In-None-Match.
15218func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall {
15219	c.ifNoneMatch_ = entityTag
15220	return c
15221}
15222
15223// Context sets the context to be used in this call's Do method. Any
15224// pending HTTP request will be aborted if the provided context is
15225// canceled.
15226func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall {
15227	c.ctx_ = ctx
15228	return c
15229}
15230
15231func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
15232	var body io.Reader = nil
15233	c.urlParams_.Set("alt", alt)
15234	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules")
15235	urls += "?" + c.urlParams_.Encode()
15236	req, _ := http.NewRequest("GET", urls, body)
15237	googleapi.Expand(req.URL, map[string]string{
15238		"project": c.project,
15239		"region":  c.region,
15240	})
15241	req.Header.Set("User-Agent", c.s.userAgent())
15242	if c.ifNoneMatch_ != "" {
15243		req.Header.Set("If-None-Match", c.ifNoneMatch_)
15244	}
15245	if c.ctx_ != nil {
15246		return ctxhttp.Do(c.ctx_, c.s.client, req)
15247	}
15248	return c.s.client.Do(req)
15249}
15250
15251// Do executes the "compute.forwardingRules.list" call.
15252// Exactly one of *ForwardingRuleList or error will be non-nil. Any
15253// non-2xx status code is an error. Response headers are in either
15254// *ForwardingRuleList.ServerResponse.Header or (if a response was
15255// returned at all) in error.(*googleapi.Error).Header. Use
15256// googleapi.IsNotModified to check whether the returned error was
15257// because http.StatusNotModified was returned.
15258func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) {
15259	gensupport.SetOptions(c.urlParams_, opts...)
15260	res, err := c.doRequest("json")
15261	if res != nil && res.StatusCode == http.StatusNotModified {
15262		if res.Body != nil {
15263			res.Body.Close()
15264		}
15265		return nil, &googleapi.Error{
15266			Code:   res.StatusCode,
15267			Header: res.Header,
15268		}
15269	}
15270	if err != nil {
15271		return nil, err
15272	}
15273	defer googleapi.CloseBody(res)
15274	if err := googleapi.CheckResponse(res); err != nil {
15275		return nil, err
15276	}
15277	ret := &ForwardingRuleList{
15278		ServerResponse: googleapi.ServerResponse{
15279			Header:         res.Header,
15280			HTTPStatusCode: res.StatusCode,
15281		},
15282	}
15283	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15284		return nil, err
15285	}
15286	return ret, nil
15287	// {
15288	//   "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.",
15289	//   "httpMethod": "GET",
15290	//   "id": "compute.forwardingRules.list",
15291	//   "parameterOrder": [
15292	//     "project",
15293	//     "region"
15294	//   ],
15295	//   "parameters": {
15296	//     "filter": {
15297	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
15298	//       "location": "query",
15299	//       "type": "string"
15300	//     },
15301	//     "maxResults": {
15302	//       "default": "500",
15303	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
15304	//       "format": "uint32",
15305	//       "location": "query",
15306	//       "maximum": "500",
15307	//       "minimum": "0",
15308	//       "type": "integer"
15309	//     },
15310	//     "pageToken": {
15311	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
15312	//       "location": "query",
15313	//       "type": "string"
15314	//     },
15315	//     "project": {
15316	//       "description": "Project ID for this request.",
15317	//       "location": "path",
15318	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15319	//       "required": true,
15320	//       "type": "string"
15321	//     },
15322	//     "region": {
15323	//       "description": "Name of the region scoping this request.",
15324	//       "location": "path",
15325	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15326	//       "required": true,
15327	//       "type": "string"
15328	//     }
15329	//   },
15330	//   "path": "{project}/regions/{region}/forwardingRules",
15331	//   "response": {
15332	//     "$ref": "ForwardingRuleList"
15333	//   },
15334	//   "scopes": [
15335	//     "https://www.googleapis.com/auth/cloud-platform",
15336	//     "https://www.googleapis.com/auth/compute",
15337	//     "https://www.googleapis.com/auth/compute.readonly"
15338	//   ]
15339	// }
15340
15341}
15342
15343// Pages invokes f for each page of results.
15344// A non-nil error returned from f will halt the iteration.
15345// The provided context supersedes any context provided to the Context method.
15346func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error {
15347	c.ctx_ = ctx
15348	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15349	for {
15350		x, err := c.Do()
15351		if err != nil {
15352			return err
15353		}
15354		if err := f(x); err != nil {
15355			return err
15356		}
15357		if x.NextPageToken == "" {
15358			return nil
15359		}
15360		c.PageToken(x.NextPageToken)
15361	}
15362}
15363
15364// method id "compute.forwardingRules.setTarget":
15365
15366type ForwardingRulesSetTargetCall struct {
15367	s               *Service
15368	project         string
15369	region          string
15370	forwardingRule  string
15371	targetreference *TargetReference
15372	urlParams_      gensupport.URLParams
15373	ctx_            context.Context
15374}
15375
15376// SetTarget: Changes target URL for forwarding rule. The new target
15377// should be of the same type as the old target.
15378// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/setTarget
15379func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall {
15380	c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15381	c.project = project
15382	c.region = region
15383	c.forwardingRule = forwardingRule
15384	c.targetreference = targetreference
15385	return c
15386}
15387
15388// Fields allows partial responses to be retrieved. See
15389// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15390// for more information.
15391func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall {
15392	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15393	return c
15394}
15395
15396// Context sets the context to be used in this call's Do method. Any
15397// pending HTTP request will be aborted if the provided context is
15398// canceled.
15399func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall {
15400	c.ctx_ = ctx
15401	return c
15402}
15403
15404func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
15405	var body io.Reader = nil
15406	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
15407	if err != nil {
15408		return nil, err
15409	}
15410	ctype := "application/json"
15411	c.urlParams_.Set("alt", alt)
15412	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget")
15413	urls += "?" + c.urlParams_.Encode()
15414	req, _ := http.NewRequest("POST", urls, body)
15415	googleapi.Expand(req.URL, map[string]string{
15416		"project":        c.project,
15417		"region":         c.region,
15418		"forwardingRule": c.forwardingRule,
15419	})
15420	req.Header.Set("Content-Type", ctype)
15421	req.Header.Set("User-Agent", c.s.userAgent())
15422	if c.ctx_ != nil {
15423		return ctxhttp.Do(c.ctx_, c.s.client, req)
15424	}
15425	return c.s.client.Do(req)
15426}
15427
15428// Do executes the "compute.forwardingRules.setTarget" call.
15429// Exactly one of *Operation or error will be non-nil. Any non-2xx
15430// status code is an error. Response headers are in either
15431// *Operation.ServerResponse.Header or (if a response was returned at
15432// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15433// to check whether the returned error was because
15434// http.StatusNotModified was returned.
15435func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15436	gensupport.SetOptions(c.urlParams_, opts...)
15437	res, err := c.doRequest("json")
15438	if res != nil && res.StatusCode == http.StatusNotModified {
15439		if res.Body != nil {
15440			res.Body.Close()
15441		}
15442		return nil, &googleapi.Error{
15443			Code:   res.StatusCode,
15444			Header: res.Header,
15445		}
15446	}
15447	if err != nil {
15448		return nil, err
15449	}
15450	defer googleapi.CloseBody(res)
15451	if err := googleapi.CheckResponse(res); err != nil {
15452		return nil, err
15453	}
15454	ret := &Operation{
15455		ServerResponse: googleapi.ServerResponse{
15456			Header:         res.Header,
15457			HTTPStatusCode: res.StatusCode,
15458		},
15459	}
15460	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15461		return nil, err
15462	}
15463	return ret, nil
15464	// {
15465	//   "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.",
15466	//   "httpMethod": "POST",
15467	//   "id": "compute.forwardingRules.setTarget",
15468	//   "parameterOrder": [
15469	//     "project",
15470	//     "region",
15471	//     "forwardingRule"
15472	//   ],
15473	//   "parameters": {
15474	//     "forwardingRule": {
15475	//       "description": "Name of the ForwardingRule resource in which target is to be set.",
15476	//       "location": "path",
15477	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15478	//       "required": true,
15479	//       "type": "string"
15480	//     },
15481	//     "project": {
15482	//       "description": "Project ID for this request.",
15483	//       "location": "path",
15484	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15485	//       "required": true,
15486	//       "type": "string"
15487	//     },
15488	//     "region": {
15489	//       "description": "Name of the region scoping this request.",
15490	//       "location": "path",
15491	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15492	//       "required": true,
15493	//       "type": "string"
15494	//     }
15495	//   },
15496	//   "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget",
15497	//   "request": {
15498	//     "$ref": "TargetReference"
15499	//   },
15500	//   "response": {
15501	//     "$ref": "Operation"
15502	//   },
15503	//   "scopes": [
15504	//     "https://www.googleapis.com/auth/cloud-platform",
15505	//     "https://www.googleapis.com/auth/compute"
15506	//   ]
15507	// }
15508
15509}
15510
15511// method id "compute.globalAddresses.delete":
15512
15513type GlobalAddressesDeleteCall struct {
15514	s          *Service
15515	project    string
15516	address    string
15517	urlParams_ gensupport.URLParams
15518	ctx_       context.Context
15519}
15520
15521// Delete: Deletes the specified address resource.
15522// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/delete
15523func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall {
15524	c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15525	c.project = project
15526	c.address = address
15527	return c
15528}
15529
15530// Fields allows partial responses to be retrieved. See
15531// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15532// for more information.
15533func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall {
15534	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15535	return c
15536}
15537
15538// Context sets the context to be used in this call's Do method. Any
15539// pending HTTP request will be aborted if the provided context is
15540// canceled.
15541func (c *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall {
15542	c.ctx_ = ctx
15543	return c
15544}
15545
15546func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
15547	var body io.Reader = nil
15548	c.urlParams_.Set("alt", alt)
15549	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}")
15550	urls += "?" + c.urlParams_.Encode()
15551	req, _ := http.NewRequest("DELETE", urls, body)
15552	googleapi.Expand(req.URL, map[string]string{
15553		"project": c.project,
15554		"address": c.address,
15555	})
15556	req.Header.Set("User-Agent", c.s.userAgent())
15557	if c.ctx_ != nil {
15558		return ctxhttp.Do(c.ctx_, c.s.client, req)
15559	}
15560	return c.s.client.Do(req)
15561}
15562
15563// Do executes the "compute.globalAddresses.delete" call.
15564// Exactly one of *Operation or error will be non-nil. Any non-2xx
15565// status code is an error. Response headers are in either
15566// *Operation.ServerResponse.Header or (if a response was returned at
15567// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15568// to check whether the returned error was because
15569// http.StatusNotModified was returned.
15570func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15571	gensupport.SetOptions(c.urlParams_, opts...)
15572	res, err := c.doRequest("json")
15573	if res != nil && res.StatusCode == http.StatusNotModified {
15574		if res.Body != nil {
15575			res.Body.Close()
15576		}
15577		return nil, &googleapi.Error{
15578			Code:   res.StatusCode,
15579			Header: res.Header,
15580		}
15581	}
15582	if err != nil {
15583		return nil, err
15584	}
15585	defer googleapi.CloseBody(res)
15586	if err := googleapi.CheckResponse(res); err != nil {
15587		return nil, err
15588	}
15589	ret := &Operation{
15590		ServerResponse: googleapi.ServerResponse{
15591			Header:         res.Header,
15592			HTTPStatusCode: res.StatusCode,
15593		},
15594	}
15595	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15596		return nil, err
15597	}
15598	return ret, nil
15599	// {
15600	//   "description": "Deletes the specified address resource.",
15601	//   "httpMethod": "DELETE",
15602	//   "id": "compute.globalAddresses.delete",
15603	//   "parameterOrder": [
15604	//     "project",
15605	//     "address"
15606	//   ],
15607	//   "parameters": {
15608	//     "address": {
15609	//       "description": "Name of the address resource to delete.",
15610	//       "location": "path",
15611	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15612	//       "required": true,
15613	//       "type": "string"
15614	//     },
15615	//     "project": {
15616	//       "description": "Project ID for this request.",
15617	//       "location": "path",
15618	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15619	//       "required": true,
15620	//       "type": "string"
15621	//     }
15622	//   },
15623	//   "path": "{project}/global/addresses/{address}",
15624	//   "response": {
15625	//     "$ref": "Operation"
15626	//   },
15627	//   "scopes": [
15628	//     "https://www.googleapis.com/auth/cloud-platform",
15629	//     "https://www.googleapis.com/auth/compute"
15630	//   ]
15631	// }
15632
15633}
15634
15635// method id "compute.globalAddresses.get":
15636
15637type GlobalAddressesGetCall struct {
15638	s            *Service
15639	project      string
15640	address      string
15641	urlParams_   gensupport.URLParams
15642	ifNoneMatch_ string
15643	ctx_         context.Context
15644}
15645
15646// Get: Returns the specified address resource. Get a list of available
15647// addresses by making a list() request.
15648// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get
15649func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall {
15650	c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15651	c.project = project
15652	c.address = address
15653	return c
15654}
15655
15656// Fields allows partial responses to be retrieved. See
15657// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15658// for more information.
15659func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall {
15660	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15661	return c
15662}
15663
15664// IfNoneMatch sets the optional parameter which makes the operation
15665// fail if the object's ETag matches the given value. This is useful for
15666// getting updates only after the object has changed since the last
15667// request. Use googleapi.IsNotModified to check whether the response
15668// error from Do is the result of In-None-Match.
15669func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall {
15670	c.ifNoneMatch_ = entityTag
15671	return c
15672}
15673
15674// Context sets the context to be used in this call's Do method. Any
15675// pending HTTP request will be aborted if the provided context is
15676// canceled.
15677func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall {
15678	c.ctx_ = ctx
15679	return c
15680}
15681
15682func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) {
15683	var body io.Reader = nil
15684	c.urlParams_.Set("alt", alt)
15685	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}")
15686	urls += "?" + c.urlParams_.Encode()
15687	req, _ := http.NewRequest("GET", urls, body)
15688	googleapi.Expand(req.URL, map[string]string{
15689		"project": c.project,
15690		"address": c.address,
15691	})
15692	req.Header.Set("User-Agent", c.s.userAgent())
15693	if c.ifNoneMatch_ != "" {
15694		req.Header.Set("If-None-Match", c.ifNoneMatch_)
15695	}
15696	if c.ctx_ != nil {
15697		return ctxhttp.Do(c.ctx_, c.s.client, req)
15698	}
15699	return c.s.client.Do(req)
15700}
15701
15702// Do executes the "compute.globalAddresses.get" call.
15703// Exactly one of *Address or error will be non-nil. Any non-2xx status
15704// code is an error. Response headers are in either
15705// *Address.ServerResponse.Header or (if a response was returned at all)
15706// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
15707// check whether the returned error was because http.StatusNotModified
15708// was returned.
15709func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) {
15710	gensupport.SetOptions(c.urlParams_, opts...)
15711	res, err := c.doRequest("json")
15712	if res != nil && res.StatusCode == http.StatusNotModified {
15713		if res.Body != nil {
15714			res.Body.Close()
15715		}
15716		return nil, &googleapi.Error{
15717			Code:   res.StatusCode,
15718			Header: res.Header,
15719		}
15720	}
15721	if err != nil {
15722		return nil, err
15723	}
15724	defer googleapi.CloseBody(res)
15725	if err := googleapi.CheckResponse(res); err != nil {
15726		return nil, err
15727	}
15728	ret := &Address{
15729		ServerResponse: googleapi.ServerResponse{
15730			Header:         res.Header,
15731			HTTPStatusCode: res.StatusCode,
15732		},
15733	}
15734	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15735		return nil, err
15736	}
15737	return ret, nil
15738	// {
15739	//   "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.",
15740	//   "httpMethod": "GET",
15741	//   "id": "compute.globalAddresses.get",
15742	//   "parameterOrder": [
15743	//     "project",
15744	//     "address"
15745	//   ],
15746	//   "parameters": {
15747	//     "address": {
15748	//       "description": "Name of the address resource to return.",
15749	//       "location": "path",
15750	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15751	//       "required": true,
15752	//       "type": "string"
15753	//     },
15754	//     "project": {
15755	//       "description": "Project ID for this request.",
15756	//       "location": "path",
15757	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15758	//       "required": true,
15759	//       "type": "string"
15760	//     }
15761	//   },
15762	//   "path": "{project}/global/addresses/{address}",
15763	//   "response": {
15764	//     "$ref": "Address"
15765	//   },
15766	//   "scopes": [
15767	//     "https://www.googleapis.com/auth/cloud-platform",
15768	//     "https://www.googleapis.com/auth/compute",
15769	//     "https://www.googleapis.com/auth/compute.readonly"
15770	//   ]
15771	// }
15772
15773}
15774
15775// method id "compute.globalAddresses.insert":
15776
15777type GlobalAddressesInsertCall struct {
15778	s          *Service
15779	project    string
15780	address    *Address
15781	urlParams_ gensupport.URLParams
15782	ctx_       context.Context
15783}
15784
15785// Insert: Creates an address resource in the specified project using
15786// the data included in the request.
15787// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/insert
15788func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall {
15789	c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15790	c.project = project
15791	c.address = address
15792	return c
15793}
15794
15795// Fields allows partial responses to be retrieved. See
15796// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15797// for more information.
15798func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall {
15799	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15800	return c
15801}
15802
15803// Context sets the context to be used in this call's Do method. Any
15804// pending HTTP request will be aborted if the provided context is
15805// canceled.
15806func (c *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall {
15807	c.ctx_ = ctx
15808	return c
15809}
15810
15811func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) {
15812	var body io.Reader = nil
15813	body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
15814	if err != nil {
15815		return nil, err
15816	}
15817	ctype := "application/json"
15818	c.urlParams_.Set("alt", alt)
15819	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses")
15820	urls += "?" + c.urlParams_.Encode()
15821	req, _ := http.NewRequest("POST", urls, body)
15822	googleapi.Expand(req.URL, map[string]string{
15823		"project": c.project,
15824	})
15825	req.Header.Set("Content-Type", ctype)
15826	req.Header.Set("User-Agent", c.s.userAgent())
15827	if c.ctx_ != nil {
15828		return ctxhttp.Do(c.ctx_, c.s.client, req)
15829	}
15830	return c.s.client.Do(req)
15831}
15832
15833// Do executes the "compute.globalAddresses.insert" call.
15834// Exactly one of *Operation or error will be non-nil. Any non-2xx
15835// status code is an error. Response headers are in either
15836// *Operation.ServerResponse.Header or (if a response was returned at
15837// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15838// to check whether the returned error was because
15839// http.StatusNotModified was returned.
15840func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15841	gensupport.SetOptions(c.urlParams_, opts...)
15842	res, err := c.doRequest("json")
15843	if res != nil && res.StatusCode == http.StatusNotModified {
15844		if res.Body != nil {
15845			res.Body.Close()
15846		}
15847		return nil, &googleapi.Error{
15848			Code:   res.StatusCode,
15849			Header: res.Header,
15850		}
15851	}
15852	if err != nil {
15853		return nil, err
15854	}
15855	defer googleapi.CloseBody(res)
15856	if err := googleapi.CheckResponse(res); err != nil {
15857		return nil, err
15858	}
15859	ret := &Operation{
15860		ServerResponse: googleapi.ServerResponse{
15861			Header:         res.Header,
15862			HTTPStatusCode: res.StatusCode,
15863		},
15864	}
15865	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15866		return nil, err
15867	}
15868	return ret, nil
15869	// {
15870	//   "description": "Creates an address resource in the specified project using the data included in the request.",
15871	//   "httpMethod": "POST",
15872	//   "id": "compute.globalAddresses.insert",
15873	//   "parameterOrder": [
15874	//     "project"
15875	//   ],
15876	//   "parameters": {
15877	//     "project": {
15878	//       "description": "Project ID for this request.",
15879	//       "location": "path",
15880	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15881	//       "required": true,
15882	//       "type": "string"
15883	//     }
15884	//   },
15885	//   "path": "{project}/global/addresses",
15886	//   "request": {
15887	//     "$ref": "Address"
15888	//   },
15889	//   "response": {
15890	//     "$ref": "Operation"
15891	//   },
15892	//   "scopes": [
15893	//     "https://www.googleapis.com/auth/cloud-platform",
15894	//     "https://www.googleapis.com/auth/compute"
15895	//   ]
15896	// }
15897
15898}
15899
15900// method id "compute.globalAddresses.list":
15901
15902type GlobalAddressesListCall struct {
15903	s            *Service
15904	project      string
15905	urlParams_   gensupport.URLParams
15906	ifNoneMatch_ string
15907	ctx_         context.Context
15908}
15909
15910// List: Retrieves a list of global addresses.
15911// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list
15912func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall {
15913	c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15914	c.project = project
15915	return c
15916}
15917
15918// Filter sets the optional parameter "filter": Sets a filter expression
15919// for filtering listed resources, in the form filter={expression}. Your
15920// {expression} must be in the format: field_name comparison_string
15921// literal_string.
15922//
15923// The field_name is the name of the field you want to compare. Only
15924// atomic field types are supported (string, number, boolean). The
15925// comparison_string must be either eq (equals) or ne (not equals). The
15926// literal_string is the string value to filter to. The literal value
15927// must be valid for the type of field you are filtering by (string,
15928// number, boolean). For string fields, the literal value is interpreted
15929// as a regular expression using RE2 syntax. The literal value must
15930// match the entire field.
15931//
15932// For example, to filter for instances that do not have a name of
15933// example-instance, you would use filter=name ne
15934// example-instance.
15935//
15936// Compute Engine Beta API Only: If you use filtering in the Beta API,
15937// you can also filter on nested fields. For example, you could filter
15938// on instances that have set the scheduling.automaticRestart field to
15939// true. In particular, use filtering on nested fields to take advantage
15940// of instance labels to organize and filter results based on label
15941// values.
15942//
15943// The Beta API also supports filtering on multiple expressions by
15944// providing each separate expression within parentheses. For example,
15945// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
15946// Multiple expressions are treated as AND expressions, meaning that
15947// resources must match all expressions to pass the filters.
15948func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall {
15949	c.urlParams_.Set("filter", filter)
15950	return c
15951}
15952
15953// MaxResults sets the optional parameter "maxResults": The maximum
15954// number of results per page that should be returned. If the number of
15955// available results is larger than maxResults, Compute Engine returns a
15956// nextPageToken that can be used to get the next page of results in
15957// subsequent list requests.
15958func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall {
15959	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15960	return c
15961}
15962
15963// PageToken sets the optional parameter "pageToken": Specifies a page
15964// token to use. Set pageToken to the nextPageToken returned by a
15965// previous list request to get the next page of results.
15966func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall {
15967	c.urlParams_.Set("pageToken", pageToken)
15968	return c
15969}
15970
15971// Fields allows partial responses to be retrieved. See
15972// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15973// for more information.
15974func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall {
15975	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15976	return c
15977}
15978
15979// IfNoneMatch sets the optional parameter which makes the operation
15980// fail if the object's ETag matches the given value. This is useful for
15981// getting updates only after the object has changed since the last
15982// request. Use googleapi.IsNotModified to check whether the response
15983// error from Do is the result of In-None-Match.
15984func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall {
15985	c.ifNoneMatch_ = entityTag
15986	return c
15987}
15988
15989// Context sets the context to be used in this call's Do method. Any
15990// pending HTTP request will be aborted if the provided context is
15991// canceled.
15992func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall {
15993	c.ctx_ = ctx
15994	return c
15995}
15996
15997func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) {
15998	var body io.Reader = nil
15999	c.urlParams_.Set("alt", alt)
16000	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses")
16001	urls += "?" + c.urlParams_.Encode()
16002	req, _ := http.NewRequest("GET", urls, body)
16003	googleapi.Expand(req.URL, map[string]string{
16004		"project": c.project,
16005	})
16006	req.Header.Set("User-Agent", c.s.userAgent())
16007	if c.ifNoneMatch_ != "" {
16008		req.Header.Set("If-None-Match", c.ifNoneMatch_)
16009	}
16010	if c.ctx_ != nil {
16011		return ctxhttp.Do(c.ctx_, c.s.client, req)
16012	}
16013	return c.s.client.Do(req)
16014}
16015
16016// Do executes the "compute.globalAddresses.list" call.
16017// Exactly one of *AddressList or error will be non-nil. Any non-2xx
16018// status code is an error. Response headers are in either
16019// *AddressList.ServerResponse.Header or (if a response was returned at
16020// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16021// to check whether the returned error was because
16022// http.StatusNotModified was returned.
16023func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) {
16024	gensupport.SetOptions(c.urlParams_, opts...)
16025	res, err := c.doRequest("json")
16026	if res != nil && res.StatusCode == http.StatusNotModified {
16027		if res.Body != nil {
16028			res.Body.Close()
16029		}
16030		return nil, &googleapi.Error{
16031			Code:   res.StatusCode,
16032			Header: res.Header,
16033		}
16034	}
16035	if err != nil {
16036		return nil, err
16037	}
16038	defer googleapi.CloseBody(res)
16039	if err := googleapi.CheckResponse(res); err != nil {
16040		return nil, err
16041	}
16042	ret := &AddressList{
16043		ServerResponse: googleapi.ServerResponse{
16044			Header:         res.Header,
16045			HTTPStatusCode: res.StatusCode,
16046		},
16047	}
16048	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16049		return nil, err
16050	}
16051	return ret, nil
16052	// {
16053	//   "description": "Retrieves a list of global addresses.",
16054	//   "httpMethod": "GET",
16055	//   "id": "compute.globalAddresses.list",
16056	//   "parameterOrder": [
16057	//     "project"
16058	//   ],
16059	//   "parameters": {
16060	//     "filter": {
16061	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
16062	//       "location": "query",
16063	//       "type": "string"
16064	//     },
16065	//     "maxResults": {
16066	//       "default": "500",
16067	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
16068	//       "format": "uint32",
16069	//       "location": "query",
16070	//       "maximum": "500",
16071	//       "minimum": "0",
16072	//       "type": "integer"
16073	//     },
16074	//     "pageToken": {
16075	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
16076	//       "location": "query",
16077	//       "type": "string"
16078	//     },
16079	//     "project": {
16080	//       "description": "Project ID for this request.",
16081	//       "location": "path",
16082	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16083	//       "required": true,
16084	//       "type": "string"
16085	//     }
16086	//   },
16087	//   "path": "{project}/global/addresses",
16088	//   "response": {
16089	//     "$ref": "AddressList"
16090	//   },
16091	//   "scopes": [
16092	//     "https://www.googleapis.com/auth/cloud-platform",
16093	//     "https://www.googleapis.com/auth/compute",
16094	//     "https://www.googleapis.com/auth/compute.readonly"
16095	//   ]
16096	// }
16097
16098}
16099
16100// Pages invokes f for each page of results.
16101// A non-nil error returned from f will halt the iteration.
16102// The provided context supersedes any context provided to the Context method.
16103func (c *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error {
16104	c.ctx_ = ctx
16105	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16106	for {
16107		x, err := c.Do()
16108		if err != nil {
16109			return err
16110		}
16111		if err := f(x); err != nil {
16112			return err
16113		}
16114		if x.NextPageToken == "" {
16115			return nil
16116		}
16117		c.PageToken(x.NextPageToken)
16118	}
16119}
16120
16121// method id "compute.globalForwardingRules.delete":
16122
16123type GlobalForwardingRulesDeleteCall struct {
16124	s              *Service
16125	project        string
16126	forwardingRule string
16127	urlParams_     gensupport.URLParams
16128	ctx_           context.Context
16129}
16130
16131// Delete: Deletes the specified ForwardingRule resource.
16132// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/delete
16133func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall {
16134	c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16135	c.project = project
16136	c.forwardingRule = forwardingRule
16137	return c
16138}
16139
16140// Fields allows partial responses to be retrieved. See
16141// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16142// for more information.
16143func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall {
16144	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16145	return c
16146}
16147
16148// Context sets the context to be used in this call's Do method. Any
16149// pending HTTP request will be aborted if the provided context is
16150// canceled.
16151func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall {
16152	c.ctx_ = ctx
16153	return c
16154}
16155
16156func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
16157	var body io.Reader = nil
16158	c.urlParams_.Set("alt", alt)
16159	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}")
16160	urls += "?" + c.urlParams_.Encode()
16161	req, _ := http.NewRequest("DELETE", urls, body)
16162	googleapi.Expand(req.URL, map[string]string{
16163		"project":        c.project,
16164		"forwardingRule": c.forwardingRule,
16165	})
16166	req.Header.Set("User-Agent", c.s.userAgent())
16167	if c.ctx_ != nil {
16168		return ctxhttp.Do(c.ctx_, c.s.client, req)
16169	}
16170	return c.s.client.Do(req)
16171}
16172
16173// Do executes the "compute.globalForwardingRules.delete" call.
16174// Exactly one of *Operation or error will be non-nil. Any non-2xx
16175// status code is an error. Response headers are in either
16176// *Operation.ServerResponse.Header or (if a response was returned at
16177// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16178// to check whether the returned error was because
16179// http.StatusNotModified was returned.
16180func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16181	gensupport.SetOptions(c.urlParams_, opts...)
16182	res, err := c.doRequest("json")
16183	if res != nil && res.StatusCode == http.StatusNotModified {
16184		if res.Body != nil {
16185			res.Body.Close()
16186		}
16187		return nil, &googleapi.Error{
16188			Code:   res.StatusCode,
16189			Header: res.Header,
16190		}
16191	}
16192	if err != nil {
16193		return nil, err
16194	}
16195	defer googleapi.CloseBody(res)
16196	if err := googleapi.CheckResponse(res); err != nil {
16197		return nil, err
16198	}
16199	ret := &Operation{
16200		ServerResponse: googleapi.ServerResponse{
16201			Header:         res.Header,
16202			HTTPStatusCode: res.StatusCode,
16203		},
16204	}
16205	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16206		return nil, err
16207	}
16208	return ret, nil
16209	// {
16210	//   "description": "Deletes the specified ForwardingRule resource.",
16211	//   "httpMethod": "DELETE",
16212	//   "id": "compute.globalForwardingRules.delete",
16213	//   "parameterOrder": [
16214	//     "project",
16215	//     "forwardingRule"
16216	//   ],
16217	//   "parameters": {
16218	//     "forwardingRule": {
16219	//       "description": "Name of the ForwardingRule resource to delete.",
16220	//       "location": "path",
16221	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
16222	//       "required": true,
16223	//       "type": "string"
16224	//     },
16225	//     "project": {
16226	//       "description": "Project ID for this request.",
16227	//       "location": "path",
16228	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16229	//       "required": true,
16230	//       "type": "string"
16231	//     }
16232	//   },
16233	//   "path": "{project}/global/forwardingRules/{forwardingRule}",
16234	//   "response": {
16235	//     "$ref": "Operation"
16236	//   },
16237	//   "scopes": [
16238	//     "https://www.googleapis.com/auth/cloud-platform",
16239	//     "https://www.googleapis.com/auth/compute"
16240	//   ]
16241	// }
16242
16243}
16244
16245// method id "compute.globalForwardingRules.get":
16246
16247type GlobalForwardingRulesGetCall struct {
16248	s              *Service
16249	project        string
16250	forwardingRule string
16251	urlParams_     gensupport.URLParams
16252	ifNoneMatch_   string
16253	ctx_           context.Context
16254}
16255
16256// Get: Returns the specified ForwardingRule resource. Get a list of
16257// available forwarding rules by making a list() request.
16258// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get
16259func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall {
16260	c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16261	c.project = project
16262	c.forwardingRule = forwardingRule
16263	return c
16264}
16265
16266// Fields allows partial responses to be retrieved. See
16267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16268// for more information.
16269func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall {
16270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16271	return c
16272}
16273
16274// IfNoneMatch sets the optional parameter which makes the operation
16275// fail if the object's ETag matches the given value. This is useful for
16276// getting updates only after the object has changed since the last
16277// request. Use googleapi.IsNotModified to check whether the response
16278// error from Do is the result of In-None-Match.
16279func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall {
16280	c.ifNoneMatch_ = entityTag
16281	return c
16282}
16283
16284// Context sets the context to be used in this call's Do method. Any
16285// pending HTTP request will be aborted if the provided context is
16286// canceled.
16287func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall {
16288	c.ctx_ = ctx
16289	return c
16290}
16291
16292func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
16293	var body io.Reader = nil
16294	c.urlParams_.Set("alt", alt)
16295	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}")
16296	urls += "?" + c.urlParams_.Encode()
16297	req, _ := http.NewRequest("GET", urls, body)
16298	googleapi.Expand(req.URL, map[string]string{
16299		"project":        c.project,
16300		"forwardingRule": c.forwardingRule,
16301	})
16302	req.Header.Set("User-Agent", c.s.userAgent())
16303	if c.ifNoneMatch_ != "" {
16304		req.Header.Set("If-None-Match", c.ifNoneMatch_)
16305	}
16306	if c.ctx_ != nil {
16307		return ctxhttp.Do(c.ctx_, c.s.client, req)
16308	}
16309	return c.s.client.Do(req)
16310}
16311
16312// Do executes the "compute.globalForwardingRules.get" call.
16313// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx
16314// status code is an error. Response headers are in either
16315// *ForwardingRule.ServerResponse.Header or (if a response was returned
16316// at all) in error.(*googleapi.Error).Header. Use
16317// googleapi.IsNotModified to check whether the returned error was
16318// because http.StatusNotModified was returned.
16319func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) {
16320	gensupport.SetOptions(c.urlParams_, opts...)
16321	res, err := c.doRequest("json")
16322	if res != nil && res.StatusCode == http.StatusNotModified {
16323		if res.Body != nil {
16324			res.Body.Close()
16325		}
16326		return nil, &googleapi.Error{
16327			Code:   res.StatusCode,
16328			Header: res.Header,
16329		}
16330	}
16331	if err != nil {
16332		return nil, err
16333	}
16334	defer googleapi.CloseBody(res)
16335	if err := googleapi.CheckResponse(res); err != nil {
16336		return nil, err
16337	}
16338	ret := &ForwardingRule{
16339		ServerResponse: googleapi.ServerResponse{
16340			Header:         res.Header,
16341			HTTPStatusCode: res.StatusCode,
16342		},
16343	}
16344	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16345		return nil, err
16346	}
16347	return ret, nil
16348	// {
16349	//   "description": "Returns the specified ForwardingRule resource. Get a list of available forwarding rules by making a list() request.",
16350	//   "httpMethod": "GET",
16351	//   "id": "compute.globalForwardingRules.get",
16352	//   "parameterOrder": [
16353	//     "project",
16354	//     "forwardingRule"
16355	//   ],
16356	//   "parameters": {
16357	//     "forwardingRule": {
16358	//       "description": "Name of the ForwardingRule resource to return.",
16359	//       "location": "path",
16360	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
16361	//       "required": true,
16362	//       "type": "string"
16363	//     },
16364	//     "project": {
16365	//       "description": "Project ID for this request.",
16366	//       "location": "path",
16367	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16368	//       "required": true,
16369	//       "type": "string"
16370	//     }
16371	//   },
16372	//   "path": "{project}/global/forwardingRules/{forwardingRule}",
16373	//   "response": {
16374	//     "$ref": "ForwardingRule"
16375	//   },
16376	//   "scopes": [
16377	//     "https://www.googleapis.com/auth/cloud-platform",
16378	//     "https://www.googleapis.com/auth/compute",
16379	//     "https://www.googleapis.com/auth/compute.readonly"
16380	//   ]
16381	// }
16382
16383}
16384
16385// method id "compute.globalForwardingRules.insert":
16386
16387type GlobalForwardingRulesInsertCall struct {
16388	s              *Service
16389	project        string
16390	forwardingrule *ForwardingRule
16391	urlParams_     gensupport.URLParams
16392	ctx_           context.Context
16393}
16394
16395// Insert: Creates a ForwardingRule resource in the specified project
16396// and region using the data included in the request.
16397// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/insert
16398func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall {
16399	c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16400	c.project = project
16401	c.forwardingrule = forwardingrule
16402	return c
16403}
16404
16405// Fields allows partial responses to be retrieved. See
16406// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16407// for more information.
16408func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall {
16409	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16410	return c
16411}
16412
16413// Context sets the context to be used in this call's Do method. Any
16414// pending HTTP request will be aborted if the provided context is
16415// canceled.
16416func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall {
16417	c.ctx_ = ctx
16418	return c
16419}
16420
16421func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
16422	var body io.Reader = nil
16423	body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
16424	if err != nil {
16425		return nil, err
16426	}
16427	ctype := "application/json"
16428	c.urlParams_.Set("alt", alt)
16429	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules")
16430	urls += "?" + c.urlParams_.Encode()
16431	req, _ := http.NewRequest("POST", urls, body)
16432	googleapi.Expand(req.URL, map[string]string{
16433		"project": c.project,
16434	})
16435	req.Header.Set("Content-Type", ctype)
16436	req.Header.Set("User-Agent", c.s.userAgent())
16437	if c.ctx_ != nil {
16438		return ctxhttp.Do(c.ctx_, c.s.client, req)
16439	}
16440	return c.s.client.Do(req)
16441}
16442
16443// Do executes the "compute.globalForwardingRules.insert" call.
16444// Exactly one of *Operation or error will be non-nil. Any non-2xx
16445// status code is an error. Response headers are in either
16446// *Operation.ServerResponse.Header or (if a response was returned at
16447// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16448// to check whether the returned error was because
16449// http.StatusNotModified was returned.
16450func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16451	gensupport.SetOptions(c.urlParams_, opts...)
16452	res, err := c.doRequest("json")
16453	if res != nil && res.StatusCode == http.StatusNotModified {
16454		if res.Body != nil {
16455			res.Body.Close()
16456		}
16457		return nil, &googleapi.Error{
16458			Code:   res.StatusCode,
16459			Header: res.Header,
16460		}
16461	}
16462	if err != nil {
16463		return nil, err
16464	}
16465	defer googleapi.CloseBody(res)
16466	if err := googleapi.CheckResponse(res); err != nil {
16467		return nil, err
16468	}
16469	ret := &Operation{
16470		ServerResponse: googleapi.ServerResponse{
16471			Header:         res.Header,
16472			HTTPStatusCode: res.StatusCode,
16473		},
16474	}
16475	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16476		return nil, err
16477	}
16478	return ret, nil
16479	// {
16480	//   "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.",
16481	//   "httpMethod": "POST",
16482	//   "id": "compute.globalForwardingRules.insert",
16483	//   "parameterOrder": [
16484	//     "project"
16485	//   ],
16486	//   "parameters": {
16487	//     "project": {
16488	//       "description": "Project ID for this request.",
16489	//       "location": "path",
16490	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16491	//       "required": true,
16492	//       "type": "string"
16493	//     }
16494	//   },
16495	//   "path": "{project}/global/forwardingRules",
16496	//   "request": {
16497	//     "$ref": "ForwardingRule"
16498	//   },
16499	//   "response": {
16500	//     "$ref": "Operation"
16501	//   },
16502	//   "scopes": [
16503	//     "https://www.googleapis.com/auth/cloud-platform",
16504	//     "https://www.googleapis.com/auth/compute"
16505	//   ]
16506	// }
16507
16508}
16509
16510// method id "compute.globalForwardingRules.list":
16511
16512type GlobalForwardingRulesListCall struct {
16513	s            *Service
16514	project      string
16515	urlParams_   gensupport.URLParams
16516	ifNoneMatch_ string
16517	ctx_         context.Context
16518}
16519
16520// List: Retrieves a list of ForwardingRule resources available to the
16521// specified project.
16522// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list
16523func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall {
16524	c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16525	c.project = project
16526	return c
16527}
16528
16529// Filter sets the optional parameter "filter": Sets a filter expression
16530// for filtering listed resources, in the form filter={expression}. Your
16531// {expression} must be in the format: field_name comparison_string
16532// literal_string.
16533//
16534// The field_name is the name of the field you want to compare. Only
16535// atomic field types are supported (string, number, boolean). The
16536// comparison_string must be either eq (equals) or ne (not equals). The
16537// literal_string is the string value to filter to. The literal value
16538// must be valid for the type of field you are filtering by (string,
16539// number, boolean). For string fields, the literal value is interpreted
16540// as a regular expression using RE2 syntax. The literal value must
16541// match the entire field.
16542//
16543// For example, to filter for instances that do not have a name of
16544// example-instance, you would use filter=name ne
16545// example-instance.
16546//
16547// Compute Engine Beta API Only: If you use filtering in the Beta API,
16548// you can also filter on nested fields. For example, you could filter
16549// on instances that have set the scheduling.automaticRestart field to
16550// true. In particular, use filtering on nested fields to take advantage
16551// of instance labels to organize and filter results based on label
16552// values.
16553//
16554// The Beta API also supports filtering on multiple expressions by
16555// providing each separate expression within parentheses. For example,
16556// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
16557// Multiple expressions are treated as AND expressions, meaning that
16558// resources must match all expressions to pass the filters.
16559func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall {
16560	c.urlParams_.Set("filter", filter)
16561	return c
16562}
16563
16564// MaxResults sets the optional parameter "maxResults": The maximum
16565// number of results per page that should be returned. If the number of
16566// available results is larger than maxResults, Compute Engine returns a
16567// nextPageToken that can be used to get the next page of results in
16568// subsequent list requests.
16569func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall {
16570	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16571	return c
16572}
16573
16574// PageToken sets the optional parameter "pageToken": Specifies a page
16575// token to use. Set pageToken to the nextPageToken returned by a
16576// previous list request to get the next page of results.
16577func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall {
16578	c.urlParams_.Set("pageToken", pageToken)
16579	return c
16580}
16581
16582// Fields allows partial responses to be retrieved. See
16583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16584// for more information.
16585func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall {
16586	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16587	return c
16588}
16589
16590// IfNoneMatch sets the optional parameter which makes the operation
16591// fail if the object's ETag matches the given value. This is useful for
16592// getting updates only after the object has changed since the last
16593// request. Use googleapi.IsNotModified to check whether the response
16594// error from Do is the result of In-None-Match.
16595func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall {
16596	c.ifNoneMatch_ = entityTag
16597	return c
16598}
16599
16600// Context sets the context to be used in this call's Do method. Any
16601// pending HTTP request will be aborted if the provided context is
16602// canceled.
16603func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall {
16604	c.ctx_ = ctx
16605	return c
16606}
16607
16608func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
16609	var body io.Reader = nil
16610	c.urlParams_.Set("alt", alt)
16611	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules")
16612	urls += "?" + c.urlParams_.Encode()
16613	req, _ := http.NewRequest("GET", urls, body)
16614	googleapi.Expand(req.URL, map[string]string{
16615		"project": c.project,
16616	})
16617	req.Header.Set("User-Agent", c.s.userAgent())
16618	if c.ifNoneMatch_ != "" {
16619		req.Header.Set("If-None-Match", c.ifNoneMatch_)
16620	}
16621	if c.ctx_ != nil {
16622		return ctxhttp.Do(c.ctx_, c.s.client, req)
16623	}
16624	return c.s.client.Do(req)
16625}
16626
16627// Do executes the "compute.globalForwardingRules.list" call.
16628// Exactly one of *ForwardingRuleList or error will be non-nil. Any
16629// non-2xx status code is an error. Response headers are in either
16630// *ForwardingRuleList.ServerResponse.Header or (if a response was
16631// returned at all) in error.(*googleapi.Error).Header. Use
16632// googleapi.IsNotModified to check whether the returned error was
16633// because http.StatusNotModified was returned.
16634func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) {
16635	gensupport.SetOptions(c.urlParams_, opts...)
16636	res, err := c.doRequest("json")
16637	if res != nil && res.StatusCode == http.StatusNotModified {
16638		if res.Body != nil {
16639			res.Body.Close()
16640		}
16641		return nil, &googleapi.Error{
16642			Code:   res.StatusCode,
16643			Header: res.Header,
16644		}
16645	}
16646	if err != nil {
16647		return nil, err
16648	}
16649	defer googleapi.CloseBody(res)
16650	if err := googleapi.CheckResponse(res); err != nil {
16651		return nil, err
16652	}
16653	ret := &ForwardingRuleList{
16654		ServerResponse: googleapi.ServerResponse{
16655			Header:         res.Header,
16656			HTTPStatusCode: res.StatusCode,
16657		},
16658	}
16659	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16660		return nil, err
16661	}
16662	return ret, nil
16663	// {
16664	//   "description": "Retrieves a list of ForwardingRule resources available to the specified project.",
16665	//   "httpMethod": "GET",
16666	//   "id": "compute.globalForwardingRules.list",
16667	//   "parameterOrder": [
16668	//     "project"
16669	//   ],
16670	//   "parameters": {
16671	//     "filter": {
16672	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
16673	//       "location": "query",
16674	//       "type": "string"
16675	//     },
16676	//     "maxResults": {
16677	//       "default": "500",
16678	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
16679	//       "format": "uint32",
16680	//       "location": "query",
16681	//       "maximum": "500",
16682	//       "minimum": "0",
16683	//       "type": "integer"
16684	//     },
16685	//     "pageToken": {
16686	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
16687	//       "location": "query",
16688	//       "type": "string"
16689	//     },
16690	//     "project": {
16691	//       "description": "Project ID for this request.",
16692	//       "location": "path",
16693	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16694	//       "required": true,
16695	//       "type": "string"
16696	//     }
16697	//   },
16698	//   "path": "{project}/global/forwardingRules",
16699	//   "response": {
16700	//     "$ref": "ForwardingRuleList"
16701	//   },
16702	//   "scopes": [
16703	//     "https://www.googleapis.com/auth/cloud-platform",
16704	//     "https://www.googleapis.com/auth/compute",
16705	//     "https://www.googleapis.com/auth/compute.readonly"
16706	//   ]
16707	// }
16708
16709}
16710
16711// Pages invokes f for each page of results.
16712// A non-nil error returned from f will halt the iteration.
16713// The provided context supersedes any context provided to the Context method.
16714func (c *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error {
16715	c.ctx_ = ctx
16716	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16717	for {
16718		x, err := c.Do()
16719		if err != nil {
16720			return err
16721		}
16722		if err := f(x); err != nil {
16723			return err
16724		}
16725		if x.NextPageToken == "" {
16726			return nil
16727		}
16728		c.PageToken(x.NextPageToken)
16729	}
16730}
16731
16732// method id "compute.globalForwardingRules.setTarget":
16733
16734type GlobalForwardingRulesSetTargetCall struct {
16735	s               *Service
16736	project         string
16737	forwardingRule  string
16738	targetreference *TargetReference
16739	urlParams_      gensupport.URLParams
16740	ctx_            context.Context
16741}
16742
16743// SetTarget: Changes target URL for forwarding rule. The new target
16744// should be of the same type as the old target.
16745// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/setTarget
16746func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall {
16747	c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16748	c.project = project
16749	c.forwardingRule = forwardingRule
16750	c.targetreference = targetreference
16751	return c
16752}
16753
16754// Fields allows partial responses to be retrieved. See
16755// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16756// for more information.
16757func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall {
16758	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16759	return c
16760}
16761
16762// Context sets the context to be used in this call's Do method. Any
16763// pending HTTP request will be aborted if the provided context is
16764// canceled.
16765func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall {
16766	c.ctx_ = ctx
16767	return c
16768}
16769
16770func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
16771	var body io.Reader = nil
16772	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
16773	if err != nil {
16774		return nil, err
16775	}
16776	ctype := "application/json"
16777	c.urlParams_.Set("alt", alt)
16778	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget")
16779	urls += "?" + c.urlParams_.Encode()
16780	req, _ := http.NewRequest("POST", urls, body)
16781	googleapi.Expand(req.URL, map[string]string{
16782		"project":        c.project,
16783		"forwardingRule": c.forwardingRule,
16784	})
16785	req.Header.Set("Content-Type", ctype)
16786	req.Header.Set("User-Agent", c.s.userAgent())
16787	if c.ctx_ != nil {
16788		return ctxhttp.Do(c.ctx_, c.s.client, req)
16789	}
16790	return c.s.client.Do(req)
16791}
16792
16793// Do executes the "compute.globalForwardingRules.setTarget" call.
16794// Exactly one of *Operation or error will be non-nil. Any non-2xx
16795// status code is an error. Response headers are in either
16796// *Operation.ServerResponse.Header or (if a response was returned at
16797// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16798// to check whether the returned error was because
16799// http.StatusNotModified was returned.
16800func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16801	gensupport.SetOptions(c.urlParams_, opts...)
16802	res, err := c.doRequest("json")
16803	if res != nil && res.StatusCode == http.StatusNotModified {
16804		if res.Body != nil {
16805			res.Body.Close()
16806		}
16807		return nil, &googleapi.Error{
16808			Code:   res.StatusCode,
16809			Header: res.Header,
16810		}
16811	}
16812	if err != nil {
16813		return nil, err
16814	}
16815	defer googleapi.CloseBody(res)
16816	if err := googleapi.CheckResponse(res); err != nil {
16817		return nil, err
16818	}
16819	ret := &Operation{
16820		ServerResponse: googleapi.ServerResponse{
16821			Header:         res.Header,
16822			HTTPStatusCode: res.StatusCode,
16823		},
16824	}
16825	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16826		return nil, err
16827	}
16828	return ret, nil
16829	// {
16830	//   "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.",
16831	//   "httpMethod": "POST",
16832	//   "id": "compute.globalForwardingRules.setTarget",
16833	//   "parameterOrder": [
16834	//     "project",
16835	//     "forwardingRule"
16836	//   ],
16837	//   "parameters": {
16838	//     "forwardingRule": {
16839	//       "description": "Name of the ForwardingRule resource in which target is to be set.",
16840	//       "location": "path",
16841	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
16842	//       "required": true,
16843	//       "type": "string"
16844	//     },
16845	//     "project": {
16846	//       "description": "Project ID for this request.",
16847	//       "location": "path",
16848	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16849	//       "required": true,
16850	//       "type": "string"
16851	//     }
16852	//   },
16853	//   "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget",
16854	//   "request": {
16855	//     "$ref": "TargetReference"
16856	//   },
16857	//   "response": {
16858	//     "$ref": "Operation"
16859	//   },
16860	//   "scopes": [
16861	//     "https://www.googleapis.com/auth/cloud-platform",
16862	//     "https://www.googleapis.com/auth/compute"
16863	//   ]
16864	// }
16865
16866}
16867
16868// method id "compute.globalOperations.aggregatedList":
16869
16870type GlobalOperationsAggregatedListCall struct {
16871	s            *Service
16872	project      string
16873	urlParams_   gensupport.URLParams
16874	ifNoneMatch_ string
16875	ctx_         context.Context
16876}
16877
16878// AggregatedList: Retrieves an aggregated list of all operations.
16879// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList
16880func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall {
16881	c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16882	c.project = project
16883	return c
16884}
16885
16886// Filter sets the optional parameter "filter": Sets a filter expression
16887// for filtering listed resources, in the form filter={expression}. Your
16888// {expression} must be in the format: field_name comparison_string
16889// literal_string.
16890//
16891// The field_name is the name of the field you want to compare. Only
16892// atomic field types are supported (string, number, boolean). The
16893// comparison_string must be either eq (equals) or ne (not equals). The
16894// literal_string is the string value to filter to. The literal value
16895// must be valid for the type of field you are filtering by (string,
16896// number, boolean). For string fields, the literal value is interpreted
16897// as a regular expression using RE2 syntax. The literal value must
16898// match the entire field.
16899//
16900// For example, to filter for instances that do not have a name of
16901// example-instance, you would use filter=name ne
16902// example-instance.
16903//
16904// Compute Engine Beta API Only: If you use filtering in the Beta API,
16905// you can also filter on nested fields. For example, you could filter
16906// on instances that have set the scheduling.automaticRestart field to
16907// true. In particular, use filtering on nested fields to take advantage
16908// of instance labels to organize and filter results based on label
16909// values.
16910//
16911// The Beta API also supports filtering on multiple expressions by
16912// providing each separate expression within parentheses. For example,
16913// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
16914// Multiple expressions are treated as AND expressions, meaning that
16915// resources must match all expressions to pass the filters.
16916func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall {
16917	c.urlParams_.Set("filter", filter)
16918	return c
16919}
16920
16921// MaxResults sets the optional parameter "maxResults": The maximum
16922// number of results per page that should be returned. If the number of
16923// available results is larger than maxResults, Compute Engine returns a
16924// nextPageToken that can be used to get the next page of results in
16925// subsequent list requests.
16926func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall {
16927	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16928	return c
16929}
16930
16931// PageToken sets the optional parameter "pageToken": Specifies a page
16932// token to use. Set pageToken to the nextPageToken returned by a
16933// previous list request to get the next page of results.
16934func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall {
16935	c.urlParams_.Set("pageToken", pageToken)
16936	return c
16937}
16938
16939// Fields allows partial responses to be retrieved. See
16940// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16941// for more information.
16942func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall {
16943	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16944	return c
16945}
16946
16947// IfNoneMatch sets the optional parameter which makes the operation
16948// fail if the object's ETag matches the given value. This is useful for
16949// getting updates only after the object has changed since the last
16950// request. Use googleapi.IsNotModified to check whether the response
16951// error from Do is the result of In-None-Match.
16952func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall {
16953	c.ifNoneMatch_ = entityTag
16954	return c
16955}
16956
16957// Context sets the context to be used in this call's Do method. Any
16958// pending HTTP request will be aborted if the provided context is
16959// canceled.
16960func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall {
16961	c.ctx_ = ctx
16962	return c
16963}
16964
16965func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
16966	var body io.Reader = nil
16967	c.urlParams_.Set("alt", alt)
16968	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/operations")
16969	urls += "?" + c.urlParams_.Encode()
16970	req, _ := http.NewRequest("GET", urls, body)
16971	googleapi.Expand(req.URL, map[string]string{
16972		"project": c.project,
16973	})
16974	req.Header.Set("User-Agent", c.s.userAgent())
16975	if c.ifNoneMatch_ != "" {
16976		req.Header.Set("If-None-Match", c.ifNoneMatch_)
16977	}
16978	if c.ctx_ != nil {
16979		return ctxhttp.Do(c.ctx_, c.s.client, req)
16980	}
16981	return c.s.client.Do(req)
16982}
16983
16984// Do executes the "compute.globalOperations.aggregatedList" call.
16985// Exactly one of *OperationAggregatedList or error will be non-nil. Any
16986// non-2xx status code is an error. Response headers are in either
16987// *OperationAggregatedList.ServerResponse.Header or (if a response was
16988// returned at all) in error.(*googleapi.Error).Header. Use
16989// googleapi.IsNotModified to check whether the returned error was
16990// because http.StatusNotModified was returned.
16991func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, error) {
16992	gensupport.SetOptions(c.urlParams_, opts...)
16993	res, err := c.doRequest("json")
16994	if res != nil && res.StatusCode == http.StatusNotModified {
16995		if res.Body != nil {
16996			res.Body.Close()
16997		}
16998		return nil, &googleapi.Error{
16999			Code:   res.StatusCode,
17000			Header: res.Header,
17001		}
17002	}
17003	if err != nil {
17004		return nil, err
17005	}
17006	defer googleapi.CloseBody(res)
17007	if err := googleapi.CheckResponse(res); err != nil {
17008		return nil, err
17009	}
17010	ret := &OperationAggregatedList{
17011		ServerResponse: googleapi.ServerResponse{
17012			Header:         res.Header,
17013			HTTPStatusCode: res.StatusCode,
17014		},
17015	}
17016	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17017		return nil, err
17018	}
17019	return ret, nil
17020	// {
17021	//   "description": "Retrieves an aggregated list of all operations.",
17022	//   "httpMethod": "GET",
17023	//   "id": "compute.globalOperations.aggregatedList",
17024	//   "parameterOrder": [
17025	//     "project"
17026	//   ],
17027	//   "parameters": {
17028	//     "filter": {
17029	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
17030	//       "location": "query",
17031	//       "type": "string"
17032	//     },
17033	//     "maxResults": {
17034	//       "default": "500",
17035	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
17036	//       "format": "uint32",
17037	//       "location": "query",
17038	//       "maximum": "500",
17039	//       "minimum": "0",
17040	//       "type": "integer"
17041	//     },
17042	//     "pageToken": {
17043	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
17044	//       "location": "query",
17045	//       "type": "string"
17046	//     },
17047	//     "project": {
17048	//       "description": "Project ID for this request.",
17049	//       "location": "path",
17050	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17051	//       "required": true,
17052	//       "type": "string"
17053	//     }
17054	//   },
17055	//   "path": "{project}/aggregated/operations",
17056	//   "response": {
17057	//     "$ref": "OperationAggregatedList"
17058	//   },
17059	//   "scopes": [
17060	//     "https://www.googleapis.com/auth/cloud-platform",
17061	//     "https://www.googleapis.com/auth/compute",
17062	//     "https://www.googleapis.com/auth/compute.readonly"
17063	//   ]
17064	// }
17065
17066}
17067
17068// Pages invokes f for each page of results.
17069// A non-nil error returned from f will halt the iteration.
17070// The provided context supersedes any context provided to the Context method.
17071func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error {
17072	c.ctx_ = ctx
17073	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17074	for {
17075		x, err := c.Do()
17076		if err != nil {
17077			return err
17078		}
17079		if err := f(x); err != nil {
17080			return err
17081		}
17082		if x.NextPageToken == "" {
17083			return nil
17084		}
17085		c.PageToken(x.NextPageToken)
17086	}
17087}
17088
17089// method id "compute.globalOperations.delete":
17090
17091type GlobalOperationsDeleteCall struct {
17092	s          *Service
17093	project    string
17094	operation  string
17095	urlParams_ gensupport.URLParams
17096	ctx_       context.Context
17097}
17098
17099// Delete: Deletes the specified Operations resource.
17100// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/delete
17101func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall {
17102	c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17103	c.project = project
17104	c.operation = operation
17105	return c
17106}
17107
17108// Fields allows partial responses to be retrieved. See
17109// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17110// for more information.
17111func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall {
17112	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17113	return c
17114}
17115
17116// Context sets the context to be used in this call's Do method. Any
17117// pending HTTP request will be aborted if the provided context is
17118// canceled.
17119func (c *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall {
17120	c.ctx_ = ctx
17121	return c
17122}
17123
17124func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
17125	var body io.Reader = nil
17126	c.urlParams_.Set("alt", alt)
17127	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
17128	urls += "?" + c.urlParams_.Encode()
17129	req, _ := http.NewRequest("DELETE", urls, body)
17130	googleapi.Expand(req.URL, map[string]string{
17131		"project":   c.project,
17132		"operation": c.operation,
17133	})
17134	req.Header.Set("User-Agent", c.s.userAgent())
17135	if c.ctx_ != nil {
17136		return ctxhttp.Do(c.ctx_, c.s.client, req)
17137	}
17138	return c.s.client.Do(req)
17139}
17140
17141// Do executes the "compute.globalOperations.delete" call.
17142func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
17143	gensupport.SetOptions(c.urlParams_, opts...)
17144	res, err := c.doRequest("json")
17145	if err != nil {
17146		return err
17147	}
17148	defer googleapi.CloseBody(res)
17149	if err := googleapi.CheckResponse(res); err != nil {
17150		return err
17151	}
17152	return nil
17153	// {
17154	//   "description": "Deletes the specified Operations resource.",
17155	//   "httpMethod": "DELETE",
17156	//   "id": "compute.globalOperations.delete",
17157	//   "parameterOrder": [
17158	//     "project",
17159	//     "operation"
17160	//   ],
17161	//   "parameters": {
17162	//     "operation": {
17163	//       "description": "Name of the Operations resource to delete.",
17164	//       "location": "path",
17165	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17166	//       "required": true,
17167	//       "type": "string"
17168	//     },
17169	//     "project": {
17170	//       "description": "Project ID for this request.",
17171	//       "location": "path",
17172	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17173	//       "required": true,
17174	//       "type": "string"
17175	//     }
17176	//   },
17177	//   "path": "{project}/global/operations/{operation}",
17178	//   "scopes": [
17179	//     "https://www.googleapis.com/auth/cloud-platform",
17180	//     "https://www.googleapis.com/auth/compute"
17181	//   ]
17182	// }
17183
17184}
17185
17186// method id "compute.globalOperations.get":
17187
17188type GlobalOperationsGetCall struct {
17189	s            *Service
17190	project      string
17191	operation    string
17192	urlParams_   gensupport.URLParams
17193	ifNoneMatch_ string
17194	ctx_         context.Context
17195}
17196
17197// Get: Retrieves the specified Operations resource. Get a list of
17198// operations by making a list() request.
17199// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get
17200func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall {
17201	c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17202	c.project = project
17203	c.operation = operation
17204	return c
17205}
17206
17207// Fields allows partial responses to be retrieved. See
17208// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17209// for more information.
17210func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall {
17211	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17212	return c
17213}
17214
17215// IfNoneMatch sets the optional parameter which makes the operation
17216// fail if the object's ETag matches the given value. This is useful for
17217// getting updates only after the object has changed since the last
17218// request. Use googleapi.IsNotModified to check whether the response
17219// error from Do is the result of In-None-Match.
17220func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall {
17221	c.ifNoneMatch_ = entityTag
17222	return c
17223}
17224
17225// Context sets the context to be used in this call's Do method. Any
17226// pending HTTP request will be aborted if the provided context is
17227// canceled.
17228func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall {
17229	c.ctx_ = ctx
17230	return c
17231}
17232
17233func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) {
17234	var body io.Reader = nil
17235	c.urlParams_.Set("alt", alt)
17236	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
17237	urls += "?" + c.urlParams_.Encode()
17238	req, _ := http.NewRequest("GET", urls, body)
17239	googleapi.Expand(req.URL, map[string]string{
17240		"project":   c.project,
17241		"operation": c.operation,
17242	})
17243	req.Header.Set("User-Agent", c.s.userAgent())
17244	if c.ifNoneMatch_ != "" {
17245		req.Header.Set("If-None-Match", c.ifNoneMatch_)
17246	}
17247	if c.ctx_ != nil {
17248		return ctxhttp.Do(c.ctx_, c.s.client, req)
17249	}
17250	return c.s.client.Do(req)
17251}
17252
17253// Do executes the "compute.globalOperations.get" call.
17254// Exactly one of *Operation or error will be non-nil. Any non-2xx
17255// status code is an error. Response headers are in either
17256// *Operation.ServerResponse.Header or (if a response was returned at
17257// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17258// to check whether the returned error was because
17259// http.StatusNotModified was returned.
17260func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17261	gensupport.SetOptions(c.urlParams_, opts...)
17262	res, err := c.doRequest("json")
17263	if res != nil && res.StatusCode == http.StatusNotModified {
17264		if res.Body != nil {
17265			res.Body.Close()
17266		}
17267		return nil, &googleapi.Error{
17268			Code:   res.StatusCode,
17269			Header: res.Header,
17270		}
17271	}
17272	if err != nil {
17273		return nil, err
17274	}
17275	defer googleapi.CloseBody(res)
17276	if err := googleapi.CheckResponse(res); err != nil {
17277		return nil, err
17278	}
17279	ret := &Operation{
17280		ServerResponse: googleapi.ServerResponse{
17281			Header:         res.Header,
17282			HTTPStatusCode: res.StatusCode,
17283		},
17284	}
17285	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17286		return nil, err
17287	}
17288	return ret, nil
17289	// {
17290	//   "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.",
17291	//   "httpMethod": "GET",
17292	//   "id": "compute.globalOperations.get",
17293	//   "parameterOrder": [
17294	//     "project",
17295	//     "operation"
17296	//   ],
17297	//   "parameters": {
17298	//     "operation": {
17299	//       "description": "Name of the Operations resource to return.",
17300	//       "location": "path",
17301	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17302	//       "required": true,
17303	//       "type": "string"
17304	//     },
17305	//     "project": {
17306	//       "description": "Project ID for this request.",
17307	//       "location": "path",
17308	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17309	//       "required": true,
17310	//       "type": "string"
17311	//     }
17312	//   },
17313	//   "path": "{project}/global/operations/{operation}",
17314	//   "response": {
17315	//     "$ref": "Operation"
17316	//   },
17317	//   "scopes": [
17318	//     "https://www.googleapis.com/auth/cloud-platform",
17319	//     "https://www.googleapis.com/auth/compute",
17320	//     "https://www.googleapis.com/auth/compute.readonly"
17321	//   ]
17322	// }
17323
17324}
17325
17326// method id "compute.globalOperations.list":
17327
17328type GlobalOperationsListCall struct {
17329	s            *Service
17330	project      string
17331	urlParams_   gensupport.URLParams
17332	ifNoneMatch_ string
17333	ctx_         context.Context
17334}
17335
17336// List: Retrieves a list of Operation resources contained within the
17337// specified project.
17338// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list
17339func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall {
17340	c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17341	c.project = project
17342	return c
17343}
17344
17345// Filter sets the optional parameter "filter": Sets a filter expression
17346// for filtering listed resources, in the form filter={expression}. Your
17347// {expression} must be in the format: field_name comparison_string
17348// literal_string.
17349//
17350// The field_name is the name of the field you want to compare. Only
17351// atomic field types are supported (string, number, boolean). The
17352// comparison_string must be either eq (equals) or ne (not equals). The
17353// literal_string is the string value to filter to. The literal value
17354// must be valid for the type of field you are filtering by (string,
17355// number, boolean). For string fields, the literal value is interpreted
17356// as a regular expression using RE2 syntax. The literal value must
17357// match the entire field.
17358//
17359// For example, to filter for instances that do not have a name of
17360// example-instance, you would use filter=name ne
17361// example-instance.
17362//
17363// Compute Engine Beta API Only: If you use filtering in the Beta API,
17364// you can also filter on nested fields. For example, you could filter
17365// on instances that have set the scheduling.automaticRestart field to
17366// true. In particular, use filtering on nested fields to take advantage
17367// of instance labels to organize and filter results based on label
17368// values.
17369//
17370// The Beta API also supports filtering on multiple expressions by
17371// providing each separate expression within parentheses. For example,
17372// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
17373// Multiple expressions are treated as AND expressions, meaning that
17374// resources must match all expressions to pass the filters.
17375func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall {
17376	c.urlParams_.Set("filter", filter)
17377	return c
17378}
17379
17380// MaxResults sets the optional parameter "maxResults": The maximum
17381// number of results per page that should be returned. If the number of
17382// available results is larger than maxResults, Compute Engine returns a
17383// nextPageToken that can be used to get the next page of results in
17384// subsequent list requests.
17385func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall {
17386	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17387	return c
17388}
17389
17390// PageToken sets the optional parameter "pageToken": Specifies a page
17391// token to use. Set pageToken to the nextPageToken returned by a
17392// previous list request to get the next page of results.
17393func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall {
17394	c.urlParams_.Set("pageToken", pageToken)
17395	return c
17396}
17397
17398// Fields allows partial responses to be retrieved. See
17399// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17400// for more information.
17401func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall {
17402	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17403	return c
17404}
17405
17406// IfNoneMatch sets the optional parameter which makes the operation
17407// fail if the object's ETag matches the given value. This is useful for
17408// getting updates only after the object has changed since the last
17409// request. Use googleapi.IsNotModified to check whether the response
17410// error from Do is the result of In-None-Match.
17411func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall {
17412	c.ifNoneMatch_ = entityTag
17413	return c
17414}
17415
17416// Context sets the context to be used in this call's Do method. Any
17417// pending HTTP request will be aborted if the provided context is
17418// canceled.
17419func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall {
17420	c.ctx_ = ctx
17421	return c
17422}
17423
17424func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) {
17425	var body io.Reader = nil
17426	c.urlParams_.Set("alt", alt)
17427	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations")
17428	urls += "?" + c.urlParams_.Encode()
17429	req, _ := http.NewRequest("GET", urls, body)
17430	googleapi.Expand(req.URL, map[string]string{
17431		"project": c.project,
17432	})
17433	req.Header.Set("User-Agent", c.s.userAgent())
17434	if c.ifNoneMatch_ != "" {
17435		req.Header.Set("If-None-Match", c.ifNoneMatch_)
17436	}
17437	if c.ctx_ != nil {
17438		return ctxhttp.Do(c.ctx_, c.s.client, req)
17439	}
17440	return c.s.client.Do(req)
17441}
17442
17443// Do executes the "compute.globalOperations.list" call.
17444// Exactly one of *OperationList or error will be non-nil. Any non-2xx
17445// status code is an error. Response headers are in either
17446// *OperationList.ServerResponse.Header or (if a response was returned
17447// at all) in error.(*googleapi.Error).Header. Use
17448// googleapi.IsNotModified to check whether the returned error was
17449// because http.StatusNotModified was returned.
17450func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) {
17451	gensupport.SetOptions(c.urlParams_, opts...)
17452	res, err := c.doRequest("json")
17453	if res != nil && res.StatusCode == http.StatusNotModified {
17454		if res.Body != nil {
17455			res.Body.Close()
17456		}
17457		return nil, &googleapi.Error{
17458			Code:   res.StatusCode,
17459			Header: res.Header,
17460		}
17461	}
17462	if err != nil {
17463		return nil, err
17464	}
17465	defer googleapi.CloseBody(res)
17466	if err := googleapi.CheckResponse(res); err != nil {
17467		return nil, err
17468	}
17469	ret := &OperationList{
17470		ServerResponse: googleapi.ServerResponse{
17471			Header:         res.Header,
17472			HTTPStatusCode: res.StatusCode,
17473		},
17474	}
17475	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17476		return nil, err
17477	}
17478	return ret, nil
17479	// {
17480	//   "description": "Retrieves a list of Operation resources contained within the specified project.",
17481	//   "httpMethod": "GET",
17482	//   "id": "compute.globalOperations.list",
17483	//   "parameterOrder": [
17484	//     "project"
17485	//   ],
17486	//   "parameters": {
17487	//     "filter": {
17488	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
17489	//       "location": "query",
17490	//       "type": "string"
17491	//     },
17492	//     "maxResults": {
17493	//       "default": "500",
17494	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
17495	//       "format": "uint32",
17496	//       "location": "query",
17497	//       "maximum": "500",
17498	//       "minimum": "0",
17499	//       "type": "integer"
17500	//     },
17501	//     "pageToken": {
17502	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
17503	//       "location": "query",
17504	//       "type": "string"
17505	//     },
17506	//     "project": {
17507	//       "description": "Project ID for this request.",
17508	//       "location": "path",
17509	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17510	//       "required": true,
17511	//       "type": "string"
17512	//     }
17513	//   },
17514	//   "path": "{project}/global/operations",
17515	//   "response": {
17516	//     "$ref": "OperationList"
17517	//   },
17518	//   "scopes": [
17519	//     "https://www.googleapis.com/auth/cloud-platform",
17520	//     "https://www.googleapis.com/auth/compute",
17521	//     "https://www.googleapis.com/auth/compute.readonly"
17522	//   ]
17523	// }
17524
17525}
17526
17527// Pages invokes f for each page of results.
17528// A non-nil error returned from f will halt the iteration.
17529// The provided context supersedes any context provided to the Context method.
17530func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error {
17531	c.ctx_ = ctx
17532	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17533	for {
17534		x, err := c.Do()
17535		if err != nil {
17536			return err
17537		}
17538		if err := f(x); err != nil {
17539			return err
17540		}
17541		if x.NextPageToken == "" {
17542			return nil
17543		}
17544		c.PageToken(x.NextPageToken)
17545	}
17546}
17547
17548// method id "compute.httpHealthChecks.delete":
17549
17550type HttpHealthChecksDeleteCall struct {
17551	s               *Service
17552	project         string
17553	httpHealthCheck string
17554	urlParams_      gensupport.URLParams
17555	ctx_            context.Context
17556}
17557
17558// Delete: Deletes the specified HttpHealthCheck resource.
17559// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/delete
17560func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall {
17561	c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17562	c.project = project
17563	c.httpHealthCheck = httpHealthCheck
17564	return c
17565}
17566
17567// Fields allows partial responses to be retrieved. See
17568// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17569// for more information.
17570func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall {
17571	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17572	return c
17573}
17574
17575// Context sets the context to be used in this call's Do method. Any
17576// pending HTTP request will be aborted if the provided context is
17577// canceled.
17578func (c *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall {
17579	c.ctx_ = ctx
17580	return c
17581}
17582
17583func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
17584	var body io.Reader = nil
17585	c.urlParams_.Set("alt", alt)
17586	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
17587	urls += "?" + c.urlParams_.Encode()
17588	req, _ := http.NewRequest("DELETE", urls, body)
17589	googleapi.Expand(req.URL, map[string]string{
17590		"project":         c.project,
17591		"httpHealthCheck": c.httpHealthCheck,
17592	})
17593	req.Header.Set("User-Agent", c.s.userAgent())
17594	if c.ctx_ != nil {
17595		return ctxhttp.Do(c.ctx_, c.s.client, req)
17596	}
17597	return c.s.client.Do(req)
17598}
17599
17600// Do executes the "compute.httpHealthChecks.delete" call.
17601// Exactly one of *Operation or error will be non-nil. Any non-2xx
17602// status code is an error. Response headers are in either
17603// *Operation.ServerResponse.Header or (if a response was returned at
17604// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17605// to check whether the returned error was because
17606// http.StatusNotModified was returned.
17607func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17608	gensupport.SetOptions(c.urlParams_, opts...)
17609	res, err := c.doRequest("json")
17610	if res != nil && res.StatusCode == http.StatusNotModified {
17611		if res.Body != nil {
17612			res.Body.Close()
17613		}
17614		return nil, &googleapi.Error{
17615			Code:   res.StatusCode,
17616			Header: res.Header,
17617		}
17618	}
17619	if err != nil {
17620		return nil, err
17621	}
17622	defer googleapi.CloseBody(res)
17623	if err := googleapi.CheckResponse(res); err != nil {
17624		return nil, err
17625	}
17626	ret := &Operation{
17627		ServerResponse: googleapi.ServerResponse{
17628			Header:         res.Header,
17629			HTTPStatusCode: res.StatusCode,
17630		},
17631	}
17632	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17633		return nil, err
17634	}
17635	return ret, nil
17636	// {
17637	//   "description": "Deletes the specified HttpHealthCheck resource.",
17638	//   "httpMethod": "DELETE",
17639	//   "id": "compute.httpHealthChecks.delete",
17640	//   "parameterOrder": [
17641	//     "project",
17642	//     "httpHealthCheck"
17643	//   ],
17644	//   "parameters": {
17645	//     "httpHealthCheck": {
17646	//       "description": "Name of the HttpHealthCheck resource to delete.",
17647	//       "location": "path",
17648	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17649	//       "required": true,
17650	//       "type": "string"
17651	//     },
17652	//     "project": {
17653	//       "description": "Project ID for this request.",
17654	//       "location": "path",
17655	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17656	//       "required": true,
17657	//       "type": "string"
17658	//     }
17659	//   },
17660	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
17661	//   "response": {
17662	//     "$ref": "Operation"
17663	//   },
17664	//   "scopes": [
17665	//     "https://www.googleapis.com/auth/cloud-platform",
17666	//     "https://www.googleapis.com/auth/compute"
17667	//   ]
17668	// }
17669
17670}
17671
17672// method id "compute.httpHealthChecks.get":
17673
17674type HttpHealthChecksGetCall struct {
17675	s               *Service
17676	project         string
17677	httpHealthCheck string
17678	urlParams_      gensupport.URLParams
17679	ifNoneMatch_    string
17680	ctx_            context.Context
17681}
17682
17683// Get: Returns the specified HttpHealthCheck resource. Get a list of
17684// available HTTP health checks by making a list() request.
17685// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get
17686func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall {
17687	c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17688	c.project = project
17689	c.httpHealthCheck = httpHealthCheck
17690	return c
17691}
17692
17693// Fields allows partial responses to be retrieved. See
17694// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17695// for more information.
17696func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall {
17697	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17698	return c
17699}
17700
17701// IfNoneMatch sets the optional parameter which makes the operation
17702// fail if the object's ETag matches the given value. This is useful for
17703// getting updates only after the object has changed since the last
17704// request. Use googleapi.IsNotModified to check whether the response
17705// error from Do is the result of In-None-Match.
17706func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall {
17707	c.ifNoneMatch_ = entityTag
17708	return c
17709}
17710
17711// Context sets the context to be used in this call's Do method. Any
17712// pending HTTP request will be aborted if the provided context is
17713// canceled.
17714func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall {
17715	c.ctx_ = ctx
17716	return c
17717}
17718
17719func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
17720	var body io.Reader = nil
17721	c.urlParams_.Set("alt", alt)
17722	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
17723	urls += "?" + c.urlParams_.Encode()
17724	req, _ := http.NewRequest("GET", urls, body)
17725	googleapi.Expand(req.URL, map[string]string{
17726		"project":         c.project,
17727		"httpHealthCheck": c.httpHealthCheck,
17728	})
17729	req.Header.Set("User-Agent", c.s.userAgent())
17730	if c.ifNoneMatch_ != "" {
17731		req.Header.Set("If-None-Match", c.ifNoneMatch_)
17732	}
17733	if c.ctx_ != nil {
17734		return ctxhttp.Do(c.ctx_, c.s.client, req)
17735	}
17736	return c.s.client.Do(req)
17737}
17738
17739// Do executes the "compute.httpHealthChecks.get" call.
17740// Exactly one of *HttpHealthCheck or error will be non-nil. Any non-2xx
17741// status code is an error. Response headers are in either
17742// *HttpHealthCheck.ServerResponse.Header or (if a response was returned
17743// at all) in error.(*googleapi.Error).Header. Use
17744// googleapi.IsNotModified to check whether the returned error was
17745// because http.StatusNotModified was returned.
17746func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, error) {
17747	gensupport.SetOptions(c.urlParams_, opts...)
17748	res, err := c.doRequest("json")
17749	if res != nil && res.StatusCode == http.StatusNotModified {
17750		if res.Body != nil {
17751			res.Body.Close()
17752		}
17753		return nil, &googleapi.Error{
17754			Code:   res.StatusCode,
17755			Header: res.Header,
17756		}
17757	}
17758	if err != nil {
17759		return nil, err
17760	}
17761	defer googleapi.CloseBody(res)
17762	if err := googleapi.CheckResponse(res); err != nil {
17763		return nil, err
17764	}
17765	ret := &HttpHealthCheck{
17766		ServerResponse: googleapi.ServerResponse{
17767			Header:         res.Header,
17768			HTTPStatusCode: res.StatusCode,
17769		},
17770	}
17771	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17772		return nil, err
17773	}
17774	return ret, nil
17775	// {
17776	//   "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.",
17777	//   "httpMethod": "GET",
17778	//   "id": "compute.httpHealthChecks.get",
17779	//   "parameterOrder": [
17780	//     "project",
17781	//     "httpHealthCheck"
17782	//   ],
17783	//   "parameters": {
17784	//     "httpHealthCheck": {
17785	//       "description": "Name of the HttpHealthCheck resource to return.",
17786	//       "location": "path",
17787	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17788	//       "required": true,
17789	//       "type": "string"
17790	//     },
17791	//     "project": {
17792	//       "description": "Project ID for this request.",
17793	//       "location": "path",
17794	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17795	//       "required": true,
17796	//       "type": "string"
17797	//     }
17798	//   },
17799	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
17800	//   "response": {
17801	//     "$ref": "HttpHealthCheck"
17802	//   },
17803	//   "scopes": [
17804	//     "https://www.googleapis.com/auth/cloud-platform",
17805	//     "https://www.googleapis.com/auth/compute",
17806	//     "https://www.googleapis.com/auth/compute.readonly"
17807	//   ]
17808	// }
17809
17810}
17811
17812// method id "compute.httpHealthChecks.insert":
17813
17814type HttpHealthChecksInsertCall struct {
17815	s               *Service
17816	project         string
17817	httphealthcheck *HttpHealthCheck
17818	urlParams_      gensupport.URLParams
17819	ctx_            context.Context
17820}
17821
17822// Insert: Creates a HttpHealthCheck resource in the specified project
17823// using the data included in the request.
17824// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/insert
17825func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall {
17826	c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17827	c.project = project
17828	c.httphealthcheck = httphealthcheck
17829	return c
17830}
17831
17832// Fields allows partial responses to be retrieved. See
17833// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17834// for more information.
17835func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall {
17836	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17837	return c
17838}
17839
17840// Context sets the context to be used in this call's Do method. Any
17841// pending HTTP request will be aborted if the provided context is
17842// canceled.
17843func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall {
17844	c.ctx_ = ctx
17845	return c
17846}
17847
17848func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
17849	var body io.Reader = nil
17850	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
17851	if err != nil {
17852		return nil, err
17853	}
17854	ctype := "application/json"
17855	c.urlParams_.Set("alt", alt)
17856	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks")
17857	urls += "?" + c.urlParams_.Encode()
17858	req, _ := http.NewRequest("POST", urls, body)
17859	googleapi.Expand(req.URL, map[string]string{
17860		"project": c.project,
17861	})
17862	req.Header.Set("Content-Type", ctype)
17863	req.Header.Set("User-Agent", c.s.userAgent())
17864	if c.ctx_ != nil {
17865		return ctxhttp.Do(c.ctx_, c.s.client, req)
17866	}
17867	return c.s.client.Do(req)
17868}
17869
17870// Do executes the "compute.httpHealthChecks.insert" call.
17871// Exactly one of *Operation or error will be non-nil. Any non-2xx
17872// status code is an error. Response headers are in either
17873// *Operation.ServerResponse.Header or (if a response was returned at
17874// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17875// to check whether the returned error was because
17876// http.StatusNotModified was returned.
17877func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17878	gensupport.SetOptions(c.urlParams_, opts...)
17879	res, err := c.doRequest("json")
17880	if res != nil && res.StatusCode == http.StatusNotModified {
17881		if res.Body != nil {
17882			res.Body.Close()
17883		}
17884		return nil, &googleapi.Error{
17885			Code:   res.StatusCode,
17886			Header: res.Header,
17887		}
17888	}
17889	if err != nil {
17890		return nil, err
17891	}
17892	defer googleapi.CloseBody(res)
17893	if err := googleapi.CheckResponse(res); err != nil {
17894		return nil, err
17895	}
17896	ret := &Operation{
17897		ServerResponse: googleapi.ServerResponse{
17898			Header:         res.Header,
17899			HTTPStatusCode: res.StatusCode,
17900		},
17901	}
17902	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17903		return nil, err
17904	}
17905	return ret, nil
17906	// {
17907	//   "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.",
17908	//   "httpMethod": "POST",
17909	//   "id": "compute.httpHealthChecks.insert",
17910	//   "parameterOrder": [
17911	//     "project"
17912	//   ],
17913	//   "parameters": {
17914	//     "project": {
17915	//       "description": "Project ID for this request.",
17916	//       "location": "path",
17917	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17918	//       "required": true,
17919	//       "type": "string"
17920	//     }
17921	//   },
17922	//   "path": "{project}/global/httpHealthChecks",
17923	//   "request": {
17924	//     "$ref": "HttpHealthCheck"
17925	//   },
17926	//   "response": {
17927	//     "$ref": "Operation"
17928	//   },
17929	//   "scopes": [
17930	//     "https://www.googleapis.com/auth/cloud-platform",
17931	//     "https://www.googleapis.com/auth/compute"
17932	//   ]
17933	// }
17934
17935}
17936
17937// method id "compute.httpHealthChecks.list":
17938
17939type HttpHealthChecksListCall struct {
17940	s            *Service
17941	project      string
17942	urlParams_   gensupport.URLParams
17943	ifNoneMatch_ string
17944	ctx_         context.Context
17945}
17946
17947// List: Retrieves the list of HttpHealthCheck resources available to
17948// the specified project.
17949// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/list
17950func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall {
17951	c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17952	c.project = project
17953	return c
17954}
17955
17956// Filter sets the optional parameter "filter": Sets a filter expression
17957// for filtering listed resources, in the form filter={expression}. Your
17958// {expression} must be in the format: field_name comparison_string
17959// literal_string.
17960//
17961// The field_name is the name of the field you want to compare. Only
17962// atomic field types are supported (string, number, boolean). The
17963// comparison_string must be either eq (equals) or ne (not equals). The
17964// literal_string is the string value to filter to. The literal value
17965// must be valid for the type of field you are filtering by (string,
17966// number, boolean). For string fields, the literal value is interpreted
17967// as a regular expression using RE2 syntax. The literal value must
17968// match the entire field.
17969//
17970// For example, to filter for instances that do not have a name of
17971// example-instance, you would use filter=name ne
17972// example-instance.
17973//
17974// Compute Engine Beta API Only: If you use filtering in the Beta API,
17975// you can also filter on nested fields. For example, you could filter
17976// on instances that have set the scheduling.automaticRestart field to
17977// true. In particular, use filtering on nested fields to take advantage
17978// of instance labels to organize and filter results based on label
17979// values.
17980//
17981// The Beta API also supports filtering on multiple expressions by
17982// providing each separate expression within parentheses. For example,
17983// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
17984// Multiple expressions are treated as AND expressions, meaning that
17985// resources must match all expressions to pass the filters.
17986func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall {
17987	c.urlParams_.Set("filter", filter)
17988	return c
17989}
17990
17991// MaxResults sets the optional parameter "maxResults": The maximum
17992// number of results per page that should be returned. If the number of
17993// available results is larger than maxResults, Compute Engine returns a
17994// nextPageToken that can be used to get the next page of results in
17995// subsequent list requests.
17996func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall {
17997	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17998	return c
17999}
18000
18001// PageToken sets the optional parameter "pageToken": Specifies a page
18002// token to use. Set pageToken to the nextPageToken returned by a
18003// previous list request to get the next page of results.
18004func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall {
18005	c.urlParams_.Set("pageToken", pageToken)
18006	return c
18007}
18008
18009// Fields allows partial responses to be retrieved. See
18010// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18011// for more information.
18012func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall {
18013	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18014	return c
18015}
18016
18017// IfNoneMatch sets the optional parameter which makes the operation
18018// fail if the object's ETag matches the given value. This is useful for
18019// getting updates only after the object has changed since the last
18020// request. Use googleapi.IsNotModified to check whether the response
18021// error from Do is the result of In-None-Match.
18022func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall {
18023	c.ifNoneMatch_ = entityTag
18024	return c
18025}
18026
18027// Context sets the context to be used in this call's Do method. Any
18028// pending HTTP request will be aborted if the provided context is
18029// canceled.
18030func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall {
18031	c.ctx_ = ctx
18032	return c
18033}
18034
18035func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) {
18036	var body io.Reader = nil
18037	c.urlParams_.Set("alt", alt)
18038	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks")
18039	urls += "?" + c.urlParams_.Encode()
18040	req, _ := http.NewRequest("GET", urls, body)
18041	googleapi.Expand(req.URL, map[string]string{
18042		"project": c.project,
18043	})
18044	req.Header.Set("User-Agent", c.s.userAgent())
18045	if c.ifNoneMatch_ != "" {
18046		req.Header.Set("If-None-Match", c.ifNoneMatch_)
18047	}
18048	if c.ctx_ != nil {
18049		return ctxhttp.Do(c.ctx_, c.s.client, req)
18050	}
18051	return c.s.client.Do(req)
18052}
18053
18054// Do executes the "compute.httpHealthChecks.list" call.
18055// Exactly one of *HttpHealthCheckList or error will be non-nil. Any
18056// non-2xx status code is an error. Response headers are in either
18057// *HttpHealthCheckList.ServerResponse.Header or (if a response was
18058// returned at all) in error.(*googleapi.Error).Header. Use
18059// googleapi.IsNotModified to check whether the returned error was
18060// because http.StatusNotModified was returned.
18061func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, error) {
18062	gensupport.SetOptions(c.urlParams_, opts...)
18063	res, err := c.doRequest("json")
18064	if res != nil && res.StatusCode == http.StatusNotModified {
18065		if res.Body != nil {
18066			res.Body.Close()
18067		}
18068		return nil, &googleapi.Error{
18069			Code:   res.StatusCode,
18070			Header: res.Header,
18071		}
18072	}
18073	if err != nil {
18074		return nil, err
18075	}
18076	defer googleapi.CloseBody(res)
18077	if err := googleapi.CheckResponse(res); err != nil {
18078		return nil, err
18079	}
18080	ret := &HttpHealthCheckList{
18081		ServerResponse: googleapi.ServerResponse{
18082			Header:         res.Header,
18083			HTTPStatusCode: res.StatusCode,
18084		},
18085	}
18086	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18087		return nil, err
18088	}
18089	return ret, nil
18090	// {
18091	//   "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.",
18092	//   "httpMethod": "GET",
18093	//   "id": "compute.httpHealthChecks.list",
18094	//   "parameterOrder": [
18095	//     "project"
18096	//   ],
18097	//   "parameters": {
18098	//     "filter": {
18099	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
18100	//       "location": "query",
18101	//       "type": "string"
18102	//     },
18103	//     "maxResults": {
18104	//       "default": "500",
18105	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
18106	//       "format": "uint32",
18107	//       "location": "query",
18108	//       "maximum": "500",
18109	//       "minimum": "0",
18110	//       "type": "integer"
18111	//     },
18112	//     "pageToken": {
18113	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
18114	//       "location": "query",
18115	//       "type": "string"
18116	//     },
18117	//     "project": {
18118	//       "description": "Project ID for this request.",
18119	//       "location": "path",
18120	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18121	//       "required": true,
18122	//       "type": "string"
18123	//     }
18124	//   },
18125	//   "path": "{project}/global/httpHealthChecks",
18126	//   "response": {
18127	//     "$ref": "HttpHealthCheckList"
18128	//   },
18129	//   "scopes": [
18130	//     "https://www.googleapis.com/auth/cloud-platform",
18131	//     "https://www.googleapis.com/auth/compute",
18132	//     "https://www.googleapis.com/auth/compute.readonly"
18133	//   ]
18134	// }
18135
18136}
18137
18138// Pages invokes f for each page of results.
18139// A non-nil error returned from f will halt the iteration.
18140// The provided context supersedes any context provided to the Context method.
18141func (c *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) error) error {
18142	c.ctx_ = ctx
18143	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18144	for {
18145		x, err := c.Do()
18146		if err != nil {
18147			return err
18148		}
18149		if err := f(x); err != nil {
18150			return err
18151		}
18152		if x.NextPageToken == "" {
18153			return nil
18154		}
18155		c.PageToken(x.NextPageToken)
18156	}
18157}
18158
18159// method id "compute.httpHealthChecks.patch":
18160
18161type HttpHealthChecksPatchCall struct {
18162	s               *Service
18163	project         string
18164	httpHealthCheck string
18165	httphealthcheck *HttpHealthCheck
18166	urlParams_      gensupport.URLParams
18167	ctx_            context.Context
18168}
18169
18170// Patch: Updates a HttpHealthCheck resource in the specified project
18171// using the data included in the request. This method supports patch
18172// semantics.
18173// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch
18174func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall {
18175	c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18176	c.project = project
18177	c.httpHealthCheck = httpHealthCheck
18178	c.httphealthcheck = httphealthcheck
18179	return c
18180}
18181
18182// Fields allows partial responses to be retrieved. See
18183// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18184// for more information.
18185func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall {
18186	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18187	return c
18188}
18189
18190// Context sets the context to be used in this call's Do method. Any
18191// pending HTTP request will be aborted if the provided context is
18192// canceled.
18193func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall {
18194	c.ctx_ = ctx
18195	return c
18196}
18197
18198func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
18199	var body io.Reader = nil
18200	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
18201	if err != nil {
18202		return nil, err
18203	}
18204	ctype := "application/json"
18205	c.urlParams_.Set("alt", alt)
18206	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
18207	urls += "?" + c.urlParams_.Encode()
18208	req, _ := http.NewRequest("PATCH", urls, body)
18209	googleapi.Expand(req.URL, map[string]string{
18210		"project":         c.project,
18211		"httpHealthCheck": c.httpHealthCheck,
18212	})
18213	req.Header.Set("Content-Type", ctype)
18214	req.Header.Set("User-Agent", c.s.userAgent())
18215	if c.ctx_ != nil {
18216		return ctxhttp.Do(c.ctx_, c.s.client, req)
18217	}
18218	return c.s.client.Do(req)
18219}
18220
18221// Do executes the "compute.httpHealthChecks.patch" call.
18222// Exactly one of *Operation or error will be non-nil. Any non-2xx
18223// status code is an error. Response headers are in either
18224// *Operation.ServerResponse.Header or (if a response was returned at
18225// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18226// to check whether the returned error was because
18227// http.StatusNotModified was returned.
18228func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18229	gensupport.SetOptions(c.urlParams_, opts...)
18230	res, err := c.doRequest("json")
18231	if res != nil && res.StatusCode == http.StatusNotModified {
18232		if res.Body != nil {
18233			res.Body.Close()
18234		}
18235		return nil, &googleapi.Error{
18236			Code:   res.StatusCode,
18237			Header: res.Header,
18238		}
18239	}
18240	if err != nil {
18241		return nil, err
18242	}
18243	defer googleapi.CloseBody(res)
18244	if err := googleapi.CheckResponse(res); err != nil {
18245		return nil, err
18246	}
18247	ret := &Operation{
18248		ServerResponse: googleapi.ServerResponse{
18249			Header:         res.Header,
18250			HTTPStatusCode: res.StatusCode,
18251		},
18252	}
18253	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18254		return nil, err
18255	}
18256	return ret, nil
18257	// {
18258	//   "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.",
18259	//   "httpMethod": "PATCH",
18260	//   "id": "compute.httpHealthChecks.patch",
18261	//   "parameterOrder": [
18262	//     "project",
18263	//     "httpHealthCheck"
18264	//   ],
18265	//   "parameters": {
18266	//     "httpHealthCheck": {
18267	//       "description": "Name of the HttpHealthCheck resource to update.",
18268	//       "location": "path",
18269	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18270	//       "required": true,
18271	//       "type": "string"
18272	//     },
18273	//     "project": {
18274	//       "description": "Project ID for this request.",
18275	//       "location": "path",
18276	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18277	//       "required": true,
18278	//       "type": "string"
18279	//     }
18280	//   },
18281	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
18282	//   "request": {
18283	//     "$ref": "HttpHealthCheck"
18284	//   },
18285	//   "response": {
18286	//     "$ref": "Operation"
18287	//   },
18288	//   "scopes": [
18289	//     "https://www.googleapis.com/auth/cloud-platform",
18290	//     "https://www.googleapis.com/auth/compute"
18291	//   ]
18292	// }
18293
18294}
18295
18296// method id "compute.httpHealthChecks.update":
18297
18298type HttpHealthChecksUpdateCall struct {
18299	s               *Service
18300	project         string
18301	httpHealthCheck string
18302	httphealthcheck *HttpHealthCheck
18303	urlParams_      gensupport.URLParams
18304	ctx_            context.Context
18305}
18306
18307// Update: Updates a HttpHealthCheck resource in the specified project
18308// using the data included in the request.
18309// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/update
18310func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall {
18311	c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18312	c.project = project
18313	c.httpHealthCheck = httpHealthCheck
18314	c.httphealthcheck = httphealthcheck
18315	return c
18316}
18317
18318// Fields allows partial responses to be retrieved. See
18319// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18320// for more information.
18321func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall {
18322	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18323	return c
18324}
18325
18326// Context sets the context to be used in this call's Do method. Any
18327// pending HTTP request will be aborted if the provided context is
18328// canceled.
18329func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall {
18330	c.ctx_ = ctx
18331	return c
18332}
18333
18334func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
18335	var body io.Reader = nil
18336	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
18337	if err != nil {
18338		return nil, err
18339	}
18340	ctype := "application/json"
18341	c.urlParams_.Set("alt", alt)
18342	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
18343	urls += "?" + c.urlParams_.Encode()
18344	req, _ := http.NewRequest("PUT", urls, body)
18345	googleapi.Expand(req.URL, map[string]string{
18346		"project":         c.project,
18347		"httpHealthCheck": c.httpHealthCheck,
18348	})
18349	req.Header.Set("Content-Type", ctype)
18350	req.Header.Set("User-Agent", c.s.userAgent())
18351	if c.ctx_ != nil {
18352		return ctxhttp.Do(c.ctx_, c.s.client, req)
18353	}
18354	return c.s.client.Do(req)
18355}
18356
18357// Do executes the "compute.httpHealthChecks.update" call.
18358// Exactly one of *Operation or error will be non-nil. Any non-2xx
18359// status code is an error. Response headers are in either
18360// *Operation.ServerResponse.Header or (if a response was returned at
18361// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18362// to check whether the returned error was because
18363// http.StatusNotModified was returned.
18364func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18365	gensupport.SetOptions(c.urlParams_, opts...)
18366	res, err := c.doRequest("json")
18367	if res != nil && res.StatusCode == http.StatusNotModified {
18368		if res.Body != nil {
18369			res.Body.Close()
18370		}
18371		return nil, &googleapi.Error{
18372			Code:   res.StatusCode,
18373			Header: res.Header,
18374		}
18375	}
18376	if err != nil {
18377		return nil, err
18378	}
18379	defer googleapi.CloseBody(res)
18380	if err := googleapi.CheckResponse(res); err != nil {
18381		return nil, err
18382	}
18383	ret := &Operation{
18384		ServerResponse: googleapi.ServerResponse{
18385			Header:         res.Header,
18386			HTTPStatusCode: res.StatusCode,
18387		},
18388	}
18389	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18390		return nil, err
18391	}
18392	return ret, nil
18393	// {
18394	//   "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.",
18395	//   "httpMethod": "PUT",
18396	//   "id": "compute.httpHealthChecks.update",
18397	//   "parameterOrder": [
18398	//     "project",
18399	//     "httpHealthCheck"
18400	//   ],
18401	//   "parameters": {
18402	//     "httpHealthCheck": {
18403	//       "description": "Name of the HttpHealthCheck resource to update.",
18404	//       "location": "path",
18405	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18406	//       "required": true,
18407	//       "type": "string"
18408	//     },
18409	//     "project": {
18410	//       "description": "Project ID for this request.",
18411	//       "location": "path",
18412	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18413	//       "required": true,
18414	//       "type": "string"
18415	//     }
18416	//   },
18417	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
18418	//   "request": {
18419	//     "$ref": "HttpHealthCheck"
18420	//   },
18421	//   "response": {
18422	//     "$ref": "Operation"
18423	//   },
18424	//   "scopes": [
18425	//     "https://www.googleapis.com/auth/cloud-platform",
18426	//     "https://www.googleapis.com/auth/compute"
18427	//   ]
18428	// }
18429
18430}
18431
18432// method id "compute.httpsHealthChecks.delete":
18433
18434type HttpsHealthChecksDeleteCall struct {
18435	s                *Service
18436	project          string
18437	httpsHealthCheck string
18438	urlParams_       gensupport.URLParams
18439	ctx_             context.Context
18440}
18441
18442// Delete: Deletes the specified HttpsHealthCheck resource.
18443func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall {
18444	c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18445	c.project = project
18446	c.httpsHealthCheck = httpsHealthCheck
18447	return c
18448}
18449
18450// Fields allows partial responses to be retrieved. See
18451// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18452// for more information.
18453func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall {
18454	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18455	return c
18456}
18457
18458// Context sets the context to be used in this call's Do method. Any
18459// pending HTTP request will be aborted if the provided context is
18460// canceled.
18461func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall {
18462	c.ctx_ = ctx
18463	return c
18464}
18465
18466func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
18467	var body io.Reader = nil
18468	c.urlParams_.Set("alt", alt)
18469	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
18470	urls += "?" + c.urlParams_.Encode()
18471	req, _ := http.NewRequest("DELETE", urls, body)
18472	googleapi.Expand(req.URL, map[string]string{
18473		"project":          c.project,
18474		"httpsHealthCheck": c.httpsHealthCheck,
18475	})
18476	req.Header.Set("User-Agent", c.s.userAgent())
18477	if c.ctx_ != nil {
18478		return ctxhttp.Do(c.ctx_, c.s.client, req)
18479	}
18480	return c.s.client.Do(req)
18481}
18482
18483// Do executes the "compute.httpsHealthChecks.delete" call.
18484// Exactly one of *Operation or error will be non-nil. Any non-2xx
18485// status code is an error. Response headers are in either
18486// *Operation.ServerResponse.Header or (if a response was returned at
18487// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18488// to check whether the returned error was because
18489// http.StatusNotModified was returned.
18490func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18491	gensupport.SetOptions(c.urlParams_, opts...)
18492	res, err := c.doRequest("json")
18493	if res != nil && res.StatusCode == http.StatusNotModified {
18494		if res.Body != nil {
18495			res.Body.Close()
18496		}
18497		return nil, &googleapi.Error{
18498			Code:   res.StatusCode,
18499			Header: res.Header,
18500		}
18501	}
18502	if err != nil {
18503		return nil, err
18504	}
18505	defer googleapi.CloseBody(res)
18506	if err := googleapi.CheckResponse(res); err != nil {
18507		return nil, err
18508	}
18509	ret := &Operation{
18510		ServerResponse: googleapi.ServerResponse{
18511			Header:         res.Header,
18512			HTTPStatusCode: res.StatusCode,
18513		},
18514	}
18515	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18516		return nil, err
18517	}
18518	return ret, nil
18519	// {
18520	//   "description": "Deletes the specified HttpsHealthCheck resource.",
18521	//   "httpMethod": "DELETE",
18522	//   "id": "compute.httpsHealthChecks.delete",
18523	//   "parameterOrder": [
18524	//     "project",
18525	//     "httpsHealthCheck"
18526	//   ],
18527	//   "parameters": {
18528	//     "httpsHealthCheck": {
18529	//       "description": "Name of the HttpsHealthCheck resource to delete.",
18530	//       "location": "path",
18531	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18532	//       "required": true,
18533	//       "type": "string"
18534	//     },
18535	//     "project": {
18536	//       "description": "Project ID for this request.",
18537	//       "location": "path",
18538	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18539	//       "required": true,
18540	//       "type": "string"
18541	//     }
18542	//   },
18543	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
18544	//   "response": {
18545	//     "$ref": "Operation"
18546	//   },
18547	//   "scopes": [
18548	//     "https://www.googleapis.com/auth/cloud-platform",
18549	//     "https://www.googleapis.com/auth/compute"
18550	//   ]
18551	// }
18552
18553}
18554
18555// method id "compute.httpsHealthChecks.get":
18556
18557type HttpsHealthChecksGetCall struct {
18558	s                *Service
18559	project          string
18560	httpsHealthCheck string
18561	urlParams_       gensupport.URLParams
18562	ifNoneMatch_     string
18563	ctx_             context.Context
18564}
18565
18566// Get: Returns the specified HttpsHealthCheck resource. Get a list of
18567// available HTTPS health checks by making a list() request.
18568func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall {
18569	c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18570	c.project = project
18571	c.httpsHealthCheck = httpsHealthCheck
18572	return c
18573}
18574
18575// Fields allows partial responses to be retrieved. See
18576// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18577// for more information.
18578func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall {
18579	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18580	return c
18581}
18582
18583// IfNoneMatch sets the optional parameter which makes the operation
18584// fail if the object's ETag matches the given value. This is useful for
18585// getting updates only after the object has changed since the last
18586// request. Use googleapi.IsNotModified to check whether the response
18587// error from Do is the result of In-None-Match.
18588func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall {
18589	c.ifNoneMatch_ = entityTag
18590	return c
18591}
18592
18593// Context sets the context to be used in this call's Do method. Any
18594// pending HTTP request will be aborted if the provided context is
18595// canceled.
18596func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall {
18597	c.ctx_ = ctx
18598	return c
18599}
18600
18601func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
18602	var body io.Reader = nil
18603	c.urlParams_.Set("alt", alt)
18604	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
18605	urls += "?" + c.urlParams_.Encode()
18606	req, _ := http.NewRequest("GET", urls, body)
18607	googleapi.Expand(req.URL, map[string]string{
18608		"project":          c.project,
18609		"httpsHealthCheck": c.httpsHealthCheck,
18610	})
18611	req.Header.Set("User-Agent", c.s.userAgent())
18612	if c.ifNoneMatch_ != "" {
18613		req.Header.Set("If-None-Match", c.ifNoneMatch_)
18614	}
18615	if c.ctx_ != nil {
18616		return ctxhttp.Do(c.ctx_, c.s.client, req)
18617	}
18618	return c.s.client.Do(req)
18619}
18620
18621// Do executes the "compute.httpsHealthChecks.get" call.
18622// Exactly one of *HttpsHealthCheck or error will be non-nil. Any
18623// non-2xx status code is an error. Response headers are in either
18624// *HttpsHealthCheck.ServerResponse.Header or (if a response was
18625// returned at all) in error.(*googleapi.Error).Header. Use
18626// googleapi.IsNotModified to check whether the returned error was
18627// because http.StatusNotModified was returned.
18628func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, error) {
18629	gensupport.SetOptions(c.urlParams_, opts...)
18630	res, err := c.doRequest("json")
18631	if res != nil && res.StatusCode == http.StatusNotModified {
18632		if res.Body != nil {
18633			res.Body.Close()
18634		}
18635		return nil, &googleapi.Error{
18636			Code:   res.StatusCode,
18637			Header: res.Header,
18638		}
18639	}
18640	if err != nil {
18641		return nil, err
18642	}
18643	defer googleapi.CloseBody(res)
18644	if err := googleapi.CheckResponse(res); err != nil {
18645		return nil, err
18646	}
18647	ret := &HttpsHealthCheck{
18648		ServerResponse: googleapi.ServerResponse{
18649			Header:         res.Header,
18650			HTTPStatusCode: res.StatusCode,
18651		},
18652	}
18653	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18654		return nil, err
18655	}
18656	return ret, nil
18657	// {
18658	//   "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.",
18659	//   "httpMethod": "GET",
18660	//   "id": "compute.httpsHealthChecks.get",
18661	//   "parameterOrder": [
18662	//     "project",
18663	//     "httpsHealthCheck"
18664	//   ],
18665	//   "parameters": {
18666	//     "httpsHealthCheck": {
18667	//       "description": "Name of the HttpsHealthCheck resource to return.",
18668	//       "location": "path",
18669	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18670	//       "required": true,
18671	//       "type": "string"
18672	//     },
18673	//     "project": {
18674	//       "description": "Project ID for this request.",
18675	//       "location": "path",
18676	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18677	//       "required": true,
18678	//       "type": "string"
18679	//     }
18680	//   },
18681	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
18682	//   "response": {
18683	//     "$ref": "HttpsHealthCheck"
18684	//   },
18685	//   "scopes": [
18686	//     "https://www.googleapis.com/auth/cloud-platform",
18687	//     "https://www.googleapis.com/auth/compute",
18688	//     "https://www.googleapis.com/auth/compute.readonly"
18689	//   ]
18690	// }
18691
18692}
18693
18694// method id "compute.httpsHealthChecks.insert":
18695
18696type HttpsHealthChecksInsertCall struct {
18697	s                *Service
18698	project          string
18699	httpshealthcheck *HttpsHealthCheck
18700	urlParams_       gensupport.URLParams
18701	ctx_             context.Context
18702}
18703
18704// Insert: Creates a HttpsHealthCheck resource in the specified project
18705// using the data included in the request.
18706func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall {
18707	c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18708	c.project = project
18709	c.httpshealthcheck = httpshealthcheck
18710	return c
18711}
18712
18713// Fields allows partial responses to be retrieved. See
18714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18715// for more information.
18716func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall {
18717	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18718	return c
18719}
18720
18721// Context sets the context to be used in this call's Do method. Any
18722// pending HTTP request will be aborted if the provided context is
18723// canceled.
18724func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall {
18725	c.ctx_ = ctx
18726	return c
18727}
18728
18729func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
18730	var body io.Reader = nil
18731	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
18732	if err != nil {
18733		return nil, err
18734	}
18735	ctype := "application/json"
18736	c.urlParams_.Set("alt", alt)
18737	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks")
18738	urls += "?" + c.urlParams_.Encode()
18739	req, _ := http.NewRequest("POST", urls, body)
18740	googleapi.Expand(req.URL, map[string]string{
18741		"project": c.project,
18742	})
18743	req.Header.Set("Content-Type", ctype)
18744	req.Header.Set("User-Agent", c.s.userAgent())
18745	if c.ctx_ != nil {
18746		return ctxhttp.Do(c.ctx_, c.s.client, req)
18747	}
18748	return c.s.client.Do(req)
18749}
18750
18751// Do executes the "compute.httpsHealthChecks.insert" call.
18752// Exactly one of *Operation or error will be non-nil. Any non-2xx
18753// status code is an error. Response headers are in either
18754// *Operation.ServerResponse.Header or (if a response was returned at
18755// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18756// to check whether the returned error was because
18757// http.StatusNotModified was returned.
18758func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18759	gensupport.SetOptions(c.urlParams_, opts...)
18760	res, err := c.doRequest("json")
18761	if res != nil && res.StatusCode == http.StatusNotModified {
18762		if res.Body != nil {
18763			res.Body.Close()
18764		}
18765		return nil, &googleapi.Error{
18766			Code:   res.StatusCode,
18767			Header: res.Header,
18768		}
18769	}
18770	if err != nil {
18771		return nil, err
18772	}
18773	defer googleapi.CloseBody(res)
18774	if err := googleapi.CheckResponse(res); err != nil {
18775		return nil, err
18776	}
18777	ret := &Operation{
18778		ServerResponse: googleapi.ServerResponse{
18779			Header:         res.Header,
18780			HTTPStatusCode: res.StatusCode,
18781		},
18782	}
18783	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18784		return nil, err
18785	}
18786	return ret, nil
18787	// {
18788	//   "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.",
18789	//   "httpMethod": "POST",
18790	//   "id": "compute.httpsHealthChecks.insert",
18791	//   "parameterOrder": [
18792	//     "project"
18793	//   ],
18794	//   "parameters": {
18795	//     "project": {
18796	//       "description": "Project ID for this request.",
18797	//       "location": "path",
18798	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18799	//       "required": true,
18800	//       "type": "string"
18801	//     }
18802	//   },
18803	//   "path": "{project}/global/httpsHealthChecks",
18804	//   "request": {
18805	//     "$ref": "HttpsHealthCheck"
18806	//   },
18807	//   "response": {
18808	//     "$ref": "Operation"
18809	//   },
18810	//   "scopes": [
18811	//     "https://www.googleapis.com/auth/cloud-platform",
18812	//     "https://www.googleapis.com/auth/compute"
18813	//   ]
18814	// }
18815
18816}
18817
18818// method id "compute.httpsHealthChecks.list":
18819
18820type HttpsHealthChecksListCall struct {
18821	s            *Service
18822	project      string
18823	urlParams_   gensupport.URLParams
18824	ifNoneMatch_ string
18825	ctx_         context.Context
18826}
18827
18828// List: Retrieves the list of HttpsHealthCheck resources available to
18829// the specified project.
18830func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall {
18831	c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18832	c.project = project
18833	return c
18834}
18835
18836// Filter sets the optional parameter "filter": Sets a filter expression
18837// for filtering listed resources, in the form filter={expression}. Your
18838// {expression} must be in the format: field_name comparison_string
18839// literal_string.
18840//
18841// The field_name is the name of the field you want to compare. Only
18842// atomic field types are supported (string, number, boolean). The
18843// comparison_string must be either eq (equals) or ne (not equals). The
18844// literal_string is the string value to filter to. The literal value
18845// must be valid for the type of field you are filtering by (string,
18846// number, boolean). For string fields, the literal value is interpreted
18847// as a regular expression using RE2 syntax. The literal value must
18848// match the entire field.
18849//
18850// For example, to filter for instances that do not have a name of
18851// example-instance, you would use filter=name ne
18852// example-instance.
18853//
18854// Compute Engine Beta API Only: If you use filtering in the Beta API,
18855// you can also filter on nested fields. For example, you could filter
18856// on instances that have set the scheduling.automaticRestart field to
18857// true. In particular, use filtering on nested fields to take advantage
18858// of instance labels to organize and filter results based on label
18859// values.
18860//
18861// The Beta API also supports filtering on multiple expressions by
18862// providing each separate expression within parentheses. For example,
18863// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
18864// Multiple expressions are treated as AND expressions, meaning that
18865// resources must match all expressions to pass the filters.
18866func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall {
18867	c.urlParams_.Set("filter", filter)
18868	return c
18869}
18870
18871// MaxResults sets the optional parameter "maxResults": The maximum
18872// number of results per page that should be returned. If the number of
18873// available results is larger than maxResults, Compute Engine returns a
18874// nextPageToken that can be used to get the next page of results in
18875// subsequent list requests.
18876func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall {
18877	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18878	return c
18879}
18880
18881// PageToken sets the optional parameter "pageToken": Specifies a page
18882// token to use. Set pageToken to the nextPageToken returned by a
18883// previous list request to get the next page of results.
18884func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall {
18885	c.urlParams_.Set("pageToken", pageToken)
18886	return c
18887}
18888
18889// Fields allows partial responses to be retrieved. See
18890// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18891// for more information.
18892func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall {
18893	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18894	return c
18895}
18896
18897// IfNoneMatch sets the optional parameter which makes the operation
18898// fail if the object's ETag matches the given value. This is useful for
18899// getting updates only after the object has changed since the last
18900// request. Use googleapi.IsNotModified to check whether the response
18901// error from Do is the result of In-None-Match.
18902func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall {
18903	c.ifNoneMatch_ = entityTag
18904	return c
18905}
18906
18907// Context sets the context to be used in this call's Do method. Any
18908// pending HTTP request will be aborted if the provided context is
18909// canceled.
18910func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall {
18911	c.ctx_ = ctx
18912	return c
18913}
18914
18915func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) {
18916	var body io.Reader = nil
18917	c.urlParams_.Set("alt", alt)
18918	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks")
18919	urls += "?" + c.urlParams_.Encode()
18920	req, _ := http.NewRequest("GET", urls, body)
18921	googleapi.Expand(req.URL, map[string]string{
18922		"project": c.project,
18923	})
18924	req.Header.Set("User-Agent", c.s.userAgent())
18925	if c.ifNoneMatch_ != "" {
18926		req.Header.Set("If-None-Match", c.ifNoneMatch_)
18927	}
18928	if c.ctx_ != nil {
18929		return ctxhttp.Do(c.ctx_, c.s.client, req)
18930	}
18931	return c.s.client.Do(req)
18932}
18933
18934// Do executes the "compute.httpsHealthChecks.list" call.
18935// Exactly one of *HttpsHealthCheckList or error will be non-nil. Any
18936// non-2xx status code is an error. Response headers are in either
18937// *HttpsHealthCheckList.ServerResponse.Header or (if a response was
18938// returned at all) in error.(*googleapi.Error).Header. Use
18939// googleapi.IsNotModified to check whether the returned error was
18940// because http.StatusNotModified was returned.
18941func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, error) {
18942	gensupport.SetOptions(c.urlParams_, opts...)
18943	res, err := c.doRequest("json")
18944	if res != nil && res.StatusCode == http.StatusNotModified {
18945		if res.Body != nil {
18946			res.Body.Close()
18947		}
18948		return nil, &googleapi.Error{
18949			Code:   res.StatusCode,
18950			Header: res.Header,
18951		}
18952	}
18953	if err != nil {
18954		return nil, err
18955	}
18956	defer googleapi.CloseBody(res)
18957	if err := googleapi.CheckResponse(res); err != nil {
18958		return nil, err
18959	}
18960	ret := &HttpsHealthCheckList{
18961		ServerResponse: googleapi.ServerResponse{
18962			Header:         res.Header,
18963			HTTPStatusCode: res.StatusCode,
18964		},
18965	}
18966	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18967		return nil, err
18968	}
18969	return ret, nil
18970	// {
18971	//   "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.",
18972	//   "httpMethod": "GET",
18973	//   "id": "compute.httpsHealthChecks.list",
18974	//   "parameterOrder": [
18975	//     "project"
18976	//   ],
18977	//   "parameters": {
18978	//     "filter": {
18979	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
18980	//       "location": "query",
18981	//       "type": "string"
18982	//     },
18983	//     "maxResults": {
18984	//       "default": "500",
18985	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
18986	//       "format": "uint32",
18987	//       "location": "query",
18988	//       "maximum": "500",
18989	//       "minimum": "0",
18990	//       "type": "integer"
18991	//     },
18992	//     "pageToken": {
18993	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
18994	//       "location": "query",
18995	//       "type": "string"
18996	//     },
18997	//     "project": {
18998	//       "description": "Project ID for this request.",
18999	//       "location": "path",
19000	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19001	//       "required": true,
19002	//       "type": "string"
19003	//     }
19004	//   },
19005	//   "path": "{project}/global/httpsHealthChecks",
19006	//   "response": {
19007	//     "$ref": "HttpsHealthCheckList"
19008	//   },
19009	//   "scopes": [
19010	//     "https://www.googleapis.com/auth/cloud-platform",
19011	//     "https://www.googleapis.com/auth/compute",
19012	//     "https://www.googleapis.com/auth/compute.readonly"
19013	//   ]
19014	// }
19015
19016}
19017
19018// Pages invokes f for each page of results.
19019// A non-nil error returned from f will halt the iteration.
19020// The provided context supersedes any context provided to the Context method.
19021func (c *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) error) error {
19022	c.ctx_ = ctx
19023	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19024	for {
19025		x, err := c.Do()
19026		if err != nil {
19027			return err
19028		}
19029		if err := f(x); err != nil {
19030			return err
19031		}
19032		if x.NextPageToken == "" {
19033			return nil
19034		}
19035		c.PageToken(x.NextPageToken)
19036	}
19037}
19038
19039// method id "compute.httpsHealthChecks.patch":
19040
19041type HttpsHealthChecksPatchCall struct {
19042	s                *Service
19043	project          string
19044	httpsHealthCheck string
19045	httpshealthcheck *HttpsHealthCheck
19046	urlParams_       gensupport.URLParams
19047	ctx_             context.Context
19048}
19049
19050// Patch: Updates a HttpsHealthCheck resource in the specified project
19051// using the data included in the request. This method supports patch
19052// semantics.
19053func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall {
19054	c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19055	c.project = project
19056	c.httpsHealthCheck = httpsHealthCheck
19057	c.httpshealthcheck = httpshealthcheck
19058	return c
19059}
19060
19061// Fields allows partial responses to be retrieved. See
19062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19063// for more information.
19064func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall {
19065	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19066	return c
19067}
19068
19069// Context sets the context to be used in this call's Do method. Any
19070// pending HTTP request will be aborted if the provided context is
19071// canceled.
19072func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall {
19073	c.ctx_ = ctx
19074	return c
19075}
19076
19077func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
19078	var body io.Reader = nil
19079	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
19080	if err != nil {
19081		return nil, err
19082	}
19083	ctype := "application/json"
19084	c.urlParams_.Set("alt", alt)
19085	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
19086	urls += "?" + c.urlParams_.Encode()
19087	req, _ := http.NewRequest("PATCH", urls, body)
19088	googleapi.Expand(req.URL, map[string]string{
19089		"project":          c.project,
19090		"httpsHealthCheck": c.httpsHealthCheck,
19091	})
19092	req.Header.Set("Content-Type", ctype)
19093	req.Header.Set("User-Agent", c.s.userAgent())
19094	if c.ctx_ != nil {
19095		return ctxhttp.Do(c.ctx_, c.s.client, req)
19096	}
19097	return c.s.client.Do(req)
19098}
19099
19100// Do executes the "compute.httpsHealthChecks.patch" call.
19101// Exactly one of *Operation or error will be non-nil. Any non-2xx
19102// status code is an error. Response headers are in either
19103// *Operation.ServerResponse.Header or (if a response was returned at
19104// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19105// to check whether the returned error was because
19106// http.StatusNotModified was returned.
19107func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19108	gensupport.SetOptions(c.urlParams_, opts...)
19109	res, err := c.doRequest("json")
19110	if res != nil && res.StatusCode == http.StatusNotModified {
19111		if res.Body != nil {
19112			res.Body.Close()
19113		}
19114		return nil, &googleapi.Error{
19115			Code:   res.StatusCode,
19116			Header: res.Header,
19117		}
19118	}
19119	if err != nil {
19120		return nil, err
19121	}
19122	defer googleapi.CloseBody(res)
19123	if err := googleapi.CheckResponse(res); err != nil {
19124		return nil, err
19125	}
19126	ret := &Operation{
19127		ServerResponse: googleapi.ServerResponse{
19128			Header:         res.Header,
19129			HTTPStatusCode: res.StatusCode,
19130		},
19131	}
19132	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19133		return nil, err
19134	}
19135	return ret, nil
19136	// {
19137	//   "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.",
19138	//   "httpMethod": "PATCH",
19139	//   "id": "compute.httpsHealthChecks.patch",
19140	//   "parameterOrder": [
19141	//     "project",
19142	//     "httpsHealthCheck"
19143	//   ],
19144	//   "parameters": {
19145	//     "httpsHealthCheck": {
19146	//       "description": "Name of the HttpsHealthCheck resource to update.",
19147	//       "location": "path",
19148	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19149	//       "required": true,
19150	//       "type": "string"
19151	//     },
19152	//     "project": {
19153	//       "description": "Project ID for this request.",
19154	//       "location": "path",
19155	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19156	//       "required": true,
19157	//       "type": "string"
19158	//     }
19159	//   },
19160	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
19161	//   "request": {
19162	//     "$ref": "HttpsHealthCheck"
19163	//   },
19164	//   "response": {
19165	//     "$ref": "Operation"
19166	//   },
19167	//   "scopes": [
19168	//     "https://www.googleapis.com/auth/cloud-platform",
19169	//     "https://www.googleapis.com/auth/compute"
19170	//   ]
19171	// }
19172
19173}
19174
19175// method id "compute.httpsHealthChecks.update":
19176
19177type HttpsHealthChecksUpdateCall struct {
19178	s                *Service
19179	project          string
19180	httpsHealthCheck string
19181	httpshealthcheck *HttpsHealthCheck
19182	urlParams_       gensupport.URLParams
19183	ctx_             context.Context
19184}
19185
19186// Update: Updates a HttpsHealthCheck resource in the specified project
19187// using the data included in the request.
19188func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall {
19189	c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19190	c.project = project
19191	c.httpsHealthCheck = httpsHealthCheck
19192	c.httpshealthcheck = httpshealthcheck
19193	return c
19194}
19195
19196// Fields allows partial responses to be retrieved. See
19197// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19198// for more information.
19199func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall {
19200	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19201	return c
19202}
19203
19204// Context sets the context to be used in this call's Do method. Any
19205// pending HTTP request will be aborted if the provided context is
19206// canceled.
19207func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall {
19208	c.ctx_ = ctx
19209	return c
19210}
19211
19212func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
19213	var body io.Reader = nil
19214	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
19215	if err != nil {
19216		return nil, err
19217	}
19218	ctype := "application/json"
19219	c.urlParams_.Set("alt", alt)
19220	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
19221	urls += "?" + c.urlParams_.Encode()
19222	req, _ := http.NewRequest("PUT", urls, body)
19223	googleapi.Expand(req.URL, map[string]string{
19224		"project":          c.project,
19225		"httpsHealthCheck": c.httpsHealthCheck,
19226	})
19227	req.Header.Set("Content-Type", ctype)
19228	req.Header.Set("User-Agent", c.s.userAgent())
19229	if c.ctx_ != nil {
19230		return ctxhttp.Do(c.ctx_, c.s.client, req)
19231	}
19232	return c.s.client.Do(req)
19233}
19234
19235// Do executes the "compute.httpsHealthChecks.update" call.
19236// Exactly one of *Operation or error will be non-nil. Any non-2xx
19237// status code is an error. Response headers are in either
19238// *Operation.ServerResponse.Header or (if a response was returned at
19239// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19240// to check whether the returned error was because
19241// http.StatusNotModified was returned.
19242func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19243	gensupport.SetOptions(c.urlParams_, opts...)
19244	res, err := c.doRequest("json")
19245	if res != nil && res.StatusCode == http.StatusNotModified {
19246		if res.Body != nil {
19247			res.Body.Close()
19248		}
19249		return nil, &googleapi.Error{
19250			Code:   res.StatusCode,
19251			Header: res.Header,
19252		}
19253	}
19254	if err != nil {
19255		return nil, err
19256	}
19257	defer googleapi.CloseBody(res)
19258	if err := googleapi.CheckResponse(res); err != nil {
19259		return nil, err
19260	}
19261	ret := &Operation{
19262		ServerResponse: googleapi.ServerResponse{
19263			Header:         res.Header,
19264			HTTPStatusCode: res.StatusCode,
19265		},
19266	}
19267	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19268		return nil, err
19269	}
19270	return ret, nil
19271	// {
19272	//   "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.",
19273	//   "httpMethod": "PUT",
19274	//   "id": "compute.httpsHealthChecks.update",
19275	//   "parameterOrder": [
19276	//     "project",
19277	//     "httpsHealthCheck"
19278	//   ],
19279	//   "parameters": {
19280	//     "httpsHealthCheck": {
19281	//       "description": "Name of the HttpsHealthCheck resource to update.",
19282	//       "location": "path",
19283	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19284	//       "required": true,
19285	//       "type": "string"
19286	//     },
19287	//     "project": {
19288	//       "description": "Project ID for this request.",
19289	//       "location": "path",
19290	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19291	//       "required": true,
19292	//       "type": "string"
19293	//     }
19294	//   },
19295	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
19296	//   "request": {
19297	//     "$ref": "HttpsHealthCheck"
19298	//   },
19299	//   "response": {
19300	//     "$ref": "Operation"
19301	//   },
19302	//   "scopes": [
19303	//     "https://www.googleapis.com/auth/cloud-platform",
19304	//     "https://www.googleapis.com/auth/compute"
19305	//   ]
19306	// }
19307
19308}
19309
19310// method id "compute.images.delete":
19311
19312type ImagesDeleteCall struct {
19313	s          *Service
19314	project    string
19315	image      string
19316	urlParams_ gensupport.URLParams
19317	ctx_       context.Context
19318}
19319
19320// Delete: Deletes the specified image.
19321// For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete
19322func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall {
19323	c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19324	c.project = project
19325	c.image = image
19326	return c
19327}
19328
19329// Fields allows partial responses to be retrieved. See
19330// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19331// for more information.
19332func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall {
19333	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19334	return c
19335}
19336
19337// Context sets the context to be used in this call's Do method. Any
19338// pending HTTP request will be aborted if the provided context is
19339// canceled.
19340func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall {
19341	c.ctx_ = ctx
19342	return c
19343}
19344
19345func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) {
19346	var body io.Reader = nil
19347	c.urlParams_.Set("alt", alt)
19348	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}")
19349	urls += "?" + c.urlParams_.Encode()
19350	req, _ := http.NewRequest("DELETE", urls, body)
19351	googleapi.Expand(req.URL, map[string]string{
19352		"project": c.project,
19353		"image":   c.image,
19354	})
19355	req.Header.Set("User-Agent", c.s.userAgent())
19356	if c.ctx_ != nil {
19357		return ctxhttp.Do(c.ctx_, c.s.client, req)
19358	}
19359	return c.s.client.Do(req)
19360}
19361
19362// Do executes the "compute.images.delete" call.
19363// Exactly one of *Operation or error will be non-nil. Any non-2xx
19364// status code is an error. Response headers are in either
19365// *Operation.ServerResponse.Header or (if a response was returned at
19366// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19367// to check whether the returned error was because
19368// http.StatusNotModified was returned.
19369func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19370	gensupport.SetOptions(c.urlParams_, opts...)
19371	res, err := c.doRequest("json")
19372	if res != nil && res.StatusCode == http.StatusNotModified {
19373		if res.Body != nil {
19374			res.Body.Close()
19375		}
19376		return nil, &googleapi.Error{
19377			Code:   res.StatusCode,
19378			Header: res.Header,
19379		}
19380	}
19381	if err != nil {
19382		return nil, err
19383	}
19384	defer googleapi.CloseBody(res)
19385	if err := googleapi.CheckResponse(res); err != nil {
19386		return nil, err
19387	}
19388	ret := &Operation{
19389		ServerResponse: googleapi.ServerResponse{
19390			Header:         res.Header,
19391			HTTPStatusCode: res.StatusCode,
19392		},
19393	}
19394	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19395		return nil, err
19396	}
19397	return ret, nil
19398	// {
19399	//   "description": "Deletes the specified image.",
19400	//   "httpMethod": "DELETE",
19401	//   "id": "compute.images.delete",
19402	//   "parameterOrder": [
19403	//     "project",
19404	//     "image"
19405	//   ],
19406	//   "parameters": {
19407	//     "image": {
19408	//       "description": "Name of the image resource to delete.",
19409	//       "location": "path",
19410	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19411	//       "required": true,
19412	//       "type": "string"
19413	//     },
19414	//     "project": {
19415	//       "description": "Project ID for this request.",
19416	//       "location": "path",
19417	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19418	//       "required": true,
19419	//       "type": "string"
19420	//     }
19421	//   },
19422	//   "path": "{project}/global/images/{image}",
19423	//   "response": {
19424	//     "$ref": "Operation"
19425	//   },
19426	//   "scopes": [
19427	//     "https://www.googleapis.com/auth/cloud-platform",
19428	//     "https://www.googleapis.com/auth/compute"
19429	//   ]
19430	// }
19431
19432}
19433
19434// method id "compute.images.deprecate":
19435
19436type ImagesDeprecateCall struct {
19437	s                 *Service
19438	project           string
19439	image             string
19440	deprecationstatus *DeprecationStatus
19441	urlParams_        gensupport.URLParams
19442	ctx_              context.Context
19443}
19444
19445// Deprecate: Sets the deprecation status of an image.
19446//
19447// If an empty request body is given, clears the deprecation status
19448// instead.
19449// For details, see https://cloud.google.com/compute/docs/reference/latest/images/deprecate
19450func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall {
19451	c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19452	c.project = project
19453	c.image = image
19454	c.deprecationstatus = deprecationstatus
19455	return c
19456}
19457
19458// Fields allows partial responses to be retrieved. See
19459// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19460// for more information.
19461func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall {
19462	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19463	return c
19464}
19465
19466// Context sets the context to be used in this call's Do method. Any
19467// pending HTTP request will be aborted if the provided context is
19468// canceled.
19469func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall {
19470	c.ctx_ = ctx
19471	return c
19472}
19473
19474func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) {
19475	var body io.Reader = nil
19476	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus)
19477	if err != nil {
19478		return nil, err
19479	}
19480	ctype := "application/json"
19481	c.urlParams_.Set("alt", alt)
19482	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate")
19483	urls += "?" + c.urlParams_.Encode()
19484	req, _ := http.NewRequest("POST", urls, body)
19485	googleapi.Expand(req.URL, map[string]string{
19486		"project": c.project,
19487		"image":   c.image,
19488	})
19489	req.Header.Set("Content-Type", ctype)
19490	req.Header.Set("User-Agent", c.s.userAgent())
19491	if c.ctx_ != nil {
19492		return ctxhttp.Do(c.ctx_, c.s.client, req)
19493	}
19494	return c.s.client.Do(req)
19495}
19496
19497// Do executes the "compute.images.deprecate" call.
19498// Exactly one of *Operation or error will be non-nil. Any non-2xx
19499// status code is an error. Response headers are in either
19500// *Operation.ServerResponse.Header or (if a response was returned at
19501// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19502// to check whether the returned error was because
19503// http.StatusNotModified was returned.
19504func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19505	gensupport.SetOptions(c.urlParams_, opts...)
19506	res, err := c.doRequest("json")
19507	if res != nil && res.StatusCode == http.StatusNotModified {
19508		if res.Body != nil {
19509			res.Body.Close()
19510		}
19511		return nil, &googleapi.Error{
19512			Code:   res.StatusCode,
19513			Header: res.Header,
19514		}
19515	}
19516	if err != nil {
19517		return nil, err
19518	}
19519	defer googleapi.CloseBody(res)
19520	if err := googleapi.CheckResponse(res); err != nil {
19521		return nil, err
19522	}
19523	ret := &Operation{
19524		ServerResponse: googleapi.ServerResponse{
19525			Header:         res.Header,
19526			HTTPStatusCode: res.StatusCode,
19527		},
19528	}
19529	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19530		return nil, err
19531	}
19532	return ret, nil
19533	// {
19534	//   "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.",
19535	//   "httpMethod": "POST",
19536	//   "id": "compute.images.deprecate",
19537	//   "parameterOrder": [
19538	//     "project",
19539	//     "image"
19540	//   ],
19541	//   "parameters": {
19542	//     "image": {
19543	//       "description": "Image name.",
19544	//       "location": "path",
19545	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19546	//       "required": true,
19547	//       "type": "string"
19548	//     },
19549	//     "project": {
19550	//       "description": "Project ID for this request.",
19551	//       "location": "path",
19552	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19553	//       "required": true,
19554	//       "type": "string"
19555	//     }
19556	//   },
19557	//   "path": "{project}/global/images/{image}/deprecate",
19558	//   "request": {
19559	//     "$ref": "DeprecationStatus"
19560	//   },
19561	//   "response": {
19562	//     "$ref": "Operation"
19563	//   },
19564	//   "scopes": [
19565	//     "https://www.googleapis.com/auth/cloud-platform",
19566	//     "https://www.googleapis.com/auth/compute"
19567	//   ]
19568	// }
19569
19570}
19571
19572// method id "compute.images.get":
19573
19574type ImagesGetCall struct {
19575	s            *Service
19576	project      string
19577	image        string
19578	urlParams_   gensupport.URLParams
19579	ifNoneMatch_ string
19580	ctx_         context.Context
19581}
19582
19583// Get: Returns the specified image. Get a list of available images by
19584// making a list() request.
19585// For details, see https://cloud.google.com/compute/docs/reference/latest/images/get
19586func (r *ImagesService) Get(project string, image string) *ImagesGetCall {
19587	c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19588	c.project = project
19589	c.image = image
19590	return c
19591}
19592
19593// Fields allows partial responses to be retrieved. See
19594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19595// for more information.
19596func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall {
19597	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19598	return c
19599}
19600
19601// IfNoneMatch sets the optional parameter which makes the operation
19602// fail if the object's ETag matches the given value. This is useful for
19603// getting updates only after the object has changed since the last
19604// request. Use googleapi.IsNotModified to check whether the response
19605// error from Do is the result of In-None-Match.
19606func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall {
19607	c.ifNoneMatch_ = entityTag
19608	return c
19609}
19610
19611// Context sets the context to be used in this call's Do method. Any
19612// pending HTTP request will be aborted if the provided context is
19613// canceled.
19614func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall {
19615	c.ctx_ = ctx
19616	return c
19617}
19618
19619func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) {
19620	var body io.Reader = nil
19621	c.urlParams_.Set("alt", alt)
19622	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}")
19623	urls += "?" + c.urlParams_.Encode()
19624	req, _ := http.NewRequest("GET", urls, body)
19625	googleapi.Expand(req.URL, map[string]string{
19626		"project": c.project,
19627		"image":   c.image,
19628	})
19629	req.Header.Set("User-Agent", c.s.userAgent())
19630	if c.ifNoneMatch_ != "" {
19631		req.Header.Set("If-None-Match", c.ifNoneMatch_)
19632	}
19633	if c.ctx_ != nil {
19634		return ctxhttp.Do(c.ctx_, c.s.client, req)
19635	}
19636	return c.s.client.Do(req)
19637}
19638
19639// Do executes the "compute.images.get" call.
19640// Exactly one of *Image or error will be non-nil. Any non-2xx status
19641// code is an error. Response headers are in either
19642// *Image.ServerResponse.Header or (if a response was returned at all)
19643// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19644// check whether the returned error was because http.StatusNotModified
19645// was returned.
19646func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) {
19647	gensupport.SetOptions(c.urlParams_, opts...)
19648	res, err := c.doRequest("json")
19649	if res != nil && res.StatusCode == http.StatusNotModified {
19650		if res.Body != nil {
19651			res.Body.Close()
19652		}
19653		return nil, &googleapi.Error{
19654			Code:   res.StatusCode,
19655			Header: res.Header,
19656		}
19657	}
19658	if err != nil {
19659		return nil, err
19660	}
19661	defer googleapi.CloseBody(res)
19662	if err := googleapi.CheckResponse(res); err != nil {
19663		return nil, err
19664	}
19665	ret := &Image{
19666		ServerResponse: googleapi.ServerResponse{
19667			Header:         res.Header,
19668			HTTPStatusCode: res.StatusCode,
19669		},
19670	}
19671	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19672		return nil, err
19673	}
19674	return ret, nil
19675	// {
19676	//   "description": "Returns the specified image. Get a list of available images by making a list() request.",
19677	//   "httpMethod": "GET",
19678	//   "id": "compute.images.get",
19679	//   "parameterOrder": [
19680	//     "project",
19681	//     "image"
19682	//   ],
19683	//   "parameters": {
19684	//     "image": {
19685	//       "description": "Name of the image resource to return.",
19686	//       "location": "path",
19687	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19688	//       "required": true,
19689	//       "type": "string"
19690	//     },
19691	//     "project": {
19692	//       "description": "Project ID for this request.",
19693	//       "location": "path",
19694	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19695	//       "required": true,
19696	//       "type": "string"
19697	//     }
19698	//   },
19699	//   "path": "{project}/global/images/{image}",
19700	//   "response": {
19701	//     "$ref": "Image"
19702	//   },
19703	//   "scopes": [
19704	//     "https://www.googleapis.com/auth/cloud-platform",
19705	//     "https://www.googleapis.com/auth/compute",
19706	//     "https://www.googleapis.com/auth/compute.readonly"
19707	//   ]
19708	// }
19709
19710}
19711
19712// method id "compute.images.insert":
19713
19714type ImagesInsertCall struct {
19715	s          *Service
19716	project    string
19717	image      *Image
19718	urlParams_ gensupport.URLParams
19719	ctx_       context.Context
19720}
19721
19722// Insert: Creates an image in the specified project using the data
19723// included in the request.
19724// For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert
19725func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall {
19726	c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19727	c.project = project
19728	c.image = image
19729	return c
19730}
19731
19732// Fields allows partial responses to be retrieved. See
19733// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19734// for more information.
19735func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall {
19736	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19737	return c
19738}
19739
19740// Context sets the context to be used in this call's Do method. Any
19741// pending HTTP request will be aborted if the provided context is
19742// canceled.
19743func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall {
19744	c.ctx_ = ctx
19745	return c
19746}
19747
19748func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) {
19749	var body io.Reader = nil
19750	body, err := googleapi.WithoutDataWrapper.JSONReader(c.image)
19751	if err != nil {
19752		return nil, err
19753	}
19754	ctype := "application/json"
19755	c.urlParams_.Set("alt", alt)
19756	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images")
19757	urls += "?" + c.urlParams_.Encode()
19758	req, _ := http.NewRequest("POST", urls, body)
19759	googleapi.Expand(req.URL, map[string]string{
19760		"project": c.project,
19761	})
19762	req.Header.Set("Content-Type", ctype)
19763	req.Header.Set("User-Agent", c.s.userAgent())
19764	if c.ctx_ != nil {
19765		return ctxhttp.Do(c.ctx_, c.s.client, req)
19766	}
19767	return c.s.client.Do(req)
19768}
19769
19770// Do executes the "compute.images.insert" call.
19771// Exactly one of *Operation or error will be non-nil. Any non-2xx
19772// status code is an error. Response headers are in either
19773// *Operation.ServerResponse.Header or (if a response was returned at
19774// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19775// to check whether the returned error was because
19776// http.StatusNotModified was returned.
19777func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19778	gensupport.SetOptions(c.urlParams_, opts...)
19779	res, err := c.doRequest("json")
19780	if res != nil && res.StatusCode == http.StatusNotModified {
19781		if res.Body != nil {
19782			res.Body.Close()
19783		}
19784		return nil, &googleapi.Error{
19785			Code:   res.StatusCode,
19786			Header: res.Header,
19787		}
19788	}
19789	if err != nil {
19790		return nil, err
19791	}
19792	defer googleapi.CloseBody(res)
19793	if err := googleapi.CheckResponse(res); err != nil {
19794		return nil, err
19795	}
19796	ret := &Operation{
19797		ServerResponse: googleapi.ServerResponse{
19798			Header:         res.Header,
19799			HTTPStatusCode: res.StatusCode,
19800		},
19801	}
19802	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19803		return nil, err
19804	}
19805	return ret, nil
19806	// {
19807	//   "description": "Creates an image in the specified project using the data included in the request.",
19808	//   "httpMethod": "POST",
19809	//   "id": "compute.images.insert",
19810	//   "parameterOrder": [
19811	//     "project"
19812	//   ],
19813	//   "parameters": {
19814	//     "project": {
19815	//       "description": "Project ID for this request.",
19816	//       "location": "path",
19817	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19818	//       "required": true,
19819	//       "type": "string"
19820	//     }
19821	//   },
19822	//   "path": "{project}/global/images",
19823	//   "request": {
19824	//     "$ref": "Image"
19825	//   },
19826	//   "response": {
19827	//     "$ref": "Operation"
19828	//   },
19829	//   "scopes": [
19830	//     "https://www.googleapis.com/auth/cloud-platform",
19831	//     "https://www.googleapis.com/auth/compute",
19832	//     "https://www.googleapis.com/auth/devstorage.full_control",
19833	//     "https://www.googleapis.com/auth/devstorage.read_only",
19834	//     "https://www.googleapis.com/auth/devstorage.read_write"
19835	//   ]
19836	// }
19837
19838}
19839
19840// method id "compute.images.list":
19841
19842type ImagesListCall struct {
19843	s            *Service
19844	project      string
19845	urlParams_   gensupport.URLParams
19846	ifNoneMatch_ string
19847	ctx_         context.Context
19848}
19849
19850// List: Retrieves the list of private images available to the specified
19851// project. Private images are images you create that belong to your
19852// project. This method does not get any images that belong to other
19853// projects, including publicly-available images, like Debian 7. If you
19854// want to get a list of publicly-available images, use this method to
19855// make a request to the respective image project, such as debian-cloud
19856// or windows-cloud.
19857//
19858// See Accessing images for more information.
19859// For details, see https://cloud.google.com/compute/docs/reference/latest/images/list
19860func (r *ImagesService) List(project string) *ImagesListCall {
19861	c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19862	c.project = project
19863	return c
19864}
19865
19866// Filter sets the optional parameter "filter": Sets a filter expression
19867// for filtering listed resources, in the form filter={expression}. Your
19868// {expression} must be in the format: field_name comparison_string
19869// literal_string.
19870//
19871// The field_name is the name of the field you want to compare. Only
19872// atomic field types are supported (string, number, boolean). The
19873// comparison_string must be either eq (equals) or ne (not equals). The
19874// literal_string is the string value to filter to. The literal value
19875// must be valid for the type of field you are filtering by (string,
19876// number, boolean). For string fields, the literal value is interpreted
19877// as a regular expression using RE2 syntax. The literal value must
19878// match the entire field.
19879//
19880// For example, to filter for instances that do not have a name of
19881// example-instance, you would use filter=name ne
19882// example-instance.
19883//
19884// Compute Engine Beta API Only: If you use filtering in the Beta API,
19885// you can also filter on nested fields. For example, you could filter
19886// on instances that have set the scheduling.automaticRestart field to
19887// true. In particular, use filtering on nested fields to take advantage
19888// of instance labels to organize and filter results based on label
19889// values.
19890//
19891// The Beta API also supports filtering on multiple expressions by
19892// providing each separate expression within parentheses. For example,
19893// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
19894// Multiple expressions are treated as AND expressions, meaning that
19895// resources must match all expressions to pass the filters.
19896func (c *ImagesListCall) Filter(filter string) *ImagesListCall {
19897	c.urlParams_.Set("filter", filter)
19898	return c
19899}
19900
19901// MaxResults sets the optional parameter "maxResults": The maximum
19902// number of results per page that should be returned. If the number of
19903// available results is larger than maxResults, Compute Engine returns a
19904// nextPageToken that can be used to get the next page of results in
19905// subsequent list requests.
19906func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall {
19907	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19908	return c
19909}
19910
19911// PageToken sets the optional parameter "pageToken": Specifies a page
19912// token to use. Set pageToken to the nextPageToken returned by a
19913// previous list request to get the next page of results.
19914func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall {
19915	c.urlParams_.Set("pageToken", pageToken)
19916	return c
19917}
19918
19919// Fields allows partial responses to be retrieved. See
19920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19921// for more information.
19922func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall {
19923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19924	return c
19925}
19926
19927// IfNoneMatch sets the optional parameter which makes the operation
19928// fail if the object's ETag matches the given value. This is useful for
19929// getting updates only after the object has changed since the last
19930// request. Use googleapi.IsNotModified to check whether the response
19931// error from Do is the result of In-None-Match.
19932func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall {
19933	c.ifNoneMatch_ = entityTag
19934	return c
19935}
19936
19937// Context sets the context to be used in this call's Do method. Any
19938// pending HTTP request will be aborted if the provided context is
19939// canceled.
19940func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall {
19941	c.ctx_ = ctx
19942	return c
19943}
19944
19945func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) {
19946	var body io.Reader = nil
19947	c.urlParams_.Set("alt", alt)
19948	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images")
19949	urls += "?" + c.urlParams_.Encode()
19950	req, _ := http.NewRequest("GET", urls, body)
19951	googleapi.Expand(req.URL, map[string]string{
19952		"project": c.project,
19953	})
19954	req.Header.Set("User-Agent", c.s.userAgent())
19955	if c.ifNoneMatch_ != "" {
19956		req.Header.Set("If-None-Match", c.ifNoneMatch_)
19957	}
19958	if c.ctx_ != nil {
19959		return ctxhttp.Do(c.ctx_, c.s.client, req)
19960	}
19961	return c.s.client.Do(req)
19962}
19963
19964// Do executes the "compute.images.list" call.
19965// Exactly one of *ImageList or error will be non-nil. Any non-2xx
19966// status code is an error. Response headers are in either
19967// *ImageList.ServerResponse.Header or (if a response was returned at
19968// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19969// to check whether the returned error was because
19970// http.StatusNotModified was returned.
19971func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) {
19972	gensupport.SetOptions(c.urlParams_, opts...)
19973	res, err := c.doRequest("json")
19974	if res != nil && res.StatusCode == http.StatusNotModified {
19975		if res.Body != nil {
19976			res.Body.Close()
19977		}
19978		return nil, &googleapi.Error{
19979			Code:   res.StatusCode,
19980			Header: res.Header,
19981		}
19982	}
19983	if err != nil {
19984		return nil, err
19985	}
19986	defer googleapi.CloseBody(res)
19987	if err := googleapi.CheckResponse(res); err != nil {
19988		return nil, err
19989	}
19990	ret := &ImageList{
19991		ServerResponse: googleapi.ServerResponse{
19992			Header:         res.Header,
19993			HTTPStatusCode: res.StatusCode,
19994		},
19995	}
19996	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19997		return nil, err
19998	}
19999	return ret, nil
20000	// {
20001	//   "description": "Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 7. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.\n\nSee Accessing images for more information.",
20002	//   "httpMethod": "GET",
20003	//   "id": "compute.images.list",
20004	//   "parameterOrder": [
20005	//     "project"
20006	//   ],
20007	//   "parameters": {
20008	//     "filter": {
20009	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
20010	//       "location": "query",
20011	//       "type": "string"
20012	//     },
20013	//     "maxResults": {
20014	//       "default": "500",
20015	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
20016	//       "format": "uint32",
20017	//       "location": "query",
20018	//       "maximum": "500",
20019	//       "minimum": "0",
20020	//       "type": "integer"
20021	//     },
20022	//     "pageToken": {
20023	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
20024	//       "location": "query",
20025	//       "type": "string"
20026	//     },
20027	//     "project": {
20028	//       "description": "Project ID for this request.",
20029	//       "location": "path",
20030	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20031	//       "required": true,
20032	//       "type": "string"
20033	//     }
20034	//   },
20035	//   "path": "{project}/global/images",
20036	//   "response": {
20037	//     "$ref": "ImageList"
20038	//   },
20039	//   "scopes": [
20040	//     "https://www.googleapis.com/auth/cloud-platform",
20041	//     "https://www.googleapis.com/auth/compute",
20042	//     "https://www.googleapis.com/auth/compute.readonly"
20043	//   ]
20044	// }
20045
20046}
20047
20048// Pages invokes f for each page of results.
20049// A non-nil error returned from f will halt the iteration.
20050// The provided context supersedes any context provided to the Context method.
20051func (c *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error {
20052	c.ctx_ = ctx
20053	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20054	for {
20055		x, err := c.Do()
20056		if err != nil {
20057			return err
20058		}
20059		if err := f(x); err != nil {
20060			return err
20061		}
20062		if x.NextPageToken == "" {
20063			return nil
20064		}
20065		c.PageToken(x.NextPageToken)
20066	}
20067}
20068
20069// method id "compute.instanceGroupManagers.abandonInstances":
20070
20071type InstanceGroupManagersAbandonInstancesCall struct {
20072	s                                            *Service
20073	project                                      string
20074	zone                                         string
20075	instanceGroupManager                         string
20076	instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest
20077	urlParams_                                   gensupport.URLParams
20078	ctx_                                         context.Context
20079}
20080
20081// AbandonInstances: Schedules a group action to remove the specified
20082// instances from the managed instance group. Abandoning an instance
20083// does not delete the instance, but it does remove the instance from
20084// any target pools that are applied by the managed instance group. This
20085// method reduces the targetSize of the managed instance group by the
20086// number of instances that you abandon. This operation is marked as
20087// DONE when the action is scheduled even if the instances have not yet
20088// been removed from the group. You must separately verify the status of
20089// the abandoning action with the listmanagedinstances method.
20090func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall {
20091	c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20092	c.project = project
20093	c.zone = zone
20094	c.instanceGroupManager = instanceGroupManager
20095	c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest
20096	return c
20097}
20098
20099// Fields allows partial responses to be retrieved. See
20100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20101// for more information.
20102func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall {
20103	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20104	return c
20105}
20106
20107// Context sets the context to be used in this call's Do method. Any
20108// pending HTTP request will be aborted if the provided context is
20109// canceled.
20110func (c *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall {
20111	c.ctx_ = ctx
20112	return c
20113}
20114
20115func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) {
20116	var body io.Reader = nil
20117	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest)
20118	if err != nil {
20119		return nil, err
20120	}
20121	ctype := "application/json"
20122	c.urlParams_.Set("alt", alt)
20123	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances")
20124	urls += "?" + c.urlParams_.Encode()
20125	req, _ := http.NewRequest("POST", urls, body)
20126	googleapi.Expand(req.URL, map[string]string{
20127		"project":              c.project,
20128		"zone":                 c.zone,
20129		"instanceGroupManager": c.instanceGroupManager,
20130	})
20131	req.Header.Set("Content-Type", ctype)
20132	req.Header.Set("User-Agent", c.s.userAgent())
20133	if c.ctx_ != nil {
20134		return ctxhttp.Do(c.ctx_, c.s.client, req)
20135	}
20136	return c.s.client.Do(req)
20137}
20138
20139// Do executes the "compute.instanceGroupManagers.abandonInstances" call.
20140// Exactly one of *Operation or error will be non-nil. Any non-2xx
20141// status code is an error. Response headers are in either
20142// *Operation.ServerResponse.Header or (if a response was returned at
20143// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20144// to check whether the returned error was because
20145// http.StatusNotModified was returned.
20146func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20147	gensupport.SetOptions(c.urlParams_, opts...)
20148	res, err := c.doRequest("json")
20149	if res != nil && res.StatusCode == http.StatusNotModified {
20150		if res.Body != nil {
20151			res.Body.Close()
20152		}
20153		return nil, &googleapi.Error{
20154			Code:   res.StatusCode,
20155			Header: res.Header,
20156		}
20157	}
20158	if err != nil {
20159		return nil, err
20160	}
20161	defer googleapi.CloseBody(res)
20162	if err := googleapi.CheckResponse(res); err != nil {
20163		return nil, err
20164	}
20165	ret := &Operation{
20166		ServerResponse: googleapi.ServerResponse{
20167			Header:         res.Header,
20168			HTTPStatusCode: res.StatusCode,
20169		},
20170	}
20171	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20172		return nil, err
20173	}
20174	return ret, nil
20175	// {
20176	//   "description": "Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.",
20177	//   "httpMethod": "POST",
20178	//   "id": "compute.instanceGroupManagers.abandonInstances",
20179	//   "parameterOrder": [
20180	//     "project",
20181	//     "zone",
20182	//     "instanceGroupManager"
20183	//   ],
20184	//   "parameters": {
20185	//     "instanceGroupManager": {
20186	//       "description": "The name of the managed instance group.",
20187	//       "location": "path",
20188	//       "required": true,
20189	//       "type": "string"
20190	//     },
20191	//     "project": {
20192	//       "description": "Project ID for this request.",
20193	//       "location": "path",
20194	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20195	//       "required": true,
20196	//       "type": "string"
20197	//     },
20198	//     "zone": {
20199	//       "description": "The name of the zone where the managed instance group is located.",
20200	//       "location": "path",
20201	//       "required": true,
20202	//       "type": "string"
20203	//     }
20204	//   },
20205	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances",
20206	//   "request": {
20207	//     "$ref": "InstanceGroupManagersAbandonInstancesRequest"
20208	//   },
20209	//   "response": {
20210	//     "$ref": "Operation"
20211	//   },
20212	//   "scopes": [
20213	//     "https://www.googleapis.com/auth/cloud-platform",
20214	//     "https://www.googleapis.com/auth/compute"
20215	//   ]
20216	// }
20217
20218}
20219
20220// method id "compute.instanceGroupManagers.aggregatedList":
20221
20222type InstanceGroupManagersAggregatedListCall struct {
20223	s            *Service
20224	project      string
20225	urlParams_   gensupport.URLParams
20226	ifNoneMatch_ string
20227	ctx_         context.Context
20228}
20229
20230// AggregatedList: Retrieves the list of managed instance groups and
20231// groups them by zone.
20232func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall {
20233	c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20234	c.project = project
20235	return c
20236}
20237
20238// Filter sets the optional parameter "filter": Sets a filter expression
20239// for filtering listed resources, in the form filter={expression}. Your
20240// {expression} must be in the format: field_name comparison_string
20241// literal_string.
20242//
20243// The field_name is the name of the field you want to compare. Only
20244// atomic field types are supported (string, number, boolean). The
20245// comparison_string must be either eq (equals) or ne (not equals). The
20246// literal_string is the string value to filter to. The literal value
20247// must be valid for the type of field you are filtering by (string,
20248// number, boolean). For string fields, the literal value is interpreted
20249// as a regular expression using RE2 syntax. The literal value must
20250// match the entire field.
20251//
20252// For example, to filter for instances that do not have a name of
20253// example-instance, you would use filter=name ne
20254// example-instance.
20255//
20256// Compute Engine Beta API Only: If you use filtering in the Beta API,
20257// you can also filter on nested fields. For example, you could filter
20258// on instances that have set the scheduling.automaticRestart field to
20259// true. In particular, use filtering on nested fields to take advantage
20260// of instance labels to organize and filter results based on label
20261// values.
20262//
20263// The Beta API also supports filtering on multiple expressions by
20264// providing each separate expression within parentheses. For example,
20265// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
20266// Multiple expressions are treated as AND expressions, meaning that
20267// resources must match all expressions to pass the filters.
20268func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall {
20269	c.urlParams_.Set("filter", filter)
20270	return c
20271}
20272
20273// MaxResults sets the optional parameter "maxResults": The maximum
20274// number of results per page that should be returned. If the number of
20275// available results is larger than maxResults, Compute Engine returns a
20276// nextPageToken that can be used to get the next page of results in
20277// subsequent list requests.
20278func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall {
20279	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20280	return c
20281}
20282
20283// PageToken sets the optional parameter "pageToken": Specifies a page
20284// token to use. Set pageToken to the nextPageToken returned by a
20285// previous list request to get the next page of results.
20286func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall {
20287	c.urlParams_.Set("pageToken", pageToken)
20288	return c
20289}
20290
20291// Fields allows partial responses to be retrieved. See
20292// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20293// for more information.
20294func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall {
20295	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20296	return c
20297}
20298
20299// IfNoneMatch sets the optional parameter which makes the operation
20300// fail if the object's ETag matches the given value. This is useful for
20301// getting updates only after the object has changed since the last
20302// request. Use googleapi.IsNotModified to check whether the response
20303// error from Do is the result of In-None-Match.
20304func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall {
20305	c.ifNoneMatch_ = entityTag
20306	return c
20307}
20308
20309// Context sets the context to be used in this call's Do method. Any
20310// pending HTTP request will be aborted if the provided context is
20311// canceled.
20312func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall {
20313	c.ctx_ = ctx
20314	return c
20315}
20316
20317func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
20318	var body io.Reader = nil
20319	c.urlParams_.Set("alt", alt)
20320	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroupManagers")
20321	urls += "?" + c.urlParams_.Encode()
20322	req, _ := http.NewRequest("GET", urls, body)
20323	googleapi.Expand(req.URL, map[string]string{
20324		"project": c.project,
20325	})
20326	req.Header.Set("User-Agent", c.s.userAgent())
20327	if c.ifNoneMatch_ != "" {
20328		req.Header.Set("If-None-Match", c.ifNoneMatch_)
20329	}
20330	if c.ctx_ != nil {
20331		return ctxhttp.Do(c.ctx_, c.s.client, req)
20332	}
20333	return c.s.client.Do(req)
20334}
20335
20336// Do executes the "compute.instanceGroupManagers.aggregatedList" call.
20337// Exactly one of *InstanceGroupManagerAggregatedList or error will be
20338// non-nil. Any non-2xx status code is an error. Response headers are in
20339// either *InstanceGroupManagerAggregatedList.ServerResponse.Header or
20340// (if a response was returned at all) in
20341// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
20342// whether the returned error was because http.StatusNotModified was
20343// returned.
20344func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, error) {
20345	gensupport.SetOptions(c.urlParams_, opts...)
20346	res, err := c.doRequest("json")
20347	if res != nil && res.StatusCode == http.StatusNotModified {
20348		if res.Body != nil {
20349			res.Body.Close()
20350		}
20351		return nil, &googleapi.Error{
20352			Code:   res.StatusCode,
20353			Header: res.Header,
20354		}
20355	}
20356	if err != nil {
20357		return nil, err
20358	}
20359	defer googleapi.CloseBody(res)
20360	if err := googleapi.CheckResponse(res); err != nil {
20361		return nil, err
20362	}
20363	ret := &InstanceGroupManagerAggregatedList{
20364		ServerResponse: googleapi.ServerResponse{
20365			Header:         res.Header,
20366			HTTPStatusCode: res.StatusCode,
20367		},
20368	}
20369	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20370		return nil, err
20371	}
20372	return ret, nil
20373	// {
20374	//   "description": "Retrieves the list of managed instance groups and groups them by zone.",
20375	//   "httpMethod": "GET",
20376	//   "id": "compute.instanceGroupManagers.aggregatedList",
20377	//   "parameterOrder": [
20378	//     "project"
20379	//   ],
20380	//   "parameters": {
20381	//     "filter": {
20382	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
20383	//       "location": "query",
20384	//       "type": "string"
20385	//     },
20386	//     "maxResults": {
20387	//       "default": "500",
20388	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
20389	//       "format": "uint32",
20390	//       "location": "query",
20391	//       "maximum": "500",
20392	//       "minimum": "0",
20393	//       "type": "integer"
20394	//     },
20395	//     "pageToken": {
20396	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
20397	//       "location": "query",
20398	//       "type": "string"
20399	//     },
20400	//     "project": {
20401	//       "description": "Project ID for this request.",
20402	//       "location": "path",
20403	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20404	//       "required": true,
20405	//       "type": "string"
20406	//     }
20407	//   },
20408	//   "path": "{project}/aggregated/instanceGroupManagers",
20409	//   "response": {
20410	//     "$ref": "InstanceGroupManagerAggregatedList"
20411	//   },
20412	//   "scopes": [
20413	//     "https://www.googleapis.com/auth/cloud-platform",
20414	//     "https://www.googleapis.com/auth/compute",
20415	//     "https://www.googleapis.com/auth/compute.readonly"
20416	//   ]
20417	// }
20418
20419}
20420
20421// Pages invokes f for each page of results.
20422// A non-nil error returned from f will halt the iteration.
20423// The provided context supersedes any context provided to the Context method.
20424func (c *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) error) error {
20425	c.ctx_ = ctx
20426	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20427	for {
20428		x, err := c.Do()
20429		if err != nil {
20430			return err
20431		}
20432		if err := f(x); err != nil {
20433			return err
20434		}
20435		if x.NextPageToken == "" {
20436			return nil
20437		}
20438		c.PageToken(x.NextPageToken)
20439	}
20440}
20441
20442// method id "compute.instanceGroupManagers.delete":
20443
20444type InstanceGroupManagersDeleteCall struct {
20445	s                    *Service
20446	project              string
20447	zone                 string
20448	instanceGroupManager string
20449	urlParams_           gensupport.URLParams
20450	ctx_                 context.Context
20451}
20452
20453// Delete: Deletes the specified managed instance group and all of the
20454// instances in that group. Note that the instance group must not belong
20455// to a backend service. Read  Deleting an instance group for more
20456// information.
20457func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall {
20458	c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20459	c.project = project
20460	c.zone = zone
20461	c.instanceGroupManager = instanceGroupManager
20462	return c
20463}
20464
20465// Fields allows partial responses to be retrieved. See
20466// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20467// for more information.
20468func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall {
20469	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20470	return c
20471}
20472
20473// Context sets the context to be used in this call's Do method. Any
20474// pending HTTP request will be aborted if the provided context is
20475// canceled.
20476func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall {
20477	c.ctx_ = ctx
20478	return c
20479}
20480
20481func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) {
20482	var body io.Reader = nil
20483	c.urlParams_.Set("alt", alt)
20484	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}")
20485	urls += "?" + c.urlParams_.Encode()
20486	req, _ := http.NewRequest("DELETE", urls, body)
20487	googleapi.Expand(req.URL, map[string]string{
20488		"project":              c.project,
20489		"zone":                 c.zone,
20490		"instanceGroupManager": c.instanceGroupManager,
20491	})
20492	req.Header.Set("User-Agent", c.s.userAgent())
20493	if c.ctx_ != nil {
20494		return ctxhttp.Do(c.ctx_, c.s.client, req)
20495	}
20496	return c.s.client.Do(req)
20497}
20498
20499// Do executes the "compute.instanceGroupManagers.delete" call.
20500// Exactly one of *Operation or error will be non-nil. Any non-2xx
20501// status code is an error. Response headers are in either
20502// *Operation.ServerResponse.Header or (if a response was returned at
20503// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20504// to check whether the returned error was because
20505// http.StatusNotModified was returned.
20506func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20507	gensupport.SetOptions(c.urlParams_, opts...)
20508	res, err := c.doRequest("json")
20509	if res != nil && res.StatusCode == http.StatusNotModified {
20510		if res.Body != nil {
20511			res.Body.Close()
20512		}
20513		return nil, &googleapi.Error{
20514			Code:   res.StatusCode,
20515			Header: res.Header,
20516		}
20517	}
20518	if err != nil {
20519		return nil, err
20520	}
20521	defer googleapi.CloseBody(res)
20522	if err := googleapi.CheckResponse(res); err != nil {
20523		return nil, err
20524	}
20525	ret := &Operation{
20526		ServerResponse: googleapi.ServerResponse{
20527			Header:         res.Header,
20528			HTTPStatusCode: res.StatusCode,
20529		},
20530	}
20531	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20532		return nil, err
20533	}
20534	return ret, nil
20535	// {
20536	//   "description": "Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read  Deleting an instance group for more information.",
20537	//   "httpMethod": "DELETE",
20538	//   "id": "compute.instanceGroupManagers.delete",
20539	//   "parameterOrder": [
20540	//     "project",
20541	//     "zone",
20542	//     "instanceGroupManager"
20543	//   ],
20544	//   "parameters": {
20545	//     "instanceGroupManager": {
20546	//       "description": "The name of the managed instance group to delete.",
20547	//       "location": "path",
20548	//       "required": true,
20549	//       "type": "string"
20550	//     },
20551	//     "project": {
20552	//       "description": "Project ID for this request.",
20553	//       "location": "path",
20554	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20555	//       "required": true,
20556	//       "type": "string"
20557	//     },
20558	//     "zone": {
20559	//       "description": "The name of the zone where the managed instance group is located.",
20560	//       "location": "path",
20561	//       "required": true,
20562	//       "type": "string"
20563	//     }
20564	//   },
20565	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
20566	//   "response": {
20567	//     "$ref": "Operation"
20568	//   },
20569	//   "scopes": [
20570	//     "https://www.googleapis.com/auth/cloud-platform",
20571	//     "https://www.googleapis.com/auth/compute"
20572	//   ]
20573	// }
20574
20575}
20576
20577// method id "compute.instanceGroupManagers.deleteInstances":
20578
20579type InstanceGroupManagersDeleteInstancesCall struct {
20580	s                                           *Service
20581	project                                     string
20582	zone                                        string
20583	instanceGroupManager                        string
20584	instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest
20585	urlParams_                                  gensupport.URLParams
20586	ctx_                                        context.Context
20587}
20588
20589// DeleteInstances: Schedules a group action to delete the specified
20590// instances in the managed instance group. The instances are also
20591// removed from any target pools of which they were a member. This
20592// method reduces the targetSize of the managed instance group by the
20593// number of instances that you delete. This operation is marked as DONE
20594// when the action is scheduled even if the instances are still being
20595// deleted. You must separately verify the status of the deleting action
20596// with the listmanagedinstances method.
20597func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall {
20598	c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20599	c.project = project
20600	c.zone = zone
20601	c.instanceGroupManager = instanceGroupManager
20602	c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest
20603	return c
20604}
20605
20606// Fields allows partial responses to be retrieved. See
20607// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20608// for more information.
20609func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall {
20610	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20611	return c
20612}
20613
20614// Context sets the context to be used in this call's Do method. Any
20615// pending HTTP request will be aborted if the provided context is
20616// canceled.
20617func (c *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall {
20618	c.ctx_ = ctx
20619	return c
20620}
20621
20622func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) {
20623	var body io.Reader = nil
20624	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest)
20625	if err != nil {
20626		return nil, err
20627	}
20628	ctype := "application/json"
20629	c.urlParams_.Set("alt", alt)
20630	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances")
20631	urls += "?" + c.urlParams_.Encode()
20632	req, _ := http.NewRequest("POST", urls, body)
20633	googleapi.Expand(req.URL, map[string]string{
20634		"project":              c.project,
20635		"zone":                 c.zone,
20636		"instanceGroupManager": c.instanceGroupManager,
20637	})
20638	req.Header.Set("Content-Type", ctype)
20639	req.Header.Set("User-Agent", c.s.userAgent())
20640	if c.ctx_ != nil {
20641		return ctxhttp.Do(c.ctx_, c.s.client, req)
20642	}
20643	return c.s.client.Do(req)
20644}
20645
20646// Do executes the "compute.instanceGroupManagers.deleteInstances" call.
20647// Exactly one of *Operation or error will be non-nil. Any non-2xx
20648// status code is an error. Response headers are in either
20649// *Operation.ServerResponse.Header or (if a response was returned at
20650// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20651// to check whether the returned error was because
20652// http.StatusNotModified was returned.
20653func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20654	gensupport.SetOptions(c.urlParams_, opts...)
20655	res, err := c.doRequest("json")
20656	if res != nil && res.StatusCode == http.StatusNotModified {
20657		if res.Body != nil {
20658			res.Body.Close()
20659		}
20660		return nil, &googleapi.Error{
20661			Code:   res.StatusCode,
20662			Header: res.Header,
20663		}
20664	}
20665	if err != nil {
20666		return nil, err
20667	}
20668	defer googleapi.CloseBody(res)
20669	if err := googleapi.CheckResponse(res); err != nil {
20670		return nil, err
20671	}
20672	ret := &Operation{
20673		ServerResponse: googleapi.ServerResponse{
20674			Header:         res.Header,
20675			HTTPStatusCode: res.StatusCode,
20676		},
20677	}
20678	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20679		return nil, err
20680	}
20681	return ret, nil
20682	// {
20683	//   "description": "Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.",
20684	//   "httpMethod": "POST",
20685	//   "id": "compute.instanceGroupManagers.deleteInstances",
20686	//   "parameterOrder": [
20687	//     "project",
20688	//     "zone",
20689	//     "instanceGroupManager"
20690	//   ],
20691	//   "parameters": {
20692	//     "instanceGroupManager": {
20693	//       "description": "The name of the managed instance group.",
20694	//       "location": "path",
20695	//       "required": true,
20696	//       "type": "string"
20697	//     },
20698	//     "project": {
20699	//       "description": "Project ID for this request.",
20700	//       "location": "path",
20701	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20702	//       "required": true,
20703	//       "type": "string"
20704	//     },
20705	//     "zone": {
20706	//       "description": "The name of the zone where the managed instance group is located.",
20707	//       "location": "path",
20708	//       "required": true,
20709	//       "type": "string"
20710	//     }
20711	//   },
20712	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances",
20713	//   "request": {
20714	//     "$ref": "InstanceGroupManagersDeleteInstancesRequest"
20715	//   },
20716	//   "response": {
20717	//     "$ref": "Operation"
20718	//   },
20719	//   "scopes": [
20720	//     "https://www.googleapis.com/auth/cloud-platform",
20721	//     "https://www.googleapis.com/auth/compute"
20722	//   ]
20723	// }
20724
20725}
20726
20727// method id "compute.instanceGroupManagers.get":
20728
20729type InstanceGroupManagersGetCall struct {
20730	s                    *Service
20731	project              string
20732	zone                 string
20733	instanceGroupManager string
20734	urlParams_           gensupport.URLParams
20735	ifNoneMatch_         string
20736	ctx_                 context.Context
20737}
20738
20739// Get: Returns all of the details about the specified managed instance
20740// group. Get a list of available managed instance groups by making a
20741// list() request.
20742func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall {
20743	c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20744	c.project = project
20745	c.zone = zone
20746	c.instanceGroupManager = instanceGroupManager
20747	return c
20748}
20749
20750// Fields allows partial responses to be retrieved. See
20751// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20752// for more information.
20753func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall {
20754	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20755	return c
20756}
20757
20758// IfNoneMatch sets the optional parameter which makes the operation
20759// fail if the object's ETag matches the given value. This is useful for
20760// getting updates only after the object has changed since the last
20761// request. Use googleapi.IsNotModified to check whether the response
20762// error from Do is the result of In-None-Match.
20763func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall {
20764	c.ifNoneMatch_ = entityTag
20765	return c
20766}
20767
20768// Context sets the context to be used in this call's Do method. Any
20769// pending HTTP request will be aborted if the provided context is
20770// canceled.
20771func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall {
20772	c.ctx_ = ctx
20773	return c
20774}
20775
20776func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) {
20777	var body io.Reader = nil
20778	c.urlParams_.Set("alt", alt)
20779	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}")
20780	urls += "?" + c.urlParams_.Encode()
20781	req, _ := http.NewRequest("GET", urls, body)
20782	googleapi.Expand(req.URL, map[string]string{
20783		"project":              c.project,
20784		"zone":                 c.zone,
20785		"instanceGroupManager": c.instanceGroupManager,
20786	})
20787	req.Header.Set("User-Agent", c.s.userAgent())
20788	if c.ifNoneMatch_ != "" {
20789		req.Header.Set("If-None-Match", c.ifNoneMatch_)
20790	}
20791	if c.ctx_ != nil {
20792		return ctxhttp.Do(c.ctx_, c.s.client, req)
20793	}
20794	return c.s.client.Do(req)
20795}
20796
20797// Do executes the "compute.instanceGroupManagers.get" call.
20798// Exactly one of *InstanceGroupManager or error will be non-nil. Any
20799// non-2xx status code is an error. Response headers are in either
20800// *InstanceGroupManager.ServerResponse.Header or (if a response was
20801// returned at all) in error.(*googleapi.Error).Header. Use
20802// googleapi.IsNotModified to check whether the returned error was
20803// because http.StatusNotModified was returned.
20804func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) {
20805	gensupport.SetOptions(c.urlParams_, opts...)
20806	res, err := c.doRequest("json")
20807	if res != nil && res.StatusCode == http.StatusNotModified {
20808		if res.Body != nil {
20809			res.Body.Close()
20810		}
20811		return nil, &googleapi.Error{
20812			Code:   res.StatusCode,
20813			Header: res.Header,
20814		}
20815	}
20816	if err != nil {
20817		return nil, err
20818	}
20819	defer googleapi.CloseBody(res)
20820	if err := googleapi.CheckResponse(res); err != nil {
20821		return nil, err
20822	}
20823	ret := &InstanceGroupManager{
20824		ServerResponse: googleapi.ServerResponse{
20825			Header:         res.Header,
20826			HTTPStatusCode: res.StatusCode,
20827		},
20828	}
20829	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20830		return nil, err
20831	}
20832	return ret, nil
20833	// {
20834	//   "description": "Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request.",
20835	//   "httpMethod": "GET",
20836	//   "id": "compute.instanceGroupManagers.get",
20837	//   "parameterOrder": [
20838	//     "project",
20839	//     "zone",
20840	//     "instanceGroupManager"
20841	//   ],
20842	//   "parameters": {
20843	//     "instanceGroupManager": {
20844	//       "description": "The name of the managed instance group.",
20845	//       "location": "path",
20846	//       "required": true,
20847	//       "type": "string"
20848	//     },
20849	//     "project": {
20850	//       "description": "Project ID for this request.",
20851	//       "location": "path",
20852	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20853	//       "required": true,
20854	//       "type": "string"
20855	//     },
20856	//     "zone": {
20857	//       "description": "The name of the zone where the managed instance group is located.",
20858	//       "location": "path",
20859	//       "required": true,
20860	//       "type": "string"
20861	//     }
20862	//   },
20863	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
20864	//   "response": {
20865	//     "$ref": "InstanceGroupManager"
20866	//   },
20867	//   "scopes": [
20868	//     "https://www.googleapis.com/auth/cloud-platform",
20869	//     "https://www.googleapis.com/auth/compute",
20870	//     "https://www.googleapis.com/auth/compute.readonly"
20871	//   ]
20872	// }
20873
20874}
20875
20876// method id "compute.instanceGroupManagers.insert":
20877
20878type InstanceGroupManagersInsertCall struct {
20879	s                    *Service
20880	project              string
20881	zone                 string
20882	instancegroupmanager *InstanceGroupManager
20883	urlParams_           gensupport.URLParams
20884	ctx_                 context.Context
20885}
20886
20887// Insert: Creates a managed instance group using the information that
20888// you specify in the request. After the group is created, it schedules
20889// an action to create instances in the group using the specified
20890// instance template. This operation is marked as DONE when the group is
20891// created even if the instances in the group have not yet been created.
20892// You must separately verify the status of the individual instances
20893// with the listmanagedinstances method.
20894func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall {
20895	c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20896	c.project = project
20897	c.zone = zone
20898	c.instancegroupmanager = instancegroupmanager
20899	return c
20900}
20901
20902// Fields allows partial responses to be retrieved. See
20903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20904// for more information.
20905func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall {
20906	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20907	return c
20908}
20909
20910// Context sets the context to be used in this call's Do method. Any
20911// pending HTTP request will be aborted if the provided context is
20912// canceled.
20913func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall {
20914	c.ctx_ = ctx
20915	return c
20916}
20917
20918func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) {
20919	var body io.Reader = nil
20920	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
20921	if err != nil {
20922		return nil, err
20923	}
20924	ctype := "application/json"
20925	c.urlParams_.Set("alt", alt)
20926	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers")
20927	urls += "?" + c.urlParams_.Encode()
20928	req, _ := http.NewRequest("POST", urls, body)
20929	googleapi.Expand(req.URL, map[string]string{
20930		"project": c.project,
20931		"zone":    c.zone,
20932	})
20933	req.Header.Set("Content-Type", ctype)
20934	req.Header.Set("User-Agent", c.s.userAgent())
20935	if c.ctx_ != nil {
20936		return ctxhttp.Do(c.ctx_, c.s.client, req)
20937	}
20938	return c.s.client.Do(req)
20939}
20940
20941// Do executes the "compute.instanceGroupManagers.insert" call.
20942// Exactly one of *Operation or error will be non-nil. Any non-2xx
20943// status code is an error. Response headers are in either
20944// *Operation.ServerResponse.Header or (if a response was returned at
20945// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20946// to check whether the returned error was because
20947// http.StatusNotModified was returned.
20948func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20949	gensupport.SetOptions(c.urlParams_, opts...)
20950	res, err := c.doRequest("json")
20951	if res != nil && res.StatusCode == http.StatusNotModified {
20952		if res.Body != nil {
20953			res.Body.Close()
20954		}
20955		return nil, &googleapi.Error{
20956			Code:   res.StatusCode,
20957			Header: res.Header,
20958		}
20959	}
20960	if err != nil {
20961		return nil, err
20962	}
20963	defer googleapi.CloseBody(res)
20964	if err := googleapi.CheckResponse(res); err != nil {
20965		return nil, err
20966	}
20967	ret := &Operation{
20968		ServerResponse: googleapi.ServerResponse{
20969			Header:         res.Header,
20970			HTTPStatusCode: res.StatusCode,
20971		},
20972	}
20973	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20974		return nil, err
20975	}
20976	return ret, nil
20977	// {
20978	//   "description": "Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.",
20979	//   "httpMethod": "POST",
20980	//   "id": "compute.instanceGroupManagers.insert",
20981	//   "parameterOrder": [
20982	//     "project",
20983	//     "zone"
20984	//   ],
20985	//   "parameters": {
20986	//     "project": {
20987	//       "description": "Project ID for this request.",
20988	//       "location": "path",
20989	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20990	//       "required": true,
20991	//       "type": "string"
20992	//     },
20993	//     "zone": {
20994	//       "description": "The name of the zone where you want to create the managed instance group.",
20995	//       "location": "path",
20996	//       "required": true,
20997	//       "type": "string"
20998	//     }
20999	//   },
21000	//   "path": "{project}/zones/{zone}/instanceGroupManagers",
21001	//   "request": {
21002	//     "$ref": "InstanceGroupManager"
21003	//   },
21004	//   "response": {
21005	//     "$ref": "Operation"
21006	//   },
21007	//   "scopes": [
21008	//     "https://www.googleapis.com/auth/cloud-platform",
21009	//     "https://www.googleapis.com/auth/compute"
21010	//   ]
21011	// }
21012
21013}
21014
21015// method id "compute.instanceGroupManagers.list":
21016
21017type InstanceGroupManagersListCall struct {
21018	s            *Service
21019	project      string
21020	zone         string
21021	urlParams_   gensupport.URLParams
21022	ifNoneMatch_ string
21023	ctx_         context.Context
21024}
21025
21026// List: Retrieves a list of managed instance groups that are contained
21027// within the specified project and zone.
21028func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall {
21029	c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21030	c.project = project
21031	c.zone = zone
21032	return c
21033}
21034
21035// Filter sets the optional parameter "filter": Sets a filter expression
21036// for filtering listed resources, in the form filter={expression}. Your
21037// {expression} must be in the format: field_name comparison_string
21038// literal_string.
21039//
21040// The field_name is the name of the field you want to compare. Only
21041// atomic field types are supported (string, number, boolean). The
21042// comparison_string must be either eq (equals) or ne (not equals). The
21043// literal_string is the string value to filter to. The literal value
21044// must be valid for the type of field you are filtering by (string,
21045// number, boolean). For string fields, the literal value is interpreted
21046// as a regular expression using RE2 syntax. The literal value must
21047// match the entire field.
21048//
21049// For example, to filter for instances that do not have a name of
21050// example-instance, you would use filter=name ne
21051// example-instance.
21052//
21053// Compute Engine Beta API Only: If you use filtering in the Beta API,
21054// you can also filter on nested fields. For example, you could filter
21055// on instances that have set the scheduling.automaticRestart field to
21056// true. In particular, use filtering on nested fields to take advantage
21057// of instance labels to organize and filter results based on label
21058// values.
21059//
21060// The Beta API also supports filtering on multiple expressions by
21061// providing each separate expression within parentheses. For example,
21062// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
21063// Multiple expressions are treated as AND expressions, meaning that
21064// resources must match all expressions to pass the filters.
21065func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall {
21066	c.urlParams_.Set("filter", filter)
21067	return c
21068}
21069
21070// MaxResults sets the optional parameter "maxResults": The maximum
21071// number of results per page that should be returned. If the number of
21072// available results is larger than maxResults, Compute Engine returns a
21073// nextPageToken that can be used to get the next page of results in
21074// subsequent list requests.
21075func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall {
21076	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21077	return c
21078}
21079
21080// PageToken sets the optional parameter "pageToken": Specifies a page
21081// token to use. Set pageToken to the nextPageToken returned by a
21082// previous list request to get the next page of results.
21083func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall {
21084	c.urlParams_.Set("pageToken", pageToken)
21085	return c
21086}
21087
21088// Fields allows partial responses to be retrieved. See
21089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21090// for more information.
21091func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall {
21092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21093	return c
21094}
21095
21096// IfNoneMatch sets the optional parameter which makes the operation
21097// fail if the object's ETag matches the given value. This is useful for
21098// getting updates only after the object has changed since the last
21099// request. Use googleapi.IsNotModified to check whether the response
21100// error from Do is the result of In-None-Match.
21101func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall {
21102	c.ifNoneMatch_ = entityTag
21103	return c
21104}
21105
21106// Context sets the context to be used in this call's Do method. Any
21107// pending HTTP request will be aborted if the provided context is
21108// canceled.
21109func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall {
21110	c.ctx_ = ctx
21111	return c
21112}
21113
21114func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) {
21115	var body io.Reader = nil
21116	c.urlParams_.Set("alt", alt)
21117	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers")
21118	urls += "?" + c.urlParams_.Encode()
21119	req, _ := http.NewRequest("GET", urls, body)
21120	googleapi.Expand(req.URL, map[string]string{
21121		"project": c.project,
21122		"zone":    c.zone,
21123	})
21124	req.Header.Set("User-Agent", c.s.userAgent())
21125	if c.ifNoneMatch_ != "" {
21126		req.Header.Set("If-None-Match", c.ifNoneMatch_)
21127	}
21128	if c.ctx_ != nil {
21129		return ctxhttp.Do(c.ctx_, c.s.client, req)
21130	}
21131	return c.s.client.Do(req)
21132}
21133
21134// Do executes the "compute.instanceGroupManagers.list" call.
21135// Exactly one of *InstanceGroupManagerList or error will be non-nil.
21136// Any non-2xx status code is an error. Response headers are in either
21137// *InstanceGroupManagerList.ServerResponse.Header or (if a response was
21138// returned at all) in error.(*googleapi.Error).Header. Use
21139// googleapi.IsNotModified to check whether the returned error was
21140// because http.StatusNotModified was returned.
21141func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, error) {
21142	gensupport.SetOptions(c.urlParams_, opts...)
21143	res, err := c.doRequest("json")
21144	if res != nil && res.StatusCode == http.StatusNotModified {
21145		if res.Body != nil {
21146			res.Body.Close()
21147		}
21148		return nil, &googleapi.Error{
21149			Code:   res.StatusCode,
21150			Header: res.Header,
21151		}
21152	}
21153	if err != nil {
21154		return nil, err
21155	}
21156	defer googleapi.CloseBody(res)
21157	if err := googleapi.CheckResponse(res); err != nil {
21158		return nil, err
21159	}
21160	ret := &InstanceGroupManagerList{
21161		ServerResponse: googleapi.ServerResponse{
21162			Header:         res.Header,
21163			HTTPStatusCode: res.StatusCode,
21164		},
21165	}
21166	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21167		return nil, err
21168	}
21169	return ret, nil
21170	// {
21171	//   "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.",
21172	//   "httpMethod": "GET",
21173	//   "id": "compute.instanceGroupManagers.list",
21174	//   "parameterOrder": [
21175	//     "project",
21176	//     "zone"
21177	//   ],
21178	//   "parameters": {
21179	//     "filter": {
21180	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
21181	//       "location": "query",
21182	//       "type": "string"
21183	//     },
21184	//     "maxResults": {
21185	//       "default": "500",
21186	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
21187	//       "format": "uint32",
21188	//       "location": "query",
21189	//       "maximum": "500",
21190	//       "minimum": "0",
21191	//       "type": "integer"
21192	//     },
21193	//     "pageToken": {
21194	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
21195	//       "location": "query",
21196	//       "type": "string"
21197	//     },
21198	//     "project": {
21199	//       "description": "Project ID for this request.",
21200	//       "location": "path",
21201	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21202	//       "required": true,
21203	//       "type": "string"
21204	//     },
21205	//     "zone": {
21206	//       "description": "The name of the zone where the managed instance group is located.",
21207	//       "location": "path",
21208	//       "required": true,
21209	//       "type": "string"
21210	//     }
21211	//   },
21212	//   "path": "{project}/zones/{zone}/instanceGroupManagers",
21213	//   "response": {
21214	//     "$ref": "InstanceGroupManagerList"
21215	//   },
21216	//   "scopes": [
21217	//     "https://www.googleapis.com/auth/cloud-platform",
21218	//     "https://www.googleapis.com/auth/compute",
21219	//     "https://www.googleapis.com/auth/compute.readonly"
21220	//   ]
21221	// }
21222
21223}
21224
21225// Pages invokes f for each page of results.
21226// A non-nil error returned from f will halt the iteration.
21227// The provided context supersedes any context provided to the Context method.
21228func (c *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error {
21229	c.ctx_ = ctx
21230	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21231	for {
21232		x, err := c.Do()
21233		if err != nil {
21234			return err
21235		}
21236		if err := f(x); err != nil {
21237			return err
21238		}
21239		if x.NextPageToken == "" {
21240			return nil
21241		}
21242		c.PageToken(x.NextPageToken)
21243	}
21244}
21245
21246// method id "compute.instanceGroupManagers.listManagedInstances":
21247
21248type InstanceGroupManagersListManagedInstancesCall struct {
21249	s                    *Service
21250	project              string
21251	zone                 string
21252	instanceGroupManager string
21253	urlParams_           gensupport.URLParams
21254	ctx_                 context.Context
21255}
21256
21257// ListManagedInstances: Lists all of the instances in the managed
21258// instance group. Each instance in the list has a currentAction, which
21259// indicates the action that the managed instance group is performing on
21260// the instance. For example, if the group is still creating an
21261// instance, the currentAction is CREATING. If a previous action failed,
21262// the list displays the errors for that failed action.
21263func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall {
21264	c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21265	c.project = project
21266	c.zone = zone
21267	c.instanceGroupManager = instanceGroupManager
21268	return c
21269}
21270
21271// Fields allows partial responses to be retrieved. See
21272// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21273// for more information.
21274func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall {
21275	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21276	return c
21277}
21278
21279// Context sets the context to be used in this call's Do method. Any
21280// pending HTTP request will be aborted if the provided context is
21281// canceled.
21282func (c *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall {
21283	c.ctx_ = ctx
21284	return c
21285}
21286
21287func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) {
21288	var body io.Reader = nil
21289	c.urlParams_.Set("alt", alt)
21290	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances")
21291	urls += "?" + c.urlParams_.Encode()
21292	req, _ := http.NewRequest("POST", urls, body)
21293	googleapi.Expand(req.URL, map[string]string{
21294		"project":              c.project,
21295		"zone":                 c.zone,
21296		"instanceGroupManager": c.instanceGroupManager,
21297	})
21298	req.Header.Set("User-Agent", c.s.userAgent())
21299	if c.ctx_ != nil {
21300		return ctxhttp.Do(c.ctx_, c.s.client, req)
21301	}
21302	return c.s.client.Do(req)
21303}
21304
21305// Do executes the "compute.instanceGroupManagers.listManagedInstances" call.
21306// Exactly one of *InstanceGroupManagersListManagedInstancesResponse or
21307// error will be non-nil. Any non-2xx status code is an error. Response
21308// headers are in either
21309// *InstanceGroupManagersListManagedInstancesResponse.ServerResponse.Head
21310// er or (if a response was returned at all) in
21311// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
21312// whether the returned error was because http.StatusNotModified was
21313// returned.
21314func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, error) {
21315	gensupport.SetOptions(c.urlParams_, opts...)
21316	res, err := c.doRequest("json")
21317	if res != nil && res.StatusCode == http.StatusNotModified {
21318		if res.Body != nil {
21319			res.Body.Close()
21320		}
21321		return nil, &googleapi.Error{
21322			Code:   res.StatusCode,
21323			Header: res.Header,
21324		}
21325	}
21326	if err != nil {
21327		return nil, err
21328	}
21329	defer googleapi.CloseBody(res)
21330	if err := googleapi.CheckResponse(res); err != nil {
21331		return nil, err
21332	}
21333	ret := &InstanceGroupManagersListManagedInstancesResponse{
21334		ServerResponse: googleapi.ServerResponse{
21335			Header:         res.Header,
21336			HTTPStatusCode: res.StatusCode,
21337		},
21338	}
21339	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21340		return nil, err
21341	}
21342	return ret, nil
21343	// {
21344	//   "description": "Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action.",
21345	//   "httpMethod": "POST",
21346	//   "id": "compute.instanceGroupManagers.listManagedInstances",
21347	//   "parameterOrder": [
21348	//     "project",
21349	//     "zone",
21350	//     "instanceGroupManager"
21351	//   ],
21352	//   "parameters": {
21353	//     "instanceGroupManager": {
21354	//       "description": "The name of the managed instance group.",
21355	//       "location": "path",
21356	//       "required": true,
21357	//       "type": "string"
21358	//     },
21359	//     "project": {
21360	//       "description": "Project ID for this request.",
21361	//       "location": "path",
21362	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21363	//       "required": true,
21364	//       "type": "string"
21365	//     },
21366	//     "zone": {
21367	//       "description": "The name of the zone where the managed instance group is located.",
21368	//       "location": "path",
21369	//       "required": true,
21370	//       "type": "string"
21371	//     }
21372	//   },
21373	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances",
21374	//   "response": {
21375	//     "$ref": "InstanceGroupManagersListManagedInstancesResponse"
21376	//   },
21377	//   "scopes": [
21378	//     "https://www.googleapis.com/auth/cloud-platform",
21379	//     "https://www.googleapis.com/auth/compute",
21380	//     "https://www.googleapis.com/auth/compute.readonly"
21381	//   ]
21382	// }
21383
21384}
21385
21386// method id "compute.instanceGroupManagers.recreateInstances":
21387
21388type InstanceGroupManagersRecreateInstancesCall struct {
21389	s                                             *Service
21390	project                                       string
21391	zone                                          string
21392	instanceGroupManager                          string
21393	instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest
21394	urlParams_                                    gensupport.URLParams
21395	ctx_                                          context.Context
21396}
21397
21398// RecreateInstances: Schedules a group action to recreate the specified
21399// instances in the managed instance group. The instances are deleted
21400// and recreated using the current instance template for the managed
21401// instance group. This operation is marked as DONE when the action is
21402// scheduled even if the instances have not yet been recreated. You must
21403// separately verify the status of the recreating action with the
21404// listmanagedinstances method.
21405func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall {
21406	c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21407	c.project = project
21408	c.zone = zone
21409	c.instanceGroupManager = instanceGroupManager
21410	c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest
21411	return c
21412}
21413
21414// Fields allows partial responses to be retrieved. See
21415// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21416// for more information.
21417func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall {
21418	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21419	return c
21420}
21421
21422// Context sets the context to be used in this call's Do method. Any
21423// pending HTTP request will be aborted if the provided context is
21424// canceled.
21425func (c *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall {
21426	c.ctx_ = ctx
21427	return c
21428}
21429
21430func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) {
21431	var body io.Reader = nil
21432	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest)
21433	if err != nil {
21434		return nil, err
21435	}
21436	ctype := "application/json"
21437	c.urlParams_.Set("alt", alt)
21438	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances")
21439	urls += "?" + c.urlParams_.Encode()
21440	req, _ := http.NewRequest("POST", urls, body)
21441	googleapi.Expand(req.URL, map[string]string{
21442		"project":              c.project,
21443		"zone":                 c.zone,
21444		"instanceGroupManager": c.instanceGroupManager,
21445	})
21446	req.Header.Set("Content-Type", ctype)
21447	req.Header.Set("User-Agent", c.s.userAgent())
21448	if c.ctx_ != nil {
21449		return ctxhttp.Do(c.ctx_, c.s.client, req)
21450	}
21451	return c.s.client.Do(req)
21452}
21453
21454// Do executes the "compute.instanceGroupManagers.recreateInstances" call.
21455// Exactly one of *Operation or error will be non-nil. Any non-2xx
21456// status code is an error. Response headers are in either
21457// *Operation.ServerResponse.Header or (if a response was returned at
21458// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21459// to check whether the returned error was because
21460// http.StatusNotModified was returned.
21461func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21462	gensupport.SetOptions(c.urlParams_, opts...)
21463	res, err := c.doRequest("json")
21464	if res != nil && res.StatusCode == http.StatusNotModified {
21465		if res.Body != nil {
21466			res.Body.Close()
21467		}
21468		return nil, &googleapi.Error{
21469			Code:   res.StatusCode,
21470			Header: res.Header,
21471		}
21472	}
21473	if err != nil {
21474		return nil, err
21475	}
21476	defer googleapi.CloseBody(res)
21477	if err := googleapi.CheckResponse(res); err != nil {
21478		return nil, err
21479	}
21480	ret := &Operation{
21481		ServerResponse: googleapi.ServerResponse{
21482			Header:         res.Header,
21483			HTTPStatusCode: res.StatusCode,
21484		},
21485	}
21486	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21487		return nil, err
21488	}
21489	return ret, nil
21490	// {
21491	//   "description": "Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.",
21492	//   "httpMethod": "POST",
21493	//   "id": "compute.instanceGroupManagers.recreateInstances",
21494	//   "parameterOrder": [
21495	//     "project",
21496	//     "zone",
21497	//     "instanceGroupManager"
21498	//   ],
21499	//   "parameters": {
21500	//     "instanceGroupManager": {
21501	//       "description": "The name of the managed instance group.",
21502	//       "location": "path",
21503	//       "required": true,
21504	//       "type": "string"
21505	//     },
21506	//     "project": {
21507	//       "description": "Project ID for this request.",
21508	//       "location": "path",
21509	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21510	//       "required": true,
21511	//       "type": "string"
21512	//     },
21513	//     "zone": {
21514	//       "description": "The name of the zone where the managed instance group is located.",
21515	//       "location": "path",
21516	//       "required": true,
21517	//       "type": "string"
21518	//     }
21519	//   },
21520	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances",
21521	//   "request": {
21522	//     "$ref": "InstanceGroupManagersRecreateInstancesRequest"
21523	//   },
21524	//   "response": {
21525	//     "$ref": "Operation"
21526	//   },
21527	//   "scopes": [
21528	//     "https://www.googleapis.com/auth/cloud-platform",
21529	//     "https://www.googleapis.com/auth/compute"
21530	//   ]
21531	// }
21532
21533}
21534
21535// method id "compute.instanceGroupManagers.resize":
21536
21537type InstanceGroupManagersResizeCall struct {
21538	s                    *Service
21539	project              string
21540	zone                 string
21541	instanceGroupManager string
21542	urlParams_           gensupport.URLParams
21543	ctx_                 context.Context
21544}
21545
21546// Resize: Resizes the managed instance group. If you increase the size,
21547// the group creates new instances using the current instance template.
21548// If you decrease the size, the group deletes instances. The resize
21549// operation is marked DONE when the resize actions are scheduled even
21550// if the group has not yet added or deleted any instances. You must
21551// separately verify the status of the creating or deleting actions with
21552// the listmanagedinstances method.
21553func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall {
21554	c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21555	c.project = project
21556	c.zone = zone
21557	c.instanceGroupManager = instanceGroupManager
21558	c.urlParams_.Set("size", fmt.Sprint(size))
21559	return c
21560}
21561
21562// Fields allows partial responses to be retrieved. See
21563// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21564// for more information.
21565func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall {
21566	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21567	return c
21568}
21569
21570// Context sets the context to be used in this call's Do method. Any
21571// pending HTTP request will be aborted if the provided context is
21572// canceled.
21573func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall {
21574	c.ctx_ = ctx
21575	return c
21576}
21577
21578func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) {
21579	var body io.Reader = nil
21580	c.urlParams_.Set("alt", alt)
21581	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize")
21582	urls += "?" + c.urlParams_.Encode()
21583	req, _ := http.NewRequest("POST", urls, body)
21584	googleapi.Expand(req.URL, map[string]string{
21585		"project":              c.project,
21586		"zone":                 c.zone,
21587		"instanceGroupManager": c.instanceGroupManager,
21588	})
21589	req.Header.Set("User-Agent", c.s.userAgent())
21590	if c.ctx_ != nil {
21591		return ctxhttp.Do(c.ctx_, c.s.client, req)
21592	}
21593	return c.s.client.Do(req)
21594}
21595
21596// Do executes the "compute.instanceGroupManagers.resize" call.
21597// Exactly one of *Operation or error will be non-nil. Any non-2xx
21598// status code is an error. Response headers are in either
21599// *Operation.ServerResponse.Header or (if a response was returned at
21600// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21601// to check whether the returned error was because
21602// http.StatusNotModified was returned.
21603func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21604	gensupport.SetOptions(c.urlParams_, opts...)
21605	res, err := c.doRequest("json")
21606	if res != nil && res.StatusCode == http.StatusNotModified {
21607		if res.Body != nil {
21608			res.Body.Close()
21609		}
21610		return nil, &googleapi.Error{
21611			Code:   res.StatusCode,
21612			Header: res.Header,
21613		}
21614	}
21615	if err != nil {
21616		return nil, err
21617	}
21618	defer googleapi.CloseBody(res)
21619	if err := googleapi.CheckResponse(res); err != nil {
21620		return nil, err
21621	}
21622	ret := &Operation{
21623		ServerResponse: googleapi.ServerResponse{
21624			Header:         res.Header,
21625			HTTPStatusCode: res.StatusCode,
21626		},
21627	}
21628	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21629		return nil, err
21630	}
21631	return ret, nil
21632	// {
21633	//   "description": "Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.",
21634	//   "httpMethod": "POST",
21635	//   "id": "compute.instanceGroupManagers.resize",
21636	//   "parameterOrder": [
21637	//     "project",
21638	//     "zone",
21639	//     "instanceGroupManager",
21640	//     "size"
21641	//   ],
21642	//   "parameters": {
21643	//     "instanceGroupManager": {
21644	//       "description": "The name of the managed instance group.",
21645	//       "location": "path",
21646	//       "required": true,
21647	//       "type": "string"
21648	//     },
21649	//     "project": {
21650	//       "description": "Project ID for this request.",
21651	//       "location": "path",
21652	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21653	//       "required": true,
21654	//       "type": "string"
21655	//     },
21656	//     "size": {
21657	//       "description": "The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter.",
21658	//       "format": "int32",
21659	//       "location": "query",
21660	//       "required": true,
21661	//       "type": "integer"
21662	//     },
21663	//     "zone": {
21664	//       "description": "The name of the zone where the managed instance group is located.",
21665	//       "location": "path",
21666	//       "required": true,
21667	//       "type": "string"
21668	//     }
21669	//   },
21670	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize",
21671	//   "response": {
21672	//     "$ref": "Operation"
21673	//   },
21674	//   "scopes": [
21675	//     "https://www.googleapis.com/auth/cloud-platform",
21676	//     "https://www.googleapis.com/auth/compute"
21677	//   ]
21678	// }
21679
21680}
21681
21682// method id "compute.instanceGroupManagers.setInstanceTemplate":
21683
21684type InstanceGroupManagersSetInstanceTemplateCall struct {
21685	s                                               *Service
21686	project                                         string
21687	zone                                            string
21688	instanceGroupManager                            string
21689	instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest
21690	urlParams_                                      gensupport.URLParams
21691	ctx_                                            context.Context
21692}
21693
21694// SetInstanceTemplate: Specifies the instance template to use when
21695// creating new instances in this group. The templates for existing
21696// instances in the group do not change unless you recreate them.
21697func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall {
21698	c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21699	c.project = project
21700	c.zone = zone
21701	c.instanceGroupManager = instanceGroupManager
21702	c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest
21703	return c
21704}
21705
21706// Fields allows partial responses to be retrieved. See
21707// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21708// for more information.
21709func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall {
21710	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21711	return c
21712}
21713
21714// Context sets the context to be used in this call's Do method. Any
21715// pending HTTP request will be aborted if the provided context is
21716// canceled.
21717func (c *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall {
21718	c.ctx_ = ctx
21719	return c
21720}
21721
21722func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) {
21723	var body io.Reader = nil
21724	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest)
21725	if err != nil {
21726		return nil, err
21727	}
21728	ctype := "application/json"
21729	c.urlParams_.Set("alt", alt)
21730	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate")
21731	urls += "?" + c.urlParams_.Encode()
21732	req, _ := http.NewRequest("POST", urls, body)
21733	googleapi.Expand(req.URL, map[string]string{
21734		"project":              c.project,
21735		"zone":                 c.zone,
21736		"instanceGroupManager": c.instanceGroupManager,
21737	})
21738	req.Header.Set("Content-Type", ctype)
21739	req.Header.Set("User-Agent", c.s.userAgent())
21740	if c.ctx_ != nil {
21741		return ctxhttp.Do(c.ctx_, c.s.client, req)
21742	}
21743	return c.s.client.Do(req)
21744}
21745
21746// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call.
21747// Exactly one of *Operation or error will be non-nil. Any non-2xx
21748// status code is an error. Response headers are in either
21749// *Operation.ServerResponse.Header or (if a response was returned at
21750// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21751// to check whether the returned error was because
21752// http.StatusNotModified was returned.
21753func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21754	gensupport.SetOptions(c.urlParams_, opts...)
21755	res, err := c.doRequest("json")
21756	if res != nil && res.StatusCode == http.StatusNotModified {
21757		if res.Body != nil {
21758			res.Body.Close()
21759		}
21760		return nil, &googleapi.Error{
21761			Code:   res.StatusCode,
21762			Header: res.Header,
21763		}
21764	}
21765	if err != nil {
21766		return nil, err
21767	}
21768	defer googleapi.CloseBody(res)
21769	if err := googleapi.CheckResponse(res); err != nil {
21770		return nil, err
21771	}
21772	ret := &Operation{
21773		ServerResponse: googleapi.ServerResponse{
21774			Header:         res.Header,
21775			HTTPStatusCode: res.StatusCode,
21776		},
21777	}
21778	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21779		return nil, err
21780	}
21781	return ret, nil
21782	// {
21783	//   "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them.",
21784	//   "httpMethod": "POST",
21785	//   "id": "compute.instanceGroupManagers.setInstanceTemplate",
21786	//   "parameterOrder": [
21787	//     "project",
21788	//     "zone",
21789	//     "instanceGroupManager"
21790	//   ],
21791	//   "parameters": {
21792	//     "instanceGroupManager": {
21793	//       "description": "The name of the managed instance group.",
21794	//       "location": "path",
21795	//       "required": true,
21796	//       "type": "string"
21797	//     },
21798	//     "project": {
21799	//       "description": "Project ID for this request.",
21800	//       "location": "path",
21801	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21802	//       "required": true,
21803	//       "type": "string"
21804	//     },
21805	//     "zone": {
21806	//       "description": "The name of the zone where the managed instance group is located.",
21807	//       "location": "path",
21808	//       "required": true,
21809	//       "type": "string"
21810	//     }
21811	//   },
21812	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate",
21813	//   "request": {
21814	//     "$ref": "InstanceGroupManagersSetInstanceTemplateRequest"
21815	//   },
21816	//   "response": {
21817	//     "$ref": "Operation"
21818	//   },
21819	//   "scopes": [
21820	//     "https://www.googleapis.com/auth/cloud-platform",
21821	//     "https://www.googleapis.com/auth/compute"
21822	//   ]
21823	// }
21824
21825}
21826
21827// method id "compute.instanceGroupManagers.setTargetPools":
21828
21829type InstanceGroupManagersSetTargetPoolsCall struct {
21830	s                                          *Service
21831	project                                    string
21832	zone                                       string
21833	instanceGroupManager                       string
21834	instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest
21835	urlParams_                                 gensupport.URLParams
21836	ctx_                                       context.Context
21837}
21838
21839// SetTargetPools: Modifies the target pools to which all instances in
21840// this managed instance group are assigned. The target pools
21841// automatically apply to all of the instances in the managed instance
21842// group. This operation is marked DONE when you make the request even
21843// if the instances have not yet been added to their target pools. The
21844// change might take some time to apply to all of the instances in the
21845// group depending on the size of the group.
21846func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall {
21847	c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21848	c.project = project
21849	c.zone = zone
21850	c.instanceGroupManager = instanceGroupManager
21851	c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest
21852	return c
21853}
21854
21855// Fields allows partial responses to be retrieved. See
21856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21857// for more information.
21858func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall {
21859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21860	return c
21861}
21862
21863// Context sets the context to be used in this call's Do method. Any
21864// pending HTTP request will be aborted if the provided context is
21865// canceled.
21866func (c *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall {
21867	c.ctx_ = ctx
21868	return c
21869}
21870
21871func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) {
21872	var body io.Reader = nil
21873	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest)
21874	if err != nil {
21875		return nil, err
21876	}
21877	ctype := "application/json"
21878	c.urlParams_.Set("alt", alt)
21879	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools")
21880	urls += "?" + c.urlParams_.Encode()
21881	req, _ := http.NewRequest("POST", urls, body)
21882	googleapi.Expand(req.URL, map[string]string{
21883		"project":              c.project,
21884		"zone":                 c.zone,
21885		"instanceGroupManager": c.instanceGroupManager,
21886	})
21887	req.Header.Set("Content-Type", ctype)
21888	req.Header.Set("User-Agent", c.s.userAgent())
21889	if c.ctx_ != nil {
21890		return ctxhttp.Do(c.ctx_, c.s.client, req)
21891	}
21892	return c.s.client.Do(req)
21893}
21894
21895// Do executes the "compute.instanceGroupManagers.setTargetPools" call.
21896// Exactly one of *Operation or error will be non-nil. Any non-2xx
21897// status code is an error. Response headers are in either
21898// *Operation.ServerResponse.Header or (if a response was returned at
21899// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21900// to check whether the returned error was because
21901// http.StatusNotModified was returned.
21902func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21903	gensupport.SetOptions(c.urlParams_, opts...)
21904	res, err := c.doRequest("json")
21905	if res != nil && res.StatusCode == http.StatusNotModified {
21906		if res.Body != nil {
21907			res.Body.Close()
21908		}
21909		return nil, &googleapi.Error{
21910			Code:   res.StatusCode,
21911			Header: res.Header,
21912		}
21913	}
21914	if err != nil {
21915		return nil, err
21916	}
21917	defer googleapi.CloseBody(res)
21918	if err := googleapi.CheckResponse(res); err != nil {
21919		return nil, err
21920	}
21921	ret := &Operation{
21922		ServerResponse: googleapi.ServerResponse{
21923			Header:         res.Header,
21924			HTTPStatusCode: res.StatusCode,
21925		},
21926	}
21927	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21928		return nil, err
21929	}
21930	return ret, nil
21931	// {
21932	//   "description": "Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.",
21933	//   "httpMethod": "POST",
21934	//   "id": "compute.instanceGroupManagers.setTargetPools",
21935	//   "parameterOrder": [
21936	//     "project",
21937	//     "zone",
21938	//     "instanceGroupManager"
21939	//   ],
21940	//   "parameters": {
21941	//     "instanceGroupManager": {
21942	//       "description": "The name of the managed instance group.",
21943	//       "location": "path",
21944	//       "required": true,
21945	//       "type": "string"
21946	//     },
21947	//     "project": {
21948	//       "description": "Project ID for this request.",
21949	//       "location": "path",
21950	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21951	//       "required": true,
21952	//       "type": "string"
21953	//     },
21954	//     "zone": {
21955	//       "description": "The name of the zone where the managed instance group is located.",
21956	//       "location": "path",
21957	//       "required": true,
21958	//       "type": "string"
21959	//     }
21960	//   },
21961	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools",
21962	//   "request": {
21963	//     "$ref": "InstanceGroupManagersSetTargetPoolsRequest"
21964	//   },
21965	//   "response": {
21966	//     "$ref": "Operation"
21967	//   },
21968	//   "scopes": [
21969	//     "https://www.googleapis.com/auth/cloud-platform",
21970	//     "https://www.googleapis.com/auth/compute"
21971	//   ]
21972	// }
21973
21974}
21975
21976// method id "compute.instanceGroups.addInstances":
21977
21978type InstanceGroupsAddInstancesCall struct {
21979	s                                 *Service
21980	project                           string
21981	zone                              string
21982	instanceGroup                     string
21983	instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest
21984	urlParams_                        gensupport.URLParams
21985	ctx_                              context.Context
21986}
21987
21988// AddInstances: Adds a list of instances to the specified instance
21989// group. All of the instances in the instance group must be in the same
21990// network/subnetwork. Read  Adding instances for more information.
21991func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall {
21992	c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21993	c.project = project
21994	c.zone = zone
21995	c.instanceGroup = instanceGroup
21996	c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest
21997	return c
21998}
21999
22000// Fields allows partial responses to be retrieved. See
22001// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22002// for more information.
22003func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall {
22004	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22005	return c
22006}
22007
22008// Context sets the context to be used in this call's Do method. Any
22009// pending HTTP request will be aborted if the provided context is
22010// canceled.
22011func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall {
22012	c.ctx_ = ctx
22013	return c
22014}
22015
22016func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) {
22017	var body io.Reader = nil
22018	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest)
22019	if err != nil {
22020		return nil, err
22021	}
22022	ctype := "application/json"
22023	c.urlParams_.Set("alt", alt)
22024	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances")
22025	urls += "?" + c.urlParams_.Encode()
22026	req, _ := http.NewRequest("POST", urls, body)
22027	googleapi.Expand(req.URL, map[string]string{
22028		"project":       c.project,
22029		"zone":          c.zone,
22030		"instanceGroup": c.instanceGroup,
22031	})
22032	req.Header.Set("Content-Type", ctype)
22033	req.Header.Set("User-Agent", c.s.userAgent())
22034	if c.ctx_ != nil {
22035		return ctxhttp.Do(c.ctx_, c.s.client, req)
22036	}
22037	return c.s.client.Do(req)
22038}
22039
22040// Do executes the "compute.instanceGroups.addInstances" call.
22041// Exactly one of *Operation or error will be non-nil. Any non-2xx
22042// status code is an error. Response headers are in either
22043// *Operation.ServerResponse.Header or (if a response was returned at
22044// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22045// to check whether the returned error was because
22046// http.StatusNotModified was returned.
22047func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22048	gensupport.SetOptions(c.urlParams_, opts...)
22049	res, err := c.doRequest("json")
22050	if res != nil && res.StatusCode == http.StatusNotModified {
22051		if res.Body != nil {
22052			res.Body.Close()
22053		}
22054		return nil, &googleapi.Error{
22055			Code:   res.StatusCode,
22056			Header: res.Header,
22057		}
22058	}
22059	if err != nil {
22060		return nil, err
22061	}
22062	defer googleapi.CloseBody(res)
22063	if err := googleapi.CheckResponse(res); err != nil {
22064		return nil, err
22065	}
22066	ret := &Operation{
22067		ServerResponse: googleapi.ServerResponse{
22068			Header:         res.Header,
22069			HTTPStatusCode: res.StatusCode,
22070		},
22071	}
22072	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22073		return nil, err
22074	}
22075	return ret, nil
22076	// {
22077	//   "description": "Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read  Adding instances for more information.",
22078	//   "httpMethod": "POST",
22079	//   "id": "compute.instanceGroups.addInstances",
22080	//   "parameterOrder": [
22081	//     "project",
22082	//     "zone",
22083	//     "instanceGroup"
22084	//   ],
22085	//   "parameters": {
22086	//     "instanceGroup": {
22087	//       "description": "The name of the instance group where you are adding instances.",
22088	//       "location": "path",
22089	//       "required": true,
22090	//       "type": "string"
22091	//     },
22092	//     "project": {
22093	//       "description": "Project ID for this request.",
22094	//       "location": "path",
22095	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22096	//       "required": true,
22097	//       "type": "string"
22098	//     },
22099	//     "zone": {
22100	//       "description": "The name of the zone where the instance group is located.",
22101	//       "location": "path",
22102	//       "required": true,
22103	//       "type": "string"
22104	//     }
22105	//   },
22106	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances",
22107	//   "request": {
22108	//     "$ref": "InstanceGroupsAddInstancesRequest"
22109	//   },
22110	//   "response": {
22111	//     "$ref": "Operation"
22112	//   },
22113	//   "scopes": [
22114	//     "https://www.googleapis.com/auth/cloud-platform",
22115	//     "https://www.googleapis.com/auth/compute"
22116	//   ]
22117	// }
22118
22119}
22120
22121// method id "compute.instanceGroups.aggregatedList":
22122
22123type InstanceGroupsAggregatedListCall struct {
22124	s            *Service
22125	project      string
22126	urlParams_   gensupport.URLParams
22127	ifNoneMatch_ string
22128	ctx_         context.Context
22129}
22130
22131// AggregatedList: Retrieves the list of instance groups and sorts them
22132// by zone.
22133func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall {
22134	c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22135	c.project = project
22136	return c
22137}
22138
22139// Filter sets the optional parameter "filter": Sets a filter expression
22140// for filtering listed resources, in the form filter={expression}. Your
22141// {expression} must be in the format: field_name comparison_string
22142// literal_string.
22143//
22144// The field_name is the name of the field you want to compare. Only
22145// atomic field types are supported (string, number, boolean). The
22146// comparison_string must be either eq (equals) or ne (not equals). The
22147// literal_string is the string value to filter to. The literal value
22148// must be valid for the type of field you are filtering by (string,
22149// number, boolean). For string fields, the literal value is interpreted
22150// as a regular expression using RE2 syntax. The literal value must
22151// match the entire field.
22152//
22153// For example, to filter for instances that do not have a name of
22154// example-instance, you would use filter=name ne
22155// example-instance.
22156//
22157// Compute Engine Beta API Only: If you use filtering in the Beta API,
22158// you can also filter on nested fields. For example, you could filter
22159// on instances that have set the scheduling.automaticRestart field to
22160// true. In particular, use filtering on nested fields to take advantage
22161// of instance labels to organize and filter results based on label
22162// values.
22163//
22164// The Beta API also supports filtering on multiple expressions by
22165// providing each separate expression within parentheses. For example,
22166// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
22167// Multiple expressions are treated as AND expressions, meaning that
22168// resources must match all expressions to pass the filters.
22169func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall {
22170	c.urlParams_.Set("filter", filter)
22171	return c
22172}
22173
22174// MaxResults sets the optional parameter "maxResults": The maximum
22175// number of results per page that should be returned. If the number of
22176// available results is larger than maxResults, Compute Engine returns a
22177// nextPageToken that can be used to get the next page of results in
22178// subsequent list requests.
22179func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall {
22180	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22181	return c
22182}
22183
22184// PageToken sets the optional parameter "pageToken": Specifies a page
22185// token to use. Set pageToken to the nextPageToken returned by a
22186// previous list request to get the next page of results.
22187func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall {
22188	c.urlParams_.Set("pageToken", pageToken)
22189	return c
22190}
22191
22192// Fields allows partial responses to be retrieved. See
22193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22194// for more information.
22195func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall {
22196	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22197	return c
22198}
22199
22200// IfNoneMatch sets the optional parameter which makes the operation
22201// fail if the object's ETag matches the given value. This is useful for
22202// getting updates only after the object has changed since the last
22203// request. Use googleapi.IsNotModified to check whether the response
22204// error from Do is the result of In-None-Match.
22205func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall {
22206	c.ifNoneMatch_ = entityTag
22207	return c
22208}
22209
22210// Context sets the context to be used in this call's Do method. Any
22211// pending HTTP request will be aborted if the provided context is
22212// canceled.
22213func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall {
22214	c.ctx_ = ctx
22215	return c
22216}
22217
22218func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
22219	var body io.Reader = nil
22220	c.urlParams_.Set("alt", alt)
22221	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroups")
22222	urls += "?" + c.urlParams_.Encode()
22223	req, _ := http.NewRequest("GET", urls, body)
22224	googleapi.Expand(req.URL, map[string]string{
22225		"project": c.project,
22226	})
22227	req.Header.Set("User-Agent", c.s.userAgent())
22228	if c.ifNoneMatch_ != "" {
22229		req.Header.Set("If-None-Match", c.ifNoneMatch_)
22230	}
22231	if c.ctx_ != nil {
22232		return ctxhttp.Do(c.ctx_, c.s.client, req)
22233	}
22234	return c.s.client.Do(req)
22235}
22236
22237// Do executes the "compute.instanceGroups.aggregatedList" call.
22238// Exactly one of *InstanceGroupAggregatedList or error will be non-nil.
22239// Any non-2xx status code is an error. Response headers are in either
22240// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response
22241// was returned at all) in error.(*googleapi.Error).Header. Use
22242// googleapi.IsNotModified to check whether the returned error was
22243// because http.StatusNotModified was returned.
22244func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) {
22245	gensupport.SetOptions(c.urlParams_, opts...)
22246	res, err := c.doRequest("json")
22247	if res != nil && res.StatusCode == http.StatusNotModified {
22248		if res.Body != nil {
22249			res.Body.Close()
22250		}
22251		return nil, &googleapi.Error{
22252			Code:   res.StatusCode,
22253			Header: res.Header,
22254		}
22255	}
22256	if err != nil {
22257		return nil, err
22258	}
22259	defer googleapi.CloseBody(res)
22260	if err := googleapi.CheckResponse(res); err != nil {
22261		return nil, err
22262	}
22263	ret := &InstanceGroupAggregatedList{
22264		ServerResponse: googleapi.ServerResponse{
22265			Header:         res.Header,
22266			HTTPStatusCode: res.StatusCode,
22267		},
22268	}
22269	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22270		return nil, err
22271	}
22272	return ret, nil
22273	// {
22274	//   "description": "Retrieves the list of instance groups and sorts them by zone.",
22275	//   "httpMethod": "GET",
22276	//   "id": "compute.instanceGroups.aggregatedList",
22277	//   "parameterOrder": [
22278	//     "project"
22279	//   ],
22280	//   "parameters": {
22281	//     "filter": {
22282	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
22283	//       "location": "query",
22284	//       "type": "string"
22285	//     },
22286	//     "maxResults": {
22287	//       "default": "500",
22288	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
22289	//       "format": "uint32",
22290	//       "location": "query",
22291	//       "maximum": "500",
22292	//       "minimum": "0",
22293	//       "type": "integer"
22294	//     },
22295	//     "pageToken": {
22296	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
22297	//       "location": "query",
22298	//       "type": "string"
22299	//     },
22300	//     "project": {
22301	//       "description": "Project ID for this request.",
22302	//       "location": "path",
22303	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22304	//       "required": true,
22305	//       "type": "string"
22306	//     }
22307	//   },
22308	//   "path": "{project}/aggregated/instanceGroups",
22309	//   "response": {
22310	//     "$ref": "InstanceGroupAggregatedList"
22311	//   },
22312	//   "scopes": [
22313	//     "https://www.googleapis.com/auth/cloud-platform",
22314	//     "https://www.googleapis.com/auth/compute",
22315	//     "https://www.googleapis.com/auth/compute.readonly"
22316	//   ]
22317	// }
22318
22319}
22320
22321// Pages invokes f for each page of results.
22322// A non-nil error returned from f will halt the iteration.
22323// The provided context supersedes any context provided to the Context method.
22324func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error {
22325	c.ctx_ = ctx
22326	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22327	for {
22328		x, err := c.Do()
22329		if err != nil {
22330			return err
22331		}
22332		if err := f(x); err != nil {
22333			return err
22334		}
22335		if x.NextPageToken == "" {
22336			return nil
22337		}
22338		c.PageToken(x.NextPageToken)
22339	}
22340}
22341
22342// method id "compute.instanceGroups.delete":
22343
22344type InstanceGroupsDeleteCall struct {
22345	s             *Service
22346	project       string
22347	zone          string
22348	instanceGroup string
22349	urlParams_    gensupport.URLParams
22350	ctx_          context.Context
22351}
22352
22353// Delete: Deletes the specified instance group. The instances in the
22354// group are not deleted. Note that instance group must not belong to a
22355// backend service. Read  Deleting an instance group for more
22356// information.
22357func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall {
22358	c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22359	c.project = project
22360	c.zone = zone
22361	c.instanceGroup = instanceGroup
22362	return c
22363}
22364
22365// Fields allows partial responses to be retrieved. See
22366// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22367// for more information.
22368func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall {
22369	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22370	return c
22371}
22372
22373// Context sets the context to be used in this call's Do method. Any
22374// pending HTTP request will be aborted if the provided context is
22375// canceled.
22376func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall {
22377	c.ctx_ = ctx
22378	return c
22379}
22380
22381func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
22382	var body io.Reader = nil
22383	c.urlParams_.Set("alt", alt)
22384	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}")
22385	urls += "?" + c.urlParams_.Encode()
22386	req, _ := http.NewRequest("DELETE", urls, body)
22387	googleapi.Expand(req.URL, map[string]string{
22388		"project":       c.project,
22389		"zone":          c.zone,
22390		"instanceGroup": c.instanceGroup,
22391	})
22392	req.Header.Set("User-Agent", c.s.userAgent())
22393	if c.ctx_ != nil {
22394		return ctxhttp.Do(c.ctx_, c.s.client, req)
22395	}
22396	return c.s.client.Do(req)
22397}
22398
22399// Do executes the "compute.instanceGroups.delete" call.
22400// Exactly one of *Operation or error will be non-nil. Any non-2xx
22401// status code is an error. Response headers are in either
22402// *Operation.ServerResponse.Header or (if a response was returned at
22403// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22404// to check whether the returned error was because
22405// http.StatusNotModified was returned.
22406func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22407	gensupport.SetOptions(c.urlParams_, opts...)
22408	res, err := c.doRequest("json")
22409	if res != nil && res.StatusCode == http.StatusNotModified {
22410		if res.Body != nil {
22411			res.Body.Close()
22412		}
22413		return nil, &googleapi.Error{
22414			Code:   res.StatusCode,
22415			Header: res.Header,
22416		}
22417	}
22418	if err != nil {
22419		return nil, err
22420	}
22421	defer googleapi.CloseBody(res)
22422	if err := googleapi.CheckResponse(res); err != nil {
22423		return nil, err
22424	}
22425	ret := &Operation{
22426		ServerResponse: googleapi.ServerResponse{
22427			Header:         res.Header,
22428			HTTPStatusCode: res.StatusCode,
22429		},
22430	}
22431	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22432		return nil, err
22433	}
22434	return ret, nil
22435	// {
22436	//   "description": "Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read  Deleting an instance group for more information.",
22437	//   "httpMethod": "DELETE",
22438	//   "id": "compute.instanceGroups.delete",
22439	//   "parameterOrder": [
22440	//     "project",
22441	//     "zone",
22442	//     "instanceGroup"
22443	//   ],
22444	//   "parameters": {
22445	//     "instanceGroup": {
22446	//       "description": "The name of the instance group to delete.",
22447	//       "location": "path",
22448	//       "required": true,
22449	//       "type": "string"
22450	//     },
22451	//     "project": {
22452	//       "description": "Project ID for this request.",
22453	//       "location": "path",
22454	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22455	//       "required": true,
22456	//       "type": "string"
22457	//     },
22458	//     "zone": {
22459	//       "description": "The name of the zone where the instance group is located.",
22460	//       "location": "path",
22461	//       "required": true,
22462	//       "type": "string"
22463	//     }
22464	//   },
22465	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}",
22466	//   "response": {
22467	//     "$ref": "Operation"
22468	//   },
22469	//   "scopes": [
22470	//     "https://www.googleapis.com/auth/cloud-platform",
22471	//     "https://www.googleapis.com/auth/compute"
22472	//   ]
22473	// }
22474
22475}
22476
22477// method id "compute.instanceGroups.get":
22478
22479type InstanceGroupsGetCall struct {
22480	s             *Service
22481	project       string
22482	zone          string
22483	instanceGroup string
22484	urlParams_    gensupport.URLParams
22485	ifNoneMatch_  string
22486	ctx_          context.Context
22487}
22488
22489// Get: Returns the specified instance group. Get a list of available
22490// instance groups by making a list() request.
22491func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall {
22492	c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22493	c.project = project
22494	c.zone = zone
22495	c.instanceGroup = instanceGroup
22496	return c
22497}
22498
22499// Fields allows partial responses to be retrieved. See
22500// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22501// for more information.
22502func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall {
22503	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22504	return c
22505}
22506
22507// IfNoneMatch sets the optional parameter which makes the operation
22508// fail if the object's ETag matches the given value. This is useful for
22509// getting updates only after the object has changed since the last
22510// request. Use googleapi.IsNotModified to check whether the response
22511// error from Do is the result of In-None-Match.
22512func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall {
22513	c.ifNoneMatch_ = entityTag
22514	return c
22515}
22516
22517// Context sets the context to be used in this call's Do method. Any
22518// pending HTTP request will be aborted if the provided context is
22519// canceled.
22520func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall {
22521	c.ctx_ = ctx
22522	return c
22523}
22524
22525func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) {
22526	var body io.Reader = nil
22527	c.urlParams_.Set("alt", alt)
22528	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}")
22529	urls += "?" + c.urlParams_.Encode()
22530	req, _ := http.NewRequest("GET", urls, body)
22531	googleapi.Expand(req.URL, map[string]string{
22532		"project":       c.project,
22533		"zone":          c.zone,
22534		"instanceGroup": c.instanceGroup,
22535	})
22536	req.Header.Set("User-Agent", c.s.userAgent())
22537	if c.ifNoneMatch_ != "" {
22538		req.Header.Set("If-None-Match", c.ifNoneMatch_)
22539	}
22540	if c.ctx_ != nil {
22541		return ctxhttp.Do(c.ctx_, c.s.client, req)
22542	}
22543	return c.s.client.Do(req)
22544}
22545
22546// Do executes the "compute.instanceGroups.get" call.
22547// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx
22548// status code is an error. Response headers are in either
22549// *InstanceGroup.ServerResponse.Header or (if a response was returned
22550// at all) in error.(*googleapi.Error).Header. Use
22551// googleapi.IsNotModified to check whether the returned error was
22552// because http.StatusNotModified was returned.
22553func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) {
22554	gensupport.SetOptions(c.urlParams_, opts...)
22555	res, err := c.doRequest("json")
22556	if res != nil && res.StatusCode == http.StatusNotModified {
22557		if res.Body != nil {
22558			res.Body.Close()
22559		}
22560		return nil, &googleapi.Error{
22561			Code:   res.StatusCode,
22562			Header: res.Header,
22563		}
22564	}
22565	if err != nil {
22566		return nil, err
22567	}
22568	defer googleapi.CloseBody(res)
22569	if err := googleapi.CheckResponse(res); err != nil {
22570		return nil, err
22571	}
22572	ret := &InstanceGroup{
22573		ServerResponse: googleapi.ServerResponse{
22574			Header:         res.Header,
22575			HTTPStatusCode: res.StatusCode,
22576		},
22577	}
22578	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22579		return nil, err
22580	}
22581	return ret, nil
22582	// {
22583	//   "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.",
22584	//   "httpMethod": "GET",
22585	//   "id": "compute.instanceGroups.get",
22586	//   "parameterOrder": [
22587	//     "project",
22588	//     "zone",
22589	//     "instanceGroup"
22590	//   ],
22591	//   "parameters": {
22592	//     "instanceGroup": {
22593	//       "description": "The name of the instance group.",
22594	//       "location": "path",
22595	//       "required": true,
22596	//       "type": "string"
22597	//     },
22598	//     "project": {
22599	//       "description": "Project ID for this request.",
22600	//       "location": "path",
22601	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22602	//       "required": true,
22603	//       "type": "string"
22604	//     },
22605	//     "zone": {
22606	//       "description": "The name of the zone where the instance group is located.",
22607	//       "location": "path",
22608	//       "required": true,
22609	//       "type": "string"
22610	//     }
22611	//   },
22612	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}",
22613	//   "response": {
22614	//     "$ref": "InstanceGroup"
22615	//   },
22616	//   "scopes": [
22617	//     "https://www.googleapis.com/auth/cloud-platform",
22618	//     "https://www.googleapis.com/auth/compute",
22619	//     "https://www.googleapis.com/auth/compute.readonly"
22620	//   ]
22621	// }
22622
22623}
22624
22625// method id "compute.instanceGroups.insert":
22626
22627type InstanceGroupsInsertCall struct {
22628	s             *Service
22629	project       string
22630	zone          string
22631	instancegroup *InstanceGroup
22632	urlParams_    gensupport.URLParams
22633	ctx_          context.Context
22634}
22635
22636// Insert: Creates an instance group in the specified project using the
22637// parameters that are included in the request.
22638func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall {
22639	c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22640	c.project = project
22641	c.zone = zone
22642	c.instancegroup = instancegroup
22643	return c
22644}
22645
22646// Fields allows partial responses to be retrieved. See
22647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22648// for more information.
22649func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall {
22650	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22651	return c
22652}
22653
22654// Context sets the context to be used in this call's Do method. Any
22655// pending HTTP request will be aborted if the provided context is
22656// canceled.
22657func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall {
22658	c.ctx_ = ctx
22659	return c
22660}
22661
22662func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
22663	var body io.Reader = nil
22664	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup)
22665	if err != nil {
22666		return nil, err
22667	}
22668	ctype := "application/json"
22669	c.urlParams_.Set("alt", alt)
22670	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups")
22671	urls += "?" + c.urlParams_.Encode()
22672	req, _ := http.NewRequest("POST", urls, body)
22673	googleapi.Expand(req.URL, map[string]string{
22674		"project": c.project,
22675		"zone":    c.zone,
22676	})
22677	req.Header.Set("Content-Type", ctype)
22678	req.Header.Set("User-Agent", c.s.userAgent())
22679	if c.ctx_ != nil {
22680		return ctxhttp.Do(c.ctx_, c.s.client, req)
22681	}
22682	return c.s.client.Do(req)
22683}
22684
22685// Do executes the "compute.instanceGroups.insert" call.
22686// Exactly one of *Operation or error will be non-nil. Any non-2xx
22687// status code is an error. Response headers are in either
22688// *Operation.ServerResponse.Header or (if a response was returned at
22689// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22690// to check whether the returned error was because
22691// http.StatusNotModified was returned.
22692func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22693	gensupport.SetOptions(c.urlParams_, opts...)
22694	res, err := c.doRequest("json")
22695	if res != nil && res.StatusCode == http.StatusNotModified {
22696		if res.Body != nil {
22697			res.Body.Close()
22698		}
22699		return nil, &googleapi.Error{
22700			Code:   res.StatusCode,
22701			Header: res.Header,
22702		}
22703	}
22704	if err != nil {
22705		return nil, err
22706	}
22707	defer googleapi.CloseBody(res)
22708	if err := googleapi.CheckResponse(res); err != nil {
22709		return nil, err
22710	}
22711	ret := &Operation{
22712		ServerResponse: googleapi.ServerResponse{
22713			Header:         res.Header,
22714			HTTPStatusCode: res.StatusCode,
22715		},
22716	}
22717	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22718		return nil, err
22719	}
22720	return ret, nil
22721	// {
22722	//   "description": "Creates an instance group in the specified project using the parameters that are included in the request.",
22723	//   "httpMethod": "POST",
22724	//   "id": "compute.instanceGroups.insert",
22725	//   "parameterOrder": [
22726	//     "project",
22727	//     "zone"
22728	//   ],
22729	//   "parameters": {
22730	//     "project": {
22731	//       "description": "Project ID for this request.",
22732	//       "location": "path",
22733	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22734	//       "required": true,
22735	//       "type": "string"
22736	//     },
22737	//     "zone": {
22738	//       "description": "The name of the zone where you want to create the instance group.",
22739	//       "location": "path",
22740	//       "required": true,
22741	//       "type": "string"
22742	//     }
22743	//   },
22744	//   "path": "{project}/zones/{zone}/instanceGroups",
22745	//   "request": {
22746	//     "$ref": "InstanceGroup"
22747	//   },
22748	//   "response": {
22749	//     "$ref": "Operation"
22750	//   },
22751	//   "scopes": [
22752	//     "https://www.googleapis.com/auth/cloud-platform",
22753	//     "https://www.googleapis.com/auth/compute"
22754	//   ]
22755	// }
22756
22757}
22758
22759// method id "compute.instanceGroups.list":
22760
22761type InstanceGroupsListCall struct {
22762	s            *Service
22763	project      string
22764	zone         string
22765	urlParams_   gensupport.URLParams
22766	ifNoneMatch_ string
22767	ctx_         context.Context
22768}
22769
22770// List: Retrieves the list of instance groups that are located in the
22771// specified project and zone.
22772func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall {
22773	c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22774	c.project = project
22775	c.zone = zone
22776	return c
22777}
22778
22779// Filter sets the optional parameter "filter": Sets a filter expression
22780// for filtering listed resources, in the form filter={expression}. Your
22781// {expression} must be in the format: field_name comparison_string
22782// literal_string.
22783//
22784// The field_name is the name of the field you want to compare. Only
22785// atomic field types are supported (string, number, boolean). The
22786// comparison_string must be either eq (equals) or ne (not equals). The
22787// literal_string is the string value to filter to. The literal value
22788// must be valid for the type of field you are filtering by (string,
22789// number, boolean). For string fields, the literal value is interpreted
22790// as a regular expression using RE2 syntax. The literal value must
22791// match the entire field.
22792//
22793// For example, to filter for instances that do not have a name of
22794// example-instance, you would use filter=name ne
22795// example-instance.
22796//
22797// Compute Engine Beta API Only: If you use filtering in the Beta API,
22798// you can also filter on nested fields. For example, you could filter
22799// on instances that have set the scheduling.automaticRestart field to
22800// true. In particular, use filtering on nested fields to take advantage
22801// of instance labels to organize and filter results based on label
22802// values.
22803//
22804// The Beta API also supports filtering on multiple expressions by
22805// providing each separate expression within parentheses. For example,
22806// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
22807// Multiple expressions are treated as AND expressions, meaning that
22808// resources must match all expressions to pass the filters.
22809func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall {
22810	c.urlParams_.Set("filter", filter)
22811	return c
22812}
22813
22814// MaxResults sets the optional parameter "maxResults": The maximum
22815// number of results per page that should be returned. If the number of
22816// available results is larger than maxResults, Compute Engine returns a
22817// nextPageToken that can be used to get the next page of results in
22818// subsequent list requests.
22819func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall {
22820	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22821	return c
22822}
22823
22824// PageToken sets the optional parameter "pageToken": Specifies a page
22825// token to use. Set pageToken to the nextPageToken returned by a
22826// previous list request to get the next page of results.
22827func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall {
22828	c.urlParams_.Set("pageToken", pageToken)
22829	return c
22830}
22831
22832// Fields allows partial responses to be retrieved. See
22833// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22834// for more information.
22835func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall {
22836	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22837	return c
22838}
22839
22840// IfNoneMatch sets the optional parameter which makes the operation
22841// fail if the object's ETag matches the given value. This is useful for
22842// getting updates only after the object has changed since the last
22843// request. Use googleapi.IsNotModified to check whether the response
22844// error from Do is the result of In-None-Match.
22845func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall {
22846	c.ifNoneMatch_ = entityTag
22847	return c
22848}
22849
22850// Context sets the context to be used in this call's Do method. Any
22851// pending HTTP request will be aborted if the provided context is
22852// canceled.
22853func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall {
22854	c.ctx_ = ctx
22855	return c
22856}
22857
22858func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) {
22859	var body io.Reader = nil
22860	c.urlParams_.Set("alt", alt)
22861	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups")
22862	urls += "?" + c.urlParams_.Encode()
22863	req, _ := http.NewRequest("GET", urls, body)
22864	googleapi.Expand(req.URL, map[string]string{
22865		"project": c.project,
22866		"zone":    c.zone,
22867	})
22868	req.Header.Set("User-Agent", c.s.userAgent())
22869	if c.ifNoneMatch_ != "" {
22870		req.Header.Set("If-None-Match", c.ifNoneMatch_)
22871	}
22872	if c.ctx_ != nil {
22873		return ctxhttp.Do(c.ctx_, c.s.client, req)
22874	}
22875	return c.s.client.Do(req)
22876}
22877
22878// Do executes the "compute.instanceGroups.list" call.
22879// Exactly one of *InstanceGroupList or error will be non-nil. Any
22880// non-2xx status code is an error. Response headers are in either
22881// *InstanceGroupList.ServerResponse.Header or (if a response was
22882// returned at all) in error.(*googleapi.Error).Header. Use
22883// googleapi.IsNotModified to check whether the returned error was
22884// because http.StatusNotModified was returned.
22885func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) {
22886	gensupport.SetOptions(c.urlParams_, opts...)
22887	res, err := c.doRequest("json")
22888	if res != nil && res.StatusCode == http.StatusNotModified {
22889		if res.Body != nil {
22890			res.Body.Close()
22891		}
22892		return nil, &googleapi.Error{
22893			Code:   res.StatusCode,
22894			Header: res.Header,
22895		}
22896	}
22897	if err != nil {
22898		return nil, err
22899	}
22900	defer googleapi.CloseBody(res)
22901	if err := googleapi.CheckResponse(res); err != nil {
22902		return nil, err
22903	}
22904	ret := &InstanceGroupList{
22905		ServerResponse: googleapi.ServerResponse{
22906			Header:         res.Header,
22907			HTTPStatusCode: res.StatusCode,
22908		},
22909	}
22910	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22911		return nil, err
22912	}
22913	return ret, nil
22914	// {
22915	//   "description": "Retrieves the list of instance groups that are located in the specified project and zone.",
22916	//   "httpMethod": "GET",
22917	//   "id": "compute.instanceGroups.list",
22918	//   "parameterOrder": [
22919	//     "project",
22920	//     "zone"
22921	//   ],
22922	//   "parameters": {
22923	//     "filter": {
22924	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
22925	//       "location": "query",
22926	//       "type": "string"
22927	//     },
22928	//     "maxResults": {
22929	//       "default": "500",
22930	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
22931	//       "format": "uint32",
22932	//       "location": "query",
22933	//       "maximum": "500",
22934	//       "minimum": "0",
22935	//       "type": "integer"
22936	//     },
22937	//     "pageToken": {
22938	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
22939	//       "location": "query",
22940	//       "type": "string"
22941	//     },
22942	//     "project": {
22943	//       "description": "Project ID for this request.",
22944	//       "location": "path",
22945	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22946	//       "required": true,
22947	//       "type": "string"
22948	//     },
22949	//     "zone": {
22950	//       "description": "The name of the zone where the instance group is located.",
22951	//       "location": "path",
22952	//       "required": true,
22953	//       "type": "string"
22954	//     }
22955	//   },
22956	//   "path": "{project}/zones/{zone}/instanceGroups",
22957	//   "response": {
22958	//     "$ref": "InstanceGroupList"
22959	//   },
22960	//   "scopes": [
22961	//     "https://www.googleapis.com/auth/cloud-platform",
22962	//     "https://www.googleapis.com/auth/compute",
22963	//     "https://www.googleapis.com/auth/compute.readonly"
22964	//   ]
22965	// }
22966
22967}
22968
22969// Pages invokes f for each page of results.
22970// A non-nil error returned from f will halt the iteration.
22971// The provided context supersedes any context provided to the Context method.
22972func (c *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error {
22973	c.ctx_ = ctx
22974	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22975	for {
22976		x, err := c.Do()
22977		if err != nil {
22978			return err
22979		}
22980		if err := f(x); err != nil {
22981			return err
22982		}
22983		if x.NextPageToken == "" {
22984			return nil
22985		}
22986		c.PageToken(x.NextPageToken)
22987	}
22988}
22989
22990// method id "compute.instanceGroups.listInstances":
22991
22992type InstanceGroupsListInstancesCall struct {
22993	s                                  *Service
22994	project                            string
22995	zone                               string
22996	instanceGroup                      string
22997	instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest
22998	urlParams_                         gensupport.URLParams
22999	ctx_                               context.Context
23000}
23001
23002// ListInstances: Lists the instances in the specified instance group.
23003func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall {
23004	c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23005	c.project = project
23006	c.zone = zone
23007	c.instanceGroup = instanceGroup
23008	c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest
23009	return c
23010}
23011
23012// Filter sets the optional parameter "filter": Sets a filter expression
23013// for filtering listed resources, in the form filter={expression}. Your
23014// {expression} must be in the format: field_name comparison_string
23015// literal_string.
23016//
23017// The field_name is the name of the field you want to compare. Only
23018// atomic field types are supported (string, number, boolean). The
23019// comparison_string must be either eq (equals) or ne (not equals). The
23020// literal_string is the string value to filter to. The literal value
23021// must be valid for the type of field you are filtering by (string,
23022// number, boolean). For string fields, the literal value is interpreted
23023// as a regular expression using RE2 syntax. The literal value must
23024// match the entire field.
23025//
23026// For example, to filter for instances that do not have a name of
23027// example-instance, you would use filter=name ne
23028// example-instance.
23029//
23030// Compute Engine Beta API Only: If you use filtering in the Beta API,
23031// you can also filter on nested fields. For example, you could filter
23032// on instances that have set the scheduling.automaticRestart field to
23033// true. In particular, use filtering on nested fields to take advantage
23034// of instance labels to organize and filter results based on label
23035// values.
23036//
23037// The Beta API also supports filtering on multiple expressions by
23038// providing each separate expression within parentheses. For example,
23039// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
23040// Multiple expressions are treated as AND expressions, meaning that
23041// resources must match all expressions to pass the filters.
23042func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall {
23043	c.urlParams_.Set("filter", filter)
23044	return c
23045}
23046
23047// MaxResults sets the optional parameter "maxResults": The maximum
23048// number of results per page that should be returned. If the number of
23049// available results is larger than maxResults, Compute Engine returns a
23050// nextPageToken that can be used to get the next page of results in
23051// subsequent list requests.
23052func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall {
23053	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23054	return c
23055}
23056
23057// PageToken sets the optional parameter "pageToken": Specifies a page
23058// token to use. Set pageToken to the nextPageToken returned by a
23059// previous list request to get the next page of results.
23060func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall {
23061	c.urlParams_.Set("pageToken", pageToken)
23062	return c
23063}
23064
23065// Fields allows partial responses to be retrieved. See
23066// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23067// for more information.
23068func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall {
23069	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23070	return c
23071}
23072
23073// Context sets the context to be used in this call's Do method. Any
23074// pending HTTP request will be aborted if the provided context is
23075// canceled.
23076func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall {
23077	c.ctx_ = ctx
23078	return c
23079}
23080
23081func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) {
23082	var body io.Reader = nil
23083	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest)
23084	if err != nil {
23085		return nil, err
23086	}
23087	ctype := "application/json"
23088	c.urlParams_.Set("alt", alt)
23089	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances")
23090	urls += "?" + c.urlParams_.Encode()
23091	req, _ := http.NewRequest("POST", urls, body)
23092	googleapi.Expand(req.URL, map[string]string{
23093		"project":       c.project,
23094		"zone":          c.zone,
23095		"instanceGroup": c.instanceGroup,
23096	})
23097	req.Header.Set("Content-Type", ctype)
23098	req.Header.Set("User-Agent", c.s.userAgent())
23099	if c.ctx_ != nil {
23100		return ctxhttp.Do(c.ctx_, c.s.client, req)
23101	}
23102	return c.s.client.Do(req)
23103}
23104
23105// Do executes the "compute.instanceGroups.listInstances" call.
23106// Exactly one of *InstanceGroupsListInstances or error will be non-nil.
23107// Any non-2xx status code is an error. Response headers are in either
23108// *InstanceGroupsListInstances.ServerResponse.Header or (if a response
23109// was returned at all) in error.(*googleapi.Error).Header. Use
23110// googleapi.IsNotModified to check whether the returned error was
23111// because http.StatusNotModified was returned.
23112func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) {
23113	gensupport.SetOptions(c.urlParams_, opts...)
23114	res, err := c.doRequest("json")
23115	if res != nil && res.StatusCode == http.StatusNotModified {
23116		if res.Body != nil {
23117			res.Body.Close()
23118		}
23119		return nil, &googleapi.Error{
23120			Code:   res.StatusCode,
23121			Header: res.Header,
23122		}
23123	}
23124	if err != nil {
23125		return nil, err
23126	}
23127	defer googleapi.CloseBody(res)
23128	if err := googleapi.CheckResponse(res); err != nil {
23129		return nil, err
23130	}
23131	ret := &InstanceGroupsListInstances{
23132		ServerResponse: googleapi.ServerResponse{
23133			Header:         res.Header,
23134			HTTPStatusCode: res.StatusCode,
23135		},
23136	}
23137	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23138		return nil, err
23139	}
23140	return ret, nil
23141	// {
23142	//   "description": "Lists the instances in the specified instance group.",
23143	//   "httpMethod": "POST",
23144	//   "id": "compute.instanceGroups.listInstances",
23145	//   "parameterOrder": [
23146	//     "project",
23147	//     "zone",
23148	//     "instanceGroup"
23149	//   ],
23150	//   "parameters": {
23151	//     "filter": {
23152	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
23153	//       "location": "query",
23154	//       "type": "string"
23155	//     },
23156	//     "instanceGroup": {
23157	//       "description": "The name of the instance group from which you want to generate a list of included instances.",
23158	//       "location": "path",
23159	//       "required": true,
23160	//       "type": "string"
23161	//     },
23162	//     "maxResults": {
23163	//       "default": "500",
23164	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
23165	//       "format": "uint32",
23166	//       "location": "query",
23167	//       "maximum": "500",
23168	//       "minimum": "0",
23169	//       "type": "integer"
23170	//     },
23171	//     "pageToken": {
23172	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
23173	//       "location": "query",
23174	//       "type": "string"
23175	//     },
23176	//     "project": {
23177	//       "description": "Project ID for this request.",
23178	//       "location": "path",
23179	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23180	//       "required": true,
23181	//       "type": "string"
23182	//     },
23183	//     "zone": {
23184	//       "description": "The name of the zone where the instance group is located.",
23185	//       "location": "path",
23186	//       "required": true,
23187	//       "type": "string"
23188	//     }
23189	//   },
23190	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances",
23191	//   "request": {
23192	//     "$ref": "InstanceGroupsListInstancesRequest"
23193	//   },
23194	//   "response": {
23195	//     "$ref": "InstanceGroupsListInstances"
23196	//   },
23197	//   "scopes": [
23198	//     "https://www.googleapis.com/auth/cloud-platform",
23199	//     "https://www.googleapis.com/auth/compute",
23200	//     "https://www.googleapis.com/auth/compute.readonly"
23201	//   ]
23202	// }
23203
23204}
23205
23206// method id "compute.instanceGroups.removeInstances":
23207
23208type InstanceGroupsRemoveInstancesCall struct {
23209	s                                    *Service
23210	project                              string
23211	zone                                 string
23212	instanceGroup                        string
23213	instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest
23214	urlParams_                           gensupport.URLParams
23215	ctx_                                 context.Context
23216}
23217
23218// RemoveInstances: Removes one or more instances from the specified
23219// instance group, but does not delete those instances.
23220func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall {
23221	c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23222	c.project = project
23223	c.zone = zone
23224	c.instanceGroup = instanceGroup
23225	c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest
23226	return c
23227}
23228
23229// Fields allows partial responses to be retrieved. See
23230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23231// for more information.
23232func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall {
23233	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23234	return c
23235}
23236
23237// Context sets the context to be used in this call's Do method. Any
23238// pending HTTP request will be aborted if the provided context is
23239// canceled.
23240func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall {
23241	c.ctx_ = ctx
23242	return c
23243}
23244
23245func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) {
23246	var body io.Reader = nil
23247	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest)
23248	if err != nil {
23249		return nil, err
23250	}
23251	ctype := "application/json"
23252	c.urlParams_.Set("alt", alt)
23253	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances")
23254	urls += "?" + c.urlParams_.Encode()
23255	req, _ := http.NewRequest("POST", urls, body)
23256	googleapi.Expand(req.URL, map[string]string{
23257		"project":       c.project,
23258		"zone":          c.zone,
23259		"instanceGroup": c.instanceGroup,
23260	})
23261	req.Header.Set("Content-Type", ctype)
23262	req.Header.Set("User-Agent", c.s.userAgent())
23263	if c.ctx_ != nil {
23264		return ctxhttp.Do(c.ctx_, c.s.client, req)
23265	}
23266	return c.s.client.Do(req)
23267}
23268
23269// Do executes the "compute.instanceGroups.removeInstances" call.
23270// Exactly one of *Operation or error will be non-nil. Any non-2xx
23271// status code is an error. Response headers are in either
23272// *Operation.ServerResponse.Header or (if a response was returned at
23273// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23274// to check whether the returned error was because
23275// http.StatusNotModified was returned.
23276func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23277	gensupport.SetOptions(c.urlParams_, opts...)
23278	res, err := c.doRequest("json")
23279	if res != nil && res.StatusCode == http.StatusNotModified {
23280		if res.Body != nil {
23281			res.Body.Close()
23282		}
23283		return nil, &googleapi.Error{
23284			Code:   res.StatusCode,
23285			Header: res.Header,
23286		}
23287	}
23288	if err != nil {
23289		return nil, err
23290	}
23291	defer googleapi.CloseBody(res)
23292	if err := googleapi.CheckResponse(res); err != nil {
23293		return nil, err
23294	}
23295	ret := &Operation{
23296		ServerResponse: googleapi.ServerResponse{
23297			Header:         res.Header,
23298			HTTPStatusCode: res.StatusCode,
23299		},
23300	}
23301	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23302		return nil, err
23303	}
23304	return ret, nil
23305	// {
23306	//   "description": "Removes one or more instances from the specified instance group, but does not delete those instances.",
23307	//   "httpMethod": "POST",
23308	//   "id": "compute.instanceGroups.removeInstances",
23309	//   "parameterOrder": [
23310	//     "project",
23311	//     "zone",
23312	//     "instanceGroup"
23313	//   ],
23314	//   "parameters": {
23315	//     "instanceGroup": {
23316	//       "description": "The name of the instance group where the specified instances will be removed.",
23317	//       "location": "path",
23318	//       "required": true,
23319	//       "type": "string"
23320	//     },
23321	//     "project": {
23322	//       "description": "Project ID for this request.",
23323	//       "location": "path",
23324	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23325	//       "required": true,
23326	//       "type": "string"
23327	//     },
23328	//     "zone": {
23329	//       "description": "The name of the zone where the instance group is located.",
23330	//       "location": "path",
23331	//       "required": true,
23332	//       "type": "string"
23333	//     }
23334	//   },
23335	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances",
23336	//   "request": {
23337	//     "$ref": "InstanceGroupsRemoveInstancesRequest"
23338	//   },
23339	//   "response": {
23340	//     "$ref": "Operation"
23341	//   },
23342	//   "scopes": [
23343	//     "https://www.googleapis.com/auth/cloud-platform",
23344	//     "https://www.googleapis.com/auth/compute"
23345	//   ]
23346	// }
23347
23348}
23349
23350// method id "compute.instanceGroups.setNamedPorts":
23351
23352type InstanceGroupsSetNamedPortsCall struct {
23353	s                                  *Service
23354	project                            string
23355	zone                               string
23356	instanceGroup                      string
23357	instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest
23358	urlParams_                         gensupport.URLParams
23359	ctx_                               context.Context
23360}
23361
23362// SetNamedPorts: Sets the named ports for the specified instance group.
23363func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall {
23364	c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23365	c.project = project
23366	c.zone = zone
23367	c.instanceGroup = instanceGroup
23368	c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest
23369	return c
23370}
23371
23372// Fields allows partial responses to be retrieved. See
23373// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23374// for more information.
23375func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall {
23376	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23377	return c
23378}
23379
23380// Context sets the context to be used in this call's Do method. Any
23381// pending HTTP request will be aborted if the provided context is
23382// canceled.
23383func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall {
23384	c.ctx_ = ctx
23385	return c
23386}
23387
23388func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) {
23389	var body io.Reader = nil
23390	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest)
23391	if err != nil {
23392		return nil, err
23393	}
23394	ctype := "application/json"
23395	c.urlParams_.Set("alt", alt)
23396	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts")
23397	urls += "?" + c.urlParams_.Encode()
23398	req, _ := http.NewRequest("POST", urls, body)
23399	googleapi.Expand(req.URL, map[string]string{
23400		"project":       c.project,
23401		"zone":          c.zone,
23402		"instanceGroup": c.instanceGroup,
23403	})
23404	req.Header.Set("Content-Type", ctype)
23405	req.Header.Set("User-Agent", c.s.userAgent())
23406	if c.ctx_ != nil {
23407		return ctxhttp.Do(c.ctx_, c.s.client, req)
23408	}
23409	return c.s.client.Do(req)
23410}
23411
23412// Do executes the "compute.instanceGroups.setNamedPorts" call.
23413// Exactly one of *Operation or error will be non-nil. Any non-2xx
23414// status code is an error. Response headers are in either
23415// *Operation.ServerResponse.Header or (if a response was returned at
23416// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23417// to check whether the returned error was because
23418// http.StatusNotModified was returned.
23419func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23420	gensupport.SetOptions(c.urlParams_, opts...)
23421	res, err := c.doRequest("json")
23422	if res != nil && res.StatusCode == http.StatusNotModified {
23423		if res.Body != nil {
23424			res.Body.Close()
23425		}
23426		return nil, &googleapi.Error{
23427			Code:   res.StatusCode,
23428			Header: res.Header,
23429		}
23430	}
23431	if err != nil {
23432		return nil, err
23433	}
23434	defer googleapi.CloseBody(res)
23435	if err := googleapi.CheckResponse(res); err != nil {
23436		return nil, err
23437	}
23438	ret := &Operation{
23439		ServerResponse: googleapi.ServerResponse{
23440			Header:         res.Header,
23441			HTTPStatusCode: res.StatusCode,
23442		},
23443	}
23444	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23445		return nil, err
23446	}
23447	return ret, nil
23448	// {
23449	//   "description": "Sets the named ports for the specified instance group.",
23450	//   "httpMethod": "POST",
23451	//   "id": "compute.instanceGroups.setNamedPorts",
23452	//   "parameterOrder": [
23453	//     "project",
23454	//     "zone",
23455	//     "instanceGroup"
23456	//   ],
23457	//   "parameters": {
23458	//     "instanceGroup": {
23459	//       "description": "The name of the instance group where the named ports are updated.",
23460	//       "location": "path",
23461	//       "required": true,
23462	//       "type": "string"
23463	//     },
23464	//     "project": {
23465	//       "description": "Project ID for this request.",
23466	//       "location": "path",
23467	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23468	//       "required": true,
23469	//       "type": "string"
23470	//     },
23471	//     "zone": {
23472	//       "description": "The name of the zone where the instance group is located.",
23473	//       "location": "path",
23474	//       "required": true,
23475	//       "type": "string"
23476	//     }
23477	//   },
23478	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts",
23479	//   "request": {
23480	//     "$ref": "InstanceGroupsSetNamedPortsRequest"
23481	//   },
23482	//   "response": {
23483	//     "$ref": "Operation"
23484	//   },
23485	//   "scopes": [
23486	//     "https://www.googleapis.com/auth/cloud-platform",
23487	//     "https://www.googleapis.com/auth/compute"
23488	//   ]
23489	// }
23490
23491}
23492
23493// method id "compute.instanceTemplates.delete":
23494
23495type InstanceTemplatesDeleteCall struct {
23496	s                *Service
23497	project          string
23498	instanceTemplate string
23499	urlParams_       gensupport.URLParams
23500	ctx_             context.Context
23501}
23502
23503// Delete: Deletes the specified instance template. If you delete an
23504// instance template that is being referenced from another instance
23505// group, the instance group will not be able to create or recreate
23506// virtual machine instances. Deleting an instance template is permanent
23507// and cannot be undone.
23508// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete
23509func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall {
23510	c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23511	c.project = project
23512	c.instanceTemplate = instanceTemplate
23513	return c
23514}
23515
23516// Fields allows partial responses to be retrieved. See
23517// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23518// for more information.
23519func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall {
23520	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23521	return c
23522}
23523
23524// Context sets the context to be used in this call's Do method. Any
23525// pending HTTP request will be aborted if the provided context is
23526// canceled.
23527func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall {
23528	c.ctx_ = ctx
23529	return c
23530}
23531
23532func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
23533	var body io.Reader = nil
23534	c.urlParams_.Set("alt", alt)
23535	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}")
23536	urls += "?" + c.urlParams_.Encode()
23537	req, _ := http.NewRequest("DELETE", urls, body)
23538	googleapi.Expand(req.URL, map[string]string{
23539		"project":          c.project,
23540		"instanceTemplate": c.instanceTemplate,
23541	})
23542	req.Header.Set("User-Agent", c.s.userAgent())
23543	if c.ctx_ != nil {
23544		return ctxhttp.Do(c.ctx_, c.s.client, req)
23545	}
23546	return c.s.client.Do(req)
23547}
23548
23549// Do executes the "compute.instanceTemplates.delete" call.
23550// Exactly one of *Operation or error will be non-nil. Any non-2xx
23551// status code is an error. Response headers are in either
23552// *Operation.ServerResponse.Header or (if a response was returned at
23553// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23554// to check whether the returned error was because
23555// http.StatusNotModified was returned.
23556func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23557	gensupport.SetOptions(c.urlParams_, opts...)
23558	res, err := c.doRequest("json")
23559	if res != nil && res.StatusCode == http.StatusNotModified {
23560		if res.Body != nil {
23561			res.Body.Close()
23562		}
23563		return nil, &googleapi.Error{
23564			Code:   res.StatusCode,
23565			Header: res.Header,
23566		}
23567	}
23568	if err != nil {
23569		return nil, err
23570	}
23571	defer googleapi.CloseBody(res)
23572	if err := googleapi.CheckResponse(res); err != nil {
23573		return nil, err
23574	}
23575	ret := &Operation{
23576		ServerResponse: googleapi.ServerResponse{
23577			Header:         res.Header,
23578			HTTPStatusCode: res.StatusCode,
23579		},
23580	}
23581	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23582		return nil, err
23583	}
23584	return ret, nil
23585	// {
23586	//   "description": "Deletes the specified instance template. If you delete an instance template that is being referenced from another instance group, the instance group will not be able to create or recreate virtual machine instances. Deleting an instance template is permanent and cannot be undone.",
23587	//   "httpMethod": "DELETE",
23588	//   "id": "compute.instanceTemplates.delete",
23589	//   "parameterOrder": [
23590	//     "project",
23591	//     "instanceTemplate"
23592	//   ],
23593	//   "parameters": {
23594	//     "instanceTemplate": {
23595	//       "description": "The name of the instance template to delete.",
23596	//       "location": "path",
23597	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
23598	//       "required": true,
23599	//       "type": "string"
23600	//     },
23601	//     "project": {
23602	//       "description": "Project ID for this request.",
23603	//       "location": "path",
23604	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23605	//       "required": true,
23606	//       "type": "string"
23607	//     }
23608	//   },
23609	//   "path": "{project}/global/instanceTemplates/{instanceTemplate}",
23610	//   "response": {
23611	//     "$ref": "Operation"
23612	//   },
23613	//   "scopes": [
23614	//     "https://www.googleapis.com/auth/cloud-platform",
23615	//     "https://www.googleapis.com/auth/compute"
23616	//   ]
23617	// }
23618
23619}
23620
23621// method id "compute.instanceTemplates.get":
23622
23623type InstanceTemplatesGetCall struct {
23624	s                *Service
23625	project          string
23626	instanceTemplate string
23627	urlParams_       gensupport.URLParams
23628	ifNoneMatch_     string
23629	ctx_             context.Context
23630}
23631
23632// Get: Returns the specified instance template. Get a list of available
23633// instance templates by making a list() request.
23634// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get
23635func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall {
23636	c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23637	c.project = project
23638	c.instanceTemplate = instanceTemplate
23639	return c
23640}
23641
23642// Fields allows partial responses to be retrieved. See
23643// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23644// for more information.
23645func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall {
23646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23647	return c
23648}
23649
23650// IfNoneMatch sets the optional parameter which makes the operation
23651// fail if the object's ETag matches the given value. This is useful for
23652// getting updates only after the object has changed since the last
23653// request. Use googleapi.IsNotModified to check whether the response
23654// error from Do is the result of In-None-Match.
23655func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall {
23656	c.ifNoneMatch_ = entityTag
23657	return c
23658}
23659
23660// Context sets the context to be used in this call's Do method. Any
23661// pending HTTP request will be aborted if the provided context is
23662// canceled.
23663func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall {
23664	c.ctx_ = ctx
23665	return c
23666}
23667
23668func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
23669	var body io.Reader = nil
23670	c.urlParams_.Set("alt", alt)
23671	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}")
23672	urls += "?" + c.urlParams_.Encode()
23673	req, _ := http.NewRequest("GET", urls, body)
23674	googleapi.Expand(req.URL, map[string]string{
23675		"project":          c.project,
23676		"instanceTemplate": c.instanceTemplate,
23677	})
23678	req.Header.Set("User-Agent", c.s.userAgent())
23679	if c.ifNoneMatch_ != "" {
23680		req.Header.Set("If-None-Match", c.ifNoneMatch_)
23681	}
23682	if c.ctx_ != nil {
23683		return ctxhttp.Do(c.ctx_, c.s.client, req)
23684	}
23685	return c.s.client.Do(req)
23686}
23687
23688// Do executes the "compute.instanceTemplates.get" call.
23689// Exactly one of *InstanceTemplate or error will be non-nil. Any
23690// non-2xx status code is an error. Response headers are in either
23691// *InstanceTemplate.ServerResponse.Header or (if a response was
23692// returned at all) in error.(*googleapi.Error).Header. Use
23693// googleapi.IsNotModified to check whether the returned error was
23694// because http.StatusNotModified was returned.
23695func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) {
23696	gensupport.SetOptions(c.urlParams_, opts...)
23697	res, err := c.doRequest("json")
23698	if res != nil && res.StatusCode == http.StatusNotModified {
23699		if res.Body != nil {
23700			res.Body.Close()
23701		}
23702		return nil, &googleapi.Error{
23703			Code:   res.StatusCode,
23704			Header: res.Header,
23705		}
23706	}
23707	if err != nil {
23708		return nil, err
23709	}
23710	defer googleapi.CloseBody(res)
23711	if err := googleapi.CheckResponse(res); err != nil {
23712		return nil, err
23713	}
23714	ret := &InstanceTemplate{
23715		ServerResponse: googleapi.ServerResponse{
23716			Header:         res.Header,
23717			HTTPStatusCode: res.StatusCode,
23718		},
23719	}
23720	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23721		return nil, err
23722	}
23723	return ret, nil
23724	// {
23725	//   "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.",
23726	//   "httpMethod": "GET",
23727	//   "id": "compute.instanceTemplates.get",
23728	//   "parameterOrder": [
23729	//     "project",
23730	//     "instanceTemplate"
23731	//   ],
23732	//   "parameters": {
23733	//     "instanceTemplate": {
23734	//       "description": "The name of the instance template.",
23735	//       "location": "path",
23736	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
23737	//       "required": true,
23738	//       "type": "string"
23739	//     },
23740	//     "project": {
23741	//       "description": "Project ID for this request.",
23742	//       "location": "path",
23743	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23744	//       "required": true,
23745	//       "type": "string"
23746	//     }
23747	//   },
23748	//   "path": "{project}/global/instanceTemplates/{instanceTemplate}",
23749	//   "response": {
23750	//     "$ref": "InstanceTemplate"
23751	//   },
23752	//   "scopes": [
23753	//     "https://www.googleapis.com/auth/cloud-platform",
23754	//     "https://www.googleapis.com/auth/compute",
23755	//     "https://www.googleapis.com/auth/compute.readonly"
23756	//   ]
23757	// }
23758
23759}
23760
23761// method id "compute.instanceTemplates.insert":
23762
23763type InstanceTemplatesInsertCall struct {
23764	s                *Service
23765	project          string
23766	instancetemplate *InstanceTemplate
23767	urlParams_       gensupport.URLParams
23768	ctx_             context.Context
23769}
23770
23771// Insert: Creates an instance template in the specified project using
23772// the data that is included in the request. If you are creating a new
23773// template to update an existing instance group, your new instance
23774// template must use the same network or, if applicable, the same
23775// subnetwork as the original template.
23776// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert
23777func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall {
23778	c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23779	c.project = project
23780	c.instancetemplate = instancetemplate
23781	return c
23782}
23783
23784// Fields allows partial responses to be retrieved. See
23785// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23786// for more information.
23787func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall {
23788	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23789	return c
23790}
23791
23792// Context sets the context to be used in this call's Do method. Any
23793// pending HTTP request will be aborted if the provided context is
23794// canceled.
23795func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall {
23796	c.ctx_ = ctx
23797	return c
23798}
23799
23800func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
23801	var body io.Reader = nil
23802	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate)
23803	if err != nil {
23804		return nil, err
23805	}
23806	ctype := "application/json"
23807	c.urlParams_.Set("alt", alt)
23808	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates")
23809	urls += "?" + c.urlParams_.Encode()
23810	req, _ := http.NewRequest("POST", urls, body)
23811	googleapi.Expand(req.URL, map[string]string{
23812		"project": c.project,
23813	})
23814	req.Header.Set("Content-Type", ctype)
23815	req.Header.Set("User-Agent", c.s.userAgent())
23816	if c.ctx_ != nil {
23817		return ctxhttp.Do(c.ctx_, c.s.client, req)
23818	}
23819	return c.s.client.Do(req)
23820}
23821
23822// Do executes the "compute.instanceTemplates.insert" call.
23823// Exactly one of *Operation or error will be non-nil. Any non-2xx
23824// status code is an error. Response headers are in either
23825// *Operation.ServerResponse.Header or (if a response was returned at
23826// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23827// to check whether the returned error was because
23828// http.StatusNotModified was returned.
23829func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23830	gensupport.SetOptions(c.urlParams_, opts...)
23831	res, err := c.doRequest("json")
23832	if res != nil && res.StatusCode == http.StatusNotModified {
23833		if res.Body != nil {
23834			res.Body.Close()
23835		}
23836		return nil, &googleapi.Error{
23837			Code:   res.StatusCode,
23838			Header: res.Header,
23839		}
23840	}
23841	if err != nil {
23842		return nil, err
23843	}
23844	defer googleapi.CloseBody(res)
23845	if err := googleapi.CheckResponse(res); err != nil {
23846		return nil, err
23847	}
23848	ret := &Operation{
23849		ServerResponse: googleapi.ServerResponse{
23850			Header:         res.Header,
23851			HTTPStatusCode: res.StatusCode,
23852		},
23853	}
23854	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23855		return nil, err
23856	}
23857	return ret, nil
23858	// {
23859	//   "description": "Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.",
23860	//   "httpMethod": "POST",
23861	//   "id": "compute.instanceTemplates.insert",
23862	//   "parameterOrder": [
23863	//     "project"
23864	//   ],
23865	//   "parameters": {
23866	//     "project": {
23867	//       "description": "Project ID for this request.",
23868	//       "location": "path",
23869	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23870	//       "required": true,
23871	//       "type": "string"
23872	//     }
23873	//   },
23874	//   "path": "{project}/global/instanceTemplates",
23875	//   "request": {
23876	//     "$ref": "InstanceTemplate"
23877	//   },
23878	//   "response": {
23879	//     "$ref": "Operation"
23880	//   },
23881	//   "scopes": [
23882	//     "https://www.googleapis.com/auth/cloud-platform",
23883	//     "https://www.googleapis.com/auth/compute"
23884	//   ]
23885	// }
23886
23887}
23888
23889// method id "compute.instanceTemplates.list":
23890
23891type InstanceTemplatesListCall struct {
23892	s            *Service
23893	project      string
23894	urlParams_   gensupport.URLParams
23895	ifNoneMatch_ string
23896	ctx_         context.Context
23897}
23898
23899// List: Retrieves a list of instance templates that are contained
23900// within the specified project and zone.
23901// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list
23902func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall {
23903	c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23904	c.project = project
23905	return c
23906}
23907
23908// Filter sets the optional parameter "filter": Sets a filter expression
23909// for filtering listed resources, in the form filter={expression}. Your
23910// {expression} must be in the format: field_name comparison_string
23911// literal_string.
23912//
23913// The field_name is the name of the field you want to compare. Only
23914// atomic field types are supported (string, number, boolean). The
23915// comparison_string must be either eq (equals) or ne (not equals). The
23916// literal_string is the string value to filter to. The literal value
23917// must be valid for the type of field you are filtering by (string,
23918// number, boolean). For string fields, the literal value is interpreted
23919// as a regular expression using RE2 syntax. The literal value must
23920// match the entire field.
23921//
23922// For example, to filter for instances that do not have a name of
23923// example-instance, you would use filter=name ne
23924// example-instance.
23925//
23926// Compute Engine Beta API Only: If you use filtering in the Beta API,
23927// you can also filter on nested fields. For example, you could filter
23928// on instances that have set the scheduling.automaticRestart field to
23929// true. In particular, use filtering on nested fields to take advantage
23930// of instance labels to organize and filter results based on label
23931// values.
23932//
23933// The Beta API also supports filtering on multiple expressions by
23934// providing each separate expression within parentheses. For example,
23935// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
23936// Multiple expressions are treated as AND expressions, meaning that
23937// resources must match all expressions to pass the filters.
23938func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall {
23939	c.urlParams_.Set("filter", filter)
23940	return c
23941}
23942
23943// MaxResults sets the optional parameter "maxResults": The maximum
23944// number of results per page that should be returned. If the number of
23945// available results is larger than maxResults, Compute Engine returns a
23946// nextPageToken that can be used to get the next page of results in
23947// subsequent list requests.
23948func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall {
23949	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23950	return c
23951}
23952
23953// PageToken sets the optional parameter "pageToken": Specifies a page
23954// token to use. Set pageToken to the nextPageToken returned by a
23955// previous list request to get the next page of results.
23956func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall {
23957	c.urlParams_.Set("pageToken", pageToken)
23958	return c
23959}
23960
23961// Fields allows partial responses to be retrieved. See
23962// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23963// for more information.
23964func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall {
23965	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23966	return c
23967}
23968
23969// IfNoneMatch sets the optional parameter which makes the operation
23970// fail if the object's ETag matches the given value. This is useful for
23971// getting updates only after the object has changed since the last
23972// request. Use googleapi.IsNotModified to check whether the response
23973// error from Do is the result of In-None-Match.
23974func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall {
23975	c.ifNoneMatch_ = entityTag
23976	return c
23977}
23978
23979// Context sets the context to be used in this call's Do method. Any
23980// pending HTTP request will be aborted if the provided context is
23981// canceled.
23982func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall {
23983	c.ctx_ = ctx
23984	return c
23985}
23986
23987func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) {
23988	var body io.Reader = nil
23989	c.urlParams_.Set("alt", alt)
23990	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates")
23991	urls += "?" + c.urlParams_.Encode()
23992	req, _ := http.NewRequest("GET", urls, body)
23993	googleapi.Expand(req.URL, map[string]string{
23994		"project": c.project,
23995	})
23996	req.Header.Set("User-Agent", c.s.userAgent())
23997	if c.ifNoneMatch_ != "" {
23998		req.Header.Set("If-None-Match", c.ifNoneMatch_)
23999	}
24000	if c.ctx_ != nil {
24001		return ctxhttp.Do(c.ctx_, c.s.client, req)
24002	}
24003	return c.s.client.Do(req)
24004}
24005
24006// Do executes the "compute.instanceTemplates.list" call.
24007// Exactly one of *InstanceTemplateList or error will be non-nil. Any
24008// non-2xx status code is an error. Response headers are in either
24009// *InstanceTemplateList.ServerResponse.Header or (if a response was
24010// returned at all) in error.(*googleapi.Error).Header. Use
24011// googleapi.IsNotModified to check whether the returned error was
24012// because http.StatusNotModified was returned.
24013func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) {
24014	gensupport.SetOptions(c.urlParams_, opts...)
24015	res, err := c.doRequest("json")
24016	if res != nil && res.StatusCode == http.StatusNotModified {
24017		if res.Body != nil {
24018			res.Body.Close()
24019		}
24020		return nil, &googleapi.Error{
24021			Code:   res.StatusCode,
24022			Header: res.Header,
24023		}
24024	}
24025	if err != nil {
24026		return nil, err
24027	}
24028	defer googleapi.CloseBody(res)
24029	if err := googleapi.CheckResponse(res); err != nil {
24030		return nil, err
24031	}
24032	ret := &InstanceTemplateList{
24033		ServerResponse: googleapi.ServerResponse{
24034			Header:         res.Header,
24035			HTTPStatusCode: res.StatusCode,
24036		},
24037	}
24038	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24039		return nil, err
24040	}
24041	return ret, nil
24042	// {
24043	//   "description": "Retrieves a list of instance templates that are contained within the specified project and zone.",
24044	//   "httpMethod": "GET",
24045	//   "id": "compute.instanceTemplates.list",
24046	//   "parameterOrder": [
24047	//     "project"
24048	//   ],
24049	//   "parameters": {
24050	//     "filter": {
24051	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
24052	//       "location": "query",
24053	//       "type": "string"
24054	//     },
24055	//     "maxResults": {
24056	//       "default": "500",
24057	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
24058	//       "format": "uint32",
24059	//       "location": "query",
24060	//       "maximum": "500",
24061	//       "minimum": "0",
24062	//       "type": "integer"
24063	//     },
24064	//     "pageToken": {
24065	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
24066	//       "location": "query",
24067	//       "type": "string"
24068	//     },
24069	//     "project": {
24070	//       "description": "Project ID for this request.",
24071	//       "location": "path",
24072	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24073	//       "required": true,
24074	//       "type": "string"
24075	//     }
24076	//   },
24077	//   "path": "{project}/global/instanceTemplates",
24078	//   "response": {
24079	//     "$ref": "InstanceTemplateList"
24080	//   },
24081	//   "scopes": [
24082	//     "https://www.googleapis.com/auth/cloud-platform",
24083	//     "https://www.googleapis.com/auth/compute",
24084	//     "https://www.googleapis.com/auth/compute.readonly"
24085	//   ]
24086	// }
24087
24088}
24089
24090// Pages invokes f for each page of results.
24091// A non-nil error returned from f will halt the iteration.
24092// The provided context supersedes any context provided to the Context method.
24093func (c *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error {
24094	c.ctx_ = ctx
24095	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24096	for {
24097		x, err := c.Do()
24098		if err != nil {
24099			return err
24100		}
24101		if err := f(x); err != nil {
24102			return err
24103		}
24104		if x.NextPageToken == "" {
24105			return nil
24106		}
24107		c.PageToken(x.NextPageToken)
24108	}
24109}
24110
24111// method id "compute.instances.addAccessConfig":
24112
24113type InstancesAddAccessConfigCall struct {
24114	s            *Service
24115	project      string
24116	zone         string
24117	instance     string
24118	accessconfig *AccessConfig
24119	urlParams_   gensupport.URLParams
24120	ctx_         context.Context
24121}
24122
24123// AddAccessConfig: Adds an access config to an instance's network
24124// interface.
24125// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/addAccessConfig
24126func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall {
24127	c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24128	c.project = project
24129	c.zone = zone
24130	c.instance = instance
24131	c.urlParams_.Set("networkInterface", networkInterface)
24132	c.accessconfig = accessconfig
24133	return c
24134}
24135
24136// Fields allows partial responses to be retrieved. See
24137// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24138// for more information.
24139func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall {
24140	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24141	return c
24142}
24143
24144// Context sets the context to be used in this call's Do method. Any
24145// pending HTTP request will be aborted if the provided context is
24146// canceled.
24147func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall {
24148	c.ctx_ = ctx
24149	return c
24150}
24151
24152func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) {
24153	var body io.Reader = nil
24154	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig)
24155	if err != nil {
24156		return nil, err
24157	}
24158	ctype := "application/json"
24159	c.urlParams_.Set("alt", alt)
24160	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig")
24161	urls += "?" + c.urlParams_.Encode()
24162	req, _ := http.NewRequest("POST", urls, body)
24163	googleapi.Expand(req.URL, map[string]string{
24164		"project":  c.project,
24165		"zone":     c.zone,
24166		"instance": c.instance,
24167	})
24168	req.Header.Set("Content-Type", ctype)
24169	req.Header.Set("User-Agent", c.s.userAgent())
24170	if c.ctx_ != nil {
24171		return ctxhttp.Do(c.ctx_, c.s.client, req)
24172	}
24173	return c.s.client.Do(req)
24174}
24175
24176// Do executes the "compute.instances.addAccessConfig" call.
24177// Exactly one of *Operation or error will be non-nil. Any non-2xx
24178// status code is an error. Response headers are in either
24179// *Operation.ServerResponse.Header or (if a response was returned at
24180// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24181// to check whether the returned error was because
24182// http.StatusNotModified was returned.
24183func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24184	gensupport.SetOptions(c.urlParams_, opts...)
24185	res, err := c.doRequest("json")
24186	if res != nil && res.StatusCode == http.StatusNotModified {
24187		if res.Body != nil {
24188			res.Body.Close()
24189		}
24190		return nil, &googleapi.Error{
24191			Code:   res.StatusCode,
24192			Header: res.Header,
24193		}
24194	}
24195	if err != nil {
24196		return nil, err
24197	}
24198	defer googleapi.CloseBody(res)
24199	if err := googleapi.CheckResponse(res); err != nil {
24200		return nil, err
24201	}
24202	ret := &Operation{
24203		ServerResponse: googleapi.ServerResponse{
24204			Header:         res.Header,
24205			HTTPStatusCode: res.StatusCode,
24206		},
24207	}
24208	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24209		return nil, err
24210	}
24211	return ret, nil
24212	// {
24213	//   "description": "Adds an access config to an instance's network interface.",
24214	//   "httpMethod": "POST",
24215	//   "id": "compute.instances.addAccessConfig",
24216	//   "parameterOrder": [
24217	//     "project",
24218	//     "zone",
24219	//     "instance",
24220	//     "networkInterface"
24221	//   ],
24222	//   "parameters": {
24223	//     "instance": {
24224	//       "description": "The instance name for this request.",
24225	//       "location": "path",
24226	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24227	//       "required": true,
24228	//       "type": "string"
24229	//     },
24230	//     "networkInterface": {
24231	//       "description": "The name of the network interface to add to this instance.",
24232	//       "location": "query",
24233	//       "required": true,
24234	//       "type": "string"
24235	//     },
24236	//     "project": {
24237	//       "description": "Project ID for this request.",
24238	//       "location": "path",
24239	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24240	//       "required": true,
24241	//       "type": "string"
24242	//     },
24243	//     "zone": {
24244	//       "description": "The name of the zone for this request.",
24245	//       "location": "path",
24246	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24247	//       "required": true,
24248	//       "type": "string"
24249	//     }
24250	//   },
24251	//   "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig",
24252	//   "request": {
24253	//     "$ref": "AccessConfig"
24254	//   },
24255	//   "response": {
24256	//     "$ref": "Operation"
24257	//   },
24258	//   "scopes": [
24259	//     "https://www.googleapis.com/auth/cloud-platform",
24260	//     "https://www.googleapis.com/auth/compute"
24261	//   ]
24262	// }
24263
24264}
24265
24266// method id "compute.instances.aggregatedList":
24267
24268type InstancesAggregatedListCall struct {
24269	s            *Service
24270	project      string
24271	urlParams_   gensupport.URLParams
24272	ifNoneMatch_ string
24273	ctx_         context.Context
24274}
24275
24276// AggregatedList: Retrieves aggregated list of instances.
24277// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList
24278func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall {
24279	c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24280	c.project = project
24281	return c
24282}
24283
24284// Filter sets the optional parameter "filter": Sets a filter expression
24285// for filtering listed resources, in the form filter={expression}. Your
24286// {expression} must be in the format: field_name comparison_string
24287// literal_string.
24288//
24289// The field_name is the name of the field you want to compare. Only
24290// atomic field types are supported (string, number, boolean). The
24291// comparison_string must be either eq (equals) or ne (not equals). The
24292// literal_string is the string value to filter to. The literal value
24293// must be valid for the type of field you are filtering by (string,
24294// number, boolean). For string fields, the literal value is interpreted
24295// as a regular expression using RE2 syntax. The literal value must
24296// match the entire field.
24297//
24298// For example, to filter for instances that do not have a name of
24299// example-instance, you would use filter=name ne
24300// example-instance.
24301//
24302// Compute Engine Beta API Only: If you use filtering in the Beta API,
24303// you can also filter on nested fields. For example, you could filter
24304// on instances that have set the scheduling.automaticRestart field to
24305// true. In particular, use filtering on nested fields to take advantage
24306// of instance labels to organize and filter results based on label
24307// values.
24308//
24309// The Beta API also supports filtering on multiple expressions by
24310// providing each separate expression within parentheses. For example,
24311// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
24312// Multiple expressions are treated as AND expressions, meaning that
24313// resources must match all expressions to pass the filters.
24314func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall {
24315	c.urlParams_.Set("filter", filter)
24316	return c
24317}
24318
24319// MaxResults sets the optional parameter "maxResults": The maximum
24320// number of results per page that should be returned. If the number of
24321// available results is larger than maxResults, Compute Engine returns a
24322// nextPageToken that can be used to get the next page of results in
24323// subsequent list requests.
24324func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall {
24325	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
24326	return c
24327}
24328
24329// PageToken sets the optional parameter "pageToken": Specifies a page
24330// token to use. Set pageToken to the nextPageToken returned by a
24331// previous list request to get the next page of results.
24332func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall {
24333	c.urlParams_.Set("pageToken", pageToken)
24334	return c
24335}
24336
24337// Fields allows partial responses to be retrieved. See
24338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24339// for more information.
24340func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall {
24341	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24342	return c
24343}
24344
24345// IfNoneMatch sets the optional parameter which makes the operation
24346// fail if the object's ETag matches the given value. This is useful for
24347// getting updates only after the object has changed since the last
24348// request. Use googleapi.IsNotModified to check whether the response
24349// error from Do is the result of In-None-Match.
24350func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall {
24351	c.ifNoneMatch_ = entityTag
24352	return c
24353}
24354
24355// Context sets the context to be used in this call's Do method. Any
24356// pending HTTP request will be aborted if the provided context is
24357// canceled.
24358func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall {
24359	c.ctx_ = ctx
24360	return c
24361}
24362
24363func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
24364	var body io.Reader = nil
24365	c.urlParams_.Set("alt", alt)
24366	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instances")
24367	urls += "?" + c.urlParams_.Encode()
24368	req, _ := http.NewRequest("GET", urls, body)
24369	googleapi.Expand(req.URL, map[string]string{
24370		"project": c.project,
24371	})
24372	req.Header.Set("User-Agent", c.s.userAgent())
24373	if c.ifNoneMatch_ != "" {
24374		req.Header.Set("If-None-Match", c.ifNoneMatch_)
24375	}
24376	if c.ctx_ != nil {
24377		return ctxhttp.Do(c.ctx_, c.s.client, req)
24378	}
24379	return c.s.client.Do(req)
24380}
24381
24382// Do executes the "compute.instances.aggregatedList" call.
24383// Exactly one of *InstanceAggregatedList or error will be non-nil. Any
24384// non-2xx status code is an error. Response headers are in either
24385// *InstanceAggregatedList.ServerResponse.Header or (if a response was
24386// returned at all) in error.(*googleapi.Error).Header. Use
24387// googleapi.IsNotModified to check whether the returned error was
24388// because http.StatusNotModified was returned.
24389func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) {
24390	gensupport.SetOptions(c.urlParams_, opts...)
24391	res, err := c.doRequest("json")
24392	if res != nil && res.StatusCode == http.StatusNotModified {
24393		if res.Body != nil {
24394			res.Body.Close()
24395		}
24396		return nil, &googleapi.Error{
24397			Code:   res.StatusCode,
24398			Header: res.Header,
24399		}
24400	}
24401	if err != nil {
24402		return nil, err
24403	}
24404	defer googleapi.CloseBody(res)
24405	if err := googleapi.CheckResponse(res); err != nil {
24406		return nil, err
24407	}
24408	ret := &InstanceAggregatedList{
24409		ServerResponse: googleapi.ServerResponse{
24410			Header:         res.Header,
24411			HTTPStatusCode: res.StatusCode,
24412		},
24413	}
24414	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24415		return nil, err
24416	}
24417	return ret, nil
24418	// {
24419	//   "description": "Retrieves aggregated list of instances.",
24420	//   "httpMethod": "GET",
24421	//   "id": "compute.instances.aggregatedList",
24422	//   "parameterOrder": [
24423	//     "project"
24424	//   ],
24425	//   "parameters": {
24426	//     "filter": {
24427	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
24428	//       "location": "query",
24429	//       "type": "string"
24430	//     },
24431	//     "maxResults": {
24432	//       "default": "500",
24433	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
24434	//       "format": "uint32",
24435	//       "location": "query",
24436	//       "maximum": "500",
24437	//       "minimum": "0",
24438	//       "type": "integer"
24439	//     },
24440	//     "pageToken": {
24441	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
24442	//       "location": "query",
24443	//       "type": "string"
24444	//     },
24445	//     "project": {
24446	//       "description": "Project ID for this request.",
24447	//       "location": "path",
24448	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24449	//       "required": true,
24450	//       "type": "string"
24451	//     }
24452	//   },
24453	//   "path": "{project}/aggregated/instances",
24454	//   "response": {
24455	//     "$ref": "InstanceAggregatedList"
24456	//   },
24457	//   "scopes": [
24458	//     "https://www.googleapis.com/auth/cloud-platform",
24459	//     "https://www.googleapis.com/auth/compute",
24460	//     "https://www.googleapis.com/auth/compute.readonly"
24461	//   ]
24462	// }
24463
24464}
24465
24466// Pages invokes f for each page of results.
24467// A non-nil error returned from f will halt the iteration.
24468// The provided context supersedes any context provided to the Context method.
24469func (c *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error {
24470	c.ctx_ = ctx
24471	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24472	for {
24473		x, err := c.Do()
24474		if err != nil {
24475			return err
24476		}
24477		if err := f(x); err != nil {
24478			return err
24479		}
24480		if x.NextPageToken == "" {
24481			return nil
24482		}
24483		c.PageToken(x.NextPageToken)
24484	}
24485}
24486
24487// method id "compute.instances.attachDisk":
24488
24489type InstancesAttachDiskCall struct {
24490	s            *Service
24491	project      string
24492	zone         string
24493	instance     string
24494	attacheddisk *AttachedDisk
24495	urlParams_   gensupport.URLParams
24496	ctx_         context.Context
24497}
24498
24499// AttachDisk: Attaches a Disk resource to an instance.
24500// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/attachDisk
24501func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall {
24502	c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24503	c.project = project
24504	c.zone = zone
24505	c.instance = instance
24506	c.attacheddisk = attacheddisk
24507	return c
24508}
24509
24510// Fields allows partial responses to be retrieved. See
24511// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24512// for more information.
24513func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall {
24514	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24515	return c
24516}
24517
24518// Context sets the context to be used in this call's Do method. Any
24519// pending HTTP request will be aborted if the provided context is
24520// canceled.
24521func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall {
24522	c.ctx_ = ctx
24523	return c
24524}
24525
24526func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) {
24527	var body io.Reader = nil
24528	body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk)
24529	if err != nil {
24530		return nil, err
24531	}
24532	ctype := "application/json"
24533	c.urlParams_.Set("alt", alt)
24534	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk")
24535	urls += "?" + c.urlParams_.Encode()
24536	req, _ := http.NewRequest("POST", urls, body)
24537	googleapi.Expand(req.URL, map[string]string{
24538		"project":  c.project,
24539		"zone":     c.zone,
24540		"instance": c.instance,
24541	})
24542	req.Header.Set("Content-Type", ctype)
24543	req.Header.Set("User-Agent", c.s.userAgent())
24544	if c.ctx_ != nil {
24545		return ctxhttp.Do(c.ctx_, c.s.client, req)
24546	}
24547	return c.s.client.Do(req)
24548}
24549
24550// Do executes the "compute.instances.attachDisk" call.
24551// Exactly one of *Operation or error will be non-nil. Any non-2xx
24552// status code is an error. Response headers are in either
24553// *Operation.ServerResponse.Header or (if a response was returned at
24554// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24555// to check whether the returned error was because
24556// http.StatusNotModified was returned.
24557func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24558	gensupport.SetOptions(c.urlParams_, opts...)
24559	res, err := c.doRequest("json")
24560	if res != nil && res.StatusCode == http.StatusNotModified {
24561		if res.Body != nil {
24562			res.Body.Close()
24563		}
24564		return nil, &googleapi.Error{
24565			Code:   res.StatusCode,
24566			Header: res.Header,
24567		}
24568	}
24569	if err != nil {
24570		return nil, err
24571	}
24572	defer googleapi.CloseBody(res)
24573	if err := googleapi.CheckResponse(res); err != nil {
24574		return nil, err
24575	}
24576	ret := &Operation{
24577		ServerResponse: googleapi.ServerResponse{
24578			Header:         res.Header,
24579			HTTPStatusCode: res.StatusCode,
24580		},
24581	}
24582	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24583		return nil, err
24584	}
24585	return ret, nil
24586	// {
24587	//   "description": "Attaches a Disk resource to an instance.",
24588	//   "httpMethod": "POST",
24589	//   "id": "compute.instances.attachDisk",
24590	//   "parameterOrder": [
24591	//     "project",
24592	//     "zone",
24593	//     "instance"
24594	//   ],
24595	//   "parameters": {
24596	//     "instance": {
24597	//       "description": "The instance name for this request.",
24598	//       "location": "path",
24599	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24600	//       "required": true,
24601	//       "type": "string"
24602	//     },
24603	//     "project": {
24604	//       "description": "Project ID for this request.",
24605	//       "location": "path",
24606	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24607	//       "required": true,
24608	//       "type": "string"
24609	//     },
24610	//     "zone": {
24611	//       "description": "The name of the zone for this request.",
24612	//       "location": "path",
24613	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24614	//       "required": true,
24615	//       "type": "string"
24616	//     }
24617	//   },
24618	//   "path": "{project}/zones/{zone}/instances/{instance}/attachDisk",
24619	//   "request": {
24620	//     "$ref": "AttachedDisk"
24621	//   },
24622	//   "response": {
24623	//     "$ref": "Operation"
24624	//   },
24625	//   "scopes": [
24626	//     "https://www.googleapis.com/auth/cloud-platform",
24627	//     "https://www.googleapis.com/auth/compute"
24628	//   ]
24629	// }
24630
24631}
24632
24633// method id "compute.instances.delete":
24634
24635type InstancesDeleteCall struct {
24636	s          *Service
24637	project    string
24638	zone       string
24639	instance   string
24640	urlParams_ gensupport.URLParams
24641	ctx_       context.Context
24642}
24643
24644// Delete: Deletes the specified Instance resource. For more
24645// information, see Stopping or Deleting an Instance.
24646// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/delete
24647func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall {
24648	c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24649	c.project = project
24650	c.zone = zone
24651	c.instance = instance
24652	return c
24653}
24654
24655// Fields allows partial responses to be retrieved. See
24656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24657// for more information.
24658func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall {
24659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24660	return c
24661}
24662
24663// Context sets the context to be used in this call's Do method. Any
24664// pending HTTP request will be aborted if the provided context is
24665// canceled.
24666func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
24667	c.ctx_ = ctx
24668	return c
24669}
24670
24671func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
24672	var body io.Reader = nil
24673	c.urlParams_.Set("alt", alt)
24674	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}")
24675	urls += "?" + c.urlParams_.Encode()
24676	req, _ := http.NewRequest("DELETE", urls, body)
24677	googleapi.Expand(req.URL, map[string]string{
24678		"project":  c.project,
24679		"zone":     c.zone,
24680		"instance": c.instance,
24681	})
24682	req.Header.Set("User-Agent", c.s.userAgent())
24683	if c.ctx_ != nil {
24684		return ctxhttp.Do(c.ctx_, c.s.client, req)
24685	}
24686	return c.s.client.Do(req)
24687}
24688
24689// Do executes the "compute.instances.delete" call.
24690// Exactly one of *Operation or error will be non-nil. Any non-2xx
24691// status code is an error. Response headers are in either
24692// *Operation.ServerResponse.Header or (if a response was returned at
24693// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24694// to check whether the returned error was because
24695// http.StatusNotModified was returned.
24696func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24697	gensupport.SetOptions(c.urlParams_, opts...)
24698	res, err := c.doRequest("json")
24699	if res != nil && res.StatusCode == http.StatusNotModified {
24700		if res.Body != nil {
24701			res.Body.Close()
24702		}
24703		return nil, &googleapi.Error{
24704			Code:   res.StatusCode,
24705			Header: res.Header,
24706		}
24707	}
24708	if err != nil {
24709		return nil, err
24710	}
24711	defer googleapi.CloseBody(res)
24712	if err := googleapi.CheckResponse(res); err != nil {
24713		return nil, err
24714	}
24715	ret := &Operation{
24716		ServerResponse: googleapi.ServerResponse{
24717			Header:         res.Header,
24718			HTTPStatusCode: res.StatusCode,
24719		},
24720	}
24721	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24722		return nil, err
24723	}
24724	return ret, nil
24725	// {
24726	//   "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.",
24727	//   "httpMethod": "DELETE",
24728	//   "id": "compute.instances.delete",
24729	//   "parameterOrder": [
24730	//     "project",
24731	//     "zone",
24732	//     "instance"
24733	//   ],
24734	//   "parameters": {
24735	//     "instance": {
24736	//       "description": "Name of the instance resource to delete.",
24737	//       "location": "path",
24738	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24739	//       "required": true,
24740	//       "type": "string"
24741	//     },
24742	//     "project": {
24743	//       "description": "Project ID for this request.",
24744	//       "location": "path",
24745	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24746	//       "required": true,
24747	//       "type": "string"
24748	//     },
24749	//     "zone": {
24750	//       "description": "The name of the zone for this request.",
24751	//       "location": "path",
24752	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24753	//       "required": true,
24754	//       "type": "string"
24755	//     }
24756	//   },
24757	//   "path": "{project}/zones/{zone}/instances/{instance}",
24758	//   "response": {
24759	//     "$ref": "Operation"
24760	//   },
24761	//   "scopes": [
24762	//     "https://www.googleapis.com/auth/cloud-platform",
24763	//     "https://www.googleapis.com/auth/compute"
24764	//   ]
24765	// }
24766
24767}
24768
24769// method id "compute.instances.deleteAccessConfig":
24770
24771type InstancesDeleteAccessConfigCall struct {
24772	s          *Service
24773	project    string
24774	zone       string
24775	instance   string
24776	urlParams_ gensupport.URLParams
24777	ctx_       context.Context
24778}
24779
24780// DeleteAccessConfig: Deletes an access config from an instance's
24781// network interface.
24782// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/deleteAccessConfig
24783func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall {
24784	c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24785	c.project = project
24786	c.zone = zone
24787	c.instance = instance
24788	c.urlParams_.Set("accessConfig", accessConfig)
24789	c.urlParams_.Set("networkInterface", networkInterface)
24790	return c
24791}
24792
24793// Fields allows partial responses to be retrieved. See
24794// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24795// for more information.
24796func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall {
24797	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24798	return c
24799}
24800
24801// Context sets the context to be used in this call's Do method. Any
24802// pending HTTP request will be aborted if the provided context is
24803// canceled.
24804func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall {
24805	c.ctx_ = ctx
24806	return c
24807}
24808
24809func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) {
24810	var body io.Reader = nil
24811	c.urlParams_.Set("alt", alt)
24812	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig")
24813	urls += "?" + c.urlParams_.Encode()
24814	req, _ := http.NewRequest("POST", urls, body)
24815	googleapi.Expand(req.URL, map[string]string{
24816		"project":  c.project,
24817		"zone":     c.zone,
24818		"instance": c.instance,
24819	})
24820	req.Header.Set("User-Agent", c.s.userAgent())
24821	if c.ctx_ != nil {
24822		return ctxhttp.Do(c.ctx_, c.s.client, req)
24823	}
24824	return c.s.client.Do(req)
24825}
24826
24827// Do executes the "compute.instances.deleteAccessConfig" call.
24828// Exactly one of *Operation or error will be non-nil. Any non-2xx
24829// status code is an error. Response headers are in either
24830// *Operation.ServerResponse.Header or (if a response was returned at
24831// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24832// to check whether the returned error was because
24833// http.StatusNotModified was returned.
24834func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24835	gensupport.SetOptions(c.urlParams_, opts...)
24836	res, err := c.doRequest("json")
24837	if res != nil && res.StatusCode == http.StatusNotModified {
24838		if res.Body != nil {
24839			res.Body.Close()
24840		}
24841		return nil, &googleapi.Error{
24842			Code:   res.StatusCode,
24843			Header: res.Header,
24844		}
24845	}
24846	if err != nil {
24847		return nil, err
24848	}
24849	defer googleapi.CloseBody(res)
24850	if err := googleapi.CheckResponse(res); err != nil {
24851		return nil, err
24852	}
24853	ret := &Operation{
24854		ServerResponse: googleapi.ServerResponse{
24855			Header:         res.Header,
24856			HTTPStatusCode: res.StatusCode,
24857		},
24858	}
24859	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24860		return nil, err
24861	}
24862	return ret, nil
24863	// {
24864	//   "description": "Deletes an access config from an instance's network interface.",
24865	//   "httpMethod": "POST",
24866	//   "id": "compute.instances.deleteAccessConfig",
24867	//   "parameterOrder": [
24868	//     "project",
24869	//     "zone",
24870	//     "instance",
24871	//     "accessConfig",
24872	//     "networkInterface"
24873	//   ],
24874	//   "parameters": {
24875	//     "accessConfig": {
24876	//       "description": "The name of the access config to delete.",
24877	//       "location": "query",
24878	//       "required": true,
24879	//       "type": "string"
24880	//     },
24881	//     "instance": {
24882	//       "description": "The instance name for this request.",
24883	//       "location": "path",
24884	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24885	//       "required": true,
24886	//       "type": "string"
24887	//     },
24888	//     "networkInterface": {
24889	//       "description": "The name of the network interface.",
24890	//       "location": "query",
24891	//       "required": true,
24892	//       "type": "string"
24893	//     },
24894	//     "project": {
24895	//       "description": "Project ID for this request.",
24896	//       "location": "path",
24897	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24898	//       "required": true,
24899	//       "type": "string"
24900	//     },
24901	//     "zone": {
24902	//       "description": "The name of the zone for this request.",
24903	//       "location": "path",
24904	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24905	//       "required": true,
24906	//       "type": "string"
24907	//     }
24908	//   },
24909	//   "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig",
24910	//   "response": {
24911	//     "$ref": "Operation"
24912	//   },
24913	//   "scopes": [
24914	//     "https://www.googleapis.com/auth/cloud-platform",
24915	//     "https://www.googleapis.com/auth/compute"
24916	//   ]
24917	// }
24918
24919}
24920
24921// method id "compute.instances.detachDisk":
24922
24923type InstancesDetachDiskCall struct {
24924	s          *Service
24925	project    string
24926	zone       string
24927	instance   string
24928	urlParams_ gensupport.URLParams
24929	ctx_       context.Context
24930}
24931
24932// DetachDisk: Detaches a disk from an instance.
24933// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/detachDisk
24934func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall {
24935	c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24936	c.project = project
24937	c.zone = zone
24938	c.instance = instance
24939	c.urlParams_.Set("deviceName", deviceName)
24940	return c
24941}
24942
24943// Fields allows partial responses to be retrieved. See
24944// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24945// for more information.
24946func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall {
24947	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24948	return c
24949}
24950
24951// Context sets the context to be used in this call's Do method. Any
24952// pending HTTP request will be aborted if the provided context is
24953// canceled.
24954func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall {
24955	c.ctx_ = ctx
24956	return c
24957}
24958
24959func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) {
24960	var body io.Reader = nil
24961	c.urlParams_.Set("alt", alt)
24962	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/detachDisk")
24963	urls += "?" + c.urlParams_.Encode()
24964	req, _ := http.NewRequest("POST", urls, body)
24965	googleapi.Expand(req.URL, map[string]string{
24966		"project":  c.project,
24967		"zone":     c.zone,
24968		"instance": c.instance,
24969	})
24970	req.Header.Set("User-Agent", c.s.userAgent())
24971	if c.ctx_ != nil {
24972		return ctxhttp.Do(c.ctx_, c.s.client, req)
24973	}
24974	return c.s.client.Do(req)
24975}
24976
24977// Do executes the "compute.instances.detachDisk" call.
24978// Exactly one of *Operation or error will be non-nil. Any non-2xx
24979// status code is an error. Response headers are in either
24980// *Operation.ServerResponse.Header or (if a response was returned at
24981// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24982// to check whether the returned error was because
24983// http.StatusNotModified was returned.
24984func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24985	gensupport.SetOptions(c.urlParams_, opts...)
24986	res, err := c.doRequest("json")
24987	if res != nil && res.StatusCode == http.StatusNotModified {
24988		if res.Body != nil {
24989			res.Body.Close()
24990		}
24991		return nil, &googleapi.Error{
24992			Code:   res.StatusCode,
24993			Header: res.Header,
24994		}
24995	}
24996	if err != nil {
24997		return nil, err
24998	}
24999	defer googleapi.CloseBody(res)
25000	if err := googleapi.CheckResponse(res); err != nil {
25001		return nil, err
25002	}
25003	ret := &Operation{
25004		ServerResponse: googleapi.ServerResponse{
25005			Header:         res.Header,
25006			HTTPStatusCode: res.StatusCode,
25007		},
25008	}
25009	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25010		return nil, err
25011	}
25012	return ret, nil
25013	// {
25014	//   "description": "Detaches a disk from an instance.",
25015	//   "httpMethod": "POST",
25016	//   "id": "compute.instances.detachDisk",
25017	//   "parameterOrder": [
25018	//     "project",
25019	//     "zone",
25020	//     "instance",
25021	//     "deviceName"
25022	//   ],
25023	//   "parameters": {
25024	//     "deviceName": {
25025	//       "description": "Disk device name to detach.",
25026	//       "location": "query",
25027	//       "pattern": "\\w[\\w.-]{0,254}",
25028	//       "required": true,
25029	//       "type": "string"
25030	//     },
25031	//     "instance": {
25032	//       "description": "Instance name.",
25033	//       "location": "path",
25034	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25035	//       "required": true,
25036	//       "type": "string"
25037	//     },
25038	//     "project": {
25039	//       "description": "Project ID for this request.",
25040	//       "location": "path",
25041	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25042	//       "required": true,
25043	//       "type": "string"
25044	//     },
25045	//     "zone": {
25046	//       "description": "The name of the zone for this request.",
25047	//       "location": "path",
25048	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25049	//       "required": true,
25050	//       "type": "string"
25051	//     }
25052	//   },
25053	//   "path": "{project}/zones/{zone}/instances/{instance}/detachDisk",
25054	//   "response": {
25055	//     "$ref": "Operation"
25056	//   },
25057	//   "scopes": [
25058	//     "https://www.googleapis.com/auth/cloud-platform",
25059	//     "https://www.googleapis.com/auth/compute"
25060	//   ]
25061	// }
25062
25063}
25064
25065// method id "compute.instances.get":
25066
25067type InstancesGetCall struct {
25068	s            *Service
25069	project      string
25070	zone         string
25071	instance     string
25072	urlParams_   gensupport.URLParams
25073	ifNoneMatch_ string
25074	ctx_         context.Context
25075}
25076
25077// Get: Returns the specified Instance resource. Get a list of available
25078// instances by making a list() request.
25079// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get
25080func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall {
25081	c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25082	c.project = project
25083	c.zone = zone
25084	c.instance = instance
25085	return c
25086}
25087
25088// Fields allows partial responses to be retrieved. See
25089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25090// for more information.
25091func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall {
25092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25093	return c
25094}
25095
25096// IfNoneMatch sets the optional parameter which makes the operation
25097// fail if the object's ETag matches the given value. This is useful for
25098// getting updates only after the object has changed since the last
25099// request. Use googleapi.IsNotModified to check whether the response
25100// error from Do is the result of In-None-Match.
25101func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall {
25102	c.ifNoneMatch_ = entityTag
25103	return c
25104}
25105
25106// Context sets the context to be used in this call's Do method. Any
25107// pending HTTP request will be aborted if the provided context is
25108// canceled.
25109func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
25110	c.ctx_ = ctx
25111	return c
25112}
25113
25114func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
25115	var body io.Reader = nil
25116	c.urlParams_.Set("alt", alt)
25117	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}")
25118	urls += "?" + c.urlParams_.Encode()
25119	req, _ := http.NewRequest("GET", urls, body)
25120	googleapi.Expand(req.URL, map[string]string{
25121		"project":  c.project,
25122		"zone":     c.zone,
25123		"instance": c.instance,
25124	})
25125	req.Header.Set("User-Agent", c.s.userAgent())
25126	if c.ifNoneMatch_ != "" {
25127		req.Header.Set("If-None-Match", c.ifNoneMatch_)
25128	}
25129	if c.ctx_ != nil {
25130		return ctxhttp.Do(c.ctx_, c.s.client, req)
25131	}
25132	return c.s.client.Do(req)
25133}
25134
25135// Do executes the "compute.instances.get" call.
25136// Exactly one of *Instance or error will be non-nil. Any non-2xx status
25137// code is an error. Response headers are in either
25138// *Instance.ServerResponse.Header or (if a response was returned at
25139// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25140// to check whether the returned error was because
25141// http.StatusNotModified was returned.
25142func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
25143	gensupport.SetOptions(c.urlParams_, opts...)
25144	res, err := c.doRequest("json")
25145	if res != nil && res.StatusCode == http.StatusNotModified {
25146		if res.Body != nil {
25147			res.Body.Close()
25148		}
25149		return nil, &googleapi.Error{
25150			Code:   res.StatusCode,
25151			Header: res.Header,
25152		}
25153	}
25154	if err != nil {
25155		return nil, err
25156	}
25157	defer googleapi.CloseBody(res)
25158	if err := googleapi.CheckResponse(res); err != nil {
25159		return nil, err
25160	}
25161	ret := &Instance{
25162		ServerResponse: googleapi.ServerResponse{
25163			Header:         res.Header,
25164			HTTPStatusCode: res.StatusCode,
25165		},
25166	}
25167	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25168		return nil, err
25169	}
25170	return ret, nil
25171	// {
25172	//   "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.",
25173	//   "httpMethod": "GET",
25174	//   "id": "compute.instances.get",
25175	//   "parameterOrder": [
25176	//     "project",
25177	//     "zone",
25178	//     "instance"
25179	//   ],
25180	//   "parameters": {
25181	//     "instance": {
25182	//       "description": "Name of the instance resource to return.",
25183	//       "location": "path",
25184	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25185	//       "required": true,
25186	//       "type": "string"
25187	//     },
25188	//     "project": {
25189	//       "description": "Project ID for this request.",
25190	//       "location": "path",
25191	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25192	//       "required": true,
25193	//       "type": "string"
25194	//     },
25195	//     "zone": {
25196	//       "description": "The name of the zone for this request.",
25197	//       "location": "path",
25198	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25199	//       "required": true,
25200	//       "type": "string"
25201	//     }
25202	//   },
25203	//   "path": "{project}/zones/{zone}/instances/{instance}",
25204	//   "response": {
25205	//     "$ref": "Instance"
25206	//   },
25207	//   "scopes": [
25208	//     "https://www.googleapis.com/auth/cloud-platform",
25209	//     "https://www.googleapis.com/auth/compute",
25210	//     "https://www.googleapis.com/auth/compute.readonly"
25211	//   ]
25212	// }
25213
25214}
25215
25216// method id "compute.instances.getSerialPortOutput":
25217
25218type InstancesGetSerialPortOutputCall struct {
25219	s            *Service
25220	project      string
25221	zone         string
25222	instance     string
25223	urlParams_   gensupport.URLParams
25224	ifNoneMatch_ string
25225	ctx_         context.Context
25226}
25227
25228// GetSerialPortOutput: Returns the specified instance's serial port
25229// output.
25230// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput
25231func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall {
25232	c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25233	c.project = project
25234	c.zone = zone
25235	c.instance = instance
25236	return c
25237}
25238
25239// Port sets the optional parameter "port": Specifies which COM or
25240// serial port to retrieve data from.
25241func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall {
25242	c.urlParams_.Set("port", fmt.Sprint(port))
25243	return c
25244}
25245
25246// Fields allows partial responses to be retrieved. See
25247// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25248// for more information.
25249func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall {
25250	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25251	return c
25252}
25253
25254// IfNoneMatch sets the optional parameter which makes the operation
25255// fail if the object's ETag matches the given value. This is useful for
25256// getting updates only after the object has changed since the last
25257// request. Use googleapi.IsNotModified to check whether the response
25258// error from Do is the result of In-None-Match.
25259func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall {
25260	c.ifNoneMatch_ = entityTag
25261	return c
25262}
25263
25264// Context sets the context to be used in this call's Do method. Any
25265// pending HTTP request will be aborted if the provided context is
25266// canceled.
25267func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall {
25268	c.ctx_ = ctx
25269	return c
25270}
25271
25272func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) {
25273	var body io.Reader = nil
25274	c.urlParams_.Set("alt", alt)
25275	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/serialPort")
25276	urls += "?" + c.urlParams_.Encode()
25277	req, _ := http.NewRequest("GET", urls, body)
25278	googleapi.Expand(req.URL, map[string]string{
25279		"project":  c.project,
25280		"zone":     c.zone,
25281		"instance": c.instance,
25282	})
25283	req.Header.Set("User-Agent", c.s.userAgent())
25284	if c.ifNoneMatch_ != "" {
25285		req.Header.Set("If-None-Match", c.ifNoneMatch_)
25286	}
25287	if c.ctx_ != nil {
25288		return ctxhttp.Do(c.ctx_, c.s.client, req)
25289	}
25290	return c.s.client.Do(req)
25291}
25292
25293// Do executes the "compute.instances.getSerialPortOutput" call.
25294// Exactly one of *SerialPortOutput or error will be non-nil. Any
25295// non-2xx status code is an error. Response headers are in either
25296// *SerialPortOutput.ServerResponse.Header or (if a response was
25297// returned at all) in error.(*googleapi.Error).Header. Use
25298// googleapi.IsNotModified to check whether the returned error was
25299// because http.StatusNotModified was returned.
25300func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) {
25301	gensupport.SetOptions(c.urlParams_, opts...)
25302	res, err := c.doRequest("json")
25303	if res != nil && res.StatusCode == http.StatusNotModified {
25304		if res.Body != nil {
25305			res.Body.Close()
25306		}
25307		return nil, &googleapi.Error{
25308			Code:   res.StatusCode,
25309			Header: res.Header,
25310		}
25311	}
25312	if err != nil {
25313		return nil, err
25314	}
25315	defer googleapi.CloseBody(res)
25316	if err := googleapi.CheckResponse(res); err != nil {
25317		return nil, err
25318	}
25319	ret := &SerialPortOutput{
25320		ServerResponse: googleapi.ServerResponse{
25321			Header:         res.Header,
25322			HTTPStatusCode: res.StatusCode,
25323		},
25324	}
25325	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25326		return nil, err
25327	}
25328	return ret, nil
25329	// {
25330	//   "description": "Returns the specified instance's serial port output.",
25331	//   "httpMethod": "GET",
25332	//   "id": "compute.instances.getSerialPortOutput",
25333	//   "parameterOrder": [
25334	//     "project",
25335	//     "zone",
25336	//     "instance"
25337	//   ],
25338	//   "parameters": {
25339	//     "instance": {
25340	//       "description": "Name of the instance scoping this request.",
25341	//       "location": "path",
25342	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25343	//       "required": true,
25344	//       "type": "string"
25345	//     },
25346	//     "port": {
25347	//       "default": "1",
25348	//       "description": "Specifies which COM or serial port to retrieve data from.",
25349	//       "format": "int32",
25350	//       "location": "query",
25351	//       "maximum": "4",
25352	//       "minimum": "1",
25353	//       "type": "integer"
25354	//     },
25355	//     "project": {
25356	//       "description": "Project ID for this request.",
25357	//       "location": "path",
25358	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25359	//       "required": true,
25360	//       "type": "string"
25361	//     },
25362	//     "zone": {
25363	//       "description": "The name of the zone for this request.",
25364	//       "location": "path",
25365	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25366	//       "required": true,
25367	//       "type": "string"
25368	//     }
25369	//   },
25370	//   "path": "{project}/zones/{zone}/instances/{instance}/serialPort",
25371	//   "response": {
25372	//     "$ref": "SerialPortOutput"
25373	//   },
25374	//   "scopes": [
25375	//     "https://www.googleapis.com/auth/cloud-platform",
25376	//     "https://www.googleapis.com/auth/compute",
25377	//     "https://www.googleapis.com/auth/compute.readonly"
25378	//   ]
25379	// }
25380
25381}
25382
25383// method id "compute.instances.insert":
25384
25385type InstancesInsertCall struct {
25386	s          *Service
25387	project    string
25388	zone       string
25389	instance   *Instance
25390	urlParams_ gensupport.URLParams
25391	ctx_       context.Context
25392}
25393
25394// Insert: Creates an instance resource in the specified project using
25395// the data included in the request.
25396// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/insert
25397func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall {
25398	c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25399	c.project = project
25400	c.zone = zone
25401	c.instance = instance
25402	return c
25403}
25404
25405// Fields allows partial responses to be retrieved. See
25406// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25407// for more information.
25408func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall {
25409	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25410	return c
25411}
25412
25413// Context sets the context to be used in this call's Do method. Any
25414// pending HTTP request will be aborted if the provided context is
25415// canceled.
25416func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
25417	c.ctx_ = ctx
25418	return c
25419}
25420
25421func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
25422	var body io.Reader = nil
25423	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
25424	if err != nil {
25425		return nil, err
25426	}
25427	ctype := "application/json"
25428	c.urlParams_.Set("alt", alt)
25429	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances")
25430	urls += "?" + c.urlParams_.Encode()
25431	req, _ := http.NewRequest("POST", urls, body)
25432	googleapi.Expand(req.URL, map[string]string{
25433		"project": c.project,
25434		"zone":    c.zone,
25435	})
25436	req.Header.Set("Content-Type", ctype)
25437	req.Header.Set("User-Agent", c.s.userAgent())
25438	if c.ctx_ != nil {
25439		return ctxhttp.Do(c.ctx_, c.s.client, req)
25440	}
25441	return c.s.client.Do(req)
25442}
25443
25444// Do executes the "compute.instances.insert" call.
25445// Exactly one of *Operation or error will be non-nil. Any non-2xx
25446// status code is an error. Response headers are in either
25447// *Operation.ServerResponse.Header or (if a response was returned at
25448// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25449// to check whether the returned error was because
25450// http.StatusNotModified was returned.
25451func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25452	gensupport.SetOptions(c.urlParams_, opts...)
25453	res, err := c.doRequest("json")
25454	if res != nil && res.StatusCode == http.StatusNotModified {
25455		if res.Body != nil {
25456			res.Body.Close()
25457		}
25458		return nil, &googleapi.Error{
25459			Code:   res.StatusCode,
25460			Header: res.Header,
25461		}
25462	}
25463	if err != nil {
25464		return nil, err
25465	}
25466	defer googleapi.CloseBody(res)
25467	if err := googleapi.CheckResponse(res); err != nil {
25468		return nil, err
25469	}
25470	ret := &Operation{
25471		ServerResponse: googleapi.ServerResponse{
25472			Header:         res.Header,
25473			HTTPStatusCode: res.StatusCode,
25474		},
25475	}
25476	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25477		return nil, err
25478	}
25479	return ret, nil
25480	// {
25481	//   "description": "Creates an instance resource in the specified project using the data included in the request.",
25482	//   "httpMethod": "POST",
25483	//   "id": "compute.instances.insert",
25484	//   "parameterOrder": [
25485	//     "project",
25486	//     "zone"
25487	//   ],
25488	//   "parameters": {
25489	//     "project": {
25490	//       "description": "Project ID for this request.",
25491	//       "location": "path",
25492	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25493	//       "required": true,
25494	//       "type": "string"
25495	//     },
25496	//     "zone": {
25497	//       "description": "The name of the zone for this request.",
25498	//       "location": "path",
25499	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25500	//       "required": true,
25501	//       "type": "string"
25502	//     }
25503	//   },
25504	//   "path": "{project}/zones/{zone}/instances",
25505	//   "request": {
25506	//     "$ref": "Instance"
25507	//   },
25508	//   "response": {
25509	//     "$ref": "Operation"
25510	//   },
25511	//   "scopes": [
25512	//     "https://www.googleapis.com/auth/cloud-platform",
25513	//     "https://www.googleapis.com/auth/compute"
25514	//   ]
25515	// }
25516
25517}
25518
25519// method id "compute.instances.list":
25520
25521type InstancesListCall struct {
25522	s            *Service
25523	project      string
25524	zone         string
25525	urlParams_   gensupport.URLParams
25526	ifNoneMatch_ string
25527	ctx_         context.Context
25528}
25529
25530// List: Retrieves the list of instances contained within the specified
25531// zone.
25532// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list
25533func (r *InstancesService) List(project string, zone string) *InstancesListCall {
25534	c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25535	c.project = project
25536	c.zone = zone
25537	return c
25538}
25539
25540// Filter sets the optional parameter "filter": Sets a filter expression
25541// for filtering listed resources, in the form filter={expression}. Your
25542// {expression} must be in the format: field_name comparison_string
25543// literal_string.
25544//
25545// The field_name is the name of the field you want to compare. Only
25546// atomic field types are supported (string, number, boolean). The
25547// comparison_string must be either eq (equals) or ne (not equals). The
25548// literal_string is the string value to filter to. The literal value
25549// must be valid for the type of field you are filtering by (string,
25550// number, boolean). For string fields, the literal value is interpreted
25551// as a regular expression using RE2 syntax. The literal value must
25552// match the entire field.
25553//
25554// For example, to filter for instances that do not have a name of
25555// example-instance, you would use filter=name ne
25556// example-instance.
25557//
25558// Compute Engine Beta API Only: If you use filtering in the Beta API,
25559// you can also filter on nested fields. For example, you could filter
25560// on instances that have set the scheduling.automaticRestart field to
25561// true. In particular, use filtering on nested fields to take advantage
25562// of instance labels to organize and filter results based on label
25563// values.
25564//
25565// The Beta API also supports filtering on multiple expressions by
25566// providing each separate expression within parentheses. For example,
25567// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
25568// Multiple expressions are treated as AND expressions, meaning that
25569// resources must match all expressions to pass the filters.
25570func (c *InstancesListCall) Filter(filter string) *InstancesListCall {
25571	c.urlParams_.Set("filter", filter)
25572	return c
25573}
25574
25575// MaxResults sets the optional parameter "maxResults": The maximum
25576// number of results per page that should be returned. If the number of
25577// available results is larger than maxResults, Compute Engine returns a
25578// nextPageToken that can be used to get the next page of results in
25579// subsequent list requests.
25580func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall {
25581	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25582	return c
25583}
25584
25585// PageToken sets the optional parameter "pageToken": Specifies a page
25586// token to use. Set pageToken to the nextPageToken returned by a
25587// previous list request to get the next page of results.
25588func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall {
25589	c.urlParams_.Set("pageToken", pageToken)
25590	return c
25591}
25592
25593// Fields allows partial responses to be retrieved. See
25594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25595// for more information.
25596func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall {
25597	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25598	return c
25599}
25600
25601// IfNoneMatch sets the optional parameter which makes the operation
25602// fail if the object's ETag matches the given value. This is useful for
25603// getting updates only after the object has changed since the last
25604// request. Use googleapi.IsNotModified to check whether the response
25605// error from Do is the result of In-None-Match.
25606func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall {
25607	c.ifNoneMatch_ = entityTag
25608	return c
25609}
25610
25611// Context sets the context to be used in this call's Do method. Any
25612// pending HTTP request will be aborted if the provided context is
25613// canceled.
25614func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
25615	c.ctx_ = ctx
25616	return c
25617}
25618
25619func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
25620	var body io.Reader = nil
25621	c.urlParams_.Set("alt", alt)
25622	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances")
25623	urls += "?" + c.urlParams_.Encode()
25624	req, _ := http.NewRequest("GET", urls, body)
25625	googleapi.Expand(req.URL, map[string]string{
25626		"project": c.project,
25627		"zone":    c.zone,
25628	})
25629	req.Header.Set("User-Agent", c.s.userAgent())
25630	if c.ifNoneMatch_ != "" {
25631		req.Header.Set("If-None-Match", c.ifNoneMatch_)
25632	}
25633	if c.ctx_ != nil {
25634		return ctxhttp.Do(c.ctx_, c.s.client, req)
25635	}
25636	return c.s.client.Do(req)
25637}
25638
25639// Do executes the "compute.instances.list" call.
25640// Exactly one of *InstanceList or error will be non-nil. Any non-2xx
25641// status code is an error. Response headers are in either
25642// *InstanceList.ServerResponse.Header or (if a response was returned at
25643// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25644// to check whether the returned error was because
25645// http.StatusNotModified was returned.
25646func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, error) {
25647	gensupport.SetOptions(c.urlParams_, opts...)
25648	res, err := c.doRequest("json")
25649	if res != nil && res.StatusCode == http.StatusNotModified {
25650		if res.Body != nil {
25651			res.Body.Close()
25652		}
25653		return nil, &googleapi.Error{
25654			Code:   res.StatusCode,
25655			Header: res.Header,
25656		}
25657	}
25658	if err != nil {
25659		return nil, err
25660	}
25661	defer googleapi.CloseBody(res)
25662	if err := googleapi.CheckResponse(res); err != nil {
25663		return nil, err
25664	}
25665	ret := &InstanceList{
25666		ServerResponse: googleapi.ServerResponse{
25667			Header:         res.Header,
25668			HTTPStatusCode: res.StatusCode,
25669		},
25670	}
25671	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25672		return nil, err
25673	}
25674	return ret, nil
25675	// {
25676	//   "description": "Retrieves the list of instances contained within the specified zone.",
25677	//   "httpMethod": "GET",
25678	//   "id": "compute.instances.list",
25679	//   "parameterOrder": [
25680	//     "project",
25681	//     "zone"
25682	//   ],
25683	//   "parameters": {
25684	//     "filter": {
25685	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
25686	//       "location": "query",
25687	//       "type": "string"
25688	//     },
25689	//     "maxResults": {
25690	//       "default": "500",
25691	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
25692	//       "format": "uint32",
25693	//       "location": "query",
25694	//       "maximum": "500",
25695	//       "minimum": "0",
25696	//       "type": "integer"
25697	//     },
25698	//     "pageToken": {
25699	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
25700	//       "location": "query",
25701	//       "type": "string"
25702	//     },
25703	//     "project": {
25704	//       "description": "Project ID for this request.",
25705	//       "location": "path",
25706	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25707	//       "required": true,
25708	//       "type": "string"
25709	//     },
25710	//     "zone": {
25711	//       "description": "The name of the zone for this request.",
25712	//       "location": "path",
25713	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25714	//       "required": true,
25715	//       "type": "string"
25716	//     }
25717	//   },
25718	//   "path": "{project}/zones/{zone}/instances",
25719	//   "response": {
25720	//     "$ref": "InstanceList"
25721	//   },
25722	//   "scopes": [
25723	//     "https://www.googleapis.com/auth/cloud-platform",
25724	//     "https://www.googleapis.com/auth/compute",
25725	//     "https://www.googleapis.com/auth/compute.readonly"
25726	//   ]
25727	// }
25728
25729}
25730
25731// Pages invokes f for each page of results.
25732// A non-nil error returned from f will halt the iteration.
25733// The provided context supersedes any context provided to the Context method.
25734func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error {
25735	c.ctx_ = ctx
25736	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25737	for {
25738		x, err := c.Do()
25739		if err != nil {
25740			return err
25741		}
25742		if err := f(x); err != nil {
25743			return err
25744		}
25745		if x.NextPageToken == "" {
25746			return nil
25747		}
25748		c.PageToken(x.NextPageToken)
25749	}
25750}
25751
25752// method id "compute.instances.reset":
25753
25754type InstancesResetCall struct {
25755	s          *Service
25756	project    string
25757	zone       string
25758	instance   string
25759	urlParams_ gensupport.URLParams
25760	ctx_       context.Context
25761}
25762
25763// Reset: Performs a hard reset on the instance.
25764// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset
25765func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall {
25766	c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25767	c.project = project
25768	c.zone = zone
25769	c.instance = instance
25770	return c
25771}
25772
25773// Fields allows partial responses to be retrieved. See
25774// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25775// for more information.
25776func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall {
25777	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25778	return c
25779}
25780
25781// Context sets the context to be used in this call's Do method. Any
25782// pending HTTP request will be aborted if the provided context is
25783// canceled.
25784func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall {
25785	c.ctx_ = ctx
25786	return c
25787}
25788
25789func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) {
25790	var body io.Reader = nil
25791	c.urlParams_.Set("alt", alt)
25792	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/reset")
25793	urls += "?" + c.urlParams_.Encode()
25794	req, _ := http.NewRequest("POST", urls, body)
25795	googleapi.Expand(req.URL, map[string]string{
25796		"project":  c.project,
25797		"zone":     c.zone,
25798		"instance": c.instance,
25799	})
25800	req.Header.Set("User-Agent", c.s.userAgent())
25801	if c.ctx_ != nil {
25802		return ctxhttp.Do(c.ctx_, c.s.client, req)
25803	}
25804	return c.s.client.Do(req)
25805}
25806
25807// Do executes the "compute.instances.reset" call.
25808// Exactly one of *Operation or error will be non-nil. Any non-2xx
25809// status code is an error. Response headers are in either
25810// *Operation.ServerResponse.Header or (if a response was returned at
25811// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25812// to check whether the returned error was because
25813// http.StatusNotModified was returned.
25814func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25815	gensupport.SetOptions(c.urlParams_, opts...)
25816	res, err := c.doRequest("json")
25817	if res != nil && res.StatusCode == http.StatusNotModified {
25818		if res.Body != nil {
25819			res.Body.Close()
25820		}
25821		return nil, &googleapi.Error{
25822			Code:   res.StatusCode,
25823			Header: res.Header,
25824		}
25825	}
25826	if err != nil {
25827		return nil, err
25828	}
25829	defer googleapi.CloseBody(res)
25830	if err := googleapi.CheckResponse(res); err != nil {
25831		return nil, err
25832	}
25833	ret := &Operation{
25834		ServerResponse: googleapi.ServerResponse{
25835			Header:         res.Header,
25836			HTTPStatusCode: res.StatusCode,
25837		},
25838	}
25839	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25840		return nil, err
25841	}
25842	return ret, nil
25843	// {
25844	//   "description": "Performs a hard reset on the instance.",
25845	//   "httpMethod": "POST",
25846	//   "id": "compute.instances.reset",
25847	//   "parameterOrder": [
25848	//     "project",
25849	//     "zone",
25850	//     "instance"
25851	//   ],
25852	//   "parameters": {
25853	//     "instance": {
25854	//       "description": "Name of the instance scoping this request.",
25855	//       "location": "path",
25856	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25857	//       "required": true,
25858	//       "type": "string"
25859	//     },
25860	//     "project": {
25861	//       "description": "Project ID for this request.",
25862	//       "location": "path",
25863	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25864	//       "required": true,
25865	//       "type": "string"
25866	//     },
25867	//     "zone": {
25868	//       "description": "The name of the zone for this request.",
25869	//       "location": "path",
25870	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25871	//       "required": true,
25872	//       "type": "string"
25873	//     }
25874	//   },
25875	//   "path": "{project}/zones/{zone}/instances/{instance}/reset",
25876	//   "response": {
25877	//     "$ref": "Operation"
25878	//   },
25879	//   "scopes": [
25880	//     "https://www.googleapis.com/auth/cloud-platform",
25881	//     "https://www.googleapis.com/auth/compute"
25882	//   ]
25883	// }
25884
25885}
25886
25887// method id "compute.instances.setDiskAutoDelete":
25888
25889type InstancesSetDiskAutoDeleteCall struct {
25890	s          *Service
25891	project    string
25892	zone       string
25893	instance   string
25894	urlParams_ gensupport.URLParams
25895	ctx_       context.Context
25896}
25897
25898// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to
25899// an instance.
25900// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setDiskAutoDelete
25901func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall {
25902	c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25903	c.project = project
25904	c.zone = zone
25905	c.instance = instance
25906	c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete))
25907	c.urlParams_.Set("deviceName", deviceName)
25908	return c
25909}
25910
25911// Fields allows partial responses to be retrieved. See
25912// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25913// for more information.
25914func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall {
25915	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25916	return c
25917}
25918
25919// Context sets the context to be used in this call's Do method. Any
25920// pending HTTP request will be aborted if the provided context is
25921// canceled.
25922func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall {
25923	c.ctx_ = ctx
25924	return c
25925}
25926
25927func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) {
25928	var body io.Reader = nil
25929	c.urlParams_.Set("alt", alt)
25930	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete")
25931	urls += "?" + c.urlParams_.Encode()
25932	req, _ := http.NewRequest("POST", urls, body)
25933	googleapi.Expand(req.URL, map[string]string{
25934		"project":  c.project,
25935		"zone":     c.zone,
25936		"instance": c.instance,
25937	})
25938	req.Header.Set("User-Agent", c.s.userAgent())
25939	if c.ctx_ != nil {
25940		return ctxhttp.Do(c.ctx_, c.s.client, req)
25941	}
25942	return c.s.client.Do(req)
25943}
25944
25945// Do executes the "compute.instances.setDiskAutoDelete" call.
25946// Exactly one of *Operation or error will be non-nil. Any non-2xx
25947// status code is an error. Response headers are in either
25948// *Operation.ServerResponse.Header or (if a response was returned at
25949// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25950// to check whether the returned error was because
25951// http.StatusNotModified was returned.
25952func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25953	gensupport.SetOptions(c.urlParams_, opts...)
25954	res, err := c.doRequest("json")
25955	if res != nil && res.StatusCode == http.StatusNotModified {
25956		if res.Body != nil {
25957			res.Body.Close()
25958		}
25959		return nil, &googleapi.Error{
25960			Code:   res.StatusCode,
25961			Header: res.Header,
25962		}
25963	}
25964	if err != nil {
25965		return nil, err
25966	}
25967	defer googleapi.CloseBody(res)
25968	if err := googleapi.CheckResponse(res); err != nil {
25969		return nil, err
25970	}
25971	ret := &Operation{
25972		ServerResponse: googleapi.ServerResponse{
25973			Header:         res.Header,
25974			HTTPStatusCode: res.StatusCode,
25975		},
25976	}
25977	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25978		return nil, err
25979	}
25980	return ret, nil
25981	// {
25982	//   "description": "Sets the auto-delete flag for a disk attached to an instance.",
25983	//   "httpMethod": "POST",
25984	//   "id": "compute.instances.setDiskAutoDelete",
25985	//   "parameterOrder": [
25986	//     "project",
25987	//     "zone",
25988	//     "instance",
25989	//     "autoDelete",
25990	//     "deviceName"
25991	//   ],
25992	//   "parameters": {
25993	//     "autoDelete": {
25994	//       "description": "Whether to auto-delete the disk when the instance is deleted.",
25995	//       "location": "query",
25996	//       "required": true,
25997	//       "type": "boolean"
25998	//     },
25999	//     "deviceName": {
26000	//       "description": "The device name of the disk to modify.",
26001	//       "location": "query",
26002	//       "pattern": "\\w[\\w.-]{0,254}",
26003	//       "required": true,
26004	//       "type": "string"
26005	//     },
26006	//     "instance": {
26007	//       "description": "The instance name.",
26008	//       "location": "path",
26009	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26010	//       "required": true,
26011	//       "type": "string"
26012	//     },
26013	//     "project": {
26014	//       "description": "Project ID for this request.",
26015	//       "location": "path",
26016	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26017	//       "required": true,
26018	//       "type": "string"
26019	//     },
26020	//     "zone": {
26021	//       "description": "The name of the zone for this request.",
26022	//       "location": "path",
26023	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26024	//       "required": true,
26025	//       "type": "string"
26026	//     }
26027	//   },
26028	//   "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete",
26029	//   "response": {
26030	//     "$ref": "Operation"
26031	//   },
26032	//   "scopes": [
26033	//     "https://www.googleapis.com/auth/cloud-platform",
26034	//     "https://www.googleapis.com/auth/compute"
26035	//   ]
26036	// }
26037
26038}
26039
26040// method id "compute.instances.setMachineType":
26041
26042type InstancesSetMachineTypeCall struct {
26043	s                              *Service
26044	project                        string
26045	zone                           string
26046	instance                       string
26047	instancessetmachinetyperequest *InstancesSetMachineTypeRequest
26048	urlParams_                     gensupport.URLParams
26049	ctx_                           context.Context
26050}
26051
26052// SetMachineType: Changes the machine type for a stopped instance to
26053// the machine type specified in the request.
26054func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall {
26055	c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26056	c.project = project
26057	c.zone = zone
26058	c.instance = instance
26059	c.instancessetmachinetyperequest = instancessetmachinetyperequest
26060	return c
26061}
26062
26063// Fields allows partial responses to be retrieved. See
26064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26065// for more information.
26066func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall {
26067	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26068	return c
26069}
26070
26071// Context sets the context to be used in this call's Do method. Any
26072// pending HTTP request will be aborted if the provided context is
26073// canceled.
26074func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall {
26075	c.ctx_ = ctx
26076	return c
26077}
26078
26079func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) {
26080	var body io.Reader = nil
26081	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest)
26082	if err != nil {
26083		return nil, err
26084	}
26085	ctype := "application/json"
26086	c.urlParams_.Set("alt", alt)
26087	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineType")
26088	urls += "?" + c.urlParams_.Encode()
26089	req, _ := http.NewRequest("POST", urls, body)
26090	googleapi.Expand(req.URL, map[string]string{
26091		"project":  c.project,
26092		"zone":     c.zone,
26093		"instance": c.instance,
26094	})
26095	req.Header.Set("Content-Type", ctype)
26096	req.Header.Set("User-Agent", c.s.userAgent())
26097	if c.ctx_ != nil {
26098		return ctxhttp.Do(c.ctx_, c.s.client, req)
26099	}
26100	return c.s.client.Do(req)
26101}
26102
26103// Do executes the "compute.instances.setMachineType" call.
26104// Exactly one of *Operation or error will be non-nil. Any non-2xx
26105// status code is an error. Response headers are in either
26106// *Operation.ServerResponse.Header or (if a response was returned at
26107// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26108// to check whether the returned error was because
26109// http.StatusNotModified was returned.
26110func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26111	gensupport.SetOptions(c.urlParams_, opts...)
26112	res, err := c.doRequest("json")
26113	if res != nil && res.StatusCode == http.StatusNotModified {
26114		if res.Body != nil {
26115			res.Body.Close()
26116		}
26117		return nil, &googleapi.Error{
26118			Code:   res.StatusCode,
26119			Header: res.Header,
26120		}
26121	}
26122	if err != nil {
26123		return nil, err
26124	}
26125	defer googleapi.CloseBody(res)
26126	if err := googleapi.CheckResponse(res); err != nil {
26127		return nil, err
26128	}
26129	ret := &Operation{
26130		ServerResponse: googleapi.ServerResponse{
26131			Header:         res.Header,
26132			HTTPStatusCode: res.StatusCode,
26133		},
26134	}
26135	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26136		return nil, err
26137	}
26138	return ret, nil
26139	// {
26140	//   "description": "Changes the machine type for a stopped instance to the machine type specified in the request.",
26141	//   "httpMethod": "POST",
26142	//   "id": "compute.instances.setMachineType",
26143	//   "parameterOrder": [
26144	//     "project",
26145	//     "zone",
26146	//     "instance"
26147	//   ],
26148	//   "parameters": {
26149	//     "instance": {
26150	//       "description": "Name of the instance scoping this request.",
26151	//       "location": "path",
26152	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26153	//       "required": true,
26154	//       "type": "string"
26155	//     },
26156	//     "project": {
26157	//       "description": "Project ID for this request.",
26158	//       "location": "path",
26159	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26160	//       "required": true,
26161	//       "type": "string"
26162	//     },
26163	//     "zone": {
26164	//       "description": "The name of the zone for this request.",
26165	//       "location": "path",
26166	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26167	//       "required": true,
26168	//       "type": "string"
26169	//     }
26170	//   },
26171	//   "path": "{project}/zones/{zone}/instances/{instance}/setMachineType",
26172	//   "request": {
26173	//     "$ref": "InstancesSetMachineTypeRequest"
26174	//   },
26175	//   "response": {
26176	//     "$ref": "Operation"
26177	//   },
26178	//   "scopes": [
26179	//     "https://www.googleapis.com/auth/cloud-platform",
26180	//     "https://www.googleapis.com/auth/compute"
26181	//   ]
26182	// }
26183
26184}
26185
26186// method id "compute.instances.setMetadata":
26187
26188type InstancesSetMetadataCall struct {
26189	s          *Service
26190	project    string
26191	zone       string
26192	instance   string
26193	metadata   *Metadata
26194	urlParams_ gensupport.URLParams
26195	ctx_       context.Context
26196}
26197
26198// SetMetadata: Sets metadata for the specified instance to the data
26199// included in the request.
26200// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setMetadata
26201func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall {
26202	c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26203	c.project = project
26204	c.zone = zone
26205	c.instance = instance
26206	c.metadata = metadata
26207	return c
26208}
26209
26210// Fields allows partial responses to be retrieved. See
26211// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26212// for more information.
26213func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall {
26214	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26215	return c
26216}
26217
26218// Context sets the context to be used in this call's Do method. Any
26219// pending HTTP request will be aborted if the provided context is
26220// canceled.
26221func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall {
26222	c.ctx_ = ctx
26223	return c
26224}
26225
26226func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) {
26227	var body io.Reader = nil
26228	body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
26229	if err != nil {
26230		return nil, err
26231	}
26232	ctype := "application/json"
26233	c.urlParams_.Set("alt", alt)
26234	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata")
26235	urls += "?" + c.urlParams_.Encode()
26236	req, _ := http.NewRequest("POST", urls, body)
26237	googleapi.Expand(req.URL, map[string]string{
26238		"project":  c.project,
26239		"zone":     c.zone,
26240		"instance": c.instance,
26241	})
26242	req.Header.Set("Content-Type", ctype)
26243	req.Header.Set("User-Agent", c.s.userAgent())
26244	if c.ctx_ != nil {
26245		return ctxhttp.Do(c.ctx_, c.s.client, req)
26246	}
26247	return c.s.client.Do(req)
26248}
26249
26250// Do executes the "compute.instances.setMetadata" call.
26251// Exactly one of *Operation or error will be non-nil. Any non-2xx
26252// status code is an error. Response headers are in either
26253// *Operation.ServerResponse.Header or (if a response was returned at
26254// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26255// to check whether the returned error was because
26256// http.StatusNotModified was returned.
26257func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26258	gensupport.SetOptions(c.urlParams_, opts...)
26259	res, err := c.doRequest("json")
26260	if res != nil && res.StatusCode == http.StatusNotModified {
26261		if res.Body != nil {
26262			res.Body.Close()
26263		}
26264		return nil, &googleapi.Error{
26265			Code:   res.StatusCode,
26266			Header: res.Header,
26267		}
26268	}
26269	if err != nil {
26270		return nil, err
26271	}
26272	defer googleapi.CloseBody(res)
26273	if err := googleapi.CheckResponse(res); err != nil {
26274		return nil, err
26275	}
26276	ret := &Operation{
26277		ServerResponse: googleapi.ServerResponse{
26278			Header:         res.Header,
26279			HTTPStatusCode: res.StatusCode,
26280		},
26281	}
26282	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26283		return nil, err
26284	}
26285	return ret, nil
26286	// {
26287	//   "description": "Sets metadata for the specified instance to the data included in the request.",
26288	//   "httpMethod": "POST",
26289	//   "id": "compute.instances.setMetadata",
26290	//   "parameterOrder": [
26291	//     "project",
26292	//     "zone",
26293	//     "instance"
26294	//   ],
26295	//   "parameters": {
26296	//     "instance": {
26297	//       "description": "Name of the instance scoping this request.",
26298	//       "location": "path",
26299	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26300	//       "required": true,
26301	//       "type": "string"
26302	//     },
26303	//     "project": {
26304	//       "description": "Project ID for this request.",
26305	//       "location": "path",
26306	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26307	//       "required": true,
26308	//       "type": "string"
26309	//     },
26310	//     "zone": {
26311	//       "description": "The name of the zone for this request.",
26312	//       "location": "path",
26313	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26314	//       "required": true,
26315	//       "type": "string"
26316	//     }
26317	//   },
26318	//   "path": "{project}/zones/{zone}/instances/{instance}/setMetadata",
26319	//   "request": {
26320	//     "$ref": "Metadata"
26321	//   },
26322	//   "response": {
26323	//     "$ref": "Operation"
26324	//   },
26325	//   "scopes": [
26326	//     "https://www.googleapis.com/auth/cloud-platform",
26327	//     "https://www.googleapis.com/auth/compute"
26328	//   ]
26329	// }
26330
26331}
26332
26333// method id "compute.instances.setScheduling":
26334
26335type InstancesSetSchedulingCall struct {
26336	s          *Service
26337	project    string
26338	zone       string
26339	instance   string
26340	scheduling *Scheduling
26341	urlParams_ gensupport.URLParams
26342	ctx_       context.Context
26343}
26344
26345// SetScheduling: Sets an instance's scheduling options.
26346// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setScheduling
26347func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall {
26348	c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26349	c.project = project
26350	c.zone = zone
26351	c.instance = instance
26352	c.scheduling = scheduling
26353	return c
26354}
26355
26356// Fields allows partial responses to be retrieved. See
26357// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26358// for more information.
26359func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall {
26360	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26361	return c
26362}
26363
26364// Context sets the context to be used in this call's Do method. Any
26365// pending HTTP request will be aborted if the provided context is
26366// canceled.
26367func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall {
26368	c.ctx_ = ctx
26369	return c
26370}
26371
26372func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) {
26373	var body io.Reader = nil
26374	body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling)
26375	if err != nil {
26376		return nil, err
26377	}
26378	ctype := "application/json"
26379	c.urlParams_.Set("alt", alt)
26380	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setScheduling")
26381	urls += "?" + c.urlParams_.Encode()
26382	req, _ := http.NewRequest("POST", urls, body)
26383	googleapi.Expand(req.URL, map[string]string{
26384		"project":  c.project,
26385		"zone":     c.zone,
26386		"instance": c.instance,
26387	})
26388	req.Header.Set("Content-Type", ctype)
26389	req.Header.Set("User-Agent", c.s.userAgent())
26390	if c.ctx_ != nil {
26391		return ctxhttp.Do(c.ctx_, c.s.client, req)
26392	}
26393	return c.s.client.Do(req)
26394}
26395
26396// Do executes the "compute.instances.setScheduling" call.
26397// Exactly one of *Operation or error will be non-nil. Any non-2xx
26398// status code is an error. Response headers are in either
26399// *Operation.ServerResponse.Header or (if a response was returned at
26400// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26401// to check whether the returned error was because
26402// http.StatusNotModified was returned.
26403func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26404	gensupport.SetOptions(c.urlParams_, opts...)
26405	res, err := c.doRequest("json")
26406	if res != nil && res.StatusCode == http.StatusNotModified {
26407		if res.Body != nil {
26408			res.Body.Close()
26409		}
26410		return nil, &googleapi.Error{
26411			Code:   res.StatusCode,
26412			Header: res.Header,
26413		}
26414	}
26415	if err != nil {
26416		return nil, err
26417	}
26418	defer googleapi.CloseBody(res)
26419	if err := googleapi.CheckResponse(res); err != nil {
26420		return nil, err
26421	}
26422	ret := &Operation{
26423		ServerResponse: googleapi.ServerResponse{
26424			Header:         res.Header,
26425			HTTPStatusCode: res.StatusCode,
26426		},
26427	}
26428	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26429		return nil, err
26430	}
26431	return ret, nil
26432	// {
26433	//   "description": "Sets an instance's scheduling options.",
26434	//   "httpMethod": "POST",
26435	//   "id": "compute.instances.setScheduling",
26436	//   "parameterOrder": [
26437	//     "project",
26438	//     "zone",
26439	//     "instance"
26440	//   ],
26441	//   "parameters": {
26442	//     "instance": {
26443	//       "description": "Instance name.",
26444	//       "location": "path",
26445	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26446	//       "required": true,
26447	//       "type": "string"
26448	//     },
26449	//     "project": {
26450	//       "description": "Project ID for this request.",
26451	//       "location": "path",
26452	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26453	//       "required": true,
26454	//       "type": "string"
26455	//     },
26456	//     "zone": {
26457	//       "description": "The name of the zone for this request.",
26458	//       "location": "path",
26459	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26460	//       "required": true,
26461	//       "type": "string"
26462	//     }
26463	//   },
26464	//   "path": "{project}/zones/{zone}/instances/{instance}/setScheduling",
26465	//   "request": {
26466	//     "$ref": "Scheduling"
26467	//   },
26468	//   "response": {
26469	//     "$ref": "Operation"
26470	//   },
26471	//   "scopes": [
26472	//     "https://www.googleapis.com/auth/cloud-platform",
26473	//     "https://www.googleapis.com/auth/compute"
26474	//   ]
26475	// }
26476
26477}
26478
26479// method id "compute.instances.setTags":
26480
26481type InstancesSetTagsCall struct {
26482	s          *Service
26483	project    string
26484	zone       string
26485	instance   string
26486	tags       *Tags
26487	urlParams_ gensupport.URLParams
26488	ctx_       context.Context
26489}
26490
26491// SetTags: Sets tags for the specified instance to the data included in
26492// the request.
26493// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setTags
26494func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall {
26495	c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26496	c.project = project
26497	c.zone = zone
26498	c.instance = instance
26499	c.tags = tags
26500	return c
26501}
26502
26503// Fields allows partial responses to be retrieved. See
26504// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26505// for more information.
26506func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall {
26507	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26508	return c
26509}
26510
26511// Context sets the context to be used in this call's Do method. Any
26512// pending HTTP request will be aborted if the provided context is
26513// canceled.
26514func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall {
26515	c.ctx_ = ctx
26516	return c
26517}
26518
26519func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) {
26520	var body io.Reader = nil
26521	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags)
26522	if err != nil {
26523		return nil, err
26524	}
26525	ctype := "application/json"
26526	c.urlParams_.Set("alt", alt)
26527	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags")
26528	urls += "?" + c.urlParams_.Encode()
26529	req, _ := http.NewRequest("POST", urls, body)
26530	googleapi.Expand(req.URL, map[string]string{
26531		"project":  c.project,
26532		"zone":     c.zone,
26533		"instance": c.instance,
26534	})
26535	req.Header.Set("Content-Type", ctype)
26536	req.Header.Set("User-Agent", c.s.userAgent())
26537	if c.ctx_ != nil {
26538		return ctxhttp.Do(c.ctx_, c.s.client, req)
26539	}
26540	return c.s.client.Do(req)
26541}
26542
26543// Do executes the "compute.instances.setTags" call.
26544// Exactly one of *Operation or error will be non-nil. Any non-2xx
26545// status code is an error. Response headers are in either
26546// *Operation.ServerResponse.Header or (if a response was returned at
26547// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26548// to check whether the returned error was because
26549// http.StatusNotModified was returned.
26550func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26551	gensupport.SetOptions(c.urlParams_, opts...)
26552	res, err := c.doRequest("json")
26553	if res != nil && res.StatusCode == http.StatusNotModified {
26554		if res.Body != nil {
26555			res.Body.Close()
26556		}
26557		return nil, &googleapi.Error{
26558			Code:   res.StatusCode,
26559			Header: res.Header,
26560		}
26561	}
26562	if err != nil {
26563		return nil, err
26564	}
26565	defer googleapi.CloseBody(res)
26566	if err := googleapi.CheckResponse(res); err != nil {
26567		return nil, err
26568	}
26569	ret := &Operation{
26570		ServerResponse: googleapi.ServerResponse{
26571			Header:         res.Header,
26572			HTTPStatusCode: res.StatusCode,
26573		},
26574	}
26575	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26576		return nil, err
26577	}
26578	return ret, nil
26579	// {
26580	//   "description": "Sets tags for the specified instance to the data included in the request.",
26581	//   "httpMethod": "POST",
26582	//   "id": "compute.instances.setTags",
26583	//   "parameterOrder": [
26584	//     "project",
26585	//     "zone",
26586	//     "instance"
26587	//   ],
26588	//   "parameters": {
26589	//     "instance": {
26590	//       "description": "Name of the instance scoping this request.",
26591	//       "location": "path",
26592	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26593	//       "required": true,
26594	//       "type": "string"
26595	//     },
26596	//     "project": {
26597	//       "description": "Project ID for this request.",
26598	//       "location": "path",
26599	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26600	//       "required": true,
26601	//       "type": "string"
26602	//     },
26603	//     "zone": {
26604	//       "description": "The name of the zone for this request.",
26605	//       "location": "path",
26606	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26607	//       "required": true,
26608	//       "type": "string"
26609	//     }
26610	//   },
26611	//   "path": "{project}/zones/{zone}/instances/{instance}/setTags",
26612	//   "request": {
26613	//     "$ref": "Tags"
26614	//   },
26615	//   "response": {
26616	//     "$ref": "Operation"
26617	//   },
26618	//   "scopes": [
26619	//     "https://www.googleapis.com/auth/cloud-platform",
26620	//     "https://www.googleapis.com/auth/compute"
26621	//   ]
26622	// }
26623
26624}
26625
26626// method id "compute.instances.start":
26627
26628type InstancesStartCall struct {
26629	s          *Service
26630	project    string
26631	zone       string
26632	instance   string
26633	urlParams_ gensupport.URLParams
26634	ctx_       context.Context
26635}
26636
26637// Start: Starts an instance that was stopped using the using the
26638// instances().stop method. For more information, see Restart an
26639// instance.
26640// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start
26641func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall {
26642	c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26643	c.project = project
26644	c.zone = zone
26645	c.instance = instance
26646	return c
26647}
26648
26649// Fields allows partial responses to be retrieved. See
26650// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26651// for more information.
26652func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall {
26653	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26654	return c
26655}
26656
26657// Context sets the context to be used in this call's Do method. Any
26658// pending HTTP request will be aborted if the provided context is
26659// canceled.
26660func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall {
26661	c.ctx_ = ctx
26662	return c
26663}
26664
26665func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) {
26666	var body io.Reader = nil
26667	c.urlParams_.Set("alt", alt)
26668	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/start")
26669	urls += "?" + c.urlParams_.Encode()
26670	req, _ := http.NewRequest("POST", urls, body)
26671	googleapi.Expand(req.URL, map[string]string{
26672		"project":  c.project,
26673		"zone":     c.zone,
26674		"instance": c.instance,
26675	})
26676	req.Header.Set("User-Agent", c.s.userAgent())
26677	if c.ctx_ != nil {
26678		return ctxhttp.Do(c.ctx_, c.s.client, req)
26679	}
26680	return c.s.client.Do(req)
26681}
26682
26683// Do executes the "compute.instances.start" call.
26684// Exactly one of *Operation or error will be non-nil. Any non-2xx
26685// status code is an error. Response headers are in either
26686// *Operation.ServerResponse.Header or (if a response was returned at
26687// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26688// to check whether the returned error was because
26689// http.StatusNotModified was returned.
26690func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26691	gensupport.SetOptions(c.urlParams_, opts...)
26692	res, err := c.doRequest("json")
26693	if res != nil && res.StatusCode == http.StatusNotModified {
26694		if res.Body != nil {
26695			res.Body.Close()
26696		}
26697		return nil, &googleapi.Error{
26698			Code:   res.StatusCode,
26699			Header: res.Header,
26700		}
26701	}
26702	if err != nil {
26703		return nil, err
26704	}
26705	defer googleapi.CloseBody(res)
26706	if err := googleapi.CheckResponse(res); err != nil {
26707		return nil, err
26708	}
26709	ret := &Operation{
26710		ServerResponse: googleapi.ServerResponse{
26711			Header:         res.Header,
26712			HTTPStatusCode: res.StatusCode,
26713		},
26714	}
26715	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26716		return nil, err
26717	}
26718	return ret, nil
26719	// {
26720	//   "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.",
26721	//   "httpMethod": "POST",
26722	//   "id": "compute.instances.start",
26723	//   "parameterOrder": [
26724	//     "project",
26725	//     "zone",
26726	//     "instance"
26727	//   ],
26728	//   "parameters": {
26729	//     "instance": {
26730	//       "description": "Name of the instance resource to start.",
26731	//       "location": "path",
26732	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26733	//       "required": true,
26734	//       "type": "string"
26735	//     },
26736	//     "project": {
26737	//       "description": "Project ID for this request.",
26738	//       "location": "path",
26739	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26740	//       "required": true,
26741	//       "type": "string"
26742	//     },
26743	//     "zone": {
26744	//       "description": "The name of the zone for this request.",
26745	//       "location": "path",
26746	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26747	//       "required": true,
26748	//       "type": "string"
26749	//     }
26750	//   },
26751	//   "path": "{project}/zones/{zone}/instances/{instance}/start",
26752	//   "response": {
26753	//     "$ref": "Operation"
26754	//   },
26755	//   "scopes": [
26756	//     "https://www.googleapis.com/auth/cloud-platform",
26757	//     "https://www.googleapis.com/auth/compute"
26758	//   ]
26759	// }
26760
26761}
26762
26763// method id "compute.instances.stop":
26764
26765type InstancesStopCall struct {
26766	s          *Service
26767	project    string
26768	zone       string
26769	instance   string
26770	urlParams_ gensupport.URLParams
26771	ctx_       context.Context
26772}
26773
26774// Stop: Stops a running instance, shutting it down cleanly, and allows
26775// you to restart the instance at a later time. Stopped instances do not
26776// incur per-minute, virtual machine usage charges while they are
26777// stopped, but any resources that the virtual machine is using, such as
26778// persistent disks and static IP addresses, will continue to be charged
26779// until they are deleted. For more information, see Stopping an
26780// instance.
26781// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop
26782func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall {
26783	c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26784	c.project = project
26785	c.zone = zone
26786	c.instance = instance
26787	return c
26788}
26789
26790// Fields allows partial responses to be retrieved. See
26791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26792// for more information.
26793func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall {
26794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26795	return c
26796}
26797
26798// Context sets the context to be used in this call's Do method. Any
26799// pending HTTP request will be aborted if the provided context is
26800// canceled.
26801func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall {
26802	c.ctx_ = ctx
26803	return c
26804}
26805
26806func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) {
26807	var body io.Reader = nil
26808	c.urlParams_.Set("alt", alt)
26809	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/stop")
26810	urls += "?" + c.urlParams_.Encode()
26811	req, _ := http.NewRequest("POST", urls, body)
26812	googleapi.Expand(req.URL, map[string]string{
26813		"project":  c.project,
26814		"zone":     c.zone,
26815		"instance": c.instance,
26816	})
26817	req.Header.Set("User-Agent", c.s.userAgent())
26818	if c.ctx_ != nil {
26819		return ctxhttp.Do(c.ctx_, c.s.client, req)
26820	}
26821	return c.s.client.Do(req)
26822}
26823
26824// Do executes the "compute.instances.stop" call.
26825// Exactly one of *Operation or error will be non-nil. Any non-2xx
26826// status code is an error. Response headers are in either
26827// *Operation.ServerResponse.Header or (if a response was returned at
26828// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26829// to check whether the returned error was because
26830// http.StatusNotModified was returned.
26831func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26832	gensupport.SetOptions(c.urlParams_, opts...)
26833	res, err := c.doRequest("json")
26834	if res != nil && res.StatusCode == http.StatusNotModified {
26835		if res.Body != nil {
26836			res.Body.Close()
26837		}
26838		return nil, &googleapi.Error{
26839			Code:   res.StatusCode,
26840			Header: res.Header,
26841		}
26842	}
26843	if err != nil {
26844		return nil, err
26845	}
26846	defer googleapi.CloseBody(res)
26847	if err := googleapi.CheckResponse(res); err != nil {
26848		return nil, err
26849	}
26850	ret := &Operation{
26851		ServerResponse: googleapi.ServerResponse{
26852			Header:         res.Header,
26853			HTTPStatusCode: res.StatusCode,
26854		},
26855	}
26856	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26857		return nil, err
26858	}
26859	return ret, nil
26860	// {
26861	//   "description": "Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.",
26862	//   "httpMethod": "POST",
26863	//   "id": "compute.instances.stop",
26864	//   "parameterOrder": [
26865	//     "project",
26866	//     "zone",
26867	//     "instance"
26868	//   ],
26869	//   "parameters": {
26870	//     "instance": {
26871	//       "description": "Name of the instance resource to stop.",
26872	//       "location": "path",
26873	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26874	//       "required": true,
26875	//       "type": "string"
26876	//     },
26877	//     "project": {
26878	//       "description": "Project ID for this request.",
26879	//       "location": "path",
26880	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26881	//       "required": true,
26882	//       "type": "string"
26883	//     },
26884	//     "zone": {
26885	//       "description": "The name of the zone for this request.",
26886	//       "location": "path",
26887	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26888	//       "required": true,
26889	//       "type": "string"
26890	//     }
26891	//   },
26892	//   "path": "{project}/zones/{zone}/instances/{instance}/stop",
26893	//   "response": {
26894	//     "$ref": "Operation"
26895	//   },
26896	//   "scopes": [
26897	//     "https://www.googleapis.com/auth/cloud-platform",
26898	//     "https://www.googleapis.com/auth/compute"
26899	//   ]
26900	// }
26901
26902}
26903
26904// method id "compute.licenses.get":
26905
26906type LicensesGetCall struct {
26907	s            *Service
26908	project      string
26909	license      string
26910	urlParams_   gensupport.URLParams
26911	ifNoneMatch_ string
26912	ctx_         context.Context
26913}
26914
26915// Get: Returns the specified License resource. Get a list of available
26916// licenses by making a list() request.
26917// For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get
26918func (r *LicensesService) Get(project string, license string) *LicensesGetCall {
26919	c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26920	c.project = project
26921	c.license = license
26922	return c
26923}
26924
26925// Fields allows partial responses to be retrieved. See
26926// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26927// for more information.
26928func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall {
26929	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26930	return c
26931}
26932
26933// IfNoneMatch sets the optional parameter which makes the operation
26934// fail if the object's ETag matches the given value. This is useful for
26935// getting updates only after the object has changed since the last
26936// request. Use googleapi.IsNotModified to check whether the response
26937// error from Do is the result of In-None-Match.
26938func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall {
26939	c.ifNoneMatch_ = entityTag
26940	return c
26941}
26942
26943// Context sets the context to be used in this call's Do method. Any
26944// pending HTTP request will be aborted if the provided context is
26945// canceled.
26946func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall {
26947	c.ctx_ = ctx
26948	return c
26949}
26950
26951func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) {
26952	var body io.Reader = nil
26953	c.urlParams_.Set("alt", alt)
26954	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{license}")
26955	urls += "?" + c.urlParams_.Encode()
26956	req, _ := http.NewRequest("GET", urls, body)
26957	googleapi.Expand(req.URL, map[string]string{
26958		"project": c.project,
26959		"license": c.license,
26960	})
26961	req.Header.Set("User-Agent", c.s.userAgent())
26962	if c.ifNoneMatch_ != "" {
26963		req.Header.Set("If-None-Match", c.ifNoneMatch_)
26964	}
26965	if c.ctx_ != nil {
26966		return ctxhttp.Do(c.ctx_, c.s.client, req)
26967	}
26968	return c.s.client.Do(req)
26969}
26970
26971// Do executes the "compute.licenses.get" call.
26972// Exactly one of *License or error will be non-nil. Any non-2xx status
26973// code is an error. Response headers are in either
26974// *License.ServerResponse.Header or (if a response was returned at all)
26975// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
26976// check whether the returned error was because http.StatusNotModified
26977// was returned.
26978func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) {
26979	gensupport.SetOptions(c.urlParams_, opts...)
26980	res, err := c.doRequest("json")
26981	if res != nil && res.StatusCode == http.StatusNotModified {
26982		if res.Body != nil {
26983			res.Body.Close()
26984		}
26985		return nil, &googleapi.Error{
26986			Code:   res.StatusCode,
26987			Header: res.Header,
26988		}
26989	}
26990	if err != nil {
26991		return nil, err
26992	}
26993	defer googleapi.CloseBody(res)
26994	if err := googleapi.CheckResponse(res); err != nil {
26995		return nil, err
26996	}
26997	ret := &License{
26998		ServerResponse: googleapi.ServerResponse{
26999			Header:         res.Header,
27000			HTTPStatusCode: res.StatusCode,
27001		},
27002	}
27003	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27004		return nil, err
27005	}
27006	return ret, nil
27007	// {
27008	//   "description": "Returns the specified License resource. Get a list of available licenses by making a list() request.",
27009	//   "httpMethod": "GET",
27010	//   "id": "compute.licenses.get",
27011	//   "parameterOrder": [
27012	//     "project",
27013	//     "license"
27014	//   ],
27015	//   "parameters": {
27016	//     "license": {
27017	//       "description": "Name of the License resource to return.",
27018	//       "location": "path",
27019	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27020	//       "required": true,
27021	//       "type": "string"
27022	//     },
27023	//     "project": {
27024	//       "description": "Project ID for this request.",
27025	//       "location": "path",
27026	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27027	//       "required": true,
27028	//       "type": "string"
27029	//     }
27030	//   },
27031	//   "path": "{project}/global/licenses/{license}",
27032	//   "response": {
27033	//     "$ref": "License"
27034	//   },
27035	//   "scopes": [
27036	//     "https://www.googleapis.com/auth/cloud-platform",
27037	//     "https://www.googleapis.com/auth/compute",
27038	//     "https://www.googleapis.com/auth/compute.readonly"
27039	//   ]
27040	// }
27041
27042}
27043
27044// method id "compute.machineTypes.aggregatedList":
27045
27046type MachineTypesAggregatedListCall struct {
27047	s            *Service
27048	project      string
27049	urlParams_   gensupport.URLParams
27050	ifNoneMatch_ string
27051	ctx_         context.Context
27052}
27053
27054// AggregatedList: Retrieves an aggregated list of machine types.
27055// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList
27056func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall {
27057	c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27058	c.project = project
27059	return c
27060}
27061
27062// Filter sets the optional parameter "filter": Sets a filter expression
27063// for filtering listed resources, in the form filter={expression}. Your
27064// {expression} must be in the format: field_name comparison_string
27065// literal_string.
27066//
27067// The field_name is the name of the field you want to compare. Only
27068// atomic field types are supported (string, number, boolean). The
27069// comparison_string must be either eq (equals) or ne (not equals). The
27070// literal_string is the string value to filter to. The literal value
27071// must be valid for the type of field you are filtering by (string,
27072// number, boolean). For string fields, the literal value is interpreted
27073// as a regular expression using RE2 syntax. The literal value must
27074// match the entire field.
27075//
27076// For example, to filter for instances that do not have a name of
27077// example-instance, you would use filter=name ne
27078// example-instance.
27079//
27080// Compute Engine Beta API Only: If you use filtering in the Beta API,
27081// you can also filter on nested fields. For example, you could filter
27082// on instances that have set the scheduling.automaticRestart field to
27083// true. In particular, use filtering on nested fields to take advantage
27084// of instance labels to organize and filter results based on label
27085// values.
27086//
27087// The Beta API also supports filtering on multiple expressions by
27088// providing each separate expression within parentheses. For example,
27089// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
27090// Multiple expressions are treated as AND expressions, meaning that
27091// resources must match all expressions to pass the filters.
27092func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall {
27093	c.urlParams_.Set("filter", filter)
27094	return c
27095}
27096
27097// MaxResults sets the optional parameter "maxResults": The maximum
27098// number of results per page that should be returned. If the number of
27099// available results is larger than maxResults, Compute Engine returns a
27100// nextPageToken that can be used to get the next page of results in
27101// subsequent list requests.
27102func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall {
27103	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27104	return c
27105}
27106
27107// PageToken sets the optional parameter "pageToken": Specifies a page
27108// token to use. Set pageToken to the nextPageToken returned by a
27109// previous list request to get the next page of results.
27110func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall {
27111	c.urlParams_.Set("pageToken", pageToken)
27112	return c
27113}
27114
27115// Fields allows partial responses to be retrieved. See
27116// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27117// for more information.
27118func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall {
27119	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27120	return c
27121}
27122
27123// IfNoneMatch sets the optional parameter which makes the operation
27124// fail if the object's ETag matches the given value. This is useful for
27125// getting updates only after the object has changed since the last
27126// request. Use googleapi.IsNotModified to check whether the response
27127// error from Do is the result of In-None-Match.
27128func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall {
27129	c.ifNoneMatch_ = entityTag
27130	return c
27131}
27132
27133// Context sets the context to be used in this call's Do method. Any
27134// pending HTTP request will be aborted if the provided context is
27135// canceled.
27136func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall {
27137	c.ctx_ = ctx
27138	return c
27139}
27140
27141func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
27142	var body io.Reader = nil
27143	c.urlParams_.Set("alt", alt)
27144	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/machineTypes")
27145	urls += "?" + c.urlParams_.Encode()
27146	req, _ := http.NewRequest("GET", urls, body)
27147	googleapi.Expand(req.URL, map[string]string{
27148		"project": c.project,
27149	})
27150	req.Header.Set("User-Agent", c.s.userAgent())
27151	if c.ifNoneMatch_ != "" {
27152		req.Header.Set("If-None-Match", c.ifNoneMatch_)
27153	}
27154	if c.ctx_ != nil {
27155		return ctxhttp.Do(c.ctx_, c.s.client, req)
27156	}
27157	return c.s.client.Do(req)
27158}
27159
27160// Do executes the "compute.machineTypes.aggregatedList" call.
27161// Exactly one of *MachineTypeAggregatedList or error will be non-nil.
27162// Any non-2xx status code is an error. Response headers are in either
27163// *MachineTypeAggregatedList.ServerResponse.Header or (if a response
27164// was returned at all) in error.(*googleapi.Error).Header. Use
27165// googleapi.IsNotModified to check whether the returned error was
27166// because http.StatusNotModified was returned.
27167func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, error) {
27168	gensupport.SetOptions(c.urlParams_, opts...)
27169	res, err := c.doRequest("json")
27170	if res != nil && res.StatusCode == http.StatusNotModified {
27171		if res.Body != nil {
27172			res.Body.Close()
27173		}
27174		return nil, &googleapi.Error{
27175			Code:   res.StatusCode,
27176			Header: res.Header,
27177		}
27178	}
27179	if err != nil {
27180		return nil, err
27181	}
27182	defer googleapi.CloseBody(res)
27183	if err := googleapi.CheckResponse(res); err != nil {
27184		return nil, err
27185	}
27186	ret := &MachineTypeAggregatedList{
27187		ServerResponse: googleapi.ServerResponse{
27188			Header:         res.Header,
27189			HTTPStatusCode: res.StatusCode,
27190		},
27191	}
27192	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27193		return nil, err
27194	}
27195	return ret, nil
27196	// {
27197	//   "description": "Retrieves an aggregated list of machine types.",
27198	//   "httpMethod": "GET",
27199	//   "id": "compute.machineTypes.aggregatedList",
27200	//   "parameterOrder": [
27201	//     "project"
27202	//   ],
27203	//   "parameters": {
27204	//     "filter": {
27205	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
27206	//       "location": "query",
27207	//       "type": "string"
27208	//     },
27209	//     "maxResults": {
27210	//       "default": "500",
27211	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
27212	//       "format": "uint32",
27213	//       "location": "query",
27214	//       "maximum": "500",
27215	//       "minimum": "0",
27216	//       "type": "integer"
27217	//     },
27218	//     "pageToken": {
27219	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
27220	//       "location": "query",
27221	//       "type": "string"
27222	//     },
27223	//     "project": {
27224	//       "description": "Project ID for this request.",
27225	//       "location": "path",
27226	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27227	//       "required": true,
27228	//       "type": "string"
27229	//     }
27230	//   },
27231	//   "path": "{project}/aggregated/machineTypes",
27232	//   "response": {
27233	//     "$ref": "MachineTypeAggregatedList"
27234	//   },
27235	//   "scopes": [
27236	//     "https://www.googleapis.com/auth/cloud-platform",
27237	//     "https://www.googleapis.com/auth/compute",
27238	//     "https://www.googleapis.com/auth/compute.readonly"
27239	//   ]
27240	// }
27241
27242}
27243
27244// Pages invokes f for each page of results.
27245// A non-nil error returned from f will halt the iteration.
27246// The provided context supersedes any context provided to the Context method.
27247func (c *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error {
27248	c.ctx_ = ctx
27249	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27250	for {
27251		x, err := c.Do()
27252		if err != nil {
27253			return err
27254		}
27255		if err := f(x); err != nil {
27256			return err
27257		}
27258		if x.NextPageToken == "" {
27259			return nil
27260		}
27261		c.PageToken(x.NextPageToken)
27262	}
27263}
27264
27265// method id "compute.machineTypes.get":
27266
27267type MachineTypesGetCall struct {
27268	s            *Service
27269	project      string
27270	zone         string
27271	machineType  string
27272	urlParams_   gensupport.URLParams
27273	ifNoneMatch_ string
27274	ctx_         context.Context
27275}
27276
27277// Get: Returns the specified machine type. Get a list of available
27278// machine types by making a list() request.
27279// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get
27280func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall {
27281	c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27282	c.project = project
27283	c.zone = zone
27284	c.machineType = machineType
27285	return c
27286}
27287
27288// Fields allows partial responses to be retrieved. See
27289// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27290// for more information.
27291func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall {
27292	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27293	return c
27294}
27295
27296// IfNoneMatch sets the optional parameter which makes the operation
27297// fail if the object's ETag matches the given value. This is useful for
27298// getting updates only after the object has changed since the last
27299// request. Use googleapi.IsNotModified to check whether the response
27300// error from Do is the result of In-None-Match.
27301func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall {
27302	c.ifNoneMatch_ = entityTag
27303	return c
27304}
27305
27306// Context sets the context to be used in this call's Do method. Any
27307// pending HTTP request will be aborted if the provided context is
27308// canceled.
27309func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall {
27310	c.ctx_ = ctx
27311	return c
27312}
27313
27314func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) {
27315	var body io.Reader = nil
27316	c.urlParams_.Set("alt", alt)
27317	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes/{machineType}")
27318	urls += "?" + c.urlParams_.Encode()
27319	req, _ := http.NewRequest("GET", urls, body)
27320	googleapi.Expand(req.URL, map[string]string{
27321		"project":     c.project,
27322		"zone":        c.zone,
27323		"machineType": c.machineType,
27324	})
27325	req.Header.Set("User-Agent", c.s.userAgent())
27326	if c.ifNoneMatch_ != "" {
27327		req.Header.Set("If-None-Match", c.ifNoneMatch_)
27328	}
27329	if c.ctx_ != nil {
27330		return ctxhttp.Do(c.ctx_, c.s.client, req)
27331	}
27332	return c.s.client.Do(req)
27333}
27334
27335// Do executes the "compute.machineTypes.get" call.
27336// Exactly one of *MachineType or error will be non-nil. Any non-2xx
27337// status code is an error. Response headers are in either
27338// *MachineType.ServerResponse.Header or (if a response was returned at
27339// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27340// to check whether the returned error was because
27341// http.StatusNotModified was returned.
27342func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, error) {
27343	gensupport.SetOptions(c.urlParams_, opts...)
27344	res, err := c.doRequest("json")
27345	if res != nil && res.StatusCode == http.StatusNotModified {
27346		if res.Body != nil {
27347			res.Body.Close()
27348		}
27349		return nil, &googleapi.Error{
27350			Code:   res.StatusCode,
27351			Header: res.Header,
27352		}
27353	}
27354	if err != nil {
27355		return nil, err
27356	}
27357	defer googleapi.CloseBody(res)
27358	if err := googleapi.CheckResponse(res); err != nil {
27359		return nil, err
27360	}
27361	ret := &MachineType{
27362		ServerResponse: googleapi.ServerResponse{
27363			Header:         res.Header,
27364			HTTPStatusCode: res.StatusCode,
27365		},
27366	}
27367	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27368		return nil, err
27369	}
27370	return ret, nil
27371	// {
27372	//   "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.",
27373	//   "httpMethod": "GET",
27374	//   "id": "compute.machineTypes.get",
27375	//   "parameterOrder": [
27376	//     "project",
27377	//     "zone",
27378	//     "machineType"
27379	//   ],
27380	//   "parameters": {
27381	//     "machineType": {
27382	//       "description": "Name of the machine type to return.",
27383	//       "location": "path",
27384	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27385	//       "required": true,
27386	//       "type": "string"
27387	//     },
27388	//     "project": {
27389	//       "description": "Project ID for this request.",
27390	//       "location": "path",
27391	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27392	//       "required": true,
27393	//       "type": "string"
27394	//     },
27395	//     "zone": {
27396	//       "description": "The name of the zone for this request.",
27397	//       "location": "path",
27398	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27399	//       "required": true,
27400	//       "type": "string"
27401	//     }
27402	//   },
27403	//   "path": "{project}/zones/{zone}/machineTypes/{machineType}",
27404	//   "response": {
27405	//     "$ref": "MachineType"
27406	//   },
27407	//   "scopes": [
27408	//     "https://www.googleapis.com/auth/cloud-platform",
27409	//     "https://www.googleapis.com/auth/compute",
27410	//     "https://www.googleapis.com/auth/compute.readonly"
27411	//   ]
27412	// }
27413
27414}
27415
27416// method id "compute.machineTypes.list":
27417
27418type MachineTypesListCall struct {
27419	s            *Service
27420	project      string
27421	zone         string
27422	urlParams_   gensupport.URLParams
27423	ifNoneMatch_ string
27424	ctx_         context.Context
27425}
27426
27427// List: Retrieves a list of machine types available to the specified
27428// project.
27429// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list
27430func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall {
27431	c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27432	c.project = project
27433	c.zone = zone
27434	return c
27435}
27436
27437// Filter sets the optional parameter "filter": Sets a filter expression
27438// for filtering listed resources, in the form filter={expression}. Your
27439// {expression} must be in the format: field_name comparison_string
27440// literal_string.
27441//
27442// The field_name is the name of the field you want to compare. Only
27443// atomic field types are supported (string, number, boolean). The
27444// comparison_string must be either eq (equals) or ne (not equals). The
27445// literal_string is the string value to filter to. The literal value
27446// must be valid for the type of field you are filtering by (string,
27447// number, boolean). For string fields, the literal value is interpreted
27448// as a regular expression using RE2 syntax. The literal value must
27449// match the entire field.
27450//
27451// For example, to filter for instances that do not have a name of
27452// example-instance, you would use filter=name ne
27453// example-instance.
27454//
27455// Compute Engine Beta API Only: If you use filtering in the Beta API,
27456// you can also filter on nested fields. For example, you could filter
27457// on instances that have set the scheduling.automaticRestart field to
27458// true. In particular, use filtering on nested fields to take advantage
27459// of instance labels to organize and filter results based on label
27460// values.
27461//
27462// The Beta API also supports filtering on multiple expressions by
27463// providing each separate expression within parentheses. For example,
27464// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
27465// Multiple expressions are treated as AND expressions, meaning that
27466// resources must match all expressions to pass the filters.
27467func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall {
27468	c.urlParams_.Set("filter", filter)
27469	return c
27470}
27471
27472// MaxResults sets the optional parameter "maxResults": The maximum
27473// number of results per page that should be returned. If the number of
27474// available results is larger than maxResults, Compute Engine returns a
27475// nextPageToken that can be used to get the next page of results in
27476// subsequent list requests.
27477func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall {
27478	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27479	return c
27480}
27481
27482// PageToken sets the optional parameter "pageToken": Specifies a page
27483// token to use. Set pageToken to the nextPageToken returned by a
27484// previous list request to get the next page of results.
27485func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall {
27486	c.urlParams_.Set("pageToken", pageToken)
27487	return c
27488}
27489
27490// Fields allows partial responses to be retrieved. See
27491// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27492// for more information.
27493func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall {
27494	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27495	return c
27496}
27497
27498// IfNoneMatch sets the optional parameter which makes the operation
27499// fail if the object's ETag matches the given value. This is useful for
27500// getting updates only after the object has changed since the last
27501// request. Use googleapi.IsNotModified to check whether the response
27502// error from Do is the result of In-None-Match.
27503func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall {
27504	c.ifNoneMatch_ = entityTag
27505	return c
27506}
27507
27508// Context sets the context to be used in this call's Do method. Any
27509// pending HTTP request will be aborted if the provided context is
27510// canceled.
27511func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall {
27512	c.ctx_ = ctx
27513	return c
27514}
27515
27516func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) {
27517	var body io.Reader = nil
27518	c.urlParams_.Set("alt", alt)
27519	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes")
27520	urls += "?" + c.urlParams_.Encode()
27521	req, _ := http.NewRequest("GET", urls, body)
27522	googleapi.Expand(req.URL, map[string]string{
27523		"project": c.project,
27524		"zone":    c.zone,
27525	})
27526	req.Header.Set("User-Agent", c.s.userAgent())
27527	if c.ifNoneMatch_ != "" {
27528		req.Header.Set("If-None-Match", c.ifNoneMatch_)
27529	}
27530	if c.ctx_ != nil {
27531		return ctxhttp.Do(c.ctx_, c.s.client, req)
27532	}
27533	return c.s.client.Do(req)
27534}
27535
27536// Do executes the "compute.machineTypes.list" call.
27537// Exactly one of *MachineTypeList or error will be non-nil. Any non-2xx
27538// status code is an error. Response headers are in either
27539// *MachineTypeList.ServerResponse.Header or (if a response was returned
27540// at all) in error.(*googleapi.Error).Header. Use
27541// googleapi.IsNotModified to check whether the returned error was
27542// because http.StatusNotModified was returned.
27543func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, error) {
27544	gensupport.SetOptions(c.urlParams_, opts...)
27545	res, err := c.doRequest("json")
27546	if res != nil && res.StatusCode == http.StatusNotModified {
27547		if res.Body != nil {
27548			res.Body.Close()
27549		}
27550		return nil, &googleapi.Error{
27551			Code:   res.StatusCode,
27552			Header: res.Header,
27553		}
27554	}
27555	if err != nil {
27556		return nil, err
27557	}
27558	defer googleapi.CloseBody(res)
27559	if err := googleapi.CheckResponse(res); err != nil {
27560		return nil, err
27561	}
27562	ret := &MachineTypeList{
27563		ServerResponse: googleapi.ServerResponse{
27564			Header:         res.Header,
27565			HTTPStatusCode: res.StatusCode,
27566		},
27567	}
27568	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27569		return nil, err
27570	}
27571	return ret, nil
27572	// {
27573	//   "description": "Retrieves a list of machine types available to the specified project.",
27574	//   "httpMethod": "GET",
27575	//   "id": "compute.machineTypes.list",
27576	//   "parameterOrder": [
27577	//     "project",
27578	//     "zone"
27579	//   ],
27580	//   "parameters": {
27581	//     "filter": {
27582	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
27583	//       "location": "query",
27584	//       "type": "string"
27585	//     },
27586	//     "maxResults": {
27587	//       "default": "500",
27588	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
27589	//       "format": "uint32",
27590	//       "location": "query",
27591	//       "maximum": "500",
27592	//       "minimum": "0",
27593	//       "type": "integer"
27594	//     },
27595	//     "pageToken": {
27596	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
27597	//       "location": "query",
27598	//       "type": "string"
27599	//     },
27600	//     "project": {
27601	//       "description": "Project ID for this request.",
27602	//       "location": "path",
27603	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27604	//       "required": true,
27605	//       "type": "string"
27606	//     },
27607	//     "zone": {
27608	//       "description": "The name of the zone for this request.",
27609	//       "location": "path",
27610	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27611	//       "required": true,
27612	//       "type": "string"
27613	//     }
27614	//   },
27615	//   "path": "{project}/zones/{zone}/machineTypes",
27616	//   "response": {
27617	//     "$ref": "MachineTypeList"
27618	//   },
27619	//   "scopes": [
27620	//     "https://www.googleapis.com/auth/cloud-platform",
27621	//     "https://www.googleapis.com/auth/compute",
27622	//     "https://www.googleapis.com/auth/compute.readonly"
27623	//   ]
27624	// }
27625
27626}
27627
27628// Pages invokes f for each page of results.
27629// A non-nil error returned from f will halt the iteration.
27630// The provided context supersedes any context provided to the Context method.
27631func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error {
27632	c.ctx_ = ctx
27633	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27634	for {
27635		x, err := c.Do()
27636		if err != nil {
27637			return err
27638		}
27639		if err := f(x); err != nil {
27640			return err
27641		}
27642		if x.NextPageToken == "" {
27643			return nil
27644		}
27645		c.PageToken(x.NextPageToken)
27646	}
27647}
27648
27649// method id "compute.networks.delete":
27650
27651type NetworksDeleteCall struct {
27652	s          *Service
27653	project    string
27654	network    string
27655	urlParams_ gensupport.URLParams
27656	ctx_       context.Context
27657}
27658
27659// Delete: Deletes the specified network.
27660// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete
27661func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall {
27662	c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27663	c.project = project
27664	c.network = network
27665	return c
27666}
27667
27668// Fields allows partial responses to be retrieved. See
27669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27670// for more information.
27671func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall {
27672	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27673	return c
27674}
27675
27676// Context sets the context to be used in this call's Do method. Any
27677// pending HTTP request will be aborted if the provided context is
27678// canceled.
27679func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall {
27680	c.ctx_ = ctx
27681	return c
27682}
27683
27684func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) {
27685	var body io.Reader = nil
27686	c.urlParams_.Set("alt", alt)
27687	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}")
27688	urls += "?" + c.urlParams_.Encode()
27689	req, _ := http.NewRequest("DELETE", urls, body)
27690	googleapi.Expand(req.URL, map[string]string{
27691		"project": c.project,
27692		"network": c.network,
27693	})
27694	req.Header.Set("User-Agent", c.s.userAgent())
27695	if c.ctx_ != nil {
27696		return ctxhttp.Do(c.ctx_, c.s.client, req)
27697	}
27698	return c.s.client.Do(req)
27699}
27700
27701// Do executes the "compute.networks.delete" call.
27702// Exactly one of *Operation or error will be non-nil. Any non-2xx
27703// status code is an error. Response headers are in either
27704// *Operation.ServerResponse.Header or (if a response was returned at
27705// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27706// to check whether the returned error was because
27707// http.StatusNotModified was returned.
27708func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27709	gensupport.SetOptions(c.urlParams_, opts...)
27710	res, err := c.doRequest("json")
27711	if res != nil && res.StatusCode == http.StatusNotModified {
27712		if res.Body != nil {
27713			res.Body.Close()
27714		}
27715		return nil, &googleapi.Error{
27716			Code:   res.StatusCode,
27717			Header: res.Header,
27718		}
27719	}
27720	if err != nil {
27721		return nil, err
27722	}
27723	defer googleapi.CloseBody(res)
27724	if err := googleapi.CheckResponse(res); err != nil {
27725		return nil, err
27726	}
27727	ret := &Operation{
27728		ServerResponse: googleapi.ServerResponse{
27729			Header:         res.Header,
27730			HTTPStatusCode: res.StatusCode,
27731		},
27732	}
27733	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27734		return nil, err
27735	}
27736	return ret, nil
27737	// {
27738	//   "description": "Deletes the specified network.",
27739	//   "httpMethod": "DELETE",
27740	//   "id": "compute.networks.delete",
27741	//   "parameterOrder": [
27742	//     "project",
27743	//     "network"
27744	//   ],
27745	//   "parameters": {
27746	//     "network": {
27747	//       "description": "Name of the network to delete.",
27748	//       "location": "path",
27749	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27750	//       "required": true,
27751	//       "type": "string"
27752	//     },
27753	//     "project": {
27754	//       "description": "Project ID for this request.",
27755	//       "location": "path",
27756	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27757	//       "required": true,
27758	//       "type": "string"
27759	//     }
27760	//   },
27761	//   "path": "{project}/global/networks/{network}",
27762	//   "response": {
27763	//     "$ref": "Operation"
27764	//   },
27765	//   "scopes": [
27766	//     "https://www.googleapis.com/auth/cloud-platform",
27767	//     "https://www.googleapis.com/auth/compute"
27768	//   ]
27769	// }
27770
27771}
27772
27773// method id "compute.networks.get":
27774
27775type NetworksGetCall struct {
27776	s            *Service
27777	project      string
27778	network      string
27779	urlParams_   gensupport.URLParams
27780	ifNoneMatch_ string
27781	ctx_         context.Context
27782}
27783
27784// Get: Returns the specified network. Get a list of available networks
27785// by making a list() request.
27786// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get
27787func (r *NetworksService) Get(project string, network string) *NetworksGetCall {
27788	c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27789	c.project = project
27790	c.network = network
27791	return c
27792}
27793
27794// Fields allows partial responses to be retrieved. See
27795// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27796// for more information.
27797func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall {
27798	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27799	return c
27800}
27801
27802// IfNoneMatch sets the optional parameter which makes the operation
27803// fail if the object's ETag matches the given value. This is useful for
27804// getting updates only after the object has changed since the last
27805// request. Use googleapi.IsNotModified to check whether the response
27806// error from Do is the result of In-None-Match.
27807func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall {
27808	c.ifNoneMatch_ = entityTag
27809	return c
27810}
27811
27812// Context sets the context to be used in this call's Do method. Any
27813// pending HTTP request will be aborted if the provided context is
27814// canceled.
27815func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall {
27816	c.ctx_ = ctx
27817	return c
27818}
27819
27820func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) {
27821	var body io.Reader = nil
27822	c.urlParams_.Set("alt", alt)
27823	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}")
27824	urls += "?" + c.urlParams_.Encode()
27825	req, _ := http.NewRequest("GET", urls, body)
27826	googleapi.Expand(req.URL, map[string]string{
27827		"project": c.project,
27828		"network": c.network,
27829	})
27830	req.Header.Set("User-Agent", c.s.userAgent())
27831	if c.ifNoneMatch_ != "" {
27832		req.Header.Set("If-None-Match", c.ifNoneMatch_)
27833	}
27834	if c.ctx_ != nil {
27835		return ctxhttp.Do(c.ctx_, c.s.client, req)
27836	}
27837	return c.s.client.Do(req)
27838}
27839
27840// Do executes the "compute.networks.get" call.
27841// Exactly one of *Network or error will be non-nil. Any non-2xx status
27842// code is an error. Response headers are in either
27843// *Network.ServerResponse.Header or (if a response was returned at all)
27844// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
27845// check whether the returned error was because http.StatusNotModified
27846// was returned.
27847func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) {
27848	gensupport.SetOptions(c.urlParams_, opts...)
27849	res, err := c.doRequest("json")
27850	if res != nil && res.StatusCode == http.StatusNotModified {
27851		if res.Body != nil {
27852			res.Body.Close()
27853		}
27854		return nil, &googleapi.Error{
27855			Code:   res.StatusCode,
27856			Header: res.Header,
27857		}
27858	}
27859	if err != nil {
27860		return nil, err
27861	}
27862	defer googleapi.CloseBody(res)
27863	if err := googleapi.CheckResponse(res); err != nil {
27864		return nil, err
27865	}
27866	ret := &Network{
27867		ServerResponse: googleapi.ServerResponse{
27868			Header:         res.Header,
27869			HTTPStatusCode: res.StatusCode,
27870		},
27871	}
27872	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27873		return nil, err
27874	}
27875	return ret, nil
27876	// {
27877	//   "description": "Returns the specified network. Get a list of available networks by making a list() request.",
27878	//   "httpMethod": "GET",
27879	//   "id": "compute.networks.get",
27880	//   "parameterOrder": [
27881	//     "project",
27882	//     "network"
27883	//   ],
27884	//   "parameters": {
27885	//     "network": {
27886	//       "description": "Name of the network to return.",
27887	//       "location": "path",
27888	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27889	//       "required": true,
27890	//       "type": "string"
27891	//     },
27892	//     "project": {
27893	//       "description": "Project ID for this request.",
27894	//       "location": "path",
27895	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27896	//       "required": true,
27897	//       "type": "string"
27898	//     }
27899	//   },
27900	//   "path": "{project}/global/networks/{network}",
27901	//   "response": {
27902	//     "$ref": "Network"
27903	//   },
27904	//   "scopes": [
27905	//     "https://www.googleapis.com/auth/cloud-platform",
27906	//     "https://www.googleapis.com/auth/compute",
27907	//     "https://www.googleapis.com/auth/compute.readonly"
27908	//   ]
27909	// }
27910
27911}
27912
27913// method id "compute.networks.insert":
27914
27915type NetworksInsertCall struct {
27916	s          *Service
27917	project    string
27918	network    *Network
27919	urlParams_ gensupport.URLParams
27920	ctx_       context.Context
27921}
27922
27923// Insert: Creates a network in the specified project using the data
27924// included in the request.
27925// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert
27926func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall {
27927	c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27928	c.project = project
27929	c.network = network
27930	return c
27931}
27932
27933// Fields allows partial responses to be retrieved. See
27934// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27935// for more information.
27936func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall {
27937	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27938	return c
27939}
27940
27941// Context sets the context to be used in this call's Do method. Any
27942// pending HTTP request will be aborted if the provided context is
27943// canceled.
27944func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall {
27945	c.ctx_ = ctx
27946	return c
27947}
27948
27949func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) {
27950	var body io.Reader = nil
27951	body, err := googleapi.WithoutDataWrapper.JSONReader(c.network)
27952	if err != nil {
27953		return nil, err
27954	}
27955	ctype := "application/json"
27956	c.urlParams_.Set("alt", alt)
27957	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks")
27958	urls += "?" + c.urlParams_.Encode()
27959	req, _ := http.NewRequest("POST", urls, body)
27960	googleapi.Expand(req.URL, map[string]string{
27961		"project": c.project,
27962	})
27963	req.Header.Set("Content-Type", ctype)
27964	req.Header.Set("User-Agent", c.s.userAgent())
27965	if c.ctx_ != nil {
27966		return ctxhttp.Do(c.ctx_, c.s.client, req)
27967	}
27968	return c.s.client.Do(req)
27969}
27970
27971// Do executes the "compute.networks.insert" call.
27972// Exactly one of *Operation or error will be non-nil. Any non-2xx
27973// status code is an error. Response headers are in either
27974// *Operation.ServerResponse.Header or (if a response was returned at
27975// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27976// to check whether the returned error was because
27977// http.StatusNotModified was returned.
27978func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27979	gensupport.SetOptions(c.urlParams_, opts...)
27980	res, err := c.doRequest("json")
27981	if res != nil && res.StatusCode == http.StatusNotModified {
27982		if res.Body != nil {
27983			res.Body.Close()
27984		}
27985		return nil, &googleapi.Error{
27986			Code:   res.StatusCode,
27987			Header: res.Header,
27988		}
27989	}
27990	if err != nil {
27991		return nil, err
27992	}
27993	defer googleapi.CloseBody(res)
27994	if err := googleapi.CheckResponse(res); err != nil {
27995		return nil, err
27996	}
27997	ret := &Operation{
27998		ServerResponse: googleapi.ServerResponse{
27999			Header:         res.Header,
28000			HTTPStatusCode: res.StatusCode,
28001		},
28002	}
28003	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28004		return nil, err
28005	}
28006	return ret, nil
28007	// {
28008	//   "description": "Creates a network in the specified project using the data included in the request.",
28009	//   "httpMethod": "POST",
28010	//   "id": "compute.networks.insert",
28011	//   "parameterOrder": [
28012	//     "project"
28013	//   ],
28014	//   "parameters": {
28015	//     "project": {
28016	//       "description": "Project ID for this request.",
28017	//       "location": "path",
28018	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28019	//       "required": true,
28020	//       "type": "string"
28021	//     }
28022	//   },
28023	//   "path": "{project}/global/networks",
28024	//   "request": {
28025	//     "$ref": "Network"
28026	//   },
28027	//   "response": {
28028	//     "$ref": "Operation"
28029	//   },
28030	//   "scopes": [
28031	//     "https://www.googleapis.com/auth/cloud-platform",
28032	//     "https://www.googleapis.com/auth/compute"
28033	//   ]
28034	// }
28035
28036}
28037
28038// method id "compute.networks.list":
28039
28040type NetworksListCall struct {
28041	s            *Service
28042	project      string
28043	urlParams_   gensupport.URLParams
28044	ifNoneMatch_ string
28045	ctx_         context.Context
28046}
28047
28048// List: Retrieves the list of networks available to the specified
28049// project.
28050// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list
28051func (r *NetworksService) List(project string) *NetworksListCall {
28052	c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28053	c.project = project
28054	return c
28055}
28056
28057// Filter sets the optional parameter "filter": Sets a filter expression
28058// for filtering listed resources, in the form filter={expression}. Your
28059// {expression} must be in the format: field_name comparison_string
28060// literal_string.
28061//
28062// The field_name is the name of the field you want to compare. Only
28063// atomic field types are supported (string, number, boolean). The
28064// comparison_string must be either eq (equals) or ne (not equals). The
28065// literal_string is the string value to filter to. The literal value
28066// must be valid for the type of field you are filtering by (string,
28067// number, boolean). For string fields, the literal value is interpreted
28068// as a regular expression using RE2 syntax. The literal value must
28069// match the entire field.
28070//
28071// For example, to filter for instances that do not have a name of
28072// example-instance, you would use filter=name ne
28073// example-instance.
28074//
28075// Compute Engine Beta API Only: If you use filtering in the Beta API,
28076// you can also filter on nested fields. For example, you could filter
28077// on instances that have set the scheduling.automaticRestart field to
28078// true. In particular, use filtering on nested fields to take advantage
28079// of instance labels to organize and filter results based on label
28080// values.
28081//
28082// The Beta API also supports filtering on multiple expressions by
28083// providing each separate expression within parentheses. For example,
28084// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
28085// Multiple expressions are treated as AND expressions, meaning that
28086// resources must match all expressions to pass the filters.
28087func (c *NetworksListCall) Filter(filter string) *NetworksListCall {
28088	c.urlParams_.Set("filter", filter)
28089	return c
28090}
28091
28092// MaxResults sets the optional parameter "maxResults": The maximum
28093// number of results per page that should be returned. If the number of
28094// available results is larger than maxResults, Compute Engine returns a
28095// nextPageToken that can be used to get the next page of results in
28096// subsequent list requests.
28097func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall {
28098	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28099	return c
28100}
28101
28102// PageToken sets the optional parameter "pageToken": Specifies a page
28103// token to use. Set pageToken to the nextPageToken returned by a
28104// previous list request to get the next page of results.
28105func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall {
28106	c.urlParams_.Set("pageToken", pageToken)
28107	return c
28108}
28109
28110// Fields allows partial responses to be retrieved. See
28111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28112// for more information.
28113func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall {
28114	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28115	return c
28116}
28117
28118// IfNoneMatch sets the optional parameter which makes the operation
28119// fail if the object's ETag matches the given value. This is useful for
28120// getting updates only after the object has changed since the last
28121// request. Use googleapi.IsNotModified to check whether the response
28122// error from Do is the result of In-None-Match.
28123func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall {
28124	c.ifNoneMatch_ = entityTag
28125	return c
28126}
28127
28128// Context sets the context to be used in this call's Do method. Any
28129// pending HTTP request will be aborted if the provided context is
28130// canceled.
28131func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall {
28132	c.ctx_ = ctx
28133	return c
28134}
28135
28136func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) {
28137	var body io.Reader = nil
28138	c.urlParams_.Set("alt", alt)
28139	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks")
28140	urls += "?" + c.urlParams_.Encode()
28141	req, _ := http.NewRequest("GET", urls, body)
28142	googleapi.Expand(req.URL, map[string]string{
28143		"project": c.project,
28144	})
28145	req.Header.Set("User-Agent", c.s.userAgent())
28146	if c.ifNoneMatch_ != "" {
28147		req.Header.Set("If-None-Match", c.ifNoneMatch_)
28148	}
28149	if c.ctx_ != nil {
28150		return ctxhttp.Do(c.ctx_, c.s.client, req)
28151	}
28152	return c.s.client.Do(req)
28153}
28154
28155// Do executes the "compute.networks.list" call.
28156// Exactly one of *NetworkList or error will be non-nil. Any non-2xx
28157// status code is an error. Response headers are in either
28158// *NetworkList.ServerResponse.Header or (if a response was returned at
28159// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28160// to check whether the returned error was because
28161// http.StatusNotModified was returned.
28162func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error) {
28163	gensupport.SetOptions(c.urlParams_, opts...)
28164	res, err := c.doRequest("json")
28165	if res != nil && res.StatusCode == http.StatusNotModified {
28166		if res.Body != nil {
28167			res.Body.Close()
28168		}
28169		return nil, &googleapi.Error{
28170			Code:   res.StatusCode,
28171			Header: res.Header,
28172		}
28173	}
28174	if err != nil {
28175		return nil, err
28176	}
28177	defer googleapi.CloseBody(res)
28178	if err := googleapi.CheckResponse(res); err != nil {
28179		return nil, err
28180	}
28181	ret := &NetworkList{
28182		ServerResponse: googleapi.ServerResponse{
28183			Header:         res.Header,
28184			HTTPStatusCode: res.StatusCode,
28185		},
28186	}
28187	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28188		return nil, err
28189	}
28190	return ret, nil
28191	// {
28192	//   "description": "Retrieves the list of networks available to the specified project.",
28193	//   "httpMethod": "GET",
28194	//   "id": "compute.networks.list",
28195	//   "parameterOrder": [
28196	//     "project"
28197	//   ],
28198	//   "parameters": {
28199	//     "filter": {
28200	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
28201	//       "location": "query",
28202	//       "type": "string"
28203	//     },
28204	//     "maxResults": {
28205	//       "default": "500",
28206	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
28207	//       "format": "uint32",
28208	//       "location": "query",
28209	//       "maximum": "500",
28210	//       "minimum": "0",
28211	//       "type": "integer"
28212	//     },
28213	//     "pageToken": {
28214	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
28215	//       "location": "query",
28216	//       "type": "string"
28217	//     },
28218	//     "project": {
28219	//       "description": "Project ID for this request.",
28220	//       "location": "path",
28221	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28222	//       "required": true,
28223	//       "type": "string"
28224	//     }
28225	//   },
28226	//   "path": "{project}/global/networks",
28227	//   "response": {
28228	//     "$ref": "NetworkList"
28229	//   },
28230	//   "scopes": [
28231	//     "https://www.googleapis.com/auth/cloud-platform",
28232	//     "https://www.googleapis.com/auth/compute",
28233	//     "https://www.googleapis.com/auth/compute.readonly"
28234	//   ]
28235	// }
28236
28237}
28238
28239// Pages invokes f for each page of results.
28240// A non-nil error returned from f will halt the iteration.
28241// The provided context supersedes any context provided to the Context method.
28242func (c *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error {
28243	c.ctx_ = ctx
28244	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28245	for {
28246		x, err := c.Do()
28247		if err != nil {
28248			return err
28249		}
28250		if err := f(x); err != nil {
28251			return err
28252		}
28253		if x.NextPageToken == "" {
28254			return nil
28255		}
28256		c.PageToken(x.NextPageToken)
28257	}
28258}
28259
28260// method id "compute.projects.get":
28261
28262type ProjectsGetCall struct {
28263	s            *Service
28264	project      string
28265	urlParams_   gensupport.URLParams
28266	ifNoneMatch_ string
28267	ctx_         context.Context
28268}
28269
28270// Get: Returns the specified Project resource.
28271// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get
28272func (r *ProjectsService) Get(project string) *ProjectsGetCall {
28273	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28274	c.project = project
28275	return c
28276}
28277
28278// Fields allows partial responses to be retrieved. See
28279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28280// for more information.
28281func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
28282	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28283	return c
28284}
28285
28286// IfNoneMatch sets the optional parameter which makes the operation
28287// fail if the object's ETag matches the given value. This is useful for
28288// getting updates only after the object has changed since the last
28289// request. Use googleapi.IsNotModified to check whether the response
28290// error from Do is the result of In-None-Match.
28291func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
28292	c.ifNoneMatch_ = entityTag
28293	return c
28294}
28295
28296// Context sets the context to be used in this call's Do method. Any
28297// pending HTTP request will be aborted if the provided context is
28298// canceled.
28299func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
28300	c.ctx_ = ctx
28301	return c
28302}
28303
28304func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
28305	var body io.Reader = nil
28306	c.urlParams_.Set("alt", alt)
28307	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}")
28308	urls += "?" + c.urlParams_.Encode()
28309	req, _ := http.NewRequest("GET", urls, body)
28310	googleapi.Expand(req.URL, map[string]string{
28311		"project": c.project,
28312	})
28313	req.Header.Set("User-Agent", c.s.userAgent())
28314	if c.ifNoneMatch_ != "" {
28315		req.Header.Set("If-None-Match", c.ifNoneMatch_)
28316	}
28317	if c.ctx_ != nil {
28318		return ctxhttp.Do(c.ctx_, c.s.client, req)
28319	}
28320	return c.s.client.Do(req)
28321}
28322
28323// Do executes the "compute.projects.get" call.
28324// Exactly one of *Project or error will be non-nil. Any non-2xx status
28325// code is an error. Response headers are in either
28326// *Project.ServerResponse.Header or (if a response was returned at all)
28327// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
28328// check whether the returned error was because http.StatusNotModified
28329// was returned.
28330func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
28331	gensupport.SetOptions(c.urlParams_, opts...)
28332	res, err := c.doRequest("json")
28333	if res != nil && res.StatusCode == http.StatusNotModified {
28334		if res.Body != nil {
28335			res.Body.Close()
28336		}
28337		return nil, &googleapi.Error{
28338			Code:   res.StatusCode,
28339			Header: res.Header,
28340		}
28341	}
28342	if err != nil {
28343		return nil, err
28344	}
28345	defer googleapi.CloseBody(res)
28346	if err := googleapi.CheckResponse(res); err != nil {
28347		return nil, err
28348	}
28349	ret := &Project{
28350		ServerResponse: googleapi.ServerResponse{
28351			Header:         res.Header,
28352			HTTPStatusCode: res.StatusCode,
28353		},
28354	}
28355	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28356		return nil, err
28357	}
28358	return ret, nil
28359	// {
28360	//   "description": "Returns the specified Project resource.",
28361	//   "httpMethod": "GET",
28362	//   "id": "compute.projects.get",
28363	//   "parameterOrder": [
28364	//     "project"
28365	//   ],
28366	//   "parameters": {
28367	//     "project": {
28368	//       "description": "Project ID for this request.",
28369	//       "location": "path",
28370	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28371	//       "required": true,
28372	//       "type": "string"
28373	//     }
28374	//   },
28375	//   "path": "{project}",
28376	//   "response": {
28377	//     "$ref": "Project"
28378	//   },
28379	//   "scopes": [
28380	//     "https://www.googleapis.com/auth/cloud-platform",
28381	//     "https://www.googleapis.com/auth/compute",
28382	//     "https://www.googleapis.com/auth/compute.readonly"
28383	//   ]
28384	// }
28385
28386}
28387
28388// method id "compute.projects.moveDisk":
28389
28390type ProjectsMoveDiskCall struct {
28391	s               *Service
28392	project         string
28393	diskmoverequest *DiskMoveRequest
28394	urlParams_      gensupport.URLParams
28395	ctx_            context.Context
28396}
28397
28398// MoveDisk: Moves a persistent disk from one zone to another.
28399func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall {
28400	c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28401	c.project = project
28402	c.diskmoverequest = diskmoverequest
28403	return c
28404}
28405
28406// Fields allows partial responses to be retrieved. See
28407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28408// for more information.
28409func (c *ProjectsMoveDiskCall) Fields(s ...googleapi.Field) *ProjectsMoveDiskCall {
28410	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28411	return c
28412}
28413
28414// Context sets the context to be used in this call's Do method. Any
28415// pending HTTP request will be aborted if the provided context is
28416// canceled.
28417func (c *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall {
28418	c.ctx_ = ctx
28419	return c
28420}
28421
28422func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) {
28423	var body io.Reader = nil
28424	body, err := googleapi.WithoutDataWrapper.JSONReader(c.diskmoverequest)
28425	if err != nil {
28426		return nil, err
28427	}
28428	ctype := "application/json"
28429	c.urlParams_.Set("alt", alt)
28430	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveDisk")
28431	urls += "?" + c.urlParams_.Encode()
28432	req, _ := http.NewRequest("POST", urls, body)
28433	googleapi.Expand(req.URL, map[string]string{
28434		"project": c.project,
28435	})
28436	req.Header.Set("Content-Type", ctype)
28437	req.Header.Set("User-Agent", c.s.userAgent())
28438	if c.ctx_ != nil {
28439		return ctxhttp.Do(c.ctx_, c.s.client, req)
28440	}
28441	return c.s.client.Do(req)
28442}
28443
28444// Do executes the "compute.projects.moveDisk" call.
28445// Exactly one of *Operation or error will be non-nil. Any non-2xx
28446// status code is an error. Response headers are in either
28447// *Operation.ServerResponse.Header or (if a response was returned at
28448// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28449// to check whether the returned error was because
28450// http.StatusNotModified was returned.
28451func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28452	gensupport.SetOptions(c.urlParams_, opts...)
28453	res, err := c.doRequest("json")
28454	if res != nil && res.StatusCode == http.StatusNotModified {
28455		if res.Body != nil {
28456			res.Body.Close()
28457		}
28458		return nil, &googleapi.Error{
28459			Code:   res.StatusCode,
28460			Header: res.Header,
28461		}
28462	}
28463	if err != nil {
28464		return nil, err
28465	}
28466	defer googleapi.CloseBody(res)
28467	if err := googleapi.CheckResponse(res); err != nil {
28468		return nil, err
28469	}
28470	ret := &Operation{
28471		ServerResponse: googleapi.ServerResponse{
28472			Header:         res.Header,
28473			HTTPStatusCode: res.StatusCode,
28474		},
28475	}
28476	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28477		return nil, err
28478	}
28479	return ret, nil
28480	// {
28481	//   "description": "Moves a persistent disk from one zone to another.",
28482	//   "httpMethod": "POST",
28483	//   "id": "compute.projects.moveDisk",
28484	//   "parameterOrder": [
28485	//     "project"
28486	//   ],
28487	//   "parameters": {
28488	//     "project": {
28489	//       "description": "Project ID for this request.",
28490	//       "location": "path",
28491	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28492	//       "required": true,
28493	//       "type": "string"
28494	//     }
28495	//   },
28496	//   "path": "{project}/moveDisk",
28497	//   "request": {
28498	//     "$ref": "DiskMoveRequest"
28499	//   },
28500	//   "response": {
28501	//     "$ref": "Operation"
28502	//   },
28503	//   "scopes": [
28504	//     "https://www.googleapis.com/auth/cloud-platform",
28505	//     "https://www.googleapis.com/auth/compute"
28506	//   ]
28507	// }
28508
28509}
28510
28511// method id "compute.projects.moveInstance":
28512
28513type ProjectsMoveInstanceCall struct {
28514	s                   *Service
28515	project             string
28516	instancemoverequest *InstanceMoveRequest
28517	urlParams_          gensupport.URLParams
28518	ctx_                context.Context
28519}
28520
28521// MoveInstance: Moves an instance and its attached persistent disks
28522// from one zone to another.
28523func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall {
28524	c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28525	c.project = project
28526	c.instancemoverequest = instancemoverequest
28527	return c
28528}
28529
28530// Fields allows partial responses to be retrieved. See
28531// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28532// for more information.
28533func (c *ProjectsMoveInstanceCall) Fields(s ...googleapi.Field) *ProjectsMoveInstanceCall {
28534	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28535	return c
28536}
28537
28538// Context sets the context to be used in this call's Do method. Any
28539// pending HTTP request will be aborted if the provided context is
28540// canceled.
28541func (c *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall {
28542	c.ctx_ = ctx
28543	return c
28544}
28545
28546func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) {
28547	var body io.Reader = nil
28548	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancemoverequest)
28549	if err != nil {
28550		return nil, err
28551	}
28552	ctype := "application/json"
28553	c.urlParams_.Set("alt", alt)
28554	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveInstance")
28555	urls += "?" + c.urlParams_.Encode()
28556	req, _ := http.NewRequest("POST", urls, body)
28557	googleapi.Expand(req.URL, map[string]string{
28558		"project": c.project,
28559	})
28560	req.Header.Set("Content-Type", ctype)
28561	req.Header.Set("User-Agent", c.s.userAgent())
28562	if c.ctx_ != nil {
28563		return ctxhttp.Do(c.ctx_, c.s.client, req)
28564	}
28565	return c.s.client.Do(req)
28566}
28567
28568// Do executes the "compute.projects.moveInstance" call.
28569// Exactly one of *Operation or error will be non-nil. Any non-2xx
28570// status code is an error. Response headers are in either
28571// *Operation.ServerResponse.Header or (if a response was returned at
28572// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28573// to check whether the returned error was because
28574// http.StatusNotModified was returned.
28575func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28576	gensupport.SetOptions(c.urlParams_, opts...)
28577	res, err := c.doRequest("json")
28578	if res != nil && res.StatusCode == http.StatusNotModified {
28579		if res.Body != nil {
28580			res.Body.Close()
28581		}
28582		return nil, &googleapi.Error{
28583			Code:   res.StatusCode,
28584			Header: res.Header,
28585		}
28586	}
28587	if err != nil {
28588		return nil, err
28589	}
28590	defer googleapi.CloseBody(res)
28591	if err := googleapi.CheckResponse(res); err != nil {
28592		return nil, err
28593	}
28594	ret := &Operation{
28595		ServerResponse: googleapi.ServerResponse{
28596			Header:         res.Header,
28597			HTTPStatusCode: res.StatusCode,
28598		},
28599	}
28600	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28601		return nil, err
28602	}
28603	return ret, nil
28604	// {
28605	//   "description": "Moves an instance and its attached persistent disks from one zone to another.",
28606	//   "httpMethod": "POST",
28607	//   "id": "compute.projects.moveInstance",
28608	//   "parameterOrder": [
28609	//     "project"
28610	//   ],
28611	//   "parameters": {
28612	//     "project": {
28613	//       "description": "Project ID for this request.",
28614	//       "location": "path",
28615	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28616	//       "required": true,
28617	//       "type": "string"
28618	//     }
28619	//   },
28620	//   "path": "{project}/moveInstance",
28621	//   "request": {
28622	//     "$ref": "InstanceMoveRequest"
28623	//   },
28624	//   "response": {
28625	//     "$ref": "Operation"
28626	//   },
28627	//   "scopes": [
28628	//     "https://www.googleapis.com/auth/cloud-platform",
28629	//     "https://www.googleapis.com/auth/compute"
28630	//   ]
28631	// }
28632
28633}
28634
28635// method id "compute.projects.setCommonInstanceMetadata":
28636
28637type ProjectsSetCommonInstanceMetadataCall struct {
28638	s          *Service
28639	project    string
28640	metadata   *Metadata
28641	urlParams_ gensupport.URLParams
28642	ctx_       context.Context
28643}
28644
28645// SetCommonInstanceMetadata: Sets metadata common to all instances
28646// within the specified project using the data included in the request.
28647// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setCommonInstanceMetadata
28648func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall {
28649	c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28650	c.project = project
28651	c.metadata = metadata
28652	return c
28653}
28654
28655// Fields allows partial responses to be retrieved. See
28656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28657// for more information.
28658func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall {
28659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28660	return c
28661}
28662
28663// Context sets the context to be used in this call's Do method. Any
28664// pending HTTP request will be aborted if the provided context is
28665// canceled.
28666func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall {
28667	c.ctx_ = ctx
28668	return c
28669}
28670
28671func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) {
28672	var body io.Reader = nil
28673	body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
28674	if err != nil {
28675		return nil, err
28676	}
28677	ctype := "application/json"
28678	c.urlParams_.Set("alt", alt)
28679	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata")
28680	urls += "?" + c.urlParams_.Encode()
28681	req, _ := http.NewRequest("POST", urls, body)
28682	googleapi.Expand(req.URL, map[string]string{
28683		"project": c.project,
28684	})
28685	req.Header.Set("Content-Type", ctype)
28686	req.Header.Set("User-Agent", c.s.userAgent())
28687	if c.ctx_ != nil {
28688		return ctxhttp.Do(c.ctx_, c.s.client, req)
28689	}
28690	return c.s.client.Do(req)
28691}
28692
28693// Do executes the "compute.projects.setCommonInstanceMetadata" call.
28694// Exactly one of *Operation or error will be non-nil. Any non-2xx
28695// status code is an error. Response headers are in either
28696// *Operation.ServerResponse.Header or (if a response was returned at
28697// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28698// to check whether the returned error was because
28699// http.StatusNotModified was returned.
28700func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28701	gensupport.SetOptions(c.urlParams_, opts...)
28702	res, err := c.doRequest("json")
28703	if res != nil && res.StatusCode == http.StatusNotModified {
28704		if res.Body != nil {
28705			res.Body.Close()
28706		}
28707		return nil, &googleapi.Error{
28708			Code:   res.StatusCode,
28709			Header: res.Header,
28710		}
28711	}
28712	if err != nil {
28713		return nil, err
28714	}
28715	defer googleapi.CloseBody(res)
28716	if err := googleapi.CheckResponse(res); err != nil {
28717		return nil, err
28718	}
28719	ret := &Operation{
28720		ServerResponse: googleapi.ServerResponse{
28721			Header:         res.Header,
28722			HTTPStatusCode: res.StatusCode,
28723		},
28724	}
28725	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28726		return nil, err
28727	}
28728	return ret, nil
28729	// {
28730	//   "description": "Sets metadata common to all instances within the specified project using the data included in the request.",
28731	//   "httpMethod": "POST",
28732	//   "id": "compute.projects.setCommonInstanceMetadata",
28733	//   "parameterOrder": [
28734	//     "project"
28735	//   ],
28736	//   "parameters": {
28737	//     "project": {
28738	//       "description": "Project ID for this request.",
28739	//       "location": "path",
28740	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28741	//       "required": true,
28742	//       "type": "string"
28743	//     }
28744	//   },
28745	//   "path": "{project}/setCommonInstanceMetadata",
28746	//   "request": {
28747	//     "$ref": "Metadata"
28748	//   },
28749	//   "response": {
28750	//     "$ref": "Operation"
28751	//   },
28752	//   "scopes": [
28753	//     "https://www.googleapis.com/auth/cloud-platform",
28754	//     "https://www.googleapis.com/auth/compute"
28755	//   ]
28756	// }
28757
28758}
28759
28760// method id "compute.projects.setUsageExportBucket":
28761
28762type ProjectsSetUsageExportBucketCall struct {
28763	s                   *Service
28764	project             string
28765	usageexportlocation *UsageExportLocation
28766	urlParams_          gensupport.URLParams
28767	ctx_                context.Context
28768}
28769
28770// SetUsageExportBucket: Enables the usage export feature and sets the
28771// usage export bucket where reports are stored. If you provide an empty
28772// request body using this method, the usage export feature will be
28773// disabled.
28774// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setUsageExportBucket
28775func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall {
28776	c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28777	c.project = project
28778	c.usageexportlocation = usageexportlocation
28779	return c
28780}
28781
28782// Fields allows partial responses to be retrieved. See
28783// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28784// for more information.
28785func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall {
28786	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28787	return c
28788}
28789
28790// Context sets the context to be used in this call's Do method. Any
28791// pending HTTP request will be aborted if the provided context is
28792// canceled.
28793func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall {
28794	c.ctx_ = ctx
28795	return c
28796}
28797
28798func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) {
28799	var body io.Reader = nil
28800	body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation)
28801	if err != nil {
28802		return nil, err
28803	}
28804	ctype := "application/json"
28805	c.urlParams_.Set("alt", alt)
28806	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket")
28807	urls += "?" + c.urlParams_.Encode()
28808	req, _ := http.NewRequest("POST", urls, body)
28809	googleapi.Expand(req.URL, map[string]string{
28810		"project": c.project,
28811	})
28812	req.Header.Set("Content-Type", ctype)
28813	req.Header.Set("User-Agent", c.s.userAgent())
28814	if c.ctx_ != nil {
28815		return ctxhttp.Do(c.ctx_, c.s.client, req)
28816	}
28817	return c.s.client.Do(req)
28818}
28819
28820// Do executes the "compute.projects.setUsageExportBucket" call.
28821// Exactly one of *Operation or error will be non-nil. Any non-2xx
28822// status code is an error. Response headers are in either
28823// *Operation.ServerResponse.Header or (if a response was returned at
28824// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28825// to check whether the returned error was because
28826// http.StatusNotModified was returned.
28827func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28828	gensupport.SetOptions(c.urlParams_, opts...)
28829	res, err := c.doRequest("json")
28830	if res != nil && res.StatusCode == http.StatusNotModified {
28831		if res.Body != nil {
28832			res.Body.Close()
28833		}
28834		return nil, &googleapi.Error{
28835			Code:   res.StatusCode,
28836			Header: res.Header,
28837		}
28838	}
28839	if err != nil {
28840		return nil, err
28841	}
28842	defer googleapi.CloseBody(res)
28843	if err := googleapi.CheckResponse(res); err != nil {
28844		return nil, err
28845	}
28846	ret := &Operation{
28847		ServerResponse: googleapi.ServerResponse{
28848			Header:         res.Header,
28849			HTTPStatusCode: res.StatusCode,
28850		},
28851	}
28852	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28853		return nil, err
28854	}
28855	return ret, nil
28856	// {
28857	//   "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.",
28858	//   "httpMethod": "POST",
28859	//   "id": "compute.projects.setUsageExportBucket",
28860	//   "parameterOrder": [
28861	//     "project"
28862	//   ],
28863	//   "parameters": {
28864	//     "project": {
28865	//       "description": "Project ID for this request.",
28866	//       "location": "path",
28867	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28868	//       "required": true,
28869	//       "type": "string"
28870	//     }
28871	//   },
28872	//   "path": "{project}/setUsageExportBucket",
28873	//   "request": {
28874	//     "$ref": "UsageExportLocation"
28875	//   },
28876	//   "response": {
28877	//     "$ref": "Operation"
28878	//   },
28879	//   "scopes": [
28880	//     "https://www.googleapis.com/auth/cloud-platform",
28881	//     "https://www.googleapis.com/auth/compute",
28882	//     "https://www.googleapis.com/auth/devstorage.full_control",
28883	//     "https://www.googleapis.com/auth/devstorage.read_only",
28884	//     "https://www.googleapis.com/auth/devstorage.read_write"
28885	//   ]
28886	// }
28887
28888}
28889
28890// method id "compute.regionOperations.delete":
28891
28892type RegionOperationsDeleteCall struct {
28893	s          *Service
28894	project    string
28895	region     string
28896	operation  string
28897	urlParams_ gensupport.URLParams
28898	ctx_       context.Context
28899}
28900
28901// Delete: Deletes the specified region-specific Operations resource.
28902// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/delete
28903func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall {
28904	c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28905	c.project = project
28906	c.region = region
28907	c.operation = operation
28908	return c
28909}
28910
28911// Fields allows partial responses to be retrieved. See
28912// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28913// for more information.
28914func (c *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall {
28915	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28916	return c
28917}
28918
28919// Context sets the context to be used in this call's Do method. Any
28920// pending HTTP request will be aborted if the provided context is
28921// canceled.
28922func (c *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall {
28923	c.ctx_ = ctx
28924	return c
28925}
28926
28927func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
28928	var body io.Reader = nil
28929	c.urlParams_.Set("alt", alt)
28930	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}")
28931	urls += "?" + c.urlParams_.Encode()
28932	req, _ := http.NewRequest("DELETE", urls, body)
28933	googleapi.Expand(req.URL, map[string]string{
28934		"project":   c.project,
28935		"region":    c.region,
28936		"operation": c.operation,
28937	})
28938	req.Header.Set("User-Agent", c.s.userAgent())
28939	if c.ctx_ != nil {
28940		return ctxhttp.Do(c.ctx_, c.s.client, req)
28941	}
28942	return c.s.client.Do(req)
28943}
28944
28945// Do executes the "compute.regionOperations.delete" call.
28946func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
28947	gensupport.SetOptions(c.urlParams_, opts...)
28948	res, err := c.doRequest("json")
28949	if err != nil {
28950		return err
28951	}
28952	defer googleapi.CloseBody(res)
28953	if err := googleapi.CheckResponse(res); err != nil {
28954		return err
28955	}
28956	return nil
28957	// {
28958	//   "description": "Deletes the specified region-specific Operations resource.",
28959	//   "httpMethod": "DELETE",
28960	//   "id": "compute.regionOperations.delete",
28961	//   "parameterOrder": [
28962	//     "project",
28963	//     "region",
28964	//     "operation"
28965	//   ],
28966	//   "parameters": {
28967	//     "operation": {
28968	//       "description": "Name of the Operations resource to delete.",
28969	//       "location": "path",
28970	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28971	//       "required": true,
28972	//       "type": "string"
28973	//     },
28974	//     "project": {
28975	//       "description": "Project ID for this request.",
28976	//       "location": "path",
28977	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28978	//       "required": true,
28979	//       "type": "string"
28980	//     },
28981	//     "region": {
28982	//       "description": "Name of the region for this request.",
28983	//       "location": "path",
28984	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28985	//       "required": true,
28986	//       "type": "string"
28987	//     }
28988	//   },
28989	//   "path": "{project}/regions/{region}/operations/{operation}",
28990	//   "scopes": [
28991	//     "https://www.googleapis.com/auth/cloud-platform",
28992	//     "https://www.googleapis.com/auth/compute"
28993	//   ]
28994	// }
28995
28996}
28997
28998// method id "compute.regionOperations.get":
28999
29000type RegionOperationsGetCall struct {
29001	s            *Service
29002	project      string
29003	region       string
29004	operation    string
29005	urlParams_   gensupport.URLParams
29006	ifNoneMatch_ string
29007	ctx_         context.Context
29008}
29009
29010// Get: Retrieves the specified region-specific Operations resource.
29011// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/get
29012func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall {
29013	c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29014	c.project = project
29015	c.region = region
29016	c.operation = operation
29017	return c
29018}
29019
29020// Fields allows partial responses to be retrieved. See
29021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29022// for more information.
29023func (c *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall {
29024	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29025	return c
29026}
29027
29028// IfNoneMatch sets the optional parameter which makes the operation
29029// fail if the object's ETag matches the given value. This is useful for
29030// getting updates only after the object has changed since the last
29031// request. Use googleapi.IsNotModified to check whether the response
29032// error from Do is the result of In-None-Match.
29033func (c *RegionOperationsGetCall) IfNoneMatch(entityTag string) *RegionOperationsGetCall {
29034	c.ifNoneMatch_ = entityTag
29035	return c
29036}
29037
29038// Context sets the context to be used in this call's Do method. Any
29039// pending HTTP request will be aborted if the provided context is
29040// canceled.
29041func (c *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall {
29042	c.ctx_ = ctx
29043	return c
29044}
29045
29046func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) {
29047	var body io.Reader = nil
29048	c.urlParams_.Set("alt", alt)
29049	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}")
29050	urls += "?" + c.urlParams_.Encode()
29051	req, _ := http.NewRequest("GET", urls, body)
29052	googleapi.Expand(req.URL, map[string]string{
29053		"project":   c.project,
29054		"region":    c.region,
29055		"operation": c.operation,
29056	})
29057	req.Header.Set("User-Agent", c.s.userAgent())
29058	if c.ifNoneMatch_ != "" {
29059		req.Header.Set("If-None-Match", c.ifNoneMatch_)
29060	}
29061	if c.ctx_ != nil {
29062		return ctxhttp.Do(c.ctx_, c.s.client, req)
29063	}
29064	return c.s.client.Do(req)
29065}
29066
29067// Do executes the "compute.regionOperations.get" call.
29068// Exactly one of *Operation or error will be non-nil. Any non-2xx
29069// status code is an error. Response headers are in either
29070// *Operation.ServerResponse.Header or (if a response was returned at
29071// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29072// to check whether the returned error was because
29073// http.StatusNotModified was returned.
29074func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29075	gensupport.SetOptions(c.urlParams_, opts...)
29076	res, err := c.doRequest("json")
29077	if res != nil && res.StatusCode == http.StatusNotModified {
29078		if res.Body != nil {
29079			res.Body.Close()
29080		}
29081		return nil, &googleapi.Error{
29082			Code:   res.StatusCode,
29083			Header: res.Header,
29084		}
29085	}
29086	if err != nil {
29087		return nil, err
29088	}
29089	defer googleapi.CloseBody(res)
29090	if err := googleapi.CheckResponse(res); err != nil {
29091		return nil, err
29092	}
29093	ret := &Operation{
29094		ServerResponse: googleapi.ServerResponse{
29095			Header:         res.Header,
29096			HTTPStatusCode: res.StatusCode,
29097		},
29098	}
29099	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29100		return nil, err
29101	}
29102	return ret, nil
29103	// {
29104	//   "description": "Retrieves the specified region-specific Operations resource.",
29105	//   "httpMethod": "GET",
29106	//   "id": "compute.regionOperations.get",
29107	//   "parameterOrder": [
29108	//     "project",
29109	//     "region",
29110	//     "operation"
29111	//   ],
29112	//   "parameters": {
29113	//     "operation": {
29114	//       "description": "Name of the Operations resource to return.",
29115	//       "location": "path",
29116	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29117	//       "required": true,
29118	//       "type": "string"
29119	//     },
29120	//     "project": {
29121	//       "description": "Project ID for this request.",
29122	//       "location": "path",
29123	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29124	//       "required": true,
29125	//       "type": "string"
29126	//     },
29127	//     "region": {
29128	//       "description": "Name of the region for this request.",
29129	//       "location": "path",
29130	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29131	//       "required": true,
29132	//       "type": "string"
29133	//     }
29134	//   },
29135	//   "path": "{project}/regions/{region}/operations/{operation}",
29136	//   "response": {
29137	//     "$ref": "Operation"
29138	//   },
29139	//   "scopes": [
29140	//     "https://www.googleapis.com/auth/cloud-platform",
29141	//     "https://www.googleapis.com/auth/compute",
29142	//     "https://www.googleapis.com/auth/compute.readonly"
29143	//   ]
29144	// }
29145
29146}
29147
29148// method id "compute.regionOperations.list":
29149
29150type RegionOperationsListCall struct {
29151	s            *Service
29152	project      string
29153	region       string
29154	urlParams_   gensupport.URLParams
29155	ifNoneMatch_ string
29156	ctx_         context.Context
29157}
29158
29159// List: Retrieves a list of Operation resources contained within the
29160// specified region.
29161// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list
29162func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall {
29163	c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29164	c.project = project
29165	c.region = region
29166	return c
29167}
29168
29169// Filter sets the optional parameter "filter": Sets a filter expression
29170// for filtering listed resources, in the form filter={expression}. Your
29171// {expression} must be in the format: field_name comparison_string
29172// literal_string.
29173//
29174// The field_name is the name of the field you want to compare. Only
29175// atomic field types are supported (string, number, boolean). The
29176// comparison_string must be either eq (equals) or ne (not equals). The
29177// literal_string is the string value to filter to. The literal value
29178// must be valid for the type of field you are filtering by (string,
29179// number, boolean). For string fields, the literal value is interpreted
29180// as a regular expression using RE2 syntax. The literal value must
29181// match the entire field.
29182//
29183// For example, to filter for instances that do not have a name of
29184// example-instance, you would use filter=name ne
29185// example-instance.
29186//
29187// Compute Engine Beta API Only: If you use filtering in the Beta API,
29188// you can also filter on nested fields. For example, you could filter
29189// on instances that have set the scheduling.automaticRestart field to
29190// true. In particular, use filtering on nested fields to take advantage
29191// of instance labels to organize and filter results based on label
29192// values.
29193//
29194// The Beta API also supports filtering on multiple expressions by
29195// providing each separate expression within parentheses. For example,
29196// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
29197// Multiple expressions are treated as AND expressions, meaning that
29198// resources must match all expressions to pass the filters.
29199func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall {
29200	c.urlParams_.Set("filter", filter)
29201	return c
29202}
29203
29204// MaxResults sets the optional parameter "maxResults": The maximum
29205// number of results per page that should be returned. If the number of
29206// available results is larger than maxResults, Compute Engine returns a
29207// nextPageToken that can be used to get the next page of results in
29208// subsequent list requests.
29209func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall {
29210	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29211	return c
29212}
29213
29214// PageToken sets the optional parameter "pageToken": Specifies a page
29215// token to use. Set pageToken to the nextPageToken returned by a
29216// previous list request to get the next page of results.
29217func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperationsListCall {
29218	c.urlParams_.Set("pageToken", pageToken)
29219	return c
29220}
29221
29222// Fields allows partial responses to be retrieved. See
29223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29224// for more information.
29225func (c *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall {
29226	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29227	return c
29228}
29229
29230// IfNoneMatch sets the optional parameter which makes the operation
29231// fail if the object's ETag matches the given value. This is useful for
29232// getting updates only after the object has changed since the last
29233// request. Use googleapi.IsNotModified to check whether the response
29234// error from Do is the result of In-None-Match.
29235func (c *RegionOperationsListCall) IfNoneMatch(entityTag string) *RegionOperationsListCall {
29236	c.ifNoneMatch_ = entityTag
29237	return c
29238}
29239
29240// Context sets the context to be used in this call's Do method. Any
29241// pending HTTP request will be aborted if the provided context is
29242// canceled.
29243func (c *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall {
29244	c.ctx_ = ctx
29245	return c
29246}
29247
29248func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) {
29249	var body io.Reader = nil
29250	c.urlParams_.Set("alt", alt)
29251	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations")
29252	urls += "?" + c.urlParams_.Encode()
29253	req, _ := http.NewRequest("GET", urls, body)
29254	googleapi.Expand(req.URL, map[string]string{
29255		"project": c.project,
29256		"region":  c.region,
29257	})
29258	req.Header.Set("User-Agent", c.s.userAgent())
29259	if c.ifNoneMatch_ != "" {
29260		req.Header.Set("If-None-Match", c.ifNoneMatch_)
29261	}
29262	if c.ctx_ != nil {
29263		return ctxhttp.Do(c.ctx_, c.s.client, req)
29264	}
29265	return c.s.client.Do(req)
29266}
29267
29268// Do executes the "compute.regionOperations.list" call.
29269// Exactly one of *OperationList or error will be non-nil. Any non-2xx
29270// status code is an error. Response headers are in either
29271// *OperationList.ServerResponse.Header or (if a response was returned
29272// at all) in error.(*googleapi.Error).Header. Use
29273// googleapi.IsNotModified to check whether the returned error was
29274// because http.StatusNotModified was returned.
29275func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) {
29276	gensupport.SetOptions(c.urlParams_, opts...)
29277	res, err := c.doRequest("json")
29278	if res != nil && res.StatusCode == http.StatusNotModified {
29279		if res.Body != nil {
29280			res.Body.Close()
29281		}
29282		return nil, &googleapi.Error{
29283			Code:   res.StatusCode,
29284			Header: res.Header,
29285		}
29286	}
29287	if err != nil {
29288		return nil, err
29289	}
29290	defer googleapi.CloseBody(res)
29291	if err := googleapi.CheckResponse(res); err != nil {
29292		return nil, err
29293	}
29294	ret := &OperationList{
29295		ServerResponse: googleapi.ServerResponse{
29296			Header:         res.Header,
29297			HTTPStatusCode: res.StatusCode,
29298		},
29299	}
29300	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29301		return nil, err
29302	}
29303	return ret, nil
29304	// {
29305	//   "description": "Retrieves a list of Operation resources contained within the specified region.",
29306	//   "httpMethod": "GET",
29307	//   "id": "compute.regionOperations.list",
29308	//   "parameterOrder": [
29309	//     "project",
29310	//     "region"
29311	//   ],
29312	//   "parameters": {
29313	//     "filter": {
29314	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
29315	//       "location": "query",
29316	//       "type": "string"
29317	//     },
29318	//     "maxResults": {
29319	//       "default": "500",
29320	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
29321	//       "format": "uint32",
29322	//       "location": "query",
29323	//       "maximum": "500",
29324	//       "minimum": "0",
29325	//       "type": "integer"
29326	//     },
29327	//     "pageToken": {
29328	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
29329	//       "location": "query",
29330	//       "type": "string"
29331	//     },
29332	//     "project": {
29333	//       "description": "Project ID for this request.",
29334	//       "location": "path",
29335	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29336	//       "required": true,
29337	//       "type": "string"
29338	//     },
29339	//     "region": {
29340	//       "description": "Name of the region for this request.",
29341	//       "location": "path",
29342	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29343	//       "required": true,
29344	//       "type": "string"
29345	//     }
29346	//   },
29347	//   "path": "{project}/regions/{region}/operations",
29348	//   "response": {
29349	//     "$ref": "OperationList"
29350	//   },
29351	//   "scopes": [
29352	//     "https://www.googleapis.com/auth/cloud-platform",
29353	//     "https://www.googleapis.com/auth/compute",
29354	//     "https://www.googleapis.com/auth/compute.readonly"
29355	//   ]
29356	// }
29357
29358}
29359
29360// Pages invokes f for each page of results.
29361// A non-nil error returned from f will halt the iteration.
29362// The provided context supersedes any context provided to the Context method.
29363func (c *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error {
29364	c.ctx_ = ctx
29365	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29366	for {
29367		x, err := c.Do()
29368		if err != nil {
29369			return err
29370		}
29371		if err := f(x); err != nil {
29372			return err
29373		}
29374		if x.NextPageToken == "" {
29375			return nil
29376		}
29377		c.PageToken(x.NextPageToken)
29378	}
29379}
29380
29381// method id "compute.regions.get":
29382
29383type RegionsGetCall struct {
29384	s            *Service
29385	project      string
29386	region       string
29387	urlParams_   gensupport.URLParams
29388	ifNoneMatch_ string
29389	ctx_         context.Context
29390}
29391
29392// Get: Returns the specified Region resource. Get a list of available
29393// regions by making a list() request.
29394// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get
29395func (r *RegionsService) Get(project string, region string) *RegionsGetCall {
29396	c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29397	c.project = project
29398	c.region = region
29399	return c
29400}
29401
29402// Fields allows partial responses to be retrieved. See
29403// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29404// for more information.
29405func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall {
29406	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29407	return c
29408}
29409
29410// IfNoneMatch sets the optional parameter which makes the operation
29411// fail if the object's ETag matches the given value. This is useful for
29412// getting updates only after the object has changed since the last
29413// request. Use googleapi.IsNotModified to check whether the response
29414// error from Do is the result of In-None-Match.
29415func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall {
29416	c.ifNoneMatch_ = entityTag
29417	return c
29418}
29419
29420// Context sets the context to be used in this call's Do method. Any
29421// pending HTTP request will be aborted if the provided context is
29422// canceled.
29423func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall {
29424	c.ctx_ = ctx
29425	return c
29426}
29427
29428func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) {
29429	var body io.Reader = nil
29430	c.urlParams_.Set("alt", alt)
29431	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}")
29432	urls += "?" + c.urlParams_.Encode()
29433	req, _ := http.NewRequest("GET", urls, body)
29434	googleapi.Expand(req.URL, map[string]string{
29435		"project": c.project,
29436		"region":  c.region,
29437	})
29438	req.Header.Set("User-Agent", c.s.userAgent())
29439	if c.ifNoneMatch_ != "" {
29440		req.Header.Set("If-None-Match", c.ifNoneMatch_)
29441	}
29442	if c.ctx_ != nil {
29443		return ctxhttp.Do(c.ctx_, c.s.client, req)
29444	}
29445	return c.s.client.Do(req)
29446}
29447
29448// Do executes the "compute.regions.get" call.
29449// Exactly one of *Region or error will be non-nil. Any non-2xx status
29450// code is an error. Response headers are in either
29451// *Region.ServerResponse.Header or (if a response was returned at all)
29452// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
29453// check whether the returned error was because http.StatusNotModified
29454// was returned.
29455func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) {
29456	gensupport.SetOptions(c.urlParams_, opts...)
29457	res, err := c.doRequest("json")
29458	if res != nil && res.StatusCode == http.StatusNotModified {
29459		if res.Body != nil {
29460			res.Body.Close()
29461		}
29462		return nil, &googleapi.Error{
29463			Code:   res.StatusCode,
29464			Header: res.Header,
29465		}
29466	}
29467	if err != nil {
29468		return nil, err
29469	}
29470	defer googleapi.CloseBody(res)
29471	if err := googleapi.CheckResponse(res); err != nil {
29472		return nil, err
29473	}
29474	ret := &Region{
29475		ServerResponse: googleapi.ServerResponse{
29476			Header:         res.Header,
29477			HTTPStatusCode: res.StatusCode,
29478		},
29479	}
29480	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29481		return nil, err
29482	}
29483	return ret, nil
29484	// {
29485	//   "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.",
29486	//   "httpMethod": "GET",
29487	//   "id": "compute.regions.get",
29488	//   "parameterOrder": [
29489	//     "project",
29490	//     "region"
29491	//   ],
29492	//   "parameters": {
29493	//     "project": {
29494	//       "description": "Project ID for this request.",
29495	//       "location": "path",
29496	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29497	//       "required": true,
29498	//       "type": "string"
29499	//     },
29500	//     "region": {
29501	//       "description": "Name of the region resource to return.",
29502	//       "location": "path",
29503	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29504	//       "required": true,
29505	//       "type": "string"
29506	//     }
29507	//   },
29508	//   "path": "{project}/regions/{region}",
29509	//   "response": {
29510	//     "$ref": "Region"
29511	//   },
29512	//   "scopes": [
29513	//     "https://www.googleapis.com/auth/cloud-platform",
29514	//     "https://www.googleapis.com/auth/compute",
29515	//     "https://www.googleapis.com/auth/compute.readonly"
29516	//   ]
29517	// }
29518
29519}
29520
29521// method id "compute.regions.list":
29522
29523type RegionsListCall struct {
29524	s            *Service
29525	project      string
29526	urlParams_   gensupport.URLParams
29527	ifNoneMatch_ string
29528	ctx_         context.Context
29529}
29530
29531// List: Retrieves the list of region resources available to the
29532// specified project.
29533// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/list
29534func (r *RegionsService) List(project string) *RegionsListCall {
29535	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29536	c.project = project
29537	return c
29538}
29539
29540// Filter sets the optional parameter "filter": Sets a filter expression
29541// for filtering listed resources, in the form filter={expression}. Your
29542// {expression} must be in the format: field_name comparison_string
29543// literal_string.
29544//
29545// The field_name is the name of the field you want to compare. Only
29546// atomic field types are supported (string, number, boolean). The
29547// comparison_string must be either eq (equals) or ne (not equals). The
29548// literal_string is the string value to filter to. The literal value
29549// must be valid for the type of field you are filtering by (string,
29550// number, boolean). For string fields, the literal value is interpreted
29551// as a regular expression using RE2 syntax. The literal value must
29552// match the entire field.
29553//
29554// For example, to filter for instances that do not have a name of
29555// example-instance, you would use filter=name ne
29556// example-instance.
29557//
29558// Compute Engine Beta API Only: If you use filtering in the Beta API,
29559// you can also filter on nested fields. For example, you could filter
29560// on instances that have set the scheduling.automaticRestart field to
29561// true. In particular, use filtering on nested fields to take advantage
29562// of instance labels to organize and filter results based on label
29563// values.
29564//
29565// The Beta API also supports filtering on multiple expressions by
29566// providing each separate expression within parentheses. For example,
29567// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
29568// Multiple expressions are treated as AND expressions, meaning that
29569// resources must match all expressions to pass the filters.
29570func (c *RegionsListCall) Filter(filter string) *RegionsListCall {
29571	c.urlParams_.Set("filter", filter)
29572	return c
29573}
29574
29575// MaxResults sets the optional parameter "maxResults": The maximum
29576// number of results per page that should be returned. If the number of
29577// available results is larger than maxResults, Compute Engine returns a
29578// nextPageToken that can be used to get the next page of results in
29579// subsequent list requests.
29580func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall {
29581	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29582	return c
29583}
29584
29585// PageToken sets the optional parameter "pageToken": Specifies a page
29586// token to use. Set pageToken to the nextPageToken returned by a
29587// previous list request to get the next page of results.
29588func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall {
29589	c.urlParams_.Set("pageToken", pageToken)
29590	return c
29591}
29592
29593// Fields allows partial responses to be retrieved. See
29594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29595// for more information.
29596func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
29597	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29598	return c
29599}
29600
29601// IfNoneMatch sets the optional parameter which makes the operation
29602// fail if the object's ETag matches the given value. This is useful for
29603// getting updates only after the object has changed since the last
29604// request. Use googleapi.IsNotModified to check whether the response
29605// error from Do is the result of In-None-Match.
29606func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
29607	c.ifNoneMatch_ = entityTag
29608	return c
29609}
29610
29611// Context sets the context to be used in this call's Do method. Any
29612// pending HTTP request will be aborted if the provided context is
29613// canceled.
29614func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
29615	c.ctx_ = ctx
29616	return c
29617}
29618
29619func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
29620	var body io.Reader = nil
29621	c.urlParams_.Set("alt", alt)
29622	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions")
29623	urls += "?" + c.urlParams_.Encode()
29624	req, _ := http.NewRequest("GET", urls, body)
29625	googleapi.Expand(req.URL, map[string]string{
29626		"project": c.project,
29627	})
29628	req.Header.Set("User-Agent", c.s.userAgent())
29629	if c.ifNoneMatch_ != "" {
29630		req.Header.Set("If-None-Match", c.ifNoneMatch_)
29631	}
29632	if c.ctx_ != nil {
29633		return ctxhttp.Do(c.ctx_, c.s.client, req)
29634	}
29635	return c.s.client.Do(req)
29636}
29637
29638// Do executes the "compute.regions.list" call.
29639// Exactly one of *RegionList or error will be non-nil. Any non-2xx
29640// status code is an error. Response headers are in either
29641// *RegionList.ServerResponse.Header or (if a response was returned at
29642// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29643// to check whether the returned error was because
29644// http.StatusNotModified was returned.
29645func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) {
29646	gensupport.SetOptions(c.urlParams_, opts...)
29647	res, err := c.doRequest("json")
29648	if res != nil && res.StatusCode == http.StatusNotModified {
29649		if res.Body != nil {
29650			res.Body.Close()
29651		}
29652		return nil, &googleapi.Error{
29653			Code:   res.StatusCode,
29654			Header: res.Header,
29655		}
29656	}
29657	if err != nil {
29658		return nil, err
29659	}
29660	defer googleapi.CloseBody(res)
29661	if err := googleapi.CheckResponse(res); err != nil {
29662		return nil, err
29663	}
29664	ret := &RegionList{
29665		ServerResponse: googleapi.ServerResponse{
29666			Header:         res.Header,
29667			HTTPStatusCode: res.StatusCode,
29668		},
29669	}
29670	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29671		return nil, err
29672	}
29673	return ret, nil
29674	// {
29675	//   "description": "Retrieves the list of region resources available to the specified project.",
29676	//   "httpMethod": "GET",
29677	//   "id": "compute.regions.list",
29678	//   "parameterOrder": [
29679	//     "project"
29680	//   ],
29681	//   "parameters": {
29682	//     "filter": {
29683	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
29684	//       "location": "query",
29685	//       "type": "string"
29686	//     },
29687	//     "maxResults": {
29688	//       "default": "500",
29689	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
29690	//       "format": "uint32",
29691	//       "location": "query",
29692	//       "maximum": "500",
29693	//       "minimum": "0",
29694	//       "type": "integer"
29695	//     },
29696	//     "pageToken": {
29697	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
29698	//       "location": "query",
29699	//       "type": "string"
29700	//     },
29701	//     "project": {
29702	//       "description": "Project ID for this request.",
29703	//       "location": "path",
29704	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29705	//       "required": true,
29706	//       "type": "string"
29707	//     }
29708	//   },
29709	//   "path": "{project}/regions",
29710	//   "response": {
29711	//     "$ref": "RegionList"
29712	//   },
29713	//   "scopes": [
29714	//     "https://www.googleapis.com/auth/cloud-platform",
29715	//     "https://www.googleapis.com/auth/compute",
29716	//     "https://www.googleapis.com/auth/compute.readonly"
29717	//   ]
29718	// }
29719
29720}
29721
29722// Pages invokes f for each page of results.
29723// A non-nil error returned from f will halt the iteration.
29724// The provided context supersedes any context provided to the Context method.
29725func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error {
29726	c.ctx_ = ctx
29727	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29728	for {
29729		x, err := c.Do()
29730		if err != nil {
29731			return err
29732		}
29733		if err := f(x); err != nil {
29734			return err
29735		}
29736		if x.NextPageToken == "" {
29737			return nil
29738		}
29739		c.PageToken(x.NextPageToken)
29740	}
29741}
29742
29743// method id "compute.routes.delete":
29744
29745type RoutesDeleteCall struct {
29746	s          *Service
29747	project    string
29748	route      string
29749	urlParams_ gensupport.URLParams
29750	ctx_       context.Context
29751}
29752
29753// Delete: Deletes the specified Route resource.
29754// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete
29755func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall {
29756	c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29757	c.project = project
29758	c.route = route
29759	return c
29760}
29761
29762// Fields allows partial responses to be retrieved. See
29763// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29764// for more information.
29765func (c *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall {
29766	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29767	return c
29768}
29769
29770// Context sets the context to be used in this call's Do method. Any
29771// pending HTTP request will be aborted if the provided context is
29772// canceled.
29773func (c *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall {
29774	c.ctx_ = ctx
29775	return c
29776}
29777
29778func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
29779	var body io.Reader = nil
29780	c.urlParams_.Set("alt", alt)
29781	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}")
29782	urls += "?" + c.urlParams_.Encode()
29783	req, _ := http.NewRequest("DELETE", urls, body)
29784	googleapi.Expand(req.URL, map[string]string{
29785		"project": c.project,
29786		"route":   c.route,
29787	})
29788	req.Header.Set("User-Agent", c.s.userAgent())
29789	if c.ctx_ != nil {
29790		return ctxhttp.Do(c.ctx_, c.s.client, req)
29791	}
29792	return c.s.client.Do(req)
29793}
29794
29795// Do executes the "compute.routes.delete" call.
29796// Exactly one of *Operation or error will be non-nil. Any non-2xx
29797// status code is an error. Response headers are in either
29798// *Operation.ServerResponse.Header or (if a response was returned at
29799// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29800// to check whether the returned error was because
29801// http.StatusNotModified was returned.
29802func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29803	gensupport.SetOptions(c.urlParams_, opts...)
29804	res, err := c.doRequest("json")
29805	if res != nil && res.StatusCode == http.StatusNotModified {
29806		if res.Body != nil {
29807			res.Body.Close()
29808		}
29809		return nil, &googleapi.Error{
29810			Code:   res.StatusCode,
29811			Header: res.Header,
29812		}
29813	}
29814	if err != nil {
29815		return nil, err
29816	}
29817	defer googleapi.CloseBody(res)
29818	if err := googleapi.CheckResponse(res); err != nil {
29819		return nil, err
29820	}
29821	ret := &Operation{
29822		ServerResponse: googleapi.ServerResponse{
29823			Header:         res.Header,
29824			HTTPStatusCode: res.StatusCode,
29825		},
29826	}
29827	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29828		return nil, err
29829	}
29830	return ret, nil
29831	// {
29832	//   "description": "Deletes the specified Route resource.",
29833	//   "httpMethod": "DELETE",
29834	//   "id": "compute.routes.delete",
29835	//   "parameterOrder": [
29836	//     "project",
29837	//     "route"
29838	//   ],
29839	//   "parameters": {
29840	//     "project": {
29841	//       "description": "Project ID for this request.",
29842	//       "location": "path",
29843	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29844	//       "required": true,
29845	//       "type": "string"
29846	//     },
29847	//     "route": {
29848	//       "description": "Name of the Route resource to delete.",
29849	//       "location": "path",
29850	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29851	//       "required": true,
29852	//       "type": "string"
29853	//     }
29854	//   },
29855	//   "path": "{project}/global/routes/{route}",
29856	//   "response": {
29857	//     "$ref": "Operation"
29858	//   },
29859	//   "scopes": [
29860	//     "https://www.googleapis.com/auth/cloud-platform",
29861	//     "https://www.googleapis.com/auth/compute"
29862	//   ]
29863	// }
29864
29865}
29866
29867// method id "compute.routes.get":
29868
29869type RoutesGetCall struct {
29870	s            *Service
29871	project      string
29872	route        string
29873	urlParams_   gensupport.URLParams
29874	ifNoneMatch_ string
29875	ctx_         context.Context
29876}
29877
29878// Get: Returns the specified Route resource. Get a list of available
29879// routes by making a list() request.
29880// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get
29881func (r *RoutesService) Get(project string, route string) *RoutesGetCall {
29882	c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29883	c.project = project
29884	c.route = route
29885	return c
29886}
29887
29888// Fields allows partial responses to be retrieved. See
29889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29890// for more information.
29891func (c *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall {
29892	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29893	return c
29894}
29895
29896// IfNoneMatch sets the optional parameter which makes the operation
29897// fail if the object's ETag matches the given value. This is useful for
29898// getting updates only after the object has changed since the last
29899// request. Use googleapi.IsNotModified to check whether the response
29900// error from Do is the result of In-None-Match.
29901func (c *RoutesGetCall) IfNoneMatch(entityTag string) *RoutesGetCall {
29902	c.ifNoneMatch_ = entityTag
29903	return c
29904}
29905
29906// Context sets the context to be used in this call's Do method. Any
29907// pending HTTP request will be aborted if the provided context is
29908// canceled.
29909func (c *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall {
29910	c.ctx_ = ctx
29911	return c
29912}
29913
29914func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) {
29915	var body io.Reader = nil
29916	c.urlParams_.Set("alt", alt)
29917	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}")
29918	urls += "?" + c.urlParams_.Encode()
29919	req, _ := http.NewRequest("GET", urls, body)
29920	googleapi.Expand(req.URL, map[string]string{
29921		"project": c.project,
29922		"route":   c.route,
29923	})
29924	req.Header.Set("User-Agent", c.s.userAgent())
29925	if c.ifNoneMatch_ != "" {
29926		req.Header.Set("If-None-Match", c.ifNoneMatch_)
29927	}
29928	if c.ctx_ != nil {
29929		return ctxhttp.Do(c.ctx_, c.s.client, req)
29930	}
29931	return c.s.client.Do(req)
29932}
29933
29934// Do executes the "compute.routes.get" call.
29935// Exactly one of *Route or error will be non-nil. Any non-2xx status
29936// code is an error. Response headers are in either
29937// *Route.ServerResponse.Header or (if a response was returned at all)
29938// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
29939// check whether the returned error was because http.StatusNotModified
29940// was returned.
29941func (c *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) {
29942	gensupport.SetOptions(c.urlParams_, opts...)
29943	res, err := c.doRequest("json")
29944	if res != nil && res.StatusCode == http.StatusNotModified {
29945		if res.Body != nil {
29946			res.Body.Close()
29947		}
29948		return nil, &googleapi.Error{
29949			Code:   res.StatusCode,
29950			Header: res.Header,
29951		}
29952	}
29953	if err != nil {
29954		return nil, err
29955	}
29956	defer googleapi.CloseBody(res)
29957	if err := googleapi.CheckResponse(res); err != nil {
29958		return nil, err
29959	}
29960	ret := &Route{
29961		ServerResponse: googleapi.ServerResponse{
29962			Header:         res.Header,
29963			HTTPStatusCode: res.StatusCode,
29964		},
29965	}
29966	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29967		return nil, err
29968	}
29969	return ret, nil
29970	// {
29971	//   "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.",
29972	//   "httpMethod": "GET",
29973	//   "id": "compute.routes.get",
29974	//   "parameterOrder": [
29975	//     "project",
29976	//     "route"
29977	//   ],
29978	//   "parameters": {
29979	//     "project": {
29980	//       "description": "Project ID for this request.",
29981	//       "location": "path",
29982	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29983	//       "required": true,
29984	//       "type": "string"
29985	//     },
29986	//     "route": {
29987	//       "description": "Name of the Route resource to return.",
29988	//       "location": "path",
29989	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29990	//       "required": true,
29991	//       "type": "string"
29992	//     }
29993	//   },
29994	//   "path": "{project}/global/routes/{route}",
29995	//   "response": {
29996	//     "$ref": "Route"
29997	//   },
29998	//   "scopes": [
29999	//     "https://www.googleapis.com/auth/cloud-platform",
30000	//     "https://www.googleapis.com/auth/compute",
30001	//     "https://www.googleapis.com/auth/compute.readonly"
30002	//   ]
30003	// }
30004
30005}
30006
30007// method id "compute.routes.insert":
30008
30009type RoutesInsertCall struct {
30010	s          *Service
30011	project    string
30012	route      *Route
30013	urlParams_ gensupport.URLParams
30014	ctx_       context.Context
30015}
30016
30017// Insert: Creates a Route resource in the specified project using the
30018// data included in the request.
30019// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert
30020func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall {
30021	c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30022	c.project = project
30023	c.route = route
30024	return c
30025}
30026
30027// Fields allows partial responses to be retrieved. See
30028// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30029// for more information.
30030func (c *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall {
30031	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30032	return c
30033}
30034
30035// Context sets the context to be used in this call's Do method. Any
30036// pending HTTP request will be aborted if the provided context is
30037// canceled.
30038func (c *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall {
30039	c.ctx_ = ctx
30040	return c
30041}
30042
30043func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) {
30044	var body io.Reader = nil
30045	body, err := googleapi.WithoutDataWrapper.JSONReader(c.route)
30046	if err != nil {
30047		return nil, err
30048	}
30049	ctype := "application/json"
30050	c.urlParams_.Set("alt", alt)
30051	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes")
30052	urls += "?" + c.urlParams_.Encode()
30053	req, _ := http.NewRequest("POST", urls, body)
30054	googleapi.Expand(req.URL, map[string]string{
30055		"project": c.project,
30056	})
30057	req.Header.Set("Content-Type", ctype)
30058	req.Header.Set("User-Agent", c.s.userAgent())
30059	if c.ctx_ != nil {
30060		return ctxhttp.Do(c.ctx_, c.s.client, req)
30061	}
30062	return c.s.client.Do(req)
30063}
30064
30065// Do executes the "compute.routes.insert" call.
30066// Exactly one of *Operation or error will be non-nil. Any non-2xx
30067// status code is an error. Response headers are in either
30068// *Operation.ServerResponse.Header or (if a response was returned at
30069// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30070// to check whether the returned error was because
30071// http.StatusNotModified was returned.
30072func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30073	gensupport.SetOptions(c.urlParams_, opts...)
30074	res, err := c.doRequest("json")
30075	if res != nil && res.StatusCode == http.StatusNotModified {
30076		if res.Body != nil {
30077			res.Body.Close()
30078		}
30079		return nil, &googleapi.Error{
30080			Code:   res.StatusCode,
30081			Header: res.Header,
30082		}
30083	}
30084	if err != nil {
30085		return nil, err
30086	}
30087	defer googleapi.CloseBody(res)
30088	if err := googleapi.CheckResponse(res); err != nil {
30089		return nil, err
30090	}
30091	ret := &Operation{
30092		ServerResponse: googleapi.ServerResponse{
30093			Header:         res.Header,
30094			HTTPStatusCode: res.StatusCode,
30095		},
30096	}
30097	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30098		return nil, err
30099	}
30100	return ret, nil
30101	// {
30102	//   "description": "Creates a Route resource in the specified project using the data included in the request.",
30103	//   "httpMethod": "POST",
30104	//   "id": "compute.routes.insert",
30105	//   "parameterOrder": [
30106	//     "project"
30107	//   ],
30108	//   "parameters": {
30109	//     "project": {
30110	//       "description": "Project ID for this request.",
30111	//       "location": "path",
30112	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30113	//       "required": true,
30114	//       "type": "string"
30115	//     }
30116	//   },
30117	//   "path": "{project}/global/routes",
30118	//   "request": {
30119	//     "$ref": "Route"
30120	//   },
30121	//   "response": {
30122	//     "$ref": "Operation"
30123	//   },
30124	//   "scopes": [
30125	//     "https://www.googleapis.com/auth/cloud-platform",
30126	//     "https://www.googleapis.com/auth/compute"
30127	//   ]
30128	// }
30129
30130}
30131
30132// method id "compute.routes.list":
30133
30134type RoutesListCall struct {
30135	s            *Service
30136	project      string
30137	urlParams_   gensupport.URLParams
30138	ifNoneMatch_ string
30139	ctx_         context.Context
30140}
30141
30142// List: Retrieves the list of Route resources available to the
30143// specified project.
30144// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list
30145func (r *RoutesService) List(project string) *RoutesListCall {
30146	c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30147	c.project = project
30148	return c
30149}
30150
30151// Filter sets the optional parameter "filter": Sets a filter expression
30152// for filtering listed resources, in the form filter={expression}. Your
30153// {expression} must be in the format: field_name comparison_string
30154// literal_string.
30155//
30156// The field_name is the name of the field you want to compare. Only
30157// atomic field types are supported (string, number, boolean). The
30158// comparison_string must be either eq (equals) or ne (not equals). The
30159// literal_string is the string value to filter to. The literal value
30160// must be valid for the type of field you are filtering by (string,
30161// number, boolean). For string fields, the literal value is interpreted
30162// as a regular expression using RE2 syntax. The literal value must
30163// match the entire field.
30164//
30165// For example, to filter for instances that do not have a name of
30166// example-instance, you would use filter=name ne
30167// example-instance.
30168//
30169// Compute Engine Beta API Only: If you use filtering in the Beta API,
30170// you can also filter on nested fields. For example, you could filter
30171// on instances that have set the scheduling.automaticRestart field to
30172// true. In particular, use filtering on nested fields to take advantage
30173// of instance labels to organize and filter results based on label
30174// values.
30175//
30176// The Beta API also supports filtering on multiple expressions by
30177// providing each separate expression within parentheses. For example,
30178// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
30179// Multiple expressions are treated as AND expressions, meaning that
30180// resources must match all expressions to pass the filters.
30181func (c *RoutesListCall) Filter(filter string) *RoutesListCall {
30182	c.urlParams_.Set("filter", filter)
30183	return c
30184}
30185
30186// MaxResults sets the optional parameter "maxResults": The maximum
30187// number of results per page that should be returned. If the number of
30188// available results is larger than maxResults, Compute Engine returns a
30189// nextPageToken that can be used to get the next page of results in
30190// subsequent list requests.
30191func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall {
30192	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
30193	return c
30194}
30195
30196// PageToken sets the optional parameter "pageToken": Specifies a page
30197// token to use. Set pageToken to the nextPageToken returned by a
30198// previous list request to get the next page of results.
30199func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall {
30200	c.urlParams_.Set("pageToken", pageToken)
30201	return c
30202}
30203
30204// Fields allows partial responses to be retrieved. See
30205// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30206// for more information.
30207func (c *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall {
30208	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30209	return c
30210}
30211
30212// IfNoneMatch sets the optional parameter which makes the operation
30213// fail if the object's ETag matches the given value. This is useful for
30214// getting updates only after the object has changed since the last
30215// request. Use googleapi.IsNotModified to check whether the response
30216// error from Do is the result of In-None-Match.
30217func (c *RoutesListCall) IfNoneMatch(entityTag string) *RoutesListCall {
30218	c.ifNoneMatch_ = entityTag
30219	return c
30220}
30221
30222// Context sets the context to be used in this call's Do method. Any
30223// pending HTTP request will be aborted if the provided context is
30224// canceled.
30225func (c *RoutesListCall) Context(ctx context.Context) *RoutesListCall {
30226	c.ctx_ = ctx
30227	return c
30228}
30229
30230func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) {
30231	var body io.Reader = nil
30232	c.urlParams_.Set("alt", alt)
30233	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes")
30234	urls += "?" + c.urlParams_.Encode()
30235	req, _ := http.NewRequest("GET", urls, body)
30236	googleapi.Expand(req.URL, map[string]string{
30237		"project": c.project,
30238	})
30239	req.Header.Set("User-Agent", c.s.userAgent())
30240	if c.ifNoneMatch_ != "" {
30241		req.Header.Set("If-None-Match", c.ifNoneMatch_)
30242	}
30243	if c.ctx_ != nil {
30244		return ctxhttp.Do(c.ctx_, c.s.client, req)
30245	}
30246	return c.s.client.Do(req)
30247}
30248
30249// Do executes the "compute.routes.list" call.
30250// Exactly one of *RouteList or error will be non-nil. Any non-2xx
30251// status code is an error. Response headers are in either
30252// *RouteList.ServerResponse.Header or (if a response was returned at
30253// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30254// to check whether the returned error was because
30255// http.StatusNotModified was returned.
30256func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, error) {
30257	gensupport.SetOptions(c.urlParams_, opts...)
30258	res, err := c.doRequest("json")
30259	if res != nil && res.StatusCode == http.StatusNotModified {
30260		if res.Body != nil {
30261			res.Body.Close()
30262		}
30263		return nil, &googleapi.Error{
30264			Code:   res.StatusCode,
30265			Header: res.Header,
30266		}
30267	}
30268	if err != nil {
30269		return nil, err
30270	}
30271	defer googleapi.CloseBody(res)
30272	if err := googleapi.CheckResponse(res); err != nil {
30273		return nil, err
30274	}
30275	ret := &RouteList{
30276		ServerResponse: googleapi.ServerResponse{
30277			Header:         res.Header,
30278			HTTPStatusCode: res.StatusCode,
30279		},
30280	}
30281	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30282		return nil, err
30283	}
30284	return ret, nil
30285	// {
30286	//   "description": "Retrieves the list of Route resources available to the specified project.",
30287	//   "httpMethod": "GET",
30288	//   "id": "compute.routes.list",
30289	//   "parameterOrder": [
30290	//     "project"
30291	//   ],
30292	//   "parameters": {
30293	//     "filter": {
30294	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
30295	//       "location": "query",
30296	//       "type": "string"
30297	//     },
30298	//     "maxResults": {
30299	//       "default": "500",
30300	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
30301	//       "format": "uint32",
30302	//       "location": "query",
30303	//       "maximum": "500",
30304	//       "minimum": "0",
30305	//       "type": "integer"
30306	//     },
30307	//     "pageToken": {
30308	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
30309	//       "location": "query",
30310	//       "type": "string"
30311	//     },
30312	//     "project": {
30313	//       "description": "Project ID for this request.",
30314	//       "location": "path",
30315	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30316	//       "required": true,
30317	//       "type": "string"
30318	//     }
30319	//   },
30320	//   "path": "{project}/global/routes",
30321	//   "response": {
30322	//     "$ref": "RouteList"
30323	//   },
30324	//   "scopes": [
30325	//     "https://www.googleapis.com/auth/cloud-platform",
30326	//     "https://www.googleapis.com/auth/compute",
30327	//     "https://www.googleapis.com/auth/compute.readonly"
30328	//   ]
30329	// }
30330
30331}
30332
30333// Pages invokes f for each page of results.
30334// A non-nil error returned from f will halt the iteration.
30335// The provided context supersedes any context provided to the Context method.
30336func (c *RoutesListCall) Pages(ctx context.Context, f func(*RouteList) error) error {
30337	c.ctx_ = ctx
30338	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
30339	for {
30340		x, err := c.Do()
30341		if err != nil {
30342			return err
30343		}
30344		if err := f(x); err != nil {
30345			return err
30346		}
30347		if x.NextPageToken == "" {
30348			return nil
30349		}
30350		c.PageToken(x.NextPageToken)
30351	}
30352}
30353
30354// method id "compute.snapshots.delete":
30355
30356type SnapshotsDeleteCall struct {
30357	s          *Service
30358	project    string
30359	snapshot   string
30360	urlParams_ gensupport.URLParams
30361	ctx_       context.Context
30362}
30363
30364// Delete: Deletes the specified Snapshot resource. Keep in mind that
30365// deleting a single snapshot might not necessarily delete all the data
30366// on that snapshot. If any data on the snapshot that is marked for
30367// deletion is needed for subsequent snapshots, the data will be moved
30368// to the next corresponding snapshot.
30369//
30370// For more information, see Deleting snaphots.
30371// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete
30372func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall {
30373	c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30374	c.project = project
30375	c.snapshot = snapshot
30376	return c
30377}
30378
30379// Fields allows partial responses to be retrieved. See
30380// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30381// for more information.
30382func (c *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall {
30383	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30384	return c
30385}
30386
30387// Context sets the context to be used in this call's Do method. Any
30388// pending HTTP request will be aborted if the provided context is
30389// canceled.
30390func (c *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall {
30391	c.ctx_ = ctx
30392	return c
30393}
30394
30395func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) {
30396	var body io.Reader = nil
30397	c.urlParams_.Set("alt", alt)
30398	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}")
30399	urls += "?" + c.urlParams_.Encode()
30400	req, _ := http.NewRequest("DELETE", urls, body)
30401	googleapi.Expand(req.URL, map[string]string{
30402		"project":  c.project,
30403		"snapshot": c.snapshot,
30404	})
30405	req.Header.Set("User-Agent", c.s.userAgent())
30406	if c.ctx_ != nil {
30407		return ctxhttp.Do(c.ctx_, c.s.client, req)
30408	}
30409	return c.s.client.Do(req)
30410}
30411
30412// Do executes the "compute.snapshots.delete" call.
30413// Exactly one of *Operation or error will be non-nil. Any non-2xx
30414// status code is an error. Response headers are in either
30415// *Operation.ServerResponse.Header or (if a response was returned at
30416// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30417// to check whether the returned error was because
30418// http.StatusNotModified was returned.
30419func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30420	gensupport.SetOptions(c.urlParams_, opts...)
30421	res, err := c.doRequest("json")
30422	if res != nil && res.StatusCode == http.StatusNotModified {
30423		if res.Body != nil {
30424			res.Body.Close()
30425		}
30426		return nil, &googleapi.Error{
30427			Code:   res.StatusCode,
30428			Header: res.Header,
30429		}
30430	}
30431	if err != nil {
30432		return nil, err
30433	}
30434	defer googleapi.CloseBody(res)
30435	if err := googleapi.CheckResponse(res); err != nil {
30436		return nil, err
30437	}
30438	ret := &Operation{
30439		ServerResponse: googleapi.ServerResponse{
30440			Header:         res.Header,
30441			HTTPStatusCode: res.StatusCode,
30442		},
30443	}
30444	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30445		return nil, err
30446	}
30447	return ret, nil
30448	// {
30449	//   "description": "Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot.\n\nFor more information, see Deleting snaphots.",
30450	//   "httpMethod": "DELETE",
30451	//   "id": "compute.snapshots.delete",
30452	//   "parameterOrder": [
30453	//     "project",
30454	//     "snapshot"
30455	//   ],
30456	//   "parameters": {
30457	//     "project": {
30458	//       "description": "Project ID for this request.",
30459	//       "location": "path",
30460	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30461	//       "required": true,
30462	//       "type": "string"
30463	//     },
30464	//     "snapshot": {
30465	//       "description": "Name of the Snapshot resource to delete.",
30466	//       "location": "path",
30467	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30468	//       "required": true,
30469	//       "type": "string"
30470	//     }
30471	//   },
30472	//   "path": "{project}/global/snapshots/{snapshot}",
30473	//   "response": {
30474	//     "$ref": "Operation"
30475	//   },
30476	//   "scopes": [
30477	//     "https://www.googleapis.com/auth/cloud-platform",
30478	//     "https://www.googleapis.com/auth/compute"
30479	//   ]
30480	// }
30481
30482}
30483
30484// method id "compute.snapshots.get":
30485
30486type SnapshotsGetCall struct {
30487	s            *Service
30488	project      string
30489	snapshot     string
30490	urlParams_   gensupport.URLParams
30491	ifNoneMatch_ string
30492	ctx_         context.Context
30493}
30494
30495// Get: Returns the specified Snapshot resource. Get a list of available
30496// snapshots by making a list() request.
30497// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get
30498func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall {
30499	c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30500	c.project = project
30501	c.snapshot = snapshot
30502	return c
30503}
30504
30505// Fields allows partial responses to be retrieved. See
30506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30507// for more information.
30508func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall {
30509	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30510	return c
30511}
30512
30513// IfNoneMatch sets the optional parameter which makes the operation
30514// fail if the object's ETag matches the given value. This is useful for
30515// getting updates only after the object has changed since the last
30516// request. Use googleapi.IsNotModified to check whether the response
30517// error from Do is the result of In-None-Match.
30518func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall {
30519	c.ifNoneMatch_ = entityTag
30520	return c
30521}
30522
30523// Context sets the context to be used in this call's Do method. Any
30524// pending HTTP request will be aborted if the provided context is
30525// canceled.
30526func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall {
30527	c.ctx_ = ctx
30528	return c
30529}
30530
30531func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
30532	var body io.Reader = nil
30533	c.urlParams_.Set("alt", alt)
30534	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}")
30535	urls += "?" + c.urlParams_.Encode()
30536	req, _ := http.NewRequest("GET", urls, body)
30537	googleapi.Expand(req.URL, map[string]string{
30538		"project":  c.project,
30539		"snapshot": c.snapshot,
30540	})
30541	req.Header.Set("User-Agent", c.s.userAgent())
30542	if c.ifNoneMatch_ != "" {
30543		req.Header.Set("If-None-Match", c.ifNoneMatch_)
30544	}
30545	if c.ctx_ != nil {
30546		return ctxhttp.Do(c.ctx_, c.s.client, req)
30547	}
30548	return c.s.client.Do(req)
30549}
30550
30551// Do executes the "compute.snapshots.get" call.
30552// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status
30553// code is an error. Response headers are in either
30554// *Snapshot.ServerResponse.Header or (if a response was returned at
30555// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30556// to check whether the returned error was because
30557// http.StatusNotModified was returned.
30558func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) {
30559	gensupport.SetOptions(c.urlParams_, opts...)
30560	res, err := c.doRequest("json")
30561	if res != nil && res.StatusCode == http.StatusNotModified {
30562		if res.Body != nil {
30563			res.Body.Close()
30564		}
30565		return nil, &googleapi.Error{
30566			Code:   res.StatusCode,
30567			Header: res.Header,
30568		}
30569	}
30570	if err != nil {
30571		return nil, err
30572	}
30573	defer googleapi.CloseBody(res)
30574	if err := googleapi.CheckResponse(res); err != nil {
30575		return nil, err
30576	}
30577	ret := &Snapshot{
30578		ServerResponse: googleapi.ServerResponse{
30579			Header:         res.Header,
30580			HTTPStatusCode: res.StatusCode,
30581		},
30582	}
30583	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30584		return nil, err
30585	}
30586	return ret, nil
30587	// {
30588	//   "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.",
30589	//   "httpMethod": "GET",
30590	//   "id": "compute.snapshots.get",
30591	//   "parameterOrder": [
30592	//     "project",
30593	//     "snapshot"
30594	//   ],
30595	//   "parameters": {
30596	//     "project": {
30597	//       "description": "Project ID for this request.",
30598	//       "location": "path",
30599	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30600	//       "required": true,
30601	//       "type": "string"
30602	//     },
30603	//     "snapshot": {
30604	//       "description": "Name of the Snapshot resource to return.",
30605	//       "location": "path",
30606	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30607	//       "required": true,
30608	//       "type": "string"
30609	//     }
30610	//   },
30611	//   "path": "{project}/global/snapshots/{snapshot}",
30612	//   "response": {
30613	//     "$ref": "Snapshot"
30614	//   },
30615	//   "scopes": [
30616	//     "https://www.googleapis.com/auth/cloud-platform",
30617	//     "https://www.googleapis.com/auth/compute",
30618	//     "https://www.googleapis.com/auth/compute.readonly"
30619	//   ]
30620	// }
30621
30622}
30623
30624// method id "compute.snapshots.list":
30625
30626type SnapshotsListCall struct {
30627	s            *Service
30628	project      string
30629	urlParams_   gensupport.URLParams
30630	ifNoneMatch_ string
30631	ctx_         context.Context
30632}
30633
30634// List: Retrieves the list of Snapshot resources contained within the
30635// specified project.
30636// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/list
30637func (r *SnapshotsService) List(project string) *SnapshotsListCall {
30638	c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30639	c.project = project
30640	return c
30641}
30642
30643// Filter sets the optional parameter "filter": Sets a filter expression
30644// for filtering listed resources, in the form filter={expression}. Your
30645// {expression} must be in the format: field_name comparison_string
30646// literal_string.
30647//
30648// The field_name is the name of the field you want to compare. Only
30649// atomic field types are supported (string, number, boolean). The
30650// comparison_string must be either eq (equals) or ne (not equals). The
30651// literal_string is the string value to filter to. The literal value
30652// must be valid for the type of field you are filtering by (string,
30653// number, boolean). For string fields, the literal value is interpreted
30654// as a regular expression using RE2 syntax. The literal value must
30655// match the entire field.
30656//
30657// For example, to filter for instances that do not have a name of
30658// example-instance, you would use filter=name ne
30659// example-instance.
30660//
30661// Compute Engine Beta API Only: If you use filtering in the Beta API,
30662// you can also filter on nested fields. For example, you could filter
30663// on instances that have set the scheduling.automaticRestart field to
30664// true. In particular, use filtering on nested fields to take advantage
30665// of instance labels to organize and filter results based on label
30666// values.
30667//
30668// The Beta API also supports filtering on multiple expressions by
30669// providing each separate expression within parentheses. For example,
30670// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
30671// Multiple expressions are treated as AND expressions, meaning that
30672// resources must match all expressions to pass the filters.
30673func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall {
30674	c.urlParams_.Set("filter", filter)
30675	return c
30676}
30677
30678// MaxResults sets the optional parameter "maxResults": The maximum
30679// number of results per page that should be returned. If the number of
30680// available results is larger than maxResults, Compute Engine returns a
30681// nextPageToken that can be used to get the next page of results in
30682// subsequent list requests.
30683func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall {
30684	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
30685	return c
30686}
30687
30688// PageToken sets the optional parameter "pageToken": Specifies a page
30689// token to use. Set pageToken to the nextPageToken returned by a
30690// previous list request to get the next page of results.
30691func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall {
30692	c.urlParams_.Set("pageToken", pageToken)
30693	return c
30694}
30695
30696// Fields allows partial responses to be retrieved. See
30697// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30698// for more information.
30699func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall {
30700	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30701	return c
30702}
30703
30704// IfNoneMatch sets the optional parameter which makes the operation
30705// fail if the object's ETag matches the given value. This is useful for
30706// getting updates only after the object has changed since the last
30707// request. Use googleapi.IsNotModified to check whether the response
30708// error from Do is the result of In-None-Match.
30709func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall {
30710	c.ifNoneMatch_ = entityTag
30711	return c
30712}
30713
30714// Context sets the context to be used in this call's Do method. Any
30715// pending HTTP request will be aborted if the provided context is
30716// canceled.
30717func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall {
30718	c.ctx_ = ctx
30719	return c
30720}
30721
30722func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) {
30723	var body io.Reader = nil
30724	c.urlParams_.Set("alt", alt)
30725	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots")
30726	urls += "?" + c.urlParams_.Encode()
30727	req, _ := http.NewRequest("GET", urls, body)
30728	googleapi.Expand(req.URL, map[string]string{
30729		"project": c.project,
30730	})
30731	req.Header.Set("User-Agent", c.s.userAgent())
30732	if c.ifNoneMatch_ != "" {
30733		req.Header.Set("If-None-Match", c.ifNoneMatch_)
30734	}
30735	if c.ctx_ != nil {
30736		return ctxhttp.Do(c.ctx_, c.s.client, req)
30737	}
30738	return c.s.client.Do(req)
30739}
30740
30741// Do executes the "compute.snapshots.list" call.
30742// Exactly one of *SnapshotList or error will be non-nil. Any non-2xx
30743// status code is an error. Response headers are in either
30744// *SnapshotList.ServerResponse.Header or (if a response was returned at
30745// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30746// to check whether the returned error was because
30747// http.StatusNotModified was returned.
30748func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, error) {
30749	gensupport.SetOptions(c.urlParams_, opts...)
30750	res, err := c.doRequest("json")
30751	if res != nil && res.StatusCode == http.StatusNotModified {
30752		if res.Body != nil {
30753			res.Body.Close()
30754		}
30755		return nil, &googleapi.Error{
30756			Code:   res.StatusCode,
30757			Header: res.Header,
30758		}
30759	}
30760	if err != nil {
30761		return nil, err
30762	}
30763	defer googleapi.CloseBody(res)
30764	if err := googleapi.CheckResponse(res); err != nil {
30765		return nil, err
30766	}
30767	ret := &SnapshotList{
30768		ServerResponse: googleapi.ServerResponse{
30769			Header:         res.Header,
30770			HTTPStatusCode: res.StatusCode,
30771		},
30772	}
30773	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30774		return nil, err
30775	}
30776	return ret, nil
30777	// {
30778	//   "description": "Retrieves the list of Snapshot resources contained within the specified project.",
30779	//   "httpMethod": "GET",
30780	//   "id": "compute.snapshots.list",
30781	//   "parameterOrder": [
30782	//     "project"
30783	//   ],
30784	//   "parameters": {
30785	//     "filter": {
30786	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
30787	//       "location": "query",
30788	//       "type": "string"
30789	//     },
30790	//     "maxResults": {
30791	//       "default": "500",
30792	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
30793	//       "format": "uint32",
30794	//       "location": "query",
30795	//       "maximum": "500",
30796	//       "minimum": "0",
30797	//       "type": "integer"
30798	//     },
30799	//     "pageToken": {
30800	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
30801	//       "location": "query",
30802	//       "type": "string"
30803	//     },
30804	//     "project": {
30805	//       "description": "Project ID for this request.",
30806	//       "location": "path",
30807	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30808	//       "required": true,
30809	//       "type": "string"
30810	//     }
30811	//   },
30812	//   "path": "{project}/global/snapshots",
30813	//   "response": {
30814	//     "$ref": "SnapshotList"
30815	//   },
30816	//   "scopes": [
30817	//     "https://www.googleapis.com/auth/cloud-platform",
30818	//     "https://www.googleapis.com/auth/compute",
30819	//     "https://www.googleapis.com/auth/compute.readonly"
30820	//   ]
30821	// }
30822
30823}
30824
30825// Pages invokes f for each page of results.
30826// A non-nil error returned from f will halt the iteration.
30827// The provided context supersedes any context provided to the Context method.
30828func (c *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error {
30829	c.ctx_ = ctx
30830	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
30831	for {
30832		x, err := c.Do()
30833		if err != nil {
30834			return err
30835		}
30836		if err := f(x); err != nil {
30837			return err
30838		}
30839		if x.NextPageToken == "" {
30840			return nil
30841		}
30842		c.PageToken(x.NextPageToken)
30843	}
30844}
30845
30846// method id "compute.sslCertificates.delete":
30847
30848type SslCertificatesDeleteCall struct {
30849	s              *Service
30850	project        string
30851	sslCertificate string
30852	urlParams_     gensupport.URLParams
30853	ctx_           context.Context
30854}
30855
30856// Delete: Deletes the specified SslCertificate resource.
30857func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall {
30858	c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30859	c.project = project
30860	c.sslCertificate = sslCertificate
30861	return c
30862}
30863
30864// Fields allows partial responses to be retrieved. See
30865// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30866// for more information.
30867func (c *SslCertificatesDeleteCall) Fields(s ...googleapi.Field) *SslCertificatesDeleteCall {
30868	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30869	return c
30870}
30871
30872// Context sets the context to be used in this call's Do method. Any
30873// pending HTTP request will be aborted if the provided context is
30874// canceled.
30875func (c *SslCertificatesDeleteCall) Context(ctx context.Context) *SslCertificatesDeleteCall {
30876	c.ctx_ = ctx
30877	return c
30878}
30879
30880func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
30881	var body io.Reader = nil
30882	c.urlParams_.Set("alt", alt)
30883	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}")
30884	urls += "?" + c.urlParams_.Encode()
30885	req, _ := http.NewRequest("DELETE", urls, body)
30886	googleapi.Expand(req.URL, map[string]string{
30887		"project":        c.project,
30888		"sslCertificate": c.sslCertificate,
30889	})
30890	req.Header.Set("User-Agent", c.s.userAgent())
30891	if c.ctx_ != nil {
30892		return ctxhttp.Do(c.ctx_, c.s.client, req)
30893	}
30894	return c.s.client.Do(req)
30895}
30896
30897// Do executes the "compute.sslCertificates.delete" call.
30898// Exactly one of *Operation or error will be non-nil. Any non-2xx
30899// status code is an error. Response headers are in either
30900// *Operation.ServerResponse.Header or (if a response was returned at
30901// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30902// to check whether the returned error was because
30903// http.StatusNotModified was returned.
30904func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30905	gensupport.SetOptions(c.urlParams_, opts...)
30906	res, err := c.doRequest("json")
30907	if res != nil && res.StatusCode == http.StatusNotModified {
30908		if res.Body != nil {
30909			res.Body.Close()
30910		}
30911		return nil, &googleapi.Error{
30912			Code:   res.StatusCode,
30913			Header: res.Header,
30914		}
30915	}
30916	if err != nil {
30917		return nil, err
30918	}
30919	defer googleapi.CloseBody(res)
30920	if err := googleapi.CheckResponse(res); err != nil {
30921		return nil, err
30922	}
30923	ret := &Operation{
30924		ServerResponse: googleapi.ServerResponse{
30925			Header:         res.Header,
30926			HTTPStatusCode: res.StatusCode,
30927		},
30928	}
30929	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30930		return nil, err
30931	}
30932	return ret, nil
30933	// {
30934	//   "description": "Deletes the specified SslCertificate resource.",
30935	//   "httpMethod": "DELETE",
30936	//   "id": "compute.sslCertificates.delete",
30937	//   "parameterOrder": [
30938	//     "project",
30939	//     "sslCertificate"
30940	//   ],
30941	//   "parameters": {
30942	//     "project": {
30943	//       "description": "Project ID for this request.",
30944	//       "location": "path",
30945	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30946	//       "required": true,
30947	//       "type": "string"
30948	//     },
30949	//     "sslCertificate": {
30950	//       "description": "Name of the SslCertificate resource to delete.",
30951	//       "location": "path",
30952	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30953	//       "required": true,
30954	//       "type": "string"
30955	//     }
30956	//   },
30957	//   "path": "{project}/global/sslCertificates/{sslCertificate}",
30958	//   "response": {
30959	//     "$ref": "Operation"
30960	//   },
30961	//   "scopes": [
30962	//     "https://www.googleapis.com/auth/cloud-platform",
30963	//     "https://www.googleapis.com/auth/compute"
30964	//   ]
30965	// }
30966
30967}
30968
30969// method id "compute.sslCertificates.get":
30970
30971type SslCertificatesGetCall struct {
30972	s              *Service
30973	project        string
30974	sslCertificate string
30975	urlParams_     gensupport.URLParams
30976	ifNoneMatch_   string
30977	ctx_           context.Context
30978}
30979
30980// Get: Returns the specified SslCertificate resource. Get a list of
30981// available SSL certificates by making a list() request.
30982func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall {
30983	c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30984	c.project = project
30985	c.sslCertificate = sslCertificate
30986	return c
30987}
30988
30989// Fields allows partial responses to be retrieved. See
30990// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30991// for more information.
30992func (c *SslCertificatesGetCall) Fields(s ...googleapi.Field) *SslCertificatesGetCall {
30993	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30994	return c
30995}
30996
30997// IfNoneMatch sets the optional parameter which makes the operation
30998// fail if the object's ETag matches the given value. This is useful for
30999// getting updates only after the object has changed since the last
31000// request. Use googleapi.IsNotModified to check whether the response
31001// error from Do is the result of In-None-Match.
31002func (c *SslCertificatesGetCall) IfNoneMatch(entityTag string) *SslCertificatesGetCall {
31003	c.ifNoneMatch_ = entityTag
31004	return c
31005}
31006
31007// Context sets the context to be used in this call's Do method. Any
31008// pending HTTP request will be aborted if the provided context is
31009// canceled.
31010func (c *SslCertificatesGetCall) Context(ctx context.Context) *SslCertificatesGetCall {
31011	c.ctx_ = ctx
31012	return c
31013}
31014
31015func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
31016	var body io.Reader = nil
31017	c.urlParams_.Set("alt", alt)
31018	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}")
31019	urls += "?" + c.urlParams_.Encode()
31020	req, _ := http.NewRequest("GET", urls, body)
31021	googleapi.Expand(req.URL, map[string]string{
31022		"project":        c.project,
31023		"sslCertificate": c.sslCertificate,
31024	})
31025	req.Header.Set("User-Agent", c.s.userAgent())
31026	if c.ifNoneMatch_ != "" {
31027		req.Header.Set("If-None-Match", c.ifNoneMatch_)
31028	}
31029	if c.ctx_ != nil {
31030		return ctxhttp.Do(c.ctx_, c.s.client, req)
31031	}
31032	return c.s.client.Do(req)
31033}
31034
31035// Do executes the "compute.sslCertificates.get" call.
31036// Exactly one of *SslCertificate or error will be non-nil. Any non-2xx
31037// status code is an error. Response headers are in either
31038// *SslCertificate.ServerResponse.Header or (if a response was returned
31039// at all) in error.(*googleapi.Error).Header. Use
31040// googleapi.IsNotModified to check whether the returned error was
31041// because http.StatusNotModified was returned.
31042func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, error) {
31043	gensupport.SetOptions(c.urlParams_, opts...)
31044	res, err := c.doRequest("json")
31045	if res != nil && res.StatusCode == http.StatusNotModified {
31046		if res.Body != nil {
31047			res.Body.Close()
31048		}
31049		return nil, &googleapi.Error{
31050			Code:   res.StatusCode,
31051			Header: res.Header,
31052		}
31053	}
31054	if err != nil {
31055		return nil, err
31056	}
31057	defer googleapi.CloseBody(res)
31058	if err := googleapi.CheckResponse(res); err != nil {
31059		return nil, err
31060	}
31061	ret := &SslCertificate{
31062		ServerResponse: googleapi.ServerResponse{
31063			Header:         res.Header,
31064			HTTPStatusCode: res.StatusCode,
31065		},
31066	}
31067	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31068		return nil, err
31069	}
31070	return ret, nil
31071	// {
31072	//   "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.",
31073	//   "httpMethod": "GET",
31074	//   "id": "compute.sslCertificates.get",
31075	//   "parameterOrder": [
31076	//     "project",
31077	//     "sslCertificate"
31078	//   ],
31079	//   "parameters": {
31080	//     "project": {
31081	//       "description": "Project ID for this request.",
31082	//       "location": "path",
31083	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31084	//       "required": true,
31085	//       "type": "string"
31086	//     },
31087	//     "sslCertificate": {
31088	//       "description": "Name of the SslCertificate resource to return.",
31089	//       "location": "path",
31090	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31091	//       "required": true,
31092	//       "type": "string"
31093	//     }
31094	//   },
31095	//   "path": "{project}/global/sslCertificates/{sslCertificate}",
31096	//   "response": {
31097	//     "$ref": "SslCertificate"
31098	//   },
31099	//   "scopes": [
31100	//     "https://www.googleapis.com/auth/cloud-platform",
31101	//     "https://www.googleapis.com/auth/compute",
31102	//     "https://www.googleapis.com/auth/compute.readonly"
31103	//   ]
31104	// }
31105
31106}
31107
31108// method id "compute.sslCertificates.insert":
31109
31110type SslCertificatesInsertCall struct {
31111	s              *Service
31112	project        string
31113	sslcertificate *SslCertificate
31114	urlParams_     gensupport.URLParams
31115	ctx_           context.Context
31116}
31117
31118// Insert: Creates a SslCertificate resource in the specified project
31119// using the data included in the request.
31120func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall {
31121	c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31122	c.project = project
31123	c.sslcertificate = sslcertificate
31124	return c
31125}
31126
31127// Fields allows partial responses to be retrieved. See
31128// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31129// for more information.
31130func (c *SslCertificatesInsertCall) Fields(s ...googleapi.Field) *SslCertificatesInsertCall {
31131	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31132	return c
31133}
31134
31135// Context sets the context to be used in this call's Do method. Any
31136// pending HTTP request will be aborted if the provided context is
31137// canceled.
31138func (c *SslCertificatesInsertCall) Context(ctx context.Context) *SslCertificatesInsertCall {
31139	c.ctx_ = ctx
31140	return c
31141}
31142
31143func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) {
31144	var body io.Reader = nil
31145	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertificate)
31146	if err != nil {
31147		return nil, err
31148	}
31149	ctype := "application/json"
31150	c.urlParams_.Set("alt", alt)
31151	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates")
31152	urls += "?" + c.urlParams_.Encode()
31153	req, _ := http.NewRequest("POST", urls, body)
31154	googleapi.Expand(req.URL, map[string]string{
31155		"project": c.project,
31156	})
31157	req.Header.Set("Content-Type", ctype)
31158	req.Header.Set("User-Agent", c.s.userAgent())
31159	if c.ctx_ != nil {
31160		return ctxhttp.Do(c.ctx_, c.s.client, req)
31161	}
31162	return c.s.client.Do(req)
31163}
31164
31165// Do executes the "compute.sslCertificates.insert" call.
31166// Exactly one of *Operation or error will be non-nil. Any non-2xx
31167// status code is an error. Response headers are in either
31168// *Operation.ServerResponse.Header or (if a response was returned at
31169// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31170// to check whether the returned error was because
31171// http.StatusNotModified was returned.
31172func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
31173	gensupport.SetOptions(c.urlParams_, opts...)
31174	res, err := c.doRequest("json")
31175	if res != nil && res.StatusCode == http.StatusNotModified {
31176		if res.Body != nil {
31177			res.Body.Close()
31178		}
31179		return nil, &googleapi.Error{
31180			Code:   res.StatusCode,
31181			Header: res.Header,
31182		}
31183	}
31184	if err != nil {
31185		return nil, err
31186	}
31187	defer googleapi.CloseBody(res)
31188	if err := googleapi.CheckResponse(res); err != nil {
31189		return nil, err
31190	}
31191	ret := &Operation{
31192		ServerResponse: googleapi.ServerResponse{
31193			Header:         res.Header,
31194			HTTPStatusCode: res.StatusCode,
31195		},
31196	}
31197	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31198		return nil, err
31199	}
31200	return ret, nil
31201	// {
31202	//   "description": "Creates a SslCertificate resource in the specified project using the data included in the request.",
31203	//   "httpMethod": "POST",
31204	//   "id": "compute.sslCertificates.insert",
31205	//   "parameterOrder": [
31206	//     "project"
31207	//   ],
31208	//   "parameters": {
31209	//     "project": {
31210	//       "description": "Project ID for this request.",
31211	//       "location": "path",
31212	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31213	//       "required": true,
31214	//       "type": "string"
31215	//     }
31216	//   },
31217	//   "path": "{project}/global/sslCertificates",
31218	//   "request": {
31219	//     "$ref": "SslCertificate"
31220	//   },
31221	//   "response": {
31222	//     "$ref": "Operation"
31223	//   },
31224	//   "scopes": [
31225	//     "https://www.googleapis.com/auth/cloud-platform",
31226	//     "https://www.googleapis.com/auth/compute"
31227	//   ]
31228	// }
31229
31230}
31231
31232// method id "compute.sslCertificates.list":
31233
31234type SslCertificatesListCall struct {
31235	s            *Service
31236	project      string
31237	urlParams_   gensupport.URLParams
31238	ifNoneMatch_ string
31239	ctx_         context.Context
31240}
31241
31242// List: Retrieves the list of SslCertificate resources available to the
31243// specified project.
31244func (r *SslCertificatesService) List(project string) *SslCertificatesListCall {
31245	c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31246	c.project = project
31247	return c
31248}
31249
31250// Filter sets the optional parameter "filter": Sets a filter expression
31251// for filtering listed resources, in the form filter={expression}. Your
31252// {expression} must be in the format: field_name comparison_string
31253// literal_string.
31254//
31255// The field_name is the name of the field you want to compare. Only
31256// atomic field types are supported (string, number, boolean). The
31257// comparison_string must be either eq (equals) or ne (not equals). The
31258// literal_string is the string value to filter to. The literal value
31259// must be valid for the type of field you are filtering by (string,
31260// number, boolean). For string fields, the literal value is interpreted
31261// as a regular expression using RE2 syntax. The literal value must
31262// match the entire field.
31263//
31264// For example, to filter for instances that do not have a name of
31265// example-instance, you would use filter=name ne
31266// example-instance.
31267//
31268// Compute Engine Beta API Only: If you use filtering in the Beta API,
31269// you can also filter on nested fields. For example, you could filter
31270// on instances that have set the scheduling.automaticRestart field to
31271// true. In particular, use filtering on nested fields to take advantage
31272// of instance labels to organize and filter results based on label
31273// values.
31274//
31275// The Beta API also supports filtering on multiple expressions by
31276// providing each separate expression within parentheses. For example,
31277// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
31278// Multiple expressions are treated as AND expressions, meaning that
31279// resources must match all expressions to pass the filters.
31280func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall {
31281	c.urlParams_.Set("filter", filter)
31282	return c
31283}
31284
31285// MaxResults sets the optional parameter "maxResults": The maximum
31286// number of results per page that should be returned. If the number of
31287// available results is larger than maxResults, Compute Engine returns a
31288// nextPageToken that can be used to get the next page of results in
31289// subsequent list requests.
31290func (c *SslCertificatesListCall) MaxResults(maxResults int64) *SslCertificatesListCall {
31291	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31292	return c
31293}
31294
31295// PageToken sets the optional parameter "pageToken": Specifies a page
31296// token to use. Set pageToken to the nextPageToken returned by a
31297// previous list request to get the next page of results.
31298func (c *SslCertificatesListCall) PageToken(pageToken string) *SslCertificatesListCall {
31299	c.urlParams_.Set("pageToken", pageToken)
31300	return c
31301}
31302
31303// Fields allows partial responses to be retrieved. See
31304// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31305// for more information.
31306func (c *SslCertificatesListCall) Fields(s ...googleapi.Field) *SslCertificatesListCall {
31307	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31308	return c
31309}
31310
31311// IfNoneMatch sets the optional parameter which makes the operation
31312// fail if the object's ETag matches the given value. This is useful for
31313// getting updates only after the object has changed since the last
31314// request. Use googleapi.IsNotModified to check whether the response
31315// error from Do is the result of In-None-Match.
31316func (c *SslCertificatesListCall) IfNoneMatch(entityTag string) *SslCertificatesListCall {
31317	c.ifNoneMatch_ = entityTag
31318	return c
31319}
31320
31321// Context sets the context to be used in this call's Do method. Any
31322// pending HTTP request will be aborted if the provided context is
31323// canceled.
31324func (c *SslCertificatesListCall) Context(ctx context.Context) *SslCertificatesListCall {
31325	c.ctx_ = ctx
31326	return c
31327}
31328
31329func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) {
31330	var body io.Reader = nil
31331	c.urlParams_.Set("alt", alt)
31332	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates")
31333	urls += "?" + c.urlParams_.Encode()
31334	req, _ := http.NewRequest("GET", urls, body)
31335	googleapi.Expand(req.URL, map[string]string{
31336		"project": c.project,
31337	})
31338	req.Header.Set("User-Agent", c.s.userAgent())
31339	if c.ifNoneMatch_ != "" {
31340		req.Header.Set("If-None-Match", c.ifNoneMatch_)
31341	}
31342	if c.ctx_ != nil {
31343		return ctxhttp.Do(c.ctx_, c.s.client, req)
31344	}
31345	return c.s.client.Do(req)
31346}
31347
31348// Do executes the "compute.sslCertificates.list" call.
31349// Exactly one of *SslCertificateList or error will be non-nil. Any
31350// non-2xx status code is an error. Response headers are in either
31351// *SslCertificateList.ServerResponse.Header or (if a response was
31352// returned at all) in error.(*googleapi.Error).Header. Use
31353// googleapi.IsNotModified to check whether the returned error was
31354// because http.StatusNotModified was returned.
31355func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, error) {
31356	gensupport.SetOptions(c.urlParams_, opts...)
31357	res, err := c.doRequest("json")
31358	if res != nil && res.StatusCode == http.StatusNotModified {
31359		if res.Body != nil {
31360			res.Body.Close()
31361		}
31362		return nil, &googleapi.Error{
31363			Code:   res.StatusCode,
31364			Header: res.Header,
31365		}
31366	}
31367	if err != nil {
31368		return nil, err
31369	}
31370	defer googleapi.CloseBody(res)
31371	if err := googleapi.CheckResponse(res); err != nil {
31372		return nil, err
31373	}
31374	ret := &SslCertificateList{
31375		ServerResponse: googleapi.ServerResponse{
31376			Header:         res.Header,
31377			HTTPStatusCode: res.StatusCode,
31378		},
31379	}
31380	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31381		return nil, err
31382	}
31383	return ret, nil
31384	// {
31385	//   "description": "Retrieves the list of SslCertificate resources available to the specified project.",
31386	//   "httpMethod": "GET",
31387	//   "id": "compute.sslCertificates.list",
31388	//   "parameterOrder": [
31389	//     "project"
31390	//   ],
31391	//   "parameters": {
31392	//     "filter": {
31393	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
31394	//       "location": "query",
31395	//       "type": "string"
31396	//     },
31397	//     "maxResults": {
31398	//       "default": "500",
31399	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
31400	//       "format": "uint32",
31401	//       "location": "query",
31402	//       "maximum": "500",
31403	//       "minimum": "0",
31404	//       "type": "integer"
31405	//     },
31406	//     "pageToken": {
31407	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
31408	//       "location": "query",
31409	//       "type": "string"
31410	//     },
31411	//     "project": {
31412	//       "description": "Project ID for this request.",
31413	//       "location": "path",
31414	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31415	//       "required": true,
31416	//       "type": "string"
31417	//     }
31418	//   },
31419	//   "path": "{project}/global/sslCertificates",
31420	//   "response": {
31421	//     "$ref": "SslCertificateList"
31422	//   },
31423	//   "scopes": [
31424	//     "https://www.googleapis.com/auth/cloud-platform",
31425	//     "https://www.googleapis.com/auth/compute",
31426	//     "https://www.googleapis.com/auth/compute.readonly"
31427	//   ]
31428	// }
31429
31430}
31431
31432// Pages invokes f for each page of results.
31433// A non-nil error returned from f will halt the iteration.
31434// The provided context supersedes any context provided to the Context method.
31435func (c *SslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error {
31436	c.ctx_ = ctx
31437	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31438	for {
31439		x, err := c.Do()
31440		if err != nil {
31441			return err
31442		}
31443		if err := f(x); err != nil {
31444			return err
31445		}
31446		if x.NextPageToken == "" {
31447			return nil
31448		}
31449		c.PageToken(x.NextPageToken)
31450	}
31451}
31452
31453// method id "compute.subnetworks.aggregatedList":
31454
31455type SubnetworksAggregatedListCall struct {
31456	s            *Service
31457	project      string
31458	urlParams_   gensupport.URLParams
31459	ifNoneMatch_ string
31460	ctx_         context.Context
31461}
31462
31463// AggregatedList: Retrieves an aggregated list of subnetworks.
31464func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall {
31465	c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31466	c.project = project
31467	return c
31468}
31469
31470// Filter sets the optional parameter "filter": Sets a filter expression
31471// for filtering listed resources, in the form filter={expression}. Your
31472// {expression} must be in the format: field_name comparison_string
31473// literal_string.
31474//
31475// The field_name is the name of the field you want to compare. Only
31476// atomic field types are supported (string, number, boolean). The
31477// comparison_string must be either eq (equals) or ne (not equals). The
31478// literal_string is the string value to filter to. The literal value
31479// must be valid for the type of field you are filtering by (string,
31480// number, boolean). For string fields, the literal value is interpreted
31481// as a regular expression using RE2 syntax. The literal value must
31482// match the entire field.
31483//
31484// For example, to filter for instances that do not have a name of
31485// example-instance, you would use filter=name ne
31486// example-instance.
31487//
31488// Compute Engine Beta API Only: If you use filtering in the Beta API,
31489// you can also filter on nested fields. For example, you could filter
31490// on instances that have set the scheduling.automaticRestart field to
31491// true. In particular, use filtering on nested fields to take advantage
31492// of instance labels to organize and filter results based on label
31493// values.
31494//
31495// The Beta API also supports filtering on multiple expressions by
31496// providing each separate expression within parentheses. For example,
31497// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
31498// Multiple expressions are treated as AND expressions, meaning that
31499// resources must match all expressions to pass the filters.
31500func (c *SubnetworksAggregatedListCall) Filter(filter string) *SubnetworksAggregatedListCall {
31501	c.urlParams_.Set("filter", filter)
31502	return c
31503}
31504
31505// MaxResults sets the optional parameter "maxResults": The maximum
31506// number of results per page that should be returned. If the number of
31507// available results is larger than maxResults, Compute Engine returns a
31508// nextPageToken that can be used to get the next page of results in
31509// subsequent list requests.
31510func (c *SubnetworksAggregatedListCall) MaxResults(maxResults int64) *SubnetworksAggregatedListCall {
31511	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31512	return c
31513}
31514
31515// PageToken sets the optional parameter "pageToken": Specifies a page
31516// token to use. Set pageToken to the nextPageToken returned by a
31517// previous list request to get the next page of results.
31518func (c *SubnetworksAggregatedListCall) PageToken(pageToken string) *SubnetworksAggregatedListCall {
31519	c.urlParams_.Set("pageToken", pageToken)
31520	return c
31521}
31522
31523// Fields allows partial responses to be retrieved. See
31524// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31525// for more information.
31526func (c *SubnetworksAggregatedListCall) Fields(s ...googleapi.Field) *SubnetworksAggregatedListCall {
31527	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31528	return c
31529}
31530
31531// IfNoneMatch sets the optional parameter which makes the operation
31532// fail if the object's ETag matches the given value. This is useful for
31533// getting updates only after the object has changed since the last
31534// request. Use googleapi.IsNotModified to check whether the response
31535// error from Do is the result of In-None-Match.
31536func (c *SubnetworksAggregatedListCall) IfNoneMatch(entityTag string) *SubnetworksAggregatedListCall {
31537	c.ifNoneMatch_ = entityTag
31538	return c
31539}
31540
31541// Context sets the context to be used in this call's Do method. Any
31542// pending HTTP request will be aborted if the provided context is
31543// canceled.
31544func (c *SubnetworksAggregatedListCall) Context(ctx context.Context) *SubnetworksAggregatedListCall {
31545	c.ctx_ = ctx
31546	return c
31547}
31548
31549func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) {
31550	var body io.Reader = nil
31551	c.urlParams_.Set("alt", alt)
31552	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/subnetworks")
31553	urls += "?" + c.urlParams_.Encode()
31554	req, _ := http.NewRequest("GET", urls, body)
31555	googleapi.Expand(req.URL, map[string]string{
31556		"project": c.project,
31557	})
31558	req.Header.Set("User-Agent", c.s.userAgent())
31559	if c.ifNoneMatch_ != "" {
31560		req.Header.Set("If-None-Match", c.ifNoneMatch_)
31561	}
31562	if c.ctx_ != nil {
31563		return ctxhttp.Do(c.ctx_, c.s.client, req)
31564	}
31565	return c.s.client.Do(req)
31566}
31567
31568// Do executes the "compute.subnetworks.aggregatedList" call.
31569// Exactly one of *SubnetworkAggregatedList or error will be non-nil.
31570// Any non-2xx status code is an error. Response headers are in either
31571// *SubnetworkAggregatedList.ServerResponse.Header or (if a response was
31572// returned at all) in error.(*googleapi.Error).Header. Use
31573// googleapi.IsNotModified to check whether the returned error was
31574// because http.StatusNotModified was returned.
31575func (c *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*SubnetworkAggregatedList, error) {
31576	gensupport.SetOptions(c.urlParams_, opts...)
31577	res, err := c.doRequest("json")
31578	if res != nil && res.StatusCode == http.StatusNotModified {
31579		if res.Body != nil {
31580			res.Body.Close()
31581		}
31582		return nil, &googleapi.Error{
31583			Code:   res.StatusCode,
31584			Header: res.Header,
31585		}
31586	}
31587	if err != nil {
31588		return nil, err
31589	}
31590	defer googleapi.CloseBody(res)
31591	if err := googleapi.CheckResponse(res); err != nil {
31592		return nil, err
31593	}
31594	ret := &SubnetworkAggregatedList{
31595		ServerResponse: googleapi.ServerResponse{
31596			Header:         res.Header,
31597			HTTPStatusCode: res.StatusCode,
31598		},
31599	}
31600	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31601		return nil, err
31602	}
31603	return ret, nil
31604	// {
31605	//   "description": "Retrieves an aggregated list of subnetworks.",
31606	//   "httpMethod": "GET",
31607	//   "id": "compute.subnetworks.aggregatedList",
31608	//   "parameterOrder": [
31609	//     "project"
31610	//   ],
31611	//   "parameters": {
31612	//     "filter": {
31613	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
31614	//       "location": "query",
31615	//       "type": "string"
31616	//     },
31617	//     "maxResults": {
31618	//       "default": "500",
31619	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
31620	//       "format": "uint32",
31621	//       "location": "query",
31622	//       "maximum": "500",
31623	//       "minimum": "0",
31624	//       "type": "integer"
31625	//     },
31626	//     "pageToken": {
31627	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
31628	//       "location": "query",
31629	//       "type": "string"
31630	//     },
31631	//     "project": {
31632	//       "description": "Project ID for this request.",
31633	//       "location": "path",
31634	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31635	//       "required": true,
31636	//       "type": "string"
31637	//     }
31638	//   },
31639	//   "path": "{project}/aggregated/subnetworks",
31640	//   "response": {
31641	//     "$ref": "SubnetworkAggregatedList"
31642	//   },
31643	//   "scopes": [
31644	//     "https://www.googleapis.com/auth/cloud-platform",
31645	//     "https://www.googleapis.com/auth/compute",
31646	//     "https://www.googleapis.com/auth/compute.readonly"
31647	//   ]
31648	// }
31649
31650}
31651
31652// Pages invokes f for each page of results.
31653// A non-nil error returned from f will halt the iteration.
31654// The provided context supersedes any context provided to the Context method.
31655func (c *SubnetworksAggregatedListCall) Pages(ctx context.Context, f func(*SubnetworkAggregatedList) error) error {
31656	c.ctx_ = ctx
31657	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31658	for {
31659		x, err := c.Do()
31660		if err != nil {
31661			return err
31662		}
31663		if err := f(x); err != nil {
31664			return err
31665		}
31666		if x.NextPageToken == "" {
31667			return nil
31668		}
31669		c.PageToken(x.NextPageToken)
31670	}
31671}
31672
31673// method id "compute.subnetworks.delete":
31674
31675type SubnetworksDeleteCall struct {
31676	s          *Service
31677	project    string
31678	region     string
31679	subnetwork string
31680	urlParams_ gensupport.URLParams
31681	ctx_       context.Context
31682}
31683
31684// Delete: Deletes the specified subnetwork.
31685func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall {
31686	c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31687	c.project = project
31688	c.region = region
31689	c.subnetwork = subnetwork
31690	return c
31691}
31692
31693// Fields allows partial responses to be retrieved. See
31694// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31695// for more information.
31696func (c *SubnetworksDeleteCall) Fields(s ...googleapi.Field) *SubnetworksDeleteCall {
31697	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31698	return c
31699}
31700
31701// Context sets the context to be used in this call's Do method. Any
31702// pending HTTP request will be aborted if the provided context is
31703// canceled.
31704func (c *SubnetworksDeleteCall) Context(ctx context.Context) *SubnetworksDeleteCall {
31705	c.ctx_ = ctx
31706	return c
31707}
31708
31709func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) {
31710	var body io.Reader = nil
31711	c.urlParams_.Set("alt", alt)
31712	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}")
31713	urls += "?" + c.urlParams_.Encode()
31714	req, _ := http.NewRequest("DELETE", urls, body)
31715	googleapi.Expand(req.URL, map[string]string{
31716		"project":    c.project,
31717		"region":     c.region,
31718		"subnetwork": c.subnetwork,
31719	})
31720	req.Header.Set("User-Agent", c.s.userAgent())
31721	if c.ctx_ != nil {
31722		return ctxhttp.Do(c.ctx_, c.s.client, req)
31723	}
31724	return c.s.client.Do(req)
31725}
31726
31727// Do executes the "compute.subnetworks.delete" call.
31728// Exactly one of *Operation or error will be non-nil. Any non-2xx
31729// status code is an error. Response headers are in either
31730// *Operation.ServerResponse.Header or (if a response was returned at
31731// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31732// to check whether the returned error was because
31733// http.StatusNotModified was returned.
31734func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
31735	gensupport.SetOptions(c.urlParams_, opts...)
31736	res, err := c.doRequest("json")
31737	if res != nil && res.StatusCode == http.StatusNotModified {
31738		if res.Body != nil {
31739			res.Body.Close()
31740		}
31741		return nil, &googleapi.Error{
31742			Code:   res.StatusCode,
31743			Header: res.Header,
31744		}
31745	}
31746	if err != nil {
31747		return nil, err
31748	}
31749	defer googleapi.CloseBody(res)
31750	if err := googleapi.CheckResponse(res); err != nil {
31751		return nil, err
31752	}
31753	ret := &Operation{
31754		ServerResponse: googleapi.ServerResponse{
31755			Header:         res.Header,
31756			HTTPStatusCode: res.StatusCode,
31757		},
31758	}
31759	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31760		return nil, err
31761	}
31762	return ret, nil
31763	// {
31764	//   "description": "Deletes the specified subnetwork.",
31765	//   "httpMethod": "DELETE",
31766	//   "id": "compute.subnetworks.delete",
31767	//   "parameterOrder": [
31768	//     "project",
31769	//     "region",
31770	//     "subnetwork"
31771	//   ],
31772	//   "parameters": {
31773	//     "project": {
31774	//       "description": "Project ID for this request.",
31775	//       "location": "path",
31776	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31777	//       "required": true,
31778	//       "type": "string"
31779	//     },
31780	//     "region": {
31781	//       "description": "Name of the region scoping this request.",
31782	//       "location": "path",
31783	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31784	//       "required": true,
31785	//       "type": "string"
31786	//     },
31787	//     "subnetwork": {
31788	//       "description": "Name of the Subnetwork resource to delete.",
31789	//       "location": "path",
31790	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31791	//       "required": true,
31792	//       "type": "string"
31793	//     }
31794	//   },
31795	//   "path": "{project}/regions/{region}/subnetworks/{subnetwork}",
31796	//   "response": {
31797	//     "$ref": "Operation"
31798	//   },
31799	//   "scopes": [
31800	//     "https://www.googleapis.com/auth/cloud-platform",
31801	//     "https://www.googleapis.com/auth/compute"
31802	//   ]
31803	// }
31804
31805}
31806
31807// method id "compute.subnetworks.get":
31808
31809type SubnetworksGetCall struct {
31810	s            *Service
31811	project      string
31812	region       string
31813	subnetwork   string
31814	urlParams_   gensupport.URLParams
31815	ifNoneMatch_ string
31816	ctx_         context.Context
31817}
31818
31819// Get: Returns the specified subnetwork. Get a list of available
31820// subnetworks by making a list() request.
31821func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall {
31822	c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31823	c.project = project
31824	c.region = region
31825	c.subnetwork = subnetwork
31826	return c
31827}
31828
31829// Fields allows partial responses to be retrieved. See
31830// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31831// for more information.
31832func (c *SubnetworksGetCall) Fields(s ...googleapi.Field) *SubnetworksGetCall {
31833	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31834	return c
31835}
31836
31837// IfNoneMatch sets the optional parameter which makes the operation
31838// fail if the object's ETag matches the given value. This is useful for
31839// getting updates only after the object has changed since the last
31840// request. Use googleapi.IsNotModified to check whether the response
31841// error from Do is the result of In-None-Match.
31842func (c *SubnetworksGetCall) IfNoneMatch(entityTag string) *SubnetworksGetCall {
31843	c.ifNoneMatch_ = entityTag
31844	return c
31845}
31846
31847// Context sets the context to be used in this call's Do method. Any
31848// pending HTTP request will be aborted if the provided context is
31849// canceled.
31850func (c *SubnetworksGetCall) Context(ctx context.Context) *SubnetworksGetCall {
31851	c.ctx_ = ctx
31852	return c
31853}
31854
31855func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) {
31856	var body io.Reader = nil
31857	c.urlParams_.Set("alt", alt)
31858	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}")
31859	urls += "?" + c.urlParams_.Encode()
31860	req, _ := http.NewRequest("GET", urls, body)
31861	googleapi.Expand(req.URL, map[string]string{
31862		"project":    c.project,
31863		"region":     c.region,
31864		"subnetwork": c.subnetwork,
31865	})
31866	req.Header.Set("User-Agent", c.s.userAgent())
31867	if c.ifNoneMatch_ != "" {
31868		req.Header.Set("If-None-Match", c.ifNoneMatch_)
31869	}
31870	if c.ctx_ != nil {
31871		return ctxhttp.Do(c.ctx_, c.s.client, req)
31872	}
31873	return c.s.client.Do(req)
31874}
31875
31876// Do executes the "compute.subnetworks.get" call.
31877// Exactly one of *Subnetwork or error will be non-nil. Any non-2xx
31878// status code is an error. Response headers are in either
31879// *Subnetwork.ServerResponse.Header or (if a response was returned at
31880// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31881// to check whether the returned error was because
31882// http.StatusNotModified was returned.
31883func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, error) {
31884	gensupport.SetOptions(c.urlParams_, opts...)
31885	res, err := c.doRequest("json")
31886	if res != nil && res.StatusCode == http.StatusNotModified {
31887		if res.Body != nil {
31888			res.Body.Close()
31889		}
31890		return nil, &googleapi.Error{
31891			Code:   res.StatusCode,
31892			Header: res.Header,
31893		}
31894	}
31895	if err != nil {
31896		return nil, err
31897	}
31898	defer googleapi.CloseBody(res)
31899	if err := googleapi.CheckResponse(res); err != nil {
31900		return nil, err
31901	}
31902	ret := &Subnetwork{
31903		ServerResponse: googleapi.ServerResponse{
31904			Header:         res.Header,
31905			HTTPStatusCode: res.StatusCode,
31906		},
31907	}
31908	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31909		return nil, err
31910	}
31911	return ret, nil
31912	// {
31913	//   "description": "Returns the specified subnetwork. Get a list of available subnetworks by making a list() request.",
31914	//   "httpMethod": "GET",
31915	//   "id": "compute.subnetworks.get",
31916	//   "parameterOrder": [
31917	//     "project",
31918	//     "region",
31919	//     "subnetwork"
31920	//   ],
31921	//   "parameters": {
31922	//     "project": {
31923	//       "description": "Project ID for this request.",
31924	//       "location": "path",
31925	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31926	//       "required": true,
31927	//       "type": "string"
31928	//     },
31929	//     "region": {
31930	//       "description": "Name of the region scoping this request.",
31931	//       "location": "path",
31932	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31933	//       "required": true,
31934	//       "type": "string"
31935	//     },
31936	//     "subnetwork": {
31937	//       "description": "Name of the Subnetwork resource to return.",
31938	//       "location": "path",
31939	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31940	//       "required": true,
31941	//       "type": "string"
31942	//     }
31943	//   },
31944	//   "path": "{project}/regions/{region}/subnetworks/{subnetwork}",
31945	//   "response": {
31946	//     "$ref": "Subnetwork"
31947	//   },
31948	//   "scopes": [
31949	//     "https://www.googleapis.com/auth/cloud-platform",
31950	//     "https://www.googleapis.com/auth/compute",
31951	//     "https://www.googleapis.com/auth/compute.readonly"
31952	//   ]
31953	// }
31954
31955}
31956
31957// method id "compute.subnetworks.insert":
31958
31959type SubnetworksInsertCall struct {
31960	s          *Service
31961	project    string
31962	region     string
31963	subnetwork *Subnetwork
31964	urlParams_ gensupport.URLParams
31965	ctx_       context.Context
31966}
31967
31968// Insert: Creates a subnetwork in the specified project using the data
31969// included in the request.
31970func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall {
31971	c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31972	c.project = project
31973	c.region = region
31974	c.subnetwork = subnetwork
31975	return c
31976}
31977
31978// Fields allows partial responses to be retrieved. See
31979// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31980// for more information.
31981func (c *SubnetworksInsertCall) Fields(s ...googleapi.Field) *SubnetworksInsertCall {
31982	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31983	return c
31984}
31985
31986// Context sets the context to be used in this call's Do method. Any
31987// pending HTTP request will be aborted if the provided context is
31988// canceled.
31989func (c *SubnetworksInsertCall) Context(ctx context.Context) *SubnetworksInsertCall {
31990	c.ctx_ = ctx
31991	return c
31992}
31993
31994func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) {
31995	var body io.Reader = nil
31996	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork)
31997	if err != nil {
31998		return nil, err
31999	}
32000	ctype := "application/json"
32001	c.urlParams_.Set("alt", alt)
32002	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks")
32003	urls += "?" + c.urlParams_.Encode()
32004	req, _ := http.NewRequest("POST", urls, body)
32005	googleapi.Expand(req.URL, map[string]string{
32006		"project": c.project,
32007		"region":  c.region,
32008	})
32009	req.Header.Set("Content-Type", ctype)
32010	req.Header.Set("User-Agent", c.s.userAgent())
32011	if c.ctx_ != nil {
32012		return ctxhttp.Do(c.ctx_, c.s.client, req)
32013	}
32014	return c.s.client.Do(req)
32015}
32016
32017// Do executes the "compute.subnetworks.insert" call.
32018// Exactly one of *Operation or error will be non-nil. Any non-2xx
32019// status code is an error. Response headers are in either
32020// *Operation.ServerResponse.Header or (if a response was returned at
32021// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32022// to check whether the returned error was because
32023// http.StatusNotModified was returned.
32024func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
32025	gensupport.SetOptions(c.urlParams_, opts...)
32026	res, err := c.doRequest("json")
32027	if res != nil && res.StatusCode == http.StatusNotModified {
32028		if res.Body != nil {
32029			res.Body.Close()
32030		}
32031		return nil, &googleapi.Error{
32032			Code:   res.StatusCode,
32033			Header: res.Header,
32034		}
32035	}
32036	if err != nil {
32037		return nil, err
32038	}
32039	defer googleapi.CloseBody(res)
32040	if err := googleapi.CheckResponse(res); err != nil {
32041		return nil, err
32042	}
32043	ret := &Operation{
32044		ServerResponse: googleapi.ServerResponse{
32045			Header:         res.Header,
32046			HTTPStatusCode: res.StatusCode,
32047		},
32048	}
32049	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32050		return nil, err
32051	}
32052	return ret, nil
32053	// {
32054	//   "description": "Creates a subnetwork in the specified project using the data included in the request.",
32055	//   "httpMethod": "POST",
32056	//   "id": "compute.subnetworks.insert",
32057	//   "parameterOrder": [
32058	//     "project",
32059	//     "region"
32060	//   ],
32061	//   "parameters": {
32062	//     "project": {
32063	//       "description": "Project ID for this request.",
32064	//       "location": "path",
32065	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32066	//       "required": true,
32067	//       "type": "string"
32068	//     },
32069	//     "region": {
32070	//       "description": "Name of the region scoping this request.",
32071	//       "location": "path",
32072	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32073	//       "required": true,
32074	//       "type": "string"
32075	//     }
32076	//   },
32077	//   "path": "{project}/regions/{region}/subnetworks",
32078	//   "request": {
32079	//     "$ref": "Subnetwork"
32080	//   },
32081	//   "response": {
32082	//     "$ref": "Operation"
32083	//   },
32084	//   "scopes": [
32085	//     "https://www.googleapis.com/auth/cloud-platform",
32086	//     "https://www.googleapis.com/auth/compute"
32087	//   ]
32088	// }
32089
32090}
32091
32092// method id "compute.subnetworks.list":
32093
32094type SubnetworksListCall struct {
32095	s            *Service
32096	project      string
32097	region       string
32098	urlParams_   gensupport.URLParams
32099	ifNoneMatch_ string
32100	ctx_         context.Context
32101}
32102
32103// List: Retrieves a list of subnetworks available to the specified
32104// project.
32105func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall {
32106	c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32107	c.project = project
32108	c.region = region
32109	return c
32110}
32111
32112// Filter sets the optional parameter "filter": Sets a filter expression
32113// for filtering listed resources, in the form filter={expression}. Your
32114// {expression} must be in the format: field_name comparison_string
32115// literal_string.
32116//
32117// The field_name is the name of the field you want to compare. Only
32118// atomic field types are supported (string, number, boolean). The
32119// comparison_string must be either eq (equals) or ne (not equals). The
32120// literal_string is the string value to filter to. The literal value
32121// must be valid for the type of field you are filtering by (string,
32122// number, boolean). For string fields, the literal value is interpreted
32123// as a regular expression using RE2 syntax. The literal value must
32124// match the entire field.
32125//
32126// For example, to filter for instances that do not have a name of
32127// example-instance, you would use filter=name ne
32128// example-instance.
32129//
32130// Compute Engine Beta API Only: If you use filtering in the Beta API,
32131// you can also filter on nested fields. For example, you could filter
32132// on instances that have set the scheduling.automaticRestart field to
32133// true. In particular, use filtering on nested fields to take advantage
32134// of instance labels to organize and filter results based on label
32135// values.
32136//
32137// The Beta API also supports filtering on multiple expressions by
32138// providing each separate expression within parentheses. For example,
32139// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
32140// Multiple expressions are treated as AND expressions, meaning that
32141// resources must match all expressions to pass the filters.
32142func (c *SubnetworksListCall) Filter(filter string) *SubnetworksListCall {
32143	c.urlParams_.Set("filter", filter)
32144	return c
32145}
32146
32147// MaxResults sets the optional parameter "maxResults": The maximum
32148// number of results per page that should be returned. If the number of
32149// available results is larger than maxResults, Compute Engine returns a
32150// nextPageToken that can be used to get the next page of results in
32151// subsequent list requests.
32152func (c *SubnetworksListCall) MaxResults(maxResults int64) *SubnetworksListCall {
32153	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32154	return c
32155}
32156
32157// PageToken sets the optional parameter "pageToken": Specifies a page
32158// token to use. Set pageToken to the nextPageToken returned by a
32159// previous list request to get the next page of results.
32160func (c *SubnetworksListCall) PageToken(pageToken string) *SubnetworksListCall {
32161	c.urlParams_.Set("pageToken", pageToken)
32162	return c
32163}
32164
32165// Fields allows partial responses to be retrieved. See
32166// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32167// for more information.
32168func (c *SubnetworksListCall) Fields(s ...googleapi.Field) *SubnetworksListCall {
32169	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32170	return c
32171}
32172
32173// IfNoneMatch sets the optional parameter which makes the operation
32174// fail if the object's ETag matches the given value. This is useful for
32175// getting updates only after the object has changed since the last
32176// request. Use googleapi.IsNotModified to check whether the response
32177// error from Do is the result of In-None-Match.
32178func (c *SubnetworksListCall) IfNoneMatch(entityTag string) *SubnetworksListCall {
32179	c.ifNoneMatch_ = entityTag
32180	return c
32181}
32182
32183// Context sets the context to be used in this call's Do method. Any
32184// pending HTTP request will be aborted if the provided context is
32185// canceled.
32186func (c *SubnetworksListCall) Context(ctx context.Context) *SubnetworksListCall {
32187	c.ctx_ = ctx
32188	return c
32189}
32190
32191func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) {
32192	var body io.Reader = nil
32193	c.urlParams_.Set("alt", alt)
32194	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks")
32195	urls += "?" + c.urlParams_.Encode()
32196	req, _ := http.NewRequest("GET", urls, body)
32197	googleapi.Expand(req.URL, map[string]string{
32198		"project": c.project,
32199		"region":  c.region,
32200	})
32201	req.Header.Set("User-Agent", c.s.userAgent())
32202	if c.ifNoneMatch_ != "" {
32203		req.Header.Set("If-None-Match", c.ifNoneMatch_)
32204	}
32205	if c.ctx_ != nil {
32206		return ctxhttp.Do(c.ctx_, c.s.client, req)
32207	}
32208	return c.s.client.Do(req)
32209}
32210
32211// Do executes the "compute.subnetworks.list" call.
32212// Exactly one of *SubnetworkList or error will be non-nil. Any non-2xx
32213// status code is an error. Response headers are in either
32214// *SubnetworkList.ServerResponse.Header or (if a response was returned
32215// at all) in error.(*googleapi.Error).Header. Use
32216// googleapi.IsNotModified to check whether the returned error was
32217// because http.StatusNotModified was returned.
32218func (c *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, error) {
32219	gensupport.SetOptions(c.urlParams_, opts...)
32220	res, err := c.doRequest("json")
32221	if res != nil && res.StatusCode == http.StatusNotModified {
32222		if res.Body != nil {
32223			res.Body.Close()
32224		}
32225		return nil, &googleapi.Error{
32226			Code:   res.StatusCode,
32227			Header: res.Header,
32228		}
32229	}
32230	if err != nil {
32231		return nil, err
32232	}
32233	defer googleapi.CloseBody(res)
32234	if err := googleapi.CheckResponse(res); err != nil {
32235		return nil, err
32236	}
32237	ret := &SubnetworkList{
32238		ServerResponse: googleapi.ServerResponse{
32239			Header:         res.Header,
32240			HTTPStatusCode: res.StatusCode,
32241		},
32242	}
32243	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32244		return nil, err
32245	}
32246	return ret, nil
32247	// {
32248	//   "description": "Retrieves a list of subnetworks available to the specified project.",
32249	//   "httpMethod": "GET",
32250	//   "id": "compute.subnetworks.list",
32251	//   "parameterOrder": [
32252	//     "project",
32253	//     "region"
32254	//   ],
32255	//   "parameters": {
32256	//     "filter": {
32257	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
32258	//       "location": "query",
32259	//       "type": "string"
32260	//     },
32261	//     "maxResults": {
32262	//       "default": "500",
32263	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
32264	//       "format": "uint32",
32265	//       "location": "query",
32266	//       "maximum": "500",
32267	//       "minimum": "0",
32268	//       "type": "integer"
32269	//     },
32270	//     "pageToken": {
32271	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
32272	//       "location": "query",
32273	//       "type": "string"
32274	//     },
32275	//     "project": {
32276	//       "description": "Project ID for this request.",
32277	//       "location": "path",
32278	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32279	//       "required": true,
32280	//       "type": "string"
32281	//     },
32282	//     "region": {
32283	//       "description": "Name of the region scoping this request.",
32284	//       "location": "path",
32285	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32286	//       "required": true,
32287	//       "type": "string"
32288	//     }
32289	//   },
32290	//   "path": "{project}/regions/{region}/subnetworks",
32291	//   "response": {
32292	//     "$ref": "SubnetworkList"
32293	//   },
32294	//   "scopes": [
32295	//     "https://www.googleapis.com/auth/cloud-platform",
32296	//     "https://www.googleapis.com/auth/compute",
32297	//     "https://www.googleapis.com/auth/compute.readonly"
32298	//   ]
32299	// }
32300
32301}
32302
32303// Pages invokes f for each page of results.
32304// A non-nil error returned from f will halt the iteration.
32305// The provided context supersedes any context provided to the Context method.
32306func (c *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList) error) error {
32307	c.ctx_ = ctx
32308	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32309	for {
32310		x, err := c.Do()
32311		if err != nil {
32312			return err
32313		}
32314		if err := f(x); err != nil {
32315			return err
32316		}
32317		if x.NextPageToken == "" {
32318			return nil
32319		}
32320		c.PageToken(x.NextPageToken)
32321	}
32322}
32323
32324// method id "compute.targetHttpProxies.delete":
32325
32326type TargetHttpProxiesDeleteCall struct {
32327	s               *Service
32328	project         string
32329	targetHttpProxy string
32330	urlParams_      gensupport.URLParams
32331	ctx_            context.Context
32332}
32333
32334// Delete: Deletes the specified TargetHttpProxy resource.
32335// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/delete
32336func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall {
32337	c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32338	c.project = project
32339	c.targetHttpProxy = targetHttpProxy
32340	return c
32341}
32342
32343// Fields allows partial responses to be retrieved. See
32344// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32345// for more information.
32346func (c *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall {
32347	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32348	return c
32349}
32350
32351// Context sets the context to be used in this call's Do method. Any
32352// pending HTTP request will be aborted if the provided context is
32353// canceled.
32354func (c *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall {
32355	c.ctx_ = ctx
32356	return c
32357}
32358
32359func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
32360	var body io.Reader = nil
32361	c.urlParams_.Set("alt", alt)
32362	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}")
32363	urls += "?" + c.urlParams_.Encode()
32364	req, _ := http.NewRequest("DELETE", urls, body)
32365	googleapi.Expand(req.URL, map[string]string{
32366		"project":         c.project,
32367		"targetHttpProxy": c.targetHttpProxy,
32368	})
32369	req.Header.Set("User-Agent", c.s.userAgent())
32370	if c.ctx_ != nil {
32371		return ctxhttp.Do(c.ctx_, c.s.client, req)
32372	}
32373	return c.s.client.Do(req)
32374}
32375
32376// Do executes the "compute.targetHttpProxies.delete" call.
32377// Exactly one of *Operation or error will be non-nil. Any non-2xx
32378// status code is an error. Response headers are in either
32379// *Operation.ServerResponse.Header or (if a response was returned at
32380// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32381// to check whether the returned error was because
32382// http.StatusNotModified was returned.
32383func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
32384	gensupport.SetOptions(c.urlParams_, opts...)
32385	res, err := c.doRequest("json")
32386	if res != nil && res.StatusCode == http.StatusNotModified {
32387		if res.Body != nil {
32388			res.Body.Close()
32389		}
32390		return nil, &googleapi.Error{
32391			Code:   res.StatusCode,
32392			Header: res.Header,
32393		}
32394	}
32395	if err != nil {
32396		return nil, err
32397	}
32398	defer googleapi.CloseBody(res)
32399	if err := googleapi.CheckResponse(res); err != nil {
32400		return nil, err
32401	}
32402	ret := &Operation{
32403		ServerResponse: googleapi.ServerResponse{
32404			Header:         res.Header,
32405			HTTPStatusCode: res.StatusCode,
32406		},
32407	}
32408	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32409		return nil, err
32410	}
32411	return ret, nil
32412	// {
32413	//   "description": "Deletes the specified TargetHttpProxy resource.",
32414	//   "httpMethod": "DELETE",
32415	//   "id": "compute.targetHttpProxies.delete",
32416	//   "parameterOrder": [
32417	//     "project",
32418	//     "targetHttpProxy"
32419	//   ],
32420	//   "parameters": {
32421	//     "project": {
32422	//       "description": "Project ID for this request.",
32423	//       "location": "path",
32424	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32425	//       "required": true,
32426	//       "type": "string"
32427	//     },
32428	//     "targetHttpProxy": {
32429	//       "description": "Name of the TargetHttpProxy resource to delete.",
32430	//       "location": "path",
32431	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32432	//       "required": true,
32433	//       "type": "string"
32434	//     }
32435	//   },
32436	//   "path": "{project}/global/targetHttpProxies/{targetHttpProxy}",
32437	//   "response": {
32438	//     "$ref": "Operation"
32439	//   },
32440	//   "scopes": [
32441	//     "https://www.googleapis.com/auth/cloud-platform",
32442	//     "https://www.googleapis.com/auth/compute"
32443	//   ]
32444	// }
32445
32446}
32447
32448// method id "compute.targetHttpProxies.get":
32449
32450type TargetHttpProxiesGetCall struct {
32451	s               *Service
32452	project         string
32453	targetHttpProxy string
32454	urlParams_      gensupport.URLParams
32455	ifNoneMatch_    string
32456	ctx_            context.Context
32457}
32458
32459// Get: Returns the specified TargetHttpProxy resource. Get a list of
32460// available target HTTP proxies by making a list() request.
32461// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get
32462func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall {
32463	c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32464	c.project = project
32465	c.targetHttpProxy = targetHttpProxy
32466	return c
32467}
32468
32469// Fields allows partial responses to be retrieved. See
32470// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32471// for more information.
32472func (c *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall {
32473	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32474	return c
32475}
32476
32477// IfNoneMatch sets the optional parameter which makes the operation
32478// fail if the object's ETag matches the given value. This is useful for
32479// getting updates only after the object has changed since the last
32480// request. Use googleapi.IsNotModified to check whether the response
32481// error from Do is the result of In-None-Match.
32482func (c *TargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpProxiesGetCall {
32483	c.ifNoneMatch_ = entityTag
32484	return c
32485}
32486
32487// Context sets the context to be used in this call's Do method. Any
32488// pending HTTP request will be aborted if the provided context is
32489// canceled.
32490func (c *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall {
32491	c.ctx_ = ctx
32492	return c
32493}
32494
32495func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) {
32496	var body io.Reader = nil
32497	c.urlParams_.Set("alt", alt)
32498	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}")
32499	urls += "?" + c.urlParams_.Encode()
32500	req, _ := http.NewRequest("GET", urls, body)
32501	googleapi.Expand(req.URL, map[string]string{
32502		"project":         c.project,
32503		"targetHttpProxy": c.targetHttpProxy,
32504	})
32505	req.Header.Set("User-Agent", c.s.userAgent())
32506	if c.ifNoneMatch_ != "" {
32507		req.Header.Set("If-None-Match", c.ifNoneMatch_)
32508	}
32509	if c.ctx_ != nil {
32510		return ctxhttp.Do(c.ctx_, c.s.client, req)
32511	}
32512	return c.s.client.Do(req)
32513}
32514
32515// Do executes the "compute.targetHttpProxies.get" call.
32516// Exactly one of *TargetHttpProxy or error will be non-nil. Any non-2xx
32517// status code is an error. Response headers are in either
32518// *TargetHttpProxy.ServerResponse.Header or (if a response was returned
32519// at all) in error.(*googleapi.Error).Header. Use
32520// googleapi.IsNotModified to check whether the returned error was
32521// because http.StatusNotModified was returned.
32522func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, error) {
32523	gensupport.SetOptions(c.urlParams_, opts...)
32524	res, err := c.doRequest("json")
32525	if res != nil && res.StatusCode == http.StatusNotModified {
32526		if res.Body != nil {
32527			res.Body.Close()
32528		}
32529		return nil, &googleapi.Error{
32530			Code:   res.StatusCode,
32531			Header: res.Header,
32532		}
32533	}
32534	if err != nil {
32535		return nil, err
32536	}
32537	defer googleapi.CloseBody(res)
32538	if err := googleapi.CheckResponse(res); err != nil {
32539		return nil, err
32540	}
32541	ret := &TargetHttpProxy{
32542		ServerResponse: googleapi.ServerResponse{
32543			Header:         res.Header,
32544			HTTPStatusCode: res.StatusCode,
32545		},
32546	}
32547	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32548		return nil, err
32549	}
32550	return ret, nil
32551	// {
32552	//   "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.",
32553	//   "httpMethod": "GET",
32554	//   "id": "compute.targetHttpProxies.get",
32555	//   "parameterOrder": [
32556	//     "project",
32557	//     "targetHttpProxy"
32558	//   ],
32559	//   "parameters": {
32560	//     "project": {
32561	//       "description": "Project ID for this request.",
32562	//       "location": "path",
32563	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32564	//       "required": true,
32565	//       "type": "string"
32566	//     },
32567	//     "targetHttpProxy": {
32568	//       "description": "Name of the TargetHttpProxy resource to return.",
32569	//       "location": "path",
32570	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32571	//       "required": true,
32572	//       "type": "string"
32573	//     }
32574	//   },
32575	//   "path": "{project}/global/targetHttpProxies/{targetHttpProxy}",
32576	//   "response": {
32577	//     "$ref": "TargetHttpProxy"
32578	//   },
32579	//   "scopes": [
32580	//     "https://www.googleapis.com/auth/cloud-platform",
32581	//     "https://www.googleapis.com/auth/compute",
32582	//     "https://www.googleapis.com/auth/compute.readonly"
32583	//   ]
32584	// }
32585
32586}
32587
32588// method id "compute.targetHttpProxies.insert":
32589
32590type TargetHttpProxiesInsertCall struct {
32591	s               *Service
32592	project         string
32593	targethttpproxy *TargetHttpProxy
32594	urlParams_      gensupport.URLParams
32595	ctx_            context.Context
32596}
32597
32598// Insert: Creates a TargetHttpProxy resource in the specified project
32599// using the data included in the request.
32600// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/insert
32601func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall {
32602	c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32603	c.project = project
32604	c.targethttpproxy = targethttpproxy
32605	return c
32606}
32607
32608// Fields allows partial responses to be retrieved. See
32609// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32610// for more information.
32611func (c *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall {
32612	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32613	return c
32614}
32615
32616// Context sets the context to be used in this call's Do method. Any
32617// pending HTTP request will be aborted if the provided context is
32618// canceled.
32619func (c *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall {
32620	c.ctx_ = ctx
32621	return c
32622}
32623
32624func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
32625	var body io.Reader = nil
32626	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy)
32627	if err != nil {
32628		return nil, err
32629	}
32630	ctype := "application/json"
32631	c.urlParams_.Set("alt", alt)
32632	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies")
32633	urls += "?" + c.urlParams_.Encode()
32634	req, _ := http.NewRequest("POST", urls, body)
32635	googleapi.Expand(req.URL, map[string]string{
32636		"project": c.project,
32637	})
32638	req.Header.Set("Content-Type", ctype)
32639	req.Header.Set("User-Agent", c.s.userAgent())
32640	if c.ctx_ != nil {
32641		return ctxhttp.Do(c.ctx_, c.s.client, req)
32642	}
32643	return c.s.client.Do(req)
32644}
32645
32646// Do executes the "compute.targetHttpProxies.insert" call.
32647// Exactly one of *Operation or error will be non-nil. Any non-2xx
32648// status code is an error. Response headers are in either
32649// *Operation.ServerResponse.Header or (if a response was returned at
32650// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32651// to check whether the returned error was because
32652// http.StatusNotModified was returned.
32653func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
32654	gensupport.SetOptions(c.urlParams_, opts...)
32655	res, err := c.doRequest("json")
32656	if res != nil && res.StatusCode == http.StatusNotModified {
32657		if res.Body != nil {
32658			res.Body.Close()
32659		}
32660		return nil, &googleapi.Error{
32661			Code:   res.StatusCode,
32662			Header: res.Header,
32663		}
32664	}
32665	if err != nil {
32666		return nil, err
32667	}
32668	defer googleapi.CloseBody(res)
32669	if err := googleapi.CheckResponse(res); err != nil {
32670		return nil, err
32671	}
32672	ret := &Operation{
32673		ServerResponse: googleapi.ServerResponse{
32674			Header:         res.Header,
32675			HTTPStatusCode: res.StatusCode,
32676		},
32677	}
32678	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32679		return nil, err
32680	}
32681	return ret, nil
32682	// {
32683	//   "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.",
32684	//   "httpMethod": "POST",
32685	//   "id": "compute.targetHttpProxies.insert",
32686	//   "parameterOrder": [
32687	//     "project"
32688	//   ],
32689	//   "parameters": {
32690	//     "project": {
32691	//       "description": "Project ID for this request.",
32692	//       "location": "path",
32693	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32694	//       "required": true,
32695	//       "type": "string"
32696	//     }
32697	//   },
32698	//   "path": "{project}/global/targetHttpProxies",
32699	//   "request": {
32700	//     "$ref": "TargetHttpProxy"
32701	//   },
32702	//   "response": {
32703	//     "$ref": "Operation"
32704	//   },
32705	//   "scopes": [
32706	//     "https://www.googleapis.com/auth/cloud-platform",
32707	//     "https://www.googleapis.com/auth/compute"
32708	//   ]
32709	// }
32710
32711}
32712
32713// method id "compute.targetHttpProxies.list":
32714
32715type TargetHttpProxiesListCall struct {
32716	s            *Service
32717	project      string
32718	urlParams_   gensupport.URLParams
32719	ifNoneMatch_ string
32720	ctx_         context.Context
32721}
32722
32723// List: Retrieves the list of TargetHttpProxy resources available to
32724// the specified project.
32725// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/list
32726func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall {
32727	c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32728	c.project = project
32729	return c
32730}
32731
32732// Filter sets the optional parameter "filter": Sets a filter expression
32733// for filtering listed resources, in the form filter={expression}. Your
32734// {expression} must be in the format: field_name comparison_string
32735// literal_string.
32736//
32737// The field_name is the name of the field you want to compare. Only
32738// atomic field types are supported (string, number, boolean). The
32739// comparison_string must be either eq (equals) or ne (not equals). The
32740// literal_string is the string value to filter to. The literal value
32741// must be valid for the type of field you are filtering by (string,
32742// number, boolean). For string fields, the literal value is interpreted
32743// as a regular expression using RE2 syntax. The literal value must
32744// match the entire field.
32745//
32746// For example, to filter for instances that do not have a name of
32747// example-instance, you would use filter=name ne
32748// example-instance.
32749//
32750// Compute Engine Beta API Only: If you use filtering in the Beta API,
32751// you can also filter on nested fields. For example, you could filter
32752// on instances that have set the scheduling.automaticRestart field to
32753// true. In particular, use filtering on nested fields to take advantage
32754// of instance labels to organize and filter results based on label
32755// values.
32756//
32757// The Beta API also supports filtering on multiple expressions by
32758// providing each separate expression within parentheses. For example,
32759// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
32760// Multiple expressions are treated as AND expressions, meaning that
32761// resources must match all expressions to pass the filters.
32762func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall {
32763	c.urlParams_.Set("filter", filter)
32764	return c
32765}
32766
32767// MaxResults sets the optional parameter "maxResults": The maximum
32768// number of results per page that should be returned. If the number of
32769// available results is larger than maxResults, Compute Engine returns a
32770// nextPageToken that can be used to get the next page of results in
32771// subsequent list requests.
32772func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall {
32773	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32774	return c
32775}
32776
32777// PageToken sets the optional parameter "pageToken": Specifies a page
32778// token to use. Set pageToken to the nextPageToken returned by a
32779// previous list request to get the next page of results.
32780func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxiesListCall {
32781	c.urlParams_.Set("pageToken", pageToken)
32782	return c
32783}
32784
32785// Fields allows partial responses to be retrieved. See
32786// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32787// for more information.
32788func (c *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall {
32789	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32790	return c
32791}
32792
32793// IfNoneMatch sets the optional parameter which makes the operation
32794// fail if the object's ETag matches the given value. This is useful for
32795// getting updates only after the object has changed since the last
32796// request. Use googleapi.IsNotModified to check whether the response
32797// error from Do is the result of In-None-Match.
32798func (c *TargetHttpProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesListCall {
32799	c.ifNoneMatch_ = entityTag
32800	return c
32801}
32802
32803// Context sets the context to be used in this call's Do method. Any
32804// pending HTTP request will be aborted if the provided context is
32805// canceled.
32806func (c *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall {
32807	c.ctx_ = ctx
32808	return c
32809}
32810
32811func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) {
32812	var body io.Reader = nil
32813	c.urlParams_.Set("alt", alt)
32814	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies")
32815	urls += "?" + c.urlParams_.Encode()
32816	req, _ := http.NewRequest("GET", urls, body)
32817	googleapi.Expand(req.URL, map[string]string{
32818		"project": c.project,
32819	})
32820	req.Header.Set("User-Agent", c.s.userAgent())
32821	if c.ifNoneMatch_ != "" {
32822		req.Header.Set("If-None-Match", c.ifNoneMatch_)
32823	}
32824	if c.ctx_ != nil {
32825		return ctxhttp.Do(c.ctx_, c.s.client, req)
32826	}
32827	return c.s.client.Do(req)
32828}
32829
32830// Do executes the "compute.targetHttpProxies.list" call.
32831// Exactly one of *TargetHttpProxyList or error will be non-nil. Any
32832// non-2xx status code is an error. Response headers are in either
32833// *TargetHttpProxyList.ServerResponse.Header or (if a response was
32834// returned at all) in error.(*googleapi.Error).Header. Use
32835// googleapi.IsNotModified to check whether the returned error was
32836// because http.StatusNotModified was returned.
32837func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, error) {
32838	gensupport.SetOptions(c.urlParams_, opts...)
32839	res, err := c.doRequest("json")
32840	if res != nil && res.StatusCode == http.StatusNotModified {
32841		if res.Body != nil {
32842			res.Body.Close()
32843		}
32844		return nil, &googleapi.Error{
32845			Code:   res.StatusCode,
32846			Header: res.Header,
32847		}
32848	}
32849	if err != nil {
32850		return nil, err
32851	}
32852	defer googleapi.CloseBody(res)
32853	if err := googleapi.CheckResponse(res); err != nil {
32854		return nil, err
32855	}
32856	ret := &TargetHttpProxyList{
32857		ServerResponse: googleapi.ServerResponse{
32858			Header:         res.Header,
32859			HTTPStatusCode: res.StatusCode,
32860		},
32861	}
32862	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32863		return nil, err
32864	}
32865	return ret, nil
32866	// {
32867	//   "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.",
32868	//   "httpMethod": "GET",
32869	//   "id": "compute.targetHttpProxies.list",
32870	//   "parameterOrder": [
32871	//     "project"
32872	//   ],
32873	//   "parameters": {
32874	//     "filter": {
32875	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
32876	//       "location": "query",
32877	//       "type": "string"
32878	//     },
32879	//     "maxResults": {
32880	//       "default": "500",
32881	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
32882	//       "format": "uint32",
32883	//       "location": "query",
32884	//       "maximum": "500",
32885	//       "minimum": "0",
32886	//       "type": "integer"
32887	//     },
32888	//     "pageToken": {
32889	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
32890	//       "location": "query",
32891	//       "type": "string"
32892	//     },
32893	//     "project": {
32894	//       "description": "Project ID for this request.",
32895	//       "location": "path",
32896	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32897	//       "required": true,
32898	//       "type": "string"
32899	//     }
32900	//   },
32901	//   "path": "{project}/global/targetHttpProxies",
32902	//   "response": {
32903	//     "$ref": "TargetHttpProxyList"
32904	//   },
32905	//   "scopes": [
32906	//     "https://www.googleapis.com/auth/cloud-platform",
32907	//     "https://www.googleapis.com/auth/compute",
32908	//     "https://www.googleapis.com/auth/compute.readonly"
32909	//   ]
32910	// }
32911
32912}
32913
32914// Pages invokes f for each page of results.
32915// A non-nil error returned from f will halt the iteration.
32916// The provided context supersedes any context provided to the Context method.
32917func (c *TargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error {
32918	c.ctx_ = ctx
32919	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32920	for {
32921		x, err := c.Do()
32922		if err != nil {
32923			return err
32924		}
32925		if err := f(x); err != nil {
32926			return err
32927		}
32928		if x.NextPageToken == "" {
32929			return nil
32930		}
32931		c.PageToken(x.NextPageToken)
32932	}
32933}
32934
32935// method id "compute.targetHttpProxies.setUrlMap":
32936
32937type TargetHttpProxiesSetUrlMapCall struct {
32938	s               *Service
32939	project         string
32940	targetHttpProxy string
32941	urlmapreference *UrlMapReference
32942	urlParams_      gensupport.URLParams
32943	ctx_            context.Context
32944}
32945
32946// SetUrlMap: Changes the URL map for TargetHttpProxy.
32947// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/setUrlMap
32948func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall {
32949	c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32950	c.project = project
32951	c.targetHttpProxy = targetHttpProxy
32952	c.urlmapreference = urlmapreference
32953	return c
32954}
32955
32956// Fields allows partial responses to be retrieved. See
32957// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32958// for more information.
32959func (c *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall {
32960	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32961	return c
32962}
32963
32964// Context sets the context to be used in this call's Do method. Any
32965// pending HTTP request will be aborted if the provided context is
32966// canceled.
32967func (c *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall {
32968	c.ctx_ = ctx
32969	return c
32970}
32971
32972func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
32973	var body io.Reader = nil
32974	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
32975	if err != nil {
32976		return nil, err
32977	}
32978	ctype := "application/json"
32979	c.urlParams_.Set("alt", alt)
32980	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap")
32981	urls += "?" + c.urlParams_.Encode()
32982	req, _ := http.NewRequest("POST", urls, body)
32983	googleapi.Expand(req.URL, map[string]string{
32984		"project":         c.project,
32985		"targetHttpProxy": c.targetHttpProxy,
32986	})
32987	req.Header.Set("Content-Type", ctype)
32988	req.Header.Set("User-Agent", c.s.userAgent())
32989	if c.ctx_ != nil {
32990		return ctxhttp.Do(c.ctx_, c.s.client, req)
32991	}
32992	return c.s.client.Do(req)
32993}
32994
32995// Do executes the "compute.targetHttpProxies.setUrlMap" call.
32996// Exactly one of *Operation or error will be non-nil. Any non-2xx
32997// status code is an error. Response headers are in either
32998// *Operation.ServerResponse.Header or (if a response was returned at
32999// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33000// to check whether the returned error was because
33001// http.StatusNotModified was returned.
33002func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33003	gensupport.SetOptions(c.urlParams_, opts...)
33004	res, err := c.doRequest("json")
33005	if res != nil && res.StatusCode == http.StatusNotModified {
33006		if res.Body != nil {
33007			res.Body.Close()
33008		}
33009		return nil, &googleapi.Error{
33010			Code:   res.StatusCode,
33011			Header: res.Header,
33012		}
33013	}
33014	if err != nil {
33015		return nil, err
33016	}
33017	defer googleapi.CloseBody(res)
33018	if err := googleapi.CheckResponse(res); err != nil {
33019		return nil, err
33020	}
33021	ret := &Operation{
33022		ServerResponse: googleapi.ServerResponse{
33023			Header:         res.Header,
33024			HTTPStatusCode: res.StatusCode,
33025		},
33026	}
33027	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33028		return nil, err
33029	}
33030	return ret, nil
33031	// {
33032	//   "description": "Changes the URL map for TargetHttpProxy.",
33033	//   "httpMethod": "POST",
33034	//   "id": "compute.targetHttpProxies.setUrlMap",
33035	//   "parameterOrder": [
33036	//     "project",
33037	//     "targetHttpProxy"
33038	//   ],
33039	//   "parameters": {
33040	//     "project": {
33041	//       "description": "Project ID for this request.",
33042	//       "location": "path",
33043	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33044	//       "required": true,
33045	//       "type": "string"
33046	//     },
33047	//     "targetHttpProxy": {
33048	//       "description": "Name of the TargetHttpProxy to set a URL map for.",
33049	//       "location": "path",
33050	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33051	//       "required": true,
33052	//       "type": "string"
33053	//     }
33054	//   },
33055	//   "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap",
33056	//   "request": {
33057	//     "$ref": "UrlMapReference"
33058	//   },
33059	//   "response": {
33060	//     "$ref": "Operation"
33061	//   },
33062	//   "scopes": [
33063	//     "https://www.googleapis.com/auth/cloud-platform",
33064	//     "https://www.googleapis.com/auth/compute"
33065	//   ]
33066	// }
33067
33068}
33069
33070// method id "compute.targetHttpsProxies.delete":
33071
33072type TargetHttpsProxiesDeleteCall struct {
33073	s                *Service
33074	project          string
33075	targetHttpsProxy string
33076	urlParams_       gensupport.URLParams
33077	ctx_             context.Context
33078}
33079
33080// Delete: Deletes the specified TargetHttpsProxy resource.
33081func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall {
33082	c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33083	c.project = project
33084	c.targetHttpsProxy = targetHttpsProxy
33085	return c
33086}
33087
33088// Fields allows partial responses to be retrieved. See
33089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33090// for more information.
33091func (c *TargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesDeleteCall {
33092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33093	return c
33094}
33095
33096// Context sets the context to be used in this call's Do method. Any
33097// pending HTTP request will be aborted if the provided context is
33098// canceled.
33099func (c *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttpsProxiesDeleteCall {
33100	c.ctx_ = ctx
33101	return c
33102}
33103
33104func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
33105	var body io.Reader = nil
33106	c.urlParams_.Set("alt", alt)
33107	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}")
33108	urls += "?" + c.urlParams_.Encode()
33109	req, _ := http.NewRequest("DELETE", urls, body)
33110	googleapi.Expand(req.URL, map[string]string{
33111		"project":          c.project,
33112		"targetHttpsProxy": c.targetHttpsProxy,
33113	})
33114	req.Header.Set("User-Agent", c.s.userAgent())
33115	if c.ctx_ != nil {
33116		return ctxhttp.Do(c.ctx_, c.s.client, req)
33117	}
33118	return c.s.client.Do(req)
33119}
33120
33121// Do executes the "compute.targetHttpsProxies.delete" call.
33122// Exactly one of *Operation or error will be non-nil. Any non-2xx
33123// status code is an error. Response headers are in either
33124// *Operation.ServerResponse.Header or (if a response was returned at
33125// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33126// to check whether the returned error was because
33127// http.StatusNotModified was returned.
33128func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33129	gensupport.SetOptions(c.urlParams_, opts...)
33130	res, err := c.doRequest("json")
33131	if res != nil && res.StatusCode == http.StatusNotModified {
33132		if res.Body != nil {
33133			res.Body.Close()
33134		}
33135		return nil, &googleapi.Error{
33136			Code:   res.StatusCode,
33137			Header: res.Header,
33138		}
33139	}
33140	if err != nil {
33141		return nil, err
33142	}
33143	defer googleapi.CloseBody(res)
33144	if err := googleapi.CheckResponse(res); err != nil {
33145		return nil, err
33146	}
33147	ret := &Operation{
33148		ServerResponse: googleapi.ServerResponse{
33149			Header:         res.Header,
33150			HTTPStatusCode: res.StatusCode,
33151		},
33152	}
33153	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33154		return nil, err
33155	}
33156	return ret, nil
33157	// {
33158	//   "description": "Deletes the specified TargetHttpsProxy resource.",
33159	//   "httpMethod": "DELETE",
33160	//   "id": "compute.targetHttpsProxies.delete",
33161	//   "parameterOrder": [
33162	//     "project",
33163	//     "targetHttpsProxy"
33164	//   ],
33165	//   "parameters": {
33166	//     "project": {
33167	//       "description": "Project ID for this request.",
33168	//       "location": "path",
33169	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33170	//       "required": true,
33171	//       "type": "string"
33172	//     },
33173	//     "targetHttpsProxy": {
33174	//       "description": "Name of the TargetHttpsProxy resource to delete.",
33175	//       "location": "path",
33176	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33177	//       "required": true,
33178	//       "type": "string"
33179	//     }
33180	//   },
33181	//   "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}",
33182	//   "response": {
33183	//     "$ref": "Operation"
33184	//   },
33185	//   "scopes": [
33186	//     "https://www.googleapis.com/auth/cloud-platform",
33187	//     "https://www.googleapis.com/auth/compute"
33188	//   ]
33189	// }
33190
33191}
33192
33193// method id "compute.targetHttpsProxies.get":
33194
33195type TargetHttpsProxiesGetCall struct {
33196	s                *Service
33197	project          string
33198	targetHttpsProxy string
33199	urlParams_       gensupport.URLParams
33200	ifNoneMatch_     string
33201	ctx_             context.Context
33202}
33203
33204// Get: Returns the specified TargetHttpsProxy resource. Get a list of
33205// available target HTTPS proxies by making a list() request.
33206func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall {
33207	c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33208	c.project = project
33209	c.targetHttpsProxy = targetHttpsProxy
33210	return c
33211}
33212
33213// Fields allows partial responses to be retrieved. See
33214// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33215// for more information.
33216func (c *TargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesGetCall {
33217	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33218	return c
33219}
33220
33221// IfNoneMatch sets the optional parameter which makes the operation
33222// fail if the object's ETag matches the given value. This is useful for
33223// getting updates only after the object has changed since the last
33224// request. Use googleapi.IsNotModified to check whether the response
33225// error from Do is the result of In-None-Match.
33226func (c *TargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesGetCall {
33227	c.ifNoneMatch_ = entityTag
33228	return c
33229}
33230
33231// Context sets the context to be used in this call's Do method. Any
33232// pending HTTP request will be aborted if the provided context is
33233// canceled.
33234func (c *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsProxiesGetCall {
33235	c.ctx_ = ctx
33236	return c
33237}
33238
33239func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) {
33240	var body io.Reader = nil
33241	c.urlParams_.Set("alt", alt)
33242	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}")
33243	urls += "?" + c.urlParams_.Encode()
33244	req, _ := http.NewRequest("GET", urls, body)
33245	googleapi.Expand(req.URL, map[string]string{
33246		"project":          c.project,
33247		"targetHttpsProxy": c.targetHttpsProxy,
33248	})
33249	req.Header.Set("User-Agent", c.s.userAgent())
33250	if c.ifNoneMatch_ != "" {
33251		req.Header.Set("If-None-Match", c.ifNoneMatch_)
33252	}
33253	if c.ctx_ != nil {
33254		return ctxhttp.Do(c.ctx_, c.s.client, req)
33255	}
33256	return c.s.client.Do(req)
33257}
33258
33259// Do executes the "compute.targetHttpsProxies.get" call.
33260// Exactly one of *TargetHttpsProxy or error will be non-nil. Any
33261// non-2xx status code is an error. Response headers are in either
33262// *TargetHttpsProxy.ServerResponse.Header or (if a response was
33263// returned at all) in error.(*googleapi.Error).Header. Use
33264// googleapi.IsNotModified to check whether the returned error was
33265// because http.StatusNotModified was returned.
33266func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, error) {
33267	gensupport.SetOptions(c.urlParams_, opts...)
33268	res, err := c.doRequest("json")
33269	if res != nil && res.StatusCode == http.StatusNotModified {
33270		if res.Body != nil {
33271			res.Body.Close()
33272		}
33273		return nil, &googleapi.Error{
33274			Code:   res.StatusCode,
33275			Header: res.Header,
33276		}
33277	}
33278	if err != nil {
33279		return nil, err
33280	}
33281	defer googleapi.CloseBody(res)
33282	if err := googleapi.CheckResponse(res); err != nil {
33283		return nil, err
33284	}
33285	ret := &TargetHttpsProxy{
33286		ServerResponse: googleapi.ServerResponse{
33287			Header:         res.Header,
33288			HTTPStatusCode: res.StatusCode,
33289		},
33290	}
33291	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33292		return nil, err
33293	}
33294	return ret, nil
33295	// {
33296	//   "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.",
33297	//   "httpMethod": "GET",
33298	//   "id": "compute.targetHttpsProxies.get",
33299	//   "parameterOrder": [
33300	//     "project",
33301	//     "targetHttpsProxy"
33302	//   ],
33303	//   "parameters": {
33304	//     "project": {
33305	//       "description": "Project ID for this request.",
33306	//       "location": "path",
33307	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33308	//       "required": true,
33309	//       "type": "string"
33310	//     },
33311	//     "targetHttpsProxy": {
33312	//       "description": "Name of the TargetHttpsProxy resource to return.",
33313	//       "location": "path",
33314	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33315	//       "required": true,
33316	//       "type": "string"
33317	//     }
33318	//   },
33319	//   "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}",
33320	//   "response": {
33321	//     "$ref": "TargetHttpsProxy"
33322	//   },
33323	//   "scopes": [
33324	//     "https://www.googleapis.com/auth/cloud-platform",
33325	//     "https://www.googleapis.com/auth/compute",
33326	//     "https://www.googleapis.com/auth/compute.readonly"
33327	//   ]
33328	// }
33329
33330}
33331
33332// method id "compute.targetHttpsProxies.insert":
33333
33334type TargetHttpsProxiesInsertCall struct {
33335	s                *Service
33336	project          string
33337	targethttpsproxy *TargetHttpsProxy
33338	urlParams_       gensupport.URLParams
33339	ctx_             context.Context
33340}
33341
33342// Insert: Creates a TargetHttpsProxy resource in the specified project
33343// using the data included in the request.
33344func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall {
33345	c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33346	c.project = project
33347	c.targethttpsproxy = targethttpsproxy
33348	return c
33349}
33350
33351// Fields allows partial responses to be retrieved. See
33352// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33353// for more information.
33354func (c *TargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesInsertCall {
33355	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33356	return c
33357}
33358
33359// Context sets the context to be used in this call's Do method. Any
33360// pending HTTP request will be aborted if the provided context is
33361// canceled.
33362func (c *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttpsProxiesInsertCall {
33363	c.ctx_ = ctx
33364	return c
33365}
33366
33367func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
33368	var body io.Reader = nil
33369	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxy)
33370	if err != nil {
33371		return nil, err
33372	}
33373	ctype := "application/json"
33374	c.urlParams_.Set("alt", alt)
33375	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies")
33376	urls += "?" + c.urlParams_.Encode()
33377	req, _ := http.NewRequest("POST", urls, body)
33378	googleapi.Expand(req.URL, map[string]string{
33379		"project": c.project,
33380	})
33381	req.Header.Set("Content-Type", ctype)
33382	req.Header.Set("User-Agent", c.s.userAgent())
33383	if c.ctx_ != nil {
33384		return ctxhttp.Do(c.ctx_, c.s.client, req)
33385	}
33386	return c.s.client.Do(req)
33387}
33388
33389// Do executes the "compute.targetHttpsProxies.insert" call.
33390// Exactly one of *Operation or error will be non-nil. Any non-2xx
33391// status code is an error. Response headers are in either
33392// *Operation.ServerResponse.Header or (if a response was returned at
33393// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33394// to check whether the returned error was because
33395// http.StatusNotModified was returned.
33396func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33397	gensupport.SetOptions(c.urlParams_, opts...)
33398	res, err := c.doRequest("json")
33399	if res != nil && res.StatusCode == http.StatusNotModified {
33400		if res.Body != nil {
33401			res.Body.Close()
33402		}
33403		return nil, &googleapi.Error{
33404			Code:   res.StatusCode,
33405			Header: res.Header,
33406		}
33407	}
33408	if err != nil {
33409		return nil, err
33410	}
33411	defer googleapi.CloseBody(res)
33412	if err := googleapi.CheckResponse(res); err != nil {
33413		return nil, err
33414	}
33415	ret := &Operation{
33416		ServerResponse: googleapi.ServerResponse{
33417			Header:         res.Header,
33418			HTTPStatusCode: res.StatusCode,
33419		},
33420	}
33421	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33422		return nil, err
33423	}
33424	return ret, nil
33425	// {
33426	//   "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.",
33427	//   "httpMethod": "POST",
33428	//   "id": "compute.targetHttpsProxies.insert",
33429	//   "parameterOrder": [
33430	//     "project"
33431	//   ],
33432	//   "parameters": {
33433	//     "project": {
33434	//       "description": "Project ID for this request.",
33435	//       "location": "path",
33436	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33437	//       "required": true,
33438	//       "type": "string"
33439	//     }
33440	//   },
33441	//   "path": "{project}/global/targetHttpsProxies",
33442	//   "request": {
33443	//     "$ref": "TargetHttpsProxy"
33444	//   },
33445	//   "response": {
33446	//     "$ref": "Operation"
33447	//   },
33448	//   "scopes": [
33449	//     "https://www.googleapis.com/auth/cloud-platform",
33450	//     "https://www.googleapis.com/auth/compute"
33451	//   ]
33452	// }
33453
33454}
33455
33456// method id "compute.targetHttpsProxies.list":
33457
33458type TargetHttpsProxiesListCall struct {
33459	s            *Service
33460	project      string
33461	urlParams_   gensupport.URLParams
33462	ifNoneMatch_ string
33463	ctx_         context.Context
33464}
33465
33466// List: Retrieves the list of TargetHttpsProxy resources available to
33467// the specified project.
33468func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall {
33469	c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33470	c.project = project
33471	return c
33472}
33473
33474// Filter sets the optional parameter "filter": Sets a filter expression
33475// for filtering listed resources, in the form filter={expression}. Your
33476// {expression} must be in the format: field_name comparison_string
33477// literal_string.
33478//
33479// The field_name is the name of the field you want to compare. Only
33480// atomic field types are supported (string, number, boolean). The
33481// comparison_string must be either eq (equals) or ne (not equals). The
33482// literal_string is the string value to filter to. The literal value
33483// must be valid for the type of field you are filtering by (string,
33484// number, boolean). For string fields, the literal value is interpreted
33485// as a regular expression using RE2 syntax. The literal value must
33486// match the entire field.
33487//
33488// For example, to filter for instances that do not have a name of
33489// example-instance, you would use filter=name ne
33490// example-instance.
33491//
33492// Compute Engine Beta API Only: If you use filtering in the Beta API,
33493// you can also filter on nested fields. For example, you could filter
33494// on instances that have set the scheduling.automaticRestart field to
33495// true. In particular, use filtering on nested fields to take advantage
33496// of instance labels to organize and filter results based on label
33497// values.
33498//
33499// The Beta API also supports filtering on multiple expressions by
33500// providing each separate expression within parentheses. For example,
33501// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
33502// Multiple expressions are treated as AND expressions, meaning that
33503// resources must match all expressions to pass the filters.
33504func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall {
33505	c.urlParams_.Set("filter", filter)
33506	return c
33507}
33508
33509// MaxResults sets the optional parameter "maxResults": The maximum
33510// number of results per page that should be returned. If the number of
33511// available results is larger than maxResults, Compute Engine returns a
33512// nextPageToken that can be used to get the next page of results in
33513// subsequent list requests.
33514func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall {
33515	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33516	return c
33517}
33518
33519// PageToken sets the optional parameter "pageToken": Specifies a page
33520// token to use. Set pageToken to the nextPageToken returned by a
33521// previous list request to get the next page of results.
33522func (c *TargetHttpsProxiesListCall) PageToken(pageToken string) *TargetHttpsProxiesListCall {
33523	c.urlParams_.Set("pageToken", pageToken)
33524	return c
33525}
33526
33527// Fields allows partial responses to be retrieved. See
33528// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33529// for more information.
33530func (c *TargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesListCall {
33531	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33532	return c
33533}
33534
33535// IfNoneMatch sets the optional parameter which makes the operation
33536// fail if the object's ETag matches the given value. This is useful for
33537// getting updates only after the object has changed since the last
33538// request. Use googleapi.IsNotModified to check whether the response
33539// error from Do is the result of In-None-Match.
33540func (c *TargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesListCall {
33541	c.ifNoneMatch_ = entityTag
33542	return c
33543}
33544
33545// Context sets the context to be used in this call's Do method. Any
33546// pending HTTP request will be aborted if the provided context is
33547// canceled.
33548func (c *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsProxiesListCall {
33549	c.ctx_ = ctx
33550	return c
33551}
33552
33553func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) {
33554	var body io.Reader = nil
33555	c.urlParams_.Set("alt", alt)
33556	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies")
33557	urls += "?" + c.urlParams_.Encode()
33558	req, _ := http.NewRequest("GET", urls, body)
33559	googleapi.Expand(req.URL, map[string]string{
33560		"project": c.project,
33561	})
33562	req.Header.Set("User-Agent", c.s.userAgent())
33563	if c.ifNoneMatch_ != "" {
33564		req.Header.Set("If-None-Match", c.ifNoneMatch_)
33565	}
33566	if c.ctx_ != nil {
33567		return ctxhttp.Do(c.ctx_, c.s.client, req)
33568	}
33569	return c.s.client.Do(req)
33570}
33571
33572// Do executes the "compute.targetHttpsProxies.list" call.
33573// Exactly one of *TargetHttpsProxyList or error will be non-nil. Any
33574// non-2xx status code is an error. Response headers are in either
33575// *TargetHttpsProxyList.ServerResponse.Header or (if a response was
33576// returned at all) in error.(*googleapi.Error).Header. Use
33577// googleapi.IsNotModified to check whether the returned error was
33578// because http.StatusNotModified was returned.
33579func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, error) {
33580	gensupport.SetOptions(c.urlParams_, opts...)
33581	res, err := c.doRequest("json")
33582	if res != nil && res.StatusCode == http.StatusNotModified {
33583		if res.Body != nil {
33584			res.Body.Close()
33585		}
33586		return nil, &googleapi.Error{
33587			Code:   res.StatusCode,
33588			Header: res.Header,
33589		}
33590	}
33591	if err != nil {
33592		return nil, err
33593	}
33594	defer googleapi.CloseBody(res)
33595	if err := googleapi.CheckResponse(res); err != nil {
33596		return nil, err
33597	}
33598	ret := &TargetHttpsProxyList{
33599		ServerResponse: googleapi.ServerResponse{
33600			Header:         res.Header,
33601			HTTPStatusCode: res.StatusCode,
33602		},
33603	}
33604	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33605		return nil, err
33606	}
33607	return ret, nil
33608	// {
33609	//   "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.",
33610	//   "httpMethod": "GET",
33611	//   "id": "compute.targetHttpsProxies.list",
33612	//   "parameterOrder": [
33613	//     "project"
33614	//   ],
33615	//   "parameters": {
33616	//     "filter": {
33617	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
33618	//       "location": "query",
33619	//       "type": "string"
33620	//     },
33621	//     "maxResults": {
33622	//       "default": "500",
33623	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
33624	//       "format": "uint32",
33625	//       "location": "query",
33626	//       "maximum": "500",
33627	//       "minimum": "0",
33628	//       "type": "integer"
33629	//     },
33630	//     "pageToken": {
33631	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
33632	//       "location": "query",
33633	//       "type": "string"
33634	//     },
33635	//     "project": {
33636	//       "description": "Project ID for this request.",
33637	//       "location": "path",
33638	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33639	//       "required": true,
33640	//       "type": "string"
33641	//     }
33642	//   },
33643	//   "path": "{project}/global/targetHttpsProxies",
33644	//   "response": {
33645	//     "$ref": "TargetHttpsProxyList"
33646	//   },
33647	//   "scopes": [
33648	//     "https://www.googleapis.com/auth/cloud-platform",
33649	//     "https://www.googleapis.com/auth/compute",
33650	//     "https://www.googleapis.com/auth/compute.readonly"
33651	//   ]
33652	// }
33653
33654}
33655
33656// Pages invokes f for each page of results.
33657// A non-nil error returned from f will halt the iteration.
33658// The provided context supersedes any context provided to the Context method.
33659func (c *TargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error {
33660	c.ctx_ = ctx
33661	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33662	for {
33663		x, err := c.Do()
33664		if err != nil {
33665			return err
33666		}
33667		if err := f(x); err != nil {
33668			return err
33669		}
33670		if x.NextPageToken == "" {
33671			return nil
33672		}
33673		c.PageToken(x.NextPageToken)
33674	}
33675}
33676
33677// method id "compute.targetHttpsProxies.setSslCertificates":
33678
33679type TargetHttpsProxiesSetSslCertificatesCall struct {
33680	s                                           *Service
33681	project                                     string
33682	targetHttpsProxy                            string
33683	targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest
33684	urlParams_                                  gensupport.URLParams
33685	ctx_                                        context.Context
33686}
33687
33688// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy.
33689func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall {
33690	c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33691	c.project = project
33692	c.targetHttpsProxy = targetHttpsProxy
33693	c.targethttpsproxiessetsslcertificatesrequest = targethttpsproxiessetsslcertificatesrequest
33694	return c
33695}
33696
33697// Fields allows partial responses to be retrieved. See
33698// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33699// for more information.
33700func (c *TargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslCertificatesCall {
33701	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33702	return c
33703}
33704
33705// Context sets the context to be used in this call's Do method. Any
33706// pending HTTP request will be aborted if the provided context is
33707// canceled.
33708func (c *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslCertificatesCall {
33709	c.ctx_ = ctx
33710	return c
33711}
33712
33713func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) {
33714	var body io.Reader = nil
33715	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxiessetsslcertificatesrequest)
33716	if err != nil {
33717		return nil, err
33718	}
33719	ctype := "application/json"
33720	c.urlParams_.Set("alt", alt)
33721	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates")
33722	urls += "?" + c.urlParams_.Encode()
33723	req, _ := http.NewRequest("POST", urls, body)
33724	googleapi.Expand(req.URL, map[string]string{
33725		"project":          c.project,
33726		"targetHttpsProxy": c.targetHttpsProxy,
33727	})
33728	req.Header.Set("Content-Type", ctype)
33729	req.Header.Set("User-Agent", c.s.userAgent())
33730	if c.ctx_ != nil {
33731		return ctxhttp.Do(c.ctx_, c.s.client, req)
33732	}
33733	return c.s.client.Do(req)
33734}
33735
33736// Do executes the "compute.targetHttpsProxies.setSslCertificates" call.
33737// Exactly one of *Operation or error will be non-nil. Any non-2xx
33738// status code is an error. Response headers are in either
33739// *Operation.ServerResponse.Header or (if a response was returned at
33740// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33741// to check whether the returned error was because
33742// http.StatusNotModified was returned.
33743func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33744	gensupport.SetOptions(c.urlParams_, opts...)
33745	res, err := c.doRequest("json")
33746	if res != nil && res.StatusCode == http.StatusNotModified {
33747		if res.Body != nil {
33748			res.Body.Close()
33749		}
33750		return nil, &googleapi.Error{
33751			Code:   res.StatusCode,
33752			Header: res.Header,
33753		}
33754	}
33755	if err != nil {
33756		return nil, err
33757	}
33758	defer googleapi.CloseBody(res)
33759	if err := googleapi.CheckResponse(res); err != nil {
33760		return nil, err
33761	}
33762	ret := &Operation{
33763		ServerResponse: googleapi.ServerResponse{
33764			Header:         res.Header,
33765			HTTPStatusCode: res.StatusCode,
33766		},
33767	}
33768	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33769		return nil, err
33770	}
33771	return ret, nil
33772	// {
33773	//   "description": "Replaces SslCertificates for TargetHttpsProxy.",
33774	//   "httpMethod": "POST",
33775	//   "id": "compute.targetHttpsProxies.setSslCertificates",
33776	//   "parameterOrder": [
33777	//     "project",
33778	//     "targetHttpsProxy"
33779	//   ],
33780	//   "parameters": {
33781	//     "project": {
33782	//       "description": "Project ID for this request.",
33783	//       "location": "path",
33784	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33785	//       "required": true,
33786	//       "type": "string"
33787	//     },
33788	//     "targetHttpsProxy": {
33789	//       "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.",
33790	//       "location": "path",
33791	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33792	//       "required": true,
33793	//       "type": "string"
33794	//     }
33795	//   },
33796	//   "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates",
33797	//   "request": {
33798	//     "$ref": "TargetHttpsProxiesSetSslCertificatesRequest"
33799	//   },
33800	//   "response": {
33801	//     "$ref": "Operation"
33802	//   },
33803	//   "scopes": [
33804	//     "https://www.googleapis.com/auth/cloud-platform",
33805	//     "https://www.googleapis.com/auth/compute"
33806	//   ]
33807	// }
33808
33809}
33810
33811// method id "compute.targetHttpsProxies.setUrlMap":
33812
33813type TargetHttpsProxiesSetUrlMapCall struct {
33814	s                *Service
33815	project          string
33816	targetHttpsProxy string
33817	urlmapreference  *UrlMapReference
33818	urlParams_       gensupport.URLParams
33819	ctx_             context.Context
33820}
33821
33822// SetUrlMap: Changes the URL map for TargetHttpsProxy.
33823func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall {
33824	c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33825	c.project = project
33826	c.targetHttpsProxy = targetHttpsProxy
33827	c.urlmapreference = urlmapreference
33828	return c
33829}
33830
33831// Fields allows partial responses to be retrieved. See
33832// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33833// for more information.
33834func (c *TargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetUrlMapCall {
33835	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33836	return c
33837}
33838
33839// Context sets the context to be used in this call's Do method. Any
33840// pending HTTP request will be aborted if the provided context is
33841// canceled.
33842func (c *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetUrlMapCall {
33843	c.ctx_ = ctx
33844	return c
33845}
33846
33847func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
33848	var body io.Reader = nil
33849	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
33850	if err != nil {
33851		return nil, err
33852	}
33853	ctype := "application/json"
33854	c.urlParams_.Set("alt", alt)
33855	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap")
33856	urls += "?" + c.urlParams_.Encode()
33857	req, _ := http.NewRequest("POST", urls, body)
33858	googleapi.Expand(req.URL, map[string]string{
33859		"project":          c.project,
33860		"targetHttpsProxy": c.targetHttpsProxy,
33861	})
33862	req.Header.Set("Content-Type", ctype)
33863	req.Header.Set("User-Agent", c.s.userAgent())
33864	if c.ctx_ != nil {
33865		return ctxhttp.Do(c.ctx_, c.s.client, req)
33866	}
33867	return c.s.client.Do(req)
33868}
33869
33870// Do executes the "compute.targetHttpsProxies.setUrlMap" call.
33871// Exactly one of *Operation or error will be non-nil. Any non-2xx
33872// status code is an error. Response headers are in either
33873// *Operation.ServerResponse.Header or (if a response was returned at
33874// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33875// to check whether the returned error was because
33876// http.StatusNotModified was returned.
33877func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33878	gensupport.SetOptions(c.urlParams_, opts...)
33879	res, err := c.doRequest("json")
33880	if res != nil && res.StatusCode == http.StatusNotModified {
33881		if res.Body != nil {
33882			res.Body.Close()
33883		}
33884		return nil, &googleapi.Error{
33885			Code:   res.StatusCode,
33886			Header: res.Header,
33887		}
33888	}
33889	if err != nil {
33890		return nil, err
33891	}
33892	defer googleapi.CloseBody(res)
33893	if err := googleapi.CheckResponse(res); err != nil {
33894		return nil, err
33895	}
33896	ret := &Operation{
33897		ServerResponse: googleapi.ServerResponse{
33898			Header:         res.Header,
33899			HTTPStatusCode: res.StatusCode,
33900		},
33901	}
33902	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33903		return nil, err
33904	}
33905	return ret, nil
33906	// {
33907	//   "description": "Changes the URL map for TargetHttpsProxy.",
33908	//   "httpMethod": "POST",
33909	//   "id": "compute.targetHttpsProxies.setUrlMap",
33910	//   "parameterOrder": [
33911	//     "project",
33912	//     "targetHttpsProxy"
33913	//   ],
33914	//   "parameters": {
33915	//     "project": {
33916	//       "description": "Project ID for this request.",
33917	//       "location": "path",
33918	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33919	//       "required": true,
33920	//       "type": "string"
33921	//     },
33922	//     "targetHttpsProxy": {
33923	//       "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.",
33924	//       "location": "path",
33925	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33926	//       "required": true,
33927	//       "type": "string"
33928	//     }
33929	//   },
33930	//   "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap",
33931	//   "request": {
33932	//     "$ref": "UrlMapReference"
33933	//   },
33934	//   "response": {
33935	//     "$ref": "Operation"
33936	//   },
33937	//   "scopes": [
33938	//     "https://www.googleapis.com/auth/cloud-platform",
33939	//     "https://www.googleapis.com/auth/compute"
33940	//   ]
33941	// }
33942
33943}
33944
33945// method id "compute.targetInstances.aggregatedList":
33946
33947type TargetInstancesAggregatedListCall struct {
33948	s            *Service
33949	project      string
33950	urlParams_   gensupport.URLParams
33951	ifNoneMatch_ string
33952	ctx_         context.Context
33953}
33954
33955// AggregatedList: Retrieves an aggregated list of target instances.
33956// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList
33957func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall {
33958	c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33959	c.project = project
33960	return c
33961}
33962
33963// Filter sets the optional parameter "filter": Sets a filter expression
33964// for filtering listed resources, in the form filter={expression}. Your
33965// {expression} must be in the format: field_name comparison_string
33966// literal_string.
33967//
33968// The field_name is the name of the field you want to compare. Only
33969// atomic field types are supported (string, number, boolean). The
33970// comparison_string must be either eq (equals) or ne (not equals). The
33971// literal_string is the string value to filter to. The literal value
33972// must be valid for the type of field you are filtering by (string,
33973// number, boolean). For string fields, the literal value is interpreted
33974// as a regular expression using RE2 syntax. The literal value must
33975// match the entire field.
33976//
33977// For example, to filter for instances that do not have a name of
33978// example-instance, you would use filter=name ne
33979// example-instance.
33980//
33981// Compute Engine Beta API Only: If you use filtering in the Beta API,
33982// you can also filter on nested fields. For example, you could filter
33983// on instances that have set the scheduling.automaticRestart field to
33984// true. In particular, use filtering on nested fields to take advantage
33985// of instance labels to organize and filter results based on label
33986// values.
33987//
33988// The Beta API also supports filtering on multiple expressions by
33989// providing each separate expression within parentheses. For example,
33990// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
33991// Multiple expressions are treated as AND expressions, meaning that
33992// resources must match all expressions to pass the filters.
33993func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall {
33994	c.urlParams_.Set("filter", filter)
33995	return c
33996}
33997
33998// MaxResults sets the optional parameter "maxResults": The maximum
33999// number of results per page that should be returned. If the number of
34000// available results is larger than maxResults, Compute Engine returns a
34001// nextPageToken that can be used to get the next page of results in
34002// subsequent list requests.
34003func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall {
34004	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34005	return c
34006}
34007
34008// PageToken sets the optional parameter "pageToken": Specifies a page
34009// token to use. Set pageToken to the nextPageToken returned by a
34010// previous list request to get the next page of results.
34011func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetInstancesAggregatedListCall {
34012	c.urlParams_.Set("pageToken", pageToken)
34013	return c
34014}
34015
34016// Fields allows partial responses to be retrieved. See
34017// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34018// for more information.
34019func (c *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall {
34020	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34021	return c
34022}
34023
34024// IfNoneMatch sets the optional parameter which makes the operation
34025// fail if the object's ETag matches the given value. This is useful for
34026// getting updates only after the object has changed since the last
34027// request. Use googleapi.IsNotModified to check whether the response
34028// error from Do is the result of In-None-Match.
34029func (c *TargetInstancesAggregatedListCall) IfNoneMatch(entityTag string) *TargetInstancesAggregatedListCall {
34030	c.ifNoneMatch_ = entityTag
34031	return c
34032}
34033
34034// Context sets the context to be used in this call's Do method. Any
34035// pending HTTP request will be aborted if the provided context is
34036// canceled.
34037func (c *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall {
34038	c.ctx_ = ctx
34039	return c
34040}
34041
34042func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
34043	var body io.Reader = nil
34044	c.urlParams_.Set("alt", alt)
34045	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetInstances")
34046	urls += "?" + c.urlParams_.Encode()
34047	req, _ := http.NewRequest("GET", urls, body)
34048	googleapi.Expand(req.URL, map[string]string{
34049		"project": c.project,
34050	})
34051	req.Header.Set("User-Agent", c.s.userAgent())
34052	if c.ifNoneMatch_ != "" {
34053		req.Header.Set("If-None-Match", c.ifNoneMatch_)
34054	}
34055	if c.ctx_ != nil {
34056		return ctxhttp.Do(c.ctx_, c.s.client, req)
34057	}
34058	return c.s.client.Do(req)
34059}
34060
34061// Do executes the "compute.targetInstances.aggregatedList" call.
34062// Exactly one of *TargetInstanceAggregatedList or error will be
34063// non-nil. Any non-2xx status code is an error. Response headers are in
34064// either *TargetInstanceAggregatedList.ServerResponse.Header or (if a
34065// response was returned at all) in error.(*googleapi.Error).Header. Use
34066// googleapi.IsNotModified to check whether the returned error was
34067// because http.StatusNotModified was returned.
34068func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceAggregatedList, error) {
34069	gensupport.SetOptions(c.urlParams_, opts...)
34070	res, err := c.doRequest("json")
34071	if res != nil && res.StatusCode == http.StatusNotModified {
34072		if res.Body != nil {
34073			res.Body.Close()
34074		}
34075		return nil, &googleapi.Error{
34076			Code:   res.StatusCode,
34077			Header: res.Header,
34078		}
34079	}
34080	if err != nil {
34081		return nil, err
34082	}
34083	defer googleapi.CloseBody(res)
34084	if err := googleapi.CheckResponse(res); err != nil {
34085		return nil, err
34086	}
34087	ret := &TargetInstanceAggregatedList{
34088		ServerResponse: googleapi.ServerResponse{
34089			Header:         res.Header,
34090			HTTPStatusCode: res.StatusCode,
34091		},
34092	}
34093	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34094		return nil, err
34095	}
34096	return ret, nil
34097	// {
34098	//   "description": "Retrieves an aggregated list of target instances.",
34099	//   "httpMethod": "GET",
34100	//   "id": "compute.targetInstances.aggregatedList",
34101	//   "parameterOrder": [
34102	//     "project"
34103	//   ],
34104	//   "parameters": {
34105	//     "filter": {
34106	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
34107	//       "location": "query",
34108	//       "type": "string"
34109	//     },
34110	//     "maxResults": {
34111	//       "default": "500",
34112	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
34113	//       "format": "uint32",
34114	//       "location": "query",
34115	//       "maximum": "500",
34116	//       "minimum": "0",
34117	//       "type": "integer"
34118	//     },
34119	//     "pageToken": {
34120	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
34121	//       "location": "query",
34122	//       "type": "string"
34123	//     },
34124	//     "project": {
34125	//       "description": "Project ID for this request.",
34126	//       "location": "path",
34127	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34128	//       "required": true,
34129	//       "type": "string"
34130	//     }
34131	//   },
34132	//   "path": "{project}/aggregated/targetInstances",
34133	//   "response": {
34134	//     "$ref": "TargetInstanceAggregatedList"
34135	//   },
34136	//   "scopes": [
34137	//     "https://www.googleapis.com/auth/cloud-platform",
34138	//     "https://www.googleapis.com/auth/compute",
34139	//     "https://www.googleapis.com/auth/compute.readonly"
34140	//   ]
34141	// }
34142
34143}
34144
34145// Pages invokes f for each page of results.
34146// A non-nil error returned from f will halt the iteration.
34147// The provided context supersedes any context provided to the Context method.
34148func (c *TargetInstancesAggregatedListCall) Pages(ctx context.Context, f func(*TargetInstanceAggregatedList) error) error {
34149	c.ctx_ = ctx
34150	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
34151	for {
34152		x, err := c.Do()
34153		if err != nil {
34154			return err
34155		}
34156		if err := f(x); err != nil {
34157			return err
34158		}
34159		if x.NextPageToken == "" {
34160			return nil
34161		}
34162		c.PageToken(x.NextPageToken)
34163	}
34164}
34165
34166// method id "compute.targetInstances.delete":
34167
34168type TargetInstancesDeleteCall struct {
34169	s              *Service
34170	project        string
34171	zone           string
34172	targetInstance string
34173	urlParams_     gensupport.URLParams
34174	ctx_           context.Context
34175}
34176
34177// Delete: Deletes the specified TargetInstance resource.
34178// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/delete
34179func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall {
34180	c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34181	c.project = project
34182	c.zone = zone
34183	c.targetInstance = targetInstance
34184	return c
34185}
34186
34187// Fields allows partial responses to be retrieved. See
34188// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34189// for more information.
34190func (c *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall {
34191	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34192	return c
34193}
34194
34195// Context sets the context to be used in this call's Do method. Any
34196// pending HTTP request will be aborted if the provided context is
34197// canceled.
34198func (c *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall {
34199	c.ctx_ = ctx
34200	return c
34201}
34202
34203func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
34204	var body io.Reader = nil
34205	c.urlParams_.Set("alt", alt)
34206	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}")
34207	urls += "?" + c.urlParams_.Encode()
34208	req, _ := http.NewRequest("DELETE", urls, body)
34209	googleapi.Expand(req.URL, map[string]string{
34210		"project":        c.project,
34211		"zone":           c.zone,
34212		"targetInstance": c.targetInstance,
34213	})
34214	req.Header.Set("User-Agent", c.s.userAgent())
34215	if c.ctx_ != nil {
34216		return ctxhttp.Do(c.ctx_, c.s.client, req)
34217	}
34218	return c.s.client.Do(req)
34219}
34220
34221// Do executes the "compute.targetInstances.delete" call.
34222// Exactly one of *Operation or error will be non-nil. Any non-2xx
34223// status code is an error. Response headers are in either
34224// *Operation.ServerResponse.Header or (if a response was returned at
34225// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34226// to check whether the returned error was because
34227// http.StatusNotModified was returned.
34228func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
34229	gensupport.SetOptions(c.urlParams_, opts...)
34230	res, err := c.doRequest("json")
34231	if res != nil && res.StatusCode == http.StatusNotModified {
34232		if res.Body != nil {
34233			res.Body.Close()
34234		}
34235		return nil, &googleapi.Error{
34236			Code:   res.StatusCode,
34237			Header: res.Header,
34238		}
34239	}
34240	if err != nil {
34241		return nil, err
34242	}
34243	defer googleapi.CloseBody(res)
34244	if err := googleapi.CheckResponse(res); err != nil {
34245		return nil, err
34246	}
34247	ret := &Operation{
34248		ServerResponse: googleapi.ServerResponse{
34249			Header:         res.Header,
34250			HTTPStatusCode: res.StatusCode,
34251		},
34252	}
34253	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34254		return nil, err
34255	}
34256	return ret, nil
34257	// {
34258	//   "description": "Deletes the specified TargetInstance resource.",
34259	//   "httpMethod": "DELETE",
34260	//   "id": "compute.targetInstances.delete",
34261	//   "parameterOrder": [
34262	//     "project",
34263	//     "zone",
34264	//     "targetInstance"
34265	//   ],
34266	//   "parameters": {
34267	//     "project": {
34268	//       "description": "Project ID for this request.",
34269	//       "location": "path",
34270	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34271	//       "required": true,
34272	//       "type": "string"
34273	//     },
34274	//     "targetInstance": {
34275	//       "description": "Name of the TargetInstance resource to delete.",
34276	//       "location": "path",
34277	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34278	//       "required": true,
34279	//       "type": "string"
34280	//     },
34281	//     "zone": {
34282	//       "description": "Name of the zone scoping this request.",
34283	//       "location": "path",
34284	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34285	//       "required": true,
34286	//       "type": "string"
34287	//     }
34288	//   },
34289	//   "path": "{project}/zones/{zone}/targetInstances/{targetInstance}",
34290	//   "response": {
34291	//     "$ref": "Operation"
34292	//   },
34293	//   "scopes": [
34294	//     "https://www.googleapis.com/auth/cloud-platform",
34295	//     "https://www.googleapis.com/auth/compute"
34296	//   ]
34297	// }
34298
34299}
34300
34301// method id "compute.targetInstances.get":
34302
34303type TargetInstancesGetCall struct {
34304	s              *Service
34305	project        string
34306	zone           string
34307	targetInstance string
34308	urlParams_     gensupport.URLParams
34309	ifNoneMatch_   string
34310	ctx_           context.Context
34311}
34312
34313// Get: Returns the specified TargetInstance resource. Get a list of
34314// available target instances by making a list() request.
34315// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get
34316func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall {
34317	c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34318	c.project = project
34319	c.zone = zone
34320	c.targetInstance = targetInstance
34321	return c
34322}
34323
34324// Fields allows partial responses to be retrieved. See
34325// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34326// for more information.
34327func (c *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall {
34328	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34329	return c
34330}
34331
34332// IfNoneMatch sets the optional parameter which makes the operation
34333// fail if the object's ETag matches the given value. This is useful for
34334// getting updates only after the object has changed since the last
34335// request. Use googleapi.IsNotModified to check whether the response
34336// error from Do is the result of In-None-Match.
34337func (c *TargetInstancesGetCall) IfNoneMatch(entityTag string) *TargetInstancesGetCall {
34338	c.ifNoneMatch_ = entityTag
34339	return c
34340}
34341
34342// Context sets the context to be used in this call's Do method. Any
34343// pending HTTP request will be aborted if the provided context is
34344// canceled.
34345func (c *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall {
34346	c.ctx_ = ctx
34347	return c
34348}
34349
34350func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) {
34351	var body io.Reader = nil
34352	c.urlParams_.Set("alt", alt)
34353	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}")
34354	urls += "?" + c.urlParams_.Encode()
34355	req, _ := http.NewRequest("GET", urls, body)
34356	googleapi.Expand(req.URL, map[string]string{
34357		"project":        c.project,
34358		"zone":           c.zone,
34359		"targetInstance": c.targetInstance,
34360	})
34361	req.Header.Set("User-Agent", c.s.userAgent())
34362	if c.ifNoneMatch_ != "" {
34363		req.Header.Set("If-None-Match", c.ifNoneMatch_)
34364	}
34365	if c.ctx_ != nil {
34366		return ctxhttp.Do(c.ctx_, c.s.client, req)
34367	}
34368	return c.s.client.Do(req)
34369}
34370
34371// Do executes the "compute.targetInstances.get" call.
34372// Exactly one of *TargetInstance or error will be non-nil. Any non-2xx
34373// status code is an error. Response headers are in either
34374// *TargetInstance.ServerResponse.Header or (if a response was returned
34375// at all) in error.(*googleapi.Error).Header. Use
34376// googleapi.IsNotModified to check whether the returned error was
34377// because http.StatusNotModified was returned.
34378func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstance, error) {
34379	gensupport.SetOptions(c.urlParams_, opts...)
34380	res, err := c.doRequest("json")
34381	if res != nil && res.StatusCode == http.StatusNotModified {
34382		if res.Body != nil {
34383			res.Body.Close()
34384		}
34385		return nil, &googleapi.Error{
34386			Code:   res.StatusCode,
34387			Header: res.Header,
34388		}
34389	}
34390	if err != nil {
34391		return nil, err
34392	}
34393	defer googleapi.CloseBody(res)
34394	if err := googleapi.CheckResponse(res); err != nil {
34395		return nil, err
34396	}
34397	ret := &TargetInstance{
34398		ServerResponse: googleapi.ServerResponse{
34399			Header:         res.Header,
34400			HTTPStatusCode: res.StatusCode,
34401		},
34402	}
34403	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34404		return nil, err
34405	}
34406	return ret, nil
34407	// {
34408	//   "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.",
34409	//   "httpMethod": "GET",
34410	//   "id": "compute.targetInstances.get",
34411	//   "parameterOrder": [
34412	//     "project",
34413	//     "zone",
34414	//     "targetInstance"
34415	//   ],
34416	//   "parameters": {
34417	//     "project": {
34418	//       "description": "Project ID for this request.",
34419	//       "location": "path",
34420	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34421	//       "required": true,
34422	//       "type": "string"
34423	//     },
34424	//     "targetInstance": {
34425	//       "description": "Name of the TargetInstance resource to return.",
34426	//       "location": "path",
34427	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34428	//       "required": true,
34429	//       "type": "string"
34430	//     },
34431	//     "zone": {
34432	//       "description": "Name of the zone scoping this request.",
34433	//       "location": "path",
34434	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34435	//       "required": true,
34436	//       "type": "string"
34437	//     }
34438	//   },
34439	//   "path": "{project}/zones/{zone}/targetInstances/{targetInstance}",
34440	//   "response": {
34441	//     "$ref": "TargetInstance"
34442	//   },
34443	//   "scopes": [
34444	//     "https://www.googleapis.com/auth/cloud-platform",
34445	//     "https://www.googleapis.com/auth/compute",
34446	//     "https://www.googleapis.com/auth/compute.readonly"
34447	//   ]
34448	// }
34449
34450}
34451
34452// method id "compute.targetInstances.insert":
34453
34454type TargetInstancesInsertCall struct {
34455	s              *Service
34456	project        string
34457	zone           string
34458	targetinstance *TargetInstance
34459	urlParams_     gensupport.URLParams
34460	ctx_           context.Context
34461}
34462
34463// Insert: Creates a TargetInstance resource in the specified project
34464// and zone using the data included in the request.
34465// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/insert
34466func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall {
34467	c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34468	c.project = project
34469	c.zone = zone
34470	c.targetinstance = targetinstance
34471	return c
34472}
34473
34474// Fields allows partial responses to be retrieved. See
34475// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34476// for more information.
34477func (c *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall {
34478	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34479	return c
34480}
34481
34482// Context sets the context to be used in this call's Do method. Any
34483// pending HTTP request will be aborted if the provided context is
34484// canceled.
34485func (c *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall {
34486	c.ctx_ = ctx
34487	return c
34488}
34489
34490func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) {
34491	var body io.Reader = nil
34492	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance)
34493	if err != nil {
34494		return nil, err
34495	}
34496	ctype := "application/json"
34497	c.urlParams_.Set("alt", alt)
34498	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances")
34499	urls += "?" + c.urlParams_.Encode()
34500	req, _ := http.NewRequest("POST", urls, body)
34501	googleapi.Expand(req.URL, map[string]string{
34502		"project": c.project,
34503		"zone":    c.zone,
34504	})
34505	req.Header.Set("Content-Type", ctype)
34506	req.Header.Set("User-Agent", c.s.userAgent())
34507	if c.ctx_ != nil {
34508		return ctxhttp.Do(c.ctx_, c.s.client, req)
34509	}
34510	return c.s.client.Do(req)
34511}
34512
34513// Do executes the "compute.targetInstances.insert" call.
34514// Exactly one of *Operation or error will be non-nil. Any non-2xx
34515// status code is an error. Response headers are in either
34516// *Operation.ServerResponse.Header or (if a response was returned at
34517// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34518// to check whether the returned error was because
34519// http.StatusNotModified was returned.
34520func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
34521	gensupport.SetOptions(c.urlParams_, opts...)
34522	res, err := c.doRequest("json")
34523	if res != nil && res.StatusCode == http.StatusNotModified {
34524		if res.Body != nil {
34525			res.Body.Close()
34526		}
34527		return nil, &googleapi.Error{
34528			Code:   res.StatusCode,
34529			Header: res.Header,
34530		}
34531	}
34532	if err != nil {
34533		return nil, err
34534	}
34535	defer googleapi.CloseBody(res)
34536	if err := googleapi.CheckResponse(res); err != nil {
34537		return nil, err
34538	}
34539	ret := &Operation{
34540		ServerResponse: googleapi.ServerResponse{
34541			Header:         res.Header,
34542			HTTPStatusCode: res.StatusCode,
34543		},
34544	}
34545	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34546		return nil, err
34547	}
34548	return ret, nil
34549	// {
34550	//   "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.",
34551	//   "httpMethod": "POST",
34552	//   "id": "compute.targetInstances.insert",
34553	//   "parameterOrder": [
34554	//     "project",
34555	//     "zone"
34556	//   ],
34557	//   "parameters": {
34558	//     "project": {
34559	//       "description": "Project ID for this request.",
34560	//       "location": "path",
34561	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34562	//       "required": true,
34563	//       "type": "string"
34564	//     },
34565	//     "zone": {
34566	//       "description": "Name of the zone scoping this request.",
34567	//       "location": "path",
34568	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34569	//       "required": true,
34570	//       "type": "string"
34571	//     }
34572	//   },
34573	//   "path": "{project}/zones/{zone}/targetInstances",
34574	//   "request": {
34575	//     "$ref": "TargetInstance"
34576	//   },
34577	//   "response": {
34578	//     "$ref": "Operation"
34579	//   },
34580	//   "scopes": [
34581	//     "https://www.googleapis.com/auth/cloud-platform",
34582	//     "https://www.googleapis.com/auth/compute"
34583	//   ]
34584	// }
34585
34586}
34587
34588// method id "compute.targetInstances.list":
34589
34590type TargetInstancesListCall struct {
34591	s            *Service
34592	project      string
34593	zone         string
34594	urlParams_   gensupport.URLParams
34595	ifNoneMatch_ string
34596	ctx_         context.Context
34597}
34598
34599// List: Retrieves a list of TargetInstance resources available to the
34600// specified project and zone.
34601// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list
34602func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall {
34603	c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34604	c.project = project
34605	c.zone = zone
34606	return c
34607}
34608
34609// Filter sets the optional parameter "filter": Sets a filter expression
34610// for filtering listed resources, in the form filter={expression}. Your
34611// {expression} must be in the format: field_name comparison_string
34612// literal_string.
34613//
34614// The field_name is the name of the field you want to compare. Only
34615// atomic field types are supported (string, number, boolean). The
34616// comparison_string must be either eq (equals) or ne (not equals). The
34617// literal_string is the string value to filter to. The literal value
34618// must be valid for the type of field you are filtering by (string,
34619// number, boolean). For string fields, the literal value is interpreted
34620// as a regular expression using RE2 syntax. The literal value must
34621// match the entire field.
34622//
34623// For example, to filter for instances that do not have a name of
34624// example-instance, you would use filter=name ne
34625// example-instance.
34626//
34627// Compute Engine Beta API Only: If you use filtering in the Beta API,
34628// you can also filter on nested fields. For example, you could filter
34629// on instances that have set the scheduling.automaticRestart field to
34630// true. In particular, use filtering on nested fields to take advantage
34631// of instance labels to organize and filter results based on label
34632// values.
34633//
34634// The Beta API also supports filtering on multiple expressions by
34635// providing each separate expression within parentheses. For example,
34636// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
34637// Multiple expressions are treated as AND expressions, meaning that
34638// resources must match all expressions to pass the filters.
34639func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall {
34640	c.urlParams_.Set("filter", filter)
34641	return c
34642}
34643
34644// MaxResults sets the optional parameter "maxResults": The maximum
34645// number of results per page that should be returned. If the number of
34646// available results is larger than maxResults, Compute Engine returns a
34647// nextPageToken that can be used to get the next page of results in
34648// subsequent list requests.
34649func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall {
34650	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34651	return c
34652}
34653
34654// PageToken sets the optional parameter "pageToken": Specifies a page
34655// token to use. Set pageToken to the nextPageToken returned by a
34656// previous list request to get the next page of results.
34657func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesListCall {
34658	c.urlParams_.Set("pageToken", pageToken)
34659	return c
34660}
34661
34662// Fields allows partial responses to be retrieved. See
34663// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34664// for more information.
34665func (c *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall {
34666	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34667	return c
34668}
34669
34670// IfNoneMatch sets the optional parameter which makes the operation
34671// fail if the object's ETag matches the given value. This is useful for
34672// getting updates only after the object has changed since the last
34673// request. Use googleapi.IsNotModified to check whether the response
34674// error from Do is the result of In-None-Match.
34675func (c *TargetInstancesListCall) IfNoneMatch(entityTag string) *TargetInstancesListCall {
34676	c.ifNoneMatch_ = entityTag
34677	return c
34678}
34679
34680// Context sets the context to be used in this call's Do method. Any
34681// pending HTTP request will be aborted if the provided context is
34682// canceled.
34683func (c *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall {
34684	c.ctx_ = ctx
34685	return c
34686}
34687
34688func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) {
34689	var body io.Reader = nil
34690	c.urlParams_.Set("alt", alt)
34691	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances")
34692	urls += "?" + c.urlParams_.Encode()
34693	req, _ := http.NewRequest("GET", urls, body)
34694	googleapi.Expand(req.URL, map[string]string{
34695		"project": c.project,
34696		"zone":    c.zone,
34697	})
34698	req.Header.Set("User-Agent", c.s.userAgent())
34699	if c.ifNoneMatch_ != "" {
34700		req.Header.Set("If-None-Match", c.ifNoneMatch_)
34701	}
34702	if c.ctx_ != nil {
34703		return ctxhttp.Do(c.ctx_, c.s.client, req)
34704	}
34705	return c.s.client.Do(req)
34706}
34707
34708// Do executes the "compute.targetInstances.list" call.
34709// Exactly one of *TargetInstanceList or error will be non-nil. Any
34710// non-2xx status code is an error. Response headers are in either
34711// *TargetInstanceList.ServerResponse.Header or (if a response was
34712// returned at all) in error.(*googleapi.Error).Header. Use
34713// googleapi.IsNotModified to check whether the returned error was
34714// because http.StatusNotModified was returned.
34715func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceList, error) {
34716	gensupport.SetOptions(c.urlParams_, opts...)
34717	res, err := c.doRequest("json")
34718	if res != nil && res.StatusCode == http.StatusNotModified {
34719		if res.Body != nil {
34720			res.Body.Close()
34721		}
34722		return nil, &googleapi.Error{
34723			Code:   res.StatusCode,
34724			Header: res.Header,
34725		}
34726	}
34727	if err != nil {
34728		return nil, err
34729	}
34730	defer googleapi.CloseBody(res)
34731	if err := googleapi.CheckResponse(res); err != nil {
34732		return nil, err
34733	}
34734	ret := &TargetInstanceList{
34735		ServerResponse: googleapi.ServerResponse{
34736			Header:         res.Header,
34737			HTTPStatusCode: res.StatusCode,
34738		},
34739	}
34740	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34741		return nil, err
34742	}
34743	return ret, nil
34744	// {
34745	//   "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.",
34746	//   "httpMethod": "GET",
34747	//   "id": "compute.targetInstances.list",
34748	//   "parameterOrder": [
34749	//     "project",
34750	//     "zone"
34751	//   ],
34752	//   "parameters": {
34753	//     "filter": {
34754	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
34755	//       "location": "query",
34756	//       "type": "string"
34757	//     },
34758	//     "maxResults": {
34759	//       "default": "500",
34760	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
34761	//       "format": "uint32",
34762	//       "location": "query",
34763	//       "maximum": "500",
34764	//       "minimum": "0",
34765	//       "type": "integer"
34766	//     },
34767	//     "pageToken": {
34768	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
34769	//       "location": "query",
34770	//       "type": "string"
34771	//     },
34772	//     "project": {
34773	//       "description": "Project ID for this request.",
34774	//       "location": "path",
34775	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34776	//       "required": true,
34777	//       "type": "string"
34778	//     },
34779	//     "zone": {
34780	//       "description": "Name of the zone scoping this request.",
34781	//       "location": "path",
34782	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34783	//       "required": true,
34784	//       "type": "string"
34785	//     }
34786	//   },
34787	//   "path": "{project}/zones/{zone}/targetInstances",
34788	//   "response": {
34789	//     "$ref": "TargetInstanceList"
34790	//   },
34791	//   "scopes": [
34792	//     "https://www.googleapis.com/auth/cloud-platform",
34793	//     "https://www.googleapis.com/auth/compute",
34794	//     "https://www.googleapis.com/auth/compute.readonly"
34795	//   ]
34796	// }
34797
34798}
34799
34800// Pages invokes f for each page of results.
34801// A non-nil error returned from f will halt the iteration.
34802// The provided context supersedes any context provided to the Context method.
34803func (c *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInstanceList) error) error {
34804	c.ctx_ = ctx
34805	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
34806	for {
34807		x, err := c.Do()
34808		if err != nil {
34809			return err
34810		}
34811		if err := f(x); err != nil {
34812			return err
34813		}
34814		if x.NextPageToken == "" {
34815			return nil
34816		}
34817		c.PageToken(x.NextPageToken)
34818	}
34819}
34820
34821// method id "compute.targetPools.addHealthCheck":
34822
34823type TargetPoolsAddHealthCheckCall struct {
34824	s                                *Service
34825	project                          string
34826	region                           string
34827	targetPool                       string
34828	targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest
34829	urlParams_                       gensupport.URLParams
34830	ctx_                             context.Context
34831}
34832
34833// AddHealthCheck: Adds health check URLs to a target pool.
34834// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck
34835func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall {
34836	c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34837	c.project = project
34838	c.region = region
34839	c.targetPool = targetPool
34840	c.targetpoolsaddhealthcheckrequest = targetpoolsaddhealthcheckrequest
34841	return c
34842}
34843
34844// Fields allows partial responses to be retrieved. See
34845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34846// for more information.
34847func (c *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall {
34848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34849	return c
34850}
34851
34852// Context sets the context to be used in this call's Do method. Any
34853// pending HTTP request will be aborted if the provided context is
34854// canceled.
34855func (c *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall {
34856	c.ctx_ = ctx
34857	return c
34858}
34859
34860func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) {
34861	var body io.Reader = nil
34862	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest)
34863	if err != nil {
34864		return nil, err
34865	}
34866	ctype := "application/json"
34867	c.urlParams_.Set("alt", alt)
34868	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck")
34869	urls += "?" + c.urlParams_.Encode()
34870	req, _ := http.NewRequest("POST", urls, body)
34871	googleapi.Expand(req.URL, map[string]string{
34872		"project":    c.project,
34873		"region":     c.region,
34874		"targetPool": c.targetPool,
34875	})
34876	req.Header.Set("Content-Type", ctype)
34877	req.Header.Set("User-Agent", c.s.userAgent())
34878	if c.ctx_ != nil {
34879		return ctxhttp.Do(c.ctx_, c.s.client, req)
34880	}
34881	return c.s.client.Do(req)
34882}
34883
34884// Do executes the "compute.targetPools.addHealthCheck" call.
34885// Exactly one of *Operation or error will be non-nil. Any non-2xx
34886// status code is an error. Response headers are in either
34887// *Operation.ServerResponse.Header or (if a response was returned at
34888// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34889// to check whether the returned error was because
34890// http.StatusNotModified was returned.
34891func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
34892	gensupport.SetOptions(c.urlParams_, opts...)
34893	res, err := c.doRequest("json")
34894	if res != nil && res.StatusCode == http.StatusNotModified {
34895		if res.Body != nil {
34896			res.Body.Close()
34897		}
34898		return nil, &googleapi.Error{
34899			Code:   res.StatusCode,
34900			Header: res.Header,
34901		}
34902	}
34903	if err != nil {
34904		return nil, err
34905	}
34906	defer googleapi.CloseBody(res)
34907	if err := googleapi.CheckResponse(res); err != nil {
34908		return nil, err
34909	}
34910	ret := &Operation{
34911		ServerResponse: googleapi.ServerResponse{
34912			Header:         res.Header,
34913			HTTPStatusCode: res.StatusCode,
34914		},
34915	}
34916	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34917		return nil, err
34918	}
34919	return ret, nil
34920	// {
34921	//   "description": "Adds health check URLs to a target pool.",
34922	//   "httpMethod": "POST",
34923	//   "id": "compute.targetPools.addHealthCheck",
34924	//   "parameterOrder": [
34925	//     "project",
34926	//     "region",
34927	//     "targetPool"
34928	//   ],
34929	//   "parameters": {
34930	//     "project": {
34931	//       "description": "Project ID for this request.",
34932	//       "location": "path",
34933	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34934	//       "required": true,
34935	//       "type": "string"
34936	//     },
34937	//     "region": {
34938	//       "description": "Name of the region scoping this request.",
34939	//       "location": "path",
34940	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34941	//       "required": true,
34942	//       "type": "string"
34943	//     },
34944	//     "targetPool": {
34945	//       "description": "Name of the target pool to add a health check to.",
34946	//       "location": "path",
34947	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34948	//       "required": true,
34949	//       "type": "string"
34950	//     }
34951	//   },
34952	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck",
34953	//   "request": {
34954	//     "$ref": "TargetPoolsAddHealthCheckRequest"
34955	//   },
34956	//   "response": {
34957	//     "$ref": "Operation"
34958	//   },
34959	//   "scopes": [
34960	//     "https://www.googleapis.com/auth/cloud-platform",
34961	//     "https://www.googleapis.com/auth/compute"
34962	//   ]
34963	// }
34964
34965}
34966
34967// method id "compute.targetPools.addInstance":
34968
34969type TargetPoolsAddInstanceCall struct {
34970	s                             *Service
34971	project                       string
34972	region                        string
34973	targetPool                    string
34974	targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest
34975	urlParams_                    gensupport.URLParams
34976	ctx_                          context.Context
34977}
34978
34979// AddInstance: Adds an instance to a target pool.
34980// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance
34981func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall {
34982	c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34983	c.project = project
34984	c.region = region
34985	c.targetPool = targetPool
34986	c.targetpoolsaddinstancerequest = targetpoolsaddinstancerequest
34987	return c
34988}
34989
34990// Fields allows partial responses to be retrieved. See
34991// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34992// for more information.
34993func (c *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall {
34994	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34995	return c
34996}
34997
34998// Context sets the context to be used in this call's Do method. Any
34999// pending HTTP request will be aborted if the provided context is
35000// canceled.
35001func (c *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall {
35002	c.ctx_ = ctx
35003	return c
35004}
35005
35006func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) {
35007	var body io.Reader = nil
35008	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest)
35009	if err != nil {
35010		return nil, err
35011	}
35012	ctype := "application/json"
35013	c.urlParams_.Set("alt", alt)
35014	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addInstance")
35015	urls += "?" + c.urlParams_.Encode()
35016	req, _ := http.NewRequest("POST", urls, body)
35017	googleapi.Expand(req.URL, map[string]string{
35018		"project":    c.project,
35019		"region":     c.region,
35020		"targetPool": c.targetPool,
35021	})
35022	req.Header.Set("Content-Type", ctype)
35023	req.Header.Set("User-Agent", c.s.userAgent())
35024	if c.ctx_ != nil {
35025		return ctxhttp.Do(c.ctx_, c.s.client, req)
35026	}
35027	return c.s.client.Do(req)
35028}
35029
35030// Do executes the "compute.targetPools.addInstance" call.
35031// Exactly one of *Operation or error will be non-nil. Any non-2xx
35032// status code is an error. Response headers are in either
35033// *Operation.ServerResponse.Header or (if a response was returned at
35034// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35035// to check whether the returned error was because
35036// http.StatusNotModified was returned.
35037func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35038	gensupport.SetOptions(c.urlParams_, opts...)
35039	res, err := c.doRequest("json")
35040	if res != nil && res.StatusCode == http.StatusNotModified {
35041		if res.Body != nil {
35042			res.Body.Close()
35043		}
35044		return nil, &googleapi.Error{
35045			Code:   res.StatusCode,
35046			Header: res.Header,
35047		}
35048	}
35049	if err != nil {
35050		return nil, err
35051	}
35052	defer googleapi.CloseBody(res)
35053	if err := googleapi.CheckResponse(res); err != nil {
35054		return nil, err
35055	}
35056	ret := &Operation{
35057		ServerResponse: googleapi.ServerResponse{
35058			Header:         res.Header,
35059			HTTPStatusCode: res.StatusCode,
35060		},
35061	}
35062	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35063		return nil, err
35064	}
35065	return ret, nil
35066	// {
35067	//   "description": "Adds an instance to a target pool.",
35068	//   "httpMethod": "POST",
35069	//   "id": "compute.targetPools.addInstance",
35070	//   "parameterOrder": [
35071	//     "project",
35072	//     "region",
35073	//     "targetPool"
35074	//   ],
35075	//   "parameters": {
35076	//     "project": {
35077	//       "description": "Project ID for this request.",
35078	//       "location": "path",
35079	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35080	//       "required": true,
35081	//       "type": "string"
35082	//     },
35083	//     "region": {
35084	//       "description": "Name of the region scoping this request.",
35085	//       "location": "path",
35086	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35087	//       "required": true,
35088	//       "type": "string"
35089	//     },
35090	//     "targetPool": {
35091	//       "description": "Name of the TargetPool resource to add instances to.",
35092	//       "location": "path",
35093	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35094	//       "required": true,
35095	//       "type": "string"
35096	//     }
35097	//   },
35098	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance",
35099	//   "request": {
35100	//     "$ref": "TargetPoolsAddInstanceRequest"
35101	//   },
35102	//   "response": {
35103	//     "$ref": "Operation"
35104	//   },
35105	//   "scopes": [
35106	//     "https://www.googleapis.com/auth/cloud-platform",
35107	//     "https://www.googleapis.com/auth/compute"
35108	//   ]
35109	// }
35110
35111}
35112
35113// method id "compute.targetPools.aggregatedList":
35114
35115type TargetPoolsAggregatedListCall struct {
35116	s            *Service
35117	project      string
35118	urlParams_   gensupport.URLParams
35119	ifNoneMatch_ string
35120	ctx_         context.Context
35121}
35122
35123// AggregatedList: Retrieves an aggregated list of target pools.
35124// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList
35125func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall {
35126	c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35127	c.project = project
35128	return c
35129}
35130
35131// Filter sets the optional parameter "filter": Sets a filter expression
35132// for filtering listed resources, in the form filter={expression}. Your
35133// {expression} must be in the format: field_name comparison_string
35134// literal_string.
35135//
35136// The field_name is the name of the field you want to compare. Only
35137// atomic field types are supported (string, number, boolean). The
35138// comparison_string must be either eq (equals) or ne (not equals). The
35139// literal_string is the string value to filter to. The literal value
35140// must be valid for the type of field you are filtering by (string,
35141// number, boolean). For string fields, the literal value is interpreted
35142// as a regular expression using RE2 syntax. The literal value must
35143// match the entire field.
35144//
35145// For example, to filter for instances that do not have a name of
35146// example-instance, you would use filter=name ne
35147// example-instance.
35148//
35149// Compute Engine Beta API Only: If you use filtering in the Beta API,
35150// you can also filter on nested fields. For example, you could filter
35151// on instances that have set the scheduling.automaticRestart field to
35152// true. In particular, use filtering on nested fields to take advantage
35153// of instance labels to organize and filter results based on label
35154// values.
35155//
35156// The Beta API also supports filtering on multiple expressions by
35157// providing each separate expression within parentheses. For example,
35158// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
35159// Multiple expressions are treated as AND expressions, meaning that
35160// resources must match all expressions to pass the filters.
35161func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall {
35162	c.urlParams_.Set("filter", filter)
35163	return c
35164}
35165
35166// MaxResults sets the optional parameter "maxResults": The maximum
35167// number of results per page that should be returned. If the number of
35168// available results is larger than maxResults, Compute Engine returns a
35169// nextPageToken that can be used to get the next page of results in
35170// subsequent list requests.
35171func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall {
35172	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35173	return c
35174}
35175
35176// PageToken sets the optional parameter "pageToken": Specifies a page
35177// token to use. Set pageToken to the nextPageToken returned by a
35178// previous list request to get the next page of results.
35179func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPoolsAggregatedListCall {
35180	c.urlParams_.Set("pageToken", pageToken)
35181	return c
35182}
35183
35184// Fields allows partial responses to be retrieved. See
35185// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35186// for more information.
35187func (c *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall {
35188	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35189	return c
35190}
35191
35192// IfNoneMatch sets the optional parameter which makes the operation
35193// fail if the object's ETag matches the given value. This is useful for
35194// getting updates only after the object has changed since the last
35195// request. Use googleapi.IsNotModified to check whether the response
35196// error from Do is the result of In-None-Match.
35197func (c *TargetPoolsAggregatedListCall) IfNoneMatch(entityTag string) *TargetPoolsAggregatedListCall {
35198	c.ifNoneMatch_ = entityTag
35199	return c
35200}
35201
35202// Context sets the context to be used in this call's Do method. Any
35203// pending HTTP request will be aborted if the provided context is
35204// canceled.
35205func (c *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall {
35206	c.ctx_ = ctx
35207	return c
35208}
35209
35210func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
35211	var body io.Reader = nil
35212	c.urlParams_.Set("alt", alt)
35213	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetPools")
35214	urls += "?" + c.urlParams_.Encode()
35215	req, _ := http.NewRequest("GET", urls, body)
35216	googleapi.Expand(req.URL, map[string]string{
35217		"project": c.project,
35218	})
35219	req.Header.Set("User-Agent", c.s.userAgent())
35220	if c.ifNoneMatch_ != "" {
35221		req.Header.Set("If-None-Match", c.ifNoneMatch_)
35222	}
35223	if c.ctx_ != nil {
35224		return ctxhttp.Do(c.ctx_, c.s.client, req)
35225	}
35226	return c.s.client.Do(req)
35227}
35228
35229// Do executes the "compute.targetPools.aggregatedList" call.
35230// Exactly one of *TargetPoolAggregatedList or error will be non-nil.
35231// Any non-2xx status code is an error. Response headers are in either
35232// *TargetPoolAggregatedList.ServerResponse.Header or (if a response was
35233// returned at all) in error.(*googleapi.Error).Header. Use
35234// googleapi.IsNotModified to check whether the returned error was
35235// because http.StatusNotModified was returned.
35236func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetPoolAggregatedList, error) {
35237	gensupport.SetOptions(c.urlParams_, opts...)
35238	res, err := c.doRequest("json")
35239	if res != nil && res.StatusCode == http.StatusNotModified {
35240		if res.Body != nil {
35241			res.Body.Close()
35242		}
35243		return nil, &googleapi.Error{
35244			Code:   res.StatusCode,
35245			Header: res.Header,
35246		}
35247	}
35248	if err != nil {
35249		return nil, err
35250	}
35251	defer googleapi.CloseBody(res)
35252	if err := googleapi.CheckResponse(res); err != nil {
35253		return nil, err
35254	}
35255	ret := &TargetPoolAggregatedList{
35256		ServerResponse: googleapi.ServerResponse{
35257			Header:         res.Header,
35258			HTTPStatusCode: res.StatusCode,
35259		},
35260	}
35261	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35262		return nil, err
35263	}
35264	return ret, nil
35265	// {
35266	//   "description": "Retrieves an aggregated list of target pools.",
35267	//   "httpMethod": "GET",
35268	//   "id": "compute.targetPools.aggregatedList",
35269	//   "parameterOrder": [
35270	//     "project"
35271	//   ],
35272	//   "parameters": {
35273	//     "filter": {
35274	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
35275	//       "location": "query",
35276	//       "type": "string"
35277	//     },
35278	//     "maxResults": {
35279	//       "default": "500",
35280	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
35281	//       "format": "uint32",
35282	//       "location": "query",
35283	//       "maximum": "500",
35284	//       "minimum": "0",
35285	//       "type": "integer"
35286	//     },
35287	//     "pageToken": {
35288	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
35289	//       "location": "query",
35290	//       "type": "string"
35291	//     },
35292	//     "project": {
35293	//       "description": "Project ID for this request.",
35294	//       "location": "path",
35295	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35296	//       "required": true,
35297	//       "type": "string"
35298	//     }
35299	//   },
35300	//   "path": "{project}/aggregated/targetPools",
35301	//   "response": {
35302	//     "$ref": "TargetPoolAggregatedList"
35303	//   },
35304	//   "scopes": [
35305	//     "https://www.googleapis.com/auth/cloud-platform",
35306	//     "https://www.googleapis.com/auth/compute",
35307	//     "https://www.googleapis.com/auth/compute.readonly"
35308	//   ]
35309	// }
35310
35311}
35312
35313// Pages invokes f for each page of results.
35314// A non-nil error returned from f will halt the iteration.
35315// The provided context supersedes any context provided to the Context method.
35316func (c *TargetPoolsAggregatedListCall) Pages(ctx context.Context, f func(*TargetPoolAggregatedList) error) error {
35317	c.ctx_ = ctx
35318	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35319	for {
35320		x, err := c.Do()
35321		if err != nil {
35322			return err
35323		}
35324		if err := f(x); err != nil {
35325			return err
35326		}
35327		if x.NextPageToken == "" {
35328			return nil
35329		}
35330		c.PageToken(x.NextPageToken)
35331	}
35332}
35333
35334// method id "compute.targetPools.delete":
35335
35336type TargetPoolsDeleteCall struct {
35337	s          *Service
35338	project    string
35339	region     string
35340	targetPool string
35341	urlParams_ gensupport.URLParams
35342	ctx_       context.Context
35343}
35344
35345// Delete: Deletes the specified target pool.
35346// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete
35347func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall {
35348	c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35349	c.project = project
35350	c.region = region
35351	c.targetPool = targetPool
35352	return c
35353}
35354
35355// Fields allows partial responses to be retrieved. See
35356// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35357// for more information.
35358func (c *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall {
35359	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35360	return c
35361}
35362
35363// Context sets the context to be used in this call's Do method. Any
35364// pending HTTP request will be aborted if the provided context is
35365// canceled.
35366func (c *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall {
35367	c.ctx_ = ctx
35368	return c
35369}
35370
35371func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
35372	var body io.Reader = nil
35373	c.urlParams_.Set("alt", alt)
35374	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}")
35375	urls += "?" + c.urlParams_.Encode()
35376	req, _ := http.NewRequest("DELETE", urls, body)
35377	googleapi.Expand(req.URL, map[string]string{
35378		"project":    c.project,
35379		"region":     c.region,
35380		"targetPool": c.targetPool,
35381	})
35382	req.Header.Set("User-Agent", c.s.userAgent())
35383	if c.ctx_ != nil {
35384		return ctxhttp.Do(c.ctx_, c.s.client, req)
35385	}
35386	return c.s.client.Do(req)
35387}
35388
35389// Do executes the "compute.targetPools.delete" call.
35390// Exactly one of *Operation or error will be non-nil. Any non-2xx
35391// status code is an error. Response headers are in either
35392// *Operation.ServerResponse.Header or (if a response was returned at
35393// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35394// to check whether the returned error was because
35395// http.StatusNotModified was returned.
35396func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35397	gensupport.SetOptions(c.urlParams_, opts...)
35398	res, err := c.doRequest("json")
35399	if res != nil && res.StatusCode == http.StatusNotModified {
35400		if res.Body != nil {
35401			res.Body.Close()
35402		}
35403		return nil, &googleapi.Error{
35404			Code:   res.StatusCode,
35405			Header: res.Header,
35406		}
35407	}
35408	if err != nil {
35409		return nil, err
35410	}
35411	defer googleapi.CloseBody(res)
35412	if err := googleapi.CheckResponse(res); err != nil {
35413		return nil, err
35414	}
35415	ret := &Operation{
35416		ServerResponse: googleapi.ServerResponse{
35417			Header:         res.Header,
35418			HTTPStatusCode: res.StatusCode,
35419		},
35420	}
35421	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35422		return nil, err
35423	}
35424	return ret, nil
35425	// {
35426	//   "description": "Deletes the specified target pool.",
35427	//   "httpMethod": "DELETE",
35428	//   "id": "compute.targetPools.delete",
35429	//   "parameterOrder": [
35430	//     "project",
35431	//     "region",
35432	//     "targetPool"
35433	//   ],
35434	//   "parameters": {
35435	//     "project": {
35436	//       "description": "Project ID for this request.",
35437	//       "location": "path",
35438	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35439	//       "required": true,
35440	//       "type": "string"
35441	//     },
35442	//     "region": {
35443	//       "description": "Name of the region scoping this request.",
35444	//       "location": "path",
35445	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35446	//       "required": true,
35447	//       "type": "string"
35448	//     },
35449	//     "targetPool": {
35450	//       "description": "Name of the TargetPool resource to delete.",
35451	//       "location": "path",
35452	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35453	//       "required": true,
35454	//       "type": "string"
35455	//     }
35456	//   },
35457	//   "path": "{project}/regions/{region}/targetPools/{targetPool}",
35458	//   "response": {
35459	//     "$ref": "Operation"
35460	//   },
35461	//   "scopes": [
35462	//     "https://www.googleapis.com/auth/cloud-platform",
35463	//     "https://www.googleapis.com/auth/compute"
35464	//   ]
35465	// }
35466
35467}
35468
35469// method id "compute.targetPools.get":
35470
35471type TargetPoolsGetCall struct {
35472	s            *Service
35473	project      string
35474	region       string
35475	targetPool   string
35476	urlParams_   gensupport.URLParams
35477	ifNoneMatch_ string
35478	ctx_         context.Context
35479}
35480
35481// Get: Returns the specified target pool. Get a list of available
35482// target pools by making a list() request.
35483// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get
35484func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall {
35485	c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35486	c.project = project
35487	c.region = region
35488	c.targetPool = targetPool
35489	return c
35490}
35491
35492// Fields allows partial responses to be retrieved. See
35493// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35494// for more information.
35495func (c *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall {
35496	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35497	return c
35498}
35499
35500// IfNoneMatch sets the optional parameter which makes the operation
35501// fail if the object's ETag matches the given value. This is useful for
35502// getting updates only after the object has changed since the last
35503// request. Use googleapi.IsNotModified to check whether the response
35504// error from Do is the result of In-None-Match.
35505func (c *TargetPoolsGetCall) IfNoneMatch(entityTag string) *TargetPoolsGetCall {
35506	c.ifNoneMatch_ = entityTag
35507	return c
35508}
35509
35510// Context sets the context to be used in this call's Do method. Any
35511// pending HTTP request will be aborted if the provided context is
35512// canceled.
35513func (c *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall {
35514	c.ctx_ = ctx
35515	return c
35516}
35517
35518func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) {
35519	var body io.Reader = nil
35520	c.urlParams_.Set("alt", alt)
35521	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}")
35522	urls += "?" + c.urlParams_.Encode()
35523	req, _ := http.NewRequest("GET", urls, body)
35524	googleapi.Expand(req.URL, map[string]string{
35525		"project":    c.project,
35526		"region":     c.region,
35527		"targetPool": c.targetPool,
35528	})
35529	req.Header.Set("User-Agent", c.s.userAgent())
35530	if c.ifNoneMatch_ != "" {
35531		req.Header.Set("If-None-Match", c.ifNoneMatch_)
35532	}
35533	if c.ctx_ != nil {
35534		return ctxhttp.Do(c.ctx_, c.s.client, req)
35535	}
35536	return c.s.client.Do(req)
35537}
35538
35539// Do executes the "compute.targetPools.get" call.
35540// Exactly one of *TargetPool or error will be non-nil. Any non-2xx
35541// status code is an error. Response headers are in either
35542// *TargetPool.ServerResponse.Header or (if a response was returned at
35543// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35544// to check whether the returned error was because
35545// http.StatusNotModified was returned.
35546func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, error) {
35547	gensupport.SetOptions(c.urlParams_, opts...)
35548	res, err := c.doRequest("json")
35549	if res != nil && res.StatusCode == http.StatusNotModified {
35550		if res.Body != nil {
35551			res.Body.Close()
35552		}
35553		return nil, &googleapi.Error{
35554			Code:   res.StatusCode,
35555			Header: res.Header,
35556		}
35557	}
35558	if err != nil {
35559		return nil, err
35560	}
35561	defer googleapi.CloseBody(res)
35562	if err := googleapi.CheckResponse(res); err != nil {
35563		return nil, err
35564	}
35565	ret := &TargetPool{
35566		ServerResponse: googleapi.ServerResponse{
35567			Header:         res.Header,
35568			HTTPStatusCode: res.StatusCode,
35569		},
35570	}
35571	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35572		return nil, err
35573	}
35574	return ret, nil
35575	// {
35576	//   "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.",
35577	//   "httpMethod": "GET",
35578	//   "id": "compute.targetPools.get",
35579	//   "parameterOrder": [
35580	//     "project",
35581	//     "region",
35582	//     "targetPool"
35583	//   ],
35584	//   "parameters": {
35585	//     "project": {
35586	//       "description": "Project ID for this request.",
35587	//       "location": "path",
35588	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35589	//       "required": true,
35590	//       "type": "string"
35591	//     },
35592	//     "region": {
35593	//       "description": "Name of the region scoping this request.",
35594	//       "location": "path",
35595	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35596	//       "required": true,
35597	//       "type": "string"
35598	//     },
35599	//     "targetPool": {
35600	//       "description": "Name of the TargetPool resource to return.",
35601	//       "location": "path",
35602	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35603	//       "required": true,
35604	//       "type": "string"
35605	//     }
35606	//   },
35607	//   "path": "{project}/regions/{region}/targetPools/{targetPool}",
35608	//   "response": {
35609	//     "$ref": "TargetPool"
35610	//   },
35611	//   "scopes": [
35612	//     "https://www.googleapis.com/auth/cloud-platform",
35613	//     "https://www.googleapis.com/auth/compute",
35614	//     "https://www.googleapis.com/auth/compute.readonly"
35615	//   ]
35616	// }
35617
35618}
35619
35620// method id "compute.targetPools.getHealth":
35621
35622type TargetPoolsGetHealthCall struct {
35623	s                 *Service
35624	project           string
35625	region            string
35626	targetPool        string
35627	instancereference *InstanceReference
35628	urlParams_        gensupport.URLParams
35629	ctx_              context.Context
35630}
35631
35632// GetHealth: Gets the most recent health check results for each IP for
35633// the instance that is referenced by the given target pool.
35634// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth
35635func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall {
35636	c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35637	c.project = project
35638	c.region = region
35639	c.targetPool = targetPool
35640	c.instancereference = instancereference
35641	return c
35642}
35643
35644// Fields allows partial responses to be retrieved. See
35645// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35646// for more information.
35647func (c *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall {
35648	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35649	return c
35650}
35651
35652// Context sets the context to be used in this call's Do method. Any
35653// pending HTTP request will be aborted if the provided context is
35654// canceled.
35655func (c *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall {
35656	c.ctx_ = ctx
35657	return c
35658}
35659
35660func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) {
35661	var body io.Reader = nil
35662	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference)
35663	if err != nil {
35664		return nil, err
35665	}
35666	ctype := "application/json"
35667	c.urlParams_.Set("alt", alt)
35668	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth")
35669	urls += "?" + c.urlParams_.Encode()
35670	req, _ := http.NewRequest("POST", urls, body)
35671	googleapi.Expand(req.URL, map[string]string{
35672		"project":    c.project,
35673		"region":     c.region,
35674		"targetPool": c.targetPool,
35675	})
35676	req.Header.Set("Content-Type", ctype)
35677	req.Header.Set("User-Agent", c.s.userAgent())
35678	if c.ctx_ != nil {
35679		return ctxhttp.Do(c.ctx_, c.s.client, req)
35680	}
35681	return c.s.client.Do(req)
35682}
35683
35684// Do executes the "compute.targetPools.getHealth" call.
35685// Exactly one of *TargetPoolInstanceHealth or error will be non-nil.
35686// Any non-2xx status code is an error. Response headers are in either
35687// *TargetPoolInstanceHealth.ServerResponse.Header or (if a response was
35688// returned at all) in error.(*googleapi.Error).Header. Use
35689// googleapi.IsNotModified to check whether the returned error was
35690// because http.StatusNotModified was returned.
35691func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPoolInstanceHealth, error) {
35692	gensupport.SetOptions(c.urlParams_, opts...)
35693	res, err := c.doRequest("json")
35694	if res != nil && res.StatusCode == http.StatusNotModified {
35695		if res.Body != nil {
35696			res.Body.Close()
35697		}
35698		return nil, &googleapi.Error{
35699			Code:   res.StatusCode,
35700			Header: res.Header,
35701		}
35702	}
35703	if err != nil {
35704		return nil, err
35705	}
35706	defer googleapi.CloseBody(res)
35707	if err := googleapi.CheckResponse(res); err != nil {
35708		return nil, err
35709	}
35710	ret := &TargetPoolInstanceHealth{
35711		ServerResponse: googleapi.ServerResponse{
35712			Header:         res.Header,
35713			HTTPStatusCode: res.StatusCode,
35714		},
35715	}
35716	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35717		return nil, err
35718	}
35719	return ret, nil
35720	// {
35721	//   "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.",
35722	//   "httpMethod": "POST",
35723	//   "id": "compute.targetPools.getHealth",
35724	//   "parameterOrder": [
35725	//     "project",
35726	//     "region",
35727	//     "targetPool"
35728	//   ],
35729	//   "parameters": {
35730	//     "project": {
35731	//       "description": "Project ID for this request.",
35732	//       "location": "path",
35733	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35734	//       "required": true,
35735	//       "type": "string"
35736	//     },
35737	//     "region": {
35738	//       "description": "Name of the region scoping this request.",
35739	//       "location": "path",
35740	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35741	//       "required": true,
35742	//       "type": "string"
35743	//     },
35744	//     "targetPool": {
35745	//       "description": "Name of the TargetPool resource to which the queried instance belongs.",
35746	//       "location": "path",
35747	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35748	//       "required": true,
35749	//       "type": "string"
35750	//     }
35751	//   },
35752	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth",
35753	//   "request": {
35754	//     "$ref": "InstanceReference"
35755	//   },
35756	//   "response": {
35757	//     "$ref": "TargetPoolInstanceHealth"
35758	//   },
35759	//   "scopes": [
35760	//     "https://www.googleapis.com/auth/cloud-platform",
35761	//     "https://www.googleapis.com/auth/compute",
35762	//     "https://www.googleapis.com/auth/compute.readonly"
35763	//   ]
35764	// }
35765
35766}
35767
35768// method id "compute.targetPools.insert":
35769
35770type TargetPoolsInsertCall struct {
35771	s          *Service
35772	project    string
35773	region     string
35774	targetpool *TargetPool
35775	urlParams_ gensupport.URLParams
35776	ctx_       context.Context
35777}
35778
35779// Insert: Creates a target pool in the specified project and region
35780// using the data included in the request.
35781// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert
35782func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall {
35783	c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35784	c.project = project
35785	c.region = region
35786	c.targetpool = targetpool
35787	return c
35788}
35789
35790// Fields allows partial responses to be retrieved. See
35791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35792// for more information.
35793func (c *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall {
35794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35795	return c
35796}
35797
35798// Context sets the context to be used in this call's Do method. Any
35799// pending HTTP request will be aborted if the provided context is
35800// canceled.
35801func (c *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall {
35802	c.ctx_ = ctx
35803	return c
35804}
35805
35806func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) {
35807	var body io.Reader = nil
35808	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool)
35809	if err != nil {
35810		return nil, err
35811	}
35812	ctype := "application/json"
35813	c.urlParams_.Set("alt", alt)
35814	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools")
35815	urls += "?" + c.urlParams_.Encode()
35816	req, _ := http.NewRequest("POST", urls, body)
35817	googleapi.Expand(req.URL, map[string]string{
35818		"project": c.project,
35819		"region":  c.region,
35820	})
35821	req.Header.Set("Content-Type", ctype)
35822	req.Header.Set("User-Agent", c.s.userAgent())
35823	if c.ctx_ != nil {
35824		return ctxhttp.Do(c.ctx_, c.s.client, req)
35825	}
35826	return c.s.client.Do(req)
35827}
35828
35829// Do executes the "compute.targetPools.insert" call.
35830// Exactly one of *Operation or error will be non-nil. Any non-2xx
35831// status code is an error. Response headers are in either
35832// *Operation.ServerResponse.Header or (if a response was returned at
35833// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35834// to check whether the returned error was because
35835// http.StatusNotModified was returned.
35836func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35837	gensupport.SetOptions(c.urlParams_, opts...)
35838	res, err := c.doRequest("json")
35839	if res != nil && res.StatusCode == http.StatusNotModified {
35840		if res.Body != nil {
35841			res.Body.Close()
35842		}
35843		return nil, &googleapi.Error{
35844			Code:   res.StatusCode,
35845			Header: res.Header,
35846		}
35847	}
35848	if err != nil {
35849		return nil, err
35850	}
35851	defer googleapi.CloseBody(res)
35852	if err := googleapi.CheckResponse(res); err != nil {
35853		return nil, err
35854	}
35855	ret := &Operation{
35856		ServerResponse: googleapi.ServerResponse{
35857			Header:         res.Header,
35858			HTTPStatusCode: res.StatusCode,
35859		},
35860	}
35861	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35862		return nil, err
35863	}
35864	return ret, nil
35865	// {
35866	//   "description": "Creates a target pool in the specified project and region using the data included in the request.",
35867	//   "httpMethod": "POST",
35868	//   "id": "compute.targetPools.insert",
35869	//   "parameterOrder": [
35870	//     "project",
35871	//     "region"
35872	//   ],
35873	//   "parameters": {
35874	//     "project": {
35875	//       "description": "Project ID for this request.",
35876	//       "location": "path",
35877	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35878	//       "required": true,
35879	//       "type": "string"
35880	//     },
35881	//     "region": {
35882	//       "description": "Name of the region scoping this request.",
35883	//       "location": "path",
35884	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35885	//       "required": true,
35886	//       "type": "string"
35887	//     }
35888	//   },
35889	//   "path": "{project}/regions/{region}/targetPools",
35890	//   "request": {
35891	//     "$ref": "TargetPool"
35892	//   },
35893	//   "response": {
35894	//     "$ref": "Operation"
35895	//   },
35896	//   "scopes": [
35897	//     "https://www.googleapis.com/auth/cloud-platform",
35898	//     "https://www.googleapis.com/auth/compute"
35899	//   ]
35900	// }
35901
35902}
35903
35904// method id "compute.targetPools.list":
35905
35906type TargetPoolsListCall struct {
35907	s            *Service
35908	project      string
35909	region       string
35910	urlParams_   gensupport.URLParams
35911	ifNoneMatch_ string
35912	ctx_         context.Context
35913}
35914
35915// List: Retrieves a list of target pools available to the specified
35916// project and region.
35917// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list
35918func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall {
35919	c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35920	c.project = project
35921	c.region = region
35922	return c
35923}
35924
35925// Filter sets the optional parameter "filter": Sets a filter expression
35926// for filtering listed resources, in the form filter={expression}. Your
35927// {expression} must be in the format: field_name comparison_string
35928// literal_string.
35929//
35930// The field_name is the name of the field you want to compare. Only
35931// atomic field types are supported (string, number, boolean). The
35932// comparison_string must be either eq (equals) or ne (not equals). The
35933// literal_string is the string value to filter to. The literal value
35934// must be valid for the type of field you are filtering by (string,
35935// number, boolean). For string fields, the literal value is interpreted
35936// as a regular expression using RE2 syntax. The literal value must
35937// match the entire field.
35938//
35939// For example, to filter for instances that do not have a name of
35940// example-instance, you would use filter=name ne
35941// example-instance.
35942//
35943// Compute Engine Beta API Only: If you use filtering in the Beta API,
35944// you can also filter on nested fields. For example, you could filter
35945// on instances that have set the scheduling.automaticRestart field to
35946// true. In particular, use filtering on nested fields to take advantage
35947// of instance labels to organize and filter results based on label
35948// values.
35949//
35950// The Beta API also supports filtering on multiple expressions by
35951// providing each separate expression within parentheses. For example,
35952// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
35953// Multiple expressions are treated as AND expressions, meaning that
35954// resources must match all expressions to pass the filters.
35955func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall {
35956	c.urlParams_.Set("filter", filter)
35957	return c
35958}
35959
35960// MaxResults sets the optional parameter "maxResults": The maximum
35961// number of results per page that should be returned. If the number of
35962// available results is larger than maxResults, Compute Engine returns a
35963// nextPageToken that can be used to get the next page of results in
35964// subsequent list requests.
35965func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall {
35966	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35967	return c
35968}
35969
35970// PageToken sets the optional parameter "pageToken": Specifies a page
35971// token to use. Set pageToken to the nextPageToken returned by a
35972// previous list request to get the next page of results.
35973func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall {
35974	c.urlParams_.Set("pageToken", pageToken)
35975	return c
35976}
35977
35978// Fields allows partial responses to be retrieved. See
35979// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35980// for more information.
35981func (c *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall {
35982	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35983	return c
35984}
35985
35986// IfNoneMatch sets the optional parameter which makes the operation
35987// fail if the object's ETag matches the given value. This is useful for
35988// getting updates only after the object has changed since the last
35989// request. Use googleapi.IsNotModified to check whether the response
35990// error from Do is the result of In-None-Match.
35991func (c *TargetPoolsListCall) IfNoneMatch(entityTag string) *TargetPoolsListCall {
35992	c.ifNoneMatch_ = entityTag
35993	return c
35994}
35995
35996// Context sets the context to be used in this call's Do method. Any
35997// pending HTTP request will be aborted if the provided context is
35998// canceled.
35999func (c *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall {
36000	c.ctx_ = ctx
36001	return c
36002}
36003
36004func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) {
36005	var body io.Reader = nil
36006	c.urlParams_.Set("alt", alt)
36007	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools")
36008	urls += "?" + c.urlParams_.Encode()
36009	req, _ := http.NewRequest("GET", urls, body)
36010	googleapi.Expand(req.URL, map[string]string{
36011		"project": c.project,
36012		"region":  c.region,
36013	})
36014	req.Header.Set("User-Agent", c.s.userAgent())
36015	if c.ifNoneMatch_ != "" {
36016		req.Header.Set("If-None-Match", c.ifNoneMatch_)
36017	}
36018	if c.ctx_ != nil {
36019		return ctxhttp.Do(c.ctx_, c.s.client, req)
36020	}
36021	return c.s.client.Do(req)
36022}
36023
36024// Do executes the "compute.targetPools.list" call.
36025// Exactly one of *TargetPoolList or error will be non-nil. Any non-2xx
36026// status code is an error. Response headers are in either
36027// *TargetPoolList.ServerResponse.Header or (if a response was returned
36028// at all) in error.(*googleapi.Error).Header. Use
36029// googleapi.IsNotModified to check whether the returned error was
36030// because http.StatusNotModified was returned.
36031func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, error) {
36032	gensupport.SetOptions(c.urlParams_, opts...)
36033	res, err := c.doRequest("json")
36034	if res != nil && res.StatusCode == http.StatusNotModified {
36035		if res.Body != nil {
36036			res.Body.Close()
36037		}
36038		return nil, &googleapi.Error{
36039			Code:   res.StatusCode,
36040			Header: res.Header,
36041		}
36042	}
36043	if err != nil {
36044		return nil, err
36045	}
36046	defer googleapi.CloseBody(res)
36047	if err := googleapi.CheckResponse(res); err != nil {
36048		return nil, err
36049	}
36050	ret := &TargetPoolList{
36051		ServerResponse: googleapi.ServerResponse{
36052			Header:         res.Header,
36053			HTTPStatusCode: res.StatusCode,
36054		},
36055	}
36056	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36057		return nil, err
36058	}
36059	return ret, nil
36060	// {
36061	//   "description": "Retrieves a list of target pools available to the specified project and region.",
36062	//   "httpMethod": "GET",
36063	//   "id": "compute.targetPools.list",
36064	//   "parameterOrder": [
36065	//     "project",
36066	//     "region"
36067	//   ],
36068	//   "parameters": {
36069	//     "filter": {
36070	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
36071	//       "location": "query",
36072	//       "type": "string"
36073	//     },
36074	//     "maxResults": {
36075	//       "default": "500",
36076	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
36077	//       "format": "uint32",
36078	//       "location": "query",
36079	//       "maximum": "500",
36080	//       "minimum": "0",
36081	//       "type": "integer"
36082	//     },
36083	//     "pageToken": {
36084	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
36085	//       "location": "query",
36086	//       "type": "string"
36087	//     },
36088	//     "project": {
36089	//       "description": "Project ID for this request.",
36090	//       "location": "path",
36091	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36092	//       "required": true,
36093	//       "type": "string"
36094	//     },
36095	//     "region": {
36096	//       "description": "Name of the region scoping this request.",
36097	//       "location": "path",
36098	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36099	//       "required": true,
36100	//       "type": "string"
36101	//     }
36102	//   },
36103	//   "path": "{project}/regions/{region}/targetPools",
36104	//   "response": {
36105	//     "$ref": "TargetPoolList"
36106	//   },
36107	//   "scopes": [
36108	//     "https://www.googleapis.com/auth/cloud-platform",
36109	//     "https://www.googleapis.com/auth/compute",
36110	//     "https://www.googleapis.com/auth/compute.readonly"
36111	//   ]
36112	// }
36113
36114}
36115
36116// Pages invokes f for each page of results.
36117// A non-nil error returned from f will halt the iteration.
36118// The provided context supersedes any context provided to the Context method.
36119func (c *TargetPoolsListCall) Pages(ctx context.Context, f func(*TargetPoolList) error) error {
36120	c.ctx_ = ctx
36121	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
36122	for {
36123		x, err := c.Do()
36124		if err != nil {
36125			return err
36126		}
36127		if err := f(x); err != nil {
36128			return err
36129		}
36130		if x.NextPageToken == "" {
36131			return nil
36132		}
36133		c.PageToken(x.NextPageToken)
36134	}
36135}
36136
36137// method id "compute.targetPools.removeHealthCheck":
36138
36139type TargetPoolsRemoveHealthCheckCall struct {
36140	s                                   *Service
36141	project                             string
36142	region                              string
36143	targetPool                          string
36144	targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest
36145	urlParams_                          gensupport.URLParams
36146	ctx_                                context.Context
36147}
36148
36149// RemoveHealthCheck: Removes health check URL from a target pool.
36150// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck
36151func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall {
36152	c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36153	c.project = project
36154	c.region = region
36155	c.targetPool = targetPool
36156	c.targetpoolsremovehealthcheckrequest = targetpoolsremovehealthcheckrequest
36157	return c
36158}
36159
36160// Fields allows partial responses to be retrieved. See
36161// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36162// for more information.
36163func (c *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall {
36164	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36165	return c
36166}
36167
36168// Context sets the context to be used in this call's Do method. Any
36169// pending HTTP request will be aborted if the provided context is
36170// canceled.
36171func (c *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall {
36172	c.ctx_ = ctx
36173	return c
36174}
36175
36176func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) {
36177	var body io.Reader = nil
36178	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest)
36179	if err != nil {
36180		return nil, err
36181	}
36182	ctype := "application/json"
36183	c.urlParams_.Set("alt", alt)
36184	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck")
36185	urls += "?" + c.urlParams_.Encode()
36186	req, _ := http.NewRequest("POST", urls, body)
36187	googleapi.Expand(req.URL, map[string]string{
36188		"project":    c.project,
36189		"region":     c.region,
36190		"targetPool": c.targetPool,
36191	})
36192	req.Header.Set("Content-Type", ctype)
36193	req.Header.Set("User-Agent", c.s.userAgent())
36194	if c.ctx_ != nil {
36195		return ctxhttp.Do(c.ctx_, c.s.client, req)
36196	}
36197	return c.s.client.Do(req)
36198}
36199
36200// Do executes the "compute.targetPools.removeHealthCheck" call.
36201// Exactly one of *Operation or error will be non-nil. Any non-2xx
36202// status code is an error. Response headers are in either
36203// *Operation.ServerResponse.Header or (if a response was returned at
36204// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36205// to check whether the returned error was because
36206// http.StatusNotModified was returned.
36207func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36208	gensupport.SetOptions(c.urlParams_, opts...)
36209	res, err := c.doRequest("json")
36210	if res != nil && res.StatusCode == http.StatusNotModified {
36211		if res.Body != nil {
36212			res.Body.Close()
36213		}
36214		return nil, &googleapi.Error{
36215			Code:   res.StatusCode,
36216			Header: res.Header,
36217		}
36218	}
36219	if err != nil {
36220		return nil, err
36221	}
36222	defer googleapi.CloseBody(res)
36223	if err := googleapi.CheckResponse(res); err != nil {
36224		return nil, err
36225	}
36226	ret := &Operation{
36227		ServerResponse: googleapi.ServerResponse{
36228			Header:         res.Header,
36229			HTTPStatusCode: res.StatusCode,
36230		},
36231	}
36232	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36233		return nil, err
36234	}
36235	return ret, nil
36236	// {
36237	//   "description": "Removes health check URL from a target pool.",
36238	//   "httpMethod": "POST",
36239	//   "id": "compute.targetPools.removeHealthCheck",
36240	//   "parameterOrder": [
36241	//     "project",
36242	//     "region",
36243	//     "targetPool"
36244	//   ],
36245	//   "parameters": {
36246	//     "project": {
36247	//       "description": "Project ID for this request.",
36248	//       "location": "path",
36249	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36250	//       "required": true,
36251	//       "type": "string"
36252	//     },
36253	//     "region": {
36254	//       "description": "Name of the region for this request.",
36255	//       "location": "path",
36256	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36257	//       "required": true,
36258	//       "type": "string"
36259	//     },
36260	//     "targetPool": {
36261	//       "description": "Name of the target pool to remove health checks from.",
36262	//       "location": "path",
36263	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36264	//       "required": true,
36265	//       "type": "string"
36266	//     }
36267	//   },
36268	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck",
36269	//   "request": {
36270	//     "$ref": "TargetPoolsRemoveHealthCheckRequest"
36271	//   },
36272	//   "response": {
36273	//     "$ref": "Operation"
36274	//   },
36275	//   "scopes": [
36276	//     "https://www.googleapis.com/auth/cloud-platform",
36277	//     "https://www.googleapis.com/auth/compute"
36278	//   ]
36279	// }
36280
36281}
36282
36283// method id "compute.targetPools.removeInstance":
36284
36285type TargetPoolsRemoveInstanceCall struct {
36286	s                                *Service
36287	project                          string
36288	region                           string
36289	targetPool                       string
36290	targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest
36291	urlParams_                       gensupport.URLParams
36292	ctx_                             context.Context
36293}
36294
36295// RemoveInstance: Removes instance URL from a target pool.
36296// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance
36297func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall {
36298	c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36299	c.project = project
36300	c.region = region
36301	c.targetPool = targetPool
36302	c.targetpoolsremoveinstancerequest = targetpoolsremoveinstancerequest
36303	return c
36304}
36305
36306// Fields allows partial responses to be retrieved. See
36307// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36308// for more information.
36309func (c *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall {
36310	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36311	return c
36312}
36313
36314// Context sets the context to be used in this call's Do method. Any
36315// pending HTTP request will be aborted if the provided context is
36316// canceled.
36317func (c *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall {
36318	c.ctx_ = ctx
36319	return c
36320}
36321
36322func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) {
36323	var body io.Reader = nil
36324	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest)
36325	if err != nil {
36326		return nil, err
36327	}
36328	ctype := "application/json"
36329	c.urlParams_.Set("alt", alt)
36330	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance")
36331	urls += "?" + c.urlParams_.Encode()
36332	req, _ := http.NewRequest("POST", urls, body)
36333	googleapi.Expand(req.URL, map[string]string{
36334		"project":    c.project,
36335		"region":     c.region,
36336		"targetPool": c.targetPool,
36337	})
36338	req.Header.Set("Content-Type", ctype)
36339	req.Header.Set("User-Agent", c.s.userAgent())
36340	if c.ctx_ != nil {
36341		return ctxhttp.Do(c.ctx_, c.s.client, req)
36342	}
36343	return c.s.client.Do(req)
36344}
36345
36346// Do executes the "compute.targetPools.removeInstance" call.
36347// Exactly one of *Operation or error will be non-nil. Any non-2xx
36348// status code is an error. Response headers are in either
36349// *Operation.ServerResponse.Header or (if a response was returned at
36350// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36351// to check whether the returned error was because
36352// http.StatusNotModified was returned.
36353func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36354	gensupport.SetOptions(c.urlParams_, opts...)
36355	res, err := c.doRequest("json")
36356	if res != nil && res.StatusCode == http.StatusNotModified {
36357		if res.Body != nil {
36358			res.Body.Close()
36359		}
36360		return nil, &googleapi.Error{
36361			Code:   res.StatusCode,
36362			Header: res.Header,
36363		}
36364	}
36365	if err != nil {
36366		return nil, err
36367	}
36368	defer googleapi.CloseBody(res)
36369	if err := googleapi.CheckResponse(res); err != nil {
36370		return nil, err
36371	}
36372	ret := &Operation{
36373		ServerResponse: googleapi.ServerResponse{
36374			Header:         res.Header,
36375			HTTPStatusCode: res.StatusCode,
36376		},
36377	}
36378	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36379		return nil, err
36380	}
36381	return ret, nil
36382	// {
36383	//   "description": "Removes instance URL from a target pool.",
36384	//   "httpMethod": "POST",
36385	//   "id": "compute.targetPools.removeInstance",
36386	//   "parameterOrder": [
36387	//     "project",
36388	//     "region",
36389	//     "targetPool"
36390	//   ],
36391	//   "parameters": {
36392	//     "project": {
36393	//       "description": "Project ID for this request.",
36394	//       "location": "path",
36395	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36396	//       "required": true,
36397	//       "type": "string"
36398	//     },
36399	//     "region": {
36400	//       "description": "Name of the region scoping this request.",
36401	//       "location": "path",
36402	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36403	//       "required": true,
36404	//       "type": "string"
36405	//     },
36406	//     "targetPool": {
36407	//       "description": "Name of the TargetPool resource to remove instances from.",
36408	//       "location": "path",
36409	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36410	//       "required": true,
36411	//       "type": "string"
36412	//     }
36413	//   },
36414	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance",
36415	//   "request": {
36416	//     "$ref": "TargetPoolsRemoveInstanceRequest"
36417	//   },
36418	//   "response": {
36419	//     "$ref": "Operation"
36420	//   },
36421	//   "scopes": [
36422	//     "https://www.googleapis.com/auth/cloud-platform",
36423	//     "https://www.googleapis.com/auth/compute"
36424	//   ]
36425	// }
36426
36427}
36428
36429// method id "compute.targetPools.setBackup":
36430
36431type TargetPoolsSetBackupCall struct {
36432	s               *Service
36433	project         string
36434	region          string
36435	targetPool      string
36436	targetreference *TargetReference
36437	urlParams_      gensupport.URLParams
36438	ctx_            context.Context
36439}
36440
36441// SetBackup: Changes a backup target pool's configurations.
36442// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup
36443func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall {
36444	c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36445	c.project = project
36446	c.region = region
36447	c.targetPool = targetPool
36448	c.targetreference = targetreference
36449	return c
36450}
36451
36452// FailoverRatio sets the optional parameter "failoverRatio": New
36453// failoverRatio value for the target pool.
36454func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall {
36455	c.urlParams_.Set("failoverRatio", fmt.Sprint(failoverRatio))
36456	return c
36457}
36458
36459// Fields allows partial responses to be retrieved. See
36460// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36461// for more information.
36462func (c *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall {
36463	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36464	return c
36465}
36466
36467// Context sets the context to be used in this call's Do method. Any
36468// pending HTTP request will be aborted if the provided context is
36469// canceled.
36470func (c *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall {
36471	c.ctx_ = ctx
36472	return c
36473}
36474
36475func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) {
36476	var body io.Reader = nil
36477	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
36478	if err != nil {
36479		return nil, err
36480	}
36481	ctype := "application/json"
36482	c.urlParams_.Set("alt", alt)
36483	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup")
36484	urls += "?" + c.urlParams_.Encode()
36485	req, _ := http.NewRequest("POST", urls, body)
36486	googleapi.Expand(req.URL, map[string]string{
36487		"project":    c.project,
36488		"region":     c.region,
36489		"targetPool": c.targetPool,
36490	})
36491	req.Header.Set("Content-Type", ctype)
36492	req.Header.Set("User-Agent", c.s.userAgent())
36493	if c.ctx_ != nil {
36494		return ctxhttp.Do(c.ctx_, c.s.client, req)
36495	}
36496	return c.s.client.Do(req)
36497}
36498
36499// Do executes the "compute.targetPools.setBackup" call.
36500// Exactly one of *Operation or error will be non-nil. Any non-2xx
36501// status code is an error. Response headers are in either
36502// *Operation.ServerResponse.Header or (if a response was returned at
36503// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36504// to check whether the returned error was because
36505// http.StatusNotModified was returned.
36506func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36507	gensupport.SetOptions(c.urlParams_, opts...)
36508	res, err := c.doRequest("json")
36509	if res != nil && res.StatusCode == http.StatusNotModified {
36510		if res.Body != nil {
36511			res.Body.Close()
36512		}
36513		return nil, &googleapi.Error{
36514			Code:   res.StatusCode,
36515			Header: res.Header,
36516		}
36517	}
36518	if err != nil {
36519		return nil, err
36520	}
36521	defer googleapi.CloseBody(res)
36522	if err := googleapi.CheckResponse(res); err != nil {
36523		return nil, err
36524	}
36525	ret := &Operation{
36526		ServerResponse: googleapi.ServerResponse{
36527			Header:         res.Header,
36528			HTTPStatusCode: res.StatusCode,
36529		},
36530	}
36531	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36532		return nil, err
36533	}
36534	return ret, nil
36535	// {
36536	//   "description": "Changes a backup target pool's configurations.",
36537	//   "httpMethod": "POST",
36538	//   "id": "compute.targetPools.setBackup",
36539	//   "parameterOrder": [
36540	//     "project",
36541	//     "region",
36542	//     "targetPool"
36543	//   ],
36544	//   "parameters": {
36545	//     "failoverRatio": {
36546	//       "description": "New failoverRatio value for the target pool.",
36547	//       "format": "float",
36548	//       "location": "query",
36549	//       "type": "number"
36550	//     },
36551	//     "project": {
36552	//       "description": "Project ID for this request.",
36553	//       "location": "path",
36554	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36555	//       "required": true,
36556	//       "type": "string"
36557	//     },
36558	//     "region": {
36559	//       "description": "Name of the region scoping this request.",
36560	//       "location": "path",
36561	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36562	//       "required": true,
36563	//       "type": "string"
36564	//     },
36565	//     "targetPool": {
36566	//       "description": "Name of the TargetPool resource to set a backup pool for.",
36567	//       "location": "path",
36568	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36569	//       "required": true,
36570	//       "type": "string"
36571	//     }
36572	//   },
36573	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup",
36574	//   "request": {
36575	//     "$ref": "TargetReference"
36576	//   },
36577	//   "response": {
36578	//     "$ref": "Operation"
36579	//   },
36580	//   "scopes": [
36581	//     "https://www.googleapis.com/auth/cloud-platform",
36582	//     "https://www.googleapis.com/auth/compute"
36583	//   ]
36584	// }
36585
36586}
36587
36588// method id "compute.targetVpnGateways.aggregatedList":
36589
36590type TargetVpnGatewaysAggregatedListCall struct {
36591	s            *Service
36592	project      string
36593	urlParams_   gensupport.URLParams
36594	ifNoneMatch_ string
36595	ctx_         context.Context
36596}
36597
36598// AggregatedList: Retrieves an aggregated list of target VPN gateways.
36599func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall {
36600	c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36601	c.project = project
36602	return c
36603}
36604
36605// Filter sets the optional parameter "filter": Sets a filter expression
36606// for filtering listed resources, in the form filter={expression}. Your
36607// {expression} must be in the format: field_name comparison_string
36608// literal_string.
36609//
36610// The field_name is the name of the field you want to compare. Only
36611// atomic field types are supported (string, number, boolean). The
36612// comparison_string must be either eq (equals) or ne (not equals). The
36613// literal_string is the string value to filter to. The literal value
36614// must be valid for the type of field you are filtering by (string,
36615// number, boolean). For string fields, the literal value is interpreted
36616// as a regular expression using RE2 syntax. The literal value must
36617// match the entire field.
36618//
36619// For example, to filter for instances that do not have a name of
36620// example-instance, you would use filter=name ne
36621// example-instance.
36622//
36623// Compute Engine Beta API Only: If you use filtering in the Beta API,
36624// you can also filter on nested fields. For example, you could filter
36625// on instances that have set the scheduling.automaticRestart field to
36626// true. In particular, use filtering on nested fields to take advantage
36627// of instance labels to organize and filter results based on label
36628// values.
36629//
36630// The Beta API also supports filtering on multiple expressions by
36631// providing each separate expression within parentheses. For example,
36632// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
36633// Multiple expressions are treated as AND expressions, meaning that
36634// resources must match all expressions to pass the filters.
36635func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall {
36636	c.urlParams_.Set("filter", filter)
36637	return c
36638}
36639
36640// MaxResults sets the optional parameter "maxResults": The maximum
36641// number of results per page that should be returned. If the number of
36642// available results is larger than maxResults, Compute Engine returns a
36643// nextPageToken that can be used to get the next page of results in
36644// subsequent list requests.
36645func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall {
36646	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36647	return c
36648}
36649
36650// PageToken sets the optional parameter "pageToken": Specifies a page
36651// token to use. Set pageToken to the nextPageToken returned by a
36652// previous list request to get the next page of results.
36653func (c *TargetVpnGatewaysAggregatedListCall) PageToken(pageToken string) *TargetVpnGatewaysAggregatedListCall {
36654	c.urlParams_.Set("pageToken", pageToken)
36655	return c
36656}
36657
36658// Fields allows partial responses to be retrieved. See
36659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36660// for more information.
36661func (c *TargetVpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysAggregatedListCall {
36662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36663	return c
36664}
36665
36666// IfNoneMatch sets the optional parameter which makes the operation
36667// fail if the object's ETag matches the given value. This is useful for
36668// getting updates only after the object has changed since the last
36669// request. Use googleapi.IsNotModified to check whether the response
36670// error from Do is the result of In-None-Match.
36671func (c *TargetVpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysAggregatedListCall {
36672	c.ifNoneMatch_ = entityTag
36673	return c
36674}
36675
36676// Context sets the context to be used in this call's Do method. Any
36677// pending HTTP request will be aborted if the provided context is
36678// canceled.
36679func (c *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall {
36680	c.ctx_ = ctx
36681	return c
36682}
36683
36684func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) {
36685	var body io.Reader = nil
36686	c.urlParams_.Set("alt", alt)
36687	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetVpnGateways")
36688	urls += "?" + c.urlParams_.Encode()
36689	req, _ := http.NewRequest("GET", urls, body)
36690	googleapi.Expand(req.URL, map[string]string{
36691		"project": c.project,
36692	})
36693	req.Header.Set("User-Agent", c.s.userAgent())
36694	if c.ifNoneMatch_ != "" {
36695		req.Header.Set("If-None-Match", c.ifNoneMatch_)
36696	}
36697	if c.ctx_ != nil {
36698		return ctxhttp.Do(c.ctx_, c.s.client, req)
36699	}
36700	return c.s.client.Do(req)
36701}
36702
36703// Do executes the "compute.targetVpnGateways.aggregatedList" call.
36704// Exactly one of *TargetVpnGatewayAggregatedList or error will be
36705// non-nil. Any non-2xx status code is an error. Response headers are in
36706// either *TargetVpnGatewayAggregatedList.ServerResponse.Header or (if a
36707// response was returned at all) in error.(*googleapi.Error).Header. Use
36708// googleapi.IsNotModified to check whether the returned error was
36709// because http.StatusNotModified was returned.
36710func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayAggregatedList, error) {
36711	gensupport.SetOptions(c.urlParams_, opts...)
36712	res, err := c.doRequest("json")
36713	if res != nil && res.StatusCode == http.StatusNotModified {
36714		if res.Body != nil {
36715			res.Body.Close()
36716		}
36717		return nil, &googleapi.Error{
36718			Code:   res.StatusCode,
36719			Header: res.Header,
36720		}
36721	}
36722	if err != nil {
36723		return nil, err
36724	}
36725	defer googleapi.CloseBody(res)
36726	if err := googleapi.CheckResponse(res); err != nil {
36727		return nil, err
36728	}
36729	ret := &TargetVpnGatewayAggregatedList{
36730		ServerResponse: googleapi.ServerResponse{
36731			Header:         res.Header,
36732			HTTPStatusCode: res.StatusCode,
36733		},
36734	}
36735	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36736		return nil, err
36737	}
36738	return ret, nil
36739	// {
36740	//   "description": "Retrieves an aggregated list of target VPN gateways.",
36741	//   "httpMethod": "GET",
36742	//   "id": "compute.targetVpnGateways.aggregatedList",
36743	//   "parameterOrder": [
36744	//     "project"
36745	//   ],
36746	//   "parameters": {
36747	//     "filter": {
36748	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
36749	//       "location": "query",
36750	//       "type": "string"
36751	//     },
36752	//     "maxResults": {
36753	//       "default": "500",
36754	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
36755	//       "format": "uint32",
36756	//       "location": "query",
36757	//       "maximum": "500",
36758	//       "minimum": "0",
36759	//       "type": "integer"
36760	//     },
36761	//     "pageToken": {
36762	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
36763	//       "location": "query",
36764	//       "type": "string"
36765	//     },
36766	//     "project": {
36767	//       "description": "Project ID for this request.",
36768	//       "location": "path",
36769	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36770	//       "required": true,
36771	//       "type": "string"
36772	//     }
36773	//   },
36774	//   "path": "{project}/aggregated/targetVpnGateways",
36775	//   "response": {
36776	//     "$ref": "TargetVpnGatewayAggregatedList"
36777	//   },
36778	//   "scopes": [
36779	//     "https://www.googleapis.com/auth/cloud-platform",
36780	//     "https://www.googleapis.com/auth/compute",
36781	//     "https://www.googleapis.com/auth/compute.readonly"
36782	//   ]
36783	// }
36784
36785}
36786
36787// Pages invokes f for each page of results.
36788// A non-nil error returned from f will halt the iteration.
36789// The provided context supersedes any context provided to the Context method.
36790func (c *TargetVpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayAggregatedList) error) error {
36791	c.ctx_ = ctx
36792	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
36793	for {
36794		x, err := c.Do()
36795		if err != nil {
36796			return err
36797		}
36798		if err := f(x); err != nil {
36799			return err
36800		}
36801		if x.NextPageToken == "" {
36802			return nil
36803		}
36804		c.PageToken(x.NextPageToken)
36805	}
36806}
36807
36808// method id "compute.targetVpnGateways.delete":
36809
36810type TargetVpnGatewaysDeleteCall struct {
36811	s                *Service
36812	project          string
36813	region           string
36814	targetVpnGateway string
36815	urlParams_       gensupport.URLParams
36816	ctx_             context.Context
36817}
36818
36819// Delete: Deletes the specified target VPN gateway.
36820func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall {
36821	c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36822	c.project = project
36823	c.region = region
36824	c.targetVpnGateway = targetVpnGateway
36825	return c
36826}
36827
36828// Fields allows partial responses to be retrieved. See
36829// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36830// for more information.
36831func (c *TargetVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysDeleteCall {
36832	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36833	return c
36834}
36835
36836// Context sets the context to be used in this call's Do method. Any
36837// pending HTTP request will be aborted if the provided context is
36838// canceled.
36839func (c *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall {
36840	c.ctx_ = ctx
36841	return c
36842}
36843
36844func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
36845	var body io.Reader = nil
36846	c.urlParams_.Set("alt", alt)
36847	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}")
36848	urls += "?" + c.urlParams_.Encode()
36849	req, _ := http.NewRequest("DELETE", urls, body)
36850	googleapi.Expand(req.URL, map[string]string{
36851		"project":          c.project,
36852		"region":           c.region,
36853		"targetVpnGateway": c.targetVpnGateway,
36854	})
36855	req.Header.Set("User-Agent", c.s.userAgent())
36856	if c.ctx_ != nil {
36857		return ctxhttp.Do(c.ctx_, c.s.client, req)
36858	}
36859	return c.s.client.Do(req)
36860}
36861
36862// Do executes the "compute.targetVpnGateways.delete" call.
36863// Exactly one of *Operation or error will be non-nil. Any non-2xx
36864// status code is an error. Response headers are in either
36865// *Operation.ServerResponse.Header or (if a response was returned at
36866// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36867// to check whether the returned error was because
36868// http.StatusNotModified was returned.
36869func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36870	gensupport.SetOptions(c.urlParams_, opts...)
36871	res, err := c.doRequest("json")
36872	if res != nil && res.StatusCode == http.StatusNotModified {
36873		if res.Body != nil {
36874			res.Body.Close()
36875		}
36876		return nil, &googleapi.Error{
36877			Code:   res.StatusCode,
36878			Header: res.Header,
36879		}
36880	}
36881	if err != nil {
36882		return nil, err
36883	}
36884	defer googleapi.CloseBody(res)
36885	if err := googleapi.CheckResponse(res); err != nil {
36886		return nil, err
36887	}
36888	ret := &Operation{
36889		ServerResponse: googleapi.ServerResponse{
36890			Header:         res.Header,
36891			HTTPStatusCode: res.StatusCode,
36892		},
36893	}
36894	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36895		return nil, err
36896	}
36897	return ret, nil
36898	// {
36899	//   "description": "Deletes the specified target VPN gateway.",
36900	//   "httpMethod": "DELETE",
36901	//   "id": "compute.targetVpnGateways.delete",
36902	//   "parameterOrder": [
36903	//     "project",
36904	//     "region",
36905	//     "targetVpnGateway"
36906	//   ],
36907	//   "parameters": {
36908	//     "project": {
36909	//       "description": "Project ID for this request.",
36910	//       "location": "path",
36911	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36912	//       "required": true,
36913	//       "type": "string"
36914	//     },
36915	//     "region": {
36916	//       "description": "Name of the region for this request.",
36917	//       "location": "path",
36918	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36919	//       "required": true,
36920	//       "type": "string"
36921	//     },
36922	//     "targetVpnGateway": {
36923	//       "description": "Name of the target VPN gateway to delete.",
36924	//       "location": "path",
36925	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36926	//       "required": true,
36927	//       "type": "string"
36928	//     }
36929	//   },
36930	//   "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}",
36931	//   "response": {
36932	//     "$ref": "Operation"
36933	//   },
36934	//   "scopes": [
36935	//     "https://www.googleapis.com/auth/cloud-platform",
36936	//     "https://www.googleapis.com/auth/compute"
36937	//   ]
36938	// }
36939
36940}
36941
36942// method id "compute.targetVpnGateways.get":
36943
36944type TargetVpnGatewaysGetCall struct {
36945	s                *Service
36946	project          string
36947	region           string
36948	targetVpnGateway string
36949	urlParams_       gensupport.URLParams
36950	ifNoneMatch_     string
36951	ctx_             context.Context
36952}
36953
36954// Get: Returns the specified target VPN gateway. Get a list of
36955// available target VPN gateways by making a list() request.
36956func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall {
36957	c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36958	c.project = project
36959	c.region = region
36960	c.targetVpnGateway = targetVpnGateway
36961	return c
36962}
36963
36964// Fields allows partial responses to be retrieved. See
36965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36966// for more information.
36967func (c *TargetVpnGatewaysGetCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysGetCall {
36968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36969	return c
36970}
36971
36972// IfNoneMatch sets the optional parameter which makes the operation
36973// fail if the object's ETag matches the given value. This is useful for
36974// getting updates only after the object has changed since the last
36975// request. Use googleapi.IsNotModified to check whether the response
36976// error from Do is the result of In-None-Match.
36977func (c *TargetVpnGatewaysGetCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysGetCall {
36978	c.ifNoneMatch_ = entityTag
36979	return c
36980}
36981
36982// Context sets the context to be used in this call's Do method. Any
36983// pending HTTP request will be aborted if the provided context is
36984// canceled.
36985func (c *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall {
36986	c.ctx_ = ctx
36987	return c
36988}
36989
36990func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
36991	var body io.Reader = nil
36992	c.urlParams_.Set("alt", alt)
36993	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}")
36994	urls += "?" + c.urlParams_.Encode()
36995	req, _ := http.NewRequest("GET", urls, body)
36996	googleapi.Expand(req.URL, map[string]string{
36997		"project":          c.project,
36998		"region":           c.region,
36999		"targetVpnGateway": c.targetVpnGateway,
37000	})
37001	req.Header.Set("User-Agent", c.s.userAgent())
37002	if c.ifNoneMatch_ != "" {
37003		req.Header.Set("If-None-Match", c.ifNoneMatch_)
37004	}
37005	if c.ctx_ != nil {
37006		return ctxhttp.Do(c.ctx_, c.s.client, req)
37007	}
37008	return c.s.client.Do(req)
37009}
37010
37011// Do executes the "compute.targetVpnGateways.get" call.
37012// Exactly one of *TargetVpnGateway or error will be non-nil. Any
37013// non-2xx status code is an error. Response headers are in either
37014// *TargetVpnGateway.ServerResponse.Header or (if a response was
37015// returned at all) in error.(*googleapi.Error).Header. Use
37016// googleapi.IsNotModified to check whether the returned error was
37017// because http.StatusNotModified was returned.
37018func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnGateway, error) {
37019	gensupport.SetOptions(c.urlParams_, opts...)
37020	res, err := c.doRequest("json")
37021	if res != nil && res.StatusCode == http.StatusNotModified {
37022		if res.Body != nil {
37023			res.Body.Close()
37024		}
37025		return nil, &googleapi.Error{
37026			Code:   res.StatusCode,
37027			Header: res.Header,
37028		}
37029	}
37030	if err != nil {
37031		return nil, err
37032	}
37033	defer googleapi.CloseBody(res)
37034	if err := googleapi.CheckResponse(res); err != nil {
37035		return nil, err
37036	}
37037	ret := &TargetVpnGateway{
37038		ServerResponse: googleapi.ServerResponse{
37039			Header:         res.Header,
37040			HTTPStatusCode: res.StatusCode,
37041		},
37042	}
37043	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37044		return nil, err
37045	}
37046	return ret, nil
37047	// {
37048	//   "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.",
37049	//   "httpMethod": "GET",
37050	//   "id": "compute.targetVpnGateways.get",
37051	//   "parameterOrder": [
37052	//     "project",
37053	//     "region",
37054	//     "targetVpnGateway"
37055	//   ],
37056	//   "parameters": {
37057	//     "project": {
37058	//       "description": "Project ID for this request.",
37059	//       "location": "path",
37060	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37061	//       "required": true,
37062	//       "type": "string"
37063	//     },
37064	//     "region": {
37065	//       "description": "Name of the region for this request.",
37066	//       "location": "path",
37067	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
37068	//       "required": true,
37069	//       "type": "string"
37070	//     },
37071	//     "targetVpnGateway": {
37072	//       "description": "Name of the target VPN gateway to return.",
37073	//       "location": "path",
37074	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
37075	//       "required": true,
37076	//       "type": "string"
37077	//     }
37078	//   },
37079	//   "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}",
37080	//   "response": {
37081	//     "$ref": "TargetVpnGateway"
37082	//   },
37083	//   "scopes": [
37084	//     "https://www.googleapis.com/auth/cloud-platform",
37085	//     "https://www.googleapis.com/auth/compute",
37086	//     "https://www.googleapis.com/auth/compute.readonly"
37087	//   ]
37088	// }
37089
37090}
37091
37092// method id "compute.targetVpnGateways.insert":
37093
37094type TargetVpnGatewaysInsertCall struct {
37095	s                *Service
37096	project          string
37097	region           string
37098	targetvpngateway *TargetVpnGateway
37099	urlParams_       gensupport.URLParams
37100	ctx_             context.Context
37101}
37102
37103// Insert: Creates a target VPN gateway in the specified project and
37104// region using the data included in the request.
37105func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall {
37106	c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37107	c.project = project
37108	c.region = region
37109	c.targetvpngateway = targetvpngateway
37110	return c
37111}
37112
37113// Fields allows partial responses to be retrieved. See
37114// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37115// for more information.
37116func (c *TargetVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysInsertCall {
37117	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37118	return c
37119}
37120
37121// Context sets the context to be used in this call's Do method. Any
37122// pending HTTP request will be aborted if the provided context is
37123// canceled.
37124func (c *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall {
37125	c.ctx_ = ctx
37126	return c
37127}
37128
37129func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) {
37130	var body io.Reader = nil
37131	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetvpngateway)
37132	if err != nil {
37133		return nil, err
37134	}
37135	ctype := "application/json"
37136	c.urlParams_.Set("alt", alt)
37137	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways")
37138	urls += "?" + c.urlParams_.Encode()
37139	req, _ := http.NewRequest("POST", urls, body)
37140	googleapi.Expand(req.URL, map[string]string{
37141		"project": c.project,
37142		"region":  c.region,
37143	})
37144	req.Header.Set("Content-Type", ctype)
37145	req.Header.Set("User-Agent", c.s.userAgent())
37146	if c.ctx_ != nil {
37147		return ctxhttp.Do(c.ctx_, c.s.client, req)
37148	}
37149	return c.s.client.Do(req)
37150}
37151
37152// Do executes the "compute.targetVpnGateways.insert" call.
37153// Exactly one of *Operation or error will be non-nil. Any non-2xx
37154// status code is an error. Response headers are in either
37155// *Operation.ServerResponse.Header or (if a response was returned at
37156// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
37157// to check whether the returned error was because
37158// http.StatusNotModified was returned.
37159func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
37160	gensupport.SetOptions(c.urlParams_, opts...)
37161	res, err := c.doRequest("json")
37162	if res != nil && res.StatusCode == http.StatusNotModified {
37163		if res.Body != nil {
37164			res.Body.Close()
37165		}
37166		return nil, &googleapi.Error{
37167			Code:   res.StatusCode,
37168			Header: res.Header,
37169		}
37170	}
37171	if err != nil {
37172		return nil, err
37173	}
37174	defer googleapi.CloseBody(res)
37175	if err := googleapi.CheckResponse(res); err != nil {
37176		return nil, err
37177	}
37178	ret := &Operation{
37179		ServerResponse: googleapi.ServerResponse{
37180			Header:         res.Header,
37181			HTTPStatusCode: res.StatusCode,
37182		},
37183	}
37184	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37185		return nil, err
37186	}
37187	return ret, nil
37188	// {
37189	//   "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.",
37190	//   "httpMethod": "POST",
37191	//   "id": "compute.targetVpnGateways.insert",
37192	//   "parameterOrder": [
37193	//     "project",
37194	//     "region"
37195	//   ],
37196	//   "parameters": {
37197	//     "project": {
37198	//       "description": "Project ID for this request.",
37199	//       "location": "path",
37200	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37201	//       "required": true,
37202	//       "type": "string"
37203	//     },
37204	//     "region": {
37205	//       "description": "Name of the region for this request.",
37206	//       "location": "path",
37207	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
37208	//       "required": true,
37209	//       "type": "string"
37210	//     }
37211	//   },
37212	//   "path": "{project}/regions/{region}/targetVpnGateways",
37213	//   "request": {
37214	//     "$ref": "TargetVpnGateway"
37215	//   },
37216	//   "response": {
37217	//     "$ref": "Operation"
37218	//   },
37219	//   "scopes": [
37220	//     "https://www.googleapis.com/auth/cloud-platform",
37221	//     "https://www.googleapis.com/auth/compute"
37222	//   ]
37223	// }
37224
37225}
37226
37227// method id "compute.targetVpnGateways.list":
37228
37229type TargetVpnGatewaysListCall struct {
37230	s            *Service
37231	project      string
37232	region       string
37233	urlParams_   gensupport.URLParams
37234	ifNoneMatch_ string
37235	ctx_         context.Context
37236}
37237
37238// List: Retrieves a list of target VPN gateways available to the
37239// specified project and region.
37240func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall {
37241	c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37242	c.project = project
37243	c.region = region
37244	return c
37245}
37246
37247// Filter sets the optional parameter "filter": Sets a filter expression
37248// for filtering listed resources, in the form filter={expression}. Your
37249// {expression} must be in the format: field_name comparison_string
37250// literal_string.
37251//
37252// The field_name is the name of the field you want to compare. Only
37253// atomic field types are supported (string, number, boolean). The
37254// comparison_string must be either eq (equals) or ne (not equals). The
37255// literal_string is the string value to filter to. The literal value
37256// must be valid for the type of field you are filtering by (string,
37257// number, boolean). For string fields, the literal value is interpreted
37258// as a regular expression using RE2 syntax. The literal value must
37259// match the entire field.
37260//
37261// For example, to filter for instances that do not have a name of
37262// example-instance, you would use filter=name ne
37263// example-instance.
37264//
37265// Compute Engine Beta API Only: If you use filtering in the Beta API,
37266// you can also filter on nested fields. For example, you could filter
37267// on instances that have set the scheduling.automaticRestart field to
37268// true. In particular, use filtering on nested fields to take advantage
37269// of instance labels to organize and filter results based on label
37270// values.
37271//
37272// The Beta API also supports filtering on multiple expressions by
37273// providing each separate expression within parentheses. For example,
37274// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
37275// Multiple expressions are treated as AND expressions, meaning that
37276// resources must match all expressions to pass the filters.
37277func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall {
37278	c.urlParams_.Set("filter", filter)
37279	return c
37280}
37281
37282// MaxResults sets the optional parameter "maxResults": The maximum
37283// number of results per page that should be returned. If the number of
37284// available results is larger than maxResults, Compute Engine returns a
37285// nextPageToken that can be used to get the next page of results in
37286// subsequent list requests.
37287func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall {
37288	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37289	return c
37290}
37291
37292// PageToken sets the optional parameter "pageToken": Specifies a page
37293// token to use. Set pageToken to the nextPageToken returned by a
37294// previous list request to get the next page of results.
37295func (c *TargetVpnGatewaysListCall) PageToken(pageToken string) *TargetVpnGatewaysListCall {
37296	c.urlParams_.Set("pageToken", pageToken)
37297	return c
37298}
37299
37300// Fields allows partial responses to be retrieved. See
37301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37302// for more information.
37303func (c *TargetVpnGatewaysListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysListCall {
37304	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37305	return c
37306}
37307
37308// IfNoneMatch sets the optional parameter which makes the operation
37309// fail if the object's ETag matches the given value. This is useful for
37310// getting updates only after the object has changed since the last
37311// request. Use googleapi.IsNotModified to check whether the response
37312// error from Do is the result of In-None-Match.
37313func (c *TargetVpnGatewaysListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysListCall {
37314	c.ifNoneMatch_ = entityTag
37315	return c
37316}
37317
37318// Context sets the context to be used in this call's Do method. Any
37319// pending HTTP request will be aborted if the provided context is
37320// canceled.
37321func (c *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall {
37322	c.ctx_ = ctx
37323	return c
37324}
37325
37326func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) {
37327	var body io.Reader = nil
37328	c.urlParams_.Set("alt", alt)
37329	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways")
37330	urls += "?" + c.urlParams_.Encode()
37331	req, _ := http.NewRequest("GET", urls, body)
37332	googleapi.Expand(req.URL, map[string]string{
37333		"project": c.project,
37334		"region":  c.region,
37335	})
37336	req.Header.Set("User-Agent", c.s.userAgent())
37337	if c.ifNoneMatch_ != "" {
37338		req.Header.Set("If-None-Match", c.ifNoneMatch_)
37339	}
37340	if c.ctx_ != nil {
37341		return ctxhttp.Do(c.ctx_, c.s.client, req)
37342	}
37343	return c.s.client.Do(req)
37344}
37345
37346// Do executes the "compute.targetVpnGateways.list" call.
37347// Exactly one of *TargetVpnGatewayList or error will be non-nil. Any
37348// non-2xx status code is an error. Response headers are in either
37349// *TargetVpnGatewayList.ServerResponse.Header or (if a response was
37350// returned at all) in error.(*googleapi.Error).Header. Use
37351// googleapi.IsNotModified to check whether the returned error was
37352// because http.StatusNotModified was returned.
37353func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayList, error) {
37354	gensupport.SetOptions(c.urlParams_, opts...)
37355	res, err := c.doRequest("json")
37356	if res != nil && res.StatusCode == http.StatusNotModified {
37357		if res.Body != nil {
37358			res.Body.Close()
37359		}
37360		return nil, &googleapi.Error{
37361			Code:   res.StatusCode,
37362			Header: res.Header,
37363		}
37364	}
37365	if err != nil {
37366		return nil, err
37367	}
37368	defer googleapi.CloseBody(res)
37369	if err := googleapi.CheckResponse(res); err != nil {
37370		return nil, err
37371	}
37372	ret := &TargetVpnGatewayList{
37373		ServerResponse: googleapi.ServerResponse{
37374			Header:         res.Header,
37375			HTTPStatusCode: res.StatusCode,
37376		},
37377	}
37378	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37379		return nil, err
37380	}
37381	return ret, nil
37382	// {
37383	//   "description": "Retrieves a list of target VPN gateways available to the specified project and region.",
37384	//   "httpMethod": "GET",
37385	//   "id": "compute.targetVpnGateways.list",
37386	//   "parameterOrder": [
37387	//     "project",
37388	//     "region"
37389	//   ],
37390	//   "parameters": {
37391	//     "filter": {
37392	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
37393	//       "location": "query",
37394	//       "type": "string"
37395	//     },
37396	//     "maxResults": {
37397	//       "default": "500",
37398	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
37399	//       "format": "uint32",
37400	//       "location": "query",
37401	//       "maximum": "500",
37402	//       "minimum": "0",
37403	//       "type": "integer"
37404	//     },
37405	//     "pageToken": {
37406	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
37407	//       "location": "query",
37408	//       "type": "string"
37409	//     },
37410	//     "project": {
37411	//       "description": "Project ID for this request.",
37412	//       "location": "path",
37413	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37414	//       "required": true,
37415	//       "type": "string"
37416	//     },
37417	//     "region": {
37418	//       "description": "Name of the region for this request.",
37419	//       "location": "path",
37420	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
37421	//       "required": true,
37422	//       "type": "string"
37423	//     }
37424	//   },
37425	//   "path": "{project}/regions/{region}/targetVpnGateways",
37426	//   "response": {
37427	//     "$ref": "TargetVpnGatewayList"
37428	//   },
37429	//   "scopes": [
37430	//     "https://www.googleapis.com/auth/cloud-platform",
37431	//     "https://www.googleapis.com/auth/compute",
37432	//     "https://www.googleapis.com/auth/compute.readonly"
37433	//   ]
37434	// }
37435
37436}
37437
37438// Pages invokes f for each page of results.
37439// A non-nil error returned from f will halt the iteration.
37440// The provided context supersedes any context provided to the Context method.
37441func (c *TargetVpnGatewaysListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayList) error) error {
37442	c.ctx_ = ctx
37443	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37444	for {
37445		x, err := c.Do()
37446		if err != nil {
37447			return err
37448		}
37449		if err := f(x); err != nil {
37450			return err
37451		}
37452		if x.NextPageToken == "" {
37453			return nil
37454		}
37455		c.PageToken(x.NextPageToken)
37456	}
37457}
37458
37459// method id "compute.urlMaps.delete":
37460
37461type UrlMapsDeleteCall struct {
37462	s          *Service
37463	project    string
37464	urlMap     string
37465	urlParams_ gensupport.URLParams
37466	ctx_       context.Context
37467}
37468
37469// Delete: Deletes the specified UrlMap resource.
37470// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/delete
37471func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall {
37472	c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37473	c.project = project
37474	c.urlMap = urlMap
37475	return c
37476}
37477
37478// Fields allows partial responses to be retrieved. See
37479// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37480// for more information.
37481func (c *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall {
37482	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37483	return c
37484}
37485
37486// Context sets the context to be used in this call's Do method. Any
37487// pending HTTP request will be aborted if the provided context is
37488// canceled.
37489func (c *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall {
37490	c.ctx_ = ctx
37491	return c
37492}
37493
37494func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) {
37495	var body io.Reader = nil
37496	c.urlParams_.Set("alt", alt)
37497	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
37498	urls += "?" + c.urlParams_.Encode()
37499	req, _ := http.NewRequest("DELETE", urls, body)
37500	googleapi.Expand(req.URL, map[string]string{
37501		"project": c.project,
37502		"urlMap":  c.urlMap,
37503	})
37504	req.Header.Set("User-Agent", c.s.userAgent())
37505	if c.ctx_ != nil {
37506		return ctxhttp.Do(c.ctx_, c.s.client, req)
37507	}
37508	return c.s.client.Do(req)
37509}
37510
37511// Do executes the "compute.urlMaps.delete" call.
37512// Exactly one of *Operation or error will be non-nil. Any non-2xx
37513// status code is an error. Response headers are in either
37514// *Operation.ServerResponse.Header or (if a response was returned at
37515// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
37516// to check whether the returned error was because
37517// http.StatusNotModified was returned.
37518func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
37519	gensupport.SetOptions(c.urlParams_, opts...)
37520	res, err := c.doRequest("json")
37521	if res != nil && res.StatusCode == http.StatusNotModified {
37522		if res.Body != nil {
37523			res.Body.Close()
37524		}
37525		return nil, &googleapi.Error{
37526			Code:   res.StatusCode,
37527			Header: res.Header,
37528		}
37529	}
37530	if err != nil {
37531		return nil, err
37532	}
37533	defer googleapi.CloseBody(res)
37534	if err := googleapi.CheckResponse(res); err != nil {
37535		return nil, err
37536	}
37537	ret := &Operation{
37538		ServerResponse: googleapi.ServerResponse{
37539			Header:         res.Header,
37540			HTTPStatusCode: res.StatusCode,
37541		},
37542	}
37543	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37544		return nil, err
37545	}
37546	return ret, nil
37547	// {
37548	//   "description": "Deletes the specified UrlMap resource.",
37549	//   "httpMethod": "DELETE",
37550	//   "id": "compute.urlMaps.delete",
37551	//   "parameterOrder": [
37552	//     "project",
37553	//     "urlMap"
37554	//   ],
37555	//   "parameters": {
37556	//     "project": {
37557	//       "description": "Project ID for this request.",
37558	//       "location": "path",
37559	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37560	//       "required": true,
37561	//       "type": "string"
37562	//     },
37563	//     "urlMap": {
37564	//       "description": "Name of the UrlMap resource to delete.",
37565	//       "location": "path",
37566	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
37567	//       "required": true,
37568	//       "type": "string"
37569	//     }
37570	//   },
37571	//   "path": "{project}/global/urlMaps/{urlMap}",
37572	//   "response": {
37573	//     "$ref": "Operation"
37574	//   },
37575	//   "scopes": [
37576	//     "https://www.googleapis.com/auth/cloud-platform",
37577	//     "https://www.googleapis.com/auth/compute"
37578	//   ]
37579	// }
37580
37581}
37582
37583// method id "compute.urlMaps.get":
37584
37585type UrlMapsGetCall struct {
37586	s            *Service
37587	project      string
37588	urlMap       string
37589	urlParams_   gensupport.URLParams
37590	ifNoneMatch_ string
37591	ctx_         context.Context
37592}
37593
37594// Get: Returns the specified UrlMap resource. Get a list of available
37595// URL maps by making a list() request.
37596// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get
37597func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall {
37598	c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37599	c.project = project
37600	c.urlMap = urlMap
37601	return c
37602}
37603
37604// Fields allows partial responses to be retrieved. See
37605// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37606// for more information.
37607func (c *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall {
37608	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37609	return c
37610}
37611
37612// IfNoneMatch sets the optional parameter which makes the operation
37613// fail if the object's ETag matches the given value. This is useful for
37614// getting updates only after the object has changed since the last
37615// request. Use googleapi.IsNotModified to check whether the response
37616// error from Do is the result of In-None-Match.
37617func (c *UrlMapsGetCall) IfNoneMatch(entityTag string) *UrlMapsGetCall {
37618	c.ifNoneMatch_ = entityTag
37619	return c
37620}
37621
37622// Context sets the context to be used in this call's Do method. Any
37623// pending HTTP request will be aborted if the provided context is
37624// canceled.
37625func (c *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall {
37626	c.ctx_ = ctx
37627	return c
37628}
37629
37630func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) {
37631	var body io.Reader = nil
37632	c.urlParams_.Set("alt", alt)
37633	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
37634	urls += "?" + c.urlParams_.Encode()
37635	req, _ := http.NewRequest("GET", urls, body)
37636	googleapi.Expand(req.URL, map[string]string{
37637		"project": c.project,
37638		"urlMap":  c.urlMap,
37639	})
37640	req.Header.Set("User-Agent", c.s.userAgent())
37641	if c.ifNoneMatch_ != "" {
37642		req.Header.Set("If-None-Match", c.ifNoneMatch_)
37643	}
37644	if c.ctx_ != nil {
37645		return ctxhttp.Do(c.ctx_, c.s.client, req)
37646	}
37647	return c.s.client.Do(req)
37648}
37649
37650// Do executes the "compute.urlMaps.get" call.
37651// Exactly one of *UrlMap or error will be non-nil. Any non-2xx status
37652// code is an error. Response headers are in either
37653// *UrlMap.ServerResponse.Header or (if a response was returned at all)
37654// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
37655// check whether the returned error was because http.StatusNotModified
37656// was returned.
37657func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) {
37658	gensupport.SetOptions(c.urlParams_, opts...)
37659	res, err := c.doRequest("json")
37660	if res != nil && res.StatusCode == http.StatusNotModified {
37661		if res.Body != nil {
37662			res.Body.Close()
37663		}
37664		return nil, &googleapi.Error{
37665			Code:   res.StatusCode,
37666			Header: res.Header,
37667		}
37668	}
37669	if err != nil {
37670		return nil, err
37671	}
37672	defer googleapi.CloseBody(res)
37673	if err := googleapi.CheckResponse(res); err != nil {
37674		return nil, err
37675	}
37676	ret := &UrlMap{
37677		ServerResponse: googleapi.ServerResponse{
37678			Header:         res.Header,
37679			HTTPStatusCode: res.StatusCode,
37680		},
37681	}
37682	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37683		return nil, err
37684	}
37685	return ret, nil
37686	// {
37687	//   "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.",
37688	//   "httpMethod": "GET",
37689	//   "id": "compute.urlMaps.get",
37690	//   "parameterOrder": [
37691	//     "project",
37692	//     "urlMap"
37693	//   ],
37694	//   "parameters": {
37695	//     "project": {
37696	//       "description": "Project ID for this request.",
37697	//       "location": "path",
37698	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37699	//       "required": true,
37700	//       "type": "string"
37701	//     },
37702	//     "urlMap": {
37703	//       "description": "Name of the UrlMap resource to return.",
37704	//       "location": "path",
37705	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
37706	//       "required": true,
37707	//       "type": "string"
37708	//     }
37709	//   },
37710	//   "path": "{project}/global/urlMaps/{urlMap}",
37711	//   "response": {
37712	//     "$ref": "UrlMap"
37713	//   },
37714	//   "scopes": [
37715	//     "https://www.googleapis.com/auth/cloud-platform",
37716	//     "https://www.googleapis.com/auth/compute",
37717	//     "https://www.googleapis.com/auth/compute.readonly"
37718	//   ]
37719	// }
37720
37721}
37722
37723// method id "compute.urlMaps.insert":
37724
37725type UrlMapsInsertCall struct {
37726	s          *Service
37727	project    string
37728	urlmap     *UrlMap
37729	urlParams_ gensupport.URLParams
37730	ctx_       context.Context
37731}
37732
37733// Insert: Creates a UrlMap resource in the specified project using the
37734// data included in the request.
37735// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/insert
37736func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall {
37737	c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37738	c.project = project
37739	c.urlmap = urlmap
37740	return c
37741}
37742
37743// Fields allows partial responses to be retrieved. See
37744// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37745// for more information.
37746func (c *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall {
37747	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37748	return c
37749}
37750
37751// Context sets the context to be used in this call's Do method. Any
37752// pending HTTP request will be aborted if the provided context is
37753// canceled.
37754func (c *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall {
37755	c.ctx_ = ctx
37756	return c
37757}
37758
37759func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) {
37760	var body io.Reader = nil
37761	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
37762	if err != nil {
37763		return nil, err
37764	}
37765	ctype := "application/json"
37766	c.urlParams_.Set("alt", alt)
37767	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps")
37768	urls += "?" + c.urlParams_.Encode()
37769	req, _ := http.NewRequest("POST", urls, body)
37770	googleapi.Expand(req.URL, map[string]string{
37771		"project": c.project,
37772	})
37773	req.Header.Set("Content-Type", ctype)
37774	req.Header.Set("User-Agent", c.s.userAgent())
37775	if c.ctx_ != nil {
37776		return ctxhttp.Do(c.ctx_, c.s.client, req)
37777	}
37778	return c.s.client.Do(req)
37779}
37780
37781// Do executes the "compute.urlMaps.insert" call.
37782// Exactly one of *Operation or error will be non-nil. Any non-2xx
37783// status code is an error. Response headers are in either
37784// *Operation.ServerResponse.Header or (if a response was returned at
37785// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
37786// to check whether the returned error was because
37787// http.StatusNotModified was returned.
37788func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
37789	gensupport.SetOptions(c.urlParams_, opts...)
37790	res, err := c.doRequest("json")
37791	if res != nil && res.StatusCode == http.StatusNotModified {
37792		if res.Body != nil {
37793			res.Body.Close()
37794		}
37795		return nil, &googleapi.Error{
37796			Code:   res.StatusCode,
37797			Header: res.Header,
37798		}
37799	}
37800	if err != nil {
37801		return nil, err
37802	}
37803	defer googleapi.CloseBody(res)
37804	if err := googleapi.CheckResponse(res); err != nil {
37805		return nil, err
37806	}
37807	ret := &Operation{
37808		ServerResponse: googleapi.ServerResponse{
37809			Header:         res.Header,
37810			HTTPStatusCode: res.StatusCode,
37811		},
37812	}
37813	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37814		return nil, err
37815	}
37816	return ret, nil
37817	// {
37818	//   "description": "Creates a UrlMap resource in the specified project using the data included in the request.",
37819	//   "httpMethod": "POST",
37820	//   "id": "compute.urlMaps.insert",
37821	//   "parameterOrder": [
37822	//     "project"
37823	//   ],
37824	//   "parameters": {
37825	//     "project": {
37826	//       "description": "Project ID for this request.",
37827	//       "location": "path",
37828	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37829	//       "required": true,
37830	//       "type": "string"
37831	//     }
37832	//   },
37833	//   "path": "{project}/global/urlMaps",
37834	//   "request": {
37835	//     "$ref": "UrlMap"
37836	//   },
37837	//   "response": {
37838	//     "$ref": "Operation"
37839	//   },
37840	//   "scopes": [
37841	//     "https://www.googleapis.com/auth/cloud-platform",
37842	//     "https://www.googleapis.com/auth/compute"
37843	//   ]
37844	// }
37845
37846}
37847
37848// method id "compute.urlMaps.list":
37849
37850type UrlMapsListCall struct {
37851	s            *Service
37852	project      string
37853	urlParams_   gensupport.URLParams
37854	ifNoneMatch_ string
37855	ctx_         context.Context
37856}
37857
37858// List: Retrieves the list of UrlMap resources available to the
37859// specified project.
37860// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/list
37861func (r *UrlMapsService) List(project string) *UrlMapsListCall {
37862	c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37863	c.project = project
37864	return c
37865}
37866
37867// Filter sets the optional parameter "filter": Sets a filter expression
37868// for filtering listed resources, in the form filter={expression}. Your
37869// {expression} must be in the format: field_name comparison_string
37870// literal_string.
37871//
37872// The field_name is the name of the field you want to compare. Only
37873// atomic field types are supported (string, number, boolean). The
37874// comparison_string must be either eq (equals) or ne (not equals). The
37875// literal_string is the string value to filter to. The literal value
37876// must be valid for the type of field you are filtering by (string,
37877// number, boolean). For string fields, the literal value is interpreted
37878// as a regular expression using RE2 syntax. The literal value must
37879// match the entire field.
37880//
37881// For example, to filter for instances that do not have a name of
37882// example-instance, you would use filter=name ne
37883// example-instance.
37884//
37885// Compute Engine Beta API Only: If you use filtering in the Beta API,
37886// you can also filter on nested fields. For example, you could filter
37887// on instances that have set the scheduling.automaticRestart field to
37888// true. In particular, use filtering on nested fields to take advantage
37889// of instance labels to organize and filter results based on label
37890// values.
37891//
37892// The Beta API also supports filtering on multiple expressions by
37893// providing each separate expression within parentheses. For example,
37894// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
37895// Multiple expressions are treated as AND expressions, meaning that
37896// resources must match all expressions to pass the filters.
37897func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall {
37898	c.urlParams_.Set("filter", filter)
37899	return c
37900}
37901
37902// MaxResults sets the optional parameter "maxResults": The maximum
37903// number of results per page that should be returned. If the number of
37904// available results is larger than maxResults, Compute Engine returns a
37905// nextPageToken that can be used to get the next page of results in
37906// subsequent list requests.
37907func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall {
37908	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37909	return c
37910}
37911
37912// PageToken sets the optional parameter "pageToken": Specifies a page
37913// token to use. Set pageToken to the nextPageToken returned by a
37914// previous list request to get the next page of results.
37915func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall {
37916	c.urlParams_.Set("pageToken", pageToken)
37917	return c
37918}
37919
37920// Fields allows partial responses to be retrieved. See
37921// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37922// for more information.
37923func (c *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall {
37924	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37925	return c
37926}
37927
37928// IfNoneMatch sets the optional parameter which makes the operation
37929// fail if the object's ETag matches the given value. This is useful for
37930// getting updates only after the object has changed since the last
37931// request. Use googleapi.IsNotModified to check whether the response
37932// error from Do is the result of In-None-Match.
37933func (c *UrlMapsListCall) IfNoneMatch(entityTag string) *UrlMapsListCall {
37934	c.ifNoneMatch_ = entityTag
37935	return c
37936}
37937
37938// Context sets the context to be used in this call's Do method. Any
37939// pending HTTP request will be aborted if the provided context is
37940// canceled.
37941func (c *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall {
37942	c.ctx_ = ctx
37943	return c
37944}
37945
37946func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) {
37947	var body io.Reader = nil
37948	c.urlParams_.Set("alt", alt)
37949	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps")
37950	urls += "?" + c.urlParams_.Encode()
37951	req, _ := http.NewRequest("GET", urls, body)
37952	googleapi.Expand(req.URL, map[string]string{
37953		"project": c.project,
37954	})
37955	req.Header.Set("User-Agent", c.s.userAgent())
37956	if c.ifNoneMatch_ != "" {
37957		req.Header.Set("If-None-Match", c.ifNoneMatch_)
37958	}
37959	if c.ctx_ != nil {
37960		return ctxhttp.Do(c.ctx_, c.s.client, req)
37961	}
37962	return c.s.client.Do(req)
37963}
37964
37965// Do executes the "compute.urlMaps.list" call.
37966// Exactly one of *UrlMapList or error will be non-nil. Any non-2xx
37967// status code is an error. Response headers are in either
37968// *UrlMapList.ServerResponse.Header or (if a response was returned at
37969// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
37970// to check whether the returned error was because
37971// http.StatusNotModified was returned.
37972func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) {
37973	gensupport.SetOptions(c.urlParams_, opts...)
37974	res, err := c.doRequest("json")
37975	if res != nil && res.StatusCode == http.StatusNotModified {
37976		if res.Body != nil {
37977			res.Body.Close()
37978		}
37979		return nil, &googleapi.Error{
37980			Code:   res.StatusCode,
37981			Header: res.Header,
37982		}
37983	}
37984	if err != nil {
37985		return nil, err
37986	}
37987	defer googleapi.CloseBody(res)
37988	if err := googleapi.CheckResponse(res); err != nil {
37989		return nil, err
37990	}
37991	ret := &UrlMapList{
37992		ServerResponse: googleapi.ServerResponse{
37993			Header:         res.Header,
37994			HTTPStatusCode: res.StatusCode,
37995		},
37996	}
37997	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37998		return nil, err
37999	}
38000	return ret, nil
38001	// {
38002	//   "description": "Retrieves the list of UrlMap resources available to the specified project.",
38003	//   "httpMethod": "GET",
38004	//   "id": "compute.urlMaps.list",
38005	//   "parameterOrder": [
38006	//     "project"
38007	//   ],
38008	//   "parameters": {
38009	//     "filter": {
38010	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
38011	//       "location": "query",
38012	//       "type": "string"
38013	//     },
38014	//     "maxResults": {
38015	//       "default": "500",
38016	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
38017	//       "format": "uint32",
38018	//       "location": "query",
38019	//       "maximum": "500",
38020	//       "minimum": "0",
38021	//       "type": "integer"
38022	//     },
38023	//     "pageToken": {
38024	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
38025	//       "location": "query",
38026	//       "type": "string"
38027	//     },
38028	//     "project": {
38029	//       "description": "Project ID for this request.",
38030	//       "location": "path",
38031	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38032	//       "required": true,
38033	//       "type": "string"
38034	//     }
38035	//   },
38036	//   "path": "{project}/global/urlMaps",
38037	//   "response": {
38038	//     "$ref": "UrlMapList"
38039	//   },
38040	//   "scopes": [
38041	//     "https://www.googleapis.com/auth/cloud-platform",
38042	//     "https://www.googleapis.com/auth/compute",
38043	//     "https://www.googleapis.com/auth/compute.readonly"
38044	//   ]
38045	// }
38046
38047}
38048
38049// Pages invokes f for each page of results.
38050// A non-nil error returned from f will halt the iteration.
38051// The provided context supersedes any context provided to the Context method.
38052func (c *UrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error {
38053	c.ctx_ = ctx
38054	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38055	for {
38056		x, err := c.Do()
38057		if err != nil {
38058			return err
38059		}
38060		if err := f(x); err != nil {
38061			return err
38062		}
38063		if x.NextPageToken == "" {
38064			return nil
38065		}
38066		c.PageToken(x.NextPageToken)
38067	}
38068}
38069
38070// method id "compute.urlMaps.patch":
38071
38072type UrlMapsPatchCall struct {
38073	s          *Service
38074	project    string
38075	urlMap     string
38076	urlmap     *UrlMap
38077	urlParams_ gensupport.URLParams
38078	ctx_       context.Context
38079}
38080
38081// Patch: Updates the entire content of the UrlMap resource. This method
38082// supports patch semantics.
38083// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch
38084func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall {
38085	c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38086	c.project = project
38087	c.urlMap = urlMap
38088	c.urlmap = urlmap
38089	return c
38090}
38091
38092// Fields allows partial responses to be retrieved. See
38093// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38094// for more information.
38095func (c *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall {
38096	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38097	return c
38098}
38099
38100// Context sets the context to be used in this call's Do method. Any
38101// pending HTTP request will be aborted if the provided context is
38102// canceled.
38103func (c *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall {
38104	c.ctx_ = ctx
38105	return c
38106}
38107
38108func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) {
38109	var body io.Reader = nil
38110	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
38111	if err != nil {
38112		return nil, err
38113	}
38114	ctype := "application/json"
38115	c.urlParams_.Set("alt", alt)
38116	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
38117	urls += "?" + c.urlParams_.Encode()
38118	req, _ := http.NewRequest("PATCH", urls, body)
38119	googleapi.Expand(req.URL, map[string]string{
38120		"project": c.project,
38121		"urlMap":  c.urlMap,
38122	})
38123	req.Header.Set("Content-Type", ctype)
38124	req.Header.Set("User-Agent", c.s.userAgent())
38125	if c.ctx_ != nil {
38126		return ctxhttp.Do(c.ctx_, c.s.client, req)
38127	}
38128	return c.s.client.Do(req)
38129}
38130
38131// Do executes the "compute.urlMaps.patch" call.
38132// Exactly one of *Operation or error will be non-nil. Any non-2xx
38133// status code is an error. Response headers are in either
38134// *Operation.ServerResponse.Header or (if a response was returned at
38135// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38136// to check whether the returned error was because
38137// http.StatusNotModified was returned.
38138func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
38139	gensupport.SetOptions(c.urlParams_, opts...)
38140	res, err := c.doRequest("json")
38141	if res != nil && res.StatusCode == http.StatusNotModified {
38142		if res.Body != nil {
38143			res.Body.Close()
38144		}
38145		return nil, &googleapi.Error{
38146			Code:   res.StatusCode,
38147			Header: res.Header,
38148		}
38149	}
38150	if err != nil {
38151		return nil, err
38152	}
38153	defer googleapi.CloseBody(res)
38154	if err := googleapi.CheckResponse(res); err != nil {
38155		return nil, err
38156	}
38157	ret := &Operation{
38158		ServerResponse: googleapi.ServerResponse{
38159			Header:         res.Header,
38160			HTTPStatusCode: res.StatusCode,
38161		},
38162	}
38163	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38164		return nil, err
38165	}
38166	return ret, nil
38167	// {
38168	//   "description": "Updates the entire content of the UrlMap resource. This method supports patch semantics.",
38169	//   "httpMethod": "PATCH",
38170	//   "id": "compute.urlMaps.patch",
38171	//   "parameterOrder": [
38172	//     "project",
38173	//     "urlMap"
38174	//   ],
38175	//   "parameters": {
38176	//     "project": {
38177	//       "description": "Project ID for this request.",
38178	//       "location": "path",
38179	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38180	//       "required": true,
38181	//       "type": "string"
38182	//     },
38183	//     "urlMap": {
38184	//       "description": "Name of the UrlMap resource to update.",
38185	//       "location": "path",
38186	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38187	//       "required": true,
38188	//       "type": "string"
38189	//     }
38190	//   },
38191	//   "path": "{project}/global/urlMaps/{urlMap}",
38192	//   "request": {
38193	//     "$ref": "UrlMap"
38194	//   },
38195	//   "response": {
38196	//     "$ref": "Operation"
38197	//   },
38198	//   "scopes": [
38199	//     "https://www.googleapis.com/auth/cloud-platform",
38200	//     "https://www.googleapis.com/auth/compute"
38201	//   ]
38202	// }
38203
38204}
38205
38206// method id "compute.urlMaps.update":
38207
38208type UrlMapsUpdateCall struct {
38209	s          *Service
38210	project    string
38211	urlMap     string
38212	urlmap     *UrlMap
38213	urlParams_ gensupport.URLParams
38214	ctx_       context.Context
38215}
38216
38217// Update: Updates the entire content of the UrlMap resource.
38218// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update
38219func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall {
38220	c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38221	c.project = project
38222	c.urlMap = urlMap
38223	c.urlmap = urlmap
38224	return c
38225}
38226
38227// Fields allows partial responses to be retrieved. See
38228// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38229// for more information.
38230func (c *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall {
38231	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38232	return c
38233}
38234
38235// Context sets the context to be used in this call's Do method. Any
38236// pending HTTP request will be aborted if the provided context is
38237// canceled.
38238func (c *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall {
38239	c.ctx_ = ctx
38240	return c
38241}
38242
38243func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) {
38244	var body io.Reader = nil
38245	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
38246	if err != nil {
38247		return nil, err
38248	}
38249	ctype := "application/json"
38250	c.urlParams_.Set("alt", alt)
38251	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
38252	urls += "?" + c.urlParams_.Encode()
38253	req, _ := http.NewRequest("PUT", urls, body)
38254	googleapi.Expand(req.URL, map[string]string{
38255		"project": c.project,
38256		"urlMap":  c.urlMap,
38257	})
38258	req.Header.Set("Content-Type", ctype)
38259	req.Header.Set("User-Agent", c.s.userAgent())
38260	if c.ctx_ != nil {
38261		return ctxhttp.Do(c.ctx_, c.s.client, req)
38262	}
38263	return c.s.client.Do(req)
38264}
38265
38266// Do executes the "compute.urlMaps.update" call.
38267// Exactly one of *Operation or error will be non-nil. Any non-2xx
38268// status code is an error. Response headers are in either
38269// *Operation.ServerResponse.Header or (if a response was returned at
38270// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38271// to check whether the returned error was because
38272// http.StatusNotModified was returned.
38273func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
38274	gensupport.SetOptions(c.urlParams_, opts...)
38275	res, err := c.doRequest("json")
38276	if res != nil && res.StatusCode == http.StatusNotModified {
38277		if res.Body != nil {
38278			res.Body.Close()
38279		}
38280		return nil, &googleapi.Error{
38281			Code:   res.StatusCode,
38282			Header: res.Header,
38283		}
38284	}
38285	if err != nil {
38286		return nil, err
38287	}
38288	defer googleapi.CloseBody(res)
38289	if err := googleapi.CheckResponse(res); err != nil {
38290		return nil, err
38291	}
38292	ret := &Operation{
38293		ServerResponse: googleapi.ServerResponse{
38294			Header:         res.Header,
38295			HTTPStatusCode: res.StatusCode,
38296		},
38297	}
38298	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38299		return nil, err
38300	}
38301	return ret, nil
38302	// {
38303	//   "description": "Updates the entire content of the UrlMap resource.",
38304	//   "httpMethod": "PUT",
38305	//   "id": "compute.urlMaps.update",
38306	//   "parameterOrder": [
38307	//     "project",
38308	//     "urlMap"
38309	//   ],
38310	//   "parameters": {
38311	//     "project": {
38312	//       "description": "Project ID for this request.",
38313	//       "location": "path",
38314	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38315	//       "required": true,
38316	//       "type": "string"
38317	//     },
38318	//     "urlMap": {
38319	//       "description": "Name of the UrlMap resource to update.",
38320	//       "location": "path",
38321	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38322	//       "required": true,
38323	//       "type": "string"
38324	//     }
38325	//   },
38326	//   "path": "{project}/global/urlMaps/{urlMap}",
38327	//   "request": {
38328	//     "$ref": "UrlMap"
38329	//   },
38330	//   "response": {
38331	//     "$ref": "Operation"
38332	//   },
38333	//   "scopes": [
38334	//     "https://www.googleapis.com/auth/cloud-platform",
38335	//     "https://www.googleapis.com/auth/compute"
38336	//   ]
38337	// }
38338
38339}
38340
38341// method id "compute.urlMaps.validate":
38342
38343type UrlMapsValidateCall struct {
38344	s                      *Service
38345	project                string
38346	urlMap                 string
38347	urlmapsvalidaterequest *UrlMapsValidateRequest
38348	urlParams_             gensupport.URLParams
38349	ctx_                   context.Context
38350}
38351
38352// Validate: Runs static validation for the UrlMap. In particular, the
38353// tests of the provided UrlMap will be run. Calling this method does
38354// NOT create the UrlMap.
38355// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate
38356func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall {
38357	c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38358	c.project = project
38359	c.urlMap = urlMap
38360	c.urlmapsvalidaterequest = urlmapsvalidaterequest
38361	return c
38362}
38363
38364// Fields allows partial responses to be retrieved. See
38365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38366// for more information.
38367func (c *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall {
38368	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38369	return c
38370}
38371
38372// Context sets the context to be used in this call's Do method. Any
38373// pending HTTP request will be aborted if the provided context is
38374// canceled.
38375func (c *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall {
38376	c.ctx_ = ctx
38377	return c
38378}
38379
38380func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) {
38381	var body io.Reader = nil
38382	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest)
38383	if err != nil {
38384		return nil, err
38385	}
38386	ctype := "application/json"
38387	c.urlParams_.Set("alt", alt)
38388	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate")
38389	urls += "?" + c.urlParams_.Encode()
38390	req, _ := http.NewRequest("POST", urls, body)
38391	googleapi.Expand(req.URL, map[string]string{
38392		"project": c.project,
38393		"urlMap":  c.urlMap,
38394	})
38395	req.Header.Set("Content-Type", ctype)
38396	req.Header.Set("User-Agent", c.s.userAgent())
38397	if c.ctx_ != nil {
38398		return ctxhttp.Do(c.ctx_, c.s.client, req)
38399	}
38400	return c.s.client.Do(req)
38401}
38402
38403// Do executes the "compute.urlMaps.validate" call.
38404// Exactly one of *UrlMapsValidateResponse or error will be non-nil. Any
38405// non-2xx status code is an error. Response headers are in either
38406// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was
38407// returned at all) in error.(*googleapi.Error).Header. Use
38408// googleapi.IsNotModified to check whether the returned error was
38409// because http.StatusNotModified was returned.
38410func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) {
38411	gensupport.SetOptions(c.urlParams_, opts...)
38412	res, err := c.doRequest("json")
38413	if res != nil && res.StatusCode == http.StatusNotModified {
38414		if res.Body != nil {
38415			res.Body.Close()
38416		}
38417		return nil, &googleapi.Error{
38418			Code:   res.StatusCode,
38419			Header: res.Header,
38420		}
38421	}
38422	if err != nil {
38423		return nil, err
38424	}
38425	defer googleapi.CloseBody(res)
38426	if err := googleapi.CheckResponse(res); err != nil {
38427		return nil, err
38428	}
38429	ret := &UrlMapsValidateResponse{
38430		ServerResponse: googleapi.ServerResponse{
38431			Header:         res.Header,
38432			HTTPStatusCode: res.StatusCode,
38433		},
38434	}
38435	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38436		return nil, err
38437	}
38438	return ret, nil
38439	// {
38440	//   "description": "Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.",
38441	//   "httpMethod": "POST",
38442	//   "id": "compute.urlMaps.validate",
38443	//   "parameterOrder": [
38444	//     "project",
38445	//     "urlMap"
38446	//   ],
38447	//   "parameters": {
38448	//     "project": {
38449	//       "description": "Project ID for this request.",
38450	//       "location": "path",
38451	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38452	//       "required": true,
38453	//       "type": "string"
38454	//     },
38455	//     "urlMap": {
38456	//       "description": "Name of the UrlMap resource to be validated as.",
38457	//       "location": "path",
38458	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38459	//       "required": true,
38460	//       "type": "string"
38461	//     }
38462	//   },
38463	//   "path": "{project}/global/urlMaps/{urlMap}/validate",
38464	//   "request": {
38465	//     "$ref": "UrlMapsValidateRequest"
38466	//   },
38467	//   "response": {
38468	//     "$ref": "UrlMapsValidateResponse"
38469	//   },
38470	//   "scopes": [
38471	//     "https://www.googleapis.com/auth/cloud-platform",
38472	//     "https://www.googleapis.com/auth/compute"
38473	//   ]
38474	// }
38475
38476}
38477
38478// method id "compute.vpnTunnels.aggregatedList":
38479
38480type VpnTunnelsAggregatedListCall struct {
38481	s            *Service
38482	project      string
38483	urlParams_   gensupport.URLParams
38484	ifNoneMatch_ string
38485	ctx_         context.Context
38486}
38487
38488// AggregatedList: Retrieves an aggregated list of VPN tunnels.
38489func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall {
38490	c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38491	c.project = project
38492	return c
38493}
38494
38495// Filter sets the optional parameter "filter": Sets a filter expression
38496// for filtering listed resources, in the form filter={expression}. Your
38497// {expression} must be in the format: field_name comparison_string
38498// literal_string.
38499//
38500// The field_name is the name of the field you want to compare. Only
38501// atomic field types are supported (string, number, boolean). The
38502// comparison_string must be either eq (equals) or ne (not equals). The
38503// literal_string is the string value to filter to. The literal value
38504// must be valid for the type of field you are filtering by (string,
38505// number, boolean). For string fields, the literal value is interpreted
38506// as a regular expression using RE2 syntax. The literal value must
38507// match the entire field.
38508//
38509// For example, to filter for instances that do not have a name of
38510// example-instance, you would use filter=name ne
38511// example-instance.
38512//
38513// Compute Engine Beta API Only: If you use filtering in the Beta API,
38514// you can also filter on nested fields. For example, you could filter
38515// on instances that have set the scheduling.automaticRestart field to
38516// true. In particular, use filtering on nested fields to take advantage
38517// of instance labels to organize and filter results based on label
38518// values.
38519//
38520// The Beta API also supports filtering on multiple expressions by
38521// providing each separate expression within parentheses. For example,
38522// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
38523// Multiple expressions are treated as AND expressions, meaning that
38524// resources must match all expressions to pass the filters.
38525func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall {
38526	c.urlParams_.Set("filter", filter)
38527	return c
38528}
38529
38530// MaxResults sets the optional parameter "maxResults": The maximum
38531// number of results per page that should be returned. If the number of
38532// available results is larger than maxResults, Compute Engine returns a
38533// nextPageToken that can be used to get the next page of results in
38534// subsequent list requests.
38535func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall {
38536	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38537	return c
38538}
38539
38540// PageToken sets the optional parameter "pageToken": Specifies a page
38541// token to use. Set pageToken to the nextPageToken returned by a
38542// previous list request to get the next page of results.
38543func (c *VpnTunnelsAggregatedListCall) PageToken(pageToken string) *VpnTunnelsAggregatedListCall {
38544	c.urlParams_.Set("pageToken", pageToken)
38545	return c
38546}
38547
38548// Fields allows partial responses to be retrieved. See
38549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38550// for more information.
38551func (c *VpnTunnelsAggregatedListCall) Fields(s ...googleapi.Field) *VpnTunnelsAggregatedListCall {
38552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38553	return c
38554}
38555
38556// IfNoneMatch sets the optional parameter which makes the operation
38557// fail if the object's ETag matches the given value. This is useful for
38558// getting updates only after the object has changed since the last
38559// request. Use googleapi.IsNotModified to check whether the response
38560// error from Do is the result of In-None-Match.
38561func (c *VpnTunnelsAggregatedListCall) IfNoneMatch(entityTag string) *VpnTunnelsAggregatedListCall {
38562	c.ifNoneMatch_ = entityTag
38563	return c
38564}
38565
38566// Context sets the context to be used in this call's Do method. Any
38567// pending HTTP request will be aborted if the provided context is
38568// canceled.
38569func (c *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall {
38570	c.ctx_ = ctx
38571	return c
38572}
38573
38574func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
38575	var body io.Reader = nil
38576	c.urlParams_.Set("alt", alt)
38577	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnTunnels")
38578	urls += "?" + c.urlParams_.Encode()
38579	req, _ := http.NewRequest("GET", urls, body)
38580	googleapi.Expand(req.URL, map[string]string{
38581		"project": c.project,
38582	})
38583	req.Header.Set("User-Agent", c.s.userAgent())
38584	if c.ifNoneMatch_ != "" {
38585		req.Header.Set("If-None-Match", c.ifNoneMatch_)
38586	}
38587	if c.ctx_ != nil {
38588		return ctxhttp.Do(c.ctx_, c.s.client, req)
38589	}
38590	return c.s.client.Do(req)
38591}
38592
38593// Do executes the "compute.vpnTunnels.aggregatedList" call.
38594// Exactly one of *VpnTunnelAggregatedList or error will be non-nil. Any
38595// non-2xx status code is an error. Response headers are in either
38596// *VpnTunnelAggregatedList.ServerResponse.Header or (if a response was
38597// returned at all) in error.(*googleapi.Error).Header. Use
38598// googleapi.IsNotModified to check whether the returned error was
38599// because http.StatusNotModified was returned.
38600func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelAggregatedList, error) {
38601	gensupport.SetOptions(c.urlParams_, opts...)
38602	res, err := c.doRequest("json")
38603	if res != nil && res.StatusCode == http.StatusNotModified {
38604		if res.Body != nil {
38605			res.Body.Close()
38606		}
38607		return nil, &googleapi.Error{
38608			Code:   res.StatusCode,
38609			Header: res.Header,
38610		}
38611	}
38612	if err != nil {
38613		return nil, err
38614	}
38615	defer googleapi.CloseBody(res)
38616	if err := googleapi.CheckResponse(res); err != nil {
38617		return nil, err
38618	}
38619	ret := &VpnTunnelAggregatedList{
38620		ServerResponse: googleapi.ServerResponse{
38621			Header:         res.Header,
38622			HTTPStatusCode: res.StatusCode,
38623		},
38624	}
38625	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38626		return nil, err
38627	}
38628	return ret, nil
38629	// {
38630	//   "description": "Retrieves an aggregated list of VPN tunnels.",
38631	//   "httpMethod": "GET",
38632	//   "id": "compute.vpnTunnels.aggregatedList",
38633	//   "parameterOrder": [
38634	//     "project"
38635	//   ],
38636	//   "parameters": {
38637	//     "filter": {
38638	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
38639	//       "location": "query",
38640	//       "type": "string"
38641	//     },
38642	//     "maxResults": {
38643	//       "default": "500",
38644	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
38645	//       "format": "uint32",
38646	//       "location": "query",
38647	//       "maximum": "500",
38648	//       "minimum": "0",
38649	//       "type": "integer"
38650	//     },
38651	//     "pageToken": {
38652	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
38653	//       "location": "query",
38654	//       "type": "string"
38655	//     },
38656	//     "project": {
38657	//       "description": "Project ID for this request.",
38658	//       "location": "path",
38659	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38660	//       "required": true,
38661	//       "type": "string"
38662	//     }
38663	//   },
38664	//   "path": "{project}/aggregated/vpnTunnels",
38665	//   "response": {
38666	//     "$ref": "VpnTunnelAggregatedList"
38667	//   },
38668	//   "scopes": [
38669	//     "https://www.googleapis.com/auth/cloud-platform",
38670	//     "https://www.googleapis.com/auth/compute",
38671	//     "https://www.googleapis.com/auth/compute.readonly"
38672	//   ]
38673	// }
38674
38675}
38676
38677// Pages invokes f for each page of results.
38678// A non-nil error returned from f will halt the iteration.
38679// The provided context supersedes any context provided to the Context method.
38680func (c *VpnTunnelsAggregatedListCall) Pages(ctx context.Context, f func(*VpnTunnelAggregatedList) error) error {
38681	c.ctx_ = ctx
38682	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38683	for {
38684		x, err := c.Do()
38685		if err != nil {
38686			return err
38687		}
38688		if err := f(x); err != nil {
38689			return err
38690		}
38691		if x.NextPageToken == "" {
38692			return nil
38693		}
38694		c.PageToken(x.NextPageToken)
38695	}
38696}
38697
38698// method id "compute.vpnTunnels.delete":
38699
38700type VpnTunnelsDeleteCall struct {
38701	s          *Service
38702	project    string
38703	region     string
38704	vpnTunnel  string
38705	urlParams_ gensupport.URLParams
38706	ctx_       context.Context
38707}
38708
38709// Delete: Deletes the specified VpnTunnel resource.
38710func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall {
38711	c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38712	c.project = project
38713	c.region = region
38714	c.vpnTunnel = vpnTunnel
38715	return c
38716}
38717
38718// Fields allows partial responses to be retrieved. See
38719// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38720// for more information.
38721func (c *VpnTunnelsDeleteCall) Fields(s ...googleapi.Field) *VpnTunnelsDeleteCall {
38722	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38723	return c
38724}
38725
38726// Context sets the context to be used in this call's Do method. Any
38727// pending HTTP request will be aborted if the provided context is
38728// canceled.
38729func (c *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall {
38730	c.ctx_ = ctx
38731	return c
38732}
38733
38734func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) {
38735	var body io.Reader = nil
38736	c.urlParams_.Set("alt", alt)
38737	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}")
38738	urls += "?" + c.urlParams_.Encode()
38739	req, _ := http.NewRequest("DELETE", urls, body)
38740	googleapi.Expand(req.URL, map[string]string{
38741		"project":   c.project,
38742		"region":    c.region,
38743		"vpnTunnel": c.vpnTunnel,
38744	})
38745	req.Header.Set("User-Agent", c.s.userAgent())
38746	if c.ctx_ != nil {
38747		return ctxhttp.Do(c.ctx_, c.s.client, req)
38748	}
38749	return c.s.client.Do(req)
38750}
38751
38752// Do executes the "compute.vpnTunnels.delete" call.
38753// Exactly one of *Operation or error will be non-nil. Any non-2xx
38754// status code is an error. Response headers are in either
38755// *Operation.ServerResponse.Header or (if a response was returned at
38756// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38757// to check whether the returned error was because
38758// http.StatusNotModified was returned.
38759func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
38760	gensupport.SetOptions(c.urlParams_, opts...)
38761	res, err := c.doRequest("json")
38762	if res != nil && res.StatusCode == http.StatusNotModified {
38763		if res.Body != nil {
38764			res.Body.Close()
38765		}
38766		return nil, &googleapi.Error{
38767			Code:   res.StatusCode,
38768			Header: res.Header,
38769		}
38770	}
38771	if err != nil {
38772		return nil, err
38773	}
38774	defer googleapi.CloseBody(res)
38775	if err := googleapi.CheckResponse(res); err != nil {
38776		return nil, err
38777	}
38778	ret := &Operation{
38779		ServerResponse: googleapi.ServerResponse{
38780			Header:         res.Header,
38781			HTTPStatusCode: res.StatusCode,
38782		},
38783	}
38784	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38785		return nil, err
38786	}
38787	return ret, nil
38788	// {
38789	//   "description": "Deletes the specified VpnTunnel resource.",
38790	//   "httpMethod": "DELETE",
38791	//   "id": "compute.vpnTunnels.delete",
38792	//   "parameterOrder": [
38793	//     "project",
38794	//     "region",
38795	//     "vpnTunnel"
38796	//   ],
38797	//   "parameters": {
38798	//     "project": {
38799	//       "description": "Project ID for this request.",
38800	//       "location": "path",
38801	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38802	//       "required": true,
38803	//       "type": "string"
38804	//     },
38805	//     "region": {
38806	//       "description": "Name of the region for this request.",
38807	//       "location": "path",
38808	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38809	//       "required": true,
38810	//       "type": "string"
38811	//     },
38812	//     "vpnTunnel": {
38813	//       "description": "Name of the VpnTunnel resource to delete.",
38814	//       "location": "path",
38815	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38816	//       "required": true,
38817	//       "type": "string"
38818	//     }
38819	//   },
38820	//   "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}",
38821	//   "response": {
38822	//     "$ref": "Operation"
38823	//   },
38824	//   "scopes": [
38825	//     "https://www.googleapis.com/auth/cloud-platform",
38826	//     "https://www.googleapis.com/auth/compute"
38827	//   ]
38828	// }
38829
38830}
38831
38832// method id "compute.vpnTunnels.get":
38833
38834type VpnTunnelsGetCall struct {
38835	s            *Service
38836	project      string
38837	region       string
38838	vpnTunnel    string
38839	urlParams_   gensupport.URLParams
38840	ifNoneMatch_ string
38841	ctx_         context.Context
38842}
38843
38844// Get: Returns the specified VpnTunnel resource. Get a list of
38845// available VPN tunnels by making a list() request.
38846func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall {
38847	c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38848	c.project = project
38849	c.region = region
38850	c.vpnTunnel = vpnTunnel
38851	return c
38852}
38853
38854// Fields allows partial responses to be retrieved. See
38855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38856// for more information.
38857func (c *VpnTunnelsGetCall) Fields(s ...googleapi.Field) *VpnTunnelsGetCall {
38858	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38859	return c
38860}
38861
38862// IfNoneMatch sets the optional parameter which makes the operation
38863// fail if the object's ETag matches the given value. This is useful for
38864// getting updates only after the object has changed since the last
38865// request. Use googleapi.IsNotModified to check whether the response
38866// error from Do is the result of In-None-Match.
38867func (c *VpnTunnelsGetCall) IfNoneMatch(entityTag string) *VpnTunnelsGetCall {
38868	c.ifNoneMatch_ = entityTag
38869	return c
38870}
38871
38872// Context sets the context to be used in this call's Do method. Any
38873// pending HTTP request will be aborted if the provided context is
38874// canceled.
38875func (c *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall {
38876	c.ctx_ = ctx
38877	return c
38878}
38879
38880func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) {
38881	var body io.Reader = nil
38882	c.urlParams_.Set("alt", alt)
38883	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}")
38884	urls += "?" + c.urlParams_.Encode()
38885	req, _ := http.NewRequest("GET", urls, body)
38886	googleapi.Expand(req.URL, map[string]string{
38887		"project":   c.project,
38888		"region":    c.region,
38889		"vpnTunnel": c.vpnTunnel,
38890	})
38891	req.Header.Set("User-Agent", c.s.userAgent())
38892	if c.ifNoneMatch_ != "" {
38893		req.Header.Set("If-None-Match", c.ifNoneMatch_)
38894	}
38895	if c.ctx_ != nil {
38896		return ctxhttp.Do(c.ctx_, c.s.client, req)
38897	}
38898	return c.s.client.Do(req)
38899}
38900
38901// Do executes the "compute.vpnTunnels.get" call.
38902// Exactly one of *VpnTunnel or error will be non-nil. Any non-2xx
38903// status code is an error. Response headers are in either
38904// *VpnTunnel.ServerResponse.Header or (if a response was returned at
38905// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38906// to check whether the returned error was because
38907// http.StatusNotModified was returned.
38908func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) {
38909	gensupport.SetOptions(c.urlParams_, opts...)
38910	res, err := c.doRequest("json")
38911	if res != nil && res.StatusCode == http.StatusNotModified {
38912		if res.Body != nil {
38913			res.Body.Close()
38914		}
38915		return nil, &googleapi.Error{
38916			Code:   res.StatusCode,
38917			Header: res.Header,
38918		}
38919	}
38920	if err != nil {
38921		return nil, err
38922	}
38923	defer googleapi.CloseBody(res)
38924	if err := googleapi.CheckResponse(res); err != nil {
38925		return nil, err
38926	}
38927	ret := &VpnTunnel{
38928		ServerResponse: googleapi.ServerResponse{
38929			Header:         res.Header,
38930			HTTPStatusCode: res.StatusCode,
38931		},
38932	}
38933	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38934		return nil, err
38935	}
38936	return ret, nil
38937	// {
38938	//   "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.",
38939	//   "httpMethod": "GET",
38940	//   "id": "compute.vpnTunnels.get",
38941	//   "parameterOrder": [
38942	//     "project",
38943	//     "region",
38944	//     "vpnTunnel"
38945	//   ],
38946	//   "parameters": {
38947	//     "project": {
38948	//       "description": "Project ID for this request.",
38949	//       "location": "path",
38950	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38951	//       "required": true,
38952	//       "type": "string"
38953	//     },
38954	//     "region": {
38955	//       "description": "Name of the region for this request.",
38956	//       "location": "path",
38957	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38958	//       "required": true,
38959	//       "type": "string"
38960	//     },
38961	//     "vpnTunnel": {
38962	//       "description": "Name of the VpnTunnel resource to return.",
38963	//       "location": "path",
38964	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38965	//       "required": true,
38966	//       "type": "string"
38967	//     }
38968	//   },
38969	//   "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}",
38970	//   "response": {
38971	//     "$ref": "VpnTunnel"
38972	//   },
38973	//   "scopes": [
38974	//     "https://www.googleapis.com/auth/cloud-platform",
38975	//     "https://www.googleapis.com/auth/compute",
38976	//     "https://www.googleapis.com/auth/compute.readonly"
38977	//   ]
38978	// }
38979
38980}
38981
38982// method id "compute.vpnTunnels.insert":
38983
38984type VpnTunnelsInsertCall struct {
38985	s          *Service
38986	project    string
38987	region     string
38988	vpntunnel  *VpnTunnel
38989	urlParams_ gensupport.URLParams
38990	ctx_       context.Context
38991}
38992
38993// Insert: Creates a VpnTunnel resource in the specified project and
38994// region using the data included in the request.
38995func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall {
38996	c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38997	c.project = project
38998	c.region = region
38999	c.vpntunnel = vpntunnel
39000	return c
39001}
39002
39003// Fields allows partial responses to be retrieved. See
39004// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39005// for more information.
39006func (c *VpnTunnelsInsertCall) Fields(s ...googleapi.Field) *VpnTunnelsInsertCall {
39007	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39008	return c
39009}
39010
39011// Context sets the context to be used in this call's Do method. Any
39012// pending HTTP request will be aborted if the provided context is
39013// canceled.
39014func (c *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall {
39015	c.ctx_ = ctx
39016	return c
39017}
39018
39019func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) {
39020	var body io.Reader = nil
39021	body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpntunnel)
39022	if err != nil {
39023		return nil, err
39024	}
39025	ctype := "application/json"
39026	c.urlParams_.Set("alt", alt)
39027	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels")
39028	urls += "?" + c.urlParams_.Encode()
39029	req, _ := http.NewRequest("POST", urls, body)
39030	googleapi.Expand(req.URL, map[string]string{
39031		"project": c.project,
39032		"region":  c.region,
39033	})
39034	req.Header.Set("Content-Type", ctype)
39035	req.Header.Set("User-Agent", c.s.userAgent())
39036	if c.ctx_ != nil {
39037		return ctxhttp.Do(c.ctx_, c.s.client, req)
39038	}
39039	return c.s.client.Do(req)
39040}
39041
39042// Do executes the "compute.vpnTunnels.insert" call.
39043// Exactly one of *Operation or error will be non-nil. Any non-2xx
39044// status code is an error. Response headers are in either
39045// *Operation.ServerResponse.Header or (if a response was returned at
39046// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39047// to check whether the returned error was because
39048// http.StatusNotModified was returned.
39049func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39050	gensupport.SetOptions(c.urlParams_, opts...)
39051	res, err := c.doRequest("json")
39052	if res != nil && res.StatusCode == http.StatusNotModified {
39053		if res.Body != nil {
39054			res.Body.Close()
39055		}
39056		return nil, &googleapi.Error{
39057			Code:   res.StatusCode,
39058			Header: res.Header,
39059		}
39060	}
39061	if err != nil {
39062		return nil, err
39063	}
39064	defer googleapi.CloseBody(res)
39065	if err := googleapi.CheckResponse(res); err != nil {
39066		return nil, err
39067	}
39068	ret := &Operation{
39069		ServerResponse: googleapi.ServerResponse{
39070			Header:         res.Header,
39071			HTTPStatusCode: res.StatusCode,
39072		},
39073	}
39074	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39075		return nil, err
39076	}
39077	return ret, nil
39078	// {
39079	//   "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.",
39080	//   "httpMethod": "POST",
39081	//   "id": "compute.vpnTunnels.insert",
39082	//   "parameterOrder": [
39083	//     "project",
39084	//     "region"
39085	//   ],
39086	//   "parameters": {
39087	//     "project": {
39088	//       "description": "Project ID for this request.",
39089	//       "location": "path",
39090	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39091	//       "required": true,
39092	//       "type": "string"
39093	//     },
39094	//     "region": {
39095	//       "description": "Name of the region for this request.",
39096	//       "location": "path",
39097	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39098	//       "required": true,
39099	//       "type": "string"
39100	//     }
39101	//   },
39102	//   "path": "{project}/regions/{region}/vpnTunnels",
39103	//   "request": {
39104	//     "$ref": "VpnTunnel"
39105	//   },
39106	//   "response": {
39107	//     "$ref": "Operation"
39108	//   },
39109	//   "scopes": [
39110	//     "https://www.googleapis.com/auth/cloud-platform",
39111	//     "https://www.googleapis.com/auth/compute"
39112	//   ]
39113	// }
39114
39115}
39116
39117// method id "compute.vpnTunnels.list":
39118
39119type VpnTunnelsListCall struct {
39120	s            *Service
39121	project      string
39122	region       string
39123	urlParams_   gensupport.URLParams
39124	ifNoneMatch_ string
39125	ctx_         context.Context
39126}
39127
39128// List: Retrieves a list of VpnTunnel resources contained in the
39129// specified project and region.
39130func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall {
39131	c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39132	c.project = project
39133	c.region = region
39134	return c
39135}
39136
39137// Filter sets the optional parameter "filter": Sets a filter expression
39138// for filtering listed resources, in the form filter={expression}. Your
39139// {expression} must be in the format: field_name comparison_string
39140// literal_string.
39141//
39142// The field_name is the name of the field you want to compare. Only
39143// atomic field types are supported (string, number, boolean). The
39144// comparison_string must be either eq (equals) or ne (not equals). The
39145// literal_string is the string value to filter to. The literal value
39146// must be valid for the type of field you are filtering by (string,
39147// number, boolean). For string fields, the literal value is interpreted
39148// as a regular expression using RE2 syntax. The literal value must
39149// match the entire field.
39150//
39151// For example, to filter for instances that do not have a name of
39152// example-instance, you would use filter=name ne
39153// example-instance.
39154//
39155// Compute Engine Beta API Only: If you use filtering in the Beta API,
39156// you can also filter on nested fields. For example, you could filter
39157// on instances that have set the scheduling.automaticRestart field to
39158// true. In particular, use filtering on nested fields to take advantage
39159// of instance labels to organize and filter results based on label
39160// values.
39161//
39162// The Beta API also supports filtering on multiple expressions by
39163// providing each separate expression within parentheses. For example,
39164// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
39165// Multiple expressions are treated as AND expressions, meaning that
39166// resources must match all expressions to pass the filters.
39167func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall {
39168	c.urlParams_.Set("filter", filter)
39169	return c
39170}
39171
39172// MaxResults sets the optional parameter "maxResults": The maximum
39173// number of results per page that should be returned. If the number of
39174// available results is larger than maxResults, Compute Engine returns a
39175// nextPageToken that can be used to get the next page of results in
39176// subsequent list requests.
39177func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall {
39178	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
39179	return c
39180}
39181
39182// PageToken sets the optional parameter "pageToken": Specifies a page
39183// token to use. Set pageToken to the nextPageToken returned by a
39184// previous list request to get the next page of results.
39185func (c *VpnTunnelsListCall) PageToken(pageToken string) *VpnTunnelsListCall {
39186	c.urlParams_.Set("pageToken", pageToken)
39187	return c
39188}
39189
39190// Fields allows partial responses to be retrieved. See
39191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39192// for more information.
39193func (c *VpnTunnelsListCall) Fields(s ...googleapi.Field) *VpnTunnelsListCall {
39194	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39195	return c
39196}
39197
39198// IfNoneMatch sets the optional parameter which makes the operation
39199// fail if the object's ETag matches the given value. This is useful for
39200// getting updates only after the object has changed since the last
39201// request. Use googleapi.IsNotModified to check whether the response
39202// error from Do is the result of In-None-Match.
39203func (c *VpnTunnelsListCall) IfNoneMatch(entityTag string) *VpnTunnelsListCall {
39204	c.ifNoneMatch_ = entityTag
39205	return c
39206}
39207
39208// Context sets the context to be used in this call's Do method. Any
39209// pending HTTP request will be aborted if the provided context is
39210// canceled.
39211func (c *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall {
39212	c.ctx_ = ctx
39213	return c
39214}
39215
39216func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) {
39217	var body io.Reader = nil
39218	c.urlParams_.Set("alt", alt)
39219	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels")
39220	urls += "?" + c.urlParams_.Encode()
39221	req, _ := http.NewRequest("GET", urls, body)
39222	googleapi.Expand(req.URL, map[string]string{
39223		"project": c.project,
39224		"region":  c.region,
39225	})
39226	req.Header.Set("User-Agent", c.s.userAgent())
39227	if c.ifNoneMatch_ != "" {
39228		req.Header.Set("If-None-Match", c.ifNoneMatch_)
39229	}
39230	if c.ctx_ != nil {
39231		return ctxhttp.Do(c.ctx_, c.s.client, req)
39232	}
39233	return c.s.client.Do(req)
39234}
39235
39236// Do executes the "compute.vpnTunnels.list" call.
39237// Exactly one of *VpnTunnelList or error will be non-nil. Any non-2xx
39238// status code is an error. Response headers are in either
39239// *VpnTunnelList.ServerResponse.Header or (if a response was returned
39240// at all) in error.(*googleapi.Error).Header. Use
39241// googleapi.IsNotModified to check whether the returned error was
39242// because http.StatusNotModified was returned.
39243func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, error) {
39244	gensupport.SetOptions(c.urlParams_, opts...)
39245	res, err := c.doRequest("json")
39246	if res != nil && res.StatusCode == http.StatusNotModified {
39247		if res.Body != nil {
39248			res.Body.Close()
39249		}
39250		return nil, &googleapi.Error{
39251			Code:   res.StatusCode,
39252			Header: res.Header,
39253		}
39254	}
39255	if err != nil {
39256		return nil, err
39257	}
39258	defer googleapi.CloseBody(res)
39259	if err := googleapi.CheckResponse(res); err != nil {
39260		return nil, err
39261	}
39262	ret := &VpnTunnelList{
39263		ServerResponse: googleapi.ServerResponse{
39264			Header:         res.Header,
39265			HTTPStatusCode: res.StatusCode,
39266		},
39267	}
39268	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39269		return nil, err
39270	}
39271	return ret, nil
39272	// {
39273	//   "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.",
39274	//   "httpMethod": "GET",
39275	//   "id": "compute.vpnTunnels.list",
39276	//   "parameterOrder": [
39277	//     "project",
39278	//     "region"
39279	//   ],
39280	//   "parameters": {
39281	//     "filter": {
39282	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
39283	//       "location": "query",
39284	//       "type": "string"
39285	//     },
39286	//     "maxResults": {
39287	//       "default": "500",
39288	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
39289	//       "format": "uint32",
39290	//       "location": "query",
39291	//       "maximum": "500",
39292	//       "minimum": "0",
39293	//       "type": "integer"
39294	//     },
39295	//     "pageToken": {
39296	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
39297	//       "location": "query",
39298	//       "type": "string"
39299	//     },
39300	//     "project": {
39301	//       "description": "Project ID for this request.",
39302	//       "location": "path",
39303	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39304	//       "required": true,
39305	//       "type": "string"
39306	//     },
39307	//     "region": {
39308	//       "description": "Name of the region for this request.",
39309	//       "location": "path",
39310	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39311	//       "required": true,
39312	//       "type": "string"
39313	//     }
39314	//   },
39315	//   "path": "{project}/regions/{region}/vpnTunnels",
39316	//   "response": {
39317	//     "$ref": "VpnTunnelList"
39318	//   },
39319	//   "scopes": [
39320	//     "https://www.googleapis.com/auth/cloud-platform",
39321	//     "https://www.googleapis.com/auth/compute",
39322	//     "https://www.googleapis.com/auth/compute.readonly"
39323	//   ]
39324	// }
39325
39326}
39327
39328// Pages invokes f for each page of results.
39329// A non-nil error returned from f will halt the iteration.
39330// The provided context supersedes any context provided to the Context method.
39331func (c *VpnTunnelsListCall) Pages(ctx context.Context, f func(*VpnTunnelList) error) error {
39332	c.ctx_ = ctx
39333	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39334	for {
39335		x, err := c.Do()
39336		if err != nil {
39337			return err
39338		}
39339		if err := f(x); err != nil {
39340			return err
39341		}
39342		if x.NextPageToken == "" {
39343			return nil
39344		}
39345		c.PageToken(x.NextPageToken)
39346	}
39347}
39348
39349// method id "compute.zoneOperations.delete":
39350
39351type ZoneOperationsDeleteCall struct {
39352	s          *Service
39353	project    string
39354	zone       string
39355	operation  string
39356	urlParams_ gensupport.URLParams
39357	ctx_       context.Context
39358}
39359
39360// Delete: Deletes the specified zone-specific Operations resource.
39361// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/delete
39362func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall {
39363	c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39364	c.project = project
39365	c.zone = zone
39366	c.operation = operation
39367	return c
39368}
39369
39370// Fields allows partial responses to be retrieved. See
39371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39372// for more information.
39373func (c *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall {
39374	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39375	return c
39376}
39377
39378// Context sets the context to be used in this call's Do method. Any
39379// pending HTTP request will be aborted if the provided context is
39380// canceled.
39381func (c *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall {
39382	c.ctx_ = ctx
39383	return c
39384}
39385
39386func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
39387	var body io.Reader = nil
39388	c.urlParams_.Set("alt", alt)
39389	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}")
39390	urls += "?" + c.urlParams_.Encode()
39391	req, _ := http.NewRequest("DELETE", urls, body)
39392	googleapi.Expand(req.URL, map[string]string{
39393		"project":   c.project,
39394		"zone":      c.zone,
39395		"operation": c.operation,
39396	})
39397	req.Header.Set("User-Agent", c.s.userAgent())
39398	if c.ctx_ != nil {
39399		return ctxhttp.Do(c.ctx_, c.s.client, req)
39400	}
39401	return c.s.client.Do(req)
39402}
39403
39404// Do executes the "compute.zoneOperations.delete" call.
39405func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
39406	gensupport.SetOptions(c.urlParams_, opts...)
39407	res, err := c.doRequest("json")
39408	if err != nil {
39409		return err
39410	}
39411	defer googleapi.CloseBody(res)
39412	if err := googleapi.CheckResponse(res); err != nil {
39413		return err
39414	}
39415	return nil
39416	// {
39417	//   "description": "Deletes the specified zone-specific Operations resource.",
39418	//   "httpMethod": "DELETE",
39419	//   "id": "compute.zoneOperations.delete",
39420	//   "parameterOrder": [
39421	//     "project",
39422	//     "zone",
39423	//     "operation"
39424	//   ],
39425	//   "parameters": {
39426	//     "operation": {
39427	//       "description": "Name of the Operations resource to delete.",
39428	//       "location": "path",
39429	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39430	//       "required": true,
39431	//       "type": "string"
39432	//     },
39433	//     "project": {
39434	//       "description": "Project ID for this request.",
39435	//       "location": "path",
39436	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39437	//       "required": true,
39438	//       "type": "string"
39439	//     },
39440	//     "zone": {
39441	//       "description": "Name of the zone for this request.",
39442	//       "location": "path",
39443	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39444	//       "required": true,
39445	//       "type": "string"
39446	//     }
39447	//   },
39448	//   "path": "{project}/zones/{zone}/operations/{operation}",
39449	//   "scopes": [
39450	//     "https://www.googleapis.com/auth/cloud-platform",
39451	//     "https://www.googleapis.com/auth/compute"
39452	//   ]
39453	// }
39454
39455}
39456
39457// method id "compute.zoneOperations.get":
39458
39459type ZoneOperationsGetCall struct {
39460	s            *Service
39461	project      string
39462	zone         string
39463	operation    string
39464	urlParams_   gensupport.URLParams
39465	ifNoneMatch_ string
39466	ctx_         context.Context
39467}
39468
39469// Get: Retrieves the specified zone-specific Operations resource.
39470// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/get
39471func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall {
39472	c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39473	c.project = project
39474	c.zone = zone
39475	c.operation = operation
39476	return c
39477}
39478
39479// Fields allows partial responses to be retrieved. See
39480// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39481// for more information.
39482func (c *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall {
39483	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39484	return c
39485}
39486
39487// IfNoneMatch sets the optional parameter which makes the operation
39488// fail if the object's ETag matches the given value. This is useful for
39489// getting updates only after the object has changed since the last
39490// request. Use googleapi.IsNotModified to check whether the response
39491// error from Do is the result of In-None-Match.
39492func (c *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall {
39493	c.ifNoneMatch_ = entityTag
39494	return c
39495}
39496
39497// Context sets the context to be used in this call's Do method. Any
39498// pending HTTP request will be aborted if the provided context is
39499// canceled.
39500func (c *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall {
39501	c.ctx_ = ctx
39502	return c
39503}
39504
39505func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
39506	var body io.Reader = nil
39507	c.urlParams_.Set("alt", alt)
39508	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}")
39509	urls += "?" + c.urlParams_.Encode()
39510	req, _ := http.NewRequest("GET", urls, body)
39511	googleapi.Expand(req.URL, map[string]string{
39512		"project":   c.project,
39513		"zone":      c.zone,
39514		"operation": c.operation,
39515	})
39516	req.Header.Set("User-Agent", c.s.userAgent())
39517	if c.ifNoneMatch_ != "" {
39518		req.Header.Set("If-None-Match", c.ifNoneMatch_)
39519	}
39520	if c.ctx_ != nil {
39521		return ctxhttp.Do(c.ctx_, c.s.client, req)
39522	}
39523	return c.s.client.Do(req)
39524}
39525
39526// Do executes the "compute.zoneOperations.get" call.
39527// Exactly one of *Operation or error will be non-nil. Any non-2xx
39528// status code is an error. Response headers are in either
39529// *Operation.ServerResponse.Header or (if a response was returned at
39530// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39531// to check whether the returned error was because
39532// http.StatusNotModified was returned.
39533func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39534	gensupport.SetOptions(c.urlParams_, opts...)
39535	res, err := c.doRequest("json")
39536	if res != nil && res.StatusCode == http.StatusNotModified {
39537		if res.Body != nil {
39538			res.Body.Close()
39539		}
39540		return nil, &googleapi.Error{
39541			Code:   res.StatusCode,
39542			Header: res.Header,
39543		}
39544	}
39545	if err != nil {
39546		return nil, err
39547	}
39548	defer googleapi.CloseBody(res)
39549	if err := googleapi.CheckResponse(res); err != nil {
39550		return nil, err
39551	}
39552	ret := &Operation{
39553		ServerResponse: googleapi.ServerResponse{
39554			Header:         res.Header,
39555			HTTPStatusCode: res.StatusCode,
39556		},
39557	}
39558	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39559		return nil, err
39560	}
39561	return ret, nil
39562	// {
39563	//   "description": "Retrieves the specified zone-specific Operations resource.",
39564	//   "httpMethod": "GET",
39565	//   "id": "compute.zoneOperations.get",
39566	//   "parameterOrder": [
39567	//     "project",
39568	//     "zone",
39569	//     "operation"
39570	//   ],
39571	//   "parameters": {
39572	//     "operation": {
39573	//       "description": "Name of the Operations resource to return.",
39574	//       "location": "path",
39575	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39576	//       "required": true,
39577	//       "type": "string"
39578	//     },
39579	//     "project": {
39580	//       "description": "Project ID for this request.",
39581	//       "location": "path",
39582	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39583	//       "required": true,
39584	//       "type": "string"
39585	//     },
39586	//     "zone": {
39587	//       "description": "Name of the zone for this request.",
39588	//       "location": "path",
39589	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39590	//       "required": true,
39591	//       "type": "string"
39592	//     }
39593	//   },
39594	//   "path": "{project}/zones/{zone}/operations/{operation}",
39595	//   "response": {
39596	//     "$ref": "Operation"
39597	//   },
39598	//   "scopes": [
39599	//     "https://www.googleapis.com/auth/cloud-platform",
39600	//     "https://www.googleapis.com/auth/compute",
39601	//     "https://www.googleapis.com/auth/compute.readonly"
39602	//   ]
39603	// }
39604
39605}
39606
39607// method id "compute.zoneOperations.list":
39608
39609type ZoneOperationsListCall struct {
39610	s            *Service
39611	project      string
39612	zone         string
39613	urlParams_   gensupport.URLParams
39614	ifNoneMatch_ string
39615	ctx_         context.Context
39616}
39617
39618// List: Retrieves a list of Operation resources contained within the
39619// specified zone.
39620// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list
39621func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall {
39622	c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39623	c.project = project
39624	c.zone = zone
39625	return c
39626}
39627
39628// Filter sets the optional parameter "filter": Sets a filter expression
39629// for filtering listed resources, in the form filter={expression}. Your
39630// {expression} must be in the format: field_name comparison_string
39631// literal_string.
39632//
39633// The field_name is the name of the field you want to compare. Only
39634// atomic field types are supported (string, number, boolean). The
39635// comparison_string must be either eq (equals) or ne (not equals). The
39636// literal_string is the string value to filter to. The literal value
39637// must be valid for the type of field you are filtering by (string,
39638// number, boolean). For string fields, the literal value is interpreted
39639// as a regular expression using RE2 syntax. The literal value must
39640// match the entire field.
39641//
39642// For example, to filter for instances that do not have a name of
39643// example-instance, you would use filter=name ne
39644// example-instance.
39645//
39646// Compute Engine Beta API Only: If you use filtering in the Beta API,
39647// you can also filter on nested fields. For example, you could filter
39648// on instances that have set the scheduling.automaticRestart field to
39649// true. In particular, use filtering on nested fields to take advantage
39650// of instance labels to organize and filter results based on label
39651// values.
39652//
39653// The Beta API also supports filtering on multiple expressions by
39654// providing each separate expression within parentheses. For example,
39655// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
39656// Multiple expressions are treated as AND expressions, meaning that
39657// resources must match all expressions to pass the filters.
39658func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall {
39659	c.urlParams_.Set("filter", filter)
39660	return c
39661}
39662
39663// MaxResults sets the optional parameter "maxResults": The maximum
39664// number of results per page that should be returned. If the number of
39665// available results is larger than maxResults, Compute Engine returns a
39666// nextPageToken that can be used to get the next page of results in
39667// subsequent list requests.
39668func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall {
39669	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
39670	return c
39671}
39672
39673// PageToken sets the optional parameter "pageToken": Specifies a page
39674// token to use. Set pageToken to the nextPageToken returned by a
39675// previous list request to get the next page of results.
39676func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall {
39677	c.urlParams_.Set("pageToken", pageToken)
39678	return c
39679}
39680
39681// Fields allows partial responses to be retrieved. See
39682// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39683// for more information.
39684func (c *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall {
39685	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39686	return c
39687}
39688
39689// IfNoneMatch sets the optional parameter which makes the operation
39690// fail if the object's ETag matches the given value. This is useful for
39691// getting updates only after the object has changed since the last
39692// request. Use googleapi.IsNotModified to check whether the response
39693// error from Do is the result of In-None-Match.
39694func (c *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall {
39695	c.ifNoneMatch_ = entityTag
39696	return c
39697}
39698
39699// Context sets the context to be used in this call's Do method. Any
39700// pending HTTP request will be aborted if the provided context is
39701// canceled.
39702func (c *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall {
39703	c.ctx_ = ctx
39704	return c
39705}
39706
39707func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
39708	var body io.Reader = nil
39709	c.urlParams_.Set("alt", alt)
39710	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations")
39711	urls += "?" + c.urlParams_.Encode()
39712	req, _ := http.NewRequest("GET", urls, body)
39713	googleapi.Expand(req.URL, map[string]string{
39714		"project": c.project,
39715		"zone":    c.zone,
39716	})
39717	req.Header.Set("User-Agent", c.s.userAgent())
39718	if c.ifNoneMatch_ != "" {
39719		req.Header.Set("If-None-Match", c.ifNoneMatch_)
39720	}
39721	if c.ctx_ != nil {
39722		return ctxhttp.Do(c.ctx_, c.s.client, req)
39723	}
39724	return c.s.client.Do(req)
39725}
39726
39727// Do executes the "compute.zoneOperations.list" call.
39728// Exactly one of *OperationList or error will be non-nil. Any non-2xx
39729// status code is an error. Response headers are in either
39730// *OperationList.ServerResponse.Header or (if a response was returned
39731// at all) in error.(*googleapi.Error).Header. Use
39732// googleapi.IsNotModified to check whether the returned error was
39733// because http.StatusNotModified was returned.
39734func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) {
39735	gensupport.SetOptions(c.urlParams_, opts...)
39736	res, err := c.doRequest("json")
39737	if res != nil && res.StatusCode == http.StatusNotModified {
39738		if res.Body != nil {
39739			res.Body.Close()
39740		}
39741		return nil, &googleapi.Error{
39742			Code:   res.StatusCode,
39743			Header: res.Header,
39744		}
39745	}
39746	if err != nil {
39747		return nil, err
39748	}
39749	defer googleapi.CloseBody(res)
39750	if err := googleapi.CheckResponse(res); err != nil {
39751		return nil, err
39752	}
39753	ret := &OperationList{
39754		ServerResponse: googleapi.ServerResponse{
39755			Header:         res.Header,
39756			HTTPStatusCode: res.StatusCode,
39757		},
39758	}
39759	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39760		return nil, err
39761	}
39762	return ret, nil
39763	// {
39764	//   "description": "Retrieves a list of Operation resources contained within the specified zone.",
39765	//   "httpMethod": "GET",
39766	//   "id": "compute.zoneOperations.list",
39767	//   "parameterOrder": [
39768	//     "project",
39769	//     "zone"
39770	//   ],
39771	//   "parameters": {
39772	//     "filter": {
39773	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
39774	//       "location": "query",
39775	//       "type": "string"
39776	//     },
39777	//     "maxResults": {
39778	//       "default": "500",
39779	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
39780	//       "format": "uint32",
39781	//       "location": "query",
39782	//       "maximum": "500",
39783	//       "minimum": "0",
39784	//       "type": "integer"
39785	//     },
39786	//     "pageToken": {
39787	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
39788	//       "location": "query",
39789	//       "type": "string"
39790	//     },
39791	//     "project": {
39792	//       "description": "Project ID for this request.",
39793	//       "location": "path",
39794	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39795	//       "required": true,
39796	//       "type": "string"
39797	//     },
39798	//     "zone": {
39799	//       "description": "Name of the zone for request.",
39800	//       "location": "path",
39801	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39802	//       "required": true,
39803	//       "type": "string"
39804	//     }
39805	//   },
39806	//   "path": "{project}/zones/{zone}/operations",
39807	//   "response": {
39808	//     "$ref": "OperationList"
39809	//   },
39810	//   "scopes": [
39811	//     "https://www.googleapis.com/auth/cloud-platform",
39812	//     "https://www.googleapis.com/auth/compute",
39813	//     "https://www.googleapis.com/auth/compute.readonly"
39814	//   ]
39815	// }
39816
39817}
39818
39819// Pages invokes f for each page of results.
39820// A non-nil error returned from f will halt the iteration.
39821// The provided context supersedes any context provided to the Context method.
39822func (c *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error {
39823	c.ctx_ = ctx
39824	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39825	for {
39826		x, err := c.Do()
39827		if err != nil {
39828			return err
39829		}
39830		if err := f(x); err != nil {
39831			return err
39832		}
39833		if x.NextPageToken == "" {
39834			return nil
39835		}
39836		c.PageToken(x.NextPageToken)
39837	}
39838}
39839
39840// method id "compute.zones.get":
39841
39842type ZonesGetCall struct {
39843	s            *Service
39844	project      string
39845	zone         string
39846	urlParams_   gensupport.URLParams
39847	ifNoneMatch_ string
39848	ctx_         context.Context
39849}
39850
39851// Get: Returns the specified Zone resource. Get a list of available
39852// zones by making a list() request.
39853// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get
39854func (r *ZonesService) Get(project string, zone string) *ZonesGetCall {
39855	c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39856	c.project = project
39857	c.zone = zone
39858	return c
39859}
39860
39861// Fields allows partial responses to be retrieved. See
39862// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39863// for more information.
39864func (c *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall {
39865	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39866	return c
39867}
39868
39869// IfNoneMatch sets the optional parameter which makes the operation
39870// fail if the object's ETag matches the given value. This is useful for
39871// getting updates only after the object has changed since the last
39872// request. Use googleapi.IsNotModified to check whether the response
39873// error from Do is the result of In-None-Match.
39874func (c *ZonesGetCall) IfNoneMatch(entityTag string) *ZonesGetCall {
39875	c.ifNoneMatch_ = entityTag
39876	return c
39877}
39878
39879// Context sets the context to be used in this call's Do method. Any
39880// pending HTTP request will be aborted if the provided context is
39881// canceled.
39882func (c *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall {
39883	c.ctx_ = ctx
39884	return c
39885}
39886
39887func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) {
39888	var body io.Reader = nil
39889	c.urlParams_.Set("alt", alt)
39890	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}")
39891	urls += "?" + c.urlParams_.Encode()
39892	req, _ := http.NewRequest("GET", urls, body)
39893	googleapi.Expand(req.URL, map[string]string{
39894		"project": c.project,
39895		"zone":    c.zone,
39896	})
39897	req.Header.Set("User-Agent", c.s.userAgent())
39898	if c.ifNoneMatch_ != "" {
39899		req.Header.Set("If-None-Match", c.ifNoneMatch_)
39900	}
39901	if c.ctx_ != nil {
39902		return ctxhttp.Do(c.ctx_, c.s.client, req)
39903	}
39904	return c.s.client.Do(req)
39905}
39906
39907// Do executes the "compute.zones.get" call.
39908// Exactly one of *Zone or error will be non-nil. Any non-2xx status
39909// code is an error. Response headers are in either
39910// *Zone.ServerResponse.Header or (if a response was returned at all) in
39911// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
39912// whether the returned error was because http.StatusNotModified was
39913// returned.
39914func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) {
39915	gensupport.SetOptions(c.urlParams_, opts...)
39916	res, err := c.doRequest("json")
39917	if res != nil && res.StatusCode == http.StatusNotModified {
39918		if res.Body != nil {
39919			res.Body.Close()
39920		}
39921		return nil, &googleapi.Error{
39922			Code:   res.StatusCode,
39923			Header: res.Header,
39924		}
39925	}
39926	if err != nil {
39927		return nil, err
39928	}
39929	defer googleapi.CloseBody(res)
39930	if err := googleapi.CheckResponse(res); err != nil {
39931		return nil, err
39932	}
39933	ret := &Zone{
39934		ServerResponse: googleapi.ServerResponse{
39935			Header:         res.Header,
39936			HTTPStatusCode: res.StatusCode,
39937		},
39938	}
39939	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39940		return nil, err
39941	}
39942	return ret, nil
39943	// {
39944	//   "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.",
39945	//   "httpMethod": "GET",
39946	//   "id": "compute.zones.get",
39947	//   "parameterOrder": [
39948	//     "project",
39949	//     "zone"
39950	//   ],
39951	//   "parameters": {
39952	//     "project": {
39953	//       "description": "Project ID for this request.",
39954	//       "location": "path",
39955	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39956	//       "required": true,
39957	//       "type": "string"
39958	//     },
39959	//     "zone": {
39960	//       "description": "Name of the zone resource to return.",
39961	//       "location": "path",
39962	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39963	//       "required": true,
39964	//       "type": "string"
39965	//     }
39966	//   },
39967	//   "path": "{project}/zones/{zone}",
39968	//   "response": {
39969	//     "$ref": "Zone"
39970	//   },
39971	//   "scopes": [
39972	//     "https://www.googleapis.com/auth/cloud-platform",
39973	//     "https://www.googleapis.com/auth/compute",
39974	//     "https://www.googleapis.com/auth/compute.readonly"
39975	//   ]
39976	// }
39977
39978}
39979
39980// method id "compute.zones.list":
39981
39982type ZonesListCall struct {
39983	s            *Service
39984	project      string
39985	urlParams_   gensupport.URLParams
39986	ifNoneMatch_ string
39987	ctx_         context.Context
39988}
39989
39990// List: Retrieves the list of Zone resources available to the specified
39991// project.
39992// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list
39993func (r *ZonesService) List(project string) *ZonesListCall {
39994	c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39995	c.project = project
39996	return c
39997}
39998
39999// Filter sets the optional parameter "filter": Sets a filter expression
40000// for filtering listed resources, in the form filter={expression}. Your
40001// {expression} must be in the format: field_name comparison_string
40002// literal_string.
40003//
40004// The field_name is the name of the field you want to compare. Only
40005// atomic field types are supported (string, number, boolean). The
40006// comparison_string must be either eq (equals) or ne (not equals). The
40007// literal_string is the string value to filter to. The literal value
40008// must be valid for the type of field you are filtering by (string,
40009// number, boolean). For string fields, the literal value is interpreted
40010// as a regular expression using RE2 syntax. The literal value must
40011// match the entire field.
40012//
40013// For example, to filter for instances that do not have a name of
40014// example-instance, you would use filter=name ne
40015// example-instance.
40016//
40017// Compute Engine Beta API Only: If you use filtering in the Beta API,
40018// you can also filter on nested fields. For example, you could filter
40019// on instances that have set the scheduling.automaticRestart field to
40020// true. In particular, use filtering on nested fields to take advantage
40021// of instance labels to organize and filter results based on label
40022// values.
40023//
40024// The Beta API also supports filtering on multiple expressions by
40025// providing each separate expression within parentheses. For example,
40026// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
40027// Multiple expressions are treated as AND expressions, meaning that
40028// resources must match all expressions to pass the filters.
40029func (c *ZonesListCall) Filter(filter string) *ZonesListCall {
40030	c.urlParams_.Set("filter", filter)
40031	return c
40032}
40033
40034// MaxResults sets the optional parameter "maxResults": The maximum
40035// number of results per page that should be returned. If the number of
40036// available results is larger than maxResults, Compute Engine returns a
40037// nextPageToken that can be used to get the next page of results in
40038// subsequent list requests.
40039func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall {
40040	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40041	return c
40042}
40043
40044// PageToken sets the optional parameter "pageToken": Specifies a page
40045// token to use. Set pageToken to the nextPageToken returned by a
40046// previous list request to get the next page of results.
40047func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall {
40048	c.urlParams_.Set("pageToken", pageToken)
40049	return c
40050}
40051
40052// Fields allows partial responses to be retrieved. See
40053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40054// for more information.
40055func (c *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall {
40056	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40057	return c
40058}
40059
40060// IfNoneMatch sets the optional parameter which makes the operation
40061// fail if the object's ETag matches the given value. This is useful for
40062// getting updates only after the object has changed since the last
40063// request. Use googleapi.IsNotModified to check whether the response
40064// error from Do is the result of In-None-Match.
40065func (c *ZonesListCall) IfNoneMatch(entityTag string) *ZonesListCall {
40066	c.ifNoneMatch_ = entityTag
40067	return c
40068}
40069
40070// Context sets the context to be used in this call's Do method. Any
40071// pending HTTP request will be aborted if the provided context is
40072// canceled.
40073func (c *ZonesListCall) Context(ctx context.Context) *ZonesListCall {
40074	c.ctx_ = ctx
40075	return c
40076}
40077
40078func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) {
40079	var body io.Reader = nil
40080	c.urlParams_.Set("alt", alt)
40081	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones")
40082	urls += "?" + c.urlParams_.Encode()
40083	req, _ := http.NewRequest("GET", urls, body)
40084	googleapi.Expand(req.URL, map[string]string{
40085		"project": c.project,
40086	})
40087	req.Header.Set("User-Agent", c.s.userAgent())
40088	if c.ifNoneMatch_ != "" {
40089		req.Header.Set("If-None-Match", c.ifNoneMatch_)
40090	}
40091	if c.ctx_ != nil {
40092		return ctxhttp.Do(c.ctx_, c.s.client, req)
40093	}
40094	return c.s.client.Do(req)
40095}
40096
40097// Do executes the "compute.zones.list" call.
40098// Exactly one of *ZoneList or error will be non-nil. Any non-2xx status
40099// code is an error. Response headers are in either
40100// *ZoneList.ServerResponse.Header or (if a response was returned at
40101// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40102// to check whether the returned error was because
40103// http.StatusNotModified was returned.
40104func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) {
40105	gensupport.SetOptions(c.urlParams_, opts...)
40106	res, err := c.doRequest("json")
40107	if res != nil && res.StatusCode == http.StatusNotModified {
40108		if res.Body != nil {
40109			res.Body.Close()
40110		}
40111		return nil, &googleapi.Error{
40112			Code:   res.StatusCode,
40113			Header: res.Header,
40114		}
40115	}
40116	if err != nil {
40117		return nil, err
40118	}
40119	defer googleapi.CloseBody(res)
40120	if err := googleapi.CheckResponse(res); err != nil {
40121		return nil, err
40122	}
40123	ret := &ZoneList{
40124		ServerResponse: googleapi.ServerResponse{
40125			Header:         res.Header,
40126			HTTPStatusCode: res.StatusCode,
40127		},
40128	}
40129	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
40130		return nil, err
40131	}
40132	return ret, nil
40133	// {
40134	//   "description": "Retrieves the list of Zone resources available to the specified project.",
40135	//   "httpMethod": "GET",
40136	//   "id": "compute.zones.list",
40137	//   "parameterOrder": [
40138	//     "project"
40139	//   ],
40140	//   "parameters": {
40141	//     "filter": {
40142	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
40143	//       "location": "query",
40144	//       "type": "string"
40145	//     },
40146	//     "maxResults": {
40147	//       "default": "500",
40148	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
40149	//       "format": "uint32",
40150	//       "location": "query",
40151	//       "maximum": "500",
40152	//       "minimum": "0",
40153	//       "type": "integer"
40154	//     },
40155	//     "pageToken": {
40156	//       "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.",
40157	//       "location": "query",
40158	//       "type": "string"
40159	//     },
40160	//     "project": {
40161	//       "description": "Project ID for this request.",
40162	//       "location": "path",
40163	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40164	//       "required": true,
40165	//       "type": "string"
40166	//     }
40167	//   },
40168	//   "path": "{project}/zones",
40169	//   "response": {
40170	//     "$ref": "ZoneList"
40171	//   },
40172	//   "scopes": [
40173	//     "https://www.googleapis.com/auth/cloud-platform",
40174	//     "https://www.googleapis.com/auth/compute",
40175	//     "https://www.googleapis.com/auth/compute.readonly"
40176	//   ]
40177	// }
40178
40179}
40180
40181// Pages invokes f for each page of results.
40182// A non-nil error returned from f will halt the iteration.
40183// The provided context supersedes any context provided to the Context method.
40184func (c *ZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error {
40185	c.ctx_ = ctx
40186	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40187	for {
40188		x, err := c.Do()
40189		if err != nil {
40190			return err
40191		}
40192		if err := f(x); err != nil {
40193			return err
40194		}
40195		if x.NextPageToken == "" {
40196			return nil
40197		}
40198		c.PageToken(x.NextPageToken)
40199	}
40200}
40201