• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/v0.beta"
8//   ...
9//   computeService, err := compute.New(oauthHttpClient)
10package compute
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:beta"
44const apiName = "compute"
45const apiVersion = "beta"
46const basePath = "https://www.googleapis.com/compute/beta/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.AcceleratorTypes = NewAcceleratorTypesService(s)
75	s.Addresses = NewAddressesService(s)
76	s.Autoscalers = NewAutoscalersService(s)
77	s.BackendBuckets = NewBackendBucketsService(s)
78	s.BackendServices = NewBackendServicesService(s)
79	s.DiskTypes = NewDiskTypesService(s)
80	s.Disks = NewDisksService(s)
81	s.Firewalls = NewFirewallsService(s)
82	s.ForwardingRules = NewForwardingRulesService(s)
83	s.GlobalAddresses = NewGlobalAddressesService(s)
84	s.GlobalForwardingRules = NewGlobalForwardingRulesService(s)
85	s.GlobalOperations = NewGlobalOperationsService(s)
86	s.HealthChecks = NewHealthChecksService(s)
87	s.HttpHealthChecks = NewHttpHealthChecksService(s)
88	s.HttpsHealthChecks = NewHttpsHealthChecksService(s)
89	s.Images = NewImagesService(s)
90	s.InstanceGroupManagers = NewInstanceGroupManagersService(s)
91	s.InstanceGroups = NewInstanceGroupsService(s)
92	s.InstanceTemplates = NewInstanceTemplatesService(s)
93	s.Instances = NewInstancesService(s)
94	s.InterconnectAttachments = NewInterconnectAttachmentsService(s)
95	s.InterconnectLocations = NewInterconnectLocationsService(s)
96	s.Interconnects = NewInterconnectsService(s)
97	s.Licenses = NewLicensesService(s)
98	s.MachineTypes = NewMachineTypesService(s)
99	s.Networks = NewNetworksService(s)
100	s.Projects = NewProjectsService(s)
101	s.RegionAutoscalers = NewRegionAutoscalersService(s)
102	s.RegionBackendServices = NewRegionBackendServicesService(s)
103	s.RegionCommitments = NewRegionCommitmentsService(s)
104	s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s)
105	s.RegionInstanceGroups = NewRegionInstanceGroupsService(s)
106	s.RegionOperations = NewRegionOperationsService(s)
107	s.Regions = NewRegionsService(s)
108	s.Routers = NewRoutersService(s)
109	s.Routes = NewRoutesService(s)
110	s.SecurityPolicies = NewSecurityPoliciesService(s)
111	s.Snapshots = NewSnapshotsService(s)
112	s.SslCertificates = NewSslCertificatesService(s)
113	s.Subnetworks = NewSubnetworksService(s)
114	s.TargetHttpProxies = NewTargetHttpProxiesService(s)
115	s.TargetHttpsProxies = NewTargetHttpsProxiesService(s)
116	s.TargetInstances = NewTargetInstancesService(s)
117	s.TargetPools = NewTargetPoolsService(s)
118	s.TargetSslProxies = NewTargetSslProxiesService(s)
119	s.TargetTcpProxies = NewTargetTcpProxiesService(s)
120	s.TargetVpnGateways = NewTargetVpnGatewaysService(s)
121	s.UrlMaps = NewUrlMapsService(s)
122	s.VpnTunnels = NewVpnTunnelsService(s)
123	s.ZoneOperations = NewZoneOperationsService(s)
124	s.Zones = NewZonesService(s)
125	return s, nil
126}
127
128type Service struct {
129	client    *http.Client
130	BasePath  string // API endpoint base URL
131	UserAgent string // optional additional User-Agent fragment
132
133	AcceleratorTypes *AcceleratorTypesService
134
135	Addresses *AddressesService
136
137	Autoscalers *AutoscalersService
138
139	BackendBuckets *BackendBucketsService
140
141	BackendServices *BackendServicesService
142
143	DiskTypes *DiskTypesService
144
145	Disks *DisksService
146
147	Firewalls *FirewallsService
148
149	ForwardingRules *ForwardingRulesService
150
151	GlobalAddresses *GlobalAddressesService
152
153	GlobalForwardingRules *GlobalForwardingRulesService
154
155	GlobalOperations *GlobalOperationsService
156
157	HealthChecks *HealthChecksService
158
159	HttpHealthChecks *HttpHealthChecksService
160
161	HttpsHealthChecks *HttpsHealthChecksService
162
163	Images *ImagesService
164
165	InstanceGroupManagers *InstanceGroupManagersService
166
167	InstanceGroups *InstanceGroupsService
168
169	InstanceTemplates *InstanceTemplatesService
170
171	Instances *InstancesService
172
173	InterconnectAttachments *InterconnectAttachmentsService
174
175	InterconnectLocations *InterconnectLocationsService
176
177	Interconnects *InterconnectsService
178
179	Licenses *LicensesService
180
181	MachineTypes *MachineTypesService
182
183	Networks *NetworksService
184
185	Projects *ProjectsService
186
187	RegionAutoscalers *RegionAutoscalersService
188
189	RegionBackendServices *RegionBackendServicesService
190
191	RegionCommitments *RegionCommitmentsService
192
193	RegionInstanceGroupManagers *RegionInstanceGroupManagersService
194
195	RegionInstanceGroups *RegionInstanceGroupsService
196
197	RegionOperations *RegionOperationsService
198
199	Regions *RegionsService
200
201	Routers *RoutersService
202
203	Routes *RoutesService
204
205	SecurityPolicies *SecurityPoliciesService
206
207	Snapshots *SnapshotsService
208
209	SslCertificates *SslCertificatesService
210
211	Subnetworks *SubnetworksService
212
213	TargetHttpProxies *TargetHttpProxiesService
214
215	TargetHttpsProxies *TargetHttpsProxiesService
216
217	TargetInstances *TargetInstancesService
218
219	TargetPools *TargetPoolsService
220
221	TargetSslProxies *TargetSslProxiesService
222
223	TargetTcpProxies *TargetTcpProxiesService
224
225	TargetVpnGateways *TargetVpnGatewaysService
226
227	UrlMaps *UrlMapsService
228
229	VpnTunnels *VpnTunnelsService
230
231	ZoneOperations *ZoneOperationsService
232
233	Zones *ZonesService
234}
235
236func (s *Service) userAgent() string {
237	if s.UserAgent == "" {
238		return googleapi.UserAgent
239	}
240	return googleapi.UserAgent + " " + s.UserAgent
241}
242
243func NewAcceleratorTypesService(s *Service) *AcceleratorTypesService {
244	rs := &AcceleratorTypesService{s: s}
245	return rs
246}
247
248type AcceleratorTypesService struct {
249	s *Service
250}
251
252func NewAddressesService(s *Service) *AddressesService {
253	rs := &AddressesService{s: s}
254	return rs
255}
256
257type AddressesService struct {
258	s *Service
259}
260
261func NewAutoscalersService(s *Service) *AutoscalersService {
262	rs := &AutoscalersService{s: s}
263	return rs
264}
265
266type AutoscalersService struct {
267	s *Service
268}
269
270func NewBackendBucketsService(s *Service) *BackendBucketsService {
271	rs := &BackendBucketsService{s: s}
272	return rs
273}
274
275type BackendBucketsService struct {
276	s *Service
277}
278
279func NewBackendServicesService(s *Service) *BackendServicesService {
280	rs := &BackendServicesService{s: s}
281	return rs
282}
283
284type BackendServicesService struct {
285	s *Service
286}
287
288func NewDiskTypesService(s *Service) *DiskTypesService {
289	rs := &DiskTypesService{s: s}
290	return rs
291}
292
293type DiskTypesService struct {
294	s *Service
295}
296
297func NewDisksService(s *Service) *DisksService {
298	rs := &DisksService{s: s}
299	return rs
300}
301
302type DisksService struct {
303	s *Service
304}
305
306func NewFirewallsService(s *Service) *FirewallsService {
307	rs := &FirewallsService{s: s}
308	return rs
309}
310
311type FirewallsService struct {
312	s *Service
313}
314
315func NewForwardingRulesService(s *Service) *ForwardingRulesService {
316	rs := &ForwardingRulesService{s: s}
317	return rs
318}
319
320type ForwardingRulesService struct {
321	s *Service
322}
323
324func NewGlobalAddressesService(s *Service) *GlobalAddressesService {
325	rs := &GlobalAddressesService{s: s}
326	return rs
327}
328
329type GlobalAddressesService struct {
330	s *Service
331}
332
333func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService {
334	rs := &GlobalForwardingRulesService{s: s}
335	return rs
336}
337
338type GlobalForwardingRulesService struct {
339	s *Service
340}
341
342func NewGlobalOperationsService(s *Service) *GlobalOperationsService {
343	rs := &GlobalOperationsService{s: s}
344	return rs
345}
346
347type GlobalOperationsService struct {
348	s *Service
349}
350
351func NewHealthChecksService(s *Service) *HealthChecksService {
352	rs := &HealthChecksService{s: s}
353	return rs
354}
355
356type HealthChecksService struct {
357	s *Service
358}
359
360func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService {
361	rs := &HttpHealthChecksService{s: s}
362	return rs
363}
364
365type HttpHealthChecksService struct {
366	s *Service
367}
368
369func NewHttpsHealthChecksService(s *Service) *HttpsHealthChecksService {
370	rs := &HttpsHealthChecksService{s: s}
371	return rs
372}
373
374type HttpsHealthChecksService struct {
375	s *Service
376}
377
378func NewImagesService(s *Service) *ImagesService {
379	rs := &ImagesService{s: s}
380	return rs
381}
382
383type ImagesService struct {
384	s *Service
385}
386
387func NewInstanceGroupManagersService(s *Service) *InstanceGroupManagersService {
388	rs := &InstanceGroupManagersService{s: s}
389	return rs
390}
391
392type InstanceGroupManagersService struct {
393	s *Service
394}
395
396func NewInstanceGroupsService(s *Service) *InstanceGroupsService {
397	rs := &InstanceGroupsService{s: s}
398	return rs
399}
400
401type InstanceGroupsService struct {
402	s *Service
403}
404
405func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService {
406	rs := &InstanceTemplatesService{s: s}
407	return rs
408}
409
410type InstanceTemplatesService struct {
411	s *Service
412}
413
414func NewInstancesService(s *Service) *InstancesService {
415	rs := &InstancesService{s: s}
416	return rs
417}
418
419type InstancesService struct {
420	s *Service
421}
422
423func NewInterconnectAttachmentsService(s *Service) *InterconnectAttachmentsService {
424	rs := &InterconnectAttachmentsService{s: s}
425	return rs
426}
427
428type InterconnectAttachmentsService struct {
429	s *Service
430}
431
432func NewInterconnectLocationsService(s *Service) *InterconnectLocationsService {
433	rs := &InterconnectLocationsService{s: s}
434	return rs
435}
436
437type InterconnectLocationsService struct {
438	s *Service
439}
440
441func NewInterconnectsService(s *Service) *InterconnectsService {
442	rs := &InterconnectsService{s: s}
443	return rs
444}
445
446type InterconnectsService struct {
447	s *Service
448}
449
450func NewLicensesService(s *Service) *LicensesService {
451	rs := &LicensesService{s: s}
452	return rs
453}
454
455type LicensesService struct {
456	s *Service
457}
458
459func NewMachineTypesService(s *Service) *MachineTypesService {
460	rs := &MachineTypesService{s: s}
461	return rs
462}
463
464type MachineTypesService struct {
465	s *Service
466}
467
468func NewNetworksService(s *Service) *NetworksService {
469	rs := &NetworksService{s: s}
470	return rs
471}
472
473type NetworksService struct {
474	s *Service
475}
476
477func NewProjectsService(s *Service) *ProjectsService {
478	rs := &ProjectsService{s: s}
479	return rs
480}
481
482type ProjectsService struct {
483	s *Service
484}
485
486func NewRegionAutoscalersService(s *Service) *RegionAutoscalersService {
487	rs := &RegionAutoscalersService{s: s}
488	return rs
489}
490
491type RegionAutoscalersService struct {
492	s *Service
493}
494
495func NewRegionBackendServicesService(s *Service) *RegionBackendServicesService {
496	rs := &RegionBackendServicesService{s: s}
497	return rs
498}
499
500type RegionBackendServicesService struct {
501	s *Service
502}
503
504func NewRegionCommitmentsService(s *Service) *RegionCommitmentsService {
505	rs := &RegionCommitmentsService{s: s}
506	return rs
507}
508
509type RegionCommitmentsService struct {
510	s *Service
511}
512
513func NewRegionInstanceGroupManagersService(s *Service) *RegionInstanceGroupManagersService {
514	rs := &RegionInstanceGroupManagersService{s: s}
515	return rs
516}
517
518type RegionInstanceGroupManagersService struct {
519	s *Service
520}
521
522func NewRegionInstanceGroupsService(s *Service) *RegionInstanceGroupsService {
523	rs := &RegionInstanceGroupsService{s: s}
524	return rs
525}
526
527type RegionInstanceGroupsService struct {
528	s *Service
529}
530
531func NewRegionOperationsService(s *Service) *RegionOperationsService {
532	rs := &RegionOperationsService{s: s}
533	return rs
534}
535
536type RegionOperationsService struct {
537	s *Service
538}
539
540func NewRegionsService(s *Service) *RegionsService {
541	rs := &RegionsService{s: s}
542	return rs
543}
544
545type RegionsService struct {
546	s *Service
547}
548
549func NewRoutersService(s *Service) *RoutersService {
550	rs := &RoutersService{s: s}
551	return rs
552}
553
554type RoutersService struct {
555	s *Service
556}
557
558func NewRoutesService(s *Service) *RoutesService {
559	rs := &RoutesService{s: s}
560	return rs
561}
562
563type RoutesService struct {
564	s *Service
565}
566
567func NewSecurityPoliciesService(s *Service) *SecurityPoliciesService {
568	rs := &SecurityPoliciesService{s: s}
569	return rs
570}
571
572type SecurityPoliciesService struct {
573	s *Service
574}
575
576func NewSnapshotsService(s *Service) *SnapshotsService {
577	rs := &SnapshotsService{s: s}
578	return rs
579}
580
581type SnapshotsService struct {
582	s *Service
583}
584
585func NewSslCertificatesService(s *Service) *SslCertificatesService {
586	rs := &SslCertificatesService{s: s}
587	return rs
588}
589
590type SslCertificatesService struct {
591	s *Service
592}
593
594func NewSubnetworksService(s *Service) *SubnetworksService {
595	rs := &SubnetworksService{s: s}
596	return rs
597}
598
599type SubnetworksService struct {
600	s *Service
601}
602
603func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService {
604	rs := &TargetHttpProxiesService{s: s}
605	return rs
606}
607
608type TargetHttpProxiesService struct {
609	s *Service
610}
611
612func NewTargetHttpsProxiesService(s *Service) *TargetHttpsProxiesService {
613	rs := &TargetHttpsProxiesService{s: s}
614	return rs
615}
616
617type TargetHttpsProxiesService struct {
618	s *Service
619}
620
621func NewTargetInstancesService(s *Service) *TargetInstancesService {
622	rs := &TargetInstancesService{s: s}
623	return rs
624}
625
626type TargetInstancesService struct {
627	s *Service
628}
629
630func NewTargetPoolsService(s *Service) *TargetPoolsService {
631	rs := &TargetPoolsService{s: s}
632	return rs
633}
634
635type TargetPoolsService struct {
636	s *Service
637}
638
639func NewTargetSslProxiesService(s *Service) *TargetSslProxiesService {
640	rs := &TargetSslProxiesService{s: s}
641	return rs
642}
643
644type TargetSslProxiesService struct {
645	s *Service
646}
647
648func NewTargetTcpProxiesService(s *Service) *TargetTcpProxiesService {
649	rs := &TargetTcpProxiesService{s: s}
650	return rs
651}
652
653type TargetTcpProxiesService struct {
654	s *Service
655}
656
657func NewTargetVpnGatewaysService(s *Service) *TargetVpnGatewaysService {
658	rs := &TargetVpnGatewaysService{s: s}
659	return rs
660}
661
662type TargetVpnGatewaysService struct {
663	s *Service
664}
665
666func NewUrlMapsService(s *Service) *UrlMapsService {
667	rs := &UrlMapsService{s: s}
668	return rs
669}
670
671type UrlMapsService struct {
672	s *Service
673}
674
675func NewVpnTunnelsService(s *Service) *VpnTunnelsService {
676	rs := &VpnTunnelsService{s: s}
677	return rs
678}
679
680type VpnTunnelsService struct {
681	s *Service
682}
683
684func NewZoneOperationsService(s *Service) *ZoneOperationsService {
685	rs := &ZoneOperationsService{s: s}
686	return rs
687}
688
689type ZoneOperationsService struct {
690	s *Service
691}
692
693func NewZonesService(s *Service) *ZonesService {
694	rs := &ZonesService{s: s}
695	return rs
696}
697
698type ZonesService struct {
699	s *Service
700}
701
702// AcceleratorConfig: A specification of the type and number of
703// accelerator cards attached to the instance.
704type AcceleratorConfig struct {
705	// AcceleratorCount: The number of the guest accelerator cards exposed
706	// to this instance.
707	AcceleratorCount int64 `json:"acceleratorCount,omitempty"`
708
709	// AcceleratorType: Full or partial URL of the accelerator type resource
710	// to expose to this instance.
711	AcceleratorType string `json:"acceleratorType,omitempty"`
712
713	// ForceSendFields is a list of field names (e.g. "AcceleratorCount") to
714	// unconditionally include in API requests. By default, fields with
715	// empty values are omitted from API requests. However, any non-pointer,
716	// non-interface field appearing in ForceSendFields will be sent to the
717	// server regardless of whether the field is empty or not. This may be
718	// used to include empty fields in Patch requests.
719	ForceSendFields []string `json:"-"`
720
721	// NullFields is a list of field names (e.g. "AcceleratorCount") to
722	// include in API requests with the JSON null value. By default, fields
723	// with empty values are omitted from API requests. However, any field
724	// with an empty value appearing in NullFields will be sent to the
725	// server as null. It is an error if a field in this list has a
726	// non-empty value. This may be used to include null fields in Patch
727	// requests.
728	NullFields []string `json:"-"`
729}
730
731func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
732	type noMethod AcceleratorConfig
733	raw := noMethod(*s)
734	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
735}
736
737// AcceleratorType: An Accelerator Type resource.
738type AcceleratorType struct {
739	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
740	// format.
741	CreationTimestamp string `json:"creationTimestamp,omitempty"`
742
743	// Deprecated: [Output Only] The deprecation status associated with this
744	// accelerator type.
745	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
746
747	// Description: [Output Only] An optional textual description of the
748	// resource.
749	Description string `json:"description,omitempty"`
750
751	// Id: [Output Only] The unique identifier for the resource. This
752	// identifier is defined by the server.
753	Id uint64 `json:"id,omitempty,string"`
754
755	// Kind: [Output Only] The type of the resource. Always
756	// compute#acceleratorType for accelerator types.
757	Kind string `json:"kind,omitempty"`
758
759	// MaximumCardsPerInstance: [Output Only] Maximum accelerator cards
760	// allowed per instance.
761	MaximumCardsPerInstance int64 `json:"maximumCardsPerInstance,omitempty"`
762
763	// Name: [Output Only] Name of the resource.
764	Name string `json:"name,omitempty"`
765
766	// SelfLink: [Output Only] Server-defined fully-qualified URL for this
767	// resource.
768	SelfLink string `json:"selfLink,omitempty"`
769
770	// Zone: [Output Only] The name of the zone where the accelerator type
771	// resides, such as us-central1-a.
772	Zone string `json:"zone,omitempty"`
773
774	// ServerResponse contains the HTTP response code and headers from the
775	// server.
776	googleapi.ServerResponse `json:"-"`
777
778	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
779	// to unconditionally include in API requests. By default, fields with
780	// empty values are omitted from API requests. However, any non-pointer,
781	// non-interface field appearing in ForceSendFields will be sent to the
782	// server regardless of whether the field is empty or not. This may be
783	// used to include empty fields in Patch requests.
784	ForceSendFields []string `json:"-"`
785
786	// NullFields is a list of field names (e.g. "CreationTimestamp") to
787	// include in API requests with the JSON null value. By default, fields
788	// with empty values are omitted from API requests. However, any field
789	// with an empty value appearing in NullFields will be sent to the
790	// server as null. It is an error if a field in this list has a
791	// non-empty value. This may be used to include null fields in Patch
792	// requests.
793	NullFields []string `json:"-"`
794}
795
796func (s *AcceleratorType) MarshalJSON() ([]byte, error) {
797	type noMethod AcceleratorType
798	raw := noMethod(*s)
799	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
800}
801
802type AcceleratorTypeAggregatedList struct {
803	// Id: [Output Only] Unique identifier for the resource; defined by the
804	// server.
805	Id string `json:"id,omitempty"`
806
807	// Items: A list of AcceleratorTypesScopedList resources.
808	Items map[string]AcceleratorTypesScopedList `json:"items,omitempty"`
809
810	// Kind: [Output Only] Type of resource. Always
811	// compute#acceleratorTypeAggregatedList for aggregated lists of
812	// accelerator types.
813	Kind string `json:"kind,omitempty"`
814
815	// NextPageToken: [Output Only] This token allows you to get the next
816	// page of results for list requests. If the number of results is larger
817	// than maxResults, use the nextPageToken as a value for the query
818	// parameter pageToken in the next list request. Subsequent list
819	// requests will have their own nextPageToken to continue paging through
820	// the results.
821	NextPageToken string `json:"nextPageToken,omitempty"`
822
823	// SelfLink: [Output Only] Server-defined URL for this resource.
824	SelfLink string `json:"selfLink,omitempty"`
825
826	// ServerResponse contains the HTTP response code and headers from the
827	// server.
828	googleapi.ServerResponse `json:"-"`
829
830	// ForceSendFields is a list of field names (e.g. "Id") to
831	// unconditionally include in API requests. By default, fields with
832	// empty values are omitted from API requests. However, any non-pointer,
833	// non-interface field appearing in ForceSendFields will be sent to the
834	// server regardless of whether the field is empty or not. This may be
835	// used to include empty fields in Patch requests.
836	ForceSendFields []string `json:"-"`
837
838	// NullFields is a list of field names (e.g. "Id") to include in API
839	// requests with the JSON null value. By default, fields with empty
840	// values are omitted from API requests. However, any field with an
841	// empty value appearing in NullFields will be sent to the server as
842	// null. It is an error if a field in this list has a non-empty value.
843	// This may be used to include null fields in Patch requests.
844	NullFields []string `json:"-"`
845}
846
847func (s *AcceleratorTypeAggregatedList) MarshalJSON() ([]byte, error) {
848	type noMethod AcceleratorTypeAggregatedList
849	raw := noMethod(*s)
850	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
851}
852
853// AcceleratorTypeList: Contains a list of accelerator types.
854type AcceleratorTypeList struct {
855	// Id: [Output Only] Unique identifier for the resource; defined by the
856	// server.
857	Id string `json:"id,omitempty"`
858
859	// Items: A list of AcceleratorType resources.
860	Items []*AcceleratorType `json:"items,omitempty"`
861
862	// Kind: [Output Only] Type of resource. Always
863	// compute#acceleratorTypeList for lists of accelerator types.
864	Kind string `json:"kind,omitempty"`
865
866	// NextPageToken: [Output Only] This token allows you to get the next
867	// page of results for list requests. If the number of results is larger
868	// than maxResults, use the nextPageToken as a value for the query
869	// parameter pageToken in the next list request. Subsequent list
870	// requests will have their own nextPageToken to continue paging through
871	// the results.
872	NextPageToken string `json:"nextPageToken,omitempty"`
873
874	// SelfLink: [Output Only] Server-defined URL for this resource.
875	SelfLink string `json:"selfLink,omitempty"`
876
877	// ServerResponse contains the HTTP response code and headers from the
878	// server.
879	googleapi.ServerResponse `json:"-"`
880
881	// ForceSendFields is a list of field names (e.g. "Id") to
882	// unconditionally include in API requests. By default, fields with
883	// empty values are omitted from API requests. However, any non-pointer,
884	// non-interface field appearing in ForceSendFields will be sent to the
885	// server regardless of whether the field is empty or not. This may be
886	// used to include empty fields in Patch requests.
887	ForceSendFields []string `json:"-"`
888
889	// NullFields is a list of field names (e.g. "Id") to include in API
890	// requests with the JSON null value. By default, fields with empty
891	// values are omitted from API requests. However, any field with an
892	// empty value appearing in NullFields will be sent to the server as
893	// null. It is an error if a field in this list has a non-empty value.
894	// This may be used to include null fields in Patch requests.
895	NullFields []string `json:"-"`
896}
897
898func (s *AcceleratorTypeList) MarshalJSON() ([]byte, error) {
899	type noMethod AcceleratorTypeList
900	raw := noMethod(*s)
901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
902}
903
904type AcceleratorTypesScopedList struct {
905	// AcceleratorTypes: [Output Only] List of accelerator types contained
906	// in this scope.
907	AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"`
908
909	// Warning: [Output Only] An informational warning that appears when the
910	// accelerator types list is empty.
911	Warning *AcceleratorTypesScopedListWarning `json:"warning,omitempty"`
912
913	// ForceSendFields is a list of field names (e.g. "AcceleratorTypes") to
914	// unconditionally include in API requests. By default, fields with
915	// empty values are omitted from API requests. However, any non-pointer,
916	// non-interface field appearing in ForceSendFields will be sent to the
917	// server regardless of whether the field is empty or not. This may be
918	// used to include empty fields in Patch requests.
919	ForceSendFields []string `json:"-"`
920
921	// NullFields is a list of field names (e.g. "AcceleratorTypes") to
922	// include in API requests with the JSON null value. By default, fields
923	// with empty values are omitted from API requests. However, any field
924	// with an empty value appearing in NullFields will be sent to the
925	// server as null. It is an error if a field in this list has a
926	// non-empty value. This may be used to include null fields in Patch
927	// requests.
928	NullFields []string `json:"-"`
929}
930
931func (s *AcceleratorTypesScopedList) MarshalJSON() ([]byte, error) {
932	type noMethod AcceleratorTypesScopedList
933	raw := noMethod(*s)
934	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
935}
936
937// AcceleratorTypesScopedListWarning: [Output Only] An informational
938// warning that appears when the accelerator types list is empty.
939type AcceleratorTypesScopedListWarning struct {
940	// Code: [Output Only] A warning code, if applicable. For example,
941	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
942	// the response.
943	//
944	// Possible values:
945	//   "CLEANUP_FAILED"
946	//   "DEPRECATED_RESOURCE_USED"
947	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
948	//   "FIELD_VALUE_OVERRIDEN"
949	//   "INJECTED_KERNELS_DEPRECATED"
950	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
951	//   "NEXT_HOP_CANNOT_IP_FORWARD"
952	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
953	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
954	//   "NEXT_HOP_NOT_RUNNING"
955	//   "NOT_CRITICAL_ERROR"
956	//   "NO_RESULTS_ON_PAGE"
957	//   "REQUIRED_TOS_AGREEMENT"
958	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
959	//   "RESOURCE_NOT_DELETED"
960	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
961	//   "UNREACHABLE"
962	Code string `json:"code,omitempty"`
963
964	// Data: [Output Only] Metadata about this warning in key: value format.
965	// For example:
966	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
967	Data []*AcceleratorTypesScopedListWarningData `json:"data,omitempty"`
968
969	// Message: [Output Only] A human-readable description of the warning
970	// code.
971	Message string `json:"message,omitempty"`
972
973	// ForceSendFields is a list of field names (e.g. "Code") to
974	// unconditionally include in API requests. By default, fields with
975	// empty values are omitted from API requests. However, any non-pointer,
976	// non-interface field appearing in ForceSendFields will be sent to the
977	// server regardless of whether the field is empty or not. This may be
978	// used to include empty fields in Patch requests.
979	ForceSendFields []string `json:"-"`
980
981	// NullFields is a list of field names (e.g. "Code") to include in API
982	// requests with the JSON null value. By default, fields with empty
983	// values are omitted from API requests. However, any field with an
984	// empty value appearing in NullFields will be sent to the server as
985	// null. It is an error if a field in this list has a non-empty value.
986	// This may be used to include null fields in Patch requests.
987	NullFields []string `json:"-"`
988}
989
990func (s *AcceleratorTypesScopedListWarning) MarshalJSON() ([]byte, error) {
991	type noMethod AcceleratorTypesScopedListWarning
992	raw := noMethod(*s)
993	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
994}
995
996type AcceleratorTypesScopedListWarningData struct {
997	// Key: [Output Only] A key that provides more detail on the warning
998	// being returned. For example, for warnings where there are no results
999	// in a list request for a particular zone, this key might be scope and
1000	// the key value might be the zone name. Other examples might be a key
1001	// indicating a deprecated resource and a suggested replacement, or a
1002	// warning about invalid network settings (for example, if an instance
1003	// attempts to perform IP forwarding but is not enabled for IP
1004	// forwarding).
1005	Key string `json:"key,omitempty"`
1006
1007	// Value: [Output Only] A warning data value corresponding to the key.
1008	Value string `json:"value,omitempty"`
1009
1010	// ForceSendFields is a list of field names (e.g. "Key") to
1011	// unconditionally include in API requests. By default, fields with
1012	// empty values are omitted from API requests. However, any non-pointer,
1013	// non-interface field appearing in ForceSendFields will be sent to the
1014	// server regardless of whether the field is empty or not. This may be
1015	// used to include empty fields in Patch requests.
1016	ForceSendFields []string `json:"-"`
1017
1018	// NullFields is a list of field names (e.g. "Key") to include in API
1019	// requests with the JSON null value. By default, fields with empty
1020	// values are omitted from API requests. However, any field with an
1021	// empty value appearing in NullFields will be sent to the server as
1022	// null. It is an error if a field in this list has a non-empty value.
1023	// This may be used to include null fields in Patch requests.
1024	NullFields []string `json:"-"`
1025}
1026
1027func (s *AcceleratorTypesScopedListWarningData) MarshalJSON() ([]byte, error) {
1028	type noMethod AcceleratorTypesScopedListWarningData
1029	raw := noMethod(*s)
1030	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1031}
1032
1033// AccessConfig: An access configuration attached to an instance's
1034// network interface. Only one access config per instance is supported.
1035type AccessConfig struct {
1036	// Kind: [Output Only] Type of the resource. Always compute#accessConfig
1037	// for access configs.
1038	Kind string `json:"kind,omitempty"`
1039
1040	// Name: The name of this access configuration. The default and
1041	// recommended name is External NAT but you can use any arbitrary string
1042	// you would like. For example, My external IP or Network Access.
1043	Name string `json:"name,omitempty"`
1044
1045	// NatIP: An external IP address associated with this instance. Specify
1046	// an unused static external IP address available to the project or
1047	// leave this field undefined to use an IP from a shared ephemeral IP
1048	// address pool. If you specify a static external IP address, it must
1049	// live in the same region as the zone of the instance.
1050	NatIP string `json:"natIP,omitempty"`
1051
1052	// Type: The type of configuration. The default and only option is
1053	// ONE_TO_ONE_NAT.
1054	//
1055	// Possible values:
1056	//   "ONE_TO_ONE_NAT" (default)
1057	Type string `json:"type,omitempty"`
1058
1059	// ForceSendFields is a list of field names (e.g. "Kind") to
1060	// unconditionally include in API requests. By default, fields with
1061	// empty values are omitted from API requests. However, any non-pointer,
1062	// non-interface field appearing in ForceSendFields will be sent to the
1063	// server regardless of whether the field is empty or not. This may be
1064	// used to include empty fields in Patch requests.
1065	ForceSendFields []string `json:"-"`
1066
1067	// NullFields is a list of field names (e.g. "Kind") to include in API
1068	// requests with the JSON null value. By default, fields with empty
1069	// values are omitted from API requests. However, any field with an
1070	// empty value appearing in NullFields will be sent to the server as
1071	// null. It is an error if a field in this list has a non-empty value.
1072	// This may be used to include null fields in Patch requests.
1073	NullFields []string `json:"-"`
1074}
1075
1076func (s *AccessConfig) MarshalJSON() ([]byte, error) {
1077	type noMethod AccessConfig
1078	raw := noMethod(*s)
1079	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1080}
1081
1082// Address: A reserved address resource.
1083type Address struct {
1084	// Address: The static external IP address represented by this resource.
1085	Address string `json:"address,omitempty"`
1086
1087	// AddressType: The type of address to reserve. If unspecified, defaults
1088	// to EXTERNAL.
1089	//
1090	// Possible values:
1091	//   "EXTERNAL"
1092	//   "INTERNAL"
1093	//   "UNSPECIFIED_TYPE"
1094	AddressType string `json:"addressType,omitempty"`
1095
1096	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
1097	// format.
1098	CreationTimestamp string `json:"creationTimestamp,omitempty"`
1099
1100	// Description: An optional description of this resource. Provide this
1101	// property when you create the resource.
1102	Description string `json:"description,omitempty"`
1103
1104	// Id: [Output Only] The unique identifier for the resource. This
1105	// identifier is defined by the server.
1106	Id uint64 `json:"id,omitempty,string"`
1107
1108	// IpVersion: The IP Version that will be used by this address. Valid
1109	// options are IPV4 or IPV6. This can only be specified for a global
1110	// address.
1111	//
1112	// Possible values:
1113	//   "IPV4"
1114	//   "IPV6"
1115	//   "UNSPECIFIED_VERSION"
1116	IpVersion string `json:"ipVersion,omitempty"`
1117
1118	// Kind: [Output Only] Type of the resource. Always compute#address for
1119	// addresses.
1120	Kind string `json:"kind,omitempty"`
1121
1122	// LabelFingerprint: A fingerprint for the labels being applied to this
1123	// Address, which is essentially a hash of the labels set used for
1124	// optimistic locking. The fingerprint is initially generated by Compute
1125	// Engine and changes after every request to modify or update labels.
1126	// You must always provide an up-to-date fingerprint hash in order to
1127	// update or change labels.
1128	//
1129	// To see the latest fingerprint, make a get() request to retrieve an
1130	// Address.
1131	LabelFingerprint string `json:"labelFingerprint,omitempty"`
1132
1133	// Labels: Labels to apply to this Address resource. These can be later
1134	// modified by the setLabels method. Each label key/value must comply
1135	// with RFC1035. Label values may be empty.
1136	Labels map[string]string `json:"labels,omitempty"`
1137
1138	// Name: Name of the resource. Provided by the client when the resource
1139	// is created. The name must be 1-63 characters long, and comply with
1140	// RFC1035. Specifically, the name must be 1-63 characters long and
1141	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
1142	// the first character must be a lowercase letter, and all following
1143	// characters must be a dash, lowercase letter, or digit, except the
1144	// last character, which cannot be a dash.
1145	Name string `json:"name,omitempty"`
1146
1147	// Region: [Output Only] URL of the region where the regional address
1148	// resides. This field is not applicable to global addresses.
1149	Region string `json:"region,omitempty"`
1150
1151	// SelfLink: [Output Only] Server-defined URL for the resource.
1152	SelfLink string `json:"selfLink,omitempty"`
1153
1154	// Status: [Output Only] The status of the address, which can be either
1155	// IN_USE or RESERVED. An address that is RESERVED is currently reserved
1156	// and available to use. An IN_USE address is currently being used by
1157	// another resource and is not available.
1158	//
1159	// Possible values:
1160	//   "IN_USE"
1161	//   "RESERVED"
1162	Status string `json:"status,omitempty"`
1163
1164	// Subnetwork: For external addresses, this field should not be
1165	// used.
1166	//
1167	// The URL of the subnetwork in which to reserve the address. If an IP
1168	// address is specified, it must be within the subnetwork's IP range.
1169	Subnetwork string `json:"subnetwork,omitempty"`
1170
1171	// Users: [Output Only] The URLs of the resources that are using this
1172	// address.
1173	Users []string `json:"users,omitempty"`
1174
1175	// ServerResponse contains the HTTP response code and headers from the
1176	// server.
1177	googleapi.ServerResponse `json:"-"`
1178
1179	// ForceSendFields is a list of field names (e.g. "Address") to
1180	// unconditionally include in API requests. By default, fields with
1181	// empty values are omitted from API requests. However, any non-pointer,
1182	// non-interface field appearing in ForceSendFields will be sent to the
1183	// server regardless of whether the field is empty or not. This may be
1184	// used to include empty fields in Patch requests.
1185	ForceSendFields []string `json:"-"`
1186
1187	// NullFields is a list of field names (e.g. "Address") to include in
1188	// API requests with the JSON null value. By default, fields with empty
1189	// values are omitted from API requests. However, any field with an
1190	// empty value appearing in NullFields will be sent to the server as
1191	// null. It is an error if a field in this list has a non-empty value.
1192	// This may be used to include null fields in Patch requests.
1193	NullFields []string `json:"-"`
1194}
1195
1196func (s *Address) MarshalJSON() ([]byte, error) {
1197	type noMethod Address
1198	raw := noMethod(*s)
1199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1200}
1201
1202type AddressAggregatedList struct {
1203	// Id: [Output Only] Unique identifier for the resource; defined by the
1204	// server.
1205	Id string `json:"id,omitempty"`
1206
1207	// Items: A list of AddressesScopedList resources.
1208	Items map[string]AddressesScopedList `json:"items,omitempty"`
1209
1210	// Kind: [Output Only] Type of resource. Always
1211	// compute#addressAggregatedList for aggregated lists of addresses.
1212	Kind string `json:"kind,omitempty"`
1213
1214	// NextPageToken: [Output Only] This token allows you to get the next
1215	// page of results for list requests. If the number of results is larger
1216	// than maxResults, use the nextPageToken as a value for the query
1217	// parameter pageToken in the next list request. Subsequent list
1218	// requests will have their own nextPageToken to continue paging through
1219	// the results.
1220	NextPageToken string `json:"nextPageToken,omitempty"`
1221
1222	// SelfLink: [Output Only] Server-defined URL for this resource.
1223	SelfLink string `json:"selfLink,omitempty"`
1224
1225	// ServerResponse contains the HTTP response code and headers from the
1226	// server.
1227	googleapi.ServerResponse `json:"-"`
1228
1229	// ForceSendFields is a list of field names (e.g. "Id") to
1230	// unconditionally include in API requests. By default, fields with
1231	// empty values are omitted from API requests. However, any non-pointer,
1232	// non-interface field appearing in ForceSendFields will be sent to the
1233	// server regardless of whether the field is empty or not. This may be
1234	// used to include empty fields in Patch requests.
1235	ForceSendFields []string `json:"-"`
1236
1237	// NullFields is a list of field names (e.g. "Id") to include in API
1238	// requests with the JSON null value. By default, fields with empty
1239	// values are omitted from API requests. However, any field with an
1240	// empty value appearing in NullFields will be sent to the server as
1241	// null. It is an error if a field in this list has a non-empty value.
1242	// This may be used to include null fields in Patch requests.
1243	NullFields []string `json:"-"`
1244}
1245
1246func (s *AddressAggregatedList) MarshalJSON() ([]byte, error) {
1247	type noMethod AddressAggregatedList
1248	raw := noMethod(*s)
1249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1250}
1251
1252// AddressList: Contains a list of addresses.
1253type AddressList struct {
1254	// Id: [Output Only] Unique identifier for the resource; defined by the
1255	// server.
1256	Id string `json:"id,omitempty"`
1257
1258	// Items: A list of Address resources.
1259	Items []*Address `json:"items,omitempty"`
1260
1261	// Kind: [Output Only] Type of resource. Always compute#addressList for
1262	// lists of addresses.
1263	Kind string `json:"kind,omitempty"`
1264
1265	// NextPageToken: [Output Only] This token allows you to get the next
1266	// page of results for list requests. If the number of results is larger
1267	// than maxResults, use the nextPageToken as a value for the query
1268	// parameter pageToken in the next list request. Subsequent list
1269	// requests will have their own nextPageToken to continue paging through
1270	// the results.
1271	NextPageToken string `json:"nextPageToken,omitempty"`
1272
1273	// SelfLink: [Output Only] Server-defined URL for this resource.
1274	SelfLink string `json:"selfLink,omitempty"`
1275
1276	// ServerResponse contains the HTTP response code and headers from the
1277	// server.
1278	googleapi.ServerResponse `json:"-"`
1279
1280	// ForceSendFields is a list of field names (e.g. "Id") to
1281	// unconditionally include in API requests. By default, fields with
1282	// empty values are omitted from API requests. However, any non-pointer,
1283	// non-interface field appearing in ForceSendFields will be sent to the
1284	// server regardless of whether the field is empty or not. This may be
1285	// used to include empty fields in Patch requests.
1286	ForceSendFields []string `json:"-"`
1287
1288	// NullFields is a list of field names (e.g. "Id") to include in API
1289	// requests with the JSON null value. By default, fields with empty
1290	// values are omitted from API requests. However, any field with an
1291	// empty value appearing in NullFields will be sent to the server as
1292	// null. It is an error if a field in this list has a non-empty value.
1293	// This may be used to include null fields in Patch requests.
1294	NullFields []string `json:"-"`
1295}
1296
1297func (s *AddressList) MarshalJSON() ([]byte, error) {
1298	type noMethod AddressList
1299	raw := noMethod(*s)
1300	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1301}
1302
1303type AddressesScopedList struct {
1304	// Addresses: [Output Only] List of addresses contained in this scope.
1305	Addresses []*Address `json:"addresses,omitempty"`
1306
1307	// Warning: [Output Only] Informational warning which replaces the list
1308	// of addresses when the list is empty.
1309	Warning *AddressesScopedListWarning `json:"warning,omitempty"`
1310
1311	// ForceSendFields is a list of field names (e.g. "Addresses") to
1312	// unconditionally include in API requests. By default, fields with
1313	// empty values are omitted from API requests. However, any non-pointer,
1314	// non-interface field appearing in ForceSendFields will be sent to the
1315	// server regardless of whether the field is empty or not. This may be
1316	// used to include empty fields in Patch requests.
1317	ForceSendFields []string `json:"-"`
1318
1319	// NullFields is a list of field names (e.g. "Addresses") to include in
1320	// API requests with the JSON null value. By default, fields with empty
1321	// values are omitted from API requests. However, any field with an
1322	// empty value appearing in NullFields will be sent to the server as
1323	// null. It is an error if a field in this list has a non-empty value.
1324	// This may be used to include null fields in Patch requests.
1325	NullFields []string `json:"-"`
1326}
1327
1328func (s *AddressesScopedList) MarshalJSON() ([]byte, error) {
1329	type noMethod AddressesScopedList
1330	raw := noMethod(*s)
1331	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1332}
1333
1334// AddressesScopedListWarning: [Output Only] Informational warning which
1335// replaces the list of addresses when the list is empty.
1336type AddressesScopedListWarning struct {
1337	// Code: [Output Only] A warning code, if applicable. For example,
1338	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
1339	// the response.
1340	//
1341	// Possible values:
1342	//   "CLEANUP_FAILED"
1343	//   "DEPRECATED_RESOURCE_USED"
1344	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
1345	//   "FIELD_VALUE_OVERRIDEN"
1346	//   "INJECTED_KERNELS_DEPRECATED"
1347	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
1348	//   "NEXT_HOP_CANNOT_IP_FORWARD"
1349	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
1350	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
1351	//   "NEXT_HOP_NOT_RUNNING"
1352	//   "NOT_CRITICAL_ERROR"
1353	//   "NO_RESULTS_ON_PAGE"
1354	//   "REQUIRED_TOS_AGREEMENT"
1355	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
1356	//   "RESOURCE_NOT_DELETED"
1357	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
1358	//   "UNREACHABLE"
1359	Code string `json:"code,omitempty"`
1360
1361	// Data: [Output Only] Metadata about this warning in key: value format.
1362	// For example:
1363	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1364	Data []*AddressesScopedListWarningData `json:"data,omitempty"`
1365
1366	// Message: [Output Only] A human-readable description of the warning
1367	// code.
1368	Message string `json:"message,omitempty"`
1369
1370	// ForceSendFields is a list of field names (e.g. "Code") to
1371	// unconditionally include in API requests. By default, fields with
1372	// empty values are omitted from API requests. However, any non-pointer,
1373	// non-interface field appearing in ForceSendFields will be sent to the
1374	// server regardless of whether the field is empty or not. This may be
1375	// used to include empty fields in Patch requests.
1376	ForceSendFields []string `json:"-"`
1377
1378	// NullFields is a list of field names (e.g. "Code") to include in API
1379	// requests with the JSON null value. By default, fields with empty
1380	// values are omitted from API requests. However, any field with an
1381	// empty value appearing in NullFields will be sent to the server as
1382	// null. It is an error if a field in this list has a non-empty value.
1383	// This may be used to include null fields in Patch requests.
1384	NullFields []string `json:"-"`
1385}
1386
1387func (s *AddressesScopedListWarning) MarshalJSON() ([]byte, error) {
1388	type noMethod AddressesScopedListWarning
1389	raw := noMethod(*s)
1390	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1391}
1392
1393type AddressesScopedListWarningData struct {
1394	// Key: [Output Only] A key that provides more detail on the warning
1395	// being returned. For example, for warnings where there are no results
1396	// in a list request for a particular zone, this key might be scope and
1397	// the key value might be the zone name. Other examples might be a key
1398	// indicating a deprecated resource and a suggested replacement, or a
1399	// warning about invalid network settings (for example, if an instance
1400	// attempts to perform IP forwarding but is not enabled for IP
1401	// forwarding).
1402	Key string `json:"key,omitempty"`
1403
1404	// Value: [Output Only] A warning data value corresponding to the key.
1405	Value string `json:"value,omitempty"`
1406
1407	// ForceSendFields is a list of field names (e.g. "Key") to
1408	// unconditionally include in API requests. By default, fields with
1409	// empty values are omitted from API requests. However, any non-pointer,
1410	// non-interface field appearing in ForceSendFields will be sent to the
1411	// server regardless of whether the field is empty or not. This may be
1412	// used to include empty fields in Patch requests.
1413	ForceSendFields []string `json:"-"`
1414
1415	// NullFields is a list of field names (e.g. "Key") to include in API
1416	// requests with the JSON null value. By default, fields with empty
1417	// values are omitted from API requests. However, any field with an
1418	// empty value appearing in NullFields will be sent to the server as
1419	// null. It is an error if a field in this list has a non-empty value.
1420	// This may be used to include null fields in Patch requests.
1421	NullFields []string `json:"-"`
1422}
1423
1424func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) {
1425	type noMethod AddressesScopedListWarningData
1426	raw := noMethod(*s)
1427	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1428}
1429
1430// AliasIpRange: An alias IP range attached to an instance's network
1431// interface.
1432type AliasIpRange struct {
1433	// IpCidrRange: The IP CIDR range represented by this alias IP range.
1434	// This IP CIDR range must belong to the specified subnetwork and cannot
1435	// contain IP addresses reserved by system or used by other network
1436	// interfaces. This range may be a single IP address (e.g. 10.2.3.4), a
1437	// netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
1438	IpCidrRange string `json:"ipCidrRange,omitempty"`
1439
1440	// SubnetworkRangeName: Optional subnetwork secondary range name
1441	// specifying the secondary range from which to allocate the IP CIDR
1442	// range for this alias IP range. If left unspecified, the primary range
1443	// of the subnetwork will be used.
1444	SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"`
1445
1446	// ForceSendFields is a list of field names (e.g. "IpCidrRange") 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	// NullFields is a list of field names (e.g. "IpCidrRange") to include
1455	// in API requests with the JSON null value. By default, fields with
1456	// empty values are omitted from API requests. However, any field with
1457	// an empty value appearing in NullFields will be sent to the server as
1458	// null. It is an error if a field in this list has a non-empty value.
1459	// This may be used to include null fields in Patch requests.
1460	NullFields []string `json:"-"`
1461}
1462
1463func (s *AliasIpRange) MarshalJSON() ([]byte, error) {
1464	type noMethod AliasIpRange
1465	raw := noMethod(*s)
1466	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1467}
1468
1469// AttachedDisk: An instance-attached disk resource.
1470type AttachedDisk struct {
1471	// AutoDelete: Specifies whether the disk will be auto-deleted when the
1472	// instance is deleted (but not when the disk is detached from the
1473	// instance).
1474	AutoDelete bool `json:"autoDelete,omitempty"`
1475
1476	// Boot: Indicates that this is a boot disk. The virtual machine will
1477	// use the first partition of the disk for its root filesystem.
1478	Boot bool `json:"boot,omitempty"`
1479
1480	// DeviceName: Specifies a unique device name of your choice that is
1481	// reflected into the /dev/disk/by-id/google-* tree of a Linux operating
1482	// system running within the instance. This name can be used to
1483	// reference the device for mounting, resizing, and so on, from within
1484	// the instance.
1485	//
1486	// If not specified, the server chooses a default device name to apply
1487	// to this disk, in the form persistent-disks-x, where x is a number
1488	// assigned by Google Compute Engine. This field is only applicable for
1489	// persistent disks.
1490	DeviceName string `json:"deviceName,omitempty"`
1491
1492	// DiskEncryptionKey: Encrypts or decrypts a disk using a
1493	// customer-supplied encryption key.
1494	//
1495	// If you are creating a new disk, this field encrypts the new disk
1496	// using an encryption key that you provide. If you are attaching an
1497	// existing disk that is already encrypted, this field decrypts the disk
1498	// using the customer-supplied encryption key.
1499	//
1500	// If you encrypt a disk using a customer-supplied key, you must provide
1501	// the same key again when you attempt to use this resource at a later
1502	// time. For example, you must provide the key when you create a
1503	// snapshot or an image from the disk or when you attach the disk to a
1504	// virtual machine instance.
1505	//
1506	// If you do not provide an encryption key, then the disk will be
1507	// encrypted using an automatically generated key and you do not need to
1508	// provide a key to use the disk later.
1509	//
1510	// Instance templates do not store customer-supplied encryption keys, so
1511	// you cannot use your own keys to encrypt disks in a managed instance
1512	// group.
1513	DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"`
1514
1515	// Index: Assigns a zero-based index to this disk, where 0 is reserved
1516	// for the boot disk. For example, if you have many disks attached to an
1517	// instance, each disk would have a unique index number. If not
1518	// specified, the server will choose an appropriate value.
1519	Index int64 `json:"index,omitempty"`
1520
1521	// InitializeParams: [Input Only] Specifies the parameters for a new
1522	// disk that will be created alongside the new instance. Use
1523	// initialization parameters to create boot disks or local SSDs attached
1524	// to the new instance.
1525	//
1526	// This property is mutually exclusive with the source property; you can
1527	// only define one or the other, but not both.
1528	InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"`
1529
1530	// Interface: Specifies the disk interface to use for attaching this
1531	// disk, which is either SCSI or NVME. The default is SCSI. Persistent
1532	// disks must always use SCSI and the request will fail if you attempt
1533	// to attach a persistent disk in any other format than SCSI. Local SSDs
1534	// can use either NVME or SCSI. For performance characteristics of SCSI
1535	// over NVMe, see Local SSD performance.
1536	//
1537	// Possible values:
1538	//   "NVME"
1539	//   "SCSI"
1540	Interface string `json:"interface,omitempty"`
1541
1542	// Kind: [Output Only] Type of the resource. Always compute#attachedDisk
1543	// for attached disks.
1544	Kind string `json:"kind,omitempty"`
1545
1546	// Licenses: [Output Only] Any valid publicly visible licenses.
1547	Licenses []string `json:"licenses,omitempty"`
1548
1549	// Mode: The mode in which to attach this disk, either READ_WRITE or
1550	// READ_ONLY. If not specified, the default is to attach the disk in
1551	// READ_WRITE mode.
1552	//
1553	// Possible values:
1554	//   "READ_ONLY"
1555	//   "READ_WRITE"
1556	Mode string `json:"mode,omitempty"`
1557
1558	// Source: Specifies a valid partial or full URL to an existing
1559	// Persistent Disk resource. When creating a new instance, one of
1560	// initializeParams.sourceImage or disks.source is required.
1561	//
1562	// If desired, you can also attach existing non-root persistent disks
1563	// using this property. This field is only applicable for persistent
1564	// disks.
1565	//
1566	// Note that for InstanceTemplate, specify the disk name, not the URL
1567	// for the disk.
1568	Source string `json:"source,omitempty"`
1569
1570	// Type: Specifies the type of the disk, either SCRATCH or PERSISTENT.
1571	// If not specified, the default is PERSISTENT.
1572	//
1573	// Possible values:
1574	//   "PERSISTENT"
1575	//   "SCRATCH"
1576	Type string `json:"type,omitempty"`
1577
1578	// ForceSendFields is a list of field names (e.g. "AutoDelete") to
1579	// unconditionally include in API requests. By default, fields with
1580	// empty values are omitted from API requests. However, any non-pointer,
1581	// non-interface field appearing in ForceSendFields will be sent to the
1582	// server regardless of whether the field is empty or not. This may be
1583	// used to include empty fields in Patch requests.
1584	ForceSendFields []string `json:"-"`
1585
1586	// NullFields is a list of field names (e.g. "AutoDelete") to include in
1587	// API requests with the JSON null value. By default, fields with empty
1588	// values are omitted from API requests. However, any field with an
1589	// empty value appearing in NullFields will be sent to the server as
1590	// null. It is an error if a field in this list has a non-empty value.
1591	// This may be used to include null fields in Patch requests.
1592	NullFields []string `json:"-"`
1593}
1594
1595func (s *AttachedDisk) MarshalJSON() ([]byte, error) {
1596	type noMethod AttachedDisk
1597	raw := noMethod(*s)
1598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1599}
1600
1601// AttachedDiskInitializeParams: [Input Only] Specifies the parameters
1602// for a new disk that will be created alongside the new instance. Use
1603// initialization parameters to create boot disks or local SSDs attached
1604// to the new instance.
1605//
1606// This property is mutually exclusive with the source property; you can
1607// only define one or the other, but not both.
1608type AttachedDiskInitializeParams struct {
1609	// DiskName: Specifies the disk name. If not specified, the default is
1610	// to use the name of the instance.
1611	DiskName string `json:"diskName,omitempty"`
1612
1613	// DiskSizeGb: Specifies the size of the disk in base-2 GB.
1614	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
1615
1616	// DiskStorageType: [Deprecated] Storage type of the disk.
1617	//
1618	// Possible values:
1619	//   "HDD"
1620	//   "SSD"
1621	DiskStorageType string `json:"diskStorageType,omitempty"`
1622
1623	// DiskType: Specifies the disk type to use to create the instance. If
1624	// not specified, the default is pd-standard, specified using the full
1625	// URL. For
1626	// example:
1627	//
1628	// https://www.googleapis.com/compute/v1/projects/project/zones
1629	// /zone/diskTypes/pd-standard
1630	//
1631	// Other values include pd-ssd and local-ssd. If you define this field,
1632	// you can provide either the full or partial URL. For example, the
1633	// following are valid values:
1634	// -
1635	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
1636	// - projects/project/zones/zone/diskTypes/diskType
1637	// - zones/zone/diskTypes/diskType  Note that for InstanceTemplate, this
1638	// is the name of the disk type, not URL.
1639	DiskType string `json:"diskType,omitempty"`
1640
1641	// SourceImage: The source image to create this disk. When creating a
1642	// new instance, one of initializeParams.sourceImage or disks.source is
1643	// required.
1644	//
1645	// To create a disk with one of the public operating system images,
1646	// specify the image by its family name. For example, specify
1647	// family/debian-8 to use the latest Debian 8
1648	// image:
1649	//
1650	// projects/debian-cloud/global/images/family/debian-8
1651	//
1652	// Alternatively, use a specific version of a public operating system
1653	// image:
1654	//
1655	// projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
1656	//
1657	// To create a disk with a private image that you created, specify the
1658	// image name in the following format:
1659	//
1660	// global/images/my-private-image
1661	//
1662	// You can also specify a private image by its image family, which
1663	// returns the latest version of the image in that family. Replace the
1664	// image name with
1665	// family/family-name:
1666	//
1667	// global/images/family/my-private-family
1668	//
1669	// If the source image is deleted later, this field will not be set.
1670	SourceImage string `json:"sourceImage,omitempty"`
1671
1672	// SourceImageEncryptionKey: The customer-supplied encryption key of the
1673	// source image. Required if the source image is protected by a
1674	// customer-supplied encryption key.
1675	//
1676	// Instance templates do not store customer-supplied encryption keys, so
1677	// you cannot create disks for instances in a managed instance group if
1678	// the source images are encrypted with your own keys.
1679	SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"`
1680
1681	// ForceSendFields is a list of field names (e.g. "DiskName") to
1682	// unconditionally include in API requests. By default, fields with
1683	// empty values are omitted from API requests. However, any non-pointer,
1684	// non-interface field appearing in ForceSendFields will be sent to the
1685	// server regardless of whether the field is empty or not. This may be
1686	// used to include empty fields in Patch requests.
1687	ForceSendFields []string `json:"-"`
1688
1689	// NullFields is a list of field names (e.g. "DiskName") to include in
1690	// API requests with the JSON null value. By default, fields with empty
1691	// values are omitted from API requests. However, any field with an
1692	// empty value appearing in NullFields will be sent to the server as
1693	// null. It is an error if a field in this list has a non-empty value.
1694	// This may be used to include null fields in Patch requests.
1695	NullFields []string `json:"-"`
1696}
1697
1698func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) {
1699	type noMethod AttachedDiskInitializeParams
1700	raw := noMethod(*s)
1701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1702}
1703
1704// AuditConfig: Specifies the audit configuration for a service. The
1705// configuration determines which permission types are logged, and what
1706// identities, if any, are exempted from logging. An AuditConfig must
1707// have one or more AuditLogConfigs.
1708//
1709// If there are AuditConfigs for both `allServices` and a specific
1710// service, the union of the two AuditConfigs is used for that service:
1711// the log_types specified in each AuditConfig are enabled, and the
1712// exempted_members in each AuditConfig are exempted.
1713//
1714// Example Policy with multiple AuditConfigs:
1715//
1716// { "audit_configs": [ { "service": "allServices" "audit_log_configs":
1717// [ { "log_type": "DATA_READ", "exempted_members": [
1718// "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, {
1719// "log_type": "ADMIN_READ", } ] }, { "service":
1720// "fooservice.googleapis.com" "audit_log_configs": [ { "log_type":
1721// "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [
1722// "user:bar@gmail.com" ] } ] } ] }
1723//
1724// For fooservice, this policy enables DATA_READ, DATA_WRITE and
1725// ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ
1726// logging, and bar@gmail.com from DATA_WRITE logging.
1727type AuditConfig struct {
1728	// AuditLogConfigs: The configuration for logging of each type of
1729	// permission.
1730	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
1731
1732	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
1733
1734	// Service: Specifies a service that will be enabled for audit logging.
1735	// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1736	// `allServices` is a special value that covers all services.
1737	Service string `json:"service,omitempty"`
1738
1739	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
1740	// unconditionally include in API requests. By default, fields with
1741	// empty values are omitted from API requests. However, any non-pointer,
1742	// non-interface field appearing in ForceSendFields will be sent to the
1743	// server regardless of whether the field is empty or not. This may be
1744	// used to include empty fields in Patch requests.
1745	ForceSendFields []string `json:"-"`
1746
1747	// NullFields is a list of field names (e.g. "AuditLogConfigs") to
1748	// include in API requests with the JSON null value. By default, fields
1749	// with empty values are omitted from API requests. However, any field
1750	// with an empty value appearing in NullFields will be sent to the
1751	// server as null. It is an error if a field in this list has a
1752	// non-empty value. This may be used to include null fields in Patch
1753	// requests.
1754	NullFields []string `json:"-"`
1755}
1756
1757func (s *AuditConfig) MarshalJSON() ([]byte, error) {
1758	type noMethod AuditConfig
1759	raw := noMethod(*s)
1760	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1761}
1762
1763// AuditLogConfig: Provides the configuration for logging a type of
1764// permissions. Example:
1765//
1766// { "audit_log_configs": [ { "log_type": "DATA_READ",
1767// "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type":
1768// "DATA_WRITE", } ] }
1769//
1770// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
1771// foo@gmail.com from DATA_READ logging.
1772type AuditLogConfig struct {
1773	// ExemptedMembers: Specifies the identities that do not cause logging
1774	// for this type of permission. Follows the same format of
1775	// [Binding.members][].
1776	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
1777
1778	// LogType: The log type that this config enables.
1779	//
1780	// Possible values:
1781	//   "ADMIN_READ"
1782	//   "DATA_READ"
1783	//   "DATA_WRITE"
1784	//   "LOG_TYPE_UNSPECIFIED"
1785	LogType string `json:"logType,omitempty"`
1786
1787	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
1788	// unconditionally include in API requests. By default, fields with
1789	// empty values are omitted from API requests. However, any non-pointer,
1790	// non-interface field appearing in ForceSendFields will be sent to the
1791	// server regardless of whether the field is empty or not. This may be
1792	// used to include empty fields in Patch requests.
1793	ForceSendFields []string `json:"-"`
1794
1795	// NullFields is a list of field names (e.g. "ExemptedMembers") to
1796	// include in API requests with the JSON null value. By default, fields
1797	// with empty values are omitted from API requests. However, any field
1798	// with an empty value appearing in NullFields will be sent to the
1799	// server as null. It is an error if a field in this list has a
1800	// non-empty value. This may be used to include null fields in Patch
1801	// requests.
1802	NullFields []string `json:"-"`
1803}
1804
1805func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
1806	type noMethod AuditLogConfig
1807	raw := noMethod(*s)
1808	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1809}
1810
1811// AuthorizationLoggingOptions: Authorization-related information used
1812// by Cloud Audit Logging.
1813type AuthorizationLoggingOptions struct {
1814	// PermissionType: The type of the permission that was checked.
1815	//
1816	// Possible values:
1817	//   "ADMIN_READ"
1818	//   "ADMIN_WRITE"
1819	//   "DATA_READ"
1820	//   "DATA_WRITE"
1821	//   "PERMISSION_TYPE_UNSPECIFIED"
1822	PermissionType string `json:"permissionType,omitempty"`
1823
1824	// ForceSendFields is a list of field names (e.g. "PermissionType") to
1825	// unconditionally include in API requests. By default, fields with
1826	// empty values are omitted from API requests. However, any non-pointer,
1827	// non-interface field appearing in ForceSendFields will be sent to the
1828	// server regardless of whether the field is empty or not. This may be
1829	// used to include empty fields in Patch requests.
1830	ForceSendFields []string `json:"-"`
1831
1832	// NullFields is a list of field names (e.g. "PermissionType") to
1833	// include in API requests with the JSON null value. By default, fields
1834	// with empty values are omitted from API requests. However, any field
1835	// with an empty value appearing in NullFields will be sent to the
1836	// server as null. It is an error if a field in this list has a
1837	// non-empty value. This may be used to include null fields in Patch
1838	// requests.
1839	NullFields []string `json:"-"`
1840}
1841
1842func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) {
1843	type noMethod AuthorizationLoggingOptions
1844	raw := noMethod(*s)
1845	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1846}
1847
1848// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you
1849// to automatically scale virtual machine instances in managed instance
1850// groups according to an autoscaling policy that you define. For more
1851// information, read Autoscaling Groups of Instances.
1852type Autoscaler struct {
1853	// AutoscalingPolicy: The configuration parameters for the autoscaling
1854	// algorithm. You can define one or more of the policies for an
1855	// autoscaler: cpuUtilization, customMetricUtilizations, and
1856	// loadBalancingUtilization.
1857	//
1858	// If none of these are specified, the default will be to autoscale
1859	// based on cpuUtilization to 0.6 or 60%.
1860	AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"`
1861
1862	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
1863	// format.
1864	CreationTimestamp string `json:"creationTimestamp,omitempty"`
1865
1866	// Description: An optional description of this resource. Provide this
1867	// property when you create the resource.
1868	Description string `json:"description,omitempty"`
1869
1870	// Id: [Output Only] The unique identifier for the resource. This
1871	// identifier is defined by the server.
1872	Id uint64 `json:"id,omitempty,string"`
1873
1874	// Kind: [Output Only] Type of the resource. Always compute#autoscaler
1875	// for autoscalers.
1876	Kind string `json:"kind,omitempty"`
1877
1878	// Name: Name of the resource. Provided by the client when the resource
1879	// is created. The name must be 1-63 characters long, and comply with
1880	// RFC1035. Specifically, the name must be 1-63 characters long and
1881	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
1882	// the first character must be a lowercase letter, and all following
1883	// characters must be a dash, lowercase letter, or digit, except the
1884	// last character, which cannot be a dash.
1885	Name string `json:"name,omitempty"`
1886
1887	// Region: [Output Only] URL of the region where the instance group
1888	// resides (for autoscalers living in regional scope).
1889	Region string `json:"region,omitempty"`
1890
1891	// SelfLink: [Output Only] Server-defined URL for the resource.
1892	SelfLink string `json:"selfLink,omitempty"`
1893
1894	// Status: [Output Only] The status of the autoscaler configuration.
1895	//
1896	// Possible values:
1897	//   "ACTIVE"
1898	//   "DELETING"
1899	//   "ERROR"
1900	//   "PENDING"
1901	Status string `json:"status,omitempty"`
1902
1903	// StatusDetails: [Output Only] Human-readable details about the current
1904	// state of the autoscaler. Read the documentation for Commonly returned
1905	// status messages for examples of status messages you might encounter.
1906	StatusDetails []*AutoscalerStatusDetails `json:"statusDetails,omitempty"`
1907
1908	// Target: URL of the managed instance group that this autoscaler will
1909	// scale.
1910	Target string `json:"target,omitempty"`
1911
1912	// Zone: [Output Only] URL of the zone where the instance group resides
1913	// (for autoscalers living in zonal scope).
1914	Zone string `json:"zone,omitempty"`
1915
1916	// ServerResponse contains the HTTP response code and headers from the
1917	// server.
1918	googleapi.ServerResponse `json:"-"`
1919
1920	// ForceSendFields is a list of field names (e.g. "AutoscalingPolicy")
1921	// to unconditionally include in API requests. By default, fields with
1922	// empty values are omitted from API requests. However, any non-pointer,
1923	// non-interface field appearing in ForceSendFields will be sent to the
1924	// server regardless of whether the field is empty or not. This may be
1925	// used to include empty fields in Patch requests.
1926	ForceSendFields []string `json:"-"`
1927
1928	// NullFields is a list of field names (e.g. "AutoscalingPolicy") to
1929	// include in API requests with the JSON null value. By default, fields
1930	// with empty values are omitted from API requests. However, any field
1931	// with an empty value appearing in NullFields will be sent to the
1932	// server as null. It is an error if a field in this list has a
1933	// non-empty value. This may be used to include null fields in Patch
1934	// requests.
1935	NullFields []string `json:"-"`
1936}
1937
1938func (s *Autoscaler) MarshalJSON() ([]byte, error) {
1939	type noMethod Autoscaler
1940	raw := noMethod(*s)
1941	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1942}
1943
1944type AutoscalerAggregatedList struct {
1945	// Id: [Output Only] Unique identifier for the resource; defined by the
1946	// server.
1947	Id string `json:"id,omitempty"`
1948
1949	// Items: A list of AutoscalersScopedList resources.
1950	Items map[string]AutoscalersScopedList `json:"items,omitempty"`
1951
1952	// Kind: [Output Only] Type of resource. Always
1953	// compute#autoscalerAggregatedList for aggregated lists of autoscalers.
1954	Kind string `json:"kind,omitempty"`
1955
1956	// NextPageToken: [Output Only] This token allows you to get the next
1957	// page of results for list requests. If the number of results is larger
1958	// than maxResults, use the nextPageToken as a value for the query
1959	// parameter pageToken in the next list request. Subsequent list
1960	// requests will have their own nextPageToken to continue paging through
1961	// the results.
1962	NextPageToken string `json:"nextPageToken,omitempty"`
1963
1964	// SelfLink: [Output Only] Server-defined URL for this resource.
1965	SelfLink string `json:"selfLink,omitempty"`
1966
1967	// ServerResponse contains the HTTP response code and headers from the
1968	// server.
1969	googleapi.ServerResponse `json:"-"`
1970
1971	// ForceSendFields is a list of field names (e.g. "Id") to
1972	// unconditionally include in API requests. By default, fields with
1973	// empty values are omitted from API requests. However, any non-pointer,
1974	// non-interface field appearing in ForceSendFields will be sent to the
1975	// server regardless of whether the field is empty or not. This may be
1976	// used to include empty fields in Patch requests.
1977	ForceSendFields []string `json:"-"`
1978
1979	// NullFields is a list of field names (e.g. "Id") to include in API
1980	// requests with the JSON null value. By default, fields with empty
1981	// values are omitted from API requests. However, any field with an
1982	// empty value appearing in NullFields will be sent to the server as
1983	// null. It is an error if a field in this list has a non-empty value.
1984	// This may be used to include null fields in Patch requests.
1985	NullFields []string `json:"-"`
1986}
1987
1988func (s *AutoscalerAggregatedList) MarshalJSON() ([]byte, error) {
1989	type noMethod AutoscalerAggregatedList
1990	raw := noMethod(*s)
1991	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1992}
1993
1994// AutoscalerList: Contains a list of Autoscaler resources.
1995type AutoscalerList struct {
1996	// Id: [Output Only] Unique identifier for the resource; defined by the
1997	// server.
1998	Id string `json:"id,omitempty"`
1999
2000	// Items: A list of Autoscaler resources.
2001	Items []*Autoscaler `json:"items,omitempty"`
2002
2003	// Kind: [Output Only] Type of resource. Always compute#autoscalerList
2004	// for lists of autoscalers.
2005	Kind string `json:"kind,omitempty"`
2006
2007	// NextPageToken: [Output Only] This token allows you to get the next
2008	// page of results for list requests. If the number of results is larger
2009	// than maxResults, use the nextPageToken as a value for the query
2010	// parameter pageToken in the next list request. Subsequent list
2011	// requests will have their own nextPageToken to continue paging through
2012	// the results.
2013	NextPageToken string `json:"nextPageToken,omitempty"`
2014
2015	// SelfLink: [Output Only] Server-defined URL for this resource.
2016	SelfLink string `json:"selfLink,omitempty"`
2017
2018	// ServerResponse contains the HTTP response code and headers from the
2019	// server.
2020	googleapi.ServerResponse `json:"-"`
2021
2022	// ForceSendFields is a list of field names (e.g. "Id") to
2023	// unconditionally include in API requests. By default, fields with
2024	// empty values are omitted from API requests. However, any non-pointer,
2025	// non-interface field appearing in ForceSendFields will be sent to the
2026	// server regardless of whether the field is empty or not. This may be
2027	// used to include empty fields in Patch requests.
2028	ForceSendFields []string `json:"-"`
2029
2030	// NullFields is a list of field names (e.g. "Id") to include in API
2031	// requests with the JSON null value. By default, fields with empty
2032	// values are omitted from API requests. However, any field with an
2033	// empty value appearing in NullFields will be sent to the server as
2034	// null. It is an error if a field in this list has a non-empty value.
2035	// This may be used to include null fields in Patch requests.
2036	NullFields []string `json:"-"`
2037}
2038
2039func (s *AutoscalerList) MarshalJSON() ([]byte, error) {
2040	type noMethod AutoscalerList
2041	raw := noMethod(*s)
2042	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2043}
2044
2045type AutoscalerStatusDetails struct {
2046	// Message: The status message.
2047	Message string `json:"message,omitempty"`
2048
2049	// Type: The type of error returned.
2050	//
2051	// Possible values:
2052	//   "ALL_INSTANCES_UNHEALTHY"
2053	//   "BACKEND_SERVICE_DOES_NOT_EXIST"
2054	//   "CAPPED_AT_MAX_NUM_REPLICAS"
2055	//   "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE"
2056	//   "CUSTOM_METRIC_INVALID"
2057	//   "MIN_EQUALS_MAX"
2058	//   "MISSING_CUSTOM_METRIC_DATA_POINTS"
2059	//   "MISSING_LOAD_BALANCING_DATA_POINTS"
2060	//   "MORE_THAN_ONE_BACKEND_SERVICE"
2061	//   "NOT_ENOUGH_QUOTA_AVAILABLE"
2062	//   "REGION_RESOURCE_STOCKOUT"
2063	//   "SCALING_TARGET_DOES_NOT_EXIST"
2064	//   "UNKNOWN"
2065	//   "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION"
2066	//   "ZONE_RESOURCE_STOCKOUT"
2067	Type string `json:"type,omitempty"`
2068
2069	// ForceSendFields is a list of field names (e.g. "Message") to
2070	// unconditionally include in API requests. By default, fields with
2071	// empty values are omitted from API requests. However, any non-pointer,
2072	// non-interface field appearing in ForceSendFields will be sent to the
2073	// server regardless of whether the field is empty or not. This may be
2074	// used to include empty fields in Patch requests.
2075	ForceSendFields []string `json:"-"`
2076
2077	// NullFields is a list of field names (e.g. "Message") to include in
2078	// API requests with the JSON null value. By default, fields with empty
2079	// values are omitted from API requests. However, any field with an
2080	// empty value appearing in NullFields will be sent to the server as
2081	// null. It is an error if a field in this list has a non-empty value.
2082	// This may be used to include null fields in Patch requests.
2083	NullFields []string `json:"-"`
2084}
2085
2086func (s *AutoscalerStatusDetails) MarshalJSON() ([]byte, error) {
2087	type noMethod AutoscalerStatusDetails
2088	raw := noMethod(*s)
2089	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2090}
2091
2092type AutoscalersScopedList struct {
2093	// Autoscalers: [Output Only] List of autoscalers contained in this
2094	// scope.
2095	Autoscalers []*Autoscaler `json:"autoscalers,omitempty"`
2096
2097	// Warning: [Output Only] Informational warning which replaces the list
2098	// of autoscalers when the list is empty.
2099	Warning *AutoscalersScopedListWarning `json:"warning,omitempty"`
2100
2101	// ForceSendFields is a list of field names (e.g. "Autoscalers") to
2102	// unconditionally include in API requests. By default, fields with
2103	// empty values are omitted from API requests. However, any non-pointer,
2104	// non-interface field appearing in ForceSendFields will be sent to the
2105	// server regardless of whether the field is empty or not. This may be
2106	// used to include empty fields in Patch requests.
2107	ForceSendFields []string `json:"-"`
2108
2109	// NullFields is a list of field names (e.g. "Autoscalers") to include
2110	// in API requests with the JSON null value. By default, fields with
2111	// empty values are omitted from API requests. However, any field with
2112	// an empty value appearing in NullFields will be sent to the server as
2113	// null. It is an error if a field in this list has a non-empty value.
2114	// This may be used to include null fields in Patch requests.
2115	NullFields []string `json:"-"`
2116}
2117
2118func (s *AutoscalersScopedList) MarshalJSON() ([]byte, error) {
2119	type noMethod AutoscalersScopedList
2120	raw := noMethod(*s)
2121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2122}
2123
2124// AutoscalersScopedListWarning: [Output Only] Informational warning
2125// which replaces the list of autoscalers when the list is empty.
2126type AutoscalersScopedListWarning struct {
2127	// Code: [Output Only] A warning code, if applicable. For example,
2128	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
2129	// the response.
2130	//
2131	// Possible values:
2132	//   "CLEANUP_FAILED"
2133	//   "DEPRECATED_RESOURCE_USED"
2134	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
2135	//   "FIELD_VALUE_OVERRIDEN"
2136	//   "INJECTED_KERNELS_DEPRECATED"
2137	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
2138	//   "NEXT_HOP_CANNOT_IP_FORWARD"
2139	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
2140	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
2141	//   "NEXT_HOP_NOT_RUNNING"
2142	//   "NOT_CRITICAL_ERROR"
2143	//   "NO_RESULTS_ON_PAGE"
2144	//   "REQUIRED_TOS_AGREEMENT"
2145	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
2146	//   "RESOURCE_NOT_DELETED"
2147	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
2148	//   "UNREACHABLE"
2149	Code string `json:"code,omitempty"`
2150
2151	// Data: [Output Only] Metadata about this warning in key: value format.
2152	// For example:
2153	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2154	Data []*AutoscalersScopedListWarningData `json:"data,omitempty"`
2155
2156	// Message: [Output Only] A human-readable description of the warning
2157	// code.
2158	Message string `json:"message,omitempty"`
2159
2160	// ForceSendFields is a list of field names (e.g. "Code") to
2161	// unconditionally include in API requests. By default, fields with
2162	// empty values are omitted from API requests. However, any non-pointer,
2163	// non-interface field appearing in ForceSendFields will be sent to the
2164	// server regardless of whether the field is empty or not. This may be
2165	// used to include empty fields in Patch requests.
2166	ForceSendFields []string `json:"-"`
2167
2168	// NullFields is a list of field names (e.g. "Code") to include in API
2169	// requests with the JSON null value. By default, fields with empty
2170	// values are omitted from API requests. However, any field with an
2171	// empty value appearing in NullFields will be sent to the server as
2172	// null. It is an error if a field in this list has a non-empty value.
2173	// This may be used to include null fields in Patch requests.
2174	NullFields []string `json:"-"`
2175}
2176
2177func (s *AutoscalersScopedListWarning) MarshalJSON() ([]byte, error) {
2178	type noMethod AutoscalersScopedListWarning
2179	raw := noMethod(*s)
2180	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2181}
2182
2183type AutoscalersScopedListWarningData struct {
2184	// Key: [Output Only] A key that provides more detail on the warning
2185	// being returned. For example, for warnings where there are no results
2186	// in a list request for a particular zone, this key might be scope and
2187	// the key value might be the zone name. Other examples might be a key
2188	// indicating a deprecated resource and a suggested replacement, or a
2189	// warning about invalid network settings (for example, if an instance
2190	// attempts to perform IP forwarding but is not enabled for IP
2191	// forwarding).
2192	Key string `json:"key,omitempty"`
2193
2194	// Value: [Output Only] A warning data value corresponding to the key.
2195	Value string `json:"value,omitempty"`
2196
2197	// ForceSendFields is a list of field names (e.g. "Key") to
2198	// unconditionally include in API requests. By default, fields with
2199	// empty values are omitted from API requests. However, any non-pointer,
2200	// non-interface field appearing in ForceSendFields will be sent to the
2201	// server regardless of whether the field is empty or not. This may be
2202	// used to include empty fields in Patch requests.
2203	ForceSendFields []string `json:"-"`
2204
2205	// NullFields is a list of field names (e.g. "Key") to include in API
2206	// requests with the JSON null value. By default, fields with empty
2207	// values are omitted from API requests. However, any field with an
2208	// empty value appearing in NullFields will be sent to the server as
2209	// null. It is an error if a field in this list has a non-empty value.
2210	// This may be used to include null fields in Patch requests.
2211	NullFields []string `json:"-"`
2212}
2213
2214func (s *AutoscalersScopedListWarningData) MarshalJSON() ([]byte, error) {
2215	type noMethod AutoscalersScopedListWarningData
2216	raw := noMethod(*s)
2217	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2218}
2219
2220// AutoscalingPolicy: Cloud Autoscaler policy.
2221type AutoscalingPolicy struct {
2222	// CoolDownPeriodSec: The number of seconds that the autoscaler should
2223	// wait before it starts collecting information from a new instance.
2224	// This prevents the autoscaler from collecting information when the
2225	// instance is initializing, during which the collected usage would not
2226	// be reliable. The default time autoscaler waits is 60
2227	// seconds.
2228	//
2229	// Virtual machine initialization times might vary because of numerous
2230	// factors. We recommend that you test how long an instance may take to
2231	// initialize. To do this, create an instance and time the startup
2232	// process.
2233	CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"`
2234
2235	// CpuUtilization: Defines the CPU utilization policy that allows the
2236	// autoscaler to scale based on the average CPU utilization of a managed
2237	// instance group.
2238	CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,omitempty"`
2239
2240	// CustomMetricUtilizations: Configuration parameters of autoscaling
2241	// based on a custom metric.
2242	CustomMetricUtilizations []*AutoscalingPolicyCustomMetricUtilization `json:"customMetricUtilizations,omitempty"`
2243
2244	// LoadBalancingUtilization: Configuration parameters of autoscaling
2245	// based on load balancer.
2246	LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `json:"loadBalancingUtilization,omitempty"`
2247
2248	// MaxNumReplicas: The maximum number of instances that the autoscaler
2249	// can scale up to. This is required when creating or updating an
2250	// autoscaler. The maximum number of replicas should not be lower than
2251	// minimal number of replicas.
2252	MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"`
2253
2254	// MinNumReplicas: The minimum number of replicas that the autoscaler
2255	// can scale down to. This cannot be less than 0. If not provided,
2256	// autoscaler will choose a default value depending on maximum number of
2257	// instances allowed.
2258	MinNumReplicas int64 `json:"minNumReplicas,omitempty"`
2259
2260	// ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec")
2261	// to unconditionally include in API requests. By default, fields with
2262	// empty values are omitted from API requests. However, any non-pointer,
2263	// non-interface field appearing in ForceSendFields will be sent to the
2264	// server regardless of whether the field is empty or not. This may be
2265	// used to include empty fields in Patch requests.
2266	ForceSendFields []string `json:"-"`
2267
2268	// NullFields is a list of field names (e.g. "CoolDownPeriodSec") to
2269	// include in API requests with the JSON null value. By default, fields
2270	// with empty values are omitted from API requests. However, any field
2271	// with an empty value appearing in NullFields will be sent to the
2272	// server as null. It is an error if a field in this list has a
2273	// non-empty value. This may be used to include null fields in Patch
2274	// requests.
2275	NullFields []string `json:"-"`
2276}
2277
2278func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) {
2279	type noMethod AutoscalingPolicy
2280	raw := noMethod(*s)
2281	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2282}
2283
2284// AutoscalingPolicyCpuUtilization: CPU utilization policy.
2285type AutoscalingPolicyCpuUtilization struct {
2286	// UtilizationTarget: The target CPU utilization that the autoscaler
2287	// should maintain. Must be a float value in the range (0, 1]. If not
2288	// specified, the default is 0.6.
2289	//
2290	// If the CPU level is below the target utilization, the autoscaler
2291	// scales down the number of instances until it reaches the minimum
2292	// number of instances you specified or until the average CPU of your
2293	// instances reaches the target utilization.
2294	//
2295	// If the average CPU is above the target utilization, the autoscaler
2296	// scales up until it reaches the maximum number of instances you
2297	// specified or until the average utilization reaches the target
2298	// utilization.
2299	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
2300
2301	// ForceSendFields is a list of field names (e.g. "UtilizationTarget")
2302	// to unconditionally include in API requests. By default, fields with
2303	// empty values are omitted from API requests. However, any non-pointer,
2304	// non-interface field appearing in ForceSendFields will be sent to the
2305	// server regardless of whether the field is empty or not. This may be
2306	// used to include empty fields in Patch requests.
2307	ForceSendFields []string `json:"-"`
2308
2309	// NullFields is a list of field names (e.g. "UtilizationTarget") to
2310	// include in API requests with the JSON null value. By default, fields
2311	// with empty values are omitted from API requests. However, any field
2312	// with an empty value appearing in NullFields will be sent to the
2313	// server as null. It is an error if a field in this list has a
2314	// non-empty value. This may be used to include null fields in Patch
2315	// requests.
2316	NullFields []string `json:"-"`
2317}
2318
2319func (s *AutoscalingPolicyCpuUtilization) MarshalJSON() ([]byte, error) {
2320	type noMethod AutoscalingPolicyCpuUtilization
2321	raw := noMethod(*s)
2322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2323}
2324
2325func (s *AutoscalingPolicyCpuUtilization) UnmarshalJSON(data []byte) error {
2326	type noMethod AutoscalingPolicyCpuUtilization
2327	var s1 struct {
2328		UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"`
2329		*noMethod
2330	}
2331	s1.noMethod = (*noMethod)(s)
2332	if err := json.Unmarshal(data, &s1); err != nil {
2333		return err
2334	}
2335	s.UtilizationTarget = float64(s1.UtilizationTarget)
2336	return nil
2337}
2338
2339// AutoscalingPolicyCustomMetricUtilization: Custom utilization metric
2340// policy.
2341type AutoscalingPolicyCustomMetricUtilization struct {
2342	// Filter: A filter string, compatible with a Stackdriver Monitoring
2343	// filter string for TimeSeries.list API call. This filter is used to
2344	// select a specific TimeSeries for the purpose of autoscaling and to
2345	// determine whether the metric is exporting per-instance or global
2346	// data.
2347	//
2348	// For the filter to be valid for autoscaling purposes, the following
2349	// rules apply:
2350	// - You can only use the AND operator for joining selectors.
2351	// - You can only use direct equality comparison operator (=) without
2352	// any functions for each selector.
2353	// - You can specify the metric in both the filter string and in the
2354	// metric field. However, if specified in both places, the metric must
2355	// be identical.
2356	// - The monitored resource type determines what kind of values are
2357	// expected for the metric. If it is a gce_instance, the autoscaler
2358	// expects the metric to include a separate TimeSeries for each instance
2359	// in a group. In such a case, you cannot filter on resource labels.
2360	// If the resource type is any other value, the autoscaler expects this
2361	// metric to contain values that apply to the entire autoscaled instance
2362	// group and resource label filtering can be performed to point
2363	// autoscaler at the correct TimeSeries to scale upon. This is / called
2364	// a global metric for the purpose of autoscaling.
2365	//
2366	// If not specified, the type defaults to gce_instance.
2367	//
2368	// You should provide a filter that is selective enough to pick just one
2369	// TimeSeries for the autoscaled group or for each of the instances (if
2370	// you are using gce_instance resource type). If multiple TimeSeries are
2371	// returned upon the query execution, the autoscaler will sum their
2372	// respective values to obtain its scaling value.
2373	Filter string `json:"filter,omitempty"`
2374
2375	// Metric: The identifier (type) of the Stackdriver Monitoring metric.
2376	// The metric cannot have negative values and should be a utilization
2377	// metric, which means that the number of virtual machines handling
2378	// requests should increase or decrease proportionally to the
2379	// metric.
2380	//
2381	// The metric must have a value type of INT64 or DOUBLE.
2382	Metric string `json:"metric,omitempty"`
2383
2384	// SingleInstanceAssignment: If scaling is based on a global metric
2385	// value that represents the total amount of work to be done or resource
2386	// usage, set this value to an amount assigned for a single instance of
2387	// the scaled group. Autoscaler will keep the number of instances
2388	// proportional to the value of this metric, the metric itself should
2389	// not change value due to group resizing.
2390	//
2391	// A good metric to use with the target is for example
2392	// pubsub.googleapis.com/subscription/num_undelivered_messages or a
2393	// custom metric exporting the total number of requests coming to your
2394	// instances.
2395	//
2396	// A bad example would be a metric exporting an average or median
2397	// latency, since this value can't include a chunk assignable to a
2398	// single instance, it could be better used with utilization_target
2399	// instead.
2400	SingleInstanceAssignment float64 `json:"singleInstanceAssignment,omitempty"`
2401
2402	// UtilizationTarget: The target value of the metric that autoscaler
2403	// should maintain. This must be a positive value.
2404	//
2405	// For example, a good metric to use as a utilization_target is
2406	// compute.googleapis.com/instance/network/received_bytes_count. The
2407	// autoscaler will work to keep this value constant for each of the
2408	// instances.
2409	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
2410
2411	// UtilizationTargetType: Defines how target utilization value is
2412	// expressed for a Stackdriver Monitoring metric. Either GAUGE,
2413	// DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default
2414	// is GAUGE.
2415	//
2416	// Possible values:
2417	//   "DELTA_PER_MINUTE"
2418	//   "DELTA_PER_SECOND"
2419	//   "GAUGE"
2420	UtilizationTargetType string `json:"utilizationTargetType,omitempty"`
2421
2422	// ForceSendFields is a list of field names (e.g. "Filter") to
2423	// unconditionally include in API requests. By default, fields with
2424	// empty values are omitted from API requests. However, any non-pointer,
2425	// non-interface field appearing in ForceSendFields will be sent to the
2426	// server regardless of whether the field is empty or not. This may be
2427	// used to include empty fields in Patch requests.
2428	ForceSendFields []string `json:"-"`
2429
2430	// NullFields is a list of field names (e.g. "Filter") to include in API
2431	// requests with the JSON null value. By default, fields with empty
2432	// values are omitted from API requests. However, any field with an
2433	// empty value appearing in NullFields will be sent to the server as
2434	// null. It is an error if a field in this list has a non-empty value.
2435	// This may be used to include null fields in Patch requests.
2436	NullFields []string `json:"-"`
2437}
2438
2439func (s *AutoscalingPolicyCustomMetricUtilization) MarshalJSON() ([]byte, error) {
2440	type noMethod AutoscalingPolicyCustomMetricUtilization
2441	raw := noMethod(*s)
2442	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2443}
2444
2445func (s *AutoscalingPolicyCustomMetricUtilization) UnmarshalJSON(data []byte) error {
2446	type noMethod AutoscalingPolicyCustomMetricUtilization
2447	var s1 struct {
2448		SingleInstanceAssignment gensupport.JSONFloat64 `json:"singleInstanceAssignment"`
2449		UtilizationTarget        gensupport.JSONFloat64 `json:"utilizationTarget"`
2450		*noMethod
2451	}
2452	s1.noMethod = (*noMethod)(s)
2453	if err := json.Unmarshal(data, &s1); err != nil {
2454		return err
2455	}
2456	s.SingleInstanceAssignment = float64(s1.SingleInstanceAssignment)
2457	s.UtilizationTarget = float64(s1.UtilizationTarget)
2458	return nil
2459}
2460
2461// AutoscalingPolicyLoadBalancingUtilization: Configuration parameters
2462// of autoscaling based on load balancing.
2463type AutoscalingPolicyLoadBalancingUtilization struct {
2464	// UtilizationTarget: Fraction of backend capacity utilization (set in
2465	// HTTP(s) load balancing configuration) that autoscaler should
2466	// maintain. Must be a positive float value. If not defined, the default
2467	// is 0.8.
2468	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
2469
2470	// ForceSendFields is a list of field names (e.g. "UtilizationTarget")
2471	// to unconditionally include in API requests. By default, fields with
2472	// empty values are omitted from API requests. However, any non-pointer,
2473	// non-interface field appearing in ForceSendFields will be sent to the
2474	// server regardless of whether the field is empty or not. This may be
2475	// used to include empty fields in Patch requests.
2476	ForceSendFields []string `json:"-"`
2477
2478	// NullFields is a list of field names (e.g. "UtilizationTarget") to
2479	// include in API requests with the JSON null value. By default, fields
2480	// with empty values are omitted from API requests. However, any field
2481	// with an empty value appearing in NullFields will be sent to the
2482	// server as null. It is an error if a field in this list has a
2483	// non-empty value. This may be used to include null fields in Patch
2484	// requests.
2485	NullFields []string `json:"-"`
2486}
2487
2488func (s *AutoscalingPolicyLoadBalancingUtilization) MarshalJSON() ([]byte, error) {
2489	type noMethod AutoscalingPolicyLoadBalancingUtilization
2490	raw := noMethod(*s)
2491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2492}
2493
2494func (s *AutoscalingPolicyLoadBalancingUtilization) UnmarshalJSON(data []byte) error {
2495	type noMethod AutoscalingPolicyLoadBalancingUtilization
2496	var s1 struct {
2497		UtilizationTarget gensupport.JSONFloat64 `json:"utilizationTarget"`
2498		*noMethod
2499	}
2500	s1.noMethod = (*noMethod)(s)
2501	if err := json.Unmarshal(data, &s1); err != nil {
2502		return err
2503	}
2504	s.UtilizationTarget = float64(s1.UtilizationTarget)
2505	return nil
2506}
2507
2508// Backend: Message containing information of one individual backend.
2509type Backend struct {
2510	// BalancingMode: Specifies the balancing mode for this backend. For
2511	// global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION.
2512	// Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for
2513	// TCP/SSL).
2514	//
2515	// For Internal Load Balancing, the default and only supported mode is
2516	// CONNECTION.
2517	//
2518	// Possible values:
2519	//   "CONNECTION"
2520	//   "RATE"
2521	//   "UTILIZATION"
2522	BalancingMode string `json:"balancingMode,omitempty"`
2523
2524	// CapacityScaler: A multiplier applied to the group's maximum servicing
2525	// capacity (based on UTILIZATION, RATE or CONNECTION). Default value is
2526	// 1, which means the group will serve up to 100% of its configured
2527	// capacity (depending on balancingMode). A setting of 0 means the group
2528	// is completely drained, offering 0% of its available Capacity. Valid
2529	// range is [0.0,1.0].
2530	//
2531	// This cannot be used for internal load balancing.
2532	CapacityScaler float64 `json:"capacityScaler,omitempty"`
2533
2534	// Description: An optional description of this resource. Provide this
2535	// property when you create the resource.
2536	Description string `json:"description,omitempty"`
2537
2538	// Group: The fully-qualified URL of a Instance Group resource. This
2539	// instance group defines the list of instances that serve traffic.
2540	// Member virtual machine instances from each instance group must live
2541	// in the same zone as the instance group itself. No two backends in a
2542	// backend service are allowed to use same Instance Group
2543	// resource.
2544	//
2545	// Note that you must specify an Instance Group resource using the
2546	// fully-qualified URL, rather than a partial URL.
2547	//
2548	// When the BackendService has load balancing scheme INTERNAL, the
2549	// instance group must be within the same region as the BackendService.
2550	Group string `json:"group,omitempty"`
2551
2552	// MaxConnections: The max number of simultaneous connections for the
2553	// group. Can be used with either CONNECTION or UTILIZATION balancing
2554	// modes. For CONNECTION mode, either maxConnections or
2555	// maxConnectionsPerInstance must be set.
2556	//
2557	// This cannot be used for internal load balancing.
2558	MaxConnections int64 `json:"maxConnections,omitempty"`
2559
2560	// MaxConnectionsPerInstance: The max number of simultaneous connections
2561	// that a single backend instance can handle. This is used to calculate
2562	// the capacity of the group. Can be used in either CONNECTION or
2563	// UTILIZATION balancing modes. For CONNECTION mode, either
2564	// maxConnections or maxConnectionsPerInstance must be set.
2565	//
2566	// This cannot be used for internal load balancing.
2567	MaxConnectionsPerInstance int64 `json:"maxConnectionsPerInstance,omitempty"`
2568
2569	// MaxRate: The max requests per second (RPS) of the group. Can be used
2570	// with either RATE or UTILIZATION balancing modes, but required if RATE
2571	// mode. For RATE mode, either maxRate or maxRatePerInstance must be
2572	// set.
2573	//
2574	// This cannot be used for internal load balancing.
2575	MaxRate int64 `json:"maxRate,omitempty"`
2576
2577	// MaxRatePerInstance: The max requests per second (RPS) that a single
2578	// backend instance can handle. This is used to calculate the capacity
2579	// of the group. Can be used in either balancing mode. For RATE mode,
2580	// either maxRate or maxRatePerInstance must be set.
2581	//
2582	// This cannot be used for internal load balancing.
2583	MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"`
2584
2585	// MaxUtilization: Used when balancingMode is UTILIZATION. This ratio
2586	// defines the CPU utilization target for the group. The default is 0.8.
2587	// Valid range is [0.0, 1.0].
2588	//
2589	// This cannot be used for internal load balancing.
2590	MaxUtilization float64 `json:"maxUtilization,omitempty"`
2591
2592	// ForceSendFields is a list of field names (e.g. "BalancingMode") to
2593	// unconditionally include in API requests. By default, fields with
2594	// empty values are omitted from API requests. However, any non-pointer,
2595	// non-interface field appearing in ForceSendFields will be sent to the
2596	// server regardless of whether the field is empty or not. This may be
2597	// used to include empty fields in Patch requests.
2598	ForceSendFields []string `json:"-"`
2599
2600	// NullFields is a list of field names (e.g. "BalancingMode") to include
2601	// in API requests with the JSON null value. By default, fields with
2602	// empty values are omitted from API requests. However, any field with
2603	// an empty value appearing in NullFields will be sent to the server as
2604	// null. It is an error if a field in this list has a non-empty value.
2605	// This may be used to include null fields in Patch requests.
2606	NullFields []string `json:"-"`
2607}
2608
2609func (s *Backend) MarshalJSON() ([]byte, error) {
2610	type noMethod Backend
2611	raw := noMethod(*s)
2612	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2613}
2614
2615func (s *Backend) UnmarshalJSON(data []byte) error {
2616	type noMethod Backend
2617	var s1 struct {
2618		CapacityScaler     gensupport.JSONFloat64 `json:"capacityScaler"`
2619		MaxRatePerInstance gensupport.JSONFloat64 `json:"maxRatePerInstance"`
2620		MaxUtilization     gensupport.JSONFloat64 `json:"maxUtilization"`
2621		*noMethod
2622	}
2623	s1.noMethod = (*noMethod)(s)
2624	if err := json.Unmarshal(data, &s1); err != nil {
2625		return err
2626	}
2627	s.CapacityScaler = float64(s1.CapacityScaler)
2628	s.MaxRatePerInstance = float64(s1.MaxRatePerInstance)
2629	s.MaxUtilization = float64(s1.MaxUtilization)
2630	return nil
2631}
2632
2633// BackendBucket: A BackendBucket resource. This resource defines a
2634// Cloud Storage bucket.
2635type BackendBucket struct {
2636	// BucketName: Cloud Storage bucket name.
2637	BucketName string `json:"bucketName,omitempty"`
2638
2639	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2640	// format.
2641	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2642
2643	// Description: An optional textual description of the resource;
2644	// provided by the client when the resource is created.
2645	Description string `json:"description,omitempty"`
2646
2647	// EnableCdn: If true, enable Cloud CDN for this BackendBucket.
2648	EnableCdn bool `json:"enableCdn,omitempty"`
2649
2650	// Id: [Output Only] Unique identifier for the resource; defined by the
2651	// server.
2652	Id uint64 `json:"id,omitempty,string"`
2653
2654	// Kind: Type of the resource.
2655	Kind string `json:"kind,omitempty"`
2656
2657	// Name: Name of the resource. Provided by the client when the resource
2658	// is created. The name must be 1-63 characters long, and comply with
2659	// RFC1035. Specifically, the name must be 1-63 characters long and
2660	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
2661	// the first character must be a lowercase letter, and all following
2662	// characters must be a dash, lowercase letter, or digit, except the
2663	// last character, which cannot be a dash.
2664	Name string `json:"name,omitempty"`
2665
2666	// SelfLink: [Output Only] Server-defined URL for the resource.
2667	SelfLink string `json:"selfLink,omitempty"`
2668
2669	// ServerResponse contains the HTTP response code and headers from the
2670	// server.
2671	googleapi.ServerResponse `json:"-"`
2672
2673	// ForceSendFields is a list of field names (e.g. "BucketName") to
2674	// unconditionally include in API requests. By default, fields with
2675	// empty values are omitted from API requests. However, any non-pointer,
2676	// non-interface field appearing in ForceSendFields will be sent to the
2677	// server regardless of whether the field is empty or not. This may be
2678	// used to include empty fields in Patch requests.
2679	ForceSendFields []string `json:"-"`
2680
2681	// NullFields is a list of field names (e.g. "BucketName") to include in
2682	// API requests with the JSON null value. By default, fields with empty
2683	// values are omitted from API requests. However, any field with an
2684	// empty value appearing in NullFields will be sent to the server as
2685	// null. It is an error if a field in this list has a non-empty value.
2686	// This may be used to include null fields in Patch requests.
2687	NullFields []string `json:"-"`
2688}
2689
2690func (s *BackendBucket) MarshalJSON() ([]byte, error) {
2691	type noMethod BackendBucket
2692	raw := noMethod(*s)
2693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2694}
2695
2696// BackendBucketList: Contains a list of BackendBucket resources.
2697type BackendBucketList struct {
2698	// Id: [Output Only] Unique identifier for the resource; defined by the
2699	// server.
2700	Id string `json:"id,omitempty"`
2701
2702	// Items: A list of BackendBucket resources.
2703	Items []*BackendBucket `json:"items,omitempty"`
2704
2705	// Kind: Type of resource.
2706	Kind string `json:"kind,omitempty"`
2707
2708	// NextPageToken: [Output Only] This token allows you to get the next
2709	// page of results for list requests. If the number of results is larger
2710	// than maxResults, use the nextPageToken as a value for the query
2711	// parameter pageToken in the next list request. Subsequent list
2712	// requests will have their own nextPageToken to continue paging through
2713	// the results.
2714	NextPageToken string `json:"nextPageToken,omitempty"`
2715
2716	// SelfLink: [Output Only] Server-defined URL for this resource.
2717	SelfLink string `json:"selfLink,omitempty"`
2718
2719	// ServerResponse contains the HTTP response code and headers from the
2720	// server.
2721	googleapi.ServerResponse `json:"-"`
2722
2723	// ForceSendFields is a list of field names (e.g. "Id") to
2724	// unconditionally include in API requests. By default, fields with
2725	// empty values are omitted from API requests. However, any non-pointer,
2726	// non-interface field appearing in ForceSendFields will be sent to the
2727	// server regardless of whether the field is empty or not. This may be
2728	// used to include empty fields in Patch requests.
2729	ForceSendFields []string `json:"-"`
2730
2731	// NullFields is a list of field names (e.g. "Id") to include in API
2732	// requests with the JSON null value. By default, fields with empty
2733	// values are omitted from API requests. However, any field with an
2734	// empty value appearing in NullFields will be sent to the server as
2735	// null. It is an error if a field in this list has a non-empty value.
2736	// This may be used to include null fields in Patch requests.
2737	NullFields []string `json:"-"`
2738}
2739
2740func (s *BackendBucketList) MarshalJSON() ([]byte, error) {
2741	type noMethod BackendBucketList
2742	raw := noMethod(*s)
2743	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2744}
2745
2746// BackendService: A BackendService resource. This resource defines a
2747// group of backend virtual machines and their serving capacity.
2748type BackendService struct {
2749	// AffinityCookieTtlSec: Lifetime of cookies in seconds if
2750	// session_affinity is GENERATED_COOKIE. If set to 0, the cookie is
2751	// non-persistent and lasts only until the end of the browser session
2752	// (or equivalent). The maximum allowed value for TTL is one day.
2753	//
2754	// When the load balancing scheme is INTERNAL, this field is not used.
2755	AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"`
2756
2757	// Backends: The list of backends that serve this BackendService.
2758	Backends []*Backend `json:"backends,omitempty"`
2759
2760	// CdnPolicy: Cloud CDN configuration for this BackendService.
2761	CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"`
2762
2763	ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"`
2764
2765	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2766	// format.
2767	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2768
2769	// Description: An optional description of this resource. Provide this
2770	// property when you create the resource.
2771	Description string `json:"description,omitempty"`
2772
2773	// EnableCDN: If true, enable Cloud CDN for this BackendService.
2774	//
2775	// When the load balancing scheme is INTERNAL, this field is not used.
2776	EnableCDN bool `json:"enableCDN,omitempty"`
2777
2778	// Fingerprint: Fingerprint of this resource. A hash of the contents
2779	// stored in this object. This field is used in optimistic locking. This
2780	// field will be ignored when inserting a BackendService. An up-to-date
2781	// fingerprint must be provided in order to update the BackendService.
2782	Fingerprint string `json:"fingerprint,omitempty"`
2783
2784	// HealthChecks: The list of URLs to the HttpHealthCheck or
2785	// HttpsHealthCheck resource for health checking this BackendService.
2786	// Currently at most one health check can be specified, and a health
2787	// check is required for Compute Engine backend services. A health check
2788	// must not be specified for App Engine backend and Cloud Function
2789	// backend.
2790	//
2791	// For internal load balancing, a URL to a HealthCheck resource must be
2792	// specified instead.
2793	HealthChecks []string `json:"healthChecks,omitempty"`
2794
2795	Iap *BackendServiceIAP `json:"iap,omitempty"`
2796
2797	// Id: [Output Only] The unique identifier for the resource. This
2798	// identifier is defined by the server.
2799	Id uint64 `json:"id,omitempty,string"`
2800
2801	// Kind: [Output Only] Type of resource. Always compute#backendService
2802	// for backend services.
2803	Kind string `json:"kind,omitempty"`
2804
2805	// LoadBalancingScheme: Indicates whether the backend service will be
2806	// used with internal or external load balancing. A backend service
2807	// created for one type of load balancing cannot be used with the other.
2808	// Possible values are INTERNAL and EXTERNAL.
2809	//
2810	// Possible values:
2811	//   "EXTERNAL"
2812	//   "INTERNAL"
2813	//   "INVALID_LOAD_BALANCING_SCHEME"
2814	LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
2815
2816	// Name: Name of the resource. Provided by the client when the resource
2817	// is created. The name must be 1-63 characters long, and comply with
2818	// RFC1035. Specifically, the name must be 1-63 characters long and
2819	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
2820	// the first character must be a lowercase letter, and all following
2821	// characters must be a dash, lowercase letter, or digit, except the
2822	// last character, which cannot be a dash.
2823	Name string `json:"name,omitempty"`
2824
2825	// Port: Deprecated in favor of portName. The TCP port to connect on the
2826	// backend. The default value is 80.
2827	//
2828	// This cannot be used for internal load balancing.
2829	Port int64 `json:"port,omitempty"`
2830
2831	// PortName: Name of backend port. The same name should appear in the
2832	// instance groups referenced by this service. Required when the load
2833	// balancing scheme is EXTERNAL.
2834	//
2835	// When the load balancing scheme is INTERNAL, this field is not used.
2836	PortName string `json:"portName,omitempty"`
2837
2838	// Protocol: The protocol this BackendService uses to communicate with
2839	// backends.
2840	//
2841	// Possible values are HTTP, HTTPS, TCP, and SSL. The default is
2842	// HTTP.
2843	//
2844	// For internal load balancing, the possible values are TCP and UDP, and
2845	// the default is TCP.
2846	//
2847	// Possible values:
2848	//   "HTTP"
2849	//   "HTTPS"
2850	//   "SSL"
2851	//   "TCP"
2852	//   "UDP"
2853	Protocol string `json:"protocol,omitempty"`
2854
2855	// Region: [Output Only] URL of the region where the regional backend
2856	// service resides. This field is not applicable to global backend
2857	// services.
2858	Region string `json:"region,omitempty"`
2859
2860	// SecurityPolicy: [Output Only] The resource URL for the security
2861	// policy associated with this backend service.
2862	SecurityPolicy string `json:"securityPolicy,omitempty"`
2863
2864	// SelfLink: [Output Only] Server-defined URL for the resource.
2865	SelfLink string `json:"selfLink,omitempty"`
2866
2867	// SessionAffinity: Type of session affinity to use. The default is
2868	// NONE.
2869	//
2870	// When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP,
2871	// or GENERATED_COOKIE.
2872	//
2873	// When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP,
2874	// CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
2875	//
2876	// When the protocol is UDP, this field is not used.
2877	//
2878	// Possible values:
2879	//   "CLIENT_IP"
2880	//   "CLIENT_IP_PORT_PROTO"
2881	//   "CLIENT_IP_PROTO"
2882	//   "GENERATED_COOKIE"
2883	//   "NONE"
2884	SessionAffinity string `json:"sessionAffinity,omitempty"`
2885
2886	// TimeoutSec: How many seconds to wait for the backend before
2887	// considering it a failed request. Default is 30 seconds.
2888	TimeoutSec int64 `json:"timeoutSec,omitempty"`
2889
2890	// ServerResponse contains the HTTP response code and headers from the
2891	// server.
2892	googleapi.ServerResponse `json:"-"`
2893
2894	// ForceSendFields is a list of field names (e.g.
2895	// "AffinityCookieTtlSec") to unconditionally include in API requests.
2896	// By default, fields with empty values are omitted from API requests.
2897	// However, any non-pointer, non-interface field appearing in
2898	// ForceSendFields will be sent to the server regardless of whether the
2899	// field is empty or not. This may be used to include empty fields in
2900	// Patch requests.
2901	ForceSendFields []string `json:"-"`
2902
2903	// NullFields is a list of field names (e.g. "AffinityCookieTtlSec") to
2904	// include in API requests with the JSON null value. By default, fields
2905	// with empty values are omitted from API requests. However, any field
2906	// with an empty value appearing in NullFields will be sent to the
2907	// server as null. It is an error if a field in this list has a
2908	// non-empty value. This may be used to include null fields in Patch
2909	// requests.
2910	NullFields []string `json:"-"`
2911}
2912
2913func (s *BackendService) MarshalJSON() ([]byte, error) {
2914	type noMethod BackendService
2915	raw := noMethod(*s)
2916	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2917}
2918
2919// BackendServiceAggregatedList: Contains a list of
2920// BackendServicesScopedList.
2921type BackendServiceAggregatedList struct {
2922	// Id: [Output Only] Unique identifier for the resource; defined by the
2923	// server.
2924	Id string `json:"id,omitempty"`
2925
2926	// Items: A list of BackendServicesScopedList resources.
2927	Items map[string]BackendServicesScopedList `json:"items,omitempty"`
2928
2929	// Kind: Type of resource.
2930	Kind string `json:"kind,omitempty"`
2931
2932	// NextPageToken: [Output Only] This token allows you to get the next
2933	// page of results for list requests. If the number of results is larger
2934	// than maxResults, use the nextPageToken as a value for the query
2935	// parameter pageToken in the next list request. Subsequent list
2936	// requests will have their own nextPageToken to continue paging through
2937	// the results.
2938	NextPageToken string `json:"nextPageToken,omitempty"`
2939
2940	// SelfLink: [Output Only] Server-defined URL for this resource.
2941	SelfLink string `json:"selfLink,omitempty"`
2942
2943	// ServerResponse contains the HTTP response code and headers from the
2944	// server.
2945	googleapi.ServerResponse `json:"-"`
2946
2947	// ForceSendFields is a list of field names (e.g. "Id") to
2948	// unconditionally include in API requests. By default, fields with
2949	// empty values are omitted from API requests. However, any non-pointer,
2950	// non-interface field appearing in ForceSendFields will be sent to the
2951	// server regardless of whether the field is empty or not. This may be
2952	// used to include empty fields in Patch requests.
2953	ForceSendFields []string `json:"-"`
2954
2955	// NullFields is a list of field names (e.g. "Id") to include in API
2956	// requests with the JSON null value. By default, fields with empty
2957	// values are omitted from API requests. However, any field with an
2958	// empty value appearing in NullFields will be sent to the server as
2959	// null. It is an error if a field in this list has a non-empty value.
2960	// This may be used to include null fields in Patch requests.
2961	NullFields []string `json:"-"`
2962}
2963
2964func (s *BackendServiceAggregatedList) MarshalJSON() ([]byte, error) {
2965	type noMethod BackendServiceAggregatedList
2966	raw := noMethod(*s)
2967	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2968}
2969
2970// BackendServiceCdnPolicy: Message containing Cloud CDN configuration
2971// for a backend service.
2972type BackendServiceCdnPolicy struct {
2973	// CacheKeyPolicy: The CacheKeyPolicy for this CdnPolicy.
2974	CacheKeyPolicy *CacheKeyPolicy `json:"cacheKeyPolicy,omitempty"`
2975
2976	// ForceSendFields is a list of field names (e.g. "CacheKeyPolicy") to
2977	// unconditionally include in API requests. By default, fields with
2978	// empty values are omitted from API requests. However, any non-pointer,
2979	// non-interface field appearing in ForceSendFields will be sent to the
2980	// server regardless of whether the field is empty or not. This may be
2981	// used to include empty fields in Patch requests.
2982	ForceSendFields []string `json:"-"`
2983
2984	// NullFields is a list of field names (e.g. "CacheKeyPolicy") to
2985	// include in API requests with the JSON null value. By default, fields
2986	// with empty values are omitted from API requests. However, any field
2987	// with an empty value appearing in NullFields will be sent to the
2988	// server as null. It is an error if a field in this list has a
2989	// non-empty value. This may be used to include null fields in Patch
2990	// requests.
2991	NullFields []string `json:"-"`
2992}
2993
2994func (s *BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) {
2995	type noMethod BackendServiceCdnPolicy
2996	raw := noMethod(*s)
2997	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2998}
2999
3000type BackendServiceGroupHealth struct {
3001	HealthStatus []*HealthStatus `json:"healthStatus,omitempty"`
3002
3003	// Kind: [Output Only] Type of resource. Always
3004	// compute#backendServiceGroupHealth for the health of backend services.
3005	Kind string `json:"kind,omitempty"`
3006
3007	// ServerResponse contains the HTTP response code and headers from the
3008	// server.
3009	googleapi.ServerResponse `json:"-"`
3010
3011	// ForceSendFields is a list of field names (e.g. "HealthStatus") to
3012	// unconditionally include in API requests. By default, fields with
3013	// empty values are omitted from API requests. However, any non-pointer,
3014	// non-interface field appearing in ForceSendFields will be sent to the
3015	// server regardless of whether the field is empty or not. This may be
3016	// used to include empty fields in Patch requests.
3017	ForceSendFields []string `json:"-"`
3018
3019	// NullFields is a list of field names (e.g. "HealthStatus") to include
3020	// in API requests with the JSON null value. By default, fields with
3021	// empty values are omitted from API requests. However, any field with
3022	// an empty value appearing in NullFields will be sent to the server as
3023	// null. It is an error if a field in this list has a non-empty value.
3024	// This may be used to include null fields in Patch requests.
3025	NullFields []string `json:"-"`
3026}
3027
3028func (s *BackendServiceGroupHealth) MarshalJSON() ([]byte, error) {
3029	type noMethod BackendServiceGroupHealth
3030	raw := noMethod(*s)
3031	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3032}
3033
3034// BackendServiceIAP: Identity-Aware Proxy
3035type BackendServiceIAP struct {
3036	Enabled bool `json:"enabled,omitempty"`
3037
3038	Oauth2ClientId string `json:"oauth2ClientId,omitempty"`
3039
3040	Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"`
3041
3042	// Oauth2ClientSecretSha256: [Output Only] SHA256 hash value for the
3043	// field oauth2_client_secret above.
3044	Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"`
3045
3046	// ForceSendFields is a list of field names (e.g. "Enabled") to
3047	// unconditionally include in API requests. By default, fields with
3048	// empty values are omitted from API requests. However, any non-pointer,
3049	// non-interface field appearing in ForceSendFields will be sent to the
3050	// server regardless of whether the field is empty or not. This may be
3051	// used to include empty fields in Patch requests.
3052	ForceSendFields []string `json:"-"`
3053
3054	// NullFields is a list of field names (e.g. "Enabled") to include in
3055	// API requests with the JSON null value. By default, fields with empty
3056	// values are omitted from API requests. However, any field with an
3057	// empty value appearing in NullFields will be sent to the server as
3058	// null. It is an error if a field in this list has a non-empty value.
3059	// This may be used to include null fields in Patch requests.
3060	NullFields []string `json:"-"`
3061}
3062
3063func (s *BackendServiceIAP) MarshalJSON() ([]byte, error) {
3064	type noMethod BackendServiceIAP
3065	raw := noMethod(*s)
3066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3067}
3068
3069// BackendServiceList: Contains a list of BackendService resources.
3070type BackendServiceList struct {
3071	// Id: [Output Only] Unique identifier for the resource; defined by the
3072	// server.
3073	Id string `json:"id,omitempty"`
3074
3075	// Items: A list of BackendService resources.
3076	Items []*BackendService `json:"items,omitempty"`
3077
3078	// Kind: [Output Only] Type of resource. Always
3079	// compute#backendServiceList for lists of backend services.
3080	Kind string `json:"kind,omitempty"`
3081
3082	// NextPageToken: [Output Only] This token allows you to get the next
3083	// page of results for list requests. If the number of results is larger
3084	// than maxResults, use the nextPageToken as a value for the query
3085	// parameter pageToken in the next list request. Subsequent list
3086	// requests will have their own nextPageToken to continue paging through
3087	// the results.
3088	NextPageToken string `json:"nextPageToken,omitempty"`
3089
3090	// SelfLink: [Output Only] Server-defined URL for this resource.
3091	SelfLink string `json:"selfLink,omitempty"`
3092
3093	// ServerResponse contains the HTTP response code and headers from the
3094	// server.
3095	googleapi.ServerResponse `json:"-"`
3096
3097	// ForceSendFields is a list of field names (e.g. "Id") to
3098	// unconditionally include in API requests. By default, fields with
3099	// empty values are omitted from API requests. However, any non-pointer,
3100	// non-interface field appearing in ForceSendFields will be sent to the
3101	// server regardless of whether the field is empty or not. This may be
3102	// used to include empty fields in Patch requests.
3103	ForceSendFields []string `json:"-"`
3104
3105	// NullFields is a list of field names (e.g. "Id") to include in API
3106	// requests with the JSON null value. By default, fields with empty
3107	// values are omitted from API requests. However, any field with an
3108	// empty value appearing in NullFields will be sent to the server as
3109	// null. It is an error if a field in this list has a non-empty value.
3110	// This may be used to include null fields in Patch requests.
3111	NullFields []string `json:"-"`
3112}
3113
3114func (s *BackendServiceList) MarshalJSON() ([]byte, error) {
3115	type noMethod BackendServiceList
3116	raw := noMethod(*s)
3117	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3118}
3119
3120type BackendServicesScopedList struct {
3121	// BackendServices: List of BackendServices contained in this scope.
3122	BackendServices []*BackendService `json:"backendServices,omitempty"`
3123
3124	// Warning: Informational warning which replaces the list of backend
3125	// services when the list is empty.
3126	Warning *BackendServicesScopedListWarning `json:"warning,omitempty"`
3127
3128	// ForceSendFields is a list of field names (e.g. "BackendServices") to
3129	// unconditionally include in API requests. By default, fields with
3130	// empty values are omitted from API requests. However, any non-pointer,
3131	// non-interface field appearing in ForceSendFields will be sent to the
3132	// server regardless of whether the field is empty or not. This may be
3133	// used to include empty fields in Patch requests.
3134	ForceSendFields []string `json:"-"`
3135
3136	// NullFields is a list of field names (e.g. "BackendServices") to
3137	// include in API requests with the JSON null value. By default, fields
3138	// with empty values are omitted from API requests. However, any field
3139	// with an empty value appearing in NullFields will be sent to the
3140	// server as null. It is an error if a field in this list has a
3141	// non-empty value. This may be used to include null fields in Patch
3142	// requests.
3143	NullFields []string `json:"-"`
3144}
3145
3146func (s *BackendServicesScopedList) MarshalJSON() ([]byte, error) {
3147	type noMethod BackendServicesScopedList
3148	raw := noMethod(*s)
3149	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3150}
3151
3152// BackendServicesScopedListWarning: Informational warning which
3153// replaces the list of backend services when the list is empty.
3154type BackendServicesScopedListWarning struct {
3155	// Code: [Output Only] A warning code, if applicable. For example,
3156	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
3157	// the response.
3158	//
3159	// Possible values:
3160	//   "CLEANUP_FAILED"
3161	//   "DEPRECATED_RESOURCE_USED"
3162	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
3163	//   "FIELD_VALUE_OVERRIDEN"
3164	//   "INJECTED_KERNELS_DEPRECATED"
3165	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
3166	//   "NEXT_HOP_CANNOT_IP_FORWARD"
3167	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
3168	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
3169	//   "NEXT_HOP_NOT_RUNNING"
3170	//   "NOT_CRITICAL_ERROR"
3171	//   "NO_RESULTS_ON_PAGE"
3172	//   "REQUIRED_TOS_AGREEMENT"
3173	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
3174	//   "RESOURCE_NOT_DELETED"
3175	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
3176	//   "UNREACHABLE"
3177	Code string `json:"code,omitempty"`
3178
3179	// Data: [Output Only] Metadata about this warning in key: value format.
3180	// For example:
3181	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3182	Data []*BackendServicesScopedListWarningData `json:"data,omitempty"`
3183
3184	// Message: [Output Only] A human-readable description of the warning
3185	// code.
3186	Message string `json:"message,omitempty"`
3187
3188	// ForceSendFields is a list of field names (e.g. "Code") to
3189	// unconditionally include in API requests. By default, fields with
3190	// empty values are omitted from API requests. However, any non-pointer,
3191	// non-interface field appearing in ForceSendFields will be sent to the
3192	// server regardless of whether the field is empty or not. This may be
3193	// used to include empty fields in Patch requests.
3194	ForceSendFields []string `json:"-"`
3195
3196	// NullFields is a list of field names (e.g. "Code") to include in API
3197	// requests with the JSON null value. By default, fields with empty
3198	// values are omitted from API requests. However, any field with an
3199	// empty value appearing in NullFields will be sent to the server as
3200	// null. It is an error if a field in this list has a non-empty value.
3201	// This may be used to include null fields in Patch requests.
3202	NullFields []string `json:"-"`
3203}
3204
3205func (s *BackendServicesScopedListWarning) MarshalJSON() ([]byte, error) {
3206	type noMethod BackendServicesScopedListWarning
3207	raw := noMethod(*s)
3208	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3209}
3210
3211type BackendServicesScopedListWarningData struct {
3212	// Key: [Output Only] A key that provides more detail on the warning
3213	// being returned. For example, for warnings where there are no results
3214	// in a list request for a particular zone, this key might be scope and
3215	// the key value might be the zone name. Other examples might be a key
3216	// indicating a deprecated resource and a suggested replacement, or a
3217	// warning about invalid network settings (for example, if an instance
3218	// attempts to perform IP forwarding but is not enabled for IP
3219	// forwarding).
3220	Key string `json:"key,omitempty"`
3221
3222	// Value: [Output Only] A warning data value corresponding to the key.
3223	Value string `json:"value,omitempty"`
3224
3225	// ForceSendFields is a list of field names (e.g. "Key") to
3226	// unconditionally include in API requests. By default, fields with
3227	// empty values are omitted from API requests. However, any non-pointer,
3228	// non-interface field appearing in ForceSendFields will be sent to the
3229	// server regardless of whether the field is empty or not. This may be
3230	// used to include empty fields in Patch requests.
3231	ForceSendFields []string `json:"-"`
3232
3233	// NullFields is a list of field names (e.g. "Key") to include in API
3234	// requests with the JSON null value. By default, fields with empty
3235	// values are omitted from API requests. However, any field with an
3236	// empty value appearing in NullFields will be sent to the server as
3237	// null. It is an error if a field in this list has a non-empty value.
3238	// This may be used to include null fields in Patch requests.
3239	NullFields []string `json:"-"`
3240}
3241
3242func (s *BackendServicesScopedListWarningData) MarshalJSON() ([]byte, error) {
3243	type noMethod BackendServicesScopedListWarningData
3244	raw := noMethod(*s)
3245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3246}
3247
3248// Binding: Associates `members` with a `role`.
3249type Binding struct {
3250	// Condition: The condition that is associated with this binding. NOTE:
3251	// an unsatisfied condition will not allow user access via current
3252	// binding. Different bindings, including their conditions, are examined
3253	// independently. This field is GOOGLE_INTERNAL.
3254	Condition *Expr `json:"condition,omitempty"`
3255
3256	// Members: Specifies the identities requesting access for a Cloud
3257	// Platform resource. `members` can have the following values:
3258	//
3259	// * `allUsers`: A special identifier that represents anyone who is on
3260	// the internet; with or without a Google account.
3261	//
3262	// * `allAuthenticatedUsers`: A special identifier that represents
3263	// anyone who is authenticated with a Google account or a service
3264	// account.
3265	//
3266	// * `user:{emailid}`: An email address that represents a specific
3267	// Google account. For example, `alice@gmail.com` or
3268	// `joe@example.com`.
3269	//
3270	//
3271	//
3272	// * `serviceAccount:{emailid}`: An email address that represents a
3273	// service account. For example,
3274	// `my-other-app@appspot.gserviceaccount.com`.
3275	//
3276	// * `group:{emailid}`: An email address that represents a Google group.
3277	// For example, `admins@example.com`.
3278	//
3279	//
3280	//
3281	// * `domain:{domain}`: A Google Apps domain name that represents all
3282	// the users of that domain. For example, `google.com` or `example.com`.
3283	Members []string `json:"members,omitempty"`
3284
3285	// Role: Role that is assigned to `members`. For example,
3286	// `roles/viewer`, `roles/editor`, or `roles/owner`.
3287	Role string `json:"role,omitempty"`
3288
3289	// ForceSendFields is a list of field names (e.g. "Condition") to
3290	// unconditionally include in API requests. By default, fields with
3291	// empty values are omitted from API requests. However, any non-pointer,
3292	// non-interface field appearing in ForceSendFields will be sent to the
3293	// server regardless of whether the field is empty or not. This may be
3294	// used to include empty fields in Patch requests.
3295	ForceSendFields []string `json:"-"`
3296
3297	// NullFields is a list of field names (e.g. "Condition") to include in
3298	// API requests with the JSON null value. By default, fields with empty
3299	// values are omitted from API requests. However, any field with an
3300	// empty value appearing in NullFields will be sent to the server as
3301	// null. It is an error if a field in this list has a non-empty value.
3302	// This may be used to include null fields in Patch requests.
3303	NullFields []string `json:"-"`
3304}
3305
3306func (s *Binding) MarshalJSON() ([]byte, error) {
3307	type noMethod Binding
3308	raw := noMethod(*s)
3309	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3310}
3311
3312type CacheInvalidationRule struct {
3313	// Host: If set, this invalidation rule will only apply to requests with
3314	// a Host header matching host.
3315	Host string `json:"host,omitempty"`
3316
3317	Path string `json:"path,omitempty"`
3318
3319	// ForceSendFields is a list of field names (e.g. "Host") to
3320	// unconditionally include in API requests. By default, fields with
3321	// empty values are omitted from API requests. However, any non-pointer,
3322	// non-interface field appearing in ForceSendFields will be sent to the
3323	// server regardless of whether the field is empty or not. This may be
3324	// used to include empty fields in Patch requests.
3325	ForceSendFields []string `json:"-"`
3326
3327	// NullFields is a list of field names (e.g. "Host") to include in API
3328	// requests with the JSON null value. By default, fields with empty
3329	// values are omitted from API requests. However, any field with an
3330	// empty value appearing in NullFields will be sent to the server as
3331	// null. It is an error if a field in this list has a non-empty value.
3332	// This may be used to include null fields in Patch requests.
3333	NullFields []string `json:"-"`
3334}
3335
3336func (s *CacheInvalidationRule) MarshalJSON() ([]byte, error) {
3337	type noMethod CacheInvalidationRule
3338	raw := noMethod(*s)
3339	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3340}
3341
3342// CacheKeyPolicy: Message containing what to include in the cache key
3343// for a request for Cloud CDN.
3344type CacheKeyPolicy struct {
3345	// IncludeHost: If true, requests to different hosts will be cached
3346	// separately.
3347	IncludeHost bool `json:"includeHost,omitempty"`
3348
3349	// IncludeProtocol: If true, http and https requests will be cached
3350	// separately.
3351	IncludeProtocol bool `json:"includeProtocol,omitempty"`
3352
3353	// IncludeQueryString: If true, include query string parameters in the
3354	// cache key according to query_string_whitelist and
3355	// query_string_blacklist. If neither is set, the entire query string
3356	// will be included. If false, the query string will be excluded from
3357	// the cache key entirely.
3358	IncludeQueryString bool `json:"includeQueryString,omitempty"`
3359
3360	// QueryStringBlacklist: Names of query string parameters to exclude in
3361	// cache keys. All other parameters will be included. Either specify
3362	// query_string_whitelist or query_string_blacklist, not both. '&' and
3363	// '=' will be percent encoded and not treated as delimiters.
3364	QueryStringBlacklist []string `json:"queryStringBlacklist,omitempty"`
3365
3366	// QueryStringWhitelist: Names of query string parameters to include in
3367	// cache keys. All other parameters will be excluded. Either specify
3368	// query_string_whitelist or query_string_blacklist, not both. '&' and
3369	// '=' will be percent encoded and not treated as delimiters.
3370	QueryStringWhitelist []string `json:"queryStringWhitelist,omitempty"`
3371
3372	// ForceSendFields is a list of field names (e.g. "IncludeHost") to
3373	// unconditionally include in API requests. By default, fields with
3374	// empty values are omitted from API requests. However, any non-pointer,
3375	// non-interface field appearing in ForceSendFields will be sent to the
3376	// server regardless of whether the field is empty or not. This may be
3377	// used to include empty fields in Patch requests.
3378	ForceSendFields []string `json:"-"`
3379
3380	// NullFields is a list of field names (e.g. "IncludeHost") to include
3381	// in API requests with the JSON null value. By default, fields with
3382	// empty values are omitted from API requests. However, any field with
3383	// an empty value appearing in NullFields will be sent to the server as
3384	// null. It is an error if a field in this list has a non-empty value.
3385	// This may be used to include null fields in Patch requests.
3386	NullFields []string `json:"-"`
3387}
3388
3389func (s *CacheKeyPolicy) MarshalJSON() ([]byte, error) {
3390	type noMethod CacheKeyPolicy
3391	raw := noMethod(*s)
3392	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3393}
3394
3395// Commitment: Represents a Commitment resource. Creating a Commitment
3396// resource means that you are purchasing a committed use contract with
3397// an explicit start and end time. You can create commitments based on
3398// vCPUs and memory usage and receive discounted rates. For full
3399// details, read Signing Up for Committed Use Discounts.
3400//
3401// Committed use discounts are subject to Google Cloud Platform's
3402// Service Specific Terms. By purchasing a committed use discount, you
3403// agree to these terms. Committed use discounts will not renew, so you
3404// must purchase a new commitment to continue receiving discounts.
3405type Commitment struct {
3406	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
3407	// format.
3408	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3409
3410	// Description: An optional description of this resource. Provide this
3411	// property when you create the resource.
3412	Description string `json:"description,omitempty"`
3413
3414	// EndTimestamp: [Output Only] Commitment end time in RFC3339 text
3415	// format.
3416	EndTimestamp string `json:"endTimestamp,omitempty"`
3417
3418	// Id: [Output Only] The unique identifier for the resource. This
3419	// identifier is defined by the server.
3420	Id uint64 `json:"id,omitempty,string"`
3421
3422	// Kind: [Output Only] Type of the resource. Always compute#commitment
3423	// for commitments.
3424	Kind string `json:"kind,omitempty"`
3425
3426	// Name: Name of the resource. Provided by the client when the resource
3427	// is created. The name must be 1-63 characters long, and comply with
3428	// RFC1035. Specifically, the name must be 1-63 characters long and
3429	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
3430	// the first character must be a lowercase letter, and all following
3431	// characters must be a dash, lowercase letter, or digit, except the
3432	// last character, which cannot be a dash.
3433	Name string `json:"name,omitempty"`
3434
3435	// Plan: The plan for this commitment, which determines duration and
3436	// discount rate. The currently supported plans are TWELVE_MONTH (1
3437	// year), and THIRTY_SIX_MONTH (3 years).
3438	//
3439	// Possible values:
3440	//   "INVALID"
3441	//   "THIRTY_SIX_MONTH"
3442	//   "TWELVE_MONTH"
3443	Plan string `json:"plan,omitempty"`
3444
3445	// Region: [Output Only] URL of the region where this commitment may be
3446	// used.
3447	Region string `json:"region,omitempty"`
3448
3449	// Resources: List of commitment amounts for particular resources. Note
3450	// that VCPU and MEMORY resource commitments must occur together.
3451	Resources []*ResourceCommitment `json:"resources,omitempty"`
3452
3453	// SelfLink: [Output Only] Server-defined URL for the resource.
3454	SelfLink string `json:"selfLink,omitempty"`
3455
3456	// StartTimestamp: [Output Only] Commitment start time in RFC3339 text
3457	// format.
3458	StartTimestamp string `json:"startTimestamp,omitempty"`
3459
3460	// Status: [Output Only] Status of the commitment with regards to
3461	// eventual expiration (each commitment has an end date defined). One of
3462	// the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.
3463	//
3464	// Possible values:
3465	//   "ACTIVE"
3466	//   "CREATING"
3467	//   "EXPIRED"
3468	//   "NOT_YET_ACTIVE"
3469	Status string `json:"status,omitempty"`
3470
3471	// StatusMessage: [Output Only] An optional, human-readable explanation
3472	// of the status.
3473	StatusMessage string `json:"statusMessage,omitempty"`
3474
3475	// ServerResponse contains the HTTP response code and headers from the
3476	// server.
3477	googleapi.ServerResponse `json:"-"`
3478
3479	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
3480	// to unconditionally include in API requests. By default, fields with
3481	// empty values are omitted from API requests. However, any non-pointer,
3482	// non-interface field appearing in ForceSendFields will be sent to the
3483	// server regardless of whether the field is empty or not. This may be
3484	// used to include empty fields in Patch requests.
3485	ForceSendFields []string `json:"-"`
3486
3487	// NullFields is a list of field names (e.g. "CreationTimestamp") to
3488	// include in API requests with the JSON null value. By default, fields
3489	// with empty values are omitted from API requests. However, any field
3490	// with an empty value appearing in NullFields will be sent to the
3491	// server as null. It is an error if a field in this list has a
3492	// non-empty value. This may be used to include null fields in Patch
3493	// requests.
3494	NullFields []string `json:"-"`
3495}
3496
3497func (s *Commitment) MarshalJSON() ([]byte, error) {
3498	type noMethod Commitment
3499	raw := noMethod(*s)
3500	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3501}
3502
3503type CommitmentAggregatedList struct {
3504	// Id: [Output Only] Unique identifier for the resource; defined by the
3505	// server.
3506	Id string `json:"id,omitempty"`
3507
3508	// Items: A list of CommitmentsScopedList resources.
3509	Items map[string]CommitmentsScopedList `json:"items,omitempty"`
3510
3511	// Kind: [Output Only] Type of resource. Always
3512	// compute#commitmentAggregatedList for aggregated lists of commitments.
3513	Kind string `json:"kind,omitempty"`
3514
3515	// NextPageToken: [Output Only] This token allows you to get the next
3516	// page of results for list requests. If the number of results is larger
3517	// than maxResults, use the nextPageToken as a value for the query
3518	// parameter pageToken in the next list request. Subsequent list
3519	// requests will have their own nextPageToken to continue paging through
3520	// the results.
3521	NextPageToken string `json:"nextPageToken,omitempty"`
3522
3523	// SelfLink: [Output Only] Server-defined URL for this resource.
3524	SelfLink string `json:"selfLink,omitempty"`
3525
3526	// ServerResponse contains the HTTP response code and headers from the
3527	// server.
3528	googleapi.ServerResponse `json:"-"`
3529
3530	// ForceSendFields is a list of field names (e.g. "Id") to
3531	// unconditionally include in API requests. By default, fields with
3532	// empty values are omitted from API requests. However, any non-pointer,
3533	// non-interface field appearing in ForceSendFields will be sent to the
3534	// server regardless of whether the field is empty or not. This may be
3535	// used to include empty fields in Patch requests.
3536	ForceSendFields []string `json:"-"`
3537
3538	// NullFields is a list of field names (e.g. "Id") to include in API
3539	// requests with the JSON null value. By default, fields with empty
3540	// values are omitted from API requests. However, any field with an
3541	// empty value appearing in NullFields will be sent to the server as
3542	// null. It is an error if a field in this list has a non-empty value.
3543	// This may be used to include null fields in Patch requests.
3544	NullFields []string `json:"-"`
3545}
3546
3547func (s *CommitmentAggregatedList) MarshalJSON() ([]byte, error) {
3548	type noMethod CommitmentAggregatedList
3549	raw := noMethod(*s)
3550	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3551}
3552
3553// CommitmentList: Contains a list of Commitment resources.
3554type CommitmentList struct {
3555	// Id: [Output Only] Unique identifier for the resource; defined by the
3556	// server.
3557	Id string `json:"id,omitempty"`
3558
3559	// Items: A list of Commitment resources.
3560	Items []*Commitment `json:"items,omitempty"`
3561
3562	// Kind: [Output Only] Type of resource. Always compute#commitmentList
3563	// for lists of commitments.
3564	Kind string `json:"kind,omitempty"`
3565
3566	// NextPageToken: [Output Only] This token allows you to get the next
3567	// page of results for list requests. If the number of results is larger
3568	// than maxResults, use the nextPageToken as a value for the query
3569	// parameter pageToken in the next list request. Subsequent list
3570	// requests will have their own nextPageToken to continue paging through
3571	// the results.
3572	NextPageToken string `json:"nextPageToken,omitempty"`
3573
3574	// SelfLink: [Output Only] Server-defined URL for this resource.
3575	SelfLink string `json:"selfLink,omitempty"`
3576
3577	// ServerResponse contains the HTTP response code and headers from the
3578	// server.
3579	googleapi.ServerResponse `json:"-"`
3580
3581	// ForceSendFields is a list of field names (e.g. "Id") to
3582	// unconditionally include in API requests. By default, fields with
3583	// empty values are omitted from API requests. However, any non-pointer,
3584	// non-interface field appearing in ForceSendFields will be sent to the
3585	// server regardless of whether the field is empty or not. This may be
3586	// used to include empty fields in Patch requests.
3587	ForceSendFields []string `json:"-"`
3588
3589	// NullFields is a list of field names (e.g. "Id") to include in API
3590	// requests with the JSON null value. By default, fields with empty
3591	// values are omitted from API requests. However, any field with an
3592	// empty value appearing in NullFields will be sent to the server as
3593	// null. It is an error if a field in this list has a non-empty value.
3594	// This may be used to include null fields in Patch requests.
3595	NullFields []string `json:"-"`
3596}
3597
3598func (s *CommitmentList) MarshalJSON() ([]byte, error) {
3599	type noMethod CommitmentList
3600	raw := noMethod(*s)
3601	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3602}
3603
3604type CommitmentsScopedList struct {
3605	// Commitments: [Output Only] List of commitments contained in this
3606	// scope.
3607	Commitments []*Commitment `json:"commitments,omitempty"`
3608
3609	// Warning: [Output Only] Informational warning which replaces the list
3610	// of commitments when the list is empty.
3611	Warning *CommitmentsScopedListWarning `json:"warning,omitempty"`
3612
3613	// ForceSendFields is a list of field names (e.g. "Commitments") to
3614	// unconditionally include in API requests. By default, fields with
3615	// empty values are omitted from API requests. However, any non-pointer,
3616	// non-interface field appearing in ForceSendFields will be sent to the
3617	// server regardless of whether the field is empty or not. This may be
3618	// used to include empty fields in Patch requests.
3619	ForceSendFields []string `json:"-"`
3620
3621	// NullFields is a list of field names (e.g. "Commitments") to include
3622	// in API requests with the JSON null value. By default, fields with
3623	// empty values are omitted from API requests. However, any field with
3624	// an empty value appearing in NullFields will be sent to the server as
3625	// null. It is an error if a field in this list has a non-empty value.
3626	// This may be used to include null fields in Patch requests.
3627	NullFields []string `json:"-"`
3628}
3629
3630func (s *CommitmentsScopedList) MarshalJSON() ([]byte, error) {
3631	type noMethod CommitmentsScopedList
3632	raw := noMethod(*s)
3633	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3634}
3635
3636// CommitmentsScopedListWarning: [Output Only] Informational warning
3637// which replaces the list of commitments when the list is empty.
3638type CommitmentsScopedListWarning struct {
3639	// Code: [Output Only] A warning code, if applicable. For example,
3640	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
3641	// the response.
3642	//
3643	// Possible values:
3644	//   "CLEANUP_FAILED"
3645	//   "DEPRECATED_RESOURCE_USED"
3646	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
3647	//   "FIELD_VALUE_OVERRIDEN"
3648	//   "INJECTED_KERNELS_DEPRECATED"
3649	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
3650	//   "NEXT_HOP_CANNOT_IP_FORWARD"
3651	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
3652	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
3653	//   "NEXT_HOP_NOT_RUNNING"
3654	//   "NOT_CRITICAL_ERROR"
3655	//   "NO_RESULTS_ON_PAGE"
3656	//   "REQUIRED_TOS_AGREEMENT"
3657	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
3658	//   "RESOURCE_NOT_DELETED"
3659	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
3660	//   "UNREACHABLE"
3661	Code string `json:"code,omitempty"`
3662
3663	// Data: [Output Only] Metadata about this warning in key: value format.
3664	// For example:
3665	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
3666	Data []*CommitmentsScopedListWarningData `json:"data,omitempty"`
3667
3668	// Message: [Output Only] A human-readable description of the warning
3669	// code.
3670	Message string `json:"message,omitempty"`
3671
3672	// ForceSendFields is a list of field names (e.g. "Code") to
3673	// unconditionally include in API requests. By default, fields with
3674	// empty values are omitted from API requests. However, any non-pointer,
3675	// non-interface field appearing in ForceSendFields will be sent to the
3676	// server regardless of whether the field is empty or not. This may be
3677	// used to include empty fields in Patch requests.
3678	ForceSendFields []string `json:"-"`
3679
3680	// NullFields is a list of field names (e.g. "Code") to include in API
3681	// requests with the JSON null value. By default, fields with empty
3682	// values are omitted from API requests. However, any field with an
3683	// empty value appearing in NullFields will be sent to the server as
3684	// null. It is an error if a field in this list has a non-empty value.
3685	// This may be used to include null fields in Patch requests.
3686	NullFields []string `json:"-"`
3687}
3688
3689func (s *CommitmentsScopedListWarning) MarshalJSON() ([]byte, error) {
3690	type noMethod CommitmentsScopedListWarning
3691	raw := noMethod(*s)
3692	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3693}
3694
3695type CommitmentsScopedListWarningData struct {
3696	// Key: [Output Only] A key that provides more detail on the warning
3697	// being returned. For example, for warnings where there are no results
3698	// in a list request for a particular zone, this key might be scope and
3699	// the key value might be the zone name. Other examples might be a key
3700	// indicating a deprecated resource and a suggested replacement, or a
3701	// warning about invalid network settings (for example, if an instance
3702	// attempts to perform IP forwarding but is not enabled for IP
3703	// forwarding).
3704	Key string `json:"key,omitempty"`
3705
3706	// Value: [Output Only] A warning data value corresponding to the key.
3707	Value string `json:"value,omitempty"`
3708
3709	// ForceSendFields is a list of field names (e.g. "Key") to
3710	// unconditionally include in API requests. By default, fields with
3711	// empty values are omitted from API requests. However, any non-pointer,
3712	// non-interface field appearing in ForceSendFields will be sent to the
3713	// server regardless of whether the field is empty or not. This may be
3714	// used to include empty fields in Patch requests.
3715	ForceSendFields []string `json:"-"`
3716
3717	// NullFields is a list of field names (e.g. "Key") to include in API
3718	// requests with the JSON null value. By default, fields with empty
3719	// values are omitted from API requests. However, any field with an
3720	// empty value appearing in NullFields will be sent to the server as
3721	// null. It is an error if a field in this list has a non-empty value.
3722	// This may be used to include null fields in Patch requests.
3723	NullFields []string `json:"-"`
3724}
3725
3726func (s *CommitmentsScopedListWarningData) MarshalJSON() ([]byte, error) {
3727	type noMethod CommitmentsScopedListWarningData
3728	raw := noMethod(*s)
3729	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3730}
3731
3732// Condition: A condition to be met.
3733type Condition struct {
3734	// Iam: Trusted attributes supplied by the IAM system.
3735	//
3736	// Possible values:
3737	//   "APPROVER"
3738	//   "ATTRIBUTION"
3739	//   "AUTHORITY"
3740	//   "JUSTIFICATION_TYPE"
3741	//   "NO_ATTR"
3742	//   "SECURITY_REALM"
3743	Iam string `json:"iam,omitempty"`
3744
3745	// Op: An operator to apply the subject with.
3746	//
3747	// Possible values:
3748	//   "DISCHARGED"
3749	//   "EQUALS"
3750	//   "IN"
3751	//   "NOT_EQUALS"
3752	//   "NOT_IN"
3753	//   "NO_OP"
3754	Op string `json:"op,omitempty"`
3755
3756	// Svc: Trusted attributes discharged by the service.
3757	Svc string `json:"svc,omitempty"`
3758
3759	// Sys: Trusted attributes supplied by any service that owns resources
3760	// and uses the IAM system for access control.
3761	//
3762	// Possible values:
3763	//   "IP"
3764	//   "NAME"
3765	//   "NO_ATTR"
3766	//   "REGION"
3767	//   "SERVICE"
3768	Sys string `json:"sys,omitempty"`
3769
3770	// Value: DEPRECATED. Use 'values' instead.
3771	Value string `json:"value,omitempty"`
3772
3773	// Values: The objects of the condition. This is mutually exclusive with
3774	// 'value'.
3775	Values []string `json:"values,omitempty"`
3776
3777	// ForceSendFields is a list of field names (e.g. "Iam") to
3778	// unconditionally include in API requests. By default, fields with
3779	// empty values are omitted from API requests. However, any non-pointer,
3780	// non-interface field appearing in ForceSendFields will be sent to the
3781	// server regardless of whether the field is empty or not. This may be
3782	// used to include empty fields in Patch requests.
3783	ForceSendFields []string `json:"-"`
3784
3785	// NullFields is a list of field names (e.g. "Iam") to include in API
3786	// requests with the JSON null value. By default, fields with empty
3787	// values are omitted from API requests. However, any field with an
3788	// empty value appearing in NullFields will be sent to the server as
3789	// null. It is an error if a field in this list has a non-empty value.
3790	// This may be used to include null fields in Patch requests.
3791	NullFields []string `json:"-"`
3792}
3793
3794func (s *Condition) MarshalJSON() ([]byte, error) {
3795	type noMethod Condition
3796	raw := noMethod(*s)
3797	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3798}
3799
3800// ConnectionDraining: Message containing connection draining
3801// configuration.
3802type ConnectionDraining struct {
3803	// DrainingTimeoutSec: Time for which instance will be drained (not
3804	// accept new connections, but still work to finish started).
3805	DrainingTimeoutSec int64 `json:"drainingTimeoutSec,omitempty"`
3806
3807	// ForceSendFields is a list of field names (e.g. "DrainingTimeoutSec")
3808	// to unconditionally include in API requests. By default, fields with
3809	// empty values are omitted from API requests. However, any non-pointer,
3810	// non-interface field appearing in ForceSendFields will be sent to the
3811	// server regardless of whether the field is empty or not. This may be
3812	// used to include empty fields in Patch requests.
3813	ForceSendFields []string `json:"-"`
3814
3815	// NullFields is a list of field names (e.g. "DrainingTimeoutSec") to
3816	// include in API requests with the JSON null value. By default, fields
3817	// with empty values are omitted from API requests. However, any field
3818	// with an empty value appearing in NullFields will be sent to the
3819	// server as null. It is an error if a field in this list has a
3820	// non-empty value. This may be used to include null fields in Patch
3821	// requests.
3822	NullFields []string `json:"-"`
3823}
3824
3825func (s *ConnectionDraining) MarshalJSON() ([]byte, error) {
3826	type noMethod ConnectionDraining
3827	raw := noMethod(*s)
3828	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3829}
3830
3831// CustomerEncryptionKey: Represents a customer-supplied encryption key
3832type CustomerEncryptionKey struct {
3833	// RawKey: Specifies a 256-bit customer-supplied encryption key, encoded
3834	// in RFC 4648 base64 to either encrypt or decrypt this resource.
3835	RawKey string `json:"rawKey,omitempty"`
3836
3837	// RsaEncryptedKey: Specifies an RFC 4648 base64 encoded, RSA-wrapped
3838	// 2048-bit customer-supplied encryption key to either encrypt or
3839	// decrypt this resource.
3840	//
3841	// The key must meet the following requirements before you can provide
3842	// it to Compute Engine:
3843	// - The key is wrapped using a RSA public key certificate provided by
3844	// Google.
3845	// - After being wrapped, the key must be encoded in RFC 4648 base64
3846	// encoding.  Get the RSA public key certificate provided by Google
3847	// at:
3848	// https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingre
3849	// ss.pem
3850	RsaEncryptedKey string `json:"rsaEncryptedKey,omitempty"`
3851
3852	// Sha256: [Output only] The RFC 4648 base64 encoded SHA-256 hash of the
3853	// customer-supplied encryption key that protects this resource.
3854	Sha256 string `json:"sha256,omitempty"`
3855
3856	// ForceSendFields is a list of field names (e.g. "RawKey") to
3857	// unconditionally include in API requests. By default, fields with
3858	// empty values are omitted from API requests. However, any non-pointer,
3859	// non-interface field appearing in ForceSendFields will be sent to the
3860	// server regardless of whether the field is empty or not. This may be
3861	// used to include empty fields in Patch requests.
3862	ForceSendFields []string `json:"-"`
3863
3864	// NullFields is a list of field names (e.g. "RawKey") to include in API
3865	// requests with the JSON null value. By default, fields with empty
3866	// values are omitted from API requests. However, any field with an
3867	// empty value appearing in NullFields will be sent to the server as
3868	// null. It is an error if a field in this list has a non-empty value.
3869	// This may be used to include null fields in Patch requests.
3870	NullFields []string `json:"-"`
3871}
3872
3873func (s *CustomerEncryptionKey) MarshalJSON() ([]byte, error) {
3874	type noMethod CustomerEncryptionKey
3875	raw := noMethod(*s)
3876	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3877}
3878
3879type CustomerEncryptionKeyProtectedDisk struct {
3880	// DiskEncryptionKey: Decrypts data associated with the disk with a
3881	// customer-supplied encryption key.
3882	DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"`
3883
3884	// Source: Specifies a valid partial or full URL to an existing
3885	// Persistent Disk resource. This field is only applicable for
3886	// persistent disks.
3887	Source string `json:"source,omitempty"`
3888
3889	// ForceSendFields is a list of field names (e.g. "DiskEncryptionKey")
3890	// to unconditionally include in API requests. By default, fields with
3891	// empty values are omitted from API requests. However, any non-pointer,
3892	// non-interface field appearing in ForceSendFields will be sent to the
3893	// server regardless of whether the field is empty or not. This may be
3894	// used to include empty fields in Patch requests.
3895	ForceSendFields []string `json:"-"`
3896
3897	// NullFields is a list of field names (e.g. "DiskEncryptionKey") to
3898	// include in API requests with the JSON null value. By default, fields
3899	// with empty values are omitted from API requests. However, any field
3900	// with an empty value appearing in NullFields will be sent to the
3901	// server as null. It is an error if a field in this list has a
3902	// non-empty value. This may be used to include null fields in Patch
3903	// requests.
3904	NullFields []string `json:"-"`
3905}
3906
3907func (s *CustomerEncryptionKeyProtectedDisk) MarshalJSON() ([]byte, error) {
3908	type noMethod CustomerEncryptionKeyProtectedDisk
3909	raw := noMethod(*s)
3910	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3911}
3912
3913// DeprecationStatus: Deprecation status for a public resource.
3914type DeprecationStatus struct {
3915	// Deleted: An optional RFC3339 timestamp on or after which the state of
3916	// this resource is intended to change to DELETED. This is only
3917	// informational and the status will not change unless the client
3918	// explicitly changes it.
3919	Deleted string `json:"deleted,omitempty"`
3920
3921	// Deprecated: An optional RFC3339 timestamp on or after which the state
3922	// of this resource is intended to change to DEPRECATED. This is only
3923	// informational and the status will not change unless the client
3924	// explicitly changes it.
3925	Deprecated string `json:"deprecated,omitempty"`
3926
3927	// Obsolete: An optional RFC3339 timestamp on or after which the state
3928	// of this resource is intended to change to OBSOLETE. This is only
3929	// informational and the status will not change unless the client
3930	// explicitly changes it.
3931	Obsolete string `json:"obsolete,omitempty"`
3932
3933	// Replacement: The URL of the suggested replacement for a deprecated
3934	// resource. The suggested replacement resource must be the same kind of
3935	// resource as the deprecated resource.
3936	Replacement string `json:"replacement,omitempty"`
3937
3938	// State: The deprecation state of this resource. This can be
3939	// DEPRECATED, OBSOLETE, or DELETED. Operations which create a new
3940	// resource using a DEPRECATED resource will return successfully, but
3941	// with a warning indicating the deprecated resource and recommending
3942	// its replacement. Operations which use OBSOLETE or DELETED resources
3943	// will be rejected and result in an error.
3944	//
3945	// Possible values:
3946	//   "DELETED"
3947	//   "DEPRECATED"
3948	//   "OBSOLETE"
3949	State string `json:"state,omitempty"`
3950
3951	// ForceSendFields is a list of field names (e.g. "Deleted") to
3952	// unconditionally include in API requests. By default, fields with
3953	// empty values are omitted from API requests. However, any non-pointer,
3954	// non-interface field appearing in ForceSendFields will be sent to the
3955	// server regardless of whether the field is empty or not. This may be
3956	// used to include empty fields in Patch requests.
3957	ForceSendFields []string `json:"-"`
3958
3959	// NullFields is a list of field names (e.g. "Deleted") to include in
3960	// API requests with the JSON null value. By default, fields with empty
3961	// values are omitted from API requests. However, any field with an
3962	// empty value appearing in NullFields will be sent to the server as
3963	// null. It is an error if a field in this list has a non-empty value.
3964	// This may be used to include null fields in Patch requests.
3965	NullFields []string `json:"-"`
3966}
3967
3968func (s *DeprecationStatus) MarshalJSON() ([]byte, error) {
3969	type noMethod DeprecationStatus
3970	raw := noMethod(*s)
3971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3972}
3973
3974// Disk: A Disk resource.
3975type Disk struct {
3976	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
3977	// format.
3978	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3979
3980	// Description: An optional description of this resource. Provide this
3981	// property when you create the resource.
3982	Description string `json:"description,omitempty"`
3983
3984	// DiskEncryptionKey: Encrypts the disk using a customer-supplied
3985	// encryption key.
3986	//
3987	// After you encrypt a disk with a customer-supplied key, you must
3988	// provide the same key if you use the disk later (e.g. to create a disk
3989	// snapshot or an image, or to attach the disk to a virtual
3990	// machine).
3991	//
3992	// Customer-supplied encryption keys do not protect access to metadata
3993	// of the disk.
3994	//
3995	// If you do not provide an encryption key when creating the disk, then
3996	// the disk will be encrypted using an automatically generated key and
3997	// you do not need to provide a key to use the disk later.
3998	DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"`
3999
4000	// Id: [Output Only] The unique identifier for the resource. This
4001	// identifier is defined by the server.
4002	Id uint64 `json:"id,omitempty,string"`
4003
4004	// Kind: [Output Only] Type of the resource. Always compute#disk for
4005	// disks.
4006	Kind string `json:"kind,omitempty"`
4007
4008	// LabelFingerprint: A fingerprint for the labels being applied to this
4009	// disk, which is essentially a hash of the labels set used for
4010	// optimistic locking. The fingerprint is initially generated by Compute
4011	// Engine and changes after every request to modify or update labels.
4012	// You must always provide an up-to-date fingerprint hash in order to
4013	// update or change labels.
4014	//
4015	// To see the latest fingerprint, make a get() request to retrieve a
4016	// disk.
4017	LabelFingerprint string `json:"labelFingerprint,omitempty"`
4018
4019	// Labels: Labels to apply to this disk. These can be later modified by
4020	// the setLabels method.
4021	Labels map[string]string `json:"labels,omitempty"`
4022
4023	// LastAttachTimestamp: [Output Only] Last attach timestamp in RFC3339
4024	// text format.
4025	LastAttachTimestamp string `json:"lastAttachTimestamp,omitempty"`
4026
4027	// LastDetachTimestamp: [Output Only] Last detach timestamp in RFC3339
4028	// text format.
4029	LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"`
4030
4031	// Licenses: Any applicable publicly visible licenses.
4032	Licenses []string `json:"licenses,omitempty"`
4033
4034	// Name: Name of the resource. Provided by the client when the resource
4035	// is created. The name must be 1-63 characters long, and comply with
4036	// RFC1035. Specifically, the name must be 1-63 characters long and
4037	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
4038	// the first character must be a lowercase letter, and all following
4039	// characters must be a dash, lowercase letter, or digit, except the
4040	// last character, which cannot be a dash.
4041	Name string `json:"name,omitempty"`
4042
4043	// Options: Internal use only.
4044	Options string `json:"options,omitempty"`
4045
4046	// SelfLink: [Output Only] Server-defined fully-qualified URL for this
4047	// resource.
4048	SelfLink string `json:"selfLink,omitempty"`
4049
4050	// SizeGb: Size of the persistent disk, specified in GB. You can specify
4051	// this field when creating a persistent disk using the sourceImage or
4052	// sourceSnapshot parameter, or specify it alone to create an empty
4053	// persistent disk.
4054	//
4055	// If you specify this field along with sourceImage or sourceSnapshot,
4056	// the value of sizeGb must not be less than the size of the sourceImage
4057	// or the size of the snapshot. Acceptable values are 1 to 65536,
4058	// inclusive.
4059	SizeGb int64 `json:"sizeGb,omitempty,string"`
4060
4061	// SourceImage: The source image used to create this disk. If the source
4062	// image is deleted, this field will not be set.
4063	//
4064	// To create a disk with one of the public operating system images,
4065	// specify the image by its family name. For example, specify
4066	// family/debian-8 to use the latest Debian 8
4067	// image:
4068	//
4069	// projects/debian-cloud/global/images/family/debian-8
4070	//
4071	// Alternatively, use a specific version of a public operating system
4072	// image:
4073	//
4074	// projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
4075	//
4076	// To create a disk with a private image that you created, specify the
4077	// image name in the following format:
4078	//
4079	// global/images/my-private-image
4080	//
4081	// You can also specify a private image by its image family, which
4082	// returns the latest version of the image in that family. Replace the
4083	// image name with
4084	// family/family-name:
4085	//
4086	// global/images/family/my-private-family
4087	SourceImage string `json:"sourceImage,omitempty"`
4088
4089	// SourceImageEncryptionKey: The customer-supplied encryption key of the
4090	// source image. Required if the source image is protected by a
4091	// customer-supplied encryption key.
4092	SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"`
4093
4094	// SourceImageId: [Output Only] The ID value of the image used to create
4095	// this disk. This value identifies the exact image that was used to
4096	// create this persistent disk. For example, if you created the
4097	// persistent disk from an image that was later deleted and recreated
4098	// under the same name, the source image ID would identify the exact
4099	// version of the image that was used.
4100	SourceImageId string `json:"sourceImageId,omitempty"`
4101
4102	// SourceSnapshot: The source snapshot used to create this disk. You can
4103	// provide this as a partial or full URL to the resource. For example,
4104	// the following are valid values:
4105	// -
4106	// https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
4107	// - projects/project/global/snapshots/snapshot
4108	// - global/snapshots/snapshot
4109	SourceSnapshot string `json:"sourceSnapshot,omitempty"`
4110
4111	// SourceSnapshotEncryptionKey: The customer-supplied encryption key of
4112	// the source snapshot. Required if the source snapshot is protected by
4113	// a customer-supplied encryption key.
4114	SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"`
4115
4116	// SourceSnapshotId: [Output Only] The unique ID of the snapshot used to
4117	// create this disk. This value identifies the exact snapshot that was
4118	// used to create this persistent disk. For example, if you created the
4119	// persistent disk from a snapshot that was later deleted and recreated
4120	// under the same name, the source snapshot ID would identify the exact
4121	// version of the snapshot that was used.
4122	SourceSnapshotId string `json:"sourceSnapshotId,omitempty"`
4123
4124	// Status: [Output Only] The status of disk creation.
4125	//
4126	// Possible values:
4127	//   "CREATING"
4128	//   "FAILED"
4129	//   "READY"
4130	//   "RESTORING"
4131	Status string `json:"status,omitempty"`
4132
4133	// StorageType: [Deprecated] Storage type of the persistent disk.
4134	//
4135	// Possible values:
4136	//   "HDD"
4137	//   "SSD"
4138	StorageType string `json:"storageType,omitempty"`
4139
4140	// Type: URL of the disk type resource describing which disk type to use
4141	// to create the disk. Provide this when creating the disk.
4142	Type string `json:"type,omitempty"`
4143
4144	// Users: [Output Only] Links to the users of the disk (attached
4145	// instances) in form: project/zones/zone/instances/instance
4146	Users []string `json:"users,omitempty"`
4147
4148	// Zone: [Output Only] URL of the zone where the disk resides.
4149	Zone string `json:"zone,omitempty"`
4150
4151	// ServerResponse contains the HTTP response code and headers from the
4152	// server.
4153	googleapi.ServerResponse `json:"-"`
4154
4155	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
4156	// to unconditionally include in API requests. By default, fields with
4157	// empty values are omitted from API requests. However, any non-pointer,
4158	// non-interface field appearing in ForceSendFields will be sent to the
4159	// server regardless of whether the field is empty or not. This may be
4160	// used to include empty fields in Patch requests.
4161	ForceSendFields []string `json:"-"`
4162
4163	// NullFields is a list of field names (e.g. "CreationTimestamp") to
4164	// include in API requests with the JSON null value. By default, fields
4165	// with empty values are omitted from API requests. However, any field
4166	// with an empty value appearing in NullFields will be sent to the
4167	// server as null. It is an error if a field in this list has a
4168	// non-empty value. This may be used to include null fields in Patch
4169	// requests.
4170	NullFields []string `json:"-"`
4171}
4172
4173func (s *Disk) MarshalJSON() ([]byte, error) {
4174	type noMethod Disk
4175	raw := noMethod(*s)
4176	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4177}
4178
4179type DiskAggregatedList struct {
4180	// Id: [Output Only] Unique identifier for the resource; defined by the
4181	// server.
4182	Id string `json:"id,omitempty"`
4183
4184	// Items: A list of DisksScopedList resources.
4185	Items map[string]DisksScopedList `json:"items,omitempty"`
4186
4187	// Kind: [Output Only] Type of resource. Always
4188	// compute#diskAggregatedList for aggregated lists of persistent disks.
4189	Kind string `json:"kind,omitempty"`
4190
4191	// NextPageToken: [Output Only] This token allows you to get the next
4192	// page of results for list requests. If the number of results is larger
4193	// than maxResults, use the nextPageToken as a value for the query
4194	// parameter pageToken in the next list request. Subsequent list
4195	// requests will have their own nextPageToken to continue paging through
4196	// the results.
4197	NextPageToken string `json:"nextPageToken,omitempty"`
4198
4199	// SelfLink: [Output Only] Server-defined URL for this resource.
4200	SelfLink string `json:"selfLink,omitempty"`
4201
4202	// ServerResponse contains the HTTP response code and headers from the
4203	// server.
4204	googleapi.ServerResponse `json:"-"`
4205
4206	// ForceSendFields is a list of field names (e.g. "Id") to
4207	// unconditionally include in API requests. By default, fields with
4208	// empty values are omitted from API requests. However, any non-pointer,
4209	// non-interface field appearing in ForceSendFields will be sent to the
4210	// server regardless of whether the field is empty or not. This may be
4211	// used to include empty fields in Patch requests.
4212	ForceSendFields []string `json:"-"`
4213
4214	// NullFields is a list of field names (e.g. "Id") to include in API
4215	// requests with the JSON null value. By default, fields with empty
4216	// values are omitted from API requests. However, any field with an
4217	// empty value appearing in NullFields will be sent to the server as
4218	// null. It is an error if a field in this list has a non-empty value.
4219	// This may be used to include null fields in Patch requests.
4220	NullFields []string `json:"-"`
4221}
4222
4223func (s *DiskAggregatedList) MarshalJSON() ([]byte, error) {
4224	type noMethod DiskAggregatedList
4225	raw := noMethod(*s)
4226	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4227}
4228
4229// DiskList: A list of Disk resources.
4230type DiskList struct {
4231	// Id: [Output Only] Unique identifier for the resource; defined by the
4232	// server.
4233	Id string `json:"id,omitempty"`
4234
4235	// Items: A list of Disk resources.
4236	Items []*Disk `json:"items,omitempty"`
4237
4238	// Kind: [Output Only] Type of resource. Always compute#diskList for
4239	// lists of disks.
4240	Kind string `json:"kind,omitempty"`
4241
4242	// NextPageToken: [Output Only] This token allows you to get the next
4243	// page of results for list requests. If the number of results is larger
4244	// than maxResults, use the nextPageToken as a value for the query
4245	// parameter pageToken in the next list request. Subsequent list
4246	// requests will have their own nextPageToken to continue paging through
4247	// the results.
4248	NextPageToken string `json:"nextPageToken,omitempty"`
4249
4250	// SelfLink: [Output Only] Server-defined URL for this resource.
4251	SelfLink string `json:"selfLink,omitempty"`
4252
4253	// ServerResponse contains the HTTP response code and headers from the
4254	// server.
4255	googleapi.ServerResponse `json:"-"`
4256
4257	// ForceSendFields is a list of field names (e.g. "Id") to
4258	// unconditionally include in API requests. By default, fields with
4259	// empty values are omitted from API requests. However, any non-pointer,
4260	// non-interface field appearing in ForceSendFields will be sent to the
4261	// server regardless of whether the field is empty or not. This may be
4262	// used to include empty fields in Patch requests.
4263	ForceSendFields []string `json:"-"`
4264
4265	// NullFields is a list of field names (e.g. "Id") to include in API
4266	// requests with the JSON null value. By default, fields with empty
4267	// values are omitted from API requests. However, any field with an
4268	// empty value appearing in NullFields will be sent to the server as
4269	// null. It is an error if a field in this list has a non-empty value.
4270	// This may be used to include null fields in Patch requests.
4271	NullFields []string `json:"-"`
4272}
4273
4274func (s *DiskList) MarshalJSON() ([]byte, error) {
4275	type noMethod DiskList
4276	raw := noMethod(*s)
4277	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4278}
4279
4280type DiskMoveRequest struct {
4281	// DestinationZone: The URL of the destination zone to move the disk.
4282	// This can be a full or partial URL. For example, the following are all
4283	// valid URLs to a zone:
4284	// - https://www.googleapis.com/compute/v1/projects/project/zones/zone
4285	//
4286	// - projects/project/zones/zone
4287	// - zones/zone
4288	DestinationZone string `json:"destinationZone,omitempty"`
4289
4290	// TargetDisk: The URL of the target disk to move. This can be a full or
4291	// partial URL. For example, the following are all valid URLs to a disk:
4292	//
4293	// -
4294	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
4295	// - projects/project/zones/zone/disks/disk
4296	// - zones/zone/disks/disk
4297	TargetDisk string `json:"targetDisk,omitempty"`
4298
4299	// ForceSendFields is a list of field names (e.g. "DestinationZone") to
4300	// unconditionally include in API requests. By default, fields with
4301	// empty values are omitted from API requests. However, any non-pointer,
4302	// non-interface field appearing in ForceSendFields will be sent to the
4303	// server regardless of whether the field is empty or not. This may be
4304	// used to include empty fields in Patch requests.
4305	ForceSendFields []string `json:"-"`
4306
4307	// NullFields is a list of field names (e.g. "DestinationZone") to
4308	// include in API requests with the JSON null value. By default, fields
4309	// with empty values are omitted from API requests. However, any field
4310	// with an empty value appearing in NullFields will be sent to the
4311	// server as null. It is an error if a field in this list has a
4312	// non-empty value. This may be used to include null fields in Patch
4313	// requests.
4314	NullFields []string `json:"-"`
4315}
4316
4317func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) {
4318	type noMethod DiskMoveRequest
4319	raw := noMethod(*s)
4320	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4321}
4322
4323// DiskType: A DiskType resource.
4324type DiskType struct {
4325	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
4326	// format.
4327	CreationTimestamp string `json:"creationTimestamp,omitempty"`
4328
4329	// DefaultDiskSizeGb: [Output Only] Server-defined default disk size in
4330	// GB.
4331	DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"`
4332
4333	// Deprecated: [Output Only] The deprecation status associated with this
4334	// disk type.
4335	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
4336
4337	// Description: [Output Only] An optional description of this resource.
4338	Description string `json:"description,omitempty"`
4339
4340	// Id: [Output Only] The unique identifier for the resource. This
4341	// identifier is defined by the server.
4342	Id uint64 `json:"id,omitempty,string"`
4343
4344	// Kind: [Output Only] Type of the resource. Always compute#diskType for
4345	// disk types.
4346	Kind string `json:"kind,omitempty"`
4347
4348	// Name: [Output Only] Name of the resource.
4349	Name string `json:"name,omitempty"`
4350
4351	// SelfLink: [Output Only] Server-defined URL for the resource.
4352	SelfLink string `json:"selfLink,omitempty"`
4353
4354	// ValidDiskSize: [Output Only] An optional textual description of the
4355	// valid disk size, such as "10GB-10TB".
4356	ValidDiskSize string `json:"validDiskSize,omitempty"`
4357
4358	// Zone: [Output Only] URL of the zone where the disk type resides.
4359	Zone string `json:"zone,omitempty"`
4360
4361	// ServerResponse contains the HTTP response code and headers from the
4362	// server.
4363	googleapi.ServerResponse `json:"-"`
4364
4365	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
4366	// to unconditionally include in API requests. By default, fields with
4367	// empty values are omitted from API requests. However, any non-pointer,
4368	// non-interface field appearing in ForceSendFields will be sent to the
4369	// server regardless of whether the field is empty or not. This may be
4370	// used to include empty fields in Patch requests.
4371	ForceSendFields []string `json:"-"`
4372
4373	// NullFields is a list of field names (e.g. "CreationTimestamp") to
4374	// include in API requests with the JSON null value. By default, fields
4375	// with empty values are omitted from API requests. However, any field
4376	// with an empty value appearing in NullFields will be sent to the
4377	// server as null. It is an error if a field in this list has a
4378	// non-empty value. This may be used to include null fields in Patch
4379	// requests.
4380	NullFields []string `json:"-"`
4381}
4382
4383func (s *DiskType) MarshalJSON() ([]byte, error) {
4384	type noMethod DiskType
4385	raw := noMethod(*s)
4386	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4387}
4388
4389type DiskTypeAggregatedList struct {
4390	// Id: [Output Only] Unique identifier for the resource; defined by the
4391	// server.
4392	Id string `json:"id,omitempty"`
4393
4394	// Items: A list of DiskTypesScopedList resources.
4395	Items map[string]DiskTypesScopedList `json:"items,omitempty"`
4396
4397	// Kind: [Output Only] Type of resource. Always
4398	// compute#diskTypeAggregatedList.
4399	Kind string `json:"kind,omitempty"`
4400
4401	// NextPageToken: [Output Only] This token allows you to get the next
4402	// page of results for list requests. If the number of results is larger
4403	// than maxResults, use the nextPageToken as a value for the query
4404	// parameter pageToken in the next list request. Subsequent list
4405	// requests will have their own nextPageToken to continue paging through
4406	// the results.
4407	NextPageToken string `json:"nextPageToken,omitempty"`
4408
4409	// SelfLink: [Output Only] Server-defined URL for this resource.
4410	SelfLink string `json:"selfLink,omitempty"`
4411
4412	// ServerResponse contains the HTTP response code and headers from the
4413	// server.
4414	googleapi.ServerResponse `json:"-"`
4415
4416	// ForceSendFields is a list of field names (e.g. "Id") to
4417	// unconditionally include in API requests. By default, fields with
4418	// empty values are omitted from API requests. However, any non-pointer,
4419	// non-interface field appearing in ForceSendFields will be sent to the
4420	// server regardless of whether the field is empty or not. This may be
4421	// used to include empty fields in Patch requests.
4422	ForceSendFields []string `json:"-"`
4423
4424	// NullFields is a list of field names (e.g. "Id") to include in API
4425	// requests with the JSON null value. By default, fields with empty
4426	// values are omitted from API requests. However, any field with an
4427	// empty value appearing in NullFields will be sent to the server as
4428	// null. It is an error if a field in this list has a non-empty value.
4429	// This may be used to include null fields in Patch requests.
4430	NullFields []string `json:"-"`
4431}
4432
4433func (s *DiskTypeAggregatedList) MarshalJSON() ([]byte, error) {
4434	type noMethod DiskTypeAggregatedList
4435	raw := noMethod(*s)
4436	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4437}
4438
4439// DiskTypeList: Contains a list of disk types.
4440type DiskTypeList struct {
4441	// Id: [Output Only] Unique identifier for the resource; defined by the
4442	// server.
4443	Id string `json:"id,omitempty"`
4444
4445	// Items: A list of DiskType resources.
4446	Items []*DiskType `json:"items,omitempty"`
4447
4448	// Kind: [Output Only] Type of resource. Always compute#diskTypeList for
4449	// disk types.
4450	Kind string `json:"kind,omitempty"`
4451
4452	// NextPageToken: [Output Only] This token allows you to get the next
4453	// page of results for list requests. If the number of results is larger
4454	// than maxResults, use the nextPageToken as a value for the query
4455	// parameter pageToken in the next list request. Subsequent list
4456	// requests will have their own nextPageToken to continue paging through
4457	// the results.
4458	NextPageToken string `json:"nextPageToken,omitempty"`
4459
4460	// SelfLink: [Output Only] Server-defined URL for this resource.
4461	SelfLink string `json:"selfLink,omitempty"`
4462
4463	// ServerResponse contains the HTTP response code and headers from the
4464	// server.
4465	googleapi.ServerResponse `json:"-"`
4466
4467	// ForceSendFields is a list of field names (e.g. "Id") to
4468	// unconditionally include in API requests. By default, fields with
4469	// empty values are omitted from API requests. However, any non-pointer,
4470	// non-interface field appearing in ForceSendFields will be sent to the
4471	// server regardless of whether the field is empty or not. This may be
4472	// used to include empty fields in Patch requests.
4473	ForceSendFields []string `json:"-"`
4474
4475	// NullFields is a list of field names (e.g. "Id") to include in API
4476	// requests with the JSON null value. By default, fields with empty
4477	// values are omitted from API requests. However, any field with an
4478	// empty value appearing in NullFields will be sent to the server as
4479	// null. It is an error if a field in this list has a non-empty value.
4480	// This may be used to include null fields in Patch requests.
4481	NullFields []string `json:"-"`
4482}
4483
4484func (s *DiskTypeList) MarshalJSON() ([]byte, error) {
4485	type noMethod DiskTypeList
4486	raw := noMethod(*s)
4487	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4488}
4489
4490type DiskTypesScopedList struct {
4491	// DiskTypes: [Output Only] List of disk types contained in this scope.
4492	DiskTypes []*DiskType `json:"diskTypes,omitempty"`
4493
4494	// Warning: [Output Only] Informational warning which replaces the list
4495	// of disk types when the list is empty.
4496	Warning *DiskTypesScopedListWarning `json:"warning,omitempty"`
4497
4498	// ForceSendFields is a list of field names (e.g. "DiskTypes") to
4499	// unconditionally include in API requests. By default, fields with
4500	// empty values are omitted from API requests. However, any non-pointer,
4501	// non-interface field appearing in ForceSendFields will be sent to the
4502	// server regardless of whether the field is empty or not. This may be
4503	// used to include empty fields in Patch requests.
4504	ForceSendFields []string `json:"-"`
4505
4506	// NullFields is a list of field names (e.g. "DiskTypes") to include in
4507	// API requests with the JSON null value. By default, fields with empty
4508	// values are omitted from API requests. However, any field with an
4509	// empty value appearing in NullFields will be sent to the server as
4510	// null. It is an error if a field in this list has a non-empty value.
4511	// This may be used to include null fields in Patch requests.
4512	NullFields []string `json:"-"`
4513}
4514
4515func (s *DiskTypesScopedList) MarshalJSON() ([]byte, error) {
4516	type noMethod DiskTypesScopedList
4517	raw := noMethod(*s)
4518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4519}
4520
4521// DiskTypesScopedListWarning: [Output Only] Informational warning which
4522// replaces the list of disk types when the list is empty.
4523type DiskTypesScopedListWarning struct {
4524	// Code: [Output Only] A warning code, if applicable. For example,
4525	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
4526	// the response.
4527	//
4528	// Possible values:
4529	//   "CLEANUP_FAILED"
4530	//   "DEPRECATED_RESOURCE_USED"
4531	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
4532	//   "FIELD_VALUE_OVERRIDEN"
4533	//   "INJECTED_KERNELS_DEPRECATED"
4534	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
4535	//   "NEXT_HOP_CANNOT_IP_FORWARD"
4536	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
4537	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
4538	//   "NEXT_HOP_NOT_RUNNING"
4539	//   "NOT_CRITICAL_ERROR"
4540	//   "NO_RESULTS_ON_PAGE"
4541	//   "REQUIRED_TOS_AGREEMENT"
4542	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
4543	//   "RESOURCE_NOT_DELETED"
4544	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
4545	//   "UNREACHABLE"
4546	Code string `json:"code,omitempty"`
4547
4548	// Data: [Output Only] Metadata about this warning in key: value format.
4549	// For example:
4550	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4551	Data []*DiskTypesScopedListWarningData `json:"data,omitempty"`
4552
4553	// Message: [Output Only] A human-readable description of the warning
4554	// code.
4555	Message string `json:"message,omitempty"`
4556
4557	// ForceSendFields is a list of field names (e.g. "Code") to
4558	// unconditionally include in API requests. By default, fields with
4559	// empty values are omitted from API requests. However, any non-pointer,
4560	// non-interface field appearing in ForceSendFields will be sent to the
4561	// server regardless of whether the field is empty or not. This may be
4562	// used to include empty fields in Patch requests.
4563	ForceSendFields []string `json:"-"`
4564
4565	// NullFields is a list of field names (e.g. "Code") to include in API
4566	// requests with the JSON null value. By default, fields with empty
4567	// values are omitted from API requests. However, any field with an
4568	// empty value appearing in NullFields will be sent to the server as
4569	// null. It is an error if a field in this list has a non-empty value.
4570	// This may be used to include null fields in Patch requests.
4571	NullFields []string `json:"-"`
4572}
4573
4574func (s *DiskTypesScopedListWarning) MarshalJSON() ([]byte, error) {
4575	type noMethod DiskTypesScopedListWarning
4576	raw := noMethod(*s)
4577	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4578}
4579
4580type DiskTypesScopedListWarningData struct {
4581	// Key: [Output Only] A key that provides more detail on the warning
4582	// being returned. For example, for warnings where there are no results
4583	// in a list request for a particular zone, this key might be scope and
4584	// the key value might be the zone name. Other examples might be a key
4585	// indicating a deprecated resource and a suggested replacement, or a
4586	// warning about invalid network settings (for example, if an instance
4587	// attempts to perform IP forwarding but is not enabled for IP
4588	// forwarding).
4589	Key string `json:"key,omitempty"`
4590
4591	// Value: [Output Only] A warning data value corresponding to the key.
4592	Value string `json:"value,omitempty"`
4593
4594	// ForceSendFields is a list of field names (e.g. "Key") to
4595	// unconditionally include in API requests. By default, fields with
4596	// empty values are omitted from API requests. However, any non-pointer,
4597	// non-interface field appearing in ForceSendFields will be sent to the
4598	// server regardless of whether the field is empty or not. This may be
4599	// used to include empty fields in Patch requests.
4600	ForceSendFields []string `json:"-"`
4601
4602	// NullFields is a list of field names (e.g. "Key") to include in API
4603	// requests with the JSON null value. By default, fields with empty
4604	// values are omitted from API requests. However, any field with an
4605	// empty value appearing in NullFields will be sent to the server as
4606	// null. It is an error if a field in this list has a non-empty value.
4607	// This may be used to include null fields in Patch requests.
4608	NullFields []string `json:"-"`
4609}
4610
4611func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) {
4612	type noMethod DiskTypesScopedListWarningData
4613	raw := noMethod(*s)
4614	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4615}
4616
4617type DisksResizeRequest struct {
4618	// SizeGb: The new size of the persistent disk, which is specified in
4619	// GB.
4620	SizeGb int64 `json:"sizeGb,omitempty,string"`
4621
4622	// ForceSendFields is a list of field names (e.g. "SizeGb") to
4623	// unconditionally include in API requests. By default, fields with
4624	// empty values are omitted from API requests. However, any non-pointer,
4625	// non-interface field appearing in ForceSendFields will be sent to the
4626	// server regardless of whether the field is empty or not. This may be
4627	// used to include empty fields in Patch requests.
4628	ForceSendFields []string `json:"-"`
4629
4630	// NullFields is a list of field names (e.g. "SizeGb") to include in API
4631	// requests with the JSON null value. By default, fields with empty
4632	// values are omitted from API requests. However, any field with an
4633	// empty value appearing in NullFields will be sent to the server as
4634	// null. It is an error if a field in this list has a non-empty value.
4635	// This may be used to include null fields in Patch requests.
4636	NullFields []string `json:"-"`
4637}
4638
4639func (s *DisksResizeRequest) MarshalJSON() ([]byte, error) {
4640	type noMethod DisksResizeRequest
4641	raw := noMethod(*s)
4642	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4643}
4644
4645type DisksScopedList struct {
4646	// Disks: [Output Only] List of disks contained in this scope.
4647	Disks []*Disk `json:"disks,omitempty"`
4648
4649	// Warning: [Output Only] Informational warning which replaces the list
4650	// of disks when the list is empty.
4651	Warning *DisksScopedListWarning `json:"warning,omitempty"`
4652
4653	// ForceSendFields is a list of field names (e.g. "Disks") to
4654	// unconditionally include in API requests. By default, fields with
4655	// empty values are omitted from API requests. However, any non-pointer,
4656	// non-interface field appearing in ForceSendFields will be sent to the
4657	// server regardless of whether the field is empty or not. This may be
4658	// used to include empty fields in Patch requests.
4659	ForceSendFields []string `json:"-"`
4660
4661	// NullFields is a list of field names (e.g. "Disks") to include in API
4662	// requests with the JSON null value. By default, fields with empty
4663	// values are omitted from API requests. However, any field with an
4664	// empty value appearing in NullFields will be sent to the server as
4665	// null. It is an error if a field in this list has a non-empty value.
4666	// This may be used to include null fields in Patch requests.
4667	NullFields []string `json:"-"`
4668}
4669
4670func (s *DisksScopedList) MarshalJSON() ([]byte, error) {
4671	type noMethod DisksScopedList
4672	raw := noMethod(*s)
4673	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4674}
4675
4676// DisksScopedListWarning: [Output Only] Informational warning which
4677// replaces the list of disks when the list is empty.
4678type DisksScopedListWarning struct {
4679	// Code: [Output Only] A warning code, if applicable. For example,
4680	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
4681	// the response.
4682	//
4683	// Possible values:
4684	//   "CLEANUP_FAILED"
4685	//   "DEPRECATED_RESOURCE_USED"
4686	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
4687	//   "FIELD_VALUE_OVERRIDEN"
4688	//   "INJECTED_KERNELS_DEPRECATED"
4689	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
4690	//   "NEXT_HOP_CANNOT_IP_FORWARD"
4691	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
4692	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
4693	//   "NEXT_HOP_NOT_RUNNING"
4694	//   "NOT_CRITICAL_ERROR"
4695	//   "NO_RESULTS_ON_PAGE"
4696	//   "REQUIRED_TOS_AGREEMENT"
4697	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
4698	//   "RESOURCE_NOT_DELETED"
4699	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
4700	//   "UNREACHABLE"
4701	Code string `json:"code,omitempty"`
4702
4703	// Data: [Output Only] Metadata about this warning in key: value format.
4704	// For example:
4705	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4706	Data []*DisksScopedListWarningData `json:"data,omitempty"`
4707
4708	// Message: [Output Only] A human-readable description of the warning
4709	// code.
4710	Message string `json:"message,omitempty"`
4711
4712	// ForceSendFields is a list of field names (e.g. "Code") to
4713	// unconditionally include in API requests. By default, fields with
4714	// empty values are omitted from API requests. However, any non-pointer,
4715	// non-interface field appearing in ForceSendFields will be sent to the
4716	// server regardless of whether the field is empty or not. This may be
4717	// used to include empty fields in Patch requests.
4718	ForceSendFields []string `json:"-"`
4719
4720	// NullFields is a list of field names (e.g. "Code") to include in API
4721	// requests with the JSON null value. By default, fields with empty
4722	// values are omitted from API requests. However, any field with an
4723	// empty value appearing in NullFields will be sent to the server as
4724	// null. It is an error if a field in this list has a non-empty value.
4725	// This may be used to include null fields in Patch requests.
4726	NullFields []string `json:"-"`
4727}
4728
4729func (s *DisksScopedListWarning) MarshalJSON() ([]byte, error) {
4730	type noMethod DisksScopedListWarning
4731	raw := noMethod(*s)
4732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4733}
4734
4735type DisksScopedListWarningData struct {
4736	// Key: [Output Only] A key that provides more detail on the warning
4737	// being returned. For example, for warnings where there are no results
4738	// in a list request for a particular zone, this key might be scope and
4739	// the key value might be the zone name. Other examples might be a key
4740	// indicating a deprecated resource and a suggested replacement, or a
4741	// warning about invalid network settings (for example, if an instance
4742	// attempts to perform IP forwarding but is not enabled for IP
4743	// forwarding).
4744	Key string `json:"key,omitempty"`
4745
4746	// Value: [Output Only] A warning data value corresponding to the key.
4747	Value string `json:"value,omitempty"`
4748
4749	// ForceSendFields is a list of field names (e.g. "Key") to
4750	// unconditionally include in API requests. By default, fields with
4751	// empty values are omitted from API requests. However, any non-pointer,
4752	// non-interface field appearing in ForceSendFields will be sent to the
4753	// server regardless of whether the field is empty or not. This may be
4754	// used to include empty fields in Patch requests.
4755	ForceSendFields []string `json:"-"`
4756
4757	// NullFields is a list of field names (e.g. "Key") to include in API
4758	// requests with the JSON null value. By default, fields with empty
4759	// values are omitted from API requests. However, any field with an
4760	// empty value appearing in NullFields will be sent to the server as
4761	// null. It is an error if a field in this list has a non-empty value.
4762	// This may be used to include null fields in Patch requests.
4763	NullFields []string `json:"-"`
4764}
4765
4766func (s *DisksScopedListWarningData) MarshalJSON() ([]byte, error) {
4767	type noMethod DisksScopedListWarningData
4768	raw := noMethod(*s)
4769	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4770}
4771
4772// Expr: Represents an expression text. Example:
4773//
4774// title: "User account presence" description: "Determines whether the
4775// request has a user account" expression: "size(request.user) > 0"
4776type Expr struct {
4777	// Description: An optional description of the expression. This is a
4778	// longer text which describes the expression, e.g. when hovered over it
4779	// in a UI.
4780	Description string `json:"description,omitempty"`
4781
4782	// Expression: Textual representation of an expression in Common
4783	// Expression Language syntax.
4784	//
4785	// The application context of the containing message determines which
4786	// well-known feature set of CEL is supported.
4787	Expression string `json:"expression,omitempty"`
4788
4789	// Location: An optional string indicating the location of the
4790	// expression for error reporting, e.g. a file name and a position in
4791	// the file.
4792	Location string `json:"location,omitempty"`
4793
4794	// Title: An optional title for the expression, i.e. a short string
4795	// describing its purpose. This can be used e.g. in UIs which allow to
4796	// enter the expression.
4797	Title string `json:"title,omitempty"`
4798
4799	// ForceSendFields is a list of field names (e.g. "Description") to
4800	// unconditionally include in API requests. By default, fields with
4801	// empty values are omitted from API requests. However, any non-pointer,
4802	// non-interface field appearing in ForceSendFields will be sent to the
4803	// server regardless of whether the field is empty or not. This may be
4804	// used to include empty fields in Patch requests.
4805	ForceSendFields []string `json:"-"`
4806
4807	// NullFields is a list of field names (e.g. "Description") to include
4808	// in API requests with the JSON null value. By default, fields with
4809	// empty values are omitted from API requests. However, any field with
4810	// an empty value appearing in NullFields will be sent to the server as
4811	// null. It is an error if a field in this list has a non-empty value.
4812	// This may be used to include null fields in Patch requests.
4813	NullFields []string `json:"-"`
4814}
4815
4816func (s *Expr) MarshalJSON() ([]byte, error) {
4817	type noMethod Expr
4818	raw := noMethod(*s)
4819	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4820}
4821
4822// Firewall: Represents a Firewall resource.
4823type Firewall struct {
4824	// Allowed: The list of ALLOW rules specified by this firewall. Each
4825	// rule specifies a protocol and port-range tuple that describes a
4826	// permitted connection.
4827	Allowed []*FirewallAllowed `json:"allowed,omitempty"`
4828
4829	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
4830	// format.
4831	CreationTimestamp string `json:"creationTimestamp,omitempty"`
4832
4833	// Denied: The list of DENY rules specified by this firewall. Each rule
4834	// specifies a protocol and port-range tuple that describes a permitted
4835	// connection.
4836	Denied []*FirewallDenied `json:"denied,omitempty"`
4837
4838	// Description: An optional description of this resource. Provide this
4839	// property when you create the resource.
4840	Description string `json:"description,omitempty"`
4841
4842	// DestinationRanges: If destination ranges are specified, the firewall
4843	// will apply only to traffic that has destination IP address in these
4844	// ranges. These ranges must be expressed in CIDR format. Only IPv4 is
4845	// supported.
4846	DestinationRanges []string `json:"destinationRanges,omitempty"`
4847
4848	// Direction: Direction of traffic to which this firewall applies;
4849	// default is INGRESS. Note: For INGRESS traffic, it is NOT supported to
4850	// specify destinationRanges; For EGRESS traffic, it is NOT supported to
4851	// specify sourceRanges OR sourceTags.
4852	//
4853	// Possible values:
4854	//   "EGRESS"
4855	//   "INGRESS"
4856	Direction string `json:"direction,omitempty"`
4857
4858	// Id: [Output Only] The unique identifier for the resource. This
4859	// identifier is defined by the server.
4860	Id uint64 `json:"id,omitempty,string"`
4861
4862	// Kind: [Output Only] Type of the resource. Always compute#firewall for
4863	// firewall rules.
4864	Kind string `json:"kind,omitempty"`
4865
4866	// Name: Name of the resource; provided by the client when the resource
4867	// is created. The name must be 1-63 characters long, and comply with
4868	// RFC1035. Specifically, the name must be 1-63 characters long and
4869	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
4870	// the first character must be a lowercase letter, and all following
4871	// characters must be a dash, lowercase letter, or digit, except the
4872	// last character, which cannot be a dash.
4873	Name string `json:"name,omitempty"`
4874
4875	// Network: URL of the network resource for this firewall rule. If not
4876	// specified when creating a firewall rule, the default network is
4877	// used:
4878	// global/networks/default
4879	// If you choose to specify this property, you can specify the network
4880	// as a full or partial URL. For example, the following are all valid
4881	// URLs:
4882	// -
4883	// https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
4884	// - projects/myproject/global/networks/my-network
4885	// - global/networks/default
4886	Network string `json:"network,omitempty"`
4887
4888	// Priority: Priority for this rule. This is an integer between 0 and
4889	// 65535, both inclusive. When not specified, the value assumed is 1000.
4890	// Relative priorities determine precedence of conflicting rules. Lower
4891	// value of priority implies higher precedence (eg, a rule with priority
4892	// 0 has higher precedence than a rule with priority 1). DENY rules take
4893	// precedence over ALLOW rules having equal priority.
4894	Priority int64 `json:"priority,omitempty"`
4895
4896	// SelfLink: [Output Only] Server-defined URL for the resource.
4897	SelfLink string `json:"selfLink,omitempty"`
4898
4899	// SourceRanges: If source ranges are specified, the firewall will apply
4900	// only to traffic that has source IP address in these ranges. These
4901	// ranges must be expressed in CIDR format. One or both of sourceRanges
4902	// and sourceTags may be set. If both properties are set, the firewall
4903	// will apply to traffic that has source IP address within sourceRanges
4904	// OR the source IP that belongs to a tag listed in the sourceTags
4905	// property. The connection does not need to match both properties for
4906	// the firewall to apply. Only IPv4 is supported.
4907	SourceRanges []string `json:"sourceRanges,omitempty"`
4908
4909	// SourceServiceAccounts: If source service accounts are specified, the
4910	// firewall will apply only to traffic originating from an instance with
4911	// a service account in this list. Source service accounts cannot be
4912	// used to control traffic to an instance's external IP address because
4913	// service accounts are associated with an instance, not an IP address.
4914	// sourceRanges can be set at the same time as sourceServiceAccounts. If
4915	// both are set, the firewall will apply to traffic that has source IP
4916	// address within sourceRanges OR the source IP belongs to an instance
4917	// with service account listed in sourceServiceAccount. The connection
4918	// does not need to match both properties for the firewall to apply.
4919	// sourceServiceAccounts cannot be used at the same time as sourceTags
4920	// or targetTags.
4921	SourceServiceAccounts []string `json:"sourceServiceAccounts,omitempty"`
4922
4923	// SourceTags: If source tags are specified, the firewall rule applies
4924	// only to traffic with source IPs that match the primary network
4925	// interfaces of VM instances that have the tag and are in the same VPC
4926	// network. Source tags cannot be used to control traffic to an
4927	// instance's external IP address, it only applies to traffic between
4928	// instances in the same virtual network. Because tags are associated
4929	// with instances, not IP addresses. One or both of sourceRanges and
4930	// sourceTags may be set. If both properties are set, the firewall will
4931	// apply to traffic that has source IP address within sourceRanges OR
4932	// the source IP that belongs to a tag listed in the sourceTags
4933	// property. The connection does not need to match both properties for
4934	// the firewall to apply.
4935	SourceTags []string `json:"sourceTags,omitempty"`
4936
4937	// TargetServiceAccounts: A list of service accounts indicating sets of
4938	// instances located in the network that may make network connections as
4939	// specified in allowed[]. targetServiceAccounts cannot be used at the
4940	// same time as targetTags or sourceTags. If neither
4941	// targetServiceAccounts nor targetTags are specified, the firewall rule
4942	// applies to all instances on the specified network.
4943	TargetServiceAccounts []string `json:"targetServiceAccounts,omitempty"`
4944
4945	// TargetTags: A list of instance tags indicating sets of instances
4946	// located in the network that may make network connections as specified
4947	// in allowed[]. If no targetTags are specified, the firewall rule
4948	// applies to all instances on the specified network.
4949	TargetTags []string `json:"targetTags,omitempty"`
4950
4951	// ServerResponse contains the HTTP response code and headers from the
4952	// server.
4953	googleapi.ServerResponse `json:"-"`
4954
4955	// ForceSendFields is a list of field names (e.g. "Allowed") to
4956	// unconditionally include in API requests. By default, fields with
4957	// empty values are omitted from API requests. However, any non-pointer,
4958	// non-interface field appearing in ForceSendFields will be sent to the
4959	// server regardless of whether the field is empty or not. This may be
4960	// used to include empty fields in Patch requests.
4961	ForceSendFields []string `json:"-"`
4962
4963	// NullFields is a list of field names (e.g. "Allowed") to include in
4964	// API requests with the JSON null value. By default, fields with empty
4965	// values are omitted from API requests. However, any field with an
4966	// empty value appearing in NullFields will be sent to the server as
4967	// null. It is an error if a field in this list has a non-empty value.
4968	// This may be used to include null fields in Patch requests.
4969	NullFields []string `json:"-"`
4970}
4971
4972func (s *Firewall) MarshalJSON() ([]byte, error) {
4973	type noMethod Firewall
4974	raw := noMethod(*s)
4975	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4976}
4977
4978type FirewallAllowed struct {
4979	// IPProtocol: The IP protocol to which this rule applies. The protocol
4980	// type is required when creating a firewall rule. This value can either
4981	// be one of the following well known protocol strings (tcp, udp, icmp,
4982	// esp, ah, ipip, sctp), or the IP protocol number.
4983	IPProtocol string `json:"IPProtocol,omitempty"`
4984
4985	// Ports: An optional list of ports to which this rule applies. This
4986	// field is only applicable for UDP or TCP protocol. Each entry must be
4987	// either an integer or a range. If not specified, this rule applies to
4988	// connections through any port.
4989	//
4990	// Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
4991	Ports []string `json:"ports,omitempty"`
4992
4993	// ForceSendFields is a list of field names (e.g. "IPProtocol") to
4994	// unconditionally include in API requests. By default, fields with
4995	// empty values are omitted from API requests. However, any non-pointer,
4996	// non-interface field appearing in ForceSendFields will be sent to the
4997	// server regardless of whether the field is empty or not. This may be
4998	// used to include empty fields in Patch requests.
4999	ForceSendFields []string `json:"-"`
5000
5001	// NullFields is a list of field names (e.g. "IPProtocol") to include in
5002	// API requests with the JSON null value. By default, fields with empty
5003	// values are omitted from API requests. However, any field with an
5004	// empty value appearing in NullFields will be sent to the server as
5005	// null. It is an error if a field in this list has a non-empty value.
5006	// This may be used to include null fields in Patch requests.
5007	NullFields []string `json:"-"`
5008}
5009
5010func (s *FirewallAllowed) MarshalJSON() ([]byte, error) {
5011	type noMethod FirewallAllowed
5012	raw := noMethod(*s)
5013	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5014}
5015
5016type FirewallDenied struct {
5017	// IPProtocol: The IP protocol to which this rule applies. The protocol
5018	// type is required when creating a firewall rule. This value can either
5019	// be one of the following well known protocol strings (tcp, udp, icmp,
5020	// esp, ah, ipip, sctp), or the IP protocol number.
5021	IPProtocol string `json:"IPProtocol,omitempty"`
5022
5023	// Ports: An optional list of ports to which this rule applies. This
5024	// field is only applicable for UDP or TCP protocol. Each entry must be
5025	// either an integer or a range. If not specified, this rule applies to
5026	// connections through any port.
5027	//
5028	// Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
5029	Ports []string `json:"ports,omitempty"`
5030
5031	// ForceSendFields is a list of field names (e.g. "IPProtocol") to
5032	// unconditionally include in API requests. By default, fields with
5033	// empty values are omitted from API requests. However, any non-pointer,
5034	// non-interface field appearing in ForceSendFields will be sent to the
5035	// server regardless of whether the field is empty or not. This may be
5036	// used to include empty fields in Patch requests.
5037	ForceSendFields []string `json:"-"`
5038
5039	// NullFields is a list of field names (e.g. "IPProtocol") to include in
5040	// API requests with the JSON null value. By default, fields with empty
5041	// values are omitted from API requests. However, any field with an
5042	// empty value appearing in NullFields will be sent to the server as
5043	// null. It is an error if a field in this list has a non-empty value.
5044	// This may be used to include null fields in Patch requests.
5045	NullFields []string `json:"-"`
5046}
5047
5048func (s *FirewallDenied) MarshalJSON() ([]byte, error) {
5049	type noMethod FirewallDenied
5050	raw := noMethod(*s)
5051	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5052}
5053
5054// FirewallList: Contains a list of firewalls.
5055type FirewallList struct {
5056	// Id: [Output Only] Unique identifier for the resource; defined by the
5057	// server.
5058	Id string `json:"id,omitempty"`
5059
5060	// Items: A list of Firewall resources.
5061	Items []*Firewall `json:"items,omitempty"`
5062
5063	// Kind: [Output Only] Type of resource. Always compute#firewallList for
5064	// lists of firewalls.
5065	Kind string `json:"kind,omitempty"`
5066
5067	// NextPageToken: [Output Only] This token allows you to get the next
5068	// page of results for list requests. If the number of results is larger
5069	// than maxResults, use the nextPageToken as a value for the query
5070	// parameter pageToken in the next list request. Subsequent list
5071	// requests will have their own nextPageToken to continue paging through
5072	// the results.
5073	NextPageToken string `json:"nextPageToken,omitempty"`
5074
5075	// SelfLink: [Output Only] Server-defined URL for this resource.
5076	SelfLink string `json:"selfLink,omitempty"`
5077
5078	// ServerResponse contains the HTTP response code and headers from the
5079	// server.
5080	googleapi.ServerResponse `json:"-"`
5081
5082	// ForceSendFields is a list of field names (e.g. "Id") to
5083	// unconditionally include in API requests. By default, fields with
5084	// empty values are omitted from API requests. However, any non-pointer,
5085	// non-interface field appearing in ForceSendFields will be sent to the
5086	// server regardless of whether the field is empty or not. This may be
5087	// used to include empty fields in Patch requests.
5088	ForceSendFields []string `json:"-"`
5089
5090	// NullFields is a list of field names (e.g. "Id") to include in API
5091	// requests with the JSON null value. By default, fields with empty
5092	// values are omitted from API requests. However, any field with an
5093	// empty value appearing in NullFields will be sent to the server as
5094	// null. It is an error if a field in this list has a non-empty value.
5095	// This may be used to include null fields in Patch requests.
5096	NullFields []string `json:"-"`
5097}
5098
5099func (s *FirewallList) MarshalJSON() ([]byte, error) {
5100	type noMethod FirewallList
5101	raw := noMethod(*s)
5102	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5103}
5104
5105// FixedOrPercent: Encapsulates numeric value that can be either
5106// absolute or relative.
5107type FixedOrPercent struct {
5108	// Calculated: [Output Only] Absolute value calculated based on mode:
5109	// mode = fixed -> calculated = fixed = percent -> calculated =
5110	// ceiling(percent/100 * base_value)
5111	Calculated int64 `json:"calculated,omitempty"`
5112
5113	// Fixed: fixed must be non-negative.
5114	Fixed int64 `json:"fixed,omitempty"`
5115
5116	// Percent: percent must belong to [0, 100].
5117	Percent int64 `json:"percent,omitempty"`
5118
5119	// ForceSendFields is a list of field names (e.g. "Calculated") 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	// NullFields is a list of field names (e.g. "Calculated") to include in
5128	// API requests with the JSON null value. By default, fields with empty
5129	// values are omitted from API requests. However, any field with an
5130	// empty value appearing in NullFields will be sent to the server as
5131	// null. It is an error if a field in this list has a non-empty value.
5132	// This may be used to include null fields in Patch requests.
5133	NullFields []string `json:"-"`
5134}
5135
5136func (s *FixedOrPercent) MarshalJSON() ([]byte, error) {
5137	type noMethod FixedOrPercent
5138	raw := noMethod(*s)
5139	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5140}
5141
5142// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource
5143// specifies which pool of target virtual machines to forward a packet
5144// to if it matches the given [IPAddress, IPProtocol, ports] tuple.
5145type ForwardingRule struct {
5146	// IPAddress: The IP address that this forwarding rule is serving on
5147	// behalf of.
5148	//
5149	// For global forwarding rules, the address must be a global IP. For
5150	// regional forwarding rules, the address must live in the same region
5151	// as the forwarding rule. By default, this field is empty and an
5152	// ephemeral IPv4 address from the same scope (global or regional) will
5153	// be assigned. A regional forwarding rule supports IPv4 only. A global
5154	// forwarding rule supports either IPv4 or IPv6.
5155	//
5156	// When the load balancing scheme is INTERNAL, this can only be an RFC
5157	// 1918 IP address belonging to the network/subnetwork configured for
5158	// the forwarding rule. A reserved address cannot be used. If the field
5159	// is empty, the IP address will be automatically allocated from the
5160	// internal IP range of the subnetwork or network configured for this
5161	// forwarding rule.
5162	IPAddress string `json:"IPAddress,omitempty"`
5163
5164	// IPProtocol: The IP protocol to which this rule applies. Valid options
5165	// are TCP, UDP, ESP, AH, SCTP or ICMP.
5166	//
5167	// When the load balancing scheme is INTERNAL, only TCP and UDP are
5168	// valid.
5169	//
5170	// Possible values:
5171	//   "AH"
5172	//   "ESP"
5173	//   "ICMP"
5174	//   "SCTP"
5175	//   "TCP"
5176	//   "UDP"
5177	IPProtocol string `json:"IPProtocol,omitempty"`
5178
5179	// BackendService: This field is not used for external load
5180	// balancing.
5181	//
5182	// For internal load balancing, this field identifies the BackendService
5183	// resource to receive the matched traffic.
5184	BackendService string `json:"backendService,omitempty"`
5185
5186	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
5187	// format.
5188	CreationTimestamp string `json:"creationTimestamp,omitempty"`
5189
5190	// Description: An optional description of this resource. Provide this
5191	// property when you create the resource.
5192	Description string `json:"description,omitempty"`
5193
5194	// Id: [Output Only] The unique identifier for the resource. This
5195	// identifier is defined by the server.
5196	Id uint64 `json:"id,omitempty,string"`
5197
5198	// IpVersion: The IP Version that will be used by this forwarding rule.
5199	// Valid options are IPV4 or IPV6. This can only be specified for a
5200	// global forwarding rule.
5201	//
5202	// Possible values:
5203	//   "IPV4"
5204	//   "IPV6"
5205	//   "UNSPECIFIED_VERSION"
5206	IpVersion string `json:"ipVersion,omitempty"`
5207
5208	// Kind: [Output Only] Type of the resource. Always
5209	// compute#forwardingRule for Forwarding Rule resources.
5210	Kind string `json:"kind,omitempty"`
5211
5212	// LabelFingerprint: A fingerprint for the labels being applied to this
5213	// resource, which is essentially a hash of the labels set used for
5214	// optimistic locking. The fingerprint is initially generated by Compute
5215	// Engine and changes after every request to modify or update labels.
5216	// You must always provide an up-to-date fingerprint hash in order to
5217	// update or change labels.
5218	//
5219	// To see the latest fingerprint, make a get() request to retrieve a
5220	// ForwardingRule.
5221	LabelFingerprint string `json:"labelFingerprint,omitempty"`
5222
5223	// Labels: Labels to apply to this resource. These can be later modified
5224	// by the setLabels method. Each label key/value pair must comply with
5225	// RFC1035. Label values may be empty.
5226	Labels map[string]string `json:"labels,omitempty"`
5227
5228	// LoadBalancingScheme: This signifies what the ForwardingRule will be
5229	// used for and can only take the following values: INTERNAL, EXTERNAL
5230	// The value of INTERNAL means that this will be used for Internal
5231	// Network Load Balancing (TCP, UDP). The value of EXTERNAL means that
5232	// this will be used for External Load Balancing (HTTP(S) LB, External
5233	// TCP/UDP LB, SSL Proxy)
5234	//
5235	// Possible values:
5236	//   "EXTERNAL"
5237	//   "INTERNAL"
5238	//   "INVALID"
5239	LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
5240
5241	// Name: Name of the resource; provided by the client when the resource
5242	// is created. The name must be 1-63 characters long, and comply with
5243	// RFC1035. Specifically, the name must be 1-63 characters long and
5244	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
5245	// the first character must be a lowercase letter, and all following
5246	// characters must be a dash, lowercase letter, or digit, except the
5247	// last character, which cannot be a dash.
5248	Name string `json:"name,omitempty"`
5249
5250	// Network: This field is not used for external load balancing.
5251	//
5252	// For internal load balancing, this field identifies the network that
5253	// the load balanced IP should belong to for this Forwarding Rule. If
5254	// this field is not specified, the default network will be used.
5255	Network string `json:"network,omitempty"`
5256
5257	// PortRange: This field is used along with the target field for
5258	// TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy,
5259	// TargetVpnGateway, TargetPool, TargetInstance.
5260	//
5261	// Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets
5262	// addressed to ports in the specified range will be forwarded to
5263	// target. Forwarding rules with the same [IPAddress, IPProtocol] pair
5264	// must have disjoint port ranges.
5265	//
5266	// Some types of forwarding target have constraints on the acceptable
5267	// ports:
5268	// - TargetHttpProxy: 80, 8080
5269	// - TargetHttpsProxy: 443
5270	// - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993,
5271	// 995, 1883, 5222
5272	// - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993,
5273	// 995, 1883, 5222
5274	// - TargetVpnGateway: 500, 4500
5275	// -
5276	PortRange string `json:"portRange,omitempty"`
5277
5278	// Ports: This field is used along with the backend_service field for
5279	// internal load balancing.
5280	//
5281	// When the load balancing scheme is INTERNAL, a single port or a comma
5282	// separated list of ports can be configured. Only packets addressed to
5283	// these ports will be forwarded to the backends configured with this
5284	// forwarding rule.
5285	//
5286	// You may specify a maximum of up to 5 ports.
5287	Ports []string `json:"ports,omitempty"`
5288
5289	// Region: [Output Only] URL of the region where the regional forwarding
5290	// rule resides. This field is not applicable to global forwarding
5291	// rules.
5292	Region string `json:"region,omitempty"`
5293
5294	// SelfLink: [Output Only] Server-defined URL for the resource.
5295	SelfLink string `json:"selfLink,omitempty"`
5296
5297	// ServiceLabel: An optional prefix to the service name for this
5298	// Forwarding Rule. If specified, will be the first label of the fully
5299	// qualified service name.
5300	//
5301	// The label must be 1-63 characters long, and comply with RFC1035.
5302	// Specifically, the label must be 1-63 characters long and match the
5303	// regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first
5304	// character must be a lowercase letter, and all following characters
5305	// must be a dash, lowercase letter, or digit, except the last
5306	// character, which cannot be a dash.
5307	//
5308	// This field is only used for internal load balancing.
5309	ServiceLabel string `json:"serviceLabel,omitempty"`
5310
5311	// ServiceName: [Output Only] The internal fully qualified service name
5312	// for this Forwarding Rule.
5313	//
5314	// This field is only used for internal load balancing.
5315	ServiceName string `json:"serviceName,omitempty"`
5316
5317	// Subnetwork: This field is not used for external load balancing.
5318	//
5319	// For internal load balancing, this field identifies the subnetwork
5320	// that the load balanced IP should belong to for this Forwarding
5321	// Rule.
5322	//
5323	// If the network specified is in auto subnet mode, this field is
5324	// optional. However, if the network is in custom subnet mode, a
5325	// subnetwork must be specified.
5326	Subnetwork string `json:"subnetwork,omitempty"`
5327
5328	// Target: The URL of the target resource to receive the matched
5329	// traffic. For regional forwarding rules, this target must live in the
5330	// same region as the forwarding rule. For global forwarding rules, this
5331	// target must be a global load balancing resource. The forwarded
5332	// traffic must be of a type appropriate to the target object.
5333	//
5334	// This field is not used for internal load balancing.
5335	Target string `json:"target,omitempty"`
5336
5337	// ServerResponse contains the HTTP response code and headers from the
5338	// server.
5339	googleapi.ServerResponse `json:"-"`
5340
5341	// ForceSendFields is a list of field names (e.g. "IPAddress") to
5342	// unconditionally include in API requests. By default, fields with
5343	// empty values are omitted from API requests. However, any non-pointer,
5344	// non-interface field appearing in ForceSendFields will be sent to the
5345	// server regardless of whether the field is empty or not. This may be
5346	// used to include empty fields in Patch requests.
5347	ForceSendFields []string `json:"-"`
5348
5349	// NullFields is a list of field names (e.g. "IPAddress") to include in
5350	// API requests with the JSON null value. By default, fields with empty
5351	// values are omitted from API requests. However, any field with an
5352	// empty value appearing in NullFields will be sent to the server as
5353	// null. It is an error if a field in this list has a non-empty value.
5354	// This may be used to include null fields in Patch requests.
5355	NullFields []string `json:"-"`
5356}
5357
5358func (s *ForwardingRule) MarshalJSON() ([]byte, error) {
5359	type noMethod ForwardingRule
5360	raw := noMethod(*s)
5361	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5362}
5363
5364type ForwardingRuleAggregatedList struct {
5365	// Id: [Output Only] Unique identifier for the resource; defined by the
5366	// server.
5367	Id string `json:"id,omitempty"`
5368
5369	// Items: A list of ForwardingRulesScopedList resources.
5370	Items map[string]ForwardingRulesScopedList `json:"items,omitempty"`
5371
5372	// Kind: [Output Only] Type of resource. Always
5373	// compute#forwardingRuleAggregatedList for lists of forwarding rules.
5374	Kind string `json:"kind,omitempty"`
5375
5376	// NextPageToken: [Output Only] This token allows you to get the next
5377	// page of results for list requests. If the number of results is larger
5378	// than maxResults, use the nextPageToken as a value for the query
5379	// parameter pageToken in the next list request. Subsequent list
5380	// requests will have their own nextPageToken to continue paging through
5381	// the results.
5382	NextPageToken string `json:"nextPageToken,omitempty"`
5383
5384	// SelfLink: [Output Only] Server-defined URL for this resource.
5385	SelfLink string `json:"selfLink,omitempty"`
5386
5387	// ServerResponse contains the HTTP response code and headers from the
5388	// server.
5389	googleapi.ServerResponse `json:"-"`
5390
5391	// ForceSendFields is a list of field names (e.g. "Id") to
5392	// unconditionally include in API requests. By default, fields with
5393	// empty values are omitted from API requests. However, any non-pointer,
5394	// non-interface field appearing in ForceSendFields will be sent to the
5395	// server regardless of whether the field is empty or not. This may be
5396	// used to include empty fields in Patch requests.
5397	ForceSendFields []string `json:"-"`
5398
5399	// NullFields is a list of field names (e.g. "Id") to include in API
5400	// requests with the JSON null value. By default, fields with empty
5401	// values are omitted from API requests. However, any field with an
5402	// empty value appearing in NullFields will be sent to the server as
5403	// null. It is an error if a field in this list has a non-empty value.
5404	// This may be used to include null fields in Patch requests.
5405	NullFields []string `json:"-"`
5406}
5407
5408func (s *ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) {
5409	type noMethod ForwardingRuleAggregatedList
5410	raw := noMethod(*s)
5411	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5412}
5413
5414// ForwardingRuleList: Contains a list of ForwardingRule resources.
5415type ForwardingRuleList struct {
5416	// Id: [Output Only] Unique identifier for the resource; defined by the
5417	// server.
5418	Id string `json:"id,omitempty"`
5419
5420	// Items: A list of ForwardingRule resources.
5421	Items []*ForwardingRule `json:"items,omitempty"`
5422
5423	// Kind: Type of resource.
5424	Kind string `json:"kind,omitempty"`
5425
5426	// NextPageToken: [Output Only] This token allows you to get the next
5427	// page of results for list requests. If the number of results is larger
5428	// than maxResults, use the nextPageToken as a value for the query
5429	// parameter pageToken in the next list request. Subsequent list
5430	// requests will have their own nextPageToken to continue paging through
5431	// the results.
5432	NextPageToken string `json:"nextPageToken,omitempty"`
5433
5434	// SelfLink: [Output Only] Server-defined URL for this resource.
5435	SelfLink string `json:"selfLink,omitempty"`
5436
5437	// ServerResponse contains the HTTP response code and headers from the
5438	// server.
5439	googleapi.ServerResponse `json:"-"`
5440
5441	// ForceSendFields is a list of field names (e.g. "Id") to
5442	// unconditionally include in API requests. By default, fields with
5443	// empty values are omitted from API requests. However, any non-pointer,
5444	// non-interface field appearing in ForceSendFields will be sent to the
5445	// server regardless of whether the field is empty or not. This may be
5446	// used to include empty fields in Patch requests.
5447	ForceSendFields []string `json:"-"`
5448
5449	// NullFields is a list of field names (e.g. "Id") to include in API
5450	// requests with the JSON null value. By default, fields with empty
5451	// values are omitted from API requests. However, any field with an
5452	// empty value appearing in NullFields will be sent to the server as
5453	// null. It is an error if a field in this list has a non-empty value.
5454	// This may be used to include null fields in Patch requests.
5455	NullFields []string `json:"-"`
5456}
5457
5458func (s *ForwardingRuleList) MarshalJSON() ([]byte, error) {
5459	type noMethod ForwardingRuleList
5460	raw := noMethod(*s)
5461	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5462}
5463
5464type ForwardingRulesScopedList struct {
5465	// ForwardingRules: List of forwarding rules contained in this scope.
5466	ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"`
5467
5468	// Warning: Informational warning which replaces the list of forwarding
5469	// rules when the list is empty.
5470	Warning *ForwardingRulesScopedListWarning `json:"warning,omitempty"`
5471
5472	// ForceSendFields is a list of field names (e.g. "ForwardingRules") to
5473	// unconditionally include in API requests. By default, fields with
5474	// empty values are omitted from API requests. However, any non-pointer,
5475	// non-interface field appearing in ForceSendFields will be sent to the
5476	// server regardless of whether the field is empty or not. This may be
5477	// used to include empty fields in Patch requests.
5478	ForceSendFields []string `json:"-"`
5479
5480	// NullFields is a list of field names (e.g. "ForwardingRules") to
5481	// include in API requests with the JSON null value. By default, fields
5482	// with empty values are omitted from API requests. However, any field
5483	// with an empty value appearing in NullFields will be sent to the
5484	// server as null. It is an error if a field in this list has a
5485	// non-empty value. This may be used to include null fields in Patch
5486	// requests.
5487	NullFields []string `json:"-"`
5488}
5489
5490func (s *ForwardingRulesScopedList) MarshalJSON() ([]byte, error) {
5491	type noMethod ForwardingRulesScopedList
5492	raw := noMethod(*s)
5493	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5494}
5495
5496// ForwardingRulesScopedListWarning: Informational warning which
5497// replaces the list of forwarding rules when the list is empty.
5498type ForwardingRulesScopedListWarning struct {
5499	// Code: [Output Only] A warning code, if applicable. For example,
5500	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
5501	// the response.
5502	//
5503	// Possible values:
5504	//   "CLEANUP_FAILED"
5505	//   "DEPRECATED_RESOURCE_USED"
5506	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
5507	//   "FIELD_VALUE_OVERRIDEN"
5508	//   "INJECTED_KERNELS_DEPRECATED"
5509	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
5510	//   "NEXT_HOP_CANNOT_IP_FORWARD"
5511	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
5512	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
5513	//   "NEXT_HOP_NOT_RUNNING"
5514	//   "NOT_CRITICAL_ERROR"
5515	//   "NO_RESULTS_ON_PAGE"
5516	//   "REQUIRED_TOS_AGREEMENT"
5517	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
5518	//   "RESOURCE_NOT_DELETED"
5519	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
5520	//   "UNREACHABLE"
5521	Code string `json:"code,omitempty"`
5522
5523	// Data: [Output Only] Metadata about this warning in key: value format.
5524	// For example:
5525	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5526	Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"`
5527
5528	// Message: [Output Only] A human-readable description of the warning
5529	// code.
5530	Message string `json:"message,omitempty"`
5531
5532	// ForceSendFields is a list of field names (e.g. "Code") to
5533	// unconditionally include in API requests. By default, fields with
5534	// empty values are omitted from API requests. However, any non-pointer,
5535	// non-interface field appearing in ForceSendFields will be sent to the
5536	// server regardless of whether the field is empty or not. This may be
5537	// used to include empty fields in Patch requests.
5538	ForceSendFields []string `json:"-"`
5539
5540	// NullFields is a list of field names (e.g. "Code") to include in API
5541	// requests with the JSON null value. By default, fields with empty
5542	// values are omitted from API requests. However, any field with an
5543	// empty value appearing in NullFields will be sent to the server as
5544	// null. It is an error if a field in this list has a non-empty value.
5545	// This may be used to include null fields in Patch requests.
5546	NullFields []string `json:"-"`
5547}
5548
5549func (s *ForwardingRulesScopedListWarning) MarshalJSON() ([]byte, error) {
5550	type noMethod ForwardingRulesScopedListWarning
5551	raw := noMethod(*s)
5552	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5553}
5554
5555type ForwardingRulesScopedListWarningData struct {
5556	// Key: [Output Only] A key that provides more detail on the warning
5557	// being returned. For example, for warnings where there are no results
5558	// in a list request for a particular zone, this key might be scope and
5559	// the key value might be the zone name. Other examples might be a key
5560	// indicating a deprecated resource and a suggested replacement, or a
5561	// warning about invalid network settings (for example, if an instance
5562	// attempts to perform IP forwarding but is not enabled for IP
5563	// forwarding).
5564	Key string `json:"key,omitempty"`
5565
5566	// Value: [Output Only] A warning data value corresponding to the key.
5567	Value string `json:"value,omitempty"`
5568
5569	// ForceSendFields is a list of field names (e.g. "Key") to
5570	// unconditionally include in API requests. By default, fields with
5571	// empty values are omitted from API requests. However, any non-pointer,
5572	// non-interface field appearing in ForceSendFields will be sent to the
5573	// server regardless of whether the field is empty or not. This may be
5574	// used to include empty fields in Patch requests.
5575	ForceSendFields []string `json:"-"`
5576
5577	// NullFields is a list of field names (e.g. "Key") to include in API
5578	// requests with the JSON null value. By default, fields with empty
5579	// values are omitted from API requests. However, any field with an
5580	// empty value appearing in NullFields will be sent to the server as
5581	// null. It is an error if a field in this list has a non-empty value.
5582	// This may be used to include null fields in Patch requests.
5583	NullFields []string `json:"-"`
5584}
5585
5586func (s *ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) {
5587	type noMethod ForwardingRulesScopedListWarningData
5588	raw := noMethod(*s)
5589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5590}
5591
5592type GlobalSetLabelsRequest struct {
5593	// LabelFingerprint: The fingerprint of the previous set of labels for
5594	// this resource, used to detect conflicts. The fingerprint is initially
5595	// generated by Compute Engine and changes after every request to modify
5596	// or update labels. You must always provide an up-to-date fingerprint
5597	// hash when updating or changing labels. Make a get() request to the
5598	// resource to get the latest fingerprint.
5599	LabelFingerprint string `json:"labelFingerprint,omitempty"`
5600
5601	// Labels: A list of labels to apply for this resource. Each label key &
5602	// value must comply with RFC1035. Specifically, the name must be 1-63
5603	// characters long and match the regular expression
5604	// [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
5605	// lowercase letter, and all following characters must be a dash,
5606	// lowercase letter, or digit, except the last character, which cannot
5607	// be a dash. For example, "webserver-frontend": "images". A label value
5608	// can also be empty (e.g. "my-label": "").
5609	Labels map[string]string `json:"labels,omitempty"`
5610
5611	// ForceSendFields is a list of field names (e.g. "LabelFingerprint") to
5612	// unconditionally include in API requests. By default, fields with
5613	// empty values are omitted from API requests. However, any non-pointer,
5614	// non-interface field appearing in ForceSendFields will be sent to the
5615	// server regardless of whether the field is empty or not. This may be
5616	// used to include empty fields in Patch requests.
5617	ForceSendFields []string `json:"-"`
5618
5619	// NullFields is a list of field names (e.g. "LabelFingerprint") to
5620	// include in API requests with the JSON null value. By default, fields
5621	// with empty values are omitted from API requests. However, any field
5622	// with an empty value appearing in NullFields will be sent to the
5623	// server as null. It is an error if a field in this list has a
5624	// non-empty value. This may be used to include null fields in Patch
5625	// requests.
5626	NullFields []string `json:"-"`
5627}
5628
5629func (s *GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) {
5630	type noMethod GlobalSetLabelsRequest
5631	raw := noMethod(*s)
5632	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5633}
5634
5635// GuestOsFeature: Guest OS features.
5636type GuestOsFeature struct {
5637	// Type: The type of supported feature. Currently only
5638	// VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the
5639	// server might also populate this property with the value WINDOWS to
5640	// indicate that this is a Windows image. This value is purely
5641	// informational and does not enable or disable any features.
5642	//
5643	// Possible values:
5644	//   "FEATURE_TYPE_UNSPECIFIED"
5645	//   "MULTI_IP_SUBNET"
5646	//   "VIRTIO_SCSI_MULTIQUEUE"
5647	//   "WINDOWS"
5648	Type string `json:"type,omitempty"`
5649
5650	// ForceSendFields is a list of field names (e.g. "Type") 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	// NullFields is a list of field names (e.g. "Type") to include in API
5659	// requests with the JSON null value. By default, fields with empty
5660	// values are omitted from API requests. However, any field with an
5661	// empty value appearing in NullFields will be sent to the server as
5662	// null. It is an error if a field in this list has a non-empty value.
5663	// This may be used to include null fields in Patch requests.
5664	NullFields []string `json:"-"`
5665}
5666
5667func (s *GuestOsFeature) MarshalJSON() ([]byte, error) {
5668	type noMethod GuestOsFeature
5669	raw := noMethod(*s)
5670	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5671}
5672
5673type HTTPHealthCheck struct {
5674	// Host: The value of the host header in the HTTP health check request.
5675	// If left empty (default value), the IP on behalf of which this health
5676	// check is performed will be used.
5677	Host string `json:"host,omitempty"`
5678
5679	// Port: The TCP port number for the health check request. The default
5680	// value is 80. Valid values are 1 through 65535.
5681	Port int64 `json:"port,omitempty"`
5682
5683	// PortName: Port name as defined in InstanceGroup#NamedPort#name. If
5684	// both port and port_name are defined, port takes precedence.
5685	PortName string `json:"portName,omitempty"`
5686
5687	// ProxyHeader: Specifies the type of proxy header to append before
5688	// sending data to the backend, either NONE or PROXY_V1. The default is
5689	// NONE.
5690	//
5691	// Possible values:
5692	//   "NONE"
5693	//   "PROXY_V1"
5694	ProxyHeader string `json:"proxyHeader,omitempty"`
5695
5696	// RequestPath: The request path of the HTTP health check request. The
5697	// default value is /.
5698	RequestPath string `json:"requestPath,omitempty"`
5699
5700	// ForceSendFields is a list of field names (e.g. "Host") to
5701	// unconditionally include in API requests. By default, fields with
5702	// empty values are omitted from API requests. However, any non-pointer,
5703	// non-interface field appearing in ForceSendFields will be sent to the
5704	// server regardless of whether the field is empty or not. This may be
5705	// used to include empty fields in Patch requests.
5706	ForceSendFields []string `json:"-"`
5707
5708	// NullFields is a list of field names (e.g. "Host") to include in API
5709	// requests with the JSON null value. By default, fields with empty
5710	// values are omitted from API requests. However, any field with an
5711	// empty value appearing in NullFields will be sent to the server as
5712	// null. It is an error if a field in this list has a non-empty value.
5713	// This may be used to include null fields in Patch requests.
5714	NullFields []string `json:"-"`
5715}
5716
5717func (s *HTTPHealthCheck) MarshalJSON() ([]byte, error) {
5718	type noMethod HTTPHealthCheck
5719	raw := noMethod(*s)
5720	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5721}
5722
5723type HTTPSHealthCheck struct {
5724	// Host: The value of the host header in the HTTPS health check request.
5725	// If left empty (default value), the IP on behalf of which this health
5726	// check is performed will be used.
5727	Host string `json:"host,omitempty"`
5728
5729	// Port: The TCP port number for the health check request. The default
5730	// value is 443. Valid values are 1 through 65535.
5731	Port int64 `json:"port,omitempty"`
5732
5733	// PortName: Port name as defined in InstanceGroup#NamedPort#name. If
5734	// both port and port_name are defined, port takes precedence.
5735	PortName string `json:"portName,omitempty"`
5736
5737	// ProxyHeader: Specifies the type of proxy header to append before
5738	// sending data to the backend, either NONE or PROXY_V1. The default is
5739	// NONE.
5740	//
5741	// Possible values:
5742	//   "NONE"
5743	//   "PROXY_V1"
5744	ProxyHeader string `json:"proxyHeader,omitempty"`
5745
5746	// RequestPath: The request path of the HTTPS health check request. The
5747	// default value is /.
5748	RequestPath string `json:"requestPath,omitempty"`
5749
5750	// ForceSendFields is a list of field names (e.g. "Host") to
5751	// unconditionally include in API requests. By default, fields with
5752	// empty values are omitted from API requests. However, any non-pointer,
5753	// non-interface field appearing in ForceSendFields will be sent to the
5754	// server regardless of whether the field is empty or not. This may be
5755	// used to include empty fields in Patch requests.
5756	ForceSendFields []string `json:"-"`
5757
5758	// NullFields is a list of field names (e.g. "Host") to include in API
5759	// requests with the JSON null value. By default, fields with empty
5760	// values are omitted from API requests. However, any field with an
5761	// empty value appearing in NullFields will be sent to the server as
5762	// null. It is an error if a field in this list has a non-empty value.
5763	// This may be used to include null fields in Patch requests.
5764	NullFields []string `json:"-"`
5765}
5766
5767func (s *HTTPSHealthCheck) MarshalJSON() ([]byte, error) {
5768	type noMethod HTTPSHealthCheck
5769	raw := noMethod(*s)
5770	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5771}
5772
5773// HealthCheck: An HealthCheck resource. This resource defines a
5774// template for how individual virtual machines should be checked for
5775// health, via one of the supported protocols.
5776type HealthCheck struct {
5777	// CheckIntervalSec: How often (in seconds) to send a health check. The
5778	// default value is 5 seconds.
5779	CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"`
5780
5781	// CreationTimestamp: [Output Only] Creation timestamp in 3339 text
5782	// format.
5783	CreationTimestamp string `json:"creationTimestamp,omitempty"`
5784
5785	// Description: An optional description of this resource. Provide this
5786	// property when you create the resource.
5787	Description string `json:"description,omitempty"`
5788
5789	// HealthyThreshold: A so-far unhealthy instance will be marked healthy
5790	// after this many consecutive successes. The default value is 2.
5791	HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
5792
5793	HttpHealthCheck *HTTPHealthCheck `json:"httpHealthCheck,omitempty"`
5794
5795	HttpsHealthCheck *HTTPSHealthCheck `json:"httpsHealthCheck,omitempty"`
5796
5797	// Id: [Output Only] The unique identifier for the resource. This
5798	// identifier is defined by the server.
5799	Id uint64 `json:"id,omitempty,string"`
5800
5801	// Kind: Type of the resource.
5802	Kind string `json:"kind,omitempty"`
5803
5804	// Name: Name of the resource. Provided by the client when the resource
5805	// is created. The name must be 1-63 characters long, and comply with
5806	// RFC1035. Specifically, the name must be 1-63 characters long and
5807	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
5808	// the first character must be a lowercase letter, and all following
5809	// characters must be a dash, lowercase letter, or digit, except the
5810	// last character, which cannot be a dash.
5811	Name string `json:"name,omitempty"`
5812
5813	// SelfLink: [Output Only] Server-defined URL for the resource.
5814	SelfLink string `json:"selfLink,omitempty"`
5815
5816	SslHealthCheck *SSLHealthCheck `json:"sslHealthCheck,omitempty"`
5817
5818	TcpHealthCheck *TCPHealthCheck `json:"tcpHealthCheck,omitempty"`
5819
5820	// TimeoutSec: How long (in seconds) to wait before claiming failure.
5821	// The default value is 5 seconds. It is invalid for timeoutSec to have
5822	// greater value than checkIntervalSec.
5823	TimeoutSec int64 `json:"timeoutSec,omitempty"`
5824
5825	// Type: Specifies the type of the healthCheck, either TCP, SSL, HTTP or
5826	// HTTPS. If not specified, the default is TCP. Exactly one of the
5827	// protocol-specific health check field must be specified, which must
5828	// match type field.
5829	//
5830	// Possible values:
5831	//   "HTTP"
5832	//   "HTTPS"
5833	//   "INVALID"
5834	//   "SSL"
5835	//   "TCP"
5836	//   "UDP"
5837	Type string `json:"type,omitempty"`
5838
5839	UdpHealthCheck *UDPHealthCheck `json:"udpHealthCheck,omitempty"`
5840
5841	// UnhealthyThreshold: A so-far healthy instance will be marked
5842	// unhealthy after this many consecutive failures. The default value is
5843	// 2.
5844	UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
5845
5846	// ServerResponse contains the HTTP response code and headers from the
5847	// server.
5848	googleapi.ServerResponse `json:"-"`
5849
5850	// ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to
5851	// unconditionally include in API requests. By default, fields with
5852	// empty values are omitted from API requests. However, any non-pointer,
5853	// non-interface field appearing in ForceSendFields will be sent to the
5854	// server regardless of whether the field is empty or not. This may be
5855	// used to include empty fields in Patch requests.
5856	ForceSendFields []string `json:"-"`
5857
5858	// NullFields is a list of field names (e.g. "CheckIntervalSec") to
5859	// include in API requests with the JSON null value. By default, fields
5860	// with empty values are omitted from API requests. However, any field
5861	// with an empty value appearing in NullFields will be sent to the
5862	// server as null. It is an error if a field in this list has a
5863	// non-empty value. This may be used to include null fields in Patch
5864	// requests.
5865	NullFields []string `json:"-"`
5866}
5867
5868func (s *HealthCheck) MarshalJSON() ([]byte, error) {
5869	type noMethod HealthCheck
5870	raw := noMethod(*s)
5871	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5872}
5873
5874// HealthCheckList: Contains a list of HealthCheck resources.
5875type HealthCheckList struct {
5876	// Id: [Output Only] Unique identifier for the resource; defined by the
5877	// server.
5878	Id string `json:"id,omitempty"`
5879
5880	// Items: A list of HealthCheck resources.
5881	Items []*HealthCheck `json:"items,omitempty"`
5882
5883	// Kind: Type of resource.
5884	Kind string `json:"kind,omitempty"`
5885
5886	// NextPageToken: [Output Only] This token allows you to get the next
5887	// page of results for list requests. If the number of results is larger
5888	// than maxResults, use the nextPageToken as a value for the query
5889	// parameter pageToken in the next list request. Subsequent list
5890	// requests will have their own nextPageToken to continue paging through
5891	// the results.
5892	NextPageToken string `json:"nextPageToken,omitempty"`
5893
5894	// SelfLink: [Output Only] Server-defined URL for this resource.
5895	SelfLink string `json:"selfLink,omitempty"`
5896
5897	// ServerResponse contains the HTTP response code and headers from the
5898	// server.
5899	googleapi.ServerResponse `json:"-"`
5900
5901	// ForceSendFields is a list of field names (e.g. "Id") to
5902	// unconditionally include in API requests. By default, fields with
5903	// empty values are omitted from API requests. However, any non-pointer,
5904	// non-interface field appearing in ForceSendFields will be sent to the
5905	// server regardless of whether the field is empty or not. This may be
5906	// used to include empty fields in Patch requests.
5907	ForceSendFields []string `json:"-"`
5908
5909	// NullFields is a list of field names (e.g. "Id") to include in API
5910	// requests with the JSON null value. By default, fields with empty
5911	// values are omitted from API requests. However, any field with an
5912	// empty value appearing in NullFields will be sent to the server as
5913	// null. It is an error if a field in this list has a non-empty value.
5914	// This may be used to include null fields in Patch requests.
5915	NullFields []string `json:"-"`
5916}
5917
5918func (s *HealthCheckList) MarshalJSON() ([]byte, error) {
5919	type noMethod HealthCheckList
5920	raw := noMethod(*s)
5921	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5922}
5923
5924// HealthCheckReference: A full or valid partial URL to a health check.
5925// For example, the following are valid URLs:
5926// -
5927// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check
5928// - projects/project-id/global/httpHealthChecks/health-check
5929// - global/httpHealthChecks/health-check
5930type HealthCheckReference struct {
5931	HealthCheck string `json:"healthCheck,omitempty"`
5932
5933	// ForceSendFields is a list of field names (e.g. "HealthCheck") to
5934	// unconditionally include in API requests. By default, fields with
5935	// empty values are omitted from API requests. However, any non-pointer,
5936	// non-interface field appearing in ForceSendFields will be sent to the
5937	// server regardless of whether the field is empty or not. This may be
5938	// used to include empty fields in Patch requests.
5939	ForceSendFields []string `json:"-"`
5940
5941	// NullFields is a list of field names (e.g. "HealthCheck") to include
5942	// in API requests with the JSON null value. By default, fields with
5943	// empty values are omitted from API requests. However, any field with
5944	// an empty value appearing in NullFields will be sent to the server as
5945	// null. It is an error if a field in this list has a non-empty value.
5946	// This may be used to include null fields in Patch requests.
5947	NullFields []string `json:"-"`
5948}
5949
5950func (s *HealthCheckReference) MarshalJSON() ([]byte, error) {
5951	type noMethod HealthCheckReference
5952	raw := noMethod(*s)
5953	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5954}
5955
5956type HealthStatus struct {
5957	// HealthState: Health state of the instance.
5958	//
5959	// Possible values:
5960	//   "HEALTHY"
5961	//   "UNHEALTHY"
5962	HealthState string `json:"healthState,omitempty"`
5963
5964	// Instance: URL of the instance resource.
5965	Instance string `json:"instance,omitempty"`
5966
5967	// IpAddress: The IP address represented by this resource.
5968	IpAddress string `json:"ipAddress,omitempty"`
5969
5970	// Port: The port on the instance.
5971	Port int64 `json:"port,omitempty"`
5972
5973	// ForceSendFields is a list of field names (e.g. "HealthState") to
5974	// unconditionally include in API requests. By default, fields with
5975	// empty values are omitted from API requests. However, any non-pointer,
5976	// non-interface field appearing in ForceSendFields will be sent to the
5977	// server regardless of whether the field is empty or not. This may be
5978	// used to include empty fields in Patch requests.
5979	ForceSendFields []string `json:"-"`
5980
5981	// NullFields is a list of field names (e.g. "HealthState") to include
5982	// in API requests with the JSON null value. By default, fields with
5983	// empty values are omitted from API requests. However, any field with
5984	// an empty value appearing in NullFields will be sent to the server as
5985	// null. It is an error if a field in this list has a non-empty value.
5986	// This may be used to include null fields in Patch requests.
5987	NullFields []string `json:"-"`
5988}
5989
5990func (s *HealthStatus) MarshalJSON() ([]byte, error) {
5991	type noMethod HealthStatus
5992	raw := noMethod(*s)
5993	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5994}
5995
5996// HostRule: UrlMaps A host-matching rule for a URL. If matched, will
5997// use the named PathMatcher to select the BackendService.
5998type HostRule struct {
5999	// Description: An optional description of this resource. Provide this
6000	// property when you create the resource.
6001	Description string `json:"description,omitempty"`
6002
6003	// Hosts: The list of host patterns to match. They must be valid
6004	// hostnames, except * will match any string of ([a-z0-9-.]*). In that
6005	// case, * must be the first character and must be followed in the
6006	// pattern by either - or ..
6007	Hosts []string `json:"hosts,omitempty"`
6008
6009	// PathMatcher: The name of the PathMatcher to use to match the path
6010	// portion of the URL if the hostRule matches the URL's host portion.
6011	PathMatcher string `json:"pathMatcher,omitempty"`
6012
6013	// ForceSendFields is a list of field names (e.g. "Description") to
6014	// unconditionally include in API requests. By default, fields with
6015	// empty values are omitted from API requests. However, any non-pointer,
6016	// non-interface field appearing in ForceSendFields will be sent to the
6017	// server regardless of whether the field is empty or not. This may be
6018	// used to include empty fields in Patch requests.
6019	ForceSendFields []string `json:"-"`
6020
6021	// NullFields is a list of field names (e.g. "Description") to include
6022	// in API requests with the JSON null value. By default, fields with
6023	// empty values are omitted from API requests. However, any field with
6024	// an empty value appearing in NullFields will be sent to the server as
6025	// null. It is an error if a field in this list has a non-empty value.
6026	// This may be used to include null fields in Patch requests.
6027	NullFields []string `json:"-"`
6028}
6029
6030func (s *HostRule) MarshalJSON() ([]byte, error) {
6031	type noMethod HostRule
6032	raw := noMethod(*s)
6033	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6034}
6035
6036// HttpHealthCheck: An HttpHealthCheck resource. This resource defines a
6037// template for how individual instances should be checked for health,
6038// via HTTP.
6039type HttpHealthCheck struct {
6040	// CheckIntervalSec: How often (in seconds) to send a health check. The
6041	// default value is 5 seconds.
6042	CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"`
6043
6044	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6045	// format.
6046	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6047
6048	// Description: An optional description of this resource. Provide this
6049	// property when you create the resource.
6050	Description string `json:"description,omitempty"`
6051
6052	// HealthyThreshold: A so-far unhealthy instance will be marked healthy
6053	// after this many consecutive successes. The default value is 2.
6054	HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
6055
6056	// Host: The value of the host header in the HTTP health check request.
6057	// If left empty (default value), the public IP on behalf of which this
6058	// health check is performed will be used.
6059	Host string `json:"host,omitempty"`
6060
6061	// Id: [Output Only] The unique identifier for the resource. This
6062	// identifier is defined by the server.
6063	Id uint64 `json:"id,omitempty,string"`
6064
6065	// Kind: [Output Only] Type of the resource. Always
6066	// compute#httpHealthCheck for HTTP health checks.
6067	Kind string `json:"kind,omitempty"`
6068
6069	// Name: Name of the resource. Provided by the client when the resource
6070	// is created. The name must be 1-63 characters long, and comply with
6071	// RFC1035. Specifically, the name must be 1-63 characters long and
6072	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
6073	// the first character must be a lowercase letter, and all following
6074	// characters must be a dash, lowercase letter, or digit, except the
6075	// last character, which cannot be a dash.
6076	Name string `json:"name,omitempty"`
6077
6078	// Port: The TCP port number for the HTTP health check request. The
6079	// default value is 80.
6080	Port int64 `json:"port,omitempty"`
6081
6082	// RequestPath: The request path of the HTTP health check request. The
6083	// default value is /.
6084	RequestPath string `json:"requestPath,omitempty"`
6085
6086	// SelfLink: [Output Only] Server-defined URL for the resource.
6087	SelfLink string `json:"selfLink,omitempty"`
6088
6089	// TimeoutSec: How long (in seconds) to wait before claiming failure.
6090	// The default value is 5 seconds. It is invalid for timeoutSec to have
6091	// greater value than checkIntervalSec.
6092	TimeoutSec int64 `json:"timeoutSec,omitempty"`
6093
6094	// UnhealthyThreshold: A so-far healthy instance will be marked
6095	// unhealthy after this many consecutive failures. The default value is
6096	// 2.
6097	UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
6098
6099	// ServerResponse contains the HTTP response code and headers from the
6100	// server.
6101	googleapi.ServerResponse `json:"-"`
6102
6103	// ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to
6104	// unconditionally include in API requests. By default, fields with
6105	// empty values are omitted from API requests. However, any non-pointer,
6106	// non-interface field appearing in ForceSendFields will be sent to the
6107	// server regardless of whether the field is empty or not. This may be
6108	// used to include empty fields in Patch requests.
6109	ForceSendFields []string `json:"-"`
6110
6111	// NullFields is a list of field names (e.g. "CheckIntervalSec") to
6112	// include in API requests with the JSON null value. By default, fields
6113	// with empty values are omitted from API requests. However, any field
6114	// with an empty value appearing in NullFields will be sent to the
6115	// server as null. It is an error if a field in this list has a
6116	// non-empty value. This may be used to include null fields in Patch
6117	// requests.
6118	NullFields []string `json:"-"`
6119}
6120
6121func (s *HttpHealthCheck) MarshalJSON() ([]byte, error) {
6122	type noMethod HttpHealthCheck
6123	raw := noMethod(*s)
6124	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6125}
6126
6127// HttpHealthCheckList: Contains a list of HttpHealthCheck resources.
6128type HttpHealthCheckList struct {
6129	// Id: [Output Only] Unique identifier for the resource; defined by the
6130	// server.
6131	Id string `json:"id,omitempty"`
6132
6133	// Items: A list of HttpHealthCheck resources.
6134	Items []*HttpHealthCheck `json:"items,omitempty"`
6135
6136	// Kind: Type of resource.
6137	Kind string `json:"kind,omitempty"`
6138
6139	// NextPageToken: [Output Only] This token allows you to get the next
6140	// page of results for list requests. If the number of results is larger
6141	// than maxResults, use the nextPageToken as a value for the query
6142	// parameter pageToken in the next list request. Subsequent list
6143	// requests will have their own nextPageToken to continue paging through
6144	// the results.
6145	NextPageToken string `json:"nextPageToken,omitempty"`
6146
6147	// SelfLink: [Output Only] Server-defined URL for this resource.
6148	SelfLink string `json:"selfLink,omitempty"`
6149
6150	// ServerResponse contains the HTTP response code and headers from the
6151	// server.
6152	googleapi.ServerResponse `json:"-"`
6153
6154	// ForceSendFields is a list of field names (e.g. "Id") to
6155	// unconditionally include in API requests. By default, fields with
6156	// empty values are omitted from API requests. However, any non-pointer,
6157	// non-interface field appearing in ForceSendFields will be sent to the
6158	// server regardless of whether the field is empty or not. This may be
6159	// used to include empty fields in Patch requests.
6160	ForceSendFields []string `json:"-"`
6161
6162	// NullFields is a list of field names (e.g. "Id") to include in API
6163	// requests with the JSON null value. By default, fields with empty
6164	// values are omitted from API requests. However, any field with an
6165	// empty value appearing in NullFields will be sent to the server as
6166	// null. It is an error if a field in this list has a non-empty value.
6167	// This may be used to include null fields in Patch requests.
6168	NullFields []string `json:"-"`
6169}
6170
6171func (s *HttpHealthCheckList) MarshalJSON() ([]byte, error) {
6172	type noMethod HttpHealthCheckList
6173	raw := noMethod(*s)
6174	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6175}
6176
6177// HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines
6178// a template for how individual instances should be checked for health,
6179// via HTTPS.
6180type HttpsHealthCheck struct {
6181	// CheckIntervalSec: How often (in seconds) to send a health check. The
6182	// default value is 5 seconds.
6183	CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"`
6184
6185	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6186	// format.
6187	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6188
6189	// Description: An optional description of this resource. Provide this
6190	// property when you create the resource.
6191	Description string `json:"description,omitempty"`
6192
6193	// HealthyThreshold: A so-far unhealthy instance will be marked healthy
6194	// after this many consecutive successes. The default value is 2.
6195	HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
6196
6197	// Host: The value of the host header in the HTTPS health check request.
6198	// If left empty (default value), the public IP on behalf of which this
6199	// health check is performed will be used.
6200	Host string `json:"host,omitempty"`
6201
6202	// Id: [Output Only] The unique identifier for the resource. This
6203	// identifier is defined by the server.
6204	Id uint64 `json:"id,omitempty,string"`
6205
6206	// Kind: Type of the resource.
6207	Kind string `json:"kind,omitempty"`
6208
6209	// Name: Name of the resource. Provided by the client when the resource
6210	// is created. The name must be 1-63 characters long, and comply with
6211	// RFC1035. Specifically, the name must be 1-63 characters long and
6212	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
6213	// the first character must be a lowercase letter, and all following
6214	// characters must be a dash, lowercase letter, or digit, except the
6215	// last character, which cannot be a dash.
6216	Name string `json:"name,omitempty"`
6217
6218	// Port: The TCP port number for the HTTPS health check request. The
6219	// default value is 443.
6220	Port int64 `json:"port,omitempty"`
6221
6222	// RequestPath: The request path of the HTTPS health check request. The
6223	// default value is "/".
6224	RequestPath string `json:"requestPath,omitempty"`
6225
6226	// SelfLink: [Output Only] Server-defined URL for the resource.
6227	SelfLink string `json:"selfLink,omitempty"`
6228
6229	// TimeoutSec: How long (in seconds) to wait before claiming failure.
6230	// The default value is 5 seconds. It is invalid for timeoutSec to have
6231	// a greater value than checkIntervalSec.
6232	TimeoutSec int64 `json:"timeoutSec,omitempty"`
6233
6234	// UnhealthyThreshold: A so-far healthy instance will be marked
6235	// unhealthy after this many consecutive failures. The default value is
6236	// 2.
6237	UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
6238
6239	// ServerResponse contains the HTTP response code and headers from the
6240	// server.
6241	googleapi.ServerResponse `json:"-"`
6242
6243	// ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to
6244	// unconditionally include in API requests. By default, fields with
6245	// empty values are omitted from API requests. However, any non-pointer,
6246	// non-interface field appearing in ForceSendFields will be sent to the
6247	// server regardless of whether the field is empty or not. This may be
6248	// used to include empty fields in Patch requests.
6249	ForceSendFields []string `json:"-"`
6250
6251	// NullFields is a list of field names (e.g. "CheckIntervalSec") to
6252	// include in API requests with the JSON null value. By default, fields
6253	// with empty values are omitted from API requests. However, any field
6254	// with an empty value appearing in NullFields will be sent to the
6255	// server as null. It is an error if a field in this list has a
6256	// non-empty value. This may be used to include null fields in Patch
6257	// requests.
6258	NullFields []string `json:"-"`
6259}
6260
6261func (s *HttpsHealthCheck) MarshalJSON() ([]byte, error) {
6262	type noMethod HttpsHealthCheck
6263	raw := noMethod(*s)
6264	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6265}
6266
6267// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources.
6268type HttpsHealthCheckList struct {
6269	// Id: [Output Only] Unique identifier for the resource; defined by the
6270	// server.
6271	Id string `json:"id,omitempty"`
6272
6273	// Items: A list of HttpsHealthCheck resources.
6274	Items []*HttpsHealthCheck `json:"items,omitempty"`
6275
6276	// Kind: Type of resource.
6277	Kind string `json:"kind,omitempty"`
6278
6279	// NextPageToken: [Output Only] This token allows you to get the next
6280	// page of results for list requests. If the number of results is larger
6281	// than maxResults, use the nextPageToken as a value for the query
6282	// parameter pageToken in the next list request. Subsequent list
6283	// requests will have their own nextPageToken to continue paging through
6284	// the results.
6285	NextPageToken string `json:"nextPageToken,omitempty"`
6286
6287	// SelfLink: [Output Only] Server-defined URL for this resource.
6288	SelfLink string `json:"selfLink,omitempty"`
6289
6290	// ServerResponse contains the HTTP response code and headers from the
6291	// server.
6292	googleapi.ServerResponse `json:"-"`
6293
6294	// ForceSendFields is a list of field names (e.g. "Id") to
6295	// unconditionally include in API requests. By default, fields with
6296	// empty values are omitted from API requests. However, any non-pointer,
6297	// non-interface field appearing in ForceSendFields will be sent to the
6298	// server regardless of whether the field is empty or not. This may be
6299	// used to include empty fields in Patch requests.
6300	ForceSendFields []string `json:"-"`
6301
6302	// NullFields is a list of field names (e.g. "Id") to include in API
6303	// requests with the JSON null value. By default, fields with empty
6304	// values are omitted from API requests. However, any field with an
6305	// empty value appearing in NullFields will be sent to the server as
6306	// null. It is an error if a field in this list has a non-empty value.
6307	// This may be used to include null fields in Patch requests.
6308	NullFields []string `json:"-"`
6309}
6310
6311func (s *HttpsHealthCheckList) MarshalJSON() ([]byte, error) {
6312	type noMethod HttpsHealthCheckList
6313	raw := noMethod(*s)
6314	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6315}
6316
6317// Image: An Image resource.
6318type Image struct {
6319	// ArchiveSizeBytes: Size of the image tar.gz archive stored in Google
6320	// Cloud Storage (in bytes).
6321	ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"`
6322
6323	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6324	// format.
6325	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6326
6327	// Deprecated: The deprecation status associated with this image.
6328	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
6329
6330	// Description: An optional description of this resource. Provide this
6331	// property when you create the resource.
6332	Description string `json:"description,omitempty"`
6333
6334	// DiskSizeGb: Size of the image when restored onto a persistent disk
6335	// (in GB).
6336	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
6337
6338	// Family: The name of the image family to which this image belongs. You
6339	// can create disks by specifying an image family instead of a specific
6340	// image name. The image family always returns its latest image that is
6341	// not deprecated. The name of the image family must comply with
6342	// RFC1035.
6343	Family string `json:"family,omitempty"`
6344
6345	// GuestOsFeatures: A list of features to enable on the guest OS.
6346	// Applicable for bootable images only. Currently, only one feature can
6347	// be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to
6348	// have its own queue. For Windows images, you can only enable
6349	// VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or
6350	// higher. Linux images with kernel versions 3.17 and higher will
6351	// support VIRTIO_SCSI_MULTIQUEUE.
6352	//
6353	// For new Windows images, the server might also populate this field
6354	// with the value WINDOWS, to indicate that this is a Windows image.
6355	// This value is purely informational and does not enable or disable any
6356	// features.
6357	GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"`
6358
6359	// Id: [Output Only] The unique identifier for the resource. This
6360	// identifier is defined by the server.
6361	Id uint64 `json:"id,omitempty,string"`
6362
6363	// ImageEncryptionKey: Encrypts the image using a customer-supplied
6364	// encryption key.
6365	//
6366	// After you encrypt an image with a customer-supplied key, you must
6367	// provide the same key if you use the image later (e.g. to create a
6368	// disk from the image).
6369	//
6370	// Customer-supplied encryption keys do not protect access to metadata
6371	// of the disk.
6372	//
6373	// If you do not provide an encryption key when creating the image, then
6374	// the disk will be encrypted using an automatically generated key and
6375	// you do not need to provide a key to use the image later.
6376	ImageEncryptionKey *CustomerEncryptionKey `json:"imageEncryptionKey,omitempty"`
6377
6378	// Kind: [Output Only] Type of the resource. Always compute#image for
6379	// images.
6380	Kind string `json:"kind,omitempty"`
6381
6382	// LabelFingerprint: A fingerprint for the labels being applied to this
6383	// image, which is essentially a hash of the labels used for optimistic
6384	// locking. The fingerprint is initially generated by Compute Engine and
6385	// changes after every request to modify or update labels. You must
6386	// always provide an up-to-date fingerprint hash in order to update or
6387	// change labels.
6388	//
6389	// To see the latest fingerprint, make a get() request to retrieve an
6390	// image.
6391	LabelFingerprint string `json:"labelFingerprint,omitempty"`
6392
6393	// Labels: Labels to apply to this image. These can be later modified by
6394	// the setLabels method.
6395	Labels map[string]string `json:"labels,omitempty"`
6396
6397	// Licenses: Any applicable license URI.
6398	Licenses []string `json:"licenses,omitempty"`
6399
6400	// Name: Name of the resource; provided by the client when the resource
6401	// is created. The name must be 1-63 characters long, and comply with
6402	// RFC1035. Specifically, the name must be 1-63 characters long and
6403	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
6404	// the first character must be a lowercase letter, and all following
6405	// characters must be a dash, lowercase letter, or digit, except the
6406	// last character, which cannot be a dash.
6407	Name string `json:"name,omitempty"`
6408
6409	// RawDisk: The parameters of the raw disk image.
6410	RawDisk *ImageRawDisk `json:"rawDisk,omitempty"`
6411
6412	// SelfLink: [Output Only] Server-defined URL for the resource.
6413	SelfLink string `json:"selfLink,omitempty"`
6414
6415	// SourceDisk: URL of the source disk used to create this image. This
6416	// can be a full or valid partial URL. You must provide either this
6417	// property or the rawDisk.source property but not both to create an
6418	// image. For example, the following are valid values:
6419	// -
6420	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk
6421	// - projects/project/zones/zone/disks/disk
6422	// - zones/zone/disks/disk
6423	SourceDisk string `json:"sourceDisk,omitempty"`
6424
6425	// SourceDiskEncryptionKey: The customer-supplied encryption key of the
6426	// source disk. Required if the source disk is protected by a
6427	// customer-supplied encryption key.
6428	SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"`
6429
6430	// SourceDiskId: The ID value of the disk used to create this image.
6431	// This value may be used to determine whether the image was taken from
6432	// the current or a previous instance of a given disk name.
6433	SourceDiskId string `json:"sourceDiskId,omitempty"`
6434
6435	// SourceImage: URL of the source image used to create this image. This
6436	// can be a full or valid partial URL. You must provide exactly one of:
6437	//
6438	// - this property, or
6439	// - the rawDisk.source property, or
6440	// - the sourceDisk property   in order to create an image.
6441	SourceImage string `json:"sourceImage,omitempty"`
6442
6443	// SourceImageEncryptionKey: The customer-supplied encryption key of the
6444	// source image. Required if the source image is protected by a
6445	// customer-supplied encryption key.
6446	SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"`
6447
6448	// SourceImageId: [Output Only] The ID value of the image used to create
6449	// this image. This value may be used to determine whether the image was
6450	// taken from the current or a previous instance of a given image name.
6451	SourceImageId string `json:"sourceImageId,omitempty"`
6452
6453	// SourceType: The type of the image used to create this disk. The
6454	// default and only value is RAW
6455	//
6456	// Possible values:
6457	//   "RAW" (default)
6458	SourceType string `json:"sourceType,omitempty"`
6459
6460	// Status: [Output Only] The status of the image. An image can be used
6461	// to create other resources, such as instances, only after the image
6462	// has been successfully created and the status is set to READY.
6463	// Possible values are FAILED, PENDING, or READY.
6464	//
6465	// Possible values:
6466	//   "FAILED"
6467	//   "PENDING"
6468	//   "READY"
6469	Status string `json:"status,omitempty"`
6470
6471	// ServerResponse contains the HTTP response code and headers from the
6472	// server.
6473	googleapi.ServerResponse `json:"-"`
6474
6475	// ForceSendFields is a list of field names (e.g. "ArchiveSizeBytes") to
6476	// unconditionally include in API requests. By default, fields with
6477	// empty values are omitted from API requests. However, any non-pointer,
6478	// non-interface field appearing in ForceSendFields will be sent to the
6479	// server regardless of whether the field is empty or not. This may be
6480	// used to include empty fields in Patch requests.
6481	ForceSendFields []string `json:"-"`
6482
6483	// NullFields is a list of field names (e.g. "ArchiveSizeBytes") to
6484	// include in API requests with the JSON null value. By default, fields
6485	// with empty values are omitted from API requests. However, any field
6486	// with an empty value appearing in NullFields will be sent to the
6487	// server as null. It is an error if a field in this list has a
6488	// non-empty value. This may be used to include null fields in Patch
6489	// requests.
6490	NullFields []string `json:"-"`
6491}
6492
6493func (s *Image) MarshalJSON() ([]byte, error) {
6494	type noMethod Image
6495	raw := noMethod(*s)
6496	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6497}
6498
6499// ImageRawDisk: The parameters of the raw disk image.
6500type ImageRawDisk struct {
6501	// ContainerType: The format used to encode and transmit the block
6502	// device, which should be TAR. This is just a container and
6503	// transmission format and not a runtime format. Provided by the client
6504	// when the disk image is created.
6505	//
6506	// Possible values:
6507	//   "TAR"
6508	ContainerType string `json:"containerType,omitempty"`
6509
6510	// Sha1Checksum: An optional SHA1 checksum of the disk image before
6511	// unpackaging; provided by the client when the disk image is created.
6512	Sha1Checksum string `json:"sha1Checksum,omitempty"`
6513
6514	// Source: The full Google Cloud Storage URL where the disk image is
6515	// stored. You must provide either this property or the sourceDisk
6516	// property but not both.
6517	Source string `json:"source,omitempty"`
6518
6519	// ForceSendFields is a list of field names (e.g. "ContainerType") to
6520	// unconditionally include in API requests. By default, fields with
6521	// empty values are omitted from API requests. However, any non-pointer,
6522	// non-interface field appearing in ForceSendFields will be sent to the
6523	// server regardless of whether the field is empty or not. This may be
6524	// used to include empty fields in Patch requests.
6525	ForceSendFields []string `json:"-"`
6526
6527	// NullFields is a list of field names (e.g. "ContainerType") to include
6528	// in API requests with the JSON null value. By default, fields with
6529	// empty values are omitted from API requests. However, any field with
6530	// an empty value appearing in NullFields will be sent to the server as
6531	// null. It is an error if a field in this list has a non-empty value.
6532	// This may be used to include null fields in Patch requests.
6533	NullFields []string `json:"-"`
6534}
6535
6536func (s *ImageRawDisk) MarshalJSON() ([]byte, error) {
6537	type noMethod ImageRawDisk
6538	raw := noMethod(*s)
6539	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6540}
6541
6542// ImageList: Contains a list of images.
6543type ImageList struct {
6544	// Id: [Output Only] Unique identifier for the resource; defined by the
6545	// server.
6546	Id string `json:"id,omitempty"`
6547
6548	// Items: A list of Image resources.
6549	Items []*Image `json:"items,omitempty"`
6550
6551	// Kind: Type of resource.
6552	Kind string `json:"kind,omitempty"`
6553
6554	// NextPageToken: [Output Only] This token allows you to get the next
6555	// page of results for list requests. If the number of results is larger
6556	// than maxResults, use the nextPageToken as a value for the query
6557	// parameter pageToken in the next list request. Subsequent list
6558	// requests will have their own nextPageToken to continue paging through
6559	// the results.
6560	NextPageToken string `json:"nextPageToken,omitempty"`
6561
6562	// SelfLink: [Output Only] Server-defined URL for this resource.
6563	SelfLink string `json:"selfLink,omitempty"`
6564
6565	// ServerResponse contains the HTTP response code and headers from the
6566	// server.
6567	googleapi.ServerResponse `json:"-"`
6568
6569	// ForceSendFields is a list of field names (e.g. "Id") to
6570	// unconditionally include in API requests. By default, fields with
6571	// empty values are omitted from API requests. However, any non-pointer,
6572	// non-interface field appearing in ForceSendFields will be sent to the
6573	// server regardless of whether the field is empty or not. This may be
6574	// used to include empty fields in Patch requests.
6575	ForceSendFields []string `json:"-"`
6576
6577	// NullFields is a list of field names (e.g. "Id") to include in API
6578	// requests with the JSON null value. By default, fields with empty
6579	// values are omitted from API requests. However, any field with an
6580	// empty value appearing in NullFields will be sent to the server as
6581	// null. It is an error if a field in this list has a non-empty value.
6582	// This may be used to include null fields in Patch requests.
6583	NullFields []string `json:"-"`
6584}
6585
6586func (s *ImageList) MarshalJSON() ([]byte, error) {
6587	type noMethod ImageList
6588	raw := noMethod(*s)
6589	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6590}
6591
6592// Instance: An Instance resource.
6593type Instance struct {
6594	// CanIpForward: Allows this instance to send and receive packets with
6595	// non-matching destination or source IPs. This is required if you plan
6596	// to use this instance to forward routes. For more information, see
6597	// Enabling IP Forwarding.
6598	CanIpForward bool `json:"canIpForward,omitempty"`
6599
6600	// CpuPlatform: [Output Only] The CPU platform used by this instance.
6601	CpuPlatform string `json:"cpuPlatform,omitempty"`
6602
6603	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6604	// format.
6605	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6606
6607	// Description: An optional description of this resource. Provide this
6608	// property when you create the resource.
6609	Description string `json:"description,omitempty"`
6610
6611	// Disks: Array of disks associated with this instance. Persistent disks
6612	// must be created before you can assign them.
6613	Disks []*AttachedDisk `json:"disks,omitempty"`
6614
6615	// GuestAccelerators: List of the type and count of accelerator cards
6616	// attached to the instance.
6617	GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"`
6618
6619	// Id: [Output Only] The unique identifier for the resource. This
6620	// identifier is defined by the server.
6621	Id uint64 `json:"id,omitempty,string"`
6622
6623	// Kind: [Output Only] Type of the resource. Always compute#instance for
6624	// instances.
6625	Kind string `json:"kind,omitempty"`
6626
6627	// LabelFingerprint: A fingerprint for this request, which is
6628	// essentially a hash of the metadata's contents and used for optimistic
6629	// locking. The fingerprint is initially generated by Compute Engine and
6630	// changes after every request to modify or update metadata. You must
6631	// always provide an up-to-date fingerprint hash in order to update or
6632	// change metadata.
6633	//
6634	// To see the latest fingerprint, make get() request to the instance.
6635	LabelFingerprint string `json:"labelFingerprint,omitempty"`
6636
6637	// Labels: Labels to apply to this instance. These can be later modified
6638	// by the setLabels method.
6639	Labels map[string]string `json:"labels,omitempty"`
6640
6641	// MachineType: Full or partial URL of the machine type resource to use
6642	// for this instance, in the format:
6643	// zones/zone/machineTypes/machine-type. This is provided by the client
6644	// when the instance is created. For example, the following is a valid
6645	// partial url to a predefined machine
6646	// type:
6647	//
6648	// zones/us-central1-f/machineTypes/n1-standard-1
6649	//
6650	// To create a custom machine type, provide a URL to a machine type in
6651	// the following format, where CPUS is 1 or an even number up to 32 (2,
6652	// 4, 6, ... 24, etc), and MEMORY is the total memory for this instance.
6653	// Memory must be a multiple of 256 MB and must be supplied in MB (e.g.
6654	// 5 GB of memory is 5120
6655	// MB):
6656	//
6657	// zones/zone/machineTypes/custom-CPUS-MEMORY
6658	//
6659	// For example: zones/us-central1-f/machineTypes/custom-4-5120
6660	//
6661	// For a full list of restrictions, read the Specifications for custom
6662	// machine types.
6663	MachineType string `json:"machineType,omitempty"`
6664
6665	// Metadata: The metadata key/value pairs assigned to this instance.
6666	// This includes custom metadata and predefined keys.
6667	Metadata *Metadata `json:"metadata,omitempty"`
6668
6669	// MinCpuPlatform: Specifies a minimum CPU platform for the VM instance.
6670	// Applicable values are the friendly names of CPU platforms, such as
6671	// minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy
6672	// Bridge".
6673	MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
6674
6675	// Name: The name of the resource, provided by the client when initially
6676	// creating the resource. The resource name must be 1-63 characters
6677	// long, and comply with RFC1035. Specifically, the name must be 1-63
6678	// characters long and match the regular expression
6679	// [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
6680	// lowercase letter, and all following characters must be a dash,
6681	// lowercase letter, or digit, except the last character, which cannot
6682	// be a dash.
6683	Name string `json:"name,omitempty"`
6684
6685	// NetworkInterfaces: An array of network configurations for this
6686	// instance. These specify how interfaces are configured to interact
6687	// with other network services, such as connecting to the internet.
6688	// Multiple interfaces are supported per instance.
6689	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
6690
6691	// Scheduling: Sets the scheduling options for this instance.
6692	Scheduling *Scheduling `json:"scheduling,omitempty"`
6693
6694	// SelfLink: [Output Only] Server-defined URL for this resource.
6695	SelfLink string `json:"selfLink,omitempty"`
6696
6697	// ServiceAccounts: A list of service accounts, with their specified
6698	// scopes, authorized for this instance. Only one service account per VM
6699	// instance is supported.
6700	//
6701	// Service accounts generate access tokens that can be accessed through
6702	// the metadata server and used to authenticate applications on the
6703	// instance. See Service Accounts for more information.
6704	ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"`
6705
6706	// StartRestricted: [Output Only] Whether a VM has been restricted for
6707	// start because Compute Engine has detected suspicious activity.
6708	StartRestricted bool `json:"startRestricted,omitempty"`
6709
6710	// Status: [Output Only] The status of the instance. One of the
6711	// following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED,
6712	// SUSPENDING, SUSPENDED, and TERMINATED.
6713	//
6714	// Possible values:
6715	//   "PROVISIONING"
6716	//   "RUNNING"
6717	//   "STAGING"
6718	//   "STOPPED"
6719	//   "STOPPING"
6720	//   "SUSPENDED"
6721	//   "SUSPENDING"
6722	//   "TERMINATED"
6723	Status string `json:"status,omitempty"`
6724
6725	// StatusMessage: [Output Only] An optional, human-readable explanation
6726	// of the status.
6727	StatusMessage string `json:"statusMessage,omitempty"`
6728
6729	// Tags: A list of tags to apply to this instance. Tags are used to
6730	// identify valid sources or targets for network firewalls and are
6731	// specified by the client during instance creation. The tags can be
6732	// later modified by the setTags method. Each tag within the list must
6733	// comply with RFC1035.
6734	Tags *Tags `json:"tags,omitempty"`
6735
6736	// Zone: [Output Only] URL of the zone where the instance resides.
6737	Zone string `json:"zone,omitempty"`
6738
6739	// ServerResponse contains the HTTP response code and headers from the
6740	// server.
6741	googleapi.ServerResponse `json:"-"`
6742
6743	// ForceSendFields is a list of field names (e.g. "CanIpForward") to
6744	// unconditionally include in API requests. By default, fields with
6745	// empty values are omitted from API requests. However, any non-pointer,
6746	// non-interface field appearing in ForceSendFields will be sent to the
6747	// server regardless of whether the field is empty or not. This may be
6748	// used to include empty fields in Patch requests.
6749	ForceSendFields []string `json:"-"`
6750
6751	// NullFields is a list of field names (e.g. "CanIpForward") to include
6752	// in API requests with the JSON null value. By default, fields with
6753	// empty values are omitted from API requests. However, any field with
6754	// an empty value appearing in NullFields will be sent to the server as
6755	// null. It is an error if a field in this list has a non-empty value.
6756	// This may be used to include null fields in Patch requests.
6757	NullFields []string `json:"-"`
6758}
6759
6760func (s *Instance) MarshalJSON() ([]byte, error) {
6761	type noMethod Instance
6762	raw := noMethod(*s)
6763	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6764}
6765
6766type InstanceAggregatedList struct {
6767	// Id: [Output Only] Unique identifier for the resource; defined by the
6768	// server.
6769	Id string `json:"id,omitempty"`
6770
6771	// Items: A list of InstancesScopedList resources.
6772	Items map[string]InstancesScopedList `json:"items,omitempty"`
6773
6774	// Kind: [Output Only] Type of resource. Always
6775	// compute#instanceAggregatedList for aggregated lists of Instance
6776	// resources.
6777	Kind string `json:"kind,omitempty"`
6778
6779	// NextPageToken: [Output Only] This token allows you to get the next
6780	// page of results for list requests. If the number of results is larger
6781	// than maxResults, use the nextPageToken as a value for the query
6782	// parameter pageToken in the next list request. Subsequent list
6783	// requests will have their own nextPageToken to continue paging through
6784	// the results.
6785	NextPageToken string `json:"nextPageToken,omitempty"`
6786
6787	// SelfLink: [Output Only] Server-defined URL for this resource.
6788	SelfLink string `json:"selfLink,omitempty"`
6789
6790	// ServerResponse contains the HTTP response code and headers from the
6791	// server.
6792	googleapi.ServerResponse `json:"-"`
6793
6794	// ForceSendFields is a list of field names (e.g. "Id") to
6795	// unconditionally include in API requests. By default, fields with
6796	// empty values are omitted from API requests. However, any non-pointer,
6797	// non-interface field appearing in ForceSendFields will be sent to the
6798	// server regardless of whether the field is empty or not. This may be
6799	// used to include empty fields in Patch requests.
6800	ForceSendFields []string `json:"-"`
6801
6802	// NullFields is a list of field names (e.g. "Id") to include in API
6803	// requests with the JSON null value. By default, fields with empty
6804	// values are omitted from API requests. However, any field with an
6805	// empty value appearing in NullFields will be sent to the server as
6806	// null. It is an error if a field in this list has a non-empty value.
6807	// This may be used to include null fields in Patch requests.
6808	NullFields []string `json:"-"`
6809}
6810
6811func (s *InstanceAggregatedList) MarshalJSON() ([]byte, error) {
6812	type noMethod InstanceAggregatedList
6813	raw := noMethod(*s)
6814	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6815}
6816
6817type InstanceGroup struct {
6818	// CreationTimestamp: [Output Only] The creation timestamp for this
6819	// instance group in RFC3339 text format.
6820	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6821
6822	// Description: An optional description of this resource. Provide this
6823	// property when you create the resource.
6824	Description string `json:"description,omitempty"`
6825
6826	// Fingerprint: [Output Only] The fingerprint of the named ports. The
6827	// system uses this fingerprint to detect conflicts when multiple users
6828	// change the named ports concurrently.
6829	Fingerprint string `json:"fingerprint,omitempty"`
6830
6831	// Id: [Output Only] A unique identifier for this instance group,
6832	// generated by the server.
6833	Id uint64 `json:"id,omitempty,string"`
6834
6835	// Kind: [Output Only] The resource type, which is always
6836	// compute#instanceGroup for instance groups.
6837	Kind string `json:"kind,omitempty"`
6838
6839	// Name: The name of the instance group. The name must be 1-63
6840	// characters long, and comply with RFC1035.
6841	Name string `json:"name,omitempty"`
6842
6843	// NamedPorts: Assigns a name to a port number. For example: {name:
6844	// "http", port: 80}
6845	//
6846	// This allows the system to reference ports by the assigned name
6847	// instead of a port number. Named ports can also contain multiple
6848	// ports. For example: [{name: "http", port: 80},{name: "http", port:
6849	// 8080}]
6850	//
6851	// Named ports apply to all instances in this instance group.
6852	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
6853
6854	// Network: The URL of the network to which all instances in the
6855	// instance group belong.
6856	Network string `json:"network,omitempty"`
6857
6858	// Region: The URL of the region where the instance group is located
6859	// (for regional resources).
6860	Region string `json:"region,omitempty"`
6861
6862	// SelfLink: [Output Only] The URL for this instance group. The server
6863	// generates this URL.
6864	SelfLink string `json:"selfLink,omitempty"`
6865
6866	// Size: [Output Only] The total number of instances in the instance
6867	// group.
6868	Size int64 `json:"size,omitempty"`
6869
6870	// Subnetwork: The URL of the subnetwork to which all instances in the
6871	// instance group belong.
6872	Subnetwork string `json:"subnetwork,omitempty"`
6873
6874	// Zone: [Output Only] The URL of the zone where the instance group is
6875	// located (for zonal resources).
6876	Zone string `json:"zone,omitempty"`
6877
6878	// ServerResponse contains the HTTP response code and headers from the
6879	// server.
6880	googleapi.ServerResponse `json:"-"`
6881
6882	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
6883	// to unconditionally include in API requests. By default, fields with
6884	// empty values are omitted from API requests. However, any non-pointer,
6885	// non-interface field appearing in ForceSendFields will be sent to the
6886	// server regardless of whether the field is empty or not. This may be
6887	// used to include empty fields in Patch requests.
6888	ForceSendFields []string `json:"-"`
6889
6890	// NullFields is a list of field names (e.g. "CreationTimestamp") to
6891	// include in API requests with the JSON null value. By default, fields
6892	// with empty values are omitted from API requests. However, any field
6893	// with an empty value appearing in NullFields will be sent to the
6894	// server as null. It is an error if a field in this list has a
6895	// non-empty value. This may be used to include null fields in Patch
6896	// requests.
6897	NullFields []string `json:"-"`
6898}
6899
6900func (s *InstanceGroup) MarshalJSON() ([]byte, error) {
6901	type noMethod InstanceGroup
6902	raw := noMethod(*s)
6903	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6904}
6905
6906type InstanceGroupAggregatedList struct {
6907	// Id: [Output Only] Unique identifier for the resource; defined by the
6908	// server.
6909	Id string `json:"id,omitempty"`
6910
6911	// Items: A list of InstanceGroupsScopedList resources.
6912	Items map[string]InstanceGroupsScopedList `json:"items,omitempty"`
6913
6914	// Kind: [Output Only] The resource type, which is always
6915	// compute#instanceGroupAggregatedList for aggregated lists of instance
6916	// groups.
6917	Kind string `json:"kind,omitempty"`
6918
6919	// NextPageToken: [Output Only] This token allows you to get the next
6920	// page of results for list requests. If the number of results is larger
6921	// than maxResults, use the nextPageToken as a value for the query
6922	// parameter pageToken in the next list request. Subsequent list
6923	// requests will have their own nextPageToken to continue paging through
6924	// the results.
6925	NextPageToken string `json:"nextPageToken,omitempty"`
6926
6927	// SelfLink: [Output Only] Server-defined URL for this resource.
6928	SelfLink string `json:"selfLink,omitempty"`
6929
6930	// ServerResponse contains the HTTP response code and headers from the
6931	// server.
6932	googleapi.ServerResponse `json:"-"`
6933
6934	// ForceSendFields is a list of field names (e.g. "Id") to
6935	// unconditionally include in API requests. By default, fields with
6936	// empty values are omitted from API requests. However, any non-pointer,
6937	// non-interface field appearing in ForceSendFields will be sent to the
6938	// server regardless of whether the field is empty or not. This may be
6939	// used to include empty fields in Patch requests.
6940	ForceSendFields []string `json:"-"`
6941
6942	// NullFields is a list of field names (e.g. "Id") to include in API
6943	// requests with the JSON null value. By default, fields with empty
6944	// values are omitted from API requests. However, any field with an
6945	// empty value appearing in NullFields will be sent to the server as
6946	// null. It is an error if a field in this list has a non-empty value.
6947	// This may be used to include null fields in Patch requests.
6948	NullFields []string `json:"-"`
6949}
6950
6951func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) {
6952	type noMethod InstanceGroupAggregatedList
6953	raw := noMethod(*s)
6954	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6955}
6956
6957// InstanceGroupList: A list of InstanceGroup resources.
6958type InstanceGroupList struct {
6959	// Id: [Output Only] Unique identifier for the resource; defined by the
6960	// server.
6961	Id string `json:"id,omitempty"`
6962
6963	// Items: A list of InstanceGroup resources.
6964	Items []*InstanceGroup `json:"items,omitempty"`
6965
6966	// Kind: [Output Only] The resource type, which is always
6967	// compute#instanceGroupList for instance group lists.
6968	Kind string `json:"kind,omitempty"`
6969
6970	// NextPageToken: [Output Only] This token allows you to get the next
6971	// page of results for list requests. If the number of results is larger
6972	// than maxResults, use the nextPageToken as a value for the query
6973	// parameter pageToken in the next list request. Subsequent list
6974	// requests will have their own nextPageToken to continue paging through
6975	// the results.
6976	NextPageToken string `json:"nextPageToken,omitempty"`
6977
6978	// SelfLink: [Output Only] Server-defined URL for this resource.
6979	SelfLink string `json:"selfLink,omitempty"`
6980
6981	// ServerResponse contains the HTTP response code and headers from the
6982	// server.
6983	googleapi.ServerResponse `json:"-"`
6984
6985	// ForceSendFields is a list of field names (e.g. "Id") to
6986	// unconditionally include in API requests. By default, fields with
6987	// empty values are omitted from API requests. However, any non-pointer,
6988	// non-interface field appearing in ForceSendFields will be sent to the
6989	// server regardless of whether the field is empty or not. This may be
6990	// used to include empty fields in Patch requests.
6991	ForceSendFields []string `json:"-"`
6992
6993	// NullFields is a list of field names (e.g. "Id") to include in API
6994	// requests with the JSON null value. By default, fields with empty
6995	// values are omitted from API requests. However, any field with an
6996	// empty value appearing in NullFields will be sent to the server as
6997	// null. It is an error if a field in this list has a non-empty value.
6998	// This may be used to include null fields in Patch requests.
6999	NullFields []string `json:"-"`
7000}
7001
7002func (s *InstanceGroupList) MarshalJSON() ([]byte, error) {
7003	type noMethod InstanceGroupList
7004	raw := noMethod(*s)
7005	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7006}
7007
7008// InstanceGroupManager: An Instance Group Manager resource.
7009type InstanceGroupManager struct {
7010	// AutoHealingPolicies: The autohealing policy for this managed instance
7011	// group. You can specify only one value.
7012	AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"`
7013
7014	// BaseInstanceName: The base instance name to use for instances in this
7015	// group. The value must be 1-58 characters long. Instances are named by
7016	// appending a hyphen and a random four-character string to the base
7017	// instance name. The base instance name must comply with RFC1035.
7018	BaseInstanceName string `json:"baseInstanceName,omitempty"`
7019
7020	// CreationTimestamp: [Output Only] The creation timestamp for this
7021	// managed instance group in RFC3339 text format.
7022	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7023
7024	// CurrentActions: [Output Only] The list of instance actions and the
7025	// number of instances in this managed instance group that are scheduled
7026	// for each of those actions.
7027	CurrentActions *InstanceGroupManagerActionsSummary `json:"currentActions,omitempty"`
7028
7029	// Description: An optional description of this resource. Provide this
7030	// property when you create the resource.
7031	Description string `json:"description,omitempty"`
7032
7033	// FailoverAction: The action to perform in case of zone failure. Only
7034	// one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
7035	//
7036	// Possible values:
7037	//   "NO_FAILOVER"
7038	//   "UNKNOWN"
7039	FailoverAction string `json:"failoverAction,omitempty"`
7040
7041	// Fingerprint: [Output Only] The fingerprint of the resource data. You
7042	// can use this optional field for optimistic locking when you update
7043	// the resource.
7044	Fingerprint string `json:"fingerprint,omitempty"`
7045
7046	// Id: [Output Only] A unique identifier for this resource type. The
7047	// server generates this identifier.
7048	Id uint64 `json:"id,omitempty,string"`
7049
7050	// InstanceGroup: [Output Only] The URL of the Instance Group resource.
7051	InstanceGroup string `json:"instanceGroup,omitempty"`
7052
7053	// InstanceTemplate: The URL of the instance template that is specified
7054	// for this managed instance group. The group uses this template to
7055	// create all new instances in the managed instance group.
7056	InstanceTemplate string `json:"instanceTemplate,omitempty"`
7057
7058	// Kind: [Output Only] The resource type, which is always
7059	// compute#instanceGroupManager for managed instance groups.
7060	Kind string `json:"kind,omitempty"`
7061
7062	// Name: The name of the managed instance group. The name must be 1-63
7063	// characters long, and comply with RFC1035.
7064	Name string `json:"name,omitempty"`
7065
7066	// NamedPorts: Named ports configured for the Instance Groups
7067	// complementary to this Instance Group Manager.
7068	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
7069
7070	// PendingActions: [Output Only] The list of instance actions and the
7071	// number of instances in this managed instance group that are pending
7072	// for each of those actions.
7073	PendingActions *InstanceGroupManagerPendingActionsSummary `json:"pendingActions,omitempty"`
7074
7075	// Region: [Output Only] The URL of the region where the managed
7076	// instance group resides (for regional resources).
7077	Region string `json:"region,omitempty"`
7078
7079	// SelfLink: [Output Only] The URL for this managed instance group. The
7080	// server defines this URL.
7081	SelfLink string `json:"selfLink,omitempty"`
7082
7083	// ServiceAccount: [Output Only] The service account to be used as
7084	// credentials for all operations performed by the managed instance
7085	// group on instances. The service accounts needs all permissions
7086	// required to create and delete instances. By default, the service
7087	// account {projectNumber}@cloudservices.gserviceaccount.com is used.
7088	ServiceAccount string `json:"serviceAccount,omitempty"`
7089
7090	// TargetPools: The URLs for all TargetPool resources to which instances
7091	// in the instanceGroup field are added. The target pools automatically
7092	// apply to all of the instances in the managed instance group.
7093	TargetPools []string `json:"targetPools,omitempty"`
7094
7095	// TargetSize: The target number of running instances for this managed
7096	// instance group. Deleting or abandoning instances reduces this number.
7097	// Resizing the group changes this number.
7098	TargetSize int64 `json:"targetSize,omitempty"`
7099
7100	// UpdatePolicy: The update policy for this managed instance group.
7101	UpdatePolicy *InstanceGroupManagerUpdatePolicy `json:"updatePolicy,omitempty"`
7102
7103	// Versions: Versions supported by this IGM. User should set this field
7104	// if they need fine-grained control over how many instances in each
7105	// version are run by this IGM. Versions are keyed by instanceTemplate.
7106	// Every instanceTemplate can appear at most once. This field overrides
7107	// instanceTemplate field. If both instanceTemplate and versions are
7108	// set, the user receives a warning. "instanceTemplate: X" is
7109	// semantically equivalent to "versions [ { instanceTemplate: X } ]".
7110	// Exactly one version must have targetSize field left unset. Size of
7111	// such a version will be calculated automatically.
7112	Versions []*InstanceGroupManagerVersion `json:"versions,omitempty"`
7113
7114	// Zone: [Output Only] The URL of the zone where the managed instance
7115	// group is located (for zonal resources).
7116	Zone string `json:"zone,omitempty"`
7117
7118	// ServerResponse contains the HTTP response code and headers from the
7119	// server.
7120	googleapi.ServerResponse `json:"-"`
7121
7122	// ForceSendFields is a list of field names (e.g. "AutoHealingPolicies")
7123	// to unconditionally include in API requests. By default, fields with
7124	// empty values are omitted from API requests. However, any non-pointer,
7125	// non-interface field appearing in ForceSendFields will be sent to the
7126	// server regardless of whether the field is empty or not. This may be
7127	// used to include empty fields in Patch requests.
7128	ForceSendFields []string `json:"-"`
7129
7130	// NullFields is a list of field names (e.g. "AutoHealingPolicies") to
7131	// include in API requests with the JSON null value. By default, fields
7132	// with empty values are omitted from API requests. However, any field
7133	// with an empty value appearing in NullFields will be sent to the
7134	// server as null. It is an error if a field in this list has a
7135	// non-empty value. This may be used to include null fields in Patch
7136	// requests.
7137	NullFields []string `json:"-"`
7138}
7139
7140func (s *InstanceGroupManager) MarshalJSON() ([]byte, error) {
7141	type noMethod InstanceGroupManager
7142	raw := noMethod(*s)
7143	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7144}
7145
7146type InstanceGroupManagerActionsSummary struct {
7147	// Abandoning: [Output Only] The total number of instances in the
7148	// managed instance group that are scheduled to be abandoned. Abandoning
7149	// an instance removes it from the managed instance group without
7150	// deleting it.
7151	Abandoning int64 `json:"abandoning,omitempty"`
7152
7153	// Creating: [Output Only] The number of instances in the managed
7154	// instance group that are scheduled to be created or are currently
7155	// being created. If the group fails to create any of these instances,
7156	// it tries again until it creates the instance successfully.
7157	//
7158	// If you have disabled creation retries, this field will not be
7159	// populated; instead, the creatingWithoutRetries field will be
7160	// populated.
7161	Creating int64 `json:"creating,omitempty"`
7162
7163	// CreatingWithoutRetries: [Output Only] The number of instances that
7164	// the managed instance group will attempt to create. The group attempts
7165	// to create each instance only once. If the group fails to create any
7166	// of these instances, it decreases the group's targetSize value
7167	// accordingly.
7168	CreatingWithoutRetries int64 `json:"creatingWithoutRetries,omitempty"`
7169
7170	// Deleting: [Output Only] The number of instances in the managed
7171	// instance group that are scheduled to be deleted or are currently
7172	// being deleted.
7173	Deleting int64 `json:"deleting,omitempty"`
7174
7175	// None: [Output Only] The number of instances in the managed instance
7176	// group that are running and have no scheduled actions.
7177	None int64 `json:"none,omitempty"`
7178
7179	// Recreating: [Output Only] The number of instances in the managed
7180	// instance group that are scheduled to be recreated or are currently
7181	// being being recreated. Recreating an instance deletes the existing
7182	// root persistent disk and creates a new disk from the image that is
7183	// defined in the instance template.
7184	Recreating int64 `json:"recreating,omitempty"`
7185
7186	// Refreshing: [Output Only] The number of instances in the managed
7187	// instance group that are being reconfigured with properties that do
7188	// not require a restart or a recreate action. For example, setting or
7189	// removing target pools for the instance.
7190	Refreshing int64 `json:"refreshing,omitempty"`
7191
7192	// Restarting: [Output Only] The number of instances in the managed
7193	// instance group that are scheduled to be restarted or are currently
7194	// being restarted.
7195	Restarting int64 `json:"restarting,omitempty"`
7196
7197	// Verifying: [Output Only] The number of instances in the managed
7198	// instance group that are being verified. More details regarding
7199	// verification process are covered in the documentation of
7200	// ManagedInstance.InstanceAction.VERIFYING enum field.
7201	Verifying int64 `json:"verifying,omitempty"`
7202
7203	// ForceSendFields is a list of field names (e.g. "Abandoning") to
7204	// unconditionally include in API requests. By default, fields with
7205	// empty values are omitted from API requests. However, any non-pointer,
7206	// non-interface field appearing in ForceSendFields will be sent to the
7207	// server regardless of whether the field is empty or not. This may be
7208	// used to include empty fields in Patch requests.
7209	ForceSendFields []string `json:"-"`
7210
7211	// NullFields is a list of field names (e.g. "Abandoning") to include in
7212	// API requests with the JSON null value. By default, fields with empty
7213	// values are omitted from API requests. However, any field with an
7214	// empty value appearing in NullFields will be sent to the server as
7215	// null. It is an error if a field in this list has a non-empty value.
7216	// This may be used to include null fields in Patch requests.
7217	NullFields []string `json:"-"`
7218}
7219
7220func (s *InstanceGroupManagerActionsSummary) MarshalJSON() ([]byte, error) {
7221	type noMethod InstanceGroupManagerActionsSummary
7222	raw := noMethod(*s)
7223	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7224}
7225
7226type InstanceGroupManagerAggregatedList struct {
7227	// Id: [Output Only] Unique identifier for the resource; defined by the
7228	// server.
7229	Id string `json:"id,omitempty"`
7230
7231	// Items: A list of InstanceGroupManagersScopedList resources.
7232	Items map[string]InstanceGroupManagersScopedList `json:"items,omitempty"`
7233
7234	// Kind: [Output Only] The resource type, which is always
7235	// compute#instanceGroupManagerAggregatedList for an aggregated list of
7236	// managed instance groups.
7237	Kind string `json:"kind,omitempty"`
7238
7239	// NextPageToken: [Output Only] This token allows you to get the next
7240	// page of results for list requests. If the number of results is larger
7241	// than maxResults, use the nextPageToken as a value for the query
7242	// parameter pageToken in the next list request. Subsequent list
7243	// requests will have their own nextPageToken to continue paging through
7244	// the results.
7245	NextPageToken string `json:"nextPageToken,omitempty"`
7246
7247	// SelfLink: [Output Only] Server-defined URL for this resource.
7248	SelfLink string `json:"selfLink,omitempty"`
7249
7250	// ServerResponse contains the HTTP response code and headers from the
7251	// server.
7252	googleapi.ServerResponse `json:"-"`
7253
7254	// ForceSendFields is a list of field names (e.g. "Id") to
7255	// unconditionally include in API requests. By default, fields with
7256	// empty values are omitted from API requests. However, any non-pointer,
7257	// non-interface field appearing in ForceSendFields will be sent to the
7258	// server regardless of whether the field is empty or not. This may be
7259	// used to include empty fields in Patch requests.
7260	ForceSendFields []string `json:"-"`
7261
7262	// NullFields is a list of field names (e.g. "Id") to include in API
7263	// requests with the JSON null value. By default, fields with empty
7264	// values are omitted from API requests. However, any field with an
7265	// empty value appearing in NullFields will be sent to the server as
7266	// null. It is an error if a field in this list has a non-empty value.
7267	// This may be used to include null fields in Patch requests.
7268	NullFields []string `json:"-"`
7269}
7270
7271func (s *InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) {
7272	type noMethod InstanceGroupManagerAggregatedList
7273	raw := noMethod(*s)
7274	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7275}
7276
7277type InstanceGroupManagerAutoHealingPolicy struct {
7278	// HealthCheck: The URL for the health check that signals autohealing.
7279	HealthCheck string `json:"healthCheck,omitempty"`
7280
7281	// InitialDelaySec: The number of seconds that the managed instance
7282	// group waits before it applies autohealing policies to new instances
7283	// or recently recreated instances. This initial delay allows instances
7284	// to initialize and run their startup scripts before the instance group
7285	// determines that they are UNHEALTHY. This prevents the managed
7286	// instance group from recreating its instances prematurely. This value
7287	// must be from range [0, 3600].
7288	InitialDelaySec int64 `json:"initialDelaySec,omitempty"`
7289
7290	// ForceSendFields is a list of field names (e.g. "HealthCheck") to
7291	// unconditionally include in API requests. By default, fields with
7292	// empty values are omitted from API requests. However, any non-pointer,
7293	// non-interface field appearing in ForceSendFields will be sent to the
7294	// server regardless of whether the field is empty or not. This may be
7295	// used to include empty fields in Patch requests.
7296	ForceSendFields []string `json:"-"`
7297
7298	// NullFields is a list of field names (e.g. "HealthCheck") to include
7299	// in API requests with the JSON null value. By default, fields with
7300	// empty values are omitted from API requests. However, any field with
7301	// an empty value appearing in NullFields will be sent to the server as
7302	// null. It is an error if a field in this list has a non-empty value.
7303	// This may be used to include null fields in Patch requests.
7304	NullFields []string `json:"-"`
7305}
7306
7307func (s *InstanceGroupManagerAutoHealingPolicy) MarshalJSON() ([]byte, error) {
7308	type noMethod InstanceGroupManagerAutoHealingPolicy
7309	raw := noMethod(*s)
7310	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7311}
7312
7313// InstanceGroupManagerList: [Output Only] A list of managed instance
7314// groups.
7315type InstanceGroupManagerList struct {
7316	// Id: [Output Only] Unique identifier for the resource; defined by the
7317	// server.
7318	Id string `json:"id,omitempty"`
7319
7320	// Items: A list of InstanceGroupManager resources.
7321	Items []*InstanceGroupManager `json:"items,omitempty"`
7322
7323	// Kind: [Output Only] The resource type, which is always
7324	// compute#instanceGroupManagerList for a list of managed instance
7325	// groups.
7326	Kind string `json:"kind,omitempty"`
7327
7328	// NextPageToken: [Output Only] This token allows you to get the next
7329	// page of results for list requests. If the number of results is larger
7330	// than maxResults, use the nextPageToken as a value for the query
7331	// parameter pageToken in the next list request. Subsequent list
7332	// requests will have their own nextPageToken to continue paging through
7333	// the results.
7334	NextPageToken string `json:"nextPageToken,omitempty"`
7335
7336	// SelfLink: [Output Only] Server-defined URL for this resource.
7337	SelfLink string `json:"selfLink,omitempty"`
7338
7339	// ServerResponse contains the HTTP response code and headers from the
7340	// server.
7341	googleapi.ServerResponse `json:"-"`
7342
7343	// ForceSendFields is a list of field names (e.g. "Id") to
7344	// unconditionally include in API requests. By default, fields with
7345	// empty values are omitted from API requests. However, any non-pointer,
7346	// non-interface field appearing in ForceSendFields will be sent to the
7347	// server regardless of whether the field is empty or not. This may be
7348	// used to include empty fields in Patch requests.
7349	ForceSendFields []string `json:"-"`
7350
7351	// NullFields is a list of field names (e.g. "Id") to include in API
7352	// requests with the JSON null value. By default, fields with empty
7353	// values are omitted from API requests. However, any field with an
7354	// empty value appearing in NullFields will be sent to the server as
7355	// null. It is an error if a field in this list has a non-empty value.
7356	// This may be used to include null fields in Patch requests.
7357	NullFields []string `json:"-"`
7358}
7359
7360func (s *InstanceGroupManagerList) MarshalJSON() ([]byte, error) {
7361	type noMethod InstanceGroupManagerList
7362	raw := noMethod(*s)
7363	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7364}
7365
7366type InstanceGroupManagerPendingActionsSummary struct {
7367	// Creating: [Output Only] The number of instances in the managed
7368	// instance group that are pending to be created.
7369	Creating int64 `json:"creating,omitempty"`
7370
7371	// Deleting: [Output Only] The number of instances in the managed
7372	// instance group that are pending to be deleted.
7373	Deleting int64 `json:"deleting,omitempty"`
7374
7375	// Recreating: [Output Only] The number of instances in the managed
7376	// instance group that are pending to be recreated.
7377	Recreating int64 `json:"recreating,omitempty"`
7378
7379	// Restarting: [Output Only] The number of instances in the managed
7380	// instance group that are pending to be restarted.
7381	Restarting int64 `json:"restarting,omitempty"`
7382
7383	// ForceSendFields is a list of field names (e.g. "Creating") to
7384	// unconditionally include in API requests. By default, fields with
7385	// empty values are omitted from API requests. However, any non-pointer,
7386	// non-interface field appearing in ForceSendFields will be sent to the
7387	// server regardless of whether the field is empty or not. This may be
7388	// used to include empty fields in Patch requests.
7389	ForceSendFields []string `json:"-"`
7390
7391	// NullFields is a list of field names (e.g. "Creating") to include in
7392	// API requests with the JSON null value. By default, fields with empty
7393	// values are omitted from API requests. However, any field with an
7394	// empty value appearing in NullFields will be sent to the server as
7395	// null. It is an error if a field in this list has a non-empty value.
7396	// This may be used to include null fields in Patch requests.
7397	NullFields []string `json:"-"`
7398}
7399
7400func (s *InstanceGroupManagerPendingActionsSummary) MarshalJSON() ([]byte, error) {
7401	type noMethod InstanceGroupManagerPendingActionsSummary
7402	raw := noMethod(*s)
7403	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7404}
7405
7406type InstanceGroupManagerUpdatePolicy struct {
7407	// MaxSurge: Maximum number of instances that can be created above the
7408	// InstanceGroupManager.targetSize during the update process. By
7409	// default, a fixed value of 1 is used. Using maxSurge > 0 will cause
7410	// instance names to change during the update process. At least one of {
7411	// maxSurge, maxUnavailable } must be greater than 0.
7412	MaxSurge *FixedOrPercent `json:"maxSurge,omitempty"`
7413
7414	// MaxUnavailable: Maximum number of instances that can be unavailable
7415	// during the update process. The instance is considered available if
7416	// all of the following conditions are satisfied: 1. Instance's status
7417	// is RUNNING. 2. Instance's liveness health check result was observed
7418	// to be HEALTHY at least once. By default, a fixed value of 1 is used.
7419	// At least one of { maxSurge, maxUnavailable } must be greater than 0.
7420	MaxUnavailable *FixedOrPercent `json:"maxUnavailable,omitempty"`
7421
7422	// MinReadySec: Minimum number of seconds to wait for after a newly
7423	// created instance becomes available. This value must be from range [0,
7424	// 3600].
7425	MinReadySec int64 `json:"minReadySec,omitempty"`
7426
7427	// MinimalAction: Minimal action to be taken on an instance. The order
7428	// of action types is: RESTART < REPLACE.
7429	//
7430	// Possible values:
7431	//   "REPLACE"
7432	//   "RESTART"
7433	MinimalAction string `json:"minimalAction,omitempty"`
7434
7435	// Possible values:
7436	//   "OPPORTUNISTIC"
7437	//   "PROACTIVE"
7438	Type string `json:"type,omitempty"`
7439
7440	// ForceSendFields is a list of field names (e.g. "MaxSurge") to
7441	// unconditionally include in API requests. By default, fields with
7442	// empty values are omitted from API requests. However, any non-pointer,
7443	// non-interface field appearing in ForceSendFields will be sent to the
7444	// server regardless of whether the field is empty or not. This may be
7445	// used to include empty fields in Patch requests.
7446	ForceSendFields []string `json:"-"`
7447
7448	// NullFields is a list of field names (e.g. "MaxSurge") to include in
7449	// API requests with the JSON null value. By default, fields with empty
7450	// values are omitted from API requests. However, any field with an
7451	// empty value appearing in NullFields will be sent to the server as
7452	// null. It is an error if a field in this list has a non-empty value.
7453	// This may be used to include null fields in Patch requests.
7454	NullFields []string `json:"-"`
7455}
7456
7457func (s *InstanceGroupManagerUpdatePolicy) MarshalJSON() ([]byte, error) {
7458	type noMethod InstanceGroupManagerUpdatePolicy
7459	raw := noMethod(*s)
7460	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7461}
7462
7463type InstanceGroupManagerVersion struct {
7464	InstanceTemplate string `json:"instanceTemplate,omitempty"`
7465
7466	// Name: Name of the version. Unique among all versions in the scope of
7467	// this managed instance group.
7468	Name string `json:"name,omitempty"`
7469
7470	// TargetSize: Intended number of instances that are created from
7471	// instanceTemplate. The final number of instances created from
7472	// instanceTemplate will be equal to: * if expressed as fixed number:
7473	// min(targetSize.fixed, instanceGroupManager.targetSize), * if
7474	// expressed as percent: ceiling(targetSize.percent *
7475	// InstanceGroupManager.targetSize). If unset, this version will handle
7476	// all the remaining instances.
7477	TargetSize *FixedOrPercent `json:"targetSize,omitempty"`
7478
7479	// ForceSendFields is a list of field names (e.g. "InstanceTemplate") to
7480	// unconditionally include in API requests. By default, fields with
7481	// empty values are omitted from API requests. However, any non-pointer,
7482	// non-interface field appearing in ForceSendFields will be sent to the
7483	// server regardless of whether the field is empty or not. This may be
7484	// used to include empty fields in Patch requests.
7485	ForceSendFields []string `json:"-"`
7486
7487	// NullFields is a list of field names (e.g. "InstanceTemplate") to
7488	// include in API requests with the JSON null value. By default, fields
7489	// with empty values are omitted from API requests. However, any field
7490	// with an empty value appearing in NullFields will be sent to the
7491	// server as null. It is an error if a field in this list has a
7492	// non-empty value. This may be used to include null fields in Patch
7493	// requests.
7494	NullFields []string `json:"-"`
7495}
7496
7497func (s *InstanceGroupManagerVersion) MarshalJSON() ([]byte, error) {
7498	type noMethod InstanceGroupManagerVersion
7499	raw := noMethod(*s)
7500	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7501}
7502
7503type InstanceGroupManagersAbandonInstancesRequest struct {
7504	// Instances: The URLs of one or more instances to abandon. This can be
7505	// a full URL or a partial URL, such as
7506	// zones/[ZONE]/instances/[INSTANCE_NAME].
7507	Instances []string `json:"instances,omitempty"`
7508
7509	// ForceSendFields is a list of field names (e.g. "Instances") to
7510	// unconditionally include in API requests. By default, fields with
7511	// empty values are omitted from API requests. However, any non-pointer,
7512	// non-interface field appearing in ForceSendFields will be sent to the
7513	// server regardless of whether the field is empty or not. This may be
7514	// used to include empty fields in Patch requests.
7515	ForceSendFields []string `json:"-"`
7516
7517	// NullFields is a list of field names (e.g. "Instances") to include in
7518	// API requests with the JSON null value. By default, fields with empty
7519	// values are omitted from API requests. However, any field with an
7520	// empty value appearing in NullFields will be sent to the server as
7521	// null. It is an error if a field in this list has a non-empty value.
7522	// This may be used to include null fields in Patch requests.
7523	NullFields []string `json:"-"`
7524}
7525
7526func (s *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) {
7527	type noMethod InstanceGroupManagersAbandonInstancesRequest
7528	raw := noMethod(*s)
7529	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7530}
7531
7532type InstanceGroupManagersDeleteInstancesRequest struct {
7533	// Instances: The URLs of one or more instances to delete. This can be a
7534	// full URL or a partial URL, such as
7535	// zones/[ZONE]/instances/[INSTANCE_NAME].
7536	Instances []string `json:"instances,omitempty"`
7537
7538	// ForceSendFields is a list of field names (e.g. "Instances") to
7539	// unconditionally include in API requests. By default, fields with
7540	// empty values are omitted from API requests. However, any non-pointer,
7541	// non-interface field appearing in ForceSendFields will be sent to the
7542	// server regardless of whether the field is empty or not. This may be
7543	// used to include empty fields in Patch requests.
7544	ForceSendFields []string `json:"-"`
7545
7546	// NullFields is a list of field names (e.g. "Instances") to include in
7547	// API requests with the JSON null value. By default, fields with empty
7548	// values are omitted from API requests. However, any field with an
7549	// empty value appearing in NullFields will be sent to the server as
7550	// null. It is an error if a field in this list has a non-empty value.
7551	// This may be used to include null fields in Patch requests.
7552	NullFields []string `json:"-"`
7553}
7554
7555func (s *InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) {
7556	type noMethod InstanceGroupManagersDeleteInstancesRequest
7557	raw := noMethod(*s)
7558	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7559}
7560
7561type InstanceGroupManagersListManagedInstancesResponse struct {
7562	// ManagedInstances: [Output Only] The list of instances in the managed
7563	// instance group.
7564	ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"`
7565
7566	// NextPageToken: [Output Only] This token allows you to get the next
7567	// page of results for list requests. If the number of results is larger
7568	// than maxResults, use the nextPageToken as a value for the query
7569	// parameter pageToken in the next list request. Subsequent list
7570	// requests will have their own nextPageToken to continue paging through
7571	// the results.
7572	NextPageToken string `json:"nextPageToken,omitempty"`
7573
7574	// ServerResponse contains the HTTP response code and headers from the
7575	// server.
7576	googleapi.ServerResponse `json:"-"`
7577
7578	// ForceSendFields is a list of field names (e.g. "ManagedInstances") to
7579	// unconditionally include in API requests. By default, fields with
7580	// empty values are omitted from API requests. However, any non-pointer,
7581	// non-interface field appearing in ForceSendFields will be sent to the
7582	// server regardless of whether the field is empty or not. This may be
7583	// used to include empty fields in Patch requests.
7584	ForceSendFields []string `json:"-"`
7585
7586	// NullFields is a list of field names (e.g. "ManagedInstances") to
7587	// include in API requests with the JSON null value. By default, fields
7588	// with empty values are omitted from API requests. However, any field
7589	// with an empty value appearing in NullFields will be sent to the
7590	// server as null. It is an error if a field in this list has a
7591	// non-empty value. This may be used to include null fields in Patch
7592	// requests.
7593	NullFields []string `json:"-"`
7594}
7595
7596func (s *InstanceGroupManagersListManagedInstancesResponse) MarshalJSON() ([]byte, error) {
7597	type noMethod InstanceGroupManagersListManagedInstancesResponse
7598	raw := noMethod(*s)
7599	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7600}
7601
7602type InstanceGroupManagersRecreateInstancesRequest struct {
7603	// Instances: The URLs of one or more instances to recreate. This can be
7604	// a full URL or a partial URL, such as
7605	// zones/[ZONE]/instances/[INSTANCE_NAME].
7606	Instances []string `json:"instances,omitempty"`
7607
7608	// ForceSendFields is a list of field names (e.g. "Instances") to
7609	// unconditionally include in API requests. By default, fields with
7610	// empty values are omitted from API requests. However, any non-pointer,
7611	// non-interface field appearing in ForceSendFields will be sent to the
7612	// server regardless of whether the field is empty or not. This may be
7613	// used to include empty fields in Patch requests.
7614	ForceSendFields []string `json:"-"`
7615
7616	// NullFields is a list of field names (e.g. "Instances") to include in
7617	// API requests with the JSON null value. By default, fields with empty
7618	// values are omitted from API requests. However, any field with an
7619	// empty value appearing in NullFields will be sent to the server as
7620	// null. It is an error if a field in this list has a non-empty value.
7621	// This may be used to include null fields in Patch requests.
7622	NullFields []string `json:"-"`
7623}
7624
7625func (s *InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, error) {
7626	type noMethod InstanceGroupManagersRecreateInstancesRequest
7627	raw := noMethod(*s)
7628	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7629}
7630
7631type InstanceGroupManagersResizeAdvancedRequest struct {
7632	// NoCreationRetries: If this flag is true, the managed instance group
7633	// attempts to create all instances initiated by this resize request
7634	// only once. If there is an error during creation, the managed instance
7635	// group does not retry create this instance, and we will decrease the
7636	// targetSize of the request instead. If the flag is false, the group
7637	// attemps to recreate each instance continuously until it
7638	// succeeds.
7639	//
7640	// This flag matters only in the first attempt of creation of an
7641	// instance. After an instance is successfully created while this flag
7642	// is enabled, the instance behaves the same way as all the other
7643	// instances created with a regular resize request. In particular, if a
7644	// running instance dies unexpectedly at a later time and needs to be
7645	// recreated, this mode does not affect the recreation behavior in that
7646	// scenario.
7647	//
7648	// This flag is applicable only to the current resize request. It does
7649	// not influence other resize requests in any way.
7650	//
7651	// You can see which instances is being creating in which mode by
7652	// calling the get or listManagedInstances API.
7653	NoCreationRetries bool `json:"noCreationRetries,omitempty"`
7654
7655	// TargetSize: The number of running instances that the managed instance
7656	// group should maintain at any given time. The group automatically adds
7657	// or removes instances to maintain the number of instances specified by
7658	// this parameter.
7659	TargetSize int64 `json:"targetSize,omitempty"`
7660
7661	// ForceSendFields is a list of field names (e.g. "NoCreationRetries")
7662	// to unconditionally include in API requests. By default, fields with
7663	// empty values are omitted from API requests. However, any non-pointer,
7664	// non-interface field appearing in ForceSendFields will be sent to the
7665	// server regardless of whether the field is empty or not. This may be
7666	// used to include empty fields in Patch requests.
7667	ForceSendFields []string `json:"-"`
7668
7669	// NullFields is a list of field names (e.g. "NoCreationRetries") to
7670	// include in API requests with the JSON null value. By default, fields
7671	// with empty values are omitted from API requests. However, any field
7672	// with an empty value appearing in NullFields will be sent to the
7673	// server as null. It is an error if a field in this list has a
7674	// non-empty value. This may be used to include null fields in Patch
7675	// requests.
7676	NullFields []string `json:"-"`
7677}
7678
7679func (s *InstanceGroupManagersResizeAdvancedRequest) MarshalJSON() ([]byte, error) {
7680	type noMethod InstanceGroupManagersResizeAdvancedRequest
7681	raw := noMethod(*s)
7682	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7683}
7684
7685type InstanceGroupManagersScopedList struct {
7686	// InstanceGroupManagers: [Output Only] The list of managed instance
7687	// groups that are contained in the specified project and zone.
7688	InstanceGroupManagers []*InstanceGroupManager `json:"instanceGroupManagers,omitempty"`
7689
7690	// Warning: [Output Only] The warning that replaces the list of managed
7691	// instance groups when the list is empty.
7692	Warning *InstanceGroupManagersScopedListWarning `json:"warning,omitempty"`
7693
7694	// ForceSendFields is a list of field names (e.g.
7695	// "InstanceGroupManagers") to unconditionally include in API requests.
7696	// By default, fields with empty values are omitted from API requests.
7697	// However, any non-pointer, non-interface field appearing in
7698	// ForceSendFields will be sent to the server regardless of whether the
7699	// field is empty or not. This may be used to include empty fields in
7700	// Patch requests.
7701	ForceSendFields []string `json:"-"`
7702
7703	// NullFields is a list of field names (e.g. "InstanceGroupManagers") to
7704	// include in API requests with the JSON null value. By default, fields
7705	// with empty values are omitted from API requests. However, any field
7706	// with an empty value appearing in NullFields will be sent to the
7707	// server as null. It is an error if a field in this list has a
7708	// non-empty value. This may be used to include null fields in Patch
7709	// requests.
7710	NullFields []string `json:"-"`
7711}
7712
7713func (s *InstanceGroupManagersScopedList) MarshalJSON() ([]byte, error) {
7714	type noMethod InstanceGroupManagersScopedList
7715	raw := noMethod(*s)
7716	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7717}
7718
7719// InstanceGroupManagersScopedListWarning: [Output Only] The warning
7720// that replaces the list of managed instance groups when the list is
7721// empty.
7722type InstanceGroupManagersScopedListWarning struct {
7723	// Code: [Output Only] A warning code, if applicable. For example,
7724	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
7725	// the response.
7726	//
7727	// Possible values:
7728	//   "CLEANUP_FAILED"
7729	//   "DEPRECATED_RESOURCE_USED"
7730	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
7731	//   "FIELD_VALUE_OVERRIDEN"
7732	//   "INJECTED_KERNELS_DEPRECATED"
7733	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
7734	//   "NEXT_HOP_CANNOT_IP_FORWARD"
7735	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
7736	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
7737	//   "NEXT_HOP_NOT_RUNNING"
7738	//   "NOT_CRITICAL_ERROR"
7739	//   "NO_RESULTS_ON_PAGE"
7740	//   "REQUIRED_TOS_AGREEMENT"
7741	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
7742	//   "RESOURCE_NOT_DELETED"
7743	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
7744	//   "UNREACHABLE"
7745	Code string `json:"code,omitempty"`
7746
7747	// Data: [Output Only] Metadata about this warning in key: value format.
7748	// For example:
7749	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
7750	Data []*InstanceGroupManagersScopedListWarningData `json:"data,omitempty"`
7751
7752	// Message: [Output Only] A human-readable description of the warning
7753	// code.
7754	Message string `json:"message,omitempty"`
7755
7756	// ForceSendFields is a list of field names (e.g. "Code") to
7757	// unconditionally include in API requests. By default, fields with
7758	// empty values are omitted from API requests. However, any non-pointer,
7759	// non-interface field appearing in ForceSendFields will be sent to the
7760	// server regardless of whether the field is empty or not. This may be
7761	// used to include empty fields in Patch requests.
7762	ForceSendFields []string `json:"-"`
7763
7764	// NullFields is a list of field names (e.g. "Code") to include in API
7765	// requests with the JSON null value. By default, fields with empty
7766	// values are omitted from API requests. However, any field with an
7767	// empty value appearing in NullFields will be sent to the server as
7768	// null. It is an error if a field in this list has a non-empty value.
7769	// This may be used to include null fields in Patch requests.
7770	NullFields []string `json:"-"`
7771}
7772
7773func (s *InstanceGroupManagersScopedListWarning) MarshalJSON() ([]byte, error) {
7774	type noMethod InstanceGroupManagersScopedListWarning
7775	raw := noMethod(*s)
7776	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7777}
7778
7779type InstanceGroupManagersScopedListWarningData struct {
7780	// Key: [Output Only] A key that provides more detail on the warning
7781	// being returned. For example, for warnings where there are no results
7782	// in a list request for a particular zone, this key might be scope and
7783	// the key value might be the zone name. Other examples might be a key
7784	// indicating a deprecated resource and a suggested replacement, or a
7785	// warning about invalid network settings (for example, if an instance
7786	// attempts to perform IP forwarding but is not enabled for IP
7787	// forwarding).
7788	Key string `json:"key,omitempty"`
7789
7790	// Value: [Output Only] A warning data value corresponding to the key.
7791	Value string `json:"value,omitempty"`
7792
7793	// ForceSendFields is a list of field names (e.g. "Key") to
7794	// unconditionally include in API requests. By default, fields with
7795	// empty values are omitted from API requests. However, any non-pointer,
7796	// non-interface field appearing in ForceSendFields will be sent to the
7797	// server regardless of whether the field is empty or not. This may be
7798	// used to include empty fields in Patch requests.
7799	ForceSendFields []string `json:"-"`
7800
7801	// NullFields is a list of field names (e.g. "Key") to include in API
7802	// requests with the JSON null value. By default, fields with empty
7803	// values are omitted from API requests. However, any field with an
7804	// empty value appearing in NullFields will be sent to the server as
7805	// null. It is an error if a field in this list has a non-empty value.
7806	// This may be used to include null fields in Patch requests.
7807	NullFields []string `json:"-"`
7808}
7809
7810func (s *InstanceGroupManagersScopedListWarningData) MarshalJSON() ([]byte, error) {
7811	type noMethod InstanceGroupManagersScopedListWarningData
7812	raw := noMethod(*s)
7813	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7814}
7815
7816type InstanceGroupManagersSetAutoHealingRequest struct {
7817	AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"`
7818
7819	// ForceSendFields is a list of field names (e.g. "AutoHealingPolicies")
7820	// to unconditionally include in API requests. By default, fields with
7821	// empty values are omitted from API requests. However, any non-pointer,
7822	// non-interface field appearing in ForceSendFields will be sent to the
7823	// server regardless of whether the field is empty or not. This may be
7824	// used to include empty fields in Patch requests.
7825	ForceSendFields []string `json:"-"`
7826
7827	// NullFields is a list of field names (e.g. "AutoHealingPolicies") to
7828	// include in API requests with the JSON null value. By default, fields
7829	// with empty values are omitted from API requests. However, any field
7830	// with an empty value appearing in NullFields will be sent to the
7831	// server as null. It is an error if a field in this list has a
7832	// non-empty value. This may be used to include null fields in Patch
7833	// requests.
7834	NullFields []string `json:"-"`
7835}
7836
7837func (s *InstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) {
7838	type noMethod InstanceGroupManagersSetAutoHealingRequest
7839	raw := noMethod(*s)
7840	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7841}
7842
7843type InstanceGroupManagersSetInstanceTemplateRequest struct {
7844	// InstanceTemplate: The URL of the instance template that is specified
7845	// for this managed instance group. The group uses this template to
7846	// create all new instances in the managed instance group.
7847	InstanceTemplate string `json:"instanceTemplate,omitempty"`
7848
7849	// ForceSendFields is a list of field names (e.g. "InstanceTemplate") to
7850	// unconditionally include in API requests. By default, fields with
7851	// empty values are omitted from API requests. However, any non-pointer,
7852	// non-interface field appearing in ForceSendFields will be sent to the
7853	// server regardless of whether the field is empty or not. This may be
7854	// used to include empty fields in Patch requests.
7855	ForceSendFields []string `json:"-"`
7856
7857	// NullFields is a list of field names (e.g. "InstanceTemplate") to
7858	// include in API requests with the JSON null value. By default, fields
7859	// with empty values are omitted from API requests. However, any field
7860	// with an empty value appearing in NullFields will be sent to the
7861	// server as null. It is an error if a field in this list has a
7862	// non-empty value. This may be used to include null fields in Patch
7863	// requests.
7864	NullFields []string `json:"-"`
7865}
7866
7867func (s *InstanceGroupManagersSetInstanceTemplateRequest) MarshalJSON() ([]byte, error) {
7868	type noMethod InstanceGroupManagersSetInstanceTemplateRequest
7869	raw := noMethod(*s)
7870	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7871}
7872
7873type InstanceGroupManagersSetTargetPoolsRequest struct {
7874	// Fingerprint: The fingerprint of the target pools information. Use
7875	// this optional property to prevent conflicts when multiple users
7876	// change the target pools settings concurrently. Obtain the fingerprint
7877	// with the instanceGroupManagers.get method. Then, include the
7878	// fingerprint in your request to ensure that you do not overwrite
7879	// changes that were applied from another concurrent request.
7880	Fingerprint string `json:"fingerprint,omitempty"`
7881
7882	// TargetPools: The list of target pool URLs that instances in this
7883	// managed instance group belong to. The managed instance group applies
7884	// these target pools to all of the instances in the group. Existing
7885	// instances and new instances in the group all receive these target
7886	// pool settings.
7887	TargetPools []string `json:"targetPools,omitempty"`
7888
7889	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
7890	// unconditionally include in API requests. By default, fields with
7891	// empty values are omitted from API requests. However, any non-pointer,
7892	// non-interface field appearing in ForceSendFields will be sent to the
7893	// server regardless of whether the field is empty or not. This may be
7894	// used to include empty fields in Patch requests.
7895	ForceSendFields []string `json:"-"`
7896
7897	// NullFields is a list of field names (e.g. "Fingerprint") to include
7898	// in API requests with the JSON null value. By default, fields with
7899	// empty values are omitted from API requests. However, any field with
7900	// an empty value appearing in NullFields will be sent to the server as
7901	// null. It is an error if a field in this list has a non-empty value.
7902	// This may be used to include null fields in Patch requests.
7903	NullFields []string `json:"-"`
7904}
7905
7906func (s *InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) {
7907	type noMethod InstanceGroupManagersSetTargetPoolsRequest
7908	raw := noMethod(*s)
7909	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7910}
7911
7912type InstanceGroupsAddInstancesRequest struct {
7913	// Instances: The list of instances to add to the instance group.
7914	Instances []*InstanceReference `json:"instances,omitempty"`
7915
7916	// ForceSendFields is a list of field names (e.g. "Instances") to
7917	// unconditionally include in API requests. By default, fields with
7918	// empty values are omitted from API requests. However, any non-pointer,
7919	// non-interface field appearing in ForceSendFields will be sent to the
7920	// server regardless of whether the field is empty or not. This may be
7921	// used to include empty fields in Patch requests.
7922	ForceSendFields []string `json:"-"`
7923
7924	// NullFields is a list of field names (e.g. "Instances") to include in
7925	// API requests with the JSON null value. By default, fields with empty
7926	// values are omitted from API requests. However, any field with an
7927	// empty value appearing in NullFields will be sent to the server as
7928	// null. It is an error if a field in this list has a non-empty value.
7929	// This may be used to include null fields in Patch requests.
7930	NullFields []string `json:"-"`
7931}
7932
7933func (s *InstanceGroupsAddInstancesRequest) MarshalJSON() ([]byte, error) {
7934	type noMethod InstanceGroupsAddInstancesRequest
7935	raw := noMethod(*s)
7936	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7937}
7938
7939type InstanceGroupsListInstances struct {
7940	// Id: [Output Only] Unique identifier for the resource; defined by the
7941	// server.
7942	Id string `json:"id,omitempty"`
7943
7944	// Items: A list of InstanceWithNamedPorts resources.
7945	Items []*InstanceWithNamedPorts `json:"items,omitempty"`
7946
7947	// Kind: [Output Only] The resource type, which is always
7948	// compute#instanceGroupsListInstances for the list of instances in the
7949	// specified instance group.
7950	Kind string `json:"kind,omitempty"`
7951
7952	// NextPageToken: [Output Only] This token allows you to get the next
7953	// page of results for list requests. If the number of results is larger
7954	// than maxResults, use the nextPageToken as a value for the query
7955	// parameter pageToken in the next list request. Subsequent list
7956	// requests will have their own nextPageToken to continue paging through
7957	// the results.
7958	NextPageToken string `json:"nextPageToken,omitempty"`
7959
7960	// SelfLink: [Output Only] Server-defined URL for this resource.
7961	SelfLink string `json:"selfLink,omitempty"`
7962
7963	// ServerResponse contains the HTTP response code and headers from the
7964	// server.
7965	googleapi.ServerResponse `json:"-"`
7966
7967	// ForceSendFields is a list of field names (e.g. "Id") to
7968	// unconditionally include in API requests. By default, fields with
7969	// empty values are omitted from API requests. However, any non-pointer,
7970	// non-interface field appearing in ForceSendFields will be sent to the
7971	// server regardless of whether the field is empty or not. This may be
7972	// used to include empty fields in Patch requests.
7973	ForceSendFields []string `json:"-"`
7974
7975	// NullFields is a list of field names (e.g. "Id") to include in API
7976	// requests with the JSON null value. By default, fields with empty
7977	// values are omitted from API requests. However, any field with an
7978	// empty value appearing in NullFields will be sent to the server as
7979	// null. It is an error if a field in this list has a non-empty value.
7980	// This may be used to include null fields in Patch requests.
7981	NullFields []string `json:"-"`
7982}
7983
7984func (s *InstanceGroupsListInstances) MarshalJSON() ([]byte, error) {
7985	type noMethod InstanceGroupsListInstances
7986	raw := noMethod(*s)
7987	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7988}
7989
7990type InstanceGroupsListInstancesRequest struct {
7991	// InstanceState: A filter for the state of the instances in the
7992	// instance group. Valid options are ALL or RUNNING. If you do not
7993	// specify this parameter the list includes all instances regardless of
7994	// their state.
7995	//
7996	// Possible values:
7997	//   "ALL"
7998	//   "RUNNING"
7999	InstanceState string `json:"instanceState,omitempty"`
8000
8001	// ForceSendFields is a list of field names (e.g. "InstanceState") to
8002	// unconditionally include in API requests. By default, fields with
8003	// empty values are omitted from API requests. However, any non-pointer,
8004	// non-interface field appearing in ForceSendFields will be sent to the
8005	// server regardless of whether the field is empty or not. This may be
8006	// used to include empty fields in Patch requests.
8007	ForceSendFields []string `json:"-"`
8008
8009	// NullFields is a list of field names (e.g. "InstanceState") to include
8010	// in API requests with the JSON null value. By default, fields with
8011	// empty values are omitted from API requests. However, any field with
8012	// an empty value appearing in NullFields will be sent to the server as
8013	// null. It is an error if a field in this list has a non-empty value.
8014	// This may be used to include null fields in Patch requests.
8015	NullFields []string `json:"-"`
8016}
8017
8018func (s *InstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) {
8019	type noMethod InstanceGroupsListInstancesRequest
8020	raw := noMethod(*s)
8021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8022}
8023
8024type InstanceGroupsRemoveInstancesRequest struct {
8025	// Instances: The list of instances to remove from the instance group.
8026	Instances []*InstanceReference `json:"instances,omitempty"`
8027
8028	// ForceSendFields is a list of field names (e.g. "Instances") 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	// NullFields is a list of field names (e.g. "Instances") to include in
8037	// API requests with the JSON null value. By default, fields with empty
8038	// values are omitted from API requests. However, any field with an
8039	// empty value appearing in NullFields will be sent to the server as
8040	// null. It is an error if a field in this list has a non-empty value.
8041	// This may be used to include null fields in Patch requests.
8042	NullFields []string `json:"-"`
8043}
8044
8045func (s *InstanceGroupsRemoveInstancesRequest) MarshalJSON() ([]byte, error) {
8046	type noMethod InstanceGroupsRemoveInstancesRequest
8047	raw := noMethod(*s)
8048	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8049}
8050
8051type InstanceGroupsScopedList struct {
8052	// InstanceGroups: [Output Only] The list of instance groups that are
8053	// contained in this scope.
8054	InstanceGroups []*InstanceGroup `json:"instanceGroups,omitempty"`
8055
8056	// Warning: [Output Only] An informational warning that replaces the
8057	// list of instance groups when the list is empty.
8058	Warning *InstanceGroupsScopedListWarning `json:"warning,omitempty"`
8059
8060	// ForceSendFields is a list of field names (e.g. "InstanceGroups") to
8061	// unconditionally include in API requests. By default, fields with
8062	// empty values are omitted from API requests. However, any non-pointer,
8063	// non-interface field appearing in ForceSendFields will be sent to the
8064	// server regardless of whether the field is empty or not. This may be
8065	// used to include empty fields in Patch requests.
8066	ForceSendFields []string `json:"-"`
8067
8068	// NullFields is a list of field names (e.g. "InstanceGroups") to
8069	// include in API requests with the JSON null value. By default, fields
8070	// with empty values are omitted from API requests. However, any field
8071	// with an empty value appearing in NullFields will be sent to the
8072	// server as null. It is an error if a field in this list has a
8073	// non-empty value. This may be used to include null fields in Patch
8074	// requests.
8075	NullFields []string `json:"-"`
8076}
8077
8078func (s *InstanceGroupsScopedList) MarshalJSON() ([]byte, error) {
8079	type noMethod InstanceGroupsScopedList
8080	raw := noMethod(*s)
8081	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8082}
8083
8084// InstanceGroupsScopedListWarning: [Output Only] An informational
8085// warning that replaces the list of instance groups when the list is
8086// empty.
8087type InstanceGroupsScopedListWarning struct {
8088	// Code: [Output Only] A warning code, if applicable. For example,
8089	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
8090	// the response.
8091	//
8092	// Possible values:
8093	//   "CLEANUP_FAILED"
8094	//   "DEPRECATED_RESOURCE_USED"
8095	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
8096	//   "FIELD_VALUE_OVERRIDEN"
8097	//   "INJECTED_KERNELS_DEPRECATED"
8098	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
8099	//   "NEXT_HOP_CANNOT_IP_FORWARD"
8100	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
8101	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
8102	//   "NEXT_HOP_NOT_RUNNING"
8103	//   "NOT_CRITICAL_ERROR"
8104	//   "NO_RESULTS_ON_PAGE"
8105	//   "REQUIRED_TOS_AGREEMENT"
8106	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
8107	//   "RESOURCE_NOT_DELETED"
8108	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
8109	//   "UNREACHABLE"
8110	Code string `json:"code,omitempty"`
8111
8112	// Data: [Output Only] Metadata about this warning in key: value format.
8113	// For example:
8114	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
8115	Data []*InstanceGroupsScopedListWarningData `json:"data,omitempty"`
8116
8117	// Message: [Output Only] A human-readable description of the warning
8118	// code.
8119	Message string `json:"message,omitempty"`
8120
8121	// ForceSendFields is a list of field names (e.g. "Code") to
8122	// unconditionally include in API requests. By default, fields with
8123	// empty values are omitted from API requests. However, any non-pointer,
8124	// non-interface field appearing in ForceSendFields will be sent to the
8125	// server regardless of whether the field is empty or not. This may be
8126	// used to include empty fields in Patch requests.
8127	ForceSendFields []string `json:"-"`
8128
8129	// NullFields is a list of field names (e.g. "Code") to include in API
8130	// requests with the JSON null value. By default, fields with empty
8131	// values are omitted from API requests. However, any field with an
8132	// empty value appearing in NullFields will be sent to the server as
8133	// null. It is an error if a field in this list has a non-empty value.
8134	// This may be used to include null fields in Patch requests.
8135	NullFields []string `json:"-"`
8136}
8137
8138func (s *InstanceGroupsScopedListWarning) MarshalJSON() ([]byte, error) {
8139	type noMethod InstanceGroupsScopedListWarning
8140	raw := noMethod(*s)
8141	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8142}
8143
8144type InstanceGroupsScopedListWarningData struct {
8145	// Key: [Output Only] A key that provides more detail on the warning
8146	// being returned. For example, for warnings where there are no results
8147	// in a list request for a particular zone, this key might be scope and
8148	// the key value might be the zone name. Other examples might be a key
8149	// indicating a deprecated resource and a suggested replacement, or a
8150	// warning about invalid network settings (for example, if an instance
8151	// attempts to perform IP forwarding but is not enabled for IP
8152	// forwarding).
8153	Key string `json:"key,omitempty"`
8154
8155	// Value: [Output Only] A warning data value corresponding to the key.
8156	Value string `json:"value,omitempty"`
8157
8158	// ForceSendFields is a list of field names (e.g. "Key") to
8159	// unconditionally include in API requests. By default, fields with
8160	// empty values are omitted from API requests. However, any non-pointer,
8161	// non-interface field appearing in ForceSendFields will be sent to the
8162	// server regardless of whether the field is empty or not. This may be
8163	// used to include empty fields in Patch requests.
8164	ForceSendFields []string `json:"-"`
8165
8166	// NullFields is a list of field names (e.g. "Key") to include in API
8167	// requests with the JSON null value. By default, fields with empty
8168	// values are omitted from API requests. However, any field with an
8169	// empty value appearing in NullFields will be sent to the server as
8170	// null. It is an error if a field in this list has a non-empty value.
8171	// This may be used to include null fields in Patch requests.
8172	NullFields []string `json:"-"`
8173}
8174
8175func (s *InstanceGroupsScopedListWarningData) MarshalJSON() ([]byte, error) {
8176	type noMethod InstanceGroupsScopedListWarningData
8177	raw := noMethod(*s)
8178	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8179}
8180
8181type InstanceGroupsSetNamedPortsRequest struct {
8182	// Fingerprint: The fingerprint of the named ports information for this
8183	// instance group. Use this optional property to prevent conflicts when
8184	// multiple users change the named ports settings concurrently. Obtain
8185	// the fingerprint with the instanceGroups.get method. Then, include the
8186	// fingerprint in your request to ensure that you do not overwrite
8187	// changes that were applied from another concurrent request.
8188	Fingerprint string `json:"fingerprint,omitempty"`
8189
8190	// NamedPorts: The list of named ports to set for this instance group.
8191	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
8192
8193	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
8194	// unconditionally include in API requests. By default, fields with
8195	// empty values are omitted from API requests. However, any non-pointer,
8196	// non-interface field appearing in ForceSendFields will be sent to the
8197	// server regardless of whether the field is empty or not. This may be
8198	// used to include empty fields in Patch requests.
8199	ForceSendFields []string `json:"-"`
8200
8201	// NullFields is a list of field names (e.g. "Fingerprint") to include
8202	// in API requests with the JSON null value. By default, fields with
8203	// empty values are omitted from API requests. However, any field with
8204	// an empty value appearing in NullFields will be sent to the server as
8205	// null. It is an error if a field in this list has a non-empty value.
8206	// This may be used to include null fields in Patch requests.
8207	NullFields []string `json:"-"`
8208}
8209
8210func (s *InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) {
8211	type noMethod InstanceGroupsSetNamedPortsRequest
8212	raw := noMethod(*s)
8213	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8214}
8215
8216// InstanceList: Contains a list of instances.
8217type InstanceList struct {
8218	// Id: [Output Only] Unique identifier for the resource; defined by the
8219	// server.
8220	Id string `json:"id,omitempty"`
8221
8222	// Items: A list of Instance resources.
8223	Items []*Instance `json:"items,omitempty"`
8224
8225	// Kind: [Output Only] Type of resource. Always compute#instanceList for
8226	// lists of Instance resources.
8227	Kind string `json:"kind,omitempty"`
8228
8229	// NextPageToken: [Output Only] This token allows you to get the next
8230	// page of results for list requests. If the number of results is larger
8231	// than maxResults, use the nextPageToken as a value for the query
8232	// parameter pageToken in the next list request. Subsequent list
8233	// requests will have their own nextPageToken to continue paging through
8234	// the results.
8235	NextPageToken string `json:"nextPageToken,omitempty"`
8236
8237	// SelfLink: [Output Only] Server-defined URL for this resource.
8238	SelfLink string `json:"selfLink,omitempty"`
8239
8240	// ServerResponse contains the HTTP response code and headers from the
8241	// server.
8242	googleapi.ServerResponse `json:"-"`
8243
8244	// ForceSendFields is a list of field names (e.g. "Id") to
8245	// unconditionally include in API requests. By default, fields with
8246	// empty values are omitted from API requests. However, any non-pointer,
8247	// non-interface field appearing in ForceSendFields will be sent to the
8248	// server regardless of whether the field is empty or not. This may be
8249	// used to include empty fields in Patch requests.
8250	ForceSendFields []string `json:"-"`
8251
8252	// NullFields is a list of field names (e.g. "Id") to include in API
8253	// requests with the JSON null value. By default, fields with empty
8254	// values are omitted from API requests. However, any field with an
8255	// empty value appearing in NullFields will be sent to the server as
8256	// null. It is an error if a field in this list has a non-empty value.
8257	// This may be used to include null fields in Patch requests.
8258	NullFields []string `json:"-"`
8259}
8260
8261func (s *InstanceList) MarshalJSON() ([]byte, error) {
8262	type noMethod InstanceList
8263	raw := noMethod(*s)
8264	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8265}
8266
8267// InstanceListReferrers: Contains a list of instance referrers.
8268type InstanceListReferrers struct {
8269	// Id: [Output Only] Unique identifier for the resource; defined by the
8270	// server.
8271	Id string `json:"id,omitempty"`
8272
8273	// Items: A list of Reference resources.
8274	Items []*Reference `json:"items,omitempty"`
8275
8276	// Kind: [Output Only] Type of resource. Always
8277	// compute#instanceListReferrers for lists of Instance referrers.
8278	Kind string `json:"kind,omitempty"`
8279
8280	// NextPageToken: [Output Only] This token allows you to get the next
8281	// page of results for list requests. If the number of results is larger
8282	// than maxResults, use the nextPageToken as a value for the query
8283	// parameter pageToken in the next list request. Subsequent list
8284	// requests will have their own nextPageToken to continue paging through
8285	// the results.
8286	NextPageToken string `json:"nextPageToken,omitempty"`
8287
8288	// SelfLink: [Output Only] Server-defined URL for this resource.
8289	SelfLink string `json:"selfLink,omitempty"`
8290
8291	// ServerResponse contains the HTTP response code and headers from the
8292	// server.
8293	googleapi.ServerResponse `json:"-"`
8294
8295	// ForceSendFields is a list of field names (e.g. "Id") to
8296	// unconditionally include in API requests. By default, fields with
8297	// empty values are omitted from API requests. However, any non-pointer,
8298	// non-interface field appearing in ForceSendFields will be sent to the
8299	// server regardless of whether the field is empty or not. This may be
8300	// used to include empty fields in Patch requests.
8301	ForceSendFields []string `json:"-"`
8302
8303	// NullFields is a list of field names (e.g. "Id") to include in API
8304	// requests with the JSON null value. By default, fields with empty
8305	// values are omitted from API requests. However, any field with an
8306	// empty value appearing in NullFields will be sent to the server as
8307	// null. It is an error if a field in this list has a non-empty value.
8308	// This may be used to include null fields in Patch requests.
8309	NullFields []string `json:"-"`
8310}
8311
8312func (s *InstanceListReferrers) MarshalJSON() ([]byte, error) {
8313	type noMethod InstanceListReferrers
8314	raw := noMethod(*s)
8315	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8316}
8317
8318type InstanceMoveRequest struct {
8319	// DestinationZone: The URL of the destination zone to move the
8320	// instance. This can be a full or partial URL. For example, the
8321	// following are all valid URLs to a zone:
8322	// - https://www.googleapis.com/compute/v1/projects/project/zones/zone
8323	//
8324	// - projects/project/zones/zone
8325	// - zones/zone
8326	DestinationZone string `json:"destinationZone,omitempty"`
8327
8328	// TargetInstance: The URL of the target instance to move. This can be a
8329	// full or partial URL. For example, the following are all valid URLs to
8330	// an instance:
8331	// -
8332	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
8333	// - projects/project/zones/zone/instances/instance
8334	// - zones/zone/instances/instance
8335	TargetInstance string `json:"targetInstance,omitempty"`
8336
8337	// ForceSendFields is a list of field names (e.g. "DestinationZone") to
8338	// unconditionally include in API requests. By default, fields with
8339	// empty values are omitted from API requests. However, any non-pointer,
8340	// non-interface field appearing in ForceSendFields will be sent to the
8341	// server regardless of whether the field is empty or not. This may be
8342	// used to include empty fields in Patch requests.
8343	ForceSendFields []string `json:"-"`
8344
8345	// NullFields is a list of field names (e.g. "DestinationZone") to
8346	// include in API requests with the JSON null value. By default, fields
8347	// with empty values are omitted from API requests. However, any field
8348	// with an empty value appearing in NullFields will be sent to the
8349	// server as null. It is an error if a field in this list has a
8350	// non-empty value. This may be used to include null fields in Patch
8351	// requests.
8352	NullFields []string `json:"-"`
8353}
8354
8355func (s *InstanceMoveRequest) MarshalJSON() ([]byte, error) {
8356	type noMethod InstanceMoveRequest
8357	raw := noMethod(*s)
8358	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8359}
8360
8361type InstanceProperties struct {
8362	// CanIpForward: Enables instances created based on this template to
8363	// send packets with source IP addresses other than their own and
8364	// receive packets with destination IP addresses other than their own.
8365	// If these instances will be used as an IP gateway or it will be set as
8366	// the next-hop in a Route resource, specify true. If unsure, leave this
8367	// set to false. See the Enable IP forwarding documentation for more
8368	// information.
8369	CanIpForward bool `json:"canIpForward,omitempty"`
8370
8371	// Description: An optional text description for the instances that are
8372	// created from this instance template.
8373	Description string `json:"description,omitempty"`
8374
8375	// Disks: An array of disks that are associated with the instances that
8376	// are created from this template.
8377	Disks []*AttachedDisk `json:"disks,omitempty"`
8378
8379	// GuestAccelerators: A list of guest accelerator cards' type and count
8380	// to use for instances created from the instance template.
8381	GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"`
8382
8383	// Labels: Labels to apply to instances that are created from this
8384	// template.
8385	Labels map[string]string `json:"labels,omitempty"`
8386
8387	// MachineType: The machine type to use for instances that are created
8388	// from this template.
8389	MachineType string `json:"machineType,omitempty"`
8390
8391	// Metadata: The metadata key/value pairs to assign to instances that
8392	// are created from this template. These pairs can consist of custom
8393	// metadata or predefined keys. See Project and instance metadata for
8394	// more information.
8395	Metadata *Metadata `json:"metadata,omitempty"`
8396
8397	// MinCpuPlatform: Minimum cpu/platform to be used by this instance. The
8398	// instance may be scheduled on the specified or newer cpu/platform.
8399	// Applicable values are the friendly names of CPU platforms, such as
8400	// minCpuPlatform: "Intel Haswell" or minCpuPlatform: "Intel Sandy
8401	// Bridge". For more information, read Specifying a Minimum CPU
8402	// Platform.
8403	MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
8404
8405	// NetworkInterfaces: An array of network access configurations for this
8406	// interface.
8407	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
8408
8409	// Scheduling: Specifies the scheduling options for the instances that
8410	// are created from this template.
8411	Scheduling *Scheduling `json:"scheduling,omitempty"`
8412
8413	// ServiceAccounts: A list of service accounts with specified scopes.
8414	// Access tokens for these service accounts are available to the
8415	// instances that are created from this template. Use metadata queries
8416	// to obtain the access tokens for these instances.
8417	ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"`
8418
8419	// Tags: A list of tags to apply to the instances that are created from
8420	// this template. The tags identify valid sources or targets for network
8421	// firewalls. The setTags method can modify this list of tags. Each tag
8422	// within the list must comply with RFC1035.
8423	Tags *Tags `json:"tags,omitempty"`
8424
8425	// ForceSendFields is a list of field names (e.g. "CanIpForward") to
8426	// unconditionally include in API requests. By default, fields with
8427	// empty values are omitted from API requests. However, any non-pointer,
8428	// non-interface field appearing in ForceSendFields will be sent to the
8429	// server regardless of whether the field is empty or not. This may be
8430	// used to include empty fields in Patch requests.
8431	ForceSendFields []string `json:"-"`
8432
8433	// NullFields is a list of field names (e.g. "CanIpForward") to include
8434	// in API requests with the JSON null value. By default, fields with
8435	// empty values are omitted from API requests. However, any field with
8436	// an empty value appearing in NullFields will be sent to the server as
8437	// null. It is an error if a field in this list has a non-empty value.
8438	// This may be used to include null fields in Patch requests.
8439	NullFields []string `json:"-"`
8440}
8441
8442func (s *InstanceProperties) MarshalJSON() ([]byte, error) {
8443	type noMethod InstanceProperties
8444	raw := noMethod(*s)
8445	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8446}
8447
8448type InstanceReference struct {
8449	// Instance: The URL for a specific instance.
8450	Instance string `json:"instance,omitempty"`
8451
8452	// ForceSendFields is a list of field names (e.g. "Instance") to
8453	// unconditionally include in API requests. By default, fields with
8454	// empty values are omitted from API requests. However, any non-pointer,
8455	// non-interface field appearing in ForceSendFields will be sent to the
8456	// server regardless of whether the field is empty or not. This may be
8457	// used to include empty fields in Patch requests.
8458	ForceSendFields []string `json:"-"`
8459
8460	// NullFields is a list of field names (e.g. "Instance") to include in
8461	// API requests with the JSON null value. By default, fields with empty
8462	// values are omitted from API requests. However, any field with an
8463	// empty value appearing in NullFields will be sent to the server as
8464	// null. It is an error if a field in this list has a non-empty value.
8465	// This may be used to include null fields in Patch requests.
8466	NullFields []string `json:"-"`
8467}
8468
8469func (s *InstanceReference) MarshalJSON() ([]byte, error) {
8470	type noMethod InstanceReference
8471	raw := noMethod(*s)
8472	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8473}
8474
8475// InstanceTemplate: An Instance Template resource.
8476type InstanceTemplate struct {
8477	// CreationTimestamp: [Output Only] The creation timestamp for this
8478	// instance template in RFC3339 text format.
8479	CreationTimestamp string `json:"creationTimestamp,omitempty"`
8480
8481	// Description: An optional description of this resource. Provide this
8482	// property when you create the resource.
8483	Description string `json:"description,omitempty"`
8484
8485	// Id: [Output Only] A unique identifier for this instance template. The
8486	// server defines this identifier.
8487	Id uint64 `json:"id,omitempty,string"`
8488
8489	// Kind: [Output Only] The resource type, which is always
8490	// compute#instanceTemplate for instance templates.
8491	Kind string `json:"kind,omitempty"`
8492
8493	// Name: Name of the resource; provided by the client when the resource
8494	// is created. The name must be 1-63 characters long, and comply with
8495	// RFC1035. Specifically, the name must be 1-63 characters long and
8496	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
8497	// the first character must be a lowercase letter, and all following
8498	// characters must be a dash, lowercase letter, or digit, except the
8499	// last character, which cannot be a dash.
8500	Name string `json:"name,omitempty"`
8501
8502	// Properties: The instance properties for this instance template.
8503	Properties *InstanceProperties `json:"properties,omitempty"`
8504
8505	// SelfLink: [Output Only] The URL for this instance template. The
8506	// server defines this URL.
8507	SelfLink string `json:"selfLink,omitempty"`
8508
8509	// ServerResponse contains the HTTP response code and headers from the
8510	// server.
8511	googleapi.ServerResponse `json:"-"`
8512
8513	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
8514	// to unconditionally include in API requests. By default, fields with
8515	// empty values are omitted from API requests. However, any non-pointer,
8516	// non-interface field appearing in ForceSendFields will be sent to the
8517	// server regardless of whether the field is empty or not. This may be
8518	// used to include empty fields in Patch requests.
8519	ForceSendFields []string `json:"-"`
8520
8521	// NullFields is a list of field names (e.g. "CreationTimestamp") to
8522	// include in API requests with the JSON null value. By default, fields
8523	// with empty values are omitted from API requests. However, any field
8524	// with an empty value appearing in NullFields will be sent to the
8525	// server as null. It is an error if a field in this list has a
8526	// non-empty value. This may be used to include null fields in Patch
8527	// requests.
8528	NullFields []string `json:"-"`
8529}
8530
8531func (s *InstanceTemplate) MarshalJSON() ([]byte, error) {
8532	type noMethod InstanceTemplate
8533	raw := noMethod(*s)
8534	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8535}
8536
8537// InstanceTemplateList: A list of instance templates.
8538type InstanceTemplateList struct {
8539	// Id: [Output Only] Unique identifier for the resource; defined by the
8540	// server.
8541	Id string `json:"id,omitempty"`
8542
8543	// Items: A list of InstanceTemplate resources.
8544	Items []*InstanceTemplate `json:"items,omitempty"`
8545
8546	// Kind: [Output Only] The resource type, which is always
8547	// compute#instanceTemplatesListResponse for instance template lists.
8548	Kind string `json:"kind,omitempty"`
8549
8550	// NextPageToken: [Output Only] This token allows you to get the next
8551	// page of results for list requests. If the number of results is larger
8552	// than maxResults, use the nextPageToken as a value for the query
8553	// parameter pageToken in the next list request. Subsequent list
8554	// requests will have their own nextPageToken to continue paging through
8555	// the results.
8556	NextPageToken string `json:"nextPageToken,omitempty"`
8557
8558	// SelfLink: [Output Only] Server-defined URL for this resource.
8559	SelfLink string `json:"selfLink,omitempty"`
8560
8561	// ServerResponse contains the HTTP response code and headers from the
8562	// server.
8563	googleapi.ServerResponse `json:"-"`
8564
8565	// ForceSendFields is a list of field names (e.g. "Id") to
8566	// unconditionally include in API requests. By default, fields with
8567	// empty values are omitted from API requests. However, any non-pointer,
8568	// non-interface field appearing in ForceSendFields will be sent to the
8569	// server regardless of whether the field is empty or not. This may be
8570	// used to include empty fields in Patch requests.
8571	ForceSendFields []string `json:"-"`
8572
8573	// NullFields is a list of field names (e.g. "Id") to include in API
8574	// requests with the JSON null value. By default, fields with empty
8575	// values are omitted from API requests. However, any field with an
8576	// empty value appearing in NullFields will be sent to the server as
8577	// null. It is an error if a field in this list has a non-empty value.
8578	// This may be used to include null fields in Patch requests.
8579	NullFields []string `json:"-"`
8580}
8581
8582func (s *InstanceTemplateList) MarshalJSON() ([]byte, error) {
8583	type noMethod InstanceTemplateList
8584	raw := noMethod(*s)
8585	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8586}
8587
8588type InstanceWithNamedPorts struct {
8589	// Instance: [Output Only] The URL of the instance.
8590	Instance string `json:"instance,omitempty"`
8591
8592	// NamedPorts: [Output Only] The named ports that belong to this
8593	// instance group.
8594	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
8595
8596	// Status: [Output Only] The status of the instance.
8597	//
8598	// Possible values:
8599	//   "PROVISIONING"
8600	//   "RUNNING"
8601	//   "STAGING"
8602	//   "STOPPED"
8603	//   "STOPPING"
8604	//   "SUSPENDED"
8605	//   "SUSPENDING"
8606	//   "TERMINATED"
8607	Status string `json:"status,omitempty"`
8608
8609	// ForceSendFields is a list of field names (e.g. "Instance") to
8610	// unconditionally include in API requests. By default, fields with
8611	// empty values are omitted from API requests. However, any non-pointer,
8612	// non-interface field appearing in ForceSendFields will be sent to the
8613	// server regardless of whether the field is empty or not. This may be
8614	// used to include empty fields in Patch requests.
8615	ForceSendFields []string `json:"-"`
8616
8617	// NullFields is a list of field names (e.g. "Instance") to include in
8618	// API requests with the JSON null value. By default, fields with empty
8619	// values are omitted from API requests. However, any field with an
8620	// empty value appearing in NullFields will be sent to the server as
8621	// null. It is an error if a field in this list has a non-empty value.
8622	// This may be used to include null fields in Patch requests.
8623	NullFields []string `json:"-"`
8624}
8625
8626func (s *InstanceWithNamedPorts) MarshalJSON() ([]byte, error) {
8627	type noMethod InstanceWithNamedPorts
8628	raw := noMethod(*s)
8629	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8630}
8631
8632type InstancesScopedList struct {
8633	// Instances: [Output Only] List of instances contained in this scope.
8634	Instances []*Instance `json:"instances,omitempty"`
8635
8636	// Warning: [Output Only] Informational warning which replaces the list
8637	// of instances when the list is empty.
8638	Warning *InstancesScopedListWarning `json:"warning,omitempty"`
8639
8640	// ForceSendFields is a list of field names (e.g. "Instances") to
8641	// unconditionally include in API requests. By default, fields with
8642	// empty values are omitted from API requests. However, any non-pointer,
8643	// non-interface field appearing in ForceSendFields will be sent to the
8644	// server regardless of whether the field is empty or not. This may be
8645	// used to include empty fields in Patch requests.
8646	ForceSendFields []string `json:"-"`
8647
8648	// NullFields is a list of field names (e.g. "Instances") to include in
8649	// API requests with the JSON null value. By default, fields with empty
8650	// values are omitted from API requests. However, any field with an
8651	// empty value appearing in NullFields will be sent to the server as
8652	// null. It is an error if a field in this list has a non-empty value.
8653	// This may be used to include null fields in Patch requests.
8654	NullFields []string `json:"-"`
8655}
8656
8657func (s *InstancesScopedList) MarshalJSON() ([]byte, error) {
8658	type noMethod InstancesScopedList
8659	raw := noMethod(*s)
8660	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8661}
8662
8663// InstancesScopedListWarning: [Output Only] Informational warning which
8664// replaces the list of instances when the list is empty.
8665type InstancesScopedListWarning struct {
8666	// Code: [Output Only] A warning code, if applicable. For example,
8667	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
8668	// the response.
8669	//
8670	// Possible values:
8671	//   "CLEANUP_FAILED"
8672	//   "DEPRECATED_RESOURCE_USED"
8673	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
8674	//   "FIELD_VALUE_OVERRIDEN"
8675	//   "INJECTED_KERNELS_DEPRECATED"
8676	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
8677	//   "NEXT_HOP_CANNOT_IP_FORWARD"
8678	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
8679	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
8680	//   "NEXT_HOP_NOT_RUNNING"
8681	//   "NOT_CRITICAL_ERROR"
8682	//   "NO_RESULTS_ON_PAGE"
8683	//   "REQUIRED_TOS_AGREEMENT"
8684	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
8685	//   "RESOURCE_NOT_DELETED"
8686	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
8687	//   "UNREACHABLE"
8688	Code string `json:"code,omitempty"`
8689
8690	// Data: [Output Only] Metadata about this warning in key: value format.
8691	// For example:
8692	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
8693	Data []*InstancesScopedListWarningData `json:"data,omitempty"`
8694
8695	// Message: [Output Only] A human-readable description of the warning
8696	// code.
8697	Message string `json:"message,omitempty"`
8698
8699	// ForceSendFields is a list of field names (e.g. "Code") to
8700	// unconditionally include in API requests. By default, fields with
8701	// empty values are omitted from API requests. However, any non-pointer,
8702	// non-interface field appearing in ForceSendFields will be sent to the
8703	// server regardless of whether the field is empty or not. This may be
8704	// used to include empty fields in Patch requests.
8705	ForceSendFields []string `json:"-"`
8706
8707	// NullFields is a list of field names (e.g. "Code") to include in API
8708	// requests with the JSON null value. By default, fields with empty
8709	// values are omitted from API requests. However, any field with an
8710	// empty value appearing in NullFields will be sent to the server as
8711	// null. It is an error if a field in this list has a non-empty value.
8712	// This may be used to include null fields in Patch requests.
8713	NullFields []string `json:"-"`
8714}
8715
8716func (s *InstancesScopedListWarning) MarshalJSON() ([]byte, error) {
8717	type noMethod InstancesScopedListWarning
8718	raw := noMethod(*s)
8719	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8720}
8721
8722type InstancesScopedListWarningData struct {
8723	// Key: [Output Only] A key that provides more detail on the warning
8724	// being returned. For example, for warnings where there are no results
8725	// in a list request for a particular zone, this key might be scope and
8726	// the key value might be the zone name. Other examples might be a key
8727	// indicating a deprecated resource and a suggested replacement, or a
8728	// warning about invalid network settings (for example, if an instance
8729	// attempts to perform IP forwarding but is not enabled for IP
8730	// forwarding).
8731	Key string `json:"key,omitempty"`
8732
8733	// Value: [Output Only] A warning data value corresponding to the key.
8734	Value string `json:"value,omitempty"`
8735
8736	// ForceSendFields is a list of field names (e.g. "Key") to
8737	// unconditionally include in API requests. By default, fields with
8738	// empty values are omitted from API requests. However, any non-pointer,
8739	// non-interface field appearing in ForceSendFields will be sent to the
8740	// server regardless of whether the field is empty or not. This may be
8741	// used to include empty fields in Patch requests.
8742	ForceSendFields []string `json:"-"`
8743
8744	// NullFields is a list of field names (e.g. "Key") to include in API
8745	// requests with the JSON null value. By default, fields with empty
8746	// values are omitted from API requests. However, any field with an
8747	// empty value appearing in NullFields will be sent to the server as
8748	// null. It is an error if a field in this list has a non-empty value.
8749	// This may be used to include null fields in Patch requests.
8750	NullFields []string `json:"-"`
8751}
8752
8753func (s *InstancesScopedListWarningData) MarshalJSON() ([]byte, error) {
8754	type noMethod InstancesScopedListWarningData
8755	raw := noMethod(*s)
8756	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8757}
8758
8759type InstancesSetLabelsRequest struct {
8760	// LabelFingerprint: Fingerprint of the previous set of labels for this
8761	// resource, used to prevent conflicts. Provide the latest fingerprint
8762	// value when making a request to add or change labels.
8763	LabelFingerprint string `json:"labelFingerprint,omitempty"`
8764
8765	Labels map[string]string `json:"labels,omitempty"`
8766
8767	// ForceSendFields is a list of field names (e.g. "LabelFingerprint") to
8768	// unconditionally include in API requests. By default, fields with
8769	// empty values are omitted from API requests. However, any non-pointer,
8770	// non-interface field appearing in ForceSendFields will be sent to the
8771	// server regardless of whether the field is empty or not. This may be
8772	// used to include empty fields in Patch requests.
8773	ForceSendFields []string `json:"-"`
8774
8775	// NullFields is a list of field names (e.g. "LabelFingerprint") to
8776	// include in API requests with the JSON null value. By default, fields
8777	// with empty values are omitted from API requests. However, any field
8778	// with an empty value appearing in NullFields will be sent to the
8779	// server as null. It is an error if a field in this list has a
8780	// non-empty value. This may be used to include null fields in Patch
8781	// requests.
8782	NullFields []string `json:"-"`
8783}
8784
8785func (s *InstancesSetLabelsRequest) MarshalJSON() ([]byte, error) {
8786	type noMethod InstancesSetLabelsRequest
8787	raw := noMethod(*s)
8788	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8789}
8790
8791type InstancesSetMachineResourcesRequest struct {
8792	// GuestAccelerators: List of the type and count of accelerator cards
8793	// attached to the instance.
8794	GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"`
8795
8796	// ForceSendFields is a list of field names (e.g. "GuestAccelerators")
8797	// to unconditionally include in API requests. By default, fields with
8798	// empty values are omitted from API requests. However, any non-pointer,
8799	// non-interface field appearing in ForceSendFields will be sent to the
8800	// server regardless of whether the field is empty or not. This may be
8801	// used to include empty fields in Patch requests.
8802	ForceSendFields []string `json:"-"`
8803
8804	// NullFields is a list of field names (e.g. "GuestAccelerators") to
8805	// include in API requests with the JSON null value. By default, fields
8806	// with empty values are omitted from API requests. However, any field
8807	// with an empty value appearing in NullFields will be sent to the
8808	// server as null. It is an error if a field in this list has a
8809	// non-empty value. This may be used to include null fields in Patch
8810	// requests.
8811	NullFields []string `json:"-"`
8812}
8813
8814func (s *InstancesSetMachineResourcesRequest) MarshalJSON() ([]byte, error) {
8815	type noMethod InstancesSetMachineResourcesRequest
8816	raw := noMethod(*s)
8817	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8818}
8819
8820type InstancesSetMachineTypeRequest struct {
8821	// MachineType: Full or partial URL of the machine type resource. See
8822	// Machine Types for a full list of machine types. For example:
8823	// zones/us-central1-f/machineTypes/n1-standard-1
8824	MachineType string `json:"machineType,omitempty"`
8825
8826	// ForceSendFields is a list of field names (e.g. "MachineType") to
8827	// unconditionally include in API requests. By default, fields with
8828	// empty values are omitted from API requests. However, any non-pointer,
8829	// non-interface field appearing in ForceSendFields will be sent to the
8830	// server regardless of whether the field is empty or not. This may be
8831	// used to include empty fields in Patch requests.
8832	ForceSendFields []string `json:"-"`
8833
8834	// NullFields is a list of field names (e.g. "MachineType") to include
8835	// in API requests with the JSON null value. By default, fields with
8836	// empty values are omitted from API requests. However, any field with
8837	// an empty value appearing in NullFields will be sent to the server as
8838	// null. It is an error if a field in this list has a non-empty value.
8839	// This may be used to include null fields in Patch requests.
8840	NullFields []string `json:"-"`
8841}
8842
8843func (s *InstancesSetMachineTypeRequest) MarshalJSON() ([]byte, error) {
8844	type noMethod InstancesSetMachineTypeRequest
8845	raw := noMethod(*s)
8846	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8847}
8848
8849type InstancesSetMinCpuPlatformRequest struct {
8850	// MinCpuPlatform: Minimum cpu/platform this instance should be started
8851	// at.
8852	MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
8853
8854	// ForceSendFields is a list of field names (e.g. "MinCpuPlatform") to
8855	// unconditionally include in API requests. By default, fields with
8856	// empty values are omitted from API requests. However, any non-pointer,
8857	// non-interface field appearing in ForceSendFields will be sent to the
8858	// server regardless of whether the field is empty or not. This may be
8859	// used to include empty fields in Patch requests.
8860	ForceSendFields []string `json:"-"`
8861
8862	// NullFields is a list of field names (e.g. "MinCpuPlatform") to
8863	// include in API requests with the JSON null value. By default, fields
8864	// with empty values are omitted from API requests. However, any field
8865	// with an empty value appearing in NullFields will be sent to the
8866	// server as null. It is an error if a field in this list has a
8867	// non-empty value. This may be used to include null fields in Patch
8868	// requests.
8869	NullFields []string `json:"-"`
8870}
8871
8872func (s *InstancesSetMinCpuPlatformRequest) MarshalJSON() ([]byte, error) {
8873	type noMethod InstancesSetMinCpuPlatformRequest
8874	raw := noMethod(*s)
8875	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8876}
8877
8878type InstancesSetServiceAccountRequest struct {
8879	// Email: Email address of the service account.
8880	Email string `json:"email,omitempty"`
8881
8882	// Scopes: The list of scopes to be made available for this service
8883	// account.
8884	Scopes []string `json:"scopes,omitempty"`
8885
8886	// ForceSendFields is a list of field names (e.g. "Email") to
8887	// unconditionally include in API requests. By default, fields with
8888	// empty values are omitted from API requests. However, any non-pointer,
8889	// non-interface field appearing in ForceSendFields will be sent to the
8890	// server regardless of whether the field is empty or not. This may be
8891	// used to include empty fields in Patch requests.
8892	ForceSendFields []string `json:"-"`
8893
8894	// NullFields is a list of field names (e.g. "Email") to include in API
8895	// requests with the JSON null value. By default, fields with empty
8896	// values are omitted from API requests. However, any field with an
8897	// empty value appearing in NullFields will be sent to the server as
8898	// null. It is an error if a field in this list has a non-empty value.
8899	// This may be used to include null fields in Patch requests.
8900	NullFields []string `json:"-"`
8901}
8902
8903func (s *InstancesSetServiceAccountRequest) MarshalJSON() ([]byte, error) {
8904	type noMethod InstancesSetServiceAccountRequest
8905	raw := noMethod(*s)
8906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8907}
8908
8909type InstancesStartWithEncryptionKeyRequest struct {
8910	// Disks: Array of disks associated with this instance that are
8911	// protected with a customer-supplied encryption key.
8912	//
8913	// In order to start the instance, the disk url and its corresponding
8914	// key must be provided.
8915	//
8916	// If the disk is not protected with a customer-supplied encryption key
8917	// it should not be specified.
8918	Disks []*CustomerEncryptionKeyProtectedDisk `json:"disks,omitempty"`
8919
8920	// ForceSendFields is a list of field names (e.g. "Disks") to
8921	// unconditionally include in API requests. By default, fields with
8922	// empty values are omitted from API requests. However, any non-pointer,
8923	// non-interface field appearing in ForceSendFields will be sent to the
8924	// server regardless of whether the field is empty or not. This may be
8925	// used to include empty fields in Patch requests.
8926	ForceSendFields []string `json:"-"`
8927
8928	// NullFields is a list of field names (e.g. "Disks") to include in API
8929	// requests with the JSON null value. By default, fields with empty
8930	// values are omitted from API requests. However, any field with an
8931	// empty value appearing in NullFields will be sent to the server as
8932	// null. It is an error if a field in this list has a non-empty value.
8933	// This may be used to include null fields in Patch requests.
8934	NullFields []string `json:"-"`
8935}
8936
8937func (s *InstancesStartWithEncryptionKeyRequest) MarshalJSON() ([]byte, error) {
8938	type noMethod InstancesStartWithEncryptionKeyRequest
8939	raw := noMethod(*s)
8940	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8941}
8942
8943// Interconnect: Protocol definitions for Mixer API to support
8944// Interconnect. Next available tag: 23
8945type Interconnect struct {
8946	// AdminEnabled: Administrative status of the interconnect. When this is
8947	// set to ?true?, the Interconnect is functional and may carry traffic
8948	// (assuming there are functional InterconnectAttachments and other
8949	// requirements are satisfied). When set to ?false?, no packets will be
8950	// carried over this Interconnect and no BGP routes will be exchanged
8951	// over it. By default, it is set to ?true?.
8952	AdminEnabled bool `json:"adminEnabled,omitempty"`
8953
8954	// CircuitInfos: [Output Only] List of CircuitInfo objects, that
8955	// describe the individual circuits in this LAG.
8956	CircuitInfos []*InterconnectCircuitInfo `json:"circuitInfos,omitempty"`
8957
8958	// ConnectionAuthorization: [Output Only] URL to retrieve the Letter Of
8959	// Authority and Customer Facility Assignment (LOA-CFA) documentation
8960	// relating to this Interconnect. This documentation authorizes the
8961	// facility provider to connect to the specified crossconnect ports.
8962	ConnectionAuthorization string `json:"connectionAuthorization,omitempty"`
8963
8964	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
8965	// format.
8966	CreationTimestamp string `json:"creationTimestamp,omitempty"`
8967
8968	// CustomerName: Customer name, to put in the Letter of Authorization as
8969	// the party authorized to request a crossconnect.
8970	CustomerName string `json:"customerName,omitempty"`
8971
8972	// Description: An optional description of this resource. Provide this
8973	// property when you create the resource.
8974	Description string `json:"description,omitempty"`
8975
8976	// ExpectedOutages: [Output Only] List of outages expected for this
8977	// Interconnect.
8978	ExpectedOutages []*InterconnectOutageNotification `json:"expectedOutages,omitempty"`
8979
8980	// GoogleIpAddress: [Output Only] IP address configured on the Google
8981	// side of the Interconnect link. This can be used only for ping tests.
8982	GoogleIpAddress string `json:"googleIpAddress,omitempty"`
8983
8984	// GoogleReferenceId: [Output Only] Google reference ID; to be used when
8985	// raising support tickets with Google or otherwise to debug backend
8986	// connectivity issues.
8987	GoogleReferenceId string `json:"googleReferenceId,omitempty"`
8988
8989	// Id: [Output Only] The unique identifier for the resource. This
8990	// identifier is defined by the server.
8991	Id uint64 `json:"id,omitempty,string"`
8992
8993	// InterconnectAttachments: [Output Only] A list of the URLs of all
8994	// InterconnectAttachments configured to use this Interconnect.
8995	InterconnectAttachments []string `json:"interconnectAttachments,omitempty"`
8996
8997	// Possible values:
8998	//   "IT_PRIVATE"
8999	InterconnectType string `json:"interconnectType,omitempty"`
9000
9001	// Kind: [Output Only] Type of the resource. Always compute#interconnect
9002	// for interconnects.
9003	Kind string `json:"kind,omitempty"`
9004
9005	// Possible values:
9006	//   "LINK_TYPE_ETHERNET_10G_LR"
9007	LinkType string `json:"linkType,omitempty"`
9008
9009	// Location: URL of the InterconnectLocation object that represents
9010	// where this connection is to be provisioned.
9011	Location string `json:"location,omitempty"`
9012
9013	// Name: Name of the resource. Provided by the client when the resource
9014	// is created. The name must be 1-63 characters long, and comply with
9015	// RFC1035. Specifically, the name must be 1-63 characters long and
9016	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
9017	// the first character must be a lowercase letter, and all following
9018	// characters must be a dash, lowercase letter, or digit, except the
9019	// last character, which cannot be a dash.
9020	Name string `json:"name,omitempty"`
9021
9022	// NocContactEmail: Email address to contact the customer NOC for
9023	// operations and maintenance notifications regarding this Interconnect.
9024	// If specified, this will be used for notifications in addition to all
9025	// other forms described, such as Stackdriver logs alerting and Cloud
9026	// Notifications.
9027	NocContactEmail string `json:"nocContactEmail,omitempty"`
9028
9029	// OperationalStatus: [Output Only] The current status of whether or not
9030	// this Interconnect is functional.
9031	//
9032	// Possible values:
9033	//   "OS_ACTIVE"
9034	//   "OS_UNPROVISIONED"
9035	OperationalStatus string `json:"operationalStatus,omitempty"`
9036
9037	// PeerIpAddress: [Output Only] IP address configured on the customer
9038	// side of the Interconnect link. The customer should configure this IP
9039	// address during turnup when prompted by Google NOC. This can be used
9040	// only for ping tests.
9041	PeerIpAddress string `json:"peerIpAddress,omitempty"`
9042
9043	// ProvisionedLinkCount: [Output Only] Number of links actually
9044	// provisioned in this interconnect.
9045	ProvisionedLinkCount int64 `json:"provisionedLinkCount,omitempty"`
9046
9047	// RequestedLinkCount: Target number of physical links in the link
9048	// bundle, as requested by the customer.
9049	RequestedLinkCount int64 `json:"requestedLinkCount,omitempty"`
9050
9051	// SelfLink: [Output Only] Server-defined URL for the resource.
9052	SelfLink string `json:"selfLink,omitempty"`
9053
9054	// ServerResponse contains the HTTP response code and headers from the
9055	// server.
9056	googleapi.ServerResponse `json:"-"`
9057
9058	// ForceSendFields is a list of field names (e.g. "AdminEnabled") to
9059	// unconditionally include in API requests. By default, fields with
9060	// empty values are omitted from API requests. However, any non-pointer,
9061	// non-interface field appearing in ForceSendFields will be sent to the
9062	// server regardless of whether the field is empty or not. This may be
9063	// used to include empty fields in Patch requests.
9064	ForceSendFields []string `json:"-"`
9065
9066	// NullFields is a list of field names (e.g. "AdminEnabled") to include
9067	// in API requests with the JSON null value. By default, fields with
9068	// empty values are omitted from API requests. However, any field with
9069	// an empty value appearing in NullFields will be sent to the server as
9070	// null. It is an error if a field in this list has a non-empty value.
9071	// This may be used to include null fields in Patch requests.
9072	NullFields []string `json:"-"`
9073}
9074
9075func (s *Interconnect) MarshalJSON() ([]byte, error) {
9076	type noMethod Interconnect
9077	raw := noMethod(*s)
9078	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9079}
9080
9081// InterconnectAttachment: Protocol definitions for Mixer API to support
9082// InterconnectAttachment. Next available tag: 14
9083type InterconnectAttachment struct {
9084	// CloudRouterIpAddress: [Output Only] IPv4 address + prefix length to
9085	// be configured on Cloud Router Interface for this interconnect
9086	// attachment.
9087	CloudRouterIpAddress string `json:"cloudRouterIpAddress,omitempty"`
9088
9089	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
9090	// format.
9091	CreationTimestamp string `json:"creationTimestamp,omitempty"`
9092
9093	// CustomerRouterIpAddress: [Output Only] IPv4 address + prefix length
9094	// to be configured on the customer router subinterface for this
9095	// interconnect attachment.
9096	CustomerRouterIpAddress string `json:"customerRouterIpAddress,omitempty"`
9097
9098	// Description: An optional description of this resource. Provide this
9099	// property when you create the resource.
9100	Description string `json:"description,omitempty"`
9101
9102	// GoogleReferenceId: [Output Only] Google reference ID, to be used when
9103	// raising support tickets with Google or otherwise to debug backend
9104	// connectivity issues.
9105	GoogleReferenceId string `json:"googleReferenceId,omitempty"`
9106
9107	// Id: [Output Only] The unique identifier for the resource. This
9108	// identifier is defined by the server.
9109	Id uint64 `json:"id,omitempty,string"`
9110
9111	// Interconnect: URL of the underlying Interconnect object that this
9112	// attachment's traffic will traverse through.
9113	Interconnect string `json:"interconnect,omitempty"`
9114
9115	// Kind: [Output Only] Type of the resource. Always
9116	// compute#interconnectAttachment for interconnect attachments.
9117	Kind string `json:"kind,omitempty"`
9118
9119	// Name: Name of the resource. Provided by the client when the resource
9120	// is created. The name must be 1-63 characters long, and comply with
9121	// RFC1035. Specifically, the name must be 1-63 characters long and
9122	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
9123	// the first character must be a lowercase letter, and all following
9124	// characters must be a dash, lowercase letter, or digit, except the
9125	// last character, which cannot be a dash.
9126	Name string `json:"name,omitempty"`
9127
9128	// OperationalStatus: [Output Only] The current status of whether or not
9129	// this interconnect attachment is functional.
9130	//
9131	// Possible values:
9132	//   "OS_ACTIVE"
9133	//   "OS_UNPROVISIONED"
9134	OperationalStatus string `json:"operationalStatus,omitempty"`
9135
9136	// PrivateInterconnectInfo: [Output Only] Information specific to a
9137	// Private InterconnectAttachment. Only populated if the interconnect
9138	// that this is attached is of type IT_PRIVATE.
9139	PrivateInterconnectInfo *InterconnectAttachmentPrivateInfo `json:"privateInterconnectInfo,omitempty"`
9140
9141	// Region: [Output Only] URL of the region where the regional
9142	// interconnect attachment resides.
9143	Region string `json:"region,omitempty"`
9144
9145	// Router: URL of the cloud router to be used for dynamic routing. This
9146	// router must be in the same region as this InterconnectAttachment. The
9147	// InterconnectAttachment will automatically connect the Interconnect to
9148	// the network & region within which the Cloud Router is configured.
9149	Router string `json:"router,omitempty"`
9150
9151	// SelfLink: [Output Only] Server-defined URL for the resource.
9152	SelfLink string `json:"selfLink,omitempty"`
9153
9154	// ServerResponse contains the HTTP response code and headers from the
9155	// server.
9156	googleapi.ServerResponse `json:"-"`
9157
9158	// ForceSendFields is a list of field names (e.g.
9159	// "CloudRouterIpAddress") to unconditionally include in API requests.
9160	// By default, fields with empty values are omitted from API requests.
9161	// However, any non-pointer, non-interface field appearing in
9162	// ForceSendFields will be sent to the server regardless of whether the
9163	// field is empty or not. This may be used to include empty fields in
9164	// Patch requests.
9165	ForceSendFields []string `json:"-"`
9166
9167	// NullFields is a list of field names (e.g. "CloudRouterIpAddress") to
9168	// include in API requests with the JSON null value. By default, fields
9169	// with empty values are omitted from API requests. However, any field
9170	// with an empty value appearing in NullFields will be sent to the
9171	// server as null. It is an error if a field in this list has a
9172	// non-empty value. This may be used to include null fields in Patch
9173	// requests.
9174	NullFields []string `json:"-"`
9175}
9176
9177func (s *InterconnectAttachment) MarshalJSON() ([]byte, error) {
9178	type noMethod InterconnectAttachment
9179	raw := noMethod(*s)
9180	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9181}
9182
9183type InterconnectAttachmentAggregatedList struct {
9184	// Id: [Output Only] Unique identifier for the resource; defined by the
9185	// server.
9186	Id string `json:"id,omitempty"`
9187
9188	// Items: A list of InterconnectAttachmentsScopedList resources.
9189	Items map[string]InterconnectAttachmentsScopedList `json:"items,omitempty"`
9190
9191	// Kind: [Output Only] Type of resource. Always
9192	// compute#interconnectAttachmentAggregatedList for aggregated lists of
9193	// interconnect attachments.
9194	Kind string `json:"kind,omitempty"`
9195
9196	// NextPageToken: [Output Only] This token allows you to get the next
9197	// page of results for list requests. If the number of results is larger
9198	// than maxResults, use the nextPageToken as a value for the query
9199	// parameter pageToken in the next list request. Subsequent list
9200	// requests will have their own nextPageToken to continue paging through
9201	// the results.
9202	NextPageToken string `json:"nextPageToken,omitempty"`
9203
9204	// SelfLink: [Output Only] Server-defined URL for this resource.
9205	SelfLink string `json:"selfLink,omitempty"`
9206
9207	// ServerResponse contains the HTTP response code and headers from the
9208	// server.
9209	googleapi.ServerResponse `json:"-"`
9210
9211	// ForceSendFields is a list of field names (e.g. "Id") to
9212	// unconditionally include in API requests. By default, fields with
9213	// empty values are omitted from API requests. However, any non-pointer,
9214	// non-interface field appearing in ForceSendFields will be sent to the
9215	// server regardless of whether the field is empty or not. This may be
9216	// used to include empty fields in Patch requests.
9217	ForceSendFields []string `json:"-"`
9218
9219	// NullFields is a list of field names (e.g. "Id") to include in API
9220	// requests with the JSON null value. By default, fields with empty
9221	// values are omitted from API requests. However, any field with an
9222	// empty value appearing in NullFields will be sent to the server as
9223	// null. It is an error if a field in this list has a non-empty value.
9224	// This may be used to include null fields in Patch requests.
9225	NullFields []string `json:"-"`
9226}
9227
9228func (s *InterconnectAttachmentAggregatedList) MarshalJSON() ([]byte, error) {
9229	type noMethod InterconnectAttachmentAggregatedList
9230	raw := noMethod(*s)
9231	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9232}
9233
9234// InterconnectAttachmentList: Response to the list request, and
9235// contains a list of interconnect attachments.
9236type InterconnectAttachmentList struct {
9237	// Id: [Output Only] Unique identifier for the resource; defined by the
9238	// server.
9239	Id string `json:"id,omitempty"`
9240
9241	// Items: A list of InterconnectAttachment resources.
9242	Items []*InterconnectAttachment `json:"items,omitempty"`
9243
9244	// Kind: [Output Only] Type of resource. Always
9245	// compute#interconnectAttachmentList for lists of interconnect
9246	// attachments.
9247	Kind string `json:"kind,omitempty"`
9248
9249	// NextPageToken: [Output Only] This token allows you to get the next
9250	// page of results for list requests. If the number of results is larger
9251	// than maxResults, use the nextPageToken as a value for the query
9252	// parameter pageToken in the next list request. Subsequent list
9253	// requests will have their own nextPageToken to continue paging through
9254	// the results.
9255	NextPageToken string `json:"nextPageToken,omitempty"`
9256
9257	// SelfLink: [Output Only] Server-defined URL for this resource.
9258	SelfLink string `json:"selfLink,omitempty"`
9259
9260	// ServerResponse contains the HTTP response code and headers from the
9261	// server.
9262	googleapi.ServerResponse `json:"-"`
9263
9264	// ForceSendFields is a list of field names (e.g. "Id") to
9265	// unconditionally include in API requests. By default, fields with
9266	// empty values are omitted from API requests. However, any non-pointer,
9267	// non-interface field appearing in ForceSendFields will be sent to the
9268	// server regardless of whether the field is empty or not. This may be
9269	// used to include empty fields in Patch requests.
9270	ForceSendFields []string `json:"-"`
9271
9272	// NullFields is a list of field names (e.g. "Id") to include in API
9273	// requests with the JSON null value. By default, fields with empty
9274	// values are omitted from API requests. However, any field with an
9275	// empty value appearing in NullFields will be sent to the server as
9276	// null. It is an error if a field in this list has a non-empty value.
9277	// This may be used to include null fields in Patch requests.
9278	NullFields []string `json:"-"`
9279}
9280
9281func (s *InterconnectAttachmentList) MarshalJSON() ([]byte, error) {
9282	type noMethod InterconnectAttachmentList
9283	raw := noMethod(*s)
9284	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9285}
9286
9287// InterconnectAttachmentPrivateInfo: Private information for an
9288// interconnect attachment when this belongs to an interconnect of type
9289// IT_PRIVATE.
9290type InterconnectAttachmentPrivateInfo struct {
9291	// Tag8021q: [Output Only] 802.1q encapsulation tag to be used for
9292	// traffic between Google and the customer, going to and from this
9293	// network and region.
9294	Tag8021q int64 `json:"tag8021q,omitempty"`
9295
9296	// ForceSendFields is a list of field names (e.g. "Tag8021q") to
9297	// unconditionally include in API requests. By default, fields with
9298	// empty values are omitted from API requests. However, any non-pointer,
9299	// non-interface field appearing in ForceSendFields will be sent to the
9300	// server regardless of whether the field is empty or not. This may be
9301	// used to include empty fields in Patch requests.
9302	ForceSendFields []string `json:"-"`
9303
9304	// NullFields is a list of field names (e.g. "Tag8021q") to include in
9305	// API requests with the JSON null value. By default, fields with empty
9306	// values are omitted from API requests. However, any field with an
9307	// empty value appearing in NullFields will be sent to the server as
9308	// null. It is an error if a field in this list has a non-empty value.
9309	// This may be used to include null fields in Patch requests.
9310	NullFields []string `json:"-"`
9311}
9312
9313func (s *InterconnectAttachmentPrivateInfo) MarshalJSON() ([]byte, error) {
9314	type noMethod InterconnectAttachmentPrivateInfo
9315	raw := noMethod(*s)
9316	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9317}
9318
9319type InterconnectAttachmentsScopedList struct {
9320	// InterconnectAttachments: List of interconnect attachments contained
9321	// in this scope.
9322	InterconnectAttachments []*InterconnectAttachment `json:"interconnectAttachments,omitempty"`
9323
9324	// Warning: Informational warning which replaces the list of addresses
9325	// when the list is empty.
9326	Warning *InterconnectAttachmentsScopedListWarning `json:"warning,omitempty"`
9327
9328	// ForceSendFields is a list of field names (e.g.
9329	// "InterconnectAttachments") to unconditionally include in API
9330	// requests. By default, fields with empty values are omitted from API
9331	// requests. However, any non-pointer, non-interface field appearing in
9332	// ForceSendFields will be sent to the server regardless of whether the
9333	// field is empty or not. This may be used to include empty fields in
9334	// Patch requests.
9335	ForceSendFields []string `json:"-"`
9336
9337	// NullFields is a list of field names (e.g. "InterconnectAttachments")
9338	// to include in API requests with the JSON null value. By default,
9339	// fields with empty values are omitted from API requests. However, any
9340	// field with an empty value appearing in NullFields will be sent to the
9341	// server as null. It is an error if a field in this list has a
9342	// non-empty value. This may be used to include null fields in Patch
9343	// requests.
9344	NullFields []string `json:"-"`
9345}
9346
9347func (s *InterconnectAttachmentsScopedList) MarshalJSON() ([]byte, error) {
9348	type noMethod InterconnectAttachmentsScopedList
9349	raw := noMethod(*s)
9350	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9351}
9352
9353// InterconnectAttachmentsScopedListWarning: Informational warning which
9354// replaces the list of addresses when the list is empty.
9355type InterconnectAttachmentsScopedListWarning struct {
9356	// Code: [Output Only] A warning code, if applicable. For example,
9357	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
9358	// the response.
9359	//
9360	// Possible values:
9361	//   "CLEANUP_FAILED"
9362	//   "DEPRECATED_RESOURCE_USED"
9363	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
9364	//   "FIELD_VALUE_OVERRIDEN"
9365	//   "INJECTED_KERNELS_DEPRECATED"
9366	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
9367	//   "NEXT_HOP_CANNOT_IP_FORWARD"
9368	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
9369	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
9370	//   "NEXT_HOP_NOT_RUNNING"
9371	//   "NOT_CRITICAL_ERROR"
9372	//   "NO_RESULTS_ON_PAGE"
9373	//   "REQUIRED_TOS_AGREEMENT"
9374	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
9375	//   "RESOURCE_NOT_DELETED"
9376	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
9377	//   "UNREACHABLE"
9378	Code string `json:"code,omitempty"`
9379
9380	// Data: [Output Only] Metadata about this warning in key: value format.
9381	// For example:
9382	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
9383	Data []*InterconnectAttachmentsScopedListWarningData `json:"data,omitempty"`
9384
9385	// Message: [Output Only] A human-readable description of the warning
9386	// code.
9387	Message string `json:"message,omitempty"`
9388
9389	// ForceSendFields is a list of field names (e.g. "Code") to
9390	// unconditionally include in API requests. By default, fields with
9391	// empty values are omitted from API requests. However, any non-pointer,
9392	// non-interface field appearing in ForceSendFields will be sent to the
9393	// server regardless of whether the field is empty or not. This may be
9394	// used to include empty fields in Patch requests.
9395	ForceSendFields []string `json:"-"`
9396
9397	// NullFields is a list of field names (e.g. "Code") to include in API
9398	// requests with the JSON null value. By default, fields with empty
9399	// values are omitted from API requests. However, any field with an
9400	// empty value appearing in NullFields will be sent to the server as
9401	// null. It is an error if a field in this list has a non-empty value.
9402	// This may be used to include null fields in Patch requests.
9403	NullFields []string `json:"-"`
9404}
9405
9406func (s *InterconnectAttachmentsScopedListWarning) MarshalJSON() ([]byte, error) {
9407	type noMethod InterconnectAttachmentsScopedListWarning
9408	raw := noMethod(*s)
9409	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9410}
9411
9412type InterconnectAttachmentsScopedListWarningData struct {
9413	// Key: [Output Only] A key that provides more detail on the warning
9414	// being returned. For example, for warnings where there are no results
9415	// in a list request for a particular zone, this key might be scope and
9416	// the key value might be the zone name. Other examples might be a key
9417	// indicating a deprecated resource and a suggested replacement, or a
9418	// warning about invalid network settings (for example, if an instance
9419	// attempts to perform IP forwarding but is not enabled for IP
9420	// forwarding).
9421	Key string `json:"key,omitempty"`
9422
9423	// Value: [Output Only] A warning data value corresponding to the key.
9424	Value string `json:"value,omitempty"`
9425
9426	// ForceSendFields is a list of field names (e.g. "Key") to
9427	// unconditionally include in API requests. By default, fields with
9428	// empty values are omitted from API requests. However, any non-pointer,
9429	// non-interface field appearing in ForceSendFields will be sent to the
9430	// server regardless of whether the field is empty or not. This may be
9431	// used to include empty fields in Patch requests.
9432	ForceSendFields []string `json:"-"`
9433
9434	// NullFields is a list of field names (e.g. "Key") to include in API
9435	// requests with the JSON null value. By default, fields with empty
9436	// values are omitted from API requests. However, any field with an
9437	// empty value appearing in NullFields will be sent to the server as
9438	// null. It is an error if a field in this list has a non-empty value.
9439	// This may be used to include null fields in Patch requests.
9440	NullFields []string `json:"-"`
9441}
9442
9443func (s *InterconnectAttachmentsScopedListWarningData) MarshalJSON() ([]byte, error) {
9444	type noMethod InterconnectAttachmentsScopedListWarningData
9445	raw := noMethod(*s)
9446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9447}
9448
9449// InterconnectCircuitInfo: Describes a single physical circuit between
9450// the Customer and Google. CircuitInfo objects are created by Google,
9451// so all fields are output only. Next id: 4
9452type InterconnectCircuitInfo struct {
9453	// CustomerDemarcId: Customer-side demarc ID for this circuit. This will
9454	// only be set if it was provided by the Customer to Google during
9455	// circuit turn-up.
9456	CustomerDemarcId string `json:"customerDemarcId,omitempty"`
9457
9458	// GoogleCircuitId: Google-assigned unique ID for this circuit. Assigned
9459	// at circuit turn-up.
9460	GoogleCircuitId string `json:"googleCircuitId,omitempty"`
9461
9462	// GoogleDemarcId: Google-side demarc ID for this circuit. Assigned at
9463	// circuit turn-up and provided by Google to the customer in the LOA.
9464	GoogleDemarcId string `json:"googleDemarcId,omitempty"`
9465
9466	// ForceSendFields is a list of field names (e.g. "CustomerDemarcId") to
9467	// unconditionally include in API requests. By default, fields with
9468	// empty values are omitted from API requests. However, any non-pointer,
9469	// non-interface field appearing in ForceSendFields will be sent to the
9470	// server regardless of whether the field is empty or not. This may be
9471	// used to include empty fields in Patch requests.
9472	ForceSendFields []string `json:"-"`
9473
9474	// NullFields is a list of field names (e.g. "CustomerDemarcId") to
9475	// include in API requests with the JSON null value. By default, fields
9476	// with empty values are omitted from API requests. However, any field
9477	// with an empty value appearing in NullFields will be sent to the
9478	// server as null. It is an error if a field in this list has a
9479	// non-empty value. This may be used to include null fields in Patch
9480	// requests.
9481	NullFields []string `json:"-"`
9482}
9483
9484func (s *InterconnectCircuitInfo) MarshalJSON() ([]byte, error) {
9485	type noMethod InterconnectCircuitInfo
9486	raw := noMethod(*s)
9487	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9488}
9489
9490// InterconnectList: Response to the list request, and contains a list
9491// of interconnects.
9492type InterconnectList struct {
9493	// Id: [Output Only] Unique identifier for the resource; defined by the
9494	// server.
9495	Id string `json:"id,omitempty"`
9496
9497	// Items: A list of Interconnect resources.
9498	Items []*Interconnect `json:"items,omitempty"`
9499
9500	// Kind: [Output Only] Type of resource. Always compute#interconnectList
9501	// for lists of interconnects.
9502	Kind string `json:"kind,omitempty"`
9503
9504	// NextPageToken: [Output Only] This token allows you to get the next
9505	// page of results for list requests. If the number of results is larger
9506	// than maxResults, use the nextPageToken as a value for the query
9507	// parameter pageToken in the next list request. Subsequent list
9508	// requests will have their own nextPageToken to continue paging through
9509	// the results.
9510	NextPageToken string `json:"nextPageToken,omitempty"`
9511
9512	// SelfLink: [Output Only] Server-defined URL for this resource.
9513	SelfLink string `json:"selfLink,omitempty"`
9514
9515	// ServerResponse contains the HTTP response code and headers from the
9516	// server.
9517	googleapi.ServerResponse `json:"-"`
9518
9519	// ForceSendFields is a list of field names (e.g. "Id") to
9520	// unconditionally include in API requests. By default, fields with
9521	// empty values are omitted from API requests. However, any non-pointer,
9522	// non-interface field appearing in ForceSendFields will be sent to the
9523	// server regardless of whether the field is empty or not. This may be
9524	// used to include empty fields in Patch requests.
9525	ForceSendFields []string `json:"-"`
9526
9527	// NullFields is a list of field names (e.g. "Id") to include in API
9528	// requests with the JSON null value. By default, fields with empty
9529	// values are omitted from API requests. However, any field with an
9530	// empty value appearing in NullFields will be sent to the server as
9531	// null. It is an error if a field in this list has a non-empty value.
9532	// This may be used to include null fields in Patch requests.
9533	NullFields []string `json:"-"`
9534}
9535
9536func (s *InterconnectList) MarshalJSON() ([]byte, error) {
9537	type noMethod InterconnectList
9538	raw := noMethod(*s)
9539	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9540}
9541
9542// InterconnectLocation: Protocol definitions for Mixer API to support
9543// InterconnectLocation.
9544type InterconnectLocation struct {
9545	// Address: [Output Only] The postal address of the Point of Presence,
9546	// each line in the address is separated by a newline character.
9547	Address string `json:"address,omitempty"`
9548
9549	// AvailabilityZone: Availability zone for this location. Within a city,
9550	// maintenance will not be simultaneously scheduled in more than one
9551	// availability zone. Example: "zone1" or "zone2".
9552	AvailabilityZone string `json:"availabilityZone,omitempty"`
9553
9554	// City: City designator used by the Interconnect UI to locate this
9555	// InterconnectLocation within the Continent. For example: "Chicago,
9556	// IL", "Amsterdam, Netherlands".
9557	City string `json:"city,omitempty"`
9558
9559	// Continent: Continent for this location. Used by the location picker
9560	// in the Interconnect UI.
9561	//
9562	// Possible values:
9563	//   "C_AFRICA"
9564	//   "C_ASIA_PAC"
9565	//   "C_EUROPE"
9566	//   "C_NORTH_AMERICA"
9567	//   "C_SOUTH_AMERICA"
9568	Continent string `json:"continent,omitempty"`
9569
9570	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
9571	// format.
9572	CreationTimestamp string `json:"creationTimestamp,omitempty"`
9573
9574	// Description: [Output Only] An optional description of the resource.
9575	Description string `json:"description,omitempty"`
9576
9577	// FacilityProvider: [Output Only] The name of the provider for this
9578	// facility (e.g., EQUINIX).
9579	FacilityProvider string `json:"facilityProvider,omitempty"`
9580
9581	// FacilityProviderFacilityId: [Output Only] A provider-assigned
9582	// Identifier for this facility (e.g., Ashburn-DC1).
9583	FacilityProviderFacilityId string `json:"facilityProviderFacilityId,omitempty"`
9584
9585	// Id: [Output Only] The unique identifier for the resource. This
9586	// identifier is defined by the server.
9587	Id uint64 `json:"id,omitempty,string"`
9588
9589	// Kind: [Output Only] Type of the resource. Always
9590	// compute#interconnectLocation for interconnect locations.
9591	Kind string `json:"kind,omitempty"`
9592
9593	// Name: [Output Only] Name of the resource.
9594	Name string `json:"name,omitempty"`
9595
9596	// PeeringdbFacilityId: [Output Only] The peeringdb identifier for this
9597	// facility (corresponding with a netfac type in peeringdb).
9598	PeeringdbFacilityId string `json:"peeringdbFacilityId,omitempty"`
9599
9600	// RegionInfos: [Output Only] A list of InterconnectLocation.RegionInfo
9601	// objects, that describe parameters pertaining to the relation between
9602	// this InterconnectLocation and various Google Cloud regions.
9603	RegionInfos []*InterconnectLocationRegionInfo `json:"regionInfos,omitempty"`
9604
9605	// SelfLink: [Output Only] Server-defined URL for the resource.
9606	SelfLink string `json:"selfLink,omitempty"`
9607
9608	// ServerResponse contains the HTTP response code and headers from the
9609	// server.
9610	googleapi.ServerResponse `json:"-"`
9611
9612	// ForceSendFields is a list of field names (e.g. "Address") to
9613	// unconditionally include in API requests. By default, fields with
9614	// empty values are omitted from API requests. However, any non-pointer,
9615	// non-interface field appearing in ForceSendFields will be sent to the
9616	// server regardless of whether the field is empty or not. This may be
9617	// used to include empty fields in Patch requests.
9618	ForceSendFields []string `json:"-"`
9619
9620	// NullFields is a list of field names (e.g. "Address") to include in
9621	// API requests with the JSON null value. By default, fields with empty
9622	// values are omitted from API requests. However, any field with an
9623	// empty value appearing in NullFields will be sent to the server as
9624	// null. It is an error if a field in this list has a non-empty value.
9625	// This may be used to include null fields in Patch requests.
9626	NullFields []string `json:"-"`
9627}
9628
9629func (s *InterconnectLocation) MarshalJSON() ([]byte, error) {
9630	type noMethod InterconnectLocation
9631	raw := noMethod(*s)
9632	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9633}
9634
9635// InterconnectLocationList: Response to the list request, and contains
9636// a list of interconnect locations.
9637type InterconnectLocationList struct {
9638	// Id: [Output Only] Unique identifier for the resource; defined by the
9639	// server.
9640	Id string `json:"id,omitempty"`
9641
9642	// Items: A list of InterconnectLocation resources.
9643	Items []*InterconnectLocation `json:"items,omitempty"`
9644
9645	// Kind: [Output Only] Type of resource. Always
9646	// compute#interconnectLocationList for lists of interconnect locations.
9647	Kind string `json:"kind,omitempty"`
9648
9649	// NextPageToken: [Output Only] This token allows you to get the next
9650	// page of results for list requests. If the number of results is larger
9651	// than maxResults, use the nextPageToken as a value for the query
9652	// parameter pageToken in the next list request. Subsequent list
9653	// requests will have their own nextPageToken to continue paging through
9654	// the results.
9655	NextPageToken string `json:"nextPageToken,omitempty"`
9656
9657	// SelfLink: [Output Only] Server-defined URL for this resource.
9658	SelfLink string `json:"selfLink,omitempty"`
9659
9660	// ServerResponse contains the HTTP response code and headers from the
9661	// server.
9662	googleapi.ServerResponse `json:"-"`
9663
9664	// ForceSendFields is a list of field names (e.g. "Id") to
9665	// unconditionally include in API requests. By default, fields with
9666	// empty values are omitted from API requests. However, any non-pointer,
9667	// non-interface field appearing in ForceSendFields will be sent to the
9668	// server regardless of whether the field is empty or not. This may be
9669	// used to include empty fields in Patch requests.
9670	ForceSendFields []string `json:"-"`
9671
9672	// NullFields is a list of field names (e.g. "Id") to include in API
9673	// requests with the JSON null value. By default, fields with empty
9674	// values are omitted from API requests. However, any field with an
9675	// empty value appearing in NullFields will be sent to the server as
9676	// null. It is an error if a field in this list has a non-empty value.
9677	// This may be used to include null fields in Patch requests.
9678	NullFields []string `json:"-"`
9679}
9680
9681func (s *InterconnectLocationList) MarshalJSON() ([]byte, error) {
9682	type noMethod InterconnectLocationList
9683	raw := noMethod(*s)
9684	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9685}
9686
9687// InterconnectLocationRegionInfo: Information about any potential
9688// InterconnectAttachments between an Interconnect at a specific
9689// InterconnectLocation, and a specific Cloud Region.
9690type InterconnectLocationRegionInfo struct {
9691	// ExpectedRttMs: Expected round-trip time in milliseconds, from this
9692	// InterconnectLocation to a VM in this region.
9693	ExpectedRttMs int64 `json:"expectedRttMs,omitempty,string"`
9694
9695	// LocationPresence: Identifies the network presence of this location.
9696	//
9697	// Possible values:
9698	//   "LP_GLOBAL"
9699	//   "LP_LOCAL_REGION"
9700	LocationPresence string `json:"locationPresence,omitempty"`
9701
9702	// Region: URL for the region of this location.
9703	Region string `json:"region,omitempty"`
9704
9705	// RegionKey: Scope key for the region of this location.
9706	RegionKey string `json:"regionKey,omitempty"`
9707
9708	// ForceSendFields is a list of field names (e.g. "ExpectedRttMs") to
9709	// unconditionally include in API requests. By default, fields with
9710	// empty values are omitted from API requests. However, any non-pointer,
9711	// non-interface field appearing in ForceSendFields will be sent to the
9712	// server regardless of whether the field is empty or not. This may be
9713	// used to include empty fields in Patch requests.
9714	ForceSendFields []string `json:"-"`
9715
9716	// NullFields is a list of field names (e.g. "ExpectedRttMs") to include
9717	// in API requests with the JSON null value. By default, fields with
9718	// empty values are omitted from API requests. However, any field with
9719	// an empty value appearing in NullFields will be sent to the server as
9720	// null. It is an error if a field in this list has a non-empty value.
9721	// This may be used to include null fields in Patch requests.
9722	NullFields []string `json:"-"`
9723}
9724
9725func (s *InterconnectLocationRegionInfo) MarshalJSON() ([]byte, error) {
9726	type noMethod InterconnectLocationRegionInfo
9727	raw := noMethod(*s)
9728	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9729}
9730
9731// InterconnectOutageNotification: Description of a planned outage on
9732// this Interconnect. Next id: 9
9733type InterconnectOutageNotification struct {
9734	// AffectedCircuits: Iff issue_type is IT_PARTIAL_OUTAGE, a list of the
9735	// Google-side circuit IDs that will be affected.
9736	AffectedCircuits []string `json:"affectedCircuits,omitempty"`
9737
9738	// Description: Short user-visible description of the purpose of the
9739	// outage.
9740	Description string `json:"description,omitempty"`
9741
9742	EndTime int64 `json:"endTime,omitempty,string"`
9743
9744	// Possible values:
9745	//   "IT_OUTAGE"
9746	//   "IT_PARTIAL_OUTAGE"
9747	IssueType string `json:"issueType,omitempty"`
9748
9749	// Name: Unique identifier for this outage notification.
9750	Name string `json:"name,omitempty"`
9751
9752	// Possible values:
9753	//   "NSRC_GOOGLE"
9754	Source string `json:"source,omitempty"`
9755
9756	// StartTime: Scheduled start and end times for the outage (milliseconds
9757	// since Unix epoch).
9758	StartTime int64 `json:"startTime,omitempty,string"`
9759
9760	// Possible values:
9761	//   "NS_ACTIVE"
9762	//   "NS_CANCELED"
9763	State string `json:"state,omitempty"`
9764
9765	// ForceSendFields is a list of field names (e.g. "AffectedCircuits") to
9766	// unconditionally include in API requests. By default, fields with
9767	// empty values are omitted from API requests. However, any non-pointer,
9768	// non-interface field appearing in ForceSendFields will be sent to the
9769	// server regardless of whether the field is empty or not. This may be
9770	// used to include empty fields in Patch requests.
9771	ForceSendFields []string `json:"-"`
9772
9773	// NullFields is a list of field names (e.g. "AffectedCircuits") to
9774	// include in API requests with the JSON null value. By default, fields
9775	// with empty values are omitted from API requests. However, any field
9776	// with an empty value appearing in NullFields will be sent to the
9777	// server as null. It is an error if a field in this list has a
9778	// non-empty value. This may be used to include null fields in Patch
9779	// requests.
9780	NullFields []string `json:"-"`
9781}
9782
9783func (s *InterconnectOutageNotification) MarshalJSON() ([]byte, error) {
9784	type noMethod InterconnectOutageNotification
9785	raw := noMethod(*s)
9786	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9787}
9788
9789// License: A license resource.
9790type License struct {
9791	// ChargesUseFee: [Output Only] Deprecated. This field no longer
9792	// reflects whether a license charges a usage fee.
9793	ChargesUseFee bool `json:"chargesUseFee,omitempty"`
9794
9795	// Kind: [Output Only] Type of resource. Always compute#license for
9796	// licenses.
9797	Kind string `json:"kind,omitempty"`
9798
9799	// Name: [Output Only] Name of the resource. The name is 1-63 characters
9800	// long and complies with RFC1035.
9801	Name string `json:"name,omitempty"`
9802
9803	// SelfLink: [Output Only] Server-defined URL for the resource.
9804	SelfLink string `json:"selfLink,omitempty"`
9805
9806	// ServerResponse contains the HTTP response code and headers from the
9807	// server.
9808	googleapi.ServerResponse `json:"-"`
9809
9810	// ForceSendFields is a list of field names (e.g. "ChargesUseFee") to
9811	// unconditionally include in API requests. By default, fields with
9812	// empty values are omitted from API requests. However, any non-pointer,
9813	// non-interface field appearing in ForceSendFields will be sent to the
9814	// server regardless of whether the field is empty or not. This may be
9815	// used to include empty fields in Patch requests.
9816	ForceSendFields []string `json:"-"`
9817
9818	// NullFields is a list of field names (e.g. "ChargesUseFee") to include
9819	// in API requests with the JSON null value. By default, fields with
9820	// empty values are omitted from API requests. However, any field with
9821	// an empty value appearing in NullFields will be sent to the server as
9822	// null. It is an error if a field in this list has a non-empty value.
9823	// This may be used to include null fields in Patch requests.
9824	NullFields []string `json:"-"`
9825}
9826
9827func (s *License) MarshalJSON() ([]byte, error) {
9828	type noMethod License
9829	raw := noMethod(*s)
9830	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9831}
9832
9833// LogConfig: Specifies what kind of log the caller must write
9834type LogConfig struct {
9835	// CloudAudit: Cloud audit options.
9836	CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"`
9837
9838	// Counter: Counter options.
9839	Counter *LogConfigCounterOptions `json:"counter,omitempty"`
9840
9841	// DataAccess: Data access options.
9842	DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"`
9843
9844	// ForceSendFields is a list of field names (e.g. "CloudAudit") to
9845	// unconditionally include in API requests. By default, fields with
9846	// empty values are omitted from API requests. However, any non-pointer,
9847	// non-interface field appearing in ForceSendFields will be sent to the
9848	// server regardless of whether the field is empty or not. This may be
9849	// used to include empty fields in Patch requests.
9850	ForceSendFields []string `json:"-"`
9851
9852	// NullFields is a list of field names (e.g. "CloudAudit") to include in
9853	// API requests with the JSON null value. By default, fields with empty
9854	// values are omitted from API requests. However, any field with an
9855	// empty value appearing in NullFields will be sent to the server as
9856	// null. It is an error if a field in this list has a non-empty value.
9857	// This may be used to include null fields in Patch requests.
9858	NullFields []string `json:"-"`
9859}
9860
9861func (s *LogConfig) MarshalJSON() ([]byte, error) {
9862	type noMethod LogConfig
9863	raw := noMethod(*s)
9864	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9865}
9866
9867// LogConfigCloudAuditOptions: Write a Cloud Audit log
9868type LogConfigCloudAuditOptions struct {
9869	// AuthorizationLoggingOptions: Information used by the Cloud Audit
9870	// Logging pipeline.
9871	AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"`
9872
9873	// LogName: The log_name to populate in the Cloud Audit Record.
9874	//
9875	// Possible values:
9876	//   "ADMIN_ACTIVITY"
9877	//   "DATA_ACCESS"
9878	//   "UNSPECIFIED_LOG_NAME"
9879	LogName string `json:"logName,omitempty"`
9880
9881	// ForceSendFields is a list of field names (e.g.
9882	// "AuthorizationLoggingOptions") to unconditionally include in API
9883	// requests. By default, fields with empty values are omitted from API
9884	// requests. However, any non-pointer, non-interface field appearing in
9885	// ForceSendFields will be sent to the server regardless of whether the
9886	// field is empty or not. This may be used to include empty fields in
9887	// Patch requests.
9888	ForceSendFields []string `json:"-"`
9889
9890	// NullFields is a list of field names (e.g.
9891	// "AuthorizationLoggingOptions") to include in API requests with the
9892	// JSON null value. By default, fields with empty values are omitted
9893	// from API requests. However, any field with an empty value appearing
9894	// in NullFields will be sent to the server as null. It is an error if a
9895	// field in this list has a non-empty value. This may be used to include
9896	// null fields in Patch requests.
9897	NullFields []string `json:"-"`
9898}
9899
9900func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) {
9901	type noMethod LogConfigCloudAuditOptions
9902	raw := noMethod(*s)
9903	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9904}
9905
9906// LogConfigCounterOptions: Increment a streamz counter with the
9907// specified metric and field names.
9908//
9909// Metric names should start with a '/', generally be lowercase-only,
9910// and end in "_count". Field names should not contain an initial slash.
9911// The actual exported metric names will have "/iam/policy"
9912// prepended.
9913//
9914// Field names correspond to IAM request parameters and field values are
9915// their respective values.
9916//
9917// At present the only supported field names are - "iam_principal",
9918// corresponding to IAMContext.principal; - "" (empty string), resulting
9919// in one aggretated counter with no field.
9920//
9921// Examples: counter { metric: "/debug_access_count" field:
9922// "iam_principal" } ==> increment counter
9923// /iam/policy/backend_debug_access_count {iam_principal=[value of
9924// IAMContext.principal]}
9925//
9926// At this time we do not support: * multiple field names (though this
9927// may be supported in the future) * decrementing the counter *
9928// incrementing it by anything other than 1
9929type LogConfigCounterOptions struct {
9930	// Field: The field value to attribute.
9931	Field string `json:"field,omitempty"`
9932
9933	// Metric: The metric to update.
9934	Metric string `json:"metric,omitempty"`
9935
9936	// ForceSendFields is a list of field names (e.g. "Field") to
9937	// unconditionally include in API requests. By default, fields with
9938	// empty values are omitted from API requests. However, any non-pointer,
9939	// non-interface field appearing in ForceSendFields will be sent to the
9940	// server regardless of whether the field is empty or not. This may be
9941	// used to include empty fields in Patch requests.
9942	ForceSendFields []string `json:"-"`
9943
9944	// NullFields is a list of field names (e.g. "Field") to include in API
9945	// requests with the JSON null value. By default, fields with empty
9946	// values are omitted from API requests. However, any field with an
9947	// empty value appearing in NullFields will be sent to the server as
9948	// null. It is an error if a field in this list has a non-empty value.
9949	// This may be used to include null fields in Patch requests.
9950	NullFields []string `json:"-"`
9951}
9952
9953func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) {
9954	type noMethod LogConfigCounterOptions
9955	raw := noMethod(*s)
9956	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9957}
9958
9959// LogConfigDataAccessOptions: Write a Data Access (Gin) log
9960type LogConfigDataAccessOptions struct {
9961	// LogMode: Whether Gin logging should happen in a fail-closed manner at
9962	// the caller. This is relevant only in the LocalIAM implementation, for
9963	// now.
9964	//
9965	// Possible values:
9966	//   "LOG_FAIL_CLOSED"
9967	//   "LOG_MODE_UNSPECIFIED"
9968	LogMode string `json:"logMode,omitempty"`
9969
9970	// ForceSendFields is a list of field names (e.g. "LogMode") to
9971	// unconditionally include in API requests. By default, fields with
9972	// empty values are omitted from API requests. However, any non-pointer,
9973	// non-interface field appearing in ForceSendFields will be sent to the
9974	// server regardless of whether the field is empty or not. This may be
9975	// used to include empty fields in Patch requests.
9976	ForceSendFields []string `json:"-"`
9977
9978	// NullFields is a list of field names (e.g. "LogMode") to include in
9979	// API requests with the JSON null value. By default, fields with empty
9980	// values are omitted from API requests. However, any field with an
9981	// empty value appearing in NullFields will be sent to the server as
9982	// null. It is an error if a field in this list has a non-empty value.
9983	// This may be used to include null fields in Patch requests.
9984	NullFields []string `json:"-"`
9985}
9986
9987func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) {
9988	type noMethod LogConfigDataAccessOptions
9989	raw := noMethod(*s)
9990	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9991}
9992
9993// MachineType: A Machine Type resource.
9994type MachineType struct {
9995	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
9996	// format.
9997	CreationTimestamp string `json:"creationTimestamp,omitempty"`
9998
9999	// Deprecated: [Output Only] The deprecation status associated with this
10000	// machine type.
10001	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
10002
10003	// Description: [Output Only] An optional textual description of the
10004	// resource.
10005	Description string `json:"description,omitempty"`
10006
10007	// GuestCpus: [Output Only] The number of virtual CPUs that are
10008	// available to the instance.
10009	GuestCpus int64 `json:"guestCpus,omitempty"`
10010
10011	// Id: [Output Only] The unique identifier for the resource. This
10012	// identifier is defined by the server.
10013	Id uint64 `json:"id,omitempty,string"`
10014
10015	// IsSharedCpu: [Output Only] Whether this machine type has a shared
10016	// CPU. See Shared-core machine types for more information.
10017	IsSharedCpu bool `json:"isSharedCpu,omitempty"`
10018
10019	// Kind: [Output Only] The type of the resource. Always
10020	// compute#machineType for machine types.
10021	Kind string `json:"kind,omitempty"`
10022
10023	// MaximumPersistentDisks: [Output Only] Maximum persistent disks
10024	// allowed.
10025	MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"`
10026
10027	// MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent
10028	// disks size (GB) allowed.
10029	MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"`
10030
10031	// MemoryMb: [Output Only] The amount of physical memory available to
10032	// the instance, defined in MB.
10033	MemoryMb int64 `json:"memoryMb,omitempty"`
10034
10035	// Name: [Output Only] Name of the resource.
10036	Name string `json:"name,omitempty"`
10037
10038	// SelfLink: [Output Only] Server-defined URL for the resource.
10039	SelfLink string `json:"selfLink,omitempty"`
10040
10041	// Zone: [Output Only] The name of the zone where the machine type
10042	// resides, such as us-central1-a.
10043	Zone string `json:"zone,omitempty"`
10044
10045	// ServerResponse contains the HTTP response code and headers from the
10046	// server.
10047	googleapi.ServerResponse `json:"-"`
10048
10049	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
10050	// to unconditionally include in API requests. By default, fields with
10051	// empty values are omitted from API requests. However, any non-pointer,
10052	// non-interface field appearing in ForceSendFields will be sent to the
10053	// server regardless of whether the field is empty or not. This may be
10054	// used to include empty fields in Patch requests.
10055	ForceSendFields []string `json:"-"`
10056
10057	// NullFields is a list of field names (e.g. "CreationTimestamp") to
10058	// include in API requests with the JSON null value. By default, fields
10059	// with empty values are omitted from API requests. However, any field
10060	// with an empty value appearing in NullFields will be sent to the
10061	// server as null. It is an error if a field in this list has a
10062	// non-empty value. This may be used to include null fields in Patch
10063	// requests.
10064	NullFields []string `json:"-"`
10065}
10066
10067func (s *MachineType) MarshalJSON() ([]byte, error) {
10068	type noMethod MachineType
10069	raw := noMethod(*s)
10070	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10071}
10072
10073type MachineTypeAggregatedList struct {
10074	// Id: [Output Only] Unique identifier for the resource; defined by the
10075	// server.
10076	Id string `json:"id,omitempty"`
10077
10078	// Items: A list of MachineTypesScopedList resources.
10079	Items map[string]MachineTypesScopedList `json:"items,omitempty"`
10080
10081	// Kind: [Output Only] Type of resource. Always
10082	// compute#machineTypeAggregatedList for aggregated lists of machine
10083	// types.
10084	Kind string `json:"kind,omitempty"`
10085
10086	// NextPageToken: [Output Only] This token allows you to get the next
10087	// page of results for list requests. If the number of results is larger
10088	// than maxResults, use the nextPageToken as a value for the query
10089	// parameter pageToken in the next list request. Subsequent list
10090	// requests will have their own nextPageToken to continue paging through
10091	// the results.
10092	NextPageToken string `json:"nextPageToken,omitempty"`
10093
10094	// SelfLink: [Output Only] Server-defined URL for this resource.
10095	SelfLink string `json:"selfLink,omitempty"`
10096
10097	// ServerResponse contains the HTTP response code and headers from the
10098	// server.
10099	googleapi.ServerResponse `json:"-"`
10100
10101	// ForceSendFields is a list of field names (e.g. "Id") to
10102	// unconditionally include in API requests. By default, fields with
10103	// empty values are omitted from API requests. However, any non-pointer,
10104	// non-interface field appearing in ForceSendFields will be sent to the
10105	// server regardless of whether the field is empty or not. This may be
10106	// used to include empty fields in Patch requests.
10107	ForceSendFields []string `json:"-"`
10108
10109	// NullFields is a list of field names (e.g. "Id") to include in API
10110	// requests with the JSON null value. By default, fields with empty
10111	// values are omitted from API requests. However, any field with an
10112	// empty value appearing in NullFields will be sent to the server as
10113	// null. It is an error if a field in this list has a non-empty value.
10114	// This may be used to include null fields in Patch requests.
10115	NullFields []string `json:"-"`
10116}
10117
10118func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) {
10119	type noMethod MachineTypeAggregatedList
10120	raw := noMethod(*s)
10121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10122}
10123
10124// MachineTypeList: Contains a list of machine types.
10125type MachineTypeList struct {
10126	// Id: [Output Only] Unique identifier for the resource; defined by the
10127	// server.
10128	Id string `json:"id,omitempty"`
10129
10130	// Items: A list of MachineType resources.
10131	Items []*MachineType `json:"items,omitempty"`
10132
10133	// Kind: [Output Only] Type of resource. Always compute#machineTypeList
10134	// for lists of machine types.
10135	Kind string `json:"kind,omitempty"`
10136
10137	// NextPageToken: [Output Only] This token allows you to get the next
10138	// page of results for list requests. If the number of results is larger
10139	// than maxResults, use the nextPageToken as a value for the query
10140	// parameter pageToken in the next list request. Subsequent list
10141	// requests will have their own nextPageToken to continue paging through
10142	// the results.
10143	NextPageToken string `json:"nextPageToken,omitempty"`
10144
10145	// SelfLink: [Output Only] Server-defined URL for this resource.
10146	SelfLink string `json:"selfLink,omitempty"`
10147
10148	// ServerResponse contains the HTTP response code and headers from the
10149	// server.
10150	googleapi.ServerResponse `json:"-"`
10151
10152	// ForceSendFields is a list of field names (e.g. "Id") to
10153	// unconditionally include in API requests. By default, fields with
10154	// empty values are omitted from API requests. However, any non-pointer,
10155	// non-interface field appearing in ForceSendFields will be sent to the
10156	// server regardless of whether the field is empty or not. This may be
10157	// used to include empty fields in Patch requests.
10158	ForceSendFields []string `json:"-"`
10159
10160	// NullFields is a list of field names (e.g. "Id") to include in API
10161	// requests with the JSON null value. By default, fields with empty
10162	// values are omitted from API requests. However, any field with an
10163	// empty value appearing in NullFields will be sent to the server as
10164	// null. It is an error if a field in this list has a non-empty value.
10165	// This may be used to include null fields in Patch requests.
10166	NullFields []string `json:"-"`
10167}
10168
10169func (s *MachineTypeList) MarshalJSON() ([]byte, error) {
10170	type noMethod MachineTypeList
10171	raw := noMethod(*s)
10172	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10173}
10174
10175type MachineTypesScopedList struct {
10176	// MachineTypes: [Output Only] List of machine types contained in this
10177	// scope.
10178	MachineTypes []*MachineType `json:"machineTypes,omitempty"`
10179
10180	// Warning: [Output Only] An informational warning that appears when the
10181	// machine types list is empty.
10182	Warning *MachineTypesScopedListWarning `json:"warning,omitempty"`
10183
10184	// ForceSendFields is a list of field names (e.g. "MachineTypes") to
10185	// unconditionally include in API requests. By default, fields with
10186	// empty values are omitted from API requests. However, any non-pointer,
10187	// non-interface field appearing in ForceSendFields will be sent to the
10188	// server regardless of whether the field is empty or not. This may be
10189	// used to include empty fields in Patch requests.
10190	ForceSendFields []string `json:"-"`
10191
10192	// NullFields is a list of field names (e.g. "MachineTypes") to include
10193	// in API requests with the JSON null value. By default, fields with
10194	// empty values are omitted from API requests. However, any field with
10195	// an empty value appearing in NullFields will be sent to the server as
10196	// null. It is an error if a field in this list has a non-empty value.
10197	// This may be used to include null fields in Patch requests.
10198	NullFields []string `json:"-"`
10199}
10200
10201func (s *MachineTypesScopedList) MarshalJSON() ([]byte, error) {
10202	type noMethod MachineTypesScopedList
10203	raw := noMethod(*s)
10204	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10205}
10206
10207// MachineTypesScopedListWarning: [Output Only] An informational warning
10208// that appears when the machine types list is empty.
10209type MachineTypesScopedListWarning struct {
10210	// Code: [Output Only] A warning code, if applicable. For example,
10211	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
10212	// the response.
10213	//
10214	// Possible values:
10215	//   "CLEANUP_FAILED"
10216	//   "DEPRECATED_RESOURCE_USED"
10217	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
10218	//   "FIELD_VALUE_OVERRIDEN"
10219	//   "INJECTED_KERNELS_DEPRECATED"
10220	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
10221	//   "NEXT_HOP_CANNOT_IP_FORWARD"
10222	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
10223	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
10224	//   "NEXT_HOP_NOT_RUNNING"
10225	//   "NOT_CRITICAL_ERROR"
10226	//   "NO_RESULTS_ON_PAGE"
10227	//   "REQUIRED_TOS_AGREEMENT"
10228	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
10229	//   "RESOURCE_NOT_DELETED"
10230	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
10231	//   "UNREACHABLE"
10232	Code string `json:"code,omitempty"`
10233
10234	// Data: [Output Only] Metadata about this warning in key: value format.
10235	// For example:
10236	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
10237	Data []*MachineTypesScopedListWarningData `json:"data,omitempty"`
10238
10239	// Message: [Output Only] A human-readable description of the warning
10240	// code.
10241	Message string `json:"message,omitempty"`
10242
10243	// ForceSendFields is a list of field names (e.g. "Code") to
10244	// unconditionally include in API requests. By default, fields with
10245	// empty values are omitted from API requests. However, any non-pointer,
10246	// non-interface field appearing in ForceSendFields will be sent to the
10247	// server regardless of whether the field is empty or not. This may be
10248	// used to include empty fields in Patch requests.
10249	ForceSendFields []string `json:"-"`
10250
10251	// NullFields is a list of field names (e.g. "Code") to include in API
10252	// requests with the JSON null value. By default, fields with empty
10253	// values are omitted from API requests. However, any field with an
10254	// empty value appearing in NullFields will be sent to the server as
10255	// null. It is an error if a field in this list has a non-empty value.
10256	// This may be used to include null fields in Patch requests.
10257	NullFields []string `json:"-"`
10258}
10259
10260func (s *MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) {
10261	type noMethod MachineTypesScopedListWarning
10262	raw := noMethod(*s)
10263	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10264}
10265
10266type MachineTypesScopedListWarningData struct {
10267	// Key: [Output Only] A key that provides more detail on the warning
10268	// being returned. For example, for warnings where there are no results
10269	// in a list request for a particular zone, this key might be scope and
10270	// the key value might be the zone name. Other examples might be a key
10271	// indicating a deprecated resource and a suggested replacement, or a
10272	// warning about invalid network settings (for example, if an instance
10273	// attempts to perform IP forwarding but is not enabled for IP
10274	// forwarding).
10275	Key string `json:"key,omitempty"`
10276
10277	// Value: [Output Only] A warning data value corresponding to the key.
10278	Value string `json:"value,omitempty"`
10279
10280	// ForceSendFields is a list of field names (e.g. "Key") to
10281	// unconditionally include in API requests. By default, fields with
10282	// empty values are omitted from API requests. However, any non-pointer,
10283	// non-interface field appearing in ForceSendFields will be sent to the
10284	// server regardless of whether the field is empty or not. This may be
10285	// used to include empty fields in Patch requests.
10286	ForceSendFields []string `json:"-"`
10287
10288	// NullFields is a list of field names (e.g. "Key") to include in API
10289	// requests with the JSON null value. By default, fields with empty
10290	// values are omitted from API requests. However, any field with an
10291	// empty value appearing in NullFields will be sent to the server as
10292	// null. It is an error if a field in this list has a non-empty value.
10293	// This may be used to include null fields in Patch requests.
10294	NullFields []string `json:"-"`
10295}
10296
10297func (s *MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) {
10298	type noMethod MachineTypesScopedListWarningData
10299	raw := noMethod(*s)
10300	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10301}
10302
10303type ManagedInstance struct {
10304	// CurrentAction: [Output Only] The current action that the managed
10305	// instance group has scheduled for the instance. Possible values:
10306	// - NONE The instance is running, and the managed instance group does
10307	// not have any scheduled actions for this instance.
10308	// - CREATING The managed instance group is creating this instance. If
10309	// the group fails to create this instance, it will try again until it
10310	// is successful.
10311	// - CREATING_WITHOUT_RETRIES The managed instance group is attempting
10312	// to create this instance only once. If the group fails to create this
10313	// instance, it does not try again and the group's targetSize value is
10314	// decreased instead.
10315	// - RECREATING The managed instance group is recreating this instance.
10316	//
10317	// - DELETING The managed instance group is permanently deleting this
10318	// instance.
10319	// - ABANDONING The managed instance group is abandoning this instance.
10320	// The instance will be removed from the instance group and from any
10321	// target pools that are associated with this group.
10322	// - RESTARTING The managed instance group is restarting the instance.
10323	//
10324	// - REFRESHING The managed instance group is applying configuration
10325	// changes to the instance without stopping it. For example, the group
10326	// can update the target pool list for an instance without stopping that
10327	// instance.
10328	//
10329	// Possible values:
10330	//   "ABANDONING"
10331	//   "CREATING"
10332	//   "CREATING_WITHOUT_RETRIES"
10333	//   "DELETING"
10334	//   "NONE"
10335	//   "RECREATING"
10336	//   "REFRESHING"
10337	//   "RESTARTING"
10338	//   "VERIFYING"
10339	CurrentAction string `json:"currentAction,omitempty"`
10340
10341	// Id: [Output only] The unique identifier for this resource. This field
10342	// is empty when instance does not exist.
10343	Id uint64 `json:"id,omitempty,string"`
10344
10345	// Instance: [Output Only] The URL of the instance. The URL can exist
10346	// even if the instance has not yet been created.
10347	Instance string `json:"instance,omitempty"`
10348
10349	// InstanceStatus: [Output Only] The status of the instance. This field
10350	// is empty when the instance does not exist.
10351	//
10352	// Possible values:
10353	//   "PROVISIONING"
10354	//   "RUNNING"
10355	//   "STAGING"
10356	//   "STOPPED"
10357	//   "STOPPING"
10358	//   "SUSPENDED"
10359	//   "SUSPENDING"
10360	//   "TERMINATED"
10361	InstanceStatus string `json:"instanceStatus,omitempty"`
10362
10363	// LastAttempt: [Output Only] Information about the last attempt to
10364	// create or delete the instance.
10365	LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"`
10366
10367	// Version: [Output Only] Intended version of this instance.
10368	Version *ManagedInstanceVersion `json:"version,omitempty"`
10369
10370	// ForceSendFields is a list of field names (e.g. "CurrentAction") to
10371	// unconditionally include in API requests. By default, fields with
10372	// empty values are omitted from API requests. However, any non-pointer,
10373	// non-interface field appearing in ForceSendFields will be sent to the
10374	// server regardless of whether the field is empty or not. This may be
10375	// used to include empty fields in Patch requests.
10376	ForceSendFields []string `json:"-"`
10377
10378	// NullFields is a list of field names (e.g. "CurrentAction") to include
10379	// in API requests with the JSON null value. By default, fields with
10380	// empty values are omitted from API requests. However, any field with
10381	// an empty value appearing in NullFields will be sent to the server as
10382	// null. It is an error if a field in this list has a non-empty value.
10383	// This may be used to include null fields in Patch requests.
10384	NullFields []string `json:"-"`
10385}
10386
10387func (s *ManagedInstance) MarshalJSON() ([]byte, error) {
10388	type noMethod ManagedInstance
10389	raw := noMethod(*s)
10390	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10391}
10392
10393type ManagedInstanceLastAttempt struct {
10394	// Errors: [Output Only] Encountered errors during the last attempt to
10395	// create or delete the instance.
10396	Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"`
10397
10398	// ForceSendFields is a list of field names (e.g. "Errors") to
10399	// unconditionally include in API requests. By default, fields with
10400	// empty values are omitted from API requests. However, any non-pointer,
10401	// non-interface field appearing in ForceSendFields will be sent to the
10402	// server regardless of whether the field is empty or not. This may be
10403	// used to include empty fields in Patch requests.
10404	ForceSendFields []string `json:"-"`
10405
10406	// NullFields is a list of field names (e.g. "Errors") to include in API
10407	// requests with the JSON null value. By default, fields with empty
10408	// values are omitted from API requests. However, any field with an
10409	// empty value appearing in NullFields will be sent to the server as
10410	// null. It is an error if a field in this list has a non-empty value.
10411	// This may be used to include null fields in Patch requests.
10412	NullFields []string `json:"-"`
10413}
10414
10415func (s *ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) {
10416	type noMethod ManagedInstanceLastAttempt
10417	raw := noMethod(*s)
10418	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10419}
10420
10421// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors
10422// during the last attempt to create or delete the instance.
10423type ManagedInstanceLastAttemptErrors struct {
10424	// Errors: [Output Only] The array of errors encountered while
10425	// processing this operation.
10426	Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"`
10427
10428	// ForceSendFields is a list of field names (e.g. "Errors") to
10429	// unconditionally include in API requests. By default, fields with
10430	// empty values are omitted from API requests. However, any non-pointer,
10431	// non-interface field appearing in ForceSendFields will be sent to the
10432	// server regardless of whether the field is empty or not. This may be
10433	// used to include empty fields in Patch requests.
10434	ForceSendFields []string `json:"-"`
10435
10436	// NullFields is a list of field names (e.g. "Errors") to include in API
10437	// requests with the JSON null value. By default, fields with empty
10438	// values are omitted from API requests. However, any field with an
10439	// empty value appearing in NullFields will be sent to the server as
10440	// null. It is an error if a field in this list has a non-empty value.
10441	// This may be used to include null fields in Patch requests.
10442	NullFields []string `json:"-"`
10443}
10444
10445func (s *ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) {
10446	type noMethod ManagedInstanceLastAttemptErrors
10447	raw := noMethod(*s)
10448	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10449}
10450
10451type ManagedInstanceLastAttemptErrorsErrors struct {
10452	// Code: [Output Only] The error type identifier for this error.
10453	Code string `json:"code,omitempty"`
10454
10455	// Location: [Output Only] Indicates the field in the request that
10456	// caused the error. This property is optional.
10457	Location string `json:"location,omitempty"`
10458
10459	// Message: [Output Only] An optional, human-readable error message.
10460	Message string `json:"message,omitempty"`
10461
10462	// ForceSendFields is a list of field names (e.g. "Code") to
10463	// unconditionally include in API requests. By default, fields with
10464	// empty values are omitted from API requests. However, any non-pointer,
10465	// non-interface field appearing in ForceSendFields will be sent to the
10466	// server regardless of whether the field is empty or not. This may be
10467	// used to include empty fields in Patch requests.
10468	ForceSendFields []string `json:"-"`
10469
10470	// NullFields is a list of field names (e.g. "Code") to include in API
10471	// requests with the JSON null value. By default, fields with empty
10472	// values are omitted from API requests. However, any field with an
10473	// empty value appearing in NullFields will be sent to the server as
10474	// null. It is an error if a field in this list has a non-empty value.
10475	// This may be used to include null fields in Patch requests.
10476	NullFields []string `json:"-"`
10477}
10478
10479func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) {
10480	type noMethod ManagedInstanceLastAttemptErrorsErrors
10481	raw := noMethod(*s)
10482	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10483}
10484
10485type ManagedInstanceVersion struct {
10486	// InstanceTemplate: [Output Only] The intended template of the
10487	// instance. This field is empty when current_action is one of {
10488	// DELETING, ABANDONING }.
10489	InstanceTemplate string `json:"instanceTemplate,omitempty"`
10490
10491	// Name: [Output Only] Name of the version.
10492	Name string `json:"name,omitempty"`
10493
10494	// ForceSendFields is a list of field names (e.g. "InstanceTemplate") to
10495	// unconditionally include in API requests. By default, fields with
10496	// empty values are omitted from API requests. However, any non-pointer,
10497	// non-interface field appearing in ForceSendFields will be sent to the
10498	// server regardless of whether the field is empty or not. This may be
10499	// used to include empty fields in Patch requests.
10500	ForceSendFields []string `json:"-"`
10501
10502	// NullFields is a list of field names (e.g. "InstanceTemplate") to
10503	// include in API requests with the JSON null value. By default, fields
10504	// with empty values are omitted from API requests. However, any field
10505	// with an empty value appearing in NullFields will be sent to the
10506	// server as null. It is an error if a field in this list has a
10507	// non-empty value. This may be used to include null fields in Patch
10508	// requests.
10509	NullFields []string `json:"-"`
10510}
10511
10512func (s *ManagedInstanceVersion) MarshalJSON() ([]byte, error) {
10513	type noMethod ManagedInstanceVersion
10514	raw := noMethod(*s)
10515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10516}
10517
10518// Metadata: A metadata key/value entry.
10519type Metadata struct {
10520	// Fingerprint: Specifies a fingerprint for this request, which is
10521	// essentially a hash of the metadata's contents and used for optimistic
10522	// locking. The fingerprint is initially generated by Compute Engine and
10523	// changes after every request to modify or update metadata. You must
10524	// always provide an up-to-date fingerprint hash in order to update or
10525	// change metadata.
10526	Fingerprint string `json:"fingerprint,omitempty"`
10527
10528	// Items: Array of key/value pairs. The total size of all keys and
10529	// values must be less than 512 KB.
10530	Items []*MetadataItems `json:"items,omitempty"`
10531
10532	// Kind: [Output Only] Type of the resource. Always compute#metadata for
10533	// metadata.
10534	Kind string `json:"kind,omitempty"`
10535
10536	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
10537	// unconditionally include in API requests. By default, fields with
10538	// empty values are omitted from API requests. However, any non-pointer,
10539	// non-interface field appearing in ForceSendFields will be sent to the
10540	// server regardless of whether the field is empty or not. This may be
10541	// used to include empty fields in Patch requests.
10542	ForceSendFields []string `json:"-"`
10543
10544	// NullFields is a list of field names (e.g. "Fingerprint") to include
10545	// in API requests with the JSON null value. By default, fields with
10546	// empty values are omitted from API requests. However, any field with
10547	// an empty value appearing in NullFields will be sent to the server as
10548	// null. It is an error if a field in this list has a non-empty value.
10549	// This may be used to include null fields in Patch requests.
10550	NullFields []string `json:"-"`
10551}
10552
10553func (s *Metadata) MarshalJSON() ([]byte, error) {
10554	type noMethod Metadata
10555	raw := noMethod(*s)
10556	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10557}
10558
10559type MetadataItems struct {
10560	// Key: Key for the metadata entry. Keys must conform to the following
10561	// regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is
10562	// reflected as part of a URL in the metadata server. Additionally, to
10563	// avoid ambiguity, keys must not conflict with any other metadata keys
10564	// for the project.
10565	Key string `json:"key,omitempty"`
10566
10567	// Value: Value for the metadata entry. These are free-form strings, and
10568	// only have meaning as interpreted by the image running in the
10569	// instance. The only restriction placed on values is that their size
10570	// must be less than or equal to 262144 bytes (256 KiB).
10571	Value *string `json:"value,omitempty"`
10572
10573	// ForceSendFields is a list of field names (e.g. "Key") to
10574	// unconditionally include in API requests. By default, fields with
10575	// empty values are omitted from API requests. However, any non-pointer,
10576	// non-interface field appearing in ForceSendFields will be sent to the
10577	// server regardless of whether the field is empty or not. This may be
10578	// used to include empty fields in Patch requests.
10579	ForceSendFields []string `json:"-"`
10580
10581	// NullFields is a list of field names (e.g. "Key") to include in API
10582	// requests with the JSON null value. By default, fields with empty
10583	// values are omitted from API requests. However, any field with an
10584	// empty value appearing in NullFields will be sent to the server as
10585	// null. It is an error if a field in this list has a non-empty value.
10586	// This may be used to include null fields in Patch requests.
10587	NullFields []string `json:"-"`
10588}
10589
10590func (s *MetadataItems) MarshalJSON() ([]byte, error) {
10591	type noMethod MetadataItems
10592	raw := noMethod(*s)
10593	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10594}
10595
10596// NamedPort: The named port. For example: .
10597type NamedPort struct {
10598	// Name: The name for this named port. The name must be 1-63 characters
10599	// long, and comply with RFC1035.
10600	Name string `json:"name,omitempty"`
10601
10602	// Port: The port number, which can be a value between 1 and 65535.
10603	Port int64 `json:"port,omitempty"`
10604
10605	// ForceSendFields is a list of field names (e.g. "Name") to
10606	// unconditionally include in API requests. By default, fields with
10607	// empty values are omitted from API requests. However, any non-pointer,
10608	// non-interface field appearing in ForceSendFields will be sent to the
10609	// server regardless of whether the field is empty or not. This may be
10610	// used to include empty fields in Patch requests.
10611	ForceSendFields []string `json:"-"`
10612
10613	// NullFields is a list of field names (e.g. "Name") to include in API
10614	// requests with the JSON null value. By default, fields with empty
10615	// values are omitted from API requests. However, any field with an
10616	// empty value appearing in NullFields will be sent to the server as
10617	// null. It is an error if a field in this list has a non-empty value.
10618	// This may be used to include null fields in Patch requests.
10619	NullFields []string `json:"-"`
10620}
10621
10622func (s *NamedPort) MarshalJSON() ([]byte, error) {
10623	type noMethod NamedPort
10624	raw := noMethod(*s)
10625	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10626}
10627
10628// Network: Represents a Network resource. Read Networks and Firewalls
10629// for more information.
10630type Network struct {
10631	// IPv4Range: The range of internal addresses that are legal on this
10632	// network. This range is a CIDR specification, for example:
10633	// 192.168.0.0/16. Provided by the client when the network is created.
10634	IPv4Range string `json:"IPv4Range,omitempty"`
10635
10636	// AutoCreateSubnetworks: When set to true, the network is created in
10637	// "auto subnet mode". When set to false, the network is in "custom
10638	// subnet mode".
10639	//
10640	// In "auto subnet mode", a newly created network is assigned the
10641	// default CIDR of 10.128.0.0/9 and it automatically creates one
10642	// subnetwork per region.
10643	AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"`
10644
10645	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
10646	// format.
10647	CreationTimestamp string `json:"creationTimestamp,omitempty"`
10648
10649	// Description: An optional description of this resource. Provide this
10650	// property when you create the resource.
10651	Description string `json:"description,omitempty"`
10652
10653	// GatewayIPv4: A gateway address for default routing to other networks.
10654	// This value is read only and is selected by the Google Compute Engine,
10655	// typically as the first usable address in the IPv4Range.
10656	GatewayIPv4 string `json:"gatewayIPv4,omitempty"`
10657
10658	// Id: [Output Only] The unique identifier for the resource. This
10659	// identifier is defined by the server.
10660	Id uint64 `json:"id,omitempty,string"`
10661
10662	// Kind: [Output Only] Type of the resource. Always compute#network for
10663	// networks.
10664	Kind string `json:"kind,omitempty"`
10665
10666	// Name: Name of the resource. Provided by the client when the resource
10667	// is created. The name must be 1-63 characters long, and comply with
10668	// RFC1035. Specifically, the name must be 1-63 characters long and
10669	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
10670	// the first character must be a lowercase letter, and all following
10671	// characters must be a dash, lowercase letter, or digit, except the
10672	// last character, which cannot be a dash.
10673	Name string `json:"name,omitempty"`
10674
10675	// Peerings: [Output Only] List of network peerings for the resource.
10676	Peerings []*NetworkPeering `json:"peerings,omitempty"`
10677
10678	// RoutingConfig: The network-level routing configuration for this
10679	// network. Used by Cloud Router to determine what type of network-wide
10680	// routing behavior to enforce.
10681	RoutingConfig *NetworkRoutingConfig `json:"routingConfig,omitempty"`
10682
10683	// SelfLink: [Output Only] Server-defined URL for the resource.
10684	SelfLink string `json:"selfLink,omitempty"`
10685
10686	// Subnetworks: [Output Only] Server-defined fully-qualified URLs for
10687	// all subnetworks in this network.
10688	Subnetworks []string `json:"subnetworks,omitempty"`
10689
10690	// ServerResponse contains the HTTP response code and headers from the
10691	// server.
10692	googleapi.ServerResponse `json:"-"`
10693
10694	// ForceSendFields is a list of field names (e.g. "IPv4Range") to
10695	// unconditionally include in API requests. By default, fields with
10696	// empty values are omitted from API requests. However, any non-pointer,
10697	// non-interface field appearing in ForceSendFields will be sent to the
10698	// server regardless of whether the field is empty or not. This may be
10699	// used to include empty fields in Patch requests.
10700	ForceSendFields []string `json:"-"`
10701
10702	// NullFields is a list of field names (e.g. "IPv4Range") to include in
10703	// API requests with the JSON null value. By default, fields with empty
10704	// values are omitted from API requests. However, any field with an
10705	// empty value appearing in NullFields will be sent to the server as
10706	// null. It is an error if a field in this list has a non-empty value.
10707	// This may be used to include null fields in Patch requests.
10708	NullFields []string `json:"-"`
10709}
10710
10711func (s *Network) MarshalJSON() ([]byte, error) {
10712	type noMethod Network
10713	raw := noMethod(*s)
10714	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10715}
10716
10717// NetworkInterface: A network interface resource attached to an
10718// instance.
10719type NetworkInterface struct {
10720	// AccessConfigs: An array of configurations for this interface.
10721	// Currently, only one access config, ONE_TO_ONE_NAT, is supported. If
10722	// there are no accessConfigs specified, then this instance will have no
10723	// external internet access.
10724	AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"`
10725
10726	// AliasIpRanges: An array of alias IP ranges for this network
10727	// interface. Can only be specified for network interfaces on
10728	// subnet-mode networks.
10729	AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"`
10730
10731	// Kind: [Output Only] Type of the resource. Always
10732	// compute#networkInterface for network interfaces.
10733	Kind string `json:"kind,omitempty"`
10734
10735	// Name: [Output Only] The name of the network interface, generated by
10736	// the server. For network devices, these are eth0, eth1, etc.
10737	Name string `json:"name,omitempty"`
10738
10739	// Network: URL of the network resource for this instance. When creating
10740	// an instance, if neither the network nor the subnetwork is specified,
10741	// the default network global/networks/default is used; if the network
10742	// is not specified but the subnetwork is specified, the network is
10743	// inferred.
10744	//
10745	// This field is optional when creating a firewall rule. If not
10746	// specified when creating a firewall rule, the default network
10747	// global/networks/default is used.
10748	//
10749	// If you specify this property, you can specify the network as a full
10750	// or partial URL. For example, the following are all valid URLs:
10751	// -
10752	// https://www.googleapis.com/compute/v1/projects/project/global/networks/network
10753	// - projects/project/global/networks/network
10754	// - global/networks/default
10755	Network string `json:"network,omitempty"`
10756
10757	// NetworkIP: An IPv4 internal network address to assign to the instance
10758	// for this network interface. If not specified by the user, an unused
10759	// internal IP is assigned by the system.
10760	NetworkIP string `json:"networkIP,omitempty"`
10761
10762	// Subnetwork: The URL of the Subnetwork resource for this instance. If
10763	// the network resource is in legacy mode, do not provide this property.
10764	// If the network is in auto subnet mode, providing the subnetwork is
10765	// optional. If the network is in custom subnet mode, then this field
10766	// should be specified. If you specify this property, you can specify
10767	// the subnetwork as a full or partial URL. For example, the following
10768	// are all valid URLs:
10769	// -
10770	// https://www.googleapis.com/compute/v1/projects/project/regions/region/subnetworks/subnetwork
10771	// - regions/region/subnetworks/subnetwork
10772	Subnetwork string `json:"subnetwork,omitempty"`
10773
10774	// ForceSendFields is a list of field names (e.g. "AccessConfigs") to
10775	// unconditionally include in API requests. By default, fields with
10776	// empty values are omitted from API requests. However, any non-pointer,
10777	// non-interface field appearing in ForceSendFields will be sent to the
10778	// server regardless of whether the field is empty or not. This may be
10779	// used to include empty fields in Patch requests.
10780	ForceSendFields []string `json:"-"`
10781
10782	// NullFields is a list of field names (e.g. "AccessConfigs") to include
10783	// in API requests with the JSON null value. By default, fields with
10784	// empty values are omitted from API requests. However, any field with
10785	// an empty value appearing in NullFields will be sent to the server as
10786	// null. It is an error if a field in this list has a non-empty value.
10787	// This may be used to include null fields in Patch requests.
10788	NullFields []string `json:"-"`
10789}
10790
10791func (s *NetworkInterface) MarshalJSON() ([]byte, error) {
10792	type noMethod NetworkInterface
10793	raw := noMethod(*s)
10794	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10795}
10796
10797// NetworkList: Contains a list of networks.
10798type NetworkList struct {
10799	// Id: [Output Only] Unique identifier for the resource; defined by the
10800	// server.
10801	Id string `json:"id,omitempty"`
10802
10803	// Items: A list of Network resources.
10804	Items []*Network `json:"items,omitempty"`
10805
10806	// Kind: [Output Only] Type of resource. Always compute#networkList for
10807	// lists of networks.
10808	Kind string `json:"kind,omitempty"`
10809
10810	// NextPageToken: [Output Only] This token allows you to get the next
10811	// page of results for list requests. If the number of results is larger
10812	// than maxResults, use the nextPageToken as a value for the query
10813	// parameter pageToken in the next list request. Subsequent list
10814	// requests will have their own nextPageToken to continue paging through
10815	// the results.
10816	NextPageToken string `json:"nextPageToken,omitempty"`
10817
10818	// SelfLink: [Output Only] Server-defined URL for this resource.
10819	SelfLink string `json:"selfLink,omitempty"`
10820
10821	// ServerResponse contains the HTTP response code and headers from the
10822	// server.
10823	googleapi.ServerResponse `json:"-"`
10824
10825	// ForceSendFields is a list of field names (e.g. "Id") to
10826	// unconditionally include in API requests. By default, fields with
10827	// empty values are omitted from API requests. However, any non-pointer,
10828	// non-interface field appearing in ForceSendFields will be sent to the
10829	// server regardless of whether the field is empty or not. This may be
10830	// used to include empty fields in Patch requests.
10831	ForceSendFields []string `json:"-"`
10832
10833	// NullFields is a list of field names (e.g. "Id") to include in API
10834	// requests with the JSON null value. By default, fields with empty
10835	// values are omitted from API requests. However, any field with an
10836	// empty value appearing in NullFields will be sent to the server as
10837	// null. It is an error if a field in this list has a non-empty value.
10838	// This may be used to include null fields in Patch requests.
10839	NullFields []string `json:"-"`
10840}
10841
10842func (s *NetworkList) MarshalJSON() ([]byte, error) {
10843	type noMethod NetworkList
10844	raw := noMethod(*s)
10845	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10846}
10847
10848// NetworkPeering: A network peering attached to a network resource. The
10849// message includes the peering name, peer network, peering state, and a
10850// flag indicating whether Google Compute Engine should automatically
10851// create routes for the peering.
10852type NetworkPeering struct {
10853	// AutoCreateRoutes: Whether full mesh connectivity is created and
10854	// managed automatically. When it is set to true, Google Compute Engine
10855	// will automatically create and manage the routes between two networks
10856	// when the state is ACTIVE. Otherwise, user needs to create routes
10857	// manually to route packets to peer network.
10858	AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"`
10859
10860	// Name: Name of this peering. Provided by the client when the peering
10861	// is created. The name must comply with RFC1035. Specifically, the name
10862	// must be 1-63 characters long and match regular expression
10863	// [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
10864	// lowercase letter, and all the following characters must be a dash,
10865	// lowercase letter, or digit, except the last character, which cannot
10866	// be a dash.
10867	Name string `json:"name,omitempty"`
10868
10869	// Network: The URL of the peer network. It can be either full URL or
10870	// partial URL. The peer network may belong to a different project. If
10871	// the partial URL does not contain project, it is assumed that the peer
10872	// network is in the same project as the current network.
10873	Network string `json:"network,omitempty"`
10874
10875	// State: [Output Only] State for the peering.
10876	//
10877	// Possible values:
10878	//   "ACTIVE"
10879	//   "INACTIVE"
10880	State string `json:"state,omitempty"`
10881
10882	// StateDetails: [Output Only] Details about the current state of the
10883	// peering.
10884	StateDetails string `json:"stateDetails,omitempty"`
10885
10886	// ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to
10887	// unconditionally include in API requests. By default, fields with
10888	// empty values are omitted from API requests. However, any non-pointer,
10889	// non-interface field appearing in ForceSendFields will be sent to the
10890	// server regardless of whether the field is empty or not. This may be
10891	// used to include empty fields in Patch requests.
10892	ForceSendFields []string `json:"-"`
10893
10894	// NullFields is a list of field names (e.g. "AutoCreateRoutes") to
10895	// include in API requests with the JSON null value. By default, fields
10896	// with empty values are omitted from API requests. However, any field
10897	// with an empty value appearing in NullFields will be sent to the
10898	// server as null. It is an error if a field in this list has a
10899	// non-empty value. This may be used to include null fields in Patch
10900	// requests.
10901	NullFields []string `json:"-"`
10902}
10903
10904func (s *NetworkPeering) MarshalJSON() ([]byte, error) {
10905	type noMethod NetworkPeering
10906	raw := noMethod(*s)
10907	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10908}
10909
10910// NetworkRoutingConfig: A routing configuration attached to a network
10911// resource. The message includes the list of routers associated with
10912// the network, and a flag indicating the type of routing behavior to
10913// enforce network-wide.
10914type NetworkRoutingConfig struct {
10915	// RoutingMode: The network-wide routing mode to use. If set to
10916	// REGIONAL, this network's cloud routers will only advertise routes
10917	// with subnetworks of this network in the same region as the router. If
10918	// set to GLOBAL, this network's cloud routers will advertise routes
10919	// with all subnetworks of this network, across regions.
10920	//
10921	// Possible values:
10922	//   "GLOBAL"
10923	//   "REGIONAL"
10924	RoutingMode string `json:"routingMode,omitempty"`
10925
10926	// ForceSendFields is a list of field names (e.g. "RoutingMode") to
10927	// unconditionally include in API requests. By default, fields with
10928	// empty values are omitted from API requests. However, any non-pointer,
10929	// non-interface field appearing in ForceSendFields will be sent to the
10930	// server regardless of whether the field is empty or not. This may be
10931	// used to include empty fields in Patch requests.
10932	ForceSendFields []string `json:"-"`
10933
10934	// NullFields is a list of field names (e.g. "RoutingMode") to include
10935	// in API requests with the JSON null value. By default, fields with
10936	// empty values are omitted from API requests. However, any field with
10937	// an empty value appearing in NullFields will be sent to the server as
10938	// null. It is an error if a field in this list has a non-empty value.
10939	// This may be used to include null fields in Patch requests.
10940	NullFields []string `json:"-"`
10941}
10942
10943func (s *NetworkRoutingConfig) MarshalJSON() ([]byte, error) {
10944	type noMethod NetworkRoutingConfig
10945	raw := noMethod(*s)
10946	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10947}
10948
10949type NetworksAddPeeringRequest struct {
10950	// AutoCreateRoutes: Whether Google Compute Engine manages the routes
10951	// automatically.
10952	AutoCreateRoutes bool `json:"autoCreateRoutes,omitempty"`
10953
10954	// Name: Name of the peering, which should conform to RFC1035.
10955	Name string `json:"name,omitempty"`
10956
10957	// PeerNetwork: URL of the peer network. It can be either full URL or
10958	// partial URL. The peer network may belong to a different project. If
10959	// the partial URL does not contain project, it is assumed that the peer
10960	// network is in the same project as the current network.
10961	PeerNetwork string `json:"peerNetwork,omitempty"`
10962
10963	// ForceSendFields is a list of field names (e.g. "AutoCreateRoutes") to
10964	// unconditionally include in API requests. By default, fields with
10965	// empty values are omitted from API requests. However, any non-pointer,
10966	// non-interface field appearing in ForceSendFields will be sent to the
10967	// server regardless of whether the field is empty or not. This may be
10968	// used to include empty fields in Patch requests.
10969	ForceSendFields []string `json:"-"`
10970
10971	// NullFields is a list of field names (e.g. "AutoCreateRoutes") to
10972	// include in API requests with the JSON null value. By default, fields
10973	// with empty values are omitted from API requests. However, any field
10974	// with an empty value appearing in NullFields will be sent to the
10975	// server as null. It is an error if a field in this list has a
10976	// non-empty value. This may be used to include null fields in Patch
10977	// requests.
10978	NullFields []string `json:"-"`
10979}
10980
10981func (s *NetworksAddPeeringRequest) MarshalJSON() ([]byte, error) {
10982	type noMethod NetworksAddPeeringRequest
10983	raw := noMethod(*s)
10984	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10985}
10986
10987type NetworksRemovePeeringRequest struct {
10988	// Name: Name of the peering, which should conform to RFC1035.
10989	Name string `json:"name,omitempty"`
10990
10991	// ForceSendFields is a list of field names (e.g. "Name") to
10992	// unconditionally include in API requests. By default, fields with
10993	// empty values are omitted from API requests. However, any non-pointer,
10994	// non-interface field appearing in ForceSendFields will be sent to the
10995	// server regardless of whether the field is empty or not. This may be
10996	// used to include empty fields in Patch requests.
10997	ForceSendFields []string `json:"-"`
10998
10999	// NullFields is a list of field names (e.g. "Name") to include in API
11000	// requests with the JSON null value. By default, fields with empty
11001	// values are omitted from API requests. However, any field with an
11002	// empty value appearing in NullFields will be sent to the server as
11003	// null. It is an error if a field in this list has a non-empty value.
11004	// This may be used to include null fields in Patch requests.
11005	NullFields []string `json:"-"`
11006}
11007
11008func (s *NetworksRemovePeeringRequest) MarshalJSON() ([]byte, error) {
11009	type noMethod NetworksRemovePeeringRequest
11010	raw := noMethod(*s)
11011	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11012}
11013
11014// Operation: An Operation resource, used to manage asynchronous API
11015// requests.
11016type Operation struct {
11017	// ClientOperationId: [Output Only] Reserved for future use.
11018	ClientOperationId string `json:"clientOperationId,omitempty"`
11019
11020	// CreationTimestamp: [Deprecated] This field is deprecated.
11021	CreationTimestamp string `json:"creationTimestamp,omitempty"`
11022
11023	// Description: [Output Only] A textual description of the operation,
11024	// which is set when the operation is created.
11025	Description string `json:"description,omitempty"`
11026
11027	// EndTime: [Output Only] The time that this operation was completed.
11028	// This value is in RFC3339 text format.
11029	EndTime string `json:"endTime,omitempty"`
11030
11031	// Error: [Output Only] If errors are generated during processing of the
11032	// operation, this field will be populated.
11033	Error *OperationError `json:"error,omitempty"`
11034
11035	// HttpErrorMessage: [Output Only] If the operation fails, this field
11036	// contains the HTTP error message that was returned, such as NOT FOUND.
11037	HttpErrorMessage string `json:"httpErrorMessage,omitempty"`
11038
11039	// HttpErrorStatusCode: [Output Only] If the operation fails, this field
11040	// contains the HTTP error status code that was returned. For example, a
11041	// 404 means the resource was not found.
11042	HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"`
11043
11044	// Id: [Output Only] The unique identifier for the resource. This
11045	// identifier is defined by the server.
11046	Id uint64 `json:"id,omitempty,string"`
11047
11048	// InsertTime: [Output Only] The time that this operation was requested.
11049	// This value is in RFC3339 text format.
11050	InsertTime string `json:"insertTime,omitempty"`
11051
11052	// Kind: [Output Only] Type of the resource. Always compute#operation
11053	// for Operation resources.
11054	Kind string `json:"kind,omitempty"`
11055
11056	// Name: [Output Only] Name of the resource.
11057	Name string `json:"name,omitempty"`
11058
11059	// OperationType: [Output Only] The type of operation, such as insert,
11060	// update, or delete, and so on.
11061	OperationType string `json:"operationType,omitempty"`
11062
11063	// Progress: [Output Only] An optional progress indicator that ranges
11064	// from 0 to 100. There is no requirement that this be linear or support
11065	// any granularity of operations. This should not be used to guess when
11066	// the operation will be complete. This number should monotonically
11067	// increase as the operation progresses.
11068	Progress int64 `json:"progress,omitempty"`
11069
11070	// Region: [Output Only] The URL of the region where the operation
11071	// resides. Only available when performing regional operations.
11072	Region string `json:"region,omitempty"`
11073
11074	// SelfLink: [Output Only] Server-defined URL for the resource.
11075	SelfLink string `json:"selfLink,omitempty"`
11076
11077	// StartTime: [Output Only] The time that this operation was started by
11078	// the server. This value is in RFC3339 text format.
11079	StartTime string `json:"startTime,omitempty"`
11080
11081	// Status: [Output Only] The status of the operation, which can be one
11082	// of the following: PENDING, RUNNING, or DONE.
11083	//
11084	// Possible values:
11085	//   "DONE"
11086	//   "PENDING"
11087	//   "RUNNING"
11088	Status string `json:"status,omitempty"`
11089
11090	// StatusMessage: [Output Only] An optional textual description of the
11091	// current status of the operation.
11092	StatusMessage string `json:"statusMessage,omitempty"`
11093
11094	// TargetId: [Output Only] The unique target ID, which identifies a
11095	// specific incarnation of the target resource.
11096	TargetId uint64 `json:"targetId,omitempty,string"`
11097
11098	// TargetLink: [Output Only] The URL of the resource that the operation
11099	// modifies. For operations related to creating a snapshot, this points
11100	// to the persistent disk that the snapshot was created from.
11101	TargetLink string `json:"targetLink,omitempty"`
11102
11103	// User: [Output Only] User who requested the operation, for example:
11104	// user@example.com.
11105	User string `json:"user,omitempty"`
11106
11107	// Warnings: [Output Only] If warning messages are generated during
11108	// processing of the operation, this field will be populated.
11109	Warnings []*OperationWarnings `json:"warnings,omitempty"`
11110
11111	// Zone: [Output Only] The URL of the zone where the operation resides.
11112	// Only available when performing per-zone operations.
11113	Zone string `json:"zone,omitempty"`
11114
11115	// ServerResponse contains the HTTP response code and headers from the
11116	// server.
11117	googleapi.ServerResponse `json:"-"`
11118
11119	// ForceSendFields is a list of field names (e.g. "ClientOperationId")
11120	// to unconditionally include in API requests. By default, fields with
11121	// empty values are omitted from API requests. However, any non-pointer,
11122	// non-interface field appearing in ForceSendFields will be sent to the
11123	// server regardless of whether the field is empty or not. This may be
11124	// used to include empty fields in Patch requests.
11125	ForceSendFields []string `json:"-"`
11126
11127	// NullFields is a list of field names (e.g. "ClientOperationId") to
11128	// include in API requests with the JSON null value. By default, fields
11129	// with empty values are omitted from API requests. However, any field
11130	// with an empty value appearing in NullFields will be sent to the
11131	// server as null. It is an error if a field in this list has a
11132	// non-empty value. This may be used to include null fields in Patch
11133	// requests.
11134	NullFields []string `json:"-"`
11135}
11136
11137func (s *Operation) MarshalJSON() ([]byte, error) {
11138	type noMethod Operation
11139	raw := noMethod(*s)
11140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11141}
11142
11143// OperationError: [Output Only] If errors are generated during
11144// processing of the operation, this field will be populated.
11145type OperationError struct {
11146	// Errors: [Output Only] The array of errors encountered while
11147	// processing this operation.
11148	Errors []*OperationErrorErrors `json:"errors,omitempty"`
11149
11150	// ForceSendFields is a list of field names (e.g. "Errors") to
11151	// unconditionally include in API requests. By default, fields with
11152	// empty values are omitted from API requests. However, any non-pointer,
11153	// non-interface field appearing in ForceSendFields will be sent to the
11154	// server regardless of whether the field is empty or not. This may be
11155	// used to include empty fields in Patch requests.
11156	ForceSendFields []string `json:"-"`
11157
11158	// NullFields is a list of field names (e.g. "Errors") to include in API
11159	// requests with the JSON null value. By default, fields with empty
11160	// values are omitted from API requests. However, any field with an
11161	// empty value appearing in NullFields will be sent to the server as
11162	// null. It is an error if a field in this list has a non-empty value.
11163	// This may be used to include null fields in Patch requests.
11164	NullFields []string `json:"-"`
11165}
11166
11167func (s *OperationError) MarshalJSON() ([]byte, error) {
11168	type noMethod OperationError
11169	raw := noMethod(*s)
11170	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11171}
11172
11173type OperationErrorErrors struct {
11174	// Code: [Output Only] The error type identifier for this error.
11175	Code string `json:"code,omitempty"`
11176
11177	// Location: [Output Only] Indicates the field in the request that
11178	// caused the error. This property is optional.
11179	Location string `json:"location,omitempty"`
11180
11181	// Message: [Output Only] An optional, human-readable error message.
11182	Message string `json:"message,omitempty"`
11183
11184	// ForceSendFields is a list of field names (e.g. "Code") to
11185	// unconditionally include in API requests. By default, fields with
11186	// empty values are omitted from API requests. However, any non-pointer,
11187	// non-interface field appearing in ForceSendFields will be sent to the
11188	// server regardless of whether the field is empty or not. This may be
11189	// used to include empty fields in Patch requests.
11190	ForceSendFields []string `json:"-"`
11191
11192	// NullFields is a list of field names (e.g. "Code") to include in API
11193	// requests with the JSON null value. By default, fields with empty
11194	// values are omitted from API requests. However, any field with an
11195	// empty value appearing in NullFields will be sent to the server as
11196	// null. It is an error if a field in this list has a non-empty value.
11197	// This may be used to include null fields in Patch requests.
11198	NullFields []string `json:"-"`
11199}
11200
11201func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) {
11202	type noMethod OperationErrorErrors
11203	raw := noMethod(*s)
11204	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11205}
11206
11207type OperationWarnings struct {
11208	// Code: [Output Only] A warning code, if applicable. For example,
11209	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
11210	// the response.
11211	//
11212	// Possible values:
11213	//   "CLEANUP_FAILED"
11214	//   "DEPRECATED_RESOURCE_USED"
11215	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
11216	//   "FIELD_VALUE_OVERRIDEN"
11217	//   "INJECTED_KERNELS_DEPRECATED"
11218	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
11219	//   "NEXT_HOP_CANNOT_IP_FORWARD"
11220	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
11221	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
11222	//   "NEXT_HOP_NOT_RUNNING"
11223	//   "NOT_CRITICAL_ERROR"
11224	//   "NO_RESULTS_ON_PAGE"
11225	//   "REQUIRED_TOS_AGREEMENT"
11226	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
11227	//   "RESOURCE_NOT_DELETED"
11228	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
11229	//   "UNREACHABLE"
11230	Code string `json:"code,omitempty"`
11231
11232	// Data: [Output Only] Metadata about this warning in key: value format.
11233	// For example:
11234	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
11235	Data []*OperationWarningsData `json:"data,omitempty"`
11236
11237	// Message: [Output Only] A human-readable description of the warning
11238	// code.
11239	Message string `json:"message,omitempty"`
11240
11241	// ForceSendFields is a list of field names (e.g. "Code") to
11242	// unconditionally include in API requests. By default, fields with
11243	// empty values are omitted from API requests. However, any non-pointer,
11244	// non-interface field appearing in ForceSendFields will be sent to the
11245	// server regardless of whether the field is empty or not. This may be
11246	// used to include empty fields in Patch requests.
11247	ForceSendFields []string `json:"-"`
11248
11249	// NullFields is a list of field names (e.g. "Code") to include in API
11250	// requests with the JSON null value. By default, fields with empty
11251	// values are omitted from API requests. However, any field with an
11252	// empty value appearing in NullFields will be sent to the server as
11253	// null. It is an error if a field in this list has a non-empty value.
11254	// This may be used to include null fields in Patch requests.
11255	NullFields []string `json:"-"`
11256}
11257
11258func (s *OperationWarnings) MarshalJSON() ([]byte, error) {
11259	type noMethod OperationWarnings
11260	raw := noMethod(*s)
11261	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11262}
11263
11264type OperationWarningsData struct {
11265	// Key: [Output Only] A key that provides more detail on the warning
11266	// being returned. For example, for warnings where there are no results
11267	// in a list request for a particular zone, this key might be scope and
11268	// the key value might be the zone name. Other examples might be a key
11269	// indicating a deprecated resource and a suggested replacement, or a
11270	// warning about invalid network settings (for example, if an instance
11271	// attempts to perform IP forwarding but is not enabled for IP
11272	// forwarding).
11273	Key string `json:"key,omitempty"`
11274
11275	// Value: [Output Only] A warning data value corresponding to the key.
11276	Value string `json:"value,omitempty"`
11277
11278	// ForceSendFields is a list of field names (e.g. "Key") to
11279	// unconditionally include in API requests. By default, fields with
11280	// empty values are omitted from API requests. However, any non-pointer,
11281	// non-interface field appearing in ForceSendFields will be sent to the
11282	// server regardless of whether the field is empty or not. This may be
11283	// used to include empty fields in Patch requests.
11284	ForceSendFields []string `json:"-"`
11285
11286	// NullFields is a list of field names (e.g. "Key") to include in API
11287	// requests with the JSON null value. By default, fields with empty
11288	// values are omitted from API requests. However, any field with an
11289	// empty value appearing in NullFields will be sent to the server as
11290	// null. It is an error if a field in this list has a non-empty value.
11291	// This may be used to include null fields in Patch requests.
11292	NullFields []string `json:"-"`
11293}
11294
11295func (s *OperationWarningsData) MarshalJSON() ([]byte, error) {
11296	type noMethod OperationWarningsData
11297	raw := noMethod(*s)
11298	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11299}
11300
11301type OperationAggregatedList struct {
11302	// Id: [Output Only] The unique identifier for the resource. This
11303	// identifier is defined by the server.
11304	Id string `json:"id,omitempty"`
11305
11306	// Items: [Output Only] A map of scoped operation lists.
11307	Items map[string]OperationsScopedList `json:"items,omitempty"`
11308
11309	// Kind: [Output Only] Type of resource. Always
11310	// compute#operationAggregatedList for aggregated lists of operations.
11311	Kind string `json:"kind,omitempty"`
11312
11313	// NextPageToken: [Output Only] This token allows you to get the next
11314	// page of results for list requests. If the number of results is larger
11315	// than maxResults, use the nextPageToken as a value for the query
11316	// parameter pageToken in the next list request. Subsequent list
11317	// requests will have their own nextPageToken to continue paging through
11318	// the results.
11319	NextPageToken string `json:"nextPageToken,omitempty"`
11320
11321	// SelfLink: [Output Only] Server-defined URL for this resource.
11322	SelfLink string `json:"selfLink,omitempty"`
11323
11324	// ServerResponse contains the HTTP response code and headers from the
11325	// server.
11326	googleapi.ServerResponse `json:"-"`
11327
11328	// ForceSendFields is a list of field names (e.g. "Id") to
11329	// unconditionally include in API requests. By default, fields with
11330	// empty values are omitted from API requests. However, any non-pointer,
11331	// non-interface field appearing in ForceSendFields will be sent to the
11332	// server regardless of whether the field is empty or not. This may be
11333	// used to include empty fields in Patch requests.
11334	ForceSendFields []string `json:"-"`
11335
11336	// NullFields is a list of field names (e.g. "Id") to include in API
11337	// requests with the JSON null value. By default, fields with empty
11338	// values are omitted from API requests. However, any field with an
11339	// empty value appearing in NullFields will be sent to the server as
11340	// null. It is an error if a field in this list has a non-empty value.
11341	// This may be used to include null fields in Patch requests.
11342	NullFields []string `json:"-"`
11343}
11344
11345func (s *OperationAggregatedList) MarshalJSON() ([]byte, error) {
11346	type noMethod OperationAggregatedList
11347	raw := noMethod(*s)
11348	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11349}
11350
11351// OperationList: Contains a list of Operation resources.
11352type OperationList struct {
11353	// Id: [Output Only] The unique identifier for the resource. This
11354	// identifier is defined by the server.
11355	Id string `json:"id,omitempty"`
11356
11357	// Items: [Output Only] A list of Operation resources.
11358	Items []*Operation `json:"items,omitempty"`
11359
11360	// Kind: [Output Only] Type of resource. Always compute#operations for
11361	// Operations resource.
11362	Kind string `json:"kind,omitempty"`
11363
11364	// NextPageToken: [Output Only] This token allows you to get the next
11365	// page of results for list requests. If the number of results is larger
11366	// than maxResults, use the nextPageToken as a value for the query
11367	// parameter pageToken in the next list request. Subsequent list
11368	// requests will have their own nextPageToken to continue paging through
11369	// the results.
11370	NextPageToken string `json:"nextPageToken,omitempty"`
11371
11372	// SelfLink: [Output Only] Server-defined URL for this resource.
11373	SelfLink string `json:"selfLink,omitempty"`
11374
11375	// ServerResponse contains the HTTP response code and headers from the
11376	// server.
11377	googleapi.ServerResponse `json:"-"`
11378
11379	// ForceSendFields is a list of field names (e.g. "Id") to
11380	// unconditionally include in API requests. By default, fields with
11381	// empty values are omitted from API requests. However, any non-pointer,
11382	// non-interface field appearing in ForceSendFields will be sent to the
11383	// server regardless of whether the field is empty or not. This may be
11384	// used to include empty fields in Patch requests.
11385	ForceSendFields []string `json:"-"`
11386
11387	// NullFields is a list of field names (e.g. "Id") to include in API
11388	// requests with the JSON null value. By default, fields with empty
11389	// values are omitted from API requests. However, any field with an
11390	// empty value appearing in NullFields will be sent to the server as
11391	// null. It is an error if a field in this list has a non-empty value.
11392	// This may be used to include null fields in Patch requests.
11393	NullFields []string `json:"-"`
11394}
11395
11396func (s *OperationList) MarshalJSON() ([]byte, error) {
11397	type noMethod OperationList
11398	raw := noMethod(*s)
11399	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11400}
11401
11402type OperationsScopedList struct {
11403	// Operations: [Output Only] List of operations contained in this scope.
11404	Operations []*Operation `json:"operations,omitempty"`
11405
11406	// Warning: [Output Only] Informational warning which replaces the list
11407	// of operations when the list is empty.
11408	Warning *OperationsScopedListWarning `json:"warning,omitempty"`
11409
11410	// ForceSendFields is a list of field names (e.g. "Operations") to
11411	// unconditionally include in API requests. By default, fields with
11412	// empty values are omitted from API requests. However, any non-pointer,
11413	// non-interface field appearing in ForceSendFields will be sent to the
11414	// server regardless of whether the field is empty or not. This may be
11415	// used to include empty fields in Patch requests.
11416	ForceSendFields []string `json:"-"`
11417
11418	// NullFields is a list of field names (e.g. "Operations") to include in
11419	// API requests with the JSON null value. By default, fields with empty
11420	// values are omitted from API requests. However, any field with an
11421	// empty value appearing in NullFields will be sent to the server as
11422	// null. It is an error if a field in this list has a non-empty value.
11423	// This may be used to include null fields in Patch requests.
11424	NullFields []string `json:"-"`
11425}
11426
11427func (s *OperationsScopedList) MarshalJSON() ([]byte, error) {
11428	type noMethod OperationsScopedList
11429	raw := noMethod(*s)
11430	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11431}
11432
11433// OperationsScopedListWarning: [Output Only] Informational warning
11434// which replaces the list of operations when the list is empty.
11435type OperationsScopedListWarning struct {
11436	// Code: [Output Only] A warning code, if applicable. For example,
11437	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
11438	// the response.
11439	//
11440	// Possible values:
11441	//   "CLEANUP_FAILED"
11442	//   "DEPRECATED_RESOURCE_USED"
11443	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
11444	//   "FIELD_VALUE_OVERRIDEN"
11445	//   "INJECTED_KERNELS_DEPRECATED"
11446	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
11447	//   "NEXT_HOP_CANNOT_IP_FORWARD"
11448	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
11449	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
11450	//   "NEXT_HOP_NOT_RUNNING"
11451	//   "NOT_CRITICAL_ERROR"
11452	//   "NO_RESULTS_ON_PAGE"
11453	//   "REQUIRED_TOS_AGREEMENT"
11454	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
11455	//   "RESOURCE_NOT_DELETED"
11456	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
11457	//   "UNREACHABLE"
11458	Code string `json:"code,omitempty"`
11459
11460	// Data: [Output Only] Metadata about this warning in key: value format.
11461	// For example:
11462	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
11463	Data []*OperationsScopedListWarningData `json:"data,omitempty"`
11464
11465	// Message: [Output Only] A human-readable description of the warning
11466	// code.
11467	Message string `json:"message,omitempty"`
11468
11469	// ForceSendFields is a list of field names (e.g. "Code") to
11470	// unconditionally include in API requests. By default, fields with
11471	// empty values are omitted from API requests. However, any non-pointer,
11472	// non-interface field appearing in ForceSendFields will be sent to the
11473	// server regardless of whether the field is empty or not. This may be
11474	// used to include empty fields in Patch requests.
11475	ForceSendFields []string `json:"-"`
11476
11477	// NullFields is a list of field names (e.g. "Code") to include in API
11478	// requests with the JSON null value. By default, fields with empty
11479	// values are omitted from API requests. However, any field with an
11480	// empty value appearing in NullFields will be sent to the server as
11481	// null. It is an error if a field in this list has a non-empty value.
11482	// This may be used to include null fields in Patch requests.
11483	NullFields []string `json:"-"`
11484}
11485
11486func (s *OperationsScopedListWarning) MarshalJSON() ([]byte, error) {
11487	type noMethod OperationsScopedListWarning
11488	raw := noMethod(*s)
11489	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11490}
11491
11492type OperationsScopedListWarningData struct {
11493	// Key: [Output Only] A key that provides more detail on the warning
11494	// being returned. For example, for warnings where there are no results
11495	// in a list request for a particular zone, this key might be scope and
11496	// the key value might be the zone name. Other examples might be a key
11497	// indicating a deprecated resource and a suggested replacement, or a
11498	// warning about invalid network settings (for example, if an instance
11499	// attempts to perform IP forwarding but is not enabled for IP
11500	// forwarding).
11501	Key string `json:"key,omitempty"`
11502
11503	// Value: [Output Only] A warning data value corresponding to the key.
11504	Value string `json:"value,omitempty"`
11505
11506	// ForceSendFields is a list of field names (e.g. "Key") to
11507	// unconditionally include in API requests. By default, fields with
11508	// empty values are omitted from API requests. However, any non-pointer,
11509	// non-interface field appearing in ForceSendFields will be sent to the
11510	// server regardless of whether the field is empty or not. This may be
11511	// used to include empty fields in Patch requests.
11512	ForceSendFields []string `json:"-"`
11513
11514	// NullFields is a list of field names (e.g. "Key") to include in API
11515	// requests with the JSON null value. By default, fields with empty
11516	// values are omitted from API requests. However, any field with an
11517	// empty value appearing in NullFields will be sent to the server as
11518	// null. It is an error if a field in this list has a non-empty value.
11519	// This may be used to include null fields in Patch requests.
11520	NullFields []string `json:"-"`
11521}
11522
11523func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) {
11524	type noMethod OperationsScopedListWarningData
11525	raw := noMethod(*s)
11526	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11527}
11528
11529// PathMatcher: A matcher for the path portion of the URL. The
11530// BackendService from the longest-matched rule will serve the URL. If
11531// no rule was matched, the default service will be used.
11532type PathMatcher struct {
11533	// DefaultService: The full or partial URL to the BackendService
11534	// resource. This will be used if none of the pathRules defined by this
11535	// PathMatcher is matched by the URL's path portion. For example, the
11536	// following are all valid URLs to a BackendService resource:
11537	// -
11538	// https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
11539	// - compute/v1/projects/project/global/backendServices/backendService
11540	//
11541	// - global/backendServices/backendService
11542	DefaultService string `json:"defaultService,omitempty"`
11543
11544	// Description: An optional description of this resource. Provide this
11545	// property when you create the resource.
11546	Description string `json:"description,omitempty"`
11547
11548	// Name: The name to which this PathMatcher is referred by the HostRule.
11549	Name string `json:"name,omitempty"`
11550
11551	// PathRules: The list of path rules.
11552	PathRules []*PathRule `json:"pathRules,omitempty"`
11553
11554	// ForceSendFields is a list of field names (e.g. "DefaultService") to
11555	// unconditionally include in API requests. By default, fields with
11556	// empty values are omitted from API requests. However, any non-pointer,
11557	// non-interface field appearing in ForceSendFields will be sent to the
11558	// server regardless of whether the field is empty or not. This may be
11559	// used to include empty fields in Patch requests.
11560	ForceSendFields []string `json:"-"`
11561
11562	// NullFields is a list of field names (e.g. "DefaultService") to
11563	// include in API requests with the JSON null value. By default, fields
11564	// with empty values are omitted from API requests. However, any field
11565	// with an empty value appearing in NullFields will be sent to the
11566	// server as null. It is an error if a field in this list has a
11567	// non-empty value. This may be used to include null fields in Patch
11568	// requests.
11569	NullFields []string `json:"-"`
11570}
11571
11572func (s *PathMatcher) MarshalJSON() ([]byte, error) {
11573	type noMethod PathMatcher
11574	raw := noMethod(*s)
11575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11576}
11577
11578// PathRule: A path-matching rule for a URL. If matched, will use the
11579// specified BackendService to handle the traffic arriving at this URL.
11580type PathRule struct {
11581	// Paths: The list of path patterns to match. Each must start with / and
11582	// the only place a * is allowed is at the end following a /. The string
11583	// fed to the path matcher does not include any text after the first ?
11584	// or #, and those chars are not allowed here.
11585	Paths []string `json:"paths,omitempty"`
11586
11587	// Service: The URL of the BackendService resource if this rule is
11588	// matched.
11589	Service string `json:"service,omitempty"`
11590
11591	// ForceSendFields is a list of field names (e.g. "Paths") to
11592	// unconditionally include in API requests. By default, fields with
11593	// empty values are omitted from API requests. However, any non-pointer,
11594	// non-interface field appearing in ForceSendFields will be sent to the
11595	// server regardless of whether the field is empty or not. This may be
11596	// used to include empty fields in Patch requests.
11597	ForceSendFields []string `json:"-"`
11598
11599	// NullFields is a list of field names (e.g. "Paths") to include in API
11600	// requests with the JSON null value. By default, fields with empty
11601	// values are omitted from API requests. However, any field with an
11602	// empty value appearing in NullFields will be sent to the server as
11603	// null. It is an error if a field in this list has a non-empty value.
11604	// This may be used to include null fields in Patch requests.
11605	NullFields []string `json:"-"`
11606}
11607
11608func (s *PathRule) MarshalJSON() ([]byte, error) {
11609	type noMethod PathRule
11610	raw := noMethod(*s)
11611	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11612}
11613
11614// Policy: Defines an Identity and Access Management (IAM) policy. It is
11615// used to specify access control policies for Cloud Platform
11616// resources.
11617//
11618//
11619//
11620// A `Policy` consists of a list of `bindings`. A `Binding` binds a list
11621// of `members` to a `role`, where the members can be user accounts,
11622// Google groups, Google domains, and service accounts. A `role` is a
11623// named list of permissions defined by IAM.
11624//
11625// **Example**
11626//
11627// { "bindings": [ { "role": "roles/owner", "members": [
11628// "user:mike@example.com", "group:admins@example.com",
11629// "domain:google.com",
11630// "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, {
11631// "role": "roles/viewer", "members": ["user:sean@example.com"] } ]
11632// }
11633//
11634// For a description of IAM and its features, see the [IAM developer's
11635// guide](https://cloud.google.com/iam).
11636type Policy struct {
11637	// AuditConfigs: Specifies cloud audit logging configuration for this
11638	// policy.
11639	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
11640
11641	// Bindings: Associates a list of `members` to a `role`. `bindings` with
11642	// no members will result in an error.
11643	Bindings []*Binding `json:"bindings,omitempty"`
11644
11645	// Etag: `etag` is used for optimistic concurrency control as a way to
11646	// help prevent simultaneous updates of a policy from overwriting each
11647	// other. It is strongly suggested that systems make use of the `etag`
11648	// in the read-modify-write cycle to perform policy updates in order to
11649	// avoid race conditions: An `etag` is returned in the response to
11650	// `getIamPolicy`, and systems are expected to put that etag in the
11651	// request to `setIamPolicy` to ensure that their change will be applied
11652	// to the same version of the policy.
11653	//
11654	// If no `etag` is provided in the call to `setIamPolicy`, then the
11655	// existing policy is overwritten blindly.
11656	Etag string `json:"etag,omitempty"`
11657
11658	IamOwned bool `json:"iamOwned,omitempty"`
11659
11660	// Rules: If more than one rule is specified, the rules are applied in
11661	// the following manner: - All matching LOG rules are always applied. -
11662	// If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging
11663	// will be applied if one or more matching rule requires logging. -
11664	// Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
11665	// granted. Logging will be applied if one or more matching rule
11666	// requires logging. - Otherwise, if no rule applies, permission is
11667	// denied.
11668	Rules []*Rule `json:"rules,omitempty"`
11669
11670	// Version: Version of the `Policy`. The default version is 0.
11671	Version int64 `json:"version,omitempty"`
11672
11673	// ServerResponse contains the HTTP response code and headers from the
11674	// server.
11675	googleapi.ServerResponse `json:"-"`
11676
11677	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
11678	// unconditionally include in API requests. By default, fields with
11679	// empty values are omitted from API requests. However, any non-pointer,
11680	// non-interface field appearing in ForceSendFields will be sent to the
11681	// server regardless of whether the field is empty or not. This may be
11682	// used to include empty fields in Patch requests.
11683	ForceSendFields []string `json:"-"`
11684
11685	// NullFields is a list of field names (e.g. "AuditConfigs") to include
11686	// in API requests with the JSON null value. By default, fields with
11687	// empty values are omitted from API requests. However, any field with
11688	// an empty value appearing in NullFields will be sent to the server as
11689	// null. It is an error if a field in this list has a non-empty value.
11690	// This may be used to include null fields in Patch requests.
11691	NullFields []string `json:"-"`
11692}
11693
11694func (s *Policy) MarshalJSON() ([]byte, error) {
11695	type noMethod Policy
11696	raw := noMethod(*s)
11697	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11698}
11699
11700// Project: A Project resource. Projects can only be created in the
11701// Google Cloud Platform Console. Unless marked otherwise, values can
11702// only be modified in the console.
11703type Project struct {
11704	// CommonInstanceMetadata: Metadata key/value pairs available to all
11705	// instances contained in this project. See Custom metadata for more
11706	// information.
11707	CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"`
11708
11709	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
11710	// format.
11711	CreationTimestamp string `json:"creationTimestamp,omitempty"`
11712
11713	// DefaultServiceAccount: [Output Only] Default service account used by
11714	// VMs running in this project.
11715	DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"`
11716
11717	// Description: An optional textual description of the resource.
11718	Description string `json:"description,omitempty"`
11719
11720	// EnabledFeatures: Restricted features enabled for use on this project.
11721	EnabledFeatures []string `json:"enabledFeatures,omitempty"`
11722
11723	// Id: [Output Only] The unique identifier for the resource. This
11724	// identifier is defined by the server. This is not the project ID, and
11725	// is just a unique ID used by Compute Engine to identify resources.
11726	Id uint64 `json:"id,omitempty,string"`
11727
11728	// Kind: [Output Only] Type of the resource. Always compute#project for
11729	// projects.
11730	Kind string `json:"kind,omitempty"`
11731
11732	// Name: The project ID. For example: my-example-project. Use the
11733	// project ID to make requests to Compute Engine.
11734	Name string `json:"name,omitempty"`
11735
11736	// Quotas: [Output Only] Quotas assigned to this project.
11737	Quotas []*Quota `json:"quotas,omitempty"`
11738
11739	// SelfLink: [Output Only] Server-defined URL for the resource.
11740	SelfLink string `json:"selfLink,omitempty"`
11741
11742	// UsageExportLocation: The naming prefix for daily usage reports and
11743	// the Google Cloud Storage bucket where they are stored.
11744	UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"`
11745
11746	// XpnProjectStatus: [Output Only] The role this project has in a shared
11747	// VPC configuration. Currently only HOST projects are differentiated.
11748	//
11749	// Possible values:
11750	//   "HOST"
11751	//   "UNSPECIFIED_XPN_PROJECT_STATUS"
11752	XpnProjectStatus string `json:"xpnProjectStatus,omitempty"`
11753
11754	// ServerResponse contains the HTTP response code and headers from the
11755	// server.
11756	googleapi.ServerResponse `json:"-"`
11757
11758	// ForceSendFields is a list of field names (e.g.
11759	// "CommonInstanceMetadata") to unconditionally include in API requests.
11760	// By default, fields with empty values are omitted from API requests.
11761	// However, any non-pointer, non-interface field appearing in
11762	// ForceSendFields will be sent to the server regardless of whether the
11763	// field is empty or not. This may be used to include empty fields in
11764	// Patch requests.
11765	ForceSendFields []string `json:"-"`
11766
11767	// NullFields is a list of field names (e.g. "CommonInstanceMetadata")
11768	// to include in API requests with the JSON null value. By default,
11769	// fields with empty values are omitted from API requests. However, any
11770	// field with an empty value appearing in NullFields will be sent to the
11771	// server as null. It is an error if a field in this list has a
11772	// non-empty value. This may be used to include null fields in Patch
11773	// requests.
11774	NullFields []string `json:"-"`
11775}
11776
11777func (s *Project) MarshalJSON() ([]byte, error) {
11778	type noMethod Project
11779	raw := noMethod(*s)
11780	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11781}
11782
11783type ProjectsDisableXpnResourceRequest struct {
11784	// XpnResource: Service resource (a.k.a service project) ID.
11785	XpnResource *XpnResourceId `json:"xpnResource,omitempty"`
11786
11787	// ForceSendFields is a list of field names (e.g. "XpnResource") to
11788	// unconditionally include in API requests. By default, fields with
11789	// empty values are omitted from API requests. However, any non-pointer,
11790	// non-interface field appearing in ForceSendFields will be sent to the
11791	// server regardless of whether the field is empty or not. This may be
11792	// used to include empty fields in Patch requests.
11793	ForceSendFields []string `json:"-"`
11794
11795	// NullFields is a list of field names (e.g. "XpnResource") to include
11796	// in API requests with the JSON null value. By default, fields with
11797	// empty values are omitted from API requests. However, any field with
11798	// an empty value appearing in NullFields will be sent to the server as
11799	// null. It is an error if a field in this list has a non-empty value.
11800	// This may be used to include null fields in Patch requests.
11801	NullFields []string `json:"-"`
11802}
11803
11804func (s *ProjectsDisableXpnResourceRequest) MarshalJSON() ([]byte, error) {
11805	type noMethod ProjectsDisableXpnResourceRequest
11806	raw := noMethod(*s)
11807	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11808}
11809
11810type ProjectsEnableXpnResourceRequest struct {
11811	// XpnResource: Service resource (a.k.a service project) ID.
11812	XpnResource *XpnResourceId `json:"xpnResource,omitempty"`
11813
11814	// ForceSendFields is a list of field names (e.g. "XpnResource") to
11815	// unconditionally include in API requests. By default, fields with
11816	// empty values are omitted from API requests. However, any non-pointer,
11817	// non-interface field appearing in ForceSendFields will be sent to the
11818	// server regardless of whether the field is empty or not. This may be
11819	// used to include empty fields in Patch requests.
11820	ForceSendFields []string `json:"-"`
11821
11822	// NullFields is a list of field names (e.g. "XpnResource") to include
11823	// in API requests with the JSON null value. By default, fields with
11824	// empty values are omitted from API requests. However, any field with
11825	// an empty value appearing in NullFields will be sent to the server as
11826	// null. It is an error if a field in this list has a non-empty value.
11827	// This may be used to include null fields in Patch requests.
11828	NullFields []string `json:"-"`
11829}
11830
11831func (s *ProjectsEnableXpnResourceRequest) MarshalJSON() ([]byte, error) {
11832	type noMethod ProjectsEnableXpnResourceRequest
11833	raw := noMethod(*s)
11834	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11835}
11836
11837type ProjectsGetXpnResources struct {
11838	// Kind: [Output Only] Type of resource. Always
11839	// compute#projectsGetXpnResources for lists of service resources (a.k.a
11840	// service projects)
11841	Kind string `json:"kind,omitempty"`
11842
11843	// NextPageToken: [Output Only] This token allows you to get the next
11844	// page of results for list requests. If the number of results is larger
11845	// than maxResults, use the nextPageToken as a value for the query
11846	// parameter pageToken in the next list request. Subsequent list
11847	// requests will have their own nextPageToken to continue paging through
11848	// the results.
11849	NextPageToken string `json:"nextPageToken,omitempty"`
11850
11851	// Resources: Serive resources (a.k.a service projects) attached to this
11852	// project as their shared VPC host.
11853	Resources []*XpnResourceId `json:"resources,omitempty"`
11854
11855	// ServerResponse contains the HTTP response code and headers from the
11856	// server.
11857	googleapi.ServerResponse `json:"-"`
11858
11859	// ForceSendFields is a list of field names (e.g. "Kind") to
11860	// unconditionally include in API requests. By default, fields with
11861	// empty values are omitted from API requests. However, any non-pointer,
11862	// non-interface field appearing in ForceSendFields will be sent to the
11863	// server regardless of whether the field is empty or not. This may be
11864	// used to include empty fields in Patch requests.
11865	ForceSendFields []string `json:"-"`
11866
11867	// NullFields is a list of field names (e.g. "Kind") to include in API
11868	// requests with the JSON null value. By default, fields with empty
11869	// values are omitted from API requests. However, any field with an
11870	// empty value appearing in NullFields will be sent to the server as
11871	// null. It is an error if a field in this list has a non-empty value.
11872	// This may be used to include null fields in Patch requests.
11873	NullFields []string `json:"-"`
11874}
11875
11876func (s *ProjectsGetXpnResources) MarshalJSON() ([]byte, error) {
11877	type noMethod ProjectsGetXpnResources
11878	raw := noMethod(*s)
11879	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11880}
11881
11882type ProjectsListXpnHostsRequest struct {
11883	// Organization: Optional organization ID managed by Cloud Resource
11884	// Manager, for which to list shared VPC host projects. If not
11885	// specified, the organization will be inferred from the project.
11886	Organization string `json:"organization,omitempty"`
11887
11888	// ForceSendFields is a list of field names (e.g. "Organization") to
11889	// unconditionally include in API requests. By default, fields with
11890	// empty values are omitted from API requests. However, any non-pointer,
11891	// non-interface field appearing in ForceSendFields will be sent to the
11892	// server regardless of whether the field is empty or not. This may be
11893	// used to include empty fields in Patch requests.
11894	ForceSendFields []string `json:"-"`
11895
11896	// NullFields is a list of field names (e.g. "Organization") to include
11897	// in API requests with the JSON null value. By default, fields with
11898	// empty values are omitted from API requests. However, any field with
11899	// an empty value appearing in NullFields will be sent to the server as
11900	// null. It is an error if a field in this list has a non-empty value.
11901	// This may be used to include null fields in Patch requests.
11902	NullFields []string `json:"-"`
11903}
11904
11905func (s *ProjectsListXpnHostsRequest) MarshalJSON() ([]byte, error) {
11906	type noMethod ProjectsListXpnHostsRequest
11907	raw := noMethod(*s)
11908	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11909}
11910
11911// Quota: A quotas entry.
11912type Quota struct {
11913	// Limit: [Output Only] Quota limit for this metric.
11914	Limit float64 `json:"limit,omitempty"`
11915
11916	// Metric: [Output Only] Name of the quota metric.
11917	//
11918	// Possible values:
11919	//   "AUTOSCALERS"
11920	//   "BACKEND_BUCKETS"
11921	//   "BACKEND_SERVICES"
11922	//   "COMMITMENTS"
11923	//   "CPUS"
11924	//   "CPUS_ALL_REGIONS"
11925	//   "DISKS_TOTAL_GB"
11926	//   "FIREWALLS"
11927	//   "FORWARDING_RULES"
11928	//   "HEALTH_CHECKS"
11929	//   "IMAGES"
11930	//   "INSTANCES"
11931	//   "INSTANCE_GROUPS"
11932	//   "INSTANCE_GROUP_MANAGERS"
11933	//   "INSTANCE_TEMPLATES"
11934	//   "INTERCONNECTS"
11935	//   "IN_USE_ADDRESSES"
11936	//   "LOCAL_SSD_TOTAL_GB"
11937	//   "NETWORKS"
11938	//   "NVIDIA_K80_GPUS"
11939	//   "PREEMPTIBLE_CPUS"
11940	//   "PREEMPTIBLE_LOCAL_SSD_GB"
11941	//   "REGIONAL_AUTOSCALERS"
11942	//   "REGIONAL_INSTANCE_GROUP_MANAGERS"
11943	//   "ROUTERS"
11944	//   "ROUTES"
11945	//   "SECURITY_POLICIES"
11946	//   "SECURITY_POLICY_RULES"
11947	//   "SNAPSHOTS"
11948	//   "SSD_TOTAL_GB"
11949	//   "SSL_CERTIFICATES"
11950	//   "STATIC_ADDRESSES"
11951	//   "SUBNETWORKS"
11952	//   "TARGET_HTTPS_PROXIES"
11953	//   "TARGET_HTTP_PROXIES"
11954	//   "TARGET_INSTANCES"
11955	//   "TARGET_POOLS"
11956	//   "TARGET_SSL_PROXIES"
11957	//   "TARGET_VPN_GATEWAYS"
11958	//   "URL_MAPS"
11959	//   "VPN_TUNNELS"
11960	Metric string `json:"metric,omitempty"`
11961
11962	// Usage: [Output Only] Current usage of this metric.
11963	Usage float64 `json:"usage,omitempty"`
11964
11965	// ForceSendFields is a list of field names (e.g. "Limit") to
11966	// unconditionally include in API requests. By default, fields with
11967	// empty values are omitted from API requests. However, any non-pointer,
11968	// non-interface field appearing in ForceSendFields will be sent to the
11969	// server regardless of whether the field is empty or not. This may be
11970	// used to include empty fields in Patch requests.
11971	ForceSendFields []string `json:"-"`
11972
11973	// NullFields is a list of field names (e.g. "Limit") to include in API
11974	// requests with the JSON null value. By default, fields with empty
11975	// values are omitted from API requests. However, any field with an
11976	// empty value appearing in NullFields will be sent to the server as
11977	// null. It is an error if a field in this list has a non-empty value.
11978	// This may be used to include null fields in Patch requests.
11979	NullFields []string `json:"-"`
11980}
11981
11982func (s *Quota) MarshalJSON() ([]byte, error) {
11983	type noMethod Quota
11984	raw := noMethod(*s)
11985	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11986}
11987
11988func (s *Quota) UnmarshalJSON(data []byte) error {
11989	type noMethod Quota
11990	var s1 struct {
11991		Limit gensupport.JSONFloat64 `json:"limit"`
11992		Usage gensupport.JSONFloat64 `json:"usage"`
11993		*noMethod
11994	}
11995	s1.noMethod = (*noMethod)(s)
11996	if err := json.Unmarshal(data, &s1); err != nil {
11997		return err
11998	}
11999	s.Limit = float64(s1.Limit)
12000	s.Usage = float64(s1.Usage)
12001	return nil
12002}
12003
12004// Reference: Represents a reference to a resource.
12005type Reference struct {
12006	// Kind: [Output Only] Type of the resource. Always compute#reference
12007	// for references.
12008	Kind string `json:"kind,omitempty"`
12009
12010	// ReferenceType: A description of the reference type with no implied
12011	// semantics. Possible values include:
12012	// - MEMBER_OF
12013	ReferenceType string `json:"referenceType,omitempty"`
12014
12015	// Referrer: URL of the resource which refers to the target.
12016	Referrer string `json:"referrer,omitempty"`
12017
12018	// Target: URL of the resource to which this reference points.
12019	Target string `json:"target,omitempty"`
12020
12021	// ForceSendFields is a list of field names (e.g. "Kind") to
12022	// unconditionally include in API requests. By default, fields with
12023	// empty values are omitted from API requests. However, any non-pointer,
12024	// non-interface field appearing in ForceSendFields will be sent to the
12025	// server regardless of whether the field is empty or not. This may be
12026	// used to include empty fields in Patch requests.
12027	ForceSendFields []string `json:"-"`
12028
12029	// NullFields is a list of field names (e.g. "Kind") to include in API
12030	// requests with the JSON null value. By default, fields with empty
12031	// values are omitted from API requests. However, any field with an
12032	// empty value appearing in NullFields will be sent to the server as
12033	// null. It is an error if a field in this list has a non-empty value.
12034	// This may be used to include null fields in Patch requests.
12035	NullFields []string `json:"-"`
12036}
12037
12038func (s *Reference) MarshalJSON() ([]byte, error) {
12039	type noMethod Reference
12040	raw := noMethod(*s)
12041	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12042}
12043
12044// Region: Region resource.
12045type Region struct {
12046	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
12047	// format.
12048	CreationTimestamp string `json:"creationTimestamp,omitempty"`
12049
12050	// Deprecated: [Output Only] The deprecation status associated with this
12051	// region.
12052	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
12053
12054	// Description: [Output Only] Textual description of the resource.
12055	Description string `json:"description,omitempty"`
12056
12057	// Id: [Output Only] The unique identifier for the resource. This
12058	// identifier is defined by the server.
12059	Id uint64 `json:"id,omitempty,string"`
12060
12061	// Kind: [Output Only] Type of the resource. Always compute#region for
12062	// regions.
12063	Kind string `json:"kind,omitempty"`
12064
12065	// Name: [Output Only] Name of the resource.
12066	Name string `json:"name,omitempty"`
12067
12068	// Quotas: [Output Only] Quotas assigned to this region.
12069	Quotas []*Quota `json:"quotas,omitempty"`
12070
12071	// SelfLink: [Output Only] Server-defined URL for the resource.
12072	SelfLink string `json:"selfLink,omitempty"`
12073
12074	// Status: [Output Only] Status of the region, either UP or DOWN.
12075	//
12076	// Possible values:
12077	//   "DOWN"
12078	//   "UP"
12079	Status string `json:"status,omitempty"`
12080
12081	// Zones: [Output Only] A list of zones available in this region, in the
12082	// form of resource URLs.
12083	Zones []string `json:"zones,omitempty"`
12084
12085	// ServerResponse contains the HTTP response code and headers from the
12086	// server.
12087	googleapi.ServerResponse `json:"-"`
12088
12089	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
12090	// to unconditionally include in API requests. By default, fields with
12091	// empty values are omitted from API requests. However, any non-pointer,
12092	// non-interface field appearing in ForceSendFields will be sent to the
12093	// server regardless of whether the field is empty or not. This may be
12094	// used to include empty fields in Patch requests.
12095	ForceSendFields []string `json:"-"`
12096
12097	// NullFields is a list of field names (e.g. "CreationTimestamp") to
12098	// include in API requests with the JSON null value. By default, fields
12099	// with empty values are omitted from API requests. However, any field
12100	// with an empty value appearing in NullFields will be sent to the
12101	// server as null. It is an error if a field in this list has a
12102	// non-empty value. This may be used to include null fields in Patch
12103	// requests.
12104	NullFields []string `json:"-"`
12105}
12106
12107func (s *Region) MarshalJSON() ([]byte, error) {
12108	type noMethod Region
12109	raw := noMethod(*s)
12110	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12111}
12112
12113// RegionAutoscalerList: Contains a list of autoscalers.
12114type RegionAutoscalerList struct {
12115	// Id: [Output Only] Unique identifier for the resource; defined by the
12116	// server.
12117	Id string `json:"id,omitempty"`
12118
12119	// Items: A list of Autoscaler resources.
12120	Items []*Autoscaler `json:"items,omitempty"`
12121
12122	// Kind: Type of resource.
12123	Kind string `json:"kind,omitempty"`
12124
12125	// NextPageToken: [Output Only] This token allows you to get the next
12126	// page of results for list requests. If the number of results is larger
12127	// than maxResults, use the nextPageToken as a value for the query
12128	// parameter pageToken in the next list request. Subsequent list
12129	// requests will have their own nextPageToken to continue paging through
12130	// the results.
12131	NextPageToken string `json:"nextPageToken,omitempty"`
12132
12133	// SelfLink: [Output Only] Server-defined URL for this resource.
12134	SelfLink string `json:"selfLink,omitempty"`
12135
12136	// ServerResponse contains the HTTP response code and headers from the
12137	// server.
12138	googleapi.ServerResponse `json:"-"`
12139
12140	// ForceSendFields is a list of field names (e.g. "Id") to
12141	// unconditionally include in API requests. By default, fields with
12142	// empty values are omitted from API requests. However, any non-pointer,
12143	// non-interface field appearing in ForceSendFields will be sent to the
12144	// server regardless of whether the field is empty or not. This may be
12145	// used to include empty fields in Patch requests.
12146	ForceSendFields []string `json:"-"`
12147
12148	// NullFields is a list of field names (e.g. "Id") to include in API
12149	// requests with the JSON null value. By default, fields with empty
12150	// values are omitted from API requests. However, any field with an
12151	// empty value appearing in NullFields will be sent to the server as
12152	// null. It is an error if a field in this list has a non-empty value.
12153	// This may be used to include null fields in Patch requests.
12154	NullFields []string `json:"-"`
12155}
12156
12157func (s *RegionAutoscalerList) MarshalJSON() ([]byte, error) {
12158	type noMethod RegionAutoscalerList
12159	raw := noMethod(*s)
12160	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12161}
12162
12163// RegionInstanceGroupList: Contains a list of InstanceGroup resources.
12164type RegionInstanceGroupList struct {
12165	// Id: [Output Only] Unique identifier for the resource; defined by the
12166	// server.
12167	Id string `json:"id,omitempty"`
12168
12169	// Items: A list of InstanceGroup resources.
12170	Items []*InstanceGroup `json:"items,omitempty"`
12171
12172	// Kind: The resource type.
12173	Kind string `json:"kind,omitempty"`
12174
12175	// NextPageToken: [Output Only] This token allows you to get the next
12176	// page of results for list requests. If the number of results is larger
12177	// than maxResults, use the nextPageToken as a value for the query
12178	// parameter pageToken in the next list request. Subsequent list
12179	// requests will have their own nextPageToken to continue paging through
12180	// the results.
12181	NextPageToken string `json:"nextPageToken,omitempty"`
12182
12183	// SelfLink: [Output Only] Server-defined URL for this resource.
12184	SelfLink string `json:"selfLink,omitempty"`
12185
12186	// ServerResponse contains the HTTP response code and headers from the
12187	// server.
12188	googleapi.ServerResponse `json:"-"`
12189
12190	// ForceSendFields is a list of field names (e.g. "Id") to
12191	// unconditionally include in API requests. By default, fields with
12192	// empty values are omitted from API requests. However, any non-pointer,
12193	// non-interface field appearing in ForceSendFields will be sent to the
12194	// server regardless of whether the field is empty or not. This may be
12195	// used to include empty fields in Patch requests.
12196	ForceSendFields []string `json:"-"`
12197
12198	// NullFields is a list of field names (e.g. "Id") to include in API
12199	// requests with the JSON null value. By default, fields with empty
12200	// values are omitted from API requests. However, any field with an
12201	// empty value appearing in NullFields will be sent to the server as
12202	// null. It is an error if a field in this list has a non-empty value.
12203	// This may be used to include null fields in Patch requests.
12204	NullFields []string `json:"-"`
12205}
12206
12207func (s *RegionInstanceGroupList) MarshalJSON() ([]byte, error) {
12208	type noMethod RegionInstanceGroupList
12209	raw := noMethod(*s)
12210	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12211}
12212
12213// RegionInstanceGroupManagerList: Contains a list of managed instance
12214// groups.
12215type RegionInstanceGroupManagerList struct {
12216	// Id: [Output Only] Unique identifier for the resource; defined by the
12217	// server.
12218	Id string `json:"id,omitempty"`
12219
12220	// Items: A list of InstanceGroupManager resources.
12221	Items []*InstanceGroupManager `json:"items,omitempty"`
12222
12223	// Kind: [Output Only] The resource type, which is always
12224	// compute#instanceGroupManagerList for a list of managed instance
12225	// groups that exist in th regional scope.
12226	Kind string `json:"kind,omitempty"`
12227
12228	// NextPageToken: [Output Only] This token allows you to get the next
12229	// page of results for list requests. If the number of results is larger
12230	// than maxResults, use the nextPageToken as a value for the query
12231	// parameter pageToken in the next list request. Subsequent list
12232	// requests will have their own nextPageToken to continue paging through
12233	// the results.
12234	NextPageToken string `json:"nextPageToken,omitempty"`
12235
12236	// SelfLink: [Output Only] Server-defined URL for this resource.
12237	SelfLink string `json:"selfLink,omitempty"`
12238
12239	// ServerResponse contains the HTTP response code and headers from the
12240	// server.
12241	googleapi.ServerResponse `json:"-"`
12242
12243	// ForceSendFields is a list of field names (e.g. "Id") to
12244	// unconditionally include in API requests. By default, fields with
12245	// empty values are omitted from API requests. However, any non-pointer,
12246	// non-interface field appearing in ForceSendFields will be sent to the
12247	// server regardless of whether the field is empty or not. This may be
12248	// used to include empty fields in Patch requests.
12249	ForceSendFields []string `json:"-"`
12250
12251	// NullFields is a list of field names (e.g. "Id") to include in API
12252	// requests with the JSON null value. By default, fields with empty
12253	// values are omitted from API requests. However, any field with an
12254	// empty value appearing in NullFields will be sent to the server as
12255	// null. It is an error if a field in this list has a non-empty value.
12256	// This may be used to include null fields in Patch requests.
12257	NullFields []string `json:"-"`
12258}
12259
12260func (s *RegionInstanceGroupManagerList) MarshalJSON() ([]byte, error) {
12261	type noMethod RegionInstanceGroupManagerList
12262	raw := noMethod(*s)
12263	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12264}
12265
12266type RegionInstanceGroupManagersAbandonInstancesRequest struct {
12267	// Instances: The URLs of one or more instances to abandon. This can be
12268	// a full URL or a partial URL, such as
12269	// zones/[ZONE]/instances/[INSTANCE_NAME].
12270	Instances []string `json:"instances,omitempty"`
12271
12272	// ForceSendFields is a list of field names (e.g. "Instances") to
12273	// unconditionally include in API requests. By default, fields with
12274	// empty values are omitted from API requests. However, any non-pointer,
12275	// non-interface field appearing in ForceSendFields will be sent to the
12276	// server regardless of whether the field is empty or not. This may be
12277	// used to include empty fields in Patch requests.
12278	ForceSendFields []string `json:"-"`
12279
12280	// NullFields is a list of field names (e.g. "Instances") to include in
12281	// API requests with the JSON null value. By default, fields with empty
12282	// values are omitted from API requests. However, any field with an
12283	// empty value appearing in NullFields will be sent to the server as
12284	// null. It is an error if a field in this list has a non-empty value.
12285	// This may be used to include null fields in Patch requests.
12286	NullFields []string `json:"-"`
12287}
12288
12289func (s *RegionInstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) {
12290	type noMethod RegionInstanceGroupManagersAbandonInstancesRequest
12291	raw := noMethod(*s)
12292	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12293}
12294
12295type RegionInstanceGroupManagersDeleteInstancesRequest struct {
12296	// Instances: The URLs of one or more instances to delete. This can be a
12297	// full URL or a partial URL, such as
12298	// zones/[ZONE]/instances/[INSTANCE_NAME].
12299	Instances []string `json:"instances,omitempty"`
12300
12301	// ForceSendFields is a list of field names (e.g. "Instances") to
12302	// unconditionally include in API requests. By default, fields with
12303	// empty values are omitted from API requests. However, any non-pointer,
12304	// non-interface field appearing in ForceSendFields will be sent to the
12305	// server regardless of whether the field is empty or not. This may be
12306	// used to include empty fields in Patch requests.
12307	ForceSendFields []string `json:"-"`
12308
12309	// NullFields is a list of field names (e.g. "Instances") to include in
12310	// API requests with the JSON null value. By default, fields with empty
12311	// values are omitted from API requests. However, any field with an
12312	// empty value appearing in NullFields will be sent to the server as
12313	// null. It is an error if a field in this list has a non-empty value.
12314	// This may be used to include null fields in Patch requests.
12315	NullFields []string `json:"-"`
12316}
12317
12318func (s *RegionInstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) {
12319	type noMethod RegionInstanceGroupManagersDeleteInstancesRequest
12320	raw := noMethod(*s)
12321	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12322}
12323
12324type RegionInstanceGroupManagersListInstancesResponse struct {
12325	// ManagedInstances: List of managed instances.
12326	ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"`
12327
12328	// NextPageToken: [Output Only] This token allows you to get the next
12329	// page of results for list requests. If the number of results is larger
12330	// than maxResults, use the nextPageToken as a value for the query
12331	// parameter pageToken in the next list request. Subsequent list
12332	// requests will have their own nextPageToken to continue paging through
12333	// the results.
12334	NextPageToken string `json:"nextPageToken,omitempty"`
12335
12336	// ServerResponse contains the HTTP response code and headers from the
12337	// server.
12338	googleapi.ServerResponse `json:"-"`
12339
12340	// ForceSendFields is a list of field names (e.g. "ManagedInstances") to
12341	// unconditionally include in API requests. By default, fields with
12342	// empty values are omitted from API requests. However, any non-pointer,
12343	// non-interface field appearing in ForceSendFields will be sent to the
12344	// server regardless of whether the field is empty or not. This may be
12345	// used to include empty fields in Patch requests.
12346	ForceSendFields []string `json:"-"`
12347
12348	// NullFields is a list of field names (e.g. "ManagedInstances") to
12349	// include in API requests with the JSON null value. By default, fields
12350	// with empty values are omitted from API requests. However, any field
12351	// with an empty value appearing in NullFields will be sent to the
12352	// server as null. It is an error if a field in this list has a
12353	// non-empty value. This may be used to include null fields in Patch
12354	// requests.
12355	NullFields []string `json:"-"`
12356}
12357
12358func (s *RegionInstanceGroupManagersListInstancesResponse) MarshalJSON() ([]byte, error) {
12359	type noMethod RegionInstanceGroupManagersListInstancesResponse
12360	raw := noMethod(*s)
12361	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12362}
12363
12364type RegionInstanceGroupManagersRecreateRequest struct {
12365	// Instances: The URLs of one or more instances to recreate. This can be
12366	// a full URL or a partial URL, such as
12367	// zones/[ZONE]/instances/[INSTANCE_NAME].
12368	Instances []string `json:"instances,omitempty"`
12369
12370	// ForceSendFields is a list of field names (e.g. "Instances") to
12371	// unconditionally include in API requests. By default, fields with
12372	// empty values are omitted from API requests. However, any non-pointer,
12373	// non-interface field appearing in ForceSendFields will be sent to the
12374	// server regardless of whether the field is empty or not. This may be
12375	// used to include empty fields in Patch requests.
12376	ForceSendFields []string `json:"-"`
12377
12378	// NullFields is a list of field names (e.g. "Instances") to include in
12379	// API requests with the JSON null value. By default, fields with empty
12380	// values are omitted from API requests. However, any field with an
12381	// empty value appearing in NullFields will be sent to the server as
12382	// null. It is an error if a field in this list has a non-empty value.
12383	// This may be used to include null fields in Patch requests.
12384	NullFields []string `json:"-"`
12385}
12386
12387func (s *RegionInstanceGroupManagersRecreateRequest) MarshalJSON() ([]byte, error) {
12388	type noMethod RegionInstanceGroupManagersRecreateRequest
12389	raw := noMethod(*s)
12390	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12391}
12392
12393type RegionInstanceGroupManagersSetAutoHealingRequest struct {
12394	AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"`
12395
12396	// ForceSendFields is a list of field names (e.g. "AutoHealingPolicies")
12397	// to unconditionally include in API requests. By default, fields with
12398	// empty values are omitted from API requests. However, any non-pointer,
12399	// non-interface field appearing in ForceSendFields will be sent to the
12400	// server regardless of whether the field is empty or not. This may be
12401	// used to include empty fields in Patch requests.
12402	ForceSendFields []string `json:"-"`
12403
12404	// NullFields is a list of field names (e.g. "AutoHealingPolicies") to
12405	// include in API requests with the JSON null value. By default, fields
12406	// with empty values are omitted from API requests. However, any field
12407	// with an empty value appearing in NullFields will be sent to the
12408	// server as null. It is an error if a field in this list has a
12409	// non-empty value. This may be used to include null fields in Patch
12410	// requests.
12411	NullFields []string `json:"-"`
12412}
12413
12414func (s *RegionInstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) {
12415	type noMethod RegionInstanceGroupManagersSetAutoHealingRequest
12416	raw := noMethod(*s)
12417	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12418}
12419
12420type RegionInstanceGroupManagersSetTargetPoolsRequest struct {
12421	// Fingerprint: Fingerprint of the target pools information, which is a
12422	// hash of the contents. This field is used for optimistic locking when
12423	// you update the target pool entries. This field is optional.
12424	Fingerprint string `json:"fingerprint,omitempty"`
12425
12426	// TargetPools: The URL of all TargetPool resources to which instances
12427	// in the instanceGroup field are added. The target pools automatically
12428	// apply to all of the instances in the managed instance group.
12429	TargetPools []string `json:"targetPools,omitempty"`
12430
12431	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
12432	// unconditionally include in API requests. By default, fields with
12433	// empty values are omitted from API requests. However, any non-pointer,
12434	// non-interface field appearing in ForceSendFields will be sent to the
12435	// server regardless of whether the field is empty or not. This may be
12436	// used to include empty fields in Patch requests.
12437	ForceSendFields []string `json:"-"`
12438
12439	// NullFields is a list of field names (e.g. "Fingerprint") to include
12440	// in API requests with the JSON null value. By default, fields with
12441	// empty values are omitted from API requests. However, any field with
12442	// an empty value appearing in NullFields will be sent to the server as
12443	// null. It is an error if a field in this list has a non-empty value.
12444	// This may be used to include null fields in Patch requests.
12445	NullFields []string `json:"-"`
12446}
12447
12448func (s *RegionInstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) {
12449	type noMethod RegionInstanceGroupManagersSetTargetPoolsRequest
12450	raw := noMethod(*s)
12451	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12452}
12453
12454type RegionInstanceGroupManagersSetTemplateRequest struct {
12455	// InstanceTemplate: URL of the InstanceTemplate resource from which all
12456	// new instances will be created.
12457	InstanceTemplate string `json:"instanceTemplate,omitempty"`
12458
12459	// ForceSendFields is a list of field names (e.g. "InstanceTemplate") to
12460	// unconditionally include in API requests. By default, fields with
12461	// empty values are omitted from API requests. However, any non-pointer,
12462	// non-interface field appearing in ForceSendFields will be sent to the
12463	// server regardless of whether the field is empty or not. This may be
12464	// used to include empty fields in Patch requests.
12465	ForceSendFields []string `json:"-"`
12466
12467	// NullFields is a list of field names (e.g. "InstanceTemplate") to
12468	// include in API requests with the JSON null value. By default, fields
12469	// with empty values are omitted from API requests. However, any field
12470	// with an empty value appearing in NullFields will be sent to the
12471	// server as null. It is an error if a field in this list has a
12472	// non-empty value. This may be used to include null fields in Patch
12473	// requests.
12474	NullFields []string `json:"-"`
12475}
12476
12477func (s *RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, error) {
12478	type noMethod RegionInstanceGroupManagersSetTemplateRequest
12479	raw := noMethod(*s)
12480	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12481}
12482
12483type RegionInstanceGroupsListInstances struct {
12484	// Id: [Output Only] Unique identifier for the resource; defined by the
12485	// server.
12486	Id string `json:"id,omitempty"`
12487
12488	// Items: A list of InstanceWithNamedPorts resources.
12489	Items []*InstanceWithNamedPorts `json:"items,omitempty"`
12490
12491	// Kind: The resource type.
12492	Kind string `json:"kind,omitempty"`
12493
12494	// NextPageToken: [Output Only] This token allows you to get the next
12495	// page of results for list requests. If the number of results is larger
12496	// than maxResults, use the nextPageToken as a value for the query
12497	// parameter pageToken in the next list request. Subsequent list
12498	// requests will have their own nextPageToken to continue paging through
12499	// the results.
12500	NextPageToken string `json:"nextPageToken,omitempty"`
12501
12502	// SelfLink: [Output Only] Server-defined URL for this resource.
12503	SelfLink string `json:"selfLink,omitempty"`
12504
12505	// ServerResponse contains the HTTP response code and headers from the
12506	// server.
12507	googleapi.ServerResponse `json:"-"`
12508
12509	// ForceSendFields is a list of field names (e.g. "Id") to
12510	// unconditionally include in API requests. By default, fields with
12511	// empty values are omitted from API requests. However, any non-pointer,
12512	// non-interface field appearing in ForceSendFields will be sent to the
12513	// server regardless of whether the field is empty or not. This may be
12514	// used to include empty fields in Patch requests.
12515	ForceSendFields []string `json:"-"`
12516
12517	// NullFields is a list of field names (e.g. "Id") to include in API
12518	// requests with the JSON null value. By default, fields with empty
12519	// values are omitted from API requests. However, any field with an
12520	// empty value appearing in NullFields will be sent to the server as
12521	// null. It is an error if a field in this list has a non-empty value.
12522	// This may be used to include null fields in Patch requests.
12523	NullFields []string `json:"-"`
12524}
12525
12526func (s *RegionInstanceGroupsListInstances) MarshalJSON() ([]byte, error) {
12527	type noMethod RegionInstanceGroupsListInstances
12528	raw := noMethod(*s)
12529	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12530}
12531
12532type RegionInstanceGroupsListInstancesRequest struct {
12533	// InstanceState: Instances in which state should be returned. Valid
12534	// options are: 'ALL', 'RUNNING'. By default, it lists all instances.
12535	//
12536	// Possible values:
12537	//   "ALL"
12538	//   "RUNNING"
12539	InstanceState string `json:"instanceState,omitempty"`
12540
12541	// PortName: Name of port user is interested in. It is optional. If it
12542	// is set, only information about this ports will be returned. If it is
12543	// not set, all the named ports will be returned. Always lists all
12544	// instances.
12545	PortName string `json:"portName,omitempty"`
12546
12547	// ForceSendFields is a list of field names (e.g. "InstanceState") to
12548	// unconditionally include in API requests. By default, fields with
12549	// empty values are omitted from API requests. However, any non-pointer,
12550	// non-interface field appearing in ForceSendFields will be sent to the
12551	// server regardless of whether the field is empty or not. This may be
12552	// used to include empty fields in Patch requests.
12553	ForceSendFields []string `json:"-"`
12554
12555	// NullFields is a list of field names (e.g. "InstanceState") to include
12556	// in API requests with the JSON null value. By default, fields with
12557	// empty values are omitted from API requests. However, any field with
12558	// an empty value appearing in NullFields will be sent to the server as
12559	// null. It is an error if a field in this list has a non-empty value.
12560	// This may be used to include null fields in Patch requests.
12561	NullFields []string `json:"-"`
12562}
12563
12564func (s *RegionInstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) {
12565	type noMethod RegionInstanceGroupsListInstancesRequest
12566	raw := noMethod(*s)
12567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12568}
12569
12570type RegionInstanceGroupsSetNamedPortsRequest struct {
12571	// Fingerprint: The fingerprint of the named ports information for this
12572	// instance group. Use this optional property to prevent conflicts when
12573	// multiple users change the named ports settings concurrently. Obtain
12574	// the fingerprint with the instanceGroups.get method. Then, include the
12575	// fingerprint in your request to ensure that you do not overwrite
12576	// changes that were applied from another concurrent request.
12577	Fingerprint string `json:"fingerprint,omitempty"`
12578
12579	// NamedPorts: The list of named ports to set for this instance group.
12580	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
12581
12582	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
12583	// unconditionally include in API requests. By default, fields with
12584	// empty values are omitted from API requests. However, any non-pointer,
12585	// non-interface field appearing in ForceSendFields will be sent to the
12586	// server regardless of whether the field is empty or not. This may be
12587	// used to include empty fields in Patch requests.
12588	ForceSendFields []string `json:"-"`
12589
12590	// NullFields is a list of field names (e.g. "Fingerprint") to include
12591	// in API requests with the JSON null value. By default, fields with
12592	// empty values are omitted from API requests. However, any field with
12593	// an empty value appearing in NullFields will be sent to the server as
12594	// null. It is an error if a field in this list has a non-empty value.
12595	// This may be used to include null fields in Patch requests.
12596	NullFields []string `json:"-"`
12597}
12598
12599func (s *RegionInstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) {
12600	type noMethod RegionInstanceGroupsSetNamedPortsRequest
12601	raw := noMethod(*s)
12602	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12603}
12604
12605// RegionList: Contains a list of region resources.
12606type RegionList struct {
12607	// Id: [Output Only] Unique identifier for the resource; defined by the
12608	// server.
12609	Id string `json:"id,omitempty"`
12610
12611	// Items: A list of Region resources.
12612	Items []*Region `json:"items,omitempty"`
12613
12614	// Kind: [Output Only] Type of resource. Always compute#regionList for
12615	// lists of regions.
12616	Kind string `json:"kind,omitempty"`
12617
12618	// NextPageToken: [Output Only] This token allows you to get the next
12619	// page of results for list requests. If the number of results is larger
12620	// than maxResults, use the nextPageToken as a value for the query
12621	// parameter pageToken in the next list request. Subsequent list
12622	// requests will have their own nextPageToken to continue paging through
12623	// the results.
12624	NextPageToken string `json:"nextPageToken,omitempty"`
12625
12626	// SelfLink: [Output Only] Server-defined URL for this resource.
12627	SelfLink string `json:"selfLink,omitempty"`
12628
12629	// ServerResponse contains the HTTP response code and headers from the
12630	// server.
12631	googleapi.ServerResponse `json:"-"`
12632
12633	// ForceSendFields is a list of field names (e.g. "Id") to
12634	// unconditionally include in API requests. By default, fields with
12635	// empty values are omitted from API requests. However, any non-pointer,
12636	// non-interface field appearing in ForceSendFields will be sent to the
12637	// server regardless of whether the field is empty or not. This may be
12638	// used to include empty fields in Patch requests.
12639	ForceSendFields []string `json:"-"`
12640
12641	// NullFields is a list of field names (e.g. "Id") to include in API
12642	// requests with the JSON null value. By default, fields with empty
12643	// values are omitted from API requests. However, any field with an
12644	// empty value appearing in NullFields will be sent to the server as
12645	// null. It is an error if a field in this list has a non-empty value.
12646	// This may be used to include null fields in Patch requests.
12647	NullFields []string `json:"-"`
12648}
12649
12650func (s *RegionList) MarshalJSON() ([]byte, error) {
12651	type noMethod RegionList
12652	raw := noMethod(*s)
12653	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12654}
12655
12656type RegionSetLabelsRequest struct {
12657	// LabelFingerprint: The fingerprint of the previous set of labels for
12658	// this resource, used to detect conflicts. The fingerprint is initially
12659	// generated by Compute Engine and changes after every request to modify
12660	// or update labels. You must always provide an up-to-date fingerprint
12661	// hash in order to update or change labels. Make a get() request to the
12662	// resource to get the latest fingerprint.
12663	LabelFingerprint string `json:"labelFingerprint,omitempty"`
12664
12665	// Labels: The labels to set for this resource.
12666	Labels map[string]string `json:"labels,omitempty"`
12667
12668	// ForceSendFields is a list of field names (e.g. "LabelFingerprint") to
12669	// unconditionally include in API requests. By default, fields with
12670	// empty values are omitted from API requests. However, any non-pointer,
12671	// non-interface field appearing in ForceSendFields will be sent to the
12672	// server regardless of whether the field is empty or not. This may be
12673	// used to include empty fields in Patch requests.
12674	ForceSendFields []string `json:"-"`
12675
12676	// NullFields is a list of field names (e.g. "LabelFingerprint") to
12677	// include in API requests with the JSON null value. By default, fields
12678	// with empty values are omitted from API requests. However, any field
12679	// with an empty value appearing in NullFields will be sent to the
12680	// server as null. It is an error if a field in this list has a
12681	// non-empty value. This may be used to include null fields in Patch
12682	// requests.
12683	NullFields []string `json:"-"`
12684}
12685
12686func (s *RegionSetLabelsRequest) MarshalJSON() ([]byte, error) {
12687	type noMethod RegionSetLabelsRequest
12688	raw := noMethod(*s)
12689	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12690}
12691
12692// ResourceCommitment: Commitment for a particular resource (a
12693// Commitment is composed of one or more of these).
12694type ResourceCommitment struct {
12695	// Amount: The amount of the resource purchased (in a type-dependent
12696	// unit, such as bytes). For vCPUs, this can just be an integer. For
12697	// memory, this must be provided in MB. Memory must be a multiple of 256
12698	// MB, with up to 6.5GB of memory per every vCPU.
12699	Amount int64 `json:"amount,omitempty,string"`
12700
12701	// Type: Type of resource for which this commitment applies. Possible
12702	// values are VCPU and MEMORY
12703	//
12704	// Possible values:
12705	//   "MEMORY"
12706	//   "UNSPECIFIED"
12707	//   "VCPU"
12708	Type string `json:"type,omitempty"`
12709
12710	// ForceSendFields is a list of field names (e.g. "Amount") to
12711	// unconditionally include in API requests. By default, fields with
12712	// empty values are omitted from API requests. However, any non-pointer,
12713	// non-interface field appearing in ForceSendFields will be sent to the
12714	// server regardless of whether the field is empty or not. This may be
12715	// used to include empty fields in Patch requests.
12716	ForceSendFields []string `json:"-"`
12717
12718	// NullFields is a list of field names (e.g. "Amount") to include in API
12719	// requests with the JSON null value. By default, fields with empty
12720	// values are omitted from API requests. However, any field with an
12721	// empty value appearing in NullFields will be sent to the server as
12722	// null. It is an error if a field in this list has a non-empty value.
12723	// This may be used to include null fields in Patch requests.
12724	NullFields []string `json:"-"`
12725}
12726
12727func (s *ResourceCommitment) MarshalJSON() ([]byte, error) {
12728	type noMethod ResourceCommitment
12729	raw := noMethod(*s)
12730	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12731}
12732
12733type ResourceGroupReference struct {
12734	// Group: A URI referencing one of the instance groups listed in the
12735	// backend service.
12736	Group string `json:"group,omitempty"`
12737
12738	// ForceSendFields is a list of field names (e.g. "Group") to
12739	// unconditionally include in API requests. By default, fields with
12740	// empty values are omitted from API requests. However, any non-pointer,
12741	// non-interface field appearing in ForceSendFields will be sent to the
12742	// server regardless of whether the field is empty or not. This may be
12743	// used to include empty fields in Patch requests.
12744	ForceSendFields []string `json:"-"`
12745
12746	// NullFields is a list of field names (e.g. "Group") to include in API
12747	// requests with the JSON null value. By default, fields with empty
12748	// values are omitted from API requests. However, any field with an
12749	// empty value appearing in NullFields will be sent to the server as
12750	// null. It is an error if a field in this list has a non-empty value.
12751	// This may be used to include null fields in Patch requests.
12752	NullFields []string `json:"-"`
12753}
12754
12755func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) {
12756	type noMethod ResourceGroupReference
12757	raw := noMethod(*s)
12758	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12759}
12760
12761// Route: Represents a Route resource. A route specifies how certain
12762// packets should be handled by the network. Routes are associated with
12763// instances by tags and the set of routes for a particular instance is
12764// called its routing table.
12765//
12766// For each packet leaving an instance, the system searches that
12767// instance's routing table for a single best matching route. Routes
12768// match packets by destination IP address, preferring smaller or more
12769// specific ranges over larger ones. If there is a tie, the system
12770// selects the route with the smallest priority value. If there is still
12771// a tie, it uses the layer three and four packet headers to select just
12772// one of the remaining matching routes. The packet is then forwarded as
12773// specified by the nextHop field of the winning route - either to
12774// another instance destination, an instance gateway, or a Google
12775// Compute Engine-operated gateway.
12776//
12777// Packets that do not match any route in the sending instance's routing
12778// table are dropped.
12779type Route struct {
12780	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
12781	// format.
12782	CreationTimestamp string `json:"creationTimestamp,omitempty"`
12783
12784	// Description: An optional description of this resource. Provide this
12785	// property when you create the resource.
12786	Description string `json:"description,omitempty"`
12787
12788	// DestRange: The destination range of outgoing packets that this route
12789	// applies to. Only IPv4 is supported.
12790	DestRange string `json:"destRange,omitempty"`
12791
12792	// Id: [Output Only] The unique identifier for the resource. This
12793	// identifier is defined by the server.
12794	Id uint64 `json:"id,omitempty,string"`
12795
12796	// Kind: [Output Only] Type of this resource. Always compute#routes for
12797	// Route resources.
12798	Kind string `json:"kind,omitempty"`
12799
12800	// Name: Name of the resource. Provided by the client when the resource
12801	// is created. The name must be 1-63 characters long, and comply with
12802	// RFC1035. Specifically, the name must be 1-63 characters long and
12803	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
12804	// the first character must be a lowercase letter, and all following
12805	// characters must be a dash, lowercase letter, or digit, except the
12806	// last character, which cannot be a dash.
12807	Name string `json:"name,omitempty"`
12808
12809	// Network: Fully-qualified URL of the network that this route applies
12810	// to.
12811	Network string `json:"network,omitempty"`
12812
12813	// NextHopGateway: The URL to a gateway that should handle matching
12814	// packets. You can only specify the internet gateway using a full or
12815	// partial valid URL:
12816	// projects/<project-id>/global/gateways/default-internet-gateway
12817	NextHopGateway string `json:"nextHopGateway,omitempty"`
12818
12819	// NextHopInstance: The URL to an instance that should handle matching
12820	// packets. You can specify this as a full or partial URL. For
12821	// example:
12822	// https://www.googleapis.com/compute/v1/projects/project/zones/
12823	// zone/instances/
12824	NextHopInstance string `json:"nextHopInstance,omitempty"`
12825
12826	// NextHopIp: The network IP address of an instance that should handle
12827	// matching packets. Only IPv4 is supported.
12828	NextHopIp string `json:"nextHopIp,omitempty"`
12829
12830	// NextHopNetwork: The URL of the local network if it should handle
12831	// matching packets.
12832	NextHopNetwork string `json:"nextHopNetwork,omitempty"`
12833
12834	// NextHopPeering: [Output Only] The network peering name that should
12835	// handle matching packets, which should conform to RFC1035.
12836	NextHopPeering string `json:"nextHopPeering,omitempty"`
12837
12838	// NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching
12839	// packets.
12840	NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"`
12841
12842	// Priority: The priority of this route. Priority is used to break ties
12843	// in cases where there is more than one matching route of equal prefix
12844	// length. In the case of two routes with equal prefix length, the one
12845	// with the lowest-numbered priority value wins. Default value is 1000.
12846	// Valid range is 0 through 65535.
12847	Priority int64 `json:"priority,omitempty"`
12848
12849	// SelfLink: [Output Only] Server-defined fully-qualified URL for this
12850	// resource.
12851	SelfLink string `json:"selfLink,omitempty"`
12852
12853	// Tags: A list of instance tags to which this route applies.
12854	Tags []string `json:"tags,omitempty"`
12855
12856	// Warnings: [Output Only] If potential misconfigurations are detected
12857	// for this route, this field will be populated with warning messages.
12858	Warnings []*RouteWarnings `json:"warnings,omitempty"`
12859
12860	// ServerResponse contains the HTTP response code and headers from the
12861	// server.
12862	googleapi.ServerResponse `json:"-"`
12863
12864	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
12865	// to unconditionally include in API requests. By default, fields with
12866	// empty values are omitted from API requests. However, any non-pointer,
12867	// non-interface field appearing in ForceSendFields will be sent to the
12868	// server regardless of whether the field is empty or not. This may be
12869	// used to include empty fields in Patch requests.
12870	ForceSendFields []string `json:"-"`
12871
12872	// NullFields is a list of field names (e.g. "CreationTimestamp") to
12873	// include in API requests with the JSON null value. By default, fields
12874	// with empty values are omitted from API requests. However, any field
12875	// with an empty value appearing in NullFields will be sent to the
12876	// server as null. It is an error if a field in this list has a
12877	// non-empty value. This may be used to include null fields in Patch
12878	// requests.
12879	NullFields []string `json:"-"`
12880}
12881
12882func (s *Route) MarshalJSON() ([]byte, error) {
12883	type noMethod Route
12884	raw := noMethod(*s)
12885	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12886}
12887
12888type RouteWarnings struct {
12889	// Code: [Output Only] A warning code, if applicable. For example,
12890	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
12891	// the response.
12892	//
12893	// Possible values:
12894	//   "CLEANUP_FAILED"
12895	//   "DEPRECATED_RESOURCE_USED"
12896	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
12897	//   "FIELD_VALUE_OVERRIDEN"
12898	//   "INJECTED_KERNELS_DEPRECATED"
12899	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
12900	//   "NEXT_HOP_CANNOT_IP_FORWARD"
12901	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
12902	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
12903	//   "NEXT_HOP_NOT_RUNNING"
12904	//   "NOT_CRITICAL_ERROR"
12905	//   "NO_RESULTS_ON_PAGE"
12906	//   "REQUIRED_TOS_AGREEMENT"
12907	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
12908	//   "RESOURCE_NOT_DELETED"
12909	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
12910	//   "UNREACHABLE"
12911	Code string `json:"code,omitempty"`
12912
12913	// Data: [Output Only] Metadata about this warning in key: value format.
12914	// For example:
12915	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
12916	Data []*RouteWarningsData `json:"data,omitempty"`
12917
12918	// Message: [Output Only] A human-readable description of the warning
12919	// code.
12920	Message string `json:"message,omitempty"`
12921
12922	// ForceSendFields is a list of field names (e.g. "Code") to
12923	// unconditionally include in API requests. By default, fields with
12924	// empty values are omitted from API requests. However, any non-pointer,
12925	// non-interface field appearing in ForceSendFields will be sent to the
12926	// server regardless of whether the field is empty or not. This may be
12927	// used to include empty fields in Patch requests.
12928	ForceSendFields []string `json:"-"`
12929
12930	// NullFields is a list of field names (e.g. "Code") to include in API
12931	// requests with the JSON null value. By default, fields with empty
12932	// values are omitted from API requests. However, any field with an
12933	// empty value appearing in NullFields will be sent to the server as
12934	// null. It is an error if a field in this list has a non-empty value.
12935	// This may be used to include null fields in Patch requests.
12936	NullFields []string `json:"-"`
12937}
12938
12939func (s *RouteWarnings) MarshalJSON() ([]byte, error) {
12940	type noMethod RouteWarnings
12941	raw := noMethod(*s)
12942	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12943}
12944
12945type RouteWarningsData struct {
12946	// Key: [Output Only] A key that provides more detail on the warning
12947	// being returned. For example, for warnings where there are no results
12948	// in a list request for a particular zone, this key might be scope and
12949	// the key value might be the zone name. Other examples might be a key
12950	// indicating a deprecated resource and a suggested replacement, or a
12951	// warning about invalid network settings (for example, if an instance
12952	// attempts to perform IP forwarding but is not enabled for IP
12953	// forwarding).
12954	Key string `json:"key,omitempty"`
12955
12956	// Value: [Output Only] A warning data value corresponding to the key.
12957	Value string `json:"value,omitempty"`
12958
12959	// ForceSendFields is a list of field names (e.g. "Key") to
12960	// unconditionally include in API requests. By default, fields with
12961	// empty values are omitted from API requests. However, any non-pointer,
12962	// non-interface field appearing in ForceSendFields will be sent to the
12963	// server regardless of whether the field is empty or not. This may be
12964	// used to include empty fields in Patch requests.
12965	ForceSendFields []string `json:"-"`
12966
12967	// NullFields is a list of field names (e.g. "Key") to include in API
12968	// requests with the JSON null value. By default, fields with empty
12969	// values are omitted from API requests. However, any field with an
12970	// empty value appearing in NullFields will be sent to the server as
12971	// null. It is an error if a field in this list has a non-empty value.
12972	// This may be used to include null fields in Patch requests.
12973	NullFields []string `json:"-"`
12974}
12975
12976func (s *RouteWarningsData) MarshalJSON() ([]byte, error) {
12977	type noMethod RouteWarningsData
12978	raw := noMethod(*s)
12979	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12980}
12981
12982// RouteList: Contains a list of Route resources.
12983type RouteList struct {
12984	// Id: [Output Only] Unique identifier for the resource; defined by the
12985	// server.
12986	Id string `json:"id,omitempty"`
12987
12988	// Items: A list of Route resources.
12989	Items []*Route `json:"items,omitempty"`
12990
12991	// Kind: Type of resource.
12992	Kind string `json:"kind,omitempty"`
12993
12994	// NextPageToken: [Output Only] This token allows you to get the next
12995	// page of results for list requests. If the number of results is larger
12996	// than maxResults, use the nextPageToken as a value for the query
12997	// parameter pageToken in the next list request. Subsequent list
12998	// requests will have their own nextPageToken to continue paging through
12999	// the results.
13000	NextPageToken string `json:"nextPageToken,omitempty"`
13001
13002	// SelfLink: [Output Only] Server-defined URL for this resource.
13003	SelfLink string `json:"selfLink,omitempty"`
13004
13005	// ServerResponse contains the HTTP response code and headers from the
13006	// server.
13007	googleapi.ServerResponse `json:"-"`
13008
13009	// ForceSendFields is a list of field names (e.g. "Id") to
13010	// unconditionally include in API requests. By default, fields with
13011	// empty values are omitted from API requests. However, any non-pointer,
13012	// non-interface field appearing in ForceSendFields will be sent to the
13013	// server regardless of whether the field is empty or not. This may be
13014	// used to include empty fields in Patch requests.
13015	ForceSendFields []string `json:"-"`
13016
13017	// NullFields is a list of field names (e.g. "Id") to include in API
13018	// requests with the JSON null value. By default, fields with empty
13019	// values are omitted from API requests. However, any field with an
13020	// empty value appearing in NullFields will be sent to the server as
13021	// null. It is an error if a field in this list has a non-empty value.
13022	// This may be used to include null fields in Patch requests.
13023	NullFields []string `json:"-"`
13024}
13025
13026func (s *RouteList) MarshalJSON() ([]byte, error) {
13027	type noMethod RouteList
13028	raw := noMethod(*s)
13029	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13030}
13031
13032// Router: Router resource.
13033type Router struct {
13034	// Bgp: BGP information specific to this router.
13035	Bgp *RouterBgp `json:"bgp,omitempty"`
13036
13037	// BgpPeers: BGP information that needs to be configured into the
13038	// routing stack to establish the BGP peering. It must specify peer ASN
13039	// and either interface name, IP, or peer IP. Please refer to RFC4273.
13040	BgpPeers []*RouterBgpPeer `json:"bgpPeers,omitempty"`
13041
13042	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
13043	// format.
13044	CreationTimestamp string `json:"creationTimestamp,omitempty"`
13045
13046	// Description: An optional description of this resource. Provide this
13047	// property when you create the resource.
13048	Description string `json:"description,omitempty"`
13049
13050	// Id: [Output Only] The unique identifier for the resource. This
13051	// identifier is defined by the server.
13052	Id uint64 `json:"id,omitempty,string"`
13053
13054	// Interfaces: Router interfaces. Each interface requires either one
13055	// linked resource (e.g. linkedVpnTunnel), or IP address and IP address
13056	// range (e.g. ipRange), or both.
13057	Interfaces []*RouterInterface `json:"interfaces,omitempty"`
13058
13059	// Kind: [Output Only] Type of resource. Always compute#router for
13060	// routers.
13061	Kind string `json:"kind,omitempty"`
13062
13063	// Name: Name of the resource. Provided by the client when the resource
13064	// is created. The name must be 1-63 characters long, and comply with
13065	// RFC1035. Specifically, the name must be 1-63 characters long and
13066	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
13067	// the first character must be a lowercase letter, and all following
13068	// characters must be a dash, lowercase letter, or digit, except the
13069	// last character, which cannot be a dash.
13070	Name string `json:"name,omitempty"`
13071
13072	// Network: URI of the network to which this router belongs.
13073	Network string `json:"network,omitempty"`
13074
13075	// Region: [Output Only] URI of the region where the router resides.
13076	Region string `json:"region,omitempty"`
13077
13078	// SelfLink: [Output Only] Server-defined URL for the resource.
13079	SelfLink string `json:"selfLink,omitempty"`
13080
13081	// ServerResponse contains the HTTP response code and headers from the
13082	// server.
13083	googleapi.ServerResponse `json:"-"`
13084
13085	// ForceSendFields is a list of field names (e.g. "Bgp") to
13086	// unconditionally include in API requests. By default, fields with
13087	// empty values are omitted from API requests. However, any non-pointer,
13088	// non-interface field appearing in ForceSendFields will be sent to the
13089	// server regardless of whether the field is empty or not. This may be
13090	// used to include empty fields in Patch requests.
13091	ForceSendFields []string `json:"-"`
13092
13093	// NullFields is a list of field names (e.g. "Bgp") to include in API
13094	// requests with the JSON null value. By default, fields with empty
13095	// values are omitted from API requests. However, any field with an
13096	// empty value appearing in NullFields will be sent to the server as
13097	// null. It is an error if a field in this list has a non-empty value.
13098	// This may be used to include null fields in Patch requests.
13099	NullFields []string `json:"-"`
13100}
13101
13102func (s *Router) MarshalJSON() ([]byte, error) {
13103	type noMethod Router
13104	raw := noMethod(*s)
13105	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13106}
13107
13108// RouterAggregatedList: Contains a list of routers.
13109type RouterAggregatedList struct {
13110	// Id: [Output Only] Unique identifier for the resource; defined by the
13111	// server.
13112	Id string `json:"id,omitempty"`
13113
13114	// Items: A list of Router resources.
13115	Items map[string]RoutersScopedList `json:"items,omitempty"`
13116
13117	// Kind: Type of resource.
13118	Kind string `json:"kind,omitempty"`
13119
13120	// NextPageToken: [Output Only] This token allows you to get the next
13121	// page of results for list requests. If the number of results is larger
13122	// than maxResults, use the nextPageToken as a value for the query
13123	// parameter pageToken in the next list request. Subsequent list
13124	// requests will have their own nextPageToken to continue paging through
13125	// the results.
13126	NextPageToken string `json:"nextPageToken,omitempty"`
13127
13128	// SelfLink: [Output Only] Server-defined URL for this resource.
13129	SelfLink string `json:"selfLink,omitempty"`
13130
13131	// ServerResponse contains the HTTP response code and headers from the
13132	// server.
13133	googleapi.ServerResponse `json:"-"`
13134
13135	// ForceSendFields is a list of field names (e.g. "Id") to
13136	// unconditionally include in API requests. By default, fields with
13137	// empty values are omitted from API requests. However, any non-pointer,
13138	// non-interface field appearing in ForceSendFields will be sent to the
13139	// server regardless of whether the field is empty or not. This may be
13140	// used to include empty fields in Patch requests.
13141	ForceSendFields []string `json:"-"`
13142
13143	// NullFields is a list of field names (e.g. "Id") to include in API
13144	// requests with the JSON null value. By default, fields with empty
13145	// values are omitted from API requests. However, any field with an
13146	// empty value appearing in NullFields will be sent to the server as
13147	// null. It is an error if a field in this list has a non-empty value.
13148	// This may be used to include null fields in Patch requests.
13149	NullFields []string `json:"-"`
13150}
13151
13152func (s *RouterAggregatedList) MarshalJSON() ([]byte, error) {
13153	type noMethod RouterAggregatedList
13154	raw := noMethod(*s)
13155	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13156}
13157
13158type RouterBgp struct {
13159	// Asn: Local BGP Autonomous System Number (ASN). Must be an RFC6996
13160	// private ASN, either 16-bit or 32-bit. The value will be fixed for
13161	// this router resource. All VPN tunnels that link to this router will
13162	// have the same local ASN.
13163	Asn int64 `json:"asn,omitempty"`
13164
13165	// ForceSendFields is a list of field names (e.g. "Asn") to
13166	// unconditionally include in API requests. By default, fields with
13167	// empty values are omitted from API requests. However, any non-pointer,
13168	// non-interface field appearing in ForceSendFields will be sent to the
13169	// server regardless of whether the field is empty or not. This may be
13170	// used to include empty fields in Patch requests.
13171	ForceSendFields []string `json:"-"`
13172
13173	// NullFields is a list of field names (e.g. "Asn") to include in API
13174	// requests with the JSON null value. By default, fields with empty
13175	// values are omitted from API requests. However, any field with an
13176	// empty value appearing in NullFields will be sent to the server as
13177	// null. It is an error if a field in this list has a non-empty value.
13178	// This may be used to include null fields in Patch requests.
13179	NullFields []string `json:"-"`
13180}
13181
13182func (s *RouterBgp) MarshalJSON() ([]byte, error) {
13183	type noMethod RouterBgp
13184	raw := noMethod(*s)
13185	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13186}
13187
13188type RouterBgpPeer struct {
13189	// AdvertisedRoutePriority: The priority of routes advertised to this
13190	// BGP peer. In the case where there is more than one matching route of
13191	// maximum length, the routes with lowest priority value win.
13192	AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"`
13193
13194	// InterfaceName: Name of the interface the BGP peer is associated with.
13195	InterfaceName string `json:"interfaceName,omitempty"`
13196
13197	// IpAddress: IP address of the interface inside Google Cloud Platform.
13198	// Only IPv4 is supported.
13199	IpAddress string `json:"ipAddress,omitempty"`
13200
13201	// Name: Name of this BGP peer. The name must be 1-63 characters long
13202	// and comply with RFC1035.
13203	Name string `json:"name,omitempty"`
13204
13205	// PeerAsn: Peer BGP Autonomous System Number (ASN). For VPN use case,
13206	// this value can be different for every tunnel.
13207	PeerAsn int64 `json:"peerAsn,omitempty"`
13208
13209	// PeerIpAddress: IP address of the BGP interface outside Google cloud.
13210	// Only IPv4 is supported.
13211	PeerIpAddress string `json:"peerIpAddress,omitempty"`
13212
13213	// ForceSendFields is a list of field names (e.g.
13214	// "AdvertisedRoutePriority") to unconditionally include in API
13215	// requests. By default, fields with empty values are omitted from API
13216	// requests. However, any non-pointer, non-interface field appearing in
13217	// ForceSendFields will be sent to the server regardless of whether the
13218	// field is empty or not. This may be used to include empty fields in
13219	// Patch requests.
13220	ForceSendFields []string `json:"-"`
13221
13222	// NullFields is a list of field names (e.g. "AdvertisedRoutePriority")
13223	// to include in API requests with the JSON null value. By default,
13224	// fields with empty values are omitted from API requests. However, any
13225	// field with an empty value appearing in NullFields will be sent to the
13226	// server as null. It is an error if a field in this list has a
13227	// non-empty value. This may be used to include null fields in Patch
13228	// requests.
13229	NullFields []string `json:"-"`
13230}
13231
13232func (s *RouterBgpPeer) MarshalJSON() ([]byte, error) {
13233	type noMethod RouterBgpPeer
13234	raw := noMethod(*s)
13235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13236}
13237
13238type RouterInterface struct {
13239	// IpRange: IP address and range of the interface. The IP range must be
13240	// in the RFC3927 link-local IP space. The value must be a
13241	// CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not
13242	// truncate the address as it represents the IP address of the
13243	// interface.
13244	IpRange string `json:"ipRange,omitempty"`
13245
13246	// LinkedInterconnectAttachment: URI of the linked interconnect
13247	// attachment. It must be in the same region as the router. Each
13248	// interface can have at most one linked resource and it could either be
13249	// a VPN Tunnel or an interconnect attachment.
13250	LinkedInterconnectAttachment string `json:"linkedInterconnectAttachment,omitempty"`
13251
13252	// LinkedVpnTunnel: URI of the linked VPN tunnel. It must be in the same
13253	// region as the router. Each interface can have at most one linked
13254	// resource and it could either be a VPN Tunnel or an interconnect
13255	// attachment.
13256	LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"`
13257
13258	// Name: Name of this interface entry. The name must be 1-63 characters
13259	// long and comply with RFC1035.
13260	Name string `json:"name,omitempty"`
13261
13262	// ForceSendFields is a list of field names (e.g. "IpRange") to
13263	// unconditionally include in API requests. By default, fields with
13264	// empty values are omitted from API requests. However, any non-pointer,
13265	// non-interface field appearing in ForceSendFields will be sent to the
13266	// server regardless of whether the field is empty or not. This may be
13267	// used to include empty fields in Patch requests.
13268	ForceSendFields []string `json:"-"`
13269
13270	// NullFields is a list of field names (e.g. "IpRange") to include in
13271	// API requests with the JSON null value. By default, fields with empty
13272	// values are omitted from API requests. However, any field with an
13273	// empty value appearing in NullFields will be sent to the server as
13274	// null. It is an error if a field in this list has a non-empty value.
13275	// This may be used to include null fields in Patch requests.
13276	NullFields []string `json:"-"`
13277}
13278
13279func (s *RouterInterface) MarshalJSON() ([]byte, error) {
13280	type noMethod RouterInterface
13281	raw := noMethod(*s)
13282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13283}
13284
13285// RouterList: Contains a list of Router resources.
13286type RouterList struct {
13287	// Id: [Output Only] Unique identifier for the resource; defined by the
13288	// server.
13289	Id string `json:"id,omitempty"`
13290
13291	// Items: A list of Router resources.
13292	Items []*Router `json:"items,omitempty"`
13293
13294	// Kind: [Output Only] Type of resource. Always compute#router for
13295	// routers.
13296	Kind string `json:"kind,omitempty"`
13297
13298	// NextPageToken: [Output Only] This token allows you to get the next
13299	// page of results for list requests. If the number of results is larger
13300	// than maxResults, use the nextPageToken as a value for the query
13301	// parameter pageToken in the next list request. Subsequent list
13302	// requests will have their own nextPageToken to continue paging through
13303	// the results.
13304	NextPageToken string `json:"nextPageToken,omitempty"`
13305
13306	// SelfLink: [Output Only] Server-defined URL for this resource.
13307	SelfLink string `json:"selfLink,omitempty"`
13308
13309	// ServerResponse contains the HTTP response code and headers from the
13310	// server.
13311	googleapi.ServerResponse `json:"-"`
13312
13313	// ForceSendFields is a list of field names (e.g. "Id") to
13314	// unconditionally include in API requests. By default, fields with
13315	// empty values are omitted from API requests. However, any non-pointer,
13316	// non-interface field appearing in ForceSendFields will be sent to the
13317	// server regardless of whether the field is empty or not. This may be
13318	// used to include empty fields in Patch requests.
13319	ForceSendFields []string `json:"-"`
13320
13321	// NullFields is a list of field names (e.g. "Id") to include in API
13322	// requests with the JSON null value. By default, fields with empty
13323	// values are omitted from API requests. However, any field with an
13324	// empty value appearing in NullFields will be sent to the server as
13325	// null. It is an error if a field in this list has a non-empty value.
13326	// This may be used to include null fields in Patch requests.
13327	NullFields []string `json:"-"`
13328}
13329
13330func (s *RouterList) MarshalJSON() ([]byte, error) {
13331	type noMethod RouterList
13332	raw := noMethod(*s)
13333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13334}
13335
13336type RouterStatus struct {
13337	// BestRoutes: Best routes for this router's network.
13338	BestRoutes []*Route `json:"bestRoutes,omitempty"`
13339
13340	// BestRoutesForRouter: Best routes learned by this router.
13341	BestRoutesForRouter []*Route `json:"bestRoutesForRouter,omitempty"`
13342
13343	BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"`
13344
13345	// Network: URI of the network to which this router belongs.
13346	Network string `json:"network,omitempty"`
13347
13348	// ForceSendFields is a list of field names (e.g. "BestRoutes") to
13349	// unconditionally include in API requests. By default, fields with
13350	// empty values are omitted from API requests. However, any non-pointer,
13351	// non-interface field appearing in ForceSendFields will be sent to the
13352	// server regardless of whether the field is empty or not. This may be
13353	// used to include empty fields in Patch requests.
13354	ForceSendFields []string `json:"-"`
13355
13356	// NullFields is a list of field names (e.g. "BestRoutes") to include in
13357	// API requests with the JSON null value. By default, fields with empty
13358	// values are omitted from API requests. However, any field with an
13359	// empty value appearing in NullFields will be sent to the server as
13360	// null. It is an error if a field in this list has a non-empty value.
13361	// This may be used to include null fields in Patch requests.
13362	NullFields []string `json:"-"`
13363}
13364
13365func (s *RouterStatus) MarshalJSON() ([]byte, error) {
13366	type noMethod RouterStatus
13367	raw := noMethod(*s)
13368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13369}
13370
13371type RouterStatusBgpPeerStatus struct {
13372	// AdvertisedRoutes: Routes that were advertised to the remote BGP peer
13373	AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"`
13374
13375	// IpAddress: IP address of the local BGP interface.
13376	IpAddress string `json:"ipAddress,omitempty"`
13377
13378	// LinkedVpnTunnel: URL of the VPN tunnel that this BGP peer controls.
13379	LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"`
13380
13381	// Name: Name of this BGP peer. Unique within the Routers resource.
13382	Name string `json:"name,omitempty"`
13383
13384	// NumLearnedRoutes: Number of routes learned from the remote BGP Peer.
13385	NumLearnedRoutes int64 `json:"numLearnedRoutes,omitempty"`
13386
13387	// PeerIpAddress: IP address of the remote BGP interface.
13388	PeerIpAddress string `json:"peerIpAddress,omitempty"`
13389
13390	// State: BGP state as specified in RFC1771.
13391	State string `json:"state,omitempty"`
13392
13393	// Status: Status of the BGP peer: {UP, DOWN}
13394	//
13395	// Possible values:
13396	//   "DOWN"
13397	//   "UNKNOWN"
13398	//   "UP"
13399	Status string `json:"status,omitempty"`
13400
13401	// Uptime: Time this session has been up. Format: 14 years, 51 weeks, 6
13402	// days, 23 hours, 59 minutes, 59 seconds
13403	Uptime string `json:"uptime,omitempty"`
13404
13405	// UptimeSeconds: Time this session has been up, in seconds. Format: 145
13406	UptimeSeconds string `json:"uptimeSeconds,omitempty"`
13407
13408	// ForceSendFields is a list of field names (e.g. "AdvertisedRoutes") to
13409	// unconditionally include in API requests. By default, fields with
13410	// empty values are omitted from API requests. However, any non-pointer,
13411	// non-interface field appearing in ForceSendFields will be sent to the
13412	// server regardless of whether the field is empty or not. This may be
13413	// used to include empty fields in Patch requests.
13414	ForceSendFields []string `json:"-"`
13415
13416	// NullFields is a list of field names (e.g. "AdvertisedRoutes") to
13417	// include in API requests with the JSON null value. By default, fields
13418	// with empty values are omitted from API requests. However, any field
13419	// with an empty value appearing in NullFields will be sent to the
13420	// server as null. It is an error if a field in this list has a
13421	// non-empty value. This may be used to include null fields in Patch
13422	// requests.
13423	NullFields []string `json:"-"`
13424}
13425
13426func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) {
13427	type noMethod RouterStatusBgpPeerStatus
13428	raw := noMethod(*s)
13429	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13430}
13431
13432type RouterStatusResponse struct {
13433	// Kind: Type of resource.
13434	Kind string `json:"kind,omitempty"`
13435
13436	Result *RouterStatus `json:"result,omitempty"`
13437
13438	// ServerResponse contains the HTTP response code and headers from the
13439	// server.
13440	googleapi.ServerResponse `json:"-"`
13441
13442	// ForceSendFields is a list of field names (e.g. "Kind") to
13443	// unconditionally include in API requests. By default, fields with
13444	// empty values are omitted from API requests. However, any non-pointer,
13445	// non-interface field appearing in ForceSendFields will be sent to the
13446	// server regardless of whether the field is empty or not. This may be
13447	// used to include empty fields in Patch requests.
13448	ForceSendFields []string `json:"-"`
13449
13450	// NullFields is a list of field names (e.g. "Kind") to include in API
13451	// requests with the JSON null value. By default, fields with empty
13452	// values are omitted from API requests. However, any field with an
13453	// empty value appearing in NullFields will be sent to the server as
13454	// null. It is an error if a field in this list has a non-empty value.
13455	// This may be used to include null fields in Patch requests.
13456	NullFields []string `json:"-"`
13457}
13458
13459func (s *RouterStatusResponse) MarshalJSON() ([]byte, error) {
13460	type noMethod RouterStatusResponse
13461	raw := noMethod(*s)
13462	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13463}
13464
13465type RoutersPreviewResponse struct {
13466	// Resource: Preview of given router.
13467	Resource *Router `json:"resource,omitempty"`
13468
13469	// ServerResponse contains the HTTP response code and headers from the
13470	// server.
13471	googleapi.ServerResponse `json:"-"`
13472
13473	// ForceSendFields is a list of field names (e.g. "Resource") to
13474	// unconditionally include in API requests. By default, fields with
13475	// empty values are omitted from API requests. However, any non-pointer,
13476	// non-interface field appearing in ForceSendFields will be sent to the
13477	// server regardless of whether the field is empty or not. This may be
13478	// used to include empty fields in Patch requests.
13479	ForceSendFields []string `json:"-"`
13480
13481	// NullFields is a list of field names (e.g. "Resource") to include in
13482	// API requests with the JSON null value. By default, fields with empty
13483	// values are omitted from API requests. However, any field with an
13484	// empty value appearing in NullFields will be sent to the server as
13485	// null. It is an error if a field in this list has a non-empty value.
13486	// This may be used to include null fields in Patch requests.
13487	NullFields []string `json:"-"`
13488}
13489
13490func (s *RoutersPreviewResponse) MarshalJSON() ([]byte, error) {
13491	type noMethod RoutersPreviewResponse
13492	raw := noMethod(*s)
13493	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13494}
13495
13496type RoutersScopedList struct {
13497	// Routers: List of routers contained in this scope.
13498	Routers []*Router `json:"routers,omitempty"`
13499
13500	// Warning: Informational warning which replaces the list of routers
13501	// when the list is empty.
13502	Warning *RoutersScopedListWarning `json:"warning,omitempty"`
13503
13504	// ForceSendFields is a list of field names (e.g. "Routers") to
13505	// unconditionally include in API requests. By default, fields with
13506	// empty values are omitted from API requests. However, any non-pointer,
13507	// non-interface field appearing in ForceSendFields will be sent to the
13508	// server regardless of whether the field is empty or not. This may be
13509	// used to include empty fields in Patch requests.
13510	ForceSendFields []string `json:"-"`
13511
13512	// NullFields is a list of field names (e.g. "Routers") to include in
13513	// API requests with the JSON null value. By default, fields with empty
13514	// values are omitted from API requests. However, any field with an
13515	// empty value appearing in NullFields will be sent to the server as
13516	// null. It is an error if a field in this list has a non-empty value.
13517	// This may be used to include null fields in Patch requests.
13518	NullFields []string `json:"-"`
13519}
13520
13521func (s *RoutersScopedList) MarshalJSON() ([]byte, error) {
13522	type noMethod RoutersScopedList
13523	raw := noMethod(*s)
13524	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13525}
13526
13527// RoutersScopedListWarning: Informational warning which replaces the
13528// list of routers when the list is empty.
13529type RoutersScopedListWarning struct {
13530	// Code: [Output Only] A warning code, if applicable. For example,
13531	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
13532	// the response.
13533	//
13534	// Possible values:
13535	//   "CLEANUP_FAILED"
13536	//   "DEPRECATED_RESOURCE_USED"
13537	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
13538	//   "FIELD_VALUE_OVERRIDEN"
13539	//   "INJECTED_KERNELS_DEPRECATED"
13540	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
13541	//   "NEXT_HOP_CANNOT_IP_FORWARD"
13542	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
13543	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
13544	//   "NEXT_HOP_NOT_RUNNING"
13545	//   "NOT_CRITICAL_ERROR"
13546	//   "NO_RESULTS_ON_PAGE"
13547	//   "REQUIRED_TOS_AGREEMENT"
13548	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
13549	//   "RESOURCE_NOT_DELETED"
13550	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
13551	//   "UNREACHABLE"
13552	Code string `json:"code,omitempty"`
13553
13554	// Data: [Output Only] Metadata about this warning in key: value format.
13555	// For example:
13556	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
13557	Data []*RoutersScopedListWarningData `json:"data,omitempty"`
13558
13559	// Message: [Output Only] A human-readable description of the warning
13560	// code.
13561	Message string `json:"message,omitempty"`
13562
13563	// ForceSendFields is a list of field names (e.g. "Code") to
13564	// unconditionally include in API requests. By default, fields with
13565	// empty values are omitted from API requests. However, any non-pointer,
13566	// non-interface field appearing in ForceSendFields will be sent to the
13567	// server regardless of whether the field is empty or not. This may be
13568	// used to include empty fields in Patch requests.
13569	ForceSendFields []string `json:"-"`
13570
13571	// NullFields is a list of field names (e.g. "Code") to include in API
13572	// requests with the JSON null value. By default, fields with empty
13573	// values are omitted from API requests. However, any field with an
13574	// empty value appearing in NullFields will be sent to the server as
13575	// null. It is an error if a field in this list has a non-empty value.
13576	// This may be used to include null fields in Patch requests.
13577	NullFields []string `json:"-"`
13578}
13579
13580func (s *RoutersScopedListWarning) MarshalJSON() ([]byte, error) {
13581	type noMethod RoutersScopedListWarning
13582	raw := noMethod(*s)
13583	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13584}
13585
13586type RoutersScopedListWarningData struct {
13587	// Key: [Output Only] A key that provides more detail on the warning
13588	// being returned. For example, for warnings where there are no results
13589	// in a list request for a particular zone, this key might be scope and
13590	// the key value might be the zone name. Other examples might be a key
13591	// indicating a deprecated resource and a suggested replacement, or a
13592	// warning about invalid network settings (for example, if an instance
13593	// attempts to perform IP forwarding but is not enabled for IP
13594	// forwarding).
13595	Key string `json:"key,omitempty"`
13596
13597	// Value: [Output Only] A warning data value corresponding to the key.
13598	Value string `json:"value,omitempty"`
13599
13600	// ForceSendFields is a list of field names (e.g. "Key") to
13601	// unconditionally include in API requests. By default, fields with
13602	// empty values are omitted from API requests. However, any non-pointer,
13603	// non-interface field appearing in ForceSendFields will be sent to the
13604	// server regardless of whether the field is empty or not. This may be
13605	// used to include empty fields in Patch requests.
13606	ForceSendFields []string `json:"-"`
13607
13608	// NullFields is a list of field names (e.g. "Key") to include in API
13609	// requests with the JSON null value. By default, fields with empty
13610	// values are omitted from API requests. However, any field with an
13611	// empty value appearing in NullFields will be sent to the server as
13612	// null. It is an error if a field in this list has a non-empty value.
13613	// This may be used to include null fields in Patch requests.
13614	NullFields []string `json:"-"`
13615}
13616
13617func (s *RoutersScopedListWarningData) MarshalJSON() ([]byte, error) {
13618	type noMethod RoutersScopedListWarningData
13619	raw := noMethod(*s)
13620	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13621}
13622
13623// Rule: A rule to be applied in a Policy.
13624type Rule struct {
13625	// Action: Required
13626	//
13627	// Possible values:
13628	//   "ALLOW"
13629	//   "ALLOW_WITH_LOG"
13630	//   "DENY"
13631	//   "DENY_WITH_LOG"
13632	//   "LOG"
13633	//   "NO_ACTION"
13634	Action string `json:"action,omitempty"`
13635
13636	// Conditions: Additional restrictions that must be met
13637	Conditions []*Condition `json:"conditions,omitempty"`
13638
13639	// Description: Human-readable description of the rule.
13640	Description string `json:"description,omitempty"`
13641
13642	// Ins: If one or more 'in' clauses are specified, the rule matches if
13643	// the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
13644	Ins []string `json:"ins,omitempty"`
13645
13646	// LogConfigs: The config returned to callers of
13647	// tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
13648	LogConfigs []*LogConfig `json:"logConfigs,omitempty"`
13649
13650	// NotIns: If one or more 'not_in' clauses are specified, the rule
13651	// matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the
13652	// entries.
13653	NotIns []string `json:"notIns,omitempty"`
13654
13655	// Permissions: A permission is a string of form '..' (e.g.,
13656	// 'storage.buckets.list'). A value of '*' matches all permissions, and
13657	// a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
13658	Permissions []string `json:"permissions,omitempty"`
13659
13660	// ForceSendFields is a list of field names (e.g. "Action") to
13661	// unconditionally include in API requests. By default, fields with
13662	// empty values are omitted from API requests. However, any non-pointer,
13663	// non-interface field appearing in ForceSendFields will be sent to the
13664	// server regardless of whether the field is empty or not. This may be
13665	// used to include empty fields in Patch requests.
13666	ForceSendFields []string `json:"-"`
13667
13668	// NullFields is a list of field names (e.g. "Action") to include in API
13669	// requests with the JSON null value. By default, fields with empty
13670	// values are omitted from API requests. However, any field with an
13671	// empty value appearing in NullFields will be sent to the server as
13672	// null. It is an error if a field in this list has a non-empty value.
13673	// This may be used to include null fields in Patch requests.
13674	NullFields []string `json:"-"`
13675}
13676
13677func (s *Rule) MarshalJSON() ([]byte, error) {
13678	type noMethod Rule
13679	raw := noMethod(*s)
13680	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13681}
13682
13683type SSLHealthCheck struct {
13684	// Port: The TCP port number for the health check request. The default
13685	// value is 443. Valid values are 1 through 65535.
13686	Port int64 `json:"port,omitempty"`
13687
13688	// PortName: Port name as defined in InstanceGroup#NamedPort#name. If
13689	// both port and port_name are defined, port takes precedence.
13690	PortName string `json:"portName,omitempty"`
13691
13692	// ProxyHeader: Specifies the type of proxy header to append before
13693	// sending data to the backend, either NONE or PROXY_V1. The default is
13694	// NONE.
13695	//
13696	// Possible values:
13697	//   "NONE"
13698	//   "PROXY_V1"
13699	ProxyHeader string `json:"proxyHeader,omitempty"`
13700
13701	// Request: The application data to send once the SSL connection has
13702	// been established (default value is empty). If both request and
13703	// response are empty, the connection establishment alone will indicate
13704	// health. The request data can only be ASCII.
13705	Request string `json:"request,omitempty"`
13706
13707	// Response: The bytes to match against the beginning of the response
13708	// data. If left empty (the default value), any response will indicate
13709	// health. The response data can only be ASCII.
13710	Response string `json:"response,omitempty"`
13711
13712	// ForceSendFields is a list of field names (e.g. "Port") to
13713	// unconditionally include in API requests. By default, fields with
13714	// empty values are omitted from API requests. However, any non-pointer,
13715	// non-interface field appearing in ForceSendFields will be sent to the
13716	// server regardless of whether the field is empty or not. This may be
13717	// used to include empty fields in Patch requests.
13718	ForceSendFields []string `json:"-"`
13719
13720	// NullFields is a list of field names (e.g. "Port") to include in API
13721	// requests with the JSON null value. By default, fields with empty
13722	// values are omitted from API requests. However, any field with an
13723	// empty value appearing in NullFields will be sent to the server as
13724	// null. It is an error if a field in this list has a non-empty value.
13725	// This may be used to include null fields in Patch requests.
13726	NullFields []string `json:"-"`
13727}
13728
13729func (s *SSLHealthCheck) MarshalJSON() ([]byte, error) {
13730	type noMethod SSLHealthCheck
13731	raw := noMethod(*s)
13732	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13733}
13734
13735// Scheduling: Sets the scheduling options for an Instance.
13736type Scheduling struct {
13737	// AutomaticRestart: Specifies whether the instance should be
13738	// automatically restarted if it is terminated by Compute Engine (not
13739	// terminated by a user). You can only set the automatic restart option
13740	// for standard instances. Preemptible instances cannot be automatically
13741	// restarted.
13742	//
13743	// By default, this is set to true so an instance is automatically
13744	// restarted if it is terminated by Compute Engine.
13745	AutomaticRestart *bool `json:"automaticRestart,omitempty"`
13746
13747	// OnHostMaintenance: Defines the maintenance behavior for this
13748	// instance. For standard instances, the default behavior is MIGRATE.
13749	// For preemptible instances, the default and only possible behavior is
13750	// TERMINATE. For more information, see Setting Instance Scheduling
13751	// Options.
13752	//
13753	// Possible values:
13754	//   "MIGRATE"
13755	//   "TERMINATE"
13756	OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
13757
13758	// Preemptible: Defines whether the instance is preemptible. This can
13759	// only be set during instance creation, it cannot be set or changed
13760	// after the instance has been created.
13761	Preemptible bool `json:"preemptible,omitempty"`
13762
13763	// ForceSendFields is a list of field names (e.g. "AutomaticRestart") to
13764	// unconditionally include in API requests. By default, fields with
13765	// empty values are omitted from API requests. However, any non-pointer,
13766	// non-interface field appearing in ForceSendFields will be sent to the
13767	// server regardless of whether the field is empty or not. This may be
13768	// used to include empty fields in Patch requests.
13769	ForceSendFields []string `json:"-"`
13770
13771	// NullFields is a list of field names (e.g. "AutomaticRestart") to
13772	// include in API requests with the JSON null value. By default, fields
13773	// with empty values are omitted from API requests. However, any field
13774	// with an empty value appearing in NullFields will be sent to the
13775	// server as null. It is an error if a field in this list has a
13776	// non-empty value. This may be used to include null fields in Patch
13777	// requests.
13778	NullFields []string `json:"-"`
13779}
13780
13781func (s *Scheduling) MarshalJSON() ([]byte, error) {
13782	type noMethod Scheduling
13783	raw := noMethod(*s)
13784	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13785}
13786
13787type SecurityPoliciesList struct {
13788	// Id: [Output Only] Unique identifier for the resource; defined by the
13789	// server.
13790	Id string `json:"id,omitempty"`
13791
13792	// Items: A list of SecurityPolicy resources.
13793	Items []*SecurityPolicy `json:"items,omitempty"`
13794
13795	// Kind: [Output Only] Type of resource. Always
13796	// compute#securityPoliciesList for listsof securityPolicies
13797	Kind string `json:"kind,omitempty"`
13798
13799	// NextPageToken: [Output Only] This token allows you to get the next
13800	// page of results for list requests. If the number of results is larger
13801	// than maxResults, use the nextPageToken as a value for the query
13802	// parameter pageToken in the next list request. Subsequent list
13803	// requests will have their own nextPageToken to continue paging through
13804	// the results.
13805	NextPageToken string `json:"nextPageToken,omitempty"`
13806
13807	// ServerResponse contains the HTTP response code and headers from the
13808	// server.
13809	googleapi.ServerResponse `json:"-"`
13810
13811	// ForceSendFields is a list of field names (e.g. "Id") to
13812	// unconditionally include in API requests. By default, fields with
13813	// empty values are omitted from API requests. However, any non-pointer,
13814	// non-interface field appearing in ForceSendFields will be sent to the
13815	// server regardless of whether the field is empty or not. This may be
13816	// used to include empty fields in Patch requests.
13817	ForceSendFields []string `json:"-"`
13818
13819	// NullFields is a list of field names (e.g. "Id") to include in API
13820	// requests with the JSON null value. By default, fields with empty
13821	// values are omitted from API requests. However, any field with an
13822	// empty value appearing in NullFields will be sent to the server as
13823	// null. It is an error if a field in this list has a non-empty value.
13824	// This may be used to include null fields in Patch requests.
13825	NullFields []string `json:"-"`
13826}
13827
13828func (s *SecurityPoliciesList) MarshalJSON() ([]byte, error) {
13829	type noMethod SecurityPoliciesList
13830	raw := noMethod(*s)
13831	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13832}
13833
13834// SecurityPolicy: A security policy is comprised of one or more rules.
13835// It can also be associated with one or more 'targets'.
13836type SecurityPolicy struct {
13837	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
13838	// format.
13839	CreationTimestamp string `json:"creationTimestamp,omitempty"`
13840
13841	// Description: An optional description of this resource. Provide this
13842	// property when you create the resource.
13843	Description string `json:"description,omitempty"`
13844
13845	// Fingerprint: Specifies a fingerprint for this resource, which is
13846	// essentially a hash of the metadata's contents and used for optimistic
13847	// locking. The fingerprint is initially generated by Compute Engine and
13848	// changes after every request to modify or update metadata. You must
13849	// always provide an up-to-date fingerprint hash in order to update or
13850	// change metadata.
13851	//
13852	// To see the latest fingerprint, make get() request to the security
13853	// policy.
13854	Fingerprint string `json:"fingerprint,omitempty"`
13855
13856	// Id: [Output Only] The unique identifier for the resource. This
13857	// identifier is defined by the server.
13858	Id uint64 `json:"id,omitempty,string"`
13859
13860	// Kind: [Output only] Type of the resource. Always
13861	// compute#securityPolicyfor security policies
13862	Kind string `json:"kind,omitempty"`
13863
13864	// Name: Name of the resource. Provided by the client when the resource
13865	// is created. The name must be 1-63 characters long, and comply with
13866	// RFC1035. Specifically, the name must be 1-63 characters long and
13867	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
13868	// the first character must be a lowercase letter, and all following
13869	// characters must be a dash, lowercase letter, or digit, except the
13870	// last character, which cannot be a dash.
13871	Name string `json:"name,omitempty"`
13872
13873	// Rules: List of rules that belong to this policy. There must always be
13874	// a default rule (rule with priority 2147483647 and match "*"). If no
13875	// rules are provided when creating a security policy, a default rule
13876	// with action "allow" will be added.
13877	Rules []*SecurityPolicyRule `json:"rules,omitempty"`
13878
13879	// SelfLink: [Output Only] Server-defined URL for the resource.
13880	SelfLink string `json:"selfLink,omitempty"`
13881
13882	// ServerResponse contains the HTTP response code and headers from the
13883	// server.
13884	googleapi.ServerResponse `json:"-"`
13885
13886	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
13887	// to unconditionally include in API requests. By default, fields with
13888	// empty values are omitted from API requests. However, any non-pointer,
13889	// non-interface field appearing in ForceSendFields will be sent to the
13890	// server regardless of whether the field is empty or not. This may be
13891	// used to include empty fields in Patch requests.
13892	ForceSendFields []string `json:"-"`
13893
13894	// NullFields is a list of field names (e.g. "CreationTimestamp") to
13895	// include in API requests with the JSON null value. By default, fields
13896	// with empty values are omitted from API requests. However, any field
13897	// with an empty value appearing in NullFields will be sent to the
13898	// server as null. It is an error if a field in this list has a
13899	// non-empty value. This may be used to include null fields in Patch
13900	// requests.
13901	NullFields []string `json:"-"`
13902}
13903
13904func (s *SecurityPolicy) MarshalJSON() ([]byte, error) {
13905	type noMethod SecurityPolicy
13906	raw := noMethod(*s)
13907	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13908}
13909
13910type SecurityPolicyReference struct {
13911	SecurityPolicy string `json:"securityPolicy,omitempty"`
13912
13913	// ForceSendFields is a list of field names (e.g. "SecurityPolicy") to
13914	// unconditionally include in API requests. By default, fields with
13915	// empty values are omitted from API requests. However, any non-pointer,
13916	// non-interface field appearing in ForceSendFields will be sent to the
13917	// server regardless of whether the field is empty or not. This may be
13918	// used to include empty fields in Patch requests.
13919	ForceSendFields []string `json:"-"`
13920
13921	// NullFields is a list of field names (e.g. "SecurityPolicy") to
13922	// include in API requests with the JSON null value. By default, fields
13923	// with empty values are omitted from API requests. However, any field
13924	// with an empty value appearing in NullFields will be sent to the
13925	// server as null. It is an error if a field in this list has a
13926	// non-empty value. This may be used to include null fields in Patch
13927	// requests.
13928	NullFields []string `json:"-"`
13929}
13930
13931func (s *SecurityPolicyReference) MarshalJSON() ([]byte, error) {
13932	type noMethod SecurityPolicyReference
13933	raw := noMethod(*s)
13934	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13935}
13936
13937// SecurityPolicyRule: Represents a rule that describes one or more
13938// match conditions along with the action to be taken when traffic
13939// matches this condition (allow or deny).
13940type SecurityPolicyRule struct {
13941	// Action: The Action to preform when the client connection triggers the
13942	// rule. Can currently be either "allow" or "deny()" where valid values
13943	// for status are 403, 404, and 502.
13944	Action string `json:"action,omitempty"`
13945
13946	// Description: An optional description of this resource. Provide this
13947	// property when you create the resource.
13948	Description string `json:"description,omitempty"`
13949
13950	// Kind: [Output only] Type of the resource. Always
13951	// compute#securityPolicyRule for security policy rules
13952	Kind string `json:"kind,omitempty"`
13953
13954	// Match: A match condition that incoming traffic is evaluated against.
13955	// If it evaluates to true, the corresponding ?action? is enforced.
13956	Match *SecurityPolicyRuleMatcher `json:"match,omitempty"`
13957
13958	// Preview: If set to true, the specified action is not enforced.
13959	Preview bool `json:"preview,omitempty"`
13960
13961	// Priority: An integer indicating the priority of a rule in the list.
13962	// The priority must be a positive value between 0 and 2147483647. Rules
13963	// are evaluated in the increasing order of priority.
13964	Priority int64 `json:"priority,omitempty"`
13965
13966	// ForceSendFields is a list of field names (e.g. "Action") to
13967	// unconditionally include in API requests. By default, fields with
13968	// empty values are omitted from API requests. However, any non-pointer,
13969	// non-interface field appearing in ForceSendFields will be sent to the
13970	// server regardless of whether the field is empty or not. This may be
13971	// used to include empty fields in Patch requests.
13972	ForceSendFields []string `json:"-"`
13973
13974	// NullFields is a list of field names (e.g. "Action") to include in API
13975	// requests with the JSON null value. By default, fields with empty
13976	// values are omitted from API requests. However, any field with an
13977	// empty value appearing in NullFields will be sent to the server as
13978	// null. It is an error if a field in this list has a non-empty value.
13979	// This may be used to include null fields in Patch requests.
13980	NullFields []string `json:"-"`
13981}
13982
13983func (s *SecurityPolicyRule) MarshalJSON() ([]byte, error) {
13984	type noMethod SecurityPolicyRule
13985	raw := noMethod(*s)
13986	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13987}
13988
13989// SecurityPolicyRuleMatcher: Represents a match condition that incoming
13990// traffic is evaluated against. Exactly one field must be specified.
13991type SecurityPolicyRuleMatcher struct {
13992	// SrcIpRanges: CIDR IP address range. Only IPv4 is supported.
13993	SrcIpRanges []string `json:"srcIpRanges,omitempty"`
13994
13995	// ForceSendFields is a list of field names (e.g. "SrcIpRanges") to
13996	// unconditionally include in API requests. By default, fields with
13997	// empty values are omitted from API requests. However, any non-pointer,
13998	// non-interface field appearing in ForceSendFields will be sent to the
13999	// server regardless of whether the field is empty or not. This may be
14000	// used to include empty fields in Patch requests.
14001	ForceSendFields []string `json:"-"`
14002
14003	// NullFields is a list of field names (e.g. "SrcIpRanges") to include
14004	// in API requests with the JSON null value. By default, fields with
14005	// empty values are omitted from API requests. However, any field with
14006	// an empty value appearing in NullFields will be sent to the server as
14007	// null. It is an error if a field in this list has a non-empty value.
14008	// This may be used to include null fields in Patch requests.
14009	NullFields []string `json:"-"`
14010}
14011
14012func (s *SecurityPolicyRuleMatcher) MarshalJSON() ([]byte, error) {
14013	type noMethod SecurityPolicyRuleMatcher
14014	raw := noMethod(*s)
14015	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14016}
14017
14018// SerialPortOutput: An instance's serial console output.
14019type SerialPortOutput struct {
14020	// Contents: [Output Only] The contents of the console output.
14021	Contents string `json:"contents,omitempty"`
14022
14023	// Kind: [Output Only] Type of the resource. Always
14024	// compute#serialPortOutput for serial port output.
14025	Kind string `json:"kind,omitempty"`
14026
14027	// Next: [Output Only] The position of the next byte of content from the
14028	// serial console output. Use this value in the next request as the
14029	// start parameter.
14030	Next int64 `json:"next,omitempty,string"`
14031
14032	// SelfLink: [Output Only] Server-defined URL for this resource.
14033	SelfLink string `json:"selfLink,omitempty"`
14034
14035	// Start: The starting byte position of the output that was returned.
14036	// This should match the start parameter sent with the request. If the
14037	// serial console output exceeds the size of the buffer, older output
14038	// will be overwritten by newer content and the start values will be
14039	// mismatched.
14040	Start int64 `json:"start,omitempty,string"`
14041
14042	// ServerResponse contains the HTTP response code and headers from the
14043	// server.
14044	googleapi.ServerResponse `json:"-"`
14045
14046	// ForceSendFields is a list of field names (e.g. "Contents") to
14047	// unconditionally include in API requests. By default, fields with
14048	// empty values are omitted from API requests. However, any non-pointer,
14049	// non-interface field appearing in ForceSendFields will be sent to the
14050	// server regardless of whether the field is empty or not. This may be
14051	// used to include empty fields in Patch requests.
14052	ForceSendFields []string `json:"-"`
14053
14054	// NullFields is a list of field names (e.g. "Contents") to include in
14055	// API requests with the JSON null value. By default, fields with empty
14056	// values are omitted from API requests. However, any field with an
14057	// empty value appearing in NullFields will be sent to the server as
14058	// null. It is an error if a field in this list has a non-empty value.
14059	// This may be used to include null fields in Patch requests.
14060	NullFields []string `json:"-"`
14061}
14062
14063func (s *SerialPortOutput) MarshalJSON() ([]byte, error) {
14064	type noMethod SerialPortOutput
14065	raw := noMethod(*s)
14066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14067}
14068
14069// ServiceAccount: A service account.
14070type ServiceAccount struct {
14071	// Email: Email address of the service account.
14072	Email string `json:"email,omitempty"`
14073
14074	// Scopes: The list of scopes to be made available for this service
14075	// account.
14076	Scopes []string `json:"scopes,omitempty"`
14077
14078	// ForceSendFields is a list of field names (e.g. "Email") to
14079	// unconditionally include in API requests. By default, fields with
14080	// empty values are omitted from API requests. However, any non-pointer,
14081	// non-interface field appearing in ForceSendFields will be sent to the
14082	// server regardless of whether the field is empty or not. This may be
14083	// used to include empty fields in Patch requests.
14084	ForceSendFields []string `json:"-"`
14085
14086	// NullFields is a list of field names (e.g. "Email") to include in API
14087	// requests with the JSON null value. By default, fields with empty
14088	// values are omitted from API requests. However, any field with an
14089	// empty value appearing in NullFields will be sent to the server as
14090	// null. It is an error if a field in this list has a non-empty value.
14091	// This may be used to include null fields in Patch requests.
14092	NullFields []string `json:"-"`
14093}
14094
14095func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
14096	type noMethod ServiceAccount
14097	raw := noMethod(*s)
14098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14099}
14100
14101// Snapshot: A persistent disk snapshot resource.
14102type Snapshot struct {
14103	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
14104	// format.
14105	CreationTimestamp string `json:"creationTimestamp,omitempty"`
14106
14107	// Description: An optional description of this resource. Provide this
14108	// property when you create the resource.
14109	Description string `json:"description,omitempty"`
14110
14111	// DiskSizeGb: [Output Only] Size of the snapshot, specified in GB.
14112	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
14113
14114	// Id: [Output Only] The unique identifier for the resource. This
14115	// identifier is defined by the server.
14116	Id uint64 `json:"id,omitempty,string"`
14117
14118	// Kind: [Output Only] Type of the resource. Always compute#snapshot for
14119	// Snapshot resources.
14120	Kind string `json:"kind,omitempty"`
14121
14122	// LabelFingerprint: A fingerprint for the labels being applied to this
14123	// snapshot, which is essentially a hash of the labels set used for
14124	// optimistic locking. The fingerprint is initially generated by Compute
14125	// Engine and changes after every request to modify or update labels.
14126	// You must always provide an up-to-date fingerprint hash in order to
14127	// update or change labels.
14128	//
14129	// To see the latest fingerprint, make a get() request to retrieve a
14130	// snapshot.
14131	LabelFingerprint string `json:"labelFingerprint,omitempty"`
14132
14133	// Labels: Labels to apply to this snapshot. These can be later modified
14134	// by the setLabels method. Label values may be empty.
14135	Labels map[string]string `json:"labels,omitempty"`
14136
14137	// Licenses: [Output Only] A list of public visible licenses that apply
14138	// to this snapshot. This can be because the original image had licenses
14139	// attached (such as a Windows image).
14140	Licenses []string `json:"licenses,omitempty"`
14141
14142	// Name: Name of the resource; provided by the client when the resource
14143	// is created. The name must be 1-63 characters long, and comply with
14144	// RFC1035. Specifically, the name must be 1-63 characters long and
14145	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
14146	// the first character must be a lowercase letter, and all following
14147	// characters must be a dash, lowercase letter, or digit, except the
14148	// last character, which cannot be a dash.
14149	Name string `json:"name,omitempty"`
14150
14151	// SelfLink: [Output Only] Server-defined URL for the resource.
14152	SelfLink string `json:"selfLink,omitempty"`
14153
14154	// SnapshotEncryptionKey: Encrypts the snapshot using a
14155	// customer-supplied encryption key.
14156	//
14157	// After you encrypt a snapshot using a customer-supplied key, you must
14158	// provide the same key if you use the image later For example, you must
14159	// provide the encryption key when you create a disk from the encrypted
14160	// snapshot in a future request.
14161	//
14162	// Customer-supplied encryption keys do not protect access to metadata
14163	// of the disk.
14164	//
14165	// If you do not provide an encryption key when creating the snapshot,
14166	// then the snapshot will be encrypted using an automatically generated
14167	// key and you do not need to provide a key to use the snapshot later.
14168	SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"`
14169
14170	// SourceDisk: [Output Only] The source disk used to create this
14171	// snapshot.
14172	SourceDisk string `json:"sourceDisk,omitempty"`
14173
14174	// SourceDiskEncryptionKey: The customer-supplied encryption key of the
14175	// source disk. Required if the source disk is protected by a
14176	// customer-supplied encryption key.
14177	SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"`
14178
14179	// SourceDiskId: [Output Only] The ID value of the disk used to create
14180	// this snapshot. This value may be used to determine whether the
14181	// snapshot was taken from the current or a previous instance of a given
14182	// disk name.
14183	SourceDiskId string `json:"sourceDiskId,omitempty"`
14184
14185	// Status: [Output Only] The status of the snapshot. This can be
14186	// CREATING, DELETING, FAILED, READY, or UPLOADING.
14187	//
14188	// Possible values:
14189	//   "CREATING"
14190	//   "DELETING"
14191	//   "FAILED"
14192	//   "READY"
14193	//   "UPLOADING"
14194	Status string `json:"status,omitempty"`
14195
14196	// StorageBytes: [Output Only] A size of the the storage used by the
14197	// snapshot. As snapshots share storage, this number is expected to
14198	// change with snapshot creation/deletion.
14199	StorageBytes int64 `json:"storageBytes,omitempty,string"`
14200
14201	// StorageBytesStatus: [Output Only] An indicator whether storageBytes
14202	// is in a stable state or it is being adjusted as a result of shared
14203	// storage reallocation. This status can either be UPDATING, meaning the
14204	// size of the snapshot is being updated, or UP_TO_DATE, meaning the
14205	// size of the snapshot is up-to-date.
14206	//
14207	// Possible values:
14208	//   "UPDATING"
14209	//   "UP_TO_DATE"
14210	StorageBytesStatus string `json:"storageBytesStatus,omitempty"`
14211
14212	// ServerResponse contains the HTTP response code and headers from the
14213	// server.
14214	googleapi.ServerResponse `json:"-"`
14215
14216	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
14217	// to unconditionally include in API requests. By default, fields with
14218	// empty values are omitted from API requests. However, any non-pointer,
14219	// non-interface field appearing in ForceSendFields will be sent to the
14220	// server regardless of whether the field is empty or not. This may be
14221	// used to include empty fields in Patch requests.
14222	ForceSendFields []string `json:"-"`
14223
14224	// NullFields is a list of field names (e.g. "CreationTimestamp") to
14225	// include in API requests with the JSON null value. By default, fields
14226	// with empty values are omitted from API requests. However, any field
14227	// with an empty value appearing in NullFields will be sent to the
14228	// server as null. It is an error if a field in this list has a
14229	// non-empty value. This may be used to include null fields in Patch
14230	// requests.
14231	NullFields []string `json:"-"`
14232}
14233
14234func (s *Snapshot) MarshalJSON() ([]byte, error) {
14235	type noMethod Snapshot
14236	raw := noMethod(*s)
14237	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14238}
14239
14240// SnapshotList: Contains a list of Snapshot resources.
14241type SnapshotList struct {
14242	// Id: [Output Only] Unique identifier for the resource; defined by the
14243	// server.
14244	Id string `json:"id,omitempty"`
14245
14246	// Items: A list of Snapshot resources.
14247	Items []*Snapshot `json:"items,omitempty"`
14248
14249	// Kind: Type of resource.
14250	Kind string `json:"kind,omitempty"`
14251
14252	// NextPageToken: [Output Only] This token allows you to get the next
14253	// page of results for list requests. If the number of results is larger
14254	// than maxResults, use the nextPageToken as a value for the query
14255	// parameter pageToken in the next list request. Subsequent list
14256	// requests will have their own nextPageToken to continue paging through
14257	// the results.
14258	NextPageToken string `json:"nextPageToken,omitempty"`
14259
14260	// SelfLink: [Output Only] Server-defined URL for this resource.
14261	SelfLink string `json:"selfLink,omitempty"`
14262
14263	// ServerResponse contains the HTTP response code and headers from the
14264	// server.
14265	googleapi.ServerResponse `json:"-"`
14266
14267	// ForceSendFields is a list of field names (e.g. "Id") to
14268	// unconditionally include in API requests. By default, fields with
14269	// empty values are omitted from API requests. However, any non-pointer,
14270	// non-interface field appearing in ForceSendFields will be sent to the
14271	// server regardless of whether the field is empty or not. This may be
14272	// used to include empty fields in Patch requests.
14273	ForceSendFields []string `json:"-"`
14274
14275	// NullFields is a list of field names (e.g. "Id") to include in API
14276	// requests with the JSON null value. By default, fields with empty
14277	// values are omitted from API requests. However, any field with an
14278	// empty value appearing in NullFields will be sent to the server as
14279	// null. It is an error if a field in this list has a non-empty value.
14280	// This may be used to include null fields in Patch requests.
14281	NullFields []string `json:"-"`
14282}
14283
14284func (s *SnapshotList) MarshalJSON() ([]byte, error) {
14285	type noMethod SnapshotList
14286	raw := noMethod(*s)
14287	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14288}
14289
14290// SslCertificate: An SslCertificate resource. This resource provides a
14291// mechanism to upload an SSL key and certificate to the load balancer
14292// to serve secure connections from the user.
14293type SslCertificate struct {
14294	// Certificate: A local certificate file. The certificate must be in PEM
14295	// format. The certificate chain must be no greater than 5 certs long.
14296	// The chain must include at least one intermediate cert.
14297	Certificate string `json:"certificate,omitempty"`
14298
14299	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
14300	// format.
14301	CreationTimestamp string `json:"creationTimestamp,omitempty"`
14302
14303	// Description: An optional description of this resource. Provide this
14304	// property when you create the resource.
14305	Description string `json:"description,omitempty"`
14306
14307	// Id: [Output Only] The unique identifier for the resource. This
14308	// identifier is defined by the server.
14309	Id uint64 `json:"id,omitempty,string"`
14310
14311	// Kind: [Output Only] Type of the resource. Always
14312	// compute#sslCertificate for SSL certificates.
14313	Kind string `json:"kind,omitempty"`
14314
14315	// Name: Name of the resource. Provided by the client when the resource
14316	// is created. The name must be 1-63 characters long, and comply with
14317	// RFC1035. Specifically, the name must be 1-63 characters long and
14318	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
14319	// the first character must be a lowercase letter, and all following
14320	// characters must be a dash, lowercase letter, or digit, except the
14321	// last character, which cannot be a dash.
14322	Name string `json:"name,omitempty"`
14323
14324	// PrivateKey: A write-only private key in PEM format. Only insert
14325	// requests will include this field.
14326	PrivateKey string `json:"privateKey,omitempty"`
14327
14328	// SelfLink: [Output only] Server-defined URL for the resource.
14329	SelfLink string `json:"selfLink,omitempty"`
14330
14331	// ServerResponse contains the HTTP response code and headers from the
14332	// server.
14333	googleapi.ServerResponse `json:"-"`
14334
14335	// ForceSendFields is a list of field names (e.g. "Certificate") to
14336	// unconditionally include in API requests. By default, fields with
14337	// empty values are omitted from API requests. However, any non-pointer,
14338	// non-interface field appearing in ForceSendFields will be sent to the
14339	// server regardless of whether the field is empty or not. This may be
14340	// used to include empty fields in Patch requests.
14341	ForceSendFields []string `json:"-"`
14342
14343	// NullFields is a list of field names (e.g. "Certificate") to include
14344	// in API requests with the JSON null value. By default, fields with
14345	// empty values are omitted from API requests. However, any field with
14346	// an empty value appearing in NullFields will be sent to the server as
14347	// null. It is an error if a field in this list has a non-empty value.
14348	// This may be used to include null fields in Patch requests.
14349	NullFields []string `json:"-"`
14350}
14351
14352func (s *SslCertificate) MarshalJSON() ([]byte, error) {
14353	type noMethod SslCertificate
14354	raw := noMethod(*s)
14355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14356}
14357
14358// SslCertificateList: Contains a list of SslCertificate resources.
14359type SslCertificateList struct {
14360	// Id: [Output Only] Unique identifier for the resource; defined by the
14361	// server.
14362	Id string `json:"id,omitempty"`
14363
14364	// Items: A list of SslCertificate resources.
14365	Items []*SslCertificate `json:"items,omitempty"`
14366
14367	// Kind: Type of resource.
14368	Kind string `json:"kind,omitempty"`
14369
14370	// NextPageToken: [Output Only] This token allows you to get the next
14371	// page of results for list requests. If the number of results is larger
14372	// than maxResults, use the nextPageToken as a value for the query
14373	// parameter pageToken in the next list request. Subsequent list
14374	// requests will have their own nextPageToken to continue paging through
14375	// the results.
14376	NextPageToken string `json:"nextPageToken,omitempty"`
14377
14378	// SelfLink: [Output Only] Server-defined URL for this resource.
14379	SelfLink string `json:"selfLink,omitempty"`
14380
14381	// ServerResponse contains the HTTP response code and headers from the
14382	// server.
14383	googleapi.ServerResponse `json:"-"`
14384
14385	// ForceSendFields is a list of field names (e.g. "Id") to
14386	// unconditionally include in API requests. By default, fields with
14387	// empty values are omitted from API requests. However, any non-pointer,
14388	// non-interface field appearing in ForceSendFields will be sent to the
14389	// server regardless of whether the field is empty or not. This may be
14390	// used to include empty fields in Patch requests.
14391	ForceSendFields []string `json:"-"`
14392
14393	// NullFields is a list of field names (e.g. "Id") to include in API
14394	// requests with the JSON null value. By default, fields with empty
14395	// values are omitted from API requests. However, any field with an
14396	// empty value appearing in NullFields will be sent to the server as
14397	// null. It is an error if a field in this list has a non-empty value.
14398	// This may be used to include null fields in Patch requests.
14399	NullFields []string `json:"-"`
14400}
14401
14402func (s *SslCertificateList) MarshalJSON() ([]byte, error) {
14403	type noMethod SslCertificateList
14404	raw := noMethod(*s)
14405	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14406}
14407
14408// Subnetwork: A Subnetwork resource.
14409type Subnetwork struct {
14410	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
14411	// format.
14412	CreationTimestamp string `json:"creationTimestamp,omitempty"`
14413
14414	// Description: An optional description of this resource. Provide this
14415	// property when you create the resource. This field can be set only at
14416	// resource creation time.
14417	Description string `json:"description,omitempty"`
14418
14419	// GatewayAddress: [Output Only] The gateway address for default routes
14420	// to reach destination addresses outside this subnetwork. This field
14421	// can be set only at resource creation time.
14422	GatewayAddress string `json:"gatewayAddress,omitempty"`
14423
14424	// Id: [Output Only] The unique identifier for the resource. This
14425	// identifier is defined by the server.
14426	Id uint64 `json:"id,omitempty,string"`
14427
14428	// IpCidrRange: The range of internal addresses that are owned by this
14429	// subnetwork. Provide this property when you create the subnetwork. For
14430	// example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
14431	// non-overlapping within a network. Only IPv4 is supported. This field
14432	// can be set only at resource creation time.
14433	IpCidrRange string `json:"ipCidrRange,omitempty"`
14434
14435	// Kind: [Output Only] Type of the resource. Always compute#subnetwork
14436	// for Subnetwork resources.
14437	Kind string `json:"kind,omitempty"`
14438
14439	// Name: The name of the resource, provided by the client when initially
14440	// creating the resource. The name must be 1-63 characters long, and
14441	// comply with RFC1035. Specifically, the name must be 1-63 characters
14442	// long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?
14443	// which means the first character must be a lowercase letter, and all
14444	// following characters must be a dash, lowercase letter, or digit,
14445	// except the last character, which cannot be a dash.
14446	Name string `json:"name,omitempty"`
14447
14448	// Network: The URL of the network to which this subnetwork belongs,
14449	// provided by the client when initially creating the subnetwork. Only
14450	// networks that are in the distributed mode can have subnetworks. This
14451	// field can be set only at resource creation time.
14452	Network string `json:"network,omitempty"`
14453
14454	// PrivateIpGoogleAccess: Whether the VMs in this subnet can access
14455	// Google services without assigned external IP addresses. This field
14456	// can be both set at resource creation time and updated using
14457	// setPrivateIpGoogleAccess.
14458	PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"`
14459
14460	// Region: URL of the region where the Subnetwork resides. This field
14461	// can be set only at resource creation time.
14462	Region string `json:"region,omitempty"`
14463
14464	// SecondaryIpRanges: An array of configurations for secondary IP ranges
14465	// for VM instances contained in this subnetwork. The primary IP of such
14466	// VM must belong to the primary ipCidrRange of the subnetwork. The
14467	// alias IPs may belong to either primary or secondary ranges.
14468	SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"`
14469
14470	// SelfLink: [Output Only] Server-defined URL for the resource.
14471	SelfLink string `json:"selfLink,omitempty"`
14472
14473	// ServerResponse contains the HTTP response code and headers from the
14474	// server.
14475	googleapi.ServerResponse `json:"-"`
14476
14477	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
14478	// to unconditionally include in API requests. By default, fields with
14479	// empty values are omitted from API requests. However, any non-pointer,
14480	// non-interface field appearing in ForceSendFields will be sent to the
14481	// server regardless of whether the field is empty or not. This may be
14482	// used to include empty fields in Patch requests.
14483	ForceSendFields []string `json:"-"`
14484
14485	// NullFields is a list of field names (e.g. "CreationTimestamp") to
14486	// include in API requests with the JSON null value. By default, fields
14487	// with empty values are omitted from API requests. However, any field
14488	// with an empty value appearing in NullFields will be sent to the
14489	// server as null. It is an error if a field in this list has a
14490	// non-empty value. This may be used to include null fields in Patch
14491	// requests.
14492	NullFields []string `json:"-"`
14493}
14494
14495func (s *Subnetwork) MarshalJSON() ([]byte, error) {
14496	type noMethod Subnetwork
14497	raw := noMethod(*s)
14498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14499}
14500
14501type SubnetworkAggregatedList struct {
14502	// Id: [Output Only] Unique identifier for the resource; defined by the
14503	// server.
14504	Id string `json:"id,omitempty"`
14505
14506	// Items: A list of SubnetworksScopedList resources.
14507	Items map[string]SubnetworksScopedList `json:"items,omitempty"`
14508
14509	// Kind: [Output Only] Type of resource. Always
14510	// compute#subnetworkAggregatedList for aggregated lists of subnetworks.
14511	Kind string `json:"kind,omitempty"`
14512
14513	// NextPageToken: [Output Only] This token allows you to get the next
14514	// page of results for list requests. If the number of results is larger
14515	// than maxResults, use the nextPageToken as a value for the query
14516	// parameter pageToken in the next list request. Subsequent list
14517	// requests will have their own nextPageToken to continue paging through
14518	// the results.
14519	NextPageToken string `json:"nextPageToken,omitempty"`
14520
14521	// SelfLink: [Output Only] Server-defined URL for this resource.
14522	SelfLink string `json:"selfLink,omitempty"`
14523
14524	// ServerResponse contains the HTTP response code and headers from the
14525	// server.
14526	googleapi.ServerResponse `json:"-"`
14527
14528	// ForceSendFields is a list of field names (e.g. "Id") to
14529	// unconditionally include in API requests. By default, fields with
14530	// empty values are omitted from API requests. However, any non-pointer,
14531	// non-interface field appearing in ForceSendFields will be sent to the
14532	// server regardless of whether the field is empty or not. This may be
14533	// used to include empty fields in Patch requests.
14534	ForceSendFields []string `json:"-"`
14535
14536	// NullFields is a list of field names (e.g. "Id") to include in API
14537	// requests with the JSON null value. By default, fields with empty
14538	// values are omitted from API requests. However, any field with an
14539	// empty value appearing in NullFields will be sent to the server as
14540	// null. It is an error if a field in this list has a non-empty value.
14541	// This may be used to include null fields in Patch requests.
14542	NullFields []string `json:"-"`
14543}
14544
14545func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) {
14546	type noMethod SubnetworkAggregatedList
14547	raw := noMethod(*s)
14548	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14549}
14550
14551// SubnetworkList: Contains a list of Subnetwork resources.
14552type SubnetworkList struct {
14553	// Id: [Output Only] Unique identifier for the resource; defined by the
14554	// server.
14555	Id string `json:"id,omitempty"`
14556
14557	// Items: A list of Subnetwork resources.
14558	Items []*Subnetwork `json:"items,omitempty"`
14559
14560	// Kind: [Output Only] Type of resource. Always compute#subnetworkList
14561	// for lists of subnetworks.
14562	Kind string `json:"kind,omitempty"`
14563
14564	// NextPageToken: [Output Only] This token allows you to get the next
14565	// page of results for list requests. If the number of results is larger
14566	// than maxResults, use the nextPageToken as a value for the query
14567	// parameter pageToken in the next list request. Subsequent list
14568	// requests will have their own nextPageToken to continue paging through
14569	// the results.
14570	NextPageToken string `json:"nextPageToken,omitempty"`
14571
14572	// SelfLink: [Output Only] Server-defined URL for this resource.
14573	SelfLink string `json:"selfLink,omitempty"`
14574
14575	// ServerResponse contains the HTTP response code and headers from the
14576	// server.
14577	googleapi.ServerResponse `json:"-"`
14578
14579	// ForceSendFields is a list of field names (e.g. "Id") to
14580	// unconditionally include in API requests. By default, fields with
14581	// empty values are omitted from API requests. However, any non-pointer,
14582	// non-interface field appearing in ForceSendFields will be sent to the
14583	// server regardless of whether the field is empty or not. This may be
14584	// used to include empty fields in Patch requests.
14585	ForceSendFields []string `json:"-"`
14586
14587	// NullFields is a list of field names (e.g. "Id") to include in API
14588	// requests with the JSON null value. By default, fields with empty
14589	// values are omitted from API requests. However, any field with an
14590	// empty value appearing in NullFields will be sent to the server as
14591	// null. It is an error if a field in this list has a non-empty value.
14592	// This may be used to include null fields in Patch requests.
14593	NullFields []string `json:"-"`
14594}
14595
14596func (s *SubnetworkList) MarshalJSON() ([]byte, error) {
14597	type noMethod SubnetworkList
14598	raw := noMethod(*s)
14599	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14600}
14601
14602// SubnetworkSecondaryRange: Represents a secondary IP range of a
14603// subnetwork.
14604type SubnetworkSecondaryRange struct {
14605	// IpCidrRange: The range of IP addresses belonging to this subnetwork
14606	// secondary range. Provide this property when you create the
14607	// subnetwork. Ranges must be unique and non-overlapping with all
14608	// primary and secondary IP ranges within a network. Only IPv4 is
14609	// supported.
14610	IpCidrRange string `json:"ipCidrRange,omitempty"`
14611
14612	// RangeName: The name associated with this subnetwork secondary range,
14613	// used when adding an alias IP range to a VM instance. The name must be
14614	// 1-63 characters long, and comply with RFC1035. The name must be
14615	// unique within the subnetwork.
14616	RangeName string `json:"rangeName,omitempty"`
14617
14618	// ForceSendFields is a list of field names (e.g. "IpCidrRange") to
14619	// unconditionally include in API requests. By default, fields with
14620	// empty values are omitted from API requests. However, any non-pointer,
14621	// non-interface field appearing in ForceSendFields will be sent to the
14622	// server regardless of whether the field is empty or not. This may be
14623	// used to include empty fields in Patch requests.
14624	ForceSendFields []string `json:"-"`
14625
14626	// NullFields is a list of field names (e.g. "IpCidrRange") to include
14627	// in API requests with the JSON null value. By default, fields with
14628	// empty values are omitted from API requests. However, any field with
14629	// an empty value appearing in NullFields will be sent to the server as
14630	// null. It is an error if a field in this list has a non-empty value.
14631	// This may be used to include null fields in Patch requests.
14632	NullFields []string `json:"-"`
14633}
14634
14635func (s *SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) {
14636	type noMethod SubnetworkSecondaryRange
14637	raw := noMethod(*s)
14638	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14639}
14640
14641type SubnetworksExpandIpCidrRangeRequest struct {
14642	// IpCidrRange: The IP (in CIDR format or netmask) of internal addresses
14643	// that are legal on this Subnetwork. This range should be disjoint from
14644	// other subnetworks within this network. This range can only be larger
14645	// than (i.e. a superset of) the range previously defined before the
14646	// update.
14647	IpCidrRange string `json:"ipCidrRange,omitempty"`
14648
14649	// ForceSendFields is a list of field names (e.g. "IpCidrRange") to
14650	// unconditionally include in API requests. By default, fields with
14651	// empty values are omitted from API requests. However, any non-pointer,
14652	// non-interface field appearing in ForceSendFields will be sent to the
14653	// server regardless of whether the field is empty or not. This may be
14654	// used to include empty fields in Patch requests.
14655	ForceSendFields []string `json:"-"`
14656
14657	// NullFields is a list of field names (e.g. "IpCidrRange") to include
14658	// in API requests with the JSON null value. By default, fields with
14659	// empty values are omitted from API requests. However, any field with
14660	// an empty value appearing in NullFields will be sent to the server as
14661	// null. It is an error if a field in this list has a non-empty value.
14662	// This may be used to include null fields in Patch requests.
14663	NullFields []string `json:"-"`
14664}
14665
14666func (s *SubnetworksExpandIpCidrRangeRequest) MarshalJSON() ([]byte, error) {
14667	type noMethod SubnetworksExpandIpCidrRangeRequest
14668	raw := noMethod(*s)
14669	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14670}
14671
14672type SubnetworksScopedList struct {
14673	// Subnetworks: List of subnetworks contained in this scope.
14674	Subnetworks []*Subnetwork `json:"subnetworks,omitempty"`
14675
14676	// Warning: An informational warning that appears when the list of
14677	// addresses is empty.
14678	Warning *SubnetworksScopedListWarning `json:"warning,omitempty"`
14679
14680	// ForceSendFields is a list of field names (e.g. "Subnetworks") to
14681	// unconditionally include in API requests. By default, fields with
14682	// empty values are omitted from API requests. However, any non-pointer,
14683	// non-interface field appearing in ForceSendFields will be sent to the
14684	// server regardless of whether the field is empty or not. This may be
14685	// used to include empty fields in Patch requests.
14686	ForceSendFields []string `json:"-"`
14687
14688	// NullFields is a list of field names (e.g. "Subnetworks") to include
14689	// in API requests with the JSON null value. By default, fields with
14690	// empty values are omitted from API requests. However, any field with
14691	// an empty value appearing in NullFields will be sent to the server as
14692	// null. It is an error if a field in this list has a non-empty value.
14693	// This may be used to include null fields in Patch requests.
14694	NullFields []string `json:"-"`
14695}
14696
14697func (s *SubnetworksScopedList) MarshalJSON() ([]byte, error) {
14698	type noMethod SubnetworksScopedList
14699	raw := noMethod(*s)
14700	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14701}
14702
14703// SubnetworksScopedListWarning: An informational warning that appears
14704// when the list of addresses is empty.
14705type SubnetworksScopedListWarning struct {
14706	// Code: [Output Only] A warning code, if applicable. For example,
14707	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
14708	// the response.
14709	//
14710	// Possible values:
14711	//   "CLEANUP_FAILED"
14712	//   "DEPRECATED_RESOURCE_USED"
14713	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
14714	//   "FIELD_VALUE_OVERRIDEN"
14715	//   "INJECTED_KERNELS_DEPRECATED"
14716	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
14717	//   "NEXT_HOP_CANNOT_IP_FORWARD"
14718	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
14719	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
14720	//   "NEXT_HOP_NOT_RUNNING"
14721	//   "NOT_CRITICAL_ERROR"
14722	//   "NO_RESULTS_ON_PAGE"
14723	//   "REQUIRED_TOS_AGREEMENT"
14724	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
14725	//   "RESOURCE_NOT_DELETED"
14726	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
14727	//   "UNREACHABLE"
14728	Code string `json:"code,omitempty"`
14729
14730	// Data: [Output Only] Metadata about this warning in key: value format.
14731	// For example:
14732	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
14733	Data []*SubnetworksScopedListWarningData `json:"data,omitempty"`
14734
14735	// Message: [Output Only] A human-readable description of the warning
14736	// code.
14737	Message string `json:"message,omitempty"`
14738
14739	// ForceSendFields is a list of field names (e.g. "Code") to
14740	// unconditionally include in API requests. By default, fields with
14741	// empty values are omitted from API requests. However, any non-pointer,
14742	// non-interface field appearing in ForceSendFields will be sent to the
14743	// server regardless of whether the field is empty or not. This may be
14744	// used to include empty fields in Patch requests.
14745	ForceSendFields []string `json:"-"`
14746
14747	// NullFields is a list of field names (e.g. "Code") to include in API
14748	// requests with the JSON null value. By default, fields with empty
14749	// values are omitted from API requests. However, any field with an
14750	// empty value appearing in NullFields will be sent to the server as
14751	// null. It is an error if a field in this list has a non-empty value.
14752	// This may be used to include null fields in Patch requests.
14753	NullFields []string `json:"-"`
14754}
14755
14756func (s *SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) {
14757	type noMethod SubnetworksScopedListWarning
14758	raw := noMethod(*s)
14759	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14760}
14761
14762type SubnetworksScopedListWarningData struct {
14763	// Key: [Output Only] A key that provides more detail on the warning
14764	// being returned. For example, for warnings where there are no results
14765	// in a list request for a particular zone, this key might be scope and
14766	// the key value might be the zone name. Other examples might be a key
14767	// indicating a deprecated resource and a suggested replacement, or a
14768	// warning about invalid network settings (for example, if an instance
14769	// attempts to perform IP forwarding but is not enabled for IP
14770	// forwarding).
14771	Key string `json:"key,omitempty"`
14772
14773	// Value: [Output Only] A warning data value corresponding to the key.
14774	Value string `json:"value,omitempty"`
14775
14776	// ForceSendFields is a list of field names (e.g. "Key") to
14777	// unconditionally include in API requests. By default, fields with
14778	// empty values are omitted from API requests. However, any non-pointer,
14779	// non-interface field appearing in ForceSendFields will be sent to the
14780	// server regardless of whether the field is empty or not. This may be
14781	// used to include empty fields in Patch requests.
14782	ForceSendFields []string `json:"-"`
14783
14784	// NullFields is a list of field names (e.g. "Key") to include in API
14785	// requests with the JSON null value. By default, fields with empty
14786	// values are omitted from API requests. However, any field with an
14787	// empty value appearing in NullFields will be sent to the server as
14788	// null. It is an error if a field in this list has a non-empty value.
14789	// This may be used to include null fields in Patch requests.
14790	NullFields []string `json:"-"`
14791}
14792
14793func (s *SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) {
14794	type noMethod SubnetworksScopedListWarningData
14795	raw := noMethod(*s)
14796	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14797}
14798
14799type SubnetworksSetPrivateIpGoogleAccessRequest struct {
14800	PrivateIpGoogleAccess bool `json:"privateIpGoogleAccess,omitempty"`
14801
14802	// ForceSendFields is a list of field names (e.g.
14803	// "PrivateIpGoogleAccess") to unconditionally include in API requests.
14804	// By default, fields with empty values are omitted from API requests.
14805	// However, any non-pointer, non-interface field appearing in
14806	// ForceSendFields will be sent to the server regardless of whether the
14807	// field is empty or not. This may be used to include empty fields in
14808	// Patch requests.
14809	ForceSendFields []string `json:"-"`
14810
14811	// NullFields is a list of field names (e.g. "PrivateIpGoogleAccess") to
14812	// include in API requests with the JSON null value. By default, fields
14813	// with empty values are omitted from API requests. However, any field
14814	// with an empty value appearing in NullFields will be sent to the
14815	// server as null. It is an error if a field in this list has a
14816	// non-empty value. This may be used to include null fields in Patch
14817	// requests.
14818	NullFields []string `json:"-"`
14819}
14820
14821func (s *SubnetworksSetPrivateIpGoogleAccessRequest) MarshalJSON() ([]byte, error) {
14822	type noMethod SubnetworksSetPrivateIpGoogleAccessRequest
14823	raw := noMethod(*s)
14824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14825}
14826
14827type TCPHealthCheck struct {
14828	// Port: The TCP port number for the health check request. The default
14829	// value is 80. Valid values are 1 through 65535.
14830	Port int64 `json:"port,omitempty"`
14831
14832	// PortName: Port name as defined in InstanceGroup#NamedPort#name. If
14833	// both port and port_name are defined, port takes precedence.
14834	PortName string `json:"portName,omitempty"`
14835
14836	// ProxyHeader: Specifies the type of proxy header to append before
14837	// sending data to the backend, either NONE or PROXY_V1. The default is
14838	// NONE.
14839	//
14840	// Possible values:
14841	//   "NONE"
14842	//   "PROXY_V1"
14843	ProxyHeader string `json:"proxyHeader,omitempty"`
14844
14845	// Request: The application data to send once the TCP connection has
14846	// been established (default value is empty). If both request and
14847	// response are empty, the connection establishment alone will indicate
14848	// health. The request data can only be ASCII.
14849	Request string `json:"request,omitempty"`
14850
14851	// Response: The bytes to match against the beginning of the response
14852	// data. If left empty (the default value), any response will indicate
14853	// health. The response data can only be ASCII.
14854	Response string `json:"response,omitempty"`
14855
14856	// ForceSendFields is a list of field names (e.g. "Port") to
14857	// unconditionally include in API requests. By default, fields with
14858	// empty values are omitted from API requests. However, any non-pointer,
14859	// non-interface field appearing in ForceSendFields will be sent to the
14860	// server regardless of whether the field is empty or not. This may be
14861	// used to include empty fields in Patch requests.
14862	ForceSendFields []string `json:"-"`
14863
14864	// NullFields is a list of field names (e.g. "Port") to include in API
14865	// requests with the JSON null value. By default, fields with empty
14866	// values are omitted from API requests. However, any field with an
14867	// empty value appearing in NullFields will be sent to the server as
14868	// null. It is an error if a field in this list has a non-empty value.
14869	// This may be used to include null fields in Patch requests.
14870	NullFields []string `json:"-"`
14871}
14872
14873func (s *TCPHealthCheck) MarshalJSON() ([]byte, error) {
14874	type noMethod TCPHealthCheck
14875	raw := noMethod(*s)
14876	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14877}
14878
14879// Tags: A set of instance tags.
14880type Tags struct {
14881	// Fingerprint: Specifies a fingerprint for this request, which is
14882	// essentially a hash of the metadata's contents and used for optimistic
14883	// locking. The fingerprint is initially generated by Compute Engine and
14884	// changes after every request to modify or update metadata. You must
14885	// always provide an up-to-date fingerprint hash in order to update or
14886	// change metadata.
14887	//
14888	// To see the latest fingerprint, make get() request to the instance.
14889	Fingerprint string `json:"fingerprint,omitempty"`
14890
14891	// Items: An array of tags. Each tag must be 1-63 characters long, and
14892	// comply with RFC1035.
14893	Items []string `json:"items,omitempty"`
14894
14895	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
14896	// unconditionally include in API requests. By default, fields with
14897	// empty values are omitted from API requests. However, any non-pointer,
14898	// non-interface field appearing in ForceSendFields will be sent to the
14899	// server regardless of whether the field is empty or not. This may be
14900	// used to include empty fields in Patch requests.
14901	ForceSendFields []string `json:"-"`
14902
14903	// NullFields is a list of field names (e.g. "Fingerprint") to include
14904	// in API requests with the JSON null value. By default, fields with
14905	// empty values are omitted from API requests. However, any field with
14906	// an empty value appearing in NullFields will be sent to the server as
14907	// null. It is an error if a field in this list has a non-empty value.
14908	// This may be used to include null fields in Patch requests.
14909	NullFields []string `json:"-"`
14910}
14911
14912func (s *Tags) MarshalJSON() ([]byte, error) {
14913	type noMethod Tags
14914	raw := noMethod(*s)
14915	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14916}
14917
14918// TargetHttpProxy: A TargetHttpProxy resource. This resource defines an
14919// HTTP proxy.
14920type TargetHttpProxy struct {
14921	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
14922	// format.
14923	CreationTimestamp string `json:"creationTimestamp,omitempty"`
14924
14925	// Description: An optional description of this resource. Provide this
14926	// property when you create the resource.
14927	Description string `json:"description,omitempty"`
14928
14929	// Id: [Output Only] The unique identifier for the resource. This
14930	// identifier is defined by the server.
14931	Id uint64 `json:"id,omitempty,string"`
14932
14933	// Kind: [Output Only] Type of resource. Always compute#targetHttpProxy
14934	// for target HTTP proxies.
14935	Kind string `json:"kind,omitempty"`
14936
14937	// Name: Name of the resource. Provided by the client when the resource
14938	// is created. The name must be 1-63 characters long, and comply with
14939	// RFC1035. Specifically, the name must be 1-63 characters long and
14940	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
14941	// the first character must be a lowercase letter, and all following
14942	// characters must be a dash, lowercase letter, or digit, except the
14943	// last character, which cannot be a dash.
14944	Name string `json:"name,omitempty"`
14945
14946	// SelfLink: [Output Only] Server-defined URL for the resource.
14947	SelfLink string `json:"selfLink,omitempty"`
14948
14949	// UrlMap: URL to the UrlMap resource that defines the mapping from URL
14950	// to the BackendService.
14951	UrlMap string `json:"urlMap,omitempty"`
14952
14953	// ServerResponse contains the HTTP response code and headers from the
14954	// server.
14955	googleapi.ServerResponse `json:"-"`
14956
14957	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
14958	// to unconditionally include in API requests. By default, fields with
14959	// empty values are omitted from API requests. However, any non-pointer,
14960	// non-interface field appearing in ForceSendFields will be sent to the
14961	// server regardless of whether the field is empty or not. This may be
14962	// used to include empty fields in Patch requests.
14963	ForceSendFields []string `json:"-"`
14964
14965	// NullFields is a list of field names (e.g. "CreationTimestamp") to
14966	// include in API requests with the JSON null value. By default, fields
14967	// with empty values are omitted from API requests. However, any field
14968	// with an empty value appearing in NullFields will be sent to the
14969	// server as null. It is an error if a field in this list has a
14970	// non-empty value. This may be used to include null fields in Patch
14971	// requests.
14972	NullFields []string `json:"-"`
14973}
14974
14975func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) {
14976	type noMethod TargetHttpProxy
14977	raw := noMethod(*s)
14978	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
14979}
14980
14981// TargetHttpProxyList: A list of TargetHttpProxy resources.
14982type TargetHttpProxyList struct {
14983	// Id: [Output Only] Unique identifier for the resource; defined by the
14984	// server.
14985	Id string `json:"id,omitempty"`
14986
14987	// Items: A list of TargetHttpProxy resources.
14988	Items []*TargetHttpProxy `json:"items,omitempty"`
14989
14990	// Kind: Type of resource. Always compute#targetHttpProxyList for lists
14991	// of target HTTP proxies.
14992	Kind string `json:"kind,omitempty"`
14993
14994	// NextPageToken: [Output Only] This token allows you to get the next
14995	// page of results for list requests. If the number of results is larger
14996	// than maxResults, use the nextPageToken as a value for the query
14997	// parameter pageToken in the next list request. Subsequent list
14998	// requests will have their own nextPageToken to continue paging through
14999	// the results.
15000	NextPageToken string `json:"nextPageToken,omitempty"`
15001
15002	// SelfLink: [Output Only] Server-defined URL for this resource.
15003	SelfLink string `json:"selfLink,omitempty"`
15004
15005	// ServerResponse contains the HTTP response code and headers from the
15006	// server.
15007	googleapi.ServerResponse `json:"-"`
15008
15009	// ForceSendFields is a list of field names (e.g. "Id") to
15010	// unconditionally include in API requests. By default, fields with
15011	// empty values are omitted from API requests. However, any non-pointer,
15012	// non-interface field appearing in ForceSendFields will be sent to the
15013	// server regardless of whether the field is empty or not. This may be
15014	// used to include empty fields in Patch requests.
15015	ForceSendFields []string `json:"-"`
15016
15017	// NullFields is a list of field names (e.g. "Id") to include in API
15018	// requests with the JSON null value. By default, fields with empty
15019	// values are omitted from API requests. However, any field with an
15020	// empty value appearing in NullFields will be sent to the server as
15021	// null. It is an error if a field in this list has a non-empty value.
15022	// This may be used to include null fields in Patch requests.
15023	NullFields []string `json:"-"`
15024}
15025
15026func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) {
15027	type noMethod TargetHttpProxyList
15028	raw := noMethod(*s)
15029	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15030}
15031
15032type TargetHttpsProxiesSetSslCertificatesRequest struct {
15033	// SslCertificates: New set of SslCertificate resources to associate
15034	// with this TargetHttpsProxy resource. Currently exactly one
15035	// SslCertificate resource must be specified.
15036	SslCertificates []string `json:"sslCertificates,omitempty"`
15037
15038	// ForceSendFields is a list of field names (e.g. "SslCertificates") to
15039	// unconditionally include in API requests. By default, fields with
15040	// empty values are omitted from API requests. However, any non-pointer,
15041	// non-interface field appearing in ForceSendFields will be sent to the
15042	// server regardless of whether the field is empty or not. This may be
15043	// used to include empty fields in Patch requests.
15044	ForceSendFields []string `json:"-"`
15045
15046	// NullFields is a list of field names (e.g. "SslCertificates") to
15047	// include in API requests with the JSON null value. By default, fields
15048	// with empty values are omitted from API requests. However, any field
15049	// with an empty value appearing in NullFields will be sent to the
15050	// server as null. It is an error if a field in this list has a
15051	// non-empty value. This may be used to include null fields in Patch
15052	// requests.
15053	NullFields []string `json:"-"`
15054}
15055
15056func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) {
15057	type noMethod TargetHttpsProxiesSetSslCertificatesRequest
15058	raw := noMethod(*s)
15059	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15060}
15061
15062// TargetHttpsProxy: A TargetHttpsProxy resource. This resource defines
15063// an HTTPS proxy.
15064type TargetHttpsProxy struct {
15065	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
15066	// format.
15067	CreationTimestamp string `json:"creationTimestamp,omitempty"`
15068
15069	// Description: An optional description of this resource. Provide this
15070	// property when you create the resource.
15071	Description string `json:"description,omitempty"`
15072
15073	// Id: [Output Only] The unique identifier for the resource. This
15074	// identifier is defined by the server.
15075	Id uint64 `json:"id,omitempty,string"`
15076
15077	// Kind: [Output Only] Type of resource. Always compute#targetHttpsProxy
15078	// for target HTTPS proxies.
15079	Kind string `json:"kind,omitempty"`
15080
15081	// Name: Name of the resource. Provided by the client when the resource
15082	// is created. The name must be 1-63 characters long, and comply with
15083	// RFC1035. Specifically, the name must be 1-63 characters long and
15084	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
15085	// the first character must be a lowercase letter, and all following
15086	// characters must be a dash, lowercase letter, or digit, except the
15087	// last character, which cannot be a dash.
15088	Name string `json:"name,omitempty"`
15089
15090	// SelfLink: [Output Only] Server-defined URL for the resource.
15091	SelfLink string `json:"selfLink,omitempty"`
15092
15093	// SslCertificates: URLs to SslCertificate resources that are used to
15094	// authenticate connections between users and the load balancer.
15095	// Currently, exactly one SSL certificate must be specified.
15096	SslCertificates []string `json:"sslCertificates,omitempty"`
15097
15098	// UrlMap: A fully-qualified or valid partial URL to the UrlMap resource
15099	// that defines the mapping from URL to the BackendService. For example,
15100	// the following are all valid URLs for specifying a URL map:
15101	// -
15102	// https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map
15103	// - projects/project/global/urlMaps/url-map
15104	// - global/urlMaps/url-map
15105	UrlMap string `json:"urlMap,omitempty"`
15106
15107	// ServerResponse contains the HTTP response code and headers from the
15108	// server.
15109	googleapi.ServerResponse `json:"-"`
15110
15111	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
15112	// to unconditionally include in API requests. By default, fields with
15113	// empty values are omitted from API requests. However, any non-pointer,
15114	// non-interface field appearing in ForceSendFields will be sent to the
15115	// server regardless of whether the field is empty or not. This may be
15116	// used to include empty fields in Patch requests.
15117	ForceSendFields []string `json:"-"`
15118
15119	// NullFields is a list of field names (e.g. "CreationTimestamp") to
15120	// include in API requests with the JSON null value. By default, fields
15121	// with empty values are omitted from API requests. However, any field
15122	// with an empty value appearing in NullFields will be sent to the
15123	// server as null. It is an error if a field in this list has a
15124	// non-empty value. This may be used to include null fields in Patch
15125	// requests.
15126	NullFields []string `json:"-"`
15127}
15128
15129func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) {
15130	type noMethod TargetHttpsProxy
15131	raw := noMethod(*s)
15132	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15133}
15134
15135// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources.
15136type TargetHttpsProxyList struct {
15137	// Id: [Output Only] Unique identifier for the resource; defined by the
15138	// server.
15139	Id string `json:"id,omitempty"`
15140
15141	// Items: A list of TargetHttpsProxy resources.
15142	Items []*TargetHttpsProxy `json:"items,omitempty"`
15143
15144	// Kind: Type of resource. Always compute#targetHttpsProxyList for lists
15145	// of target HTTPS proxies.
15146	Kind string `json:"kind,omitempty"`
15147
15148	// NextPageToken: [Output Only] This token allows you to get the next
15149	// page of results for list requests. If the number of results is larger
15150	// than maxResults, use the nextPageToken as a value for the query
15151	// parameter pageToken in the next list request. Subsequent list
15152	// requests will have their own nextPageToken to continue paging through
15153	// the results.
15154	NextPageToken string `json:"nextPageToken,omitempty"`
15155
15156	// SelfLink: [Output Only] Server-defined URL for this resource.
15157	SelfLink string `json:"selfLink,omitempty"`
15158
15159	// ServerResponse contains the HTTP response code and headers from the
15160	// server.
15161	googleapi.ServerResponse `json:"-"`
15162
15163	// ForceSendFields is a list of field names (e.g. "Id") to
15164	// unconditionally include in API requests. By default, fields with
15165	// empty values are omitted from API requests. However, any non-pointer,
15166	// non-interface field appearing in ForceSendFields will be sent to the
15167	// server regardless of whether the field is empty or not. This may be
15168	// used to include empty fields in Patch requests.
15169	ForceSendFields []string `json:"-"`
15170
15171	// NullFields is a list of field names (e.g. "Id") to include in API
15172	// requests with the JSON null value. By default, fields with empty
15173	// values are omitted from API requests. However, any field with an
15174	// empty value appearing in NullFields will be sent to the server as
15175	// null. It is an error if a field in this list has a non-empty value.
15176	// This may be used to include null fields in Patch requests.
15177	NullFields []string `json:"-"`
15178}
15179
15180func (s *TargetHttpsProxyList) MarshalJSON() ([]byte, error) {
15181	type noMethod TargetHttpsProxyList
15182	raw := noMethod(*s)
15183	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15184}
15185
15186// TargetInstance: A TargetInstance resource. This resource defines an
15187// endpoint instance that terminates traffic of certain protocols.
15188type TargetInstance struct {
15189	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
15190	// format.
15191	CreationTimestamp string `json:"creationTimestamp,omitempty"`
15192
15193	// Description: An optional description of this resource. Provide this
15194	// property when you create the resource.
15195	Description string `json:"description,omitempty"`
15196
15197	// Id: [Output Only] The unique identifier for the resource. This
15198	// identifier is defined by the server.
15199	Id uint64 `json:"id,omitempty,string"`
15200
15201	// Instance: A URL to the virtual machine instance that handles traffic
15202	// for this target instance. When creating a target instance, you can
15203	// provide the fully-qualified URL or a valid partial URL to the desired
15204	// virtual machine. For example, the following are all valid URLs:
15205	// -
15206	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
15207	// - projects/project/zones/zone/instances/instance
15208	// - zones/zone/instances/instance
15209	Instance string `json:"instance,omitempty"`
15210
15211	// Kind: [Output Only] The type of the resource. Always
15212	// compute#targetInstance for target instances.
15213	Kind string `json:"kind,omitempty"`
15214
15215	// Name: Name of the resource. Provided by the client when the resource
15216	// is created. The name must be 1-63 characters long, and comply with
15217	// RFC1035. Specifically, the name must be 1-63 characters long and
15218	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
15219	// the first character must be a lowercase letter, and all following
15220	// characters must be a dash, lowercase letter, or digit, except the
15221	// last character, which cannot be a dash.
15222	Name string `json:"name,omitempty"`
15223
15224	// NatPolicy: NAT option controlling how IPs are NAT'ed to the instance.
15225	// Currently only NO_NAT (default value) is supported.
15226	//
15227	// Possible values:
15228	//   "NO_NAT"
15229	NatPolicy string `json:"natPolicy,omitempty"`
15230
15231	// SelfLink: [Output Only] Server-defined URL for the resource.
15232	SelfLink string `json:"selfLink,omitempty"`
15233
15234	// Zone: [Output Only] URL of the zone where the target instance
15235	// resides.
15236	Zone string `json:"zone,omitempty"`
15237
15238	// ServerResponse contains the HTTP response code and headers from the
15239	// server.
15240	googleapi.ServerResponse `json:"-"`
15241
15242	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
15243	// to unconditionally include in API requests. By default, fields with
15244	// empty values are omitted from API requests. However, any non-pointer,
15245	// non-interface field appearing in ForceSendFields will be sent to the
15246	// server regardless of whether the field is empty or not. This may be
15247	// used to include empty fields in Patch requests.
15248	ForceSendFields []string `json:"-"`
15249
15250	// NullFields is a list of field names (e.g. "CreationTimestamp") to
15251	// include in API requests with the JSON null value. By default, fields
15252	// with empty values are omitted from API requests. However, any field
15253	// with an empty value appearing in NullFields will be sent to the
15254	// server as null. It is an error if a field in this list has a
15255	// non-empty value. This may be used to include null fields in Patch
15256	// requests.
15257	NullFields []string `json:"-"`
15258}
15259
15260func (s *TargetInstance) MarshalJSON() ([]byte, error) {
15261	type noMethod TargetInstance
15262	raw := noMethod(*s)
15263	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15264}
15265
15266type TargetInstanceAggregatedList struct {
15267	// Id: [Output Only] Unique identifier for the resource; defined by the
15268	// server.
15269	Id string `json:"id,omitempty"`
15270
15271	// Items: A list of TargetInstance resources.
15272	Items map[string]TargetInstancesScopedList `json:"items,omitempty"`
15273
15274	// Kind: Type of resource.
15275	Kind string `json:"kind,omitempty"`
15276
15277	// NextPageToken: [Output Only] This token allows you to get the next
15278	// page of results for list requests. If the number of results is larger
15279	// than maxResults, use the nextPageToken as a value for the query
15280	// parameter pageToken in the next list request. Subsequent list
15281	// requests will have their own nextPageToken to continue paging through
15282	// the results.
15283	NextPageToken string `json:"nextPageToken,omitempty"`
15284
15285	// SelfLink: [Output Only] Server-defined URL for this resource.
15286	SelfLink string `json:"selfLink,omitempty"`
15287
15288	// ServerResponse contains the HTTP response code and headers from the
15289	// server.
15290	googleapi.ServerResponse `json:"-"`
15291
15292	// ForceSendFields is a list of field names (e.g. "Id") to
15293	// unconditionally include in API requests. By default, fields with
15294	// empty values are omitted from API requests. However, any non-pointer,
15295	// non-interface field appearing in ForceSendFields will be sent to the
15296	// server regardless of whether the field is empty or not. This may be
15297	// used to include empty fields in Patch requests.
15298	ForceSendFields []string `json:"-"`
15299
15300	// NullFields is a list of field names (e.g. "Id") to include in API
15301	// requests with the JSON null value. By default, fields with empty
15302	// values are omitted from API requests. However, any field with an
15303	// empty value appearing in NullFields will be sent to the server as
15304	// null. It is an error if a field in this list has a non-empty value.
15305	// This may be used to include null fields in Patch requests.
15306	NullFields []string `json:"-"`
15307}
15308
15309func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) {
15310	type noMethod TargetInstanceAggregatedList
15311	raw := noMethod(*s)
15312	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15313}
15314
15315// TargetInstanceList: Contains a list of TargetInstance resources.
15316type TargetInstanceList struct {
15317	// Id: [Output Only] Unique identifier for the resource; defined by the
15318	// server.
15319	Id string `json:"id,omitempty"`
15320
15321	// Items: A list of TargetInstance resources.
15322	Items []*TargetInstance `json:"items,omitempty"`
15323
15324	// Kind: Type of resource.
15325	Kind string `json:"kind,omitempty"`
15326
15327	// NextPageToken: [Output Only] This token allows you to get the next
15328	// page of results for list requests. If the number of results is larger
15329	// than maxResults, use the nextPageToken as a value for the query
15330	// parameter pageToken in the next list request. Subsequent list
15331	// requests will have their own nextPageToken to continue paging through
15332	// the results.
15333	NextPageToken string `json:"nextPageToken,omitempty"`
15334
15335	// SelfLink: [Output Only] Server-defined URL for this resource.
15336	SelfLink string `json:"selfLink,omitempty"`
15337
15338	// ServerResponse contains the HTTP response code and headers from the
15339	// server.
15340	googleapi.ServerResponse `json:"-"`
15341
15342	// ForceSendFields is a list of field names (e.g. "Id") to
15343	// unconditionally include in API requests. By default, fields with
15344	// empty values are omitted from API requests. However, any non-pointer,
15345	// non-interface field appearing in ForceSendFields will be sent to the
15346	// server regardless of whether the field is empty or not. This may be
15347	// used to include empty fields in Patch requests.
15348	ForceSendFields []string `json:"-"`
15349
15350	// NullFields is a list of field names (e.g. "Id") to include in API
15351	// requests with the JSON null value. By default, fields with empty
15352	// values are omitted from API requests. However, any field with an
15353	// empty value appearing in NullFields will be sent to the server as
15354	// null. It is an error if a field in this list has a non-empty value.
15355	// This may be used to include null fields in Patch requests.
15356	NullFields []string `json:"-"`
15357}
15358
15359func (s *TargetInstanceList) MarshalJSON() ([]byte, error) {
15360	type noMethod TargetInstanceList
15361	raw := noMethod(*s)
15362	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15363}
15364
15365type TargetInstancesScopedList struct {
15366	// TargetInstances: List of target instances contained in this scope.
15367	TargetInstances []*TargetInstance `json:"targetInstances,omitempty"`
15368
15369	// Warning: Informational warning which replaces the list of addresses
15370	// when the list is empty.
15371	Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"`
15372
15373	// ForceSendFields is a list of field names (e.g. "TargetInstances") to
15374	// unconditionally include in API requests. By default, fields with
15375	// empty values are omitted from API requests. However, any non-pointer,
15376	// non-interface field appearing in ForceSendFields will be sent to the
15377	// server regardless of whether the field is empty or not. This may be
15378	// used to include empty fields in Patch requests.
15379	ForceSendFields []string `json:"-"`
15380
15381	// NullFields is a list of field names (e.g. "TargetInstances") to
15382	// include in API requests with the JSON null value. By default, fields
15383	// with empty values are omitted from API requests. However, any field
15384	// with an empty value appearing in NullFields will be sent to the
15385	// server as null. It is an error if a field in this list has a
15386	// non-empty value. This may be used to include null fields in Patch
15387	// requests.
15388	NullFields []string `json:"-"`
15389}
15390
15391func (s *TargetInstancesScopedList) MarshalJSON() ([]byte, error) {
15392	type noMethod TargetInstancesScopedList
15393	raw := noMethod(*s)
15394	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15395}
15396
15397// TargetInstancesScopedListWarning: Informational warning which
15398// replaces the list of addresses when the list is empty.
15399type TargetInstancesScopedListWarning struct {
15400	// Code: [Output Only] A warning code, if applicable. For example,
15401	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
15402	// the response.
15403	//
15404	// Possible values:
15405	//   "CLEANUP_FAILED"
15406	//   "DEPRECATED_RESOURCE_USED"
15407	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
15408	//   "FIELD_VALUE_OVERRIDEN"
15409	//   "INJECTED_KERNELS_DEPRECATED"
15410	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
15411	//   "NEXT_HOP_CANNOT_IP_FORWARD"
15412	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
15413	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
15414	//   "NEXT_HOP_NOT_RUNNING"
15415	//   "NOT_CRITICAL_ERROR"
15416	//   "NO_RESULTS_ON_PAGE"
15417	//   "REQUIRED_TOS_AGREEMENT"
15418	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
15419	//   "RESOURCE_NOT_DELETED"
15420	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
15421	//   "UNREACHABLE"
15422	Code string `json:"code,omitempty"`
15423
15424	// Data: [Output Only] Metadata about this warning in key: value format.
15425	// For example:
15426	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
15427	Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"`
15428
15429	// Message: [Output Only] A human-readable description of the warning
15430	// code.
15431	Message string `json:"message,omitempty"`
15432
15433	// ForceSendFields is a list of field names (e.g. "Code") to
15434	// unconditionally include in API requests. By default, fields with
15435	// empty values are omitted from API requests. However, any non-pointer,
15436	// non-interface field appearing in ForceSendFields will be sent to the
15437	// server regardless of whether the field is empty or not. This may be
15438	// used to include empty fields in Patch requests.
15439	ForceSendFields []string `json:"-"`
15440
15441	// NullFields is a list of field names (e.g. "Code") to include in API
15442	// requests with the JSON null value. By default, fields with empty
15443	// values are omitted from API requests. However, any field with an
15444	// empty value appearing in NullFields will be sent to the server as
15445	// null. It is an error if a field in this list has a non-empty value.
15446	// This may be used to include null fields in Patch requests.
15447	NullFields []string `json:"-"`
15448}
15449
15450func (s *TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) {
15451	type noMethod TargetInstancesScopedListWarning
15452	raw := noMethod(*s)
15453	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15454}
15455
15456type TargetInstancesScopedListWarningData struct {
15457	// Key: [Output Only] A key that provides more detail on the warning
15458	// being returned. For example, for warnings where there are no results
15459	// in a list request for a particular zone, this key might be scope and
15460	// the key value might be the zone name. Other examples might be a key
15461	// indicating a deprecated resource and a suggested replacement, or a
15462	// warning about invalid network settings (for example, if an instance
15463	// attempts to perform IP forwarding but is not enabled for IP
15464	// forwarding).
15465	Key string `json:"key,omitempty"`
15466
15467	// Value: [Output Only] A warning data value corresponding to the key.
15468	Value string `json:"value,omitempty"`
15469
15470	// ForceSendFields is a list of field names (e.g. "Key") to
15471	// unconditionally include in API requests. By default, fields with
15472	// empty values are omitted from API requests. However, any non-pointer,
15473	// non-interface field appearing in ForceSendFields will be sent to the
15474	// server regardless of whether the field is empty or not. This may be
15475	// used to include empty fields in Patch requests.
15476	ForceSendFields []string `json:"-"`
15477
15478	// NullFields is a list of field names (e.g. "Key") to include in API
15479	// requests with the JSON null value. By default, fields with empty
15480	// values are omitted from API requests. However, any field with an
15481	// empty value appearing in NullFields will be sent to the server as
15482	// null. It is an error if a field in this list has a non-empty value.
15483	// This may be used to include null fields in Patch requests.
15484	NullFields []string `json:"-"`
15485}
15486
15487func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) {
15488	type noMethod TargetInstancesScopedListWarningData
15489	raw := noMethod(*s)
15490	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15491}
15492
15493// TargetPool: A TargetPool resource. This resource defines a pool of
15494// instances, an associated HttpHealthCheck resource, and the fallback
15495// target pool.
15496type TargetPool struct {
15497	// BackupPool: This field is applicable only when the containing target
15498	// pool is serving a forwarding rule as the primary pool, and its
15499	// failoverRatio field is properly set to a value between [0,
15500	// 1].
15501	//
15502	// backupPool and failoverRatio together define the fallback behavior of
15503	// the primary target pool: if the ratio of the healthy instances in the
15504	// primary pool is at or below failoverRatio, traffic arriving at the
15505	// load-balanced IP will be directed to the backup pool.
15506	//
15507	// In case where failoverRatio and backupPool are not set, or all the
15508	// instances in the backup pool are unhealthy, the traffic will be
15509	// directed back to the primary pool in the "force" mode, where traffic
15510	// will be spread to the healthy instances with the best effort, or to
15511	// all instances when no instance is healthy.
15512	BackupPool string `json:"backupPool,omitempty"`
15513
15514	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
15515	// format.
15516	CreationTimestamp string `json:"creationTimestamp,omitempty"`
15517
15518	// Description: An optional description of this resource. Provide this
15519	// property when you create the resource.
15520	Description string `json:"description,omitempty"`
15521
15522	// FailoverRatio: This field is applicable only when the containing
15523	// target pool is serving a forwarding rule as the primary pool (i.e.,
15524	// not as a backup pool to some other target pool). The value of the
15525	// field must be in [0, 1].
15526	//
15527	// If set, backupPool must also be set. They together define the
15528	// fallback behavior of the primary target pool: if the ratio of the
15529	// healthy instances in the primary pool is at or below this number,
15530	// traffic arriving at the load-balanced IP will be directed to the
15531	// backup pool.
15532	//
15533	// In case where failoverRatio is not set or all the instances in the
15534	// backup pool are unhealthy, the traffic will be directed back to the
15535	// primary pool in the "force" mode, where traffic will be spread to the
15536	// healthy instances with the best effort, or to all instances when no
15537	// instance is healthy.
15538	FailoverRatio float64 `json:"failoverRatio,omitempty"`
15539
15540	// HealthChecks: The URL of the HttpHealthCheck resource. A member
15541	// instance in this pool is considered healthy if and only if the health
15542	// checks pass. An empty list means all member instances will be
15543	// considered healthy at all times. Only HttpHealthChecks are supported.
15544	// Only one health check may be specified.
15545	HealthChecks []string `json:"healthChecks,omitempty"`
15546
15547	// Id: [Output Only] The unique identifier for the resource. This
15548	// identifier is defined by the server.
15549	Id uint64 `json:"id,omitempty,string"`
15550
15551	// Instances: A list of resource URLs to the virtual machine instances
15552	// serving this pool. They must live in zones contained in the same
15553	// region as this pool.
15554	Instances []string `json:"instances,omitempty"`
15555
15556	// Kind: [Output Only] Type of the resource. Always compute#targetPool
15557	// for target pools.
15558	Kind string `json:"kind,omitempty"`
15559
15560	// Name: Name of the resource. Provided by the client when the resource
15561	// is created. The name must be 1-63 characters long, and comply with
15562	// RFC1035. Specifically, the name must be 1-63 characters long and
15563	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
15564	// the first character must be a lowercase letter, and all following
15565	// characters must be a dash, lowercase letter, or digit, except the
15566	// last character, which cannot be a dash.
15567	Name string `json:"name,omitempty"`
15568
15569	// Region: [Output Only] URL of the region where the target pool
15570	// resides.
15571	Region string `json:"region,omitempty"`
15572
15573	// SelfLink: [Output Only] Server-defined URL for the resource.
15574	SelfLink string `json:"selfLink,omitempty"`
15575
15576	// SessionAffinity: Sesssion affinity option, must be one of the
15577	// following values:
15578	// NONE: Connections from the same client IP may go to any instance in
15579	// the pool.
15580	// CLIENT_IP: Connections from the same client IP will go to the same
15581	// instance in the pool while that instance remains
15582	// healthy.
15583	// CLIENT_IP_PROTO: Connections from the same client IP with the same IP
15584	// protocol will go to the same instance in the pool while that instance
15585	// remains healthy.
15586	//
15587	// Possible values:
15588	//   "CLIENT_IP"
15589	//   "CLIENT_IP_PORT_PROTO"
15590	//   "CLIENT_IP_PROTO"
15591	//   "GENERATED_COOKIE"
15592	//   "NONE"
15593	SessionAffinity string `json:"sessionAffinity,omitempty"`
15594
15595	// ServerResponse contains the HTTP response code and headers from the
15596	// server.
15597	googleapi.ServerResponse `json:"-"`
15598
15599	// ForceSendFields is a list of field names (e.g. "BackupPool") to
15600	// unconditionally include in API requests. By default, fields with
15601	// empty values are omitted from API requests. However, any non-pointer,
15602	// non-interface field appearing in ForceSendFields will be sent to the
15603	// server regardless of whether the field is empty or not. This may be
15604	// used to include empty fields in Patch requests.
15605	ForceSendFields []string `json:"-"`
15606
15607	// NullFields is a list of field names (e.g. "BackupPool") to include in
15608	// API requests with the JSON null value. By default, fields with empty
15609	// values are omitted from API requests. However, any field with an
15610	// empty value appearing in NullFields will be sent to the server as
15611	// null. It is an error if a field in this list has a non-empty value.
15612	// This may be used to include null fields in Patch requests.
15613	NullFields []string `json:"-"`
15614}
15615
15616func (s *TargetPool) MarshalJSON() ([]byte, error) {
15617	type noMethod TargetPool
15618	raw := noMethod(*s)
15619	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15620}
15621
15622func (s *TargetPool) UnmarshalJSON(data []byte) error {
15623	type noMethod TargetPool
15624	var s1 struct {
15625		FailoverRatio gensupport.JSONFloat64 `json:"failoverRatio"`
15626		*noMethod
15627	}
15628	s1.noMethod = (*noMethod)(s)
15629	if err := json.Unmarshal(data, &s1); err != nil {
15630		return err
15631	}
15632	s.FailoverRatio = float64(s1.FailoverRatio)
15633	return nil
15634}
15635
15636type TargetPoolAggregatedList struct {
15637	// Id: [Output Only] Unique identifier for the resource; defined by the
15638	// server.
15639	Id string `json:"id,omitempty"`
15640
15641	// Items: A list of TargetPool resources.
15642	Items map[string]TargetPoolsScopedList `json:"items,omitempty"`
15643
15644	// Kind: [Output Only] Type of resource. Always
15645	// compute#targetPoolAggregatedList for aggregated lists of target
15646	// pools.
15647	Kind string `json:"kind,omitempty"`
15648
15649	// NextPageToken: [Output Only] This token allows you to get the next
15650	// page of results for list requests. If the number of results is larger
15651	// than maxResults, use the nextPageToken as a value for the query
15652	// parameter pageToken in the next list request. Subsequent list
15653	// requests will have their own nextPageToken to continue paging through
15654	// the results.
15655	NextPageToken string `json:"nextPageToken,omitempty"`
15656
15657	// SelfLink: [Output Only] Server-defined URL for this resource.
15658	SelfLink string `json:"selfLink,omitempty"`
15659
15660	// ServerResponse contains the HTTP response code and headers from the
15661	// server.
15662	googleapi.ServerResponse `json:"-"`
15663
15664	// ForceSendFields is a list of field names (e.g. "Id") to
15665	// unconditionally include in API requests. By default, fields with
15666	// empty values are omitted from API requests. However, any non-pointer,
15667	// non-interface field appearing in ForceSendFields will be sent to the
15668	// server regardless of whether the field is empty or not. This may be
15669	// used to include empty fields in Patch requests.
15670	ForceSendFields []string `json:"-"`
15671
15672	// NullFields is a list of field names (e.g. "Id") to include in API
15673	// requests with the JSON null value. By default, fields with empty
15674	// values are omitted from API requests. However, any field with an
15675	// empty value appearing in NullFields will be sent to the server as
15676	// null. It is an error if a field in this list has a non-empty value.
15677	// This may be used to include null fields in Patch requests.
15678	NullFields []string `json:"-"`
15679}
15680
15681func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) {
15682	type noMethod TargetPoolAggregatedList
15683	raw := noMethod(*s)
15684	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15685}
15686
15687type TargetPoolInstanceHealth struct {
15688	HealthStatus []*HealthStatus `json:"healthStatus,omitempty"`
15689
15690	// Kind: [Output Only] Type of resource. Always
15691	// compute#targetPoolInstanceHealth when checking the health of an
15692	// instance.
15693	Kind string `json:"kind,omitempty"`
15694
15695	// ServerResponse contains the HTTP response code and headers from the
15696	// server.
15697	googleapi.ServerResponse `json:"-"`
15698
15699	// ForceSendFields is a list of field names (e.g. "HealthStatus") to
15700	// unconditionally include in API requests. By default, fields with
15701	// empty values are omitted from API requests. However, any non-pointer,
15702	// non-interface field appearing in ForceSendFields will be sent to the
15703	// server regardless of whether the field is empty or not. This may be
15704	// used to include empty fields in Patch requests.
15705	ForceSendFields []string `json:"-"`
15706
15707	// NullFields is a list of field names (e.g. "HealthStatus") to include
15708	// in API requests with the JSON null value. By default, fields with
15709	// empty values are omitted from API requests. However, any field with
15710	// an empty value appearing in NullFields will be sent to the server as
15711	// null. It is an error if a field in this list has a non-empty value.
15712	// This may be used to include null fields in Patch requests.
15713	NullFields []string `json:"-"`
15714}
15715
15716func (s *TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) {
15717	type noMethod TargetPoolInstanceHealth
15718	raw := noMethod(*s)
15719	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15720}
15721
15722// TargetPoolList: Contains a list of TargetPool resources.
15723type TargetPoolList struct {
15724	// Id: [Output Only] Unique identifier for the resource; defined by the
15725	// server.
15726	Id string `json:"id,omitempty"`
15727
15728	// Items: A list of TargetPool resources.
15729	Items []*TargetPool `json:"items,omitempty"`
15730
15731	// Kind: [Output Only] Type of resource. Always compute#targetPoolList
15732	// for lists of target pools.
15733	Kind string `json:"kind,omitempty"`
15734
15735	// NextPageToken: [Output Only] This token allows you to get the next
15736	// page of results for list requests. If the number of results is larger
15737	// than maxResults, use the nextPageToken as a value for the query
15738	// parameter pageToken in the next list request. Subsequent list
15739	// requests will have their own nextPageToken to continue paging through
15740	// the results.
15741	NextPageToken string `json:"nextPageToken,omitempty"`
15742
15743	// SelfLink: [Output Only] Server-defined URL for this resource.
15744	SelfLink string `json:"selfLink,omitempty"`
15745
15746	// ServerResponse contains the HTTP response code and headers from the
15747	// server.
15748	googleapi.ServerResponse `json:"-"`
15749
15750	// ForceSendFields is a list of field names (e.g. "Id") to
15751	// unconditionally include in API requests. By default, fields with
15752	// empty values are omitted from API requests. However, any non-pointer,
15753	// non-interface field appearing in ForceSendFields will be sent to the
15754	// server regardless of whether the field is empty or not. This may be
15755	// used to include empty fields in Patch requests.
15756	ForceSendFields []string `json:"-"`
15757
15758	// NullFields is a list of field names (e.g. "Id") to include in API
15759	// requests with the JSON null value. By default, fields with empty
15760	// values are omitted from API requests. However, any field with an
15761	// empty value appearing in NullFields will be sent to the server as
15762	// null. It is an error if a field in this list has a non-empty value.
15763	// This may be used to include null fields in Patch requests.
15764	NullFields []string `json:"-"`
15765}
15766
15767func (s *TargetPoolList) MarshalJSON() ([]byte, error) {
15768	type noMethod TargetPoolList
15769	raw := noMethod(*s)
15770	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15771}
15772
15773type TargetPoolsAddHealthCheckRequest struct {
15774	// HealthChecks: The HttpHealthCheck to add to the target pool.
15775	HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"`
15776
15777	// ForceSendFields is a list of field names (e.g. "HealthChecks") to
15778	// unconditionally include in API requests. By default, fields with
15779	// empty values are omitted from API requests. However, any non-pointer,
15780	// non-interface field appearing in ForceSendFields will be sent to the
15781	// server regardless of whether the field is empty or not. This may be
15782	// used to include empty fields in Patch requests.
15783	ForceSendFields []string `json:"-"`
15784
15785	// NullFields is a list of field names (e.g. "HealthChecks") to include
15786	// in API requests with the JSON null value. By default, fields with
15787	// empty values are omitted from API requests. However, any field with
15788	// an empty value appearing in NullFields will be sent to the server as
15789	// null. It is an error if a field in this list has a non-empty value.
15790	// This may be used to include null fields in Patch requests.
15791	NullFields []string `json:"-"`
15792}
15793
15794func (s *TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) {
15795	type noMethod TargetPoolsAddHealthCheckRequest
15796	raw := noMethod(*s)
15797	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15798}
15799
15800type TargetPoolsAddInstanceRequest struct {
15801	// Instances: A full or partial URL to an instance to add to this target
15802	// pool. This can be a full or partial URL. For example, the following
15803	// are valid URLs:
15804	// -
15805	// https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name
15806	// - projects/project-id/zones/zone/instances/instance-name
15807	// - zones/zone/instances/instance-name
15808	Instances []*InstanceReference `json:"instances,omitempty"`
15809
15810	// ForceSendFields is a list of field names (e.g. "Instances") to
15811	// unconditionally include in API requests. By default, fields with
15812	// empty values are omitted from API requests. However, any non-pointer,
15813	// non-interface field appearing in ForceSendFields will be sent to the
15814	// server regardless of whether the field is empty or not. This may be
15815	// used to include empty fields in Patch requests.
15816	ForceSendFields []string `json:"-"`
15817
15818	// NullFields is a list of field names (e.g. "Instances") to include in
15819	// API requests with the JSON null value. By default, fields with empty
15820	// values are omitted from API requests. However, any field with an
15821	// empty value appearing in NullFields will be sent to the server as
15822	// null. It is an error if a field in this list has a non-empty value.
15823	// This may be used to include null fields in Patch requests.
15824	NullFields []string `json:"-"`
15825}
15826
15827func (s *TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) {
15828	type noMethod TargetPoolsAddInstanceRequest
15829	raw := noMethod(*s)
15830	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15831}
15832
15833type TargetPoolsRemoveHealthCheckRequest struct {
15834	// HealthChecks: Health check URL to be removed. This can be a full or
15835	// valid partial URL. For example, the following are valid URLs:
15836	// -
15837	// https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check
15838	// - projects/project/global/httpHealthChecks/health-check
15839	// - global/httpHealthChecks/health-check
15840	HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"`
15841
15842	// ForceSendFields is a list of field names (e.g. "HealthChecks") to
15843	// unconditionally include in API requests. By default, fields with
15844	// empty values are omitted from API requests. However, any non-pointer,
15845	// non-interface field appearing in ForceSendFields will be sent to the
15846	// server regardless of whether the field is empty or not. This may be
15847	// used to include empty fields in Patch requests.
15848	ForceSendFields []string `json:"-"`
15849
15850	// NullFields is a list of field names (e.g. "HealthChecks") to include
15851	// in API requests with the JSON null value. By default, fields with
15852	// empty values are omitted from API requests. However, any field with
15853	// an empty value appearing in NullFields will be sent to the server as
15854	// null. It is an error if a field in this list has a non-empty value.
15855	// This may be used to include null fields in Patch requests.
15856	NullFields []string `json:"-"`
15857}
15858
15859func (s *TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) {
15860	type noMethod TargetPoolsRemoveHealthCheckRequest
15861	raw := noMethod(*s)
15862	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15863}
15864
15865type TargetPoolsRemoveInstanceRequest struct {
15866	// Instances: URLs of the instances to be removed from target pool.
15867	Instances []*InstanceReference `json:"instances,omitempty"`
15868
15869	// ForceSendFields is a list of field names (e.g. "Instances") to
15870	// unconditionally include in API requests. By default, fields with
15871	// empty values are omitted from API requests. However, any non-pointer,
15872	// non-interface field appearing in ForceSendFields will be sent to the
15873	// server regardless of whether the field is empty or not. This may be
15874	// used to include empty fields in Patch requests.
15875	ForceSendFields []string `json:"-"`
15876
15877	// NullFields is a list of field names (e.g. "Instances") to include in
15878	// API requests with the JSON null value. By default, fields with empty
15879	// values are omitted from API requests. However, any field with an
15880	// empty value appearing in NullFields will be sent to the server as
15881	// null. It is an error if a field in this list has a non-empty value.
15882	// This may be used to include null fields in Patch requests.
15883	NullFields []string `json:"-"`
15884}
15885
15886func (s *TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) {
15887	type noMethod TargetPoolsRemoveInstanceRequest
15888	raw := noMethod(*s)
15889	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15890}
15891
15892type TargetPoolsScopedList struct {
15893	// TargetPools: List of target pools contained in this scope.
15894	TargetPools []*TargetPool `json:"targetPools,omitempty"`
15895
15896	// Warning: Informational warning which replaces the list of addresses
15897	// when the list is empty.
15898	Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"`
15899
15900	// ForceSendFields is a list of field names (e.g. "TargetPools") to
15901	// unconditionally include in API requests. By default, fields with
15902	// empty values are omitted from API requests. However, any non-pointer,
15903	// non-interface field appearing in ForceSendFields will be sent to the
15904	// server regardless of whether the field is empty or not. This may be
15905	// used to include empty fields in Patch requests.
15906	ForceSendFields []string `json:"-"`
15907
15908	// NullFields is a list of field names (e.g. "TargetPools") to include
15909	// in API requests with the JSON null value. By default, fields with
15910	// empty values are omitted from API requests. However, any field with
15911	// an empty value appearing in NullFields will be sent to the server as
15912	// null. It is an error if a field in this list has a non-empty value.
15913	// This may be used to include null fields in Patch requests.
15914	NullFields []string `json:"-"`
15915}
15916
15917func (s *TargetPoolsScopedList) MarshalJSON() ([]byte, error) {
15918	type noMethod TargetPoolsScopedList
15919	raw := noMethod(*s)
15920	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15921}
15922
15923// TargetPoolsScopedListWarning: Informational warning which replaces
15924// the list of addresses when the list is empty.
15925type TargetPoolsScopedListWarning struct {
15926	// Code: [Output Only] A warning code, if applicable. For example,
15927	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
15928	// the response.
15929	//
15930	// Possible values:
15931	//   "CLEANUP_FAILED"
15932	//   "DEPRECATED_RESOURCE_USED"
15933	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
15934	//   "FIELD_VALUE_OVERRIDEN"
15935	//   "INJECTED_KERNELS_DEPRECATED"
15936	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
15937	//   "NEXT_HOP_CANNOT_IP_FORWARD"
15938	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
15939	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
15940	//   "NEXT_HOP_NOT_RUNNING"
15941	//   "NOT_CRITICAL_ERROR"
15942	//   "NO_RESULTS_ON_PAGE"
15943	//   "REQUIRED_TOS_AGREEMENT"
15944	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
15945	//   "RESOURCE_NOT_DELETED"
15946	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
15947	//   "UNREACHABLE"
15948	Code string `json:"code,omitempty"`
15949
15950	// Data: [Output Only] Metadata about this warning in key: value format.
15951	// For example:
15952	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
15953	Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"`
15954
15955	// Message: [Output Only] A human-readable description of the warning
15956	// code.
15957	Message string `json:"message,omitempty"`
15958
15959	// ForceSendFields is a list of field names (e.g. "Code") to
15960	// unconditionally include in API requests. By default, fields with
15961	// empty values are omitted from API requests. However, any non-pointer,
15962	// non-interface field appearing in ForceSendFields will be sent to the
15963	// server regardless of whether the field is empty or not. This may be
15964	// used to include empty fields in Patch requests.
15965	ForceSendFields []string `json:"-"`
15966
15967	// NullFields is a list of field names (e.g. "Code") to include in API
15968	// requests with the JSON null value. By default, fields with empty
15969	// values are omitted from API requests. However, any field with an
15970	// empty value appearing in NullFields will be sent to the server as
15971	// null. It is an error if a field in this list has a non-empty value.
15972	// This may be used to include null fields in Patch requests.
15973	NullFields []string `json:"-"`
15974}
15975
15976func (s *TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) {
15977	type noMethod TargetPoolsScopedListWarning
15978	raw := noMethod(*s)
15979	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
15980}
15981
15982type TargetPoolsScopedListWarningData struct {
15983	// Key: [Output Only] A key that provides more detail on the warning
15984	// being returned. For example, for warnings where there are no results
15985	// in a list request for a particular zone, this key might be scope and
15986	// the key value might be the zone name. Other examples might be a key
15987	// indicating a deprecated resource and a suggested replacement, or a
15988	// warning about invalid network settings (for example, if an instance
15989	// attempts to perform IP forwarding but is not enabled for IP
15990	// forwarding).
15991	Key string `json:"key,omitempty"`
15992
15993	// Value: [Output Only] A warning data value corresponding to the key.
15994	Value string `json:"value,omitempty"`
15995
15996	// ForceSendFields is a list of field names (e.g. "Key") to
15997	// unconditionally include in API requests. By default, fields with
15998	// empty values are omitted from API requests. However, any non-pointer,
15999	// non-interface field appearing in ForceSendFields will be sent to the
16000	// server regardless of whether the field is empty or not. This may be
16001	// used to include empty fields in Patch requests.
16002	ForceSendFields []string `json:"-"`
16003
16004	// NullFields is a list of field names (e.g. "Key") to include in API
16005	// requests with the JSON null value. By default, fields with empty
16006	// values are omitted from API requests. However, any field with an
16007	// empty value appearing in NullFields will be sent to the server as
16008	// null. It is an error if a field in this list has a non-empty value.
16009	// This may be used to include null fields in Patch requests.
16010	NullFields []string `json:"-"`
16011}
16012
16013func (s *TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) {
16014	type noMethod TargetPoolsScopedListWarningData
16015	raw := noMethod(*s)
16016	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16017}
16018
16019type TargetReference struct {
16020	Target string `json:"target,omitempty"`
16021
16022	// ForceSendFields is a list of field names (e.g. "Target") to
16023	// unconditionally include in API requests. By default, fields with
16024	// empty values are omitted from API requests. However, any non-pointer,
16025	// non-interface field appearing in ForceSendFields will be sent to the
16026	// server regardless of whether the field is empty or not. This may be
16027	// used to include empty fields in Patch requests.
16028	ForceSendFields []string `json:"-"`
16029
16030	// NullFields is a list of field names (e.g. "Target") to include in API
16031	// requests with the JSON null value. By default, fields with empty
16032	// values are omitted from API requests. However, any field with an
16033	// empty value appearing in NullFields will be sent to the server as
16034	// null. It is an error if a field in this list has a non-empty value.
16035	// This may be used to include null fields in Patch requests.
16036	NullFields []string `json:"-"`
16037}
16038
16039func (s *TargetReference) MarshalJSON() ([]byte, error) {
16040	type noMethod TargetReference
16041	raw := noMethod(*s)
16042	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16043}
16044
16045type TargetSslProxiesSetBackendServiceRequest struct {
16046	// Service: The URL of the new BackendService resource for the
16047	// targetSslProxy.
16048	Service string `json:"service,omitempty"`
16049
16050	// ForceSendFields is a list of field names (e.g. "Service") to
16051	// unconditionally include in API requests. By default, fields with
16052	// empty values are omitted from API requests. However, any non-pointer,
16053	// non-interface field appearing in ForceSendFields will be sent to the
16054	// server regardless of whether the field is empty or not. This may be
16055	// used to include empty fields in Patch requests.
16056	ForceSendFields []string `json:"-"`
16057
16058	// NullFields is a list of field names (e.g. "Service") to include in
16059	// API requests with the JSON null value. By default, fields with empty
16060	// values are omitted from API requests. However, any field with an
16061	// empty value appearing in NullFields will be sent to the server as
16062	// null. It is an error if a field in this list has a non-empty value.
16063	// This may be used to include null fields in Patch requests.
16064	NullFields []string `json:"-"`
16065}
16066
16067func (s *TargetSslProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) {
16068	type noMethod TargetSslProxiesSetBackendServiceRequest
16069	raw := noMethod(*s)
16070	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16071}
16072
16073type TargetSslProxiesSetProxyHeaderRequest struct {
16074	// ProxyHeader: The new type of proxy header to append before sending
16075	// data to the backend. NONE or PROXY_V1 are allowed.
16076	//
16077	// Possible values:
16078	//   "NONE"
16079	//   "PROXY_V1"
16080	ProxyHeader string `json:"proxyHeader,omitempty"`
16081
16082	// ForceSendFields is a list of field names (e.g. "ProxyHeader") to
16083	// unconditionally include in API requests. By default, fields with
16084	// empty values are omitted from API requests. However, any non-pointer,
16085	// non-interface field appearing in ForceSendFields will be sent to the
16086	// server regardless of whether the field is empty or not. This may be
16087	// used to include empty fields in Patch requests.
16088	ForceSendFields []string `json:"-"`
16089
16090	// NullFields is a list of field names (e.g. "ProxyHeader") to include
16091	// in API requests with the JSON null value. By default, fields with
16092	// empty values are omitted from API requests. However, any field with
16093	// an empty value appearing in NullFields will be sent to the server as
16094	// null. It is an error if a field in this list has a non-empty value.
16095	// This may be used to include null fields in Patch requests.
16096	NullFields []string `json:"-"`
16097}
16098
16099func (s *TargetSslProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) {
16100	type noMethod TargetSslProxiesSetProxyHeaderRequest
16101	raw := noMethod(*s)
16102	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16103}
16104
16105type TargetSslProxiesSetSslCertificatesRequest struct {
16106	// SslCertificates: New set of URLs to SslCertificate resources to
16107	// associate with this TargetSslProxy. Currently exactly one ssl
16108	// certificate must be specified.
16109	SslCertificates []string `json:"sslCertificates,omitempty"`
16110
16111	// ForceSendFields is a list of field names (e.g. "SslCertificates") to
16112	// unconditionally include in API requests. By default, fields with
16113	// empty values are omitted from API requests. However, any non-pointer,
16114	// non-interface field appearing in ForceSendFields will be sent to the
16115	// server regardless of whether the field is empty or not. This may be
16116	// used to include empty fields in Patch requests.
16117	ForceSendFields []string `json:"-"`
16118
16119	// NullFields is a list of field names (e.g. "SslCertificates") to
16120	// include in API requests with the JSON null value. By default, fields
16121	// with empty values are omitted from API requests. However, any field
16122	// with an empty value appearing in NullFields will be sent to the
16123	// server as null. It is an error if a field in this list has a
16124	// non-empty value. This may be used to include null fields in Patch
16125	// requests.
16126	NullFields []string `json:"-"`
16127}
16128
16129func (s *TargetSslProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) {
16130	type noMethod TargetSslProxiesSetSslCertificatesRequest
16131	raw := noMethod(*s)
16132	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16133}
16134
16135// TargetSslProxy: A TargetSslProxy resource. This resource defines an
16136// SSL proxy.
16137type TargetSslProxy struct {
16138	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
16139	// format.
16140	CreationTimestamp string `json:"creationTimestamp,omitempty"`
16141
16142	// Description: An optional description of this resource. Provide this
16143	// property when you create the resource.
16144	Description string `json:"description,omitempty"`
16145
16146	// Id: [Output Only] The unique identifier for the resource. This
16147	// identifier is defined by the server.
16148	Id uint64 `json:"id,omitempty,string"`
16149
16150	// Kind: [Output Only] Type of the resource. Always
16151	// compute#targetSslProxy for target SSL proxies.
16152	Kind string `json:"kind,omitempty"`
16153
16154	// Name: Name of the resource. Provided by the client when the resource
16155	// is created. The name must be 1-63 characters long, and comply with
16156	// RFC1035. Specifically, the name must be 1-63 characters long and
16157	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
16158	// the first character must be a lowercase letter, and all following
16159	// characters must be a dash, lowercase letter, or digit, except the
16160	// last character, which cannot be a dash.
16161	Name string `json:"name,omitempty"`
16162
16163	// ProxyHeader: Specifies the type of proxy header to append before
16164	// sending data to the backend, either NONE or PROXY_V1. The default is
16165	// NONE.
16166	//
16167	// Possible values:
16168	//   "NONE"
16169	//   "PROXY_V1"
16170	ProxyHeader string `json:"proxyHeader,omitempty"`
16171
16172	// SelfLink: [Output Only] Server-defined URL for the resource.
16173	SelfLink string `json:"selfLink,omitempty"`
16174
16175	// Service: URL to the BackendService resource.
16176	Service string `json:"service,omitempty"`
16177
16178	// SslCertificates: URLs to SslCertificate resources that are used to
16179	// authenticate connections to Backends. Currently exactly one SSL
16180	// certificate must be specified.
16181	SslCertificates []string `json:"sslCertificates,omitempty"`
16182
16183	// ServerResponse contains the HTTP response code and headers from the
16184	// server.
16185	googleapi.ServerResponse `json:"-"`
16186
16187	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
16188	// to unconditionally include in API requests. By default, fields with
16189	// empty values are omitted from API requests. However, any non-pointer,
16190	// non-interface field appearing in ForceSendFields will be sent to the
16191	// server regardless of whether the field is empty or not. This may be
16192	// used to include empty fields in Patch requests.
16193	ForceSendFields []string `json:"-"`
16194
16195	// NullFields is a list of field names (e.g. "CreationTimestamp") to
16196	// include in API requests with the JSON null value. By default, fields
16197	// with empty values are omitted from API requests. However, any field
16198	// with an empty value appearing in NullFields will be sent to the
16199	// server as null. It is an error if a field in this list has a
16200	// non-empty value. This may be used to include null fields in Patch
16201	// requests.
16202	NullFields []string `json:"-"`
16203}
16204
16205func (s *TargetSslProxy) MarshalJSON() ([]byte, error) {
16206	type noMethod TargetSslProxy
16207	raw := noMethod(*s)
16208	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16209}
16210
16211// TargetSslProxyList: Contains a list of TargetSslProxy resources.
16212type TargetSslProxyList struct {
16213	// Id: [Output Only] Unique identifier for the resource; defined by the
16214	// server.
16215	Id string `json:"id,omitempty"`
16216
16217	// Items: A list of TargetSslProxy resources.
16218	Items []*TargetSslProxy `json:"items,omitempty"`
16219
16220	// Kind: Type of resource.
16221	Kind string `json:"kind,omitempty"`
16222
16223	// NextPageToken: [Output Only] This token allows you to get the next
16224	// page of results for list requests. If the number of results is larger
16225	// than maxResults, use the nextPageToken as a value for the query
16226	// parameter pageToken in the next list request. Subsequent list
16227	// requests will have their own nextPageToken to continue paging through
16228	// the results.
16229	NextPageToken string `json:"nextPageToken,omitempty"`
16230
16231	// SelfLink: [Output Only] Server-defined URL for this resource.
16232	SelfLink string `json:"selfLink,omitempty"`
16233
16234	// ServerResponse contains the HTTP response code and headers from the
16235	// server.
16236	googleapi.ServerResponse `json:"-"`
16237
16238	// ForceSendFields is a list of field names (e.g. "Id") to
16239	// unconditionally include in API requests. By default, fields with
16240	// empty values are omitted from API requests. However, any non-pointer,
16241	// non-interface field appearing in ForceSendFields will be sent to the
16242	// server regardless of whether the field is empty or not. This may be
16243	// used to include empty fields in Patch requests.
16244	ForceSendFields []string `json:"-"`
16245
16246	// NullFields is a list of field names (e.g. "Id") to include in API
16247	// requests with the JSON null value. By default, fields with empty
16248	// values are omitted from API requests. However, any field with an
16249	// empty value appearing in NullFields will be sent to the server as
16250	// null. It is an error if a field in this list has a non-empty value.
16251	// This may be used to include null fields in Patch requests.
16252	NullFields []string `json:"-"`
16253}
16254
16255func (s *TargetSslProxyList) MarshalJSON() ([]byte, error) {
16256	type noMethod TargetSslProxyList
16257	raw := noMethod(*s)
16258	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16259}
16260
16261type TargetTcpProxiesSetBackendServiceRequest struct {
16262	// Service: The URL of the new BackendService resource for the
16263	// targetTcpProxy.
16264	Service string `json:"service,omitempty"`
16265
16266	// ForceSendFields is a list of field names (e.g. "Service") to
16267	// unconditionally include in API requests. By default, fields with
16268	// empty values are omitted from API requests. However, any non-pointer,
16269	// non-interface field appearing in ForceSendFields will be sent to the
16270	// server regardless of whether the field is empty or not. This may be
16271	// used to include empty fields in Patch requests.
16272	ForceSendFields []string `json:"-"`
16273
16274	// NullFields is a list of field names (e.g. "Service") to include in
16275	// API requests with the JSON null value. By default, fields with empty
16276	// values are omitted from API requests. However, any field with an
16277	// empty value appearing in NullFields will be sent to the server as
16278	// null. It is an error if a field in this list has a non-empty value.
16279	// This may be used to include null fields in Patch requests.
16280	NullFields []string `json:"-"`
16281}
16282
16283func (s *TargetTcpProxiesSetBackendServiceRequest) MarshalJSON() ([]byte, error) {
16284	type noMethod TargetTcpProxiesSetBackendServiceRequest
16285	raw := noMethod(*s)
16286	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16287}
16288
16289type TargetTcpProxiesSetProxyHeaderRequest struct {
16290	// ProxyHeader: The new type of proxy header to append before sending
16291	// data to the backend. NONE or PROXY_V1 are allowed.
16292	//
16293	// Possible values:
16294	//   "NONE"
16295	//   "PROXY_V1"
16296	ProxyHeader string `json:"proxyHeader,omitempty"`
16297
16298	// ForceSendFields is a list of field names (e.g. "ProxyHeader") to
16299	// unconditionally include in API requests. By default, fields with
16300	// empty values are omitted from API requests. However, any non-pointer,
16301	// non-interface field appearing in ForceSendFields will be sent to the
16302	// server regardless of whether the field is empty or not. This may be
16303	// used to include empty fields in Patch requests.
16304	ForceSendFields []string `json:"-"`
16305
16306	// NullFields is a list of field names (e.g. "ProxyHeader") to include
16307	// in API requests with the JSON null value. By default, fields with
16308	// empty values are omitted from API requests. However, any field with
16309	// an empty value appearing in NullFields will be sent to the server as
16310	// null. It is an error if a field in this list has a non-empty value.
16311	// This may be used to include null fields in Patch requests.
16312	NullFields []string `json:"-"`
16313}
16314
16315func (s *TargetTcpProxiesSetProxyHeaderRequest) MarshalJSON() ([]byte, error) {
16316	type noMethod TargetTcpProxiesSetProxyHeaderRequest
16317	raw := noMethod(*s)
16318	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16319}
16320
16321// TargetTcpProxy: A TargetTcpProxy resource. This resource defines a
16322// TCP proxy.
16323type TargetTcpProxy struct {
16324	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
16325	// format.
16326	CreationTimestamp string `json:"creationTimestamp,omitempty"`
16327
16328	// Description: An optional description of this resource. Provide this
16329	// property when you create the resource.
16330	Description string `json:"description,omitempty"`
16331
16332	// Id: [Output Only] The unique identifier for the resource. This
16333	// identifier is defined by the server.
16334	Id uint64 `json:"id,omitempty,string"`
16335
16336	// Kind: [Output Only] Type of the resource. Always
16337	// compute#targetTcpProxy for target TCP proxies.
16338	Kind string `json:"kind,omitempty"`
16339
16340	// Name: Name of the resource. Provided by the client when the resource
16341	// is created. The name must be 1-63 characters long, and comply with
16342	// RFC1035. Specifically, the name must be 1-63 characters long and
16343	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
16344	// the first character must be a lowercase letter, and all following
16345	// characters must be a dash, lowercase letter, or digit, except the
16346	// last character, which cannot be a dash.
16347	Name string `json:"name,omitempty"`
16348
16349	// ProxyHeader: Specifies the type of proxy header to append before
16350	// sending data to the backend, either NONE or PROXY_V1. The default is
16351	// NONE.
16352	//
16353	// Possible values:
16354	//   "NONE"
16355	//   "PROXY_V1"
16356	ProxyHeader string `json:"proxyHeader,omitempty"`
16357
16358	// SelfLink: [Output Only] Server-defined URL for the resource.
16359	SelfLink string `json:"selfLink,omitempty"`
16360
16361	// Service: URL to the BackendService resource.
16362	Service string `json:"service,omitempty"`
16363
16364	// ServerResponse contains the HTTP response code and headers from the
16365	// server.
16366	googleapi.ServerResponse `json:"-"`
16367
16368	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
16369	// to unconditionally include in API requests. By default, fields with
16370	// empty values are omitted from API requests. However, any non-pointer,
16371	// non-interface field appearing in ForceSendFields will be sent to the
16372	// server regardless of whether the field is empty or not. This may be
16373	// used to include empty fields in Patch requests.
16374	ForceSendFields []string `json:"-"`
16375
16376	// NullFields is a list of field names (e.g. "CreationTimestamp") to
16377	// include in API requests with the JSON null value. By default, fields
16378	// with empty values are omitted from API requests. However, any field
16379	// with an empty value appearing in NullFields will be sent to the
16380	// server as null. It is an error if a field in this list has a
16381	// non-empty value. This may be used to include null fields in Patch
16382	// requests.
16383	NullFields []string `json:"-"`
16384}
16385
16386func (s *TargetTcpProxy) MarshalJSON() ([]byte, error) {
16387	type noMethod TargetTcpProxy
16388	raw := noMethod(*s)
16389	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16390}
16391
16392// TargetTcpProxyList: Contains a list of TargetTcpProxy resources.
16393type TargetTcpProxyList struct {
16394	// Id: [Output Only] Unique identifier for the resource; defined by the
16395	// server.
16396	Id string `json:"id,omitempty"`
16397
16398	// Items: A list of TargetTcpProxy resources.
16399	Items []*TargetTcpProxy `json:"items,omitempty"`
16400
16401	// Kind: Type of resource.
16402	Kind string `json:"kind,omitempty"`
16403
16404	// NextPageToken: [Output Only] This token allows you to get the next
16405	// page of results for list requests. If the number of results is larger
16406	// than maxResults, use the nextPageToken as a value for the query
16407	// parameter pageToken in the next list request. Subsequent list
16408	// requests will have their own nextPageToken to continue paging through
16409	// the results.
16410	NextPageToken string `json:"nextPageToken,omitempty"`
16411
16412	// SelfLink: [Output Only] Server-defined URL for this resource.
16413	SelfLink string `json:"selfLink,omitempty"`
16414
16415	// ServerResponse contains the HTTP response code and headers from the
16416	// server.
16417	googleapi.ServerResponse `json:"-"`
16418
16419	// ForceSendFields is a list of field names (e.g. "Id") to
16420	// unconditionally include in API requests. By default, fields with
16421	// empty values are omitted from API requests. However, any non-pointer,
16422	// non-interface field appearing in ForceSendFields will be sent to the
16423	// server regardless of whether the field is empty or not. This may be
16424	// used to include empty fields in Patch requests.
16425	ForceSendFields []string `json:"-"`
16426
16427	// NullFields is a list of field names (e.g. "Id") to include in API
16428	// requests with the JSON null value. By default, fields with empty
16429	// values are omitted from API requests. However, any field with an
16430	// empty value appearing in NullFields will be sent to the server as
16431	// null. It is an error if a field in this list has a non-empty value.
16432	// This may be used to include null fields in Patch requests.
16433	NullFields []string `json:"-"`
16434}
16435
16436func (s *TargetTcpProxyList) MarshalJSON() ([]byte, error) {
16437	type noMethod TargetTcpProxyList
16438	raw := noMethod(*s)
16439	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16440}
16441
16442// TargetVpnGateway: Represents a Target VPN gateway resource.
16443type TargetVpnGateway struct {
16444	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
16445	// format.
16446	CreationTimestamp string `json:"creationTimestamp,omitempty"`
16447
16448	// Description: An optional description of this resource. Provide this
16449	// property when you create the resource.
16450	Description string `json:"description,omitempty"`
16451
16452	// ForwardingRules: [Output Only] A list of URLs to the ForwardingRule
16453	// resources. ForwardingRules are created using
16454	// compute.forwardingRules.insert and associated to a VPN gateway.
16455	ForwardingRules []string `json:"forwardingRules,omitempty"`
16456
16457	// Id: [Output Only] The unique identifier for the resource. This
16458	// identifier is defined by the server.
16459	Id uint64 `json:"id,omitempty,string"`
16460
16461	// Kind: [Output Only] Type of resource. Always compute#targetVpnGateway
16462	// for target VPN gateways.
16463	Kind string `json:"kind,omitempty"`
16464
16465	// Name: Name of the resource. Provided by the client when the resource
16466	// is created. The name must be 1-63 characters long, and comply with
16467	// RFC1035. Specifically, the name must be 1-63 characters long and
16468	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
16469	// the first character must be a lowercase letter, and all following
16470	// characters must be a dash, lowercase letter, or digit, except the
16471	// last character, which cannot be a dash.
16472	Name string `json:"name,omitempty"`
16473
16474	// Network: URL of the network to which this VPN gateway is attached.
16475	// Provided by the client when the VPN gateway is created.
16476	Network string `json:"network,omitempty"`
16477
16478	// Region: [Output Only] URL of the region where the target VPN gateway
16479	// resides.
16480	Region string `json:"region,omitempty"`
16481
16482	// SelfLink: [Output Only] Server-defined URL for the resource.
16483	SelfLink string `json:"selfLink,omitempty"`
16484
16485	// Status: [Output Only] The status of the VPN gateway.
16486	//
16487	// Possible values:
16488	//   "CREATING"
16489	//   "DELETING"
16490	//   "FAILED"
16491	//   "READY"
16492	Status string `json:"status,omitempty"`
16493
16494	// Tunnels: [Output Only] A list of URLs to VpnTunnel resources.
16495	// VpnTunnels are created using compute.vpntunnels.insert method and
16496	// associated to a VPN gateway.
16497	Tunnels []string `json:"tunnels,omitempty"`
16498
16499	// ServerResponse contains the HTTP response code and headers from the
16500	// server.
16501	googleapi.ServerResponse `json:"-"`
16502
16503	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
16504	// to unconditionally include in API requests. By default, fields with
16505	// empty values are omitted from API requests. However, any non-pointer,
16506	// non-interface field appearing in ForceSendFields will be sent to the
16507	// server regardless of whether the field is empty or not. This may be
16508	// used to include empty fields in Patch requests.
16509	ForceSendFields []string `json:"-"`
16510
16511	// NullFields is a list of field names (e.g. "CreationTimestamp") to
16512	// include in API requests with the JSON null value. By default, fields
16513	// with empty values are omitted from API requests. However, any field
16514	// with an empty value appearing in NullFields will be sent to the
16515	// server as null. It is an error if a field in this list has a
16516	// non-empty value. This may be used to include null fields in Patch
16517	// requests.
16518	NullFields []string `json:"-"`
16519}
16520
16521func (s *TargetVpnGateway) MarshalJSON() ([]byte, error) {
16522	type noMethod TargetVpnGateway
16523	raw := noMethod(*s)
16524	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16525}
16526
16527type TargetVpnGatewayAggregatedList struct {
16528	// Id: [Output Only] Unique identifier for the resource; defined by the
16529	// server.
16530	Id string `json:"id,omitempty"`
16531
16532	// Items: A list of TargetVpnGateway resources.
16533	Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"`
16534
16535	// Kind: [Output Only] Type of resource. Always compute#targetVpnGateway
16536	// for target VPN gateways.
16537	Kind string `json:"kind,omitempty"`
16538
16539	// NextPageToken: [Output Only] This token allows you to get the next
16540	// page of results for list requests. If the number of results is larger
16541	// than maxResults, use the nextPageToken as a value for the query
16542	// parameter pageToken in the next list request. Subsequent list
16543	// requests will have their own nextPageToken to continue paging through
16544	// the results.
16545	NextPageToken string `json:"nextPageToken,omitempty"`
16546
16547	// SelfLink: [Output Only] Server-defined URL for this resource.
16548	SelfLink string `json:"selfLink,omitempty"`
16549
16550	// ServerResponse contains the HTTP response code and headers from the
16551	// server.
16552	googleapi.ServerResponse `json:"-"`
16553
16554	// ForceSendFields is a list of field names (e.g. "Id") to
16555	// unconditionally include in API requests. By default, fields with
16556	// empty values are omitted from API requests. However, any non-pointer,
16557	// non-interface field appearing in ForceSendFields will be sent to the
16558	// server regardless of whether the field is empty or not. This may be
16559	// used to include empty fields in Patch requests.
16560	ForceSendFields []string `json:"-"`
16561
16562	// NullFields is a list of field names (e.g. "Id") to include in API
16563	// requests with the JSON null value. By default, fields with empty
16564	// values are omitted from API requests. However, any field with an
16565	// empty value appearing in NullFields will be sent to the server as
16566	// null. It is an error if a field in this list has a non-empty value.
16567	// This may be used to include null fields in Patch requests.
16568	NullFields []string `json:"-"`
16569}
16570
16571func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) {
16572	type noMethod TargetVpnGatewayAggregatedList
16573	raw := noMethod(*s)
16574	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16575}
16576
16577// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources.
16578type TargetVpnGatewayList struct {
16579	// Id: [Output Only] Unique identifier for the resource; defined by the
16580	// server.
16581	Id string `json:"id,omitempty"`
16582
16583	// Items: A list of TargetVpnGateway resources.
16584	Items []*TargetVpnGateway `json:"items,omitempty"`
16585
16586	// Kind: [Output Only] Type of resource. Always compute#targetVpnGateway
16587	// for target VPN gateways.
16588	Kind string `json:"kind,omitempty"`
16589
16590	// NextPageToken: [Output Only] This token allows you to get the next
16591	// page of results for list requests. If the number of results is larger
16592	// than maxResults, use the nextPageToken as a value for the query
16593	// parameter pageToken in the next list request. Subsequent list
16594	// requests will have their own nextPageToken to continue paging through
16595	// the results.
16596	NextPageToken string `json:"nextPageToken,omitempty"`
16597
16598	// SelfLink: [Output Only] Server-defined URL for this resource.
16599	SelfLink string `json:"selfLink,omitempty"`
16600
16601	// ServerResponse contains the HTTP response code and headers from the
16602	// server.
16603	googleapi.ServerResponse `json:"-"`
16604
16605	// ForceSendFields is a list of field names (e.g. "Id") to
16606	// unconditionally include in API requests. By default, fields with
16607	// empty values are omitted from API requests. However, any non-pointer,
16608	// non-interface field appearing in ForceSendFields will be sent to the
16609	// server regardless of whether the field is empty or not. This may be
16610	// used to include empty fields in Patch requests.
16611	ForceSendFields []string `json:"-"`
16612
16613	// NullFields is a list of field names (e.g. "Id") to include in API
16614	// requests with the JSON null value. By default, fields with empty
16615	// values are omitted from API requests. However, any field with an
16616	// empty value appearing in NullFields will be sent to the server as
16617	// null. It is an error if a field in this list has a non-empty value.
16618	// This may be used to include null fields in Patch requests.
16619	NullFields []string `json:"-"`
16620}
16621
16622func (s *TargetVpnGatewayList) MarshalJSON() ([]byte, error) {
16623	type noMethod TargetVpnGatewayList
16624	raw := noMethod(*s)
16625	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16626}
16627
16628type TargetVpnGatewaysScopedList struct {
16629	// TargetVpnGateways: [Output Only] List of target vpn gateways
16630	// contained in this scope.
16631	TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"`
16632
16633	// Warning: [Output Only] Informational warning which replaces the list
16634	// of addresses when the list is empty.
16635	Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"`
16636
16637	// ForceSendFields is a list of field names (e.g. "TargetVpnGateways")
16638	// to unconditionally include in API requests. By default, fields with
16639	// empty values are omitted from API requests. However, any non-pointer,
16640	// non-interface field appearing in ForceSendFields will be sent to the
16641	// server regardless of whether the field is empty or not. This may be
16642	// used to include empty fields in Patch requests.
16643	ForceSendFields []string `json:"-"`
16644
16645	// NullFields is a list of field names (e.g. "TargetVpnGateways") to
16646	// include in API requests with the JSON null value. By default, fields
16647	// with empty values are omitted from API requests. However, any field
16648	// with an empty value appearing in NullFields will be sent to the
16649	// server as null. It is an error if a field in this list has a
16650	// non-empty value. This may be used to include null fields in Patch
16651	// requests.
16652	NullFields []string `json:"-"`
16653}
16654
16655func (s *TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) {
16656	type noMethod TargetVpnGatewaysScopedList
16657	raw := noMethod(*s)
16658	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16659}
16660
16661// TargetVpnGatewaysScopedListWarning: [Output Only] Informational
16662// warning which replaces the list of addresses when the list is empty.
16663type TargetVpnGatewaysScopedListWarning struct {
16664	// Code: [Output Only] A warning code, if applicable. For example,
16665	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
16666	// the response.
16667	//
16668	// Possible values:
16669	//   "CLEANUP_FAILED"
16670	//   "DEPRECATED_RESOURCE_USED"
16671	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
16672	//   "FIELD_VALUE_OVERRIDEN"
16673	//   "INJECTED_KERNELS_DEPRECATED"
16674	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
16675	//   "NEXT_HOP_CANNOT_IP_FORWARD"
16676	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
16677	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
16678	//   "NEXT_HOP_NOT_RUNNING"
16679	//   "NOT_CRITICAL_ERROR"
16680	//   "NO_RESULTS_ON_PAGE"
16681	//   "REQUIRED_TOS_AGREEMENT"
16682	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
16683	//   "RESOURCE_NOT_DELETED"
16684	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
16685	//   "UNREACHABLE"
16686	Code string `json:"code,omitempty"`
16687
16688	// Data: [Output Only] Metadata about this warning in key: value format.
16689	// For example:
16690	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
16691	Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"`
16692
16693	// Message: [Output Only] A human-readable description of the warning
16694	// code.
16695	Message string `json:"message,omitempty"`
16696
16697	// ForceSendFields is a list of field names (e.g. "Code") to
16698	// unconditionally include in API requests. By default, fields with
16699	// empty values are omitted from API requests. However, any non-pointer,
16700	// non-interface field appearing in ForceSendFields will be sent to the
16701	// server regardless of whether the field is empty or not. This may be
16702	// used to include empty fields in Patch requests.
16703	ForceSendFields []string `json:"-"`
16704
16705	// NullFields is a list of field names (e.g. "Code") to include in API
16706	// requests with the JSON null value. By default, fields with empty
16707	// values are omitted from API requests. However, any field with an
16708	// empty value appearing in NullFields will be sent to the server as
16709	// null. It is an error if a field in this list has a non-empty value.
16710	// This may be used to include null fields in Patch requests.
16711	NullFields []string `json:"-"`
16712}
16713
16714func (s *TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) {
16715	type noMethod TargetVpnGatewaysScopedListWarning
16716	raw := noMethod(*s)
16717	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16718}
16719
16720type TargetVpnGatewaysScopedListWarningData struct {
16721	// Key: [Output Only] A key that provides more detail on the warning
16722	// being returned. For example, for warnings where there are no results
16723	// in a list request for a particular zone, this key might be scope and
16724	// the key value might be the zone name. Other examples might be a key
16725	// indicating a deprecated resource and a suggested replacement, or a
16726	// warning about invalid network settings (for example, if an instance
16727	// attempts to perform IP forwarding but is not enabled for IP
16728	// forwarding).
16729	Key string `json:"key,omitempty"`
16730
16731	// Value: [Output Only] A warning data value corresponding to the key.
16732	Value string `json:"value,omitempty"`
16733
16734	// ForceSendFields is a list of field names (e.g. "Key") to
16735	// unconditionally include in API requests. By default, fields with
16736	// empty values are omitted from API requests. However, any non-pointer,
16737	// non-interface field appearing in ForceSendFields will be sent to the
16738	// server regardless of whether the field is empty or not. This may be
16739	// used to include empty fields in Patch requests.
16740	ForceSendFields []string `json:"-"`
16741
16742	// NullFields is a list of field names (e.g. "Key") to include in API
16743	// requests with the JSON null value. By default, fields with empty
16744	// values are omitted from API requests. However, any field with an
16745	// empty value appearing in NullFields will be sent to the server as
16746	// null. It is an error if a field in this list has a non-empty value.
16747	// This may be used to include null fields in Patch requests.
16748	NullFields []string `json:"-"`
16749}
16750
16751func (s *TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) {
16752	type noMethod TargetVpnGatewaysScopedListWarningData
16753	raw := noMethod(*s)
16754	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16755}
16756
16757type TestFailure struct {
16758	ActualService string `json:"actualService,omitempty"`
16759
16760	ExpectedService string `json:"expectedService,omitempty"`
16761
16762	Host string `json:"host,omitempty"`
16763
16764	Path string `json:"path,omitempty"`
16765
16766	// ForceSendFields is a list of field names (e.g. "ActualService") to
16767	// unconditionally include in API requests. By default, fields with
16768	// empty values are omitted from API requests. However, any non-pointer,
16769	// non-interface field appearing in ForceSendFields will be sent to the
16770	// server regardless of whether the field is empty or not. This may be
16771	// used to include empty fields in Patch requests.
16772	ForceSendFields []string `json:"-"`
16773
16774	// NullFields is a list of field names (e.g. "ActualService") to include
16775	// in API requests with the JSON null value. By default, fields with
16776	// empty values are omitted from API requests. However, any field with
16777	// an empty value appearing in NullFields will be sent to the server as
16778	// null. It is an error if a field in this list has a non-empty value.
16779	// This may be used to include null fields in Patch requests.
16780	NullFields []string `json:"-"`
16781}
16782
16783func (s *TestFailure) MarshalJSON() ([]byte, error) {
16784	type noMethod TestFailure
16785	raw := noMethod(*s)
16786	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16787}
16788
16789type TestPermissionsRequest struct {
16790	// Permissions: The set of permissions to check for the 'resource'.
16791	// Permissions with wildcards (such as '*' or 'storage.*') are not
16792	// allowed.
16793	Permissions []string `json:"permissions,omitempty"`
16794
16795	// ForceSendFields is a list of field names (e.g. "Permissions") to
16796	// unconditionally include in API requests. By default, fields with
16797	// empty values are omitted from API requests. However, any non-pointer,
16798	// non-interface field appearing in ForceSendFields will be sent to the
16799	// server regardless of whether the field is empty or not. This may be
16800	// used to include empty fields in Patch requests.
16801	ForceSendFields []string `json:"-"`
16802
16803	// NullFields is a list of field names (e.g. "Permissions") to include
16804	// in API requests with the JSON null value. By default, fields with
16805	// empty values are omitted from API requests. However, any field with
16806	// an empty value appearing in NullFields will be sent to the server as
16807	// null. It is an error if a field in this list has a non-empty value.
16808	// This may be used to include null fields in Patch requests.
16809	NullFields []string `json:"-"`
16810}
16811
16812func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) {
16813	type noMethod TestPermissionsRequest
16814	raw := noMethod(*s)
16815	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16816}
16817
16818type TestPermissionsResponse struct {
16819	// Permissions: A subset of `TestPermissionsRequest.permissions` that
16820	// the caller is allowed.
16821	Permissions []string `json:"permissions,omitempty"`
16822
16823	// ServerResponse contains the HTTP response code and headers from the
16824	// server.
16825	googleapi.ServerResponse `json:"-"`
16826
16827	// ForceSendFields is a list of field names (e.g. "Permissions") to
16828	// unconditionally include in API requests. By default, fields with
16829	// empty values are omitted from API requests. However, any non-pointer,
16830	// non-interface field appearing in ForceSendFields will be sent to the
16831	// server regardless of whether the field is empty or not. This may be
16832	// used to include empty fields in Patch requests.
16833	ForceSendFields []string `json:"-"`
16834
16835	// NullFields is a list of field names (e.g. "Permissions") to include
16836	// in API requests with the JSON null value. By default, fields with
16837	// empty values are omitted from API requests. However, any field with
16838	// an empty value appearing in NullFields will be sent to the server as
16839	// null. It is an error if a field in this list has a non-empty value.
16840	// This may be used to include null fields in Patch requests.
16841	NullFields []string `json:"-"`
16842}
16843
16844func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) {
16845	type noMethod TestPermissionsResponse
16846	raw := noMethod(*s)
16847	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16848}
16849
16850type UDPHealthCheck struct {
16851	// Port: The UDP port number for the health check request. Valid values
16852	// are 1 through 65535.
16853	Port int64 `json:"port,omitempty"`
16854
16855	// PortName: Port name as defined in InstanceGroup#NamedPort#name. If
16856	// both port and port_name are defined, port takes precedence.
16857	PortName string `json:"portName,omitempty"`
16858
16859	// Request: Raw data of request to send in payload of UDP packet. It is
16860	// an error if this is empty. The request data can only be ASCII.
16861	Request string `json:"request,omitempty"`
16862
16863	// Response: The bytes to match against the beginning of the response
16864	// data. It is an error if this is empty. The response data can only be
16865	// ASCII.
16866	Response string `json:"response,omitempty"`
16867
16868	// ForceSendFields is a list of field names (e.g. "Port") to
16869	// unconditionally include in API requests. By default, fields with
16870	// empty values are omitted from API requests. However, any non-pointer,
16871	// non-interface field appearing in ForceSendFields will be sent to the
16872	// server regardless of whether the field is empty or not. This may be
16873	// used to include empty fields in Patch requests.
16874	ForceSendFields []string `json:"-"`
16875
16876	// NullFields is a list of field names (e.g. "Port") to include in API
16877	// requests with the JSON null value. By default, fields with empty
16878	// values are omitted from API requests. However, any field with an
16879	// empty value appearing in NullFields will be sent to the server as
16880	// null. It is an error if a field in this list has a non-empty value.
16881	// This may be used to include null fields in Patch requests.
16882	NullFields []string `json:"-"`
16883}
16884
16885func (s *UDPHealthCheck) MarshalJSON() ([]byte, error) {
16886	type noMethod UDPHealthCheck
16887	raw := noMethod(*s)
16888	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16889}
16890
16891// UrlMap: A UrlMap resource. This resource defines the mapping from URL
16892// to the BackendService resource, based on the "longest-match" of the
16893// URL's host and path.
16894type UrlMap struct {
16895	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
16896	// format.
16897	CreationTimestamp string `json:"creationTimestamp,omitempty"`
16898
16899	// DefaultService: The URL of the BackendService resource if none of the
16900	// hostRules match.
16901	DefaultService string `json:"defaultService,omitempty"`
16902
16903	// Description: An optional description of this resource. Provide this
16904	// property when you create the resource.
16905	Description string `json:"description,omitempty"`
16906
16907	// Fingerprint: Fingerprint of this resource. A hash of the contents
16908	// stored in this object. This field is used in optimistic locking. This
16909	// field will be ignored when inserting a UrlMap. An up-to-date
16910	// fingerprint must be provided in order to update the UrlMap.
16911	Fingerprint string `json:"fingerprint,omitempty"`
16912
16913	// HostRules: The list of HostRules to use against the URL.
16914	HostRules []*HostRule `json:"hostRules,omitempty"`
16915
16916	// Id: [Output Only] The unique identifier for the resource. This
16917	// identifier is defined by the server.
16918	Id uint64 `json:"id,omitempty,string"`
16919
16920	// Kind: [Output Only] Type of the resource. Always compute#urlMaps for
16921	// url maps.
16922	Kind string `json:"kind,omitempty"`
16923
16924	// Name: Name of the resource. Provided by the client when the resource
16925	// is created. The name must be 1-63 characters long, and comply with
16926	// RFC1035. Specifically, the name must be 1-63 characters long and
16927	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
16928	// the first character must be a lowercase letter, and all following
16929	// characters must be a dash, lowercase letter, or digit, except the
16930	// last character, which cannot be a dash.
16931	Name string `json:"name,omitempty"`
16932
16933	// PathMatchers: The list of named PathMatchers to use against the URL.
16934	PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"`
16935
16936	// SelfLink: [Output Only] Server-defined URL for the resource.
16937	SelfLink string `json:"selfLink,omitempty"`
16938
16939	// Tests: The list of expected URL mappings. Request to update this
16940	// UrlMap will succeed only if all of the test cases pass.
16941	Tests []*UrlMapTest `json:"tests,omitempty"`
16942
16943	// ServerResponse contains the HTTP response code and headers from the
16944	// server.
16945	googleapi.ServerResponse `json:"-"`
16946
16947	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
16948	// to unconditionally include in API requests. By default, fields with
16949	// empty values are omitted from API requests. However, any non-pointer,
16950	// non-interface field appearing in ForceSendFields will be sent to the
16951	// server regardless of whether the field is empty or not. This may be
16952	// used to include empty fields in Patch requests.
16953	ForceSendFields []string `json:"-"`
16954
16955	// NullFields is a list of field names (e.g. "CreationTimestamp") to
16956	// include in API requests with the JSON null value. By default, fields
16957	// with empty values are omitted from API requests. However, any field
16958	// with an empty value appearing in NullFields will be sent to the
16959	// server as null. It is an error if a field in this list has a
16960	// non-empty value. This may be used to include null fields in Patch
16961	// requests.
16962	NullFields []string `json:"-"`
16963}
16964
16965func (s *UrlMap) MarshalJSON() ([]byte, error) {
16966	type noMethod UrlMap
16967	raw := noMethod(*s)
16968	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
16969}
16970
16971// UrlMapList: Contains a list of UrlMap resources.
16972type UrlMapList struct {
16973	// Id: [Output Only] Unique identifier for the resource; defined by the
16974	// server.
16975	Id string `json:"id,omitempty"`
16976
16977	// Items: A list of UrlMap resources.
16978	Items []*UrlMap `json:"items,omitempty"`
16979
16980	// Kind: Type of resource.
16981	Kind string `json:"kind,omitempty"`
16982
16983	// NextPageToken: [Output Only] This token allows you to get the next
16984	// page of results for list requests. If the number of results is larger
16985	// than maxResults, use the nextPageToken as a value for the query
16986	// parameter pageToken in the next list request. Subsequent list
16987	// requests will have their own nextPageToken to continue paging through
16988	// the results.
16989	NextPageToken string `json:"nextPageToken,omitempty"`
16990
16991	// SelfLink: [Output Only] Server-defined URL for this resource.
16992	SelfLink string `json:"selfLink,omitempty"`
16993
16994	// ServerResponse contains the HTTP response code and headers from the
16995	// server.
16996	googleapi.ServerResponse `json:"-"`
16997
16998	// ForceSendFields is a list of field names (e.g. "Id") to
16999	// unconditionally include in API requests. By default, fields with
17000	// empty values are omitted from API requests. However, any non-pointer,
17001	// non-interface field appearing in ForceSendFields will be sent to the
17002	// server regardless of whether the field is empty or not. This may be
17003	// used to include empty fields in Patch requests.
17004	ForceSendFields []string `json:"-"`
17005
17006	// NullFields is a list of field names (e.g. "Id") to include in API
17007	// requests with the JSON null value. By default, fields with empty
17008	// values are omitted from API requests. However, any field with an
17009	// empty value appearing in NullFields will be sent to the server as
17010	// null. It is an error if a field in this list has a non-empty value.
17011	// This may be used to include null fields in Patch requests.
17012	NullFields []string `json:"-"`
17013}
17014
17015func (s *UrlMapList) MarshalJSON() ([]byte, error) {
17016	type noMethod UrlMapList
17017	raw := noMethod(*s)
17018	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17019}
17020
17021type UrlMapReference struct {
17022	UrlMap string `json:"urlMap,omitempty"`
17023
17024	// ForceSendFields is a list of field names (e.g. "UrlMap") to
17025	// unconditionally include in API requests. By default, fields with
17026	// empty values are omitted from API requests. However, any non-pointer,
17027	// non-interface field appearing in ForceSendFields will be sent to the
17028	// server regardless of whether the field is empty or not. This may be
17029	// used to include empty fields in Patch requests.
17030	ForceSendFields []string `json:"-"`
17031
17032	// NullFields is a list of field names (e.g. "UrlMap") to include in API
17033	// requests with the JSON null value. By default, fields with empty
17034	// values are omitted from API requests. However, any field with an
17035	// empty value appearing in NullFields will be sent to the server as
17036	// null. It is an error if a field in this list has a non-empty value.
17037	// This may be used to include null fields in Patch requests.
17038	NullFields []string `json:"-"`
17039}
17040
17041func (s *UrlMapReference) MarshalJSON() ([]byte, error) {
17042	type noMethod UrlMapReference
17043	raw := noMethod(*s)
17044	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17045}
17046
17047// UrlMapTest: Message for the expected URL mappings.
17048type UrlMapTest struct {
17049	// Description: Description of this test case.
17050	Description string `json:"description,omitempty"`
17051
17052	// Host: Host portion of the URL.
17053	Host string `json:"host,omitempty"`
17054
17055	// Path: Path portion of the URL.
17056	Path string `json:"path,omitempty"`
17057
17058	// Service: Expected BackendService resource the given URL should be
17059	// mapped to.
17060	Service string `json:"service,omitempty"`
17061
17062	// ForceSendFields is a list of field names (e.g. "Description") to
17063	// unconditionally include in API requests. By default, fields with
17064	// empty values are omitted from API requests. However, any non-pointer,
17065	// non-interface field appearing in ForceSendFields will be sent to the
17066	// server regardless of whether the field is empty or not. This may be
17067	// used to include empty fields in Patch requests.
17068	ForceSendFields []string `json:"-"`
17069
17070	// NullFields is a list of field names (e.g. "Description") to include
17071	// in API requests with the JSON null value. By default, fields with
17072	// empty values are omitted from API requests. However, any field with
17073	// an empty value appearing in NullFields will be sent to the server as
17074	// null. It is an error if a field in this list has a non-empty value.
17075	// This may be used to include null fields in Patch requests.
17076	NullFields []string `json:"-"`
17077}
17078
17079func (s *UrlMapTest) MarshalJSON() ([]byte, error) {
17080	type noMethod UrlMapTest
17081	raw := noMethod(*s)
17082	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17083}
17084
17085// UrlMapValidationResult: Message representing the validation result
17086// for a UrlMap.
17087type UrlMapValidationResult struct {
17088	LoadErrors []string `json:"loadErrors,omitempty"`
17089
17090	// LoadSucceeded: Whether the given UrlMap can be successfully loaded.
17091	// If false, 'loadErrors' indicates the reasons.
17092	LoadSucceeded bool `json:"loadSucceeded,omitempty"`
17093
17094	TestFailures []*TestFailure `json:"testFailures,omitempty"`
17095
17096	// TestPassed: If successfully loaded, this field indicates whether the
17097	// test passed. If false, 'testFailures's indicate the reason of
17098	// failure.
17099	TestPassed bool `json:"testPassed,omitempty"`
17100
17101	// ForceSendFields is a list of field names (e.g. "LoadErrors") to
17102	// unconditionally include in API requests. By default, fields with
17103	// empty values are omitted from API requests. However, any non-pointer,
17104	// non-interface field appearing in ForceSendFields will be sent to the
17105	// server regardless of whether the field is empty or not. This may be
17106	// used to include empty fields in Patch requests.
17107	ForceSendFields []string `json:"-"`
17108
17109	// NullFields is a list of field names (e.g. "LoadErrors") to include in
17110	// API requests with the JSON null value. By default, fields with empty
17111	// values are omitted from API requests. However, any field with an
17112	// empty value appearing in NullFields will be sent to the server as
17113	// null. It is an error if a field in this list has a non-empty value.
17114	// This may be used to include null fields in Patch requests.
17115	NullFields []string `json:"-"`
17116}
17117
17118func (s *UrlMapValidationResult) MarshalJSON() ([]byte, error) {
17119	type noMethod UrlMapValidationResult
17120	raw := noMethod(*s)
17121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17122}
17123
17124type UrlMapsValidateRequest struct {
17125	// Resource: Content of the UrlMap to be validated.
17126	Resource *UrlMap `json:"resource,omitempty"`
17127
17128	// ForceSendFields is a list of field names (e.g. "Resource") to
17129	// unconditionally include in API requests. By default, fields with
17130	// empty values are omitted from API requests. However, any non-pointer,
17131	// non-interface field appearing in ForceSendFields will be sent to the
17132	// server regardless of whether the field is empty or not. This may be
17133	// used to include empty fields in Patch requests.
17134	ForceSendFields []string `json:"-"`
17135
17136	// NullFields is a list of field names (e.g. "Resource") to include in
17137	// API requests with the JSON null value. By default, fields with empty
17138	// values are omitted from API requests. However, any field with an
17139	// empty value appearing in NullFields will be sent to the server as
17140	// null. It is an error if a field in this list has a non-empty value.
17141	// This may be used to include null fields in Patch requests.
17142	NullFields []string `json:"-"`
17143}
17144
17145func (s *UrlMapsValidateRequest) MarshalJSON() ([]byte, error) {
17146	type noMethod UrlMapsValidateRequest
17147	raw := noMethod(*s)
17148	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17149}
17150
17151type UrlMapsValidateResponse struct {
17152	Result *UrlMapValidationResult `json:"result,omitempty"`
17153
17154	// ServerResponse contains the HTTP response code and headers from the
17155	// server.
17156	googleapi.ServerResponse `json:"-"`
17157
17158	// ForceSendFields is a list of field names (e.g. "Result") to
17159	// unconditionally include in API requests. By default, fields with
17160	// empty values are omitted from API requests. However, any non-pointer,
17161	// non-interface field appearing in ForceSendFields will be sent to the
17162	// server regardless of whether the field is empty or not. This may be
17163	// used to include empty fields in Patch requests.
17164	ForceSendFields []string `json:"-"`
17165
17166	// NullFields is a list of field names (e.g. "Result") to include in API
17167	// requests with the JSON null value. By default, fields with empty
17168	// values are omitted from API requests. However, any field with an
17169	// empty value appearing in NullFields will be sent to the server as
17170	// null. It is an error if a field in this list has a non-empty value.
17171	// This may be used to include null fields in Patch requests.
17172	NullFields []string `json:"-"`
17173}
17174
17175func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) {
17176	type noMethod UrlMapsValidateResponse
17177	raw := noMethod(*s)
17178	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17179}
17180
17181// UsageExportLocation: The location in Cloud Storage and naming method
17182// of the daily usage report. Contains bucket_name and report_name
17183// prefix.
17184type UsageExportLocation struct {
17185	// BucketName: The name of an existing bucket in Cloud Storage where the
17186	// usage report object is stored. The Google Service Account is granted
17187	// write access to this bucket. This can either be the bucket name by
17188	// itself, such as example-bucket, or the bucket name with gs:// or
17189	// https://storage.googleapis.com/ in front of it, such as
17190	// gs://example-bucket.
17191	BucketName string `json:"bucketName,omitempty"`
17192
17193	// ReportNamePrefix: An optional prefix for the name of the usage report
17194	// object stored in bucketName. If not supplied, defaults to usage. The
17195	// report is stored as a CSV file named
17196	// report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the
17197	// usage according to Pacific Time. If you supply a prefix, it should
17198	// conform to Cloud Storage object naming conventions.
17199	ReportNamePrefix string `json:"reportNamePrefix,omitempty"`
17200
17201	// ForceSendFields is a list of field names (e.g. "BucketName") to
17202	// unconditionally include in API requests. By default, fields with
17203	// empty values are omitted from API requests. However, any non-pointer,
17204	// non-interface field appearing in ForceSendFields will be sent to the
17205	// server regardless of whether the field is empty or not. This may be
17206	// used to include empty fields in Patch requests.
17207	ForceSendFields []string `json:"-"`
17208
17209	// NullFields is a list of field names (e.g. "BucketName") to include in
17210	// API requests with the JSON null value. By default, fields with empty
17211	// values are omitted from API requests. However, any field with an
17212	// empty value appearing in NullFields will be sent to the server as
17213	// null. It is an error if a field in this list has a non-empty value.
17214	// This may be used to include null fields in Patch requests.
17215	NullFields []string `json:"-"`
17216}
17217
17218func (s *UsageExportLocation) MarshalJSON() ([]byte, error) {
17219	type noMethod UsageExportLocation
17220	raw := noMethod(*s)
17221	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17222}
17223
17224type VpnTunnel struct {
17225	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
17226	// format.
17227	CreationTimestamp string `json:"creationTimestamp,omitempty"`
17228
17229	// Description: An optional description of this resource. Provide this
17230	// property when you create the resource.
17231	Description string `json:"description,omitempty"`
17232
17233	// DetailedStatus: [Output Only] Detailed status message for the VPN
17234	// tunnel.
17235	DetailedStatus string `json:"detailedStatus,omitempty"`
17236
17237	// Id: [Output Only] The unique identifier for the resource. This
17238	// identifier is defined by the server.
17239	Id uint64 `json:"id,omitempty,string"`
17240
17241	// IkeVersion: IKE protocol version to use when establishing the VPN
17242	// tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2.
17243	// Default version is 2.
17244	IkeVersion int64 `json:"ikeVersion,omitempty"`
17245
17246	// Kind: [Output Only] Type of resource. Always compute#vpnTunnel for
17247	// VPN tunnels.
17248	Kind string `json:"kind,omitempty"`
17249
17250	// LocalTrafficSelector: Local traffic selector to use when establishing
17251	// the VPN tunnel with peer VPN gateway. The value should be a CIDR
17252	// formatted string, for example: 192.168.0.0/16. The ranges should be
17253	// disjoint. Only IPv4 is supported.
17254	LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"`
17255
17256	// Name: Name of the resource. Provided by the client when the resource
17257	// is created. The name must be 1-63 characters long, and comply with
17258	// RFC1035. Specifically, the name must be 1-63 characters long and
17259	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
17260	// the first character must be a lowercase letter, and all following
17261	// characters must be a dash, lowercase letter, or digit, except the
17262	// last character, which cannot be a dash.
17263	Name string `json:"name,omitempty"`
17264
17265	// PeerIp: IP address of the peer VPN gateway. Only IPv4 is supported.
17266	PeerIp string `json:"peerIp,omitempty"`
17267
17268	// Region: [Output Only] URL of the region where the VPN tunnel resides.
17269	Region string `json:"region,omitempty"`
17270
17271	// RemoteTrafficSelector: Remote traffic selectors to use when
17272	// establishing the VPN tunnel with peer VPN gateway. The value should
17273	// be a CIDR formatted string, for example: 192.168.0.0/16. The ranges
17274	// should be disjoint. Only IPv4 is supported.
17275	RemoteTrafficSelector []string `json:"remoteTrafficSelector,omitempty"`
17276
17277	// Router: URL of router resource to be used for dynamic routing.
17278	Router string `json:"router,omitempty"`
17279
17280	// SelfLink: [Output Only] Server-defined URL for the resource.
17281	SelfLink string `json:"selfLink,omitempty"`
17282
17283	// SharedSecret: Shared secret used to set the secure session between
17284	// the Cloud VPN gateway and the peer VPN gateway.
17285	SharedSecret string `json:"sharedSecret,omitempty"`
17286
17287	// SharedSecretHash: Hash of the shared secret.
17288	SharedSecretHash string `json:"sharedSecretHash,omitempty"`
17289
17290	// Status: [Output Only] The status of the VPN tunnel.
17291	//
17292	// Possible values:
17293	//   "ALLOCATING_RESOURCES"
17294	//   "AUTHORIZATION_ERROR"
17295	//   "DEPROVISIONING"
17296	//   "ESTABLISHED"
17297	//   "FAILED"
17298	//   "FIRST_HANDSHAKE"
17299	//   "NEGOTIATION_FAILURE"
17300	//   "NETWORK_ERROR"
17301	//   "NO_INCOMING_PACKETS"
17302	//   "PROVISIONING"
17303	//   "REJECTED"
17304	//   "WAITING_FOR_FULL_CONFIG"
17305	Status string `json:"status,omitempty"`
17306
17307	// TargetVpnGateway: URL of the VPN gateway with which this VPN tunnel
17308	// is associated. Provided by the client when the VPN tunnel is created.
17309	TargetVpnGateway string `json:"targetVpnGateway,omitempty"`
17310
17311	// ServerResponse contains the HTTP response code and headers from the
17312	// server.
17313	googleapi.ServerResponse `json:"-"`
17314
17315	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
17316	// to unconditionally include in API requests. By default, fields with
17317	// empty values are omitted from API requests. However, any non-pointer,
17318	// non-interface field appearing in ForceSendFields will be sent to the
17319	// server regardless of whether the field is empty or not. This may be
17320	// used to include empty fields in Patch requests.
17321	ForceSendFields []string `json:"-"`
17322
17323	// NullFields is a list of field names (e.g. "CreationTimestamp") to
17324	// include in API requests with the JSON null value. By default, fields
17325	// with empty values are omitted from API requests. However, any field
17326	// with an empty value appearing in NullFields will be sent to the
17327	// server as null. It is an error if a field in this list has a
17328	// non-empty value. This may be used to include null fields in Patch
17329	// requests.
17330	NullFields []string `json:"-"`
17331}
17332
17333func (s *VpnTunnel) MarshalJSON() ([]byte, error) {
17334	type noMethod VpnTunnel
17335	raw := noMethod(*s)
17336	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17337}
17338
17339type VpnTunnelAggregatedList struct {
17340	// Id: [Output Only] Unique identifier for the resource; defined by the
17341	// server.
17342	Id string `json:"id,omitempty"`
17343
17344	// Items: A list of VpnTunnelsScopedList resources.
17345	Items map[string]VpnTunnelsScopedList `json:"items,omitempty"`
17346
17347	// Kind: [Output Only] Type of resource. Always compute#vpnTunnel for
17348	// VPN tunnels.
17349	Kind string `json:"kind,omitempty"`
17350
17351	// NextPageToken: [Output Only] This token allows you to get the next
17352	// page of results for list requests. If the number of results is larger
17353	// than maxResults, use the nextPageToken as a value for the query
17354	// parameter pageToken in the next list request. Subsequent list
17355	// requests will have their own nextPageToken to continue paging through
17356	// the results.
17357	NextPageToken string `json:"nextPageToken,omitempty"`
17358
17359	// SelfLink: [Output Only] Server-defined URL for this resource.
17360	SelfLink string `json:"selfLink,omitempty"`
17361
17362	// ServerResponse contains the HTTP response code and headers from the
17363	// server.
17364	googleapi.ServerResponse `json:"-"`
17365
17366	// ForceSendFields is a list of field names (e.g. "Id") to
17367	// unconditionally include in API requests. By default, fields with
17368	// empty values are omitted from API requests. However, any non-pointer,
17369	// non-interface field appearing in ForceSendFields will be sent to the
17370	// server regardless of whether the field is empty or not. This may be
17371	// used to include empty fields in Patch requests.
17372	ForceSendFields []string `json:"-"`
17373
17374	// NullFields is a list of field names (e.g. "Id") to include in API
17375	// requests with the JSON null value. By default, fields with empty
17376	// values are omitted from API requests. However, any field with an
17377	// empty value appearing in NullFields will be sent to the server as
17378	// null. It is an error if a field in this list has a non-empty value.
17379	// This may be used to include null fields in Patch requests.
17380	NullFields []string `json:"-"`
17381}
17382
17383func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) {
17384	type noMethod VpnTunnelAggregatedList
17385	raw := noMethod(*s)
17386	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17387}
17388
17389// VpnTunnelList: Contains a list of VpnTunnel resources.
17390type VpnTunnelList struct {
17391	// Id: [Output Only] Unique identifier for the resource; defined by the
17392	// server.
17393	Id string `json:"id,omitempty"`
17394
17395	// Items: A list of VpnTunnel resources.
17396	Items []*VpnTunnel `json:"items,omitempty"`
17397
17398	// Kind: [Output Only] Type of resource. Always compute#vpnTunnel for
17399	// VPN tunnels.
17400	Kind string `json:"kind,omitempty"`
17401
17402	// NextPageToken: [Output Only] This token allows you to get the next
17403	// page of results for list requests. If the number of results is larger
17404	// than maxResults, use the nextPageToken as a value for the query
17405	// parameter pageToken in the next list request. Subsequent list
17406	// requests will have their own nextPageToken to continue paging through
17407	// the results.
17408	NextPageToken string `json:"nextPageToken,omitempty"`
17409
17410	// SelfLink: [Output Only] Server-defined URL for this resource.
17411	SelfLink string `json:"selfLink,omitempty"`
17412
17413	// ServerResponse contains the HTTP response code and headers from the
17414	// server.
17415	googleapi.ServerResponse `json:"-"`
17416
17417	// ForceSendFields is a list of field names (e.g. "Id") to
17418	// unconditionally include in API requests. By default, fields with
17419	// empty values are omitted from API requests. However, any non-pointer,
17420	// non-interface field appearing in ForceSendFields will be sent to the
17421	// server regardless of whether the field is empty or not. This may be
17422	// used to include empty fields in Patch requests.
17423	ForceSendFields []string `json:"-"`
17424
17425	// NullFields is a list of field names (e.g. "Id") to include in API
17426	// requests with the JSON null value. By default, fields with empty
17427	// values are omitted from API requests. However, any field with an
17428	// empty value appearing in NullFields will be sent to the server as
17429	// null. It is an error if a field in this list has a non-empty value.
17430	// This may be used to include null fields in Patch requests.
17431	NullFields []string `json:"-"`
17432}
17433
17434func (s *VpnTunnelList) MarshalJSON() ([]byte, error) {
17435	type noMethod VpnTunnelList
17436	raw := noMethod(*s)
17437	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17438}
17439
17440type VpnTunnelsScopedList struct {
17441	// VpnTunnels: List of vpn tunnels contained in this scope.
17442	VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"`
17443
17444	// Warning: Informational warning which replaces the list of addresses
17445	// when the list is empty.
17446	Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"`
17447
17448	// ForceSendFields is a list of field names (e.g. "VpnTunnels") to
17449	// unconditionally include in API requests. By default, fields with
17450	// empty values are omitted from API requests. However, any non-pointer,
17451	// non-interface field appearing in ForceSendFields will be sent to the
17452	// server regardless of whether the field is empty or not. This may be
17453	// used to include empty fields in Patch requests.
17454	ForceSendFields []string `json:"-"`
17455
17456	// NullFields is a list of field names (e.g. "VpnTunnels") to include in
17457	// API requests with the JSON null value. By default, fields with empty
17458	// values are omitted from API requests. However, any field with an
17459	// empty value appearing in NullFields will be sent to the server as
17460	// null. It is an error if a field in this list has a non-empty value.
17461	// This may be used to include null fields in Patch requests.
17462	NullFields []string `json:"-"`
17463}
17464
17465func (s *VpnTunnelsScopedList) MarshalJSON() ([]byte, error) {
17466	type noMethod VpnTunnelsScopedList
17467	raw := noMethod(*s)
17468	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17469}
17470
17471// VpnTunnelsScopedListWarning: Informational warning which replaces the
17472// list of addresses when the list is empty.
17473type VpnTunnelsScopedListWarning struct {
17474	// Code: [Output Only] A warning code, if applicable. For example,
17475	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
17476	// the response.
17477	//
17478	// Possible values:
17479	//   "CLEANUP_FAILED"
17480	//   "DEPRECATED_RESOURCE_USED"
17481	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
17482	//   "FIELD_VALUE_OVERRIDEN"
17483	//   "INJECTED_KERNELS_DEPRECATED"
17484	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
17485	//   "NEXT_HOP_CANNOT_IP_FORWARD"
17486	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
17487	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
17488	//   "NEXT_HOP_NOT_RUNNING"
17489	//   "NOT_CRITICAL_ERROR"
17490	//   "NO_RESULTS_ON_PAGE"
17491	//   "REQUIRED_TOS_AGREEMENT"
17492	//   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
17493	//   "RESOURCE_NOT_DELETED"
17494	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
17495	//   "UNREACHABLE"
17496	Code string `json:"code,omitempty"`
17497
17498	// Data: [Output Only] Metadata about this warning in key: value format.
17499	// For example:
17500	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
17501	Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"`
17502
17503	// Message: [Output Only] A human-readable description of the warning
17504	// code.
17505	Message string `json:"message,omitempty"`
17506
17507	// ForceSendFields is a list of field names (e.g. "Code") to
17508	// unconditionally include in API requests. By default, fields with
17509	// empty values are omitted from API requests. However, any non-pointer,
17510	// non-interface field appearing in ForceSendFields will be sent to the
17511	// server regardless of whether the field is empty or not. This may be
17512	// used to include empty fields in Patch requests.
17513	ForceSendFields []string `json:"-"`
17514
17515	// NullFields is a list of field names (e.g. "Code") to include in API
17516	// requests with the JSON null value. By default, fields with empty
17517	// values are omitted from API requests. However, any field with an
17518	// empty value appearing in NullFields will be sent to the server as
17519	// null. It is an error if a field in this list has a non-empty value.
17520	// This may be used to include null fields in Patch requests.
17521	NullFields []string `json:"-"`
17522}
17523
17524func (s *VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) {
17525	type noMethod VpnTunnelsScopedListWarning
17526	raw := noMethod(*s)
17527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17528}
17529
17530type VpnTunnelsScopedListWarningData struct {
17531	// Key: [Output Only] A key that provides more detail on the warning
17532	// being returned. For example, for warnings where there are no results
17533	// in a list request for a particular zone, this key might be scope and
17534	// the key value might be the zone name. Other examples might be a key
17535	// indicating a deprecated resource and a suggested replacement, or a
17536	// warning about invalid network settings (for example, if an instance
17537	// attempts to perform IP forwarding but is not enabled for IP
17538	// forwarding).
17539	Key string `json:"key,omitempty"`
17540
17541	// Value: [Output Only] A warning data value corresponding to the key.
17542	Value string `json:"value,omitempty"`
17543
17544	// ForceSendFields is a list of field names (e.g. "Key") to
17545	// unconditionally include in API requests. By default, fields with
17546	// empty values are omitted from API requests. However, any non-pointer,
17547	// non-interface field appearing in ForceSendFields will be sent to the
17548	// server regardless of whether the field is empty or not. This may be
17549	// used to include empty fields in Patch requests.
17550	ForceSendFields []string `json:"-"`
17551
17552	// NullFields is a list of field names (e.g. "Key") to include in API
17553	// requests with the JSON null value. By default, fields with empty
17554	// values are omitted from API requests. However, any field with an
17555	// empty value appearing in NullFields will be sent to the server as
17556	// null. It is an error if a field in this list has a non-empty value.
17557	// This may be used to include null fields in Patch requests.
17558	NullFields []string `json:"-"`
17559}
17560
17561func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) {
17562	type noMethod VpnTunnelsScopedListWarningData
17563	raw := noMethod(*s)
17564	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17565}
17566
17567type XpnHostList struct {
17568	// Id: [Output Only] Unique identifier for the resource; defined by the
17569	// server.
17570	Id string `json:"id,omitempty"`
17571
17572	// Items: [Output Only] A list of shared VPC host project URLs.
17573	Items []*Project `json:"items,omitempty"`
17574
17575	// Kind: [Output Only] Type of resource. Always compute#xpnHostList for
17576	// lists of shared VPC hosts.
17577	Kind string `json:"kind,omitempty"`
17578
17579	// NextPageToken: [Output Only] This token allows you to get the next
17580	// page of results for list requests. If the number of results is larger
17581	// than maxResults, use the nextPageToken as a value for the query
17582	// parameter pageToken in the next list request. Subsequent list
17583	// requests will have their own nextPageToken to continue paging through
17584	// the results.
17585	NextPageToken string `json:"nextPageToken,omitempty"`
17586
17587	// SelfLink: [Output Only] Server-defined URL for this resource.
17588	SelfLink string `json:"selfLink,omitempty"`
17589
17590	// ServerResponse contains the HTTP response code and headers from the
17591	// server.
17592	googleapi.ServerResponse `json:"-"`
17593
17594	// ForceSendFields is a list of field names (e.g. "Id") to
17595	// unconditionally include in API requests. By default, fields with
17596	// empty values are omitted from API requests. However, any non-pointer,
17597	// non-interface field appearing in ForceSendFields will be sent to the
17598	// server regardless of whether the field is empty or not. This may be
17599	// used to include empty fields in Patch requests.
17600	ForceSendFields []string `json:"-"`
17601
17602	// NullFields is a list of field names (e.g. "Id") to include in API
17603	// requests with the JSON null value. By default, fields with empty
17604	// values are omitted from API requests. However, any field with an
17605	// empty value appearing in NullFields will be sent to the server as
17606	// null. It is an error if a field in this list has a non-empty value.
17607	// This may be used to include null fields in Patch requests.
17608	NullFields []string `json:"-"`
17609}
17610
17611func (s *XpnHostList) MarshalJSON() ([]byte, error) {
17612	type noMethod XpnHostList
17613	raw := noMethod(*s)
17614	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17615}
17616
17617// XpnResourceId: Service resource (a.k.a service project) ID.
17618type XpnResourceId struct {
17619	// Id: The ID of the service resource. In the case of projects, this
17620	// field matches the project ID (e.g., my-project), not the project
17621	// number (e.g., 12345678).
17622	Id string `json:"id,omitempty"`
17623
17624	// Type: The type of the service resource.
17625	//
17626	// Possible values:
17627	//   "PROJECT"
17628	//   "XPN_RESOURCE_TYPE_UNSPECIFIED"
17629	Type string `json:"type,omitempty"`
17630
17631	// ForceSendFields is a list of field names (e.g. "Id") to
17632	// unconditionally include in API requests. By default, fields with
17633	// empty values are omitted from API requests. However, any non-pointer,
17634	// non-interface field appearing in ForceSendFields will be sent to the
17635	// server regardless of whether the field is empty or not. This may be
17636	// used to include empty fields in Patch requests.
17637	ForceSendFields []string `json:"-"`
17638
17639	// NullFields is a list of field names (e.g. "Id") to include in API
17640	// requests with the JSON null value. By default, fields with empty
17641	// values are omitted from API requests. However, any field with an
17642	// empty value appearing in NullFields will be sent to the server as
17643	// null. It is an error if a field in this list has a non-empty value.
17644	// This may be used to include null fields in Patch requests.
17645	NullFields []string `json:"-"`
17646}
17647
17648func (s *XpnResourceId) MarshalJSON() ([]byte, error) {
17649	type noMethod XpnResourceId
17650	raw := noMethod(*s)
17651	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17652}
17653
17654// Zone: A Zone resource.
17655type Zone struct {
17656	// AvailableCpuPlatforms: [Output Only] Available cpu/platform
17657	// selections for the zone.
17658	AvailableCpuPlatforms []string `json:"availableCpuPlatforms,omitempty"`
17659
17660	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
17661	// format.
17662	CreationTimestamp string `json:"creationTimestamp,omitempty"`
17663
17664	// Deprecated: [Output Only] The deprecation status associated with this
17665	// zone.
17666	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
17667
17668	// Description: [Output Only] Textual description of the resource.
17669	Description string `json:"description,omitempty"`
17670
17671	// Id: [Output Only] The unique identifier for the resource. This
17672	// identifier is defined by the server.
17673	Id uint64 `json:"id,omitempty,string"`
17674
17675	// Kind: [Output Only] Type of the resource. Always compute#zone for
17676	// zones.
17677	Kind string `json:"kind,omitempty"`
17678
17679	// Name: [Output Only] Name of the resource.
17680	Name string `json:"name,omitempty"`
17681
17682	// Region: [Output Only] Full URL reference to the region which hosts
17683	// the zone.
17684	Region string `json:"region,omitempty"`
17685
17686	// SelfLink: [Output Only] Server-defined URL for the resource.
17687	SelfLink string `json:"selfLink,omitempty"`
17688
17689	// Status: [Output Only] Status of the zone, either UP or DOWN.
17690	//
17691	// Possible values:
17692	//   "DOWN"
17693	//   "UP"
17694	Status string `json:"status,omitempty"`
17695
17696	// ServerResponse contains the HTTP response code and headers from the
17697	// server.
17698	googleapi.ServerResponse `json:"-"`
17699
17700	// ForceSendFields is a list of field names (e.g.
17701	// "AvailableCpuPlatforms") to unconditionally include in API requests.
17702	// By default, fields with empty values are omitted from API requests.
17703	// However, any non-pointer, non-interface field appearing in
17704	// ForceSendFields will be sent to the server regardless of whether the
17705	// field is empty or not. This may be used to include empty fields in
17706	// Patch requests.
17707	ForceSendFields []string `json:"-"`
17708
17709	// NullFields is a list of field names (e.g. "AvailableCpuPlatforms") to
17710	// include in API requests with the JSON null value. By default, fields
17711	// with empty values are omitted from API requests. However, any field
17712	// with an empty value appearing in NullFields will be sent to the
17713	// server as null. It is an error if a field in this list has a
17714	// non-empty value. This may be used to include null fields in Patch
17715	// requests.
17716	NullFields []string `json:"-"`
17717}
17718
17719func (s *Zone) MarshalJSON() ([]byte, error) {
17720	type noMethod Zone
17721	raw := noMethod(*s)
17722	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17723}
17724
17725// ZoneList: Contains a list of zone resources.
17726type ZoneList struct {
17727	// Id: [Output Only] Unique identifier for the resource; defined by the
17728	// server.
17729	Id string `json:"id,omitempty"`
17730
17731	// Items: A list of Zone resources.
17732	Items []*Zone `json:"items,omitempty"`
17733
17734	// Kind: Type of resource.
17735	Kind string `json:"kind,omitempty"`
17736
17737	// NextPageToken: [Output Only] This token allows you to get the next
17738	// page of results for list requests. If the number of results is larger
17739	// than maxResults, use the nextPageToken as a value for the query
17740	// parameter pageToken in the next list request. Subsequent list
17741	// requests will have their own nextPageToken to continue paging through
17742	// the results.
17743	NextPageToken string `json:"nextPageToken,omitempty"`
17744
17745	// SelfLink: [Output Only] Server-defined URL for this resource.
17746	SelfLink string `json:"selfLink,omitempty"`
17747
17748	// ServerResponse contains the HTTP response code and headers from the
17749	// server.
17750	googleapi.ServerResponse `json:"-"`
17751
17752	// ForceSendFields is a list of field names (e.g. "Id") to
17753	// unconditionally include in API requests. By default, fields with
17754	// empty values are omitted from API requests. However, any non-pointer,
17755	// non-interface field appearing in ForceSendFields will be sent to the
17756	// server regardless of whether the field is empty or not. This may be
17757	// used to include empty fields in Patch requests.
17758	ForceSendFields []string `json:"-"`
17759
17760	// NullFields is a list of field names (e.g. "Id") to include in API
17761	// requests with the JSON null value. By default, fields with empty
17762	// values are omitted from API requests. However, any field with an
17763	// empty value appearing in NullFields will be sent to the server as
17764	// null. It is an error if a field in this list has a non-empty value.
17765	// This may be used to include null fields in Patch requests.
17766	NullFields []string `json:"-"`
17767}
17768
17769func (s *ZoneList) MarshalJSON() ([]byte, error) {
17770	type noMethod ZoneList
17771	raw := noMethod(*s)
17772	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17773}
17774
17775type ZoneSetLabelsRequest struct {
17776	// LabelFingerprint: The fingerprint of the previous set of labels for
17777	// this resource, used to detect conflicts. The fingerprint is initially
17778	// generated by Compute Engine and changes after every request to modify
17779	// or update labels. You must always provide an up-to-date fingerprint
17780	// hash in order to update or change labels. Make a get() request to the
17781	// resource to get the latest fingerprint.
17782	LabelFingerprint string `json:"labelFingerprint,omitempty"`
17783
17784	// Labels: The labels to set for this resource.
17785	Labels map[string]string `json:"labels,omitempty"`
17786
17787	// ForceSendFields is a list of field names (e.g. "LabelFingerprint") to
17788	// unconditionally include in API requests. By default, fields with
17789	// empty values are omitted from API requests. However, any non-pointer,
17790	// non-interface field appearing in ForceSendFields will be sent to the
17791	// server regardless of whether the field is empty or not. This may be
17792	// used to include empty fields in Patch requests.
17793	ForceSendFields []string `json:"-"`
17794
17795	// NullFields is a list of field names (e.g. "LabelFingerprint") to
17796	// include in API requests with the JSON null value. By default, fields
17797	// with empty values are omitted from API requests. However, any field
17798	// with an empty value appearing in NullFields will be sent to the
17799	// server as null. It is an error if a field in this list has a
17800	// non-empty value. This may be used to include null fields in Patch
17801	// requests.
17802	NullFields []string `json:"-"`
17803}
17804
17805func (s *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) {
17806	type noMethod ZoneSetLabelsRequest
17807	raw := noMethod(*s)
17808	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
17809}
17810
17811// method id "compute.acceleratorTypes.aggregatedList":
17812
17813type AcceleratorTypesAggregatedListCall struct {
17814	s            *Service
17815	project      string
17816	urlParams_   gensupport.URLParams
17817	ifNoneMatch_ string
17818	ctx_         context.Context
17819	header_      http.Header
17820}
17821
17822// AggregatedList: Retrieves an aggregated list of accelerator types.
17823func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall {
17824	c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17825	c.project = project
17826	return c
17827}
17828
17829// Filter sets the optional parameter "filter": Sets a filter
17830// {expression} for filtering listed resources. Your {expression} must
17831// be in the format: field_name comparison_string literal_string.
17832//
17833// The field_name is the name of the field you want to compare. Only
17834// atomic field types are supported (string, number, boolean). The
17835// comparison_string must be either eq (equals) or ne (not equals). The
17836// literal_string is the string value to filter to. The literal value
17837// must be valid for the type of field you are filtering by (string,
17838// number, boolean). For string fields, the literal value is interpreted
17839// as a regular expression using RE2 syntax. The literal value must
17840// match the entire field.
17841//
17842// For example, to filter for instances that do not have a name of
17843// example-instance, you would use name ne example-instance.
17844//
17845// You can filter on nested fields. For example, you could filter on
17846// instances that have set the scheduling.automaticRestart field to
17847// true. Use filtering on nested fields to take advantage of labels to
17848// organize and search for results based on label values.
17849//
17850// To filter on multiple expressions, provide each separate expression
17851// within parentheses. For example, (scheduling.automaticRestart eq
17852// true) (zone eq us-central1-f). Multiple expressions are treated as
17853// AND expressions, meaning that resources must match all expressions to
17854// pass the filters.
17855func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall {
17856	c.urlParams_.Set("filter", filter)
17857	return c
17858}
17859
17860// MaxResults sets the optional parameter "maxResults": The maximum
17861// number of results per page that should be returned. If the number of
17862// available results is larger than maxResults, Compute Engine returns a
17863// nextPageToken that can be used to get the next page of results in
17864// subsequent list requests. Acceptable values are 0 to 500, inclusive.
17865// (Default: 500)
17866func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall {
17867	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17868	return c
17869}
17870
17871// OrderBy sets the optional parameter "orderBy": Sorts list results by
17872// a certain order. By default, results are returned in alphanumerical
17873// order based on the resource name.
17874//
17875// You can also sort results in descending order based on the creation
17876// timestamp using orderBy="creationTimestamp desc". This sorts results
17877// based on the creationTimestamp field in reverse chronological order
17878// (newest result first). Use this to sort resources like operations so
17879// that the newest operation is returned first.
17880//
17881// Currently, only sorting by name or creationTimestamp desc is
17882// supported.
17883func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall {
17884	c.urlParams_.Set("orderBy", orderBy)
17885	return c
17886}
17887
17888// PageToken sets the optional parameter "pageToken": Specifies a page
17889// token to use. Set pageToken to the nextPageToken returned by a
17890// previous list request to get the next page of results.
17891func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall {
17892	c.urlParams_.Set("pageToken", pageToken)
17893	return c
17894}
17895
17896// Fields allows partial responses to be retrieved. See
17897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17898// for more information.
17899func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall {
17900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17901	return c
17902}
17903
17904// IfNoneMatch sets the optional parameter which makes the operation
17905// fail if the object's ETag matches the given value. This is useful for
17906// getting updates only after the object has changed since the last
17907// request. Use googleapi.IsNotModified to check whether the response
17908// error from Do is the result of In-None-Match.
17909func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall {
17910	c.ifNoneMatch_ = entityTag
17911	return c
17912}
17913
17914// Context sets the context to be used in this call's Do method. Any
17915// pending HTTP request will be aborted if the provided context is
17916// canceled.
17917func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall {
17918	c.ctx_ = ctx
17919	return c
17920}
17921
17922// Header returns an http.Header that can be modified by the caller to
17923// add HTTP headers to the request.
17924func (c *AcceleratorTypesAggregatedListCall) Header() http.Header {
17925	if c.header_ == nil {
17926		c.header_ = make(http.Header)
17927	}
17928	return c.header_
17929}
17930
17931func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
17932	reqHeaders := make(http.Header)
17933	for k, v := range c.header_ {
17934		reqHeaders[k] = v
17935	}
17936	reqHeaders.Set("User-Agent", c.s.userAgent())
17937	if c.ifNoneMatch_ != "" {
17938		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17939	}
17940	var body io.Reader = nil
17941	c.urlParams_.Set("alt", alt)
17942	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/acceleratorTypes")
17943	urls += "?" + c.urlParams_.Encode()
17944	req, _ := http.NewRequest("GET", urls, body)
17945	req.Header = reqHeaders
17946	googleapi.Expand(req.URL, map[string]string{
17947		"project": c.project,
17948	})
17949	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17950}
17951
17952// Do executes the "compute.acceleratorTypes.aggregatedList" call.
17953// Exactly one of *AcceleratorTypeAggregatedList or error will be
17954// non-nil. Any non-2xx status code is an error. Response headers are in
17955// either *AcceleratorTypeAggregatedList.ServerResponse.Header or (if a
17956// response was returned at all) in error.(*googleapi.Error).Header. Use
17957// googleapi.IsNotModified to check whether the returned error was
17958// because http.StatusNotModified was returned.
17959func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, error) {
17960	gensupport.SetOptions(c.urlParams_, opts...)
17961	res, err := c.doRequest("json")
17962	if res != nil && res.StatusCode == http.StatusNotModified {
17963		if res.Body != nil {
17964			res.Body.Close()
17965		}
17966		return nil, &googleapi.Error{
17967			Code:   res.StatusCode,
17968			Header: res.Header,
17969		}
17970	}
17971	if err != nil {
17972		return nil, err
17973	}
17974	defer googleapi.CloseBody(res)
17975	if err := googleapi.CheckResponse(res); err != nil {
17976		return nil, err
17977	}
17978	ret := &AcceleratorTypeAggregatedList{
17979		ServerResponse: googleapi.ServerResponse{
17980			Header:         res.Header,
17981			HTTPStatusCode: res.StatusCode,
17982		},
17983	}
17984	target := &ret
17985	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
17986		return nil, err
17987	}
17988	return ret, nil
17989	// {
17990	//   "description": "Retrieves an aggregated list of accelerator types.",
17991	//   "httpMethod": "GET",
17992	//   "id": "compute.acceleratorTypes.aggregatedList",
17993	//   "parameterOrder": [
17994	//     "project"
17995	//   ],
17996	//   "parameters": {
17997	//     "filter": {
17998	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
17999	//       "location": "query",
18000	//       "type": "string"
18001	//     },
18002	//     "maxResults": {
18003	//       "default": "500",
18004	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
18005	//       "format": "uint32",
18006	//       "location": "query",
18007	//       "minimum": "0",
18008	//       "type": "integer"
18009	//     },
18010	//     "orderBy": {
18011	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
18012	//       "location": "query",
18013	//       "type": "string"
18014	//     },
18015	//     "pageToken": {
18016	//       "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.",
18017	//       "location": "query",
18018	//       "type": "string"
18019	//     },
18020	//     "project": {
18021	//       "description": "Project ID for this request.",
18022	//       "location": "path",
18023	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18024	//       "required": true,
18025	//       "type": "string"
18026	//     }
18027	//   },
18028	//   "path": "{project}/aggregated/acceleratorTypes",
18029	//   "response": {
18030	//     "$ref": "AcceleratorTypeAggregatedList"
18031	//   },
18032	//   "scopes": [
18033	//     "https://www.googleapis.com/auth/cloud-platform",
18034	//     "https://www.googleapis.com/auth/compute",
18035	//     "https://www.googleapis.com/auth/compute.readonly"
18036	//   ]
18037	// }
18038
18039}
18040
18041// Pages invokes f for each page of results.
18042// A non-nil error returned from f will halt the iteration.
18043// The provided context supersedes any context provided to the Context method.
18044func (c *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) error) error {
18045	c.ctx_ = ctx
18046	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18047	for {
18048		x, err := c.Do()
18049		if err != nil {
18050			return err
18051		}
18052		if err := f(x); err != nil {
18053			return err
18054		}
18055		if x.NextPageToken == "" {
18056			return nil
18057		}
18058		c.PageToken(x.NextPageToken)
18059	}
18060}
18061
18062// method id "compute.acceleratorTypes.get":
18063
18064type AcceleratorTypesGetCall struct {
18065	s               *Service
18066	project         string
18067	zone            string
18068	acceleratorType string
18069	urlParams_      gensupport.URLParams
18070	ifNoneMatch_    string
18071	ctx_            context.Context
18072	header_         http.Header
18073}
18074
18075// Get: Returns the specified accelerator type. Get a list of available
18076// accelerator types by making a list() request.
18077func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall {
18078	c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18079	c.project = project
18080	c.zone = zone
18081	c.acceleratorType = acceleratorType
18082	return c
18083}
18084
18085// Fields allows partial responses to be retrieved. See
18086// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18087// for more information.
18088func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall {
18089	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18090	return c
18091}
18092
18093// IfNoneMatch sets the optional parameter which makes the operation
18094// fail if the object's ETag matches the given value. This is useful for
18095// getting updates only after the object has changed since the last
18096// request. Use googleapi.IsNotModified to check whether the response
18097// error from Do is the result of In-None-Match.
18098func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall {
18099	c.ifNoneMatch_ = entityTag
18100	return c
18101}
18102
18103// Context sets the context to be used in this call's Do method. Any
18104// pending HTTP request will be aborted if the provided context is
18105// canceled.
18106func (c *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall {
18107	c.ctx_ = ctx
18108	return c
18109}
18110
18111// Header returns an http.Header that can be modified by the caller to
18112// add HTTP headers to the request.
18113func (c *AcceleratorTypesGetCall) Header() http.Header {
18114	if c.header_ == nil {
18115		c.header_ = make(http.Header)
18116	}
18117	return c.header_
18118}
18119
18120func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) {
18121	reqHeaders := make(http.Header)
18122	for k, v := range c.header_ {
18123		reqHeaders[k] = v
18124	}
18125	reqHeaders.Set("User-Agent", c.s.userAgent())
18126	if c.ifNoneMatch_ != "" {
18127		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18128	}
18129	var body io.Reader = nil
18130	c.urlParams_.Set("alt", alt)
18131	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}")
18132	urls += "?" + c.urlParams_.Encode()
18133	req, _ := http.NewRequest("GET", urls, body)
18134	req.Header = reqHeaders
18135	googleapi.Expand(req.URL, map[string]string{
18136		"project":         c.project,
18137		"zone":            c.zone,
18138		"acceleratorType": c.acceleratorType,
18139	})
18140	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18141}
18142
18143// Do executes the "compute.acceleratorTypes.get" call.
18144// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx
18145// status code is an error. Response headers are in either
18146// *AcceleratorType.ServerResponse.Header or (if a response was returned
18147// at all) in error.(*googleapi.Error).Header. Use
18148// googleapi.IsNotModified to check whether the returned error was
18149// because http.StatusNotModified was returned.
18150func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) {
18151	gensupport.SetOptions(c.urlParams_, opts...)
18152	res, err := c.doRequest("json")
18153	if res != nil && res.StatusCode == http.StatusNotModified {
18154		if res.Body != nil {
18155			res.Body.Close()
18156		}
18157		return nil, &googleapi.Error{
18158			Code:   res.StatusCode,
18159			Header: res.Header,
18160		}
18161	}
18162	if err != nil {
18163		return nil, err
18164	}
18165	defer googleapi.CloseBody(res)
18166	if err := googleapi.CheckResponse(res); err != nil {
18167		return nil, err
18168	}
18169	ret := &AcceleratorType{
18170		ServerResponse: googleapi.ServerResponse{
18171			Header:         res.Header,
18172			HTTPStatusCode: res.StatusCode,
18173		},
18174	}
18175	target := &ret
18176	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
18177		return nil, err
18178	}
18179	return ret, nil
18180	// {
18181	//   "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.",
18182	//   "httpMethod": "GET",
18183	//   "id": "compute.acceleratorTypes.get",
18184	//   "parameterOrder": [
18185	//     "project",
18186	//     "zone",
18187	//     "acceleratorType"
18188	//   ],
18189	//   "parameters": {
18190	//     "acceleratorType": {
18191	//       "description": "Name of the accelerator type to return.",
18192	//       "location": "path",
18193	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18194	//       "required": true,
18195	//       "type": "string"
18196	//     },
18197	//     "project": {
18198	//       "description": "Project ID for this request.",
18199	//       "location": "path",
18200	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18201	//       "required": true,
18202	//       "type": "string"
18203	//     },
18204	//     "zone": {
18205	//       "description": "The name of the zone for this request.",
18206	//       "location": "path",
18207	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18208	//       "required": true,
18209	//       "type": "string"
18210	//     }
18211	//   },
18212	//   "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}",
18213	//   "response": {
18214	//     "$ref": "AcceleratorType"
18215	//   },
18216	//   "scopes": [
18217	//     "https://www.googleapis.com/auth/cloud-platform",
18218	//     "https://www.googleapis.com/auth/compute",
18219	//     "https://www.googleapis.com/auth/compute.readonly"
18220	//   ]
18221	// }
18222
18223}
18224
18225// method id "compute.acceleratorTypes.list":
18226
18227type AcceleratorTypesListCall struct {
18228	s            *Service
18229	project      string
18230	zone         string
18231	urlParams_   gensupport.URLParams
18232	ifNoneMatch_ string
18233	ctx_         context.Context
18234	header_      http.Header
18235}
18236
18237// List: Retrieves a list of accelerator types available to the
18238// specified project.
18239func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall {
18240	c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18241	c.project = project
18242	c.zone = zone
18243	return c
18244}
18245
18246// Filter sets the optional parameter "filter": Sets a filter
18247// {expression} for filtering listed resources. Your {expression} must
18248// be in the format: field_name comparison_string literal_string.
18249//
18250// The field_name is the name of the field you want to compare. Only
18251// atomic field types are supported (string, number, boolean). The
18252// comparison_string must be either eq (equals) or ne (not equals). The
18253// literal_string is the string value to filter to. The literal value
18254// must be valid for the type of field you are filtering by (string,
18255// number, boolean). For string fields, the literal value is interpreted
18256// as a regular expression using RE2 syntax. The literal value must
18257// match the entire field.
18258//
18259// For example, to filter for instances that do not have a name of
18260// example-instance, you would use name ne example-instance.
18261//
18262// You can filter on nested fields. For example, you could filter on
18263// instances that have set the scheduling.automaticRestart field to
18264// true. Use filtering on nested fields to take advantage of labels to
18265// organize and search for results based on label values.
18266//
18267// To filter on multiple expressions, provide each separate expression
18268// within parentheses. For example, (scheduling.automaticRestart eq
18269// true) (zone eq us-central1-f). Multiple expressions are treated as
18270// AND expressions, meaning that resources must match all expressions to
18271// pass the filters.
18272func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall {
18273	c.urlParams_.Set("filter", filter)
18274	return c
18275}
18276
18277// MaxResults sets the optional parameter "maxResults": The maximum
18278// number of results per page that should be returned. If the number of
18279// available results is larger than maxResults, Compute Engine returns a
18280// nextPageToken that can be used to get the next page of results in
18281// subsequent list requests. Acceptable values are 0 to 500, inclusive.
18282// (Default: 500)
18283func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall {
18284	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18285	return c
18286}
18287
18288// OrderBy sets the optional parameter "orderBy": Sorts list results by
18289// a certain order. By default, results are returned in alphanumerical
18290// order based on the resource name.
18291//
18292// You can also sort results in descending order based on the creation
18293// timestamp using orderBy="creationTimestamp desc". This sorts results
18294// based on the creationTimestamp field in reverse chronological order
18295// (newest result first). Use this to sort resources like operations so
18296// that the newest operation is returned first.
18297//
18298// Currently, only sorting by name or creationTimestamp desc is
18299// supported.
18300func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall {
18301	c.urlParams_.Set("orderBy", orderBy)
18302	return c
18303}
18304
18305// PageToken sets the optional parameter "pageToken": Specifies a page
18306// token to use. Set pageToken to the nextPageToken returned by a
18307// previous list request to get the next page of results.
18308func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall {
18309	c.urlParams_.Set("pageToken", pageToken)
18310	return c
18311}
18312
18313// Fields allows partial responses to be retrieved. See
18314// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18315// for more information.
18316func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall {
18317	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18318	return c
18319}
18320
18321// IfNoneMatch sets the optional parameter which makes the operation
18322// fail if the object's ETag matches the given value. This is useful for
18323// getting updates only after the object has changed since the last
18324// request. Use googleapi.IsNotModified to check whether the response
18325// error from Do is the result of In-None-Match.
18326func (c *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall {
18327	c.ifNoneMatch_ = entityTag
18328	return c
18329}
18330
18331// Context sets the context to be used in this call's Do method. Any
18332// pending HTTP request will be aborted if the provided context is
18333// canceled.
18334func (c *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall {
18335	c.ctx_ = ctx
18336	return c
18337}
18338
18339// Header returns an http.Header that can be modified by the caller to
18340// add HTTP headers to the request.
18341func (c *AcceleratorTypesListCall) Header() http.Header {
18342	if c.header_ == nil {
18343		c.header_ = make(http.Header)
18344	}
18345	return c.header_
18346}
18347
18348func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) {
18349	reqHeaders := make(http.Header)
18350	for k, v := range c.header_ {
18351		reqHeaders[k] = v
18352	}
18353	reqHeaders.Set("User-Agent", c.s.userAgent())
18354	if c.ifNoneMatch_ != "" {
18355		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18356	}
18357	var body io.Reader = nil
18358	c.urlParams_.Set("alt", alt)
18359	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes")
18360	urls += "?" + c.urlParams_.Encode()
18361	req, _ := http.NewRequest("GET", urls, body)
18362	req.Header = reqHeaders
18363	googleapi.Expand(req.URL, map[string]string{
18364		"project": c.project,
18365		"zone":    c.zone,
18366	})
18367	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18368}
18369
18370// Do executes the "compute.acceleratorTypes.list" call.
18371// Exactly one of *AcceleratorTypeList or error will be non-nil. Any
18372// non-2xx status code is an error. Response headers are in either
18373// *AcceleratorTypeList.ServerResponse.Header or (if a response was
18374// returned at all) in error.(*googleapi.Error).Header. Use
18375// googleapi.IsNotModified to check whether the returned error was
18376// because http.StatusNotModified was returned.
18377func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, error) {
18378	gensupport.SetOptions(c.urlParams_, opts...)
18379	res, err := c.doRequest("json")
18380	if res != nil && res.StatusCode == http.StatusNotModified {
18381		if res.Body != nil {
18382			res.Body.Close()
18383		}
18384		return nil, &googleapi.Error{
18385			Code:   res.StatusCode,
18386			Header: res.Header,
18387		}
18388	}
18389	if err != nil {
18390		return nil, err
18391	}
18392	defer googleapi.CloseBody(res)
18393	if err := googleapi.CheckResponse(res); err != nil {
18394		return nil, err
18395	}
18396	ret := &AcceleratorTypeList{
18397		ServerResponse: googleapi.ServerResponse{
18398			Header:         res.Header,
18399			HTTPStatusCode: res.StatusCode,
18400		},
18401	}
18402	target := &ret
18403	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
18404		return nil, err
18405	}
18406	return ret, nil
18407	// {
18408	//   "description": "Retrieves a list of accelerator types available to the specified project.",
18409	//   "httpMethod": "GET",
18410	//   "id": "compute.acceleratorTypes.list",
18411	//   "parameterOrder": [
18412	//     "project",
18413	//     "zone"
18414	//   ],
18415	//   "parameters": {
18416	//     "filter": {
18417	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
18418	//       "location": "query",
18419	//       "type": "string"
18420	//     },
18421	//     "maxResults": {
18422	//       "default": "500",
18423	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
18424	//       "format": "uint32",
18425	//       "location": "query",
18426	//       "minimum": "0",
18427	//       "type": "integer"
18428	//     },
18429	//     "orderBy": {
18430	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
18431	//       "location": "query",
18432	//       "type": "string"
18433	//     },
18434	//     "pageToken": {
18435	//       "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.",
18436	//       "location": "query",
18437	//       "type": "string"
18438	//     },
18439	//     "project": {
18440	//       "description": "Project ID for this request.",
18441	//       "location": "path",
18442	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18443	//       "required": true,
18444	//       "type": "string"
18445	//     },
18446	//     "zone": {
18447	//       "description": "The name of the zone for this request.",
18448	//       "location": "path",
18449	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18450	//       "required": true,
18451	//       "type": "string"
18452	//     }
18453	//   },
18454	//   "path": "{project}/zones/{zone}/acceleratorTypes",
18455	//   "response": {
18456	//     "$ref": "AcceleratorTypeList"
18457	//   },
18458	//   "scopes": [
18459	//     "https://www.googleapis.com/auth/cloud-platform",
18460	//     "https://www.googleapis.com/auth/compute",
18461	//     "https://www.googleapis.com/auth/compute.readonly"
18462	//   ]
18463	// }
18464
18465}
18466
18467// Pages invokes f for each page of results.
18468// A non-nil error returned from f will halt the iteration.
18469// The provided context supersedes any context provided to the Context method.
18470func (c *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) error) error {
18471	c.ctx_ = ctx
18472	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18473	for {
18474		x, err := c.Do()
18475		if err != nil {
18476			return err
18477		}
18478		if err := f(x); err != nil {
18479			return err
18480		}
18481		if x.NextPageToken == "" {
18482			return nil
18483		}
18484		c.PageToken(x.NextPageToken)
18485	}
18486}
18487
18488// method id "compute.addresses.aggregatedList":
18489
18490type AddressesAggregatedListCall struct {
18491	s            *Service
18492	project      string
18493	urlParams_   gensupport.URLParams
18494	ifNoneMatch_ string
18495	ctx_         context.Context
18496	header_      http.Header
18497}
18498
18499// AggregatedList: Retrieves an aggregated list of addresses.
18500// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList
18501func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall {
18502	c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18503	c.project = project
18504	return c
18505}
18506
18507// Filter sets the optional parameter "filter": Sets a filter
18508// {expression} for filtering listed resources. Your {expression} must
18509// be in the format: field_name comparison_string literal_string.
18510//
18511// The field_name is the name of the field you want to compare. Only
18512// atomic field types are supported (string, number, boolean). The
18513// comparison_string must be either eq (equals) or ne (not equals). The
18514// literal_string is the string value to filter to. The literal value
18515// must be valid for the type of field you are filtering by (string,
18516// number, boolean). For string fields, the literal value is interpreted
18517// as a regular expression using RE2 syntax. The literal value must
18518// match the entire field.
18519//
18520// For example, to filter for instances that do not have a name of
18521// example-instance, you would use name ne example-instance.
18522//
18523// You can filter on nested fields. For example, you could filter on
18524// instances that have set the scheduling.automaticRestart field to
18525// true. Use filtering on nested fields to take advantage of labels to
18526// organize and search for results based on label values.
18527//
18528// To filter on multiple expressions, provide each separate expression
18529// within parentheses. For example, (scheduling.automaticRestart eq
18530// true) (zone eq us-central1-f). Multiple expressions are treated as
18531// AND expressions, meaning that resources must match all expressions to
18532// pass the filters.
18533func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall {
18534	c.urlParams_.Set("filter", filter)
18535	return c
18536}
18537
18538// MaxResults sets the optional parameter "maxResults": The maximum
18539// number of results per page that should be returned. If the number of
18540// available results is larger than maxResults, Compute Engine returns a
18541// nextPageToken that can be used to get the next page of results in
18542// subsequent list requests. Acceptable values are 0 to 500, inclusive.
18543// (Default: 500)
18544func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall {
18545	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18546	return c
18547}
18548
18549// OrderBy sets the optional parameter "orderBy": Sorts list results by
18550// a certain order. By default, results are returned in alphanumerical
18551// order based on the resource name.
18552//
18553// You can also sort results in descending order based on the creation
18554// timestamp using orderBy="creationTimestamp desc". This sorts results
18555// based on the creationTimestamp field in reverse chronological order
18556// (newest result first). Use this to sort resources like operations so
18557// that the newest operation is returned first.
18558//
18559// Currently, only sorting by name or creationTimestamp desc is
18560// supported.
18561func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall {
18562	c.urlParams_.Set("orderBy", orderBy)
18563	return c
18564}
18565
18566// PageToken sets the optional parameter "pageToken": Specifies a page
18567// token to use. Set pageToken to the nextPageToken returned by a
18568// previous list request to get the next page of results.
18569func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall {
18570	c.urlParams_.Set("pageToken", pageToken)
18571	return c
18572}
18573
18574// Fields allows partial responses to be retrieved. See
18575// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18576// for more information.
18577func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall {
18578	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18579	return c
18580}
18581
18582// IfNoneMatch sets the optional parameter which makes the operation
18583// fail if the object's ETag matches the given value. This is useful for
18584// getting updates only after the object has changed since the last
18585// request. Use googleapi.IsNotModified to check whether the response
18586// error from Do is the result of In-None-Match.
18587func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall {
18588	c.ifNoneMatch_ = entityTag
18589	return c
18590}
18591
18592// Context sets the context to be used in this call's Do method. Any
18593// pending HTTP request will be aborted if the provided context is
18594// canceled.
18595func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall {
18596	c.ctx_ = ctx
18597	return c
18598}
18599
18600// Header returns an http.Header that can be modified by the caller to
18601// add HTTP headers to the request.
18602func (c *AddressesAggregatedListCall) Header() http.Header {
18603	if c.header_ == nil {
18604		c.header_ = make(http.Header)
18605	}
18606	return c.header_
18607}
18608
18609func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
18610	reqHeaders := make(http.Header)
18611	for k, v := range c.header_ {
18612		reqHeaders[k] = v
18613	}
18614	reqHeaders.Set("User-Agent", c.s.userAgent())
18615	if c.ifNoneMatch_ != "" {
18616		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18617	}
18618	var body io.Reader = nil
18619	c.urlParams_.Set("alt", alt)
18620	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/addresses")
18621	urls += "?" + c.urlParams_.Encode()
18622	req, _ := http.NewRequest("GET", urls, body)
18623	req.Header = reqHeaders
18624	googleapi.Expand(req.URL, map[string]string{
18625		"project": c.project,
18626	})
18627	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18628}
18629
18630// Do executes the "compute.addresses.aggregatedList" call.
18631// Exactly one of *AddressAggregatedList or error will be non-nil. Any
18632// non-2xx status code is an error. Response headers are in either
18633// *AddressAggregatedList.ServerResponse.Header or (if a response was
18634// returned at all) in error.(*googleapi.Error).Header. Use
18635// googleapi.IsNotModified to check whether the returned error was
18636// because http.StatusNotModified was returned.
18637func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, error) {
18638	gensupport.SetOptions(c.urlParams_, opts...)
18639	res, err := c.doRequest("json")
18640	if res != nil && res.StatusCode == http.StatusNotModified {
18641		if res.Body != nil {
18642			res.Body.Close()
18643		}
18644		return nil, &googleapi.Error{
18645			Code:   res.StatusCode,
18646			Header: res.Header,
18647		}
18648	}
18649	if err != nil {
18650		return nil, err
18651	}
18652	defer googleapi.CloseBody(res)
18653	if err := googleapi.CheckResponse(res); err != nil {
18654		return nil, err
18655	}
18656	ret := &AddressAggregatedList{
18657		ServerResponse: googleapi.ServerResponse{
18658			Header:         res.Header,
18659			HTTPStatusCode: res.StatusCode,
18660		},
18661	}
18662	target := &ret
18663	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
18664		return nil, err
18665	}
18666	return ret, nil
18667	// {
18668	//   "description": "Retrieves an aggregated list of addresses.",
18669	//   "httpMethod": "GET",
18670	//   "id": "compute.addresses.aggregatedList",
18671	//   "parameterOrder": [
18672	//     "project"
18673	//   ],
18674	//   "parameters": {
18675	//     "filter": {
18676	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
18677	//       "location": "query",
18678	//       "type": "string"
18679	//     },
18680	//     "maxResults": {
18681	//       "default": "500",
18682	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
18683	//       "format": "uint32",
18684	//       "location": "query",
18685	//       "minimum": "0",
18686	//       "type": "integer"
18687	//     },
18688	//     "orderBy": {
18689	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
18690	//       "location": "query",
18691	//       "type": "string"
18692	//     },
18693	//     "pageToken": {
18694	//       "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.",
18695	//       "location": "query",
18696	//       "type": "string"
18697	//     },
18698	//     "project": {
18699	//       "description": "Project ID for this request.",
18700	//       "location": "path",
18701	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18702	//       "required": true,
18703	//       "type": "string"
18704	//     }
18705	//   },
18706	//   "path": "{project}/aggregated/addresses",
18707	//   "response": {
18708	//     "$ref": "AddressAggregatedList"
18709	//   },
18710	//   "scopes": [
18711	//     "https://www.googleapis.com/auth/cloud-platform",
18712	//     "https://www.googleapis.com/auth/compute",
18713	//     "https://www.googleapis.com/auth/compute.readonly"
18714	//   ]
18715	// }
18716
18717}
18718
18719// Pages invokes f for each page of results.
18720// A non-nil error returned from f will halt the iteration.
18721// The provided context supersedes any context provided to the Context method.
18722func (c *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) error) error {
18723	c.ctx_ = ctx
18724	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18725	for {
18726		x, err := c.Do()
18727		if err != nil {
18728			return err
18729		}
18730		if err := f(x); err != nil {
18731			return err
18732		}
18733		if x.NextPageToken == "" {
18734			return nil
18735		}
18736		c.PageToken(x.NextPageToken)
18737	}
18738}
18739
18740// method id "compute.addresses.delete":
18741
18742type AddressesDeleteCall struct {
18743	s          *Service
18744	project    string
18745	region     string
18746	address    string
18747	urlParams_ gensupport.URLParams
18748	ctx_       context.Context
18749	header_    http.Header
18750}
18751
18752// Delete: Deletes the specified address resource.
18753// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/delete
18754func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall {
18755	c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18756	c.project = project
18757	c.region = region
18758	c.address = address
18759	return c
18760}
18761
18762// RequestId sets the optional parameter "requestId": An optional
18763// request ID to identify requests. Specify a unique request ID so that
18764// if you must retry your request, the server will know to ignore the
18765// request if it has already been completed.
18766//
18767// For example, consider a situation where you make an initial request
18768// and the request times out. If you make the request again with the
18769// same request ID, the server can check if original operation with the
18770// same request ID was received, and if so, will ignore the second
18771// request. This prevents clients from accidentally creating duplicate
18772// commitments.
18773//
18774// The request ID must be a valid UUID with the exception that zero UUID
18775// is not supported (00000000-0000-0000-0000-000000000000).
18776func (c *AddressesDeleteCall) RequestId(requestId string) *AddressesDeleteCall {
18777	c.urlParams_.Set("requestId", requestId)
18778	return c
18779}
18780
18781// Fields allows partial responses to be retrieved. See
18782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18783// for more information.
18784func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall {
18785	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18786	return c
18787}
18788
18789// Context sets the context to be used in this call's Do method. Any
18790// pending HTTP request will be aborted if the provided context is
18791// canceled.
18792func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall {
18793	c.ctx_ = ctx
18794	return c
18795}
18796
18797// Header returns an http.Header that can be modified by the caller to
18798// add HTTP headers to the request.
18799func (c *AddressesDeleteCall) Header() http.Header {
18800	if c.header_ == nil {
18801		c.header_ = make(http.Header)
18802	}
18803	return c.header_
18804}
18805
18806func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
18807	reqHeaders := make(http.Header)
18808	for k, v := range c.header_ {
18809		reqHeaders[k] = v
18810	}
18811	reqHeaders.Set("User-Agent", c.s.userAgent())
18812	var body io.Reader = nil
18813	c.urlParams_.Set("alt", alt)
18814	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}")
18815	urls += "?" + c.urlParams_.Encode()
18816	req, _ := http.NewRequest("DELETE", urls, body)
18817	req.Header = reqHeaders
18818	googleapi.Expand(req.URL, map[string]string{
18819		"project": c.project,
18820		"region":  c.region,
18821		"address": c.address,
18822	})
18823	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18824}
18825
18826// Do executes the "compute.addresses.delete" call.
18827// Exactly one of *Operation or error will be non-nil. Any non-2xx
18828// status code is an error. Response headers are in either
18829// *Operation.ServerResponse.Header or (if a response was returned at
18830// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18831// to check whether the returned error was because
18832// http.StatusNotModified was returned.
18833func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18834	gensupport.SetOptions(c.urlParams_, opts...)
18835	res, err := c.doRequest("json")
18836	if res != nil && res.StatusCode == http.StatusNotModified {
18837		if res.Body != nil {
18838			res.Body.Close()
18839		}
18840		return nil, &googleapi.Error{
18841			Code:   res.StatusCode,
18842			Header: res.Header,
18843		}
18844	}
18845	if err != nil {
18846		return nil, err
18847	}
18848	defer googleapi.CloseBody(res)
18849	if err := googleapi.CheckResponse(res); err != nil {
18850		return nil, err
18851	}
18852	ret := &Operation{
18853		ServerResponse: googleapi.ServerResponse{
18854			Header:         res.Header,
18855			HTTPStatusCode: res.StatusCode,
18856		},
18857	}
18858	target := &ret
18859	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
18860		return nil, err
18861	}
18862	return ret, nil
18863	// {
18864	//   "description": "Deletes the specified address resource.",
18865	//   "httpMethod": "DELETE",
18866	//   "id": "compute.addresses.delete",
18867	//   "parameterOrder": [
18868	//     "project",
18869	//     "region",
18870	//     "address"
18871	//   ],
18872	//   "parameters": {
18873	//     "address": {
18874	//       "description": "Name of the address resource to delete.",
18875	//       "location": "path",
18876	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18877	//       "required": true,
18878	//       "type": "string"
18879	//     },
18880	//     "project": {
18881	//       "description": "Project ID for this request.",
18882	//       "location": "path",
18883	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18884	//       "required": true,
18885	//       "type": "string"
18886	//     },
18887	//     "region": {
18888	//       "description": "Name of the region for this request.",
18889	//       "location": "path",
18890	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18891	//       "required": true,
18892	//       "type": "string"
18893	//     },
18894	//     "requestId": {
18895	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
18896	//       "location": "query",
18897	//       "type": "string"
18898	//     }
18899	//   },
18900	//   "path": "{project}/regions/{region}/addresses/{address}",
18901	//   "response": {
18902	//     "$ref": "Operation"
18903	//   },
18904	//   "scopes": [
18905	//     "https://www.googleapis.com/auth/cloud-platform",
18906	//     "https://www.googleapis.com/auth/compute"
18907	//   ]
18908	// }
18909
18910}
18911
18912// method id "compute.addresses.get":
18913
18914type AddressesGetCall struct {
18915	s            *Service
18916	project      string
18917	region       string
18918	address      string
18919	urlParams_   gensupport.URLParams
18920	ifNoneMatch_ string
18921	ctx_         context.Context
18922	header_      http.Header
18923}
18924
18925// Get: Returns the specified address resource.
18926// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/get
18927func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall {
18928	c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18929	c.project = project
18930	c.region = region
18931	c.address = address
18932	return c
18933}
18934
18935// Fields allows partial responses to be retrieved. See
18936// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18937// for more information.
18938func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall {
18939	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18940	return c
18941}
18942
18943// IfNoneMatch sets the optional parameter which makes the operation
18944// fail if the object's ETag matches the given value. This is useful for
18945// getting updates only after the object has changed since the last
18946// request. Use googleapi.IsNotModified to check whether the response
18947// error from Do is the result of In-None-Match.
18948func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall {
18949	c.ifNoneMatch_ = entityTag
18950	return c
18951}
18952
18953// Context sets the context to be used in this call's Do method. Any
18954// pending HTTP request will be aborted if the provided context is
18955// canceled.
18956func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall {
18957	c.ctx_ = ctx
18958	return c
18959}
18960
18961// Header returns an http.Header that can be modified by the caller to
18962// add HTTP headers to the request.
18963func (c *AddressesGetCall) Header() http.Header {
18964	if c.header_ == nil {
18965		c.header_ = make(http.Header)
18966	}
18967	return c.header_
18968}
18969
18970func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) {
18971	reqHeaders := make(http.Header)
18972	for k, v := range c.header_ {
18973		reqHeaders[k] = v
18974	}
18975	reqHeaders.Set("User-Agent", c.s.userAgent())
18976	if c.ifNoneMatch_ != "" {
18977		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18978	}
18979	var body io.Reader = nil
18980	c.urlParams_.Set("alt", alt)
18981	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}")
18982	urls += "?" + c.urlParams_.Encode()
18983	req, _ := http.NewRequest("GET", urls, body)
18984	req.Header = reqHeaders
18985	googleapi.Expand(req.URL, map[string]string{
18986		"project": c.project,
18987		"region":  c.region,
18988		"address": c.address,
18989	})
18990	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18991}
18992
18993// Do executes the "compute.addresses.get" call.
18994// Exactly one of *Address or error will be non-nil. Any non-2xx status
18995// code is an error. Response headers are in either
18996// *Address.ServerResponse.Header or (if a response was returned at all)
18997// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18998// check whether the returned error was because http.StatusNotModified
18999// was returned.
19000func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) {
19001	gensupport.SetOptions(c.urlParams_, opts...)
19002	res, err := c.doRequest("json")
19003	if res != nil && res.StatusCode == http.StatusNotModified {
19004		if res.Body != nil {
19005			res.Body.Close()
19006		}
19007		return nil, &googleapi.Error{
19008			Code:   res.StatusCode,
19009			Header: res.Header,
19010		}
19011	}
19012	if err != nil {
19013		return nil, err
19014	}
19015	defer googleapi.CloseBody(res)
19016	if err := googleapi.CheckResponse(res); err != nil {
19017		return nil, err
19018	}
19019	ret := &Address{
19020		ServerResponse: googleapi.ServerResponse{
19021			Header:         res.Header,
19022			HTTPStatusCode: res.StatusCode,
19023		},
19024	}
19025	target := &ret
19026	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
19027		return nil, err
19028	}
19029	return ret, nil
19030	// {
19031	//   "description": "Returns the specified address resource.",
19032	//   "httpMethod": "GET",
19033	//   "id": "compute.addresses.get",
19034	//   "parameterOrder": [
19035	//     "project",
19036	//     "region",
19037	//     "address"
19038	//   ],
19039	//   "parameters": {
19040	//     "address": {
19041	//       "description": "Name of the address resource to return.",
19042	//       "location": "path",
19043	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19044	//       "required": true,
19045	//       "type": "string"
19046	//     },
19047	//     "project": {
19048	//       "description": "Project ID for this request.",
19049	//       "location": "path",
19050	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19051	//       "required": true,
19052	//       "type": "string"
19053	//     },
19054	//     "region": {
19055	//       "description": "Name of the region for this request.",
19056	//       "location": "path",
19057	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19058	//       "required": true,
19059	//       "type": "string"
19060	//     }
19061	//   },
19062	//   "path": "{project}/regions/{region}/addresses/{address}",
19063	//   "response": {
19064	//     "$ref": "Address"
19065	//   },
19066	//   "scopes": [
19067	//     "https://www.googleapis.com/auth/cloud-platform",
19068	//     "https://www.googleapis.com/auth/compute",
19069	//     "https://www.googleapis.com/auth/compute.readonly"
19070	//   ]
19071	// }
19072
19073}
19074
19075// method id "compute.addresses.insert":
19076
19077type AddressesInsertCall struct {
19078	s          *Service
19079	project    string
19080	region     string
19081	address    *Address
19082	urlParams_ gensupport.URLParams
19083	ctx_       context.Context
19084	header_    http.Header
19085}
19086
19087// Insert: Creates an address resource in the specified project using
19088// the data included in the request.
19089// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/insert
19090func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall {
19091	c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19092	c.project = project
19093	c.region = region
19094	c.address = address
19095	return c
19096}
19097
19098// RequestId sets the optional parameter "requestId": An optional
19099// request ID to identify requests. Specify a unique request ID so that
19100// if you must retry your request, the server will know to ignore the
19101// request if it has already been completed.
19102//
19103// For example, consider a situation where you make an initial request
19104// and the request times out. If you make the request again with the
19105// same request ID, the server can check if original operation with the
19106// same request ID was received, and if so, will ignore the second
19107// request. This prevents clients from accidentally creating duplicate
19108// commitments.
19109//
19110// The request ID must be a valid UUID with the exception that zero UUID
19111// is not supported (00000000-0000-0000-0000-000000000000).
19112func (c *AddressesInsertCall) RequestId(requestId string) *AddressesInsertCall {
19113	c.urlParams_.Set("requestId", requestId)
19114	return c
19115}
19116
19117// Fields allows partial responses to be retrieved. See
19118// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19119// for more information.
19120func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall {
19121	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19122	return c
19123}
19124
19125// Context sets the context to be used in this call's Do method. Any
19126// pending HTTP request will be aborted if the provided context is
19127// canceled.
19128func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall {
19129	c.ctx_ = ctx
19130	return c
19131}
19132
19133// Header returns an http.Header that can be modified by the caller to
19134// add HTTP headers to the request.
19135func (c *AddressesInsertCall) Header() http.Header {
19136	if c.header_ == nil {
19137		c.header_ = make(http.Header)
19138	}
19139	return c.header_
19140}
19141
19142func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) {
19143	reqHeaders := make(http.Header)
19144	for k, v := range c.header_ {
19145		reqHeaders[k] = v
19146	}
19147	reqHeaders.Set("User-Agent", c.s.userAgent())
19148	var body io.Reader = nil
19149	body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
19150	if err != nil {
19151		return nil, err
19152	}
19153	reqHeaders.Set("Content-Type", "application/json")
19154	c.urlParams_.Set("alt", alt)
19155	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses")
19156	urls += "?" + c.urlParams_.Encode()
19157	req, _ := http.NewRequest("POST", urls, body)
19158	req.Header = reqHeaders
19159	googleapi.Expand(req.URL, map[string]string{
19160		"project": c.project,
19161		"region":  c.region,
19162	})
19163	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19164}
19165
19166// Do executes the "compute.addresses.insert" call.
19167// Exactly one of *Operation or error will be non-nil. Any non-2xx
19168// status code is an error. Response headers are in either
19169// *Operation.ServerResponse.Header or (if a response was returned at
19170// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19171// to check whether the returned error was because
19172// http.StatusNotModified was returned.
19173func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19174	gensupport.SetOptions(c.urlParams_, opts...)
19175	res, err := c.doRequest("json")
19176	if res != nil && res.StatusCode == http.StatusNotModified {
19177		if res.Body != nil {
19178			res.Body.Close()
19179		}
19180		return nil, &googleapi.Error{
19181			Code:   res.StatusCode,
19182			Header: res.Header,
19183		}
19184	}
19185	if err != nil {
19186		return nil, err
19187	}
19188	defer googleapi.CloseBody(res)
19189	if err := googleapi.CheckResponse(res); err != nil {
19190		return nil, err
19191	}
19192	ret := &Operation{
19193		ServerResponse: googleapi.ServerResponse{
19194			Header:         res.Header,
19195			HTTPStatusCode: res.StatusCode,
19196		},
19197	}
19198	target := &ret
19199	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
19200		return nil, err
19201	}
19202	return ret, nil
19203	// {
19204	//   "description": "Creates an address resource in the specified project using the data included in the request.",
19205	//   "httpMethod": "POST",
19206	//   "id": "compute.addresses.insert",
19207	//   "parameterOrder": [
19208	//     "project",
19209	//     "region"
19210	//   ],
19211	//   "parameters": {
19212	//     "project": {
19213	//       "description": "Project ID for this request.",
19214	//       "location": "path",
19215	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19216	//       "required": true,
19217	//       "type": "string"
19218	//     },
19219	//     "region": {
19220	//       "description": "Name of the region for this request.",
19221	//       "location": "path",
19222	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19223	//       "required": true,
19224	//       "type": "string"
19225	//     },
19226	//     "requestId": {
19227	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
19228	//       "location": "query",
19229	//       "type": "string"
19230	//     }
19231	//   },
19232	//   "path": "{project}/regions/{region}/addresses",
19233	//   "request": {
19234	//     "$ref": "Address"
19235	//   },
19236	//   "response": {
19237	//     "$ref": "Operation"
19238	//   },
19239	//   "scopes": [
19240	//     "https://www.googleapis.com/auth/cloud-platform",
19241	//     "https://www.googleapis.com/auth/compute"
19242	//   ]
19243	// }
19244
19245}
19246
19247// method id "compute.addresses.list":
19248
19249type AddressesListCall struct {
19250	s            *Service
19251	project      string
19252	region       string
19253	urlParams_   gensupport.URLParams
19254	ifNoneMatch_ string
19255	ctx_         context.Context
19256	header_      http.Header
19257}
19258
19259// List: Retrieves a list of addresses contained within the specified
19260// region.
19261// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list
19262func (r *AddressesService) List(project string, region string) *AddressesListCall {
19263	c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19264	c.project = project
19265	c.region = region
19266	return c
19267}
19268
19269// Filter sets the optional parameter "filter": Sets a filter
19270// {expression} for filtering listed resources. Your {expression} must
19271// be in the format: field_name comparison_string literal_string.
19272//
19273// The field_name is the name of the field you want to compare. Only
19274// atomic field types are supported (string, number, boolean). The
19275// comparison_string must be either eq (equals) or ne (not equals). The
19276// literal_string is the string value to filter to. The literal value
19277// must be valid for the type of field you are filtering by (string,
19278// number, boolean). For string fields, the literal value is interpreted
19279// as a regular expression using RE2 syntax. The literal value must
19280// match the entire field.
19281//
19282// For example, to filter for instances that do not have a name of
19283// example-instance, you would use name ne example-instance.
19284//
19285// You can filter on nested fields. For example, you could filter on
19286// instances that have set the scheduling.automaticRestart field to
19287// true. Use filtering on nested fields to take advantage of labels to
19288// organize and search for results based on label values.
19289//
19290// To filter on multiple expressions, provide each separate expression
19291// within parentheses. For example, (scheduling.automaticRestart eq
19292// true) (zone eq us-central1-f). Multiple expressions are treated as
19293// AND expressions, meaning that resources must match all expressions to
19294// pass the filters.
19295func (c *AddressesListCall) Filter(filter string) *AddressesListCall {
19296	c.urlParams_.Set("filter", filter)
19297	return c
19298}
19299
19300// MaxResults sets the optional parameter "maxResults": The maximum
19301// number of results per page that should be returned. If the number of
19302// available results is larger than maxResults, Compute Engine returns a
19303// nextPageToken that can be used to get the next page of results in
19304// subsequent list requests. Acceptable values are 0 to 500, inclusive.
19305// (Default: 500)
19306func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall {
19307	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19308	return c
19309}
19310
19311// OrderBy sets the optional parameter "orderBy": Sorts list results by
19312// a certain order. By default, results are returned in alphanumerical
19313// order based on the resource name.
19314//
19315// You can also sort results in descending order based on the creation
19316// timestamp using orderBy="creationTimestamp desc". This sorts results
19317// based on the creationTimestamp field in reverse chronological order
19318// (newest result first). Use this to sort resources like operations so
19319// that the newest operation is returned first.
19320//
19321// Currently, only sorting by name or creationTimestamp desc is
19322// supported.
19323func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall {
19324	c.urlParams_.Set("orderBy", orderBy)
19325	return c
19326}
19327
19328// PageToken sets the optional parameter "pageToken": Specifies a page
19329// token to use. Set pageToken to the nextPageToken returned by a
19330// previous list request to get the next page of results.
19331func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall {
19332	c.urlParams_.Set("pageToken", pageToken)
19333	return c
19334}
19335
19336// Fields allows partial responses to be retrieved. See
19337// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19338// for more information.
19339func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall {
19340	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19341	return c
19342}
19343
19344// IfNoneMatch sets the optional parameter which makes the operation
19345// fail if the object's ETag matches the given value. This is useful for
19346// getting updates only after the object has changed since the last
19347// request. Use googleapi.IsNotModified to check whether the response
19348// error from Do is the result of In-None-Match.
19349func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall {
19350	c.ifNoneMatch_ = entityTag
19351	return c
19352}
19353
19354// Context sets the context to be used in this call's Do method. Any
19355// pending HTTP request will be aborted if the provided context is
19356// canceled.
19357func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall {
19358	c.ctx_ = ctx
19359	return c
19360}
19361
19362// Header returns an http.Header that can be modified by the caller to
19363// add HTTP headers to the request.
19364func (c *AddressesListCall) Header() http.Header {
19365	if c.header_ == nil {
19366		c.header_ = make(http.Header)
19367	}
19368	return c.header_
19369}
19370
19371func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) {
19372	reqHeaders := make(http.Header)
19373	for k, v := range c.header_ {
19374		reqHeaders[k] = v
19375	}
19376	reqHeaders.Set("User-Agent", c.s.userAgent())
19377	if c.ifNoneMatch_ != "" {
19378		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19379	}
19380	var body io.Reader = nil
19381	c.urlParams_.Set("alt", alt)
19382	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses")
19383	urls += "?" + c.urlParams_.Encode()
19384	req, _ := http.NewRequest("GET", urls, body)
19385	req.Header = reqHeaders
19386	googleapi.Expand(req.URL, map[string]string{
19387		"project": c.project,
19388		"region":  c.region,
19389	})
19390	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19391}
19392
19393// Do executes the "compute.addresses.list" call.
19394// Exactly one of *AddressList or error will be non-nil. Any non-2xx
19395// status code is an error. Response headers are in either
19396// *AddressList.ServerResponse.Header or (if a response was returned at
19397// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19398// to check whether the returned error was because
19399// http.StatusNotModified was returned.
19400func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) {
19401	gensupport.SetOptions(c.urlParams_, opts...)
19402	res, err := c.doRequest("json")
19403	if res != nil && res.StatusCode == http.StatusNotModified {
19404		if res.Body != nil {
19405			res.Body.Close()
19406		}
19407		return nil, &googleapi.Error{
19408			Code:   res.StatusCode,
19409			Header: res.Header,
19410		}
19411	}
19412	if err != nil {
19413		return nil, err
19414	}
19415	defer googleapi.CloseBody(res)
19416	if err := googleapi.CheckResponse(res); err != nil {
19417		return nil, err
19418	}
19419	ret := &AddressList{
19420		ServerResponse: googleapi.ServerResponse{
19421			Header:         res.Header,
19422			HTTPStatusCode: res.StatusCode,
19423		},
19424	}
19425	target := &ret
19426	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
19427		return nil, err
19428	}
19429	return ret, nil
19430	// {
19431	//   "description": "Retrieves a list of addresses contained within the specified region.",
19432	//   "httpMethod": "GET",
19433	//   "id": "compute.addresses.list",
19434	//   "parameterOrder": [
19435	//     "project",
19436	//     "region"
19437	//   ],
19438	//   "parameters": {
19439	//     "filter": {
19440	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
19441	//       "location": "query",
19442	//       "type": "string"
19443	//     },
19444	//     "maxResults": {
19445	//       "default": "500",
19446	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
19447	//       "format": "uint32",
19448	//       "location": "query",
19449	//       "minimum": "0",
19450	//       "type": "integer"
19451	//     },
19452	//     "orderBy": {
19453	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
19454	//       "location": "query",
19455	//       "type": "string"
19456	//     },
19457	//     "pageToken": {
19458	//       "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.",
19459	//       "location": "query",
19460	//       "type": "string"
19461	//     },
19462	//     "project": {
19463	//       "description": "Project ID for this request.",
19464	//       "location": "path",
19465	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19466	//       "required": true,
19467	//       "type": "string"
19468	//     },
19469	//     "region": {
19470	//       "description": "Name of the region for this request.",
19471	//       "location": "path",
19472	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19473	//       "required": true,
19474	//       "type": "string"
19475	//     }
19476	//   },
19477	//   "path": "{project}/regions/{region}/addresses",
19478	//   "response": {
19479	//     "$ref": "AddressList"
19480	//   },
19481	//   "scopes": [
19482	//     "https://www.googleapis.com/auth/cloud-platform",
19483	//     "https://www.googleapis.com/auth/compute",
19484	//     "https://www.googleapis.com/auth/compute.readonly"
19485	//   ]
19486	// }
19487
19488}
19489
19490// Pages invokes f for each page of results.
19491// A non-nil error returned from f will halt the iteration.
19492// The provided context supersedes any context provided to the Context method.
19493func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error {
19494	c.ctx_ = ctx
19495	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19496	for {
19497		x, err := c.Do()
19498		if err != nil {
19499			return err
19500		}
19501		if err := f(x); err != nil {
19502			return err
19503		}
19504		if x.NextPageToken == "" {
19505			return nil
19506		}
19507		c.PageToken(x.NextPageToken)
19508	}
19509}
19510
19511// method id "compute.addresses.setLabels":
19512
19513type AddressesSetLabelsCall struct {
19514	s                      *Service
19515	project                string
19516	region                 string
19517	resource               string
19518	regionsetlabelsrequest *RegionSetLabelsRequest
19519	urlParams_             gensupport.URLParams
19520	ctx_                   context.Context
19521	header_                http.Header
19522}
19523
19524// SetLabels: Sets the labels on an Address. To learn more about labels,
19525// read the Labeling Resources documentation.
19526func (r *AddressesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *AddressesSetLabelsCall {
19527	c := &AddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19528	c.project = project
19529	c.region = region
19530	c.resource = resource
19531	c.regionsetlabelsrequest = regionsetlabelsrequest
19532	return c
19533}
19534
19535// RequestId sets the optional parameter "requestId": An optional
19536// request ID to identify requests. Specify a unique request ID so that
19537// if you must retry your request, the server will know to ignore the
19538// request if it has already been completed.
19539//
19540// For example, consider a situation where you make an initial request
19541// and the request times out. If you make the request again with the
19542// same request ID, the server can check if original operation with the
19543// same request ID was received, and if so, will ignore the second
19544// request. This prevents clients from accidentally creating duplicate
19545// commitments.
19546//
19547// The request ID must be a valid UUID with the exception that zero UUID
19548// is not supported (00000000-0000-0000-0000-000000000000).
19549func (c *AddressesSetLabelsCall) RequestId(requestId string) *AddressesSetLabelsCall {
19550	c.urlParams_.Set("requestId", requestId)
19551	return c
19552}
19553
19554// Fields allows partial responses to be retrieved. See
19555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19556// for more information.
19557func (c *AddressesSetLabelsCall) Fields(s ...googleapi.Field) *AddressesSetLabelsCall {
19558	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19559	return c
19560}
19561
19562// Context sets the context to be used in this call's Do method. Any
19563// pending HTTP request will be aborted if the provided context is
19564// canceled.
19565func (c *AddressesSetLabelsCall) Context(ctx context.Context) *AddressesSetLabelsCall {
19566	c.ctx_ = ctx
19567	return c
19568}
19569
19570// Header returns an http.Header that can be modified by the caller to
19571// add HTTP headers to the request.
19572func (c *AddressesSetLabelsCall) Header() http.Header {
19573	if c.header_ == nil {
19574		c.header_ = make(http.Header)
19575	}
19576	return c.header_
19577}
19578
19579func (c *AddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) {
19580	reqHeaders := make(http.Header)
19581	for k, v := range c.header_ {
19582		reqHeaders[k] = v
19583	}
19584	reqHeaders.Set("User-Agent", c.s.userAgent())
19585	var body io.Reader = nil
19586	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest)
19587	if err != nil {
19588		return nil, err
19589	}
19590	reqHeaders.Set("Content-Type", "application/json")
19591	c.urlParams_.Set("alt", alt)
19592	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{resource}/setLabels")
19593	urls += "?" + c.urlParams_.Encode()
19594	req, _ := http.NewRequest("POST", urls, body)
19595	req.Header = reqHeaders
19596	googleapi.Expand(req.URL, map[string]string{
19597		"project":  c.project,
19598		"region":   c.region,
19599		"resource": c.resource,
19600	})
19601	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19602}
19603
19604// Do executes the "compute.addresses.setLabels" call.
19605// Exactly one of *Operation or error will be non-nil. Any non-2xx
19606// status code is an error. Response headers are in either
19607// *Operation.ServerResponse.Header or (if a response was returned at
19608// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19609// to check whether the returned error was because
19610// http.StatusNotModified was returned.
19611func (c *AddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19612	gensupport.SetOptions(c.urlParams_, opts...)
19613	res, err := c.doRequest("json")
19614	if res != nil && res.StatusCode == http.StatusNotModified {
19615		if res.Body != nil {
19616			res.Body.Close()
19617		}
19618		return nil, &googleapi.Error{
19619			Code:   res.StatusCode,
19620			Header: res.Header,
19621		}
19622	}
19623	if err != nil {
19624		return nil, err
19625	}
19626	defer googleapi.CloseBody(res)
19627	if err := googleapi.CheckResponse(res); err != nil {
19628		return nil, err
19629	}
19630	ret := &Operation{
19631		ServerResponse: googleapi.ServerResponse{
19632			Header:         res.Header,
19633			HTTPStatusCode: res.StatusCode,
19634		},
19635	}
19636	target := &ret
19637	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
19638		return nil, err
19639	}
19640	return ret, nil
19641	// {
19642	//   "description": "Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation.",
19643	//   "httpMethod": "POST",
19644	//   "id": "compute.addresses.setLabels",
19645	//   "parameterOrder": [
19646	//     "project",
19647	//     "region",
19648	//     "resource"
19649	//   ],
19650	//   "parameters": {
19651	//     "project": {
19652	//       "description": "Project ID for this request.",
19653	//       "location": "path",
19654	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19655	//       "required": true,
19656	//       "type": "string"
19657	//     },
19658	//     "region": {
19659	//       "description": "The region for this request.",
19660	//       "location": "path",
19661	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19662	//       "required": true,
19663	//       "type": "string"
19664	//     },
19665	//     "requestId": {
19666	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
19667	//       "location": "query",
19668	//       "type": "string"
19669	//     },
19670	//     "resource": {
19671	//       "description": "Name of the resource for this request.",
19672	//       "location": "path",
19673	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19674	//       "required": true,
19675	//       "type": "string"
19676	//     }
19677	//   },
19678	//   "path": "{project}/regions/{region}/addresses/{resource}/setLabels",
19679	//   "request": {
19680	//     "$ref": "RegionSetLabelsRequest"
19681	//   },
19682	//   "response": {
19683	//     "$ref": "Operation"
19684	//   },
19685	//   "scopes": [
19686	//     "https://www.googleapis.com/auth/cloud-platform",
19687	//     "https://www.googleapis.com/auth/compute"
19688	//   ]
19689	// }
19690
19691}
19692
19693// method id "compute.addresses.testIamPermissions":
19694
19695type AddressesTestIamPermissionsCall struct {
19696	s                      *Service
19697	project                string
19698	region                 string
19699	resource               string
19700	testpermissionsrequest *TestPermissionsRequest
19701	urlParams_             gensupport.URLParams
19702	ctx_                   context.Context
19703	header_                http.Header
19704}
19705
19706// TestIamPermissions: Returns permissions that a caller has on the
19707// specified resource.
19708func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall {
19709	c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19710	c.project = project
19711	c.region = region
19712	c.resource = resource
19713	c.testpermissionsrequest = testpermissionsrequest
19714	return c
19715}
19716
19717// Fields allows partial responses to be retrieved. See
19718// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19719// for more information.
19720func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall {
19721	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19722	return c
19723}
19724
19725// Context sets the context to be used in this call's Do method. Any
19726// pending HTTP request will be aborted if the provided context is
19727// canceled.
19728func (c *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall {
19729	c.ctx_ = ctx
19730	return c
19731}
19732
19733// Header returns an http.Header that can be modified by the caller to
19734// add HTTP headers to the request.
19735func (c *AddressesTestIamPermissionsCall) Header() http.Header {
19736	if c.header_ == nil {
19737		c.header_ = make(http.Header)
19738	}
19739	return c.header_
19740}
19741
19742func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
19743	reqHeaders := make(http.Header)
19744	for k, v := range c.header_ {
19745		reqHeaders[k] = v
19746	}
19747	reqHeaders.Set("User-Agent", c.s.userAgent())
19748	var body io.Reader = nil
19749	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
19750	if err != nil {
19751		return nil, err
19752	}
19753	reqHeaders.Set("Content-Type", "application/json")
19754	c.urlParams_.Set("alt", alt)
19755	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{resource}/testIamPermissions")
19756	urls += "?" + c.urlParams_.Encode()
19757	req, _ := http.NewRequest("POST", urls, body)
19758	req.Header = reqHeaders
19759	googleapi.Expand(req.URL, map[string]string{
19760		"project":  c.project,
19761		"region":   c.region,
19762		"resource": c.resource,
19763	})
19764	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19765}
19766
19767// Do executes the "compute.addresses.testIamPermissions" call.
19768// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
19769// non-2xx status code is an error. Response headers are in either
19770// *TestPermissionsResponse.ServerResponse.Header or (if a response was
19771// returned at all) in error.(*googleapi.Error).Header. Use
19772// googleapi.IsNotModified to check whether the returned error was
19773// because http.StatusNotModified was returned.
19774func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
19775	gensupport.SetOptions(c.urlParams_, opts...)
19776	res, err := c.doRequest("json")
19777	if res != nil && res.StatusCode == http.StatusNotModified {
19778		if res.Body != nil {
19779			res.Body.Close()
19780		}
19781		return nil, &googleapi.Error{
19782			Code:   res.StatusCode,
19783			Header: res.Header,
19784		}
19785	}
19786	if err != nil {
19787		return nil, err
19788	}
19789	defer googleapi.CloseBody(res)
19790	if err := googleapi.CheckResponse(res); err != nil {
19791		return nil, err
19792	}
19793	ret := &TestPermissionsResponse{
19794		ServerResponse: googleapi.ServerResponse{
19795			Header:         res.Header,
19796			HTTPStatusCode: res.StatusCode,
19797		},
19798	}
19799	target := &ret
19800	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
19801		return nil, err
19802	}
19803	return ret, nil
19804	// {
19805	//   "description": "Returns permissions that a caller has on the specified resource.",
19806	//   "httpMethod": "POST",
19807	//   "id": "compute.addresses.testIamPermissions",
19808	//   "parameterOrder": [
19809	//     "project",
19810	//     "region",
19811	//     "resource"
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-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19818	//       "required": true,
19819	//       "type": "string"
19820	//     },
19821	//     "region": {
19822	//       "description": "The name of the region for this request.",
19823	//       "location": "path",
19824	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19825	//       "required": true,
19826	//       "type": "string"
19827	//     },
19828	//     "resource": {
19829	//       "description": "Name of the resource for this request.",
19830	//       "location": "path",
19831	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19832	//       "required": true,
19833	//       "type": "string"
19834	//     }
19835	//   },
19836	//   "path": "{project}/regions/{region}/addresses/{resource}/testIamPermissions",
19837	//   "request": {
19838	//     "$ref": "TestPermissionsRequest"
19839	//   },
19840	//   "response": {
19841	//     "$ref": "TestPermissionsResponse"
19842	//   },
19843	//   "scopes": [
19844	//     "https://www.googleapis.com/auth/cloud-platform",
19845	//     "https://www.googleapis.com/auth/compute",
19846	//     "https://www.googleapis.com/auth/compute.readonly"
19847	//   ]
19848	// }
19849
19850}
19851
19852// method id "compute.autoscalers.aggregatedList":
19853
19854type AutoscalersAggregatedListCall struct {
19855	s            *Service
19856	project      string
19857	urlParams_   gensupport.URLParams
19858	ifNoneMatch_ string
19859	ctx_         context.Context
19860	header_      http.Header
19861}
19862
19863// AggregatedList: Retrieves an aggregated list of autoscalers.
19864func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall {
19865	c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19866	c.project = project
19867	return c
19868}
19869
19870// Filter sets the optional parameter "filter": Sets a filter
19871// {expression} for filtering listed resources. Your {expression} must
19872// be in the format: field_name comparison_string literal_string.
19873//
19874// The field_name is the name of the field you want to compare. Only
19875// atomic field types are supported (string, number, boolean). The
19876// comparison_string must be either eq (equals) or ne (not equals). The
19877// literal_string is the string value to filter to. The literal value
19878// must be valid for the type of field you are filtering by (string,
19879// number, boolean). For string fields, the literal value is interpreted
19880// as a regular expression using RE2 syntax. The literal value must
19881// match the entire field.
19882//
19883// For example, to filter for instances that do not have a name of
19884// example-instance, you would use name ne example-instance.
19885//
19886// You can filter on nested fields. For example, you could filter on
19887// instances that have set the scheduling.automaticRestart field to
19888// true. Use filtering on nested fields to take advantage of labels to
19889// organize and search for results based on label values.
19890//
19891// To filter on multiple expressions, provide each separate expression
19892// within parentheses. For example, (scheduling.automaticRestart eq
19893// true) (zone eq us-central1-f). Multiple expressions are treated as
19894// AND expressions, meaning that resources must match all expressions to
19895// pass the filters.
19896func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall {
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. Acceptable values are 0 to 500, inclusive.
19906// (Default: 500)
19907func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall {
19908	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19909	return c
19910}
19911
19912// OrderBy sets the optional parameter "orderBy": Sorts list results by
19913// a certain order. By default, results are returned in alphanumerical
19914// order based on the resource name.
19915//
19916// You can also sort results in descending order based on the creation
19917// timestamp using orderBy="creationTimestamp desc". This sorts results
19918// based on the creationTimestamp field in reverse chronological order
19919// (newest result first). Use this to sort resources like operations so
19920// that the newest operation is returned first.
19921//
19922// Currently, only sorting by name or creationTimestamp desc is
19923// supported.
19924func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall {
19925	c.urlParams_.Set("orderBy", orderBy)
19926	return c
19927}
19928
19929// PageToken sets the optional parameter "pageToken": Specifies a page
19930// token to use. Set pageToken to the nextPageToken returned by a
19931// previous list request to get the next page of results.
19932func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall {
19933	c.urlParams_.Set("pageToken", pageToken)
19934	return c
19935}
19936
19937// Fields allows partial responses to be retrieved. See
19938// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19939// for more information.
19940func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall {
19941	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19942	return c
19943}
19944
19945// IfNoneMatch sets the optional parameter which makes the operation
19946// fail if the object's ETag matches the given value. This is useful for
19947// getting updates only after the object has changed since the last
19948// request. Use googleapi.IsNotModified to check whether the response
19949// error from Do is the result of In-None-Match.
19950func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall {
19951	c.ifNoneMatch_ = entityTag
19952	return c
19953}
19954
19955// Context sets the context to be used in this call's Do method. Any
19956// pending HTTP request will be aborted if the provided context is
19957// canceled.
19958func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall {
19959	c.ctx_ = ctx
19960	return c
19961}
19962
19963// Header returns an http.Header that can be modified by the caller to
19964// add HTTP headers to the request.
19965func (c *AutoscalersAggregatedListCall) Header() http.Header {
19966	if c.header_ == nil {
19967		c.header_ = make(http.Header)
19968	}
19969	return c.header_
19970}
19971
19972func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
19973	reqHeaders := make(http.Header)
19974	for k, v := range c.header_ {
19975		reqHeaders[k] = v
19976	}
19977	reqHeaders.Set("User-Agent", c.s.userAgent())
19978	if c.ifNoneMatch_ != "" {
19979		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19980	}
19981	var body io.Reader = nil
19982	c.urlParams_.Set("alt", alt)
19983	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/autoscalers")
19984	urls += "?" + c.urlParams_.Encode()
19985	req, _ := http.NewRequest("GET", urls, body)
19986	req.Header = reqHeaders
19987	googleapi.Expand(req.URL, map[string]string{
19988		"project": c.project,
19989	})
19990	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19991}
19992
19993// Do executes the "compute.autoscalers.aggregatedList" call.
19994// Exactly one of *AutoscalerAggregatedList or error will be non-nil.
19995// Any non-2xx status code is an error. Response headers are in either
19996// *AutoscalerAggregatedList.ServerResponse.Header or (if a response was
19997// returned at all) in error.(*googleapi.Error).Header. Use
19998// googleapi.IsNotModified to check whether the returned error was
19999// because http.StatusNotModified was returned.
20000func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) {
20001	gensupport.SetOptions(c.urlParams_, opts...)
20002	res, err := c.doRequest("json")
20003	if res != nil && res.StatusCode == http.StatusNotModified {
20004		if res.Body != nil {
20005			res.Body.Close()
20006		}
20007		return nil, &googleapi.Error{
20008			Code:   res.StatusCode,
20009			Header: res.Header,
20010		}
20011	}
20012	if err != nil {
20013		return nil, err
20014	}
20015	defer googleapi.CloseBody(res)
20016	if err := googleapi.CheckResponse(res); err != nil {
20017		return nil, err
20018	}
20019	ret := &AutoscalerAggregatedList{
20020		ServerResponse: googleapi.ServerResponse{
20021			Header:         res.Header,
20022			HTTPStatusCode: res.StatusCode,
20023		},
20024	}
20025	target := &ret
20026	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
20027		return nil, err
20028	}
20029	return ret, nil
20030	// {
20031	//   "description": "Retrieves an aggregated list of autoscalers.",
20032	//   "httpMethod": "GET",
20033	//   "id": "compute.autoscalers.aggregatedList",
20034	//   "parameterOrder": [
20035	//     "project"
20036	//   ],
20037	//   "parameters": {
20038	//     "filter": {
20039	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
20040	//       "location": "query",
20041	//       "type": "string"
20042	//     },
20043	//     "maxResults": {
20044	//       "default": "500",
20045	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
20046	//       "format": "uint32",
20047	//       "location": "query",
20048	//       "minimum": "0",
20049	//       "type": "integer"
20050	//     },
20051	//     "orderBy": {
20052	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
20053	//       "location": "query",
20054	//       "type": "string"
20055	//     },
20056	//     "pageToken": {
20057	//       "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.",
20058	//       "location": "query",
20059	//       "type": "string"
20060	//     },
20061	//     "project": {
20062	//       "description": "Project ID for this request.",
20063	//       "location": "path",
20064	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20065	//       "required": true,
20066	//       "type": "string"
20067	//     }
20068	//   },
20069	//   "path": "{project}/aggregated/autoscalers",
20070	//   "response": {
20071	//     "$ref": "AutoscalerAggregatedList"
20072	//   },
20073	//   "scopes": [
20074	//     "https://www.googleapis.com/auth/cloud-platform",
20075	//     "https://www.googleapis.com/auth/compute",
20076	//     "https://www.googleapis.com/auth/compute.readonly"
20077	//   ]
20078	// }
20079
20080}
20081
20082// Pages invokes f for each page of results.
20083// A non-nil error returned from f will halt the iteration.
20084// The provided context supersedes any context provided to the Context method.
20085func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error {
20086	c.ctx_ = ctx
20087	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20088	for {
20089		x, err := c.Do()
20090		if err != nil {
20091			return err
20092		}
20093		if err := f(x); err != nil {
20094			return err
20095		}
20096		if x.NextPageToken == "" {
20097			return nil
20098		}
20099		c.PageToken(x.NextPageToken)
20100	}
20101}
20102
20103// method id "compute.autoscalers.delete":
20104
20105type AutoscalersDeleteCall struct {
20106	s          *Service
20107	project    string
20108	zone       string
20109	autoscaler string
20110	urlParams_ gensupport.URLParams
20111	ctx_       context.Context
20112	header_    http.Header
20113}
20114
20115// Delete: Deletes the specified autoscaler.
20116func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall {
20117	c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20118	c.project = project
20119	c.zone = zone
20120	c.autoscaler = autoscaler
20121	return c
20122}
20123
20124// RequestId sets the optional parameter "requestId": An optional
20125// request ID to identify requests. Specify a unique request ID so that
20126// if you must retry your request, the server will know to ignore the
20127// request if it has already been completed.
20128//
20129// For example, consider a situation where you make an initial request
20130// and the request times out. If you make the request again with the
20131// same request ID, the server can check if original operation with the
20132// same request ID was received, and if so, will ignore the second
20133// request. This prevents clients from accidentally creating duplicate
20134// commitments.
20135//
20136// The request ID must be a valid UUID with the exception that zero UUID
20137// is not supported (00000000-0000-0000-0000-000000000000).
20138func (c *AutoscalersDeleteCall) RequestId(requestId string) *AutoscalersDeleteCall {
20139	c.urlParams_.Set("requestId", requestId)
20140	return c
20141}
20142
20143// Fields allows partial responses to be retrieved. See
20144// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20145// for more information.
20146func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall {
20147	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20148	return c
20149}
20150
20151// Context sets the context to be used in this call's Do method. Any
20152// pending HTTP request will be aborted if the provided context is
20153// canceled.
20154func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall {
20155	c.ctx_ = ctx
20156	return c
20157}
20158
20159// Header returns an http.Header that can be modified by the caller to
20160// add HTTP headers to the request.
20161func (c *AutoscalersDeleteCall) Header() http.Header {
20162	if c.header_ == nil {
20163		c.header_ = make(http.Header)
20164	}
20165	return c.header_
20166}
20167
20168func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) {
20169	reqHeaders := make(http.Header)
20170	for k, v := range c.header_ {
20171		reqHeaders[k] = v
20172	}
20173	reqHeaders.Set("User-Agent", c.s.userAgent())
20174	var body io.Reader = nil
20175	c.urlParams_.Set("alt", alt)
20176	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}")
20177	urls += "?" + c.urlParams_.Encode()
20178	req, _ := http.NewRequest("DELETE", urls, body)
20179	req.Header = reqHeaders
20180	googleapi.Expand(req.URL, map[string]string{
20181		"project":    c.project,
20182		"zone":       c.zone,
20183		"autoscaler": c.autoscaler,
20184	})
20185	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20186}
20187
20188// Do executes the "compute.autoscalers.delete" call.
20189// Exactly one of *Operation or error will be non-nil. Any non-2xx
20190// status code is an error. Response headers are in either
20191// *Operation.ServerResponse.Header or (if a response was returned at
20192// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20193// to check whether the returned error was because
20194// http.StatusNotModified was returned.
20195func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20196	gensupport.SetOptions(c.urlParams_, opts...)
20197	res, err := c.doRequest("json")
20198	if res != nil && res.StatusCode == http.StatusNotModified {
20199		if res.Body != nil {
20200			res.Body.Close()
20201		}
20202		return nil, &googleapi.Error{
20203			Code:   res.StatusCode,
20204			Header: res.Header,
20205		}
20206	}
20207	if err != nil {
20208		return nil, err
20209	}
20210	defer googleapi.CloseBody(res)
20211	if err := googleapi.CheckResponse(res); err != nil {
20212		return nil, err
20213	}
20214	ret := &Operation{
20215		ServerResponse: googleapi.ServerResponse{
20216			Header:         res.Header,
20217			HTTPStatusCode: res.StatusCode,
20218		},
20219	}
20220	target := &ret
20221	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
20222		return nil, err
20223	}
20224	return ret, nil
20225	// {
20226	//   "description": "Deletes the specified autoscaler.",
20227	//   "httpMethod": "DELETE",
20228	//   "id": "compute.autoscalers.delete",
20229	//   "parameterOrder": [
20230	//     "project",
20231	//     "zone",
20232	//     "autoscaler"
20233	//   ],
20234	//   "parameters": {
20235	//     "autoscaler": {
20236	//       "description": "Name of the autoscaler to delete.",
20237	//       "location": "path",
20238	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
20239	//       "required": true,
20240	//       "type": "string"
20241	//     },
20242	//     "project": {
20243	//       "description": "Project ID for this request.",
20244	//       "location": "path",
20245	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20246	//       "required": true,
20247	//       "type": "string"
20248	//     },
20249	//     "requestId": {
20250	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
20251	//       "location": "query",
20252	//       "type": "string"
20253	//     },
20254	//     "zone": {
20255	//       "description": "Name of the zone for this request.",
20256	//       "location": "path",
20257	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
20258	//       "required": true,
20259	//       "type": "string"
20260	//     }
20261	//   },
20262	//   "path": "{project}/zones/{zone}/autoscalers/{autoscaler}",
20263	//   "response": {
20264	//     "$ref": "Operation"
20265	//   },
20266	//   "scopes": [
20267	//     "https://www.googleapis.com/auth/cloud-platform",
20268	//     "https://www.googleapis.com/auth/compute"
20269	//   ]
20270	// }
20271
20272}
20273
20274// method id "compute.autoscalers.get":
20275
20276type AutoscalersGetCall struct {
20277	s            *Service
20278	project      string
20279	zone         string
20280	autoscaler   string
20281	urlParams_   gensupport.URLParams
20282	ifNoneMatch_ string
20283	ctx_         context.Context
20284	header_      http.Header
20285}
20286
20287// Get: Returns the specified autoscaler resource. Get a list of
20288// available autoscalers by making a list() request.
20289func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall {
20290	c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20291	c.project = project
20292	c.zone = zone
20293	c.autoscaler = autoscaler
20294	return c
20295}
20296
20297// Fields allows partial responses to be retrieved. See
20298// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20299// for more information.
20300func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall {
20301	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20302	return c
20303}
20304
20305// IfNoneMatch sets the optional parameter which makes the operation
20306// fail if the object's ETag matches the given value. This is useful for
20307// getting updates only after the object has changed since the last
20308// request. Use googleapi.IsNotModified to check whether the response
20309// error from Do is the result of In-None-Match.
20310func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall {
20311	c.ifNoneMatch_ = entityTag
20312	return c
20313}
20314
20315// Context sets the context to be used in this call's Do method. Any
20316// pending HTTP request will be aborted if the provided context is
20317// canceled.
20318func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall {
20319	c.ctx_ = ctx
20320	return c
20321}
20322
20323// Header returns an http.Header that can be modified by the caller to
20324// add HTTP headers to the request.
20325func (c *AutoscalersGetCall) Header() http.Header {
20326	if c.header_ == nil {
20327		c.header_ = make(http.Header)
20328	}
20329	return c.header_
20330}
20331
20332func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) {
20333	reqHeaders := make(http.Header)
20334	for k, v := range c.header_ {
20335		reqHeaders[k] = v
20336	}
20337	reqHeaders.Set("User-Agent", c.s.userAgent())
20338	if c.ifNoneMatch_ != "" {
20339		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20340	}
20341	var body io.Reader = nil
20342	c.urlParams_.Set("alt", alt)
20343	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}")
20344	urls += "?" + c.urlParams_.Encode()
20345	req, _ := http.NewRequest("GET", urls, body)
20346	req.Header = reqHeaders
20347	googleapi.Expand(req.URL, map[string]string{
20348		"project":    c.project,
20349		"zone":       c.zone,
20350		"autoscaler": c.autoscaler,
20351	})
20352	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20353}
20354
20355// Do executes the "compute.autoscalers.get" call.
20356// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx
20357// status code is an error. Response headers are in either
20358// *Autoscaler.ServerResponse.Header or (if a response was returned at
20359// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20360// to check whether the returned error was because
20361// http.StatusNotModified was returned.
20362func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) {
20363	gensupport.SetOptions(c.urlParams_, opts...)
20364	res, err := c.doRequest("json")
20365	if res != nil && res.StatusCode == http.StatusNotModified {
20366		if res.Body != nil {
20367			res.Body.Close()
20368		}
20369		return nil, &googleapi.Error{
20370			Code:   res.StatusCode,
20371			Header: res.Header,
20372		}
20373	}
20374	if err != nil {
20375		return nil, err
20376	}
20377	defer googleapi.CloseBody(res)
20378	if err := googleapi.CheckResponse(res); err != nil {
20379		return nil, err
20380	}
20381	ret := &Autoscaler{
20382		ServerResponse: googleapi.ServerResponse{
20383			Header:         res.Header,
20384			HTTPStatusCode: res.StatusCode,
20385		},
20386	}
20387	target := &ret
20388	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
20389		return nil, err
20390	}
20391	return ret, nil
20392	// {
20393	//   "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.",
20394	//   "httpMethod": "GET",
20395	//   "id": "compute.autoscalers.get",
20396	//   "parameterOrder": [
20397	//     "project",
20398	//     "zone",
20399	//     "autoscaler"
20400	//   ],
20401	//   "parameters": {
20402	//     "autoscaler": {
20403	//       "description": "Name of the autoscaler to return.",
20404	//       "location": "path",
20405	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
20406	//       "required": true,
20407	//       "type": "string"
20408	//     },
20409	//     "project": {
20410	//       "description": "Project ID for this request.",
20411	//       "location": "path",
20412	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20413	//       "required": true,
20414	//       "type": "string"
20415	//     },
20416	//     "zone": {
20417	//       "description": "Name of the zone for this request.",
20418	//       "location": "path",
20419	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
20420	//       "required": true,
20421	//       "type": "string"
20422	//     }
20423	//   },
20424	//   "path": "{project}/zones/{zone}/autoscalers/{autoscaler}",
20425	//   "response": {
20426	//     "$ref": "Autoscaler"
20427	//   },
20428	//   "scopes": [
20429	//     "https://www.googleapis.com/auth/cloud-platform",
20430	//     "https://www.googleapis.com/auth/compute",
20431	//     "https://www.googleapis.com/auth/compute.readonly"
20432	//   ]
20433	// }
20434
20435}
20436
20437// method id "compute.autoscalers.insert":
20438
20439type AutoscalersInsertCall struct {
20440	s          *Service
20441	project    string
20442	zone       string
20443	autoscaler *Autoscaler
20444	urlParams_ gensupport.URLParams
20445	ctx_       context.Context
20446	header_    http.Header
20447}
20448
20449// Insert: Creates an autoscaler in the specified project using the data
20450// included in the request.
20451func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall {
20452	c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20453	c.project = project
20454	c.zone = zone
20455	c.autoscaler = autoscaler
20456	return c
20457}
20458
20459// RequestId sets the optional parameter "requestId": An optional
20460// request ID to identify requests. Specify a unique request ID so that
20461// if you must retry your request, the server will know to ignore the
20462// request if it has already been completed.
20463//
20464// For example, consider a situation where you make an initial request
20465// and the request times out. If you make the request again with the
20466// same request ID, the server can check if original operation with the
20467// same request ID was received, and if so, will ignore the second
20468// request. This prevents clients from accidentally creating duplicate
20469// commitments.
20470//
20471// The request ID must be a valid UUID with the exception that zero UUID
20472// is not supported (00000000-0000-0000-0000-000000000000).
20473func (c *AutoscalersInsertCall) RequestId(requestId string) *AutoscalersInsertCall {
20474	c.urlParams_.Set("requestId", requestId)
20475	return c
20476}
20477
20478// Fields allows partial responses to be retrieved. See
20479// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20480// for more information.
20481func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall {
20482	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20483	return c
20484}
20485
20486// Context sets the context to be used in this call's Do method. Any
20487// pending HTTP request will be aborted if the provided context is
20488// canceled.
20489func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall {
20490	c.ctx_ = ctx
20491	return c
20492}
20493
20494// Header returns an http.Header that can be modified by the caller to
20495// add HTTP headers to the request.
20496func (c *AutoscalersInsertCall) Header() http.Header {
20497	if c.header_ == nil {
20498		c.header_ = make(http.Header)
20499	}
20500	return c.header_
20501}
20502
20503func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) {
20504	reqHeaders := make(http.Header)
20505	for k, v := range c.header_ {
20506		reqHeaders[k] = v
20507	}
20508	reqHeaders.Set("User-Agent", c.s.userAgent())
20509	var body io.Reader = nil
20510	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
20511	if err != nil {
20512		return nil, err
20513	}
20514	reqHeaders.Set("Content-Type", "application/json")
20515	c.urlParams_.Set("alt", alt)
20516	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
20517	urls += "?" + c.urlParams_.Encode()
20518	req, _ := http.NewRequest("POST", urls, body)
20519	req.Header = reqHeaders
20520	googleapi.Expand(req.URL, map[string]string{
20521		"project": c.project,
20522		"zone":    c.zone,
20523	})
20524	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20525}
20526
20527// Do executes the "compute.autoscalers.insert" call.
20528// Exactly one of *Operation or error will be non-nil. Any non-2xx
20529// status code is an error. Response headers are in either
20530// *Operation.ServerResponse.Header or (if a response was returned at
20531// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20532// to check whether the returned error was because
20533// http.StatusNotModified was returned.
20534func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20535	gensupport.SetOptions(c.urlParams_, opts...)
20536	res, err := c.doRequest("json")
20537	if res != nil && res.StatusCode == http.StatusNotModified {
20538		if res.Body != nil {
20539			res.Body.Close()
20540		}
20541		return nil, &googleapi.Error{
20542			Code:   res.StatusCode,
20543			Header: res.Header,
20544		}
20545	}
20546	if err != nil {
20547		return nil, err
20548	}
20549	defer googleapi.CloseBody(res)
20550	if err := googleapi.CheckResponse(res); err != nil {
20551		return nil, err
20552	}
20553	ret := &Operation{
20554		ServerResponse: googleapi.ServerResponse{
20555			Header:         res.Header,
20556			HTTPStatusCode: res.StatusCode,
20557		},
20558	}
20559	target := &ret
20560	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
20561		return nil, err
20562	}
20563	return ret, nil
20564	// {
20565	//   "description": "Creates an autoscaler in the specified project using the data included in the request.",
20566	//   "httpMethod": "POST",
20567	//   "id": "compute.autoscalers.insert",
20568	//   "parameterOrder": [
20569	//     "project",
20570	//     "zone"
20571	//   ],
20572	//   "parameters": {
20573	//     "project": {
20574	//       "description": "Project ID for this request.",
20575	//       "location": "path",
20576	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20577	//       "required": true,
20578	//       "type": "string"
20579	//     },
20580	//     "requestId": {
20581	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
20582	//       "location": "query",
20583	//       "type": "string"
20584	//     },
20585	//     "zone": {
20586	//       "description": "Name of the zone for this request.",
20587	//       "location": "path",
20588	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
20589	//       "required": true,
20590	//       "type": "string"
20591	//     }
20592	//   },
20593	//   "path": "{project}/zones/{zone}/autoscalers",
20594	//   "request": {
20595	//     "$ref": "Autoscaler"
20596	//   },
20597	//   "response": {
20598	//     "$ref": "Operation"
20599	//   },
20600	//   "scopes": [
20601	//     "https://www.googleapis.com/auth/cloud-platform",
20602	//     "https://www.googleapis.com/auth/compute"
20603	//   ]
20604	// }
20605
20606}
20607
20608// method id "compute.autoscalers.list":
20609
20610type AutoscalersListCall struct {
20611	s            *Service
20612	project      string
20613	zone         string
20614	urlParams_   gensupport.URLParams
20615	ifNoneMatch_ string
20616	ctx_         context.Context
20617	header_      http.Header
20618}
20619
20620// List: Retrieves a list of autoscalers contained within the specified
20621// zone.
20622func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall {
20623	c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20624	c.project = project
20625	c.zone = zone
20626	return c
20627}
20628
20629// Filter sets the optional parameter "filter": Sets a filter
20630// {expression} for filtering listed resources. Your {expression} must
20631// be in the format: field_name comparison_string literal_string.
20632//
20633// The field_name is the name of the field you want to compare. Only
20634// atomic field types are supported (string, number, boolean). The
20635// comparison_string must be either eq (equals) or ne (not equals). The
20636// literal_string is the string value to filter to. The literal value
20637// must be valid for the type of field you are filtering by (string,
20638// number, boolean). For string fields, the literal value is interpreted
20639// as a regular expression using RE2 syntax. The literal value must
20640// match the entire field.
20641//
20642// For example, to filter for instances that do not have a name of
20643// example-instance, you would use name ne example-instance.
20644//
20645// You can filter on nested fields. For example, you could filter on
20646// instances that have set the scheduling.automaticRestart field to
20647// true. Use filtering on nested fields to take advantage of labels to
20648// organize and search for results based on label values.
20649//
20650// To filter on multiple expressions, provide each separate expression
20651// within parentheses. For example, (scheduling.automaticRestart eq
20652// true) (zone eq us-central1-f). Multiple expressions are treated as
20653// AND expressions, meaning that resources must match all expressions to
20654// pass the filters.
20655func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall {
20656	c.urlParams_.Set("filter", filter)
20657	return c
20658}
20659
20660// MaxResults sets the optional parameter "maxResults": The maximum
20661// number of results per page that should be returned. If the number of
20662// available results is larger than maxResults, Compute Engine returns a
20663// nextPageToken that can be used to get the next page of results in
20664// subsequent list requests. Acceptable values are 0 to 500, inclusive.
20665// (Default: 500)
20666func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall {
20667	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20668	return c
20669}
20670
20671// OrderBy sets the optional parameter "orderBy": Sorts list results by
20672// a certain order. By default, results are returned in alphanumerical
20673// order based on the resource name.
20674//
20675// You can also sort results in descending order based on the creation
20676// timestamp using orderBy="creationTimestamp desc". This sorts results
20677// based on the creationTimestamp field in reverse chronological order
20678// (newest result first). Use this to sort resources like operations so
20679// that the newest operation is returned first.
20680//
20681// Currently, only sorting by name or creationTimestamp desc is
20682// supported.
20683func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall {
20684	c.urlParams_.Set("orderBy", orderBy)
20685	return c
20686}
20687
20688// PageToken sets the optional parameter "pageToken": Specifies a page
20689// token to use. Set pageToken to the nextPageToken returned by a
20690// previous list request to get the next page of results.
20691func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall {
20692	c.urlParams_.Set("pageToken", pageToken)
20693	return c
20694}
20695
20696// Fields allows partial responses to be retrieved. See
20697// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20698// for more information.
20699func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall {
20700	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20701	return c
20702}
20703
20704// IfNoneMatch sets the optional parameter which makes the operation
20705// fail if the object's ETag matches the given value. This is useful for
20706// getting updates only after the object has changed since the last
20707// request. Use googleapi.IsNotModified to check whether the response
20708// error from Do is the result of In-None-Match.
20709func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall {
20710	c.ifNoneMatch_ = entityTag
20711	return c
20712}
20713
20714// Context sets the context to be used in this call's Do method. Any
20715// pending HTTP request will be aborted if the provided context is
20716// canceled.
20717func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall {
20718	c.ctx_ = ctx
20719	return c
20720}
20721
20722// Header returns an http.Header that can be modified by the caller to
20723// add HTTP headers to the request.
20724func (c *AutoscalersListCall) Header() http.Header {
20725	if c.header_ == nil {
20726		c.header_ = make(http.Header)
20727	}
20728	return c.header_
20729}
20730
20731func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) {
20732	reqHeaders := make(http.Header)
20733	for k, v := range c.header_ {
20734		reqHeaders[k] = v
20735	}
20736	reqHeaders.Set("User-Agent", c.s.userAgent())
20737	if c.ifNoneMatch_ != "" {
20738		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
20739	}
20740	var body io.Reader = nil
20741	c.urlParams_.Set("alt", alt)
20742	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
20743	urls += "?" + c.urlParams_.Encode()
20744	req, _ := http.NewRequest("GET", urls, body)
20745	req.Header = reqHeaders
20746	googleapi.Expand(req.URL, map[string]string{
20747		"project": c.project,
20748		"zone":    c.zone,
20749	})
20750	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20751}
20752
20753// Do executes the "compute.autoscalers.list" call.
20754// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx
20755// status code is an error. Response headers are in either
20756// *AutoscalerList.ServerResponse.Header or (if a response was returned
20757// at all) in error.(*googleapi.Error).Header. Use
20758// googleapi.IsNotModified to check whether the returned error was
20759// because http.StatusNotModified was returned.
20760func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) {
20761	gensupport.SetOptions(c.urlParams_, opts...)
20762	res, err := c.doRequest("json")
20763	if res != nil && res.StatusCode == http.StatusNotModified {
20764		if res.Body != nil {
20765			res.Body.Close()
20766		}
20767		return nil, &googleapi.Error{
20768			Code:   res.StatusCode,
20769			Header: res.Header,
20770		}
20771	}
20772	if err != nil {
20773		return nil, err
20774	}
20775	defer googleapi.CloseBody(res)
20776	if err := googleapi.CheckResponse(res); err != nil {
20777		return nil, err
20778	}
20779	ret := &AutoscalerList{
20780		ServerResponse: googleapi.ServerResponse{
20781			Header:         res.Header,
20782			HTTPStatusCode: res.StatusCode,
20783		},
20784	}
20785	target := &ret
20786	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
20787		return nil, err
20788	}
20789	return ret, nil
20790	// {
20791	//   "description": "Retrieves a list of autoscalers contained within the specified zone.",
20792	//   "httpMethod": "GET",
20793	//   "id": "compute.autoscalers.list",
20794	//   "parameterOrder": [
20795	//     "project",
20796	//     "zone"
20797	//   ],
20798	//   "parameters": {
20799	//     "filter": {
20800	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
20801	//       "location": "query",
20802	//       "type": "string"
20803	//     },
20804	//     "maxResults": {
20805	//       "default": "500",
20806	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
20807	//       "format": "uint32",
20808	//       "location": "query",
20809	//       "minimum": "0",
20810	//       "type": "integer"
20811	//     },
20812	//     "orderBy": {
20813	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
20814	//       "location": "query",
20815	//       "type": "string"
20816	//     },
20817	//     "pageToken": {
20818	//       "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.",
20819	//       "location": "query",
20820	//       "type": "string"
20821	//     },
20822	//     "project": {
20823	//       "description": "Project ID for this request.",
20824	//       "location": "path",
20825	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20826	//       "required": true,
20827	//       "type": "string"
20828	//     },
20829	//     "zone": {
20830	//       "description": "Name of the zone for this request.",
20831	//       "location": "path",
20832	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
20833	//       "required": true,
20834	//       "type": "string"
20835	//     }
20836	//   },
20837	//   "path": "{project}/zones/{zone}/autoscalers",
20838	//   "response": {
20839	//     "$ref": "AutoscalerList"
20840	//   },
20841	//   "scopes": [
20842	//     "https://www.googleapis.com/auth/cloud-platform",
20843	//     "https://www.googleapis.com/auth/compute",
20844	//     "https://www.googleapis.com/auth/compute.readonly"
20845	//   ]
20846	// }
20847
20848}
20849
20850// Pages invokes f for each page of results.
20851// A non-nil error returned from f will halt the iteration.
20852// The provided context supersedes any context provided to the Context method.
20853func (c *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error {
20854	c.ctx_ = ctx
20855	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20856	for {
20857		x, err := c.Do()
20858		if err != nil {
20859			return err
20860		}
20861		if err := f(x); err != nil {
20862			return err
20863		}
20864		if x.NextPageToken == "" {
20865			return nil
20866		}
20867		c.PageToken(x.NextPageToken)
20868	}
20869}
20870
20871// method id "compute.autoscalers.patch":
20872
20873type AutoscalersPatchCall struct {
20874	s          *Service
20875	project    string
20876	zone       string
20877	autoscaler *Autoscaler
20878	urlParams_ gensupport.URLParams
20879	ctx_       context.Context
20880	header_    http.Header
20881}
20882
20883// Patch: Updates an autoscaler in the specified project using the data
20884// included in the request. This method supports PATCH semantics and
20885// uses the JSON merge patch format and processing rules.
20886func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall {
20887	c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20888	c.project = project
20889	c.zone = zone
20890	c.autoscaler = autoscaler
20891	return c
20892}
20893
20894// Autoscaler sets the optional parameter "autoscaler": Name of the
20895// autoscaler to patch.
20896func (c *AutoscalersPatchCall) Autoscaler(autoscaler string) *AutoscalersPatchCall {
20897	c.urlParams_.Set("autoscaler", autoscaler)
20898	return c
20899}
20900
20901// RequestId sets the optional parameter "requestId": An optional
20902// request ID to identify requests. Specify a unique request ID so that
20903// if you must retry your request, the server will know to ignore the
20904// request if it has already been completed.
20905//
20906// For example, consider a situation where you make an initial request
20907// and the request times out. If you make the request again with the
20908// same request ID, the server can check if original operation with the
20909// same request ID was received, and if so, will ignore the second
20910// request. This prevents clients from accidentally creating duplicate
20911// commitments.
20912//
20913// The request ID must be a valid UUID with the exception that zero UUID
20914// is not supported (00000000-0000-0000-0000-000000000000).
20915func (c *AutoscalersPatchCall) RequestId(requestId string) *AutoscalersPatchCall {
20916	c.urlParams_.Set("requestId", requestId)
20917	return c
20918}
20919
20920// Fields allows partial responses to be retrieved. See
20921// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20922// for more information.
20923func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall {
20924	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20925	return c
20926}
20927
20928// Context sets the context to be used in this call's Do method. Any
20929// pending HTTP request will be aborted if the provided context is
20930// canceled.
20931func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall {
20932	c.ctx_ = ctx
20933	return c
20934}
20935
20936// Header returns an http.Header that can be modified by the caller to
20937// add HTTP headers to the request.
20938func (c *AutoscalersPatchCall) Header() http.Header {
20939	if c.header_ == nil {
20940		c.header_ = make(http.Header)
20941	}
20942	return c.header_
20943}
20944
20945func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) {
20946	reqHeaders := make(http.Header)
20947	for k, v := range c.header_ {
20948		reqHeaders[k] = v
20949	}
20950	reqHeaders.Set("User-Agent", c.s.userAgent())
20951	var body io.Reader = nil
20952	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
20953	if err != nil {
20954		return nil, err
20955	}
20956	reqHeaders.Set("Content-Type", "application/json")
20957	c.urlParams_.Set("alt", alt)
20958	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
20959	urls += "?" + c.urlParams_.Encode()
20960	req, _ := http.NewRequest("PATCH", urls, body)
20961	req.Header = reqHeaders
20962	googleapi.Expand(req.URL, map[string]string{
20963		"project": c.project,
20964		"zone":    c.zone,
20965	})
20966	return gensupport.SendRequest(c.ctx_, c.s.client, req)
20967}
20968
20969// Do executes the "compute.autoscalers.patch" call.
20970// Exactly one of *Operation or error will be non-nil. Any non-2xx
20971// status code is an error. Response headers are in either
20972// *Operation.ServerResponse.Header or (if a response was returned at
20973// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20974// to check whether the returned error was because
20975// http.StatusNotModified was returned.
20976func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20977	gensupport.SetOptions(c.urlParams_, opts...)
20978	res, err := c.doRequest("json")
20979	if res != nil && res.StatusCode == http.StatusNotModified {
20980		if res.Body != nil {
20981			res.Body.Close()
20982		}
20983		return nil, &googleapi.Error{
20984			Code:   res.StatusCode,
20985			Header: res.Header,
20986		}
20987	}
20988	if err != nil {
20989		return nil, err
20990	}
20991	defer googleapi.CloseBody(res)
20992	if err := googleapi.CheckResponse(res); err != nil {
20993		return nil, err
20994	}
20995	ret := &Operation{
20996		ServerResponse: googleapi.ServerResponse{
20997			Header:         res.Header,
20998			HTTPStatusCode: res.StatusCode,
20999		},
21000	}
21001	target := &ret
21002	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
21003		return nil, err
21004	}
21005	return ret, nil
21006	// {
21007	//   "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
21008	//   "httpMethod": "PATCH",
21009	//   "id": "compute.autoscalers.patch",
21010	//   "parameterOrder": [
21011	//     "project",
21012	//     "zone"
21013	//   ],
21014	//   "parameters": {
21015	//     "autoscaler": {
21016	//       "description": "Name of the autoscaler to patch.",
21017	//       "location": "query",
21018	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21019	//       "type": "string"
21020	//     },
21021	//     "project": {
21022	//       "description": "Project ID for this request.",
21023	//       "location": "path",
21024	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21025	//       "required": true,
21026	//       "type": "string"
21027	//     },
21028	//     "requestId": {
21029	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
21030	//       "location": "query",
21031	//       "type": "string"
21032	//     },
21033	//     "zone": {
21034	//       "description": "Name of the zone for this request.",
21035	//       "location": "path",
21036	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21037	//       "required": true,
21038	//       "type": "string"
21039	//     }
21040	//   },
21041	//   "path": "{project}/zones/{zone}/autoscalers",
21042	//   "request": {
21043	//     "$ref": "Autoscaler"
21044	//   },
21045	//   "response": {
21046	//     "$ref": "Operation"
21047	//   },
21048	//   "scopes": [
21049	//     "https://www.googleapis.com/auth/cloud-platform",
21050	//     "https://www.googleapis.com/auth/compute"
21051	//   ]
21052	// }
21053
21054}
21055
21056// method id "compute.autoscalers.testIamPermissions":
21057
21058type AutoscalersTestIamPermissionsCall struct {
21059	s                      *Service
21060	project                string
21061	zone                   string
21062	resource               string
21063	testpermissionsrequest *TestPermissionsRequest
21064	urlParams_             gensupport.URLParams
21065	ctx_                   context.Context
21066	header_                http.Header
21067}
21068
21069// TestIamPermissions: Returns permissions that a caller has on the
21070// specified resource.
21071func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall {
21072	c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21073	c.project = project
21074	c.zone = zone
21075	c.resource = resource
21076	c.testpermissionsrequest = testpermissionsrequest
21077	return c
21078}
21079
21080// Fields allows partial responses to be retrieved. See
21081// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21082// for more information.
21083func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall {
21084	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21085	return c
21086}
21087
21088// Context sets the context to be used in this call's Do method. Any
21089// pending HTTP request will be aborted if the provided context is
21090// canceled.
21091func (c *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall {
21092	c.ctx_ = ctx
21093	return c
21094}
21095
21096// Header returns an http.Header that can be modified by the caller to
21097// add HTTP headers to the request.
21098func (c *AutoscalersTestIamPermissionsCall) Header() http.Header {
21099	if c.header_ == nil {
21100		c.header_ = make(http.Header)
21101	}
21102	return c.header_
21103}
21104
21105func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
21106	reqHeaders := make(http.Header)
21107	for k, v := range c.header_ {
21108		reqHeaders[k] = v
21109	}
21110	reqHeaders.Set("User-Agent", c.s.userAgent())
21111	var body io.Reader = nil
21112	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
21113	if err != nil {
21114		return nil, err
21115	}
21116	reqHeaders.Set("Content-Type", "application/json")
21117	c.urlParams_.Set("alt", alt)
21118	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions")
21119	urls += "?" + c.urlParams_.Encode()
21120	req, _ := http.NewRequest("POST", urls, body)
21121	req.Header = reqHeaders
21122	googleapi.Expand(req.URL, map[string]string{
21123		"project":  c.project,
21124		"zone":     c.zone,
21125		"resource": c.resource,
21126	})
21127	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21128}
21129
21130// Do executes the "compute.autoscalers.testIamPermissions" call.
21131// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
21132// non-2xx status code is an error. Response headers are in either
21133// *TestPermissionsResponse.ServerResponse.Header or (if a response was
21134// returned at all) in error.(*googleapi.Error).Header. Use
21135// googleapi.IsNotModified to check whether the returned error was
21136// because http.StatusNotModified was returned.
21137func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
21138	gensupport.SetOptions(c.urlParams_, opts...)
21139	res, err := c.doRequest("json")
21140	if res != nil && res.StatusCode == http.StatusNotModified {
21141		if res.Body != nil {
21142			res.Body.Close()
21143		}
21144		return nil, &googleapi.Error{
21145			Code:   res.StatusCode,
21146			Header: res.Header,
21147		}
21148	}
21149	if err != nil {
21150		return nil, err
21151	}
21152	defer googleapi.CloseBody(res)
21153	if err := googleapi.CheckResponse(res); err != nil {
21154		return nil, err
21155	}
21156	ret := &TestPermissionsResponse{
21157		ServerResponse: googleapi.ServerResponse{
21158			Header:         res.Header,
21159			HTTPStatusCode: res.StatusCode,
21160		},
21161	}
21162	target := &ret
21163	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
21164		return nil, err
21165	}
21166	return ret, nil
21167	// {
21168	//   "description": "Returns permissions that a caller has on the specified resource.",
21169	//   "httpMethod": "POST",
21170	//   "id": "compute.autoscalers.testIamPermissions",
21171	//   "parameterOrder": [
21172	//     "project",
21173	//     "zone",
21174	//     "resource"
21175	//   ],
21176	//   "parameters": {
21177	//     "project": {
21178	//       "description": "Project ID for this request.",
21179	//       "location": "path",
21180	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21181	//       "required": true,
21182	//       "type": "string"
21183	//     },
21184	//     "resource": {
21185	//       "description": "Name of the resource for this request.",
21186	//       "location": "path",
21187	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21188	//       "required": true,
21189	//       "type": "string"
21190	//     },
21191	//     "zone": {
21192	//       "description": "The name of the zone for this request.",
21193	//       "location": "path",
21194	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21195	//       "required": true,
21196	//       "type": "string"
21197	//     }
21198	//   },
21199	//   "path": "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions",
21200	//   "request": {
21201	//     "$ref": "TestPermissionsRequest"
21202	//   },
21203	//   "response": {
21204	//     "$ref": "TestPermissionsResponse"
21205	//   },
21206	//   "scopes": [
21207	//     "https://www.googleapis.com/auth/cloud-platform",
21208	//     "https://www.googleapis.com/auth/compute",
21209	//     "https://www.googleapis.com/auth/compute.readonly"
21210	//   ]
21211	// }
21212
21213}
21214
21215// method id "compute.autoscalers.update":
21216
21217type AutoscalersUpdateCall struct {
21218	s          *Service
21219	project    string
21220	zone       string
21221	autoscaler *Autoscaler
21222	urlParams_ gensupport.URLParams
21223	ctx_       context.Context
21224	header_    http.Header
21225}
21226
21227// Update: Updates an autoscaler in the specified project using the data
21228// included in the request.
21229func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall {
21230	c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21231	c.project = project
21232	c.zone = zone
21233	c.autoscaler = autoscaler
21234	return c
21235}
21236
21237// Autoscaler sets the optional parameter "autoscaler": Name of the
21238// autoscaler to update.
21239func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall {
21240	c.urlParams_.Set("autoscaler", autoscaler)
21241	return c
21242}
21243
21244// RequestId sets the optional parameter "requestId": An optional
21245// request ID to identify requests. Specify a unique request ID so that
21246// if you must retry your request, the server will know to ignore the
21247// request if it has already been completed.
21248//
21249// For example, consider a situation where you make an initial request
21250// and the request times out. If you make the request again with the
21251// same request ID, the server can check if original operation with the
21252// same request ID was received, and if so, will ignore the second
21253// request. This prevents clients from accidentally creating duplicate
21254// commitments.
21255//
21256// The request ID must be a valid UUID with the exception that zero UUID
21257// is not supported (00000000-0000-0000-0000-000000000000).
21258func (c *AutoscalersUpdateCall) RequestId(requestId string) *AutoscalersUpdateCall {
21259	c.urlParams_.Set("requestId", requestId)
21260	return c
21261}
21262
21263// Fields allows partial responses to be retrieved. See
21264// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21265// for more information.
21266func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall {
21267	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21268	return c
21269}
21270
21271// Context sets the context to be used in this call's Do method. Any
21272// pending HTTP request will be aborted if the provided context is
21273// canceled.
21274func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall {
21275	c.ctx_ = ctx
21276	return c
21277}
21278
21279// Header returns an http.Header that can be modified by the caller to
21280// add HTTP headers to the request.
21281func (c *AutoscalersUpdateCall) Header() http.Header {
21282	if c.header_ == nil {
21283		c.header_ = make(http.Header)
21284	}
21285	return c.header_
21286}
21287
21288func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) {
21289	reqHeaders := make(http.Header)
21290	for k, v := range c.header_ {
21291		reqHeaders[k] = v
21292	}
21293	reqHeaders.Set("User-Agent", c.s.userAgent())
21294	var body io.Reader = nil
21295	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
21296	if err != nil {
21297		return nil, err
21298	}
21299	reqHeaders.Set("Content-Type", "application/json")
21300	c.urlParams_.Set("alt", alt)
21301	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
21302	urls += "?" + c.urlParams_.Encode()
21303	req, _ := http.NewRequest("PUT", urls, body)
21304	req.Header = reqHeaders
21305	googleapi.Expand(req.URL, map[string]string{
21306		"project": c.project,
21307		"zone":    c.zone,
21308	})
21309	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21310}
21311
21312// Do executes the "compute.autoscalers.update" call.
21313// Exactly one of *Operation or error will be non-nil. Any non-2xx
21314// status code is an error. Response headers are in either
21315// *Operation.ServerResponse.Header or (if a response was returned at
21316// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21317// to check whether the returned error was because
21318// http.StatusNotModified was returned.
21319func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21320	gensupport.SetOptions(c.urlParams_, opts...)
21321	res, err := c.doRequest("json")
21322	if res != nil && res.StatusCode == http.StatusNotModified {
21323		if res.Body != nil {
21324			res.Body.Close()
21325		}
21326		return nil, &googleapi.Error{
21327			Code:   res.StatusCode,
21328			Header: res.Header,
21329		}
21330	}
21331	if err != nil {
21332		return nil, err
21333	}
21334	defer googleapi.CloseBody(res)
21335	if err := googleapi.CheckResponse(res); err != nil {
21336		return nil, err
21337	}
21338	ret := &Operation{
21339		ServerResponse: googleapi.ServerResponse{
21340			Header:         res.Header,
21341			HTTPStatusCode: res.StatusCode,
21342		},
21343	}
21344	target := &ret
21345	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
21346		return nil, err
21347	}
21348	return ret, nil
21349	// {
21350	//   "description": "Updates an autoscaler in the specified project using the data included in the request.",
21351	//   "httpMethod": "PUT",
21352	//   "id": "compute.autoscalers.update",
21353	//   "parameterOrder": [
21354	//     "project",
21355	//     "zone"
21356	//   ],
21357	//   "parameters": {
21358	//     "autoscaler": {
21359	//       "description": "Name of the autoscaler to update.",
21360	//       "location": "query",
21361	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21362	//       "type": "string"
21363	//     },
21364	//     "project": {
21365	//       "description": "Project ID for this request.",
21366	//       "location": "path",
21367	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21368	//       "required": true,
21369	//       "type": "string"
21370	//     },
21371	//     "requestId": {
21372	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
21373	//       "location": "query",
21374	//       "type": "string"
21375	//     },
21376	//     "zone": {
21377	//       "description": "Name of the zone for this request.",
21378	//       "location": "path",
21379	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21380	//       "required": true,
21381	//       "type": "string"
21382	//     }
21383	//   },
21384	//   "path": "{project}/zones/{zone}/autoscalers",
21385	//   "request": {
21386	//     "$ref": "Autoscaler"
21387	//   },
21388	//   "response": {
21389	//     "$ref": "Operation"
21390	//   },
21391	//   "scopes": [
21392	//     "https://www.googleapis.com/auth/cloud-platform",
21393	//     "https://www.googleapis.com/auth/compute"
21394	//   ]
21395	// }
21396
21397}
21398
21399// method id "compute.backendBuckets.delete":
21400
21401type BackendBucketsDeleteCall struct {
21402	s             *Service
21403	project       string
21404	backendBucket string
21405	urlParams_    gensupport.URLParams
21406	ctx_          context.Context
21407	header_       http.Header
21408}
21409
21410// Delete: Deletes the specified BackendBucket resource.
21411func (r *BackendBucketsService) Delete(project string, backendBucket string) *BackendBucketsDeleteCall {
21412	c := &BackendBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21413	c.project = project
21414	c.backendBucket = backendBucket
21415	return c
21416}
21417
21418// RequestId sets the optional parameter "requestId": An optional
21419// request ID to identify requests. Specify a unique request ID so that
21420// if you must retry your request, the server will know to ignore the
21421// request if it has already been completed.
21422//
21423// For example, consider a situation where you make an initial request
21424// and the request times out. If you make the request again with the
21425// same request ID, the server can check if original operation with the
21426// same request ID was received, and if so, will ignore the second
21427// request. This prevents clients from accidentally creating duplicate
21428// commitments.
21429//
21430// The request ID must be a valid UUID with the exception that zero UUID
21431// is not supported (00000000-0000-0000-0000-000000000000).
21432func (c *BackendBucketsDeleteCall) RequestId(requestId string) *BackendBucketsDeleteCall {
21433	c.urlParams_.Set("requestId", requestId)
21434	return c
21435}
21436
21437// Fields allows partial responses to be retrieved. See
21438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21439// for more information.
21440func (c *BackendBucketsDeleteCall) Fields(s ...googleapi.Field) *BackendBucketsDeleteCall {
21441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21442	return c
21443}
21444
21445// Context sets the context to be used in this call's Do method. Any
21446// pending HTTP request will be aborted if the provided context is
21447// canceled.
21448func (c *BackendBucketsDeleteCall) Context(ctx context.Context) *BackendBucketsDeleteCall {
21449	c.ctx_ = ctx
21450	return c
21451}
21452
21453// Header returns an http.Header that can be modified by the caller to
21454// add HTTP headers to the request.
21455func (c *BackendBucketsDeleteCall) Header() http.Header {
21456	if c.header_ == nil {
21457		c.header_ = make(http.Header)
21458	}
21459	return c.header_
21460}
21461
21462func (c *BackendBucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
21463	reqHeaders := make(http.Header)
21464	for k, v := range c.header_ {
21465		reqHeaders[k] = v
21466	}
21467	reqHeaders.Set("User-Agent", c.s.userAgent())
21468	var body io.Reader = nil
21469	c.urlParams_.Set("alt", alt)
21470	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}")
21471	urls += "?" + c.urlParams_.Encode()
21472	req, _ := http.NewRequest("DELETE", urls, body)
21473	req.Header = reqHeaders
21474	googleapi.Expand(req.URL, map[string]string{
21475		"project":       c.project,
21476		"backendBucket": c.backendBucket,
21477	})
21478	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21479}
21480
21481// Do executes the "compute.backendBuckets.delete" call.
21482// Exactly one of *Operation or error will be non-nil. Any non-2xx
21483// status code is an error. Response headers are in either
21484// *Operation.ServerResponse.Header or (if a response was returned at
21485// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21486// to check whether the returned error was because
21487// http.StatusNotModified was returned.
21488func (c *BackendBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21489	gensupport.SetOptions(c.urlParams_, opts...)
21490	res, err := c.doRequest("json")
21491	if res != nil && res.StatusCode == http.StatusNotModified {
21492		if res.Body != nil {
21493			res.Body.Close()
21494		}
21495		return nil, &googleapi.Error{
21496			Code:   res.StatusCode,
21497			Header: res.Header,
21498		}
21499	}
21500	if err != nil {
21501		return nil, err
21502	}
21503	defer googleapi.CloseBody(res)
21504	if err := googleapi.CheckResponse(res); err != nil {
21505		return nil, err
21506	}
21507	ret := &Operation{
21508		ServerResponse: googleapi.ServerResponse{
21509			Header:         res.Header,
21510			HTTPStatusCode: res.StatusCode,
21511		},
21512	}
21513	target := &ret
21514	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
21515		return nil, err
21516	}
21517	return ret, nil
21518	// {
21519	//   "description": "Deletes the specified BackendBucket resource.",
21520	//   "httpMethod": "DELETE",
21521	//   "id": "compute.backendBuckets.delete",
21522	//   "parameterOrder": [
21523	//     "project",
21524	//     "backendBucket"
21525	//   ],
21526	//   "parameters": {
21527	//     "backendBucket": {
21528	//       "description": "Name of the BackendBucket resource to delete.",
21529	//       "location": "path",
21530	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21531	//       "required": true,
21532	//       "type": "string"
21533	//     },
21534	//     "project": {
21535	//       "description": "Project ID for this request.",
21536	//       "location": "path",
21537	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21538	//       "required": true,
21539	//       "type": "string"
21540	//     },
21541	//     "requestId": {
21542	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
21543	//       "location": "query",
21544	//       "type": "string"
21545	//     }
21546	//   },
21547	//   "path": "{project}/global/backendBuckets/{backendBucket}",
21548	//   "response": {
21549	//     "$ref": "Operation"
21550	//   },
21551	//   "scopes": [
21552	//     "https://www.googleapis.com/auth/cloud-platform",
21553	//     "https://www.googleapis.com/auth/compute"
21554	//   ]
21555	// }
21556
21557}
21558
21559// method id "compute.backendBuckets.get":
21560
21561type BackendBucketsGetCall struct {
21562	s             *Service
21563	project       string
21564	backendBucket string
21565	urlParams_    gensupport.URLParams
21566	ifNoneMatch_  string
21567	ctx_          context.Context
21568	header_       http.Header
21569}
21570
21571// Get: Returns the specified BackendBucket resource. Get a list of
21572// available backend buckets by making a list() request.
21573func (r *BackendBucketsService) Get(project string, backendBucket string) *BackendBucketsGetCall {
21574	c := &BackendBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21575	c.project = project
21576	c.backendBucket = backendBucket
21577	return c
21578}
21579
21580// Fields allows partial responses to be retrieved. See
21581// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21582// for more information.
21583func (c *BackendBucketsGetCall) Fields(s ...googleapi.Field) *BackendBucketsGetCall {
21584	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21585	return c
21586}
21587
21588// IfNoneMatch sets the optional parameter which makes the operation
21589// fail if the object's ETag matches the given value. This is useful for
21590// getting updates only after the object has changed since the last
21591// request. Use googleapi.IsNotModified to check whether the response
21592// error from Do is the result of In-None-Match.
21593func (c *BackendBucketsGetCall) IfNoneMatch(entityTag string) *BackendBucketsGetCall {
21594	c.ifNoneMatch_ = entityTag
21595	return c
21596}
21597
21598// Context sets the context to be used in this call's Do method. Any
21599// pending HTTP request will be aborted if the provided context is
21600// canceled.
21601func (c *BackendBucketsGetCall) Context(ctx context.Context) *BackendBucketsGetCall {
21602	c.ctx_ = ctx
21603	return c
21604}
21605
21606// Header returns an http.Header that can be modified by the caller to
21607// add HTTP headers to the request.
21608func (c *BackendBucketsGetCall) Header() http.Header {
21609	if c.header_ == nil {
21610		c.header_ = make(http.Header)
21611	}
21612	return c.header_
21613}
21614
21615func (c *BackendBucketsGetCall) doRequest(alt string) (*http.Response, error) {
21616	reqHeaders := make(http.Header)
21617	for k, v := range c.header_ {
21618		reqHeaders[k] = v
21619	}
21620	reqHeaders.Set("User-Agent", c.s.userAgent())
21621	if c.ifNoneMatch_ != "" {
21622		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
21623	}
21624	var body io.Reader = nil
21625	c.urlParams_.Set("alt", alt)
21626	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}")
21627	urls += "?" + c.urlParams_.Encode()
21628	req, _ := http.NewRequest("GET", urls, body)
21629	req.Header = reqHeaders
21630	googleapi.Expand(req.URL, map[string]string{
21631		"project":       c.project,
21632		"backendBucket": c.backendBucket,
21633	})
21634	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21635}
21636
21637// Do executes the "compute.backendBuckets.get" call.
21638// Exactly one of *BackendBucket or error will be non-nil. Any non-2xx
21639// status code is an error. Response headers are in either
21640// *BackendBucket.ServerResponse.Header or (if a response was returned
21641// at all) in error.(*googleapi.Error).Header. Use
21642// googleapi.IsNotModified to check whether the returned error was
21643// because http.StatusNotModified was returned.
21644func (c *BackendBucketsGetCall) Do(opts ...googleapi.CallOption) (*BackendBucket, error) {
21645	gensupport.SetOptions(c.urlParams_, opts...)
21646	res, err := c.doRequest("json")
21647	if res != nil && res.StatusCode == http.StatusNotModified {
21648		if res.Body != nil {
21649			res.Body.Close()
21650		}
21651		return nil, &googleapi.Error{
21652			Code:   res.StatusCode,
21653			Header: res.Header,
21654		}
21655	}
21656	if err != nil {
21657		return nil, err
21658	}
21659	defer googleapi.CloseBody(res)
21660	if err := googleapi.CheckResponse(res); err != nil {
21661		return nil, err
21662	}
21663	ret := &BackendBucket{
21664		ServerResponse: googleapi.ServerResponse{
21665			Header:         res.Header,
21666			HTTPStatusCode: res.StatusCode,
21667		},
21668	}
21669	target := &ret
21670	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
21671		return nil, err
21672	}
21673	return ret, nil
21674	// {
21675	//   "description": "Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request.",
21676	//   "httpMethod": "GET",
21677	//   "id": "compute.backendBuckets.get",
21678	//   "parameterOrder": [
21679	//     "project",
21680	//     "backendBucket"
21681	//   ],
21682	//   "parameters": {
21683	//     "backendBucket": {
21684	//       "description": "Name of the BackendBucket resource to return.",
21685	//       "location": "path",
21686	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21687	//       "required": true,
21688	//       "type": "string"
21689	//     },
21690	//     "project": {
21691	//       "description": "Project ID for this request.",
21692	//       "location": "path",
21693	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21694	//       "required": true,
21695	//       "type": "string"
21696	//     }
21697	//   },
21698	//   "path": "{project}/global/backendBuckets/{backendBucket}",
21699	//   "response": {
21700	//     "$ref": "BackendBucket"
21701	//   },
21702	//   "scopes": [
21703	//     "https://www.googleapis.com/auth/cloud-platform",
21704	//     "https://www.googleapis.com/auth/compute",
21705	//     "https://www.googleapis.com/auth/compute.readonly"
21706	//   ]
21707	// }
21708
21709}
21710
21711// method id "compute.backendBuckets.insert":
21712
21713type BackendBucketsInsertCall struct {
21714	s             *Service
21715	project       string
21716	backendbucket *BackendBucket
21717	urlParams_    gensupport.URLParams
21718	ctx_          context.Context
21719	header_       http.Header
21720}
21721
21722// Insert: Creates a BackendBucket resource in the specified project
21723// using the data included in the request.
21724func (r *BackendBucketsService) Insert(project string, backendbucket *BackendBucket) *BackendBucketsInsertCall {
21725	c := &BackendBucketsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21726	c.project = project
21727	c.backendbucket = backendbucket
21728	return c
21729}
21730
21731// RequestId sets the optional parameter "requestId": An optional
21732// request ID to identify requests. Specify a unique request ID so that
21733// if you must retry your request, the server will know to ignore the
21734// request if it has already been completed.
21735//
21736// For example, consider a situation where you make an initial request
21737// and the request times out. If you make the request again with the
21738// same request ID, the server can check if original operation with the
21739// same request ID was received, and if so, will ignore the second
21740// request. This prevents clients from accidentally creating duplicate
21741// commitments.
21742//
21743// The request ID must be a valid UUID with the exception that zero UUID
21744// is not supported (00000000-0000-0000-0000-000000000000).
21745func (c *BackendBucketsInsertCall) RequestId(requestId string) *BackendBucketsInsertCall {
21746	c.urlParams_.Set("requestId", requestId)
21747	return c
21748}
21749
21750// Fields allows partial responses to be retrieved. See
21751// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21752// for more information.
21753func (c *BackendBucketsInsertCall) Fields(s ...googleapi.Field) *BackendBucketsInsertCall {
21754	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21755	return c
21756}
21757
21758// Context sets the context to be used in this call's Do method. Any
21759// pending HTTP request will be aborted if the provided context is
21760// canceled.
21761func (c *BackendBucketsInsertCall) Context(ctx context.Context) *BackendBucketsInsertCall {
21762	c.ctx_ = ctx
21763	return c
21764}
21765
21766// Header returns an http.Header that can be modified by the caller to
21767// add HTTP headers to the request.
21768func (c *BackendBucketsInsertCall) Header() http.Header {
21769	if c.header_ == nil {
21770		c.header_ = make(http.Header)
21771	}
21772	return c.header_
21773}
21774
21775func (c *BackendBucketsInsertCall) doRequest(alt string) (*http.Response, error) {
21776	reqHeaders := make(http.Header)
21777	for k, v := range c.header_ {
21778		reqHeaders[k] = v
21779	}
21780	reqHeaders.Set("User-Agent", c.s.userAgent())
21781	var body io.Reader = nil
21782	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket)
21783	if err != nil {
21784		return nil, err
21785	}
21786	reqHeaders.Set("Content-Type", "application/json")
21787	c.urlParams_.Set("alt", alt)
21788	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets")
21789	urls += "?" + c.urlParams_.Encode()
21790	req, _ := http.NewRequest("POST", urls, body)
21791	req.Header = reqHeaders
21792	googleapi.Expand(req.URL, map[string]string{
21793		"project": c.project,
21794	})
21795	return gensupport.SendRequest(c.ctx_, c.s.client, req)
21796}
21797
21798// Do executes the "compute.backendBuckets.insert" call.
21799// Exactly one of *Operation or error will be non-nil. Any non-2xx
21800// status code is an error. Response headers are in either
21801// *Operation.ServerResponse.Header or (if a response was returned at
21802// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21803// to check whether the returned error was because
21804// http.StatusNotModified was returned.
21805func (c *BackendBucketsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21806	gensupport.SetOptions(c.urlParams_, opts...)
21807	res, err := c.doRequest("json")
21808	if res != nil && res.StatusCode == http.StatusNotModified {
21809		if res.Body != nil {
21810			res.Body.Close()
21811		}
21812		return nil, &googleapi.Error{
21813			Code:   res.StatusCode,
21814			Header: res.Header,
21815		}
21816	}
21817	if err != nil {
21818		return nil, err
21819	}
21820	defer googleapi.CloseBody(res)
21821	if err := googleapi.CheckResponse(res); err != nil {
21822		return nil, err
21823	}
21824	ret := &Operation{
21825		ServerResponse: googleapi.ServerResponse{
21826			Header:         res.Header,
21827			HTTPStatusCode: res.StatusCode,
21828		},
21829	}
21830	target := &ret
21831	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
21832		return nil, err
21833	}
21834	return ret, nil
21835	// {
21836	//   "description": "Creates a BackendBucket resource in the specified project using the data included in the request.",
21837	//   "httpMethod": "POST",
21838	//   "id": "compute.backendBuckets.insert",
21839	//   "parameterOrder": [
21840	//     "project"
21841	//   ],
21842	//   "parameters": {
21843	//     "project": {
21844	//       "description": "Project ID for this request.",
21845	//       "location": "path",
21846	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21847	//       "required": true,
21848	//       "type": "string"
21849	//     },
21850	//     "requestId": {
21851	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
21852	//       "location": "query",
21853	//       "type": "string"
21854	//     }
21855	//   },
21856	//   "path": "{project}/global/backendBuckets",
21857	//   "request": {
21858	//     "$ref": "BackendBucket"
21859	//   },
21860	//   "response": {
21861	//     "$ref": "Operation"
21862	//   },
21863	//   "scopes": [
21864	//     "https://www.googleapis.com/auth/cloud-platform",
21865	//     "https://www.googleapis.com/auth/compute"
21866	//   ]
21867	// }
21868
21869}
21870
21871// method id "compute.backendBuckets.list":
21872
21873type BackendBucketsListCall struct {
21874	s            *Service
21875	project      string
21876	urlParams_   gensupport.URLParams
21877	ifNoneMatch_ string
21878	ctx_         context.Context
21879	header_      http.Header
21880}
21881
21882// List: Retrieves the list of BackendBucket resources available to the
21883// specified project.
21884func (r *BackendBucketsService) List(project string) *BackendBucketsListCall {
21885	c := &BackendBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21886	c.project = project
21887	return c
21888}
21889
21890// Filter sets the optional parameter "filter": Sets a filter
21891// {expression} for filtering listed resources. Your {expression} must
21892// be in the format: field_name comparison_string literal_string.
21893//
21894// The field_name is the name of the field you want to compare. Only
21895// atomic field types are supported (string, number, boolean). The
21896// comparison_string must be either eq (equals) or ne (not equals). The
21897// literal_string is the string value to filter to. The literal value
21898// must be valid for the type of field you are filtering by (string,
21899// number, boolean). For string fields, the literal value is interpreted
21900// as a regular expression using RE2 syntax. The literal value must
21901// match the entire field.
21902//
21903// For example, to filter for instances that do not have a name of
21904// example-instance, you would use name ne example-instance.
21905//
21906// You can filter on nested fields. For example, you could filter on
21907// instances that have set the scheduling.automaticRestart field to
21908// true. Use filtering on nested fields to take advantage of labels to
21909// organize and search for results based on label values.
21910//
21911// To filter on multiple expressions, provide each separate expression
21912// within parentheses. For example, (scheduling.automaticRestart eq
21913// true) (zone eq us-central1-f). Multiple expressions are treated as
21914// AND expressions, meaning that resources must match all expressions to
21915// pass the filters.
21916func (c *BackendBucketsListCall) Filter(filter string) *BackendBucketsListCall {
21917	c.urlParams_.Set("filter", filter)
21918	return c
21919}
21920
21921// MaxResults sets the optional parameter "maxResults": The maximum
21922// number of results per page that should be returned. If the number of
21923// available results is larger than maxResults, Compute Engine returns a
21924// nextPageToken that can be used to get the next page of results in
21925// subsequent list requests. Acceptable values are 0 to 500, inclusive.
21926// (Default: 500)
21927func (c *BackendBucketsListCall) MaxResults(maxResults int64) *BackendBucketsListCall {
21928	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21929	return c
21930}
21931
21932// OrderBy sets the optional parameter "orderBy": Sorts list results by
21933// a certain order. By default, results are returned in alphanumerical
21934// order based on the resource name.
21935//
21936// You can also sort results in descending order based on the creation
21937// timestamp using orderBy="creationTimestamp desc". This sorts results
21938// based on the creationTimestamp field in reverse chronological order
21939// (newest result first). Use this to sort resources like operations so
21940// that the newest operation is returned first.
21941//
21942// Currently, only sorting by name or creationTimestamp desc is
21943// supported.
21944func (c *BackendBucketsListCall) OrderBy(orderBy string) *BackendBucketsListCall {
21945	c.urlParams_.Set("orderBy", orderBy)
21946	return c
21947}
21948
21949// PageToken sets the optional parameter "pageToken": Specifies a page
21950// token to use. Set pageToken to the nextPageToken returned by a
21951// previous list request to get the next page of results.
21952func (c *BackendBucketsListCall) PageToken(pageToken string) *BackendBucketsListCall {
21953	c.urlParams_.Set("pageToken", pageToken)
21954	return c
21955}
21956
21957// Fields allows partial responses to be retrieved. See
21958// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21959// for more information.
21960func (c *BackendBucketsListCall) Fields(s ...googleapi.Field) *BackendBucketsListCall {
21961	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21962	return c
21963}
21964
21965// IfNoneMatch sets the optional parameter which makes the operation
21966// fail if the object's ETag matches the given value. This is useful for
21967// getting updates only after the object has changed since the last
21968// request. Use googleapi.IsNotModified to check whether the response
21969// error from Do is the result of In-None-Match.
21970func (c *BackendBucketsListCall) IfNoneMatch(entityTag string) *BackendBucketsListCall {
21971	c.ifNoneMatch_ = entityTag
21972	return c
21973}
21974
21975// Context sets the context to be used in this call's Do method. Any
21976// pending HTTP request will be aborted if the provided context is
21977// canceled.
21978func (c *BackendBucketsListCall) Context(ctx context.Context) *BackendBucketsListCall {
21979	c.ctx_ = ctx
21980	return c
21981}
21982
21983// Header returns an http.Header that can be modified by the caller to
21984// add HTTP headers to the request.
21985func (c *BackendBucketsListCall) Header() http.Header {
21986	if c.header_ == nil {
21987		c.header_ = make(http.Header)
21988	}
21989	return c.header_
21990}
21991
21992func (c *BackendBucketsListCall) doRequest(alt string) (*http.Response, error) {
21993	reqHeaders := make(http.Header)
21994	for k, v := range c.header_ {
21995		reqHeaders[k] = v
21996	}
21997	reqHeaders.Set("User-Agent", c.s.userAgent())
21998	if c.ifNoneMatch_ != "" {
21999		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22000	}
22001	var body io.Reader = nil
22002	c.urlParams_.Set("alt", alt)
22003	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets")
22004	urls += "?" + c.urlParams_.Encode()
22005	req, _ := http.NewRequest("GET", urls, body)
22006	req.Header = reqHeaders
22007	googleapi.Expand(req.URL, map[string]string{
22008		"project": c.project,
22009	})
22010	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22011}
22012
22013// Do executes the "compute.backendBuckets.list" call.
22014// Exactly one of *BackendBucketList or error will be non-nil. Any
22015// non-2xx status code is an error. Response headers are in either
22016// *BackendBucketList.ServerResponse.Header or (if a response was
22017// returned at all) in error.(*googleapi.Error).Header. Use
22018// googleapi.IsNotModified to check whether the returned error was
22019// because http.StatusNotModified was returned.
22020func (c *BackendBucketsListCall) Do(opts ...googleapi.CallOption) (*BackendBucketList, error) {
22021	gensupport.SetOptions(c.urlParams_, opts...)
22022	res, err := c.doRequest("json")
22023	if res != nil && res.StatusCode == http.StatusNotModified {
22024		if res.Body != nil {
22025			res.Body.Close()
22026		}
22027		return nil, &googleapi.Error{
22028			Code:   res.StatusCode,
22029			Header: res.Header,
22030		}
22031	}
22032	if err != nil {
22033		return nil, err
22034	}
22035	defer googleapi.CloseBody(res)
22036	if err := googleapi.CheckResponse(res); err != nil {
22037		return nil, err
22038	}
22039	ret := &BackendBucketList{
22040		ServerResponse: googleapi.ServerResponse{
22041			Header:         res.Header,
22042			HTTPStatusCode: res.StatusCode,
22043		},
22044	}
22045	target := &ret
22046	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
22047		return nil, err
22048	}
22049	return ret, nil
22050	// {
22051	//   "description": "Retrieves the list of BackendBucket resources available to the specified project.",
22052	//   "httpMethod": "GET",
22053	//   "id": "compute.backendBuckets.list",
22054	//   "parameterOrder": [
22055	//     "project"
22056	//   ],
22057	//   "parameters": {
22058	//     "filter": {
22059	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
22060	//       "location": "query",
22061	//       "type": "string"
22062	//     },
22063	//     "maxResults": {
22064	//       "default": "500",
22065	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
22066	//       "format": "uint32",
22067	//       "location": "query",
22068	//       "minimum": "0",
22069	//       "type": "integer"
22070	//     },
22071	//     "orderBy": {
22072	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
22073	//       "location": "query",
22074	//       "type": "string"
22075	//     },
22076	//     "pageToken": {
22077	//       "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.",
22078	//       "location": "query",
22079	//       "type": "string"
22080	//     },
22081	//     "project": {
22082	//       "description": "Project ID for this request.",
22083	//       "location": "path",
22084	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22085	//       "required": true,
22086	//       "type": "string"
22087	//     }
22088	//   },
22089	//   "path": "{project}/global/backendBuckets",
22090	//   "response": {
22091	//     "$ref": "BackendBucketList"
22092	//   },
22093	//   "scopes": [
22094	//     "https://www.googleapis.com/auth/cloud-platform",
22095	//     "https://www.googleapis.com/auth/compute",
22096	//     "https://www.googleapis.com/auth/compute.readonly"
22097	//   ]
22098	// }
22099
22100}
22101
22102// Pages invokes f for each page of results.
22103// A non-nil error returned from f will halt the iteration.
22104// The provided context supersedes any context provided to the Context method.
22105func (c *BackendBucketsListCall) Pages(ctx context.Context, f func(*BackendBucketList) error) error {
22106	c.ctx_ = ctx
22107	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22108	for {
22109		x, err := c.Do()
22110		if err != nil {
22111			return err
22112		}
22113		if err := f(x); err != nil {
22114			return err
22115		}
22116		if x.NextPageToken == "" {
22117			return nil
22118		}
22119		c.PageToken(x.NextPageToken)
22120	}
22121}
22122
22123// method id "compute.backendBuckets.patch":
22124
22125type BackendBucketsPatchCall struct {
22126	s             *Service
22127	project       string
22128	backendBucket string
22129	backendbucket *BackendBucket
22130	urlParams_    gensupport.URLParams
22131	ctx_          context.Context
22132	header_       http.Header
22133}
22134
22135// Patch: Updates the specified BackendBucket resource with the data
22136// included in the request. This method supports PATCH semantics and
22137// uses the JSON merge patch format and processing rules.
22138func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall {
22139	c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22140	c.project = project
22141	c.backendBucket = backendBucket
22142	c.backendbucket = backendbucket
22143	return c
22144}
22145
22146// RequestId sets the optional parameter "requestId": An optional
22147// request ID to identify requests. Specify a unique request ID so that
22148// if you must retry your request, the server will know to ignore the
22149// request if it has already been completed.
22150//
22151// For example, consider a situation where you make an initial request
22152// and the request times out. If you make the request again with the
22153// same request ID, the server can check if original operation with the
22154// same request ID was received, and if so, will ignore the second
22155// request. This prevents clients from accidentally creating duplicate
22156// commitments.
22157//
22158// The request ID must be a valid UUID with the exception that zero UUID
22159// is not supported (00000000-0000-0000-0000-000000000000).
22160func (c *BackendBucketsPatchCall) RequestId(requestId string) *BackendBucketsPatchCall {
22161	c.urlParams_.Set("requestId", requestId)
22162	return c
22163}
22164
22165// Fields allows partial responses to be retrieved. See
22166// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22167// for more information.
22168func (c *BackendBucketsPatchCall) Fields(s ...googleapi.Field) *BackendBucketsPatchCall {
22169	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22170	return c
22171}
22172
22173// Context sets the context to be used in this call's Do method. Any
22174// pending HTTP request will be aborted if the provided context is
22175// canceled.
22176func (c *BackendBucketsPatchCall) Context(ctx context.Context) *BackendBucketsPatchCall {
22177	c.ctx_ = ctx
22178	return c
22179}
22180
22181// Header returns an http.Header that can be modified by the caller to
22182// add HTTP headers to the request.
22183func (c *BackendBucketsPatchCall) Header() http.Header {
22184	if c.header_ == nil {
22185		c.header_ = make(http.Header)
22186	}
22187	return c.header_
22188}
22189
22190func (c *BackendBucketsPatchCall) doRequest(alt string) (*http.Response, error) {
22191	reqHeaders := make(http.Header)
22192	for k, v := range c.header_ {
22193		reqHeaders[k] = v
22194	}
22195	reqHeaders.Set("User-Agent", c.s.userAgent())
22196	var body io.Reader = nil
22197	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket)
22198	if err != nil {
22199		return nil, err
22200	}
22201	reqHeaders.Set("Content-Type", "application/json")
22202	c.urlParams_.Set("alt", alt)
22203	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}")
22204	urls += "?" + c.urlParams_.Encode()
22205	req, _ := http.NewRequest("PATCH", urls, body)
22206	req.Header = reqHeaders
22207	googleapi.Expand(req.URL, map[string]string{
22208		"project":       c.project,
22209		"backendBucket": c.backendBucket,
22210	})
22211	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22212}
22213
22214// Do executes the "compute.backendBuckets.patch" call.
22215// Exactly one of *Operation or error will be non-nil. Any non-2xx
22216// status code is an error. Response headers are in either
22217// *Operation.ServerResponse.Header or (if a response was returned at
22218// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22219// to check whether the returned error was because
22220// http.StatusNotModified was returned.
22221func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22222	gensupport.SetOptions(c.urlParams_, opts...)
22223	res, err := c.doRequest("json")
22224	if res != nil && res.StatusCode == http.StatusNotModified {
22225		if res.Body != nil {
22226			res.Body.Close()
22227		}
22228		return nil, &googleapi.Error{
22229			Code:   res.StatusCode,
22230			Header: res.Header,
22231		}
22232	}
22233	if err != nil {
22234		return nil, err
22235	}
22236	defer googleapi.CloseBody(res)
22237	if err := googleapi.CheckResponse(res); err != nil {
22238		return nil, err
22239	}
22240	ret := &Operation{
22241		ServerResponse: googleapi.ServerResponse{
22242			Header:         res.Header,
22243			HTTPStatusCode: res.StatusCode,
22244		},
22245	}
22246	target := &ret
22247	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
22248		return nil, err
22249	}
22250	return ret, nil
22251	// {
22252	//   "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
22253	//   "httpMethod": "PATCH",
22254	//   "id": "compute.backendBuckets.patch",
22255	//   "parameterOrder": [
22256	//     "project",
22257	//     "backendBucket"
22258	//   ],
22259	//   "parameters": {
22260	//     "backendBucket": {
22261	//       "description": "Name of the BackendBucket resource to patch.",
22262	//       "location": "path",
22263	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
22264	//       "required": true,
22265	//       "type": "string"
22266	//     },
22267	//     "project": {
22268	//       "description": "Project ID for this request.",
22269	//       "location": "path",
22270	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22271	//       "required": true,
22272	//       "type": "string"
22273	//     },
22274	//     "requestId": {
22275	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
22276	//       "location": "query",
22277	//       "type": "string"
22278	//     }
22279	//   },
22280	//   "path": "{project}/global/backendBuckets/{backendBucket}",
22281	//   "request": {
22282	//     "$ref": "BackendBucket"
22283	//   },
22284	//   "response": {
22285	//     "$ref": "Operation"
22286	//   },
22287	//   "scopes": [
22288	//     "https://www.googleapis.com/auth/cloud-platform",
22289	//     "https://www.googleapis.com/auth/compute"
22290	//   ]
22291	// }
22292
22293}
22294
22295// method id "compute.backendBuckets.update":
22296
22297type BackendBucketsUpdateCall struct {
22298	s             *Service
22299	project       string
22300	backendBucket string
22301	backendbucket *BackendBucket
22302	urlParams_    gensupport.URLParams
22303	ctx_          context.Context
22304	header_       http.Header
22305}
22306
22307// Update: Updates the specified BackendBucket resource with the data
22308// included in the request.
22309func (r *BackendBucketsService) Update(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsUpdateCall {
22310	c := &BackendBucketsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22311	c.project = project
22312	c.backendBucket = backendBucket
22313	c.backendbucket = backendbucket
22314	return c
22315}
22316
22317// RequestId sets the optional parameter "requestId": An optional
22318// request ID to identify requests. Specify a unique request ID so that
22319// if you must retry your request, the server will know to ignore the
22320// request if it has already been completed.
22321//
22322// For example, consider a situation where you make an initial request
22323// and the request times out. If you make the request again with the
22324// same request ID, the server can check if original operation with the
22325// same request ID was received, and if so, will ignore the second
22326// request. This prevents clients from accidentally creating duplicate
22327// commitments.
22328//
22329// The request ID must be a valid UUID with the exception that zero UUID
22330// is not supported (00000000-0000-0000-0000-000000000000).
22331func (c *BackendBucketsUpdateCall) RequestId(requestId string) *BackendBucketsUpdateCall {
22332	c.urlParams_.Set("requestId", requestId)
22333	return c
22334}
22335
22336// Fields allows partial responses to be retrieved. See
22337// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22338// for more information.
22339func (c *BackendBucketsUpdateCall) Fields(s ...googleapi.Field) *BackendBucketsUpdateCall {
22340	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22341	return c
22342}
22343
22344// Context sets the context to be used in this call's Do method. Any
22345// pending HTTP request will be aborted if the provided context is
22346// canceled.
22347func (c *BackendBucketsUpdateCall) Context(ctx context.Context) *BackendBucketsUpdateCall {
22348	c.ctx_ = ctx
22349	return c
22350}
22351
22352// Header returns an http.Header that can be modified by the caller to
22353// add HTTP headers to the request.
22354func (c *BackendBucketsUpdateCall) Header() http.Header {
22355	if c.header_ == nil {
22356		c.header_ = make(http.Header)
22357	}
22358	return c.header_
22359}
22360
22361func (c *BackendBucketsUpdateCall) doRequest(alt string) (*http.Response, error) {
22362	reqHeaders := make(http.Header)
22363	for k, v := range c.header_ {
22364		reqHeaders[k] = v
22365	}
22366	reqHeaders.Set("User-Agent", c.s.userAgent())
22367	var body io.Reader = nil
22368	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendbucket)
22369	if err != nil {
22370		return nil, err
22371	}
22372	reqHeaders.Set("Content-Type", "application/json")
22373	c.urlParams_.Set("alt", alt)
22374	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendBuckets/{backendBucket}")
22375	urls += "?" + c.urlParams_.Encode()
22376	req, _ := http.NewRequest("PUT", urls, body)
22377	req.Header = reqHeaders
22378	googleapi.Expand(req.URL, map[string]string{
22379		"project":       c.project,
22380		"backendBucket": c.backendBucket,
22381	})
22382	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22383}
22384
22385// Do executes the "compute.backendBuckets.update" call.
22386// Exactly one of *Operation or error will be non-nil. Any non-2xx
22387// status code is an error. Response headers are in either
22388// *Operation.ServerResponse.Header or (if a response was returned at
22389// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22390// to check whether the returned error was because
22391// http.StatusNotModified was returned.
22392func (c *BackendBucketsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22393	gensupport.SetOptions(c.urlParams_, opts...)
22394	res, err := c.doRequest("json")
22395	if res != nil && res.StatusCode == http.StatusNotModified {
22396		if res.Body != nil {
22397			res.Body.Close()
22398		}
22399		return nil, &googleapi.Error{
22400			Code:   res.StatusCode,
22401			Header: res.Header,
22402		}
22403	}
22404	if err != nil {
22405		return nil, err
22406	}
22407	defer googleapi.CloseBody(res)
22408	if err := googleapi.CheckResponse(res); err != nil {
22409		return nil, err
22410	}
22411	ret := &Operation{
22412		ServerResponse: googleapi.ServerResponse{
22413			Header:         res.Header,
22414			HTTPStatusCode: res.StatusCode,
22415		},
22416	}
22417	target := &ret
22418	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
22419		return nil, err
22420	}
22421	return ret, nil
22422	// {
22423	//   "description": "Updates the specified BackendBucket resource with the data included in the request.",
22424	//   "httpMethod": "PUT",
22425	//   "id": "compute.backendBuckets.update",
22426	//   "parameterOrder": [
22427	//     "project",
22428	//     "backendBucket"
22429	//   ],
22430	//   "parameters": {
22431	//     "backendBucket": {
22432	//       "description": "Name of the BackendBucket resource to update.",
22433	//       "location": "path",
22434	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
22435	//       "required": true,
22436	//       "type": "string"
22437	//     },
22438	//     "project": {
22439	//       "description": "Project ID for this request.",
22440	//       "location": "path",
22441	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22442	//       "required": true,
22443	//       "type": "string"
22444	//     },
22445	//     "requestId": {
22446	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
22447	//       "location": "query",
22448	//       "type": "string"
22449	//     }
22450	//   },
22451	//   "path": "{project}/global/backendBuckets/{backendBucket}",
22452	//   "request": {
22453	//     "$ref": "BackendBucket"
22454	//   },
22455	//   "response": {
22456	//     "$ref": "Operation"
22457	//   },
22458	//   "scopes": [
22459	//     "https://www.googleapis.com/auth/cloud-platform",
22460	//     "https://www.googleapis.com/auth/compute"
22461	//   ]
22462	// }
22463
22464}
22465
22466// method id "compute.backendServices.aggregatedList":
22467
22468type BackendServicesAggregatedListCall struct {
22469	s            *Service
22470	project      string
22471	urlParams_   gensupport.URLParams
22472	ifNoneMatch_ string
22473	ctx_         context.Context
22474	header_      http.Header
22475}
22476
22477// AggregatedList: Retrieves the list of all BackendService resources,
22478// regional and global, available to the specified project.
22479func (r *BackendServicesService) AggregatedList(project string) *BackendServicesAggregatedListCall {
22480	c := &BackendServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22481	c.project = project
22482	return c
22483}
22484
22485// Filter sets the optional parameter "filter": Sets a filter
22486// {expression} for filtering listed resources. Your {expression} must
22487// be in the format: field_name comparison_string literal_string.
22488//
22489// The field_name is the name of the field you want to compare. Only
22490// atomic field types are supported (string, number, boolean). The
22491// comparison_string must be either eq (equals) or ne (not equals). The
22492// literal_string is the string value to filter to. The literal value
22493// must be valid for the type of field you are filtering by (string,
22494// number, boolean). For string fields, the literal value is interpreted
22495// as a regular expression using RE2 syntax. The literal value must
22496// match the entire field.
22497//
22498// For example, to filter for instances that do not have a name of
22499// example-instance, you would use name ne example-instance.
22500//
22501// You can filter on nested fields. For example, you could filter on
22502// instances that have set the scheduling.automaticRestart field to
22503// true. Use filtering on nested fields to take advantage of labels to
22504// organize and search for results based on label values.
22505//
22506// To filter on multiple expressions, provide each separate expression
22507// within parentheses. For example, (scheduling.automaticRestart eq
22508// true) (zone eq us-central1-f). Multiple expressions are treated as
22509// AND expressions, meaning that resources must match all expressions to
22510// pass the filters.
22511func (c *BackendServicesAggregatedListCall) Filter(filter string) *BackendServicesAggregatedListCall {
22512	c.urlParams_.Set("filter", filter)
22513	return c
22514}
22515
22516// MaxResults sets the optional parameter "maxResults": The maximum
22517// number of results per page that should be returned. If the number of
22518// available results is larger than maxResults, Compute Engine returns a
22519// nextPageToken that can be used to get the next page of results in
22520// subsequent list requests. Acceptable values are 0 to 500, inclusive.
22521// (Default: 500)
22522func (c *BackendServicesAggregatedListCall) MaxResults(maxResults int64) *BackendServicesAggregatedListCall {
22523	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22524	return c
22525}
22526
22527// OrderBy sets the optional parameter "orderBy": Sorts list results by
22528// a certain order. By default, results are returned in alphanumerical
22529// order based on the resource name.
22530//
22531// You can also sort results in descending order based on the creation
22532// timestamp using orderBy="creationTimestamp desc". This sorts results
22533// based on the creationTimestamp field in reverse chronological order
22534// (newest result first). Use this to sort resources like operations so
22535// that the newest operation is returned first.
22536//
22537// Currently, only sorting by name or creationTimestamp desc is
22538// supported.
22539func (c *BackendServicesAggregatedListCall) OrderBy(orderBy string) *BackendServicesAggregatedListCall {
22540	c.urlParams_.Set("orderBy", orderBy)
22541	return c
22542}
22543
22544// PageToken sets the optional parameter "pageToken": Specifies a page
22545// token to use. Set pageToken to the nextPageToken returned by a
22546// previous list request to get the next page of results.
22547func (c *BackendServicesAggregatedListCall) PageToken(pageToken string) *BackendServicesAggregatedListCall {
22548	c.urlParams_.Set("pageToken", pageToken)
22549	return c
22550}
22551
22552// Fields allows partial responses to be retrieved. See
22553// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22554// for more information.
22555func (c *BackendServicesAggregatedListCall) Fields(s ...googleapi.Field) *BackendServicesAggregatedListCall {
22556	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22557	return c
22558}
22559
22560// IfNoneMatch sets the optional parameter which makes the operation
22561// fail if the object's ETag matches the given value. This is useful for
22562// getting updates only after the object has changed since the last
22563// request. Use googleapi.IsNotModified to check whether the response
22564// error from Do is the result of In-None-Match.
22565func (c *BackendServicesAggregatedListCall) IfNoneMatch(entityTag string) *BackendServicesAggregatedListCall {
22566	c.ifNoneMatch_ = entityTag
22567	return c
22568}
22569
22570// Context sets the context to be used in this call's Do method. Any
22571// pending HTTP request will be aborted if the provided context is
22572// canceled.
22573func (c *BackendServicesAggregatedListCall) Context(ctx context.Context) *BackendServicesAggregatedListCall {
22574	c.ctx_ = ctx
22575	return c
22576}
22577
22578// Header returns an http.Header that can be modified by the caller to
22579// add HTTP headers to the request.
22580func (c *BackendServicesAggregatedListCall) Header() http.Header {
22581	if c.header_ == nil {
22582		c.header_ = make(http.Header)
22583	}
22584	return c.header_
22585}
22586
22587func (c *BackendServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
22588	reqHeaders := make(http.Header)
22589	for k, v := range c.header_ {
22590		reqHeaders[k] = v
22591	}
22592	reqHeaders.Set("User-Agent", c.s.userAgent())
22593	if c.ifNoneMatch_ != "" {
22594		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22595	}
22596	var body io.Reader = nil
22597	c.urlParams_.Set("alt", alt)
22598	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/backendServices")
22599	urls += "?" + c.urlParams_.Encode()
22600	req, _ := http.NewRequest("GET", urls, body)
22601	req.Header = reqHeaders
22602	googleapi.Expand(req.URL, map[string]string{
22603		"project": c.project,
22604	})
22605	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22606}
22607
22608// Do executes the "compute.backendServices.aggregatedList" call.
22609// Exactly one of *BackendServiceAggregatedList or error will be
22610// non-nil. Any non-2xx status code is an error. Response headers are in
22611// either *BackendServiceAggregatedList.ServerResponse.Header or (if a
22612// response was returned at all) in error.(*googleapi.Error).Header. Use
22613// googleapi.IsNotModified to check whether the returned error was
22614// because http.StatusNotModified was returned.
22615func (c *BackendServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*BackendServiceAggregatedList, error) {
22616	gensupport.SetOptions(c.urlParams_, opts...)
22617	res, err := c.doRequest("json")
22618	if res != nil && res.StatusCode == http.StatusNotModified {
22619		if res.Body != nil {
22620			res.Body.Close()
22621		}
22622		return nil, &googleapi.Error{
22623			Code:   res.StatusCode,
22624			Header: res.Header,
22625		}
22626	}
22627	if err != nil {
22628		return nil, err
22629	}
22630	defer googleapi.CloseBody(res)
22631	if err := googleapi.CheckResponse(res); err != nil {
22632		return nil, err
22633	}
22634	ret := &BackendServiceAggregatedList{
22635		ServerResponse: googleapi.ServerResponse{
22636			Header:         res.Header,
22637			HTTPStatusCode: res.StatusCode,
22638		},
22639	}
22640	target := &ret
22641	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
22642		return nil, err
22643	}
22644	return ret, nil
22645	// {
22646	//   "description": "Retrieves the list of all BackendService resources, regional and global, available to the specified project.",
22647	//   "httpMethod": "GET",
22648	//   "id": "compute.backendServices.aggregatedList",
22649	//   "parameterOrder": [
22650	//     "project"
22651	//   ],
22652	//   "parameters": {
22653	//     "filter": {
22654	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
22655	//       "location": "query",
22656	//       "type": "string"
22657	//     },
22658	//     "maxResults": {
22659	//       "default": "500",
22660	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
22661	//       "format": "uint32",
22662	//       "location": "query",
22663	//       "minimum": "0",
22664	//       "type": "integer"
22665	//     },
22666	//     "orderBy": {
22667	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
22668	//       "location": "query",
22669	//       "type": "string"
22670	//     },
22671	//     "pageToken": {
22672	//       "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.",
22673	//       "location": "query",
22674	//       "type": "string"
22675	//     },
22676	//     "project": {
22677	//       "description": "Name of the project scoping this request.",
22678	//       "location": "path",
22679	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22680	//       "required": true,
22681	//       "type": "string"
22682	//     }
22683	//   },
22684	//   "path": "{project}/aggregated/backendServices",
22685	//   "response": {
22686	//     "$ref": "BackendServiceAggregatedList"
22687	//   },
22688	//   "scopes": [
22689	//     "https://www.googleapis.com/auth/cloud-platform",
22690	//     "https://www.googleapis.com/auth/compute",
22691	//     "https://www.googleapis.com/auth/compute.readonly"
22692	//   ]
22693	// }
22694
22695}
22696
22697// Pages invokes f for each page of results.
22698// A non-nil error returned from f will halt the iteration.
22699// The provided context supersedes any context provided to the Context method.
22700func (c *BackendServicesAggregatedListCall) Pages(ctx context.Context, f func(*BackendServiceAggregatedList) error) error {
22701	c.ctx_ = ctx
22702	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
22703	for {
22704		x, err := c.Do()
22705		if err != nil {
22706			return err
22707		}
22708		if err := f(x); err != nil {
22709			return err
22710		}
22711		if x.NextPageToken == "" {
22712			return nil
22713		}
22714		c.PageToken(x.NextPageToken)
22715	}
22716}
22717
22718// method id "compute.backendServices.delete":
22719
22720type BackendServicesDeleteCall struct {
22721	s              *Service
22722	project        string
22723	backendService string
22724	urlParams_     gensupport.URLParams
22725	ctx_           context.Context
22726	header_        http.Header
22727}
22728
22729// Delete: Deletes the specified BackendService resource.
22730// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/delete
22731func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall {
22732	c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22733	c.project = project
22734	c.backendService = backendService
22735	return c
22736}
22737
22738// RequestId sets the optional parameter "requestId": An optional
22739// request ID to identify requests. Specify a unique request ID so that
22740// if you must retry your request, the server will know to ignore the
22741// request if it has already been completed.
22742//
22743// For example, consider a situation where you make an initial request
22744// and the request times out. If you make the request again with the
22745// same request ID, the server can check if original operation with the
22746// same request ID was received, and if so, will ignore the second
22747// request. This prevents clients from accidentally creating duplicate
22748// commitments.
22749//
22750// The request ID must be a valid UUID with the exception that zero UUID
22751// is not supported (00000000-0000-0000-0000-000000000000).
22752func (c *BackendServicesDeleteCall) RequestId(requestId string) *BackendServicesDeleteCall {
22753	c.urlParams_.Set("requestId", requestId)
22754	return c
22755}
22756
22757// Fields allows partial responses to be retrieved. See
22758// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22759// for more information.
22760func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall {
22761	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22762	return c
22763}
22764
22765// Context sets the context to be used in this call's Do method. Any
22766// pending HTTP request will be aborted if the provided context is
22767// canceled.
22768func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall {
22769	c.ctx_ = ctx
22770	return c
22771}
22772
22773// Header returns an http.Header that can be modified by the caller to
22774// add HTTP headers to the request.
22775func (c *BackendServicesDeleteCall) Header() http.Header {
22776	if c.header_ == nil {
22777		c.header_ = make(http.Header)
22778	}
22779	return c.header_
22780}
22781
22782func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
22783	reqHeaders := make(http.Header)
22784	for k, v := range c.header_ {
22785		reqHeaders[k] = v
22786	}
22787	reqHeaders.Set("User-Agent", c.s.userAgent())
22788	var body io.Reader = nil
22789	c.urlParams_.Set("alt", alt)
22790	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
22791	urls += "?" + c.urlParams_.Encode()
22792	req, _ := http.NewRequest("DELETE", urls, body)
22793	req.Header = reqHeaders
22794	googleapi.Expand(req.URL, map[string]string{
22795		"project":        c.project,
22796		"backendService": c.backendService,
22797	})
22798	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22799}
22800
22801// Do executes the "compute.backendServices.delete" call.
22802// Exactly one of *Operation or error will be non-nil. Any non-2xx
22803// status code is an error. Response headers are in either
22804// *Operation.ServerResponse.Header or (if a response was returned at
22805// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22806// to check whether the returned error was because
22807// http.StatusNotModified was returned.
22808func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22809	gensupport.SetOptions(c.urlParams_, opts...)
22810	res, err := c.doRequest("json")
22811	if res != nil && res.StatusCode == http.StatusNotModified {
22812		if res.Body != nil {
22813			res.Body.Close()
22814		}
22815		return nil, &googleapi.Error{
22816			Code:   res.StatusCode,
22817			Header: res.Header,
22818		}
22819	}
22820	if err != nil {
22821		return nil, err
22822	}
22823	defer googleapi.CloseBody(res)
22824	if err := googleapi.CheckResponse(res); err != nil {
22825		return nil, err
22826	}
22827	ret := &Operation{
22828		ServerResponse: googleapi.ServerResponse{
22829			Header:         res.Header,
22830			HTTPStatusCode: res.StatusCode,
22831		},
22832	}
22833	target := &ret
22834	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
22835		return nil, err
22836	}
22837	return ret, nil
22838	// {
22839	//   "description": "Deletes the specified BackendService resource.",
22840	//   "httpMethod": "DELETE",
22841	//   "id": "compute.backendServices.delete",
22842	//   "parameterOrder": [
22843	//     "project",
22844	//     "backendService"
22845	//   ],
22846	//   "parameters": {
22847	//     "backendService": {
22848	//       "description": "Name of the BackendService resource to delete.",
22849	//       "location": "path",
22850	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
22851	//       "required": true,
22852	//       "type": "string"
22853	//     },
22854	//     "project": {
22855	//       "description": "Project ID for this request.",
22856	//       "location": "path",
22857	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22858	//       "required": true,
22859	//       "type": "string"
22860	//     },
22861	//     "requestId": {
22862	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
22863	//       "location": "query",
22864	//       "type": "string"
22865	//     }
22866	//   },
22867	//   "path": "{project}/global/backendServices/{backendService}",
22868	//   "response": {
22869	//     "$ref": "Operation"
22870	//   },
22871	//   "scopes": [
22872	//     "https://www.googleapis.com/auth/cloud-platform",
22873	//     "https://www.googleapis.com/auth/compute"
22874	//   ]
22875	// }
22876
22877}
22878
22879// method id "compute.backendServices.get":
22880
22881type BackendServicesGetCall struct {
22882	s              *Service
22883	project        string
22884	backendService string
22885	urlParams_     gensupport.URLParams
22886	ifNoneMatch_   string
22887	ctx_           context.Context
22888	header_        http.Header
22889}
22890
22891// Get: Returns the specified BackendService resource. Get a list of
22892// available backend services by making a list() request.
22893// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get
22894func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall {
22895	c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22896	c.project = project
22897	c.backendService = backendService
22898	return c
22899}
22900
22901// Fields allows partial responses to be retrieved. See
22902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22903// for more information.
22904func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall {
22905	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22906	return c
22907}
22908
22909// IfNoneMatch sets the optional parameter which makes the operation
22910// fail if the object's ETag matches the given value. This is useful for
22911// getting updates only after the object has changed since the last
22912// request. Use googleapi.IsNotModified to check whether the response
22913// error from Do is the result of In-None-Match.
22914func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall {
22915	c.ifNoneMatch_ = entityTag
22916	return c
22917}
22918
22919// Context sets the context to be used in this call's Do method. Any
22920// pending HTTP request will be aborted if the provided context is
22921// canceled.
22922func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall {
22923	c.ctx_ = ctx
22924	return c
22925}
22926
22927// Header returns an http.Header that can be modified by the caller to
22928// add HTTP headers to the request.
22929func (c *BackendServicesGetCall) Header() http.Header {
22930	if c.header_ == nil {
22931		c.header_ = make(http.Header)
22932	}
22933	return c.header_
22934}
22935
22936func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) {
22937	reqHeaders := make(http.Header)
22938	for k, v := range c.header_ {
22939		reqHeaders[k] = v
22940	}
22941	reqHeaders.Set("User-Agent", c.s.userAgent())
22942	if c.ifNoneMatch_ != "" {
22943		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
22944	}
22945	var body io.Reader = nil
22946	c.urlParams_.Set("alt", alt)
22947	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
22948	urls += "?" + c.urlParams_.Encode()
22949	req, _ := http.NewRequest("GET", urls, body)
22950	req.Header = reqHeaders
22951	googleapi.Expand(req.URL, map[string]string{
22952		"project":        c.project,
22953		"backendService": c.backendService,
22954	})
22955	return gensupport.SendRequest(c.ctx_, c.s.client, req)
22956}
22957
22958// Do executes the "compute.backendServices.get" call.
22959// Exactly one of *BackendService or error will be non-nil. Any non-2xx
22960// status code is an error. Response headers are in either
22961// *BackendService.ServerResponse.Header or (if a response was returned
22962// at all) in error.(*googleapi.Error).Header. Use
22963// googleapi.IsNotModified to check whether the returned error was
22964// because http.StatusNotModified was returned.
22965func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) {
22966	gensupport.SetOptions(c.urlParams_, opts...)
22967	res, err := c.doRequest("json")
22968	if res != nil && res.StatusCode == http.StatusNotModified {
22969		if res.Body != nil {
22970			res.Body.Close()
22971		}
22972		return nil, &googleapi.Error{
22973			Code:   res.StatusCode,
22974			Header: res.Header,
22975		}
22976	}
22977	if err != nil {
22978		return nil, err
22979	}
22980	defer googleapi.CloseBody(res)
22981	if err := googleapi.CheckResponse(res); err != nil {
22982		return nil, err
22983	}
22984	ret := &BackendService{
22985		ServerResponse: googleapi.ServerResponse{
22986			Header:         res.Header,
22987			HTTPStatusCode: res.StatusCode,
22988		},
22989	}
22990	target := &ret
22991	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
22992		return nil, err
22993	}
22994	return ret, nil
22995	// {
22996	//   "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.",
22997	//   "httpMethod": "GET",
22998	//   "id": "compute.backendServices.get",
22999	//   "parameterOrder": [
23000	//     "project",
23001	//     "backendService"
23002	//   ],
23003	//   "parameters": {
23004	//     "backendService": {
23005	//       "description": "Name of the BackendService resource to return.",
23006	//       "location": "path",
23007	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
23008	//       "required": true,
23009	//       "type": "string"
23010	//     },
23011	//     "project": {
23012	//       "description": "Project ID for this request.",
23013	//       "location": "path",
23014	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23015	//       "required": true,
23016	//       "type": "string"
23017	//     }
23018	//   },
23019	//   "path": "{project}/global/backendServices/{backendService}",
23020	//   "response": {
23021	//     "$ref": "BackendService"
23022	//   },
23023	//   "scopes": [
23024	//     "https://www.googleapis.com/auth/cloud-platform",
23025	//     "https://www.googleapis.com/auth/compute",
23026	//     "https://www.googleapis.com/auth/compute.readonly"
23027	//   ]
23028	// }
23029
23030}
23031
23032// method id "compute.backendServices.getHealth":
23033
23034type BackendServicesGetHealthCall struct {
23035	s                      *Service
23036	project                string
23037	backendService         string
23038	resourcegroupreference *ResourceGroupReference
23039	urlParams_             gensupport.URLParams
23040	ctx_                   context.Context
23041	header_                http.Header
23042}
23043
23044// GetHealth: Gets the most recent health check results for this
23045// BackendService.
23046// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/getHealth
23047func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall {
23048	c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23049	c.project = project
23050	c.backendService = backendService
23051	c.resourcegroupreference = resourcegroupreference
23052	return c
23053}
23054
23055// Fields allows partial responses to be retrieved. See
23056// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23057// for more information.
23058func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall {
23059	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23060	return c
23061}
23062
23063// Context sets the context to be used in this call's Do method. Any
23064// pending HTTP request will be aborted if the provided context is
23065// canceled.
23066func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall {
23067	c.ctx_ = ctx
23068	return c
23069}
23070
23071// Header returns an http.Header that can be modified by the caller to
23072// add HTTP headers to the request.
23073func (c *BackendServicesGetHealthCall) Header() http.Header {
23074	if c.header_ == nil {
23075		c.header_ = make(http.Header)
23076	}
23077	return c.header_
23078}
23079
23080func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) {
23081	reqHeaders := make(http.Header)
23082	for k, v := range c.header_ {
23083		reqHeaders[k] = v
23084	}
23085	reqHeaders.Set("User-Agent", c.s.userAgent())
23086	var body io.Reader = nil
23087	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference)
23088	if err != nil {
23089		return nil, err
23090	}
23091	reqHeaders.Set("Content-Type", "application/json")
23092	c.urlParams_.Set("alt", alt)
23093	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth")
23094	urls += "?" + c.urlParams_.Encode()
23095	req, _ := http.NewRequest("POST", urls, body)
23096	req.Header = reqHeaders
23097	googleapi.Expand(req.URL, map[string]string{
23098		"project":        c.project,
23099		"backendService": c.backendService,
23100	})
23101	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23102}
23103
23104// Do executes the "compute.backendServices.getHealth" call.
23105// Exactly one of *BackendServiceGroupHealth or error will be non-nil.
23106// Any non-2xx status code is an error. Response headers are in either
23107// *BackendServiceGroupHealth.ServerResponse.Header or (if a response
23108// was returned at all) in error.(*googleapi.Error).Header. Use
23109// googleapi.IsNotModified to check whether the returned error was
23110// because http.StatusNotModified was returned.
23111func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) {
23112	gensupport.SetOptions(c.urlParams_, opts...)
23113	res, err := c.doRequest("json")
23114	if res != nil && res.StatusCode == http.StatusNotModified {
23115		if res.Body != nil {
23116			res.Body.Close()
23117		}
23118		return nil, &googleapi.Error{
23119			Code:   res.StatusCode,
23120			Header: res.Header,
23121		}
23122	}
23123	if err != nil {
23124		return nil, err
23125	}
23126	defer googleapi.CloseBody(res)
23127	if err := googleapi.CheckResponse(res); err != nil {
23128		return nil, err
23129	}
23130	ret := &BackendServiceGroupHealth{
23131		ServerResponse: googleapi.ServerResponse{
23132			Header:         res.Header,
23133			HTTPStatusCode: res.StatusCode,
23134		},
23135	}
23136	target := &ret
23137	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
23138		return nil, err
23139	}
23140	return ret, nil
23141	// {
23142	//   "description": "Gets the most recent health check results for this BackendService.",
23143	//   "httpMethod": "POST",
23144	//   "id": "compute.backendServices.getHealth",
23145	//   "parameterOrder": [
23146	//     "project",
23147	//     "backendService"
23148	//   ],
23149	//   "parameters": {
23150	//     "backendService": {
23151	//       "description": "Name of the BackendService resource to which the queried instance belongs.",
23152	//       "location": "path",
23153	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
23154	//       "required": true,
23155	//       "type": "string"
23156	//     },
23157	//     "project": {
23158	//       "location": "path",
23159	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23160	//       "required": true,
23161	//       "type": "string"
23162	//     }
23163	//   },
23164	//   "path": "{project}/global/backendServices/{backendService}/getHealth",
23165	//   "request": {
23166	//     "$ref": "ResourceGroupReference"
23167	//   },
23168	//   "response": {
23169	//     "$ref": "BackendServiceGroupHealth"
23170	//   },
23171	//   "scopes": [
23172	//     "https://www.googleapis.com/auth/cloud-platform",
23173	//     "https://www.googleapis.com/auth/compute",
23174	//     "https://www.googleapis.com/auth/compute.readonly"
23175	//   ]
23176	// }
23177
23178}
23179
23180// method id "compute.backendServices.insert":
23181
23182type BackendServicesInsertCall struct {
23183	s              *Service
23184	project        string
23185	backendservice *BackendService
23186	urlParams_     gensupport.URLParams
23187	ctx_           context.Context
23188	header_        http.Header
23189}
23190
23191// Insert: Creates a BackendService resource in the specified project
23192// using the data included in the request. There are several
23193// restrictions and guidelines to keep in mind when creating a backend
23194// service. Read  Restrictions and Guidelines for more information.
23195// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert
23196func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall {
23197	c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23198	c.project = project
23199	c.backendservice = backendservice
23200	return c
23201}
23202
23203// RequestId sets the optional parameter "requestId": An optional
23204// request ID to identify requests. Specify a unique request ID so that
23205// if you must retry your request, the server will know to ignore the
23206// request if it has already been completed.
23207//
23208// For example, consider a situation where you make an initial request
23209// and the request times out. If you make the request again with the
23210// same request ID, the server can check if original operation with the
23211// same request ID was received, and if so, will ignore the second
23212// request. This prevents clients from accidentally creating duplicate
23213// commitments.
23214//
23215// The request ID must be a valid UUID with the exception that zero UUID
23216// is not supported (00000000-0000-0000-0000-000000000000).
23217func (c *BackendServicesInsertCall) RequestId(requestId string) *BackendServicesInsertCall {
23218	c.urlParams_.Set("requestId", requestId)
23219	return c
23220}
23221
23222// Fields allows partial responses to be retrieved. See
23223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23224// for more information.
23225func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall {
23226	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23227	return c
23228}
23229
23230// Context sets the context to be used in this call's Do method. Any
23231// pending HTTP request will be aborted if the provided context is
23232// canceled.
23233func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall {
23234	c.ctx_ = ctx
23235	return c
23236}
23237
23238// Header returns an http.Header that can be modified by the caller to
23239// add HTTP headers to the request.
23240func (c *BackendServicesInsertCall) Header() http.Header {
23241	if c.header_ == nil {
23242		c.header_ = make(http.Header)
23243	}
23244	return c.header_
23245}
23246
23247func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) {
23248	reqHeaders := make(http.Header)
23249	for k, v := range c.header_ {
23250		reqHeaders[k] = v
23251	}
23252	reqHeaders.Set("User-Agent", c.s.userAgent())
23253	var body io.Reader = nil
23254	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
23255	if err != nil {
23256		return nil, err
23257	}
23258	reqHeaders.Set("Content-Type", "application/json")
23259	c.urlParams_.Set("alt", alt)
23260	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices")
23261	urls += "?" + c.urlParams_.Encode()
23262	req, _ := http.NewRequest("POST", urls, body)
23263	req.Header = reqHeaders
23264	googleapi.Expand(req.URL, map[string]string{
23265		"project": c.project,
23266	})
23267	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23268}
23269
23270// Do executes the "compute.backendServices.insert" call.
23271// Exactly one of *Operation or error will be non-nil. Any non-2xx
23272// status code is an error. Response headers are in either
23273// *Operation.ServerResponse.Header or (if a response was returned at
23274// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23275// to check whether the returned error was because
23276// http.StatusNotModified was returned.
23277func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23278	gensupport.SetOptions(c.urlParams_, opts...)
23279	res, err := c.doRequest("json")
23280	if res != nil && res.StatusCode == http.StatusNotModified {
23281		if res.Body != nil {
23282			res.Body.Close()
23283		}
23284		return nil, &googleapi.Error{
23285			Code:   res.StatusCode,
23286			Header: res.Header,
23287		}
23288	}
23289	if err != nil {
23290		return nil, err
23291	}
23292	defer googleapi.CloseBody(res)
23293	if err := googleapi.CheckResponse(res); err != nil {
23294		return nil, err
23295	}
23296	ret := &Operation{
23297		ServerResponse: googleapi.ServerResponse{
23298			Header:         res.Header,
23299			HTTPStatusCode: res.StatusCode,
23300		},
23301	}
23302	target := &ret
23303	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
23304		return nil, err
23305	}
23306	return ret, nil
23307	// {
23308	//   "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.",
23309	//   "httpMethod": "POST",
23310	//   "id": "compute.backendServices.insert",
23311	//   "parameterOrder": [
23312	//     "project"
23313	//   ],
23314	//   "parameters": {
23315	//     "project": {
23316	//       "description": "Project ID for this request.",
23317	//       "location": "path",
23318	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23319	//       "required": true,
23320	//       "type": "string"
23321	//     },
23322	//     "requestId": {
23323	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
23324	//       "location": "query",
23325	//       "type": "string"
23326	//     }
23327	//   },
23328	//   "path": "{project}/global/backendServices",
23329	//   "request": {
23330	//     "$ref": "BackendService"
23331	//   },
23332	//   "response": {
23333	//     "$ref": "Operation"
23334	//   },
23335	//   "scopes": [
23336	//     "https://www.googleapis.com/auth/cloud-platform",
23337	//     "https://www.googleapis.com/auth/compute"
23338	//   ]
23339	// }
23340
23341}
23342
23343// method id "compute.backendServices.list":
23344
23345type BackendServicesListCall struct {
23346	s            *Service
23347	project      string
23348	urlParams_   gensupport.URLParams
23349	ifNoneMatch_ string
23350	ctx_         context.Context
23351	header_      http.Header
23352}
23353
23354// List: Retrieves the list of BackendService resources available to the
23355// specified project.
23356// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/list
23357func (r *BackendServicesService) List(project string) *BackendServicesListCall {
23358	c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23359	c.project = project
23360	return c
23361}
23362
23363// Filter sets the optional parameter "filter": Sets a filter
23364// {expression} for filtering listed resources. Your {expression} must
23365// be in the format: field_name comparison_string literal_string.
23366//
23367// The field_name is the name of the field you want to compare. Only
23368// atomic field types are supported (string, number, boolean). The
23369// comparison_string must be either eq (equals) or ne (not equals). The
23370// literal_string is the string value to filter to. The literal value
23371// must be valid for the type of field you are filtering by (string,
23372// number, boolean). For string fields, the literal value is interpreted
23373// as a regular expression using RE2 syntax. The literal value must
23374// match the entire field.
23375//
23376// For example, to filter for instances that do not have a name of
23377// example-instance, you would use name ne example-instance.
23378//
23379// You can filter on nested fields. For example, you could filter on
23380// instances that have set the scheduling.automaticRestart field to
23381// true. Use filtering on nested fields to take advantage of labels to
23382// organize and search for results based on label values.
23383//
23384// To filter on multiple expressions, provide each separate expression
23385// within parentheses. For example, (scheduling.automaticRestart eq
23386// true) (zone eq us-central1-f). Multiple expressions are treated as
23387// AND expressions, meaning that resources must match all expressions to
23388// pass the filters.
23389func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall {
23390	c.urlParams_.Set("filter", filter)
23391	return c
23392}
23393
23394// MaxResults sets the optional parameter "maxResults": The maximum
23395// number of results per page that should be returned. If the number of
23396// available results is larger than maxResults, Compute Engine returns a
23397// nextPageToken that can be used to get the next page of results in
23398// subsequent list requests. Acceptable values are 0 to 500, inclusive.
23399// (Default: 500)
23400func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall {
23401	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23402	return c
23403}
23404
23405// OrderBy sets the optional parameter "orderBy": Sorts list results by
23406// a certain order. By default, results are returned in alphanumerical
23407// order based on the resource name.
23408//
23409// You can also sort results in descending order based on the creation
23410// timestamp using orderBy="creationTimestamp desc". This sorts results
23411// based on the creationTimestamp field in reverse chronological order
23412// (newest result first). Use this to sort resources like operations so
23413// that the newest operation is returned first.
23414//
23415// Currently, only sorting by name or creationTimestamp desc is
23416// supported.
23417func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall {
23418	c.urlParams_.Set("orderBy", orderBy)
23419	return c
23420}
23421
23422// PageToken sets the optional parameter "pageToken": Specifies a page
23423// token to use. Set pageToken to the nextPageToken returned by a
23424// previous list request to get the next page of results.
23425func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall {
23426	c.urlParams_.Set("pageToken", pageToken)
23427	return c
23428}
23429
23430// Fields allows partial responses to be retrieved. See
23431// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23432// for more information.
23433func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall {
23434	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23435	return c
23436}
23437
23438// IfNoneMatch sets the optional parameter which makes the operation
23439// fail if the object's ETag matches the given value. This is useful for
23440// getting updates only after the object has changed since the last
23441// request. Use googleapi.IsNotModified to check whether the response
23442// error from Do is the result of In-None-Match.
23443func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall {
23444	c.ifNoneMatch_ = entityTag
23445	return c
23446}
23447
23448// Context sets the context to be used in this call's Do method. Any
23449// pending HTTP request will be aborted if the provided context is
23450// canceled.
23451func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall {
23452	c.ctx_ = ctx
23453	return c
23454}
23455
23456// Header returns an http.Header that can be modified by the caller to
23457// add HTTP headers to the request.
23458func (c *BackendServicesListCall) Header() http.Header {
23459	if c.header_ == nil {
23460		c.header_ = make(http.Header)
23461	}
23462	return c.header_
23463}
23464
23465func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) {
23466	reqHeaders := make(http.Header)
23467	for k, v := range c.header_ {
23468		reqHeaders[k] = v
23469	}
23470	reqHeaders.Set("User-Agent", c.s.userAgent())
23471	if c.ifNoneMatch_ != "" {
23472		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
23473	}
23474	var body io.Reader = nil
23475	c.urlParams_.Set("alt", alt)
23476	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices")
23477	urls += "?" + c.urlParams_.Encode()
23478	req, _ := http.NewRequest("GET", urls, body)
23479	req.Header = reqHeaders
23480	googleapi.Expand(req.URL, map[string]string{
23481		"project": c.project,
23482	})
23483	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23484}
23485
23486// Do executes the "compute.backendServices.list" call.
23487// Exactly one of *BackendServiceList or error will be non-nil. Any
23488// non-2xx status code is an error. Response headers are in either
23489// *BackendServiceList.ServerResponse.Header or (if a response was
23490// returned at all) in error.(*googleapi.Error).Header. Use
23491// googleapi.IsNotModified to check whether the returned error was
23492// because http.StatusNotModified was returned.
23493func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) {
23494	gensupport.SetOptions(c.urlParams_, opts...)
23495	res, err := c.doRequest("json")
23496	if res != nil && res.StatusCode == http.StatusNotModified {
23497		if res.Body != nil {
23498			res.Body.Close()
23499		}
23500		return nil, &googleapi.Error{
23501			Code:   res.StatusCode,
23502			Header: res.Header,
23503		}
23504	}
23505	if err != nil {
23506		return nil, err
23507	}
23508	defer googleapi.CloseBody(res)
23509	if err := googleapi.CheckResponse(res); err != nil {
23510		return nil, err
23511	}
23512	ret := &BackendServiceList{
23513		ServerResponse: googleapi.ServerResponse{
23514			Header:         res.Header,
23515			HTTPStatusCode: res.StatusCode,
23516		},
23517	}
23518	target := &ret
23519	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
23520		return nil, err
23521	}
23522	return ret, nil
23523	// {
23524	//   "description": "Retrieves the list of BackendService resources available to the specified project.",
23525	//   "httpMethod": "GET",
23526	//   "id": "compute.backendServices.list",
23527	//   "parameterOrder": [
23528	//     "project"
23529	//   ],
23530	//   "parameters": {
23531	//     "filter": {
23532	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
23533	//       "location": "query",
23534	//       "type": "string"
23535	//     },
23536	//     "maxResults": {
23537	//       "default": "500",
23538	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
23539	//       "format": "uint32",
23540	//       "location": "query",
23541	//       "minimum": "0",
23542	//       "type": "integer"
23543	//     },
23544	//     "orderBy": {
23545	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
23546	//       "location": "query",
23547	//       "type": "string"
23548	//     },
23549	//     "pageToken": {
23550	//       "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.",
23551	//       "location": "query",
23552	//       "type": "string"
23553	//     },
23554	//     "project": {
23555	//       "description": "Project ID for this request.",
23556	//       "location": "path",
23557	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23558	//       "required": true,
23559	//       "type": "string"
23560	//     }
23561	//   },
23562	//   "path": "{project}/global/backendServices",
23563	//   "response": {
23564	//     "$ref": "BackendServiceList"
23565	//   },
23566	//   "scopes": [
23567	//     "https://www.googleapis.com/auth/cloud-platform",
23568	//     "https://www.googleapis.com/auth/compute",
23569	//     "https://www.googleapis.com/auth/compute.readonly"
23570	//   ]
23571	// }
23572
23573}
23574
23575// Pages invokes f for each page of results.
23576// A non-nil error returned from f will halt the iteration.
23577// The provided context supersedes any context provided to the Context method.
23578func (c *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error {
23579	c.ctx_ = ctx
23580	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23581	for {
23582		x, err := c.Do()
23583		if err != nil {
23584			return err
23585		}
23586		if err := f(x); err != nil {
23587			return err
23588		}
23589		if x.NextPageToken == "" {
23590			return nil
23591		}
23592		c.PageToken(x.NextPageToken)
23593	}
23594}
23595
23596// method id "compute.backendServices.patch":
23597
23598type BackendServicesPatchCall struct {
23599	s              *Service
23600	project        string
23601	backendService string
23602	backendservice *BackendService
23603	urlParams_     gensupport.URLParams
23604	ctx_           context.Context
23605	header_        http.Header
23606}
23607
23608// Patch: Patches the specified BackendService resource with the data
23609// included in the request. There are several restrictions and
23610// guidelines to keep in mind when updating a backend service. Read
23611// Restrictions and Guidelines for more information. This method
23612// supports PATCH semantics and uses the JSON merge patch format and
23613// processing rules.
23614// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch
23615func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall {
23616	c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23617	c.project = project
23618	c.backendService = backendService
23619	c.backendservice = backendservice
23620	return c
23621}
23622
23623// RequestId sets the optional parameter "requestId": An optional
23624// request ID to identify requests. Specify a unique request ID so that
23625// if you must retry your request, the server will know to ignore the
23626// request if it has already been completed.
23627//
23628// For example, consider a situation where you make an initial request
23629// and the request times out. If you make the request again with the
23630// same request ID, the server can check if original operation with the
23631// same request ID was received, and if so, will ignore the second
23632// request. This prevents clients from accidentally creating duplicate
23633// commitments.
23634//
23635// The request ID must be a valid UUID with the exception that zero UUID
23636// is not supported (00000000-0000-0000-0000-000000000000).
23637func (c *BackendServicesPatchCall) RequestId(requestId string) *BackendServicesPatchCall {
23638	c.urlParams_.Set("requestId", requestId)
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 *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall {
23646	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23647	return c
23648}
23649
23650// Context sets the context to be used in this call's Do method. Any
23651// pending HTTP request will be aborted if the provided context is
23652// canceled.
23653func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall {
23654	c.ctx_ = ctx
23655	return c
23656}
23657
23658// Header returns an http.Header that can be modified by the caller to
23659// add HTTP headers to the request.
23660func (c *BackendServicesPatchCall) Header() http.Header {
23661	if c.header_ == nil {
23662		c.header_ = make(http.Header)
23663	}
23664	return c.header_
23665}
23666
23667func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) {
23668	reqHeaders := make(http.Header)
23669	for k, v := range c.header_ {
23670		reqHeaders[k] = v
23671	}
23672	reqHeaders.Set("User-Agent", c.s.userAgent())
23673	var body io.Reader = nil
23674	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
23675	if err != nil {
23676		return nil, err
23677	}
23678	reqHeaders.Set("Content-Type", "application/json")
23679	c.urlParams_.Set("alt", alt)
23680	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
23681	urls += "?" + c.urlParams_.Encode()
23682	req, _ := http.NewRequest("PATCH", urls, body)
23683	req.Header = reqHeaders
23684	googleapi.Expand(req.URL, map[string]string{
23685		"project":        c.project,
23686		"backendService": c.backendService,
23687	})
23688	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23689}
23690
23691// Do executes the "compute.backendServices.patch" call.
23692// Exactly one of *Operation or error will be non-nil. Any non-2xx
23693// status code is an error. Response headers are in either
23694// *Operation.ServerResponse.Header or (if a response was returned at
23695// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23696// to check whether the returned error was because
23697// http.StatusNotModified was returned.
23698func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23699	gensupport.SetOptions(c.urlParams_, opts...)
23700	res, err := c.doRequest("json")
23701	if res != nil && res.StatusCode == http.StatusNotModified {
23702		if res.Body != nil {
23703			res.Body.Close()
23704		}
23705		return nil, &googleapi.Error{
23706			Code:   res.StatusCode,
23707			Header: res.Header,
23708		}
23709	}
23710	if err != nil {
23711		return nil, err
23712	}
23713	defer googleapi.CloseBody(res)
23714	if err := googleapi.CheckResponse(res); err != nil {
23715		return nil, err
23716	}
23717	ret := &Operation{
23718		ServerResponse: googleapi.ServerResponse{
23719			Header:         res.Header,
23720			HTTPStatusCode: res.StatusCode,
23721		},
23722	}
23723	target := &ret
23724	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
23725		return nil, err
23726	}
23727	return ret, nil
23728	// {
23729	//   "description": "Patches the specified BackendService resource with the data included in the request. 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 and uses the JSON merge patch format and processing rules.",
23730	//   "httpMethod": "PATCH",
23731	//   "id": "compute.backendServices.patch",
23732	//   "parameterOrder": [
23733	//     "project",
23734	//     "backendService"
23735	//   ],
23736	//   "parameters": {
23737	//     "backendService": {
23738	//       "description": "Name of the BackendService resource to patch.",
23739	//       "location": "path",
23740	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
23741	//       "required": true,
23742	//       "type": "string"
23743	//     },
23744	//     "project": {
23745	//       "description": "Project ID for this request.",
23746	//       "location": "path",
23747	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23748	//       "required": true,
23749	//       "type": "string"
23750	//     },
23751	//     "requestId": {
23752	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
23753	//       "location": "query",
23754	//       "type": "string"
23755	//     }
23756	//   },
23757	//   "path": "{project}/global/backendServices/{backendService}",
23758	//   "request": {
23759	//     "$ref": "BackendService"
23760	//   },
23761	//   "response": {
23762	//     "$ref": "Operation"
23763	//   },
23764	//   "scopes": [
23765	//     "https://www.googleapis.com/auth/cloud-platform",
23766	//     "https://www.googleapis.com/auth/compute"
23767	//   ]
23768	// }
23769
23770}
23771
23772// method id "compute.backendServices.setSecurityPolicy":
23773
23774type BackendServicesSetSecurityPolicyCall struct {
23775	s                       *Service
23776	project                 string
23777	backendService          string
23778	securitypolicyreference *SecurityPolicyReference
23779	urlParams_              gensupport.URLParams
23780	ctx_                    context.Context
23781	header_                 http.Header
23782}
23783
23784// SetSecurityPolicy: Sets the security policy for the specified backend
23785// service.
23786func (r *BackendServicesService) SetSecurityPolicy(project string, backendService string, securitypolicyreference *SecurityPolicyReference) *BackendServicesSetSecurityPolicyCall {
23787	c := &BackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23788	c.project = project
23789	c.backendService = backendService
23790	c.securitypolicyreference = securitypolicyreference
23791	return c
23792}
23793
23794// RequestId sets the optional parameter "requestId": An optional
23795// request ID to identify requests. Specify a unique request ID so that
23796// if you must retry your request, the server will know to ignore the
23797// request if it has already been completed.
23798//
23799// For example, consider a situation where you make an initial request
23800// and the request times out. If you make the request again with the
23801// same request ID, the server can check if original operation with the
23802// same request ID was received, and if so, will ignore the second
23803// request. This prevents clients from accidentally creating duplicate
23804// commitments.
23805//
23806// The request ID must be a valid UUID with the exception that zero UUID
23807// is not supported (00000000-0000-0000-0000-000000000000).
23808func (c *BackendServicesSetSecurityPolicyCall) RequestId(requestId string) *BackendServicesSetSecurityPolicyCall {
23809	c.urlParams_.Set("requestId", requestId)
23810	return c
23811}
23812
23813// Fields allows partial responses to be retrieved. See
23814// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23815// for more information.
23816func (c *BackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *BackendServicesSetSecurityPolicyCall {
23817	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23818	return c
23819}
23820
23821// Context sets the context to be used in this call's Do method. Any
23822// pending HTTP request will be aborted if the provided context is
23823// canceled.
23824func (c *BackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *BackendServicesSetSecurityPolicyCall {
23825	c.ctx_ = ctx
23826	return c
23827}
23828
23829// Header returns an http.Header that can be modified by the caller to
23830// add HTTP headers to the request.
23831func (c *BackendServicesSetSecurityPolicyCall) Header() http.Header {
23832	if c.header_ == nil {
23833		c.header_ = make(http.Header)
23834	}
23835	return c.header_
23836}
23837
23838func (c *BackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) {
23839	reqHeaders := make(http.Header)
23840	for k, v := range c.header_ {
23841		reqHeaders[k] = v
23842	}
23843	reqHeaders.Set("User-Agent", c.s.userAgent())
23844	var body io.Reader = nil
23845	body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference)
23846	if err != nil {
23847		return nil, err
23848	}
23849	reqHeaders.Set("Content-Type", "application/json")
23850	c.urlParams_.Set("alt", alt)
23851	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/setSecurityPolicy")
23852	urls += "?" + c.urlParams_.Encode()
23853	req, _ := http.NewRequest("POST", urls, body)
23854	req.Header = reqHeaders
23855	googleapi.Expand(req.URL, map[string]string{
23856		"project":        c.project,
23857		"backendService": c.backendService,
23858	})
23859	return gensupport.SendRequest(c.ctx_, c.s.client, req)
23860}
23861
23862// Do executes the "compute.backendServices.setSecurityPolicy" call.
23863// Exactly one of *Operation or error will be non-nil. Any non-2xx
23864// status code is an error. Response headers are in either
23865// *Operation.ServerResponse.Header or (if a response was returned at
23866// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23867// to check whether the returned error was because
23868// http.StatusNotModified was returned.
23869func (c *BackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23870	gensupport.SetOptions(c.urlParams_, opts...)
23871	res, err := c.doRequest("json")
23872	if res != nil && res.StatusCode == http.StatusNotModified {
23873		if res.Body != nil {
23874			res.Body.Close()
23875		}
23876		return nil, &googleapi.Error{
23877			Code:   res.StatusCode,
23878			Header: res.Header,
23879		}
23880	}
23881	if err != nil {
23882		return nil, err
23883	}
23884	defer googleapi.CloseBody(res)
23885	if err := googleapi.CheckResponse(res); err != nil {
23886		return nil, err
23887	}
23888	ret := &Operation{
23889		ServerResponse: googleapi.ServerResponse{
23890			Header:         res.Header,
23891			HTTPStatusCode: res.StatusCode,
23892		},
23893	}
23894	target := &ret
23895	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
23896		return nil, err
23897	}
23898	return ret, nil
23899	// {
23900	//   "description": "Sets the security policy for the specified backend service.",
23901	//   "httpMethod": "POST",
23902	//   "id": "compute.backendServices.setSecurityPolicy",
23903	//   "parameterOrder": [
23904	//     "project",
23905	//     "backendService"
23906	//   ],
23907	//   "parameters": {
23908	//     "backendService": {
23909	//       "description": "Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035.",
23910	//       "location": "path",
23911	//       "required": true,
23912	//       "type": "string"
23913	//     },
23914	//     "project": {
23915	//       "description": "Project ID for this request.",
23916	//       "location": "path",
23917	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23918	//       "required": true,
23919	//       "type": "string"
23920	//     },
23921	//     "requestId": {
23922	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
23923	//       "location": "query",
23924	//       "type": "string"
23925	//     }
23926	//   },
23927	//   "path": "{project}/global/backendServices/{backendService}/setSecurityPolicy",
23928	//   "request": {
23929	//     "$ref": "SecurityPolicyReference"
23930	//   },
23931	//   "response": {
23932	//     "$ref": "Operation"
23933	//   },
23934	//   "scopes": [
23935	//     "https://www.googleapis.com/auth/cloud-platform",
23936	//     "https://www.googleapis.com/auth/compute"
23937	//   ]
23938	// }
23939
23940}
23941
23942// method id "compute.backendServices.testIamPermissions":
23943
23944type BackendServicesTestIamPermissionsCall struct {
23945	s                      *Service
23946	project                string
23947	resource               string
23948	testpermissionsrequest *TestPermissionsRequest
23949	urlParams_             gensupport.URLParams
23950	ctx_                   context.Context
23951	header_                http.Header
23952}
23953
23954// TestIamPermissions: Returns permissions that a caller has on the
23955// specified resource.
23956func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall {
23957	c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23958	c.project = project
23959	c.resource = resource
23960	c.testpermissionsrequest = testpermissionsrequest
23961	return c
23962}
23963
23964// Fields allows partial responses to be retrieved. See
23965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23966// for more information.
23967func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall {
23968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23969	return c
23970}
23971
23972// Context sets the context to be used in this call's Do method. Any
23973// pending HTTP request will be aborted if the provided context is
23974// canceled.
23975func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall {
23976	c.ctx_ = ctx
23977	return c
23978}
23979
23980// Header returns an http.Header that can be modified by the caller to
23981// add HTTP headers to the request.
23982func (c *BackendServicesTestIamPermissionsCall) Header() http.Header {
23983	if c.header_ == nil {
23984		c.header_ = make(http.Header)
23985	}
23986	return c.header_
23987}
23988
23989func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
23990	reqHeaders := make(http.Header)
23991	for k, v := range c.header_ {
23992		reqHeaders[k] = v
23993	}
23994	reqHeaders.Set("User-Agent", c.s.userAgent())
23995	var body io.Reader = nil
23996	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
23997	if err != nil {
23998		return nil, err
23999	}
24000	reqHeaders.Set("Content-Type", "application/json")
24001	c.urlParams_.Set("alt", alt)
24002	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{resource}/testIamPermissions")
24003	urls += "?" + c.urlParams_.Encode()
24004	req, _ := http.NewRequest("POST", urls, body)
24005	req.Header = reqHeaders
24006	googleapi.Expand(req.URL, map[string]string{
24007		"project":  c.project,
24008		"resource": c.resource,
24009	})
24010	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24011}
24012
24013// Do executes the "compute.backendServices.testIamPermissions" call.
24014// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
24015// non-2xx status code is an error. Response headers are in either
24016// *TestPermissionsResponse.ServerResponse.Header or (if a response was
24017// returned at all) in error.(*googleapi.Error).Header. Use
24018// googleapi.IsNotModified to check whether the returned error was
24019// because http.StatusNotModified was returned.
24020func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
24021	gensupport.SetOptions(c.urlParams_, opts...)
24022	res, err := c.doRequest("json")
24023	if res != nil && res.StatusCode == http.StatusNotModified {
24024		if res.Body != nil {
24025			res.Body.Close()
24026		}
24027		return nil, &googleapi.Error{
24028			Code:   res.StatusCode,
24029			Header: res.Header,
24030		}
24031	}
24032	if err != nil {
24033		return nil, err
24034	}
24035	defer googleapi.CloseBody(res)
24036	if err := googleapi.CheckResponse(res); err != nil {
24037		return nil, err
24038	}
24039	ret := &TestPermissionsResponse{
24040		ServerResponse: googleapi.ServerResponse{
24041			Header:         res.Header,
24042			HTTPStatusCode: res.StatusCode,
24043		},
24044	}
24045	target := &ret
24046	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
24047		return nil, err
24048	}
24049	return ret, nil
24050	// {
24051	//   "description": "Returns permissions that a caller has on the specified resource.",
24052	//   "httpMethod": "POST",
24053	//   "id": "compute.backendServices.testIamPermissions",
24054	//   "parameterOrder": [
24055	//     "project",
24056	//     "resource"
24057	//   ],
24058	//   "parameters": {
24059	//     "project": {
24060	//       "description": "Project ID for this request.",
24061	//       "location": "path",
24062	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24063	//       "required": true,
24064	//       "type": "string"
24065	//     },
24066	//     "resource": {
24067	//       "description": "Name of the resource for this request.",
24068	//       "location": "path",
24069	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
24070	//       "required": true,
24071	//       "type": "string"
24072	//     }
24073	//   },
24074	//   "path": "{project}/global/backendServices/{resource}/testIamPermissions",
24075	//   "request": {
24076	//     "$ref": "TestPermissionsRequest"
24077	//   },
24078	//   "response": {
24079	//     "$ref": "TestPermissionsResponse"
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// method id "compute.backendServices.update":
24091
24092type BackendServicesUpdateCall struct {
24093	s              *Service
24094	project        string
24095	backendService string
24096	backendservice *BackendService
24097	urlParams_     gensupport.URLParams
24098	ctx_           context.Context
24099	header_        http.Header
24100}
24101
24102// Update: Updates the specified BackendService resource with the data
24103// included in the request. There are several restrictions and
24104// guidelines to keep in mind when updating a backend service. Read
24105// Restrictions and Guidelines for more information.
24106// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update
24107func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall {
24108	c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24109	c.project = project
24110	c.backendService = backendService
24111	c.backendservice = backendservice
24112	return c
24113}
24114
24115// RequestId sets the optional parameter "requestId": An optional
24116// request ID to identify requests. Specify a unique request ID so that
24117// if you must retry your request, the server will know to ignore the
24118// request if it has already been completed.
24119//
24120// For example, consider a situation where you make an initial request
24121// and the request times out. If you make the request again with the
24122// same request ID, the server can check if original operation with the
24123// same request ID was received, and if so, will ignore the second
24124// request. This prevents clients from accidentally creating duplicate
24125// commitments.
24126//
24127// The request ID must be a valid UUID with the exception that zero UUID
24128// is not supported (00000000-0000-0000-0000-000000000000).
24129func (c *BackendServicesUpdateCall) RequestId(requestId string) *BackendServicesUpdateCall {
24130	c.urlParams_.Set("requestId", requestId)
24131	return c
24132}
24133
24134// Fields allows partial responses to be retrieved. See
24135// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24136// for more information.
24137func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall {
24138	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24139	return c
24140}
24141
24142// Context sets the context to be used in this call's Do method. Any
24143// pending HTTP request will be aborted if the provided context is
24144// canceled.
24145func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall {
24146	c.ctx_ = ctx
24147	return c
24148}
24149
24150// Header returns an http.Header that can be modified by the caller to
24151// add HTTP headers to the request.
24152func (c *BackendServicesUpdateCall) Header() http.Header {
24153	if c.header_ == nil {
24154		c.header_ = make(http.Header)
24155	}
24156	return c.header_
24157}
24158
24159func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) {
24160	reqHeaders := make(http.Header)
24161	for k, v := range c.header_ {
24162		reqHeaders[k] = v
24163	}
24164	reqHeaders.Set("User-Agent", c.s.userAgent())
24165	var body io.Reader = nil
24166	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
24167	if err != nil {
24168		return nil, err
24169	}
24170	reqHeaders.Set("Content-Type", "application/json")
24171	c.urlParams_.Set("alt", alt)
24172	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
24173	urls += "?" + c.urlParams_.Encode()
24174	req, _ := http.NewRequest("PUT", urls, body)
24175	req.Header = reqHeaders
24176	googleapi.Expand(req.URL, map[string]string{
24177		"project":        c.project,
24178		"backendService": c.backendService,
24179	})
24180	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24181}
24182
24183// Do executes the "compute.backendServices.update" call.
24184// Exactly one of *Operation or error will be non-nil. Any non-2xx
24185// status code is an error. Response headers are in either
24186// *Operation.ServerResponse.Header or (if a response was returned at
24187// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24188// to check whether the returned error was because
24189// http.StatusNotModified was returned.
24190func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24191	gensupport.SetOptions(c.urlParams_, opts...)
24192	res, err := c.doRequest("json")
24193	if res != nil && res.StatusCode == http.StatusNotModified {
24194		if res.Body != nil {
24195			res.Body.Close()
24196		}
24197		return nil, &googleapi.Error{
24198			Code:   res.StatusCode,
24199			Header: res.Header,
24200		}
24201	}
24202	if err != nil {
24203		return nil, err
24204	}
24205	defer googleapi.CloseBody(res)
24206	if err := googleapi.CheckResponse(res); err != nil {
24207		return nil, err
24208	}
24209	ret := &Operation{
24210		ServerResponse: googleapi.ServerResponse{
24211			Header:         res.Header,
24212			HTTPStatusCode: res.StatusCode,
24213		},
24214	}
24215	target := &ret
24216	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
24217		return nil, err
24218	}
24219	return ret, nil
24220	// {
24221	//   "description": "Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read  Restrictions and Guidelines for more information.",
24222	//   "httpMethod": "PUT",
24223	//   "id": "compute.backendServices.update",
24224	//   "parameterOrder": [
24225	//     "project",
24226	//     "backendService"
24227	//   ],
24228	//   "parameters": {
24229	//     "backendService": {
24230	//       "description": "Name of the BackendService resource to update.",
24231	//       "location": "path",
24232	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
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-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24240	//       "required": true,
24241	//       "type": "string"
24242	//     },
24243	//     "requestId": {
24244	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
24245	//       "location": "query",
24246	//       "type": "string"
24247	//     }
24248	//   },
24249	//   "path": "{project}/global/backendServices/{backendService}",
24250	//   "request": {
24251	//     "$ref": "BackendService"
24252	//   },
24253	//   "response": {
24254	//     "$ref": "Operation"
24255	//   },
24256	//   "scopes": [
24257	//     "https://www.googleapis.com/auth/cloud-platform",
24258	//     "https://www.googleapis.com/auth/compute"
24259	//   ]
24260	// }
24261
24262}
24263
24264// method id "compute.diskTypes.aggregatedList":
24265
24266type DiskTypesAggregatedListCall struct {
24267	s            *Service
24268	project      string
24269	urlParams_   gensupport.URLParams
24270	ifNoneMatch_ string
24271	ctx_         context.Context
24272	header_      http.Header
24273}
24274
24275// AggregatedList: Retrieves an aggregated list of disk types.
24276// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList
24277func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall {
24278	c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24279	c.project = project
24280	return c
24281}
24282
24283// Filter sets the optional parameter "filter": Sets a filter
24284// {expression} for filtering listed resources. Your {expression} must
24285// be in the format: field_name comparison_string literal_string.
24286//
24287// The field_name is the name of the field you want to compare. Only
24288// atomic field types are supported (string, number, boolean). The
24289// comparison_string must be either eq (equals) or ne (not equals). The
24290// literal_string is the string value to filter to. The literal value
24291// must be valid for the type of field you are filtering by (string,
24292// number, boolean). For string fields, the literal value is interpreted
24293// as a regular expression using RE2 syntax. The literal value must
24294// match the entire field.
24295//
24296// For example, to filter for instances that do not have a name of
24297// example-instance, you would use name ne example-instance.
24298//
24299// You can filter on nested fields. For example, you could filter on
24300// instances that have set the scheduling.automaticRestart field to
24301// true. Use filtering on nested fields to take advantage of labels to
24302// organize and search for results based on label values.
24303//
24304// To filter on multiple expressions, provide each separate expression
24305// within parentheses. For example, (scheduling.automaticRestart eq
24306// true) (zone eq us-central1-f). Multiple expressions are treated as
24307// AND expressions, meaning that resources must match all expressions to
24308// pass the filters.
24309func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall {
24310	c.urlParams_.Set("filter", filter)
24311	return c
24312}
24313
24314// MaxResults sets the optional parameter "maxResults": The maximum
24315// number of results per page that should be returned. If the number of
24316// available results is larger than maxResults, Compute Engine returns a
24317// nextPageToken that can be used to get the next page of results in
24318// subsequent list requests. Acceptable values are 0 to 500, inclusive.
24319// (Default: 500)
24320func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall {
24321	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
24322	return c
24323}
24324
24325// OrderBy sets the optional parameter "orderBy": Sorts list results by
24326// a certain order. By default, results are returned in alphanumerical
24327// order based on the resource name.
24328//
24329// You can also sort results in descending order based on the creation
24330// timestamp using orderBy="creationTimestamp desc". This sorts results
24331// based on the creationTimestamp field in reverse chronological order
24332// (newest result first). Use this to sort resources like operations so
24333// that the newest operation is returned first.
24334//
24335// Currently, only sorting by name or creationTimestamp desc is
24336// supported.
24337func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall {
24338	c.urlParams_.Set("orderBy", orderBy)
24339	return c
24340}
24341
24342// PageToken sets the optional parameter "pageToken": Specifies a page
24343// token to use. Set pageToken to the nextPageToken returned by a
24344// previous list request to get the next page of results.
24345func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall {
24346	c.urlParams_.Set("pageToken", pageToken)
24347	return c
24348}
24349
24350// Fields allows partial responses to be retrieved. See
24351// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24352// for more information.
24353func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall {
24354	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24355	return c
24356}
24357
24358// IfNoneMatch sets the optional parameter which makes the operation
24359// fail if the object's ETag matches the given value. This is useful for
24360// getting updates only after the object has changed since the last
24361// request. Use googleapi.IsNotModified to check whether the response
24362// error from Do is the result of In-None-Match.
24363func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall {
24364	c.ifNoneMatch_ = entityTag
24365	return c
24366}
24367
24368// Context sets the context to be used in this call's Do method. Any
24369// pending HTTP request will be aborted if the provided context is
24370// canceled.
24371func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall {
24372	c.ctx_ = ctx
24373	return c
24374}
24375
24376// Header returns an http.Header that can be modified by the caller to
24377// add HTTP headers to the request.
24378func (c *DiskTypesAggregatedListCall) Header() http.Header {
24379	if c.header_ == nil {
24380		c.header_ = make(http.Header)
24381	}
24382	return c.header_
24383}
24384
24385func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
24386	reqHeaders := make(http.Header)
24387	for k, v := range c.header_ {
24388		reqHeaders[k] = v
24389	}
24390	reqHeaders.Set("User-Agent", c.s.userAgent())
24391	if c.ifNoneMatch_ != "" {
24392		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24393	}
24394	var body io.Reader = nil
24395	c.urlParams_.Set("alt", alt)
24396	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/diskTypes")
24397	urls += "?" + c.urlParams_.Encode()
24398	req, _ := http.NewRequest("GET", urls, body)
24399	req.Header = reqHeaders
24400	googleapi.Expand(req.URL, map[string]string{
24401		"project": c.project,
24402	})
24403	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24404}
24405
24406// Do executes the "compute.diskTypes.aggregatedList" call.
24407// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any
24408// non-2xx status code is an error. Response headers are in either
24409// *DiskTypeAggregatedList.ServerResponse.Header or (if a response was
24410// returned at all) in error.(*googleapi.Error).Header. Use
24411// googleapi.IsNotModified to check whether the returned error was
24412// because http.StatusNotModified was returned.
24413func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) {
24414	gensupport.SetOptions(c.urlParams_, opts...)
24415	res, err := c.doRequest("json")
24416	if res != nil && res.StatusCode == http.StatusNotModified {
24417		if res.Body != nil {
24418			res.Body.Close()
24419		}
24420		return nil, &googleapi.Error{
24421			Code:   res.StatusCode,
24422			Header: res.Header,
24423		}
24424	}
24425	if err != nil {
24426		return nil, err
24427	}
24428	defer googleapi.CloseBody(res)
24429	if err := googleapi.CheckResponse(res); err != nil {
24430		return nil, err
24431	}
24432	ret := &DiskTypeAggregatedList{
24433		ServerResponse: googleapi.ServerResponse{
24434			Header:         res.Header,
24435			HTTPStatusCode: res.StatusCode,
24436		},
24437	}
24438	target := &ret
24439	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
24440		return nil, err
24441	}
24442	return ret, nil
24443	// {
24444	//   "description": "Retrieves an aggregated list of disk types.",
24445	//   "httpMethod": "GET",
24446	//   "id": "compute.diskTypes.aggregatedList",
24447	//   "parameterOrder": [
24448	//     "project"
24449	//   ],
24450	//   "parameters": {
24451	//     "filter": {
24452	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
24453	//       "location": "query",
24454	//       "type": "string"
24455	//     },
24456	//     "maxResults": {
24457	//       "default": "500",
24458	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
24459	//       "format": "uint32",
24460	//       "location": "query",
24461	//       "minimum": "0",
24462	//       "type": "integer"
24463	//     },
24464	//     "orderBy": {
24465	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
24466	//       "location": "query",
24467	//       "type": "string"
24468	//     },
24469	//     "pageToken": {
24470	//       "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.",
24471	//       "location": "query",
24472	//       "type": "string"
24473	//     },
24474	//     "project": {
24475	//       "description": "Project ID for this request.",
24476	//       "location": "path",
24477	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24478	//       "required": true,
24479	//       "type": "string"
24480	//     }
24481	//   },
24482	//   "path": "{project}/aggregated/diskTypes",
24483	//   "response": {
24484	//     "$ref": "DiskTypeAggregatedList"
24485	//   },
24486	//   "scopes": [
24487	//     "https://www.googleapis.com/auth/cloud-platform",
24488	//     "https://www.googleapis.com/auth/compute",
24489	//     "https://www.googleapis.com/auth/compute.readonly"
24490	//   ]
24491	// }
24492
24493}
24494
24495// Pages invokes f for each page of results.
24496// A non-nil error returned from f will halt the iteration.
24497// The provided context supersedes any context provided to the Context method.
24498func (c *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) error) error {
24499	c.ctx_ = ctx
24500	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24501	for {
24502		x, err := c.Do()
24503		if err != nil {
24504			return err
24505		}
24506		if err := f(x); err != nil {
24507			return err
24508		}
24509		if x.NextPageToken == "" {
24510			return nil
24511		}
24512		c.PageToken(x.NextPageToken)
24513	}
24514}
24515
24516// method id "compute.diskTypes.get":
24517
24518type DiskTypesGetCall struct {
24519	s            *Service
24520	project      string
24521	zone         string
24522	diskType     string
24523	urlParams_   gensupport.URLParams
24524	ifNoneMatch_ string
24525	ctx_         context.Context
24526	header_      http.Header
24527}
24528
24529// Get: Returns the specified disk type. Get a list of available disk
24530// types by making a list() request.
24531// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get
24532func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall {
24533	c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24534	c.project = project
24535	c.zone = zone
24536	c.diskType = diskType
24537	return c
24538}
24539
24540// Fields allows partial responses to be retrieved. See
24541// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24542// for more information.
24543func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall {
24544	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24545	return c
24546}
24547
24548// IfNoneMatch sets the optional parameter which makes the operation
24549// fail if the object's ETag matches the given value. This is useful for
24550// getting updates only after the object has changed since the last
24551// request. Use googleapi.IsNotModified to check whether the response
24552// error from Do is the result of In-None-Match.
24553func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall {
24554	c.ifNoneMatch_ = entityTag
24555	return c
24556}
24557
24558// Context sets the context to be used in this call's Do method. Any
24559// pending HTTP request will be aborted if the provided context is
24560// canceled.
24561func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall {
24562	c.ctx_ = ctx
24563	return c
24564}
24565
24566// Header returns an http.Header that can be modified by the caller to
24567// add HTTP headers to the request.
24568func (c *DiskTypesGetCall) Header() http.Header {
24569	if c.header_ == nil {
24570		c.header_ = make(http.Header)
24571	}
24572	return c.header_
24573}
24574
24575func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) {
24576	reqHeaders := make(http.Header)
24577	for k, v := range c.header_ {
24578		reqHeaders[k] = v
24579	}
24580	reqHeaders.Set("User-Agent", c.s.userAgent())
24581	if c.ifNoneMatch_ != "" {
24582		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24583	}
24584	var body io.Reader = nil
24585	c.urlParams_.Set("alt", alt)
24586	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes/{diskType}")
24587	urls += "?" + c.urlParams_.Encode()
24588	req, _ := http.NewRequest("GET", urls, body)
24589	req.Header = reqHeaders
24590	googleapi.Expand(req.URL, map[string]string{
24591		"project":  c.project,
24592		"zone":     c.zone,
24593		"diskType": c.diskType,
24594	})
24595	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24596}
24597
24598// Do executes the "compute.diskTypes.get" call.
24599// Exactly one of *DiskType or error will be non-nil. Any non-2xx status
24600// code is an error. Response headers are in either
24601// *DiskType.ServerResponse.Header or (if a response was returned at
24602// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24603// to check whether the returned error was because
24604// http.StatusNotModified was returned.
24605func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) {
24606	gensupport.SetOptions(c.urlParams_, opts...)
24607	res, err := c.doRequest("json")
24608	if res != nil && res.StatusCode == http.StatusNotModified {
24609		if res.Body != nil {
24610			res.Body.Close()
24611		}
24612		return nil, &googleapi.Error{
24613			Code:   res.StatusCode,
24614			Header: res.Header,
24615		}
24616	}
24617	if err != nil {
24618		return nil, err
24619	}
24620	defer googleapi.CloseBody(res)
24621	if err := googleapi.CheckResponse(res); err != nil {
24622		return nil, err
24623	}
24624	ret := &DiskType{
24625		ServerResponse: googleapi.ServerResponse{
24626			Header:         res.Header,
24627			HTTPStatusCode: res.StatusCode,
24628		},
24629	}
24630	target := &ret
24631	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
24632		return nil, err
24633	}
24634	return ret, nil
24635	// {
24636	//   "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.",
24637	//   "httpMethod": "GET",
24638	//   "id": "compute.diskTypes.get",
24639	//   "parameterOrder": [
24640	//     "project",
24641	//     "zone",
24642	//     "diskType"
24643	//   ],
24644	//   "parameters": {
24645	//     "diskType": {
24646	//       "description": "Name of the disk type to return.",
24647	//       "location": "path",
24648	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24649	//       "required": true,
24650	//       "type": "string"
24651	//     },
24652	//     "project": {
24653	//       "description": "Project ID for this request.",
24654	//       "location": "path",
24655	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24656	//       "required": true,
24657	//       "type": "string"
24658	//     },
24659	//     "zone": {
24660	//       "description": "The name of the zone for this request.",
24661	//       "location": "path",
24662	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24663	//       "required": true,
24664	//       "type": "string"
24665	//     }
24666	//   },
24667	//   "path": "{project}/zones/{zone}/diskTypes/{diskType}",
24668	//   "response": {
24669	//     "$ref": "DiskType"
24670	//   },
24671	//   "scopes": [
24672	//     "https://www.googleapis.com/auth/cloud-platform",
24673	//     "https://www.googleapis.com/auth/compute",
24674	//     "https://www.googleapis.com/auth/compute.readonly"
24675	//   ]
24676	// }
24677
24678}
24679
24680// method id "compute.diskTypes.list":
24681
24682type DiskTypesListCall struct {
24683	s            *Service
24684	project      string
24685	zone         string
24686	urlParams_   gensupport.URLParams
24687	ifNoneMatch_ string
24688	ctx_         context.Context
24689	header_      http.Header
24690}
24691
24692// List: Retrieves a list of disk types available to the specified
24693// project.
24694// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list
24695func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall {
24696	c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24697	c.project = project
24698	c.zone = zone
24699	return c
24700}
24701
24702// Filter sets the optional parameter "filter": Sets a filter
24703// {expression} for filtering listed resources. Your {expression} must
24704// be in the format: field_name comparison_string literal_string.
24705//
24706// The field_name is the name of the field you want to compare. Only
24707// atomic field types are supported (string, number, boolean). The
24708// comparison_string must be either eq (equals) or ne (not equals). The
24709// literal_string is the string value to filter to. The literal value
24710// must be valid for the type of field you are filtering by (string,
24711// number, boolean). For string fields, the literal value is interpreted
24712// as a regular expression using RE2 syntax. The literal value must
24713// match the entire field.
24714//
24715// For example, to filter for instances that do not have a name of
24716// example-instance, you would use name ne example-instance.
24717//
24718// You can filter on nested fields. For example, you could filter on
24719// instances that have set the scheduling.automaticRestart field to
24720// true. Use filtering on nested fields to take advantage of labels to
24721// organize and search for results based on label values.
24722//
24723// To filter on multiple expressions, provide each separate expression
24724// within parentheses. For example, (scheduling.automaticRestart eq
24725// true) (zone eq us-central1-f). Multiple expressions are treated as
24726// AND expressions, meaning that resources must match all expressions to
24727// pass the filters.
24728func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall {
24729	c.urlParams_.Set("filter", filter)
24730	return c
24731}
24732
24733// MaxResults sets the optional parameter "maxResults": The maximum
24734// number of results per page that should be returned. If the number of
24735// available results is larger than maxResults, Compute Engine returns a
24736// nextPageToken that can be used to get the next page of results in
24737// subsequent list requests. Acceptable values are 0 to 500, inclusive.
24738// (Default: 500)
24739func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall {
24740	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
24741	return c
24742}
24743
24744// OrderBy sets the optional parameter "orderBy": Sorts list results by
24745// a certain order. By default, results are returned in alphanumerical
24746// order based on the resource name.
24747//
24748// You can also sort results in descending order based on the creation
24749// timestamp using orderBy="creationTimestamp desc". This sorts results
24750// based on the creationTimestamp field in reverse chronological order
24751// (newest result first). Use this to sort resources like operations so
24752// that the newest operation is returned first.
24753//
24754// Currently, only sorting by name or creationTimestamp desc is
24755// supported.
24756func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall {
24757	c.urlParams_.Set("orderBy", orderBy)
24758	return c
24759}
24760
24761// PageToken sets the optional parameter "pageToken": Specifies a page
24762// token to use. Set pageToken to the nextPageToken returned by a
24763// previous list request to get the next page of results.
24764func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall {
24765	c.urlParams_.Set("pageToken", pageToken)
24766	return c
24767}
24768
24769// Fields allows partial responses to be retrieved. See
24770// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24771// for more information.
24772func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall {
24773	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24774	return c
24775}
24776
24777// IfNoneMatch sets the optional parameter which makes the operation
24778// fail if the object's ETag matches the given value. This is useful for
24779// getting updates only after the object has changed since the last
24780// request. Use googleapi.IsNotModified to check whether the response
24781// error from Do is the result of In-None-Match.
24782func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall {
24783	c.ifNoneMatch_ = entityTag
24784	return c
24785}
24786
24787// Context sets the context to be used in this call's Do method. Any
24788// pending HTTP request will be aborted if the provided context is
24789// canceled.
24790func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall {
24791	c.ctx_ = ctx
24792	return c
24793}
24794
24795// Header returns an http.Header that can be modified by the caller to
24796// add HTTP headers to the request.
24797func (c *DiskTypesListCall) Header() http.Header {
24798	if c.header_ == nil {
24799		c.header_ = make(http.Header)
24800	}
24801	return c.header_
24802}
24803
24804func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) {
24805	reqHeaders := make(http.Header)
24806	for k, v := range c.header_ {
24807		reqHeaders[k] = v
24808	}
24809	reqHeaders.Set("User-Agent", c.s.userAgent())
24810	if c.ifNoneMatch_ != "" {
24811		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
24812	}
24813	var body io.Reader = nil
24814	c.urlParams_.Set("alt", alt)
24815	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes")
24816	urls += "?" + c.urlParams_.Encode()
24817	req, _ := http.NewRequest("GET", urls, body)
24818	req.Header = reqHeaders
24819	googleapi.Expand(req.URL, map[string]string{
24820		"project": c.project,
24821		"zone":    c.zone,
24822	})
24823	return gensupport.SendRequest(c.ctx_, c.s.client, req)
24824}
24825
24826// Do executes the "compute.diskTypes.list" call.
24827// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx
24828// status code is an error. Response headers are in either
24829// *DiskTypeList.ServerResponse.Header or (if a response was returned at
24830// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24831// to check whether the returned error was because
24832// http.StatusNotModified was returned.
24833func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) {
24834	gensupport.SetOptions(c.urlParams_, opts...)
24835	res, err := c.doRequest("json")
24836	if res != nil && res.StatusCode == http.StatusNotModified {
24837		if res.Body != nil {
24838			res.Body.Close()
24839		}
24840		return nil, &googleapi.Error{
24841			Code:   res.StatusCode,
24842			Header: res.Header,
24843		}
24844	}
24845	if err != nil {
24846		return nil, err
24847	}
24848	defer googleapi.CloseBody(res)
24849	if err := googleapi.CheckResponse(res); err != nil {
24850		return nil, err
24851	}
24852	ret := &DiskTypeList{
24853		ServerResponse: googleapi.ServerResponse{
24854			Header:         res.Header,
24855			HTTPStatusCode: res.StatusCode,
24856		},
24857	}
24858	target := &ret
24859	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
24860		return nil, err
24861	}
24862	return ret, nil
24863	// {
24864	//   "description": "Retrieves a list of disk types available to the specified project.",
24865	//   "httpMethod": "GET",
24866	//   "id": "compute.diskTypes.list",
24867	//   "parameterOrder": [
24868	//     "project",
24869	//     "zone"
24870	//   ],
24871	//   "parameters": {
24872	//     "filter": {
24873	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
24874	//       "location": "query",
24875	//       "type": "string"
24876	//     },
24877	//     "maxResults": {
24878	//       "default": "500",
24879	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
24880	//       "format": "uint32",
24881	//       "location": "query",
24882	//       "minimum": "0",
24883	//       "type": "integer"
24884	//     },
24885	//     "orderBy": {
24886	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
24887	//       "location": "query",
24888	//       "type": "string"
24889	//     },
24890	//     "pageToken": {
24891	//       "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.",
24892	//       "location": "query",
24893	//       "type": "string"
24894	//     },
24895	//     "project": {
24896	//       "description": "Project ID for this request.",
24897	//       "location": "path",
24898	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24899	//       "required": true,
24900	//       "type": "string"
24901	//     },
24902	//     "zone": {
24903	//       "description": "The name of the zone for this request.",
24904	//       "location": "path",
24905	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
24906	//       "required": true,
24907	//       "type": "string"
24908	//     }
24909	//   },
24910	//   "path": "{project}/zones/{zone}/diskTypes",
24911	//   "response": {
24912	//     "$ref": "DiskTypeList"
24913	//   },
24914	//   "scopes": [
24915	//     "https://www.googleapis.com/auth/cloud-platform",
24916	//     "https://www.googleapis.com/auth/compute",
24917	//     "https://www.googleapis.com/auth/compute.readonly"
24918	//   ]
24919	// }
24920
24921}
24922
24923// Pages invokes f for each page of results.
24924// A non-nil error returned from f will halt the iteration.
24925// The provided context supersedes any context provided to the Context method.
24926func (c *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) error) error {
24927	c.ctx_ = ctx
24928	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24929	for {
24930		x, err := c.Do()
24931		if err != nil {
24932			return err
24933		}
24934		if err := f(x); err != nil {
24935			return err
24936		}
24937		if x.NextPageToken == "" {
24938			return nil
24939		}
24940		c.PageToken(x.NextPageToken)
24941	}
24942}
24943
24944// method id "compute.disks.aggregatedList":
24945
24946type DisksAggregatedListCall struct {
24947	s            *Service
24948	project      string
24949	urlParams_   gensupport.URLParams
24950	ifNoneMatch_ string
24951	ctx_         context.Context
24952	header_      http.Header
24953}
24954
24955// AggregatedList: Retrieves an aggregated list of persistent disks.
24956// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList
24957func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall {
24958	c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24959	c.project = project
24960	return c
24961}
24962
24963// Filter sets the optional parameter "filter": Sets a filter
24964// {expression} for filtering listed resources. Your {expression} must
24965// be in the format: field_name comparison_string literal_string.
24966//
24967// The field_name is the name of the field you want to compare. Only
24968// atomic field types are supported (string, number, boolean). The
24969// comparison_string must be either eq (equals) or ne (not equals). The
24970// literal_string is the string value to filter to. The literal value
24971// must be valid for the type of field you are filtering by (string,
24972// number, boolean). For string fields, the literal value is interpreted
24973// as a regular expression using RE2 syntax. The literal value must
24974// match the entire field.
24975//
24976// For example, to filter for instances that do not have a name of
24977// example-instance, you would use name ne example-instance.
24978//
24979// You can filter on nested fields. For example, you could filter on
24980// instances that have set the scheduling.automaticRestart field to
24981// true. Use filtering on nested fields to take advantage of labels to
24982// organize and search for results based on label values.
24983//
24984// To filter on multiple expressions, provide each separate expression
24985// within parentheses. For example, (scheduling.automaticRestart eq
24986// true) (zone eq us-central1-f). Multiple expressions are treated as
24987// AND expressions, meaning that resources must match all expressions to
24988// pass the filters.
24989func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall {
24990	c.urlParams_.Set("filter", filter)
24991	return c
24992}
24993
24994// MaxResults sets the optional parameter "maxResults": The maximum
24995// number of results per page that should be returned. If the number of
24996// available results is larger than maxResults, Compute Engine returns a
24997// nextPageToken that can be used to get the next page of results in
24998// subsequent list requests. Acceptable values are 0 to 500, inclusive.
24999// (Default: 500)
25000func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall {
25001	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25002	return c
25003}
25004
25005// OrderBy sets the optional parameter "orderBy": Sorts list results by
25006// a certain order. By default, results are returned in alphanumerical
25007// order based on the resource name.
25008//
25009// You can also sort results in descending order based on the creation
25010// timestamp using orderBy="creationTimestamp desc". This sorts results
25011// based on the creationTimestamp field in reverse chronological order
25012// (newest result first). Use this to sort resources like operations so
25013// that the newest operation is returned first.
25014//
25015// Currently, only sorting by name or creationTimestamp desc is
25016// supported.
25017func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall {
25018	c.urlParams_.Set("orderBy", orderBy)
25019	return c
25020}
25021
25022// PageToken sets the optional parameter "pageToken": Specifies a page
25023// token to use. Set pageToken to the nextPageToken returned by a
25024// previous list request to get the next page of results.
25025func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall {
25026	c.urlParams_.Set("pageToken", pageToken)
25027	return c
25028}
25029
25030// Fields allows partial responses to be retrieved. See
25031// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25032// for more information.
25033func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall {
25034	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25035	return c
25036}
25037
25038// IfNoneMatch sets the optional parameter which makes the operation
25039// fail if the object's ETag matches the given value. This is useful for
25040// getting updates only after the object has changed since the last
25041// request. Use googleapi.IsNotModified to check whether the response
25042// error from Do is the result of In-None-Match.
25043func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall {
25044	c.ifNoneMatch_ = entityTag
25045	return c
25046}
25047
25048// Context sets the context to be used in this call's Do method. Any
25049// pending HTTP request will be aborted if the provided context is
25050// canceled.
25051func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall {
25052	c.ctx_ = ctx
25053	return c
25054}
25055
25056// Header returns an http.Header that can be modified by the caller to
25057// add HTTP headers to the request.
25058func (c *DisksAggregatedListCall) Header() http.Header {
25059	if c.header_ == nil {
25060		c.header_ = make(http.Header)
25061	}
25062	return c.header_
25063}
25064
25065func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) {
25066	reqHeaders := make(http.Header)
25067	for k, v := range c.header_ {
25068		reqHeaders[k] = v
25069	}
25070	reqHeaders.Set("User-Agent", c.s.userAgent())
25071	if c.ifNoneMatch_ != "" {
25072		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25073	}
25074	var body io.Reader = nil
25075	c.urlParams_.Set("alt", alt)
25076	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/disks")
25077	urls += "?" + c.urlParams_.Encode()
25078	req, _ := http.NewRequest("GET", urls, body)
25079	req.Header = reqHeaders
25080	googleapi.Expand(req.URL, map[string]string{
25081		"project": c.project,
25082	})
25083	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25084}
25085
25086// Do executes the "compute.disks.aggregatedList" call.
25087// Exactly one of *DiskAggregatedList or error will be non-nil. Any
25088// non-2xx status code is an error. Response headers are in either
25089// *DiskAggregatedList.ServerResponse.Header or (if a response was
25090// returned at all) in error.(*googleapi.Error).Header. Use
25091// googleapi.IsNotModified to check whether the returned error was
25092// because http.StatusNotModified was returned.
25093func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) {
25094	gensupport.SetOptions(c.urlParams_, opts...)
25095	res, err := c.doRequest("json")
25096	if res != nil && res.StatusCode == http.StatusNotModified {
25097		if res.Body != nil {
25098			res.Body.Close()
25099		}
25100		return nil, &googleapi.Error{
25101			Code:   res.StatusCode,
25102			Header: res.Header,
25103		}
25104	}
25105	if err != nil {
25106		return nil, err
25107	}
25108	defer googleapi.CloseBody(res)
25109	if err := googleapi.CheckResponse(res); err != nil {
25110		return nil, err
25111	}
25112	ret := &DiskAggregatedList{
25113		ServerResponse: googleapi.ServerResponse{
25114			Header:         res.Header,
25115			HTTPStatusCode: res.StatusCode,
25116		},
25117	}
25118	target := &ret
25119	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
25120		return nil, err
25121	}
25122	return ret, nil
25123	// {
25124	//   "description": "Retrieves an aggregated list of persistent disks.",
25125	//   "httpMethod": "GET",
25126	//   "id": "compute.disks.aggregatedList",
25127	//   "parameterOrder": [
25128	//     "project"
25129	//   ],
25130	//   "parameters": {
25131	//     "filter": {
25132	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
25133	//       "location": "query",
25134	//       "type": "string"
25135	//     },
25136	//     "maxResults": {
25137	//       "default": "500",
25138	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
25139	//       "format": "uint32",
25140	//       "location": "query",
25141	//       "minimum": "0",
25142	//       "type": "integer"
25143	//     },
25144	//     "orderBy": {
25145	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
25146	//       "location": "query",
25147	//       "type": "string"
25148	//     },
25149	//     "pageToken": {
25150	//       "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.",
25151	//       "location": "query",
25152	//       "type": "string"
25153	//     },
25154	//     "project": {
25155	//       "description": "Project ID for this request.",
25156	//       "location": "path",
25157	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25158	//       "required": true,
25159	//       "type": "string"
25160	//     }
25161	//   },
25162	//   "path": "{project}/aggregated/disks",
25163	//   "response": {
25164	//     "$ref": "DiskAggregatedList"
25165	//   },
25166	//   "scopes": [
25167	//     "https://www.googleapis.com/auth/cloud-platform",
25168	//     "https://www.googleapis.com/auth/compute",
25169	//     "https://www.googleapis.com/auth/compute.readonly"
25170	//   ]
25171	// }
25172
25173}
25174
25175// Pages invokes f for each page of results.
25176// A non-nil error returned from f will halt the iteration.
25177// The provided context supersedes any context provided to the Context method.
25178func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error {
25179	c.ctx_ = ctx
25180	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
25181	for {
25182		x, err := c.Do()
25183		if err != nil {
25184			return err
25185		}
25186		if err := f(x); err != nil {
25187			return err
25188		}
25189		if x.NextPageToken == "" {
25190			return nil
25191		}
25192		c.PageToken(x.NextPageToken)
25193	}
25194}
25195
25196// method id "compute.disks.createSnapshot":
25197
25198type DisksCreateSnapshotCall struct {
25199	s          *Service
25200	project    string
25201	zone       string
25202	disk       string
25203	snapshot   *Snapshot
25204	urlParams_ gensupport.URLParams
25205	ctx_       context.Context
25206	header_    http.Header
25207}
25208
25209// CreateSnapshot: Creates a snapshot of a specified persistent disk.
25210// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/createSnapshot
25211func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall {
25212	c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25213	c.project = project
25214	c.zone = zone
25215	c.disk = disk
25216	c.snapshot = snapshot
25217	return c
25218}
25219
25220// GuestFlush sets the optional parameter "guestFlush":
25221func (c *DisksCreateSnapshotCall) GuestFlush(guestFlush bool) *DisksCreateSnapshotCall {
25222	c.urlParams_.Set("guestFlush", fmt.Sprint(guestFlush))
25223	return c
25224}
25225
25226// RequestId sets the optional parameter "requestId": An optional
25227// request ID to identify requests. Specify a unique request ID so that
25228// if you must retry your request, the server will know to ignore the
25229// request if it has already been completed.
25230//
25231// For example, consider a situation where you make an initial request
25232// and the request times out. If you make the request again with the
25233// same request ID, the server can check if original operation with the
25234// same request ID was received, and if so, will ignore the second
25235// request. This prevents clients from accidentally creating duplicate
25236// commitments.
25237//
25238// The request ID must be a valid UUID with the exception that zero UUID
25239// is not supported (00000000-0000-0000-0000-000000000000).
25240func (c *DisksCreateSnapshotCall) RequestId(requestId string) *DisksCreateSnapshotCall {
25241	c.urlParams_.Set("requestId", requestId)
25242	return c
25243}
25244
25245// Fields allows partial responses to be retrieved. See
25246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25247// for more information.
25248func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall {
25249	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25250	return c
25251}
25252
25253// Context sets the context to be used in this call's Do method. Any
25254// pending HTTP request will be aborted if the provided context is
25255// canceled.
25256func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall {
25257	c.ctx_ = ctx
25258	return c
25259}
25260
25261// Header returns an http.Header that can be modified by the caller to
25262// add HTTP headers to the request.
25263func (c *DisksCreateSnapshotCall) Header() http.Header {
25264	if c.header_ == nil {
25265		c.header_ = make(http.Header)
25266	}
25267	return c.header_
25268}
25269
25270func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) {
25271	reqHeaders := make(http.Header)
25272	for k, v := range c.header_ {
25273		reqHeaders[k] = v
25274	}
25275	reqHeaders.Set("User-Agent", c.s.userAgent())
25276	var body io.Reader = nil
25277	body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot)
25278	if err != nil {
25279		return nil, err
25280	}
25281	reqHeaders.Set("Content-Type", "application/json")
25282	c.urlParams_.Set("alt", alt)
25283	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot")
25284	urls += "?" + c.urlParams_.Encode()
25285	req, _ := http.NewRequest("POST", urls, body)
25286	req.Header = reqHeaders
25287	googleapi.Expand(req.URL, map[string]string{
25288		"project": c.project,
25289		"zone":    c.zone,
25290		"disk":    c.disk,
25291	})
25292	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25293}
25294
25295// Do executes the "compute.disks.createSnapshot" call.
25296// Exactly one of *Operation or error will be non-nil. Any non-2xx
25297// status code is an error. Response headers are in either
25298// *Operation.ServerResponse.Header or (if a response was returned at
25299// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25300// to check whether the returned error was because
25301// http.StatusNotModified was returned.
25302func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25303	gensupport.SetOptions(c.urlParams_, opts...)
25304	res, err := c.doRequest("json")
25305	if res != nil && res.StatusCode == http.StatusNotModified {
25306		if res.Body != nil {
25307			res.Body.Close()
25308		}
25309		return nil, &googleapi.Error{
25310			Code:   res.StatusCode,
25311			Header: res.Header,
25312		}
25313	}
25314	if err != nil {
25315		return nil, err
25316	}
25317	defer googleapi.CloseBody(res)
25318	if err := googleapi.CheckResponse(res); err != nil {
25319		return nil, err
25320	}
25321	ret := &Operation{
25322		ServerResponse: googleapi.ServerResponse{
25323			Header:         res.Header,
25324			HTTPStatusCode: res.StatusCode,
25325		},
25326	}
25327	target := &ret
25328	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
25329		return nil, err
25330	}
25331	return ret, nil
25332	// {
25333	//   "description": "Creates a snapshot of a specified persistent disk.",
25334	//   "httpMethod": "POST",
25335	//   "id": "compute.disks.createSnapshot",
25336	//   "parameterOrder": [
25337	//     "project",
25338	//     "zone",
25339	//     "disk"
25340	//   ],
25341	//   "parameters": {
25342	//     "disk": {
25343	//       "description": "Name of the persistent disk to snapshot.",
25344	//       "location": "path",
25345	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25346	//       "required": true,
25347	//       "type": "string"
25348	//     },
25349	//     "guestFlush": {
25350	//       "location": "query",
25351	//       "type": "boolean"
25352	//     },
25353	//     "project": {
25354	//       "description": "Project ID for this request.",
25355	//       "location": "path",
25356	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25357	//       "required": true,
25358	//       "type": "string"
25359	//     },
25360	//     "requestId": {
25361	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
25362	//       "location": "query",
25363	//       "type": "string"
25364	//     },
25365	//     "zone": {
25366	//       "description": "The name of the zone for this request.",
25367	//       "location": "path",
25368	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25369	//       "required": true,
25370	//       "type": "string"
25371	//     }
25372	//   },
25373	//   "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot",
25374	//   "request": {
25375	//     "$ref": "Snapshot"
25376	//   },
25377	//   "response": {
25378	//     "$ref": "Operation"
25379	//   },
25380	//   "scopes": [
25381	//     "https://www.googleapis.com/auth/cloud-platform",
25382	//     "https://www.googleapis.com/auth/compute"
25383	//   ]
25384	// }
25385
25386}
25387
25388// method id "compute.disks.delete":
25389
25390type DisksDeleteCall struct {
25391	s          *Service
25392	project    string
25393	zone       string
25394	disk       string
25395	urlParams_ gensupport.URLParams
25396	ctx_       context.Context
25397	header_    http.Header
25398}
25399
25400// Delete: Deletes the specified persistent disk. Deleting a disk
25401// removes its data permanently and is irreversible. However, deleting a
25402// disk does not delete any snapshots previously made from the disk. You
25403// must separately delete snapshots.
25404// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/delete
25405func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall {
25406	c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25407	c.project = project
25408	c.zone = zone
25409	c.disk = disk
25410	return c
25411}
25412
25413// RequestId sets the optional parameter "requestId": An optional
25414// request ID to identify requests. Specify a unique request ID so that
25415// if you must retry your request, the server will know to ignore the
25416// request if it has already been completed.
25417//
25418// For example, consider a situation where you make an initial request
25419// and the request times out. If you make the request again with the
25420// same request ID, the server can check if original operation with the
25421// same request ID was received, and if so, will ignore the second
25422// request. This prevents clients from accidentally creating duplicate
25423// commitments.
25424//
25425// The request ID must be a valid UUID with the exception that zero UUID
25426// is not supported (00000000-0000-0000-0000-000000000000).
25427func (c *DisksDeleteCall) RequestId(requestId string) *DisksDeleteCall {
25428	c.urlParams_.Set("requestId", requestId)
25429	return c
25430}
25431
25432// Fields allows partial responses to be retrieved. See
25433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25434// for more information.
25435func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall {
25436	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25437	return c
25438}
25439
25440// Context sets the context to be used in this call's Do method. Any
25441// pending HTTP request will be aborted if the provided context is
25442// canceled.
25443func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall {
25444	c.ctx_ = ctx
25445	return c
25446}
25447
25448// Header returns an http.Header that can be modified by the caller to
25449// add HTTP headers to the request.
25450func (c *DisksDeleteCall) Header() http.Header {
25451	if c.header_ == nil {
25452		c.header_ = make(http.Header)
25453	}
25454	return c.header_
25455}
25456
25457func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) {
25458	reqHeaders := make(http.Header)
25459	for k, v := range c.header_ {
25460		reqHeaders[k] = v
25461	}
25462	reqHeaders.Set("User-Agent", c.s.userAgent())
25463	var body io.Reader = nil
25464	c.urlParams_.Set("alt", alt)
25465	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}")
25466	urls += "?" + c.urlParams_.Encode()
25467	req, _ := http.NewRequest("DELETE", urls, body)
25468	req.Header = reqHeaders
25469	googleapi.Expand(req.URL, map[string]string{
25470		"project": c.project,
25471		"zone":    c.zone,
25472		"disk":    c.disk,
25473	})
25474	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25475}
25476
25477// Do executes the "compute.disks.delete" call.
25478// Exactly one of *Operation or error will be non-nil. Any non-2xx
25479// status code is an error. Response headers are in either
25480// *Operation.ServerResponse.Header or (if a response was returned at
25481// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25482// to check whether the returned error was because
25483// http.StatusNotModified was returned.
25484func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25485	gensupport.SetOptions(c.urlParams_, opts...)
25486	res, err := c.doRequest("json")
25487	if res != nil && res.StatusCode == http.StatusNotModified {
25488		if res.Body != nil {
25489			res.Body.Close()
25490		}
25491		return nil, &googleapi.Error{
25492			Code:   res.StatusCode,
25493			Header: res.Header,
25494		}
25495	}
25496	if err != nil {
25497		return nil, err
25498	}
25499	defer googleapi.CloseBody(res)
25500	if err := googleapi.CheckResponse(res); err != nil {
25501		return nil, err
25502	}
25503	ret := &Operation{
25504		ServerResponse: googleapi.ServerResponse{
25505			Header:         res.Header,
25506			HTTPStatusCode: res.StatusCode,
25507		},
25508	}
25509	target := &ret
25510	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
25511		return nil, err
25512	}
25513	return ret, nil
25514	// {
25515	//   "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.",
25516	//   "httpMethod": "DELETE",
25517	//   "id": "compute.disks.delete",
25518	//   "parameterOrder": [
25519	//     "project",
25520	//     "zone",
25521	//     "disk"
25522	//   ],
25523	//   "parameters": {
25524	//     "disk": {
25525	//       "description": "Name of the persistent disk to delete.",
25526	//       "location": "path",
25527	//       "required": true,
25528	//       "type": "string"
25529	//     },
25530	//     "project": {
25531	//       "description": "Project ID for this request.",
25532	//       "location": "path",
25533	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25534	//       "required": true,
25535	//       "type": "string"
25536	//     },
25537	//     "requestId": {
25538	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
25539	//       "location": "query",
25540	//       "type": "string"
25541	//     },
25542	//     "zone": {
25543	//       "description": "The name of the zone for this request.",
25544	//       "location": "path",
25545	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25546	//       "required": true,
25547	//       "type": "string"
25548	//     }
25549	//   },
25550	//   "path": "{project}/zones/{zone}/disks/{disk}",
25551	//   "response": {
25552	//     "$ref": "Operation"
25553	//   },
25554	//   "scopes": [
25555	//     "https://www.googleapis.com/auth/cloud-platform",
25556	//     "https://www.googleapis.com/auth/compute"
25557	//   ]
25558	// }
25559
25560}
25561
25562// method id "compute.disks.get":
25563
25564type DisksGetCall struct {
25565	s            *Service
25566	project      string
25567	zone         string
25568	disk         string
25569	urlParams_   gensupport.URLParams
25570	ifNoneMatch_ string
25571	ctx_         context.Context
25572	header_      http.Header
25573}
25574
25575// Get: Returns a specified persistent disk. Get a list of available
25576// persistent disks by making a list() request.
25577// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get
25578func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall {
25579	c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25580	c.project = project
25581	c.zone = zone
25582	c.disk = disk
25583	return c
25584}
25585
25586// Fields allows partial responses to be retrieved. See
25587// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25588// for more information.
25589func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall {
25590	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25591	return c
25592}
25593
25594// IfNoneMatch sets the optional parameter which makes the operation
25595// fail if the object's ETag matches the given value. This is useful for
25596// getting updates only after the object has changed since the last
25597// request. Use googleapi.IsNotModified to check whether the response
25598// error from Do is the result of In-None-Match.
25599func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall {
25600	c.ifNoneMatch_ = entityTag
25601	return c
25602}
25603
25604// Context sets the context to be used in this call's Do method. Any
25605// pending HTTP request will be aborted if the provided context is
25606// canceled.
25607func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall {
25608	c.ctx_ = ctx
25609	return c
25610}
25611
25612// Header returns an http.Header that can be modified by the caller to
25613// add HTTP headers to the request.
25614func (c *DisksGetCall) Header() http.Header {
25615	if c.header_ == nil {
25616		c.header_ = make(http.Header)
25617	}
25618	return c.header_
25619}
25620
25621func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) {
25622	reqHeaders := make(http.Header)
25623	for k, v := range c.header_ {
25624		reqHeaders[k] = v
25625	}
25626	reqHeaders.Set("User-Agent", c.s.userAgent())
25627	if c.ifNoneMatch_ != "" {
25628		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
25629	}
25630	var body io.Reader = nil
25631	c.urlParams_.Set("alt", alt)
25632	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}")
25633	urls += "?" + c.urlParams_.Encode()
25634	req, _ := http.NewRequest("GET", urls, body)
25635	req.Header = reqHeaders
25636	googleapi.Expand(req.URL, map[string]string{
25637		"project": c.project,
25638		"zone":    c.zone,
25639		"disk":    c.disk,
25640	})
25641	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25642}
25643
25644// Do executes the "compute.disks.get" call.
25645// Exactly one of *Disk or error will be non-nil. Any non-2xx status
25646// code is an error. Response headers are in either
25647// *Disk.ServerResponse.Header or (if a response was returned at all) in
25648// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
25649// whether the returned error was because http.StatusNotModified was
25650// returned.
25651func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) {
25652	gensupport.SetOptions(c.urlParams_, opts...)
25653	res, err := c.doRequest("json")
25654	if res != nil && res.StatusCode == http.StatusNotModified {
25655		if res.Body != nil {
25656			res.Body.Close()
25657		}
25658		return nil, &googleapi.Error{
25659			Code:   res.StatusCode,
25660			Header: res.Header,
25661		}
25662	}
25663	if err != nil {
25664		return nil, err
25665	}
25666	defer googleapi.CloseBody(res)
25667	if err := googleapi.CheckResponse(res); err != nil {
25668		return nil, err
25669	}
25670	ret := &Disk{
25671		ServerResponse: googleapi.ServerResponse{
25672			Header:         res.Header,
25673			HTTPStatusCode: res.StatusCode,
25674		},
25675	}
25676	target := &ret
25677	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
25678		return nil, err
25679	}
25680	return ret, nil
25681	// {
25682	//   "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.",
25683	//   "httpMethod": "GET",
25684	//   "id": "compute.disks.get",
25685	//   "parameterOrder": [
25686	//     "project",
25687	//     "zone",
25688	//     "disk"
25689	//   ],
25690	//   "parameters": {
25691	//     "disk": {
25692	//       "description": "Name of the persistent disk to return.",
25693	//       "location": "path",
25694	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25695	//       "required": true,
25696	//       "type": "string"
25697	//     },
25698	//     "project": {
25699	//       "description": "Project ID for this request.",
25700	//       "location": "path",
25701	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25702	//       "required": true,
25703	//       "type": "string"
25704	//     },
25705	//     "zone": {
25706	//       "description": "The name of the zone for this request.",
25707	//       "location": "path",
25708	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25709	//       "required": true,
25710	//       "type": "string"
25711	//     }
25712	//   },
25713	//   "path": "{project}/zones/{zone}/disks/{disk}",
25714	//   "response": {
25715	//     "$ref": "Disk"
25716	//   },
25717	//   "scopes": [
25718	//     "https://www.googleapis.com/auth/cloud-platform",
25719	//     "https://www.googleapis.com/auth/compute",
25720	//     "https://www.googleapis.com/auth/compute.readonly"
25721	//   ]
25722	// }
25723
25724}
25725
25726// method id "compute.disks.insert":
25727
25728type DisksInsertCall struct {
25729	s          *Service
25730	project    string
25731	zone       string
25732	disk       *Disk
25733	urlParams_ gensupport.URLParams
25734	ctx_       context.Context
25735	header_    http.Header
25736}
25737
25738// Insert: Creates a persistent disk in the specified project using the
25739// data in the request. You can create a disk with a sourceImage, a
25740// sourceSnapshot, or create an empty 500 GB data disk by omitting all
25741// properties. You can also create a disk that is larger than the
25742// default size by specifying the sizeGb property.
25743// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert
25744func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall {
25745	c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25746	c.project = project
25747	c.zone = zone
25748	c.disk = disk
25749	return c
25750}
25751
25752// RequestId sets the optional parameter "requestId": An optional
25753// request ID to identify requests. Specify a unique request ID so that
25754// if you must retry your request, the server will know to ignore the
25755// request if it has already been completed.
25756//
25757// For example, consider a situation where you make an initial request
25758// and the request times out. If you make the request again with the
25759// same request ID, the server can check if original operation with the
25760// same request ID was received, and if so, will ignore the second
25761// request. This prevents clients from accidentally creating duplicate
25762// commitments.
25763//
25764// The request ID must be a valid UUID with the exception that zero UUID
25765// is not supported (00000000-0000-0000-0000-000000000000).
25766func (c *DisksInsertCall) RequestId(requestId string) *DisksInsertCall {
25767	c.urlParams_.Set("requestId", requestId)
25768	return c
25769}
25770
25771// SourceImage sets the optional parameter "sourceImage": Source image
25772// to restore onto a disk.
25773func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall {
25774	c.urlParams_.Set("sourceImage", sourceImage)
25775	return c
25776}
25777
25778// Fields allows partial responses to be retrieved. See
25779// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25780// for more information.
25781func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall {
25782	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25783	return c
25784}
25785
25786// Context sets the context to be used in this call's Do method. Any
25787// pending HTTP request will be aborted if the provided context is
25788// canceled.
25789func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall {
25790	c.ctx_ = ctx
25791	return c
25792}
25793
25794// Header returns an http.Header that can be modified by the caller to
25795// add HTTP headers to the request.
25796func (c *DisksInsertCall) Header() http.Header {
25797	if c.header_ == nil {
25798		c.header_ = make(http.Header)
25799	}
25800	return c.header_
25801}
25802
25803func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) {
25804	reqHeaders := make(http.Header)
25805	for k, v := range c.header_ {
25806		reqHeaders[k] = v
25807	}
25808	reqHeaders.Set("User-Agent", c.s.userAgent())
25809	var body io.Reader = nil
25810	body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk)
25811	if err != nil {
25812		return nil, err
25813	}
25814	reqHeaders.Set("Content-Type", "application/json")
25815	c.urlParams_.Set("alt", alt)
25816	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks")
25817	urls += "?" + c.urlParams_.Encode()
25818	req, _ := http.NewRequest("POST", urls, body)
25819	req.Header = reqHeaders
25820	googleapi.Expand(req.URL, map[string]string{
25821		"project": c.project,
25822		"zone":    c.zone,
25823	})
25824	return gensupport.SendRequest(c.ctx_, c.s.client, req)
25825}
25826
25827// Do executes the "compute.disks.insert" call.
25828// Exactly one of *Operation or error will be non-nil. Any non-2xx
25829// status code is an error. Response headers are in either
25830// *Operation.ServerResponse.Header or (if a response was returned at
25831// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25832// to check whether the returned error was because
25833// http.StatusNotModified was returned.
25834func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25835	gensupport.SetOptions(c.urlParams_, opts...)
25836	res, err := c.doRequest("json")
25837	if res != nil && res.StatusCode == http.StatusNotModified {
25838		if res.Body != nil {
25839			res.Body.Close()
25840		}
25841		return nil, &googleapi.Error{
25842			Code:   res.StatusCode,
25843			Header: res.Header,
25844		}
25845	}
25846	if err != nil {
25847		return nil, err
25848	}
25849	defer googleapi.CloseBody(res)
25850	if err := googleapi.CheckResponse(res); err != nil {
25851		return nil, err
25852	}
25853	ret := &Operation{
25854		ServerResponse: googleapi.ServerResponse{
25855			Header:         res.Header,
25856			HTTPStatusCode: res.StatusCode,
25857		},
25858	}
25859	target := &ret
25860	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
25861		return nil, err
25862	}
25863	return ret, nil
25864	// {
25865	//   "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 500 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.",
25866	//   "httpMethod": "POST",
25867	//   "id": "compute.disks.insert",
25868	//   "parameterOrder": [
25869	//     "project",
25870	//     "zone"
25871	//   ],
25872	//   "parameters": {
25873	//     "project": {
25874	//       "description": "Project ID for this request.",
25875	//       "location": "path",
25876	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25877	//       "required": true,
25878	//       "type": "string"
25879	//     },
25880	//     "requestId": {
25881	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
25882	//       "location": "query",
25883	//       "type": "string"
25884	//     },
25885	//     "sourceImage": {
25886	//       "description": "Optional. Source image to restore onto a disk.",
25887	//       "location": "query",
25888	//       "type": "string"
25889	//     },
25890	//     "zone": {
25891	//       "description": "The name of the zone for this request.",
25892	//       "location": "path",
25893	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25894	//       "required": true,
25895	//       "type": "string"
25896	//     }
25897	//   },
25898	//   "path": "{project}/zones/{zone}/disks",
25899	//   "request": {
25900	//     "$ref": "Disk"
25901	//   },
25902	//   "response": {
25903	//     "$ref": "Operation"
25904	//   },
25905	//   "scopes": [
25906	//     "https://www.googleapis.com/auth/cloud-platform",
25907	//     "https://www.googleapis.com/auth/compute"
25908	//   ]
25909	// }
25910
25911}
25912
25913// method id "compute.disks.list":
25914
25915type DisksListCall struct {
25916	s            *Service
25917	project      string
25918	zone         string
25919	urlParams_   gensupport.URLParams
25920	ifNoneMatch_ string
25921	ctx_         context.Context
25922	header_      http.Header
25923}
25924
25925// List: Retrieves a list of persistent disks contained within the
25926// specified zone.
25927// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list
25928func (r *DisksService) List(project string, zone string) *DisksListCall {
25929	c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25930	c.project = project
25931	c.zone = zone
25932	return c
25933}
25934
25935// Filter sets the optional parameter "filter": Sets a filter
25936// {expression} for filtering listed resources. Your {expression} must
25937// be in the format: field_name comparison_string literal_string.
25938//
25939// The field_name is the name of the field you want to compare. Only
25940// atomic field types are supported (string, number, boolean). The
25941// comparison_string must be either eq (equals) or ne (not equals). The
25942// literal_string is the string value to filter to. The literal value
25943// must be valid for the type of field you are filtering by (string,
25944// number, boolean). For string fields, the literal value is interpreted
25945// as a regular expression using RE2 syntax. The literal value must
25946// match the entire field.
25947//
25948// For example, to filter for instances that do not have a name of
25949// example-instance, you would use name ne example-instance.
25950//
25951// You can filter on nested fields. For example, you could filter on
25952// instances that have set the scheduling.automaticRestart field to
25953// true. Use filtering on nested fields to take advantage of labels to
25954// organize and search for results based on label values.
25955//
25956// To filter on multiple expressions, provide each separate expression
25957// within parentheses. For example, (scheduling.automaticRestart eq
25958// true) (zone eq us-central1-f). Multiple expressions are treated as
25959// AND expressions, meaning that resources must match all expressions to
25960// pass the filters.
25961func (c *DisksListCall) Filter(filter string) *DisksListCall {
25962	c.urlParams_.Set("filter", filter)
25963	return c
25964}
25965
25966// MaxResults sets the optional parameter "maxResults": The maximum
25967// number of results per page that should be returned. If the number of
25968// available results is larger than maxResults, Compute Engine returns a
25969// nextPageToken that can be used to get the next page of results in
25970// subsequent list requests. Acceptable values are 0 to 500, inclusive.
25971// (Default: 500)
25972func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall {
25973	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25974	return c
25975}
25976
25977// OrderBy sets the optional parameter "orderBy": Sorts list results by
25978// a certain order. By default, results are returned in alphanumerical
25979// order based on the resource name.
25980//
25981// You can also sort results in descending order based on the creation
25982// timestamp using orderBy="creationTimestamp desc". This sorts results
25983// based on the creationTimestamp field in reverse chronological order
25984// (newest result first). Use this to sort resources like operations so
25985// that the newest operation is returned first.
25986//
25987// Currently, only sorting by name or creationTimestamp desc is
25988// supported.
25989func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall {
25990	c.urlParams_.Set("orderBy", orderBy)
25991	return c
25992}
25993
25994// PageToken sets the optional parameter "pageToken": Specifies a page
25995// token to use. Set pageToken to the nextPageToken returned by a
25996// previous list request to get the next page of results.
25997func (c *DisksListCall) PageToken(pageToken string) *DisksListCall {
25998	c.urlParams_.Set("pageToken", pageToken)
25999	return c
26000}
26001
26002// Fields allows partial responses to be retrieved. See
26003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26004// for more information.
26005func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall {
26006	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26007	return c
26008}
26009
26010// IfNoneMatch sets the optional parameter which makes the operation
26011// fail if the object's ETag matches the given value. This is useful for
26012// getting updates only after the object has changed since the last
26013// request. Use googleapi.IsNotModified to check whether the response
26014// error from Do is the result of In-None-Match.
26015func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall {
26016	c.ifNoneMatch_ = entityTag
26017	return c
26018}
26019
26020// Context sets the context to be used in this call's Do method. Any
26021// pending HTTP request will be aborted if the provided context is
26022// canceled.
26023func (c *DisksListCall) Context(ctx context.Context) *DisksListCall {
26024	c.ctx_ = ctx
26025	return c
26026}
26027
26028// Header returns an http.Header that can be modified by the caller to
26029// add HTTP headers to the request.
26030func (c *DisksListCall) Header() http.Header {
26031	if c.header_ == nil {
26032		c.header_ = make(http.Header)
26033	}
26034	return c.header_
26035}
26036
26037func (c *DisksListCall) doRequest(alt string) (*http.Response, error) {
26038	reqHeaders := make(http.Header)
26039	for k, v := range c.header_ {
26040		reqHeaders[k] = v
26041	}
26042	reqHeaders.Set("User-Agent", c.s.userAgent())
26043	if c.ifNoneMatch_ != "" {
26044		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26045	}
26046	var body io.Reader = nil
26047	c.urlParams_.Set("alt", alt)
26048	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks")
26049	urls += "?" + c.urlParams_.Encode()
26050	req, _ := http.NewRequest("GET", urls, body)
26051	req.Header = reqHeaders
26052	googleapi.Expand(req.URL, map[string]string{
26053		"project": c.project,
26054		"zone":    c.zone,
26055	})
26056	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26057}
26058
26059// Do executes the "compute.disks.list" call.
26060// Exactly one of *DiskList or error will be non-nil. Any non-2xx status
26061// code is an error. Response headers are in either
26062// *DiskList.ServerResponse.Header or (if a response was returned at
26063// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26064// to check whether the returned error was because
26065// http.StatusNotModified was returned.
26066func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) {
26067	gensupport.SetOptions(c.urlParams_, opts...)
26068	res, err := c.doRequest("json")
26069	if res != nil && res.StatusCode == http.StatusNotModified {
26070		if res.Body != nil {
26071			res.Body.Close()
26072		}
26073		return nil, &googleapi.Error{
26074			Code:   res.StatusCode,
26075			Header: res.Header,
26076		}
26077	}
26078	if err != nil {
26079		return nil, err
26080	}
26081	defer googleapi.CloseBody(res)
26082	if err := googleapi.CheckResponse(res); err != nil {
26083		return nil, err
26084	}
26085	ret := &DiskList{
26086		ServerResponse: googleapi.ServerResponse{
26087			Header:         res.Header,
26088			HTTPStatusCode: res.StatusCode,
26089		},
26090	}
26091	target := &ret
26092	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
26093		return nil, err
26094	}
26095	return ret, nil
26096	// {
26097	//   "description": "Retrieves a list of persistent disks contained within the specified zone.",
26098	//   "httpMethod": "GET",
26099	//   "id": "compute.disks.list",
26100	//   "parameterOrder": [
26101	//     "project",
26102	//     "zone"
26103	//   ],
26104	//   "parameters": {
26105	//     "filter": {
26106	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
26107	//       "location": "query",
26108	//       "type": "string"
26109	//     },
26110	//     "maxResults": {
26111	//       "default": "500",
26112	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
26113	//       "format": "uint32",
26114	//       "location": "query",
26115	//       "minimum": "0",
26116	//       "type": "integer"
26117	//     },
26118	//     "orderBy": {
26119	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
26120	//       "location": "query",
26121	//       "type": "string"
26122	//     },
26123	//     "pageToken": {
26124	//       "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.",
26125	//       "location": "query",
26126	//       "type": "string"
26127	//     },
26128	//     "project": {
26129	//       "description": "Project ID for this request.",
26130	//       "location": "path",
26131	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26132	//       "required": true,
26133	//       "type": "string"
26134	//     },
26135	//     "zone": {
26136	//       "description": "The name of the zone for this request.",
26137	//       "location": "path",
26138	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26139	//       "required": true,
26140	//       "type": "string"
26141	//     }
26142	//   },
26143	//   "path": "{project}/zones/{zone}/disks",
26144	//   "response": {
26145	//     "$ref": "DiskList"
26146	//   },
26147	//   "scopes": [
26148	//     "https://www.googleapis.com/auth/cloud-platform",
26149	//     "https://www.googleapis.com/auth/compute",
26150	//     "https://www.googleapis.com/auth/compute.readonly"
26151	//   ]
26152	// }
26153
26154}
26155
26156// Pages invokes f for each page of results.
26157// A non-nil error returned from f will halt the iteration.
26158// The provided context supersedes any context provided to the Context method.
26159func (c *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error {
26160	c.ctx_ = ctx
26161	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26162	for {
26163		x, err := c.Do()
26164		if err != nil {
26165			return err
26166		}
26167		if err := f(x); err != nil {
26168			return err
26169		}
26170		if x.NextPageToken == "" {
26171			return nil
26172		}
26173		c.PageToken(x.NextPageToken)
26174	}
26175}
26176
26177// method id "compute.disks.resize":
26178
26179type DisksResizeCall struct {
26180	s                  *Service
26181	project            string
26182	zone               string
26183	disk               string
26184	disksresizerequest *DisksResizeRequest
26185	urlParams_         gensupport.URLParams
26186	ctx_               context.Context
26187	header_            http.Header
26188}
26189
26190// Resize: Resizes the specified persistent disk.
26191func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall {
26192	c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26193	c.project = project
26194	c.zone = zone
26195	c.disk = disk
26196	c.disksresizerequest = disksresizerequest
26197	return c
26198}
26199
26200// RequestId sets the optional parameter "requestId": An optional
26201// request ID to identify requests. Specify a unique request ID so that
26202// if you must retry your request, the server will know to ignore the
26203// request if it has already been completed.
26204//
26205// For example, consider a situation where you make an initial request
26206// and the request times out. If you make the request again with the
26207// same request ID, the server can check if original operation with the
26208// same request ID was received, and if so, will ignore the second
26209// request. This prevents clients from accidentally creating duplicate
26210// commitments.
26211//
26212// The request ID must be a valid UUID with the exception that zero UUID
26213// is not supported (00000000-0000-0000-0000-000000000000).
26214func (c *DisksResizeCall) RequestId(requestId string) *DisksResizeCall {
26215	c.urlParams_.Set("requestId", requestId)
26216	return c
26217}
26218
26219// Fields allows partial responses to be retrieved. See
26220// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26221// for more information.
26222func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall {
26223	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26224	return c
26225}
26226
26227// Context sets the context to be used in this call's Do method. Any
26228// pending HTTP request will be aborted if the provided context is
26229// canceled.
26230func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall {
26231	c.ctx_ = ctx
26232	return c
26233}
26234
26235// Header returns an http.Header that can be modified by the caller to
26236// add HTTP headers to the request.
26237func (c *DisksResizeCall) Header() http.Header {
26238	if c.header_ == nil {
26239		c.header_ = make(http.Header)
26240	}
26241	return c.header_
26242}
26243
26244func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) {
26245	reqHeaders := make(http.Header)
26246	for k, v := range c.header_ {
26247		reqHeaders[k] = v
26248	}
26249	reqHeaders.Set("User-Agent", c.s.userAgent())
26250	var body io.Reader = nil
26251	body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest)
26252	if err != nil {
26253		return nil, err
26254	}
26255	reqHeaders.Set("Content-Type", "application/json")
26256	c.urlParams_.Set("alt", alt)
26257	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/resize")
26258	urls += "?" + c.urlParams_.Encode()
26259	req, _ := http.NewRequest("POST", urls, body)
26260	req.Header = reqHeaders
26261	googleapi.Expand(req.URL, map[string]string{
26262		"project": c.project,
26263		"zone":    c.zone,
26264		"disk":    c.disk,
26265	})
26266	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26267}
26268
26269// Do executes the "compute.disks.resize" call.
26270// Exactly one of *Operation or error will be non-nil. Any non-2xx
26271// status code is an error. Response headers are in either
26272// *Operation.ServerResponse.Header or (if a response was returned at
26273// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26274// to check whether the returned error was because
26275// http.StatusNotModified was returned.
26276func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26277	gensupport.SetOptions(c.urlParams_, opts...)
26278	res, err := c.doRequest("json")
26279	if res != nil && res.StatusCode == http.StatusNotModified {
26280		if res.Body != nil {
26281			res.Body.Close()
26282		}
26283		return nil, &googleapi.Error{
26284			Code:   res.StatusCode,
26285			Header: res.Header,
26286		}
26287	}
26288	if err != nil {
26289		return nil, err
26290	}
26291	defer googleapi.CloseBody(res)
26292	if err := googleapi.CheckResponse(res); err != nil {
26293		return nil, err
26294	}
26295	ret := &Operation{
26296		ServerResponse: googleapi.ServerResponse{
26297			Header:         res.Header,
26298			HTTPStatusCode: res.StatusCode,
26299		},
26300	}
26301	target := &ret
26302	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
26303		return nil, err
26304	}
26305	return ret, nil
26306	// {
26307	//   "description": "Resizes the specified persistent disk.",
26308	//   "httpMethod": "POST",
26309	//   "id": "compute.disks.resize",
26310	//   "parameterOrder": [
26311	//     "project",
26312	//     "zone",
26313	//     "disk"
26314	//   ],
26315	//   "parameters": {
26316	//     "disk": {
26317	//       "description": "The name of the persistent disk.",
26318	//       "location": "path",
26319	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26320	//       "required": true,
26321	//       "type": "string"
26322	//     },
26323	//     "project": {
26324	//       "description": "Project ID for this request.",
26325	//       "location": "path",
26326	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26327	//       "required": true,
26328	//       "type": "string"
26329	//     },
26330	//     "requestId": {
26331	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
26332	//       "location": "query",
26333	//       "type": "string"
26334	//     },
26335	//     "zone": {
26336	//       "description": "The name of the zone for this request.",
26337	//       "location": "path",
26338	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26339	//       "required": true,
26340	//       "type": "string"
26341	//     }
26342	//   },
26343	//   "path": "{project}/zones/{zone}/disks/{disk}/resize",
26344	//   "request": {
26345	//     "$ref": "DisksResizeRequest"
26346	//   },
26347	//   "response": {
26348	//     "$ref": "Operation"
26349	//   },
26350	//   "scopes": [
26351	//     "https://www.googleapis.com/auth/cloud-platform",
26352	//     "https://www.googleapis.com/auth/compute"
26353	//   ]
26354	// }
26355
26356}
26357
26358// method id "compute.disks.setLabels":
26359
26360type DisksSetLabelsCall struct {
26361	s                    *Service
26362	project              string
26363	zone                 string
26364	resource             string
26365	zonesetlabelsrequest *ZoneSetLabelsRequest
26366	urlParams_           gensupport.URLParams
26367	ctx_                 context.Context
26368	header_              http.Header
26369}
26370
26371// SetLabels: Sets the labels on a disk. To learn more about labels,
26372// read the Labeling Resources documentation.
26373func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall {
26374	c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26375	c.project = project
26376	c.zone = zone
26377	c.resource = resource
26378	c.zonesetlabelsrequest = zonesetlabelsrequest
26379	return c
26380}
26381
26382// RequestId sets the optional parameter "requestId": An optional
26383// request ID to identify requests. Specify a unique request ID so that
26384// if you must retry your request, the server will know to ignore the
26385// request if it has already been completed.
26386//
26387// For example, consider a situation where you make an initial request
26388// and the request times out. If you make the request again with the
26389// same request ID, the server can check if original operation with the
26390// same request ID was received, and if so, will ignore the second
26391// request. This prevents clients from accidentally creating duplicate
26392// commitments.
26393//
26394// The request ID must be a valid UUID with the exception that zero UUID
26395// is not supported (00000000-0000-0000-0000-000000000000).
26396func (c *DisksSetLabelsCall) RequestId(requestId string) *DisksSetLabelsCall {
26397	c.urlParams_.Set("requestId", requestId)
26398	return c
26399}
26400
26401// Fields allows partial responses to be retrieved. See
26402// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26403// for more information.
26404func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall {
26405	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26406	return c
26407}
26408
26409// Context sets the context to be used in this call's Do method. Any
26410// pending HTTP request will be aborted if the provided context is
26411// canceled.
26412func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall {
26413	c.ctx_ = ctx
26414	return c
26415}
26416
26417// Header returns an http.Header that can be modified by the caller to
26418// add HTTP headers to the request.
26419func (c *DisksSetLabelsCall) Header() http.Header {
26420	if c.header_ == nil {
26421		c.header_ = make(http.Header)
26422	}
26423	return c.header_
26424}
26425
26426func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) {
26427	reqHeaders := make(http.Header)
26428	for k, v := range c.header_ {
26429		reqHeaders[k] = v
26430	}
26431	reqHeaders.Set("User-Agent", c.s.userAgent())
26432	var body io.Reader = nil
26433	body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest)
26434	if err != nil {
26435		return nil, err
26436	}
26437	reqHeaders.Set("Content-Type", "application/json")
26438	c.urlParams_.Set("alt", alt)
26439	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setLabels")
26440	urls += "?" + c.urlParams_.Encode()
26441	req, _ := http.NewRequest("POST", urls, body)
26442	req.Header = reqHeaders
26443	googleapi.Expand(req.URL, map[string]string{
26444		"project":  c.project,
26445		"zone":     c.zone,
26446		"resource": c.resource,
26447	})
26448	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26449}
26450
26451// Do executes the "compute.disks.setLabels" call.
26452// Exactly one of *Operation or error will be non-nil. Any non-2xx
26453// status code is an error. Response headers are in either
26454// *Operation.ServerResponse.Header or (if a response was returned at
26455// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26456// to check whether the returned error was because
26457// http.StatusNotModified was returned.
26458func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26459	gensupport.SetOptions(c.urlParams_, opts...)
26460	res, err := c.doRequest("json")
26461	if res != nil && res.StatusCode == http.StatusNotModified {
26462		if res.Body != nil {
26463			res.Body.Close()
26464		}
26465		return nil, &googleapi.Error{
26466			Code:   res.StatusCode,
26467			Header: res.Header,
26468		}
26469	}
26470	if err != nil {
26471		return nil, err
26472	}
26473	defer googleapi.CloseBody(res)
26474	if err := googleapi.CheckResponse(res); err != nil {
26475		return nil, err
26476	}
26477	ret := &Operation{
26478		ServerResponse: googleapi.ServerResponse{
26479			Header:         res.Header,
26480			HTTPStatusCode: res.StatusCode,
26481		},
26482	}
26483	target := &ret
26484	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
26485		return nil, err
26486	}
26487	return ret, nil
26488	// {
26489	//   "description": "Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.",
26490	//   "httpMethod": "POST",
26491	//   "id": "compute.disks.setLabels",
26492	//   "parameterOrder": [
26493	//     "project",
26494	//     "zone",
26495	//     "resource"
26496	//   ],
26497	//   "parameters": {
26498	//     "project": {
26499	//       "description": "Project ID for this request.",
26500	//       "location": "path",
26501	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26502	//       "required": true,
26503	//       "type": "string"
26504	//     },
26505	//     "requestId": {
26506	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
26507	//       "location": "query",
26508	//       "type": "string"
26509	//     },
26510	//     "resource": {
26511	//       "description": "Name of the resource for this request.",
26512	//       "location": "path",
26513	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26514	//       "required": true,
26515	//       "type": "string"
26516	//     },
26517	//     "zone": {
26518	//       "description": "The name of the zone for this request.",
26519	//       "location": "path",
26520	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26521	//       "required": true,
26522	//       "type": "string"
26523	//     }
26524	//   },
26525	//   "path": "{project}/zones/{zone}/disks/{resource}/setLabels",
26526	//   "request": {
26527	//     "$ref": "ZoneSetLabelsRequest"
26528	//   },
26529	//   "response": {
26530	//     "$ref": "Operation"
26531	//   },
26532	//   "scopes": [
26533	//     "https://www.googleapis.com/auth/cloud-platform",
26534	//     "https://www.googleapis.com/auth/compute"
26535	//   ]
26536	// }
26537
26538}
26539
26540// method id "compute.disks.testIamPermissions":
26541
26542type DisksTestIamPermissionsCall struct {
26543	s                      *Service
26544	project                string
26545	zone                   string
26546	resource               string
26547	testpermissionsrequest *TestPermissionsRequest
26548	urlParams_             gensupport.URLParams
26549	ctx_                   context.Context
26550	header_                http.Header
26551}
26552
26553// TestIamPermissions: Returns permissions that a caller has on the
26554// specified resource.
26555func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall {
26556	c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26557	c.project = project
26558	c.zone = zone
26559	c.resource = resource
26560	c.testpermissionsrequest = testpermissionsrequest
26561	return c
26562}
26563
26564// Fields allows partial responses to be retrieved. See
26565// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26566// for more information.
26567func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall {
26568	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26569	return c
26570}
26571
26572// Context sets the context to be used in this call's Do method. Any
26573// pending HTTP request will be aborted if the provided context is
26574// canceled.
26575func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall {
26576	c.ctx_ = ctx
26577	return c
26578}
26579
26580// Header returns an http.Header that can be modified by the caller to
26581// add HTTP headers to the request.
26582func (c *DisksTestIamPermissionsCall) Header() http.Header {
26583	if c.header_ == nil {
26584		c.header_ = make(http.Header)
26585	}
26586	return c.header_
26587}
26588
26589func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
26590	reqHeaders := make(http.Header)
26591	for k, v := range c.header_ {
26592		reqHeaders[k] = v
26593	}
26594	reqHeaders.Set("User-Agent", c.s.userAgent())
26595	var body io.Reader = nil
26596	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
26597	if err != nil {
26598		return nil, err
26599	}
26600	reqHeaders.Set("Content-Type", "application/json")
26601	c.urlParams_.Set("alt", alt)
26602	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/testIamPermissions")
26603	urls += "?" + c.urlParams_.Encode()
26604	req, _ := http.NewRequest("POST", urls, body)
26605	req.Header = reqHeaders
26606	googleapi.Expand(req.URL, map[string]string{
26607		"project":  c.project,
26608		"zone":     c.zone,
26609		"resource": c.resource,
26610	})
26611	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26612}
26613
26614// Do executes the "compute.disks.testIamPermissions" call.
26615// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
26616// non-2xx status code is an error. Response headers are in either
26617// *TestPermissionsResponse.ServerResponse.Header or (if a response was
26618// returned at all) in error.(*googleapi.Error).Header. Use
26619// googleapi.IsNotModified to check whether the returned error was
26620// because http.StatusNotModified was returned.
26621func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
26622	gensupport.SetOptions(c.urlParams_, opts...)
26623	res, err := c.doRequest("json")
26624	if res != nil && res.StatusCode == http.StatusNotModified {
26625		if res.Body != nil {
26626			res.Body.Close()
26627		}
26628		return nil, &googleapi.Error{
26629			Code:   res.StatusCode,
26630			Header: res.Header,
26631		}
26632	}
26633	if err != nil {
26634		return nil, err
26635	}
26636	defer googleapi.CloseBody(res)
26637	if err := googleapi.CheckResponse(res); err != nil {
26638		return nil, err
26639	}
26640	ret := &TestPermissionsResponse{
26641		ServerResponse: googleapi.ServerResponse{
26642			Header:         res.Header,
26643			HTTPStatusCode: res.StatusCode,
26644		},
26645	}
26646	target := &ret
26647	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
26648		return nil, err
26649	}
26650	return ret, nil
26651	// {
26652	//   "description": "Returns permissions that a caller has on the specified resource.",
26653	//   "httpMethod": "POST",
26654	//   "id": "compute.disks.testIamPermissions",
26655	//   "parameterOrder": [
26656	//     "project",
26657	//     "zone",
26658	//     "resource"
26659	//   ],
26660	//   "parameters": {
26661	//     "project": {
26662	//       "description": "Project ID for this request.",
26663	//       "location": "path",
26664	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26665	//       "required": true,
26666	//       "type": "string"
26667	//     },
26668	//     "resource": {
26669	//       "description": "Name of the resource for this request.",
26670	//       "location": "path",
26671	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26672	//       "required": true,
26673	//       "type": "string"
26674	//     },
26675	//     "zone": {
26676	//       "description": "The name of the zone for this request.",
26677	//       "location": "path",
26678	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26679	//       "required": true,
26680	//       "type": "string"
26681	//     }
26682	//   },
26683	//   "path": "{project}/zones/{zone}/disks/{resource}/testIamPermissions",
26684	//   "request": {
26685	//     "$ref": "TestPermissionsRequest"
26686	//   },
26687	//   "response": {
26688	//     "$ref": "TestPermissionsResponse"
26689	//   },
26690	//   "scopes": [
26691	//     "https://www.googleapis.com/auth/cloud-platform",
26692	//     "https://www.googleapis.com/auth/compute",
26693	//     "https://www.googleapis.com/auth/compute.readonly"
26694	//   ]
26695	// }
26696
26697}
26698
26699// method id "compute.firewalls.delete":
26700
26701type FirewallsDeleteCall struct {
26702	s          *Service
26703	project    string
26704	firewall   string
26705	urlParams_ gensupport.URLParams
26706	ctx_       context.Context
26707	header_    http.Header
26708}
26709
26710// Delete: Deletes the specified firewall.
26711// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete
26712func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall {
26713	c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26714	c.project = project
26715	c.firewall = firewall
26716	return c
26717}
26718
26719// RequestId sets the optional parameter "requestId": An optional
26720// request ID to identify requests. Specify a unique request ID so that
26721// if you must retry your request, the server will know to ignore the
26722// request if it has already been completed.
26723//
26724// For example, consider a situation where you make an initial request
26725// and the request times out. If you make the request again with the
26726// same request ID, the server can check if original operation with the
26727// same request ID was received, and if so, will ignore the second
26728// request. This prevents clients from accidentally creating duplicate
26729// commitments.
26730//
26731// The request ID must be a valid UUID with the exception that zero UUID
26732// is not supported (00000000-0000-0000-0000-000000000000).
26733func (c *FirewallsDeleteCall) RequestId(requestId string) *FirewallsDeleteCall {
26734	c.urlParams_.Set("requestId", requestId)
26735	return c
26736}
26737
26738// Fields allows partial responses to be retrieved. See
26739// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26740// for more information.
26741func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall {
26742	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26743	return c
26744}
26745
26746// Context sets the context to be used in this call's Do method. Any
26747// pending HTTP request will be aborted if the provided context is
26748// canceled.
26749func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall {
26750	c.ctx_ = ctx
26751	return c
26752}
26753
26754// Header returns an http.Header that can be modified by the caller to
26755// add HTTP headers to the request.
26756func (c *FirewallsDeleteCall) Header() http.Header {
26757	if c.header_ == nil {
26758		c.header_ = make(http.Header)
26759	}
26760	return c.header_
26761}
26762
26763func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) {
26764	reqHeaders := make(http.Header)
26765	for k, v := range c.header_ {
26766		reqHeaders[k] = v
26767	}
26768	reqHeaders.Set("User-Agent", c.s.userAgent())
26769	var body io.Reader = nil
26770	c.urlParams_.Set("alt", alt)
26771	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
26772	urls += "?" + c.urlParams_.Encode()
26773	req, _ := http.NewRequest("DELETE", urls, body)
26774	req.Header = reqHeaders
26775	googleapi.Expand(req.URL, map[string]string{
26776		"project":  c.project,
26777		"firewall": c.firewall,
26778	})
26779	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26780}
26781
26782// Do executes the "compute.firewalls.delete" call.
26783// Exactly one of *Operation or error will be non-nil. Any non-2xx
26784// status code is an error. Response headers are in either
26785// *Operation.ServerResponse.Header or (if a response was returned at
26786// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26787// to check whether the returned error was because
26788// http.StatusNotModified was returned.
26789func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26790	gensupport.SetOptions(c.urlParams_, opts...)
26791	res, err := c.doRequest("json")
26792	if res != nil && res.StatusCode == http.StatusNotModified {
26793		if res.Body != nil {
26794			res.Body.Close()
26795		}
26796		return nil, &googleapi.Error{
26797			Code:   res.StatusCode,
26798			Header: res.Header,
26799		}
26800	}
26801	if err != nil {
26802		return nil, err
26803	}
26804	defer googleapi.CloseBody(res)
26805	if err := googleapi.CheckResponse(res); err != nil {
26806		return nil, err
26807	}
26808	ret := &Operation{
26809		ServerResponse: googleapi.ServerResponse{
26810			Header:         res.Header,
26811			HTTPStatusCode: res.StatusCode,
26812		},
26813	}
26814	target := &ret
26815	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
26816		return nil, err
26817	}
26818	return ret, nil
26819	// {
26820	//   "description": "Deletes the specified firewall.",
26821	//   "httpMethod": "DELETE",
26822	//   "id": "compute.firewalls.delete",
26823	//   "parameterOrder": [
26824	//     "project",
26825	//     "firewall"
26826	//   ],
26827	//   "parameters": {
26828	//     "firewall": {
26829	//       "description": "Name of the firewall rule to delete.",
26830	//       "location": "path",
26831	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26832	//       "required": true,
26833	//       "type": "string"
26834	//     },
26835	//     "project": {
26836	//       "description": "Project ID for this request.",
26837	//       "location": "path",
26838	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26839	//       "required": true,
26840	//       "type": "string"
26841	//     },
26842	//     "requestId": {
26843	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
26844	//       "location": "query",
26845	//       "type": "string"
26846	//     }
26847	//   },
26848	//   "path": "{project}/global/firewalls/{firewall}",
26849	//   "response": {
26850	//     "$ref": "Operation"
26851	//   },
26852	//   "scopes": [
26853	//     "https://www.googleapis.com/auth/cloud-platform",
26854	//     "https://www.googleapis.com/auth/compute"
26855	//   ]
26856	// }
26857
26858}
26859
26860// method id "compute.firewalls.get":
26861
26862type FirewallsGetCall struct {
26863	s            *Service
26864	project      string
26865	firewall     string
26866	urlParams_   gensupport.URLParams
26867	ifNoneMatch_ string
26868	ctx_         context.Context
26869	header_      http.Header
26870}
26871
26872// Get: Returns the specified firewall.
26873// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get
26874func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall {
26875	c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26876	c.project = project
26877	c.firewall = firewall
26878	return c
26879}
26880
26881// Fields allows partial responses to be retrieved. See
26882// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26883// for more information.
26884func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall {
26885	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26886	return c
26887}
26888
26889// IfNoneMatch sets the optional parameter which makes the operation
26890// fail if the object's ETag matches the given value. This is useful for
26891// getting updates only after the object has changed since the last
26892// request. Use googleapi.IsNotModified to check whether the response
26893// error from Do is the result of In-None-Match.
26894func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall {
26895	c.ifNoneMatch_ = entityTag
26896	return c
26897}
26898
26899// Context sets the context to be used in this call's Do method. Any
26900// pending HTTP request will be aborted if the provided context is
26901// canceled.
26902func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall {
26903	c.ctx_ = ctx
26904	return c
26905}
26906
26907// Header returns an http.Header that can be modified by the caller to
26908// add HTTP headers to the request.
26909func (c *FirewallsGetCall) Header() http.Header {
26910	if c.header_ == nil {
26911		c.header_ = make(http.Header)
26912	}
26913	return c.header_
26914}
26915
26916func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) {
26917	reqHeaders := make(http.Header)
26918	for k, v := range c.header_ {
26919		reqHeaders[k] = v
26920	}
26921	reqHeaders.Set("User-Agent", c.s.userAgent())
26922	if c.ifNoneMatch_ != "" {
26923		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
26924	}
26925	var body io.Reader = nil
26926	c.urlParams_.Set("alt", alt)
26927	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
26928	urls += "?" + c.urlParams_.Encode()
26929	req, _ := http.NewRequest("GET", urls, body)
26930	req.Header = reqHeaders
26931	googleapi.Expand(req.URL, map[string]string{
26932		"project":  c.project,
26933		"firewall": c.firewall,
26934	})
26935	return gensupport.SendRequest(c.ctx_, c.s.client, req)
26936}
26937
26938// Do executes the "compute.firewalls.get" call.
26939// Exactly one of *Firewall or error will be non-nil. Any non-2xx status
26940// code is an error. Response headers are in either
26941// *Firewall.ServerResponse.Header or (if a response was returned at
26942// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26943// to check whether the returned error was because
26944// http.StatusNotModified was returned.
26945func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) {
26946	gensupport.SetOptions(c.urlParams_, opts...)
26947	res, err := c.doRequest("json")
26948	if res != nil && res.StatusCode == http.StatusNotModified {
26949		if res.Body != nil {
26950			res.Body.Close()
26951		}
26952		return nil, &googleapi.Error{
26953			Code:   res.StatusCode,
26954			Header: res.Header,
26955		}
26956	}
26957	if err != nil {
26958		return nil, err
26959	}
26960	defer googleapi.CloseBody(res)
26961	if err := googleapi.CheckResponse(res); err != nil {
26962		return nil, err
26963	}
26964	ret := &Firewall{
26965		ServerResponse: googleapi.ServerResponse{
26966			Header:         res.Header,
26967			HTTPStatusCode: res.StatusCode,
26968		},
26969	}
26970	target := &ret
26971	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
26972		return nil, err
26973	}
26974	return ret, nil
26975	// {
26976	//   "description": "Returns the specified firewall.",
26977	//   "httpMethod": "GET",
26978	//   "id": "compute.firewalls.get",
26979	//   "parameterOrder": [
26980	//     "project",
26981	//     "firewall"
26982	//   ],
26983	//   "parameters": {
26984	//     "firewall": {
26985	//       "description": "Name of the firewall rule to return.",
26986	//       "location": "path",
26987	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
26988	//       "required": true,
26989	//       "type": "string"
26990	//     },
26991	//     "project": {
26992	//       "description": "Project ID for this request.",
26993	//       "location": "path",
26994	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26995	//       "required": true,
26996	//       "type": "string"
26997	//     }
26998	//   },
26999	//   "path": "{project}/global/firewalls/{firewall}",
27000	//   "response": {
27001	//     "$ref": "Firewall"
27002	//   },
27003	//   "scopes": [
27004	//     "https://www.googleapis.com/auth/cloud-platform",
27005	//     "https://www.googleapis.com/auth/compute",
27006	//     "https://www.googleapis.com/auth/compute.readonly"
27007	//   ]
27008	// }
27009
27010}
27011
27012// method id "compute.firewalls.insert":
27013
27014type FirewallsInsertCall struct {
27015	s          *Service
27016	project    string
27017	firewall   *Firewall
27018	urlParams_ gensupport.URLParams
27019	ctx_       context.Context
27020	header_    http.Header
27021}
27022
27023// Insert: Creates a firewall rule in the specified project using the
27024// data included in the request.
27025// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert
27026func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall {
27027	c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27028	c.project = project
27029	c.firewall = firewall
27030	return c
27031}
27032
27033// RequestId sets the optional parameter "requestId": An optional
27034// request ID to identify requests. Specify a unique request ID so that
27035// if you must retry your request, the server will know to ignore the
27036// request if it has already been completed.
27037//
27038// For example, consider a situation where you make an initial request
27039// and the request times out. If you make the request again with the
27040// same request ID, the server can check if original operation with the
27041// same request ID was received, and if so, will ignore the second
27042// request. This prevents clients from accidentally creating duplicate
27043// commitments.
27044//
27045// The request ID must be a valid UUID with the exception that zero UUID
27046// is not supported (00000000-0000-0000-0000-000000000000).
27047func (c *FirewallsInsertCall) RequestId(requestId string) *FirewallsInsertCall {
27048	c.urlParams_.Set("requestId", requestId)
27049	return c
27050}
27051
27052// Fields allows partial responses to be retrieved. See
27053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27054// for more information.
27055func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall {
27056	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27057	return c
27058}
27059
27060// Context sets the context to be used in this call's Do method. Any
27061// pending HTTP request will be aborted if the provided context is
27062// canceled.
27063func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall {
27064	c.ctx_ = ctx
27065	return c
27066}
27067
27068// Header returns an http.Header that can be modified by the caller to
27069// add HTTP headers to the request.
27070func (c *FirewallsInsertCall) Header() http.Header {
27071	if c.header_ == nil {
27072		c.header_ = make(http.Header)
27073	}
27074	return c.header_
27075}
27076
27077func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) {
27078	reqHeaders := make(http.Header)
27079	for k, v := range c.header_ {
27080		reqHeaders[k] = v
27081	}
27082	reqHeaders.Set("User-Agent", c.s.userAgent())
27083	var body io.Reader = nil
27084	body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall)
27085	if err != nil {
27086		return nil, err
27087	}
27088	reqHeaders.Set("Content-Type", "application/json")
27089	c.urlParams_.Set("alt", alt)
27090	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls")
27091	urls += "?" + c.urlParams_.Encode()
27092	req, _ := http.NewRequest("POST", urls, body)
27093	req.Header = reqHeaders
27094	googleapi.Expand(req.URL, map[string]string{
27095		"project": c.project,
27096	})
27097	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27098}
27099
27100// Do executes the "compute.firewalls.insert" call.
27101// Exactly one of *Operation or error will be non-nil. Any non-2xx
27102// status code is an error. Response headers are in either
27103// *Operation.ServerResponse.Header or (if a response was returned at
27104// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27105// to check whether the returned error was because
27106// http.StatusNotModified was returned.
27107func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27108	gensupport.SetOptions(c.urlParams_, opts...)
27109	res, err := c.doRequest("json")
27110	if res != nil && res.StatusCode == http.StatusNotModified {
27111		if res.Body != nil {
27112			res.Body.Close()
27113		}
27114		return nil, &googleapi.Error{
27115			Code:   res.StatusCode,
27116			Header: res.Header,
27117		}
27118	}
27119	if err != nil {
27120		return nil, err
27121	}
27122	defer googleapi.CloseBody(res)
27123	if err := googleapi.CheckResponse(res); err != nil {
27124		return nil, err
27125	}
27126	ret := &Operation{
27127		ServerResponse: googleapi.ServerResponse{
27128			Header:         res.Header,
27129			HTTPStatusCode: res.StatusCode,
27130		},
27131	}
27132	target := &ret
27133	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
27134		return nil, err
27135	}
27136	return ret, nil
27137	// {
27138	//   "description": "Creates a firewall rule in the specified project using the data included in the request.",
27139	//   "httpMethod": "POST",
27140	//   "id": "compute.firewalls.insert",
27141	//   "parameterOrder": [
27142	//     "project"
27143	//   ],
27144	//   "parameters": {
27145	//     "project": {
27146	//       "description": "Project ID for this request.",
27147	//       "location": "path",
27148	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27149	//       "required": true,
27150	//       "type": "string"
27151	//     },
27152	//     "requestId": {
27153	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
27154	//       "location": "query",
27155	//       "type": "string"
27156	//     }
27157	//   },
27158	//   "path": "{project}/global/firewalls",
27159	//   "request": {
27160	//     "$ref": "Firewall"
27161	//   },
27162	//   "response": {
27163	//     "$ref": "Operation"
27164	//   },
27165	//   "scopes": [
27166	//     "https://www.googleapis.com/auth/cloud-platform",
27167	//     "https://www.googleapis.com/auth/compute"
27168	//   ]
27169	// }
27170
27171}
27172
27173// method id "compute.firewalls.list":
27174
27175type FirewallsListCall struct {
27176	s            *Service
27177	project      string
27178	urlParams_   gensupport.URLParams
27179	ifNoneMatch_ string
27180	ctx_         context.Context
27181	header_      http.Header
27182}
27183
27184// List: Retrieves the list of firewall rules available to the specified
27185// project.
27186// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list
27187func (r *FirewallsService) List(project string) *FirewallsListCall {
27188	c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27189	c.project = project
27190	return c
27191}
27192
27193// Filter sets the optional parameter "filter": Sets a filter
27194// {expression} for filtering listed resources. Your {expression} must
27195// be in the format: field_name comparison_string literal_string.
27196//
27197// The field_name is the name of the field you want to compare. Only
27198// atomic field types are supported (string, number, boolean). The
27199// comparison_string must be either eq (equals) or ne (not equals). The
27200// literal_string is the string value to filter to. The literal value
27201// must be valid for the type of field you are filtering by (string,
27202// number, boolean). For string fields, the literal value is interpreted
27203// as a regular expression using RE2 syntax. The literal value must
27204// match the entire field.
27205//
27206// For example, to filter for instances that do not have a name of
27207// example-instance, you would use name ne example-instance.
27208//
27209// You can filter on nested fields. For example, you could filter on
27210// instances that have set the scheduling.automaticRestart field to
27211// true. Use filtering on nested fields to take advantage of labels to
27212// organize and search for results based on label values.
27213//
27214// To filter on multiple expressions, provide each separate expression
27215// within parentheses. For example, (scheduling.automaticRestart eq
27216// true) (zone eq us-central1-f). Multiple expressions are treated as
27217// AND expressions, meaning that resources must match all expressions to
27218// pass the filters.
27219func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall {
27220	c.urlParams_.Set("filter", filter)
27221	return c
27222}
27223
27224// MaxResults sets the optional parameter "maxResults": The maximum
27225// number of results per page that should be returned. If the number of
27226// available results is larger than maxResults, Compute Engine returns a
27227// nextPageToken that can be used to get the next page of results in
27228// subsequent list requests. Acceptable values are 0 to 500, inclusive.
27229// (Default: 500)
27230func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall {
27231	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27232	return c
27233}
27234
27235// OrderBy sets the optional parameter "orderBy": Sorts list results by
27236// a certain order. By default, results are returned in alphanumerical
27237// order based on the resource name.
27238//
27239// You can also sort results in descending order based on the creation
27240// timestamp using orderBy="creationTimestamp desc". This sorts results
27241// based on the creationTimestamp field in reverse chronological order
27242// (newest result first). Use this to sort resources like operations so
27243// that the newest operation is returned first.
27244//
27245// Currently, only sorting by name or creationTimestamp desc is
27246// supported.
27247func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall {
27248	c.urlParams_.Set("orderBy", orderBy)
27249	return c
27250}
27251
27252// PageToken sets the optional parameter "pageToken": Specifies a page
27253// token to use. Set pageToken to the nextPageToken returned by a
27254// previous list request to get the next page of results.
27255func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall {
27256	c.urlParams_.Set("pageToken", pageToken)
27257	return c
27258}
27259
27260// Fields allows partial responses to be retrieved. See
27261// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27262// for more information.
27263func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall {
27264	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27265	return c
27266}
27267
27268// IfNoneMatch sets the optional parameter which makes the operation
27269// fail if the object's ETag matches the given value. This is useful for
27270// getting updates only after the object has changed since the last
27271// request. Use googleapi.IsNotModified to check whether the response
27272// error from Do is the result of In-None-Match.
27273func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall {
27274	c.ifNoneMatch_ = entityTag
27275	return c
27276}
27277
27278// Context sets the context to be used in this call's Do method. Any
27279// pending HTTP request will be aborted if the provided context is
27280// canceled.
27281func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall {
27282	c.ctx_ = ctx
27283	return c
27284}
27285
27286// Header returns an http.Header that can be modified by the caller to
27287// add HTTP headers to the request.
27288func (c *FirewallsListCall) Header() http.Header {
27289	if c.header_ == nil {
27290		c.header_ = make(http.Header)
27291	}
27292	return c.header_
27293}
27294
27295func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) {
27296	reqHeaders := make(http.Header)
27297	for k, v := range c.header_ {
27298		reqHeaders[k] = v
27299	}
27300	reqHeaders.Set("User-Agent", c.s.userAgent())
27301	if c.ifNoneMatch_ != "" {
27302		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
27303	}
27304	var body io.Reader = nil
27305	c.urlParams_.Set("alt", alt)
27306	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls")
27307	urls += "?" + c.urlParams_.Encode()
27308	req, _ := http.NewRequest("GET", urls, body)
27309	req.Header = reqHeaders
27310	googleapi.Expand(req.URL, map[string]string{
27311		"project": c.project,
27312	})
27313	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27314}
27315
27316// Do executes the "compute.firewalls.list" call.
27317// Exactly one of *FirewallList or error will be non-nil. Any non-2xx
27318// status code is an error. Response headers are in either
27319// *FirewallList.ServerResponse.Header or (if a response was returned at
27320// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27321// to check whether the returned error was because
27322// http.StatusNotModified was returned.
27323func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) {
27324	gensupport.SetOptions(c.urlParams_, opts...)
27325	res, err := c.doRequest("json")
27326	if res != nil && res.StatusCode == http.StatusNotModified {
27327		if res.Body != nil {
27328			res.Body.Close()
27329		}
27330		return nil, &googleapi.Error{
27331			Code:   res.StatusCode,
27332			Header: res.Header,
27333		}
27334	}
27335	if err != nil {
27336		return nil, err
27337	}
27338	defer googleapi.CloseBody(res)
27339	if err := googleapi.CheckResponse(res); err != nil {
27340		return nil, err
27341	}
27342	ret := &FirewallList{
27343		ServerResponse: googleapi.ServerResponse{
27344			Header:         res.Header,
27345			HTTPStatusCode: res.StatusCode,
27346		},
27347	}
27348	target := &ret
27349	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
27350		return nil, err
27351	}
27352	return ret, nil
27353	// {
27354	//   "description": "Retrieves the list of firewall rules available to the specified project.",
27355	//   "httpMethod": "GET",
27356	//   "id": "compute.firewalls.list",
27357	//   "parameterOrder": [
27358	//     "project"
27359	//   ],
27360	//   "parameters": {
27361	//     "filter": {
27362	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
27363	//       "location": "query",
27364	//       "type": "string"
27365	//     },
27366	//     "maxResults": {
27367	//       "default": "500",
27368	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
27369	//       "format": "uint32",
27370	//       "location": "query",
27371	//       "minimum": "0",
27372	//       "type": "integer"
27373	//     },
27374	//     "orderBy": {
27375	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
27376	//       "location": "query",
27377	//       "type": "string"
27378	//     },
27379	//     "pageToken": {
27380	//       "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.",
27381	//       "location": "query",
27382	//       "type": "string"
27383	//     },
27384	//     "project": {
27385	//       "description": "Project ID for this request.",
27386	//       "location": "path",
27387	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27388	//       "required": true,
27389	//       "type": "string"
27390	//     }
27391	//   },
27392	//   "path": "{project}/global/firewalls",
27393	//   "response": {
27394	//     "$ref": "FirewallList"
27395	//   },
27396	//   "scopes": [
27397	//     "https://www.googleapis.com/auth/cloud-platform",
27398	//     "https://www.googleapis.com/auth/compute",
27399	//     "https://www.googleapis.com/auth/compute.readonly"
27400	//   ]
27401	// }
27402
27403}
27404
27405// Pages invokes f for each page of results.
27406// A non-nil error returned from f will halt the iteration.
27407// The provided context supersedes any context provided to the Context method.
27408func (c *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error {
27409	c.ctx_ = ctx
27410	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
27411	for {
27412		x, err := c.Do()
27413		if err != nil {
27414			return err
27415		}
27416		if err := f(x); err != nil {
27417			return err
27418		}
27419		if x.NextPageToken == "" {
27420			return nil
27421		}
27422		c.PageToken(x.NextPageToken)
27423	}
27424}
27425
27426// method id "compute.firewalls.patch":
27427
27428type FirewallsPatchCall struct {
27429	s          *Service
27430	project    string
27431	firewall   string
27432	firewall2  *Firewall
27433	urlParams_ gensupport.URLParams
27434	ctx_       context.Context
27435	header_    http.Header
27436}
27437
27438// Patch: Updates the specified firewall rule with the data included in
27439// the request. This method supports PATCH semantics and uses the JSON
27440// merge patch format and processing rules.
27441// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch
27442func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall {
27443	c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27444	c.project = project
27445	c.firewall = firewall
27446	c.firewall2 = firewall2
27447	return c
27448}
27449
27450// RequestId sets the optional parameter "requestId": An optional
27451// request ID to identify requests. Specify a unique request ID so that
27452// if you must retry your request, the server will know to ignore the
27453// request if it has already been completed.
27454//
27455// For example, consider a situation where you make an initial request
27456// and the request times out. If you make the request again with the
27457// same request ID, the server can check if original operation with the
27458// same request ID was received, and if so, will ignore the second
27459// request. This prevents clients from accidentally creating duplicate
27460// commitments.
27461//
27462// The request ID must be a valid UUID with the exception that zero UUID
27463// is not supported (00000000-0000-0000-0000-000000000000).
27464func (c *FirewallsPatchCall) RequestId(requestId string) *FirewallsPatchCall {
27465	c.urlParams_.Set("requestId", requestId)
27466	return c
27467}
27468
27469// Fields allows partial responses to be retrieved. See
27470// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27471// for more information.
27472func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall {
27473	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27474	return c
27475}
27476
27477// Context sets the context to be used in this call's Do method. Any
27478// pending HTTP request will be aborted if the provided context is
27479// canceled.
27480func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall {
27481	c.ctx_ = ctx
27482	return c
27483}
27484
27485// Header returns an http.Header that can be modified by the caller to
27486// add HTTP headers to the request.
27487func (c *FirewallsPatchCall) Header() http.Header {
27488	if c.header_ == nil {
27489		c.header_ = make(http.Header)
27490	}
27491	return c.header_
27492}
27493
27494func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) {
27495	reqHeaders := make(http.Header)
27496	for k, v := range c.header_ {
27497		reqHeaders[k] = v
27498	}
27499	reqHeaders.Set("User-Agent", c.s.userAgent())
27500	var body io.Reader = nil
27501	body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
27502	if err != nil {
27503		return nil, err
27504	}
27505	reqHeaders.Set("Content-Type", "application/json")
27506	c.urlParams_.Set("alt", alt)
27507	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
27508	urls += "?" + c.urlParams_.Encode()
27509	req, _ := http.NewRequest("PATCH", urls, body)
27510	req.Header = reqHeaders
27511	googleapi.Expand(req.URL, map[string]string{
27512		"project":  c.project,
27513		"firewall": c.firewall,
27514	})
27515	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27516}
27517
27518// Do executes the "compute.firewalls.patch" call.
27519// Exactly one of *Operation or error will be non-nil. Any non-2xx
27520// status code is an error. Response headers are in either
27521// *Operation.ServerResponse.Header or (if a response was returned at
27522// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27523// to check whether the returned error was because
27524// http.StatusNotModified was returned.
27525func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27526	gensupport.SetOptions(c.urlParams_, opts...)
27527	res, err := c.doRequest("json")
27528	if res != nil && res.StatusCode == http.StatusNotModified {
27529		if res.Body != nil {
27530			res.Body.Close()
27531		}
27532		return nil, &googleapi.Error{
27533			Code:   res.StatusCode,
27534			Header: res.Header,
27535		}
27536	}
27537	if err != nil {
27538		return nil, err
27539	}
27540	defer googleapi.CloseBody(res)
27541	if err := googleapi.CheckResponse(res); err != nil {
27542		return nil, err
27543	}
27544	ret := &Operation{
27545		ServerResponse: googleapi.ServerResponse{
27546			Header:         res.Header,
27547			HTTPStatusCode: res.StatusCode,
27548		},
27549	}
27550	target := &ret
27551	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
27552		return nil, err
27553	}
27554	return ret, nil
27555	// {
27556	//   "description": "Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
27557	//   "httpMethod": "PATCH",
27558	//   "id": "compute.firewalls.patch",
27559	//   "parameterOrder": [
27560	//     "project",
27561	//     "firewall"
27562	//   ],
27563	//   "parameters": {
27564	//     "firewall": {
27565	//       "description": "Name of the firewall rule to patch.",
27566	//       "location": "path",
27567	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27568	//       "required": true,
27569	//       "type": "string"
27570	//     },
27571	//     "project": {
27572	//       "description": "Project ID for this request.",
27573	//       "location": "path",
27574	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27575	//       "required": true,
27576	//       "type": "string"
27577	//     },
27578	//     "requestId": {
27579	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
27580	//       "location": "query",
27581	//       "type": "string"
27582	//     }
27583	//   },
27584	//   "path": "{project}/global/firewalls/{firewall}",
27585	//   "request": {
27586	//     "$ref": "Firewall"
27587	//   },
27588	//   "response": {
27589	//     "$ref": "Operation"
27590	//   },
27591	//   "scopes": [
27592	//     "https://www.googleapis.com/auth/cloud-platform",
27593	//     "https://www.googleapis.com/auth/compute"
27594	//   ]
27595	// }
27596
27597}
27598
27599// method id "compute.firewalls.testIamPermissions":
27600
27601type FirewallsTestIamPermissionsCall struct {
27602	s                      *Service
27603	project                string
27604	resource               string
27605	testpermissionsrequest *TestPermissionsRequest
27606	urlParams_             gensupport.URLParams
27607	ctx_                   context.Context
27608	header_                http.Header
27609}
27610
27611// TestIamPermissions: Returns permissions that a caller has on the
27612// specified resource.
27613func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall {
27614	c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27615	c.project = project
27616	c.resource = resource
27617	c.testpermissionsrequest = testpermissionsrequest
27618	return c
27619}
27620
27621// Fields allows partial responses to be retrieved. See
27622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27623// for more information.
27624func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall {
27625	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27626	return c
27627}
27628
27629// Context sets the context to be used in this call's Do method. Any
27630// pending HTTP request will be aborted if the provided context is
27631// canceled.
27632func (c *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall {
27633	c.ctx_ = ctx
27634	return c
27635}
27636
27637// Header returns an http.Header that can be modified by the caller to
27638// add HTTP headers to the request.
27639func (c *FirewallsTestIamPermissionsCall) Header() http.Header {
27640	if c.header_ == nil {
27641		c.header_ = make(http.Header)
27642	}
27643	return c.header_
27644}
27645
27646func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
27647	reqHeaders := make(http.Header)
27648	for k, v := range c.header_ {
27649		reqHeaders[k] = v
27650	}
27651	reqHeaders.Set("User-Agent", c.s.userAgent())
27652	var body io.Reader = nil
27653	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
27654	if err != nil {
27655		return nil, err
27656	}
27657	reqHeaders.Set("Content-Type", "application/json")
27658	c.urlParams_.Set("alt", alt)
27659	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{resource}/testIamPermissions")
27660	urls += "?" + c.urlParams_.Encode()
27661	req, _ := http.NewRequest("POST", urls, body)
27662	req.Header = reqHeaders
27663	googleapi.Expand(req.URL, map[string]string{
27664		"project":  c.project,
27665		"resource": c.resource,
27666	})
27667	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27668}
27669
27670// Do executes the "compute.firewalls.testIamPermissions" call.
27671// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
27672// non-2xx status code is an error. Response headers are in either
27673// *TestPermissionsResponse.ServerResponse.Header or (if a response was
27674// returned at all) in error.(*googleapi.Error).Header. Use
27675// googleapi.IsNotModified to check whether the returned error was
27676// because http.StatusNotModified was returned.
27677func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
27678	gensupport.SetOptions(c.urlParams_, opts...)
27679	res, err := c.doRequest("json")
27680	if res != nil && res.StatusCode == http.StatusNotModified {
27681		if res.Body != nil {
27682			res.Body.Close()
27683		}
27684		return nil, &googleapi.Error{
27685			Code:   res.StatusCode,
27686			Header: res.Header,
27687		}
27688	}
27689	if err != nil {
27690		return nil, err
27691	}
27692	defer googleapi.CloseBody(res)
27693	if err := googleapi.CheckResponse(res); err != nil {
27694		return nil, err
27695	}
27696	ret := &TestPermissionsResponse{
27697		ServerResponse: googleapi.ServerResponse{
27698			Header:         res.Header,
27699			HTTPStatusCode: res.StatusCode,
27700		},
27701	}
27702	target := &ret
27703	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
27704		return nil, err
27705	}
27706	return ret, nil
27707	// {
27708	//   "description": "Returns permissions that a caller has on the specified resource.",
27709	//   "httpMethod": "POST",
27710	//   "id": "compute.firewalls.testIamPermissions",
27711	//   "parameterOrder": [
27712	//     "project",
27713	//     "resource"
27714	//   ],
27715	//   "parameters": {
27716	//     "project": {
27717	//       "description": "Project ID for this request.",
27718	//       "location": "path",
27719	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27720	//       "required": true,
27721	//       "type": "string"
27722	//     },
27723	//     "resource": {
27724	//       "description": "Name of the resource for this request.",
27725	//       "location": "path",
27726	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
27727	//       "required": true,
27728	//       "type": "string"
27729	//     }
27730	//   },
27731	//   "path": "{project}/global/firewalls/{resource}/testIamPermissions",
27732	//   "request": {
27733	//     "$ref": "TestPermissionsRequest"
27734	//   },
27735	//   "response": {
27736	//     "$ref": "TestPermissionsResponse"
27737	//   },
27738	//   "scopes": [
27739	//     "https://www.googleapis.com/auth/cloud-platform",
27740	//     "https://www.googleapis.com/auth/compute",
27741	//     "https://www.googleapis.com/auth/compute.readonly"
27742	//   ]
27743	// }
27744
27745}
27746
27747// method id "compute.firewalls.update":
27748
27749type FirewallsUpdateCall struct {
27750	s          *Service
27751	project    string
27752	firewall   string
27753	firewall2  *Firewall
27754	urlParams_ gensupport.URLParams
27755	ctx_       context.Context
27756	header_    http.Header
27757}
27758
27759// Update: Updates the specified firewall rule with the data included in
27760// the request. Using PUT method, can only update following fields of
27761// firewall rule: allowed, description, sourceRanges, sourceTags,
27762// targetTags.
27763// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update
27764func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall {
27765	c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27766	c.project = project
27767	c.firewall = firewall
27768	c.firewall2 = firewall2
27769	return c
27770}
27771
27772// RequestId sets the optional parameter "requestId": An optional
27773// request ID to identify requests. Specify a unique request ID so that
27774// if you must retry your request, the server will know to ignore the
27775// request if it has already been completed.
27776//
27777// For example, consider a situation where you make an initial request
27778// and the request times out. If you make the request again with the
27779// same request ID, the server can check if original operation with the
27780// same request ID was received, and if so, will ignore the second
27781// request. This prevents clients from accidentally creating duplicate
27782// commitments.
27783//
27784// The request ID must be a valid UUID with the exception that zero UUID
27785// is not supported (00000000-0000-0000-0000-000000000000).
27786func (c *FirewallsUpdateCall) RequestId(requestId string) *FirewallsUpdateCall {
27787	c.urlParams_.Set("requestId", requestId)
27788	return c
27789}
27790
27791// Fields allows partial responses to be retrieved. See
27792// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27793// for more information.
27794func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall {
27795	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27796	return c
27797}
27798
27799// Context sets the context to be used in this call's Do method. Any
27800// pending HTTP request will be aborted if the provided context is
27801// canceled.
27802func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall {
27803	c.ctx_ = ctx
27804	return c
27805}
27806
27807// Header returns an http.Header that can be modified by the caller to
27808// add HTTP headers to the request.
27809func (c *FirewallsUpdateCall) Header() http.Header {
27810	if c.header_ == nil {
27811		c.header_ = make(http.Header)
27812	}
27813	return c.header_
27814}
27815
27816func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) {
27817	reqHeaders := make(http.Header)
27818	for k, v := range c.header_ {
27819		reqHeaders[k] = v
27820	}
27821	reqHeaders.Set("User-Agent", c.s.userAgent())
27822	var body io.Reader = nil
27823	body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
27824	if err != nil {
27825		return nil, err
27826	}
27827	reqHeaders.Set("Content-Type", "application/json")
27828	c.urlParams_.Set("alt", alt)
27829	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
27830	urls += "?" + c.urlParams_.Encode()
27831	req, _ := http.NewRequest("PUT", urls, body)
27832	req.Header = reqHeaders
27833	googleapi.Expand(req.URL, map[string]string{
27834		"project":  c.project,
27835		"firewall": c.firewall,
27836	})
27837	return gensupport.SendRequest(c.ctx_, c.s.client, req)
27838}
27839
27840// Do executes the "compute.firewalls.update" call.
27841// Exactly one of *Operation or error will be non-nil. Any non-2xx
27842// status code is an error. Response headers are in either
27843// *Operation.ServerResponse.Header or (if a response was returned at
27844// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27845// to check whether the returned error was because
27846// http.StatusNotModified was returned.
27847func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{
27867		ServerResponse: googleapi.ServerResponse{
27868			Header:         res.Header,
27869			HTTPStatusCode: res.StatusCode,
27870		},
27871	}
27872	target := &ret
27873	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
27874		return nil, err
27875	}
27876	return ret, nil
27877	// {
27878	//   "description": "Updates the specified firewall rule with the data included in the request. Using PUT method, can only update following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags.",
27879	//   "httpMethod": "PUT",
27880	//   "id": "compute.firewalls.update",
27881	//   "parameterOrder": [
27882	//     "project",
27883	//     "firewall"
27884	//   ],
27885	//   "parameters": {
27886	//     "firewall": {
27887	//       "description": "Name of the firewall rule to update.",
27888	//       "location": "path",
27889	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27890	//       "required": true,
27891	//       "type": "string"
27892	//     },
27893	//     "project": {
27894	//       "description": "Project ID for this request.",
27895	//       "location": "path",
27896	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27897	//       "required": true,
27898	//       "type": "string"
27899	//     },
27900	//     "requestId": {
27901	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
27902	//       "location": "query",
27903	//       "type": "string"
27904	//     }
27905	//   },
27906	//   "path": "{project}/global/firewalls/{firewall}",
27907	//   "request": {
27908	//     "$ref": "Firewall"
27909	//   },
27910	//   "response": {
27911	//     "$ref": "Operation"
27912	//   },
27913	//   "scopes": [
27914	//     "https://www.googleapis.com/auth/cloud-platform",
27915	//     "https://www.googleapis.com/auth/compute"
27916	//   ]
27917	// }
27918
27919}
27920
27921// method id "compute.forwardingRules.aggregatedList":
27922
27923type ForwardingRulesAggregatedListCall struct {
27924	s            *Service
27925	project      string
27926	urlParams_   gensupport.URLParams
27927	ifNoneMatch_ string
27928	ctx_         context.Context
27929	header_      http.Header
27930}
27931
27932// AggregatedList: Retrieves an aggregated list of forwarding rules.
27933// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList
27934func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall {
27935	c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27936	c.project = project
27937	return c
27938}
27939
27940// Filter sets the optional parameter "filter": Sets a filter
27941// {expression} for filtering listed resources. Your {expression} must
27942// be in the format: field_name comparison_string literal_string.
27943//
27944// The field_name is the name of the field you want to compare. Only
27945// atomic field types are supported (string, number, boolean). The
27946// comparison_string must be either eq (equals) or ne (not equals). The
27947// literal_string is the string value to filter to. The literal value
27948// must be valid for the type of field you are filtering by (string,
27949// number, boolean). For string fields, the literal value is interpreted
27950// as a regular expression using RE2 syntax. The literal value must
27951// match the entire field.
27952//
27953// For example, to filter for instances that do not have a name of
27954// example-instance, you would use name ne example-instance.
27955//
27956// You can filter on nested fields. For example, you could filter on
27957// instances that have set the scheduling.automaticRestart field to
27958// true. Use filtering on nested fields to take advantage of labels to
27959// organize and search for results based on label values.
27960//
27961// To filter on multiple expressions, provide each separate expression
27962// within parentheses. For example, (scheduling.automaticRestart eq
27963// true) (zone eq us-central1-f). Multiple expressions are treated as
27964// AND expressions, meaning that resources must match all expressions to
27965// pass the filters.
27966func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall {
27967	c.urlParams_.Set("filter", filter)
27968	return c
27969}
27970
27971// MaxResults sets the optional parameter "maxResults": The maximum
27972// number of results per page that should be returned. If the number of
27973// available results is larger than maxResults, Compute Engine returns a
27974// nextPageToken that can be used to get the next page of results in
27975// subsequent list requests. Acceptable values are 0 to 500, inclusive.
27976// (Default: 500)
27977func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall {
27978	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27979	return c
27980}
27981
27982// OrderBy sets the optional parameter "orderBy": Sorts list results by
27983// a certain order. By default, results are returned in alphanumerical
27984// order based on the resource name.
27985//
27986// You can also sort results in descending order based on the creation
27987// timestamp using orderBy="creationTimestamp desc". This sorts results
27988// based on the creationTimestamp field in reverse chronological order
27989// (newest result first). Use this to sort resources like operations so
27990// that the newest operation is returned first.
27991//
27992// Currently, only sorting by name or creationTimestamp desc is
27993// supported.
27994func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall {
27995	c.urlParams_.Set("orderBy", orderBy)
27996	return c
27997}
27998
27999// PageToken sets the optional parameter "pageToken": Specifies a page
28000// token to use. Set pageToken to the nextPageToken returned by a
28001// previous list request to get the next page of results.
28002func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall {
28003	c.urlParams_.Set("pageToken", pageToken)
28004	return c
28005}
28006
28007// Fields allows partial responses to be retrieved. See
28008// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28009// for more information.
28010func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall {
28011	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28012	return c
28013}
28014
28015// IfNoneMatch sets the optional parameter which makes the operation
28016// fail if the object's ETag matches the given value. This is useful for
28017// getting updates only after the object has changed since the last
28018// request. Use googleapi.IsNotModified to check whether the response
28019// error from Do is the result of In-None-Match.
28020func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall {
28021	c.ifNoneMatch_ = entityTag
28022	return c
28023}
28024
28025// Context sets the context to be used in this call's Do method. Any
28026// pending HTTP request will be aborted if the provided context is
28027// canceled.
28028func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall {
28029	c.ctx_ = ctx
28030	return c
28031}
28032
28033// Header returns an http.Header that can be modified by the caller to
28034// add HTTP headers to the request.
28035func (c *ForwardingRulesAggregatedListCall) Header() http.Header {
28036	if c.header_ == nil {
28037		c.header_ = make(http.Header)
28038	}
28039	return c.header_
28040}
28041
28042func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
28043	reqHeaders := make(http.Header)
28044	for k, v := range c.header_ {
28045		reqHeaders[k] = v
28046	}
28047	reqHeaders.Set("User-Agent", c.s.userAgent())
28048	if c.ifNoneMatch_ != "" {
28049		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28050	}
28051	var body io.Reader = nil
28052	c.urlParams_.Set("alt", alt)
28053	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/forwardingRules")
28054	urls += "?" + c.urlParams_.Encode()
28055	req, _ := http.NewRequest("GET", urls, body)
28056	req.Header = reqHeaders
28057	googleapi.Expand(req.URL, map[string]string{
28058		"project": c.project,
28059	})
28060	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28061}
28062
28063// Do executes the "compute.forwardingRules.aggregatedList" call.
28064// Exactly one of *ForwardingRuleAggregatedList or error will be
28065// non-nil. Any non-2xx status code is an error. Response headers are in
28066// either *ForwardingRuleAggregatedList.ServerResponse.Header or (if a
28067// response was returned at all) in error.(*googleapi.Error).Header. Use
28068// googleapi.IsNotModified to check whether the returned error was
28069// because http.StatusNotModified was returned.
28070func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) {
28071	gensupport.SetOptions(c.urlParams_, opts...)
28072	res, err := c.doRequest("json")
28073	if res != nil && res.StatusCode == http.StatusNotModified {
28074		if res.Body != nil {
28075			res.Body.Close()
28076		}
28077		return nil, &googleapi.Error{
28078			Code:   res.StatusCode,
28079			Header: res.Header,
28080		}
28081	}
28082	if err != nil {
28083		return nil, err
28084	}
28085	defer googleapi.CloseBody(res)
28086	if err := googleapi.CheckResponse(res); err != nil {
28087		return nil, err
28088	}
28089	ret := &ForwardingRuleAggregatedList{
28090		ServerResponse: googleapi.ServerResponse{
28091			Header:         res.Header,
28092			HTTPStatusCode: res.StatusCode,
28093		},
28094	}
28095	target := &ret
28096	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
28097		return nil, err
28098	}
28099	return ret, nil
28100	// {
28101	//   "description": "Retrieves an aggregated list of forwarding rules.",
28102	//   "httpMethod": "GET",
28103	//   "id": "compute.forwardingRules.aggregatedList",
28104	//   "parameterOrder": [
28105	//     "project"
28106	//   ],
28107	//   "parameters": {
28108	//     "filter": {
28109	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
28110	//       "location": "query",
28111	//       "type": "string"
28112	//     },
28113	//     "maxResults": {
28114	//       "default": "500",
28115	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
28116	//       "format": "uint32",
28117	//       "location": "query",
28118	//       "minimum": "0",
28119	//       "type": "integer"
28120	//     },
28121	//     "orderBy": {
28122	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
28123	//       "location": "query",
28124	//       "type": "string"
28125	//     },
28126	//     "pageToken": {
28127	//       "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.",
28128	//       "location": "query",
28129	//       "type": "string"
28130	//     },
28131	//     "project": {
28132	//       "description": "Project ID for this request.",
28133	//       "location": "path",
28134	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28135	//       "required": true,
28136	//       "type": "string"
28137	//     }
28138	//   },
28139	//   "path": "{project}/aggregated/forwardingRules",
28140	//   "response": {
28141	//     "$ref": "ForwardingRuleAggregatedList"
28142	//   },
28143	//   "scopes": [
28144	//     "https://www.googleapis.com/auth/cloud-platform",
28145	//     "https://www.googleapis.com/auth/compute",
28146	//     "https://www.googleapis.com/auth/compute.readonly"
28147	//   ]
28148	// }
28149
28150}
28151
28152// Pages invokes f for each page of results.
28153// A non-nil error returned from f will halt the iteration.
28154// The provided context supersedes any context provided to the Context method.
28155func (c *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error {
28156	c.ctx_ = ctx
28157	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28158	for {
28159		x, err := c.Do()
28160		if err != nil {
28161			return err
28162		}
28163		if err := f(x); err != nil {
28164			return err
28165		}
28166		if x.NextPageToken == "" {
28167			return nil
28168		}
28169		c.PageToken(x.NextPageToken)
28170	}
28171}
28172
28173// method id "compute.forwardingRules.delete":
28174
28175type ForwardingRulesDeleteCall struct {
28176	s              *Service
28177	project        string
28178	region         string
28179	forwardingRule string
28180	urlParams_     gensupport.URLParams
28181	ctx_           context.Context
28182	header_        http.Header
28183}
28184
28185// Delete: Deletes the specified ForwardingRule resource.
28186// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/delete
28187func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall {
28188	c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28189	c.project = project
28190	c.region = region
28191	c.forwardingRule = forwardingRule
28192	return c
28193}
28194
28195// RequestId sets the optional parameter "requestId": An optional
28196// request ID to identify requests. Specify a unique request ID so that
28197// if you must retry your request, the server will know to ignore the
28198// request if it has already been completed.
28199//
28200// For example, consider a situation where you make an initial request
28201// and the request times out. If you make the request again with the
28202// same request ID, the server can check if original operation with the
28203// same request ID was received, and if so, will ignore the second
28204// request. This prevents clients from accidentally creating duplicate
28205// commitments.
28206//
28207// The request ID must be a valid UUID with the exception that zero UUID
28208// is not supported (00000000-0000-0000-0000-000000000000).
28209func (c *ForwardingRulesDeleteCall) RequestId(requestId string) *ForwardingRulesDeleteCall {
28210	c.urlParams_.Set("requestId", requestId)
28211	return c
28212}
28213
28214// Fields allows partial responses to be retrieved. See
28215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28216// for more information.
28217func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall {
28218	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28219	return c
28220}
28221
28222// Context sets the context to be used in this call's Do method. Any
28223// pending HTTP request will be aborted if the provided context is
28224// canceled.
28225func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall {
28226	c.ctx_ = ctx
28227	return c
28228}
28229
28230// Header returns an http.Header that can be modified by the caller to
28231// add HTTP headers to the request.
28232func (c *ForwardingRulesDeleteCall) Header() http.Header {
28233	if c.header_ == nil {
28234		c.header_ = make(http.Header)
28235	}
28236	return c.header_
28237}
28238
28239func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
28240	reqHeaders := make(http.Header)
28241	for k, v := range c.header_ {
28242		reqHeaders[k] = v
28243	}
28244	reqHeaders.Set("User-Agent", c.s.userAgent())
28245	var body io.Reader = nil
28246	c.urlParams_.Set("alt", alt)
28247	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}")
28248	urls += "?" + c.urlParams_.Encode()
28249	req, _ := http.NewRequest("DELETE", urls, body)
28250	req.Header = reqHeaders
28251	googleapi.Expand(req.URL, map[string]string{
28252		"project":        c.project,
28253		"region":         c.region,
28254		"forwardingRule": c.forwardingRule,
28255	})
28256	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28257}
28258
28259// Do executes the "compute.forwardingRules.delete" call.
28260// Exactly one of *Operation or error will be non-nil. Any non-2xx
28261// status code is an error. Response headers are in either
28262// *Operation.ServerResponse.Header or (if a response was returned at
28263// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28264// to check whether the returned error was because
28265// http.StatusNotModified was returned.
28266func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28267	gensupport.SetOptions(c.urlParams_, opts...)
28268	res, err := c.doRequest("json")
28269	if res != nil && res.StatusCode == http.StatusNotModified {
28270		if res.Body != nil {
28271			res.Body.Close()
28272		}
28273		return nil, &googleapi.Error{
28274			Code:   res.StatusCode,
28275			Header: res.Header,
28276		}
28277	}
28278	if err != nil {
28279		return nil, err
28280	}
28281	defer googleapi.CloseBody(res)
28282	if err := googleapi.CheckResponse(res); err != nil {
28283		return nil, err
28284	}
28285	ret := &Operation{
28286		ServerResponse: googleapi.ServerResponse{
28287			Header:         res.Header,
28288			HTTPStatusCode: res.StatusCode,
28289		},
28290	}
28291	target := &ret
28292	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
28293		return nil, err
28294	}
28295	return ret, nil
28296	// {
28297	//   "description": "Deletes the specified ForwardingRule resource.",
28298	//   "httpMethod": "DELETE",
28299	//   "id": "compute.forwardingRules.delete",
28300	//   "parameterOrder": [
28301	//     "project",
28302	//     "region",
28303	//     "forwardingRule"
28304	//   ],
28305	//   "parameters": {
28306	//     "forwardingRule": {
28307	//       "description": "Name of the ForwardingRule resource to delete.",
28308	//       "location": "path",
28309	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28310	//       "required": true,
28311	//       "type": "string"
28312	//     },
28313	//     "project": {
28314	//       "description": "Project ID for this request.",
28315	//       "location": "path",
28316	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28317	//       "required": true,
28318	//       "type": "string"
28319	//     },
28320	//     "region": {
28321	//       "description": "Name of the region scoping this request.",
28322	//       "location": "path",
28323	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28324	//       "required": true,
28325	//       "type": "string"
28326	//     },
28327	//     "requestId": {
28328	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
28329	//       "location": "query",
28330	//       "type": "string"
28331	//     }
28332	//   },
28333	//   "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}",
28334	//   "response": {
28335	//     "$ref": "Operation"
28336	//   },
28337	//   "scopes": [
28338	//     "https://www.googleapis.com/auth/cloud-platform",
28339	//     "https://www.googleapis.com/auth/compute"
28340	//   ]
28341	// }
28342
28343}
28344
28345// method id "compute.forwardingRules.get":
28346
28347type ForwardingRulesGetCall struct {
28348	s              *Service
28349	project        string
28350	region         string
28351	forwardingRule string
28352	urlParams_     gensupport.URLParams
28353	ifNoneMatch_   string
28354	ctx_           context.Context
28355	header_        http.Header
28356}
28357
28358// Get: Returns the specified ForwardingRule resource.
28359// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/get
28360func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall {
28361	c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28362	c.project = project
28363	c.region = region
28364	c.forwardingRule = forwardingRule
28365	return c
28366}
28367
28368// Fields allows partial responses to be retrieved. See
28369// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28370// for more information.
28371func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall {
28372	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28373	return c
28374}
28375
28376// IfNoneMatch sets the optional parameter which makes the operation
28377// fail if the object's ETag matches the given value. This is useful for
28378// getting updates only after the object has changed since the last
28379// request. Use googleapi.IsNotModified to check whether the response
28380// error from Do is the result of In-None-Match.
28381func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall {
28382	c.ifNoneMatch_ = entityTag
28383	return c
28384}
28385
28386// Context sets the context to be used in this call's Do method. Any
28387// pending HTTP request will be aborted if the provided context is
28388// canceled.
28389func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall {
28390	c.ctx_ = ctx
28391	return c
28392}
28393
28394// Header returns an http.Header that can be modified by the caller to
28395// add HTTP headers to the request.
28396func (c *ForwardingRulesGetCall) Header() http.Header {
28397	if c.header_ == nil {
28398		c.header_ = make(http.Header)
28399	}
28400	return c.header_
28401}
28402
28403func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
28404	reqHeaders := make(http.Header)
28405	for k, v := range c.header_ {
28406		reqHeaders[k] = v
28407	}
28408	reqHeaders.Set("User-Agent", c.s.userAgent())
28409	if c.ifNoneMatch_ != "" {
28410		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28411	}
28412	var body io.Reader = nil
28413	c.urlParams_.Set("alt", alt)
28414	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}")
28415	urls += "?" + c.urlParams_.Encode()
28416	req, _ := http.NewRequest("GET", urls, body)
28417	req.Header = reqHeaders
28418	googleapi.Expand(req.URL, map[string]string{
28419		"project":        c.project,
28420		"region":         c.region,
28421		"forwardingRule": c.forwardingRule,
28422	})
28423	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28424}
28425
28426// Do executes the "compute.forwardingRules.get" call.
28427// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx
28428// status code is an error. Response headers are in either
28429// *ForwardingRule.ServerResponse.Header or (if a response was returned
28430// at all) in error.(*googleapi.Error).Header. Use
28431// googleapi.IsNotModified to check whether the returned error was
28432// because http.StatusNotModified was returned.
28433func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) {
28434	gensupport.SetOptions(c.urlParams_, opts...)
28435	res, err := c.doRequest("json")
28436	if res != nil && res.StatusCode == http.StatusNotModified {
28437		if res.Body != nil {
28438			res.Body.Close()
28439		}
28440		return nil, &googleapi.Error{
28441			Code:   res.StatusCode,
28442			Header: res.Header,
28443		}
28444	}
28445	if err != nil {
28446		return nil, err
28447	}
28448	defer googleapi.CloseBody(res)
28449	if err := googleapi.CheckResponse(res); err != nil {
28450		return nil, err
28451	}
28452	ret := &ForwardingRule{
28453		ServerResponse: googleapi.ServerResponse{
28454			Header:         res.Header,
28455			HTTPStatusCode: res.StatusCode,
28456		},
28457	}
28458	target := &ret
28459	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
28460		return nil, err
28461	}
28462	return ret, nil
28463	// {
28464	//   "description": "Returns the specified ForwardingRule resource.",
28465	//   "httpMethod": "GET",
28466	//   "id": "compute.forwardingRules.get",
28467	//   "parameterOrder": [
28468	//     "project",
28469	//     "region",
28470	//     "forwardingRule"
28471	//   ],
28472	//   "parameters": {
28473	//     "forwardingRule": {
28474	//       "description": "Name of the ForwardingRule resource to return.",
28475	//       "location": "path",
28476	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28477	//       "required": true,
28478	//       "type": "string"
28479	//     },
28480	//     "project": {
28481	//       "description": "Project ID for this request.",
28482	//       "location": "path",
28483	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28484	//       "required": true,
28485	//       "type": "string"
28486	//     },
28487	//     "region": {
28488	//       "description": "Name of the region scoping this request.",
28489	//       "location": "path",
28490	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28491	//       "required": true,
28492	//       "type": "string"
28493	//     }
28494	//   },
28495	//   "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}",
28496	//   "response": {
28497	//     "$ref": "ForwardingRule"
28498	//   },
28499	//   "scopes": [
28500	//     "https://www.googleapis.com/auth/cloud-platform",
28501	//     "https://www.googleapis.com/auth/compute",
28502	//     "https://www.googleapis.com/auth/compute.readonly"
28503	//   ]
28504	// }
28505
28506}
28507
28508// method id "compute.forwardingRules.insert":
28509
28510type ForwardingRulesInsertCall struct {
28511	s              *Service
28512	project        string
28513	region         string
28514	forwardingrule *ForwardingRule
28515	urlParams_     gensupport.URLParams
28516	ctx_           context.Context
28517	header_        http.Header
28518}
28519
28520// Insert: Creates a ForwardingRule resource in the specified project
28521// and region using the data included in the request.
28522// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert
28523func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall {
28524	c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28525	c.project = project
28526	c.region = region
28527	c.forwardingrule = forwardingrule
28528	return c
28529}
28530
28531// RequestId sets the optional parameter "requestId": An optional
28532// request ID to identify requests. Specify a unique request ID so that
28533// if you must retry your request, the server will know to ignore the
28534// request if it has already been completed.
28535//
28536// For example, consider a situation where you make an initial request
28537// and the request times out. If you make the request again with the
28538// same request ID, the server can check if original operation with the
28539// same request ID was received, and if so, will ignore the second
28540// request. This prevents clients from accidentally creating duplicate
28541// commitments.
28542//
28543// The request ID must be a valid UUID with the exception that zero UUID
28544// is not supported (00000000-0000-0000-0000-000000000000).
28545func (c *ForwardingRulesInsertCall) RequestId(requestId string) *ForwardingRulesInsertCall {
28546	c.urlParams_.Set("requestId", requestId)
28547	return c
28548}
28549
28550// Fields allows partial responses to be retrieved. See
28551// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28552// for more information.
28553func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall {
28554	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28555	return c
28556}
28557
28558// Context sets the context to be used in this call's Do method. Any
28559// pending HTTP request will be aborted if the provided context is
28560// canceled.
28561func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall {
28562	c.ctx_ = ctx
28563	return c
28564}
28565
28566// Header returns an http.Header that can be modified by the caller to
28567// add HTTP headers to the request.
28568func (c *ForwardingRulesInsertCall) Header() http.Header {
28569	if c.header_ == nil {
28570		c.header_ = make(http.Header)
28571	}
28572	return c.header_
28573}
28574
28575func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
28576	reqHeaders := make(http.Header)
28577	for k, v := range c.header_ {
28578		reqHeaders[k] = v
28579	}
28580	reqHeaders.Set("User-Agent", c.s.userAgent())
28581	var body io.Reader = nil
28582	body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
28583	if err != nil {
28584		return nil, err
28585	}
28586	reqHeaders.Set("Content-Type", "application/json")
28587	c.urlParams_.Set("alt", alt)
28588	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules")
28589	urls += "?" + c.urlParams_.Encode()
28590	req, _ := http.NewRequest("POST", urls, body)
28591	req.Header = reqHeaders
28592	googleapi.Expand(req.URL, map[string]string{
28593		"project": c.project,
28594		"region":  c.region,
28595	})
28596	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28597}
28598
28599// Do executes the "compute.forwardingRules.insert" call.
28600// Exactly one of *Operation or error will be non-nil. Any non-2xx
28601// status code is an error. Response headers are in either
28602// *Operation.ServerResponse.Header or (if a response was returned at
28603// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28604// to check whether the returned error was because
28605// http.StatusNotModified was returned.
28606func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28607	gensupport.SetOptions(c.urlParams_, opts...)
28608	res, err := c.doRequest("json")
28609	if res != nil && res.StatusCode == http.StatusNotModified {
28610		if res.Body != nil {
28611			res.Body.Close()
28612		}
28613		return nil, &googleapi.Error{
28614			Code:   res.StatusCode,
28615			Header: res.Header,
28616		}
28617	}
28618	if err != nil {
28619		return nil, err
28620	}
28621	defer googleapi.CloseBody(res)
28622	if err := googleapi.CheckResponse(res); err != nil {
28623		return nil, err
28624	}
28625	ret := &Operation{
28626		ServerResponse: googleapi.ServerResponse{
28627			Header:         res.Header,
28628			HTTPStatusCode: res.StatusCode,
28629		},
28630	}
28631	target := &ret
28632	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
28633		return nil, err
28634	}
28635	return ret, nil
28636	// {
28637	//   "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.",
28638	//   "httpMethod": "POST",
28639	//   "id": "compute.forwardingRules.insert",
28640	//   "parameterOrder": [
28641	//     "project",
28642	//     "region"
28643	//   ],
28644	//   "parameters": {
28645	//     "project": {
28646	//       "description": "Project ID for this request.",
28647	//       "location": "path",
28648	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28649	//       "required": true,
28650	//       "type": "string"
28651	//     },
28652	//     "region": {
28653	//       "description": "Name of the region scoping this request.",
28654	//       "location": "path",
28655	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28656	//       "required": true,
28657	//       "type": "string"
28658	//     },
28659	//     "requestId": {
28660	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
28661	//       "location": "query",
28662	//       "type": "string"
28663	//     }
28664	//   },
28665	//   "path": "{project}/regions/{region}/forwardingRules",
28666	//   "request": {
28667	//     "$ref": "ForwardingRule"
28668	//   },
28669	//   "response": {
28670	//     "$ref": "Operation"
28671	//   },
28672	//   "scopes": [
28673	//     "https://www.googleapis.com/auth/cloud-platform",
28674	//     "https://www.googleapis.com/auth/compute"
28675	//   ]
28676	// }
28677
28678}
28679
28680// method id "compute.forwardingRules.list":
28681
28682type ForwardingRulesListCall struct {
28683	s            *Service
28684	project      string
28685	region       string
28686	urlParams_   gensupport.URLParams
28687	ifNoneMatch_ string
28688	ctx_         context.Context
28689	header_      http.Header
28690}
28691
28692// List: Retrieves a list of ForwardingRule resources available to the
28693// specified project and region.
28694// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list
28695func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall {
28696	c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28697	c.project = project
28698	c.region = region
28699	return c
28700}
28701
28702// Filter sets the optional parameter "filter": Sets a filter
28703// {expression} for filtering listed resources. Your {expression} must
28704// be in the format: field_name comparison_string literal_string.
28705//
28706// The field_name is the name of the field you want to compare. Only
28707// atomic field types are supported (string, number, boolean). The
28708// comparison_string must be either eq (equals) or ne (not equals). The
28709// literal_string is the string value to filter to. The literal value
28710// must be valid for the type of field you are filtering by (string,
28711// number, boolean). For string fields, the literal value is interpreted
28712// as a regular expression using RE2 syntax. The literal value must
28713// match the entire field.
28714//
28715// For example, to filter for instances that do not have a name of
28716// example-instance, you would use name ne example-instance.
28717//
28718// You can filter on nested fields. For example, you could filter on
28719// instances that have set the scheduling.automaticRestart field to
28720// true. Use filtering on nested fields to take advantage of labels to
28721// organize and search for results based on label values.
28722//
28723// To filter on multiple expressions, provide each separate expression
28724// within parentheses. For example, (scheduling.automaticRestart eq
28725// true) (zone eq us-central1-f). Multiple expressions are treated as
28726// AND expressions, meaning that resources must match all expressions to
28727// pass the filters.
28728func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall {
28729	c.urlParams_.Set("filter", filter)
28730	return c
28731}
28732
28733// MaxResults sets the optional parameter "maxResults": The maximum
28734// number of results per page that should be returned. If the number of
28735// available results is larger than maxResults, Compute Engine returns a
28736// nextPageToken that can be used to get the next page of results in
28737// subsequent list requests. Acceptable values are 0 to 500, inclusive.
28738// (Default: 500)
28739func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall {
28740	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28741	return c
28742}
28743
28744// OrderBy sets the optional parameter "orderBy": Sorts list results by
28745// a certain order. By default, results are returned in alphanumerical
28746// order based on the resource name.
28747//
28748// You can also sort results in descending order based on the creation
28749// timestamp using orderBy="creationTimestamp desc". This sorts results
28750// based on the creationTimestamp field in reverse chronological order
28751// (newest result first). Use this to sort resources like operations so
28752// that the newest operation is returned first.
28753//
28754// Currently, only sorting by name or creationTimestamp desc is
28755// supported.
28756func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall {
28757	c.urlParams_.Set("orderBy", orderBy)
28758	return c
28759}
28760
28761// PageToken sets the optional parameter "pageToken": Specifies a page
28762// token to use. Set pageToken to the nextPageToken returned by a
28763// previous list request to get the next page of results.
28764func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall {
28765	c.urlParams_.Set("pageToken", pageToken)
28766	return c
28767}
28768
28769// Fields allows partial responses to be retrieved. See
28770// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28771// for more information.
28772func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall {
28773	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28774	return c
28775}
28776
28777// IfNoneMatch sets the optional parameter which makes the operation
28778// fail if the object's ETag matches the given value. This is useful for
28779// getting updates only after the object has changed since the last
28780// request. Use googleapi.IsNotModified to check whether the response
28781// error from Do is the result of In-None-Match.
28782func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall {
28783	c.ifNoneMatch_ = entityTag
28784	return c
28785}
28786
28787// Context sets the context to be used in this call's Do method. Any
28788// pending HTTP request will be aborted if the provided context is
28789// canceled.
28790func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall {
28791	c.ctx_ = ctx
28792	return c
28793}
28794
28795// Header returns an http.Header that can be modified by the caller to
28796// add HTTP headers to the request.
28797func (c *ForwardingRulesListCall) Header() http.Header {
28798	if c.header_ == nil {
28799		c.header_ = make(http.Header)
28800	}
28801	return c.header_
28802}
28803
28804func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
28805	reqHeaders := make(http.Header)
28806	for k, v := range c.header_ {
28807		reqHeaders[k] = v
28808	}
28809	reqHeaders.Set("User-Agent", c.s.userAgent())
28810	if c.ifNoneMatch_ != "" {
28811		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
28812	}
28813	var body io.Reader = nil
28814	c.urlParams_.Set("alt", alt)
28815	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules")
28816	urls += "?" + c.urlParams_.Encode()
28817	req, _ := http.NewRequest("GET", urls, body)
28818	req.Header = reqHeaders
28819	googleapi.Expand(req.URL, map[string]string{
28820		"project": c.project,
28821		"region":  c.region,
28822	})
28823	return gensupport.SendRequest(c.ctx_, c.s.client, req)
28824}
28825
28826// Do executes the "compute.forwardingRules.list" call.
28827// Exactly one of *ForwardingRuleList or error will be non-nil. Any
28828// non-2xx status code is an error. Response headers are in either
28829// *ForwardingRuleList.ServerResponse.Header or (if a response was
28830// returned at all) in error.(*googleapi.Error).Header. Use
28831// googleapi.IsNotModified to check whether the returned error was
28832// because http.StatusNotModified was returned.
28833func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) {
28834	gensupport.SetOptions(c.urlParams_, opts...)
28835	res, err := c.doRequest("json")
28836	if res != nil && res.StatusCode == http.StatusNotModified {
28837		if res.Body != nil {
28838			res.Body.Close()
28839		}
28840		return nil, &googleapi.Error{
28841			Code:   res.StatusCode,
28842			Header: res.Header,
28843		}
28844	}
28845	if err != nil {
28846		return nil, err
28847	}
28848	defer googleapi.CloseBody(res)
28849	if err := googleapi.CheckResponse(res); err != nil {
28850		return nil, err
28851	}
28852	ret := &ForwardingRuleList{
28853		ServerResponse: googleapi.ServerResponse{
28854			Header:         res.Header,
28855			HTTPStatusCode: res.StatusCode,
28856		},
28857	}
28858	target := &ret
28859	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
28860		return nil, err
28861	}
28862	return ret, nil
28863	// {
28864	//   "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.",
28865	//   "httpMethod": "GET",
28866	//   "id": "compute.forwardingRules.list",
28867	//   "parameterOrder": [
28868	//     "project",
28869	//     "region"
28870	//   ],
28871	//   "parameters": {
28872	//     "filter": {
28873	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
28874	//       "location": "query",
28875	//       "type": "string"
28876	//     },
28877	//     "maxResults": {
28878	//       "default": "500",
28879	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
28880	//       "format": "uint32",
28881	//       "location": "query",
28882	//       "minimum": "0",
28883	//       "type": "integer"
28884	//     },
28885	//     "orderBy": {
28886	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
28887	//       "location": "query",
28888	//       "type": "string"
28889	//     },
28890	//     "pageToken": {
28891	//       "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.",
28892	//       "location": "query",
28893	//       "type": "string"
28894	//     },
28895	//     "project": {
28896	//       "description": "Project ID for this request.",
28897	//       "location": "path",
28898	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28899	//       "required": true,
28900	//       "type": "string"
28901	//     },
28902	//     "region": {
28903	//       "description": "Name of the region scoping this request.",
28904	//       "location": "path",
28905	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28906	//       "required": true,
28907	//       "type": "string"
28908	//     }
28909	//   },
28910	//   "path": "{project}/regions/{region}/forwardingRules",
28911	//   "response": {
28912	//     "$ref": "ForwardingRuleList"
28913	//   },
28914	//   "scopes": [
28915	//     "https://www.googleapis.com/auth/cloud-platform",
28916	//     "https://www.googleapis.com/auth/compute",
28917	//     "https://www.googleapis.com/auth/compute.readonly"
28918	//   ]
28919	// }
28920
28921}
28922
28923// Pages invokes f for each page of results.
28924// A non-nil error returned from f will halt the iteration.
28925// The provided context supersedes any context provided to the Context method.
28926func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error {
28927	c.ctx_ = ctx
28928	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28929	for {
28930		x, err := c.Do()
28931		if err != nil {
28932			return err
28933		}
28934		if err := f(x); err != nil {
28935			return err
28936		}
28937		if x.NextPageToken == "" {
28938			return nil
28939		}
28940		c.PageToken(x.NextPageToken)
28941	}
28942}
28943
28944// method id "compute.forwardingRules.setLabels":
28945
28946type ForwardingRulesSetLabelsCall struct {
28947	s                      *Service
28948	project                string
28949	region                 string
28950	resource               string
28951	regionsetlabelsrequest *RegionSetLabelsRequest
28952	urlParams_             gensupport.URLParams
28953	ctx_                   context.Context
28954	header_                http.Header
28955}
28956
28957// SetLabels: Sets the labels on the specified resource. To learn more
28958// about labels, read the Labeling Resources documentation.
28959func (r *ForwardingRulesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *ForwardingRulesSetLabelsCall {
28960	c := &ForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28961	c.project = project
28962	c.region = region
28963	c.resource = resource
28964	c.regionsetlabelsrequest = regionsetlabelsrequest
28965	return c
28966}
28967
28968// RequestId sets the optional parameter "requestId": An optional
28969// request ID to identify requests. Specify a unique request ID so that
28970// if you must retry your request, the server will know to ignore the
28971// request if it has already been completed.
28972//
28973// For example, consider a situation where you make an initial request
28974// and the request times out. If you make the request again with the
28975// same request ID, the server can check if original operation with the
28976// same request ID was received, and if so, will ignore the second
28977// request. This prevents clients from accidentally creating duplicate
28978// commitments.
28979//
28980// The request ID must be a valid UUID with the exception that zero UUID
28981// is not supported (00000000-0000-0000-0000-000000000000).
28982func (c *ForwardingRulesSetLabelsCall) RequestId(requestId string) *ForwardingRulesSetLabelsCall {
28983	c.urlParams_.Set("requestId", requestId)
28984	return c
28985}
28986
28987// Fields allows partial responses to be retrieved. See
28988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28989// for more information.
28990func (c *ForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *ForwardingRulesSetLabelsCall {
28991	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28992	return c
28993}
28994
28995// Context sets the context to be used in this call's Do method. Any
28996// pending HTTP request will be aborted if the provided context is
28997// canceled.
28998func (c *ForwardingRulesSetLabelsCall) Context(ctx context.Context) *ForwardingRulesSetLabelsCall {
28999	c.ctx_ = ctx
29000	return c
29001}
29002
29003// Header returns an http.Header that can be modified by the caller to
29004// add HTTP headers to the request.
29005func (c *ForwardingRulesSetLabelsCall) Header() http.Header {
29006	if c.header_ == nil {
29007		c.header_ = make(http.Header)
29008	}
29009	return c.header_
29010}
29011
29012func (c *ForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) {
29013	reqHeaders := make(http.Header)
29014	for k, v := range c.header_ {
29015		reqHeaders[k] = v
29016	}
29017	reqHeaders.Set("User-Agent", c.s.userAgent())
29018	var body io.Reader = nil
29019	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest)
29020	if err != nil {
29021		return nil, err
29022	}
29023	reqHeaders.Set("Content-Type", "application/json")
29024	c.urlParams_.Set("alt", alt)
29025	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{resource}/setLabels")
29026	urls += "?" + c.urlParams_.Encode()
29027	req, _ := http.NewRequest("POST", urls, body)
29028	req.Header = reqHeaders
29029	googleapi.Expand(req.URL, map[string]string{
29030		"project":  c.project,
29031		"region":   c.region,
29032		"resource": c.resource,
29033	})
29034	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29035}
29036
29037// Do executes the "compute.forwardingRules.setLabels" call.
29038// Exactly one of *Operation or error will be non-nil. Any non-2xx
29039// status code is an error. Response headers are in either
29040// *Operation.ServerResponse.Header or (if a response was returned at
29041// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29042// to check whether the returned error was because
29043// http.StatusNotModified was returned.
29044func (c *ForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29045	gensupport.SetOptions(c.urlParams_, opts...)
29046	res, err := c.doRequest("json")
29047	if res != nil && res.StatusCode == http.StatusNotModified {
29048		if res.Body != nil {
29049			res.Body.Close()
29050		}
29051		return nil, &googleapi.Error{
29052			Code:   res.StatusCode,
29053			Header: res.Header,
29054		}
29055	}
29056	if err != nil {
29057		return nil, err
29058	}
29059	defer googleapi.CloseBody(res)
29060	if err := googleapi.CheckResponse(res); err != nil {
29061		return nil, err
29062	}
29063	ret := &Operation{
29064		ServerResponse: googleapi.ServerResponse{
29065			Header:         res.Header,
29066			HTTPStatusCode: res.StatusCode,
29067		},
29068	}
29069	target := &ret
29070	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
29071		return nil, err
29072	}
29073	return ret, nil
29074	// {
29075	//   "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.",
29076	//   "httpMethod": "POST",
29077	//   "id": "compute.forwardingRules.setLabels",
29078	//   "parameterOrder": [
29079	//     "project",
29080	//     "region",
29081	//     "resource"
29082	//   ],
29083	//   "parameters": {
29084	//     "project": {
29085	//       "description": "Project ID for this request.",
29086	//       "location": "path",
29087	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29088	//       "required": true,
29089	//       "type": "string"
29090	//     },
29091	//     "region": {
29092	//       "description": "The region for this request.",
29093	//       "location": "path",
29094	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29095	//       "required": true,
29096	//       "type": "string"
29097	//     },
29098	//     "requestId": {
29099	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
29100	//       "location": "query",
29101	//       "type": "string"
29102	//     },
29103	//     "resource": {
29104	//       "description": "Name of the resource for this request.",
29105	//       "location": "path",
29106	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29107	//       "required": true,
29108	//       "type": "string"
29109	//     }
29110	//   },
29111	//   "path": "{project}/regions/{region}/forwardingRules/{resource}/setLabels",
29112	//   "request": {
29113	//     "$ref": "RegionSetLabelsRequest"
29114	//   },
29115	//   "response": {
29116	//     "$ref": "Operation"
29117	//   },
29118	//   "scopes": [
29119	//     "https://www.googleapis.com/auth/cloud-platform",
29120	//     "https://www.googleapis.com/auth/compute"
29121	//   ]
29122	// }
29123
29124}
29125
29126// method id "compute.forwardingRules.setTarget":
29127
29128type ForwardingRulesSetTargetCall struct {
29129	s               *Service
29130	project         string
29131	region          string
29132	forwardingRule  string
29133	targetreference *TargetReference
29134	urlParams_      gensupport.URLParams
29135	ctx_            context.Context
29136	header_         http.Header
29137}
29138
29139// SetTarget: Changes target URL for forwarding rule. The new target
29140// should be of the same type as the old target.
29141// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/setTarget
29142func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall {
29143	c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29144	c.project = project
29145	c.region = region
29146	c.forwardingRule = forwardingRule
29147	c.targetreference = targetreference
29148	return c
29149}
29150
29151// RequestId sets the optional parameter "requestId": An optional
29152// request ID to identify requests. Specify a unique request ID so that
29153// if you must retry your request, the server will know to ignore the
29154// request if it has already been completed.
29155//
29156// For example, consider a situation where you make an initial request
29157// and the request times out. If you make the request again with the
29158// same request ID, the server can check if original operation with the
29159// same request ID was received, and if so, will ignore the second
29160// request. This prevents clients from accidentally creating duplicate
29161// commitments.
29162//
29163// The request ID must be a valid UUID with the exception that zero UUID
29164// is not supported (00000000-0000-0000-0000-000000000000).
29165func (c *ForwardingRulesSetTargetCall) RequestId(requestId string) *ForwardingRulesSetTargetCall {
29166	c.urlParams_.Set("requestId", requestId)
29167	return c
29168}
29169
29170// Fields allows partial responses to be retrieved. See
29171// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29172// for more information.
29173func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall {
29174	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29175	return c
29176}
29177
29178// Context sets the context to be used in this call's Do method. Any
29179// pending HTTP request will be aborted if the provided context is
29180// canceled.
29181func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall {
29182	c.ctx_ = ctx
29183	return c
29184}
29185
29186// Header returns an http.Header that can be modified by the caller to
29187// add HTTP headers to the request.
29188func (c *ForwardingRulesSetTargetCall) Header() http.Header {
29189	if c.header_ == nil {
29190		c.header_ = make(http.Header)
29191	}
29192	return c.header_
29193}
29194
29195func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
29196	reqHeaders := make(http.Header)
29197	for k, v := range c.header_ {
29198		reqHeaders[k] = v
29199	}
29200	reqHeaders.Set("User-Agent", c.s.userAgent())
29201	var body io.Reader = nil
29202	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
29203	if err != nil {
29204		return nil, err
29205	}
29206	reqHeaders.Set("Content-Type", "application/json")
29207	c.urlParams_.Set("alt", alt)
29208	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget")
29209	urls += "?" + c.urlParams_.Encode()
29210	req, _ := http.NewRequest("POST", urls, body)
29211	req.Header = reqHeaders
29212	googleapi.Expand(req.URL, map[string]string{
29213		"project":        c.project,
29214		"region":         c.region,
29215		"forwardingRule": c.forwardingRule,
29216	})
29217	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29218}
29219
29220// Do executes the "compute.forwardingRules.setTarget" call.
29221// Exactly one of *Operation or error will be non-nil. Any non-2xx
29222// status code is an error. Response headers are in either
29223// *Operation.ServerResponse.Header or (if a response was returned at
29224// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29225// to check whether the returned error was because
29226// http.StatusNotModified was returned.
29227func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29228	gensupport.SetOptions(c.urlParams_, opts...)
29229	res, err := c.doRequest("json")
29230	if res != nil && res.StatusCode == http.StatusNotModified {
29231		if res.Body != nil {
29232			res.Body.Close()
29233		}
29234		return nil, &googleapi.Error{
29235			Code:   res.StatusCode,
29236			Header: res.Header,
29237		}
29238	}
29239	if err != nil {
29240		return nil, err
29241	}
29242	defer googleapi.CloseBody(res)
29243	if err := googleapi.CheckResponse(res); err != nil {
29244		return nil, err
29245	}
29246	ret := &Operation{
29247		ServerResponse: googleapi.ServerResponse{
29248			Header:         res.Header,
29249			HTTPStatusCode: res.StatusCode,
29250		},
29251	}
29252	target := &ret
29253	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
29254		return nil, err
29255	}
29256	return ret, nil
29257	// {
29258	//   "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.",
29259	//   "httpMethod": "POST",
29260	//   "id": "compute.forwardingRules.setTarget",
29261	//   "parameterOrder": [
29262	//     "project",
29263	//     "region",
29264	//     "forwardingRule"
29265	//   ],
29266	//   "parameters": {
29267	//     "forwardingRule": {
29268	//       "description": "Name of the ForwardingRule resource in which target is to be set.",
29269	//       "location": "path",
29270	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29271	//       "required": true,
29272	//       "type": "string"
29273	//     },
29274	//     "project": {
29275	//       "description": "Project ID for this request.",
29276	//       "location": "path",
29277	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29278	//       "required": true,
29279	//       "type": "string"
29280	//     },
29281	//     "region": {
29282	//       "description": "Name of the region scoping this request.",
29283	//       "location": "path",
29284	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29285	//       "required": true,
29286	//       "type": "string"
29287	//     },
29288	//     "requestId": {
29289	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
29290	//       "location": "query",
29291	//       "type": "string"
29292	//     }
29293	//   },
29294	//   "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget",
29295	//   "request": {
29296	//     "$ref": "TargetReference"
29297	//   },
29298	//   "response": {
29299	//     "$ref": "Operation"
29300	//   },
29301	//   "scopes": [
29302	//     "https://www.googleapis.com/auth/cloud-platform",
29303	//     "https://www.googleapis.com/auth/compute"
29304	//   ]
29305	// }
29306
29307}
29308
29309// method id "compute.forwardingRules.testIamPermissions":
29310
29311type ForwardingRulesTestIamPermissionsCall struct {
29312	s                      *Service
29313	project                string
29314	region                 string
29315	resource               string
29316	testpermissionsrequest *TestPermissionsRequest
29317	urlParams_             gensupport.URLParams
29318	ctx_                   context.Context
29319	header_                http.Header
29320}
29321
29322// TestIamPermissions: Returns permissions that a caller has on the
29323// specified resource.
29324func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall {
29325	c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29326	c.project = project
29327	c.region = region
29328	c.resource = resource
29329	c.testpermissionsrequest = testpermissionsrequest
29330	return c
29331}
29332
29333// Fields allows partial responses to be retrieved. See
29334// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29335// for more information.
29336func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall {
29337	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29338	return c
29339}
29340
29341// Context sets the context to be used in this call's Do method. Any
29342// pending HTTP request will be aborted if the provided context is
29343// canceled.
29344func (c *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall {
29345	c.ctx_ = ctx
29346	return c
29347}
29348
29349// Header returns an http.Header that can be modified by the caller to
29350// add HTTP headers to the request.
29351func (c *ForwardingRulesTestIamPermissionsCall) Header() http.Header {
29352	if c.header_ == nil {
29353		c.header_ = make(http.Header)
29354	}
29355	return c.header_
29356}
29357
29358func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
29359	reqHeaders := make(http.Header)
29360	for k, v := range c.header_ {
29361		reqHeaders[k] = v
29362	}
29363	reqHeaders.Set("User-Agent", c.s.userAgent())
29364	var body io.Reader = nil
29365	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
29366	if err != nil {
29367		return nil, err
29368	}
29369	reqHeaders.Set("Content-Type", "application/json")
29370	c.urlParams_.Set("alt", alt)
29371	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions")
29372	urls += "?" + c.urlParams_.Encode()
29373	req, _ := http.NewRequest("POST", urls, body)
29374	req.Header = reqHeaders
29375	googleapi.Expand(req.URL, map[string]string{
29376		"project":  c.project,
29377		"region":   c.region,
29378		"resource": c.resource,
29379	})
29380	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29381}
29382
29383// Do executes the "compute.forwardingRules.testIamPermissions" call.
29384// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
29385// non-2xx status code is an error. Response headers are in either
29386// *TestPermissionsResponse.ServerResponse.Header or (if a response was
29387// returned at all) in error.(*googleapi.Error).Header. Use
29388// googleapi.IsNotModified to check whether the returned error was
29389// because http.StatusNotModified was returned.
29390func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
29391	gensupport.SetOptions(c.urlParams_, opts...)
29392	res, err := c.doRequest("json")
29393	if res != nil && res.StatusCode == http.StatusNotModified {
29394		if res.Body != nil {
29395			res.Body.Close()
29396		}
29397		return nil, &googleapi.Error{
29398			Code:   res.StatusCode,
29399			Header: res.Header,
29400		}
29401	}
29402	if err != nil {
29403		return nil, err
29404	}
29405	defer googleapi.CloseBody(res)
29406	if err := googleapi.CheckResponse(res); err != nil {
29407		return nil, err
29408	}
29409	ret := &TestPermissionsResponse{
29410		ServerResponse: googleapi.ServerResponse{
29411			Header:         res.Header,
29412			HTTPStatusCode: res.StatusCode,
29413		},
29414	}
29415	target := &ret
29416	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
29417		return nil, err
29418	}
29419	return ret, nil
29420	// {
29421	//   "description": "Returns permissions that a caller has on the specified resource.",
29422	//   "httpMethod": "POST",
29423	//   "id": "compute.forwardingRules.testIamPermissions",
29424	//   "parameterOrder": [
29425	//     "project",
29426	//     "region",
29427	//     "resource"
29428	//   ],
29429	//   "parameters": {
29430	//     "project": {
29431	//       "description": "Project ID for this request.",
29432	//       "location": "path",
29433	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29434	//       "required": true,
29435	//       "type": "string"
29436	//     },
29437	//     "region": {
29438	//       "description": "The name of the region for this request.",
29439	//       "location": "path",
29440	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29441	//       "required": true,
29442	//       "type": "string"
29443	//     },
29444	//     "resource": {
29445	//       "description": "Name of the resource for this request.",
29446	//       "location": "path",
29447	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29448	//       "required": true,
29449	//       "type": "string"
29450	//     }
29451	//   },
29452	//   "path": "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions",
29453	//   "request": {
29454	//     "$ref": "TestPermissionsRequest"
29455	//   },
29456	//   "response": {
29457	//     "$ref": "TestPermissionsResponse"
29458	//   },
29459	//   "scopes": [
29460	//     "https://www.googleapis.com/auth/cloud-platform",
29461	//     "https://www.googleapis.com/auth/compute",
29462	//     "https://www.googleapis.com/auth/compute.readonly"
29463	//   ]
29464	// }
29465
29466}
29467
29468// method id "compute.globalAddresses.delete":
29469
29470type GlobalAddressesDeleteCall struct {
29471	s          *Service
29472	project    string
29473	address    string
29474	urlParams_ gensupport.URLParams
29475	ctx_       context.Context
29476	header_    http.Header
29477}
29478
29479// Delete: Deletes the specified address resource.
29480// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/delete
29481func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall {
29482	c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29483	c.project = project
29484	c.address = address
29485	return c
29486}
29487
29488// RequestId sets the optional parameter "requestId": An optional
29489// request ID to identify requests. Specify a unique request ID so that
29490// if you must retry your request, the server will know to ignore the
29491// request if it has already been completed.
29492//
29493// For example, consider a situation where you make an initial request
29494// and the request times out. If you make the request again with the
29495// same request ID, the server can check if original operation with the
29496// same request ID was received, and if so, will ignore the second
29497// request. This prevents clients from accidentally creating duplicate
29498// commitments.
29499//
29500// The request ID must be a valid UUID with the exception that zero UUID
29501// is not supported (00000000-0000-0000-0000-000000000000).
29502func (c *GlobalAddressesDeleteCall) RequestId(requestId string) *GlobalAddressesDeleteCall {
29503	c.urlParams_.Set("requestId", requestId)
29504	return c
29505}
29506
29507// Fields allows partial responses to be retrieved. See
29508// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29509// for more information.
29510func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall {
29511	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29512	return c
29513}
29514
29515// Context sets the context to be used in this call's Do method. Any
29516// pending HTTP request will be aborted if the provided context is
29517// canceled.
29518func (c *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall {
29519	c.ctx_ = ctx
29520	return c
29521}
29522
29523// Header returns an http.Header that can be modified by the caller to
29524// add HTTP headers to the request.
29525func (c *GlobalAddressesDeleteCall) Header() http.Header {
29526	if c.header_ == nil {
29527		c.header_ = make(http.Header)
29528	}
29529	return c.header_
29530}
29531
29532func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
29533	reqHeaders := make(http.Header)
29534	for k, v := range c.header_ {
29535		reqHeaders[k] = v
29536	}
29537	reqHeaders.Set("User-Agent", c.s.userAgent())
29538	var body io.Reader = nil
29539	c.urlParams_.Set("alt", alt)
29540	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}")
29541	urls += "?" + c.urlParams_.Encode()
29542	req, _ := http.NewRequest("DELETE", urls, body)
29543	req.Header = reqHeaders
29544	googleapi.Expand(req.URL, map[string]string{
29545		"project": c.project,
29546		"address": c.address,
29547	})
29548	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29549}
29550
29551// Do executes the "compute.globalAddresses.delete" call.
29552// Exactly one of *Operation or error will be non-nil. Any non-2xx
29553// status code is an error. Response headers are in either
29554// *Operation.ServerResponse.Header or (if a response was returned at
29555// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29556// to check whether the returned error was because
29557// http.StatusNotModified was returned.
29558func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29559	gensupport.SetOptions(c.urlParams_, opts...)
29560	res, err := c.doRequest("json")
29561	if res != nil && res.StatusCode == http.StatusNotModified {
29562		if res.Body != nil {
29563			res.Body.Close()
29564		}
29565		return nil, &googleapi.Error{
29566			Code:   res.StatusCode,
29567			Header: res.Header,
29568		}
29569	}
29570	if err != nil {
29571		return nil, err
29572	}
29573	defer googleapi.CloseBody(res)
29574	if err := googleapi.CheckResponse(res); err != nil {
29575		return nil, err
29576	}
29577	ret := &Operation{
29578		ServerResponse: googleapi.ServerResponse{
29579			Header:         res.Header,
29580			HTTPStatusCode: res.StatusCode,
29581		},
29582	}
29583	target := &ret
29584	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
29585		return nil, err
29586	}
29587	return ret, nil
29588	// {
29589	//   "description": "Deletes the specified address resource.",
29590	//   "httpMethod": "DELETE",
29591	//   "id": "compute.globalAddresses.delete",
29592	//   "parameterOrder": [
29593	//     "project",
29594	//     "address"
29595	//   ],
29596	//   "parameters": {
29597	//     "address": {
29598	//       "description": "Name of the address resource to delete.",
29599	//       "location": "path",
29600	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29601	//       "required": true,
29602	//       "type": "string"
29603	//     },
29604	//     "project": {
29605	//       "description": "Project ID for this request.",
29606	//       "location": "path",
29607	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29608	//       "required": true,
29609	//       "type": "string"
29610	//     },
29611	//     "requestId": {
29612	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
29613	//       "location": "query",
29614	//       "type": "string"
29615	//     }
29616	//   },
29617	//   "path": "{project}/global/addresses/{address}",
29618	//   "response": {
29619	//     "$ref": "Operation"
29620	//   },
29621	//   "scopes": [
29622	//     "https://www.googleapis.com/auth/cloud-platform",
29623	//     "https://www.googleapis.com/auth/compute"
29624	//   ]
29625	// }
29626
29627}
29628
29629// method id "compute.globalAddresses.get":
29630
29631type GlobalAddressesGetCall struct {
29632	s            *Service
29633	project      string
29634	address      string
29635	urlParams_   gensupport.URLParams
29636	ifNoneMatch_ string
29637	ctx_         context.Context
29638	header_      http.Header
29639}
29640
29641// Get: Returns the specified address resource. Get a list of available
29642// addresses by making a list() request.
29643// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get
29644func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall {
29645	c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29646	c.project = project
29647	c.address = address
29648	return c
29649}
29650
29651// Fields allows partial responses to be retrieved. See
29652// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29653// for more information.
29654func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall {
29655	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29656	return c
29657}
29658
29659// IfNoneMatch sets the optional parameter which makes the operation
29660// fail if the object's ETag matches the given value. This is useful for
29661// getting updates only after the object has changed since the last
29662// request. Use googleapi.IsNotModified to check whether the response
29663// error from Do is the result of In-None-Match.
29664func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall {
29665	c.ifNoneMatch_ = entityTag
29666	return c
29667}
29668
29669// Context sets the context to be used in this call's Do method. Any
29670// pending HTTP request will be aborted if the provided context is
29671// canceled.
29672func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall {
29673	c.ctx_ = ctx
29674	return c
29675}
29676
29677// Header returns an http.Header that can be modified by the caller to
29678// add HTTP headers to the request.
29679func (c *GlobalAddressesGetCall) Header() http.Header {
29680	if c.header_ == nil {
29681		c.header_ = make(http.Header)
29682	}
29683	return c.header_
29684}
29685
29686func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) {
29687	reqHeaders := make(http.Header)
29688	for k, v := range c.header_ {
29689		reqHeaders[k] = v
29690	}
29691	reqHeaders.Set("User-Agent", c.s.userAgent())
29692	if c.ifNoneMatch_ != "" {
29693		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
29694	}
29695	var body io.Reader = nil
29696	c.urlParams_.Set("alt", alt)
29697	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}")
29698	urls += "?" + c.urlParams_.Encode()
29699	req, _ := http.NewRequest("GET", urls, body)
29700	req.Header = reqHeaders
29701	googleapi.Expand(req.URL, map[string]string{
29702		"project": c.project,
29703		"address": c.address,
29704	})
29705	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29706}
29707
29708// Do executes the "compute.globalAddresses.get" call.
29709// Exactly one of *Address or error will be non-nil. Any non-2xx status
29710// code is an error. Response headers are in either
29711// *Address.ServerResponse.Header or (if a response was returned at all)
29712// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
29713// check whether the returned error was because http.StatusNotModified
29714// was returned.
29715func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) {
29716	gensupport.SetOptions(c.urlParams_, opts...)
29717	res, err := c.doRequest("json")
29718	if res != nil && res.StatusCode == http.StatusNotModified {
29719		if res.Body != nil {
29720			res.Body.Close()
29721		}
29722		return nil, &googleapi.Error{
29723			Code:   res.StatusCode,
29724			Header: res.Header,
29725		}
29726	}
29727	if err != nil {
29728		return nil, err
29729	}
29730	defer googleapi.CloseBody(res)
29731	if err := googleapi.CheckResponse(res); err != nil {
29732		return nil, err
29733	}
29734	ret := &Address{
29735		ServerResponse: googleapi.ServerResponse{
29736			Header:         res.Header,
29737			HTTPStatusCode: res.StatusCode,
29738		},
29739	}
29740	target := &ret
29741	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
29742		return nil, err
29743	}
29744	return ret, nil
29745	// {
29746	//   "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.",
29747	//   "httpMethod": "GET",
29748	//   "id": "compute.globalAddresses.get",
29749	//   "parameterOrder": [
29750	//     "project",
29751	//     "address"
29752	//   ],
29753	//   "parameters": {
29754	//     "address": {
29755	//       "description": "Name of the address resource to return.",
29756	//       "location": "path",
29757	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29758	//       "required": true,
29759	//       "type": "string"
29760	//     },
29761	//     "project": {
29762	//       "description": "Project ID for this request.",
29763	//       "location": "path",
29764	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29765	//       "required": true,
29766	//       "type": "string"
29767	//     }
29768	//   },
29769	//   "path": "{project}/global/addresses/{address}",
29770	//   "response": {
29771	//     "$ref": "Address"
29772	//   },
29773	//   "scopes": [
29774	//     "https://www.googleapis.com/auth/cloud-platform",
29775	//     "https://www.googleapis.com/auth/compute",
29776	//     "https://www.googleapis.com/auth/compute.readonly"
29777	//   ]
29778	// }
29779
29780}
29781
29782// method id "compute.globalAddresses.insert":
29783
29784type GlobalAddressesInsertCall struct {
29785	s          *Service
29786	project    string
29787	address    *Address
29788	urlParams_ gensupport.URLParams
29789	ctx_       context.Context
29790	header_    http.Header
29791}
29792
29793// Insert: Creates an address resource in the specified project using
29794// the data included in the request.
29795// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/insert
29796func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall {
29797	c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29798	c.project = project
29799	c.address = address
29800	return c
29801}
29802
29803// RequestId sets the optional parameter "requestId": An optional
29804// request ID to identify requests. Specify a unique request ID so that
29805// if you must retry your request, the server will know to ignore the
29806// request if it has already been completed.
29807//
29808// For example, consider a situation where you make an initial request
29809// and the request times out. If you make the request again with the
29810// same request ID, the server can check if original operation with the
29811// same request ID was received, and if so, will ignore the second
29812// request. This prevents clients from accidentally creating duplicate
29813// commitments.
29814//
29815// The request ID must be a valid UUID with the exception that zero UUID
29816// is not supported (00000000-0000-0000-0000-000000000000).
29817func (c *GlobalAddressesInsertCall) RequestId(requestId string) *GlobalAddressesInsertCall {
29818	c.urlParams_.Set("requestId", requestId)
29819	return c
29820}
29821
29822// Fields allows partial responses to be retrieved. See
29823// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29824// for more information.
29825func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall {
29826	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29827	return c
29828}
29829
29830// Context sets the context to be used in this call's Do method. Any
29831// pending HTTP request will be aborted if the provided context is
29832// canceled.
29833func (c *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall {
29834	c.ctx_ = ctx
29835	return c
29836}
29837
29838// Header returns an http.Header that can be modified by the caller to
29839// add HTTP headers to the request.
29840func (c *GlobalAddressesInsertCall) Header() http.Header {
29841	if c.header_ == nil {
29842		c.header_ = make(http.Header)
29843	}
29844	return c.header_
29845}
29846
29847func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) {
29848	reqHeaders := make(http.Header)
29849	for k, v := range c.header_ {
29850		reqHeaders[k] = v
29851	}
29852	reqHeaders.Set("User-Agent", c.s.userAgent())
29853	var body io.Reader = nil
29854	body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
29855	if err != nil {
29856		return nil, err
29857	}
29858	reqHeaders.Set("Content-Type", "application/json")
29859	c.urlParams_.Set("alt", alt)
29860	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses")
29861	urls += "?" + c.urlParams_.Encode()
29862	req, _ := http.NewRequest("POST", urls, body)
29863	req.Header = reqHeaders
29864	googleapi.Expand(req.URL, map[string]string{
29865		"project": c.project,
29866	})
29867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
29868}
29869
29870// Do executes the "compute.globalAddresses.insert" call.
29871// Exactly one of *Operation or error will be non-nil. Any non-2xx
29872// status code is an error. Response headers are in either
29873// *Operation.ServerResponse.Header or (if a response was returned at
29874// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29875// to check whether the returned error was because
29876// http.StatusNotModified was returned.
29877func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29878	gensupport.SetOptions(c.urlParams_, opts...)
29879	res, err := c.doRequest("json")
29880	if res != nil && res.StatusCode == http.StatusNotModified {
29881		if res.Body != nil {
29882			res.Body.Close()
29883		}
29884		return nil, &googleapi.Error{
29885			Code:   res.StatusCode,
29886			Header: res.Header,
29887		}
29888	}
29889	if err != nil {
29890		return nil, err
29891	}
29892	defer googleapi.CloseBody(res)
29893	if err := googleapi.CheckResponse(res); err != nil {
29894		return nil, err
29895	}
29896	ret := &Operation{
29897		ServerResponse: googleapi.ServerResponse{
29898			Header:         res.Header,
29899			HTTPStatusCode: res.StatusCode,
29900		},
29901	}
29902	target := &ret
29903	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
29904		return nil, err
29905	}
29906	return ret, nil
29907	// {
29908	//   "description": "Creates an address resource in the specified project using the data included in the request.",
29909	//   "httpMethod": "POST",
29910	//   "id": "compute.globalAddresses.insert",
29911	//   "parameterOrder": [
29912	//     "project"
29913	//   ],
29914	//   "parameters": {
29915	//     "project": {
29916	//       "description": "Project ID for this request.",
29917	//       "location": "path",
29918	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29919	//       "required": true,
29920	//       "type": "string"
29921	//     },
29922	//     "requestId": {
29923	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
29924	//       "location": "query",
29925	//       "type": "string"
29926	//     }
29927	//   },
29928	//   "path": "{project}/global/addresses",
29929	//   "request": {
29930	//     "$ref": "Address"
29931	//   },
29932	//   "response": {
29933	//     "$ref": "Operation"
29934	//   },
29935	//   "scopes": [
29936	//     "https://www.googleapis.com/auth/cloud-platform",
29937	//     "https://www.googleapis.com/auth/compute"
29938	//   ]
29939	// }
29940
29941}
29942
29943// method id "compute.globalAddresses.list":
29944
29945type GlobalAddressesListCall struct {
29946	s            *Service
29947	project      string
29948	urlParams_   gensupport.URLParams
29949	ifNoneMatch_ string
29950	ctx_         context.Context
29951	header_      http.Header
29952}
29953
29954// List: Retrieves a list of global addresses.
29955// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list
29956func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall {
29957	c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29958	c.project = project
29959	return c
29960}
29961
29962// Filter sets the optional parameter "filter": Sets a filter
29963// {expression} for filtering listed resources. Your {expression} must
29964// be in the format: field_name comparison_string literal_string.
29965//
29966// The field_name is the name of the field you want to compare. Only
29967// atomic field types are supported (string, number, boolean). The
29968// comparison_string must be either eq (equals) or ne (not equals). The
29969// literal_string is the string value to filter to. The literal value
29970// must be valid for the type of field you are filtering by (string,
29971// number, boolean). For string fields, the literal value is interpreted
29972// as a regular expression using RE2 syntax. The literal value must
29973// match the entire field.
29974//
29975// For example, to filter for instances that do not have a name of
29976// example-instance, you would use name ne example-instance.
29977//
29978// You can filter on nested fields. For example, you could filter on
29979// instances that have set the scheduling.automaticRestart field to
29980// true. Use filtering on nested fields to take advantage of labels to
29981// organize and search for results based on label values.
29982//
29983// To filter on multiple expressions, provide each separate expression
29984// within parentheses. For example, (scheduling.automaticRestart eq
29985// true) (zone eq us-central1-f). Multiple expressions are treated as
29986// AND expressions, meaning that resources must match all expressions to
29987// pass the filters.
29988func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall {
29989	c.urlParams_.Set("filter", filter)
29990	return c
29991}
29992
29993// MaxResults sets the optional parameter "maxResults": The maximum
29994// number of results per page that should be returned. If the number of
29995// available results is larger than maxResults, Compute Engine returns a
29996// nextPageToken that can be used to get the next page of results in
29997// subsequent list requests. Acceptable values are 0 to 500, inclusive.
29998// (Default: 500)
29999func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall {
30000	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
30001	return c
30002}
30003
30004// OrderBy sets the optional parameter "orderBy": Sorts list results by
30005// a certain order. By default, results are returned in alphanumerical
30006// order based on the resource name.
30007//
30008// You can also sort results in descending order based on the creation
30009// timestamp using orderBy="creationTimestamp desc". This sorts results
30010// based on the creationTimestamp field in reverse chronological order
30011// (newest result first). Use this to sort resources like operations so
30012// that the newest operation is returned first.
30013//
30014// Currently, only sorting by name or creationTimestamp desc is
30015// supported.
30016func (c *GlobalAddressesListCall) OrderBy(orderBy string) *GlobalAddressesListCall {
30017	c.urlParams_.Set("orderBy", orderBy)
30018	return c
30019}
30020
30021// PageToken sets the optional parameter "pageToken": Specifies a page
30022// token to use. Set pageToken to the nextPageToken returned by a
30023// previous list request to get the next page of results.
30024func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall {
30025	c.urlParams_.Set("pageToken", pageToken)
30026	return c
30027}
30028
30029// Fields allows partial responses to be retrieved. See
30030// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30031// for more information.
30032func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall {
30033	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30034	return c
30035}
30036
30037// IfNoneMatch sets the optional parameter which makes the operation
30038// fail if the object's ETag matches the given value. This is useful for
30039// getting updates only after the object has changed since the last
30040// request. Use googleapi.IsNotModified to check whether the response
30041// error from Do is the result of In-None-Match.
30042func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall {
30043	c.ifNoneMatch_ = entityTag
30044	return c
30045}
30046
30047// Context sets the context to be used in this call's Do method. Any
30048// pending HTTP request will be aborted if the provided context is
30049// canceled.
30050func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall {
30051	c.ctx_ = ctx
30052	return c
30053}
30054
30055// Header returns an http.Header that can be modified by the caller to
30056// add HTTP headers to the request.
30057func (c *GlobalAddressesListCall) Header() http.Header {
30058	if c.header_ == nil {
30059		c.header_ = make(http.Header)
30060	}
30061	return c.header_
30062}
30063
30064func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) {
30065	reqHeaders := make(http.Header)
30066	for k, v := range c.header_ {
30067		reqHeaders[k] = v
30068	}
30069	reqHeaders.Set("User-Agent", c.s.userAgent())
30070	if c.ifNoneMatch_ != "" {
30071		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30072	}
30073	var body io.Reader = nil
30074	c.urlParams_.Set("alt", alt)
30075	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses")
30076	urls += "?" + c.urlParams_.Encode()
30077	req, _ := http.NewRequest("GET", urls, body)
30078	req.Header = reqHeaders
30079	googleapi.Expand(req.URL, map[string]string{
30080		"project": c.project,
30081	})
30082	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30083}
30084
30085// Do executes the "compute.globalAddresses.list" call.
30086// Exactly one of *AddressList or error will be non-nil. Any non-2xx
30087// status code is an error. Response headers are in either
30088// *AddressList.ServerResponse.Header or (if a response was returned at
30089// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30090// to check whether the returned error was because
30091// http.StatusNotModified was returned.
30092func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) {
30093	gensupport.SetOptions(c.urlParams_, opts...)
30094	res, err := c.doRequest("json")
30095	if res != nil && res.StatusCode == http.StatusNotModified {
30096		if res.Body != nil {
30097			res.Body.Close()
30098		}
30099		return nil, &googleapi.Error{
30100			Code:   res.StatusCode,
30101			Header: res.Header,
30102		}
30103	}
30104	if err != nil {
30105		return nil, err
30106	}
30107	defer googleapi.CloseBody(res)
30108	if err := googleapi.CheckResponse(res); err != nil {
30109		return nil, err
30110	}
30111	ret := &AddressList{
30112		ServerResponse: googleapi.ServerResponse{
30113			Header:         res.Header,
30114			HTTPStatusCode: res.StatusCode,
30115		},
30116	}
30117	target := &ret
30118	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
30119		return nil, err
30120	}
30121	return ret, nil
30122	// {
30123	//   "description": "Retrieves a list of global addresses.",
30124	//   "httpMethod": "GET",
30125	//   "id": "compute.globalAddresses.list",
30126	//   "parameterOrder": [
30127	//     "project"
30128	//   ],
30129	//   "parameters": {
30130	//     "filter": {
30131	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
30132	//       "location": "query",
30133	//       "type": "string"
30134	//     },
30135	//     "maxResults": {
30136	//       "default": "500",
30137	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
30138	//       "format": "uint32",
30139	//       "location": "query",
30140	//       "minimum": "0",
30141	//       "type": "integer"
30142	//     },
30143	//     "orderBy": {
30144	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
30145	//       "location": "query",
30146	//       "type": "string"
30147	//     },
30148	//     "pageToken": {
30149	//       "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.",
30150	//       "location": "query",
30151	//       "type": "string"
30152	//     },
30153	//     "project": {
30154	//       "description": "Project ID for this request.",
30155	//       "location": "path",
30156	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30157	//       "required": true,
30158	//       "type": "string"
30159	//     }
30160	//   },
30161	//   "path": "{project}/global/addresses",
30162	//   "response": {
30163	//     "$ref": "AddressList"
30164	//   },
30165	//   "scopes": [
30166	//     "https://www.googleapis.com/auth/cloud-platform",
30167	//     "https://www.googleapis.com/auth/compute",
30168	//     "https://www.googleapis.com/auth/compute.readonly"
30169	//   ]
30170	// }
30171
30172}
30173
30174// Pages invokes f for each page of results.
30175// A non-nil error returned from f will halt the iteration.
30176// The provided context supersedes any context provided to the Context method.
30177func (c *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error {
30178	c.ctx_ = ctx
30179	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
30180	for {
30181		x, err := c.Do()
30182		if err != nil {
30183			return err
30184		}
30185		if err := f(x); err != nil {
30186			return err
30187		}
30188		if x.NextPageToken == "" {
30189			return nil
30190		}
30191		c.PageToken(x.NextPageToken)
30192	}
30193}
30194
30195// method id "compute.globalAddresses.setLabels":
30196
30197type GlobalAddressesSetLabelsCall struct {
30198	s                      *Service
30199	project                string
30200	resource               string
30201	globalsetlabelsrequest *GlobalSetLabelsRequest
30202	urlParams_             gensupport.URLParams
30203	ctx_                   context.Context
30204	header_                http.Header
30205}
30206
30207// SetLabels: Sets the labels on a GlobalAddress. To learn more about
30208// labels, read the Labeling Resources documentation.
30209func (r *GlobalAddressesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalAddressesSetLabelsCall {
30210	c := &GlobalAddressesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30211	c.project = project
30212	c.resource = resource
30213	c.globalsetlabelsrequest = globalsetlabelsrequest
30214	return c
30215}
30216
30217// Fields allows partial responses to be retrieved. See
30218// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30219// for more information.
30220func (c *GlobalAddressesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalAddressesSetLabelsCall {
30221	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30222	return c
30223}
30224
30225// Context sets the context to be used in this call's Do method. Any
30226// pending HTTP request will be aborted if the provided context is
30227// canceled.
30228func (c *GlobalAddressesSetLabelsCall) Context(ctx context.Context) *GlobalAddressesSetLabelsCall {
30229	c.ctx_ = ctx
30230	return c
30231}
30232
30233// Header returns an http.Header that can be modified by the caller to
30234// add HTTP headers to the request.
30235func (c *GlobalAddressesSetLabelsCall) Header() http.Header {
30236	if c.header_ == nil {
30237		c.header_ = make(http.Header)
30238	}
30239	return c.header_
30240}
30241
30242func (c *GlobalAddressesSetLabelsCall) doRequest(alt string) (*http.Response, error) {
30243	reqHeaders := make(http.Header)
30244	for k, v := range c.header_ {
30245		reqHeaders[k] = v
30246	}
30247	reqHeaders.Set("User-Agent", c.s.userAgent())
30248	var body io.Reader = nil
30249	body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest)
30250	if err != nil {
30251		return nil, err
30252	}
30253	reqHeaders.Set("Content-Type", "application/json")
30254	c.urlParams_.Set("alt", alt)
30255	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{resource}/setLabels")
30256	urls += "?" + c.urlParams_.Encode()
30257	req, _ := http.NewRequest("POST", urls, body)
30258	req.Header = reqHeaders
30259	googleapi.Expand(req.URL, map[string]string{
30260		"project":  c.project,
30261		"resource": c.resource,
30262	})
30263	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30264}
30265
30266// Do executes the "compute.globalAddresses.setLabels" call.
30267// Exactly one of *Operation or error will be non-nil. Any non-2xx
30268// status code is an error. Response headers are in either
30269// *Operation.ServerResponse.Header or (if a response was returned at
30270// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30271// to check whether the returned error was because
30272// http.StatusNotModified was returned.
30273func (c *GlobalAddressesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30274	gensupport.SetOptions(c.urlParams_, opts...)
30275	res, err := c.doRequest("json")
30276	if res != nil && res.StatusCode == http.StatusNotModified {
30277		if res.Body != nil {
30278			res.Body.Close()
30279		}
30280		return nil, &googleapi.Error{
30281			Code:   res.StatusCode,
30282			Header: res.Header,
30283		}
30284	}
30285	if err != nil {
30286		return nil, err
30287	}
30288	defer googleapi.CloseBody(res)
30289	if err := googleapi.CheckResponse(res); err != nil {
30290		return nil, err
30291	}
30292	ret := &Operation{
30293		ServerResponse: googleapi.ServerResponse{
30294			Header:         res.Header,
30295			HTTPStatusCode: res.StatusCode,
30296		},
30297	}
30298	target := &ret
30299	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
30300		return nil, err
30301	}
30302	return ret, nil
30303	// {
30304	//   "description": "Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation.",
30305	//   "httpMethod": "POST",
30306	//   "id": "compute.globalAddresses.setLabels",
30307	//   "parameterOrder": [
30308	//     "project",
30309	//     "resource"
30310	//   ],
30311	//   "parameters": {
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-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30316	//       "required": true,
30317	//       "type": "string"
30318	//     },
30319	//     "resource": {
30320	//       "description": "Name of the resource for this request.",
30321	//       "location": "path",
30322	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
30323	//       "required": true,
30324	//       "type": "string"
30325	//     }
30326	//   },
30327	//   "path": "{project}/global/addresses/{resource}/setLabels",
30328	//   "request": {
30329	//     "$ref": "GlobalSetLabelsRequest"
30330	//   },
30331	//   "response": {
30332	//     "$ref": "Operation"
30333	//   },
30334	//   "scopes": [
30335	//     "https://www.googleapis.com/auth/cloud-platform",
30336	//     "https://www.googleapis.com/auth/compute"
30337	//   ]
30338	// }
30339
30340}
30341
30342// method id "compute.globalAddresses.testIamPermissions":
30343
30344type GlobalAddressesTestIamPermissionsCall struct {
30345	s                      *Service
30346	project                string
30347	resource               string
30348	testpermissionsrequest *TestPermissionsRequest
30349	urlParams_             gensupport.URLParams
30350	ctx_                   context.Context
30351	header_                http.Header
30352}
30353
30354// TestIamPermissions: Returns permissions that a caller has on the
30355// specified resource.
30356func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall {
30357	c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30358	c.project = project
30359	c.resource = resource
30360	c.testpermissionsrequest = testpermissionsrequest
30361	return c
30362}
30363
30364// Fields allows partial responses to be retrieved. See
30365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30366// for more information.
30367func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall {
30368	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30369	return c
30370}
30371
30372// Context sets the context to be used in this call's Do method. Any
30373// pending HTTP request will be aborted if the provided context is
30374// canceled.
30375func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall {
30376	c.ctx_ = ctx
30377	return c
30378}
30379
30380// Header returns an http.Header that can be modified by the caller to
30381// add HTTP headers to the request.
30382func (c *GlobalAddressesTestIamPermissionsCall) Header() http.Header {
30383	if c.header_ == nil {
30384		c.header_ = make(http.Header)
30385	}
30386	return c.header_
30387}
30388
30389func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
30390	reqHeaders := make(http.Header)
30391	for k, v := range c.header_ {
30392		reqHeaders[k] = v
30393	}
30394	reqHeaders.Set("User-Agent", c.s.userAgent())
30395	var body io.Reader = nil
30396	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
30397	if err != nil {
30398		return nil, err
30399	}
30400	reqHeaders.Set("Content-Type", "application/json")
30401	c.urlParams_.Set("alt", alt)
30402	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{resource}/testIamPermissions")
30403	urls += "?" + c.urlParams_.Encode()
30404	req, _ := http.NewRequest("POST", urls, body)
30405	req.Header = reqHeaders
30406	googleapi.Expand(req.URL, map[string]string{
30407		"project":  c.project,
30408		"resource": c.resource,
30409	})
30410	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30411}
30412
30413// Do executes the "compute.globalAddresses.testIamPermissions" call.
30414// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
30415// non-2xx status code is an error. Response headers are in either
30416// *TestPermissionsResponse.ServerResponse.Header or (if a response was
30417// returned at all) in error.(*googleapi.Error).Header. Use
30418// googleapi.IsNotModified to check whether the returned error was
30419// because http.StatusNotModified was returned.
30420func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
30421	gensupport.SetOptions(c.urlParams_, opts...)
30422	res, err := c.doRequest("json")
30423	if res != nil && res.StatusCode == http.StatusNotModified {
30424		if res.Body != nil {
30425			res.Body.Close()
30426		}
30427		return nil, &googleapi.Error{
30428			Code:   res.StatusCode,
30429			Header: res.Header,
30430		}
30431	}
30432	if err != nil {
30433		return nil, err
30434	}
30435	defer googleapi.CloseBody(res)
30436	if err := googleapi.CheckResponse(res); err != nil {
30437		return nil, err
30438	}
30439	ret := &TestPermissionsResponse{
30440		ServerResponse: googleapi.ServerResponse{
30441			Header:         res.Header,
30442			HTTPStatusCode: res.StatusCode,
30443		},
30444	}
30445	target := &ret
30446	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
30447		return nil, err
30448	}
30449	return ret, nil
30450	// {
30451	//   "description": "Returns permissions that a caller has on the specified resource.",
30452	//   "httpMethod": "POST",
30453	//   "id": "compute.globalAddresses.testIamPermissions",
30454	//   "parameterOrder": [
30455	//     "project",
30456	//     "resource"
30457	//   ],
30458	//   "parameters": {
30459	//     "project": {
30460	//       "description": "Project ID for this request.",
30461	//       "location": "path",
30462	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30463	//       "required": true,
30464	//       "type": "string"
30465	//     },
30466	//     "resource": {
30467	//       "description": "Name of the resource for this request.",
30468	//       "location": "path",
30469	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
30470	//       "required": true,
30471	//       "type": "string"
30472	//     }
30473	//   },
30474	//   "path": "{project}/global/addresses/{resource}/testIamPermissions",
30475	//   "request": {
30476	//     "$ref": "TestPermissionsRequest"
30477	//   },
30478	//   "response": {
30479	//     "$ref": "TestPermissionsResponse"
30480	//   },
30481	//   "scopes": [
30482	//     "https://www.googleapis.com/auth/cloud-platform",
30483	//     "https://www.googleapis.com/auth/compute",
30484	//     "https://www.googleapis.com/auth/compute.readonly"
30485	//   ]
30486	// }
30487
30488}
30489
30490// method id "compute.globalForwardingRules.delete":
30491
30492type GlobalForwardingRulesDeleteCall struct {
30493	s              *Service
30494	project        string
30495	forwardingRule string
30496	urlParams_     gensupport.URLParams
30497	ctx_           context.Context
30498	header_        http.Header
30499}
30500
30501// Delete: Deletes the specified GlobalForwardingRule resource.
30502// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/delete
30503func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall {
30504	c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30505	c.project = project
30506	c.forwardingRule = forwardingRule
30507	return c
30508}
30509
30510// RequestId sets the optional parameter "requestId": An optional
30511// request ID to identify requests. Specify a unique request ID so that
30512// if you must retry your request, the server will know to ignore the
30513// request if it has already been completed.
30514//
30515// For example, consider a situation where you make an initial request
30516// and the request times out. If you make the request again with the
30517// same request ID, the server can check if original operation with the
30518// same request ID was received, and if so, will ignore the second
30519// request. This prevents clients from accidentally creating duplicate
30520// commitments.
30521//
30522// The request ID must be a valid UUID with the exception that zero UUID
30523// is not supported (00000000-0000-0000-0000-000000000000).
30524func (c *GlobalForwardingRulesDeleteCall) RequestId(requestId string) *GlobalForwardingRulesDeleteCall {
30525	c.urlParams_.Set("requestId", requestId)
30526	return c
30527}
30528
30529// Fields allows partial responses to be retrieved. See
30530// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30531// for more information.
30532func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall {
30533	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30534	return c
30535}
30536
30537// Context sets the context to be used in this call's Do method. Any
30538// pending HTTP request will be aborted if the provided context is
30539// canceled.
30540func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall {
30541	c.ctx_ = ctx
30542	return c
30543}
30544
30545// Header returns an http.Header that can be modified by the caller to
30546// add HTTP headers to the request.
30547func (c *GlobalForwardingRulesDeleteCall) Header() http.Header {
30548	if c.header_ == nil {
30549		c.header_ = make(http.Header)
30550	}
30551	return c.header_
30552}
30553
30554func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
30555	reqHeaders := make(http.Header)
30556	for k, v := range c.header_ {
30557		reqHeaders[k] = v
30558	}
30559	reqHeaders.Set("User-Agent", c.s.userAgent())
30560	var body io.Reader = nil
30561	c.urlParams_.Set("alt", alt)
30562	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}")
30563	urls += "?" + c.urlParams_.Encode()
30564	req, _ := http.NewRequest("DELETE", urls, body)
30565	req.Header = reqHeaders
30566	googleapi.Expand(req.URL, map[string]string{
30567		"project":        c.project,
30568		"forwardingRule": c.forwardingRule,
30569	})
30570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30571}
30572
30573// Do executes the "compute.globalForwardingRules.delete" call.
30574// Exactly one of *Operation or error will be non-nil. Any non-2xx
30575// status code is an error. Response headers are in either
30576// *Operation.ServerResponse.Header or (if a response was returned at
30577// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30578// to check whether the returned error was because
30579// http.StatusNotModified was returned.
30580func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30581	gensupport.SetOptions(c.urlParams_, opts...)
30582	res, err := c.doRequest("json")
30583	if res != nil && res.StatusCode == http.StatusNotModified {
30584		if res.Body != nil {
30585			res.Body.Close()
30586		}
30587		return nil, &googleapi.Error{
30588			Code:   res.StatusCode,
30589			Header: res.Header,
30590		}
30591	}
30592	if err != nil {
30593		return nil, err
30594	}
30595	defer googleapi.CloseBody(res)
30596	if err := googleapi.CheckResponse(res); err != nil {
30597		return nil, err
30598	}
30599	ret := &Operation{
30600		ServerResponse: googleapi.ServerResponse{
30601			Header:         res.Header,
30602			HTTPStatusCode: res.StatusCode,
30603		},
30604	}
30605	target := &ret
30606	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
30607		return nil, err
30608	}
30609	return ret, nil
30610	// {
30611	//   "description": "Deletes the specified GlobalForwardingRule resource.",
30612	//   "httpMethod": "DELETE",
30613	//   "id": "compute.globalForwardingRules.delete",
30614	//   "parameterOrder": [
30615	//     "project",
30616	//     "forwardingRule"
30617	//   ],
30618	//   "parameters": {
30619	//     "forwardingRule": {
30620	//       "description": "Name of the ForwardingRule resource to delete.",
30621	//       "location": "path",
30622	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30623	//       "required": true,
30624	//       "type": "string"
30625	//     },
30626	//     "project": {
30627	//       "description": "Project ID for this request.",
30628	//       "location": "path",
30629	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30630	//       "required": true,
30631	//       "type": "string"
30632	//     },
30633	//     "requestId": {
30634	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
30635	//       "location": "query",
30636	//       "type": "string"
30637	//     }
30638	//   },
30639	//   "path": "{project}/global/forwardingRules/{forwardingRule}",
30640	//   "response": {
30641	//     "$ref": "Operation"
30642	//   },
30643	//   "scopes": [
30644	//     "https://www.googleapis.com/auth/cloud-platform",
30645	//     "https://www.googleapis.com/auth/compute"
30646	//   ]
30647	// }
30648
30649}
30650
30651// method id "compute.globalForwardingRules.get":
30652
30653type GlobalForwardingRulesGetCall struct {
30654	s              *Service
30655	project        string
30656	forwardingRule string
30657	urlParams_     gensupport.URLParams
30658	ifNoneMatch_   string
30659	ctx_           context.Context
30660	header_        http.Header
30661}
30662
30663// Get: Returns the specified GlobalForwardingRule resource. Get a list
30664// of available forwarding rules by making a list() request.
30665// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get
30666func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall {
30667	c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30668	c.project = project
30669	c.forwardingRule = forwardingRule
30670	return c
30671}
30672
30673// Fields allows partial responses to be retrieved. See
30674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30675// for more information.
30676func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall {
30677	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30678	return c
30679}
30680
30681// IfNoneMatch sets the optional parameter which makes the operation
30682// fail if the object's ETag matches the given value. This is useful for
30683// getting updates only after the object has changed since the last
30684// request. Use googleapi.IsNotModified to check whether the response
30685// error from Do is the result of In-None-Match.
30686func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall {
30687	c.ifNoneMatch_ = entityTag
30688	return c
30689}
30690
30691// Context sets the context to be used in this call's Do method. Any
30692// pending HTTP request will be aborted if the provided context is
30693// canceled.
30694func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall {
30695	c.ctx_ = ctx
30696	return c
30697}
30698
30699// Header returns an http.Header that can be modified by the caller to
30700// add HTTP headers to the request.
30701func (c *GlobalForwardingRulesGetCall) Header() http.Header {
30702	if c.header_ == nil {
30703		c.header_ = make(http.Header)
30704	}
30705	return c.header_
30706}
30707
30708func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
30709	reqHeaders := make(http.Header)
30710	for k, v := range c.header_ {
30711		reqHeaders[k] = v
30712	}
30713	reqHeaders.Set("User-Agent", c.s.userAgent())
30714	if c.ifNoneMatch_ != "" {
30715		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
30716	}
30717	var body io.Reader = nil
30718	c.urlParams_.Set("alt", alt)
30719	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}")
30720	urls += "?" + c.urlParams_.Encode()
30721	req, _ := http.NewRequest("GET", urls, body)
30722	req.Header = reqHeaders
30723	googleapi.Expand(req.URL, map[string]string{
30724		"project":        c.project,
30725		"forwardingRule": c.forwardingRule,
30726	})
30727	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30728}
30729
30730// Do executes the "compute.globalForwardingRules.get" call.
30731// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx
30732// status code is an error. Response headers are in either
30733// *ForwardingRule.ServerResponse.Header or (if a response was returned
30734// at all) in error.(*googleapi.Error).Header. Use
30735// googleapi.IsNotModified to check whether the returned error was
30736// because http.StatusNotModified was returned.
30737func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) {
30738	gensupport.SetOptions(c.urlParams_, opts...)
30739	res, err := c.doRequest("json")
30740	if res != nil && res.StatusCode == http.StatusNotModified {
30741		if res.Body != nil {
30742			res.Body.Close()
30743		}
30744		return nil, &googleapi.Error{
30745			Code:   res.StatusCode,
30746			Header: res.Header,
30747		}
30748	}
30749	if err != nil {
30750		return nil, err
30751	}
30752	defer googleapi.CloseBody(res)
30753	if err := googleapi.CheckResponse(res); err != nil {
30754		return nil, err
30755	}
30756	ret := &ForwardingRule{
30757		ServerResponse: googleapi.ServerResponse{
30758			Header:         res.Header,
30759			HTTPStatusCode: res.StatusCode,
30760		},
30761	}
30762	target := &ret
30763	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
30764		return nil, err
30765	}
30766	return ret, nil
30767	// {
30768	//   "description": "Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request.",
30769	//   "httpMethod": "GET",
30770	//   "id": "compute.globalForwardingRules.get",
30771	//   "parameterOrder": [
30772	//     "project",
30773	//     "forwardingRule"
30774	//   ],
30775	//   "parameters": {
30776	//     "forwardingRule": {
30777	//       "description": "Name of the ForwardingRule resource to return.",
30778	//       "location": "path",
30779	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30780	//       "required": true,
30781	//       "type": "string"
30782	//     },
30783	//     "project": {
30784	//       "description": "Project ID for this request.",
30785	//       "location": "path",
30786	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30787	//       "required": true,
30788	//       "type": "string"
30789	//     }
30790	//   },
30791	//   "path": "{project}/global/forwardingRules/{forwardingRule}",
30792	//   "response": {
30793	//     "$ref": "ForwardingRule"
30794	//   },
30795	//   "scopes": [
30796	//     "https://www.googleapis.com/auth/cloud-platform",
30797	//     "https://www.googleapis.com/auth/compute",
30798	//     "https://www.googleapis.com/auth/compute.readonly"
30799	//   ]
30800	// }
30801
30802}
30803
30804// method id "compute.globalForwardingRules.insert":
30805
30806type GlobalForwardingRulesInsertCall struct {
30807	s              *Service
30808	project        string
30809	forwardingrule *ForwardingRule
30810	urlParams_     gensupport.URLParams
30811	ctx_           context.Context
30812	header_        http.Header
30813}
30814
30815// Insert: Creates a GlobalForwardingRule resource in the specified
30816// project using the data included in the request.
30817// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/insert
30818func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall {
30819	c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30820	c.project = project
30821	c.forwardingrule = forwardingrule
30822	return c
30823}
30824
30825// RequestId sets the optional parameter "requestId": An optional
30826// request ID to identify requests. Specify a unique request ID so that
30827// if you must retry your request, the server will know to ignore the
30828// request if it has already been completed.
30829//
30830// For example, consider a situation where you make an initial request
30831// and the request times out. If you make the request again with the
30832// same request ID, the server can check if original operation with the
30833// same request ID was received, and if so, will ignore the second
30834// request. This prevents clients from accidentally creating duplicate
30835// commitments.
30836//
30837// The request ID must be a valid UUID with the exception that zero UUID
30838// is not supported (00000000-0000-0000-0000-000000000000).
30839func (c *GlobalForwardingRulesInsertCall) RequestId(requestId string) *GlobalForwardingRulesInsertCall {
30840	c.urlParams_.Set("requestId", requestId)
30841	return c
30842}
30843
30844// Fields allows partial responses to be retrieved. See
30845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30846// for more information.
30847func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall {
30848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30849	return c
30850}
30851
30852// Context sets the context to be used in this call's Do method. Any
30853// pending HTTP request will be aborted if the provided context is
30854// canceled.
30855func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall {
30856	c.ctx_ = ctx
30857	return c
30858}
30859
30860// Header returns an http.Header that can be modified by the caller to
30861// add HTTP headers to the request.
30862func (c *GlobalForwardingRulesInsertCall) Header() http.Header {
30863	if c.header_ == nil {
30864		c.header_ = make(http.Header)
30865	}
30866	return c.header_
30867}
30868
30869func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
30870	reqHeaders := make(http.Header)
30871	for k, v := range c.header_ {
30872		reqHeaders[k] = v
30873	}
30874	reqHeaders.Set("User-Agent", c.s.userAgent())
30875	var body io.Reader = nil
30876	body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
30877	if err != nil {
30878		return nil, err
30879	}
30880	reqHeaders.Set("Content-Type", "application/json")
30881	c.urlParams_.Set("alt", alt)
30882	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules")
30883	urls += "?" + c.urlParams_.Encode()
30884	req, _ := http.NewRequest("POST", urls, body)
30885	req.Header = reqHeaders
30886	googleapi.Expand(req.URL, map[string]string{
30887		"project": c.project,
30888	})
30889	return gensupport.SendRequest(c.ctx_, c.s.client, req)
30890}
30891
30892// Do executes the "compute.globalForwardingRules.insert" call.
30893// Exactly one of *Operation or error will be non-nil. Any non-2xx
30894// status code is an error. Response headers are in either
30895// *Operation.ServerResponse.Header or (if a response was returned at
30896// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30897// to check whether the returned error was because
30898// http.StatusNotModified was returned.
30899func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30900	gensupport.SetOptions(c.urlParams_, opts...)
30901	res, err := c.doRequest("json")
30902	if res != nil && res.StatusCode == http.StatusNotModified {
30903		if res.Body != nil {
30904			res.Body.Close()
30905		}
30906		return nil, &googleapi.Error{
30907			Code:   res.StatusCode,
30908			Header: res.Header,
30909		}
30910	}
30911	if err != nil {
30912		return nil, err
30913	}
30914	defer googleapi.CloseBody(res)
30915	if err := googleapi.CheckResponse(res); err != nil {
30916		return nil, err
30917	}
30918	ret := &Operation{
30919		ServerResponse: googleapi.ServerResponse{
30920			Header:         res.Header,
30921			HTTPStatusCode: res.StatusCode,
30922		},
30923	}
30924	target := &ret
30925	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
30926		return nil, err
30927	}
30928	return ret, nil
30929	// {
30930	//   "description": "Creates a GlobalForwardingRule resource in the specified project using the data included in the request.",
30931	//   "httpMethod": "POST",
30932	//   "id": "compute.globalForwardingRules.insert",
30933	//   "parameterOrder": [
30934	//     "project"
30935	//   ],
30936	//   "parameters": {
30937	//     "project": {
30938	//       "description": "Project ID for this request.",
30939	//       "location": "path",
30940	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30941	//       "required": true,
30942	//       "type": "string"
30943	//     },
30944	//     "requestId": {
30945	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
30946	//       "location": "query",
30947	//       "type": "string"
30948	//     }
30949	//   },
30950	//   "path": "{project}/global/forwardingRules",
30951	//   "request": {
30952	//     "$ref": "ForwardingRule"
30953	//   },
30954	//   "response": {
30955	//     "$ref": "Operation"
30956	//   },
30957	//   "scopes": [
30958	//     "https://www.googleapis.com/auth/cloud-platform",
30959	//     "https://www.googleapis.com/auth/compute"
30960	//   ]
30961	// }
30962
30963}
30964
30965// method id "compute.globalForwardingRules.list":
30966
30967type GlobalForwardingRulesListCall struct {
30968	s            *Service
30969	project      string
30970	urlParams_   gensupport.URLParams
30971	ifNoneMatch_ string
30972	ctx_         context.Context
30973	header_      http.Header
30974}
30975
30976// List: Retrieves a list of GlobalForwardingRule resources available to
30977// the specified project.
30978// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list
30979func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall {
30980	c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30981	c.project = project
30982	return c
30983}
30984
30985// Filter sets the optional parameter "filter": Sets a filter
30986// {expression} for filtering listed resources. Your {expression} must
30987// be in the format: field_name comparison_string literal_string.
30988//
30989// The field_name is the name of the field you want to compare. Only
30990// atomic field types are supported (string, number, boolean). The
30991// comparison_string must be either eq (equals) or ne (not equals). The
30992// literal_string is the string value to filter to. The literal value
30993// must be valid for the type of field you are filtering by (string,
30994// number, boolean). For string fields, the literal value is interpreted
30995// as a regular expression using RE2 syntax. The literal value must
30996// match the entire field.
30997//
30998// For example, to filter for instances that do not have a name of
30999// example-instance, you would use name ne example-instance.
31000//
31001// You can filter on nested fields. For example, you could filter on
31002// instances that have set the scheduling.automaticRestart field to
31003// true. Use filtering on nested fields to take advantage of labels to
31004// organize and search for results based on label values.
31005//
31006// To filter on multiple expressions, provide each separate expression
31007// within parentheses. For example, (scheduling.automaticRestart eq
31008// true) (zone eq us-central1-f). Multiple expressions are treated as
31009// AND expressions, meaning that resources must match all expressions to
31010// pass the filters.
31011func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall {
31012	c.urlParams_.Set("filter", filter)
31013	return c
31014}
31015
31016// MaxResults sets the optional parameter "maxResults": The maximum
31017// number of results per page that should be returned. If the number of
31018// available results is larger than maxResults, Compute Engine returns a
31019// nextPageToken that can be used to get the next page of results in
31020// subsequent list requests. Acceptable values are 0 to 500, inclusive.
31021// (Default: 500)
31022func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall {
31023	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31024	return c
31025}
31026
31027// OrderBy sets the optional parameter "orderBy": Sorts list results by
31028// a certain order. By default, results are returned in alphanumerical
31029// order based on the resource name.
31030//
31031// You can also sort results in descending order based on the creation
31032// timestamp using orderBy="creationTimestamp desc". This sorts results
31033// based on the creationTimestamp field in reverse chronological order
31034// (newest result first). Use this to sort resources like operations so
31035// that the newest operation is returned first.
31036//
31037// Currently, only sorting by name or creationTimestamp desc is
31038// supported.
31039func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardingRulesListCall {
31040	c.urlParams_.Set("orderBy", orderBy)
31041	return c
31042}
31043
31044// PageToken sets the optional parameter "pageToken": Specifies a page
31045// token to use. Set pageToken to the nextPageToken returned by a
31046// previous list request to get the next page of results.
31047func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall {
31048	c.urlParams_.Set("pageToken", pageToken)
31049	return c
31050}
31051
31052// Fields allows partial responses to be retrieved. See
31053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31054// for more information.
31055func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall {
31056	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31057	return c
31058}
31059
31060// IfNoneMatch sets the optional parameter which makes the operation
31061// fail if the object's ETag matches the given value. This is useful for
31062// getting updates only after the object has changed since the last
31063// request. Use googleapi.IsNotModified to check whether the response
31064// error from Do is the result of In-None-Match.
31065func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall {
31066	c.ifNoneMatch_ = entityTag
31067	return c
31068}
31069
31070// Context sets the context to be used in this call's Do method. Any
31071// pending HTTP request will be aborted if the provided context is
31072// canceled.
31073func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall {
31074	c.ctx_ = ctx
31075	return c
31076}
31077
31078// Header returns an http.Header that can be modified by the caller to
31079// add HTTP headers to the request.
31080func (c *GlobalForwardingRulesListCall) Header() http.Header {
31081	if c.header_ == nil {
31082		c.header_ = make(http.Header)
31083	}
31084	return c.header_
31085}
31086
31087func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
31088	reqHeaders := make(http.Header)
31089	for k, v := range c.header_ {
31090		reqHeaders[k] = v
31091	}
31092	reqHeaders.Set("User-Agent", c.s.userAgent())
31093	if c.ifNoneMatch_ != "" {
31094		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31095	}
31096	var body io.Reader = nil
31097	c.urlParams_.Set("alt", alt)
31098	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules")
31099	urls += "?" + c.urlParams_.Encode()
31100	req, _ := http.NewRequest("GET", urls, body)
31101	req.Header = reqHeaders
31102	googleapi.Expand(req.URL, map[string]string{
31103		"project": c.project,
31104	})
31105	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31106}
31107
31108// Do executes the "compute.globalForwardingRules.list" call.
31109// Exactly one of *ForwardingRuleList or error will be non-nil. Any
31110// non-2xx status code is an error. Response headers are in either
31111// *ForwardingRuleList.ServerResponse.Header or (if a response was
31112// returned at all) in error.(*googleapi.Error).Header. Use
31113// googleapi.IsNotModified to check whether the returned error was
31114// because http.StatusNotModified was returned.
31115func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) {
31116	gensupport.SetOptions(c.urlParams_, opts...)
31117	res, err := c.doRequest("json")
31118	if res != nil && res.StatusCode == http.StatusNotModified {
31119		if res.Body != nil {
31120			res.Body.Close()
31121		}
31122		return nil, &googleapi.Error{
31123			Code:   res.StatusCode,
31124			Header: res.Header,
31125		}
31126	}
31127	if err != nil {
31128		return nil, err
31129	}
31130	defer googleapi.CloseBody(res)
31131	if err := googleapi.CheckResponse(res); err != nil {
31132		return nil, err
31133	}
31134	ret := &ForwardingRuleList{
31135		ServerResponse: googleapi.ServerResponse{
31136			Header:         res.Header,
31137			HTTPStatusCode: res.StatusCode,
31138		},
31139	}
31140	target := &ret
31141	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
31142		return nil, err
31143	}
31144	return ret, nil
31145	// {
31146	//   "description": "Retrieves a list of GlobalForwardingRule resources available to the specified project.",
31147	//   "httpMethod": "GET",
31148	//   "id": "compute.globalForwardingRules.list",
31149	//   "parameterOrder": [
31150	//     "project"
31151	//   ],
31152	//   "parameters": {
31153	//     "filter": {
31154	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
31155	//       "location": "query",
31156	//       "type": "string"
31157	//     },
31158	//     "maxResults": {
31159	//       "default": "500",
31160	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
31161	//       "format": "uint32",
31162	//       "location": "query",
31163	//       "minimum": "0",
31164	//       "type": "integer"
31165	//     },
31166	//     "orderBy": {
31167	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
31168	//       "location": "query",
31169	//       "type": "string"
31170	//     },
31171	//     "pageToken": {
31172	//       "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.",
31173	//       "location": "query",
31174	//       "type": "string"
31175	//     },
31176	//     "project": {
31177	//       "description": "Project ID for this request.",
31178	//       "location": "path",
31179	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31180	//       "required": true,
31181	//       "type": "string"
31182	//     }
31183	//   },
31184	//   "path": "{project}/global/forwardingRules",
31185	//   "response": {
31186	//     "$ref": "ForwardingRuleList"
31187	//   },
31188	//   "scopes": [
31189	//     "https://www.googleapis.com/auth/cloud-platform",
31190	//     "https://www.googleapis.com/auth/compute",
31191	//     "https://www.googleapis.com/auth/compute.readonly"
31192	//   ]
31193	// }
31194
31195}
31196
31197// Pages invokes f for each page of results.
31198// A non-nil error returned from f will halt the iteration.
31199// The provided context supersedes any context provided to the Context method.
31200func (c *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error {
31201	c.ctx_ = ctx
31202	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31203	for {
31204		x, err := c.Do()
31205		if err != nil {
31206			return err
31207		}
31208		if err := f(x); err != nil {
31209			return err
31210		}
31211		if x.NextPageToken == "" {
31212			return nil
31213		}
31214		c.PageToken(x.NextPageToken)
31215	}
31216}
31217
31218// method id "compute.globalForwardingRules.setLabels":
31219
31220type GlobalForwardingRulesSetLabelsCall struct {
31221	s                      *Service
31222	project                string
31223	resource               string
31224	globalsetlabelsrequest *GlobalSetLabelsRequest
31225	urlParams_             gensupport.URLParams
31226	ctx_                   context.Context
31227	header_                http.Header
31228}
31229
31230// SetLabels: Sets the labels on the specified resource. To learn more
31231// about labels, read the Labeling Resources documentation.
31232func (r *GlobalForwardingRulesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *GlobalForwardingRulesSetLabelsCall {
31233	c := &GlobalForwardingRulesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31234	c.project = project
31235	c.resource = resource
31236	c.globalsetlabelsrequest = globalsetlabelsrequest
31237	return c
31238}
31239
31240// Fields allows partial responses to be retrieved. See
31241// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31242// for more information.
31243func (c *GlobalForwardingRulesSetLabelsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetLabelsCall {
31244	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31245	return c
31246}
31247
31248// Context sets the context to be used in this call's Do method. Any
31249// pending HTTP request will be aborted if the provided context is
31250// canceled.
31251func (c *GlobalForwardingRulesSetLabelsCall) Context(ctx context.Context) *GlobalForwardingRulesSetLabelsCall {
31252	c.ctx_ = ctx
31253	return c
31254}
31255
31256// Header returns an http.Header that can be modified by the caller to
31257// add HTTP headers to the request.
31258func (c *GlobalForwardingRulesSetLabelsCall) Header() http.Header {
31259	if c.header_ == nil {
31260		c.header_ = make(http.Header)
31261	}
31262	return c.header_
31263}
31264
31265func (c *GlobalForwardingRulesSetLabelsCall) doRequest(alt string) (*http.Response, error) {
31266	reqHeaders := make(http.Header)
31267	for k, v := range c.header_ {
31268		reqHeaders[k] = v
31269	}
31270	reqHeaders.Set("User-Agent", c.s.userAgent())
31271	var body io.Reader = nil
31272	body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest)
31273	if err != nil {
31274		return nil, err
31275	}
31276	reqHeaders.Set("Content-Type", "application/json")
31277	c.urlParams_.Set("alt", alt)
31278	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{resource}/setLabels")
31279	urls += "?" + c.urlParams_.Encode()
31280	req, _ := http.NewRequest("POST", urls, body)
31281	req.Header = reqHeaders
31282	googleapi.Expand(req.URL, map[string]string{
31283		"project":  c.project,
31284		"resource": c.resource,
31285	})
31286	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31287}
31288
31289// Do executes the "compute.globalForwardingRules.setLabels" call.
31290// Exactly one of *Operation or error will be non-nil. Any non-2xx
31291// status code is an error. Response headers are in either
31292// *Operation.ServerResponse.Header or (if a response was returned at
31293// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31294// to check whether the returned error was because
31295// http.StatusNotModified was returned.
31296func (c *GlobalForwardingRulesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
31297	gensupport.SetOptions(c.urlParams_, opts...)
31298	res, err := c.doRequest("json")
31299	if res != nil && res.StatusCode == http.StatusNotModified {
31300		if res.Body != nil {
31301			res.Body.Close()
31302		}
31303		return nil, &googleapi.Error{
31304			Code:   res.StatusCode,
31305			Header: res.Header,
31306		}
31307	}
31308	if err != nil {
31309		return nil, err
31310	}
31311	defer googleapi.CloseBody(res)
31312	if err := googleapi.CheckResponse(res); err != nil {
31313		return nil, err
31314	}
31315	ret := &Operation{
31316		ServerResponse: googleapi.ServerResponse{
31317			Header:         res.Header,
31318			HTTPStatusCode: res.StatusCode,
31319		},
31320	}
31321	target := &ret
31322	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
31323		return nil, err
31324	}
31325	return ret, nil
31326	// {
31327	//   "description": "Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.",
31328	//   "httpMethod": "POST",
31329	//   "id": "compute.globalForwardingRules.setLabels",
31330	//   "parameterOrder": [
31331	//     "project",
31332	//     "resource"
31333	//   ],
31334	//   "parameters": {
31335	//     "project": {
31336	//       "description": "Project ID for this request.",
31337	//       "location": "path",
31338	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31339	//       "required": true,
31340	//       "type": "string"
31341	//     },
31342	//     "resource": {
31343	//       "description": "Name of the resource for this request.",
31344	//       "location": "path",
31345	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
31346	//       "required": true,
31347	//       "type": "string"
31348	//     }
31349	//   },
31350	//   "path": "{project}/global/forwardingRules/{resource}/setLabels",
31351	//   "request": {
31352	//     "$ref": "GlobalSetLabelsRequest"
31353	//   },
31354	//   "response": {
31355	//     "$ref": "Operation"
31356	//   },
31357	//   "scopes": [
31358	//     "https://www.googleapis.com/auth/cloud-platform",
31359	//     "https://www.googleapis.com/auth/compute"
31360	//   ]
31361	// }
31362
31363}
31364
31365// method id "compute.globalForwardingRules.setTarget":
31366
31367type GlobalForwardingRulesSetTargetCall struct {
31368	s               *Service
31369	project         string
31370	forwardingRule  string
31371	targetreference *TargetReference
31372	urlParams_      gensupport.URLParams
31373	ctx_            context.Context
31374	header_         http.Header
31375}
31376
31377// SetTarget: Changes target URL for the GlobalForwardingRule resource.
31378// The new target should be of the same type as the old target.
31379// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/setTarget
31380func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall {
31381	c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31382	c.project = project
31383	c.forwardingRule = forwardingRule
31384	c.targetreference = targetreference
31385	return c
31386}
31387
31388// RequestId sets the optional parameter "requestId": An optional
31389// request ID to identify requests. Specify a unique request ID so that
31390// if you must retry your request, the server will know to ignore the
31391// request if it has already been completed.
31392//
31393// For example, consider a situation where you make an initial request
31394// and the request times out. If you make the request again with the
31395// same request ID, the server can check if original operation with the
31396// same request ID was received, and if so, will ignore the second
31397// request. This prevents clients from accidentally creating duplicate
31398// commitments.
31399//
31400// The request ID must be a valid UUID with the exception that zero UUID
31401// is not supported (00000000-0000-0000-0000-000000000000).
31402func (c *GlobalForwardingRulesSetTargetCall) RequestId(requestId string) *GlobalForwardingRulesSetTargetCall {
31403	c.urlParams_.Set("requestId", requestId)
31404	return c
31405}
31406
31407// Fields allows partial responses to be retrieved. See
31408// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31409// for more information.
31410func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall {
31411	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31412	return c
31413}
31414
31415// Context sets the context to be used in this call's Do method. Any
31416// pending HTTP request will be aborted if the provided context is
31417// canceled.
31418func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall {
31419	c.ctx_ = ctx
31420	return c
31421}
31422
31423// Header returns an http.Header that can be modified by the caller to
31424// add HTTP headers to the request.
31425func (c *GlobalForwardingRulesSetTargetCall) Header() http.Header {
31426	if c.header_ == nil {
31427		c.header_ = make(http.Header)
31428	}
31429	return c.header_
31430}
31431
31432func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
31433	reqHeaders := make(http.Header)
31434	for k, v := range c.header_ {
31435		reqHeaders[k] = v
31436	}
31437	reqHeaders.Set("User-Agent", c.s.userAgent())
31438	var body io.Reader = nil
31439	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
31440	if err != nil {
31441		return nil, err
31442	}
31443	reqHeaders.Set("Content-Type", "application/json")
31444	c.urlParams_.Set("alt", alt)
31445	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget")
31446	urls += "?" + c.urlParams_.Encode()
31447	req, _ := http.NewRequest("POST", urls, body)
31448	req.Header = reqHeaders
31449	googleapi.Expand(req.URL, map[string]string{
31450		"project":        c.project,
31451		"forwardingRule": c.forwardingRule,
31452	})
31453	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31454}
31455
31456// Do executes the "compute.globalForwardingRules.setTarget" call.
31457// Exactly one of *Operation or error will be non-nil. Any non-2xx
31458// status code is an error. Response headers are in either
31459// *Operation.ServerResponse.Header or (if a response was returned at
31460// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31461// to check whether the returned error was because
31462// http.StatusNotModified was returned.
31463func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
31464	gensupport.SetOptions(c.urlParams_, opts...)
31465	res, err := c.doRequest("json")
31466	if res != nil && res.StatusCode == http.StatusNotModified {
31467		if res.Body != nil {
31468			res.Body.Close()
31469		}
31470		return nil, &googleapi.Error{
31471			Code:   res.StatusCode,
31472			Header: res.Header,
31473		}
31474	}
31475	if err != nil {
31476		return nil, err
31477	}
31478	defer googleapi.CloseBody(res)
31479	if err := googleapi.CheckResponse(res); err != nil {
31480		return nil, err
31481	}
31482	ret := &Operation{
31483		ServerResponse: googleapi.ServerResponse{
31484			Header:         res.Header,
31485			HTTPStatusCode: res.StatusCode,
31486		},
31487	}
31488	target := &ret
31489	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
31490		return nil, err
31491	}
31492	return ret, nil
31493	// {
31494	//   "description": "Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.",
31495	//   "httpMethod": "POST",
31496	//   "id": "compute.globalForwardingRules.setTarget",
31497	//   "parameterOrder": [
31498	//     "project",
31499	//     "forwardingRule"
31500	//   ],
31501	//   "parameters": {
31502	//     "forwardingRule": {
31503	//       "description": "Name of the ForwardingRule resource in which target is to be set.",
31504	//       "location": "path",
31505	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31506	//       "required": true,
31507	//       "type": "string"
31508	//     },
31509	//     "project": {
31510	//       "description": "Project ID for this request.",
31511	//       "location": "path",
31512	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31513	//       "required": true,
31514	//       "type": "string"
31515	//     },
31516	//     "requestId": {
31517	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
31518	//       "location": "query",
31519	//       "type": "string"
31520	//     }
31521	//   },
31522	//   "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget",
31523	//   "request": {
31524	//     "$ref": "TargetReference"
31525	//   },
31526	//   "response": {
31527	//     "$ref": "Operation"
31528	//   },
31529	//   "scopes": [
31530	//     "https://www.googleapis.com/auth/cloud-platform",
31531	//     "https://www.googleapis.com/auth/compute"
31532	//   ]
31533	// }
31534
31535}
31536
31537// method id "compute.globalForwardingRules.testIamPermissions":
31538
31539type GlobalForwardingRulesTestIamPermissionsCall struct {
31540	s                      *Service
31541	project                string
31542	resource               string
31543	testpermissionsrequest *TestPermissionsRequest
31544	urlParams_             gensupport.URLParams
31545	ctx_                   context.Context
31546	header_                http.Header
31547}
31548
31549// TestIamPermissions: Returns permissions that a caller has on the
31550// specified resource.
31551func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall {
31552	c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31553	c.project = project
31554	c.resource = resource
31555	c.testpermissionsrequest = testpermissionsrequest
31556	return c
31557}
31558
31559// Fields allows partial responses to be retrieved. See
31560// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31561// for more information.
31562func (c *GlobalForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesTestIamPermissionsCall {
31563	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31564	return c
31565}
31566
31567// Context sets the context to be used in this call's Do method. Any
31568// pending HTTP request will be aborted if the provided context is
31569// canceled.
31570func (c *GlobalForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *GlobalForwardingRulesTestIamPermissionsCall {
31571	c.ctx_ = ctx
31572	return c
31573}
31574
31575// Header returns an http.Header that can be modified by the caller to
31576// add HTTP headers to the request.
31577func (c *GlobalForwardingRulesTestIamPermissionsCall) Header() http.Header {
31578	if c.header_ == nil {
31579		c.header_ = make(http.Header)
31580	}
31581	return c.header_
31582}
31583
31584func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
31585	reqHeaders := make(http.Header)
31586	for k, v := range c.header_ {
31587		reqHeaders[k] = v
31588	}
31589	reqHeaders.Set("User-Agent", c.s.userAgent())
31590	var body io.Reader = nil
31591	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
31592	if err != nil {
31593		return nil, err
31594	}
31595	reqHeaders.Set("Content-Type", "application/json")
31596	c.urlParams_.Set("alt", alt)
31597	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{resource}/testIamPermissions")
31598	urls += "?" + c.urlParams_.Encode()
31599	req, _ := http.NewRequest("POST", urls, body)
31600	req.Header = reqHeaders
31601	googleapi.Expand(req.URL, map[string]string{
31602		"project":  c.project,
31603		"resource": c.resource,
31604	})
31605	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31606}
31607
31608// Do executes the "compute.globalForwardingRules.testIamPermissions" call.
31609// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
31610// non-2xx status code is an error. Response headers are in either
31611// *TestPermissionsResponse.ServerResponse.Header or (if a response was
31612// returned at all) in error.(*googleapi.Error).Header. Use
31613// googleapi.IsNotModified to check whether the returned error was
31614// because http.StatusNotModified was returned.
31615func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
31616	gensupport.SetOptions(c.urlParams_, opts...)
31617	res, err := c.doRequest("json")
31618	if res != nil && res.StatusCode == http.StatusNotModified {
31619		if res.Body != nil {
31620			res.Body.Close()
31621		}
31622		return nil, &googleapi.Error{
31623			Code:   res.StatusCode,
31624			Header: res.Header,
31625		}
31626	}
31627	if err != nil {
31628		return nil, err
31629	}
31630	defer googleapi.CloseBody(res)
31631	if err := googleapi.CheckResponse(res); err != nil {
31632		return nil, err
31633	}
31634	ret := &TestPermissionsResponse{
31635		ServerResponse: googleapi.ServerResponse{
31636			Header:         res.Header,
31637			HTTPStatusCode: res.StatusCode,
31638		},
31639	}
31640	target := &ret
31641	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
31642		return nil, err
31643	}
31644	return ret, nil
31645	// {
31646	//   "description": "Returns permissions that a caller has on the specified resource.",
31647	//   "httpMethod": "POST",
31648	//   "id": "compute.globalForwardingRules.testIamPermissions",
31649	//   "parameterOrder": [
31650	//     "project",
31651	//     "resource"
31652	//   ],
31653	//   "parameters": {
31654	//     "project": {
31655	//       "description": "Project ID for this request.",
31656	//       "location": "path",
31657	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31658	//       "required": true,
31659	//       "type": "string"
31660	//     },
31661	//     "resource": {
31662	//       "description": "Name of the resource for this request.",
31663	//       "location": "path",
31664	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
31665	//       "required": true,
31666	//       "type": "string"
31667	//     }
31668	//   },
31669	//   "path": "{project}/global/forwardingRules/{resource}/testIamPermissions",
31670	//   "request": {
31671	//     "$ref": "TestPermissionsRequest"
31672	//   },
31673	//   "response": {
31674	//     "$ref": "TestPermissionsResponse"
31675	//   },
31676	//   "scopes": [
31677	//     "https://www.googleapis.com/auth/cloud-platform",
31678	//     "https://www.googleapis.com/auth/compute",
31679	//     "https://www.googleapis.com/auth/compute.readonly"
31680	//   ]
31681	// }
31682
31683}
31684
31685// method id "compute.globalOperations.aggregatedList":
31686
31687type GlobalOperationsAggregatedListCall struct {
31688	s            *Service
31689	project      string
31690	urlParams_   gensupport.URLParams
31691	ifNoneMatch_ string
31692	ctx_         context.Context
31693	header_      http.Header
31694}
31695
31696// AggregatedList: Retrieves an aggregated list of all operations.
31697// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList
31698func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall {
31699	c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31700	c.project = project
31701	return c
31702}
31703
31704// Filter sets the optional parameter "filter": Sets a filter
31705// {expression} for filtering listed resources. Your {expression} must
31706// be in the format: field_name comparison_string literal_string.
31707//
31708// The field_name is the name of the field you want to compare. Only
31709// atomic field types are supported (string, number, boolean). The
31710// comparison_string must be either eq (equals) or ne (not equals). The
31711// literal_string is the string value to filter to. The literal value
31712// must be valid for the type of field you are filtering by (string,
31713// number, boolean). For string fields, the literal value is interpreted
31714// as a regular expression using RE2 syntax. The literal value must
31715// match the entire field.
31716//
31717// For example, to filter for instances that do not have a name of
31718// example-instance, you would use name ne example-instance.
31719//
31720// You can filter on nested fields. For example, you could filter on
31721// instances that have set the scheduling.automaticRestart field to
31722// true. Use filtering on nested fields to take advantage of labels to
31723// organize and search for results based on label values.
31724//
31725// To filter on multiple expressions, provide each separate expression
31726// within parentheses. For example, (scheduling.automaticRestart eq
31727// true) (zone eq us-central1-f). Multiple expressions are treated as
31728// AND expressions, meaning that resources must match all expressions to
31729// pass the filters.
31730func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall {
31731	c.urlParams_.Set("filter", filter)
31732	return c
31733}
31734
31735// MaxResults sets the optional parameter "maxResults": The maximum
31736// number of results per page that should be returned. If the number of
31737// available results is larger than maxResults, Compute Engine returns a
31738// nextPageToken that can be used to get the next page of results in
31739// subsequent list requests. Acceptable values are 0 to 500, inclusive.
31740// (Default: 500)
31741func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall {
31742	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31743	return c
31744}
31745
31746// OrderBy sets the optional parameter "orderBy": Sorts list results by
31747// a certain order. By default, results are returned in alphanumerical
31748// order based on the resource name.
31749//
31750// You can also sort results in descending order based on the creation
31751// timestamp using orderBy="creationTimestamp desc". This sorts results
31752// based on the creationTimestamp field in reverse chronological order
31753// (newest result first). Use this to sort resources like operations so
31754// that the newest operation is returned first.
31755//
31756// Currently, only sorting by name or creationTimestamp desc is
31757// supported.
31758func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOperationsAggregatedListCall {
31759	c.urlParams_.Set("orderBy", orderBy)
31760	return c
31761}
31762
31763// PageToken sets the optional parameter "pageToken": Specifies a page
31764// token to use. Set pageToken to the nextPageToken returned by a
31765// previous list request to get the next page of results.
31766func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall {
31767	c.urlParams_.Set("pageToken", pageToken)
31768	return c
31769}
31770
31771// Fields allows partial responses to be retrieved. See
31772// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31773// for more information.
31774func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall {
31775	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31776	return c
31777}
31778
31779// IfNoneMatch sets the optional parameter which makes the operation
31780// fail if the object's ETag matches the given value. This is useful for
31781// getting updates only after the object has changed since the last
31782// request. Use googleapi.IsNotModified to check whether the response
31783// error from Do is the result of In-None-Match.
31784func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall {
31785	c.ifNoneMatch_ = entityTag
31786	return c
31787}
31788
31789// Context sets the context to be used in this call's Do method. Any
31790// pending HTTP request will be aborted if the provided context is
31791// canceled.
31792func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall {
31793	c.ctx_ = ctx
31794	return c
31795}
31796
31797// Header returns an http.Header that can be modified by the caller to
31798// add HTTP headers to the request.
31799func (c *GlobalOperationsAggregatedListCall) Header() http.Header {
31800	if c.header_ == nil {
31801		c.header_ = make(http.Header)
31802	}
31803	return c.header_
31804}
31805
31806func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
31807	reqHeaders := make(http.Header)
31808	for k, v := range c.header_ {
31809		reqHeaders[k] = v
31810	}
31811	reqHeaders.Set("User-Agent", c.s.userAgent())
31812	if c.ifNoneMatch_ != "" {
31813		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
31814	}
31815	var body io.Reader = nil
31816	c.urlParams_.Set("alt", alt)
31817	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/operations")
31818	urls += "?" + c.urlParams_.Encode()
31819	req, _ := http.NewRequest("GET", urls, body)
31820	req.Header = reqHeaders
31821	googleapi.Expand(req.URL, map[string]string{
31822		"project": c.project,
31823	})
31824	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31825}
31826
31827// Do executes the "compute.globalOperations.aggregatedList" call.
31828// Exactly one of *OperationAggregatedList or error will be non-nil. Any
31829// non-2xx status code is an error. Response headers are in either
31830// *OperationAggregatedList.ServerResponse.Header or (if a response was
31831// returned at all) in error.(*googleapi.Error).Header. Use
31832// googleapi.IsNotModified to check whether the returned error was
31833// because http.StatusNotModified was returned.
31834func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, error) {
31835	gensupport.SetOptions(c.urlParams_, opts...)
31836	res, err := c.doRequest("json")
31837	if res != nil && res.StatusCode == http.StatusNotModified {
31838		if res.Body != nil {
31839			res.Body.Close()
31840		}
31841		return nil, &googleapi.Error{
31842			Code:   res.StatusCode,
31843			Header: res.Header,
31844		}
31845	}
31846	if err != nil {
31847		return nil, err
31848	}
31849	defer googleapi.CloseBody(res)
31850	if err := googleapi.CheckResponse(res); err != nil {
31851		return nil, err
31852	}
31853	ret := &OperationAggregatedList{
31854		ServerResponse: googleapi.ServerResponse{
31855			Header:         res.Header,
31856			HTTPStatusCode: res.StatusCode,
31857		},
31858	}
31859	target := &ret
31860	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
31861		return nil, err
31862	}
31863	return ret, nil
31864	// {
31865	//   "description": "Retrieves an aggregated list of all operations.",
31866	//   "httpMethod": "GET",
31867	//   "id": "compute.globalOperations.aggregatedList",
31868	//   "parameterOrder": [
31869	//     "project"
31870	//   ],
31871	//   "parameters": {
31872	//     "filter": {
31873	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
31874	//       "location": "query",
31875	//       "type": "string"
31876	//     },
31877	//     "maxResults": {
31878	//       "default": "500",
31879	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
31880	//       "format": "uint32",
31881	//       "location": "query",
31882	//       "minimum": "0",
31883	//       "type": "integer"
31884	//     },
31885	//     "orderBy": {
31886	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
31887	//       "location": "query",
31888	//       "type": "string"
31889	//     },
31890	//     "pageToken": {
31891	//       "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.",
31892	//       "location": "query",
31893	//       "type": "string"
31894	//     },
31895	//     "project": {
31896	//       "description": "Project ID for this request.",
31897	//       "location": "path",
31898	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31899	//       "required": true,
31900	//       "type": "string"
31901	//     }
31902	//   },
31903	//   "path": "{project}/aggregated/operations",
31904	//   "response": {
31905	//     "$ref": "OperationAggregatedList"
31906	//   },
31907	//   "scopes": [
31908	//     "https://www.googleapis.com/auth/cloud-platform",
31909	//     "https://www.googleapis.com/auth/compute",
31910	//     "https://www.googleapis.com/auth/compute.readonly"
31911	//   ]
31912	// }
31913
31914}
31915
31916// Pages invokes f for each page of results.
31917// A non-nil error returned from f will halt the iteration.
31918// The provided context supersedes any context provided to the Context method.
31919func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error {
31920	c.ctx_ = ctx
31921	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31922	for {
31923		x, err := c.Do()
31924		if err != nil {
31925			return err
31926		}
31927		if err := f(x); err != nil {
31928			return err
31929		}
31930		if x.NextPageToken == "" {
31931			return nil
31932		}
31933		c.PageToken(x.NextPageToken)
31934	}
31935}
31936
31937// method id "compute.globalOperations.delete":
31938
31939type GlobalOperationsDeleteCall struct {
31940	s          *Service
31941	project    string
31942	operation  string
31943	urlParams_ gensupport.URLParams
31944	ctx_       context.Context
31945	header_    http.Header
31946}
31947
31948// Delete: Deletes the specified Operations resource.
31949// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/delete
31950func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall {
31951	c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31952	c.project = project
31953	c.operation = operation
31954	return c
31955}
31956
31957// Fields allows partial responses to be retrieved. See
31958// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31959// for more information.
31960func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall {
31961	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31962	return c
31963}
31964
31965// Context sets the context to be used in this call's Do method. Any
31966// pending HTTP request will be aborted if the provided context is
31967// canceled.
31968func (c *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall {
31969	c.ctx_ = ctx
31970	return c
31971}
31972
31973// Header returns an http.Header that can be modified by the caller to
31974// add HTTP headers to the request.
31975func (c *GlobalOperationsDeleteCall) Header() http.Header {
31976	if c.header_ == nil {
31977		c.header_ = make(http.Header)
31978	}
31979	return c.header_
31980}
31981
31982func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
31983	reqHeaders := make(http.Header)
31984	for k, v := range c.header_ {
31985		reqHeaders[k] = v
31986	}
31987	reqHeaders.Set("User-Agent", c.s.userAgent())
31988	var body io.Reader = nil
31989	c.urlParams_.Set("alt", alt)
31990	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
31991	urls += "?" + c.urlParams_.Encode()
31992	req, _ := http.NewRequest("DELETE", urls, body)
31993	req.Header = reqHeaders
31994	googleapi.Expand(req.URL, map[string]string{
31995		"project":   c.project,
31996		"operation": c.operation,
31997	})
31998	return gensupport.SendRequest(c.ctx_, c.s.client, req)
31999}
32000
32001// Do executes the "compute.globalOperations.delete" call.
32002func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
32003	gensupport.SetOptions(c.urlParams_, opts...)
32004	res, err := c.doRequest("json")
32005	if err != nil {
32006		return err
32007	}
32008	defer googleapi.CloseBody(res)
32009	if err := googleapi.CheckResponse(res); err != nil {
32010		return err
32011	}
32012	return nil
32013	// {
32014	//   "description": "Deletes the specified Operations resource.",
32015	//   "httpMethod": "DELETE",
32016	//   "id": "compute.globalOperations.delete",
32017	//   "parameterOrder": [
32018	//     "project",
32019	//     "operation"
32020	//   ],
32021	//   "parameters": {
32022	//     "operation": {
32023	//       "description": "Name of the Operations resource to delete.",
32024	//       "location": "path",
32025	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32026	//       "required": true,
32027	//       "type": "string"
32028	//     },
32029	//     "project": {
32030	//       "description": "Project ID for this request.",
32031	//       "location": "path",
32032	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32033	//       "required": true,
32034	//       "type": "string"
32035	//     }
32036	//   },
32037	//   "path": "{project}/global/operations/{operation}",
32038	//   "scopes": [
32039	//     "https://www.googleapis.com/auth/cloud-platform",
32040	//     "https://www.googleapis.com/auth/compute"
32041	//   ]
32042	// }
32043
32044}
32045
32046// method id "compute.globalOperations.get":
32047
32048type GlobalOperationsGetCall struct {
32049	s            *Service
32050	project      string
32051	operation    string
32052	urlParams_   gensupport.URLParams
32053	ifNoneMatch_ string
32054	ctx_         context.Context
32055	header_      http.Header
32056}
32057
32058// Get: Retrieves the specified Operations resource. Get a list of
32059// operations by making a list() request.
32060// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get
32061func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall {
32062	c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32063	c.project = project
32064	c.operation = operation
32065	return c
32066}
32067
32068// Fields allows partial responses to be retrieved. See
32069// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32070// for more information.
32071func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall {
32072	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32073	return c
32074}
32075
32076// IfNoneMatch sets the optional parameter which makes the operation
32077// fail if the object's ETag matches the given value. This is useful for
32078// getting updates only after the object has changed since the last
32079// request. Use googleapi.IsNotModified to check whether the response
32080// error from Do is the result of In-None-Match.
32081func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall {
32082	c.ifNoneMatch_ = entityTag
32083	return c
32084}
32085
32086// Context sets the context to be used in this call's Do method. Any
32087// pending HTTP request will be aborted if the provided context is
32088// canceled.
32089func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall {
32090	c.ctx_ = ctx
32091	return c
32092}
32093
32094// Header returns an http.Header that can be modified by the caller to
32095// add HTTP headers to the request.
32096func (c *GlobalOperationsGetCall) Header() http.Header {
32097	if c.header_ == nil {
32098		c.header_ = make(http.Header)
32099	}
32100	return c.header_
32101}
32102
32103func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) {
32104	reqHeaders := make(http.Header)
32105	for k, v := range c.header_ {
32106		reqHeaders[k] = v
32107	}
32108	reqHeaders.Set("User-Agent", c.s.userAgent())
32109	if c.ifNoneMatch_ != "" {
32110		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32111	}
32112	var body io.Reader = nil
32113	c.urlParams_.Set("alt", alt)
32114	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
32115	urls += "?" + c.urlParams_.Encode()
32116	req, _ := http.NewRequest("GET", urls, body)
32117	req.Header = reqHeaders
32118	googleapi.Expand(req.URL, map[string]string{
32119		"project":   c.project,
32120		"operation": c.operation,
32121	})
32122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32123}
32124
32125// Do executes the "compute.globalOperations.get" call.
32126// Exactly one of *Operation or error will be non-nil. Any non-2xx
32127// status code is an error. Response headers are in either
32128// *Operation.ServerResponse.Header or (if a response was returned at
32129// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32130// to check whether the returned error was because
32131// http.StatusNotModified was returned.
32132func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
32133	gensupport.SetOptions(c.urlParams_, opts...)
32134	res, err := c.doRequest("json")
32135	if res != nil && res.StatusCode == http.StatusNotModified {
32136		if res.Body != nil {
32137			res.Body.Close()
32138		}
32139		return nil, &googleapi.Error{
32140			Code:   res.StatusCode,
32141			Header: res.Header,
32142		}
32143	}
32144	if err != nil {
32145		return nil, err
32146	}
32147	defer googleapi.CloseBody(res)
32148	if err := googleapi.CheckResponse(res); err != nil {
32149		return nil, err
32150	}
32151	ret := &Operation{
32152		ServerResponse: googleapi.ServerResponse{
32153			Header:         res.Header,
32154			HTTPStatusCode: res.StatusCode,
32155		},
32156	}
32157	target := &ret
32158	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
32159		return nil, err
32160	}
32161	return ret, nil
32162	// {
32163	//   "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.",
32164	//   "httpMethod": "GET",
32165	//   "id": "compute.globalOperations.get",
32166	//   "parameterOrder": [
32167	//     "project",
32168	//     "operation"
32169	//   ],
32170	//   "parameters": {
32171	//     "operation": {
32172	//       "description": "Name of the Operations resource to return.",
32173	//       "location": "path",
32174	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32175	//       "required": true,
32176	//       "type": "string"
32177	//     },
32178	//     "project": {
32179	//       "description": "Project ID for this request.",
32180	//       "location": "path",
32181	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32182	//       "required": true,
32183	//       "type": "string"
32184	//     }
32185	//   },
32186	//   "path": "{project}/global/operations/{operation}",
32187	//   "response": {
32188	//     "$ref": "Operation"
32189	//   },
32190	//   "scopes": [
32191	//     "https://www.googleapis.com/auth/cloud-platform",
32192	//     "https://www.googleapis.com/auth/compute",
32193	//     "https://www.googleapis.com/auth/compute.readonly"
32194	//   ]
32195	// }
32196
32197}
32198
32199// method id "compute.globalOperations.list":
32200
32201type GlobalOperationsListCall struct {
32202	s            *Service
32203	project      string
32204	urlParams_   gensupport.URLParams
32205	ifNoneMatch_ string
32206	ctx_         context.Context
32207	header_      http.Header
32208}
32209
32210// List: Retrieves a list of Operation resources contained within the
32211// specified project.
32212// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list
32213func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall {
32214	c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32215	c.project = project
32216	return c
32217}
32218
32219// Filter sets the optional parameter "filter": Sets a filter
32220// {expression} for filtering listed resources. Your {expression} must
32221// be in the format: field_name comparison_string literal_string.
32222//
32223// The field_name is the name of the field you want to compare. Only
32224// atomic field types are supported (string, number, boolean). The
32225// comparison_string must be either eq (equals) or ne (not equals). The
32226// literal_string is the string value to filter to. The literal value
32227// must be valid for the type of field you are filtering by (string,
32228// number, boolean). For string fields, the literal value is interpreted
32229// as a regular expression using RE2 syntax. The literal value must
32230// match the entire field.
32231//
32232// For example, to filter for instances that do not have a name of
32233// example-instance, you would use name ne example-instance.
32234//
32235// You can filter on nested fields. For example, you could filter on
32236// instances that have set the scheduling.automaticRestart field to
32237// true. Use filtering on nested fields to take advantage of labels to
32238// organize and search for results based on label values.
32239//
32240// To filter on multiple expressions, provide each separate expression
32241// within parentheses. For example, (scheduling.automaticRestart eq
32242// true) (zone eq us-central1-f). Multiple expressions are treated as
32243// AND expressions, meaning that resources must match all expressions to
32244// pass the filters.
32245func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall {
32246	c.urlParams_.Set("filter", filter)
32247	return c
32248}
32249
32250// MaxResults sets the optional parameter "maxResults": The maximum
32251// number of results per page that should be returned. If the number of
32252// available results is larger than maxResults, Compute Engine returns a
32253// nextPageToken that can be used to get the next page of results in
32254// subsequent list requests. Acceptable values are 0 to 500, inclusive.
32255// (Default: 500)
32256func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall {
32257	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32258	return c
32259}
32260
32261// OrderBy sets the optional parameter "orderBy": Sorts list results by
32262// a certain order. By default, results are returned in alphanumerical
32263// order based on the resource name.
32264//
32265// You can also sort results in descending order based on the creation
32266// timestamp using orderBy="creationTimestamp desc". This sorts results
32267// based on the creationTimestamp field in reverse chronological order
32268// (newest result first). Use this to sort resources like operations so
32269// that the newest operation is returned first.
32270//
32271// Currently, only sorting by name or creationTimestamp desc is
32272// supported.
32273func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsListCall {
32274	c.urlParams_.Set("orderBy", orderBy)
32275	return c
32276}
32277
32278// PageToken sets the optional parameter "pageToken": Specifies a page
32279// token to use. Set pageToken to the nextPageToken returned by a
32280// previous list request to get the next page of results.
32281func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall {
32282	c.urlParams_.Set("pageToken", pageToken)
32283	return c
32284}
32285
32286// Fields allows partial responses to be retrieved. See
32287// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32288// for more information.
32289func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall {
32290	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32291	return c
32292}
32293
32294// IfNoneMatch sets the optional parameter which makes the operation
32295// fail if the object's ETag matches the given value. This is useful for
32296// getting updates only after the object has changed since the last
32297// request. Use googleapi.IsNotModified to check whether the response
32298// error from Do is the result of In-None-Match.
32299func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall {
32300	c.ifNoneMatch_ = entityTag
32301	return c
32302}
32303
32304// Context sets the context to be used in this call's Do method. Any
32305// pending HTTP request will be aborted if the provided context is
32306// canceled.
32307func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall {
32308	c.ctx_ = ctx
32309	return c
32310}
32311
32312// Header returns an http.Header that can be modified by the caller to
32313// add HTTP headers to the request.
32314func (c *GlobalOperationsListCall) Header() http.Header {
32315	if c.header_ == nil {
32316		c.header_ = make(http.Header)
32317	}
32318	return c.header_
32319}
32320
32321func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) {
32322	reqHeaders := make(http.Header)
32323	for k, v := range c.header_ {
32324		reqHeaders[k] = v
32325	}
32326	reqHeaders.Set("User-Agent", c.s.userAgent())
32327	if c.ifNoneMatch_ != "" {
32328		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32329	}
32330	var body io.Reader = nil
32331	c.urlParams_.Set("alt", alt)
32332	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations")
32333	urls += "?" + c.urlParams_.Encode()
32334	req, _ := http.NewRequest("GET", urls, body)
32335	req.Header = reqHeaders
32336	googleapi.Expand(req.URL, map[string]string{
32337		"project": c.project,
32338	})
32339	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32340}
32341
32342// Do executes the "compute.globalOperations.list" call.
32343// Exactly one of *OperationList or error will be non-nil. Any non-2xx
32344// status code is an error. Response headers are in either
32345// *OperationList.ServerResponse.Header or (if a response was returned
32346// at all) in error.(*googleapi.Error).Header. Use
32347// googleapi.IsNotModified to check whether the returned error was
32348// because http.StatusNotModified was returned.
32349func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) {
32350	gensupport.SetOptions(c.urlParams_, opts...)
32351	res, err := c.doRequest("json")
32352	if res != nil && res.StatusCode == http.StatusNotModified {
32353		if res.Body != nil {
32354			res.Body.Close()
32355		}
32356		return nil, &googleapi.Error{
32357			Code:   res.StatusCode,
32358			Header: res.Header,
32359		}
32360	}
32361	if err != nil {
32362		return nil, err
32363	}
32364	defer googleapi.CloseBody(res)
32365	if err := googleapi.CheckResponse(res); err != nil {
32366		return nil, err
32367	}
32368	ret := &OperationList{
32369		ServerResponse: googleapi.ServerResponse{
32370			Header:         res.Header,
32371			HTTPStatusCode: res.StatusCode,
32372		},
32373	}
32374	target := &ret
32375	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
32376		return nil, err
32377	}
32378	return ret, nil
32379	// {
32380	//   "description": "Retrieves a list of Operation resources contained within the specified project.",
32381	//   "httpMethod": "GET",
32382	//   "id": "compute.globalOperations.list",
32383	//   "parameterOrder": [
32384	//     "project"
32385	//   ],
32386	//   "parameters": {
32387	//     "filter": {
32388	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
32389	//       "location": "query",
32390	//       "type": "string"
32391	//     },
32392	//     "maxResults": {
32393	//       "default": "500",
32394	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
32395	//       "format": "uint32",
32396	//       "location": "query",
32397	//       "minimum": "0",
32398	//       "type": "integer"
32399	//     },
32400	//     "orderBy": {
32401	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
32402	//       "location": "query",
32403	//       "type": "string"
32404	//     },
32405	//     "pageToken": {
32406	//       "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.",
32407	//       "location": "query",
32408	//       "type": "string"
32409	//     },
32410	//     "project": {
32411	//       "description": "Project ID for this request.",
32412	//       "location": "path",
32413	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32414	//       "required": true,
32415	//       "type": "string"
32416	//     }
32417	//   },
32418	//   "path": "{project}/global/operations",
32419	//   "response": {
32420	//     "$ref": "OperationList"
32421	//   },
32422	//   "scopes": [
32423	//     "https://www.googleapis.com/auth/cloud-platform",
32424	//     "https://www.googleapis.com/auth/compute",
32425	//     "https://www.googleapis.com/auth/compute.readonly"
32426	//   ]
32427	// }
32428
32429}
32430
32431// Pages invokes f for each page of results.
32432// A non-nil error returned from f will halt the iteration.
32433// The provided context supersedes any context provided to the Context method.
32434func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error {
32435	c.ctx_ = ctx
32436	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32437	for {
32438		x, err := c.Do()
32439		if err != nil {
32440			return err
32441		}
32442		if err := f(x); err != nil {
32443			return err
32444		}
32445		if x.NextPageToken == "" {
32446			return nil
32447		}
32448		c.PageToken(x.NextPageToken)
32449	}
32450}
32451
32452// method id "compute.healthChecks.delete":
32453
32454type HealthChecksDeleteCall struct {
32455	s           *Service
32456	project     string
32457	healthCheck string
32458	urlParams_  gensupport.URLParams
32459	ctx_        context.Context
32460	header_     http.Header
32461}
32462
32463// Delete: Deletes the specified HealthCheck resource.
32464func (r *HealthChecksService) Delete(project string, healthCheck string) *HealthChecksDeleteCall {
32465	c := &HealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32466	c.project = project
32467	c.healthCheck = healthCheck
32468	return c
32469}
32470
32471// RequestId sets the optional parameter "requestId": An optional
32472// request ID to identify requests. Specify a unique request ID so that
32473// if you must retry your request, the server will know to ignore the
32474// request if it has already been completed.
32475//
32476// For example, consider a situation where you make an initial request
32477// and the request times out. If you make the request again with the
32478// same request ID, the server can check if original operation with the
32479// same request ID was received, and if so, will ignore the second
32480// request. This prevents clients from accidentally creating duplicate
32481// commitments.
32482//
32483// The request ID must be a valid UUID with the exception that zero UUID
32484// is not supported (00000000-0000-0000-0000-000000000000).
32485func (c *HealthChecksDeleteCall) RequestId(requestId string) *HealthChecksDeleteCall {
32486	c.urlParams_.Set("requestId", requestId)
32487	return c
32488}
32489
32490// Fields allows partial responses to be retrieved. See
32491// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32492// for more information.
32493func (c *HealthChecksDeleteCall) Fields(s ...googleapi.Field) *HealthChecksDeleteCall {
32494	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32495	return c
32496}
32497
32498// Context sets the context to be used in this call's Do method. Any
32499// pending HTTP request will be aborted if the provided context is
32500// canceled.
32501func (c *HealthChecksDeleteCall) Context(ctx context.Context) *HealthChecksDeleteCall {
32502	c.ctx_ = ctx
32503	return c
32504}
32505
32506// Header returns an http.Header that can be modified by the caller to
32507// add HTTP headers to the request.
32508func (c *HealthChecksDeleteCall) Header() http.Header {
32509	if c.header_ == nil {
32510		c.header_ = make(http.Header)
32511	}
32512	return c.header_
32513}
32514
32515func (c *HealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
32516	reqHeaders := make(http.Header)
32517	for k, v := range c.header_ {
32518		reqHeaders[k] = v
32519	}
32520	reqHeaders.Set("User-Agent", c.s.userAgent())
32521	var body io.Reader = nil
32522	c.urlParams_.Set("alt", alt)
32523	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}")
32524	urls += "?" + c.urlParams_.Encode()
32525	req, _ := http.NewRequest("DELETE", urls, body)
32526	req.Header = reqHeaders
32527	googleapi.Expand(req.URL, map[string]string{
32528		"project":     c.project,
32529		"healthCheck": c.healthCheck,
32530	})
32531	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32532}
32533
32534// Do executes the "compute.healthChecks.delete" call.
32535// Exactly one of *Operation or error will be non-nil. Any non-2xx
32536// status code is an error. Response headers are in either
32537// *Operation.ServerResponse.Header or (if a response was returned at
32538// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32539// to check whether the returned error was because
32540// http.StatusNotModified was returned.
32541func (c *HealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
32542	gensupport.SetOptions(c.urlParams_, opts...)
32543	res, err := c.doRequest("json")
32544	if res != nil && res.StatusCode == http.StatusNotModified {
32545		if res.Body != nil {
32546			res.Body.Close()
32547		}
32548		return nil, &googleapi.Error{
32549			Code:   res.StatusCode,
32550			Header: res.Header,
32551		}
32552	}
32553	if err != nil {
32554		return nil, err
32555	}
32556	defer googleapi.CloseBody(res)
32557	if err := googleapi.CheckResponse(res); err != nil {
32558		return nil, err
32559	}
32560	ret := &Operation{
32561		ServerResponse: googleapi.ServerResponse{
32562			Header:         res.Header,
32563			HTTPStatusCode: res.StatusCode,
32564		},
32565	}
32566	target := &ret
32567	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
32568		return nil, err
32569	}
32570	return ret, nil
32571	// {
32572	//   "description": "Deletes the specified HealthCheck resource.",
32573	//   "httpMethod": "DELETE",
32574	//   "id": "compute.healthChecks.delete",
32575	//   "parameterOrder": [
32576	//     "project",
32577	//     "healthCheck"
32578	//   ],
32579	//   "parameters": {
32580	//     "healthCheck": {
32581	//       "description": "Name of the HealthCheck resource to delete.",
32582	//       "location": "path",
32583	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32584	//       "required": true,
32585	//       "type": "string"
32586	//     },
32587	//     "project": {
32588	//       "description": "Project ID for this request.",
32589	//       "location": "path",
32590	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32591	//       "required": true,
32592	//       "type": "string"
32593	//     },
32594	//     "requestId": {
32595	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
32596	//       "location": "query",
32597	//       "type": "string"
32598	//     }
32599	//   },
32600	//   "path": "{project}/global/healthChecks/{healthCheck}",
32601	//   "response": {
32602	//     "$ref": "Operation"
32603	//   },
32604	//   "scopes": [
32605	//     "https://www.googleapis.com/auth/cloud-platform",
32606	//     "https://www.googleapis.com/auth/compute"
32607	//   ]
32608	// }
32609
32610}
32611
32612// method id "compute.healthChecks.get":
32613
32614type HealthChecksGetCall struct {
32615	s            *Service
32616	project      string
32617	healthCheck  string
32618	urlParams_   gensupport.URLParams
32619	ifNoneMatch_ string
32620	ctx_         context.Context
32621	header_      http.Header
32622}
32623
32624// Get: Returns the specified HealthCheck resource. Get a list of
32625// available health checks by making a list() request.
32626func (r *HealthChecksService) Get(project string, healthCheck string) *HealthChecksGetCall {
32627	c := &HealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32628	c.project = project
32629	c.healthCheck = healthCheck
32630	return c
32631}
32632
32633// Fields allows partial responses to be retrieved. See
32634// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32635// for more information.
32636func (c *HealthChecksGetCall) Fields(s ...googleapi.Field) *HealthChecksGetCall {
32637	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32638	return c
32639}
32640
32641// IfNoneMatch sets the optional parameter which makes the operation
32642// fail if the object's ETag matches the given value. This is useful for
32643// getting updates only after the object has changed since the last
32644// request. Use googleapi.IsNotModified to check whether the response
32645// error from Do is the result of In-None-Match.
32646func (c *HealthChecksGetCall) IfNoneMatch(entityTag string) *HealthChecksGetCall {
32647	c.ifNoneMatch_ = entityTag
32648	return c
32649}
32650
32651// Context sets the context to be used in this call's Do method. Any
32652// pending HTTP request will be aborted if the provided context is
32653// canceled.
32654func (c *HealthChecksGetCall) Context(ctx context.Context) *HealthChecksGetCall {
32655	c.ctx_ = ctx
32656	return c
32657}
32658
32659// Header returns an http.Header that can be modified by the caller to
32660// add HTTP headers to the request.
32661func (c *HealthChecksGetCall) Header() http.Header {
32662	if c.header_ == nil {
32663		c.header_ = make(http.Header)
32664	}
32665	return c.header_
32666}
32667
32668func (c *HealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
32669	reqHeaders := make(http.Header)
32670	for k, v := range c.header_ {
32671		reqHeaders[k] = v
32672	}
32673	reqHeaders.Set("User-Agent", c.s.userAgent())
32674	if c.ifNoneMatch_ != "" {
32675		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
32676	}
32677	var body io.Reader = nil
32678	c.urlParams_.Set("alt", alt)
32679	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}")
32680	urls += "?" + c.urlParams_.Encode()
32681	req, _ := http.NewRequest("GET", urls, body)
32682	req.Header = reqHeaders
32683	googleapi.Expand(req.URL, map[string]string{
32684		"project":     c.project,
32685		"healthCheck": c.healthCheck,
32686	})
32687	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32688}
32689
32690// Do executes the "compute.healthChecks.get" call.
32691// Exactly one of *HealthCheck or error will be non-nil. Any non-2xx
32692// status code is an error. Response headers are in either
32693// *HealthCheck.ServerResponse.Header or (if a response was returned at
32694// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32695// to check whether the returned error was because
32696// http.StatusNotModified was returned.
32697func (c *HealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) {
32698	gensupport.SetOptions(c.urlParams_, opts...)
32699	res, err := c.doRequest("json")
32700	if res != nil && res.StatusCode == http.StatusNotModified {
32701		if res.Body != nil {
32702			res.Body.Close()
32703		}
32704		return nil, &googleapi.Error{
32705			Code:   res.StatusCode,
32706			Header: res.Header,
32707		}
32708	}
32709	if err != nil {
32710		return nil, err
32711	}
32712	defer googleapi.CloseBody(res)
32713	if err := googleapi.CheckResponse(res); err != nil {
32714		return nil, err
32715	}
32716	ret := &HealthCheck{
32717		ServerResponse: googleapi.ServerResponse{
32718			Header:         res.Header,
32719			HTTPStatusCode: res.StatusCode,
32720		},
32721	}
32722	target := &ret
32723	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
32724		return nil, err
32725	}
32726	return ret, nil
32727	// {
32728	//   "description": "Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request.",
32729	//   "httpMethod": "GET",
32730	//   "id": "compute.healthChecks.get",
32731	//   "parameterOrder": [
32732	//     "project",
32733	//     "healthCheck"
32734	//   ],
32735	//   "parameters": {
32736	//     "healthCheck": {
32737	//       "description": "Name of the HealthCheck resource to return.",
32738	//       "location": "path",
32739	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32740	//       "required": true,
32741	//       "type": "string"
32742	//     },
32743	//     "project": {
32744	//       "description": "Project ID for this request.",
32745	//       "location": "path",
32746	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32747	//       "required": true,
32748	//       "type": "string"
32749	//     }
32750	//   },
32751	//   "path": "{project}/global/healthChecks/{healthCheck}",
32752	//   "response": {
32753	//     "$ref": "HealthCheck"
32754	//   },
32755	//   "scopes": [
32756	//     "https://www.googleapis.com/auth/cloud-platform",
32757	//     "https://www.googleapis.com/auth/compute",
32758	//     "https://www.googleapis.com/auth/compute.readonly"
32759	//   ]
32760	// }
32761
32762}
32763
32764// method id "compute.healthChecks.insert":
32765
32766type HealthChecksInsertCall struct {
32767	s           *Service
32768	project     string
32769	healthcheck *HealthCheck
32770	urlParams_  gensupport.URLParams
32771	ctx_        context.Context
32772	header_     http.Header
32773}
32774
32775// Insert: Creates a HealthCheck resource in the specified project using
32776// the data included in the request.
32777func (r *HealthChecksService) Insert(project string, healthcheck *HealthCheck) *HealthChecksInsertCall {
32778	c := &HealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32779	c.project = project
32780	c.healthcheck = healthcheck
32781	return c
32782}
32783
32784// RequestId sets the optional parameter "requestId": An optional
32785// request ID to identify requests. Specify a unique request ID so that
32786// if you must retry your request, the server will know to ignore the
32787// request if it has already been completed.
32788//
32789// For example, consider a situation where you make an initial request
32790// and the request times out. If you make the request again with the
32791// same request ID, the server can check if original operation with the
32792// same request ID was received, and if so, will ignore the second
32793// request. This prevents clients from accidentally creating duplicate
32794// commitments.
32795//
32796// The request ID must be a valid UUID with the exception that zero UUID
32797// is not supported (00000000-0000-0000-0000-000000000000).
32798func (c *HealthChecksInsertCall) RequestId(requestId string) *HealthChecksInsertCall {
32799	c.urlParams_.Set("requestId", requestId)
32800	return c
32801}
32802
32803// Fields allows partial responses to be retrieved. See
32804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32805// for more information.
32806func (c *HealthChecksInsertCall) Fields(s ...googleapi.Field) *HealthChecksInsertCall {
32807	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32808	return c
32809}
32810
32811// Context sets the context to be used in this call's Do method. Any
32812// pending HTTP request will be aborted if the provided context is
32813// canceled.
32814func (c *HealthChecksInsertCall) Context(ctx context.Context) *HealthChecksInsertCall {
32815	c.ctx_ = ctx
32816	return c
32817}
32818
32819// Header returns an http.Header that can be modified by the caller to
32820// add HTTP headers to the request.
32821func (c *HealthChecksInsertCall) Header() http.Header {
32822	if c.header_ == nil {
32823		c.header_ = make(http.Header)
32824	}
32825	return c.header_
32826}
32827
32828func (c *HealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
32829	reqHeaders := make(http.Header)
32830	for k, v := range c.header_ {
32831		reqHeaders[k] = v
32832	}
32833	reqHeaders.Set("User-Agent", c.s.userAgent())
32834	var body io.Reader = nil
32835	body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck)
32836	if err != nil {
32837		return nil, err
32838	}
32839	reqHeaders.Set("Content-Type", "application/json")
32840	c.urlParams_.Set("alt", alt)
32841	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks")
32842	urls += "?" + c.urlParams_.Encode()
32843	req, _ := http.NewRequest("POST", urls, body)
32844	req.Header = reqHeaders
32845	googleapi.Expand(req.URL, map[string]string{
32846		"project": c.project,
32847	})
32848	return gensupport.SendRequest(c.ctx_, c.s.client, req)
32849}
32850
32851// Do executes the "compute.healthChecks.insert" call.
32852// Exactly one of *Operation or error will be non-nil. Any non-2xx
32853// status code is an error. Response headers are in either
32854// *Operation.ServerResponse.Header or (if a response was returned at
32855// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32856// to check whether the returned error was because
32857// http.StatusNotModified was returned.
32858func (c *HealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
32859	gensupport.SetOptions(c.urlParams_, opts...)
32860	res, err := c.doRequest("json")
32861	if res != nil && res.StatusCode == http.StatusNotModified {
32862		if res.Body != nil {
32863			res.Body.Close()
32864		}
32865		return nil, &googleapi.Error{
32866			Code:   res.StatusCode,
32867			Header: res.Header,
32868		}
32869	}
32870	if err != nil {
32871		return nil, err
32872	}
32873	defer googleapi.CloseBody(res)
32874	if err := googleapi.CheckResponse(res); err != nil {
32875		return nil, err
32876	}
32877	ret := &Operation{
32878		ServerResponse: googleapi.ServerResponse{
32879			Header:         res.Header,
32880			HTTPStatusCode: res.StatusCode,
32881		},
32882	}
32883	target := &ret
32884	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
32885		return nil, err
32886	}
32887	return ret, nil
32888	// {
32889	//   "description": "Creates a HealthCheck resource in the specified project using the data included in the request.",
32890	//   "httpMethod": "POST",
32891	//   "id": "compute.healthChecks.insert",
32892	//   "parameterOrder": [
32893	//     "project"
32894	//   ],
32895	//   "parameters": {
32896	//     "project": {
32897	//       "description": "Project ID for this request.",
32898	//       "location": "path",
32899	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32900	//       "required": true,
32901	//       "type": "string"
32902	//     },
32903	//     "requestId": {
32904	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
32905	//       "location": "query",
32906	//       "type": "string"
32907	//     }
32908	//   },
32909	//   "path": "{project}/global/healthChecks",
32910	//   "request": {
32911	//     "$ref": "HealthCheck"
32912	//   },
32913	//   "response": {
32914	//     "$ref": "Operation"
32915	//   },
32916	//   "scopes": [
32917	//     "https://www.googleapis.com/auth/cloud-platform",
32918	//     "https://www.googleapis.com/auth/compute"
32919	//   ]
32920	// }
32921
32922}
32923
32924// method id "compute.healthChecks.list":
32925
32926type HealthChecksListCall struct {
32927	s            *Service
32928	project      string
32929	urlParams_   gensupport.URLParams
32930	ifNoneMatch_ string
32931	ctx_         context.Context
32932	header_      http.Header
32933}
32934
32935// List: Retrieves the list of HealthCheck resources available to the
32936// specified project.
32937func (r *HealthChecksService) List(project string) *HealthChecksListCall {
32938	c := &HealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32939	c.project = project
32940	return c
32941}
32942
32943// Filter sets the optional parameter "filter": Sets a filter
32944// {expression} for filtering listed resources. Your {expression} must
32945// be in the format: field_name comparison_string literal_string.
32946//
32947// The field_name is the name of the field you want to compare. Only
32948// atomic field types are supported (string, number, boolean). The
32949// comparison_string must be either eq (equals) or ne (not equals). The
32950// literal_string is the string value to filter to. The literal value
32951// must be valid for the type of field you are filtering by (string,
32952// number, boolean). For string fields, the literal value is interpreted
32953// as a regular expression using RE2 syntax. The literal value must
32954// match the entire field.
32955//
32956// For example, to filter for instances that do not have a name of
32957// example-instance, you would use name ne example-instance.
32958//
32959// You can filter on nested fields. For example, you could filter on
32960// instances that have set the scheduling.automaticRestart field to
32961// true. Use filtering on nested fields to take advantage of labels to
32962// organize and search for results based on label values.
32963//
32964// To filter on multiple expressions, provide each separate expression
32965// within parentheses. For example, (scheduling.automaticRestart eq
32966// true) (zone eq us-central1-f). Multiple expressions are treated as
32967// AND expressions, meaning that resources must match all expressions to
32968// pass the filters.
32969func (c *HealthChecksListCall) Filter(filter string) *HealthChecksListCall {
32970	c.urlParams_.Set("filter", filter)
32971	return c
32972}
32973
32974// MaxResults sets the optional parameter "maxResults": The maximum
32975// number of results per page that should be returned. If the number of
32976// available results is larger than maxResults, Compute Engine returns a
32977// nextPageToken that can be used to get the next page of results in
32978// subsequent list requests. Acceptable values are 0 to 500, inclusive.
32979// (Default: 500)
32980func (c *HealthChecksListCall) MaxResults(maxResults int64) *HealthChecksListCall {
32981	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32982	return c
32983}
32984
32985// OrderBy sets the optional parameter "orderBy": Sorts list results by
32986// a certain order. By default, results are returned in alphanumerical
32987// order based on the resource name.
32988//
32989// You can also sort results in descending order based on the creation
32990// timestamp using orderBy="creationTimestamp desc". This sorts results
32991// based on the creationTimestamp field in reverse chronological order
32992// (newest result first). Use this to sort resources like operations so
32993// that the newest operation is returned first.
32994//
32995// Currently, only sorting by name or creationTimestamp desc is
32996// supported.
32997func (c *HealthChecksListCall) OrderBy(orderBy string) *HealthChecksListCall {
32998	c.urlParams_.Set("orderBy", orderBy)
32999	return c
33000}
33001
33002// PageToken sets the optional parameter "pageToken": Specifies a page
33003// token to use. Set pageToken to the nextPageToken returned by a
33004// previous list request to get the next page of results.
33005func (c *HealthChecksListCall) PageToken(pageToken string) *HealthChecksListCall {
33006	c.urlParams_.Set("pageToken", pageToken)
33007	return c
33008}
33009
33010// Fields allows partial responses to be retrieved. See
33011// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33012// for more information.
33013func (c *HealthChecksListCall) Fields(s ...googleapi.Field) *HealthChecksListCall {
33014	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33015	return c
33016}
33017
33018// IfNoneMatch sets the optional parameter which makes the operation
33019// fail if the object's ETag matches the given value. This is useful for
33020// getting updates only after the object has changed since the last
33021// request. Use googleapi.IsNotModified to check whether the response
33022// error from Do is the result of In-None-Match.
33023func (c *HealthChecksListCall) IfNoneMatch(entityTag string) *HealthChecksListCall {
33024	c.ifNoneMatch_ = entityTag
33025	return c
33026}
33027
33028// Context sets the context to be used in this call's Do method. Any
33029// pending HTTP request will be aborted if the provided context is
33030// canceled.
33031func (c *HealthChecksListCall) Context(ctx context.Context) *HealthChecksListCall {
33032	c.ctx_ = ctx
33033	return c
33034}
33035
33036// Header returns an http.Header that can be modified by the caller to
33037// add HTTP headers to the request.
33038func (c *HealthChecksListCall) Header() http.Header {
33039	if c.header_ == nil {
33040		c.header_ = make(http.Header)
33041	}
33042	return c.header_
33043}
33044
33045func (c *HealthChecksListCall) doRequest(alt string) (*http.Response, error) {
33046	reqHeaders := make(http.Header)
33047	for k, v := range c.header_ {
33048		reqHeaders[k] = v
33049	}
33050	reqHeaders.Set("User-Agent", c.s.userAgent())
33051	if c.ifNoneMatch_ != "" {
33052		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33053	}
33054	var body io.Reader = nil
33055	c.urlParams_.Set("alt", alt)
33056	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks")
33057	urls += "?" + c.urlParams_.Encode()
33058	req, _ := http.NewRequest("GET", urls, body)
33059	req.Header = reqHeaders
33060	googleapi.Expand(req.URL, map[string]string{
33061		"project": c.project,
33062	})
33063	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33064}
33065
33066// Do executes the "compute.healthChecks.list" call.
33067// Exactly one of *HealthCheckList or error will be non-nil. Any non-2xx
33068// status code is an error. Response headers are in either
33069// *HealthCheckList.ServerResponse.Header or (if a response was returned
33070// at all) in error.(*googleapi.Error).Header. Use
33071// googleapi.IsNotModified to check whether the returned error was
33072// because http.StatusNotModified was returned.
33073func (c *HealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) {
33074	gensupport.SetOptions(c.urlParams_, opts...)
33075	res, err := c.doRequest("json")
33076	if res != nil && res.StatusCode == http.StatusNotModified {
33077		if res.Body != nil {
33078			res.Body.Close()
33079		}
33080		return nil, &googleapi.Error{
33081			Code:   res.StatusCode,
33082			Header: res.Header,
33083		}
33084	}
33085	if err != nil {
33086		return nil, err
33087	}
33088	defer googleapi.CloseBody(res)
33089	if err := googleapi.CheckResponse(res); err != nil {
33090		return nil, err
33091	}
33092	ret := &HealthCheckList{
33093		ServerResponse: googleapi.ServerResponse{
33094			Header:         res.Header,
33095			HTTPStatusCode: res.StatusCode,
33096		},
33097	}
33098	target := &ret
33099	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
33100		return nil, err
33101	}
33102	return ret, nil
33103	// {
33104	//   "description": "Retrieves the list of HealthCheck resources available to the specified project.",
33105	//   "httpMethod": "GET",
33106	//   "id": "compute.healthChecks.list",
33107	//   "parameterOrder": [
33108	//     "project"
33109	//   ],
33110	//   "parameters": {
33111	//     "filter": {
33112	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
33113	//       "location": "query",
33114	//       "type": "string"
33115	//     },
33116	//     "maxResults": {
33117	//       "default": "500",
33118	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
33119	//       "format": "uint32",
33120	//       "location": "query",
33121	//       "minimum": "0",
33122	//       "type": "integer"
33123	//     },
33124	//     "orderBy": {
33125	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
33126	//       "location": "query",
33127	//       "type": "string"
33128	//     },
33129	//     "pageToken": {
33130	//       "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.",
33131	//       "location": "query",
33132	//       "type": "string"
33133	//     },
33134	//     "project": {
33135	//       "description": "Project ID for this request.",
33136	//       "location": "path",
33137	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33138	//       "required": true,
33139	//       "type": "string"
33140	//     }
33141	//   },
33142	//   "path": "{project}/global/healthChecks",
33143	//   "response": {
33144	//     "$ref": "HealthCheckList"
33145	//   },
33146	//   "scopes": [
33147	//     "https://www.googleapis.com/auth/cloud-platform",
33148	//     "https://www.googleapis.com/auth/compute",
33149	//     "https://www.googleapis.com/auth/compute.readonly"
33150	//   ]
33151	// }
33152
33153}
33154
33155// Pages invokes f for each page of results.
33156// A non-nil error returned from f will halt the iteration.
33157// The provided context supersedes any context provided to the Context method.
33158func (c *HealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error {
33159	c.ctx_ = ctx
33160	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33161	for {
33162		x, err := c.Do()
33163		if err != nil {
33164			return err
33165		}
33166		if err := f(x); err != nil {
33167			return err
33168		}
33169		if x.NextPageToken == "" {
33170			return nil
33171		}
33172		c.PageToken(x.NextPageToken)
33173	}
33174}
33175
33176// method id "compute.healthChecks.patch":
33177
33178type HealthChecksPatchCall struct {
33179	s           *Service
33180	project     string
33181	healthCheck string
33182	healthcheck *HealthCheck
33183	urlParams_  gensupport.URLParams
33184	ctx_        context.Context
33185	header_     http.Header
33186}
33187
33188// Patch: Updates a HealthCheck resource in the specified project using
33189// the data included in the request. This method supports PATCH
33190// semantics and uses the JSON merge patch format and processing rules.
33191func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall {
33192	c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33193	c.project = project
33194	c.healthCheck = healthCheck
33195	c.healthcheck = healthcheck
33196	return c
33197}
33198
33199// RequestId sets the optional parameter "requestId": An optional
33200// request ID to identify requests. Specify a unique request ID so that
33201// if you must retry your request, the server will know to ignore the
33202// request if it has already been completed.
33203//
33204// For example, consider a situation where you make an initial request
33205// and the request times out. If you make the request again with the
33206// same request ID, the server can check if original operation with the
33207// same request ID was received, and if so, will ignore the second
33208// request. This prevents clients from accidentally creating duplicate
33209// commitments.
33210//
33211// The request ID must be a valid UUID with the exception that zero UUID
33212// is not supported (00000000-0000-0000-0000-000000000000).
33213func (c *HealthChecksPatchCall) RequestId(requestId string) *HealthChecksPatchCall {
33214	c.urlParams_.Set("requestId", requestId)
33215	return c
33216}
33217
33218// Fields allows partial responses to be retrieved. See
33219// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33220// for more information.
33221func (c *HealthChecksPatchCall) Fields(s ...googleapi.Field) *HealthChecksPatchCall {
33222	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33223	return c
33224}
33225
33226// Context sets the context to be used in this call's Do method. Any
33227// pending HTTP request will be aborted if the provided context is
33228// canceled.
33229func (c *HealthChecksPatchCall) Context(ctx context.Context) *HealthChecksPatchCall {
33230	c.ctx_ = ctx
33231	return c
33232}
33233
33234// Header returns an http.Header that can be modified by the caller to
33235// add HTTP headers to the request.
33236func (c *HealthChecksPatchCall) Header() http.Header {
33237	if c.header_ == nil {
33238		c.header_ = make(http.Header)
33239	}
33240	return c.header_
33241}
33242
33243func (c *HealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
33244	reqHeaders := make(http.Header)
33245	for k, v := range c.header_ {
33246		reqHeaders[k] = v
33247	}
33248	reqHeaders.Set("User-Agent", c.s.userAgent())
33249	var body io.Reader = nil
33250	body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck)
33251	if err != nil {
33252		return nil, err
33253	}
33254	reqHeaders.Set("Content-Type", "application/json")
33255	c.urlParams_.Set("alt", alt)
33256	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}")
33257	urls += "?" + c.urlParams_.Encode()
33258	req, _ := http.NewRequest("PATCH", urls, body)
33259	req.Header = reqHeaders
33260	googleapi.Expand(req.URL, map[string]string{
33261		"project":     c.project,
33262		"healthCheck": c.healthCheck,
33263	})
33264	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33265}
33266
33267// Do executes the "compute.healthChecks.patch" call.
33268// Exactly one of *Operation or error will be non-nil. Any non-2xx
33269// status code is an error. Response headers are in either
33270// *Operation.ServerResponse.Header or (if a response was returned at
33271// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33272// to check whether the returned error was because
33273// http.StatusNotModified was returned.
33274func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33275	gensupport.SetOptions(c.urlParams_, opts...)
33276	res, err := c.doRequest("json")
33277	if res != nil && res.StatusCode == http.StatusNotModified {
33278		if res.Body != nil {
33279			res.Body.Close()
33280		}
33281		return nil, &googleapi.Error{
33282			Code:   res.StatusCode,
33283			Header: res.Header,
33284		}
33285	}
33286	if err != nil {
33287		return nil, err
33288	}
33289	defer googleapi.CloseBody(res)
33290	if err := googleapi.CheckResponse(res); err != nil {
33291		return nil, err
33292	}
33293	ret := &Operation{
33294		ServerResponse: googleapi.ServerResponse{
33295			Header:         res.Header,
33296			HTTPStatusCode: res.StatusCode,
33297		},
33298	}
33299	target := &ret
33300	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
33301		return nil, err
33302	}
33303	return ret, nil
33304	// {
33305	//   "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
33306	//   "httpMethod": "PATCH",
33307	//   "id": "compute.healthChecks.patch",
33308	//   "parameterOrder": [
33309	//     "project",
33310	//     "healthCheck"
33311	//   ],
33312	//   "parameters": {
33313	//     "healthCheck": {
33314	//       "description": "Name of the HealthCheck resource to patch.",
33315	//       "location": "path",
33316	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33317	//       "required": true,
33318	//       "type": "string"
33319	//     },
33320	//     "project": {
33321	//       "description": "Project ID for this request.",
33322	//       "location": "path",
33323	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33324	//       "required": true,
33325	//       "type": "string"
33326	//     },
33327	//     "requestId": {
33328	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
33329	//       "location": "query",
33330	//       "type": "string"
33331	//     }
33332	//   },
33333	//   "path": "{project}/global/healthChecks/{healthCheck}",
33334	//   "request": {
33335	//     "$ref": "HealthCheck"
33336	//   },
33337	//   "response": {
33338	//     "$ref": "Operation"
33339	//   },
33340	//   "scopes": [
33341	//     "https://www.googleapis.com/auth/cloud-platform",
33342	//     "https://www.googleapis.com/auth/compute"
33343	//   ]
33344	// }
33345
33346}
33347
33348// method id "compute.healthChecks.testIamPermissions":
33349
33350type HealthChecksTestIamPermissionsCall struct {
33351	s                      *Service
33352	project                string
33353	resource               string
33354	testpermissionsrequest *TestPermissionsRequest
33355	urlParams_             gensupport.URLParams
33356	ctx_                   context.Context
33357	header_                http.Header
33358}
33359
33360// TestIamPermissions: Returns permissions that a caller has on the
33361// specified resource.
33362func (r *HealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HealthChecksTestIamPermissionsCall {
33363	c := &HealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33364	c.project = project
33365	c.resource = resource
33366	c.testpermissionsrequest = testpermissionsrequest
33367	return c
33368}
33369
33370// Fields allows partial responses to be retrieved. See
33371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33372// for more information.
33373func (c *HealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HealthChecksTestIamPermissionsCall {
33374	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33375	return c
33376}
33377
33378// Context sets the context to be used in this call's Do method. Any
33379// pending HTTP request will be aborted if the provided context is
33380// canceled.
33381func (c *HealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HealthChecksTestIamPermissionsCall {
33382	c.ctx_ = ctx
33383	return c
33384}
33385
33386// Header returns an http.Header that can be modified by the caller to
33387// add HTTP headers to the request.
33388func (c *HealthChecksTestIamPermissionsCall) Header() http.Header {
33389	if c.header_ == nil {
33390		c.header_ = make(http.Header)
33391	}
33392	return c.header_
33393}
33394
33395func (c *HealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
33396	reqHeaders := make(http.Header)
33397	for k, v := range c.header_ {
33398		reqHeaders[k] = v
33399	}
33400	reqHeaders.Set("User-Agent", c.s.userAgent())
33401	var body io.Reader = nil
33402	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
33403	if err != nil {
33404		return nil, err
33405	}
33406	reqHeaders.Set("Content-Type", "application/json")
33407	c.urlParams_.Set("alt", alt)
33408	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{resource}/testIamPermissions")
33409	urls += "?" + c.urlParams_.Encode()
33410	req, _ := http.NewRequest("POST", urls, body)
33411	req.Header = reqHeaders
33412	googleapi.Expand(req.URL, map[string]string{
33413		"project":  c.project,
33414		"resource": c.resource,
33415	})
33416	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33417}
33418
33419// Do executes the "compute.healthChecks.testIamPermissions" call.
33420// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
33421// non-2xx status code is an error. Response headers are in either
33422// *TestPermissionsResponse.ServerResponse.Header or (if a response was
33423// returned at all) in error.(*googleapi.Error).Header. Use
33424// googleapi.IsNotModified to check whether the returned error was
33425// because http.StatusNotModified was returned.
33426func (c *HealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
33427	gensupport.SetOptions(c.urlParams_, opts...)
33428	res, err := c.doRequest("json")
33429	if res != nil && res.StatusCode == http.StatusNotModified {
33430		if res.Body != nil {
33431			res.Body.Close()
33432		}
33433		return nil, &googleapi.Error{
33434			Code:   res.StatusCode,
33435			Header: res.Header,
33436		}
33437	}
33438	if err != nil {
33439		return nil, err
33440	}
33441	defer googleapi.CloseBody(res)
33442	if err := googleapi.CheckResponse(res); err != nil {
33443		return nil, err
33444	}
33445	ret := &TestPermissionsResponse{
33446		ServerResponse: googleapi.ServerResponse{
33447			Header:         res.Header,
33448			HTTPStatusCode: res.StatusCode,
33449		},
33450	}
33451	target := &ret
33452	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
33453		return nil, err
33454	}
33455	return ret, nil
33456	// {
33457	//   "description": "Returns permissions that a caller has on the specified resource.",
33458	//   "httpMethod": "POST",
33459	//   "id": "compute.healthChecks.testIamPermissions",
33460	//   "parameterOrder": [
33461	//     "project",
33462	//     "resource"
33463	//   ],
33464	//   "parameters": {
33465	//     "project": {
33466	//       "description": "Project ID for this request.",
33467	//       "location": "path",
33468	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33469	//       "required": true,
33470	//       "type": "string"
33471	//     },
33472	//     "resource": {
33473	//       "description": "Name of the resource for this request.",
33474	//       "location": "path",
33475	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
33476	//       "required": true,
33477	//       "type": "string"
33478	//     }
33479	//   },
33480	//   "path": "{project}/global/healthChecks/{resource}/testIamPermissions",
33481	//   "request": {
33482	//     "$ref": "TestPermissionsRequest"
33483	//   },
33484	//   "response": {
33485	//     "$ref": "TestPermissionsResponse"
33486	//   },
33487	//   "scopes": [
33488	//     "https://www.googleapis.com/auth/cloud-platform",
33489	//     "https://www.googleapis.com/auth/compute",
33490	//     "https://www.googleapis.com/auth/compute.readonly"
33491	//   ]
33492	// }
33493
33494}
33495
33496// method id "compute.healthChecks.update":
33497
33498type HealthChecksUpdateCall struct {
33499	s           *Service
33500	project     string
33501	healthCheck string
33502	healthcheck *HealthCheck
33503	urlParams_  gensupport.URLParams
33504	ctx_        context.Context
33505	header_     http.Header
33506}
33507
33508// Update: Updates a HealthCheck resource in the specified project using
33509// the data included in the request.
33510func (r *HealthChecksService) Update(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksUpdateCall {
33511	c := &HealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33512	c.project = project
33513	c.healthCheck = healthCheck
33514	c.healthcheck = healthcheck
33515	return c
33516}
33517
33518// RequestId sets the optional parameter "requestId": An optional
33519// request ID to identify requests. Specify a unique request ID so that
33520// if you must retry your request, the server will know to ignore the
33521// request if it has already been completed.
33522//
33523// For example, consider a situation where you make an initial request
33524// and the request times out. If you make the request again with the
33525// same request ID, the server can check if original operation with the
33526// same request ID was received, and if so, will ignore the second
33527// request. This prevents clients from accidentally creating duplicate
33528// commitments.
33529//
33530// The request ID must be a valid UUID with the exception that zero UUID
33531// is not supported (00000000-0000-0000-0000-000000000000).
33532func (c *HealthChecksUpdateCall) RequestId(requestId string) *HealthChecksUpdateCall {
33533	c.urlParams_.Set("requestId", requestId)
33534	return c
33535}
33536
33537// Fields allows partial responses to be retrieved. See
33538// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33539// for more information.
33540func (c *HealthChecksUpdateCall) Fields(s ...googleapi.Field) *HealthChecksUpdateCall {
33541	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *HealthChecksUpdateCall) Context(ctx context.Context) *HealthChecksUpdateCall {
33549	c.ctx_ = ctx
33550	return c
33551}
33552
33553// Header returns an http.Header that can be modified by the caller to
33554// add HTTP headers to the request.
33555func (c *HealthChecksUpdateCall) Header() http.Header {
33556	if c.header_ == nil {
33557		c.header_ = make(http.Header)
33558	}
33559	return c.header_
33560}
33561
33562func (c *HealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
33563	reqHeaders := make(http.Header)
33564	for k, v := range c.header_ {
33565		reqHeaders[k] = v
33566	}
33567	reqHeaders.Set("User-Agent", c.s.userAgent())
33568	var body io.Reader = nil
33569	body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck)
33570	if err != nil {
33571		return nil, err
33572	}
33573	reqHeaders.Set("Content-Type", "application/json")
33574	c.urlParams_.Set("alt", alt)
33575	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/healthChecks/{healthCheck}")
33576	urls += "?" + c.urlParams_.Encode()
33577	req, _ := http.NewRequest("PUT", urls, body)
33578	req.Header = reqHeaders
33579	googleapi.Expand(req.URL, map[string]string{
33580		"project":     c.project,
33581		"healthCheck": c.healthCheck,
33582	})
33583	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33584}
33585
33586// Do executes the "compute.healthChecks.update" call.
33587// Exactly one of *Operation or error will be non-nil. Any non-2xx
33588// status code is an error. Response headers are in either
33589// *Operation.ServerResponse.Header or (if a response was returned at
33590// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33591// to check whether the returned error was because
33592// http.StatusNotModified was returned.
33593func (c *HealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33594	gensupport.SetOptions(c.urlParams_, opts...)
33595	res, err := c.doRequest("json")
33596	if res != nil && res.StatusCode == http.StatusNotModified {
33597		if res.Body != nil {
33598			res.Body.Close()
33599		}
33600		return nil, &googleapi.Error{
33601			Code:   res.StatusCode,
33602			Header: res.Header,
33603		}
33604	}
33605	if err != nil {
33606		return nil, err
33607	}
33608	defer googleapi.CloseBody(res)
33609	if err := googleapi.CheckResponse(res); err != nil {
33610		return nil, err
33611	}
33612	ret := &Operation{
33613		ServerResponse: googleapi.ServerResponse{
33614			Header:         res.Header,
33615			HTTPStatusCode: res.StatusCode,
33616		},
33617	}
33618	target := &ret
33619	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
33620		return nil, err
33621	}
33622	return ret, nil
33623	// {
33624	//   "description": "Updates a HealthCheck resource in the specified project using the data included in the request.",
33625	//   "httpMethod": "PUT",
33626	//   "id": "compute.healthChecks.update",
33627	//   "parameterOrder": [
33628	//     "project",
33629	//     "healthCheck"
33630	//   ],
33631	//   "parameters": {
33632	//     "healthCheck": {
33633	//       "description": "Name of the HealthCheck resource to update.",
33634	//       "location": "path",
33635	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33636	//       "required": true,
33637	//       "type": "string"
33638	//     },
33639	//     "project": {
33640	//       "description": "Project ID for this request.",
33641	//       "location": "path",
33642	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33643	//       "required": true,
33644	//       "type": "string"
33645	//     },
33646	//     "requestId": {
33647	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
33648	//       "location": "query",
33649	//       "type": "string"
33650	//     }
33651	//   },
33652	//   "path": "{project}/global/healthChecks/{healthCheck}",
33653	//   "request": {
33654	//     "$ref": "HealthCheck"
33655	//   },
33656	//   "response": {
33657	//     "$ref": "Operation"
33658	//   },
33659	//   "scopes": [
33660	//     "https://www.googleapis.com/auth/cloud-platform",
33661	//     "https://www.googleapis.com/auth/compute"
33662	//   ]
33663	// }
33664
33665}
33666
33667// method id "compute.httpHealthChecks.delete":
33668
33669type HttpHealthChecksDeleteCall struct {
33670	s               *Service
33671	project         string
33672	httpHealthCheck string
33673	urlParams_      gensupport.URLParams
33674	ctx_            context.Context
33675	header_         http.Header
33676}
33677
33678// Delete: Deletes the specified HttpHealthCheck resource.
33679// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/delete
33680func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall {
33681	c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33682	c.project = project
33683	c.httpHealthCheck = httpHealthCheck
33684	return c
33685}
33686
33687// RequestId sets the optional parameter "requestId": An optional
33688// request ID to identify requests. Specify a unique request ID so that
33689// if you must retry your request, the server will know to ignore the
33690// request if it has already been completed.
33691//
33692// For example, consider a situation where you make an initial request
33693// and the request times out. If you make the request again with the
33694// same request ID, the server can check if original operation with the
33695// same request ID was received, and if so, will ignore the second
33696// request. This prevents clients from accidentally creating duplicate
33697// commitments.
33698//
33699// The request ID must be a valid UUID with the exception that zero UUID
33700// is not supported (00000000-0000-0000-0000-000000000000).
33701func (c *HttpHealthChecksDeleteCall) RequestId(requestId string) *HttpHealthChecksDeleteCall {
33702	c.urlParams_.Set("requestId", requestId)
33703	return c
33704}
33705
33706// Fields allows partial responses to be retrieved. See
33707// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33708// for more information.
33709func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall {
33710	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33711	return c
33712}
33713
33714// Context sets the context to be used in this call's Do method. Any
33715// pending HTTP request will be aborted if the provided context is
33716// canceled.
33717func (c *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall {
33718	c.ctx_ = ctx
33719	return c
33720}
33721
33722// Header returns an http.Header that can be modified by the caller to
33723// add HTTP headers to the request.
33724func (c *HttpHealthChecksDeleteCall) Header() http.Header {
33725	if c.header_ == nil {
33726		c.header_ = make(http.Header)
33727	}
33728	return c.header_
33729}
33730
33731func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
33732	reqHeaders := make(http.Header)
33733	for k, v := range c.header_ {
33734		reqHeaders[k] = v
33735	}
33736	reqHeaders.Set("User-Agent", c.s.userAgent())
33737	var body io.Reader = nil
33738	c.urlParams_.Set("alt", alt)
33739	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
33740	urls += "?" + c.urlParams_.Encode()
33741	req, _ := http.NewRequest("DELETE", urls, body)
33742	req.Header = reqHeaders
33743	googleapi.Expand(req.URL, map[string]string{
33744		"project":         c.project,
33745		"httpHealthCheck": c.httpHealthCheck,
33746	})
33747	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33748}
33749
33750// Do executes the "compute.httpHealthChecks.delete" call.
33751// Exactly one of *Operation or error will be non-nil. Any non-2xx
33752// status code is an error. Response headers are in either
33753// *Operation.ServerResponse.Header or (if a response was returned at
33754// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33755// to check whether the returned error was because
33756// http.StatusNotModified was returned.
33757func (c *HttpHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33758	gensupport.SetOptions(c.urlParams_, opts...)
33759	res, err := c.doRequest("json")
33760	if res != nil && res.StatusCode == http.StatusNotModified {
33761		if res.Body != nil {
33762			res.Body.Close()
33763		}
33764		return nil, &googleapi.Error{
33765			Code:   res.StatusCode,
33766			Header: res.Header,
33767		}
33768	}
33769	if err != nil {
33770		return nil, err
33771	}
33772	defer googleapi.CloseBody(res)
33773	if err := googleapi.CheckResponse(res); err != nil {
33774		return nil, err
33775	}
33776	ret := &Operation{
33777		ServerResponse: googleapi.ServerResponse{
33778			Header:         res.Header,
33779			HTTPStatusCode: res.StatusCode,
33780		},
33781	}
33782	target := &ret
33783	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
33784		return nil, err
33785	}
33786	return ret, nil
33787	// {
33788	//   "description": "Deletes the specified HttpHealthCheck resource.",
33789	//   "httpMethod": "DELETE",
33790	//   "id": "compute.httpHealthChecks.delete",
33791	//   "parameterOrder": [
33792	//     "project",
33793	//     "httpHealthCheck"
33794	//   ],
33795	//   "parameters": {
33796	//     "httpHealthCheck": {
33797	//       "description": "Name of the HttpHealthCheck resource to delete.",
33798	//       "location": "path",
33799	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33800	//       "required": true,
33801	//       "type": "string"
33802	//     },
33803	//     "project": {
33804	//       "description": "Project ID for this request.",
33805	//       "location": "path",
33806	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33807	//       "required": true,
33808	//       "type": "string"
33809	//     },
33810	//     "requestId": {
33811	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
33812	//       "location": "query",
33813	//       "type": "string"
33814	//     }
33815	//   },
33816	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
33817	//   "response": {
33818	//     "$ref": "Operation"
33819	//   },
33820	//   "scopes": [
33821	//     "https://www.googleapis.com/auth/cloud-platform",
33822	//     "https://www.googleapis.com/auth/compute"
33823	//   ]
33824	// }
33825
33826}
33827
33828// method id "compute.httpHealthChecks.get":
33829
33830type HttpHealthChecksGetCall struct {
33831	s               *Service
33832	project         string
33833	httpHealthCheck string
33834	urlParams_      gensupport.URLParams
33835	ifNoneMatch_    string
33836	ctx_            context.Context
33837	header_         http.Header
33838}
33839
33840// Get: Returns the specified HttpHealthCheck resource. Get a list of
33841// available HTTP health checks by making a list() request.
33842// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get
33843func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall {
33844	c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33845	c.project = project
33846	c.httpHealthCheck = httpHealthCheck
33847	return c
33848}
33849
33850// Fields allows partial responses to be retrieved. See
33851// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33852// for more information.
33853func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall {
33854	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33855	return c
33856}
33857
33858// IfNoneMatch sets the optional parameter which makes the operation
33859// fail if the object's ETag matches the given value. This is useful for
33860// getting updates only after the object has changed since the last
33861// request. Use googleapi.IsNotModified to check whether the response
33862// error from Do is the result of In-None-Match.
33863func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall {
33864	c.ifNoneMatch_ = entityTag
33865	return c
33866}
33867
33868// Context sets the context to be used in this call's Do method. Any
33869// pending HTTP request will be aborted if the provided context is
33870// canceled.
33871func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall {
33872	c.ctx_ = ctx
33873	return c
33874}
33875
33876// Header returns an http.Header that can be modified by the caller to
33877// add HTTP headers to the request.
33878func (c *HttpHealthChecksGetCall) Header() http.Header {
33879	if c.header_ == nil {
33880		c.header_ = make(http.Header)
33881	}
33882	return c.header_
33883}
33884
33885func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
33886	reqHeaders := make(http.Header)
33887	for k, v := range c.header_ {
33888		reqHeaders[k] = v
33889	}
33890	reqHeaders.Set("User-Agent", c.s.userAgent())
33891	if c.ifNoneMatch_ != "" {
33892		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
33893	}
33894	var body io.Reader = nil
33895	c.urlParams_.Set("alt", alt)
33896	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
33897	urls += "?" + c.urlParams_.Encode()
33898	req, _ := http.NewRequest("GET", urls, body)
33899	req.Header = reqHeaders
33900	googleapi.Expand(req.URL, map[string]string{
33901		"project":         c.project,
33902		"httpHealthCheck": c.httpHealthCheck,
33903	})
33904	return gensupport.SendRequest(c.ctx_, c.s.client, req)
33905}
33906
33907// Do executes the "compute.httpHealthChecks.get" call.
33908// Exactly one of *HttpHealthCheck or error will be non-nil. Any non-2xx
33909// status code is an error. Response headers are in either
33910// *HttpHealthCheck.ServerResponse.Header or (if a response was returned
33911// at all) in error.(*googleapi.Error).Header. Use
33912// googleapi.IsNotModified to check whether the returned error was
33913// because http.StatusNotModified was returned.
33914func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, error) {
33915	gensupport.SetOptions(c.urlParams_, opts...)
33916	res, err := c.doRequest("json")
33917	if res != nil && res.StatusCode == http.StatusNotModified {
33918		if res.Body != nil {
33919			res.Body.Close()
33920		}
33921		return nil, &googleapi.Error{
33922			Code:   res.StatusCode,
33923			Header: res.Header,
33924		}
33925	}
33926	if err != nil {
33927		return nil, err
33928	}
33929	defer googleapi.CloseBody(res)
33930	if err := googleapi.CheckResponse(res); err != nil {
33931		return nil, err
33932	}
33933	ret := &HttpHealthCheck{
33934		ServerResponse: googleapi.ServerResponse{
33935			Header:         res.Header,
33936			HTTPStatusCode: res.StatusCode,
33937		},
33938	}
33939	target := &ret
33940	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
33941		return nil, err
33942	}
33943	return ret, nil
33944	// {
33945	//   "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.",
33946	//   "httpMethod": "GET",
33947	//   "id": "compute.httpHealthChecks.get",
33948	//   "parameterOrder": [
33949	//     "project",
33950	//     "httpHealthCheck"
33951	//   ],
33952	//   "parameters": {
33953	//     "httpHealthCheck": {
33954	//       "description": "Name of the HttpHealthCheck resource to return.",
33955	//       "location": "path",
33956	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33957	//       "required": true,
33958	//       "type": "string"
33959	//     },
33960	//     "project": {
33961	//       "description": "Project ID for this request.",
33962	//       "location": "path",
33963	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33964	//       "required": true,
33965	//       "type": "string"
33966	//     }
33967	//   },
33968	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
33969	//   "response": {
33970	//     "$ref": "HttpHealthCheck"
33971	//   },
33972	//   "scopes": [
33973	//     "https://www.googleapis.com/auth/cloud-platform",
33974	//     "https://www.googleapis.com/auth/compute",
33975	//     "https://www.googleapis.com/auth/compute.readonly"
33976	//   ]
33977	// }
33978
33979}
33980
33981// method id "compute.httpHealthChecks.insert":
33982
33983type HttpHealthChecksInsertCall struct {
33984	s               *Service
33985	project         string
33986	httphealthcheck *HttpHealthCheck
33987	urlParams_      gensupport.URLParams
33988	ctx_            context.Context
33989	header_         http.Header
33990}
33991
33992// Insert: Creates a HttpHealthCheck resource in the specified project
33993// using the data included in the request.
33994// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/insert
33995func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall {
33996	c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33997	c.project = project
33998	c.httphealthcheck = httphealthcheck
33999	return c
34000}
34001
34002// RequestId sets the optional parameter "requestId": An optional
34003// request ID to identify requests. Specify a unique request ID so that
34004// if you must retry your request, the server will know to ignore the
34005// request if it has already been completed.
34006//
34007// For example, consider a situation where you make an initial request
34008// and the request times out. If you make the request again with the
34009// same request ID, the server can check if original operation with the
34010// same request ID was received, and if so, will ignore the second
34011// request. This prevents clients from accidentally creating duplicate
34012// commitments.
34013//
34014// The request ID must be a valid UUID with the exception that zero UUID
34015// is not supported (00000000-0000-0000-0000-000000000000).
34016func (c *HttpHealthChecksInsertCall) RequestId(requestId string) *HttpHealthChecksInsertCall {
34017	c.urlParams_.Set("requestId", requestId)
34018	return c
34019}
34020
34021// Fields allows partial responses to be retrieved. See
34022// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34023// for more information.
34024func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall {
34025	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34026	return c
34027}
34028
34029// Context sets the context to be used in this call's Do method. Any
34030// pending HTTP request will be aborted if the provided context is
34031// canceled.
34032func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall {
34033	c.ctx_ = ctx
34034	return c
34035}
34036
34037// Header returns an http.Header that can be modified by the caller to
34038// add HTTP headers to the request.
34039func (c *HttpHealthChecksInsertCall) Header() http.Header {
34040	if c.header_ == nil {
34041		c.header_ = make(http.Header)
34042	}
34043	return c.header_
34044}
34045
34046func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
34047	reqHeaders := make(http.Header)
34048	for k, v := range c.header_ {
34049		reqHeaders[k] = v
34050	}
34051	reqHeaders.Set("User-Agent", c.s.userAgent())
34052	var body io.Reader = nil
34053	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
34054	if err != nil {
34055		return nil, err
34056	}
34057	reqHeaders.Set("Content-Type", "application/json")
34058	c.urlParams_.Set("alt", alt)
34059	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks")
34060	urls += "?" + c.urlParams_.Encode()
34061	req, _ := http.NewRequest("POST", urls, body)
34062	req.Header = reqHeaders
34063	googleapi.Expand(req.URL, map[string]string{
34064		"project": c.project,
34065	})
34066	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34067}
34068
34069// Do executes the "compute.httpHealthChecks.insert" call.
34070// Exactly one of *Operation or error will be non-nil. Any non-2xx
34071// status code is an error. Response headers are in either
34072// *Operation.ServerResponse.Header or (if a response was returned at
34073// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34074// to check whether the returned error was because
34075// http.StatusNotModified was returned.
34076func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
34077	gensupport.SetOptions(c.urlParams_, opts...)
34078	res, err := c.doRequest("json")
34079	if res != nil && res.StatusCode == http.StatusNotModified {
34080		if res.Body != nil {
34081			res.Body.Close()
34082		}
34083		return nil, &googleapi.Error{
34084			Code:   res.StatusCode,
34085			Header: res.Header,
34086		}
34087	}
34088	if err != nil {
34089		return nil, err
34090	}
34091	defer googleapi.CloseBody(res)
34092	if err := googleapi.CheckResponse(res); err != nil {
34093		return nil, err
34094	}
34095	ret := &Operation{
34096		ServerResponse: googleapi.ServerResponse{
34097			Header:         res.Header,
34098			HTTPStatusCode: res.StatusCode,
34099		},
34100	}
34101	target := &ret
34102	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
34103		return nil, err
34104	}
34105	return ret, nil
34106	// {
34107	//   "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.",
34108	//   "httpMethod": "POST",
34109	//   "id": "compute.httpHealthChecks.insert",
34110	//   "parameterOrder": [
34111	//     "project"
34112	//   ],
34113	//   "parameters": {
34114	//     "project": {
34115	//       "description": "Project ID for this request.",
34116	//       "location": "path",
34117	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34118	//       "required": true,
34119	//       "type": "string"
34120	//     },
34121	//     "requestId": {
34122	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
34123	//       "location": "query",
34124	//       "type": "string"
34125	//     }
34126	//   },
34127	//   "path": "{project}/global/httpHealthChecks",
34128	//   "request": {
34129	//     "$ref": "HttpHealthCheck"
34130	//   },
34131	//   "response": {
34132	//     "$ref": "Operation"
34133	//   },
34134	//   "scopes": [
34135	//     "https://www.googleapis.com/auth/cloud-platform",
34136	//     "https://www.googleapis.com/auth/compute"
34137	//   ]
34138	// }
34139
34140}
34141
34142// method id "compute.httpHealthChecks.list":
34143
34144type HttpHealthChecksListCall struct {
34145	s            *Service
34146	project      string
34147	urlParams_   gensupport.URLParams
34148	ifNoneMatch_ string
34149	ctx_         context.Context
34150	header_      http.Header
34151}
34152
34153// List: Retrieves the list of HttpHealthCheck resources available to
34154// the specified project.
34155// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/list
34156func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall {
34157	c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34158	c.project = project
34159	return c
34160}
34161
34162// Filter sets the optional parameter "filter": Sets a filter
34163// {expression} for filtering listed resources. Your {expression} must
34164// be in the format: field_name comparison_string literal_string.
34165//
34166// The field_name is the name of the field you want to compare. Only
34167// atomic field types are supported (string, number, boolean). The
34168// comparison_string must be either eq (equals) or ne (not equals). The
34169// literal_string is the string value to filter to. The literal value
34170// must be valid for the type of field you are filtering by (string,
34171// number, boolean). For string fields, the literal value is interpreted
34172// as a regular expression using RE2 syntax. The literal value must
34173// match the entire field.
34174//
34175// For example, to filter for instances that do not have a name of
34176// example-instance, you would use name ne example-instance.
34177//
34178// You can filter on nested fields. For example, you could filter on
34179// instances that have set the scheduling.automaticRestart field to
34180// true. Use filtering on nested fields to take advantage of labels to
34181// organize and search for results based on label values.
34182//
34183// To filter on multiple expressions, provide each separate expression
34184// within parentheses. For example, (scheduling.automaticRestart eq
34185// true) (zone eq us-central1-f). Multiple expressions are treated as
34186// AND expressions, meaning that resources must match all expressions to
34187// pass the filters.
34188func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall {
34189	c.urlParams_.Set("filter", filter)
34190	return c
34191}
34192
34193// MaxResults sets the optional parameter "maxResults": The maximum
34194// number of results per page that should be returned. If the number of
34195// available results is larger than maxResults, Compute Engine returns a
34196// nextPageToken that can be used to get the next page of results in
34197// subsequent list requests. Acceptable values are 0 to 500, inclusive.
34198// (Default: 500)
34199func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall {
34200	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34201	return c
34202}
34203
34204// OrderBy sets the optional parameter "orderBy": Sorts list results by
34205// a certain order. By default, results are returned in alphanumerical
34206// order based on the resource name.
34207//
34208// You can also sort results in descending order based on the creation
34209// timestamp using orderBy="creationTimestamp desc". This sorts results
34210// based on the creationTimestamp field in reverse chronological order
34211// (newest result first). Use this to sort resources like operations so
34212// that the newest operation is returned first.
34213//
34214// Currently, only sorting by name or creationTimestamp desc is
34215// supported.
34216func (c *HttpHealthChecksListCall) OrderBy(orderBy string) *HttpHealthChecksListCall {
34217	c.urlParams_.Set("orderBy", orderBy)
34218	return c
34219}
34220
34221// PageToken sets the optional parameter "pageToken": Specifies a page
34222// token to use. Set pageToken to the nextPageToken returned by a
34223// previous list request to get the next page of results.
34224func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall {
34225	c.urlParams_.Set("pageToken", pageToken)
34226	return c
34227}
34228
34229// Fields allows partial responses to be retrieved. See
34230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34231// for more information.
34232func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall {
34233	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34234	return c
34235}
34236
34237// IfNoneMatch sets the optional parameter which makes the operation
34238// fail if the object's ETag matches the given value. This is useful for
34239// getting updates only after the object has changed since the last
34240// request. Use googleapi.IsNotModified to check whether the response
34241// error from Do is the result of In-None-Match.
34242func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall {
34243	c.ifNoneMatch_ = entityTag
34244	return c
34245}
34246
34247// Context sets the context to be used in this call's Do method. Any
34248// pending HTTP request will be aborted if the provided context is
34249// canceled.
34250func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall {
34251	c.ctx_ = ctx
34252	return c
34253}
34254
34255// Header returns an http.Header that can be modified by the caller to
34256// add HTTP headers to the request.
34257func (c *HttpHealthChecksListCall) Header() http.Header {
34258	if c.header_ == nil {
34259		c.header_ = make(http.Header)
34260	}
34261	return c.header_
34262}
34263
34264func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) {
34265	reqHeaders := make(http.Header)
34266	for k, v := range c.header_ {
34267		reqHeaders[k] = v
34268	}
34269	reqHeaders.Set("User-Agent", c.s.userAgent())
34270	if c.ifNoneMatch_ != "" {
34271		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
34272	}
34273	var body io.Reader = nil
34274	c.urlParams_.Set("alt", alt)
34275	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks")
34276	urls += "?" + c.urlParams_.Encode()
34277	req, _ := http.NewRequest("GET", urls, body)
34278	req.Header = reqHeaders
34279	googleapi.Expand(req.URL, map[string]string{
34280		"project": c.project,
34281	})
34282	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34283}
34284
34285// Do executes the "compute.httpHealthChecks.list" call.
34286// Exactly one of *HttpHealthCheckList or error will be non-nil. Any
34287// non-2xx status code is an error. Response headers are in either
34288// *HttpHealthCheckList.ServerResponse.Header or (if a response was
34289// returned at all) in error.(*googleapi.Error).Header. Use
34290// googleapi.IsNotModified to check whether the returned error was
34291// because http.StatusNotModified was returned.
34292func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, error) {
34293	gensupport.SetOptions(c.urlParams_, opts...)
34294	res, err := c.doRequest("json")
34295	if res != nil && res.StatusCode == http.StatusNotModified {
34296		if res.Body != nil {
34297			res.Body.Close()
34298		}
34299		return nil, &googleapi.Error{
34300			Code:   res.StatusCode,
34301			Header: res.Header,
34302		}
34303	}
34304	if err != nil {
34305		return nil, err
34306	}
34307	defer googleapi.CloseBody(res)
34308	if err := googleapi.CheckResponse(res); err != nil {
34309		return nil, err
34310	}
34311	ret := &HttpHealthCheckList{
34312		ServerResponse: googleapi.ServerResponse{
34313			Header:         res.Header,
34314			HTTPStatusCode: res.StatusCode,
34315		},
34316	}
34317	target := &ret
34318	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
34319		return nil, err
34320	}
34321	return ret, nil
34322	// {
34323	//   "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.",
34324	//   "httpMethod": "GET",
34325	//   "id": "compute.httpHealthChecks.list",
34326	//   "parameterOrder": [
34327	//     "project"
34328	//   ],
34329	//   "parameters": {
34330	//     "filter": {
34331	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
34332	//       "location": "query",
34333	//       "type": "string"
34334	//     },
34335	//     "maxResults": {
34336	//       "default": "500",
34337	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
34338	//       "format": "uint32",
34339	//       "location": "query",
34340	//       "minimum": "0",
34341	//       "type": "integer"
34342	//     },
34343	//     "orderBy": {
34344	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
34345	//       "location": "query",
34346	//       "type": "string"
34347	//     },
34348	//     "pageToken": {
34349	//       "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.",
34350	//       "location": "query",
34351	//       "type": "string"
34352	//     },
34353	//     "project": {
34354	//       "description": "Project ID for this request.",
34355	//       "location": "path",
34356	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34357	//       "required": true,
34358	//       "type": "string"
34359	//     }
34360	//   },
34361	//   "path": "{project}/global/httpHealthChecks",
34362	//   "response": {
34363	//     "$ref": "HttpHealthCheckList"
34364	//   },
34365	//   "scopes": [
34366	//     "https://www.googleapis.com/auth/cloud-platform",
34367	//     "https://www.googleapis.com/auth/compute",
34368	//     "https://www.googleapis.com/auth/compute.readonly"
34369	//   ]
34370	// }
34371
34372}
34373
34374// Pages invokes f for each page of results.
34375// A non-nil error returned from f will halt the iteration.
34376// The provided context supersedes any context provided to the Context method.
34377func (c *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) error) error {
34378	c.ctx_ = ctx
34379	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
34380	for {
34381		x, err := c.Do()
34382		if err != nil {
34383			return err
34384		}
34385		if err := f(x); err != nil {
34386			return err
34387		}
34388		if x.NextPageToken == "" {
34389			return nil
34390		}
34391		c.PageToken(x.NextPageToken)
34392	}
34393}
34394
34395// method id "compute.httpHealthChecks.patch":
34396
34397type HttpHealthChecksPatchCall struct {
34398	s               *Service
34399	project         string
34400	httpHealthCheck string
34401	httphealthcheck *HttpHealthCheck
34402	urlParams_      gensupport.URLParams
34403	ctx_            context.Context
34404	header_         http.Header
34405}
34406
34407// Patch: Updates a HttpHealthCheck resource in the specified project
34408// using the data included in the request. This method supports PATCH
34409// semantics and uses the JSON merge patch format and processing rules.
34410// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch
34411func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall {
34412	c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34413	c.project = project
34414	c.httpHealthCheck = httpHealthCheck
34415	c.httphealthcheck = httphealthcheck
34416	return c
34417}
34418
34419// RequestId sets the optional parameter "requestId": An optional
34420// request ID to identify requests. Specify a unique request ID so that
34421// if you must retry your request, the server will know to ignore the
34422// request if it has already been completed.
34423//
34424// For example, consider a situation where you make an initial request
34425// and the request times out. If you make the request again with the
34426// same request ID, the server can check if original operation with the
34427// same request ID was received, and if so, will ignore the second
34428// request. This prevents clients from accidentally creating duplicate
34429// commitments.
34430//
34431// The request ID must be a valid UUID with the exception that zero UUID
34432// is not supported (00000000-0000-0000-0000-000000000000).
34433func (c *HttpHealthChecksPatchCall) RequestId(requestId string) *HttpHealthChecksPatchCall {
34434	c.urlParams_.Set("requestId", requestId)
34435	return c
34436}
34437
34438// Fields allows partial responses to be retrieved. See
34439// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34440// for more information.
34441func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall {
34442	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34443	return c
34444}
34445
34446// Context sets the context to be used in this call's Do method. Any
34447// pending HTTP request will be aborted if the provided context is
34448// canceled.
34449func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall {
34450	c.ctx_ = ctx
34451	return c
34452}
34453
34454// Header returns an http.Header that can be modified by the caller to
34455// add HTTP headers to the request.
34456func (c *HttpHealthChecksPatchCall) Header() http.Header {
34457	if c.header_ == nil {
34458		c.header_ = make(http.Header)
34459	}
34460	return c.header_
34461}
34462
34463func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
34464	reqHeaders := make(http.Header)
34465	for k, v := range c.header_ {
34466		reqHeaders[k] = v
34467	}
34468	reqHeaders.Set("User-Agent", c.s.userAgent())
34469	var body io.Reader = nil
34470	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
34471	if err != nil {
34472		return nil, err
34473	}
34474	reqHeaders.Set("Content-Type", "application/json")
34475	c.urlParams_.Set("alt", alt)
34476	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
34477	urls += "?" + c.urlParams_.Encode()
34478	req, _ := http.NewRequest("PATCH", urls, body)
34479	req.Header = reqHeaders
34480	googleapi.Expand(req.URL, map[string]string{
34481		"project":         c.project,
34482		"httpHealthCheck": c.httpHealthCheck,
34483	})
34484	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34485}
34486
34487// Do executes the "compute.httpHealthChecks.patch" call.
34488// Exactly one of *Operation or error will be non-nil. Any non-2xx
34489// status code is an error. Response headers are in either
34490// *Operation.ServerResponse.Header or (if a response was returned at
34491// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34492// to check whether the returned error was because
34493// http.StatusNotModified was returned.
34494func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
34495	gensupport.SetOptions(c.urlParams_, opts...)
34496	res, err := c.doRequest("json")
34497	if res != nil && res.StatusCode == http.StatusNotModified {
34498		if res.Body != nil {
34499			res.Body.Close()
34500		}
34501		return nil, &googleapi.Error{
34502			Code:   res.StatusCode,
34503			Header: res.Header,
34504		}
34505	}
34506	if err != nil {
34507		return nil, err
34508	}
34509	defer googleapi.CloseBody(res)
34510	if err := googleapi.CheckResponse(res); err != nil {
34511		return nil, err
34512	}
34513	ret := &Operation{
34514		ServerResponse: googleapi.ServerResponse{
34515			Header:         res.Header,
34516			HTTPStatusCode: res.StatusCode,
34517		},
34518	}
34519	target := &ret
34520	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
34521		return nil, err
34522	}
34523	return ret, nil
34524	// {
34525	//   "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
34526	//   "httpMethod": "PATCH",
34527	//   "id": "compute.httpHealthChecks.patch",
34528	//   "parameterOrder": [
34529	//     "project",
34530	//     "httpHealthCheck"
34531	//   ],
34532	//   "parameters": {
34533	//     "httpHealthCheck": {
34534	//       "description": "Name of the HttpHealthCheck resource to patch.",
34535	//       "location": "path",
34536	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34537	//       "required": true,
34538	//       "type": "string"
34539	//     },
34540	//     "project": {
34541	//       "description": "Project ID for this request.",
34542	//       "location": "path",
34543	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34544	//       "required": true,
34545	//       "type": "string"
34546	//     },
34547	//     "requestId": {
34548	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
34549	//       "location": "query",
34550	//       "type": "string"
34551	//     }
34552	//   },
34553	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
34554	//   "request": {
34555	//     "$ref": "HttpHealthCheck"
34556	//   },
34557	//   "response": {
34558	//     "$ref": "Operation"
34559	//   },
34560	//   "scopes": [
34561	//     "https://www.googleapis.com/auth/cloud-platform",
34562	//     "https://www.googleapis.com/auth/compute"
34563	//   ]
34564	// }
34565
34566}
34567
34568// method id "compute.httpHealthChecks.testIamPermissions":
34569
34570type HttpHealthChecksTestIamPermissionsCall struct {
34571	s                      *Service
34572	project                string
34573	resource               string
34574	testpermissionsrequest *TestPermissionsRequest
34575	urlParams_             gensupport.URLParams
34576	ctx_                   context.Context
34577	header_                http.Header
34578}
34579
34580// TestIamPermissions: Returns permissions that a caller has on the
34581// specified resource.
34582func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall {
34583	c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34584	c.project = project
34585	c.resource = resource
34586	c.testpermissionsrequest = testpermissionsrequest
34587	return c
34588}
34589
34590// Fields allows partial responses to be retrieved. See
34591// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34592// for more information.
34593func (c *HttpHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpHealthChecksTestIamPermissionsCall {
34594	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34595	return c
34596}
34597
34598// Context sets the context to be used in this call's Do method. Any
34599// pending HTTP request will be aborted if the provided context is
34600// canceled.
34601func (c *HttpHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpHealthChecksTestIamPermissionsCall {
34602	c.ctx_ = ctx
34603	return c
34604}
34605
34606// Header returns an http.Header that can be modified by the caller to
34607// add HTTP headers to the request.
34608func (c *HttpHealthChecksTestIamPermissionsCall) Header() http.Header {
34609	if c.header_ == nil {
34610		c.header_ = make(http.Header)
34611	}
34612	return c.header_
34613}
34614
34615func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
34616	reqHeaders := make(http.Header)
34617	for k, v := range c.header_ {
34618		reqHeaders[k] = v
34619	}
34620	reqHeaders.Set("User-Agent", c.s.userAgent())
34621	var body io.Reader = nil
34622	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
34623	if err != nil {
34624		return nil, err
34625	}
34626	reqHeaders.Set("Content-Type", "application/json")
34627	c.urlParams_.Set("alt", alt)
34628	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{resource}/testIamPermissions")
34629	urls += "?" + c.urlParams_.Encode()
34630	req, _ := http.NewRequest("POST", urls, body)
34631	req.Header = reqHeaders
34632	googleapi.Expand(req.URL, map[string]string{
34633		"project":  c.project,
34634		"resource": c.resource,
34635	})
34636	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34637}
34638
34639// Do executes the "compute.httpHealthChecks.testIamPermissions" call.
34640// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
34641// non-2xx status code is an error. Response headers are in either
34642// *TestPermissionsResponse.ServerResponse.Header or (if a response was
34643// returned at all) in error.(*googleapi.Error).Header. Use
34644// googleapi.IsNotModified to check whether the returned error was
34645// because http.StatusNotModified was returned.
34646func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
34647	gensupport.SetOptions(c.urlParams_, opts...)
34648	res, err := c.doRequest("json")
34649	if res != nil && res.StatusCode == http.StatusNotModified {
34650		if res.Body != nil {
34651			res.Body.Close()
34652		}
34653		return nil, &googleapi.Error{
34654			Code:   res.StatusCode,
34655			Header: res.Header,
34656		}
34657	}
34658	if err != nil {
34659		return nil, err
34660	}
34661	defer googleapi.CloseBody(res)
34662	if err := googleapi.CheckResponse(res); err != nil {
34663		return nil, err
34664	}
34665	ret := &TestPermissionsResponse{
34666		ServerResponse: googleapi.ServerResponse{
34667			Header:         res.Header,
34668			HTTPStatusCode: res.StatusCode,
34669		},
34670	}
34671	target := &ret
34672	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
34673		return nil, err
34674	}
34675	return ret, nil
34676	// {
34677	//   "description": "Returns permissions that a caller has on the specified resource.",
34678	//   "httpMethod": "POST",
34679	//   "id": "compute.httpHealthChecks.testIamPermissions",
34680	//   "parameterOrder": [
34681	//     "project",
34682	//     "resource"
34683	//   ],
34684	//   "parameters": {
34685	//     "project": {
34686	//       "description": "Project ID for this request.",
34687	//       "location": "path",
34688	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34689	//       "required": true,
34690	//       "type": "string"
34691	//     },
34692	//     "resource": {
34693	//       "description": "Name of the resource for this request.",
34694	//       "location": "path",
34695	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
34696	//       "required": true,
34697	//       "type": "string"
34698	//     }
34699	//   },
34700	//   "path": "{project}/global/httpHealthChecks/{resource}/testIamPermissions",
34701	//   "request": {
34702	//     "$ref": "TestPermissionsRequest"
34703	//   },
34704	//   "response": {
34705	//     "$ref": "TestPermissionsResponse"
34706	//   },
34707	//   "scopes": [
34708	//     "https://www.googleapis.com/auth/cloud-platform",
34709	//     "https://www.googleapis.com/auth/compute",
34710	//     "https://www.googleapis.com/auth/compute.readonly"
34711	//   ]
34712	// }
34713
34714}
34715
34716// method id "compute.httpHealthChecks.update":
34717
34718type HttpHealthChecksUpdateCall struct {
34719	s               *Service
34720	project         string
34721	httpHealthCheck string
34722	httphealthcheck *HttpHealthCheck
34723	urlParams_      gensupport.URLParams
34724	ctx_            context.Context
34725	header_         http.Header
34726}
34727
34728// Update: Updates a HttpHealthCheck resource in the specified project
34729// using the data included in the request.
34730// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/update
34731func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall {
34732	c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34733	c.project = project
34734	c.httpHealthCheck = httpHealthCheck
34735	c.httphealthcheck = httphealthcheck
34736	return c
34737}
34738
34739// RequestId sets the optional parameter "requestId": An optional
34740// request ID to identify requests. Specify a unique request ID so that
34741// if you must retry your request, the server will know to ignore the
34742// request if it has already been completed.
34743//
34744// For example, consider a situation where you make an initial request
34745// and the request times out. If you make the request again with the
34746// same request ID, the server can check if original operation with the
34747// same request ID was received, and if so, will ignore the second
34748// request. This prevents clients from accidentally creating duplicate
34749// commitments.
34750//
34751// The request ID must be a valid UUID with the exception that zero UUID
34752// is not supported (00000000-0000-0000-0000-000000000000).
34753func (c *HttpHealthChecksUpdateCall) RequestId(requestId string) *HttpHealthChecksUpdateCall {
34754	c.urlParams_.Set("requestId", requestId)
34755	return c
34756}
34757
34758// Fields allows partial responses to be retrieved. See
34759// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34760// for more information.
34761func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall {
34762	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34763	return c
34764}
34765
34766// Context sets the context to be used in this call's Do method. Any
34767// pending HTTP request will be aborted if the provided context is
34768// canceled.
34769func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall {
34770	c.ctx_ = ctx
34771	return c
34772}
34773
34774// Header returns an http.Header that can be modified by the caller to
34775// add HTTP headers to the request.
34776func (c *HttpHealthChecksUpdateCall) Header() http.Header {
34777	if c.header_ == nil {
34778		c.header_ = make(http.Header)
34779	}
34780	return c.header_
34781}
34782
34783func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
34784	reqHeaders := make(http.Header)
34785	for k, v := range c.header_ {
34786		reqHeaders[k] = v
34787	}
34788	reqHeaders.Set("User-Agent", c.s.userAgent())
34789	var body io.Reader = nil
34790	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
34791	if err != nil {
34792		return nil, err
34793	}
34794	reqHeaders.Set("Content-Type", "application/json")
34795	c.urlParams_.Set("alt", alt)
34796	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
34797	urls += "?" + c.urlParams_.Encode()
34798	req, _ := http.NewRequest("PUT", urls, body)
34799	req.Header = reqHeaders
34800	googleapi.Expand(req.URL, map[string]string{
34801		"project":         c.project,
34802		"httpHealthCheck": c.httpHealthCheck,
34803	})
34804	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34805}
34806
34807// Do executes the "compute.httpHealthChecks.update" call.
34808// Exactly one of *Operation or error will be non-nil. Any non-2xx
34809// status code is an error. Response headers are in either
34810// *Operation.ServerResponse.Header or (if a response was returned at
34811// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34812// to check whether the returned error was because
34813// http.StatusNotModified was returned.
34814func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
34815	gensupport.SetOptions(c.urlParams_, opts...)
34816	res, err := c.doRequest("json")
34817	if res != nil && res.StatusCode == http.StatusNotModified {
34818		if res.Body != nil {
34819			res.Body.Close()
34820		}
34821		return nil, &googleapi.Error{
34822			Code:   res.StatusCode,
34823			Header: res.Header,
34824		}
34825	}
34826	if err != nil {
34827		return nil, err
34828	}
34829	defer googleapi.CloseBody(res)
34830	if err := googleapi.CheckResponse(res); err != nil {
34831		return nil, err
34832	}
34833	ret := &Operation{
34834		ServerResponse: googleapi.ServerResponse{
34835			Header:         res.Header,
34836			HTTPStatusCode: res.StatusCode,
34837		},
34838	}
34839	target := &ret
34840	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
34841		return nil, err
34842	}
34843	return ret, nil
34844	// {
34845	//   "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.",
34846	//   "httpMethod": "PUT",
34847	//   "id": "compute.httpHealthChecks.update",
34848	//   "parameterOrder": [
34849	//     "project",
34850	//     "httpHealthCheck"
34851	//   ],
34852	//   "parameters": {
34853	//     "httpHealthCheck": {
34854	//       "description": "Name of the HttpHealthCheck resource to update.",
34855	//       "location": "path",
34856	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34857	//       "required": true,
34858	//       "type": "string"
34859	//     },
34860	//     "project": {
34861	//       "description": "Project ID for this request.",
34862	//       "location": "path",
34863	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34864	//       "required": true,
34865	//       "type": "string"
34866	//     },
34867	//     "requestId": {
34868	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
34869	//       "location": "query",
34870	//       "type": "string"
34871	//     }
34872	//   },
34873	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
34874	//   "request": {
34875	//     "$ref": "HttpHealthCheck"
34876	//   },
34877	//   "response": {
34878	//     "$ref": "Operation"
34879	//   },
34880	//   "scopes": [
34881	//     "https://www.googleapis.com/auth/cloud-platform",
34882	//     "https://www.googleapis.com/auth/compute"
34883	//   ]
34884	// }
34885
34886}
34887
34888// method id "compute.httpsHealthChecks.delete":
34889
34890type HttpsHealthChecksDeleteCall struct {
34891	s                *Service
34892	project          string
34893	httpsHealthCheck string
34894	urlParams_       gensupport.URLParams
34895	ctx_             context.Context
34896	header_          http.Header
34897}
34898
34899// Delete: Deletes the specified HttpsHealthCheck resource.
34900func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall {
34901	c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34902	c.project = project
34903	c.httpsHealthCheck = httpsHealthCheck
34904	return c
34905}
34906
34907// RequestId sets the optional parameter "requestId": An optional
34908// request ID to identify requests. Specify a unique request ID so that
34909// if you must retry your request, the server will know to ignore the
34910// request if it has already been completed.
34911//
34912// For example, consider a situation where you make an initial request
34913// and the request times out. If you make the request again with the
34914// same request ID, the server can check if original operation with the
34915// same request ID was received, and if so, will ignore the second
34916// request. This prevents clients from accidentally creating duplicate
34917// commitments.
34918//
34919// The request ID must be a valid UUID with the exception that zero UUID
34920// is not supported (00000000-0000-0000-0000-000000000000).
34921func (c *HttpsHealthChecksDeleteCall) RequestId(requestId string) *HttpsHealthChecksDeleteCall {
34922	c.urlParams_.Set("requestId", requestId)
34923	return c
34924}
34925
34926// Fields allows partial responses to be retrieved. See
34927// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34928// for more information.
34929func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall {
34930	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34931	return c
34932}
34933
34934// Context sets the context to be used in this call's Do method. Any
34935// pending HTTP request will be aborted if the provided context is
34936// canceled.
34937func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall {
34938	c.ctx_ = ctx
34939	return c
34940}
34941
34942// Header returns an http.Header that can be modified by the caller to
34943// add HTTP headers to the request.
34944func (c *HttpsHealthChecksDeleteCall) Header() http.Header {
34945	if c.header_ == nil {
34946		c.header_ = make(http.Header)
34947	}
34948	return c.header_
34949}
34950
34951func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
34952	reqHeaders := make(http.Header)
34953	for k, v := range c.header_ {
34954		reqHeaders[k] = v
34955	}
34956	reqHeaders.Set("User-Agent", c.s.userAgent())
34957	var body io.Reader = nil
34958	c.urlParams_.Set("alt", alt)
34959	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
34960	urls += "?" + c.urlParams_.Encode()
34961	req, _ := http.NewRequest("DELETE", urls, body)
34962	req.Header = reqHeaders
34963	googleapi.Expand(req.URL, map[string]string{
34964		"project":          c.project,
34965		"httpsHealthCheck": c.httpsHealthCheck,
34966	})
34967	return gensupport.SendRequest(c.ctx_, c.s.client, req)
34968}
34969
34970// Do executes the "compute.httpsHealthChecks.delete" call.
34971// Exactly one of *Operation or error will be non-nil. Any non-2xx
34972// status code is an error. Response headers are in either
34973// *Operation.ServerResponse.Header or (if a response was returned at
34974// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34975// to check whether the returned error was because
34976// http.StatusNotModified was returned.
34977func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
34978	gensupport.SetOptions(c.urlParams_, opts...)
34979	res, err := c.doRequest("json")
34980	if res != nil && res.StatusCode == http.StatusNotModified {
34981		if res.Body != nil {
34982			res.Body.Close()
34983		}
34984		return nil, &googleapi.Error{
34985			Code:   res.StatusCode,
34986			Header: res.Header,
34987		}
34988	}
34989	if err != nil {
34990		return nil, err
34991	}
34992	defer googleapi.CloseBody(res)
34993	if err := googleapi.CheckResponse(res); err != nil {
34994		return nil, err
34995	}
34996	ret := &Operation{
34997		ServerResponse: googleapi.ServerResponse{
34998			Header:         res.Header,
34999			HTTPStatusCode: res.StatusCode,
35000		},
35001	}
35002	target := &ret
35003	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
35004		return nil, err
35005	}
35006	return ret, nil
35007	// {
35008	//   "description": "Deletes the specified HttpsHealthCheck resource.",
35009	//   "httpMethod": "DELETE",
35010	//   "id": "compute.httpsHealthChecks.delete",
35011	//   "parameterOrder": [
35012	//     "project",
35013	//     "httpsHealthCheck"
35014	//   ],
35015	//   "parameters": {
35016	//     "httpsHealthCheck": {
35017	//       "description": "Name of the HttpsHealthCheck resource to delete.",
35018	//       "location": "path",
35019	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35020	//       "required": true,
35021	//       "type": "string"
35022	//     },
35023	//     "project": {
35024	//       "description": "Project ID for this request.",
35025	//       "location": "path",
35026	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35027	//       "required": true,
35028	//       "type": "string"
35029	//     },
35030	//     "requestId": {
35031	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
35032	//       "location": "query",
35033	//       "type": "string"
35034	//     }
35035	//   },
35036	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
35037	//   "response": {
35038	//     "$ref": "Operation"
35039	//   },
35040	//   "scopes": [
35041	//     "https://www.googleapis.com/auth/cloud-platform",
35042	//     "https://www.googleapis.com/auth/compute"
35043	//   ]
35044	// }
35045
35046}
35047
35048// method id "compute.httpsHealthChecks.get":
35049
35050type HttpsHealthChecksGetCall struct {
35051	s                *Service
35052	project          string
35053	httpsHealthCheck string
35054	urlParams_       gensupport.URLParams
35055	ifNoneMatch_     string
35056	ctx_             context.Context
35057	header_          http.Header
35058}
35059
35060// Get: Returns the specified HttpsHealthCheck resource. Get a list of
35061// available HTTPS health checks by making a list() request.
35062func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall {
35063	c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35064	c.project = project
35065	c.httpsHealthCheck = httpsHealthCheck
35066	return c
35067}
35068
35069// Fields allows partial responses to be retrieved. See
35070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35071// for more information.
35072func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall {
35073	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35074	return c
35075}
35076
35077// IfNoneMatch sets the optional parameter which makes the operation
35078// fail if the object's ETag matches the given value. This is useful for
35079// getting updates only after the object has changed since the last
35080// request. Use googleapi.IsNotModified to check whether the response
35081// error from Do is the result of In-None-Match.
35082func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall {
35083	c.ifNoneMatch_ = entityTag
35084	return c
35085}
35086
35087// Context sets the context to be used in this call's Do method. Any
35088// pending HTTP request will be aborted if the provided context is
35089// canceled.
35090func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall {
35091	c.ctx_ = ctx
35092	return c
35093}
35094
35095// Header returns an http.Header that can be modified by the caller to
35096// add HTTP headers to the request.
35097func (c *HttpsHealthChecksGetCall) Header() http.Header {
35098	if c.header_ == nil {
35099		c.header_ = make(http.Header)
35100	}
35101	return c.header_
35102}
35103
35104func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
35105	reqHeaders := make(http.Header)
35106	for k, v := range c.header_ {
35107		reqHeaders[k] = v
35108	}
35109	reqHeaders.Set("User-Agent", c.s.userAgent())
35110	if c.ifNoneMatch_ != "" {
35111		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35112	}
35113	var body io.Reader = nil
35114	c.urlParams_.Set("alt", alt)
35115	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
35116	urls += "?" + c.urlParams_.Encode()
35117	req, _ := http.NewRequest("GET", urls, body)
35118	req.Header = reqHeaders
35119	googleapi.Expand(req.URL, map[string]string{
35120		"project":          c.project,
35121		"httpsHealthCheck": c.httpsHealthCheck,
35122	})
35123	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35124}
35125
35126// Do executes the "compute.httpsHealthChecks.get" call.
35127// Exactly one of *HttpsHealthCheck or error will be non-nil. Any
35128// non-2xx status code is an error. Response headers are in either
35129// *HttpsHealthCheck.ServerResponse.Header or (if a response was
35130// returned at all) in error.(*googleapi.Error).Header. Use
35131// googleapi.IsNotModified to check whether the returned error was
35132// because http.StatusNotModified was returned.
35133func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, error) {
35134	gensupport.SetOptions(c.urlParams_, opts...)
35135	res, err := c.doRequest("json")
35136	if res != nil && res.StatusCode == http.StatusNotModified {
35137		if res.Body != nil {
35138			res.Body.Close()
35139		}
35140		return nil, &googleapi.Error{
35141			Code:   res.StatusCode,
35142			Header: res.Header,
35143		}
35144	}
35145	if err != nil {
35146		return nil, err
35147	}
35148	defer googleapi.CloseBody(res)
35149	if err := googleapi.CheckResponse(res); err != nil {
35150		return nil, err
35151	}
35152	ret := &HttpsHealthCheck{
35153		ServerResponse: googleapi.ServerResponse{
35154			Header:         res.Header,
35155			HTTPStatusCode: res.StatusCode,
35156		},
35157	}
35158	target := &ret
35159	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
35160		return nil, err
35161	}
35162	return ret, nil
35163	// {
35164	//   "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.",
35165	//   "httpMethod": "GET",
35166	//   "id": "compute.httpsHealthChecks.get",
35167	//   "parameterOrder": [
35168	//     "project",
35169	//     "httpsHealthCheck"
35170	//   ],
35171	//   "parameters": {
35172	//     "httpsHealthCheck": {
35173	//       "description": "Name of the HttpsHealthCheck resource to return.",
35174	//       "location": "path",
35175	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35176	//       "required": true,
35177	//       "type": "string"
35178	//     },
35179	//     "project": {
35180	//       "description": "Project ID for this request.",
35181	//       "location": "path",
35182	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35183	//       "required": true,
35184	//       "type": "string"
35185	//     }
35186	//   },
35187	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
35188	//   "response": {
35189	//     "$ref": "HttpsHealthCheck"
35190	//   },
35191	//   "scopes": [
35192	//     "https://www.googleapis.com/auth/cloud-platform",
35193	//     "https://www.googleapis.com/auth/compute",
35194	//     "https://www.googleapis.com/auth/compute.readonly"
35195	//   ]
35196	// }
35197
35198}
35199
35200// method id "compute.httpsHealthChecks.insert":
35201
35202type HttpsHealthChecksInsertCall struct {
35203	s                *Service
35204	project          string
35205	httpshealthcheck *HttpsHealthCheck
35206	urlParams_       gensupport.URLParams
35207	ctx_             context.Context
35208	header_          http.Header
35209}
35210
35211// Insert: Creates a HttpsHealthCheck resource in the specified project
35212// using the data included in the request.
35213func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall {
35214	c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35215	c.project = project
35216	c.httpshealthcheck = httpshealthcheck
35217	return c
35218}
35219
35220// RequestId sets the optional parameter "requestId": An optional
35221// request ID to identify requests. Specify a unique request ID so that
35222// if you must retry your request, the server will know to ignore the
35223// request if it has already been completed.
35224//
35225// For example, consider a situation where you make an initial request
35226// and the request times out. If you make the request again with the
35227// same request ID, the server can check if original operation with the
35228// same request ID was received, and if so, will ignore the second
35229// request. This prevents clients from accidentally creating duplicate
35230// commitments.
35231//
35232// The request ID must be a valid UUID with the exception that zero UUID
35233// is not supported (00000000-0000-0000-0000-000000000000).
35234func (c *HttpsHealthChecksInsertCall) RequestId(requestId string) *HttpsHealthChecksInsertCall {
35235	c.urlParams_.Set("requestId", requestId)
35236	return c
35237}
35238
35239// Fields allows partial responses to be retrieved. See
35240// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35241// for more information.
35242func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall {
35243	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35244	return c
35245}
35246
35247// Context sets the context to be used in this call's Do method. Any
35248// pending HTTP request will be aborted if the provided context is
35249// canceled.
35250func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall {
35251	c.ctx_ = ctx
35252	return c
35253}
35254
35255// Header returns an http.Header that can be modified by the caller to
35256// add HTTP headers to the request.
35257func (c *HttpsHealthChecksInsertCall) Header() http.Header {
35258	if c.header_ == nil {
35259		c.header_ = make(http.Header)
35260	}
35261	return c.header_
35262}
35263
35264func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
35265	reqHeaders := make(http.Header)
35266	for k, v := range c.header_ {
35267		reqHeaders[k] = v
35268	}
35269	reqHeaders.Set("User-Agent", c.s.userAgent())
35270	var body io.Reader = nil
35271	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
35272	if err != nil {
35273		return nil, err
35274	}
35275	reqHeaders.Set("Content-Type", "application/json")
35276	c.urlParams_.Set("alt", alt)
35277	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks")
35278	urls += "?" + c.urlParams_.Encode()
35279	req, _ := http.NewRequest("POST", urls, body)
35280	req.Header = reqHeaders
35281	googleapi.Expand(req.URL, map[string]string{
35282		"project": c.project,
35283	})
35284	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35285}
35286
35287// Do executes the "compute.httpsHealthChecks.insert" call.
35288// Exactly one of *Operation or error will be non-nil. Any non-2xx
35289// status code is an error. Response headers are in either
35290// *Operation.ServerResponse.Header or (if a response was returned at
35291// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35292// to check whether the returned error was because
35293// http.StatusNotModified was returned.
35294func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35295	gensupport.SetOptions(c.urlParams_, opts...)
35296	res, err := c.doRequest("json")
35297	if res != nil && res.StatusCode == http.StatusNotModified {
35298		if res.Body != nil {
35299			res.Body.Close()
35300		}
35301		return nil, &googleapi.Error{
35302			Code:   res.StatusCode,
35303			Header: res.Header,
35304		}
35305	}
35306	if err != nil {
35307		return nil, err
35308	}
35309	defer googleapi.CloseBody(res)
35310	if err := googleapi.CheckResponse(res); err != nil {
35311		return nil, err
35312	}
35313	ret := &Operation{
35314		ServerResponse: googleapi.ServerResponse{
35315			Header:         res.Header,
35316			HTTPStatusCode: res.StatusCode,
35317		},
35318	}
35319	target := &ret
35320	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
35321		return nil, err
35322	}
35323	return ret, nil
35324	// {
35325	//   "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.",
35326	//   "httpMethod": "POST",
35327	//   "id": "compute.httpsHealthChecks.insert",
35328	//   "parameterOrder": [
35329	//     "project"
35330	//   ],
35331	//   "parameters": {
35332	//     "project": {
35333	//       "description": "Project ID for this request.",
35334	//       "location": "path",
35335	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35336	//       "required": true,
35337	//       "type": "string"
35338	//     },
35339	//     "requestId": {
35340	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
35341	//       "location": "query",
35342	//       "type": "string"
35343	//     }
35344	//   },
35345	//   "path": "{project}/global/httpsHealthChecks",
35346	//   "request": {
35347	//     "$ref": "HttpsHealthCheck"
35348	//   },
35349	//   "response": {
35350	//     "$ref": "Operation"
35351	//   },
35352	//   "scopes": [
35353	//     "https://www.googleapis.com/auth/cloud-platform",
35354	//     "https://www.googleapis.com/auth/compute"
35355	//   ]
35356	// }
35357
35358}
35359
35360// method id "compute.httpsHealthChecks.list":
35361
35362type HttpsHealthChecksListCall struct {
35363	s            *Service
35364	project      string
35365	urlParams_   gensupport.URLParams
35366	ifNoneMatch_ string
35367	ctx_         context.Context
35368	header_      http.Header
35369}
35370
35371// List: Retrieves the list of HttpsHealthCheck resources available to
35372// the specified project.
35373func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall {
35374	c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35375	c.project = project
35376	return c
35377}
35378
35379// Filter sets the optional parameter "filter": Sets a filter
35380// {expression} for filtering listed resources. Your {expression} must
35381// be in the format: field_name comparison_string literal_string.
35382//
35383// The field_name is the name of the field you want to compare. Only
35384// atomic field types are supported (string, number, boolean). The
35385// comparison_string must be either eq (equals) or ne (not equals). The
35386// literal_string is the string value to filter to. The literal value
35387// must be valid for the type of field you are filtering by (string,
35388// number, boolean). For string fields, the literal value is interpreted
35389// as a regular expression using RE2 syntax. The literal value must
35390// match the entire field.
35391//
35392// For example, to filter for instances that do not have a name of
35393// example-instance, you would use name ne example-instance.
35394//
35395// You can filter on nested fields. For example, you could filter on
35396// instances that have set the scheduling.automaticRestart field to
35397// true. Use filtering on nested fields to take advantage of labels to
35398// organize and search for results based on label values.
35399//
35400// To filter on multiple expressions, provide each separate expression
35401// within parentheses. For example, (scheduling.automaticRestart eq
35402// true) (zone eq us-central1-f). Multiple expressions are treated as
35403// AND expressions, meaning that resources must match all expressions to
35404// pass the filters.
35405func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall {
35406	c.urlParams_.Set("filter", filter)
35407	return c
35408}
35409
35410// MaxResults sets the optional parameter "maxResults": The maximum
35411// number of results per page that should be returned. If the number of
35412// available results is larger than maxResults, Compute Engine returns a
35413// nextPageToken that can be used to get the next page of results in
35414// subsequent list requests. Acceptable values are 0 to 500, inclusive.
35415// (Default: 500)
35416func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall {
35417	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35418	return c
35419}
35420
35421// OrderBy sets the optional parameter "orderBy": Sorts list results by
35422// a certain order. By default, results are returned in alphanumerical
35423// order based on the resource name.
35424//
35425// You can also sort results in descending order based on the creation
35426// timestamp using orderBy="creationTimestamp desc". This sorts results
35427// based on the creationTimestamp field in reverse chronological order
35428// (newest result first). Use this to sort resources like operations so
35429// that the newest operation is returned first.
35430//
35431// Currently, only sorting by name or creationTimestamp desc is
35432// supported.
35433func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksListCall {
35434	c.urlParams_.Set("orderBy", orderBy)
35435	return c
35436}
35437
35438// PageToken sets the optional parameter "pageToken": Specifies a page
35439// token to use. Set pageToken to the nextPageToken returned by a
35440// previous list request to get the next page of results.
35441func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall {
35442	c.urlParams_.Set("pageToken", pageToken)
35443	return c
35444}
35445
35446// Fields allows partial responses to be retrieved. See
35447// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35448// for more information.
35449func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall {
35450	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35451	return c
35452}
35453
35454// IfNoneMatch sets the optional parameter which makes the operation
35455// fail if the object's ETag matches the given value. This is useful for
35456// getting updates only after the object has changed since the last
35457// request. Use googleapi.IsNotModified to check whether the response
35458// error from Do is the result of In-None-Match.
35459func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall {
35460	c.ifNoneMatch_ = entityTag
35461	return c
35462}
35463
35464// Context sets the context to be used in this call's Do method. Any
35465// pending HTTP request will be aborted if the provided context is
35466// canceled.
35467func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall {
35468	c.ctx_ = ctx
35469	return c
35470}
35471
35472// Header returns an http.Header that can be modified by the caller to
35473// add HTTP headers to the request.
35474func (c *HttpsHealthChecksListCall) Header() http.Header {
35475	if c.header_ == nil {
35476		c.header_ = make(http.Header)
35477	}
35478	return c.header_
35479}
35480
35481func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) {
35482	reqHeaders := make(http.Header)
35483	for k, v := range c.header_ {
35484		reqHeaders[k] = v
35485	}
35486	reqHeaders.Set("User-Agent", c.s.userAgent())
35487	if c.ifNoneMatch_ != "" {
35488		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
35489	}
35490	var body io.Reader = nil
35491	c.urlParams_.Set("alt", alt)
35492	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks")
35493	urls += "?" + c.urlParams_.Encode()
35494	req, _ := http.NewRequest("GET", urls, body)
35495	req.Header = reqHeaders
35496	googleapi.Expand(req.URL, map[string]string{
35497		"project": c.project,
35498	})
35499	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35500}
35501
35502// Do executes the "compute.httpsHealthChecks.list" call.
35503// Exactly one of *HttpsHealthCheckList or error will be non-nil. Any
35504// non-2xx status code is an error. Response headers are in either
35505// *HttpsHealthCheckList.ServerResponse.Header or (if a response was
35506// returned at all) in error.(*googleapi.Error).Header. Use
35507// googleapi.IsNotModified to check whether the returned error was
35508// because http.StatusNotModified was returned.
35509func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, error) {
35510	gensupport.SetOptions(c.urlParams_, opts...)
35511	res, err := c.doRequest("json")
35512	if res != nil && res.StatusCode == http.StatusNotModified {
35513		if res.Body != nil {
35514			res.Body.Close()
35515		}
35516		return nil, &googleapi.Error{
35517			Code:   res.StatusCode,
35518			Header: res.Header,
35519		}
35520	}
35521	if err != nil {
35522		return nil, err
35523	}
35524	defer googleapi.CloseBody(res)
35525	if err := googleapi.CheckResponse(res); err != nil {
35526		return nil, err
35527	}
35528	ret := &HttpsHealthCheckList{
35529		ServerResponse: googleapi.ServerResponse{
35530			Header:         res.Header,
35531			HTTPStatusCode: res.StatusCode,
35532		},
35533	}
35534	target := &ret
35535	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
35536		return nil, err
35537	}
35538	return ret, nil
35539	// {
35540	//   "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.",
35541	//   "httpMethod": "GET",
35542	//   "id": "compute.httpsHealthChecks.list",
35543	//   "parameterOrder": [
35544	//     "project"
35545	//   ],
35546	//   "parameters": {
35547	//     "filter": {
35548	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
35549	//       "location": "query",
35550	//       "type": "string"
35551	//     },
35552	//     "maxResults": {
35553	//       "default": "500",
35554	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
35555	//       "format": "uint32",
35556	//       "location": "query",
35557	//       "minimum": "0",
35558	//       "type": "integer"
35559	//     },
35560	//     "orderBy": {
35561	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
35562	//       "location": "query",
35563	//       "type": "string"
35564	//     },
35565	//     "pageToken": {
35566	//       "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.",
35567	//       "location": "query",
35568	//       "type": "string"
35569	//     },
35570	//     "project": {
35571	//       "description": "Project ID for this request.",
35572	//       "location": "path",
35573	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35574	//       "required": true,
35575	//       "type": "string"
35576	//     }
35577	//   },
35578	//   "path": "{project}/global/httpsHealthChecks",
35579	//   "response": {
35580	//     "$ref": "HttpsHealthCheckList"
35581	//   },
35582	//   "scopes": [
35583	//     "https://www.googleapis.com/auth/cloud-platform",
35584	//     "https://www.googleapis.com/auth/compute",
35585	//     "https://www.googleapis.com/auth/compute.readonly"
35586	//   ]
35587	// }
35588
35589}
35590
35591// Pages invokes f for each page of results.
35592// A non-nil error returned from f will halt the iteration.
35593// The provided context supersedes any context provided to the Context method.
35594func (c *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) error) error {
35595	c.ctx_ = ctx
35596	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35597	for {
35598		x, err := c.Do()
35599		if err != nil {
35600			return err
35601		}
35602		if err := f(x); err != nil {
35603			return err
35604		}
35605		if x.NextPageToken == "" {
35606			return nil
35607		}
35608		c.PageToken(x.NextPageToken)
35609	}
35610}
35611
35612// method id "compute.httpsHealthChecks.patch":
35613
35614type HttpsHealthChecksPatchCall struct {
35615	s                *Service
35616	project          string
35617	httpsHealthCheck string
35618	httpshealthcheck *HttpsHealthCheck
35619	urlParams_       gensupport.URLParams
35620	ctx_             context.Context
35621	header_          http.Header
35622}
35623
35624// Patch: Updates a HttpsHealthCheck resource in the specified project
35625// using the data included in the request. This method supports PATCH
35626// semantics and uses the JSON merge patch format and processing rules.
35627func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall {
35628	c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35629	c.project = project
35630	c.httpsHealthCheck = httpsHealthCheck
35631	c.httpshealthcheck = httpshealthcheck
35632	return c
35633}
35634
35635// RequestId sets the optional parameter "requestId": An optional
35636// request ID to identify requests. Specify a unique request ID so that
35637// if you must retry your request, the server will know to ignore the
35638// request if it has already been completed.
35639//
35640// For example, consider a situation where you make an initial request
35641// and the request times out. If you make the request again with the
35642// same request ID, the server can check if original operation with the
35643// same request ID was received, and if so, will ignore the second
35644// request. This prevents clients from accidentally creating duplicate
35645// commitments.
35646//
35647// The request ID must be a valid UUID with the exception that zero UUID
35648// is not supported (00000000-0000-0000-0000-000000000000).
35649func (c *HttpsHealthChecksPatchCall) RequestId(requestId string) *HttpsHealthChecksPatchCall {
35650	c.urlParams_.Set("requestId", requestId)
35651	return c
35652}
35653
35654// Fields allows partial responses to be retrieved. See
35655// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35656// for more information.
35657func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall {
35658	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35659	return c
35660}
35661
35662// Context sets the context to be used in this call's Do method. Any
35663// pending HTTP request will be aborted if the provided context is
35664// canceled.
35665func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall {
35666	c.ctx_ = ctx
35667	return c
35668}
35669
35670// Header returns an http.Header that can be modified by the caller to
35671// add HTTP headers to the request.
35672func (c *HttpsHealthChecksPatchCall) Header() http.Header {
35673	if c.header_ == nil {
35674		c.header_ = make(http.Header)
35675	}
35676	return c.header_
35677}
35678
35679func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
35680	reqHeaders := make(http.Header)
35681	for k, v := range c.header_ {
35682		reqHeaders[k] = v
35683	}
35684	reqHeaders.Set("User-Agent", c.s.userAgent())
35685	var body io.Reader = nil
35686	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
35687	if err != nil {
35688		return nil, err
35689	}
35690	reqHeaders.Set("Content-Type", "application/json")
35691	c.urlParams_.Set("alt", alt)
35692	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
35693	urls += "?" + c.urlParams_.Encode()
35694	req, _ := http.NewRequest("PATCH", urls, body)
35695	req.Header = reqHeaders
35696	googleapi.Expand(req.URL, map[string]string{
35697		"project":          c.project,
35698		"httpsHealthCheck": c.httpsHealthCheck,
35699	})
35700	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35701}
35702
35703// Do executes the "compute.httpsHealthChecks.patch" call.
35704// Exactly one of *Operation or error will be non-nil. Any non-2xx
35705// status code is an error. Response headers are in either
35706// *Operation.ServerResponse.Header or (if a response was returned at
35707// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35708// to check whether the returned error was because
35709// http.StatusNotModified was returned.
35710func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35711	gensupport.SetOptions(c.urlParams_, opts...)
35712	res, err := c.doRequest("json")
35713	if res != nil && res.StatusCode == http.StatusNotModified {
35714		if res.Body != nil {
35715			res.Body.Close()
35716		}
35717		return nil, &googleapi.Error{
35718			Code:   res.StatusCode,
35719			Header: res.Header,
35720		}
35721	}
35722	if err != nil {
35723		return nil, err
35724	}
35725	defer googleapi.CloseBody(res)
35726	if err := googleapi.CheckResponse(res); err != nil {
35727		return nil, err
35728	}
35729	ret := &Operation{
35730		ServerResponse: googleapi.ServerResponse{
35731			Header:         res.Header,
35732			HTTPStatusCode: res.StatusCode,
35733		},
35734	}
35735	target := &ret
35736	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
35737		return nil, err
35738	}
35739	return ret, nil
35740	// {
35741	//   "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
35742	//   "httpMethod": "PATCH",
35743	//   "id": "compute.httpsHealthChecks.patch",
35744	//   "parameterOrder": [
35745	//     "project",
35746	//     "httpsHealthCheck"
35747	//   ],
35748	//   "parameters": {
35749	//     "httpsHealthCheck": {
35750	//       "description": "Name of the HttpsHealthCheck resource to patch.",
35751	//       "location": "path",
35752	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35753	//       "required": true,
35754	//       "type": "string"
35755	//     },
35756	//     "project": {
35757	//       "description": "Project ID for this request.",
35758	//       "location": "path",
35759	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35760	//       "required": true,
35761	//       "type": "string"
35762	//     },
35763	//     "requestId": {
35764	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
35765	//       "location": "query",
35766	//       "type": "string"
35767	//     }
35768	//   },
35769	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
35770	//   "request": {
35771	//     "$ref": "HttpsHealthCheck"
35772	//   },
35773	//   "response": {
35774	//     "$ref": "Operation"
35775	//   },
35776	//   "scopes": [
35777	//     "https://www.googleapis.com/auth/cloud-platform",
35778	//     "https://www.googleapis.com/auth/compute"
35779	//   ]
35780	// }
35781
35782}
35783
35784// method id "compute.httpsHealthChecks.testIamPermissions":
35785
35786type HttpsHealthChecksTestIamPermissionsCall struct {
35787	s                      *Service
35788	project                string
35789	resource               string
35790	testpermissionsrequest *TestPermissionsRequest
35791	urlParams_             gensupport.URLParams
35792	ctx_                   context.Context
35793	header_                http.Header
35794}
35795
35796// TestIamPermissions: Returns permissions that a caller has on the
35797// specified resource.
35798func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall {
35799	c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35800	c.project = project
35801	c.resource = resource
35802	c.testpermissionsrequest = testpermissionsrequest
35803	return c
35804}
35805
35806// Fields allows partial responses to be retrieved. See
35807// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35808// for more information.
35809func (c *HttpsHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpsHealthChecksTestIamPermissionsCall {
35810	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35811	return c
35812}
35813
35814// Context sets the context to be used in this call's Do method. Any
35815// pending HTTP request will be aborted if the provided context is
35816// canceled.
35817func (c *HttpsHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpsHealthChecksTestIamPermissionsCall {
35818	c.ctx_ = ctx
35819	return c
35820}
35821
35822// Header returns an http.Header that can be modified by the caller to
35823// add HTTP headers to the request.
35824func (c *HttpsHealthChecksTestIamPermissionsCall) Header() http.Header {
35825	if c.header_ == nil {
35826		c.header_ = make(http.Header)
35827	}
35828	return c.header_
35829}
35830
35831func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
35832	reqHeaders := make(http.Header)
35833	for k, v := range c.header_ {
35834		reqHeaders[k] = v
35835	}
35836	reqHeaders.Set("User-Agent", c.s.userAgent())
35837	var body io.Reader = nil
35838	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
35839	if err != nil {
35840		return nil, err
35841	}
35842	reqHeaders.Set("Content-Type", "application/json")
35843	c.urlParams_.Set("alt", alt)
35844	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{resource}/testIamPermissions")
35845	urls += "?" + c.urlParams_.Encode()
35846	req, _ := http.NewRequest("POST", urls, body)
35847	req.Header = reqHeaders
35848	googleapi.Expand(req.URL, map[string]string{
35849		"project":  c.project,
35850		"resource": c.resource,
35851	})
35852	return gensupport.SendRequest(c.ctx_, c.s.client, req)
35853}
35854
35855// Do executes the "compute.httpsHealthChecks.testIamPermissions" call.
35856// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
35857// non-2xx status code is an error. Response headers are in either
35858// *TestPermissionsResponse.ServerResponse.Header or (if a response was
35859// returned at all) in error.(*googleapi.Error).Header. Use
35860// googleapi.IsNotModified to check whether the returned error was
35861// because http.StatusNotModified was returned.
35862func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
35863	gensupport.SetOptions(c.urlParams_, opts...)
35864	res, err := c.doRequest("json")
35865	if res != nil && res.StatusCode == http.StatusNotModified {
35866		if res.Body != nil {
35867			res.Body.Close()
35868		}
35869		return nil, &googleapi.Error{
35870			Code:   res.StatusCode,
35871			Header: res.Header,
35872		}
35873	}
35874	if err != nil {
35875		return nil, err
35876	}
35877	defer googleapi.CloseBody(res)
35878	if err := googleapi.CheckResponse(res); err != nil {
35879		return nil, err
35880	}
35881	ret := &TestPermissionsResponse{
35882		ServerResponse: googleapi.ServerResponse{
35883			Header:         res.Header,
35884			HTTPStatusCode: res.StatusCode,
35885		},
35886	}
35887	target := &ret
35888	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
35889		return nil, err
35890	}
35891	return ret, nil
35892	// {
35893	//   "description": "Returns permissions that a caller has on the specified resource.",
35894	//   "httpMethod": "POST",
35895	//   "id": "compute.httpsHealthChecks.testIamPermissions",
35896	//   "parameterOrder": [
35897	//     "project",
35898	//     "resource"
35899	//   ],
35900	//   "parameters": {
35901	//     "project": {
35902	//       "description": "Project ID for this request.",
35903	//       "location": "path",
35904	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35905	//       "required": true,
35906	//       "type": "string"
35907	//     },
35908	//     "resource": {
35909	//       "description": "Name of the resource for this request.",
35910	//       "location": "path",
35911	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
35912	//       "required": true,
35913	//       "type": "string"
35914	//     }
35915	//   },
35916	//   "path": "{project}/global/httpsHealthChecks/{resource}/testIamPermissions",
35917	//   "request": {
35918	//     "$ref": "TestPermissionsRequest"
35919	//   },
35920	//   "response": {
35921	//     "$ref": "TestPermissionsResponse"
35922	//   },
35923	//   "scopes": [
35924	//     "https://www.googleapis.com/auth/cloud-platform",
35925	//     "https://www.googleapis.com/auth/compute",
35926	//     "https://www.googleapis.com/auth/compute.readonly"
35927	//   ]
35928	// }
35929
35930}
35931
35932// method id "compute.httpsHealthChecks.update":
35933
35934type HttpsHealthChecksUpdateCall struct {
35935	s                *Service
35936	project          string
35937	httpsHealthCheck string
35938	httpshealthcheck *HttpsHealthCheck
35939	urlParams_       gensupport.URLParams
35940	ctx_             context.Context
35941	header_          http.Header
35942}
35943
35944// Update: Updates a HttpsHealthCheck resource in the specified project
35945// using the data included in the request.
35946func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall {
35947	c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35948	c.project = project
35949	c.httpsHealthCheck = httpsHealthCheck
35950	c.httpshealthcheck = httpshealthcheck
35951	return c
35952}
35953
35954// RequestId sets the optional parameter "requestId": An optional
35955// request ID to identify requests. Specify a unique request ID so that
35956// if you must retry your request, the server will know to ignore the
35957// request if it has already been completed.
35958//
35959// For example, consider a situation where you make an initial request
35960// and the request times out. If you make the request again with the
35961// same request ID, the server can check if original operation with the
35962// same request ID was received, and if so, will ignore the second
35963// request. This prevents clients from accidentally creating duplicate
35964// commitments.
35965//
35966// The request ID must be a valid UUID with the exception that zero UUID
35967// is not supported (00000000-0000-0000-0000-000000000000).
35968func (c *HttpsHealthChecksUpdateCall) RequestId(requestId string) *HttpsHealthChecksUpdateCall {
35969	c.urlParams_.Set("requestId", requestId)
35970	return c
35971}
35972
35973// Fields allows partial responses to be retrieved. See
35974// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35975// for more information.
35976func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall {
35977	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35978	return c
35979}
35980
35981// Context sets the context to be used in this call's Do method. Any
35982// pending HTTP request will be aborted if the provided context is
35983// canceled.
35984func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall {
35985	c.ctx_ = ctx
35986	return c
35987}
35988
35989// Header returns an http.Header that can be modified by the caller to
35990// add HTTP headers to the request.
35991func (c *HttpsHealthChecksUpdateCall) Header() http.Header {
35992	if c.header_ == nil {
35993		c.header_ = make(http.Header)
35994	}
35995	return c.header_
35996}
35997
35998func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
35999	reqHeaders := make(http.Header)
36000	for k, v := range c.header_ {
36001		reqHeaders[k] = v
36002	}
36003	reqHeaders.Set("User-Agent", c.s.userAgent())
36004	var body io.Reader = nil
36005	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
36006	if err != nil {
36007		return nil, err
36008	}
36009	reqHeaders.Set("Content-Type", "application/json")
36010	c.urlParams_.Set("alt", alt)
36011	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
36012	urls += "?" + c.urlParams_.Encode()
36013	req, _ := http.NewRequest("PUT", urls, body)
36014	req.Header = reqHeaders
36015	googleapi.Expand(req.URL, map[string]string{
36016		"project":          c.project,
36017		"httpsHealthCheck": c.httpsHealthCheck,
36018	})
36019	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36020}
36021
36022// Do executes the "compute.httpsHealthChecks.update" call.
36023// Exactly one of *Operation or error will be non-nil. Any non-2xx
36024// status code is an error. Response headers are in either
36025// *Operation.ServerResponse.Header or (if a response was returned at
36026// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36027// to check whether the returned error was because
36028// http.StatusNotModified was returned.
36029func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36030	gensupport.SetOptions(c.urlParams_, opts...)
36031	res, err := c.doRequest("json")
36032	if res != nil && res.StatusCode == http.StatusNotModified {
36033		if res.Body != nil {
36034			res.Body.Close()
36035		}
36036		return nil, &googleapi.Error{
36037			Code:   res.StatusCode,
36038			Header: res.Header,
36039		}
36040	}
36041	if err != nil {
36042		return nil, err
36043	}
36044	defer googleapi.CloseBody(res)
36045	if err := googleapi.CheckResponse(res); err != nil {
36046		return nil, err
36047	}
36048	ret := &Operation{
36049		ServerResponse: googleapi.ServerResponse{
36050			Header:         res.Header,
36051			HTTPStatusCode: res.StatusCode,
36052		},
36053	}
36054	target := &ret
36055	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
36056		return nil, err
36057	}
36058	return ret, nil
36059	// {
36060	//   "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.",
36061	//   "httpMethod": "PUT",
36062	//   "id": "compute.httpsHealthChecks.update",
36063	//   "parameterOrder": [
36064	//     "project",
36065	//     "httpsHealthCheck"
36066	//   ],
36067	//   "parameters": {
36068	//     "httpsHealthCheck": {
36069	//       "description": "Name of the HttpsHealthCheck resource to update.",
36070	//       "location": "path",
36071	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36072	//       "required": true,
36073	//       "type": "string"
36074	//     },
36075	//     "project": {
36076	//       "description": "Project ID for this request.",
36077	//       "location": "path",
36078	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36079	//       "required": true,
36080	//       "type": "string"
36081	//     },
36082	//     "requestId": {
36083	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
36084	//       "location": "query",
36085	//       "type": "string"
36086	//     }
36087	//   },
36088	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
36089	//   "request": {
36090	//     "$ref": "HttpsHealthCheck"
36091	//   },
36092	//   "response": {
36093	//     "$ref": "Operation"
36094	//   },
36095	//   "scopes": [
36096	//     "https://www.googleapis.com/auth/cloud-platform",
36097	//     "https://www.googleapis.com/auth/compute"
36098	//   ]
36099	// }
36100
36101}
36102
36103// method id "compute.images.delete":
36104
36105type ImagesDeleteCall struct {
36106	s          *Service
36107	project    string
36108	image      string
36109	urlParams_ gensupport.URLParams
36110	ctx_       context.Context
36111	header_    http.Header
36112}
36113
36114// Delete: Deletes the specified image.
36115// For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete
36116func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall {
36117	c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36118	c.project = project
36119	c.image = image
36120	return c
36121}
36122
36123// RequestId sets the optional parameter "requestId": An optional
36124// request ID to identify requests. Specify a unique request ID so that
36125// if you must retry your request, the server will know to ignore the
36126// request if it has already been completed.
36127//
36128// For example, consider a situation where you make an initial request
36129// and the request times out. If you make the request again with the
36130// same request ID, the server can check if original operation with the
36131// same request ID was received, and if so, will ignore the second
36132// request. This prevents clients from accidentally creating duplicate
36133// commitments.
36134//
36135// The request ID must be a valid UUID with the exception that zero UUID
36136// is not supported (00000000-0000-0000-0000-000000000000).
36137func (c *ImagesDeleteCall) RequestId(requestId string) *ImagesDeleteCall {
36138	c.urlParams_.Set("requestId", requestId)
36139	return c
36140}
36141
36142// Fields allows partial responses to be retrieved. See
36143// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36144// for more information.
36145func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall {
36146	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36147	return c
36148}
36149
36150// Context sets the context to be used in this call's Do method. Any
36151// pending HTTP request will be aborted if the provided context is
36152// canceled.
36153func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall {
36154	c.ctx_ = ctx
36155	return c
36156}
36157
36158// Header returns an http.Header that can be modified by the caller to
36159// add HTTP headers to the request.
36160func (c *ImagesDeleteCall) Header() http.Header {
36161	if c.header_ == nil {
36162		c.header_ = make(http.Header)
36163	}
36164	return c.header_
36165}
36166
36167func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) {
36168	reqHeaders := make(http.Header)
36169	for k, v := range c.header_ {
36170		reqHeaders[k] = v
36171	}
36172	reqHeaders.Set("User-Agent", c.s.userAgent())
36173	var body io.Reader = nil
36174	c.urlParams_.Set("alt", alt)
36175	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}")
36176	urls += "?" + c.urlParams_.Encode()
36177	req, _ := http.NewRequest("DELETE", urls, body)
36178	req.Header = reqHeaders
36179	googleapi.Expand(req.URL, map[string]string{
36180		"project": c.project,
36181		"image":   c.image,
36182	})
36183	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36184}
36185
36186// Do executes the "compute.images.delete" call.
36187// Exactly one of *Operation or error will be non-nil. Any non-2xx
36188// status code is an error. Response headers are in either
36189// *Operation.ServerResponse.Header or (if a response was returned at
36190// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36191// to check whether the returned error was because
36192// http.StatusNotModified was returned.
36193func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36194	gensupport.SetOptions(c.urlParams_, opts...)
36195	res, err := c.doRequest("json")
36196	if res != nil && res.StatusCode == http.StatusNotModified {
36197		if res.Body != nil {
36198			res.Body.Close()
36199		}
36200		return nil, &googleapi.Error{
36201			Code:   res.StatusCode,
36202			Header: res.Header,
36203		}
36204	}
36205	if err != nil {
36206		return nil, err
36207	}
36208	defer googleapi.CloseBody(res)
36209	if err := googleapi.CheckResponse(res); err != nil {
36210		return nil, err
36211	}
36212	ret := &Operation{
36213		ServerResponse: googleapi.ServerResponse{
36214			Header:         res.Header,
36215			HTTPStatusCode: res.StatusCode,
36216		},
36217	}
36218	target := &ret
36219	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
36220		return nil, err
36221	}
36222	return ret, nil
36223	// {
36224	//   "description": "Deletes the specified image.",
36225	//   "httpMethod": "DELETE",
36226	//   "id": "compute.images.delete",
36227	//   "parameterOrder": [
36228	//     "project",
36229	//     "image"
36230	//   ],
36231	//   "parameters": {
36232	//     "image": {
36233	//       "description": "Name of the image resource to delete.",
36234	//       "location": "path",
36235	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36236	//       "required": true,
36237	//       "type": "string"
36238	//     },
36239	//     "project": {
36240	//       "description": "Project ID for this request.",
36241	//       "location": "path",
36242	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36243	//       "required": true,
36244	//       "type": "string"
36245	//     },
36246	//     "requestId": {
36247	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
36248	//       "location": "query",
36249	//       "type": "string"
36250	//     }
36251	//   },
36252	//   "path": "{project}/global/images/{image}",
36253	//   "response": {
36254	//     "$ref": "Operation"
36255	//   },
36256	//   "scopes": [
36257	//     "https://www.googleapis.com/auth/cloud-platform",
36258	//     "https://www.googleapis.com/auth/compute"
36259	//   ]
36260	// }
36261
36262}
36263
36264// method id "compute.images.deprecate":
36265
36266type ImagesDeprecateCall struct {
36267	s                 *Service
36268	project           string
36269	image             string
36270	deprecationstatus *DeprecationStatus
36271	urlParams_        gensupport.URLParams
36272	ctx_              context.Context
36273	header_           http.Header
36274}
36275
36276// Deprecate: Sets the deprecation status of an image.
36277//
36278// If an empty request body is given, clears the deprecation status
36279// instead.
36280// For details, see https://cloud.google.com/compute/docs/reference/latest/images/deprecate
36281func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall {
36282	c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36283	c.project = project
36284	c.image = image
36285	c.deprecationstatus = deprecationstatus
36286	return c
36287}
36288
36289// RequestId sets the optional parameter "requestId": An optional
36290// request ID to identify requests. Specify a unique request ID so that
36291// if you must retry your request, the server will know to ignore the
36292// request if it has already been completed.
36293//
36294// For example, consider a situation where you make an initial request
36295// and the request times out. If you make the request again with the
36296// same request ID, the server can check if original operation with the
36297// same request ID was received, and if so, will ignore the second
36298// request. This prevents clients from accidentally creating duplicate
36299// commitments.
36300//
36301// The request ID must be a valid UUID with the exception that zero UUID
36302// is not supported (00000000-0000-0000-0000-000000000000).
36303func (c *ImagesDeprecateCall) RequestId(requestId string) *ImagesDeprecateCall {
36304	c.urlParams_.Set("requestId", requestId)
36305	return c
36306}
36307
36308// Fields allows partial responses to be retrieved. See
36309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36310// for more information.
36311func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall {
36312	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36313	return c
36314}
36315
36316// Context sets the context to be used in this call's Do method. Any
36317// pending HTTP request will be aborted if the provided context is
36318// canceled.
36319func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall {
36320	c.ctx_ = ctx
36321	return c
36322}
36323
36324// Header returns an http.Header that can be modified by the caller to
36325// add HTTP headers to the request.
36326func (c *ImagesDeprecateCall) Header() http.Header {
36327	if c.header_ == nil {
36328		c.header_ = make(http.Header)
36329	}
36330	return c.header_
36331}
36332
36333func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) {
36334	reqHeaders := make(http.Header)
36335	for k, v := range c.header_ {
36336		reqHeaders[k] = v
36337	}
36338	reqHeaders.Set("User-Agent", c.s.userAgent())
36339	var body io.Reader = nil
36340	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus)
36341	if err != nil {
36342		return nil, err
36343	}
36344	reqHeaders.Set("Content-Type", "application/json")
36345	c.urlParams_.Set("alt", alt)
36346	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate")
36347	urls += "?" + c.urlParams_.Encode()
36348	req, _ := http.NewRequest("POST", urls, body)
36349	req.Header = reqHeaders
36350	googleapi.Expand(req.URL, map[string]string{
36351		"project": c.project,
36352		"image":   c.image,
36353	})
36354	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36355}
36356
36357// Do executes the "compute.images.deprecate" call.
36358// Exactly one of *Operation or error will be non-nil. Any non-2xx
36359// status code is an error. Response headers are in either
36360// *Operation.ServerResponse.Header or (if a response was returned at
36361// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36362// to check whether the returned error was because
36363// http.StatusNotModified was returned.
36364func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36365	gensupport.SetOptions(c.urlParams_, opts...)
36366	res, err := c.doRequest("json")
36367	if res != nil && res.StatusCode == http.StatusNotModified {
36368		if res.Body != nil {
36369			res.Body.Close()
36370		}
36371		return nil, &googleapi.Error{
36372			Code:   res.StatusCode,
36373			Header: res.Header,
36374		}
36375	}
36376	if err != nil {
36377		return nil, err
36378	}
36379	defer googleapi.CloseBody(res)
36380	if err := googleapi.CheckResponse(res); err != nil {
36381		return nil, err
36382	}
36383	ret := &Operation{
36384		ServerResponse: googleapi.ServerResponse{
36385			Header:         res.Header,
36386			HTTPStatusCode: res.StatusCode,
36387		},
36388	}
36389	target := &ret
36390	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
36391		return nil, err
36392	}
36393	return ret, nil
36394	// {
36395	//   "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.",
36396	//   "httpMethod": "POST",
36397	//   "id": "compute.images.deprecate",
36398	//   "parameterOrder": [
36399	//     "project",
36400	//     "image"
36401	//   ],
36402	//   "parameters": {
36403	//     "image": {
36404	//       "description": "Image name.",
36405	//       "location": "path",
36406	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36407	//       "required": true,
36408	//       "type": "string"
36409	//     },
36410	//     "project": {
36411	//       "description": "Project ID for this request.",
36412	//       "location": "path",
36413	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36414	//       "required": true,
36415	//       "type": "string"
36416	//     },
36417	//     "requestId": {
36418	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
36419	//       "location": "query",
36420	//       "type": "string"
36421	//     }
36422	//   },
36423	//   "path": "{project}/global/images/{image}/deprecate",
36424	//   "request": {
36425	//     "$ref": "DeprecationStatus"
36426	//   },
36427	//   "response": {
36428	//     "$ref": "Operation"
36429	//   },
36430	//   "scopes": [
36431	//     "https://www.googleapis.com/auth/cloud-platform",
36432	//     "https://www.googleapis.com/auth/compute"
36433	//   ]
36434	// }
36435
36436}
36437
36438// method id "compute.images.get":
36439
36440type ImagesGetCall struct {
36441	s            *Service
36442	project      string
36443	image        string
36444	urlParams_   gensupport.URLParams
36445	ifNoneMatch_ string
36446	ctx_         context.Context
36447	header_      http.Header
36448}
36449
36450// Get: Returns the specified image. Get a list of available images by
36451// making a list() request.
36452// For details, see https://cloud.google.com/compute/docs/reference/latest/images/get
36453func (r *ImagesService) Get(project string, image string) *ImagesGetCall {
36454	c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36455	c.project = project
36456	c.image = image
36457	return c
36458}
36459
36460// Fields allows partial responses to be retrieved. See
36461// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36462// for more information.
36463func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall {
36464	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36465	return c
36466}
36467
36468// IfNoneMatch sets the optional parameter which makes the operation
36469// fail if the object's ETag matches the given value. This is useful for
36470// getting updates only after the object has changed since the last
36471// request. Use googleapi.IsNotModified to check whether the response
36472// error from Do is the result of In-None-Match.
36473func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall {
36474	c.ifNoneMatch_ = entityTag
36475	return c
36476}
36477
36478// Context sets the context to be used in this call's Do method. Any
36479// pending HTTP request will be aborted if the provided context is
36480// canceled.
36481func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall {
36482	c.ctx_ = ctx
36483	return c
36484}
36485
36486// Header returns an http.Header that can be modified by the caller to
36487// add HTTP headers to the request.
36488func (c *ImagesGetCall) Header() http.Header {
36489	if c.header_ == nil {
36490		c.header_ = make(http.Header)
36491	}
36492	return c.header_
36493}
36494
36495func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) {
36496	reqHeaders := make(http.Header)
36497	for k, v := range c.header_ {
36498		reqHeaders[k] = v
36499	}
36500	reqHeaders.Set("User-Agent", c.s.userAgent())
36501	if c.ifNoneMatch_ != "" {
36502		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36503	}
36504	var body io.Reader = nil
36505	c.urlParams_.Set("alt", alt)
36506	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}")
36507	urls += "?" + c.urlParams_.Encode()
36508	req, _ := http.NewRequest("GET", urls, body)
36509	req.Header = reqHeaders
36510	googleapi.Expand(req.URL, map[string]string{
36511		"project": c.project,
36512		"image":   c.image,
36513	})
36514	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36515}
36516
36517// Do executes the "compute.images.get" call.
36518// Exactly one of *Image or error will be non-nil. Any non-2xx status
36519// code is an error. Response headers are in either
36520// *Image.ServerResponse.Header or (if a response was returned at all)
36521// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
36522// check whether the returned error was because http.StatusNotModified
36523// was returned.
36524func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) {
36525	gensupport.SetOptions(c.urlParams_, opts...)
36526	res, err := c.doRequest("json")
36527	if res != nil && res.StatusCode == http.StatusNotModified {
36528		if res.Body != nil {
36529			res.Body.Close()
36530		}
36531		return nil, &googleapi.Error{
36532			Code:   res.StatusCode,
36533			Header: res.Header,
36534		}
36535	}
36536	if err != nil {
36537		return nil, err
36538	}
36539	defer googleapi.CloseBody(res)
36540	if err := googleapi.CheckResponse(res); err != nil {
36541		return nil, err
36542	}
36543	ret := &Image{
36544		ServerResponse: googleapi.ServerResponse{
36545			Header:         res.Header,
36546			HTTPStatusCode: res.StatusCode,
36547		},
36548	}
36549	target := &ret
36550	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
36551		return nil, err
36552	}
36553	return ret, nil
36554	// {
36555	//   "description": "Returns the specified image. Get a list of available images by making a list() request.",
36556	//   "httpMethod": "GET",
36557	//   "id": "compute.images.get",
36558	//   "parameterOrder": [
36559	//     "project",
36560	//     "image"
36561	//   ],
36562	//   "parameters": {
36563	//     "image": {
36564	//       "description": "Name of the image resource to return.",
36565	//       "location": "path",
36566	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36567	//       "required": true,
36568	//       "type": "string"
36569	//     },
36570	//     "project": {
36571	//       "description": "Project ID for this request.",
36572	//       "location": "path",
36573	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36574	//       "required": true,
36575	//       "type": "string"
36576	//     }
36577	//   },
36578	//   "path": "{project}/global/images/{image}",
36579	//   "response": {
36580	//     "$ref": "Image"
36581	//   },
36582	//   "scopes": [
36583	//     "https://www.googleapis.com/auth/cloud-platform",
36584	//     "https://www.googleapis.com/auth/compute",
36585	//     "https://www.googleapis.com/auth/compute.readonly"
36586	//   ]
36587	// }
36588
36589}
36590
36591// method id "compute.images.getFromFamily":
36592
36593type ImagesGetFromFamilyCall struct {
36594	s            *Service
36595	project      string
36596	family       string
36597	urlParams_   gensupport.URLParams
36598	ifNoneMatch_ string
36599	ctx_         context.Context
36600	header_      http.Header
36601}
36602
36603// GetFromFamily: Returns the latest image that is part of an image
36604// family and is not deprecated.
36605func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall {
36606	c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36607	c.project = project
36608	c.family = family
36609	return c
36610}
36611
36612// Fields allows partial responses to be retrieved. See
36613// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36614// for more information.
36615func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall {
36616	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36617	return c
36618}
36619
36620// IfNoneMatch sets the optional parameter which makes the operation
36621// fail if the object's ETag matches the given value. This is useful for
36622// getting updates only after the object has changed since the last
36623// request. Use googleapi.IsNotModified to check whether the response
36624// error from Do is the result of In-None-Match.
36625func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall {
36626	c.ifNoneMatch_ = entityTag
36627	return c
36628}
36629
36630// Context sets the context to be used in this call's Do method. Any
36631// pending HTTP request will be aborted if the provided context is
36632// canceled.
36633func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall {
36634	c.ctx_ = ctx
36635	return c
36636}
36637
36638// Header returns an http.Header that can be modified by the caller to
36639// add HTTP headers to the request.
36640func (c *ImagesGetFromFamilyCall) Header() http.Header {
36641	if c.header_ == nil {
36642		c.header_ = make(http.Header)
36643	}
36644	return c.header_
36645}
36646
36647func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) {
36648	reqHeaders := make(http.Header)
36649	for k, v := range c.header_ {
36650		reqHeaders[k] = v
36651	}
36652	reqHeaders.Set("User-Agent", c.s.userAgent())
36653	if c.ifNoneMatch_ != "" {
36654		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
36655	}
36656	var body io.Reader = nil
36657	c.urlParams_.Set("alt", alt)
36658	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/family/{family}")
36659	urls += "?" + c.urlParams_.Encode()
36660	req, _ := http.NewRequest("GET", urls, body)
36661	req.Header = reqHeaders
36662	googleapi.Expand(req.URL, map[string]string{
36663		"project": c.project,
36664		"family":  c.family,
36665	})
36666	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36667}
36668
36669// Do executes the "compute.images.getFromFamily" call.
36670// Exactly one of *Image or error will be non-nil. Any non-2xx status
36671// code is an error. Response headers are in either
36672// *Image.ServerResponse.Header or (if a response was returned at all)
36673// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
36674// check whether the returned error was because http.StatusNotModified
36675// was returned.
36676func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, error) {
36677	gensupport.SetOptions(c.urlParams_, opts...)
36678	res, err := c.doRequest("json")
36679	if res != nil && res.StatusCode == http.StatusNotModified {
36680		if res.Body != nil {
36681			res.Body.Close()
36682		}
36683		return nil, &googleapi.Error{
36684			Code:   res.StatusCode,
36685			Header: res.Header,
36686		}
36687	}
36688	if err != nil {
36689		return nil, err
36690	}
36691	defer googleapi.CloseBody(res)
36692	if err := googleapi.CheckResponse(res); err != nil {
36693		return nil, err
36694	}
36695	ret := &Image{
36696		ServerResponse: googleapi.ServerResponse{
36697			Header:         res.Header,
36698			HTTPStatusCode: res.StatusCode,
36699		},
36700	}
36701	target := &ret
36702	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
36703		return nil, err
36704	}
36705	return ret, nil
36706	// {
36707	//   "description": "Returns the latest image that is part of an image family and is not deprecated.",
36708	//   "httpMethod": "GET",
36709	//   "id": "compute.images.getFromFamily",
36710	//   "parameterOrder": [
36711	//     "project",
36712	//     "family"
36713	//   ],
36714	//   "parameters": {
36715	//     "family": {
36716	//       "description": "Name of the image family to search for.",
36717	//       "location": "path",
36718	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36719	//       "required": true,
36720	//       "type": "string"
36721	//     },
36722	//     "project": {
36723	//       "description": "Project ID for this request.",
36724	//       "location": "path",
36725	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36726	//       "required": true,
36727	//       "type": "string"
36728	//     }
36729	//   },
36730	//   "path": "{project}/global/images/family/{family}",
36731	//   "response": {
36732	//     "$ref": "Image"
36733	//   },
36734	//   "scopes": [
36735	//     "https://www.googleapis.com/auth/cloud-platform",
36736	//     "https://www.googleapis.com/auth/compute",
36737	//     "https://www.googleapis.com/auth/compute.readonly"
36738	//   ]
36739	// }
36740
36741}
36742
36743// method id "compute.images.insert":
36744
36745type ImagesInsertCall struct {
36746	s          *Service
36747	project    string
36748	image      *Image
36749	urlParams_ gensupport.URLParams
36750	ctx_       context.Context
36751	header_    http.Header
36752}
36753
36754// Insert: Creates an image in the specified project using the data
36755// included in the request.
36756// For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert
36757func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall {
36758	c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36759	c.project = project
36760	c.image = image
36761	return c
36762}
36763
36764// ForceCreate sets the optional parameter "forceCreate": Force image
36765// creation if true.
36766func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall {
36767	c.urlParams_.Set("forceCreate", fmt.Sprint(forceCreate))
36768	return c
36769}
36770
36771// RequestId sets the optional parameter "requestId": An optional
36772// request ID to identify requests. Specify a unique request ID so that
36773// if you must retry your request, the server will know to ignore the
36774// request if it has already been completed.
36775//
36776// For example, consider a situation where you make an initial request
36777// and the request times out. If you make the request again with the
36778// same request ID, the server can check if original operation with the
36779// same request ID was received, and if so, will ignore the second
36780// request. This prevents clients from accidentally creating duplicate
36781// commitments.
36782//
36783// The request ID must be a valid UUID with the exception that zero UUID
36784// is not supported (00000000-0000-0000-0000-000000000000).
36785func (c *ImagesInsertCall) RequestId(requestId string) *ImagesInsertCall {
36786	c.urlParams_.Set("requestId", requestId)
36787	return c
36788}
36789
36790// Fields allows partial responses to be retrieved. See
36791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36792// for more information.
36793func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall {
36794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36795	return c
36796}
36797
36798// Context sets the context to be used in this call's Do method. Any
36799// pending HTTP request will be aborted if the provided context is
36800// canceled.
36801func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall {
36802	c.ctx_ = ctx
36803	return c
36804}
36805
36806// Header returns an http.Header that can be modified by the caller to
36807// add HTTP headers to the request.
36808func (c *ImagesInsertCall) Header() http.Header {
36809	if c.header_ == nil {
36810		c.header_ = make(http.Header)
36811	}
36812	return c.header_
36813}
36814
36815func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) {
36816	reqHeaders := make(http.Header)
36817	for k, v := range c.header_ {
36818		reqHeaders[k] = v
36819	}
36820	reqHeaders.Set("User-Agent", c.s.userAgent())
36821	var body io.Reader = nil
36822	body, err := googleapi.WithoutDataWrapper.JSONReader(c.image)
36823	if err != nil {
36824		return nil, err
36825	}
36826	reqHeaders.Set("Content-Type", "application/json")
36827	c.urlParams_.Set("alt", alt)
36828	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images")
36829	urls += "?" + c.urlParams_.Encode()
36830	req, _ := http.NewRequest("POST", urls, body)
36831	req.Header = reqHeaders
36832	googleapi.Expand(req.URL, map[string]string{
36833		"project": c.project,
36834	})
36835	return gensupport.SendRequest(c.ctx_, c.s.client, req)
36836}
36837
36838// Do executes the "compute.images.insert" call.
36839// Exactly one of *Operation or error will be non-nil. Any non-2xx
36840// status code is an error. Response headers are in either
36841// *Operation.ServerResponse.Header or (if a response was returned at
36842// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36843// to check whether the returned error was because
36844// http.StatusNotModified was returned.
36845func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36846	gensupport.SetOptions(c.urlParams_, opts...)
36847	res, err := c.doRequest("json")
36848	if res != nil && res.StatusCode == http.StatusNotModified {
36849		if res.Body != nil {
36850			res.Body.Close()
36851		}
36852		return nil, &googleapi.Error{
36853			Code:   res.StatusCode,
36854			Header: res.Header,
36855		}
36856	}
36857	if err != nil {
36858		return nil, err
36859	}
36860	defer googleapi.CloseBody(res)
36861	if err := googleapi.CheckResponse(res); err != nil {
36862		return nil, err
36863	}
36864	ret := &Operation{
36865		ServerResponse: googleapi.ServerResponse{
36866			Header:         res.Header,
36867			HTTPStatusCode: res.StatusCode,
36868		},
36869	}
36870	target := &ret
36871	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
36872		return nil, err
36873	}
36874	return ret, nil
36875	// {
36876	//   "description": "Creates an image in the specified project using the data included in the request.",
36877	//   "httpMethod": "POST",
36878	//   "id": "compute.images.insert",
36879	//   "parameterOrder": [
36880	//     "project"
36881	//   ],
36882	//   "parameters": {
36883	//     "forceCreate": {
36884	//       "description": "Force image creation if true.",
36885	//       "location": "query",
36886	//       "type": "boolean"
36887	//     },
36888	//     "project": {
36889	//       "description": "Project ID for this request.",
36890	//       "location": "path",
36891	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36892	//       "required": true,
36893	//       "type": "string"
36894	//     },
36895	//     "requestId": {
36896	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
36897	//       "location": "query",
36898	//       "type": "string"
36899	//     }
36900	//   },
36901	//   "path": "{project}/global/images",
36902	//   "request": {
36903	//     "$ref": "Image"
36904	//   },
36905	//   "response": {
36906	//     "$ref": "Operation"
36907	//   },
36908	//   "scopes": [
36909	//     "https://www.googleapis.com/auth/cloud-platform",
36910	//     "https://www.googleapis.com/auth/compute",
36911	//     "https://www.googleapis.com/auth/devstorage.full_control",
36912	//     "https://www.googleapis.com/auth/devstorage.read_only",
36913	//     "https://www.googleapis.com/auth/devstorage.read_write"
36914	//   ]
36915	// }
36916
36917}
36918
36919// method id "compute.images.list":
36920
36921type ImagesListCall struct {
36922	s            *Service
36923	project      string
36924	urlParams_   gensupport.URLParams
36925	ifNoneMatch_ string
36926	ctx_         context.Context
36927	header_      http.Header
36928}
36929
36930// List: Retrieves the list of private images available to the specified
36931// project. Private images are images you create that belong to your
36932// project. This method does not get any images that belong to other
36933// projects, including publicly-available images, like Debian 8. If you
36934// want to get a list of publicly-available images, use this method to
36935// make a request to the respective image project, such as debian-cloud
36936// or windows-cloud.
36937// For details, see https://cloud.google.com/compute/docs/reference/latest/images/list
36938func (r *ImagesService) List(project string) *ImagesListCall {
36939	c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36940	c.project = project
36941	return c
36942}
36943
36944// Filter sets the optional parameter "filter": Sets a filter
36945// {expression} for filtering listed resources. Your {expression} must
36946// be in the format: field_name comparison_string literal_string.
36947//
36948// The field_name is the name of the field you want to compare. Only
36949// atomic field types are supported (string, number, boolean). The
36950// comparison_string must be either eq (equals) or ne (not equals). The
36951// literal_string is the string value to filter to. The literal value
36952// must be valid for the type of field you are filtering by (string,
36953// number, boolean). For string fields, the literal value is interpreted
36954// as a regular expression using RE2 syntax. The literal value must
36955// match the entire field.
36956//
36957// For example, to filter for instances that do not have a name of
36958// example-instance, you would use name ne example-instance.
36959//
36960// You can filter on nested fields. For example, you could filter on
36961// instances that have set the scheduling.automaticRestart field to
36962// true. Use filtering on nested fields to take advantage of labels to
36963// organize and search for results based on label values.
36964//
36965// To filter on multiple expressions, provide each separate expression
36966// within parentheses. For example, (scheduling.automaticRestart eq
36967// true) (zone eq us-central1-f). Multiple expressions are treated as
36968// AND expressions, meaning that resources must match all expressions to
36969// pass the filters.
36970func (c *ImagesListCall) Filter(filter string) *ImagesListCall {
36971	c.urlParams_.Set("filter", filter)
36972	return c
36973}
36974
36975// MaxResults sets the optional parameter "maxResults": The maximum
36976// number of results per page that should be returned. If the number of
36977// available results is larger than maxResults, Compute Engine returns a
36978// nextPageToken that can be used to get the next page of results in
36979// subsequent list requests. Acceptable values are 0 to 500, inclusive.
36980// (Default: 500)
36981func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall {
36982	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36983	return c
36984}
36985
36986// OrderBy sets the optional parameter "orderBy": Sorts list results by
36987// a certain order. By default, results are returned in alphanumerical
36988// order based on the resource name.
36989//
36990// You can also sort results in descending order based on the creation
36991// timestamp using orderBy="creationTimestamp desc". This sorts results
36992// based on the creationTimestamp field in reverse chronological order
36993// (newest result first). Use this to sort resources like operations so
36994// that the newest operation is returned first.
36995//
36996// Currently, only sorting by name or creationTimestamp desc is
36997// supported.
36998func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall {
36999	c.urlParams_.Set("orderBy", orderBy)
37000	return c
37001}
37002
37003// PageToken sets the optional parameter "pageToken": Specifies a page
37004// token to use. Set pageToken to the nextPageToken returned by a
37005// previous list request to get the next page of results.
37006func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall {
37007	c.urlParams_.Set("pageToken", pageToken)
37008	return c
37009}
37010
37011// Fields allows partial responses to be retrieved. See
37012// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37013// for more information.
37014func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall {
37015	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37016	return c
37017}
37018
37019// IfNoneMatch sets the optional parameter which makes the operation
37020// fail if the object's ETag matches the given value. This is useful for
37021// getting updates only after the object has changed since the last
37022// request. Use googleapi.IsNotModified to check whether the response
37023// error from Do is the result of In-None-Match.
37024func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall {
37025	c.ifNoneMatch_ = entityTag
37026	return c
37027}
37028
37029// Context sets the context to be used in this call's Do method. Any
37030// pending HTTP request will be aborted if the provided context is
37031// canceled.
37032func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall {
37033	c.ctx_ = ctx
37034	return c
37035}
37036
37037// Header returns an http.Header that can be modified by the caller to
37038// add HTTP headers to the request.
37039func (c *ImagesListCall) Header() http.Header {
37040	if c.header_ == nil {
37041		c.header_ = make(http.Header)
37042	}
37043	return c.header_
37044}
37045
37046func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) {
37047	reqHeaders := make(http.Header)
37048	for k, v := range c.header_ {
37049		reqHeaders[k] = v
37050	}
37051	reqHeaders.Set("User-Agent", c.s.userAgent())
37052	if c.ifNoneMatch_ != "" {
37053		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37054	}
37055	var body io.Reader = nil
37056	c.urlParams_.Set("alt", alt)
37057	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images")
37058	urls += "?" + c.urlParams_.Encode()
37059	req, _ := http.NewRequest("GET", urls, body)
37060	req.Header = reqHeaders
37061	googleapi.Expand(req.URL, map[string]string{
37062		"project": c.project,
37063	})
37064	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37065}
37066
37067// Do executes the "compute.images.list" call.
37068// Exactly one of *ImageList or error will be non-nil. Any non-2xx
37069// status code is an error. Response headers are in either
37070// *ImageList.ServerResponse.Header or (if a response was returned at
37071// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
37072// to check whether the returned error was because
37073// http.StatusNotModified was returned.
37074func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) {
37075	gensupport.SetOptions(c.urlParams_, opts...)
37076	res, err := c.doRequest("json")
37077	if res != nil && res.StatusCode == http.StatusNotModified {
37078		if res.Body != nil {
37079			res.Body.Close()
37080		}
37081		return nil, &googleapi.Error{
37082			Code:   res.StatusCode,
37083			Header: res.Header,
37084		}
37085	}
37086	if err != nil {
37087		return nil, err
37088	}
37089	defer googleapi.CloseBody(res)
37090	if err := googleapi.CheckResponse(res); err != nil {
37091		return nil, err
37092	}
37093	ret := &ImageList{
37094		ServerResponse: googleapi.ServerResponse{
37095			Header:         res.Header,
37096			HTTPStatusCode: res.StatusCode,
37097		},
37098	}
37099	target := &ret
37100	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
37101		return nil, err
37102	}
37103	return ret, nil
37104	// {
37105	//   "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 8. 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.",
37106	//   "httpMethod": "GET",
37107	//   "id": "compute.images.list",
37108	//   "parameterOrder": [
37109	//     "project"
37110	//   ],
37111	//   "parameters": {
37112	//     "filter": {
37113	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
37114	//       "location": "query",
37115	//       "type": "string"
37116	//     },
37117	//     "maxResults": {
37118	//       "default": "500",
37119	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
37120	//       "format": "uint32",
37121	//       "location": "query",
37122	//       "minimum": "0",
37123	//       "type": "integer"
37124	//     },
37125	//     "orderBy": {
37126	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
37127	//       "location": "query",
37128	//       "type": "string"
37129	//     },
37130	//     "pageToken": {
37131	//       "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.",
37132	//       "location": "query",
37133	//       "type": "string"
37134	//     },
37135	//     "project": {
37136	//       "description": "Project ID for this request.",
37137	//       "location": "path",
37138	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37139	//       "required": true,
37140	//       "type": "string"
37141	//     }
37142	//   },
37143	//   "path": "{project}/global/images",
37144	//   "response": {
37145	//     "$ref": "ImageList"
37146	//   },
37147	//   "scopes": [
37148	//     "https://www.googleapis.com/auth/cloud-platform",
37149	//     "https://www.googleapis.com/auth/compute",
37150	//     "https://www.googleapis.com/auth/compute.readonly"
37151	//   ]
37152	// }
37153
37154}
37155
37156// Pages invokes f for each page of results.
37157// A non-nil error returned from f will halt the iteration.
37158// The provided context supersedes any context provided to the Context method.
37159func (c *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error {
37160	c.ctx_ = ctx
37161	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37162	for {
37163		x, err := c.Do()
37164		if err != nil {
37165			return err
37166		}
37167		if err := f(x); err != nil {
37168			return err
37169		}
37170		if x.NextPageToken == "" {
37171			return nil
37172		}
37173		c.PageToken(x.NextPageToken)
37174	}
37175}
37176
37177// method id "compute.images.setLabels":
37178
37179type ImagesSetLabelsCall struct {
37180	s                      *Service
37181	project                string
37182	resource               string
37183	globalsetlabelsrequest *GlobalSetLabelsRequest
37184	urlParams_             gensupport.URLParams
37185	ctx_                   context.Context
37186	header_                http.Header
37187}
37188
37189// SetLabels: Sets the labels on an image. To learn more about labels,
37190// read the Labeling Resources documentation.
37191func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall {
37192	c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37193	c.project = project
37194	c.resource = resource
37195	c.globalsetlabelsrequest = globalsetlabelsrequest
37196	return c
37197}
37198
37199// Fields allows partial responses to be retrieved. See
37200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37201// for more information.
37202func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall {
37203	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37204	return c
37205}
37206
37207// Context sets the context to be used in this call's Do method. Any
37208// pending HTTP request will be aborted if the provided context is
37209// canceled.
37210func (c *ImagesSetLabelsCall) Context(ctx context.Context) *ImagesSetLabelsCall {
37211	c.ctx_ = ctx
37212	return c
37213}
37214
37215// Header returns an http.Header that can be modified by the caller to
37216// add HTTP headers to the request.
37217func (c *ImagesSetLabelsCall) Header() http.Header {
37218	if c.header_ == nil {
37219		c.header_ = make(http.Header)
37220	}
37221	return c.header_
37222}
37223
37224func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) {
37225	reqHeaders := make(http.Header)
37226	for k, v := range c.header_ {
37227		reqHeaders[k] = v
37228	}
37229	reqHeaders.Set("User-Agent", c.s.userAgent())
37230	var body io.Reader = nil
37231	body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest)
37232	if err != nil {
37233		return nil, err
37234	}
37235	reqHeaders.Set("Content-Type", "application/json")
37236	c.urlParams_.Set("alt", alt)
37237	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setLabels")
37238	urls += "?" + c.urlParams_.Encode()
37239	req, _ := http.NewRequest("POST", urls, body)
37240	req.Header = reqHeaders
37241	googleapi.Expand(req.URL, map[string]string{
37242		"project":  c.project,
37243		"resource": c.resource,
37244	})
37245	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37246}
37247
37248// Do executes the "compute.images.setLabels" call.
37249// Exactly one of *Operation or error will be non-nil. Any non-2xx
37250// status code is an error. Response headers are in either
37251// *Operation.ServerResponse.Header or (if a response was returned at
37252// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
37253// to check whether the returned error was because
37254// http.StatusNotModified was returned.
37255func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
37256	gensupport.SetOptions(c.urlParams_, opts...)
37257	res, err := c.doRequest("json")
37258	if res != nil && res.StatusCode == http.StatusNotModified {
37259		if res.Body != nil {
37260			res.Body.Close()
37261		}
37262		return nil, &googleapi.Error{
37263			Code:   res.StatusCode,
37264			Header: res.Header,
37265		}
37266	}
37267	if err != nil {
37268		return nil, err
37269	}
37270	defer googleapi.CloseBody(res)
37271	if err := googleapi.CheckResponse(res); err != nil {
37272		return nil, err
37273	}
37274	ret := &Operation{
37275		ServerResponse: googleapi.ServerResponse{
37276			Header:         res.Header,
37277			HTTPStatusCode: res.StatusCode,
37278		},
37279	}
37280	target := &ret
37281	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
37282		return nil, err
37283	}
37284	return ret, nil
37285	// {
37286	//   "description": "Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.",
37287	//   "httpMethod": "POST",
37288	//   "id": "compute.images.setLabels",
37289	//   "parameterOrder": [
37290	//     "project",
37291	//     "resource"
37292	//   ],
37293	//   "parameters": {
37294	//     "project": {
37295	//       "description": "Project ID for this request.",
37296	//       "location": "path",
37297	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37298	//       "required": true,
37299	//       "type": "string"
37300	//     },
37301	//     "resource": {
37302	//       "description": "Name of the resource for this request.",
37303	//       "location": "path",
37304	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
37305	//       "required": true,
37306	//       "type": "string"
37307	//     }
37308	//   },
37309	//   "path": "{project}/global/images/{resource}/setLabels",
37310	//   "request": {
37311	//     "$ref": "GlobalSetLabelsRequest"
37312	//   },
37313	//   "response": {
37314	//     "$ref": "Operation"
37315	//   },
37316	//   "scopes": [
37317	//     "https://www.googleapis.com/auth/cloud-platform",
37318	//     "https://www.googleapis.com/auth/compute"
37319	//   ]
37320	// }
37321
37322}
37323
37324// method id "compute.images.testIamPermissions":
37325
37326type ImagesTestIamPermissionsCall struct {
37327	s                      *Service
37328	project                string
37329	resource               string
37330	testpermissionsrequest *TestPermissionsRequest
37331	urlParams_             gensupport.URLParams
37332	ctx_                   context.Context
37333	header_                http.Header
37334}
37335
37336// TestIamPermissions: Returns permissions that a caller has on the
37337// specified resource.
37338func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall {
37339	c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37340	c.project = project
37341	c.resource = resource
37342	c.testpermissionsrequest = testpermissionsrequest
37343	return c
37344}
37345
37346// Fields allows partial responses to be retrieved. See
37347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37348// for more information.
37349func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestIamPermissionsCall {
37350	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37351	return c
37352}
37353
37354// Context sets the context to be used in this call's Do method. Any
37355// pending HTTP request will be aborted if the provided context is
37356// canceled.
37357func (c *ImagesTestIamPermissionsCall) Context(ctx context.Context) *ImagesTestIamPermissionsCall {
37358	c.ctx_ = ctx
37359	return c
37360}
37361
37362// Header returns an http.Header that can be modified by the caller to
37363// add HTTP headers to the request.
37364func (c *ImagesTestIamPermissionsCall) Header() http.Header {
37365	if c.header_ == nil {
37366		c.header_ = make(http.Header)
37367	}
37368	return c.header_
37369}
37370
37371func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
37372	reqHeaders := make(http.Header)
37373	for k, v := range c.header_ {
37374		reqHeaders[k] = v
37375	}
37376	reqHeaders.Set("User-Agent", c.s.userAgent())
37377	var body io.Reader = nil
37378	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
37379	if err != nil {
37380		return nil, err
37381	}
37382	reqHeaders.Set("Content-Type", "application/json")
37383	c.urlParams_.Set("alt", alt)
37384	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/testIamPermissions")
37385	urls += "?" + c.urlParams_.Encode()
37386	req, _ := http.NewRequest("POST", urls, body)
37387	req.Header = reqHeaders
37388	googleapi.Expand(req.URL, map[string]string{
37389		"project":  c.project,
37390		"resource": c.resource,
37391	})
37392	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37393}
37394
37395// Do executes the "compute.images.testIamPermissions" call.
37396// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
37397// non-2xx status code is an error. Response headers are in either
37398// *TestPermissionsResponse.ServerResponse.Header or (if a response was
37399// returned at all) in error.(*googleapi.Error).Header. Use
37400// googleapi.IsNotModified to check whether the returned error was
37401// because http.StatusNotModified was returned.
37402func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
37403	gensupport.SetOptions(c.urlParams_, opts...)
37404	res, err := c.doRequest("json")
37405	if res != nil && res.StatusCode == http.StatusNotModified {
37406		if res.Body != nil {
37407			res.Body.Close()
37408		}
37409		return nil, &googleapi.Error{
37410			Code:   res.StatusCode,
37411			Header: res.Header,
37412		}
37413	}
37414	if err != nil {
37415		return nil, err
37416	}
37417	defer googleapi.CloseBody(res)
37418	if err := googleapi.CheckResponse(res); err != nil {
37419		return nil, err
37420	}
37421	ret := &TestPermissionsResponse{
37422		ServerResponse: googleapi.ServerResponse{
37423			Header:         res.Header,
37424			HTTPStatusCode: res.StatusCode,
37425		},
37426	}
37427	target := &ret
37428	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
37429		return nil, err
37430	}
37431	return ret, nil
37432	// {
37433	//   "description": "Returns permissions that a caller has on the specified resource.",
37434	//   "httpMethod": "POST",
37435	//   "id": "compute.images.testIamPermissions",
37436	//   "parameterOrder": [
37437	//     "project",
37438	//     "resource"
37439	//   ],
37440	//   "parameters": {
37441	//     "project": {
37442	//       "description": "Project ID for this request.",
37443	//       "location": "path",
37444	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37445	//       "required": true,
37446	//       "type": "string"
37447	//     },
37448	//     "resource": {
37449	//       "description": "Name of the resource for this request.",
37450	//       "location": "path",
37451	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
37452	//       "required": true,
37453	//       "type": "string"
37454	//     }
37455	//   },
37456	//   "path": "{project}/global/images/{resource}/testIamPermissions",
37457	//   "request": {
37458	//     "$ref": "TestPermissionsRequest"
37459	//   },
37460	//   "response": {
37461	//     "$ref": "TestPermissionsResponse"
37462	//   },
37463	//   "scopes": [
37464	//     "https://www.googleapis.com/auth/cloud-platform",
37465	//     "https://www.googleapis.com/auth/compute",
37466	//     "https://www.googleapis.com/auth/compute.readonly"
37467	//   ]
37468	// }
37469
37470}
37471
37472// method id "compute.instanceGroupManagers.abandonInstances":
37473
37474type InstanceGroupManagersAbandonInstancesCall struct {
37475	s                                            *Service
37476	project                                      string
37477	zone                                         string
37478	instanceGroupManager                         string
37479	instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest
37480	urlParams_                                   gensupport.URLParams
37481	ctx_                                         context.Context
37482	header_                                      http.Header
37483}
37484
37485// AbandonInstances: Schedules a group action to remove the specified
37486// instances from the managed instance group. Abandoning an instance
37487// does not delete the instance, but it does remove the instance from
37488// any target pools that are applied by the managed instance group. This
37489// method reduces the targetSize of the managed instance group by the
37490// number of instances that you abandon. This operation is marked as
37491// DONE when the action is scheduled even if the instances have not yet
37492// been removed from the group. You must separately verify the status of
37493// the abandoning action with the listmanagedinstances method.
37494//
37495// If the group is part of a backend service that has enabled connection
37496// draining, it can take up to 60 seconds after the connection draining
37497// duration has elapsed before the VM instance is removed or
37498// deleted.
37499//
37500// You can specify a maximum of 1000 instances with this method per
37501// request.
37502func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall {
37503	c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37504	c.project = project
37505	c.zone = zone
37506	c.instanceGroupManager = instanceGroupManager
37507	c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest
37508	return c
37509}
37510
37511// RequestId sets the optional parameter "requestId": An optional
37512// request ID to identify requests. Specify a unique request ID so that
37513// if you must retry your request, the server will know to ignore the
37514// request if it has already been completed.
37515//
37516// For example, consider a situation where you make an initial request
37517// and the request times out. If you make the request again with the
37518// same request ID, the server can check if original operation with the
37519// same request ID was received, and if so, will ignore the second
37520// request. This prevents clients from accidentally creating duplicate
37521// commitments.
37522//
37523// The request ID must be a valid UUID with the exception that zero UUID
37524// is not supported (00000000-0000-0000-0000-000000000000).
37525func (c *InstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *InstanceGroupManagersAbandonInstancesCall {
37526	c.urlParams_.Set("requestId", requestId)
37527	return c
37528}
37529
37530// Fields allows partial responses to be retrieved. See
37531// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37532// for more information.
37533func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall {
37534	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37535	return c
37536}
37537
37538// Context sets the context to be used in this call's Do method. Any
37539// pending HTTP request will be aborted if the provided context is
37540// canceled.
37541func (c *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall {
37542	c.ctx_ = ctx
37543	return c
37544}
37545
37546// Header returns an http.Header that can be modified by the caller to
37547// add HTTP headers to the request.
37548func (c *InstanceGroupManagersAbandonInstancesCall) Header() http.Header {
37549	if c.header_ == nil {
37550		c.header_ = make(http.Header)
37551	}
37552	return c.header_
37553}
37554
37555func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) {
37556	reqHeaders := make(http.Header)
37557	for k, v := range c.header_ {
37558		reqHeaders[k] = v
37559	}
37560	reqHeaders.Set("User-Agent", c.s.userAgent())
37561	var body io.Reader = nil
37562	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest)
37563	if err != nil {
37564		return nil, err
37565	}
37566	reqHeaders.Set("Content-Type", "application/json")
37567	c.urlParams_.Set("alt", alt)
37568	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances")
37569	urls += "?" + c.urlParams_.Encode()
37570	req, _ := http.NewRequest("POST", urls, body)
37571	req.Header = reqHeaders
37572	googleapi.Expand(req.URL, map[string]string{
37573		"project":              c.project,
37574		"zone":                 c.zone,
37575		"instanceGroupManager": c.instanceGroupManager,
37576	})
37577	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37578}
37579
37580// Do executes the "compute.instanceGroupManagers.abandonInstances" call.
37581// Exactly one of *Operation or error will be non-nil. Any non-2xx
37582// status code is an error. Response headers are in either
37583// *Operation.ServerResponse.Header or (if a response was returned at
37584// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
37585// to check whether the returned error was because
37586// http.StatusNotModified was returned.
37587func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
37588	gensupport.SetOptions(c.urlParams_, opts...)
37589	res, err := c.doRequest("json")
37590	if res != nil && res.StatusCode == http.StatusNotModified {
37591		if res.Body != nil {
37592			res.Body.Close()
37593		}
37594		return nil, &googleapi.Error{
37595			Code:   res.StatusCode,
37596			Header: res.Header,
37597		}
37598	}
37599	if err != nil {
37600		return nil, err
37601	}
37602	defer googleapi.CloseBody(res)
37603	if err := googleapi.CheckResponse(res); err != nil {
37604		return nil, err
37605	}
37606	ret := &Operation{
37607		ServerResponse: googleapi.ServerResponse{
37608			Header:         res.Header,
37609			HTTPStatusCode: res.StatusCode,
37610		},
37611	}
37612	target := &ret
37613	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
37614		return nil, err
37615	}
37616	return ret, nil
37617	// {
37618	//   "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.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.",
37619	//   "httpMethod": "POST",
37620	//   "id": "compute.instanceGroupManagers.abandonInstances",
37621	//   "parameterOrder": [
37622	//     "project",
37623	//     "zone",
37624	//     "instanceGroupManager"
37625	//   ],
37626	//   "parameters": {
37627	//     "instanceGroupManager": {
37628	//       "description": "The name of the managed instance group.",
37629	//       "location": "path",
37630	//       "required": true,
37631	//       "type": "string"
37632	//     },
37633	//     "project": {
37634	//       "description": "Project ID for this request.",
37635	//       "location": "path",
37636	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37637	//       "required": true,
37638	//       "type": "string"
37639	//     },
37640	//     "requestId": {
37641	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
37642	//       "location": "query",
37643	//       "type": "string"
37644	//     },
37645	//     "zone": {
37646	//       "description": "The name of the zone where the managed instance group is located.",
37647	//       "location": "path",
37648	//       "required": true,
37649	//       "type": "string"
37650	//     }
37651	//   },
37652	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances",
37653	//   "request": {
37654	//     "$ref": "InstanceGroupManagersAbandonInstancesRequest"
37655	//   },
37656	//   "response": {
37657	//     "$ref": "Operation"
37658	//   },
37659	//   "scopes": [
37660	//     "https://www.googleapis.com/auth/cloud-platform",
37661	//     "https://www.googleapis.com/auth/compute"
37662	//   ]
37663	// }
37664
37665}
37666
37667// method id "compute.instanceGroupManagers.aggregatedList":
37668
37669type InstanceGroupManagersAggregatedListCall struct {
37670	s            *Service
37671	project      string
37672	urlParams_   gensupport.URLParams
37673	ifNoneMatch_ string
37674	ctx_         context.Context
37675	header_      http.Header
37676}
37677
37678// AggregatedList: Retrieves the list of managed instance groups and
37679// groups them by zone.
37680func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall {
37681	c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37682	c.project = project
37683	return c
37684}
37685
37686// Filter sets the optional parameter "filter": Sets a filter
37687// {expression} for filtering listed resources. Your {expression} must
37688// be in the format: field_name comparison_string literal_string.
37689//
37690// The field_name is the name of the field you want to compare. Only
37691// atomic field types are supported (string, number, boolean). The
37692// comparison_string must be either eq (equals) or ne (not equals). The
37693// literal_string is the string value to filter to. The literal value
37694// must be valid for the type of field you are filtering by (string,
37695// number, boolean). For string fields, the literal value is interpreted
37696// as a regular expression using RE2 syntax. The literal value must
37697// match the entire field.
37698//
37699// For example, to filter for instances that do not have a name of
37700// example-instance, you would use name ne example-instance.
37701//
37702// You can filter on nested fields. For example, you could filter on
37703// instances that have set the scheduling.automaticRestart field to
37704// true. Use filtering on nested fields to take advantage of labels to
37705// organize and search for results based on label values.
37706//
37707// To filter on multiple expressions, provide each separate expression
37708// within parentheses. For example, (scheduling.automaticRestart eq
37709// true) (zone eq us-central1-f). Multiple expressions are treated as
37710// AND expressions, meaning that resources must match all expressions to
37711// pass the filters.
37712func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall {
37713	c.urlParams_.Set("filter", filter)
37714	return c
37715}
37716
37717// MaxResults sets the optional parameter "maxResults": The maximum
37718// number of results per page that should be returned. If the number of
37719// available results is larger than maxResults, Compute Engine returns a
37720// nextPageToken that can be used to get the next page of results in
37721// subsequent list requests. Acceptable values are 0 to 500, inclusive.
37722// (Default: 500)
37723func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall {
37724	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37725	return c
37726}
37727
37728// OrderBy sets the optional parameter "orderBy": Sorts list results by
37729// a certain order. By default, results are returned in alphanumerical
37730// order based on the resource name.
37731//
37732// You can also sort results in descending order based on the creation
37733// timestamp using orderBy="creationTimestamp desc". This sorts results
37734// based on the creationTimestamp field in reverse chronological order
37735// (newest result first). Use this to sort resources like operations so
37736// that the newest operation is returned first.
37737//
37738// Currently, only sorting by name or creationTimestamp desc is
37739// supported.
37740func (c *InstanceGroupManagersAggregatedListCall) OrderBy(orderBy string) *InstanceGroupManagersAggregatedListCall {
37741	c.urlParams_.Set("orderBy", orderBy)
37742	return c
37743}
37744
37745// PageToken sets the optional parameter "pageToken": Specifies a page
37746// token to use. Set pageToken to the nextPageToken returned by a
37747// previous list request to get the next page of results.
37748func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall {
37749	c.urlParams_.Set("pageToken", pageToken)
37750	return c
37751}
37752
37753// Fields allows partial responses to be retrieved. See
37754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37755// for more information.
37756func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall {
37757	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37758	return c
37759}
37760
37761// IfNoneMatch sets the optional parameter which makes the operation
37762// fail if the object's ETag matches the given value. This is useful for
37763// getting updates only after the object has changed since the last
37764// request. Use googleapi.IsNotModified to check whether the response
37765// error from Do is the result of In-None-Match.
37766func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall {
37767	c.ifNoneMatch_ = entityTag
37768	return c
37769}
37770
37771// Context sets the context to be used in this call's Do method. Any
37772// pending HTTP request will be aborted if the provided context is
37773// canceled.
37774func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall {
37775	c.ctx_ = ctx
37776	return c
37777}
37778
37779// Header returns an http.Header that can be modified by the caller to
37780// add HTTP headers to the request.
37781func (c *InstanceGroupManagersAggregatedListCall) Header() http.Header {
37782	if c.header_ == nil {
37783		c.header_ = make(http.Header)
37784	}
37785	return c.header_
37786}
37787
37788func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
37789	reqHeaders := make(http.Header)
37790	for k, v := range c.header_ {
37791		reqHeaders[k] = v
37792	}
37793	reqHeaders.Set("User-Agent", c.s.userAgent())
37794	if c.ifNoneMatch_ != "" {
37795		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
37796	}
37797	var body io.Reader = nil
37798	c.urlParams_.Set("alt", alt)
37799	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroupManagers")
37800	urls += "?" + c.urlParams_.Encode()
37801	req, _ := http.NewRequest("GET", urls, body)
37802	req.Header = reqHeaders
37803	googleapi.Expand(req.URL, map[string]string{
37804		"project": c.project,
37805	})
37806	return gensupport.SendRequest(c.ctx_, c.s.client, req)
37807}
37808
37809// Do executes the "compute.instanceGroupManagers.aggregatedList" call.
37810// Exactly one of *InstanceGroupManagerAggregatedList or error will be
37811// non-nil. Any non-2xx status code is an error. Response headers are in
37812// either *InstanceGroupManagerAggregatedList.ServerResponse.Header or
37813// (if a response was returned at all) in
37814// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
37815// whether the returned error was because http.StatusNotModified was
37816// returned.
37817func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, error) {
37818	gensupport.SetOptions(c.urlParams_, opts...)
37819	res, err := c.doRequest("json")
37820	if res != nil && res.StatusCode == http.StatusNotModified {
37821		if res.Body != nil {
37822			res.Body.Close()
37823		}
37824		return nil, &googleapi.Error{
37825			Code:   res.StatusCode,
37826			Header: res.Header,
37827		}
37828	}
37829	if err != nil {
37830		return nil, err
37831	}
37832	defer googleapi.CloseBody(res)
37833	if err := googleapi.CheckResponse(res); err != nil {
37834		return nil, err
37835	}
37836	ret := &InstanceGroupManagerAggregatedList{
37837		ServerResponse: googleapi.ServerResponse{
37838			Header:         res.Header,
37839			HTTPStatusCode: res.StatusCode,
37840		},
37841	}
37842	target := &ret
37843	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
37844		return nil, err
37845	}
37846	return ret, nil
37847	// {
37848	//   "description": "Retrieves the list of managed instance groups and groups them by zone.",
37849	//   "httpMethod": "GET",
37850	//   "id": "compute.instanceGroupManagers.aggregatedList",
37851	//   "parameterOrder": [
37852	//     "project"
37853	//   ],
37854	//   "parameters": {
37855	//     "filter": {
37856	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
37857	//       "location": "query",
37858	//       "type": "string"
37859	//     },
37860	//     "maxResults": {
37861	//       "default": "500",
37862	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
37863	//       "format": "uint32",
37864	//       "location": "query",
37865	//       "minimum": "0",
37866	//       "type": "integer"
37867	//     },
37868	//     "orderBy": {
37869	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
37870	//       "location": "query",
37871	//       "type": "string"
37872	//     },
37873	//     "pageToken": {
37874	//       "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.",
37875	//       "location": "query",
37876	//       "type": "string"
37877	//     },
37878	//     "project": {
37879	//       "description": "Project ID for this request.",
37880	//       "location": "path",
37881	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37882	//       "required": true,
37883	//       "type": "string"
37884	//     }
37885	//   },
37886	//   "path": "{project}/aggregated/instanceGroupManagers",
37887	//   "response": {
37888	//     "$ref": "InstanceGroupManagerAggregatedList"
37889	//   },
37890	//   "scopes": [
37891	//     "https://www.googleapis.com/auth/cloud-platform",
37892	//     "https://www.googleapis.com/auth/compute",
37893	//     "https://www.googleapis.com/auth/compute.readonly"
37894	//   ]
37895	// }
37896
37897}
37898
37899// Pages invokes f for each page of results.
37900// A non-nil error returned from f will halt the iteration.
37901// The provided context supersedes any context provided to the Context method.
37902func (c *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) error) error {
37903	c.ctx_ = ctx
37904	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37905	for {
37906		x, err := c.Do()
37907		if err != nil {
37908			return err
37909		}
37910		if err := f(x); err != nil {
37911			return err
37912		}
37913		if x.NextPageToken == "" {
37914			return nil
37915		}
37916		c.PageToken(x.NextPageToken)
37917	}
37918}
37919
37920// method id "compute.instanceGroupManagers.delete":
37921
37922type InstanceGroupManagersDeleteCall struct {
37923	s                    *Service
37924	project              string
37925	zone                 string
37926	instanceGroupManager string
37927	urlParams_           gensupport.URLParams
37928	ctx_                 context.Context
37929	header_              http.Header
37930}
37931
37932// Delete: Deletes the specified managed instance group and all of the
37933// instances in that group. Note that the instance group must not belong
37934// to a backend service. Read  Deleting an instance group for more
37935// information.
37936func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall {
37937	c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37938	c.project = project
37939	c.zone = zone
37940	c.instanceGroupManager = instanceGroupManager
37941	return c
37942}
37943
37944// RequestId sets the optional parameter "requestId": An optional
37945// request ID to identify requests. Specify a unique request ID so that
37946// if you must retry your request, the server will know to ignore the
37947// request if it has already been completed.
37948//
37949// For example, consider a situation where you make an initial request
37950// and the request times out. If you make the request again with the
37951// same request ID, the server can check if original operation with the
37952// same request ID was received, and if so, will ignore the second
37953// request. This prevents clients from accidentally creating duplicate
37954// commitments.
37955//
37956// The request ID must be a valid UUID with the exception that zero UUID
37957// is not supported (00000000-0000-0000-0000-000000000000).
37958func (c *InstanceGroupManagersDeleteCall) RequestId(requestId string) *InstanceGroupManagersDeleteCall {
37959	c.urlParams_.Set("requestId", requestId)
37960	return c
37961}
37962
37963// Fields allows partial responses to be retrieved. See
37964// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37965// for more information.
37966func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall {
37967	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37968	return c
37969}
37970
37971// Context sets the context to be used in this call's Do method. Any
37972// pending HTTP request will be aborted if the provided context is
37973// canceled.
37974func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall {
37975	c.ctx_ = ctx
37976	return c
37977}
37978
37979// Header returns an http.Header that can be modified by the caller to
37980// add HTTP headers to the request.
37981func (c *InstanceGroupManagersDeleteCall) Header() http.Header {
37982	if c.header_ == nil {
37983		c.header_ = make(http.Header)
37984	}
37985	return c.header_
37986}
37987
37988func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) {
37989	reqHeaders := make(http.Header)
37990	for k, v := range c.header_ {
37991		reqHeaders[k] = v
37992	}
37993	reqHeaders.Set("User-Agent", c.s.userAgent())
37994	var body io.Reader = nil
37995	c.urlParams_.Set("alt", alt)
37996	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}")
37997	urls += "?" + c.urlParams_.Encode()
37998	req, _ := http.NewRequest("DELETE", urls, body)
37999	req.Header = reqHeaders
38000	googleapi.Expand(req.URL, map[string]string{
38001		"project":              c.project,
38002		"zone":                 c.zone,
38003		"instanceGroupManager": c.instanceGroupManager,
38004	})
38005	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38006}
38007
38008// Do executes the "compute.instanceGroupManagers.delete" call.
38009// Exactly one of *Operation or error will be non-nil. Any non-2xx
38010// status code is an error. Response headers are in either
38011// *Operation.ServerResponse.Header or (if a response was returned at
38012// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38013// to check whether the returned error was because
38014// http.StatusNotModified was returned.
38015func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
38016	gensupport.SetOptions(c.urlParams_, opts...)
38017	res, err := c.doRequest("json")
38018	if res != nil && res.StatusCode == http.StatusNotModified {
38019		if res.Body != nil {
38020			res.Body.Close()
38021		}
38022		return nil, &googleapi.Error{
38023			Code:   res.StatusCode,
38024			Header: res.Header,
38025		}
38026	}
38027	if err != nil {
38028		return nil, err
38029	}
38030	defer googleapi.CloseBody(res)
38031	if err := googleapi.CheckResponse(res); err != nil {
38032		return nil, err
38033	}
38034	ret := &Operation{
38035		ServerResponse: googleapi.ServerResponse{
38036			Header:         res.Header,
38037			HTTPStatusCode: res.StatusCode,
38038		},
38039	}
38040	target := &ret
38041	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
38042		return nil, err
38043	}
38044	return ret, nil
38045	// {
38046	//   "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.",
38047	//   "httpMethod": "DELETE",
38048	//   "id": "compute.instanceGroupManagers.delete",
38049	//   "parameterOrder": [
38050	//     "project",
38051	//     "zone",
38052	//     "instanceGroupManager"
38053	//   ],
38054	//   "parameters": {
38055	//     "instanceGroupManager": {
38056	//       "description": "The name of the managed instance group to delete.",
38057	//       "location": "path",
38058	//       "required": true,
38059	//       "type": "string"
38060	//     },
38061	//     "project": {
38062	//       "description": "Project ID for this request.",
38063	//       "location": "path",
38064	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38065	//       "required": true,
38066	//       "type": "string"
38067	//     },
38068	//     "requestId": {
38069	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
38070	//       "location": "query",
38071	//       "type": "string"
38072	//     },
38073	//     "zone": {
38074	//       "description": "The name of the zone where the managed instance group is located.",
38075	//       "location": "path",
38076	//       "required": true,
38077	//       "type": "string"
38078	//     }
38079	//   },
38080	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
38081	//   "response": {
38082	//     "$ref": "Operation"
38083	//   },
38084	//   "scopes": [
38085	//     "https://www.googleapis.com/auth/cloud-platform",
38086	//     "https://www.googleapis.com/auth/compute"
38087	//   ]
38088	// }
38089
38090}
38091
38092// method id "compute.instanceGroupManagers.deleteInstances":
38093
38094type InstanceGroupManagersDeleteInstancesCall struct {
38095	s                                           *Service
38096	project                                     string
38097	zone                                        string
38098	instanceGroupManager                        string
38099	instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest
38100	urlParams_                                  gensupport.URLParams
38101	ctx_                                        context.Context
38102	header_                                     http.Header
38103}
38104
38105// DeleteInstances: Schedules a group action to delete the specified
38106// instances in the managed instance group. The instances are also
38107// removed from any target pools of which they were a member. This
38108// method reduces the targetSize of the managed instance group by the
38109// number of instances that you delete. This operation is marked as DONE
38110// when the action is scheduled even if the instances are still being
38111// deleted. You must separately verify the status of the deleting action
38112// with the listmanagedinstances method.
38113//
38114// If the group is part of a backend service that has enabled connection
38115// draining, it can take up to 60 seconds after the connection draining
38116// duration has elapsed before the VM instance is removed or
38117// deleted.
38118//
38119// You can specify a maximum of 1000 instances with this method per
38120// request.
38121func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall {
38122	c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38123	c.project = project
38124	c.zone = zone
38125	c.instanceGroupManager = instanceGroupManager
38126	c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest
38127	return c
38128}
38129
38130// RequestId sets the optional parameter "requestId": An optional
38131// request ID to identify requests. Specify a unique request ID so that
38132// if you must retry your request, the server will know to ignore the
38133// request if it has already been completed.
38134//
38135// For example, consider a situation where you make an initial request
38136// and the request times out. If you make the request again with the
38137// same request ID, the server can check if original operation with the
38138// same request ID was received, and if so, will ignore the second
38139// request. This prevents clients from accidentally creating duplicate
38140// commitments.
38141//
38142// The request ID must be a valid UUID with the exception that zero UUID
38143// is not supported (00000000-0000-0000-0000-000000000000).
38144func (c *InstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *InstanceGroupManagersDeleteInstancesCall {
38145	c.urlParams_.Set("requestId", requestId)
38146	return c
38147}
38148
38149// Fields allows partial responses to be retrieved. See
38150// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38151// for more information.
38152func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall {
38153	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38154	return c
38155}
38156
38157// Context sets the context to be used in this call's Do method. Any
38158// pending HTTP request will be aborted if the provided context is
38159// canceled.
38160func (c *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall {
38161	c.ctx_ = ctx
38162	return c
38163}
38164
38165// Header returns an http.Header that can be modified by the caller to
38166// add HTTP headers to the request.
38167func (c *InstanceGroupManagersDeleteInstancesCall) Header() http.Header {
38168	if c.header_ == nil {
38169		c.header_ = make(http.Header)
38170	}
38171	return c.header_
38172}
38173
38174func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) {
38175	reqHeaders := make(http.Header)
38176	for k, v := range c.header_ {
38177		reqHeaders[k] = v
38178	}
38179	reqHeaders.Set("User-Agent", c.s.userAgent())
38180	var body io.Reader = nil
38181	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest)
38182	if err != nil {
38183		return nil, err
38184	}
38185	reqHeaders.Set("Content-Type", "application/json")
38186	c.urlParams_.Set("alt", alt)
38187	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances")
38188	urls += "?" + c.urlParams_.Encode()
38189	req, _ := http.NewRequest("POST", urls, body)
38190	req.Header = reqHeaders
38191	googleapi.Expand(req.URL, map[string]string{
38192		"project":              c.project,
38193		"zone":                 c.zone,
38194		"instanceGroupManager": c.instanceGroupManager,
38195	})
38196	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38197}
38198
38199// Do executes the "compute.instanceGroupManagers.deleteInstances" call.
38200// Exactly one of *Operation or error will be non-nil. Any non-2xx
38201// status code is an error. Response headers are in either
38202// *Operation.ServerResponse.Header or (if a response was returned at
38203// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38204// to check whether the returned error was because
38205// http.StatusNotModified was returned.
38206func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
38207	gensupport.SetOptions(c.urlParams_, opts...)
38208	res, err := c.doRequest("json")
38209	if res != nil && res.StatusCode == http.StatusNotModified {
38210		if res.Body != nil {
38211			res.Body.Close()
38212		}
38213		return nil, &googleapi.Error{
38214			Code:   res.StatusCode,
38215			Header: res.Header,
38216		}
38217	}
38218	if err != nil {
38219		return nil, err
38220	}
38221	defer googleapi.CloseBody(res)
38222	if err := googleapi.CheckResponse(res); err != nil {
38223		return nil, err
38224	}
38225	ret := &Operation{
38226		ServerResponse: googleapi.ServerResponse{
38227			Header:         res.Header,
38228			HTTPStatusCode: res.StatusCode,
38229		},
38230	}
38231	target := &ret
38232	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
38233		return nil, err
38234	}
38235	return ret, nil
38236	// {
38237	//   "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.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.",
38238	//   "httpMethod": "POST",
38239	//   "id": "compute.instanceGroupManagers.deleteInstances",
38240	//   "parameterOrder": [
38241	//     "project",
38242	//     "zone",
38243	//     "instanceGroupManager"
38244	//   ],
38245	//   "parameters": {
38246	//     "instanceGroupManager": {
38247	//       "description": "The name of the managed instance group.",
38248	//       "location": "path",
38249	//       "required": true,
38250	//       "type": "string"
38251	//     },
38252	//     "project": {
38253	//       "description": "Project ID for this request.",
38254	//       "location": "path",
38255	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38256	//       "required": true,
38257	//       "type": "string"
38258	//     },
38259	//     "requestId": {
38260	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
38261	//       "location": "query",
38262	//       "type": "string"
38263	//     },
38264	//     "zone": {
38265	//       "description": "The name of the zone where the managed instance group is located.",
38266	//       "location": "path",
38267	//       "required": true,
38268	//       "type": "string"
38269	//     }
38270	//   },
38271	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances",
38272	//   "request": {
38273	//     "$ref": "InstanceGroupManagersDeleteInstancesRequest"
38274	//   },
38275	//   "response": {
38276	//     "$ref": "Operation"
38277	//   },
38278	//   "scopes": [
38279	//     "https://www.googleapis.com/auth/cloud-platform",
38280	//     "https://www.googleapis.com/auth/compute"
38281	//   ]
38282	// }
38283
38284}
38285
38286// method id "compute.instanceGroupManagers.get":
38287
38288type InstanceGroupManagersGetCall struct {
38289	s                    *Service
38290	project              string
38291	zone                 string
38292	instanceGroupManager string
38293	urlParams_           gensupport.URLParams
38294	ifNoneMatch_         string
38295	ctx_                 context.Context
38296	header_              http.Header
38297}
38298
38299// Get: Returns all of the details about the specified managed instance
38300// group. Get a list of available managed instance groups by making a
38301// list() request.
38302func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall {
38303	c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38304	c.project = project
38305	c.zone = zone
38306	c.instanceGroupManager = instanceGroupManager
38307	return c
38308}
38309
38310// Fields allows partial responses to be retrieved. See
38311// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38312// for more information.
38313func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall {
38314	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38315	return c
38316}
38317
38318// IfNoneMatch sets the optional parameter which makes the operation
38319// fail if the object's ETag matches the given value. This is useful for
38320// getting updates only after the object has changed since the last
38321// request. Use googleapi.IsNotModified to check whether the response
38322// error from Do is the result of In-None-Match.
38323func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall {
38324	c.ifNoneMatch_ = entityTag
38325	return c
38326}
38327
38328// Context sets the context to be used in this call's Do method. Any
38329// pending HTTP request will be aborted if the provided context is
38330// canceled.
38331func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall {
38332	c.ctx_ = ctx
38333	return c
38334}
38335
38336// Header returns an http.Header that can be modified by the caller to
38337// add HTTP headers to the request.
38338func (c *InstanceGroupManagersGetCall) Header() http.Header {
38339	if c.header_ == nil {
38340		c.header_ = make(http.Header)
38341	}
38342	return c.header_
38343}
38344
38345func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) {
38346	reqHeaders := make(http.Header)
38347	for k, v := range c.header_ {
38348		reqHeaders[k] = v
38349	}
38350	reqHeaders.Set("User-Agent", c.s.userAgent())
38351	if c.ifNoneMatch_ != "" {
38352		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38353	}
38354	var body io.Reader = nil
38355	c.urlParams_.Set("alt", alt)
38356	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}")
38357	urls += "?" + c.urlParams_.Encode()
38358	req, _ := http.NewRequest("GET", urls, body)
38359	req.Header = reqHeaders
38360	googleapi.Expand(req.URL, map[string]string{
38361		"project":              c.project,
38362		"zone":                 c.zone,
38363		"instanceGroupManager": c.instanceGroupManager,
38364	})
38365	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38366}
38367
38368// Do executes the "compute.instanceGroupManagers.get" call.
38369// Exactly one of *InstanceGroupManager or error will be non-nil. Any
38370// non-2xx status code is an error. Response headers are in either
38371// *InstanceGroupManager.ServerResponse.Header or (if a response was
38372// returned at all) in error.(*googleapi.Error).Header. Use
38373// googleapi.IsNotModified to check whether the returned error was
38374// because http.StatusNotModified was returned.
38375func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) {
38376	gensupport.SetOptions(c.urlParams_, opts...)
38377	res, err := c.doRequest("json")
38378	if res != nil && res.StatusCode == http.StatusNotModified {
38379		if res.Body != nil {
38380			res.Body.Close()
38381		}
38382		return nil, &googleapi.Error{
38383			Code:   res.StatusCode,
38384			Header: res.Header,
38385		}
38386	}
38387	if err != nil {
38388		return nil, err
38389	}
38390	defer googleapi.CloseBody(res)
38391	if err := googleapi.CheckResponse(res); err != nil {
38392		return nil, err
38393	}
38394	ret := &InstanceGroupManager{
38395		ServerResponse: googleapi.ServerResponse{
38396			Header:         res.Header,
38397			HTTPStatusCode: res.StatusCode,
38398		},
38399	}
38400	target := &ret
38401	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
38402		return nil, err
38403	}
38404	return ret, nil
38405	// {
38406	//   "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.",
38407	//   "httpMethod": "GET",
38408	//   "id": "compute.instanceGroupManagers.get",
38409	//   "parameterOrder": [
38410	//     "project",
38411	//     "zone",
38412	//     "instanceGroupManager"
38413	//   ],
38414	//   "parameters": {
38415	//     "instanceGroupManager": {
38416	//       "description": "The name of the managed instance group.",
38417	//       "location": "path",
38418	//       "required": true,
38419	//       "type": "string"
38420	//     },
38421	//     "project": {
38422	//       "description": "Project ID for this request.",
38423	//       "location": "path",
38424	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38425	//       "required": true,
38426	//       "type": "string"
38427	//     },
38428	//     "zone": {
38429	//       "description": "The name of the zone where the managed instance group is located.",
38430	//       "location": "path",
38431	//       "required": true,
38432	//       "type": "string"
38433	//     }
38434	//   },
38435	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
38436	//   "response": {
38437	//     "$ref": "InstanceGroupManager"
38438	//   },
38439	//   "scopes": [
38440	//     "https://www.googleapis.com/auth/cloud-platform",
38441	//     "https://www.googleapis.com/auth/compute",
38442	//     "https://www.googleapis.com/auth/compute.readonly"
38443	//   ]
38444	// }
38445
38446}
38447
38448// method id "compute.instanceGroupManagers.insert":
38449
38450type InstanceGroupManagersInsertCall struct {
38451	s                    *Service
38452	project              string
38453	zone                 string
38454	instancegroupmanager *InstanceGroupManager
38455	urlParams_           gensupport.URLParams
38456	ctx_                 context.Context
38457	header_              http.Header
38458}
38459
38460// Insert: Creates a managed instance group using the information that
38461// you specify in the request. After the group is created, it schedules
38462// an action to create instances in the group using the specified
38463// instance template. This operation is marked as DONE when the group is
38464// created even if the instances in the group have not yet been created.
38465// You must separately verify the status of the individual instances
38466// with the listmanagedinstances method.
38467//
38468// A managed instance group can have up to 1000 VM instances per group.
38469// Please contact Cloud Support if you need an increase in this limit.
38470func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall {
38471	c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38472	c.project = project
38473	c.zone = zone
38474	c.instancegroupmanager = instancegroupmanager
38475	return c
38476}
38477
38478// RequestId sets the optional parameter "requestId": An optional
38479// request ID to identify requests. Specify a unique request ID so that
38480// if you must retry your request, the server will know to ignore the
38481// request if it has already been completed.
38482//
38483// For example, consider a situation where you make an initial request
38484// and the request times out. If you make the request again with the
38485// same request ID, the server can check if original operation with the
38486// same request ID was received, and if so, will ignore the second
38487// request. This prevents clients from accidentally creating duplicate
38488// commitments.
38489//
38490// The request ID must be a valid UUID with the exception that zero UUID
38491// is not supported (00000000-0000-0000-0000-000000000000).
38492func (c *InstanceGroupManagersInsertCall) RequestId(requestId string) *InstanceGroupManagersInsertCall {
38493	c.urlParams_.Set("requestId", requestId)
38494	return c
38495}
38496
38497// Fields allows partial responses to be retrieved. See
38498// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38499// for more information.
38500func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall {
38501	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38502	return c
38503}
38504
38505// Context sets the context to be used in this call's Do method. Any
38506// pending HTTP request will be aborted if the provided context is
38507// canceled.
38508func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall {
38509	c.ctx_ = ctx
38510	return c
38511}
38512
38513// Header returns an http.Header that can be modified by the caller to
38514// add HTTP headers to the request.
38515func (c *InstanceGroupManagersInsertCall) Header() http.Header {
38516	if c.header_ == nil {
38517		c.header_ = make(http.Header)
38518	}
38519	return c.header_
38520}
38521
38522func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) {
38523	reqHeaders := make(http.Header)
38524	for k, v := range c.header_ {
38525		reqHeaders[k] = v
38526	}
38527	reqHeaders.Set("User-Agent", c.s.userAgent())
38528	var body io.Reader = nil
38529	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
38530	if err != nil {
38531		return nil, err
38532	}
38533	reqHeaders.Set("Content-Type", "application/json")
38534	c.urlParams_.Set("alt", alt)
38535	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers")
38536	urls += "?" + c.urlParams_.Encode()
38537	req, _ := http.NewRequest("POST", urls, body)
38538	req.Header = reqHeaders
38539	googleapi.Expand(req.URL, map[string]string{
38540		"project": c.project,
38541		"zone":    c.zone,
38542	})
38543	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38544}
38545
38546// Do executes the "compute.instanceGroupManagers.insert" call.
38547// Exactly one of *Operation or error will be non-nil. Any non-2xx
38548// status code is an error. Response headers are in either
38549// *Operation.ServerResponse.Header or (if a response was returned at
38550// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38551// to check whether the returned error was because
38552// http.StatusNotModified was returned.
38553func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
38554	gensupport.SetOptions(c.urlParams_, opts...)
38555	res, err := c.doRequest("json")
38556	if res != nil && res.StatusCode == http.StatusNotModified {
38557		if res.Body != nil {
38558			res.Body.Close()
38559		}
38560		return nil, &googleapi.Error{
38561			Code:   res.StatusCode,
38562			Header: res.Header,
38563		}
38564	}
38565	if err != nil {
38566		return nil, err
38567	}
38568	defer googleapi.CloseBody(res)
38569	if err := googleapi.CheckResponse(res); err != nil {
38570		return nil, err
38571	}
38572	ret := &Operation{
38573		ServerResponse: googleapi.ServerResponse{
38574			Header:         res.Header,
38575			HTTPStatusCode: res.StatusCode,
38576		},
38577	}
38578	target := &ret
38579	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
38580		return nil, err
38581	}
38582	return ret, nil
38583	// {
38584	//   "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.\n\nA managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.",
38585	//   "httpMethod": "POST",
38586	//   "id": "compute.instanceGroupManagers.insert",
38587	//   "parameterOrder": [
38588	//     "project",
38589	//     "zone"
38590	//   ],
38591	//   "parameters": {
38592	//     "project": {
38593	//       "description": "Project ID for this request.",
38594	//       "location": "path",
38595	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38596	//       "required": true,
38597	//       "type": "string"
38598	//     },
38599	//     "requestId": {
38600	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
38601	//       "location": "query",
38602	//       "type": "string"
38603	//     },
38604	//     "zone": {
38605	//       "description": "The name of the zone where you want to create the managed instance group.",
38606	//       "location": "path",
38607	//       "required": true,
38608	//       "type": "string"
38609	//     }
38610	//   },
38611	//   "path": "{project}/zones/{zone}/instanceGroupManagers",
38612	//   "request": {
38613	//     "$ref": "InstanceGroupManager"
38614	//   },
38615	//   "response": {
38616	//     "$ref": "Operation"
38617	//   },
38618	//   "scopes": [
38619	//     "https://www.googleapis.com/auth/cloud-platform",
38620	//     "https://www.googleapis.com/auth/compute"
38621	//   ]
38622	// }
38623
38624}
38625
38626// method id "compute.instanceGroupManagers.list":
38627
38628type InstanceGroupManagersListCall struct {
38629	s            *Service
38630	project      string
38631	zone         string
38632	urlParams_   gensupport.URLParams
38633	ifNoneMatch_ string
38634	ctx_         context.Context
38635	header_      http.Header
38636}
38637
38638// List: Retrieves a list of managed instance groups that are contained
38639// within the specified project and zone.
38640func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall {
38641	c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38642	c.project = project
38643	c.zone = zone
38644	return c
38645}
38646
38647// Filter sets the optional parameter "filter": Sets a filter
38648// {expression} for filtering listed resources. Your {expression} must
38649// be in the format: field_name comparison_string literal_string.
38650//
38651// The field_name is the name of the field you want to compare. Only
38652// atomic field types are supported (string, number, boolean). The
38653// comparison_string must be either eq (equals) or ne (not equals). The
38654// literal_string is the string value to filter to. The literal value
38655// must be valid for the type of field you are filtering by (string,
38656// number, boolean). For string fields, the literal value is interpreted
38657// as a regular expression using RE2 syntax. The literal value must
38658// match the entire field.
38659//
38660// For example, to filter for instances that do not have a name of
38661// example-instance, you would use name ne example-instance.
38662//
38663// You can filter on nested fields. For example, you could filter on
38664// instances that have set the scheduling.automaticRestart field to
38665// true. Use filtering on nested fields to take advantage of labels to
38666// organize and search for results based on label values.
38667//
38668// To filter on multiple expressions, provide each separate expression
38669// within parentheses. For example, (scheduling.automaticRestart eq
38670// true) (zone eq us-central1-f). Multiple expressions are treated as
38671// AND expressions, meaning that resources must match all expressions to
38672// pass the filters.
38673func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall {
38674	c.urlParams_.Set("filter", filter)
38675	return c
38676}
38677
38678// MaxResults sets the optional parameter "maxResults": The maximum
38679// number of results per page that should be returned. If the number of
38680// available results is larger than maxResults, Compute Engine returns a
38681// nextPageToken that can be used to get the next page of results in
38682// subsequent list requests. Acceptable values are 0 to 500, inclusive.
38683// (Default: 500)
38684func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall {
38685	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38686	return c
38687}
38688
38689// OrderBy sets the optional parameter "orderBy": Sorts list results by
38690// a certain order. By default, results are returned in alphanumerical
38691// order based on the resource name.
38692//
38693// You can also sort results in descending order based on the creation
38694// timestamp using orderBy="creationTimestamp desc". This sorts results
38695// based on the creationTimestamp field in reverse chronological order
38696// (newest result first). Use this to sort resources like operations so
38697// that the newest operation is returned first.
38698//
38699// Currently, only sorting by name or creationTimestamp desc is
38700// supported.
38701func (c *InstanceGroupManagersListCall) OrderBy(orderBy string) *InstanceGroupManagersListCall {
38702	c.urlParams_.Set("orderBy", orderBy)
38703	return c
38704}
38705
38706// PageToken sets the optional parameter "pageToken": Specifies a page
38707// token to use. Set pageToken to the nextPageToken returned by a
38708// previous list request to get the next page of results.
38709func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall {
38710	c.urlParams_.Set("pageToken", pageToken)
38711	return c
38712}
38713
38714// Fields allows partial responses to be retrieved. See
38715// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38716// for more information.
38717func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall {
38718	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38719	return c
38720}
38721
38722// IfNoneMatch sets the optional parameter which makes the operation
38723// fail if the object's ETag matches the given value. This is useful for
38724// getting updates only after the object has changed since the last
38725// request. Use googleapi.IsNotModified to check whether the response
38726// error from Do is the result of In-None-Match.
38727func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall {
38728	c.ifNoneMatch_ = entityTag
38729	return c
38730}
38731
38732// Context sets the context to be used in this call's Do method. Any
38733// pending HTTP request will be aborted if the provided context is
38734// canceled.
38735func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall {
38736	c.ctx_ = ctx
38737	return c
38738}
38739
38740// Header returns an http.Header that can be modified by the caller to
38741// add HTTP headers to the request.
38742func (c *InstanceGroupManagersListCall) Header() http.Header {
38743	if c.header_ == nil {
38744		c.header_ = make(http.Header)
38745	}
38746	return c.header_
38747}
38748
38749func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) {
38750	reqHeaders := make(http.Header)
38751	for k, v := range c.header_ {
38752		reqHeaders[k] = v
38753	}
38754	reqHeaders.Set("User-Agent", c.s.userAgent())
38755	if c.ifNoneMatch_ != "" {
38756		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
38757	}
38758	var body io.Reader = nil
38759	c.urlParams_.Set("alt", alt)
38760	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers")
38761	urls += "?" + c.urlParams_.Encode()
38762	req, _ := http.NewRequest("GET", urls, body)
38763	req.Header = reqHeaders
38764	googleapi.Expand(req.URL, map[string]string{
38765		"project": c.project,
38766		"zone":    c.zone,
38767	})
38768	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38769}
38770
38771// Do executes the "compute.instanceGroupManagers.list" call.
38772// Exactly one of *InstanceGroupManagerList or error will be non-nil.
38773// Any non-2xx status code is an error. Response headers are in either
38774// *InstanceGroupManagerList.ServerResponse.Header or (if a response was
38775// returned at all) in error.(*googleapi.Error).Header. Use
38776// googleapi.IsNotModified to check whether the returned error was
38777// because http.StatusNotModified was returned.
38778func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, error) {
38779	gensupport.SetOptions(c.urlParams_, opts...)
38780	res, err := c.doRequest("json")
38781	if res != nil && res.StatusCode == http.StatusNotModified {
38782		if res.Body != nil {
38783			res.Body.Close()
38784		}
38785		return nil, &googleapi.Error{
38786			Code:   res.StatusCode,
38787			Header: res.Header,
38788		}
38789	}
38790	if err != nil {
38791		return nil, err
38792	}
38793	defer googleapi.CloseBody(res)
38794	if err := googleapi.CheckResponse(res); err != nil {
38795		return nil, err
38796	}
38797	ret := &InstanceGroupManagerList{
38798		ServerResponse: googleapi.ServerResponse{
38799			Header:         res.Header,
38800			HTTPStatusCode: res.StatusCode,
38801		},
38802	}
38803	target := &ret
38804	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
38805		return nil, err
38806	}
38807	return ret, nil
38808	// {
38809	//   "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.",
38810	//   "httpMethod": "GET",
38811	//   "id": "compute.instanceGroupManagers.list",
38812	//   "parameterOrder": [
38813	//     "project",
38814	//     "zone"
38815	//   ],
38816	//   "parameters": {
38817	//     "filter": {
38818	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
38819	//       "location": "query",
38820	//       "type": "string"
38821	//     },
38822	//     "maxResults": {
38823	//       "default": "500",
38824	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
38825	//       "format": "uint32",
38826	//       "location": "query",
38827	//       "minimum": "0",
38828	//       "type": "integer"
38829	//     },
38830	//     "orderBy": {
38831	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
38832	//       "location": "query",
38833	//       "type": "string"
38834	//     },
38835	//     "pageToken": {
38836	//       "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.",
38837	//       "location": "query",
38838	//       "type": "string"
38839	//     },
38840	//     "project": {
38841	//       "description": "Project ID for this request.",
38842	//       "location": "path",
38843	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38844	//       "required": true,
38845	//       "type": "string"
38846	//     },
38847	//     "zone": {
38848	//       "description": "The name of the zone where the managed instance group is located.",
38849	//       "location": "path",
38850	//       "required": true,
38851	//       "type": "string"
38852	//     }
38853	//   },
38854	//   "path": "{project}/zones/{zone}/instanceGroupManagers",
38855	//   "response": {
38856	//     "$ref": "InstanceGroupManagerList"
38857	//   },
38858	//   "scopes": [
38859	//     "https://www.googleapis.com/auth/cloud-platform",
38860	//     "https://www.googleapis.com/auth/compute",
38861	//     "https://www.googleapis.com/auth/compute.readonly"
38862	//   ]
38863	// }
38864
38865}
38866
38867// Pages invokes f for each page of results.
38868// A non-nil error returned from f will halt the iteration.
38869// The provided context supersedes any context provided to the Context method.
38870func (c *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error {
38871	c.ctx_ = ctx
38872	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38873	for {
38874		x, err := c.Do()
38875		if err != nil {
38876			return err
38877		}
38878		if err := f(x); err != nil {
38879			return err
38880		}
38881		if x.NextPageToken == "" {
38882			return nil
38883		}
38884		c.PageToken(x.NextPageToken)
38885	}
38886}
38887
38888// method id "compute.instanceGroupManagers.listManagedInstances":
38889
38890type InstanceGroupManagersListManagedInstancesCall struct {
38891	s                    *Service
38892	project              string
38893	zone                 string
38894	instanceGroupManager string
38895	urlParams_           gensupport.URLParams
38896	ctx_                 context.Context
38897	header_              http.Header
38898}
38899
38900// ListManagedInstances: Lists all of the instances in the managed
38901// instance group. Each instance in the list has a currentAction, which
38902// indicates the action that the managed instance group is performing on
38903// the instance. For example, if the group is still creating an
38904// instance, the currentAction is CREATING. If a previous action failed,
38905// the list displays the errors for that failed action.
38906func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall {
38907	c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38908	c.project = project
38909	c.zone = zone
38910	c.instanceGroupManager = instanceGroupManager
38911	return c
38912}
38913
38914// Filter sets the optional parameter "filter":
38915func (c *InstanceGroupManagersListManagedInstancesCall) Filter(filter string) *InstanceGroupManagersListManagedInstancesCall {
38916	c.urlParams_.Set("filter", filter)
38917	return c
38918}
38919
38920// MaxResults sets the optional parameter "maxResults":
38921func (c *InstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *InstanceGroupManagersListManagedInstancesCall {
38922	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38923	return c
38924}
38925
38926// OrderBy sets the optional parameter "order_by":
38927func (c *InstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *InstanceGroupManagersListManagedInstancesCall {
38928	c.urlParams_.Set("order_by", orderBy)
38929	return c
38930}
38931
38932// PageToken sets the optional parameter "pageToken":
38933func (c *InstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *InstanceGroupManagersListManagedInstancesCall {
38934	c.urlParams_.Set("pageToken", pageToken)
38935	return c
38936}
38937
38938// Fields allows partial responses to be retrieved. See
38939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38940// for more information.
38941func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall {
38942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38943	return c
38944}
38945
38946// Context sets the context to be used in this call's Do method. Any
38947// pending HTTP request will be aborted if the provided context is
38948// canceled.
38949func (c *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall {
38950	c.ctx_ = ctx
38951	return c
38952}
38953
38954// Header returns an http.Header that can be modified by the caller to
38955// add HTTP headers to the request.
38956func (c *InstanceGroupManagersListManagedInstancesCall) Header() http.Header {
38957	if c.header_ == nil {
38958		c.header_ = make(http.Header)
38959	}
38960	return c.header_
38961}
38962
38963func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) {
38964	reqHeaders := make(http.Header)
38965	for k, v := range c.header_ {
38966		reqHeaders[k] = v
38967	}
38968	reqHeaders.Set("User-Agent", c.s.userAgent())
38969	var body io.Reader = nil
38970	c.urlParams_.Set("alt", alt)
38971	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances")
38972	urls += "?" + c.urlParams_.Encode()
38973	req, _ := http.NewRequest("POST", urls, body)
38974	req.Header = reqHeaders
38975	googleapi.Expand(req.URL, map[string]string{
38976		"project":              c.project,
38977		"zone":                 c.zone,
38978		"instanceGroupManager": c.instanceGroupManager,
38979	})
38980	return gensupport.SendRequest(c.ctx_, c.s.client, req)
38981}
38982
38983// Do executes the "compute.instanceGroupManagers.listManagedInstances" call.
38984// Exactly one of *InstanceGroupManagersListManagedInstancesResponse or
38985// error will be non-nil. Any non-2xx status code is an error. Response
38986// headers are in either
38987// *InstanceGroupManagersListManagedInstancesResponse.ServerResponse.Head
38988// er or (if a response was returned at all) in
38989// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
38990// whether the returned error was because http.StatusNotModified was
38991// returned.
38992func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, error) {
38993	gensupport.SetOptions(c.urlParams_, opts...)
38994	res, err := c.doRequest("json")
38995	if res != nil && res.StatusCode == http.StatusNotModified {
38996		if res.Body != nil {
38997			res.Body.Close()
38998		}
38999		return nil, &googleapi.Error{
39000			Code:   res.StatusCode,
39001			Header: res.Header,
39002		}
39003	}
39004	if err != nil {
39005		return nil, err
39006	}
39007	defer googleapi.CloseBody(res)
39008	if err := googleapi.CheckResponse(res); err != nil {
39009		return nil, err
39010	}
39011	ret := &InstanceGroupManagersListManagedInstancesResponse{
39012		ServerResponse: googleapi.ServerResponse{
39013			Header:         res.Header,
39014			HTTPStatusCode: res.StatusCode,
39015		},
39016	}
39017	target := &ret
39018	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
39019		return nil, err
39020	}
39021	return ret, nil
39022	// {
39023	//   "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.",
39024	//   "httpMethod": "POST",
39025	//   "id": "compute.instanceGroupManagers.listManagedInstances",
39026	//   "parameterOrder": [
39027	//     "project",
39028	//     "zone",
39029	//     "instanceGroupManager"
39030	//   ],
39031	//   "parameters": {
39032	//     "filter": {
39033	//       "location": "query",
39034	//       "type": "string"
39035	//     },
39036	//     "instanceGroupManager": {
39037	//       "description": "The name of the managed instance group.",
39038	//       "location": "path",
39039	//       "required": true,
39040	//       "type": "string"
39041	//     },
39042	//     "maxResults": {
39043	//       "default": "500",
39044	//       "format": "uint32",
39045	//       "location": "query",
39046	//       "minimum": "0",
39047	//       "type": "integer"
39048	//     },
39049	//     "order_by": {
39050	//       "location": "query",
39051	//       "type": "string"
39052	//     },
39053	//     "pageToken": {
39054	//       "location": "query",
39055	//       "type": "string"
39056	//     },
39057	//     "project": {
39058	//       "description": "Project ID for this request.",
39059	//       "location": "path",
39060	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39061	//       "required": true,
39062	//       "type": "string"
39063	//     },
39064	//     "zone": {
39065	//       "description": "The name of the zone where the managed instance group is located.",
39066	//       "location": "path",
39067	//       "required": true,
39068	//       "type": "string"
39069	//     }
39070	//   },
39071	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances",
39072	//   "response": {
39073	//     "$ref": "InstanceGroupManagersListManagedInstancesResponse"
39074	//   },
39075	//   "scopes": [
39076	//     "https://www.googleapis.com/auth/cloud-platform",
39077	//     "https://www.googleapis.com/auth/compute",
39078	//     "https://www.googleapis.com/auth/compute.readonly"
39079	//   ]
39080	// }
39081
39082}
39083
39084// Pages invokes f for each page of results.
39085// A non-nil error returned from f will halt the iteration.
39086// The provided context supersedes any context provided to the Context method.
39087func (c *InstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupManagersListManagedInstancesResponse) error) error {
39088	c.ctx_ = ctx
39089	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39090	for {
39091		x, err := c.Do()
39092		if err != nil {
39093			return err
39094		}
39095		if err := f(x); err != nil {
39096			return err
39097		}
39098		if x.NextPageToken == "" {
39099			return nil
39100		}
39101		c.PageToken(x.NextPageToken)
39102	}
39103}
39104
39105// method id "compute.instanceGroupManagers.patch":
39106
39107type InstanceGroupManagersPatchCall struct {
39108	s                    *Service
39109	project              string
39110	zone                 string
39111	instanceGroupManager string
39112	instancegroupmanager *InstanceGroupManager
39113	urlParams_           gensupport.URLParams
39114	ctx_                 context.Context
39115	header_              http.Header
39116}
39117
39118// Patch: Updates a managed instance group using the information that
39119// you specify in the request. This operation is marked as DONE when the
39120// group is patched even if the instances in the group are still in the
39121// process of being patched. You must separately verify the status of
39122// the individual instances with the listManagedInstances method. This
39123// method supports PATCH semantics and uses the JSON merge patch format
39124// and processing rules.
39125func (r *InstanceGroupManagersService) Patch(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersPatchCall {
39126	c := &InstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39127	c.project = project
39128	c.zone = zone
39129	c.instanceGroupManager = instanceGroupManager
39130	c.instancegroupmanager = instancegroupmanager
39131	return c
39132}
39133
39134// RequestId sets the optional parameter "requestId": An optional
39135// request ID to identify requests. Specify a unique request ID so that
39136// if you must retry your request, the server will know to ignore the
39137// request if it has already been completed.
39138//
39139// For example, consider a situation where you make an initial request
39140// and the request times out. If you make the request again with the
39141// same request ID, the server can check if original operation with the
39142// same request ID was received, and if so, will ignore the second
39143// request. This prevents clients from accidentally creating duplicate
39144// commitments.
39145//
39146// The request ID must be a valid UUID with the exception that zero UUID
39147// is not supported (00000000-0000-0000-0000-000000000000).
39148func (c *InstanceGroupManagersPatchCall) RequestId(requestId string) *InstanceGroupManagersPatchCall {
39149	c.urlParams_.Set("requestId", requestId)
39150	return c
39151}
39152
39153// Fields allows partial responses to be retrieved. See
39154// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39155// for more information.
39156func (c *InstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *InstanceGroupManagersPatchCall {
39157	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39158	return c
39159}
39160
39161// Context sets the context to be used in this call's Do method. Any
39162// pending HTTP request will be aborted if the provided context is
39163// canceled.
39164func (c *InstanceGroupManagersPatchCall) Context(ctx context.Context) *InstanceGroupManagersPatchCall {
39165	c.ctx_ = ctx
39166	return c
39167}
39168
39169// Header returns an http.Header that can be modified by the caller to
39170// add HTTP headers to the request.
39171func (c *InstanceGroupManagersPatchCall) Header() http.Header {
39172	if c.header_ == nil {
39173		c.header_ = make(http.Header)
39174	}
39175	return c.header_
39176}
39177
39178func (c *InstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) {
39179	reqHeaders := make(http.Header)
39180	for k, v := range c.header_ {
39181		reqHeaders[k] = v
39182	}
39183	reqHeaders.Set("User-Agent", c.s.userAgent())
39184	var body io.Reader = nil
39185	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
39186	if err != nil {
39187		return nil, err
39188	}
39189	reqHeaders.Set("Content-Type", "application/json")
39190	c.urlParams_.Set("alt", alt)
39191	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}")
39192	urls += "?" + c.urlParams_.Encode()
39193	req, _ := http.NewRequest("PATCH", urls, body)
39194	req.Header = reqHeaders
39195	googleapi.Expand(req.URL, map[string]string{
39196		"project":              c.project,
39197		"zone":                 c.zone,
39198		"instanceGroupManager": c.instanceGroupManager,
39199	})
39200	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39201}
39202
39203// Do executes the "compute.instanceGroupManagers.patch" call.
39204// Exactly one of *Operation or error will be non-nil. Any non-2xx
39205// status code is an error. Response headers are in either
39206// *Operation.ServerResponse.Header or (if a response was returned at
39207// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39208// to check whether the returned error was because
39209// http.StatusNotModified was returned.
39210func (c *InstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39211	gensupport.SetOptions(c.urlParams_, opts...)
39212	res, err := c.doRequest("json")
39213	if res != nil && res.StatusCode == http.StatusNotModified {
39214		if res.Body != nil {
39215			res.Body.Close()
39216		}
39217		return nil, &googleapi.Error{
39218			Code:   res.StatusCode,
39219			Header: res.Header,
39220		}
39221	}
39222	if err != nil {
39223		return nil, err
39224	}
39225	defer googleapi.CloseBody(res)
39226	if err := googleapi.CheckResponse(res); err != nil {
39227		return nil, err
39228	}
39229	ret := &Operation{
39230		ServerResponse: googleapi.ServerResponse{
39231			Header:         res.Header,
39232			HTTPStatusCode: res.StatusCode,
39233		},
39234	}
39235	target := &ret
39236	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
39237		return nil, err
39238	}
39239	return ret, nil
39240	// {
39241	//   "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
39242	//   "httpMethod": "PATCH",
39243	//   "id": "compute.instanceGroupManagers.patch",
39244	//   "parameterOrder": [
39245	//     "project",
39246	//     "zone",
39247	//     "instanceGroupManager"
39248	//   ],
39249	//   "parameters": {
39250	//     "instanceGroupManager": {
39251	//       "description": "The name of the instance group manager.",
39252	//       "location": "path",
39253	//       "required": true,
39254	//       "type": "string"
39255	//     },
39256	//     "project": {
39257	//       "description": "Project ID for this request.",
39258	//       "location": "path",
39259	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39260	//       "required": true,
39261	//       "type": "string"
39262	//     },
39263	//     "requestId": {
39264	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
39265	//       "location": "query",
39266	//       "type": "string"
39267	//     },
39268	//     "zone": {
39269	//       "description": "The name of the zone where you want to create the managed instance group.",
39270	//       "location": "path",
39271	//       "required": true,
39272	//       "type": "string"
39273	//     }
39274	//   },
39275	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
39276	//   "request": {
39277	//     "$ref": "InstanceGroupManager"
39278	//   },
39279	//   "response": {
39280	//     "$ref": "Operation"
39281	//   },
39282	//   "scopes": [
39283	//     "https://www.googleapis.com/auth/cloud-platform",
39284	//     "https://www.googleapis.com/auth/compute"
39285	//   ]
39286	// }
39287
39288}
39289
39290// method id "compute.instanceGroupManagers.recreateInstances":
39291
39292type InstanceGroupManagersRecreateInstancesCall struct {
39293	s                                             *Service
39294	project                                       string
39295	zone                                          string
39296	instanceGroupManager                          string
39297	instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest
39298	urlParams_                                    gensupport.URLParams
39299	ctx_                                          context.Context
39300	header_                                       http.Header
39301}
39302
39303// RecreateInstances: Schedules a group action to recreate the specified
39304// instances in the managed instance group. The instances are deleted
39305// and recreated using the current instance template for the managed
39306// instance group. This operation is marked as DONE when the action is
39307// scheduled even if the instances have not yet been recreated. You must
39308// separately verify the status of the recreating action with the
39309// listmanagedinstances method.
39310//
39311// If the group is part of a backend service that has enabled connection
39312// draining, it can take up to 60 seconds after the connection draining
39313// duration has elapsed before the VM instance is removed or
39314// deleted.
39315//
39316// You can specify a maximum of 1000 instances with this method per
39317// request.
39318func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall {
39319	c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39320	c.project = project
39321	c.zone = zone
39322	c.instanceGroupManager = instanceGroupManager
39323	c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest
39324	return c
39325}
39326
39327// RequestId sets the optional parameter "requestId": An optional
39328// request ID to identify requests. Specify a unique request ID so that
39329// if you must retry your request, the server will know to ignore the
39330// request if it has already been completed.
39331//
39332// For example, consider a situation where you make an initial request
39333// and the request times out. If you make the request again with the
39334// same request ID, the server can check if original operation with the
39335// same request ID was received, and if so, will ignore the second
39336// request. This prevents clients from accidentally creating duplicate
39337// commitments.
39338//
39339// The request ID must be a valid UUID with the exception that zero UUID
39340// is not supported (00000000-0000-0000-0000-000000000000).
39341func (c *InstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *InstanceGroupManagersRecreateInstancesCall {
39342	c.urlParams_.Set("requestId", requestId)
39343	return c
39344}
39345
39346// Fields allows partial responses to be retrieved. See
39347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39348// for more information.
39349func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall {
39350	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39351	return c
39352}
39353
39354// Context sets the context to be used in this call's Do method. Any
39355// pending HTTP request will be aborted if the provided context is
39356// canceled.
39357func (c *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall {
39358	c.ctx_ = ctx
39359	return c
39360}
39361
39362// Header returns an http.Header that can be modified by the caller to
39363// add HTTP headers to the request.
39364func (c *InstanceGroupManagersRecreateInstancesCall) Header() http.Header {
39365	if c.header_ == nil {
39366		c.header_ = make(http.Header)
39367	}
39368	return c.header_
39369}
39370
39371func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) {
39372	reqHeaders := make(http.Header)
39373	for k, v := range c.header_ {
39374		reqHeaders[k] = v
39375	}
39376	reqHeaders.Set("User-Agent", c.s.userAgent())
39377	var body io.Reader = nil
39378	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest)
39379	if err != nil {
39380		return nil, err
39381	}
39382	reqHeaders.Set("Content-Type", "application/json")
39383	c.urlParams_.Set("alt", alt)
39384	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances")
39385	urls += "?" + c.urlParams_.Encode()
39386	req, _ := http.NewRequest("POST", urls, body)
39387	req.Header = reqHeaders
39388	googleapi.Expand(req.URL, map[string]string{
39389		"project":              c.project,
39390		"zone":                 c.zone,
39391		"instanceGroupManager": c.instanceGroupManager,
39392	})
39393	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39394}
39395
39396// Do executes the "compute.instanceGroupManagers.recreateInstances" call.
39397// Exactly one of *Operation or error will be non-nil. Any non-2xx
39398// status code is an error. Response headers are in either
39399// *Operation.ServerResponse.Header or (if a response was returned at
39400// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39401// to check whether the returned error was because
39402// http.StatusNotModified was returned.
39403func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39404	gensupport.SetOptions(c.urlParams_, opts...)
39405	res, err := c.doRequest("json")
39406	if res != nil && res.StatusCode == http.StatusNotModified {
39407		if res.Body != nil {
39408			res.Body.Close()
39409		}
39410		return nil, &googleapi.Error{
39411			Code:   res.StatusCode,
39412			Header: res.Header,
39413		}
39414	}
39415	if err != nil {
39416		return nil, err
39417	}
39418	defer googleapi.CloseBody(res)
39419	if err := googleapi.CheckResponse(res); err != nil {
39420		return nil, err
39421	}
39422	ret := &Operation{
39423		ServerResponse: googleapi.ServerResponse{
39424			Header:         res.Header,
39425			HTTPStatusCode: res.StatusCode,
39426		},
39427	}
39428	target := &ret
39429	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
39430		return nil, err
39431	}
39432	return ret, nil
39433	// {
39434	//   "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.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.",
39435	//   "httpMethod": "POST",
39436	//   "id": "compute.instanceGroupManagers.recreateInstances",
39437	//   "parameterOrder": [
39438	//     "project",
39439	//     "zone",
39440	//     "instanceGroupManager"
39441	//   ],
39442	//   "parameters": {
39443	//     "instanceGroupManager": {
39444	//       "description": "The name of the managed instance group.",
39445	//       "location": "path",
39446	//       "required": true,
39447	//       "type": "string"
39448	//     },
39449	//     "project": {
39450	//       "description": "Project ID for this request.",
39451	//       "location": "path",
39452	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39453	//       "required": true,
39454	//       "type": "string"
39455	//     },
39456	//     "requestId": {
39457	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
39458	//       "location": "query",
39459	//       "type": "string"
39460	//     },
39461	//     "zone": {
39462	//       "description": "The name of the zone where the managed instance group is located.",
39463	//       "location": "path",
39464	//       "required": true,
39465	//       "type": "string"
39466	//     }
39467	//   },
39468	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances",
39469	//   "request": {
39470	//     "$ref": "InstanceGroupManagersRecreateInstancesRequest"
39471	//   },
39472	//   "response": {
39473	//     "$ref": "Operation"
39474	//   },
39475	//   "scopes": [
39476	//     "https://www.googleapis.com/auth/cloud-platform",
39477	//     "https://www.googleapis.com/auth/compute"
39478	//   ]
39479	// }
39480
39481}
39482
39483// method id "compute.instanceGroupManagers.resize":
39484
39485type InstanceGroupManagersResizeCall struct {
39486	s                    *Service
39487	project              string
39488	zone                 string
39489	instanceGroupManager string
39490	urlParams_           gensupport.URLParams
39491	ctx_                 context.Context
39492	header_              http.Header
39493}
39494
39495// Resize: Resizes the managed instance group. If you increase the size,
39496// the group creates new instances using the current instance template.
39497// If you decrease the size, the group deletes instances. The resize
39498// operation is marked DONE when the resize actions are scheduled even
39499// if the group has not yet added or deleted any instances. You must
39500// separately verify the status of the creating or deleting actions with
39501// the listmanagedinstances method.
39502//
39503// If the group is part of a backend service that has enabled connection
39504// draining, it can take up to 60 seconds after the connection draining
39505// duration has elapsed before the VM instance is removed or deleted.
39506func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall {
39507	c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39508	c.project = project
39509	c.zone = zone
39510	c.instanceGroupManager = instanceGroupManager
39511	c.urlParams_.Set("size", fmt.Sprint(size))
39512	return c
39513}
39514
39515// RequestId sets the optional parameter "requestId": An optional
39516// request ID to identify requests. Specify a unique request ID so that
39517// if you must retry your request, the server will know to ignore the
39518// request if it has already been completed.
39519//
39520// For example, consider a situation where you make an initial request
39521// and the request times out. If you make the request again with the
39522// same request ID, the server can check if original operation with the
39523// same request ID was received, and if so, will ignore the second
39524// request. This prevents clients from accidentally creating duplicate
39525// commitments.
39526//
39527// The request ID must be a valid UUID with the exception that zero UUID
39528// is not supported (00000000-0000-0000-0000-000000000000).
39529func (c *InstanceGroupManagersResizeCall) RequestId(requestId string) *InstanceGroupManagersResizeCall {
39530	c.urlParams_.Set("requestId", requestId)
39531	return c
39532}
39533
39534// Fields allows partial responses to be retrieved. See
39535// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39536// for more information.
39537func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall {
39538	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39539	return c
39540}
39541
39542// Context sets the context to be used in this call's Do method. Any
39543// pending HTTP request will be aborted if the provided context is
39544// canceled.
39545func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall {
39546	c.ctx_ = ctx
39547	return c
39548}
39549
39550// Header returns an http.Header that can be modified by the caller to
39551// add HTTP headers to the request.
39552func (c *InstanceGroupManagersResizeCall) Header() http.Header {
39553	if c.header_ == nil {
39554		c.header_ = make(http.Header)
39555	}
39556	return c.header_
39557}
39558
39559func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) {
39560	reqHeaders := make(http.Header)
39561	for k, v := range c.header_ {
39562		reqHeaders[k] = v
39563	}
39564	reqHeaders.Set("User-Agent", c.s.userAgent())
39565	var body io.Reader = nil
39566	c.urlParams_.Set("alt", alt)
39567	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize")
39568	urls += "?" + c.urlParams_.Encode()
39569	req, _ := http.NewRequest("POST", urls, body)
39570	req.Header = reqHeaders
39571	googleapi.Expand(req.URL, map[string]string{
39572		"project":              c.project,
39573		"zone":                 c.zone,
39574		"instanceGroupManager": c.instanceGroupManager,
39575	})
39576	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39577}
39578
39579// Do executes the "compute.instanceGroupManagers.resize" call.
39580// Exactly one of *Operation or error will be non-nil. Any non-2xx
39581// status code is an error. Response headers are in either
39582// *Operation.ServerResponse.Header or (if a response was returned at
39583// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39584// to check whether the returned error was because
39585// http.StatusNotModified was returned.
39586func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39587	gensupport.SetOptions(c.urlParams_, opts...)
39588	res, err := c.doRequest("json")
39589	if res != nil && res.StatusCode == http.StatusNotModified {
39590		if res.Body != nil {
39591			res.Body.Close()
39592		}
39593		return nil, &googleapi.Error{
39594			Code:   res.StatusCode,
39595			Header: res.Header,
39596		}
39597	}
39598	if err != nil {
39599		return nil, err
39600	}
39601	defer googleapi.CloseBody(res)
39602	if err := googleapi.CheckResponse(res); err != nil {
39603		return nil, err
39604	}
39605	ret := &Operation{
39606		ServerResponse: googleapi.ServerResponse{
39607			Header:         res.Header,
39608			HTTPStatusCode: res.StatusCode,
39609		},
39610	}
39611	target := &ret
39612	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
39613		return nil, err
39614	}
39615	return ret, nil
39616	// {
39617	//   "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.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.",
39618	//   "httpMethod": "POST",
39619	//   "id": "compute.instanceGroupManagers.resize",
39620	//   "parameterOrder": [
39621	//     "project",
39622	//     "zone",
39623	//     "instanceGroupManager",
39624	//     "size"
39625	//   ],
39626	//   "parameters": {
39627	//     "instanceGroupManager": {
39628	//       "description": "The name of the managed instance group.",
39629	//       "location": "path",
39630	//       "required": true,
39631	//       "type": "string"
39632	//     },
39633	//     "project": {
39634	//       "description": "Project ID for this request.",
39635	//       "location": "path",
39636	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39637	//       "required": true,
39638	//       "type": "string"
39639	//     },
39640	//     "requestId": {
39641	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
39642	//       "location": "query",
39643	//       "type": "string"
39644	//     },
39645	//     "size": {
39646	//       "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.",
39647	//       "format": "int32",
39648	//       "location": "query",
39649	//       "required": true,
39650	//       "type": "integer"
39651	//     },
39652	//     "zone": {
39653	//       "description": "The name of the zone where the managed instance group is located.",
39654	//       "location": "path",
39655	//       "required": true,
39656	//       "type": "string"
39657	//     }
39658	//   },
39659	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize",
39660	//   "response": {
39661	//     "$ref": "Operation"
39662	//   },
39663	//   "scopes": [
39664	//     "https://www.googleapis.com/auth/cloud-platform",
39665	//     "https://www.googleapis.com/auth/compute"
39666	//   ]
39667	// }
39668
39669}
39670
39671// method id "compute.instanceGroupManagers.resizeAdvanced":
39672
39673type InstanceGroupManagersResizeAdvancedCall struct {
39674	s                                          *Service
39675	project                                    string
39676	zone                                       string
39677	instanceGroupManager                       string
39678	instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest
39679	urlParams_                                 gensupport.URLParams
39680	ctx_                                       context.Context
39681	header_                                    http.Header
39682}
39683
39684// ResizeAdvanced: Resizes the managed instance group with advanced
39685// configuration options like disabling creation retries. This is an
39686// extended version of the resize method.
39687//
39688// If you increase the size of the instance group, the group creates new
39689// instances using the current instance template. If you decrease the
39690// size, the group deletes instances. The resize operation is marked
39691// DONE when the resize actions are scheduled even if the group has not
39692// yet added or deleted any instances. You must separately verify the
39693// status of the creating, creatingWithoutRetries, or deleting actions
39694// with the get or listmanagedinstances method.
39695//
39696// If the group is part of a backend service that has enabled connection
39697// draining, it can take up to 60 seconds after the connection draining
39698// duration has elapsed before the VM instance is removed or deleted.
39699func (r *InstanceGroupManagersService) ResizeAdvanced(project string, zone string, instanceGroupManager string, instancegroupmanagersresizeadvancedrequest *InstanceGroupManagersResizeAdvancedRequest) *InstanceGroupManagersResizeAdvancedCall {
39700	c := &InstanceGroupManagersResizeAdvancedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39701	c.project = project
39702	c.zone = zone
39703	c.instanceGroupManager = instanceGroupManager
39704	c.instancegroupmanagersresizeadvancedrequest = instancegroupmanagersresizeadvancedrequest
39705	return c
39706}
39707
39708// RequestId sets the optional parameter "requestId": An optional
39709// request ID to identify requests. Specify a unique request ID so that
39710// if you must retry your request, the server will know to ignore the
39711// request if it has already been completed.
39712//
39713// For example, consider a situation where you make an initial request
39714// and the request times out. If you make the request again with the
39715// same request ID, the server can check if original operation with the
39716// same request ID was received, and if so, will ignore the second
39717// request. This prevents clients from accidentally creating duplicate
39718// commitments.
39719//
39720// The request ID must be a valid UUID with the exception that zero UUID
39721// is not supported (00000000-0000-0000-0000-000000000000).
39722func (c *InstanceGroupManagersResizeAdvancedCall) RequestId(requestId string) *InstanceGroupManagersResizeAdvancedCall {
39723	c.urlParams_.Set("requestId", requestId)
39724	return c
39725}
39726
39727// Fields allows partial responses to be retrieved. See
39728// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39729// for more information.
39730func (c *InstanceGroupManagersResizeAdvancedCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeAdvancedCall {
39731	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39732	return c
39733}
39734
39735// Context sets the context to be used in this call's Do method. Any
39736// pending HTTP request will be aborted if the provided context is
39737// canceled.
39738func (c *InstanceGroupManagersResizeAdvancedCall) Context(ctx context.Context) *InstanceGroupManagersResizeAdvancedCall {
39739	c.ctx_ = ctx
39740	return c
39741}
39742
39743// Header returns an http.Header that can be modified by the caller to
39744// add HTTP headers to the request.
39745func (c *InstanceGroupManagersResizeAdvancedCall) Header() http.Header {
39746	if c.header_ == nil {
39747		c.header_ = make(http.Header)
39748	}
39749	return c.header_
39750}
39751
39752func (c *InstanceGroupManagersResizeAdvancedCall) doRequest(alt string) (*http.Response, error) {
39753	reqHeaders := make(http.Header)
39754	for k, v := range c.header_ {
39755		reqHeaders[k] = v
39756	}
39757	reqHeaders.Set("User-Agent", c.s.userAgent())
39758	var body io.Reader = nil
39759	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersresizeadvancedrequest)
39760	if err != nil {
39761		return nil, err
39762	}
39763	reqHeaders.Set("Content-Type", "application/json")
39764	c.urlParams_.Set("alt", alt)
39765	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced")
39766	urls += "?" + c.urlParams_.Encode()
39767	req, _ := http.NewRequest("POST", urls, body)
39768	req.Header = reqHeaders
39769	googleapi.Expand(req.URL, map[string]string{
39770		"project":              c.project,
39771		"zone":                 c.zone,
39772		"instanceGroupManager": c.instanceGroupManager,
39773	})
39774	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39775}
39776
39777// Do executes the "compute.instanceGroupManagers.resizeAdvanced" call.
39778// Exactly one of *Operation or error will be non-nil. Any non-2xx
39779// status code is an error. Response headers are in either
39780// *Operation.ServerResponse.Header or (if a response was returned at
39781// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39782// to check whether the returned error was because
39783// http.StatusNotModified was returned.
39784func (c *InstanceGroupManagersResizeAdvancedCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39785	gensupport.SetOptions(c.urlParams_, opts...)
39786	res, err := c.doRequest("json")
39787	if res != nil && res.StatusCode == http.StatusNotModified {
39788		if res.Body != nil {
39789			res.Body.Close()
39790		}
39791		return nil, &googleapi.Error{
39792			Code:   res.StatusCode,
39793			Header: res.Header,
39794		}
39795	}
39796	if err != nil {
39797		return nil, err
39798	}
39799	defer googleapi.CloseBody(res)
39800	if err := googleapi.CheckResponse(res); err != nil {
39801		return nil, err
39802	}
39803	ret := &Operation{
39804		ServerResponse: googleapi.ServerResponse{
39805			Header:         res.Header,
39806			HTTPStatusCode: res.StatusCode,
39807		},
39808	}
39809	target := &ret
39810	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
39811		return nil, err
39812	}
39813	return ret, nil
39814	// {
39815	//   "description": "Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.\n\nIf you increase the size of the instance group, 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, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.",
39816	//   "httpMethod": "POST",
39817	//   "id": "compute.instanceGroupManagers.resizeAdvanced",
39818	//   "parameterOrder": [
39819	//     "project",
39820	//     "zone",
39821	//     "instanceGroupManager"
39822	//   ],
39823	//   "parameters": {
39824	//     "instanceGroupManager": {
39825	//       "description": "The name of the managed instance group.",
39826	//       "location": "path",
39827	//       "required": true,
39828	//       "type": "string"
39829	//     },
39830	//     "project": {
39831	//       "description": "Project ID for this request.",
39832	//       "location": "path",
39833	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39834	//       "required": true,
39835	//       "type": "string"
39836	//     },
39837	//     "requestId": {
39838	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
39839	//       "location": "query",
39840	//       "type": "string"
39841	//     },
39842	//     "zone": {
39843	//       "description": "The name of the zone where the managed instance group is located.",
39844	//       "location": "path",
39845	//       "required": true,
39846	//       "type": "string"
39847	//     }
39848	//   },
39849	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced",
39850	//   "request": {
39851	//     "$ref": "InstanceGroupManagersResizeAdvancedRequest"
39852	//   },
39853	//   "response": {
39854	//     "$ref": "Operation"
39855	//   },
39856	//   "scopes": [
39857	//     "https://www.googleapis.com/auth/cloud-platform",
39858	//     "https://www.googleapis.com/auth/compute"
39859	//   ]
39860	// }
39861
39862}
39863
39864// method id "compute.instanceGroupManagers.setAutoHealingPolicies":
39865
39866type InstanceGroupManagersSetAutoHealingPoliciesCall struct {
39867	s                                          *Service
39868	project                                    string
39869	zone                                       string
39870	instanceGroupManager                       string
39871	instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest
39872	urlParams_                                 gensupport.URLParams
39873	ctx_                                       context.Context
39874	header_                                    http.Header
39875}
39876
39877// SetAutoHealingPolicies: Modifies the autohealing policies.
39878func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall {
39879	c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39880	c.project = project
39881	c.zone = zone
39882	c.instanceGroupManager = instanceGroupManager
39883	c.instancegroupmanagerssetautohealingrequest = instancegroupmanagerssetautohealingrequest
39884	return c
39885}
39886
39887// RequestId sets the optional parameter "requestId": An optional
39888// request ID to identify requests. Specify a unique request ID so that
39889// if you must retry your request, the server will know to ignore the
39890// request if it has already been completed.
39891//
39892// For example, consider a situation where you make an initial request
39893// and the request times out. If you make the request again with the
39894// same request ID, the server can check if original operation with the
39895// same request ID was received, and if so, will ignore the second
39896// request. This prevents clients from accidentally creating duplicate
39897// commitments.
39898//
39899// The request ID must be a valid UUID with the exception that zero UUID
39900// is not supported (00000000-0000-0000-0000-000000000000).
39901func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *InstanceGroupManagersSetAutoHealingPoliciesCall {
39902	c.urlParams_.Set("requestId", requestId)
39903	return c
39904}
39905
39906// Fields allows partial responses to be retrieved. See
39907// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39908// for more information.
39909func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetAutoHealingPoliciesCall {
39910	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39911	return c
39912}
39913
39914// Context sets the context to be used in this call's Do method. Any
39915// pending HTTP request will be aborted if the provided context is
39916// canceled.
39917func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *InstanceGroupManagersSetAutoHealingPoliciesCall {
39918	c.ctx_ = ctx
39919	return c
39920}
39921
39922// Header returns an http.Header that can be modified by the caller to
39923// add HTTP headers to the request.
39924func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header {
39925	if c.header_ == nil {
39926		c.header_ = make(http.Header)
39927	}
39928	return c.header_
39929}
39930
39931func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) {
39932	reqHeaders := make(http.Header)
39933	for k, v := range c.header_ {
39934		reqHeaders[k] = v
39935	}
39936	reqHeaders.Set("User-Agent", c.s.userAgent())
39937	var body io.Reader = nil
39938	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetautohealingrequest)
39939	if err != nil {
39940		return nil, err
39941	}
39942	reqHeaders.Set("Content-Type", "application/json")
39943	c.urlParams_.Set("alt", alt)
39944	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies")
39945	urls += "?" + c.urlParams_.Encode()
39946	req, _ := http.NewRequest("POST", urls, body)
39947	req.Header = reqHeaders
39948	googleapi.Expand(req.URL, map[string]string{
39949		"project":              c.project,
39950		"zone":                 c.zone,
39951		"instanceGroupManager": c.instanceGroupManager,
39952	})
39953	return gensupport.SendRequest(c.ctx_, c.s.client, req)
39954}
39955
39956// Do executes the "compute.instanceGroupManagers.setAutoHealingPolicies" call.
39957// Exactly one of *Operation or error will be non-nil. Any non-2xx
39958// status code is an error. Response headers are in either
39959// *Operation.ServerResponse.Header or (if a response was returned at
39960// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39961// to check whether the returned error was because
39962// http.StatusNotModified was returned.
39963func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39964	gensupport.SetOptions(c.urlParams_, opts...)
39965	res, err := c.doRequest("json")
39966	if res != nil && res.StatusCode == http.StatusNotModified {
39967		if res.Body != nil {
39968			res.Body.Close()
39969		}
39970		return nil, &googleapi.Error{
39971			Code:   res.StatusCode,
39972			Header: res.Header,
39973		}
39974	}
39975	if err != nil {
39976		return nil, err
39977	}
39978	defer googleapi.CloseBody(res)
39979	if err := googleapi.CheckResponse(res); err != nil {
39980		return nil, err
39981	}
39982	ret := &Operation{
39983		ServerResponse: googleapi.ServerResponse{
39984			Header:         res.Header,
39985			HTTPStatusCode: res.StatusCode,
39986		},
39987	}
39988	target := &ret
39989	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
39990		return nil, err
39991	}
39992	return ret, nil
39993	// {
39994	//   "description": "Modifies the autohealing policies.",
39995	//   "httpMethod": "POST",
39996	//   "id": "compute.instanceGroupManagers.setAutoHealingPolicies",
39997	//   "parameterOrder": [
39998	//     "project",
39999	//     "zone",
40000	//     "instanceGroupManager"
40001	//   ],
40002	//   "parameters": {
40003	//     "instanceGroupManager": {
40004	//       "description": "The name of the instance group manager.",
40005	//       "location": "path",
40006	//       "required": true,
40007	//       "type": "string"
40008	//     },
40009	//     "project": {
40010	//       "description": "Project ID for this request.",
40011	//       "location": "path",
40012	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40013	//       "required": true,
40014	//       "type": "string"
40015	//     },
40016	//     "requestId": {
40017	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
40018	//       "location": "query",
40019	//       "type": "string"
40020	//     },
40021	//     "zone": {
40022	//       "description": "The name of the zone where the managed instance group is located.",
40023	//       "location": "path",
40024	//       "required": true,
40025	//       "type": "string"
40026	//     }
40027	//   },
40028	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies",
40029	//   "request": {
40030	//     "$ref": "InstanceGroupManagersSetAutoHealingRequest"
40031	//   },
40032	//   "response": {
40033	//     "$ref": "Operation"
40034	//   },
40035	//   "scopes": [
40036	//     "https://www.googleapis.com/auth/cloud-platform",
40037	//     "https://www.googleapis.com/auth/compute"
40038	//   ]
40039	// }
40040
40041}
40042
40043// method id "compute.instanceGroupManagers.setInstanceTemplate":
40044
40045type InstanceGroupManagersSetInstanceTemplateCall struct {
40046	s                                               *Service
40047	project                                         string
40048	zone                                            string
40049	instanceGroupManager                            string
40050	instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest
40051	urlParams_                                      gensupport.URLParams
40052	ctx_                                            context.Context
40053	header_                                         http.Header
40054}
40055
40056// SetInstanceTemplate: Specifies the instance template to use when
40057// creating new instances in this group. The templates for existing
40058// instances in the group do not change unless you recreate them.
40059func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall {
40060	c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40061	c.project = project
40062	c.zone = zone
40063	c.instanceGroupManager = instanceGroupManager
40064	c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest
40065	return c
40066}
40067
40068// RequestId sets the optional parameter "requestId": An optional
40069// request ID to identify requests. Specify a unique request ID so that
40070// if you must retry your request, the server will know to ignore the
40071// request if it has already been completed.
40072//
40073// For example, consider a situation where you make an initial request
40074// and the request times out. If you make the request again with the
40075// same request ID, the server can check if original operation with the
40076// same request ID was received, and if so, will ignore the second
40077// request. This prevents clients from accidentally creating duplicate
40078// commitments.
40079//
40080// The request ID must be a valid UUID with the exception that zero UUID
40081// is not supported (00000000-0000-0000-0000-000000000000).
40082func (c *InstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *InstanceGroupManagersSetInstanceTemplateCall {
40083	c.urlParams_.Set("requestId", requestId)
40084	return c
40085}
40086
40087// Fields allows partial responses to be retrieved. See
40088// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40089// for more information.
40090func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall {
40091	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40092	return c
40093}
40094
40095// Context sets the context to be used in this call's Do method. Any
40096// pending HTTP request will be aborted if the provided context is
40097// canceled.
40098func (c *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall {
40099	c.ctx_ = ctx
40100	return c
40101}
40102
40103// Header returns an http.Header that can be modified by the caller to
40104// add HTTP headers to the request.
40105func (c *InstanceGroupManagersSetInstanceTemplateCall) Header() http.Header {
40106	if c.header_ == nil {
40107		c.header_ = make(http.Header)
40108	}
40109	return c.header_
40110}
40111
40112func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) {
40113	reqHeaders := make(http.Header)
40114	for k, v := range c.header_ {
40115		reqHeaders[k] = v
40116	}
40117	reqHeaders.Set("User-Agent", c.s.userAgent())
40118	var body io.Reader = nil
40119	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest)
40120	if err != nil {
40121		return nil, err
40122	}
40123	reqHeaders.Set("Content-Type", "application/json")
40124	c.urlParams_.Set("alt", alt)
40125	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate")
40126	urls += "?" + c.urlParams_.Encode()
40127	req, _ := http.NewRequest("POST", urls, body)
40128	req.Header = reqHeaders
40129	googleapi.Expand(req.URL, map[string]string{
40130		"project":              c.project,
40131		"zone":                 c.zone,
40132		"instanceGroupManager": c.instanceGroupManager,
40133	})
40134	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40135}
40136
40137// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call.
40138// Exactly one of *Operation or error will be non-nil. Any non-2xx
40139// status code is an error. Response headers are in either
40140// *Operation.ServerResponse.Header or (if a response was returned at
40141// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40142// to check whether the returned error was because
40143// http.StatusNotModified was returned.
40144func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
40145	gensupport.SetOptions(c.urlParams_, opts...)
40146	res, err := c.doRequest("json")
40147	if res != nil && res.StatusCode == http.StatusNotModified {
40148		if res.Body != nil {
40149			res.Body.Close()
40150		}
40151		return nil, &googleapi.Error{
40152			Code:   res.StatusCode,
40153			Header: res.Header,
40154		}
40155	}
40156	if err != nil {
40157		return nil, err
40158	}
40159	defer googleapi.CloseBody(res)
40160	if err := googleapi.CheckResponse(res); err != nil {
40161		return nil, err
40162	}
40163	ret := &Operation{
40164		ServerResponse: googleapi.ServerResponse{
40165			Header:         res.Header,
40166			HTTPStatusCode: res.StatusCode,
40167		},
40168	}
40169	target := &ret
40170	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
40171		return nil, err
40172	}
40173	return ret, nil
40174	// {
40175	//   "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.",
40176	//   "httpMethod": "POST",
40177	//   "id": "compute.instanceGroupManagers.setInstanceTemplate",
40178	//   "parameterOrder": [
40179	//     "project",
40180	//     "zone",
40181	//     "instanceGroupManager"
40182	//   ],
40183	//   "parameters": {
40184	//     "instanceGroupManager": {
40185	//       "description": "The name of the managed instance group.",
40186	//       "location": "path",
40187	//       "required": true,
40188	//       "type": "string"
40189	//     },
40190	//     "project": {
40191	//       "description": "Project ID for this request.",
40192	//       "location": "path",
40193	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40194	//       "required": true,
40195	//       "type": "string"
40196	//     },
40197	//     "requestId": {
40198	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
40199	//       "location": "query",
40200	//       "type": "string"
40201	//     },
40202	//     "zone": {
40203	//       "description": "The name of the zone where the managed instance group is located.",
40204	//       "location": "path",
40205	//       "required": true,
40206	//       "type": "string"
40207	//     }
40208	//   },
40209	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate",
40210	//   "request": {
40211	//     "$ref": "InstanceGroupManagersSetInstanceTemplateRequest"
40212	//   },
40213	//   "response": {
40214	//     "$ref": "Operation"
40215	//   },
40216	//   "scopes": [
40217	//     "https://www.googleapis.com/auth/cloud-platform",
40218	//     "https://www.googleapis.com/auth/compute"
40219	//   ]
40220	// }
40221
40222}
40223
40224// method id "compute.instanceGroupManagers.setTargetPools":
40225
40226type InstanceGroupManagersSetTargetPoolsCall struct {
40227	s                                          *Service
40228	project                                    string
40229	zone                                       string
40230	instanceGroupManager                       string
40231	instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest
40232	urlParams_                                 gensupport.URLParams
40233	ctx_                                       context.Context
40234	header_                                    http.Header
40235}
40236
40237// SetTargetPools: Modifies the target pools to which all instances in
40238// this managed instance group are assigned. The target pools
40239// automatically apply to all of the instances in the managed instance
40240// group. This operation is marked DONE when you make the request even
40241// if the instances have not yet been added to their target pools. The
40242// change might take some time to apply to all of the instances in the
40243// group depending on the size of the group.
40244func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall {
40245	c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40246	c.project = project
40247	c.zone = zone
40248	c.instanceGroupManager = instanceGroupManager
40249	c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest
40250	return c
40251}
40252
40253// RequestId sets the optional parameter "requestId": An optional
40254// request ID to identify requests. Specify a unique request ID so that
40255// if you must retry your request, the server will know to ignore the
40256// request if it has already been completed.
40257//
40258// For example, consider a situation where you make an initial request
40259// and the request times out. If you make the request again with the
40260// same request ID, the server can check if original operation with the
40261// same request ID was received, and if so, will ignore the second
40262// request. This prevents clients from accidentally creating duplicate
40263// commitments.
40264//
40265// The request ID must be a valid UUID with the exception that zero UUID
40266// is not supported (00000000-0000-0000-0000-000000000000).
40267func (c *InstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *InstanceGroupManagersSetTargetPoolsCall {
40268	c.urlParams_.Set("requestId", requestId)
40269	return c
40270}
40271
40272// Fields allows partial responses to be retrieved. See
40273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40274// for more information.
40275func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall {
40276	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40277	return c
40278}
40279
40280// Context sets the context to be used in this call's Do method. Any
40281// pending HTTP request will be aborted if the provided context is
40282// canceled.
40283func (c *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall {
40284	c.ctx_ = ctx
40285	return c
40286}
40287
40288// Header returns an http.Header that can be modified by the caller to
40289// add HTTP headers to the request.
40290func (c *InstanceGroupManagersSetTargetPoolsCall) Header() http.Header {
40291	if c.header_ == nil {
40292		c.header_ = make(http.Header)
40293	}
40294	return c.header_
40295}
40296
40297func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) {
40298	reqHeaders := make(http.Header)
40299	for k, v := range c.header_ {
40300		reqHeaders[k] = v
40301	}
40302	reqHeaders.Set("User-Agent", c.s.userAgent())
40303	var body io.Reader = nil
40304	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest)
40305	if err != nil {
40306		return nil, err
40307	}
40308	reqHeaders.Set("Content-Type", "application/json")
40309	c.urlParams_.Set("alt", alt)
40310	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools")
40311	urls += "?" + c.urlParams_.Encode()
40312	req, _ := http.NewRequest("POST", urls, body)
40313	req.Header = reqHeaders
40314	googleapi.Expand(req.URL, map[string]string{
40315		"project":              c.project,
40316		"zone":                 c.zone,
40317		"instanceGroupManager": c.instanceGroupManager,
40318	})
40319	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40320}
40321
40322// Do executes the "compute.instanceGroupManagers.setTargetPools" call.
40323// Exactly one of *Operation or error will be non-nil. Any non-2xx
40324// status code is an error. Response headers are in either
40325// *Operation.ServerResponse.Header or (if a response was returned at
40326// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40327// to check whether the returned error was because
40328// http.StatusNotModified was returned.
40329func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
40330	gensupport.SetOptions(c.urlParams_, opts...)
40331	res, err := c.doRequest("json")
40332	if res != nil && res.StatusCode == http.StatusNotModified {
40333		if res.Body != nil {
40334			res.Body.Close()
40335		}
40336		return nil, &googleapi.Error{
40337			Code:   res.StatusCode,
40338			Header: res.Header,
40339		}
40340	}
40341	if err != nil {
40342		return nil, err
40343	}
40344	defer googleapi.CloseBody(res)
40345	if err := googleapi.CheckResponse(res); err != nil {
40346		return nil, err
40347	}
40348	ret := &Operation{
40349		ServerResponse: googleapi.ServerResponse{
40350			Header:         res.Header,
40351			HTTPStatusCode: res.StatusCode,
40352		},
40353	}
40354	target := &ret
40355	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
40356		return nil, err
40357	}
40358	return ret, nil
40359	// {
40360	//   "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.",
40361	//   "httpMethod": "POST",
40362	//   "id": "compute.instanceGroupManagers.setTargetPools",
40363	//   "parameterOrder": [
40364	//     "project",
40365	//     "zone",
40366	//     "instanceGroupManager"
40367	//   ],
40368	//   "parameters": {
40369	//     "instanceGroupManager": {
40370	//       "description": "The name of the managed instance group.",
40371	//       "location": "path",
40372	//       "required": true,
40373	//       "type": "string"
40374	//     },
40375	//     "project": {
40376	//       "description": "Project ID for this request.",
40377	//       "location": "path",
40378	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40379	//       "required": true,
40380	//       "type": "string"
40381	//     },
40382	//     "requestId": {
40383	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
40384	//       "location": "query",
40385	//       "type": "string"
40386	//     },
40387	//     "zone": {
40388	//       "description": "The name of the zone where the managed instance group is located.",
40389	//       "location": "path",
40390	//       "required": true,
40391	//       "type": "string"
40392	//     }
40393	//   },
40394	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools",
40395	//   "request": {
40396	//     "$ref": "InstanceGroupManagersSetTargetPoolsRequest"
40397	//   },
40398	//   "response": {
40399	//     "$ref": "Operation"
40400	//   },
40401	//   "scopes": [
40402	//     "https://www.googleapis.com/auth/cloud-platform",
40403	//     "https://www.googleapis.com/auth/compute"
40404	//   ]
40405	// }
40406
40407}
40408
40409// method id "compute.instanceGroupManagers.testIamPermissions":
40410
40411type InstanceGroupManagersTestIamPermissionsCall struct {
40412	s                      *Service
40413	project                string
40414	zone                   string
40415	resource               string
40416	testpermissionsrequest *TestPermissionsRequest
40417	urlParams_             gensupport.URLParams
40418	ctx_                   context.Context
40419	header_                http.Header
40420}
40421
40422// TestIamPermissions: Returns permissions that a caller has on the
40423// specified resource.
40424func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall {
40425	c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40426	c.project = project
40427	c.zone = zone
40428	c.resource = resource
40429	c.testpermissionsrequest = testpermissionsrequest
40430	return c
40431}
40432
40433// Fields allows partial responses to be retrieved. See
40434// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40435// for more information.
40436func (c *InstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersTestIamPermissionsCall {
40437	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40438	return c
40439}
40440
40441// Context sets the context to be used in this call's Do method. Any
40442// pending HTTP request will be aborted if the provided context is
40443// canceled.
40444func (c *InstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupManagersTestIamPermissionsCall {
40445	c.ctx_ = ctx
40446	return c
40447}
40448
40449// Header returns an http.Header that can be modified by the caller to
40450// add HTTP headers to the request.
40451func (c *InstanceGroupManagersTestIamPermissionsCall) Header() http.Header {
40452	if c.header_ == nil {
40453		c.header_ = make(http.Header)
40454	}
40455	return c.header_
40456}
40457
40458func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
40459	reqHeaders := make(http.Header)
40460	for k, v := range c.header_ {
40461		reqHeaders[k] = v
40462	}
40463	reqHeaders.Set("User-Agent", c.s.userAgent())
40464	var body io.Reader = nil
40465	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
40466	if err != nil {
40467		return nil, err
40468	}
40469	reqHeaders.Set("Content-Type", "application/json")
40470	c.urlParams_.Set("alt", alt)
40471	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions")
40472	urls += "?" + c.urlParams_.Encode()
40473	req, _ := http.NewRequest("POST", urls, body)
40474	req.Header = reqHeaders
40475	googleapi.Expand(req.URL, map[string]string{
40476		"project":  c.project,
40477		"zone":     c.zone,
40478		"resource": c.resource,
40479	})
40480	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40481}
40482
40483// Do executes the "compute.instanceGroupManagers.testIamPermissions" call.
40484// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
40485// non-2xx status code is an error. Response headers are in either
40486// *TestPermissionsResponse.ServerResponse.Header or (if a response was
40487// returned at all) in error.(*googleapi.Error).Header. Use
40488// googleapi.IsNotModified to check whether the returned error was
40489// because http.StatusNotModified was returned.
40490func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
40491	gensupport.SetOptions(c.urlParams_, opts...)
40492	res, err := c.doRequest("json")
40493	if res != nil && res.StatusCode == http.StatusNotModified {
40494		if res.Body != nil {
40495			res.Body.Close()
40496		}
40497		return nil, &googleapi.Error{
40498			Code:   res.StatusCode,
40499			Header: res.Header,
40500		}
40501	}
40502	if err != nil {
40503		return nil, err
40504	}
40505	defer googleapi.CloseBody(res)
40506	if err := googleapi.CheckResponse(res); err != nil {
40507		return nil, err
40508	}
40509	ret := &TestPermissionsResponse{
40510		ServerResponse: googleapi.ServerResponse{
40511			Header:         res.Header,
40512			HTTPStatusCode: res.StatusCode,
40513		},
40514	}
40515	target := &ret
40516	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
40517		return nil, err
40518	}
40519	return ret, nil
40520	// {
40521	//   "description": "Returns permissions that a caller has on the specified resource.",
40522	//   "httpMethod": "POST",
40523	//   "id": "compute.instanceGroupManagers.testIamPermissions",
40524	//   "parameterOrder": [
40525	//     "project",
40526	//     "zone",
40527	//     "resource"
40528	//   ],
40529	//   "parameters": {
40530	//     "project": {
40531	//       "description": "Project ID for this request.",
40532	//       "location": "path",
40533	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40534	//       "required": true,
40535	//       "type": "string"
40536	//     },
40537	//     "resource": {
40538	//       "description": "Name of the resource for this request.",
40539	//       "location": "path",
40540	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
40541	//       "required": true,
40542	//       "type": "string"
40543	//     },
40544	//     "zone": {
40545	//       "description": "The name of the zone for this request.",
40546	//       "location": "path",
40547	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
40548	//       "required": true,
40549	//       "type": "string"
40550	//     }
40551	//   },
40552	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions",
40553	//   "request": {
40554	//     "$ref": "TestPermissionsRequest"
40555	//   },
40556	//   "response": {
40557	//     "$ref": "TestPermissionsResponse"
40558	//   },
40559	//   "scopes": [
40560	//     "https://www.googleapis.com/auth/cloud-platform",
40561	//     "https://www.googleapis.com/auth/compute",
40562	//     "https://www.googleapis.com/auth/compute.readonly"
40563	//   ]
40564	// }
40565
40566}
40567
40568// method id "compute.instanceGroupManagers.update":
40569
40570type InstanceGroupManagersUpdateCall struct {
40571	s                    *Service
40572	project              string
40573	zone                 string
40574	instanceGroupManager string
40575	instancegroupmanager *InstanceGroupManager
40576	urlParams_           gensupport.URLParams
40577	ctx_                 context.Context
40578	header_              http.Header
40579}
40580
40581// Update: Updates a managed instance group using the information that
40582// you specify in the request. This operation is marked as DONE when the
40583// group is updated even if the instances in the group have not yet been
40584// updated. You must separately verify the status of the individual
40585// instances with the listManagedInstances method.
40586func (r *InstanceGroupManagersService) Update(project string, zone string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersUpdateCall {
40587	c := &InstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40588	c.project = project
40589	c.zone = zone
40590	c.instanceGroupManager = instanceGroupManager
40591	c.instancegroupmanager = instancegroupmanager
40592	return c
40593}
40594
40595// RequestId sets the optional parameter "requestId": An optional
40596// request ID to identify requests. Specify a unique request ID so that
40597// if you must retry your request, the server will know to ignore the
40598// request if it has already been completed.
40599//
40600// For example, consider a situation where you make an initial request
40601// and the request times out. If you make the request again with the
40602// same request ID, the server can check if original operation with the
40603// same request ID was received, and if so, will ignore the second
40604// request. This prevents clients from accidentally creating duplicate
40605// commitments.
40606//
40607// The request ID must be a valid UUID with the exception that zero UUID
40608// is not supported (00000000-0000-0000-0000-000000000000).
40609func (c *InstanceGroupManagersUpdateCall) RequestId(requestId string) *InstanceGroupManagersUpdateCall {
40610	c.urlParams_.Set("requestId", requestId)
40611	return c
40612}
40613
40614// Fields allows partial responses to be retrieved. See
40615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40616// for more information.
40617func (c *InstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdateCall {
40618	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40619	return c
40620}
40621
40622// Context sets the context to be used in this call's Do method. Any
40623// pending HTTP request will be aborted if the provided context is
40624// canceled.
40625func (c *InstanceGroupManagersUpdateCall) Context(ctx context.Context) *InstanceGroupManagersUpdateCall {
40626	c.ctx_ = ctx
40627	return c
40628}
40629
40630// Header returns an http.Header that can be modified by the caller to
40631// add HTTP headers to the request.
40632func (c *InstanceGroupManagersUpdateCall) Header() http.Header {
40633	if c.header_ == nil {
40634		c.header_ = make(http.Header)
40635	}
40636	return c.header_
40637}
40638
40639func (c *InstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) {
40640	reqHeaders := make(http.Header)
40641	for k, v := range c.header_ {
40642		reqHeaders[k] = v
40643	}
40644	reqHeaders.Set("User-Agent", c.s.userAgent())
40645	var body io.Reader = nil
40646	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
40647	if err != nil {
40648		return nil, err
40649	}
40650	reqHeaders.Set("Content-Type", "application/json")
40651	c.urlParams_.Set("alt", alt)
40652	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}")
40653	urls += "?" + c.urlParams_.Encode()
40654	req, _ := http.NewRequest("PUT", urls, body)
40655	req.Header = reqHeaders
40656	googleapi.Expand(req.URL, map[string]string{
40657		"project":              c.project,
40658		"zone":                 c.zone,
40659		"instanceGroupManager": c.instanceGroupManager,
40660	})
40661	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40662}
40663
40664// Do executes the "compute.instanceGroupManagers.update" call.
40665// Exactly one of *Operation or error will be non-nil. Any non-2xx
40666// status code is an error. Response headers are in either
40667// *Operation.ServerResponse.Header or (if a response was returned at
40668// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40669// to check whether the returned error was because
40670// http.StatusNotModified was returned.
40671func (c *InstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
40672	gensupport.SetOptions(c.urlParams_, opts...)
40673	res, err := c.doRequest("json")
40674	if res != nil && res.StatusCode == http.StatusNotModified {
40675		if res.Body != nil {
40676			res.Body.Close()
40677		}
40678		return nil, &googleapi.Error{
40679			Code:   res.StatusCode,
40680			Header: res.Header,
40681		}
40682	}
40683	if err != nil {
40684		return nil, err
40685	}
40686	defer googleapi.CloseBody(res)
40687	if err := googleapi.CheckResponse(res); err != nil {
40688		return nil, err
40689	}
40690	ret := &Operation{
40691		ServerResponse: googleapi.ServerResponse{
40692			Header:         res.Header,
40693			HTTPStatusCode: res.StatusCode,
40694		},
40695	}
40696	target := &ret
40697	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
40698		return nil, err
40699	}
40700	return ret, nil
40701	// {
40702	//   "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.",
40703	//   "httpMethod": "PUT",
40704	//   "id": "compute.instanceGroupManagers.update",
40705	//   "parameterOrder": [
40706	//     "project",
40707	//     "zone",
40708	//     "instanceGroupManager"
40709	//   ],
40710	//   "parameters": {
40711	//     "instanceGroupManager": {
40712	//       "description": "The name of the instance group manager.",
40713	//       "location": "path",
40714	//       "required": true,
40715	//       "type": "string"
40716	//     },
40717	//     "project": {
40718	//       "description": "Project ID for this request.",
40719	//       "location": "path",
40720	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40721	//       "required": true,
40722	//       "type": "string"
40723	//     },
40724	//     "requestId": {
40725	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
40726	//       "location": "query",
40727	//       "type": "string"
40728	//     },
40729	//     "zone": {
40730	//       "description": "The name of the zone where you want to create the managed instance group.",
40731	//       "location": "path",
40732	//       "required": true,
40733	//       "type": "string"
40734	//     }
40735	//   },
40736	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
40737	//   "request": {
40738	//     "$ref": "InstanceGroupManager"
40739	//   },
40740	//   "response": {
40741	//     "$ref": "Operation"
40742	//   },
40743	//   "scopes": [
40744	//     "https://www.googleapis.com/auth/cloud-platform",
40745	//     "https://www.googleapis.com/auth/compute"
40746	//   ]
40747	// }
40748
40749}
40750
40751// method id "compute.instanceGroups.addInstances":
40752
40753type InstanceGroupsAddInstancesCall struct {
40754	s                                 *Service
40755	project                           string
40756	zone                              string
40757	instanceGroup                     string
40758	instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest
40759	urlParams_                        gensupport.URLParams
40760	ctx_                              context.Context
40761	header_                           http.Header
40762}
40763
40764// AddInstances: Adds a list of instances to the specified instance
40765// group. All of the instances in the instance group must be in the same
40766// network/subnetwork. Read  Adding instances for more information.
40767func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall {
40768	c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40769	c.project = project
40770	c.zone = zone
40771	c.instanceGroup = instanceGroup
40772	c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest
40773	return c
40774}
40775
40776// RequestId sets the optional parameter "requestId": An optional
40777// request ID to identify requests. Specify a unique request ID so that
40778// if you must retry your request, the server will know to ignore the
40779// request if it has already been completed.
40780//
40781// For example, consider a situation where you make an initial request
40782// and the request times out. If you make the request again with the
40783// same request ID, the server can check if original operation with the
40784// same request ID was received, and if so, will ignore the second
40785// request. This prevents clients from accidentally creating duplicate
40786// commitments.
40787//
40788// The request ID must be a valid UUID with the exception that zero UUID
40789// is not supported (00000000-0000-0000-0000-000000000000).
40790func (c *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall {
40791	c.urlParams_.Set("requestId", requestId)
40792	return c
40793}
40794
40795// Fields allows partial responses to be retrieved. See
40796// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40797// for more information.
40798func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall {
40799	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40800	return c
40801}
40802
40803// Context sets the context to be used in this call's Do method. Any
40804// pending HTTP request will be aborted if the provided context is
40805// canceled.
40806func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall {
40807	c.ctx_ = ctx
40808	return c
40809}
40810
40811// Header returns an http.Header that can be modified by the caller to
40812// add HTTP headers to the request.
40813func (c *InstanceGroupsAddInstancesCall) Header() http.Header {
40814	if c.header_ == nil {
40815		c.header_ = make(http.Header)
40816	}
40817	return c.header_
40818}
40819
40820func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) {
40821	reqHeaders := make(http.Header)
40822	for k, v := range c.header_ {
40823		reqHeaders[k] = v
40824	}
40825	reqHeaders.Set("User-Agent", c.s.userAgent())
40826	var body io.Reader = nil
40827	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest)
40828	if err != nil {
40829		return nil, err
40830	}
40831	reqHeaders.Set("Content-Type", "application/json")
40832	c.urlParams_.Set("alt", alt)
40833	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances")
40834	urls += "?" + c.urlParams_.Encode()
40835	req, _ := http.NewRequest("POST", urls, body)
40836	req.Header = reqHeaders
40837	googleapi.Expand(req.URL, map[string]string{
40838		"project":       c.project,
40839		"zone":          c.zone,
40840		"instanceGroup": c.instanceGroup,
40841	})
40842	return gensupport.SendRequest(c.ctx_, c.s.client, req)
40843}
40844
40845// Do executes the "compute.instanceGroups.addInstances" call.
40846// Exactly one of *Operation or error will be non-nil. Any non-2xx
40847// status code is an error. Response headers are in either
40848// *Operation.ServerResponse.Header or (if a response was returned at
40849// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40850// to check whether the returned error was because
40851// http.StatusNotModified was returned.
40852func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
40853	gensupport.SetOptions(c.urlParams_, opts...)
40854	res, err := c.doRequest("json")
40855	if res != nil && res.StatusCode == http.StatusNotModified {
40856		if res.Body != nil {
40857			res.Body.Close()
40858		}
40859		return nil, &googleapi.Error{
40860			Code:   res.StatusCode,
40861			Header: res.Header,
40862		}
40863	}
40864	if err != nil {
40865		return nil, err
40866	}
40867	defer googleapi.CloseBody(res)
40868	if err := googleapi.CheckResponse(res); err != nil {
40869		return nil, err
40870	}
40871	ret := &Operation{
40872		ServerResponse: googleapi.ServerResponse{
40873			Header:         res.Header,
40874			HTTPStatusCode: res.StatusCode,
40875		},
40876	}
40877	target := &ret
40878	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
40879		return nil, err
40880	}
40881	return ret, nil
40882	// {
40883	//   "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.",
40884	//   "httpMethod": "POST",
40885	//   "id": "compute.instanceGroups.addInstances",
40886	//   "parameterOrder": [
40887	//     "project",
40888	//     "zone",
40889	//     "instanceGroup"
40890	//   ],
40891	//   "parameters": {
40892	//     "instanceGroup": {
40893	//       "description": "The name of the instance group where you are adding instances.",
40894	//       "location": "path",
40895	//       "required": true,
40896	//       "type": "string"
40897	//     },
40898	//     "project": {
40899	//       "description": "Project ID for this request.",
40900	//       "location": "path",
40901	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40902	//       "required": true,
40903	//       "type": "string"
40904	//     },
40905	//     "requestId": {
40906	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
40907	//       "location": "query",
40908	//       "type": "string"
40909	//     },
40910	//     "zone": {
40911	//       "description": "The name of the zone where the instance group is located.",
40912	//       "location": "path",
40913	//       "required": true,
40914	//       "type": "string"
40915	//     }
40916	//   },
40917	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances",
40918	//   "request": {
40919	//     "$ref": "InstanceGroupsAddInstancesRequest"
40920	//   },
40921	//   "response": {
40922	//     "$ref": "Operation"
40923	//   },
40924	//   "scopes": [
40925	//     "https://www.googleapis.com/auth/cloud-platform",
40926	//     "https://www.googleapis.com/auth/compute"
40927	//   ]
40928	// }
40929
40930}
40931
40932// method id "compute.instanceGroups.aggregatedList":
40933
40934type InstanceGroupsAggregatedListCall struct {
40935	s            *Service
40936	project      string
40937	urlParams_   gensupport.URLParams
40938	ifNoneMatch_ string
40939	ctx_         context.Context
40940	header_      http.Header
40941}
40942
40943// AggregatedList: Retrieves the list of instance groups and sorts them
40944// by zone.
40945func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall {
40946	c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40947	c.project = project
40948	return c
40949}
40950
40951// Filter sets the optional parameter "filter": Sets a filter
40952// {expression} for filtering listed resources. Your {expression} must
40953// be in the format: field_name comparison_string literal_string.
40954//
40955// The field_name is the name of the field you want to compare. Only
40956// atomic field types are supported (string, number, boolean). The
40957// comparison_string must be either eq (equals) or ne (not equals). The
40958// literal_string is the string value to filter to. The literal value
40959// must be valid for the type of field you are filtering by (string,
40960// number, boolean). For string fields, the literal value is interpreted
40961// as a regular expression using RE2 syntax. The literal value must
40962// match the entire field.
40963//
40964// For example, to filter for instances that do not have a name of
40965// example-instance, you would use name ne example-instance.
40966//
40967// You can filter on nested fields. For example, you could filter on
40968// instances that have set the scheduling.automaticRestart field to
40969// true. Use filtering on nested fields to take advantage of labels to
40970// organize and search for results based on label values.
40971//
40972// To filter on multiple expressions, provide each separate expression
40973// within parentheses. For example, (scheduling.automaticRestart eq
40974// true) (zone eq us-central1-f). Multiple expressions are treated as
40975// AND expressions, meaning that resources must match all expressions to
40976// pass the filters.
40977func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall {
40978	c.urlParams_.Set("filter", filter)
40979	return c
40980}
40981
40982// MaxResults sets the optional parameter "maxResults": The maximum
40983// number of results per page that should be returned. If the number of
40984// available results is larger than maxResults, Compute Engine returns a
40985// nextPageToken that can be used to get the next page of results in
40986// subsequent list requests. Acceptable values are 0 to 500, inclusive.
40987// (Default: 500)
40988func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall {
40989	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40990	return c
40991}
40992
40993// OrderBy sets the optional parameter "orderBy": Sorts list results by
40994// a certain order. By default, results are returned in alphanumerical
40995// order based on the resource name.
40996//
40997// You can also sort results in descending order based on the creation
40998// timestamp using orderBy="creationTimestamp desc". This sorts results
40999// based on the creationTimestamp field in reverse chronological order
41000// (newest result first). Use this to sort resources like operations so
41001// that the newest operation is returned first.
41002//
41003// Currently, only sorting by name or creationTimestamp desc is
41004// supported.
41005func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall {
41006	c.urlParams_.Set("orderBy", orderBy)
41007	return c
41008}
41009
41010// PageToken sets the optional parameter "pageToken": Specifies a page
41011// token to use. Set pageToken to the nextPageToken returned by a
41012// previous list request to get the next page of results.
41013func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall {
41014	c.urlParams_.Set("pageToken", pageToken)
41015	return c
41016}
41017
41018// Fields allows partial responses to be retrieved. See
41019// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41020// for more information.
41021func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall {
41022	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41023	return c
41024}
41025
41026// IfNoneMatch sets the optional parameter which makes the operation
41027// fail if the object's ETag matches the given value. This is useful for
41028// getting updates only after the object has changed since the last
41029// request. Use googleapi.IsNotModified to check whether the response
41030// error from Do is the result of In-None-Match.
41031func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall {
41032	c.ifNoneMatch_ = entityTag
41033	return c
41034}
41035
41036// Context sets the context to be used in this call's Do method. Any
41037// pending HTTP request will be aborted if the provided context is
41038// canceled.
41039func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall {
41040	c.ctx_ = ctx
41041	return c
41042}
41043
41044// Header returns an http.Header that can be modified by the caller to
41045// add HTTP headers to the request.
41046func (c *InstanceGroupsAggregatedListCall) Header() http.Header {
41047	if c.header_ == nil {
41048		c.header_ = make(http.Header)
41049	}
41050	return c.header_
41051}
41052
41053func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
41054	reqHeaders := make(http.Header)
41055	for k, v := range c.header_ {
41056		reqHeaders[k] = v
41057	}
41058	reqHeaders.Set("User-Agent", c.s.userAgent())
41059	if c.ifNoneMatch_ != "" {
41060		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41061	}
41062	var body io.Reader = nil
41063	c.urlParams_.Set("alt", alt)
41064	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroups")
41065	urls += "?" + c.urlParams_.Encode()
41066	req, _ := http.NewRequest("GET", urls, body)
41067	req.Header = reqHeaders
41068	googleapi.Expand(req.URL, map[string]string{
41069		"project": c.project,
41070	})
41071	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41072}
41073
41074// Do executes the "compute.instanceGroups.aggregatedList" call.
41075// Exactly one of *InstanceGroupAggregatedList or error will be non-nil.
41076// Any non-2xx status code is an error. Response headers are in either
41077// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response
41078// was returned at all) in error.(*googleapi.Error).Header. Use
41079// googleapi.IsNotModified to check whether the returned error was
41080// because http.StatusNotModified was returned.
41081func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) {
41082	gensupport.SetOptions(c.urlParams_, opts...)
41083	res, err := c.doRequest("json")
41084	if res != nil && res.StatusCode == http.StatusNotModified {
41085		if res.Body != nil {
41086			res.Body.Close()
41087		}
41088		return nil, &googleapi.Error{
41089			Code:   res.StatusCode,
41090			Header: res.Header,
41091		}
41092	}
41093	if err != nil {
41094		return nil, err
41095	}
41096	defer googleapi.CloseBody(res)
41097	if err := googleapi.CheckResponse(res); err != nil {
41098		return nil, err
41099	}
41100	ret := &InstanceGroupAggregatedList{
41101		ServerResponse: googleapi.ServerResponse{
41102			Header:         res.Header,
41103			HTTPStatusCode: res.StatusCode,
41104		},
41105	}
41106	target := &ret
41107	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
41108		return nil, err
41109	}
41110	return ret, nil
41111	// {
41112	//   "description": "Retrieves the list of instance groups and sorts them by zone.",
41113	//   "httpMethod": "GET",
41114	//   "id": "compute.instanceGroups.aggregatedList",
41115	//   "parameterOrder": [
41116	//     "project"
41117	//   ],
41118	//   "parameters": {
41119	//     "filter": {
41120	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
41121	//       "location": "query",
41122	//       "type": "string"
41123	//     },
41124	//     "maxResults": {
41125	//       "default": "500",
41126	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
41127	//       "format": "uint32",
41128	//       "location": "query",
41129	//       "minimum": "0",
41130	//       "type": "integer"
41131	//     },
41132	//     "orderBy": {
41133	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
41134	//       "location": "query",
41135	//       "type": "string"
41136	//     },
41137	//     "pageToken": {
41138	//       "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.",
41139	//       "location": "query",
41140	//       "type": "string"
41141	//     },
41142	//     "project": {
41143	//       "description": "Project ID for this request.",
41144	//       "location": "path",
41145	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41146	//       "required": true,
41147	//       "type": "string"
41148	//     }
41149	//   },
41150	//   "path": "{project}/aggregated/instanceGroups",
41151	//   "response": {
41152	//     "$ref": "InstanceGroupAggregatedList"
41153	//   },
41154	//   "scopes": [
41155	//     "https://www.googleapis.com/auth/cloud-platform",
41156	//     "https://www.googleapis.com/auth/compute",
41157	//     "https://www.googleapis.com/auth/compute.readonly"
41158	//   ]
41159	// }
41160
41161}
41162
41163// Pages invokes f for each page of results.
41164// A non-nil error returned from f will halt the iteration.
41165// The provided context supersedes any context provided to the Context method.
41166func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error {
41167	c.ctx_ = ctx
41168	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
41169	for {
41170		x, err := c.Do()
41171		if err != nil {
41172			return err
41173		}
41174		if err := f(x); err != nil {
41175			return err
41176		}
41177		if x.NextPageToken == "" {
41178			return nil
41179		}
41180		c.PageToken(x.NextPageToken)
41181	}
41182}
41183
41184// method id "compute.instanceGroups.delete":
41185
41186type InstanceGroupsDeleteCall struct {
41187	s             *Service
41188	project       string
41189	zone          string
41190	instanceGroup string
41191	urlParams_    gensupport.URLParams
41192	ctx_          context.Context
41193	header_       http.Header
41194}
41195
41196// Delete: Deletes the specified instance group. The instances in the
41197// group are not deleted. Note that instance group must not belong to a
41198// backend service. Read  Deleting an instance group for more
41199// information.
41200func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall {
41201	c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41202	c.project = project
41203	c.zone = zone
41204	c.instanceGroup = instanceGroup
41205	return c
41206}
41207
41208// RequestId sets the optional parameter "requestId": An optional
41209// request ID to identify requests. Specify a unique request ID so that
41210// if you must retry your request, the server will know to ignore the
41211// request if it has already been completed.
41212//
41213// For example, consider a situation where you make an initial request
41214// and the request times out. If you make the request again with the
41215// same request ID, the server can check if original operation with the
41216// same request ID was received, and if so, will ignore the second
41217// request. This prevents clients from accidentally creating duplicate
41218// commitments.
41219//
41220// The request ID must be a valid UUID with the exception that zero UUID
41221// is not supported (00000000-0000-0000-0000-000000000000).
41222func (c *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall {
41223	c.urlParams_.Set("requestId", requestId)
41224	return c
41225}
41226
41227// Fields allows partial responses to be retrieved. See
41228// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41229// for more information.
41230func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall {
41231	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41232	return c
41233}
41234
41235// Context sets the context to be used in this call's Do method. Any
41236// pending HTTP request will be aborted if the provided context is
41237// canceled.
41238func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall {
41239	c.ctx_ = ctx
41240	return c
41241}
41242
41243// Header returns an http.Header that can be modified by the caller to
41244// add HTTP headers to the request.
41245func (c *InstanceGroupsDeleteCall) Header() http.Header {
41246	if c.header_ == nil {
41247		c.header_ = make(http.Header)
41248	}
41249	return c.header_
41250}
41251
41252func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
41253	reqHeaders := make(http.Header)
41254	for k, v := range c.header_ {
41255		reqHeaders[k] = v
41256	}
41257	reqHeaders.Set("User-Agent", c.s.userAgent())
41258	var body io.Reader = nil
41259	c.urlParams_.Set("alt", alt)
41260	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}")
41261	urls += "?" + c.urlParams_.Encode()
41262	req, _ := http.NewRequest("DELETE", urls, body)
41263	req.Header = reqHeaders
41264	googleapi.Expand(req.URL, map[string]string{
41265		"project":       c.project,
41266		"zone":          c.zone,
41267		"instanceGroup": c.instanceGroup,
41268	})
41269	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41270}
41271
41272// Do executes the "compute.instanceGroups.delete" call.
41273// Exactly one of *Operation or error will be non-nil. Any non-2xx
41274// status code is an error. Response headers are in either
41275// *Operation.ServerResponse.Header or (if a response was returned at
41276// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41277// to check whether the returned error was because
41278// http.StatusNotModified was returned.
41279func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
41280	gensupport.SetOptions(c.urlParams_, opts...)
41281	res, err := c.doRequest("json")
41282	if res != nil && res.StatusCode == http.StatusNotModified {
41283		if res.Body != nil {
41284			res.Body.Close()
41285		}
41286		return nil, &googleapi.Error{
41287			Code:   res.StatusCode,
41288			Header: res.Header,
41289		}
41290	}
41291	if err != nil {
41292		return nil, err
41293	}
41294	defer googleapi.CloseBody(res)
41295	if err := googleapi.CheckResponse(res); err != nil {
41296		return nil, err
41297	}
41298	ret := &Operation{
41299		ServerResponse: googleapi.ServerResponse{
41300			Header:         res.Header,
41301			HTTPStatusCode: res.StatusCode,
41302		},
41303	}
41304	target := &ret
41305	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
41306		return nil, err
41307	}
41308	return ret, nil
41309	// {
41310	//   "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.",
41311	//   "httpMethod": "DELETE",
41312	//   "id": "compute.instanceGroups.delete",
41313	//   "parameterOrder": [
41314	//     "project",
41315	//     "zone",
41316	//     "instanceGroup"
41317	//   ],
41318	//   "parameters": {
41319	//     "instanceGroup": {
41320	//       "description": "The name of the instance group to delete.",
41321	//       "location": "path",
41322	//       "required": true,
41323	//       "type": "string"
41324	//     },
41325	//     "project": {
41326	//       "description": "Project ID for this request.",
41327	//       "location": "path",
41328	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41329	//       "required": true,
41330	//       "type": "string"
41331	//     },
41332	//     "requestId": {
41333	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
41334	//       "location": "query",
41335	//       "type": "string"
41336	//     },
41337	//     "zone": {
41338	//       "description": "The name of the zone where the instance group is located.",
41339	//       "location": "path",
41340	//       "required": true,
41341	//       "type": "string"
41342	//     }
41343	//   },
41344	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}",
41345	//   "response": {
41346	//     "$ref": "Operation"
41347	//   },
41348	//   "scopes": [
41349	//     "https://www.googleapis.com/auth/cloud-platform",
41350	//     "https://www.googleapis.com/auth/compute"
41351	//   ]
41352	// }
41353
41354}
41355
41356// method id "compute.instanceGroups.get":
41357
41358type InstanceGroupsGetCall struct {
41359	s             *Service
41360	project       string
41361	zone          string
41362	instanceGroup string
41363	urlParams_    gensupport.URLParams
41364	ifNoneMatch_  string
41365	ctx_          context.Context
41366	header_       http.Header
41367}
41368
41369// Get: Returns the specified instance group. Get a list of available
41370// instance groups by making a list() request.
41371func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall {
41372	c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41373	c.project = project
41374	c.zone = zone
41375	c.instanceGroup = instanceGroup
41376	return c
41377}
41378
41379// Fields allows partial responses to be retrieved. See
41380// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41381// for more information.
41382func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall {
41383	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41384	return c
41385}
41386
41387// IfNoneMatch sets the optional parameter which makes the operation
41388// fail if the object's ETag matches the given value. This is useful for
41389// getting updates only after the object has changed since the last
41390// request. Use googleapi.IsNotModified to check whether the response
41391// error from Do is the result of In-None-Match.
41392func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall {
41393	c.ifNoneMatch_ = entityTag
41394	return c
41395}
41396
41397// Context sets the context to be used in this call's Do method. Any
41398// pending HTTP request will be aborted if the provided context is
41399// canceled.
41400func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall {
41401	c.ctx_ = ctx
41402	return c
41403}
41404
41405// Header returns an http.Header that can be modified by the caller to
41406// add HTTP headers to the request.
41407func (c *InstanceGroupsGetCall) Header() http.Header {
41408	if c.header_ == nil {
41409		c.header_ = make(http.Header)
41410	}
41411	return c.header_
41412}
41413
41414func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) {
41415	reqHeaders := make(http.Header)
41416	for k, v := range c.header_ {
41417		reqHeaders[k] = v
41418	}
41419	reqHeaders.Set("User-Agent", c.s.userAgent())
41420	if c.ifNoneMatch_ != "" {
41421		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41422	}
41423	var body io.Reader = nil
41424	c.urlParams_.Set("alt", alt)
41425	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}")
41426	urls += "?" + c.urlParams_.Encode()
41427	req, _ := http.NewRequest("GET", urls, body)
41428	req.Header = reqHeaders
41429	googleapi.Expand(req.URL, map[string]string{
41430		"project":       c.project,
41431		"zone":          c.zone,
41432		"instanceGroup": c.instanceGroup,
41433	})
41434	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41435}
41436
41437// Do executes the "compute.instanceGroups.get" call.
41438// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx
41439// status code is an error. Response headers are in either
41440// *InstanceGroup.ServerResponse.Header or (if a response was returned
41441// at all) in error.(*googleapi.Error).Header. Use
41442// googleapi.IsNotModified to check whether the returned error was
41443// because http.StatusNotModified was returned.
41444func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) {
41445	gensupport.SetOptions(c.urlParams_, opts...)
41446	res, err := c.doRequest("json")
41447	if res != nil && res.StatusCode == http.StatusNotModified {
41448		if res.Body != nil {
41449			res.Body.Close()
41450		}
41451		return nil, &googleapi.Error{
41452			Code:   res.StatusCode,
41453			Header: res.Header,
41454		}
41455	}
41456	if err != nil {
41457		return nil, err
41458	}
41459	defer googleapi.CloseBody(res)
41460	if err := googleapi.CheckResponse(res); err != nil {
41461		return nil, err
41462	}
41463	ret := &InstanceGroup{
41464		ServerResponse: googleapi.ServerResponse{
41465			Header:         res.Header,
41466			HTTPStatusCode: res.StatusCode,
41467		},
41468	}
41469	target := &ret
41470	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
41471		return nil, err
41472	}
41473	return ret, nil
41474	// {
41475	//   "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.",
41476	//   "httpMethod": "GET",
41477	//   "id": "compute.instanceGroups.get",
41478	//   "parameterOrder": [
41479	//     "project",
41480	//     "zone",
41481	//     "instanceGroup"
41482	//   ],
41483	//   "parameters": {
41484	//     "instanceGroup": {
41485	//       "description": "The name of the instance group.",
41486	//       "location": "path",
41487	//       "required": true,
41488	//       "type": "string"
41489	//     },
41490	//     "project": {
41491	//       "description": "Project ID for this request.",
41492	//       "location": "path",
41493	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41494	//       "required": true,
41495	//       "type": "string"
41496	//     },
41497	//     "zone": {
41498	//       "description": "The name of the zone where the instance group is located.",
41499	//       "location": "path",
41500	//       "required": true,
41501	//       "type": "string"
41502	//     }
41503	//   },
41504	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}",
41505	//   "response": {
41506	//     "$ref": "InstanceGroup"
41507	//   },
41508	//   "scopes": [
41509	//     "https://www.googleapis.com/auth/cloud-platform",
41510	//     "https://www.googleapis.com/auth/compute",
41511	//     "https://www.googleapis.com/auth/compute.readonly"
41512	//   ]
41513	// }
41514
41515}
41516
41517// method id "compute.instanceGroups.insert":
41518
41519type InstanceGroupsInsertCall struct {
41520	s             *Service
41521	project       string
41522	zone          string
41523	instancegroup *InstanceGroup
41524	urlParams_    gensupport.URLParams
41525	ctx_          context.Context
41526	header_       http.Header
41527}
41528
41529// Insert: Creates an instance group in the specified project using the
41530// parameters that are included in the request.
41531func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall {
41532	c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41533	c.project = project
41534	c.zone = zone
41535	c.instancegroup = instancegroup
41536	return c
41537}
41538
41539// RequestId sets the optional parameter "requestId": An optional
41540// request ID to identify requests. Specify a unique request ID so that
41541// if you must retry your request, the server will know to ignore the
41542// request if it has already been completed.
41543//
41544// For example, consider a situation where you make an initial request
41545// and the request times out. If you make the request again with the
41546// same request ID, the server can check if original operation with the
41547// same request ID was received, and if so, will ignore the second
41548// request. This prevents clients from accidentally creating duplicate
41549// commitments.
41550//
41551// The request ID must be a valid UUID with the exception that zero UUID
41552// is not supported (00000000-0000-0000-0000-000000000000).
41553func (c *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall {
41554	c.urlParams_.Set("requestId", requestId)
41555	return c
41556}
41557
41558// Fields allows partial responses to be retrieved. See
41559// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41560// for more information.
41561func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall {
41562	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41563	return c
41564}
41565
41566// Context sets the context to be used in this call's Do method. Any
41567// pending HTTP request will be aborted if the provided context is
41568// canceled.
41569func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall {
41570	c.ctx_ = ctx
41571	return c
41572}
41573
41574// Header returns an http.Header that can be modified by the caller to
41575// add HTTP headers to the request.
41576func (c *InstanceGroupsInsertCall) Header() http.Header {
41577	if c.header_ == nil {
41578		c.header_ = make(http.Header)
41579	}
41580	return c.header_
41581}
41582
41583func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
41584	reqHeaders := make(http.Header)
41585	for k, v := range c.header_ {
41586		reqHeaders[k] = v
41587	}
41588	reqHeaders.Set("User-Agent", c.s.userAgent())
41589	var body io.Reader = nil
41590	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup)
41591	if err != nil {
41592		return nil, err
41593	}
41594	reqHeaders.Set("Content-Type", "application/json")
41595	c.urlParams_.Set("alt", alt)
41596	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups")
41597	urls += "?" + c.urlParams_.Encode()
41598	req, _ := http.NewRequest("POST", urls, body)
41599	req.Header = reqHeaders
41600	googleapi.Expand(req.URL, map[string]string{
41601		"project": c.project,
41602		"zone":    c.zone,
41603	})
41604	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41605}
41606
41607// Do executes the "compute.instanceGroups.insert" call.
41608// Exactly one of *Operation or error will be non-nil. Any non-2xx
41609// status code is an error. Response headers are in either
41610// *Operation.ServerResponse.Header or (if a response was returned at
41611// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41612// to check whether the returned error was because
41613// http.StatusNotModified was returned.
41614func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
41615	gensupport.SetOptions(c.urlParams_, opts...)
41616	res, err := c.doRequest("json")
41617	if res != nil && res.StatusCode == http.StatusNotModified {
41618		if res.Body != nil {
41619			res.Body.Close()
41620		}
41621		return nil, &googleapi.Error{
41622			Code:   res.StatusCode,
41623			Header: res.Header,
41624		}
41625	}
41626	if err != nil {
41627		return nil, err
41628	}
41629	defer googleapi.CloseBody(res)
41630	if err := googleapi.CheckResponse(res); err != nil {
41631		return nil, err
41632	}
41633	ret := &Operation{
41634		ServerResponse: googleapi.ServerResponse{
41635			Header:         res.Header,
41636			HTTPStatusCode: res.StatusCode,
41637		},
41638	}
41639	target := &ret
41640	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
41641		return nil, err
41642	}
41643	return ret, nil
41644	// {
41645	//   "description": "Creates an instance group in the specified project using the parameters that are included in the request.",
41646	//   "httpMethod": "POST",
41647	//   "id": "compute.instanceGroups.insert",
41648	//   "parameterOrder": [
41649	//     "project",
41650	//     "zone"
41651	//   ],
41652	//   "parameters": {
41653	//     "project": {
41654	//       "description": "Project ID for this request.",
41655	//       "location": "path",
41656	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41657	//       "required": true,
41658	//       "type": "string"
41659	//     },
41660	//     "requestId": {
41661	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
41662	//       "location": "query",
41663	//       "type": "string"
41664	//     },
41665	//     "zone": {
41666	//       "description": "The name of the zone where you want to create the instance group.",
41667	//       "location": "path",
41668	//       "required": true,
41669	//       "type": "string"
41670	//     }
41671	//   },
41672	//   "path": "{project}/zones/{zone}/instanceGroups",
41673	//   "request": {
41674	//     "$ref": "InstanceGroup"
41675	//   },
41676	//   "response": {
41677	//     "$ref": "Operation"
41678	//   },
41679	//   "scopes": [
41680	//     "https://www.googleapis.com/auth/cloud-platform",
41681	//     "https://www.googleapis.com/auth/compute"
41682	//   ]
41683	// }
41684
41685}
41686
41687// method id "compute.instanceGroups.list":
41688
41689type InstanceGroupsListCall struct {
41690	s            *Service
41691	project      string
41692	zone         string
41693	urlParams_   gensupport.URLParams
41694	ifNoneMatch_ string
41695	ctx_         context.Context
41696	header_      http.Header
41697}
41698
41699// List: Retrieves the list of instance groups that are located in the
41700// specified project and zone.
41701func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall {
41702	c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41703	c.project = project
41704	c.zone = zone
41705	return c
41706}
41707
41708// Filter sets the optional parameter "filter": Sets a filter
41709// {expression} for filtering listed resources. Your {expression} must
41710// be in the format: field_name comparison_string literal_string.
41711//
41712// The field_name is the name of the field you want to compare. Only
41713// atomic field types are supported (string, number, boolean). The
41714// comparison_string must be either eq (equals) or ne (not equals). The
41715// literal_string is the string value to filter to. The literal value
41716// must be valid for the type of field you are filtering by (string,
41717// number, boolean). For string fields, the literal value is interpreted
41718// as a regular expression using RE2 syntax. The literal value must
41719// match the entire field.
41720//
41721// For example, to filter for instances that do not have a name of
41722// example-instance, you would use name ne example-instance.
41723//
41724// You can filter on nested fields. For example, you could filter on
41725// instances that have set the scheduling.automaticRestart field to
41726// true. Use filtering on nested fields to take advantage of labels to
41727// organize and search for results based on label values.
41728//
41729// To filter on multiple expressions, provide each separate expression
41730// within parentheses. For example, (scheduling.automaticRestart eq
41731// true) (zone eq us-central1-f). Multiple expressions are treated as
41732// AND expressions, meaning that resources must match all expressions to
41733// pass the filters.
41734func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall {
41735	c.urlParams_.Set("filter", filter)
41736	return c
41737}
41738
41739// MaxResults sets the optional parameter "maxResults": The maximum
41740// number of results per page that should be returned. If the number of
41741// available results is larger than maxResults, Compute Engine returns a
41742// nextPageToken that can be used to get the next page of results in
41743// subsequent list requests. Acceptable values are 0 to 500, inclusive.
41744// (Default: 500)
41745func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall {
41746	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41747	return c
41748}
41749
41750// OrderBy sets the optional parameter "orderBy": Sorts list results by
41751// a certain order. By default, results are returned in alphanumerical
41752// order based on the resource name.
41753//
41754// You can also sort results in descending order based on the creation
41755// timestamp using orderBy="creationTimestamp desc". This sorts results
41756// based on the creationTimestamp field in reverse chronological order
41757// (newest result first). Use this to sort resources like operations so
41758// that the newest operation is returned first.
41759//
41760// Currently, only sorting by name or creationTimestamp desc is
41761// supported.
41762func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall {
41763	c.urlParams_.Set("orderBy", orderBy)
41764	return c
41765}
41766
41767// PageToken sets the optional parameter "pageToken": Specifies a page
41768// token to use. Set pageToken to the nextPageToken returned by a
41769// previous list request to get the next page of results.
41770func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall {
41771	c.urlParams_.Set("pageToken", pageToken)
41772	return c
41773}
41774
41775// Fields allows partial responses to be retrieved. See
41776// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41777// for more information.
41778func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall {
41779	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41780	return c
41781}
41782
41783// IfNoneMatch sets the optional parameter which makes the operation
41784// fail if the object's ETag matches the given value. This is useful for
41785// getting updates only after the object has changed since the last
41786// request. Use googleapi.IsNotModified to check whether the response
41787// error from Do is the result of In-None-Match.
41788func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall {
41789	c.ifNoneMatch_ = entityTag
41790	return c
41791}
41792
41793// Context sets the context to be used in this call's Do method. Any
41794// pending HTTP request will be aborted if the provided context is
41795// canceled.
41796func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall {
41797	c.ctx_ = ctx
41798	return c
41799}
41800
41801// Header returns an http.Header that can be modified by the caller to
41802// add HTTP headers to the request.
41803func (c *InstanceGroupsListCall) Header() http.Header {
41804	if c.header_ == nil {
41805		c.header_ = make(http.Header)
41806	}
41807	return c.header_
41808}
41809
41810func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) {
41811	reqHeaders := make(http.Header)
41812	for k, v := range c.header_ {
41813		reqHeaders[k] = v
41814	}
41815	reqHeaders.Set("User-Agent", c.s.userAgent())
41816	if c.ifNoneMatch_ != "" {
41817		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
41818	}
41819	var body io.Reader = nil
41820	c.urlParams_.Set("alt", alt)
41821	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups")
41822	urls += "?" + c.urlParams_.Encode()
41823	req, _ := http.NewRequest("GET", urls, body)
41824	req.Header = reqHeaders
41825	googleapi.Expand(req.URL, map[string]string{
41826		"project": c.project,
41827		"zone":    c.zone,
41828	})
41829	return gensupport.SendRequest(c.ctx_, c.s.client, req)
41830}
41831
41832// Do executes the "compute.instanceGroups.list" call.
41833// Exactly one of *InstanceGroupList or error will be non-nil. Any
41834// non-2xx status code is an error. Response headers are in either
41835// *InstanceGroupList.ServerResponse.Header or (if a response was
41836// returned at all) in error.(*googleapi.Error).Header. Use
41837// googleapi.IsNotModified to check whether the returned error was
41838// because http.StatusNotModified was returned.
41839func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) {
41840	gensupport.SetOptions(c.urlParams_, opts...)
41841	res, err := c.doRequest("json")
41842	if res != nil && res.StatusCode == http.StatusNotModified {
41843		if res.Body != nil {
41844			res.Body.Close()
41845		}
41846		return nil, &googleapi.Error{
41847			Code:   res.StatusCode,
41848			Header: res.Header,
41849		}
41850	}
41851	if err != nil {
41852		return nil, err
41853	}
41854	defer googleapi.CloseBody(res)
41855	if err := googleapi.CheckResponse(res); err != nil {
41856		return nil, err
41857	}
41858	ret := &InstanceGroupList{
41859		ServerResponse: googleapi.ServerResponse{
41860			Header:         res.Header,
41861			HTTPStatusCode: res.StatusCode,
41862		},
41863	}
41864	target := &ret
41865	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
41866		return nil, err
41867	}
41868	return ret, nil
41869	// {
41870	//   "description": "Retrieves the list of instance groups that are located in the specified project and zone.",
41871	//   "httpMethod": "GET",
41872	//   "id": "compute.instanceGroups.list",
41873	//   "parameterOrder": [
41874	//     "project",
41875	//     "zone"
41876	//   ],
41877	//   "parameters": {
41878	//     "filter": {
41879	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
41880	//       "location": "query",
41881	//       "type": "string"
41882	//     },
41883	//     "maxResults": {
41884	//       "default": "500",
41885	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
41886	//       "format": "uint32",
41887	//       "location": "query",
41888	//       "minimum": "0",
41889	//       "type": "integer"
41890	//     },
41891	//     "orderBy": {
41892	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
41893	//       "location": "query",
41894	//       "type": "string"
41895	//     },
41896	//     "pageToken": {
41897	//       "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.",
41898	//       "location": "query",
41899	//       "type": "string"
41900	//     },
41901	//     "project": {
41902	//       "description": "Project ID for this request.",
41903	//       "location": "path",
41904	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41905	//       "required": true,
41906	//       "type": "string"
41907	//     },
41908	//     "zone": {
41909	//       "description": "The name of the zone where the instance group is located.",
41910	//       "location": "path",
41911	//       "required": true,
41912	//       "type": "string"
41913	//     }
41914	//   },
41915	//   "path": "{project}/zones/{zone}/instanceGroups",
41916	//   "response": {
41917	//     "$ref": "InstanceGroupList"
41918	//   },
41919	//   "scopes": [
41920	//     "https://www.googleapis.com/auth/cloud-platform",
41921	//     "https://www.googleapis.com/auth/compute",
41922	//     "https://www.googleapis.com/auth/compute.readonly"
41923	//   ]
41924	// }
41925
41926}
41927
41928// Pages invokes f for each page of results.
41929// A non-nil error returned from f will halt the iteration.
41930// The provided context supersedes any context provided to the Context method.
41931func (c *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error {
41932	c.ctx_ = ctx
41933	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
41934	for {
41935		x, err := c.Do()
41936		if err != nil {
41937			return err
41938		}
41939		if err := f(x); err != nil {
41940			return err
41941		}
41942		if x.NextPageToken == "" {
41943			return nil
41944		}
41945		c.PageToken(x.NextPageToken)
41946	}
41947}
41948
41949// method id "compute.instanceGroups.listInstances":
41950
41951type InstanceGroupsListInstancesCall struct {
41952	s                                  *Service
41953	project                            string
41954	zone                               string
41955	instanceGroup                      string
41956	instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest
41957	urlParams_                         gensupport.URLParams
41958	ctx_                               context.Context
41959	header_                            http.Header
41960}
41961
41962// ListInstances: Lists the instances in the specified instance group.
41963func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall {
41964	c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41965	c.project = project
41966	c.zone = zone
41967	c.instanceGroup = instanceGroup
41968	c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest
41969	return c
41970}
41971
41972// Filter sets the optional parameter "filter": Sets a filter
41973// {expression} for filtering listed resources. Your {expression} must
41974// be in the format: field_name comparison_string literal_string.
41975//
41976// The field_name is the name of the field you want to compare. Only
41977// atomic field types are supported (string, number, boolean). The
41978// comparison_string must be either eq (equals) or ne (not equals). The
41979// literal_string is the string value to filter to. The literal value
41980// must be valid for the type of field you are filtering by (string,
41981// number, boolean). For string fields, the literal value is interpreted
41982// as a regular expression using RE2 syntax. The literal value must
41983// match the entire field.
41984//
41985// For example, to filter for instances that do not have a name of
41986// example-instance, you would use name ne example-instance.
41987//
41988// You can filter on nested fields. For example, you could filter on
41989// instances that have set the scheduling.automaticRestart field to
41990// true. Use filtering on nested fields to take advantage of labels to
41991// organize and search for results based on label values.
41992//
41993// To filter on multiple expressions, provide each separate expression
41994// within parentheses. For example, (scheduling.automaticRestart eq
41995// true) (zone eq us-central1-f). Multiple expressions are treated as
41996// AND expressions, meaning that resources must match all expressions to
41997// pass the filters.
41998func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall {
41999	c.urlParams_.Set("filter", filter)
42000	return c
42001}
42002
42003// MaxResults sets the optional parameter "maxResults": The maximum
42004// number of results per page that should be returned. If the number of
42005// available results is larger than maxResults, Compute Engine returns a
42006// nextPageToken that can be used to get the next page of results in
42007// subsequent list requests. Acceptable values are 0 to 500, inclusive.
42008// (Default: 500)
42009func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall {
42010	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
42011	return c
42012}
42013
42014// OrderBy sets the optional parameter "orderBy": Sorts list results by
42015// a certain order. By default, results are returned in alphanumerical
42016// order based on the resource name.
42017//
42018// You can also sort results in descending order based on the creation
42019// timestamp using orderBy="creationTimestamp desc". This sorts results
42020// based on the creationTimestamp field in reverse chronological order
42021// (newest result first). Use this to sort resources like operations so
42022// that the newest operation is returned first.
42023//
42024// Currently, only sorting by name or creationTimestamp desc is
42025// supported.
42026func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall {
42027	c.urlParams_.Set("orderBy", orderBy)
42028	return c
42029}
42030
42031// PageToken sets the optional parameter "pageToken": Specifies a page
42032// token to use. Set pageToken to the nextPageToken returned by a
42033// previous list request to get the next page of results.
42034func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall {
42035	c.urlParams_.Set("pageToken", pageToken)
42036	return c
42037}
42038
42039// Fields allows partial responses to be retrieved. See
42040// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42041// for more information.
42042func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall {
42043	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42044	return c
42045}
42046
42047// Context sets the context to be used in this call's Do method. Any
42048// pending HTTP request will be aborted if the provided context is
42049// canceled.
42050func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall {
42051	c.ctx_ = ctx
42052	return c
42053}
42054
42055// Header returns an http.Header that can be modified by the caller to
42056// add HTTP headers to the request.
42057func (c *InstanceGroupsListInstancesCall) Header() http.Header {
42058	if c.header_ == nil {
42059		c.header_ = make(http.Header)
42060	}
42061	return c.header_
42062}
42063
42064func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) {
42065	reqHeaders := make(http.Header)
42066	for k, v := range c.header_ {
42067		reqHeaders[k] = v
42068	}
42069	reqHeaders.Set("User-Agent", c.s.userAgent())
42070	var body io.Reader = nil
42071	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest)
42072	if err != nil {
42073		return nil, err
42074	}
42075	reqHeaders.Set("Content-Type", "application/json")
42076	c.urlParams_.Set("alt", alt)
42077	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances")
42078	urls += "?" + c.urlParams_.Encode()
42079	req, _ := http.NewRequest("POST", urls, body)
42080	req.Header = reqHeaders
42081	googleapi.Expand(req.URL, map[string]string{
42082		"project":       c.project,
42083		"zone":          c.zone,
42084		"instanceGroup": c.instanceGroup,
42085	})
42086	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42087}
42088
42089// Do executes the "compute.instanceGroups.listInstances" call.
42090// Exactly one of *InstanceGroupsListInstances or error will be non-nil.
42091// Any non-2xx status code is an error. Response headers are in either
42092// *InstanceGroupsListInstances.ServerResponse.Header or (if a response
42093// was returned at all) in error.(*googleapi.Error).Header. Use
42094// googleapi.IsNotModified to check whether the returned error was
42095// because http.StatusNotModified was returned.
42096func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) {
42097	gensupport.SetOptions(c.urlParams_, opts...)
42098	res, err := c.doRequest("json")
42099	if res != nil && res.StatusCode == http.StatusNotModified {
42100		if res.Body != nil {
42101			res.Body.Close()
42102		}
42103		return nil, &googleapi.Error{
42104			Code:   res.StatusCode,
42105			Header: res.Header,
42106		}
42107	}
42108	if err != nil {
42109		return nil, err
42110	}
42111	defer googleapi.CloseBody(res)
42112	if err := googleapi.CheckResponse(res); err != nil {
42113		return nil, err
42114	}
42115	ret := &InstanceGroupsListInstances{
42116		ServerResponse: googleapi.ServerResponse{
42117			Header:         res.Header,
42118			HTTPStatusCode: res.StatusCode,
42119		},
42120	}
42121	target := &ret
42122	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
42123		return nil, err
42124	}
42125	return ret, nil
42126	// {
42127	//   "description": "Lists the instances in the specified instance group.",
42128	//   "httpMethod": "POST",
42129	//   "id": "compute.instanceGroups.listInstances",
42130	//   "parameterOrder": [
42131	//     "project",
42132	//     "zone",
42133	//     "instanceGroup"
42134	//   ],
42135	//   "parameters": {
42136	//     "filter": {
42137	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
42138	//       "location": "query",
42139	//       "type": "string"
42140	//     },
42141	//     "instanceGroup": {
42142	//       "description": "The name of the instance group from which you want to generate a list of included instances.",
42143	//       "location": "path",
42144	//       "required": true,
42145	//       "type": "string"
42146	//     },
42147	//     "maxResults": {
42148	//       "default": "500",
42149	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
42150	//       "format": "uint32",
42151	//       "location": "query",
42152	//       "minimum": "0",
42153	//       "type": "integer"
42154	//     },
42155	//     "orderBy": {
42156	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
42157	//       "location": "query",
42158	//       "type": "string"
42159	//     },
42160	//     "pageToken": {
42161	//       "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.",
42162	//       "location": "query",
42163	//       "type": "string"
42164	//     },
42165	//     "project": {
42166	//       "description": "Project ID for this request.",
42167	//       "location": "path",
42168	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42169	//       "required": true,
42170	//       "type": "string"
42171	//     },
42172	//     "zone": {
42173	//       "description": "The name of the zone where the instance group is located.",
42174	//       "location": "path",
42175	//       "required": true,
42176	//       "type": "string"
42177	//     }
42178	//   },
42179	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances",
42180	//   "request": {
42181	//     "$ref": "InstanceGroupsListInstancesRequest"
42182	//   },
42183	//   "response": {
42184	//     "$ref": "InstanceGroupsListInstances"
42185	//   },
42186	//   "scopes": [
42187	//     "https://www.googleapis.com/auth/cloud-platform",
42188	//     "https://www.googleapis.com/auth/compute",
42189	//     "https://www.googleapis.com/auth/compute.readonly"
42190	//   ]
42191	// }
42192
42193}
42194
42195// Pages invokes f for each page of results.
42196// A non-nil error returned from f will halt the iteration.
42197// The provided context supersedes any context provided to the Context method.
42198func (c *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) error) error {
42199	c.ctx_ = ctx
42200	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
42201	for {
42202		x, err := c.Do()
42203		if err != nil {
42204			return err
42205		}
42206		if err := f(x); err != nil {
42207			return err
42208		}
42209		if x.NextPageToken == "" {
42210			return nil
42211		}
42212		c.PageToken(x.NextPageToken)
42213	}
42214}
42215
42216// method id "compute.instanceGroups.removeInstances":
42217
42218type InstanceGroupsRemoveInstancesCall struct {
42219	s                                    *Service
42220	project                              string
42221	zone                                 string
42222	instanceGroup                        string
42223	instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest
42224	urlParams_                           gensupport.URLParams
42225	ctx_                                 context.Context
42226	header_                              http.Header
42227}
42228
42229// RemoveInstances: Removes one or more instances from the specified
42230// instance group, but does not delete those instances.
42231//
42232// If the group is part of a backend service that has enabled connection
42233// draining, it can take up to 60 seconds after the connection draining
42234// duration before the VM instance is removed or deleted.
42235func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall {
42236	c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42237	c.project = project
42238	c.zone = zone
42239	c.instanceGroup = instanceGroup
42240	c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest
42241	return c
42242}
42243
42244// RequestId sets the optional parameter "requestId": An optional
42245// request ID to identify requests. Specify a unique request ID so that
42246// if you must retry your request, the server will know to ignore the
42247// request if it has already been completed.
42248//
42249// For example, consider a situation where you make an initial request
42250// and the request times out. If you make the request again with the
42251// same request ID, the server can check if original operation with the
42252// same request ID was received, and if so, will ignore the second
42253// request. This prevents clients from accidentally creating duplicate
42254// commitments.
42255//
42256// The request ID must be a valid UUID with the exception that zero UUID
42257// is not supported (00000000-0000-0000-0000-000000000000).
42258func (c *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall {
42259	c.urlParams_.Set("requestId", requestId)
42260	return c
42261}
42262
42263// Fields allows partial responses to be retrieved. See
42264// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42265// for more information.
42266func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall {
42267	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42268	return c
42269}
42270
42271// Context sets the context to be used in this call's Do method. Any
42272// pending HTTP request will be aborted if the provided context is
42273// canceled.
42274func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall {
42275	c.ctx_ = ctx
42276	return c
42277}
42278
42279// Header returns an http.Header that can be modified by the caller to
42280// add HTTP headers to the request.
42281func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header {
42282	if c.header_ == nil {
42283		c.header_ = make(http.Header)
42284	}
42285	return c.header_
42286}
42287
42288func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) {
42289	reqHeaders := make(http.Header)
42290	for k, v := range c.header_ {
42291		reqHeaders[k] = v
42292	}
42293	reqHeaders.Set("User-Agent", c.s.userAgent())
42294	var body io.Reader = nil
42295	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest)
42296	if err != nil {
42297		return nil, err
42298	}
42299	reqHeaders.Set("Content-Type", "application/json")
42300	c.urlParams_.Set("alt", alt)
42301	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances")
42302	urls += "?" + c.urlParams_.Encode()
42303	req, _ := http.NewRequest("POST", urls, body)
42304	req.Header = reqHeaders
42305	googleapi.Expand(req.URL, map[string]string{
42306		"project":       c.project,
42307		"zone":          c.zone,
42308		"instanceGroup": c.instanceGroup,
42309	})
42310	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42311}
42312
42313// Do executes the "compute.instanceGroups.removeInstances" call.
42314// Exactly one of *Operation or error will be non-nil. Any non-2xx
42315// status code is an error. Response headers are in either
42316// *Operation.ServerResponse.Header or (if a response was returned at
42317// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42318// to check whether the returned error was because
42319// http.StatusNotModified was returned.
42320func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
42321	gensupport.SetOptions(c.urlParams_, opts...)
42322	res, err := c.doRequest("json")
42323	if res != nil && res.StatusCode == http.StatusNotModified {
42324		if res.Body != nil {
42325			res.Body.Close()
42326		}
42327		return nil, &googleapi.Error{
42328			Code:   res.StatusCode,
42329			Header: res.Header,
42330		}
42331	}
42332	if err != nil {
42333		return nil, err
42334	}
42335	defer googleapi.CloseBody(res)
42336	if err := googleapi.CheckResponse(res); err != nil {
42337		return nil, err
42338	}
42339	ret := &Operation{
42340		ServerResponse: googleapi.ServerResponse{
42341			Header:         res.Header,
42342			HTTPStatusCode: res.StatusCode,
42343		},
42344	}
42345	target := &ret
42346	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
42347		return nil, err
42348	}
42349	return ret, nil
42350	// {
42351	//   "description": "Removes one or more instances from the specified instance group, but does not delete those instances.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.",
42352	//   "httpMethod": "POST",
42353	//   "id": "compute.instanceGroups.removeInstances",
42354	//   "parameterOrder": [
42355	//     "project",
42356	//     "zone",
42357	//     "instanceGroup"
42358	//   ],
42359	//   "parameters": {
42360	//     "instanceGroup": {
42361	//       "description": "The name of the instance group where the specified instances will be removed.",
42362	//       "location": "path",
42363	//       "required": true,
42364	//       "type": "string"
42365	//     },
42366	//     "project": {
42367	//       "description": "Project ID for this request.",
42368	//       "location": "path",
42369	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42370	//       "required": true,
42371	//       "type": "string"
42372	//     },
42373	//     "requestId": {
42374	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
42375	//       "location": "query",
42376	//       "type": "string"
42377	//     },
42378	//     "zone": {
42379	//       "description": "The name of the zone where the instance group is located.",
42380	//       "location": "path",
42381	//       "required": true,
42382	//       "type": "string"
42383	//     }
42384	//   },
42385	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances",
42386	//   "request": {
42387	//     "$ref": "InstanceGroupsRemoveInstancesRequest"
42388	//   },
42389	//   "response": {
42390	//     "$ref": "Operation"
42391	//   },
42392	//   "scopes": [
42393	//     "https://www.googleapis.com/auth/cloud-platform",
42394	//     "https://www.googleapis.com/auth/compute"
42395	//   ]
42396	// }
42397
42398}
42399
42400// method id "compute.instanceGroups.setNamedPorts":
42401
42402type InstanceGroupsSetNamedPortsCall struct {
42403	s                                  *Service
42404	project                            string
42405	zone                               string
42406	instanceGroup                      string
42407	instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest
42408	urlParams_                         gensupport.URLParams
42409	ctx_                               context.Context
42410	header_                            http.Header
42411}
42412
42413// SetNamedPorts: Sets the named ports for the specified instance group.
42414func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall {
42415	c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42416	c.project = project
42417	c.zone = zone
42418	c.instanceGroup = instanceGroup
42419	c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest
42420	return c
42421}
42422
42423// RequestId sets the optional parameter "requestId": An optional
42424// request ID to identify requests. Specify a unique request ID so that
42425// if you must retry your request, the server will know to ignore the
42426// request if it has already been completed.
42427//
42428// For example, consider a situation where you make an initial request
42429// and the request times out. If you make the request again with the
42430// same request ID, the server can check if original operation with the
42431// same request ID was received, and if so, will ignore the second
42432// request. This prevents clients from accidentally creating duplicate
42433// commitments.
42434//
42435// The request ID must be a valid UUID with the exception that zero UUID
42436// is not supported (00000000-0000-0000-0000-000000000000).
42437func (c *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall {
42438	c.urlParams_.Set("requestId", requestId)
42439	return c
42440}
42441
42442// Fields allows partial responses to be retrieved. See
42443// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42444// for more information.
42445func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall {
42446	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42447	return c
42448}
42449
42450// Context sets the context to be used in this call's Do method. Any
42451// pending HTTP request will be aborted if the provided context is
42452// canceled.
42453func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall {
42454	c.ctx_ = ctx
42455	return c
42456}
42457
42458// Header returns an http.Header that can be modified by the caller to
42459// add HTTP headers to the request.
42460func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header {
42461	if c.header_ == nil {
42462		c.header_ = make(http.Header)
42463	}
42464	return c.header_
42465}
42466
42467func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) {
42468	reqHeaders := make(http.Header)
42469	for k, v := range c.header_ {
42470		reqHeaders[k] = v
42471	}
42472	reqHeaders.Set("User-Agent", c.s.userAgent())
42473	var body io.Reader = nil
42474	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest)
42475	if err != nil {
42476		return nil, err
42477	}
42478	reqHeaders.Set("Content-Type", "application/json")
42479	c.urlParams_.Set("alt", alt)
42480	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts")
42481	urls += "?" + c.urlParams_.Encode()
42482	req, _ := http.NewRequest("POST", urls, body)
42483	req.Header = reqHeaders
42484	googleapi.Expand(req.URL, map[string]string{
42485		"project":       c.project,
42486		"zone":          c.zone,
42487		"instanceGroup": c.instanceGroup,
42488	})
42489	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42490}
42491
42492// Do executes the "compute.instanceGroups.setNamedPorts" call.
42493// Exactly one of *Operation or error will be non-nil. Any non-2xx
42494// status code is an error. Response headers are in either
42495// *Operation.ServerResponse.Header or (if a response was returned at
42496// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42497// to check whether the returned error was because
42498// http.StatusNotModified was returned.
42499func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
42500	gensupport.SetOptions(c.urlParams_, opts...)
42501	res, err := c.doRequest("json")
42502	if res != nil && res.StatusCode == http.StatusNotModified {
42503		if res.Body != nil {
42504			res.Body.Close()
42505		}
42506		return nil, &googleapi.Error{
42507			Code:   res.StatusCode,
42508			Header: res.Header,
42509		}
42510	}
42511	if err != nil {
42512		return nil, err
42513	}
42514	defer googleapi.CloseBody(res)
42515	if err := googleapi.CheckResponse(res); err != nil {
42516		return nil, err
42517	}
42518	ret := &Operation{
42519		ServerResponse: googleapi.ServerResponse{
42520			Header:         res.Header,
42521			HTTPStatusCode: res.StatusCode,
42522		},
42523	}
42524	target := &ret
42525	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
42526		return nil, err
42527	}
42528	return ret, nil
42529	// {
42530	//   "description": "Sets the named ports for the specified instance group.",
42531	//   "httpMethod": "POST",
42532	//   "id": "compute.instanceGroups.setNamedPorts",
42533	//   "parameterOrder": [
42534	//     "project",
42535	//     "zone",
42536	//     "instanceGroup"
42537	//   ],
42538	//   "parameters": {
42539	//     "instanceGroup": {
42540	//       "description": "The name of the instance group where the named ports are updated.",
42541	//       "location": "path",
42542	//       "required": true,
42543	//       "type": "string"
42544	//     },
42545	//     "project": {
42546	//       "description": "Project ID for this request.",
42547	//       "location": "path",
42548	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42549	//       "required": true,
42550	//       "type": "string"
42551	//     },
42552	//     "requestId": {
42553	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
42554	//       "location": "query",
42555	//       "type": "string"
42556	//     },
42557	//     "zone": {
42558	//       "description": "The name of the zone where the instance group is located.",
42559	//       "location": "path",
42560	//       "required": true,
42561	//       "type": "string"
42562	//     }
42563	//   },
42564	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts",
42565	//   "request": {
42566	//     "$ref": "InstanceGroupsSetNamedPortsRequest"
42567	//   },
42568	//   "response": {
42569	//     "$ref": "Operation"
42570	//   },
42571	//   "scopes": [
42572	//     "https://www.googleapis.com/auth/cloud-platform",
42573	//     "https://www.googleapis.com/auth/compute"
42574	//   ]
42575	// }
42576
42577}
42578
42579// method id "compute.instanceGroups.testIamPermissions":
42580
42581type InstanceGroupsTestIamPermissionsCall struct {
42582	s                      *Service
42583	project                string
42584	zone                   string
42585	resource               string
42586	testpermissionsrequest *TestPermissionsRequest
42587	urlParams_             gensupport.URLParams
42588	ctx_                   context.Context
42589	header_                http.Header
42590}
42591
42592// TestIamPermissions: Returns permissions that a caller has on the
42593// specified resource.
42594func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall {
42595	c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42596	c.project = project
42597	c.zone = zone
42598	c.resource = resource
42599	c.testpermissionsrequest = testpermissionsrequest
42600	return c
42601}
42602
42603// Fields allows partial responses to be retrieved. See
42604// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42605// for more information.
42606func (c *InstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupsTestIamPermissionsCall {
42607	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42608	return c
42609}
42610
42611// Context sets the context to be used in this call's Do method. Any
42612// pending HTTP request will be aborted if the provided context is
42613// canceled.
42614func (c *InstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupsTestIamPermissionsCall {
42615	c.ctx_ = ctx
42616	return c
42617}
42618
42619// Header returns an http.Header that can be modified by the caller to
42620// add HTTP headers to the request.
42621func (c *InstanceGroupsTestIamPermissionsCall) Header() http.Header {
42622	if c.header_ == nil {
42623		c.header_ = make(http.Header)
42624	}
42625	return c.header_
42626}
42627
42628func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
42629	reqHeaders := make(http.Header)
42630	for k, v := range c.header_ {
42631		reqHeaders[k] = v
42632	}
42633	reqHeaders.Set("User-Agent", c.s.userAgent())
42634	var body io.Reader = nil
42635	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
42636	if err != nil {
42637		return nil, err
42638	}
42639	reqHeaders.Set("Content-Type", "application/json")
42640	c.urlParams_.Set("alt", alt)
42641	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions")
42642	urls += "?" + c.urlParams_.Encode()
42643	req, _ := http.NewRequest("POST", urls, body)
42644	req.Header = reqHeaders
42645	googleapi.Expand(req.URL, map[string]string{
42646		"project":  c.project,
42647		"zone":     c.zone,
42648		"resource": c.resource,
42649	})
42650	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42651}
42652
42653// Do executes the "compute.instanceGroups.testIamPermissions" call.
42654// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
42655// non-2xx status code is an error. Response headers are in either
42656// *TestPermissionsResponse.ServerResponse.Header or (if a response was
42657// returned at all) in error.(*googleapi.Error).Header. Use
42658// googleapi.IsNotModified to check whether the returned error was
42659// because http.StatusNotModified was returned.
42660func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
42661	gensupport.SetOptions(c.urlParams_, opts...)
42662	res, err := c.doRequest("json")
42663	if res != nil && res.StatusCode == http.StatusNotModified {
42664		if res.Body != nil {
42665			res.Body.Close()
42666		}
42667		return nil, &googleapi.Error{
42668			Code:   res.StatusCode,
42669			Header: res.Header,
42670		}
42671	}
42672	if err != nil {
42673		return nil, err
42674	}
42675	defer googleapi.CloseBody(res)
42676	if err := googleapi.CheckResponse(res); err != nil {
42677		return nil, err
42678	}
42679	ret := &TestPermissionsResponse{
42680		ServerResponse: googleapi.ServerResponse{
42681			Header:         res.Header,
42682			HTTPStatusCode: res.StatusCode,
42683		},
42684	}
42685	target := &ret
42686	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
42687		return nil, err
42688	}
42689	return ret, nil
42690	// {
42691	//   "description": "Returns permissions that a caller has on the specified resource.",
42692	//   "httpMethod": "POST",
42693	//   "id": "compute.instanceGroups.testIamPermissions",
42694	//   "parameterOrder": [
42695	//     "project",
42696	//     "zone",
42697	//     "resource"
42698	//   ],
42699	//   "parameters": {
42700	//     "project": {
42701	//       "description": "Project ID for this request.",
42702	//       "location": "path",
42703	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42704	//       "required": true,
42705	//       "type": "string"
42706	//     },
42707	//     "resource": {
42708	//       "description": "Name of the resource for this request.",
42709	//       "location": "path",
42710	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42711	//       "required": true,
42712	//       "type": "string"
42713	//     },
42714	//     "zone": {
42715	//       "description": "The name of the zone for this request.",
42716	//       "location": "path",
42717	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42718	//       "required": true,
42719	//       "type": "string"
42720	//     }
42721	//   },
42722	//   "path": "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions",
42723	//   "request": {
42724	//     "$ref": "TestPermissionsRequest"
42725	//   },
42726	//   "response": {
42727	//     "$ref": "TestPermissionsResponse"
42728	//   },
42729	//   "scopes": [
42730	//     "https://www.googleapis.com/auth/cloud-platform",
42731	//     "https://www.googleapis.com/auth/compute",
42732	//     "https://www.googleapis.com/auth/compute.readonly"
42733	//   ]
42734	// }
42735
42736}
42737
42738// method id "compute.instanceTemplates.delete":
42739
42740type InstanceTemplatesDeleteCall struct {
42741	s                *Service
42742	project          string
42743	instanceTemplate string
42744	urlParams_       gensupport.URLParams
42745	ctx_             context.Context
42746	header_          http.Header
42747}
42748
42749// Delete: Deletes the specified instance template. If you delete an
42750// instance template that is being referenced from another instance
42751// group, the instance group will not be able to create or recreate
42752// virtual machine instances. Deleting an instance template is permanent
42753// and cannot be undone.
42754// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete
42755func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall {
42756	c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42757	c.project = project
42758	c.instanceTemplate = instanceTemplate
42759	return c
42760}
42761
42762// RequestId sets the optional parameter "requestId": An optional
42763// request ID to identify requests. Specify a unique request ID so that
42764// if you must retry your request, the server will know to ignore the
42765// request if it has already been completed.
42766//
42767// For example, consider a situation where you make an initial request
42768// and the request times out. If you make the request again with the
42769// same request ID, the server can check if original operation with the
42770// same request ID was received, and if so, will ignore the second
42771// request. This prevents clients from accidentally creating duplicate
42772// commitments.
42773//
42774// The request ID must be a valid UUID with the exception that zero UUID
42775// is not supported (00000000-0000-0000-0000-000000000000).
42776func (c *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall {
42777	c.urlParams_.Set("requestId", requestId)
42778	return c
42779}
42780
42781// Fields allows partial responses to be retrieved. See
42782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42783// for more information.
42784func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall {
42785	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42786	return c
42787}
42788
42789// Context sets the context to be used in this call's Do method. Any
42790// pending HTTP request will be aborted if the provided context is
42791// canceled.
42792func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall {
42793	c.ctx_ = ctx
42794	return c
42795}
42796
42797// Header returns an http.Header that can be modified by the caller to
42798// add HTTP headers to the request.
42799func (c *InstanceTemplatesDeleteCall) Header() http.Header {
42800	if c.header_ == nil {
42801		c.header_ = make(http.Header)
42802	}
42803	return c.header_
42804}
42805
42806func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
42807	reqHeaders := make(http.Header)
42808	for k, v := range c.header_ {
42809		reqHeaders[k] = v
42810	}
42811	reqHeaders.Set("User-Agent", c.s.userAgent())
42812	var body io.Reader = nil
42813	c.urlParams_.Set("alt", alt)
42814	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}")
42815	urls += "?" + c.urlParams_.Encode()
42816	req, _ := http.NewRequest("DELETE", urls, body)
42817	req.Header = reqHeaders
42818	googleapi.Expand(req.URL, map[string]string{
42819		"project":          c.project,
42820		"instanceTemplate": c.instanceTemplate,
42821	})
42822	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42823}
42824
42825// Do executes the "compute.instanceTemplates.delete" call.
42826// Exactly one of *Operation or error will be non-nil. Any non-2xx
42827// status code is an error. Response headers are in either
42828// *Operation.ServerResponse.Header or (if a response was returned at
42829// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42830// to check whether the returned error was because
42831// http.StatusNotModified was returned.
42832func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
42833	gensupport.SetOptions(c.urlParams_, opts...)
42834	res, err := c.doRequest("json")
42835	if res != nil && res.StatusCode == http.StatusNotModified {
42836		if res.Body != nil {
42837			res.Body.Close()
42838		}
42839		return nil, &googleapi.Error{
42840			Code:   res.StatusCode,
42841			Header: res.Header,
42842		}
42843	}
42844	if err != nil {
42845		return nil, err
42846	}
42847	defer googleapi.CloseBody(res)
42848	if err := googleapi.CheckResponse(res); err != nil {
42849		return nil, err
42850	}
42851	ret := &Operation{
42852		ServerResponse: googleapi.ServerResponse{
42853			Header:         res.Header,
42854			HTTPStatusCode: res.StatusCode,
42855		},
42856	}
42857	target := &ret
42858	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
42859		return nil, err
42860	}
42861	return ret, nil
42862	// {
42863	//   "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.",
42864	//   "httpMethod": "DELETE",
42865	//   "id": "compute.instanceTemplates.delete",
42866	//   "parameterOrder": [
42867	//     "project",
42868	//     "instanceTemplate"
42869	//   ],
42870	//   "parameters": {
42871	//     "instanceTemplate": {
42872	//       "description": "The name of the instance template to delete.",
42873	//       "location": "path",
42874	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42875	//       "required": true,
42876	//       "type": "string"
42877	//     },
42878	//     "project": {
42879	//       "description": "Project ID for this request.",
42880	//       "location": "path",
42881	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42882	//       "required": true,
42883	//       "type": "string"
42884	//     },
42885	//     "requestId": {
42886	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
42887	//       "location": "query",
42888	//       "type": "string"
42889	//     }
42890	//   },
42891	//   "path": "{project}/global/instanceTemplates/{instanceTemplate}",
42892	//   "response": {
42893	//     "$ref": "Operation"
42894	//   },
42895	//   "scopes": [
42896	//     "https://www.googleapis.com/auth/cloud-platform",
42897	//     "https://www.googleapis.com/auth/compute"
42898	//   ]
42899	// }
42900
42901}
42902
42903// method id "compute.instanceTemplates.get":
42904
42905type InstanceTemplatesGetCall struct {
42906	s                *Service
42907	project          string
42908	instanceTemplate string
42909	urlParams_       gensupport.URLParams
42910	ifNoneMatch_     string
42911	ctx_             context.Context
42912	header_          http.Header
42913}
42914
42915// Get: Returns the specified instance template. Get a list of available
42916// instance templates by making a list() request.
42917// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get
42918func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall {
42919	c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42920	c.project = project
42921	c.instanceTemplate = instanceTemplate
42922	return c
42923}
42924
42925// Fields allows partial responses to be retrieved. See
42926// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42927// for more information.
42928func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall {
42929	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42930	return c
42931}
42932
42933// IfNoneMatch sets the optional parameter which makes the operation
42934// fail if the object's ETag matches the given value. This is useful for
42935// getting updates only after the object has changed since the last
42936// request. Use googleapi.IsNotModified to check whether the response
42937// error from Do is the result of In-None-Match.
42938func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall {
42939	c.ifNoneMatch_ = entityTag
42940	return c
42941}
42942
42943// Context sets the context to be used in this call's Do method. Any
42944// pending HTTP request will be aborted if the provided context is
42945// canceled.
42946func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall {
42947	c.ctx_ = ctx
42948	return c
42949}
42950
42951// Header returns an http.Header that can be modified by the caller to
42952// add HTTP headers to the request.
42953func (c *InstanceTemplatesGetCall) Header() http.Header {
42954	if c.header_ == nil {
42955		c.header_ = make(http.Header)
42956	}
42957	return c.header_
42958}
42959
42960func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
42961	reqHeaders := make(http.Header)
42962	for k, v := range c.header_ {
42963		reqHeaders[k] = v
42964	}
42965	reqHeaders.Set("User-Agent", c.s.userAgent())
42966	if c.ifNoneMatch_ != "" {
42967		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
42968	}
42969	var body io.Reader = nil
42970	c.urlParams_.Set("alt", alt)
42971	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}")
42972	urls += "?" + c.urlParams_.Encode()
42973	req, _ := http.NewRequest("GET", urls, body)
42974	req.Header = reqHeaders
42975	googleapi.Expand(req.URL, map[string]string{
42976		"project":          c.project,
42977		"instanceTemplate": c.instanceTemplate,
42978	})
42979	return gensupport.SendRequest(c.ctx_, c.s.client, req)
42980}
42981
42982// Do executes the "compute.instanceTemplates.get" call.
42983// Exactly one of *InstanceTemplate or error will be non-nil. Any
42984// non-2xx status code is an error. Response headers are in either
42985// *InstanceTemplate.ServerResponse.Header or (if a response was
42986// returned at all) in error.(*googleapi.Error).Header. Use
42987// googleapi.IsNotModified to check whether the returned error was
42988// because http.StatusNotModified was returned.
42989func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) {
42990	gensupport.SetOptions(c.urlParams_, opts...)
42991	res, err := c.doRequest("json")
42992	if res != nil && res.StatusCode == http.StatusNotModified {
42993		if res.Body != nil {
42994			res.Body.Close()
42995		}
42996		return nil, &googleapi.Error{
42997			Code:   res.StatusCode,
42998			Header: res.Header,
42999		}
43000	}
43001	if err != nil {
43002		return nil, err
43003	}
43004	defer googleapi.CloseBody(res)
43005	if err := googleapi.CheckResponse(res); err != nil {
43006		return nil, err
43007	}
43008	ret := &InstanceTemplate{
43009		ServerResponse: googleapi.ServerResponse{
43010			Header:         res.Header,
43011			HTTPStatusCode: res.StatusCode,
43012		},
43013	}
43014	target := &ret
43015	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
43016		return nil, err
43017	}
43018	return ret, nil
43019	// {
43020	//   "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.",
43021	//   "httpMethod": "GET",
43022	//   "id": "compute.instanceTemplates.get",
43023	//   "parameterOrder": [
43024	//     "project",
43025	//     "instanceTemplate"
43026	//   ],
43027	//   "parameters": {
43028	//     "instanceTemplate": {
43029	//       "description": "The name of the instance template.",
43030	//       "location": "path",
43031	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43032	//       "required": true,
43033	//       "type": "string"
43034	//     },
43035	//     "project": {
43036	//       "description": "Project ID for this request.",
43037	//       "location": "path",
43038	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43039	//       "required": true,
43040	//       "type": "string"
43041	//     }
43042	//   },
43043	//   "path": "{project}/global/instanceTemplates/{instanceTemplate}",
43044	//   "response": {
43045	//     "$ref": "InstanceTemplate"
43046	//   },
43047	//   "scopes": [
43048	//     "https://www.googleapis.com/auth/cloud-platform",
43049	//     "https://www.googleapis.com/auth/compute",
43050	//     "https://www.googleapis.com/auth/compute.readonly"
43051	//   ]
43052	// }
43053
43054}
43055
43056// method id "compute.instanceTemplates.insert":
43057
43058type InstanceTemplatesInsertCall struct {
43059	s                *Service
43060	project          string
43061	instancetemplate *InstanceTemplate
43062	urlParams_       gensupport.URLParams
43063	ctx_             context.Context
43064	header_          http.Header
43065}
43066
43067// Insert: Creates an instance template in the specified project using
43068// the data that is included in the request. If you are creating a new
43069// template to update an existing instance group, your new instance
43070// template must use the same network or, if applicable, the same
43071// subnetwork as the original template.
43072// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert
43073func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall {
43074	c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43075	c.project = project
43076	c.instancetemplate = instancetemplate
43077	return c
43078}
43079
43080// RequestId sets the optional parameter "requestId": An optional
43081// request ID to identify requests. Specify a unique request ID so that
43082// if you must retry your request, the server will know to ignore the
43083// request if it has already been completed.
43084//
43085// For example, consider a situation where you make an initial request
43086// and the request times out. If you make the request again with the
43087// same request ID, the server can check if original operation with the
43088// same request ID was received, and if so, will ignore the second
43089// request. This prevents clients from accidentally creating duplicate
43090// commitments.
43091//
43092// The request ID must be a valid UUID with the exception that zero UUID
43093// is not supported (00000000-0000-0000-0000-000000000000).
43094func (c *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall {
43095	c.urlParams_.Set("requestId", requestId)
43096	return c
43097}
43098
43099// Fields allows partial responses to be retrieved. See
43100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43101// for more information.
43102func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall {
43103	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43104	return c
43105}
43106
43107// Context sets the context to be used in this call's Do method. Any
43108// pending HTTP request will be aborted if the provided context is
43109// canceled.
43110func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall {
43111	c.ctx_ = ctx
43112	return c
43113}
43114
43115// Header returns an http.Header that can be modified by the caller to
43116// add HTTP headers to the request.
43117func (c *InstanceTemplatesInsertCall) Header() http.Header {
43118	if c.header_ == nil {
43119		c.header_ = make(http.Header)
43120	}
43121	return c.header_
43122}
43123
43124func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
43125	reqHeaders := make(http.Header)
43126	for k, v := range c.header_ {
43127		reqHeaders[k] = v
43128	}
43129	reqHeaders.Set("User-Agent", c.s.userAgent())
43130	var body io.Reader = nil
43131	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate)
43132	if err != nil {
43133		return nil, err
43134	}
43135	reqHeaders.Set("Content-Type", "application/json")
43136	c.urlParams_.Set("alt", alt)
43137	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates")
43138	urls += "?" + c.urlParams_.Encode()
43139	req, _ := http.NewRequest("POST", urls, body)
43140	req.Header = reqHeaders
43141	googleapi.Expand(req.URL, map[string]string{
43142		"project": c.project,
43143	})
43144	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43145}
43146
43147// Do executes the "compute.instanceTemplates.insert" call.
43148// Exactly one of *Operation or error will be non-nil. Any non-2xx
43149// status code is an error. Response headers are in either
43150// *Operation.ServerResponse.Header or (if a response was returned at
43151// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43152// to check whether the returned error was because
43153// http.StatusNotModified was returned.
43154func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
43155	gensupport.SetOptions(c.urlParams_, opts...)
43156	res, err := c.doRequest("json")
43157	if res != nil && res.StatusCode == http.StatusNotModified {
43158		if res.Body != nil {
43159			res.Body.Close()
43160		}
43161		return nil, &googleapi.Error{
43162			Code:   res.StatusCode,
43163			Header: res.Header,
43164		}
43165	}
43166	if err != nil {
43167		return nil, err
43168	}
43169	defer googleapi.CloseBody(res)
43170	if err := googleapi.CheckResponse(res); err != nil {
43171		return nil, err
43172	}
43173	ret := &Operation{
43174		ServerResponse: googleapi.ServerResponse{
43175			Header:         res.Header,
43176			HTTPStatusCode: res.StatusCode,
43177		},
43178	}
43179	target := &ret
43180	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
43181		return nil, err
43182	}
43183	return ret, nil
43184	// {
43185	//   "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.",
43186	//   "httpMethod": "POST",
43187	//   "id": "compute.instanceTemplates.insert",
43188	//   "parameterOrder": [
43189	//     "project"
43190	//   ],
43191	//   "parameters": {
43192	//     "project": {
43193	//       "description": "Project ID for this request.",
43194	//       "location": "path",
43195	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43196	//       "required": true,
43197	//       "type": "string"
43198	//     },
43199	//     "requestId": {
43200	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
43201	//       "location": "query",
43202	//       "type": "string"
43203	//     }
43204	//   },
43205	//   "path": "{project}/global/instanceTemplates",
43206	//   "request": {
43207	//     "$ref": "InstanceTemplate"
43208	//   },
43209	//   "response": {
43210	//     "$ref": "Operation"
43211	//   },
43212	//   "scopes": [
43213	//     "https://www.googleapis.com/auth/cloud-platform",
43214	//     "https://www.googleapis.com/auth/compute"
43215	//   ]
43216	// }
43217
43218}
43219
43220// method id "compute.instanceTemplates.list":
43221
43222type InstanceTemplatesListCall struct {
43223	s            *Service
43224	project      string
43225	urlParams_   gensupport.URLParams
43226	ifNoneMatch_ string
43227	ctx_         context.Context
43228	header_      http.Header
43229}
43230
43231// List: Retrieves a list of instance templates that are contained
43232// within the specified project and zone.
43233// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list
43234func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall {
43235	c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43236	c.project = project
43237	return c
43238}
43239
43240// Filter sets the optional parameter "filter": Sets a filter
43241// {expression} for filtering listed resources. Your {expression} must
43242// be in the format: field_name comparison_string literal_string.
43243//
43244// The field_name is the name of the field you want to compare. Only
43245// atomic field types are supported (string, number, boolean). The
43246// comparison_string must be either eq (equals) or ne (not equals). The
43247// literal_string is the string value to filter to. The literal value
43248// must be valid for the type of field you are filtering by (string,
43249// number, boolean). For string fields, the literal value is interpreted
43250// as a regular expression using RE2 syntax. The literal value must
43251// match the entire field.
43252//
43253// For example, to filter for instances that do not have a name of
43254// example-instance, you would use name ne example-instance.
43255//
43256// You can filter on nested fields. For example, you could filter on
43257// instances that have set the scheduling.automaticRestart field to
43258// true. Use filtering on nested fields to take advantage of labels to
43259// organize and search for results based on label values.
43260//
43261// To filter on multiple expressions, provide each separate expression
43262// within parentheses. For example, (scheduling.automaticRestart eq
43263// true) (zone eq us-central1-f). Multiple expressions are treated as
43264// AND expressions, meaning that resources must match all expressions to
43265// pass the filters.
43266func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall {
43267	c.urlParams_.Set("filter", filter)
43268	return c
43269}
43270
43271// MaxResults sets the optional parameter "maxResults": The maximum
43272// number of results per page that should be returned. If the number of
43273// available results is larger than maxResults, Compute Engine returns a
43274// nextPageToken that can be used to get the next page of results in
43275// subsequent list requests. Acceptable values are 0 to 500, inclusive.
43276// (Default: 500)
43277func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall {
43278	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43279	return c
43280}
43281
43282// OrderBy sets the optional parameter "orderBy": Sorts list results by
43283// a certain order. By default, results are returned in alphanumerical
43284// order based on the resource name.
43285//
43286// You can also sort results in descending order based on the creation
43287// timestamp using orderBy="creationTimestamp desc". This sorts results
43288// based on the creationTimestamp field in reverse chronological order
43289// (newest result first). Use this to sort resources like operations so
43290// that the newest operation is returned first.
43291//
43292// Currently, only sorting by name or creationTimestamp desc is
43293// supported.
43294func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall {
43295	c.urlParams_.Set("orderBy", orderBy)
43296	return c
43297}
43298
43299// PageToken sets the optional parameter "pageToken": Specifies a page
43300// token to use. Set pageToken to the nextPageToken returned by a
43301// previous list request to get the next page of results.
43302func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall {
43303	c.urlParams_.Set("pageToken", pageToken)
43304	return c
43305}
43306
43307// Fields allows partial responses to be retrieved. See
43308// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43309// for more information.
43310func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall {
43311	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43312	return c
43313}
43314
43315// IfNoneMatch sets the optional parameter which makes the operation
43316// fail if the object's ETag matches the given value. This is useful for
43317// getting updates only after the object has changed since the last
43318// request. Use googleapi.IsNotModified to check whether the response
43319// error from Do is the result of In-None-Match.
43320func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall {
43321	c.ifNoneMatch_ = entityTag
43322	return c
43323}
43324
43325// Context sets the context to be used in this call's Do method. Any
43326// pending HTTP request will be aborted if the provided context is
43327// canceled.
43328func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall {
43329	c.ctx_ = ctx
43330	return c
43331}
43332
43333// Header returns an http.Header that can be modified by the caller to
43334// add HTTP headers to the request.
43335func (c *InstanceTemplatesListCall) Header() http.Header {
43336	if c.header_ == nil {
43337		c.header_ = make(http.Header)
43338	}
43339	return c.header_
43340}
43341
43342func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) {
43343	reqHeaders := make(http.Header)
43344	for k, v := range c.header_ {
43345		reqHeaders[k] = v
43346	}
43347	reqHeaders.Set("User-Agent", c.s.userAgent())
43348	if c.ifNoneMatch_ != "" {
43349		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43350	}
43351	var body io.Reader = nil
43352	c.urlParams_.Set("alt", alt)
43353	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates")
43354	urls += "?" + c.urlParams_.Encode()
43355	req, _ := http.NewRequest("GET", urls, body)
43356	req.Header = reqHeaders
43357	googleapi.Expand(req.URL, map[string]string{
43358		"project": c.project,
43359	})
43360	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43361}
43362
43363// Do executes the "compute.instanceTemplates.list" call.
43364// Exactly one of *InstanceTemplateList or error will be non-nil. Any
43365// non-2xx status code is an error. Response headers are in either
43366// *InstanceTemplateList.ServerResponse.Header or (if a response was
43367// returned at all) in error.(*googleapi.Error).Header. Use
43368// googleapi.IsNotModified to check whether the returned error was
43369// because http.StatusNotModified was returned.
43370func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) {
43371	gensupport.SetOptions(c.urlParams_, opts...)
43372	res, err := c.doRequest("json")
43373	if res != nil && res.StatusCode == http.StatusNotModified {
43374		if res.Body != nil {
43375			res.Body.Close()
43376		}
43377		return nil, &googleapi.Error{
43378			Code:   res.StatusCode,
43379			Header: res.Header,
43380		}
43381	}
43382	if err != nil {
43383		return nil, err
43384	}
43385	defer googleapi.CloseBody(res)
43386	if err := googleapi.CheckResponse(res); err != nil {
43387		return nil, err
43388	}
43389	ret := &InstanceTemplateList{
43390		ServerResponse: googleapi.ServerResponse{
43391			Header:         res.Header,
43392			HTTPStatusCode: res.StatusCode,
43393		},
43394	}
43395	target := &ret
43396	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
43397		return nil, err
43398	}
43399	return ret, nil
43400	// {
43401	//   "description": "Retrieves a list of instance templates that are contained within the specified project and zone.",
43402	//   "httpMethod": "GET",
43403	//   "id": "compute.instanceTemplates.list",
43404	//   "parameterOrder": [
43405	//     "project"
43406	//   ],
43407	//   "parameters": {
43408	//     "filter": {
43409	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
43410	//       "location": "query",
43411	//       "type": "string"
43412	//     },
43413	//     "maxResults": {
43414	//       "default": "500",
43415	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
43416	//       "format": "uint32",
43417	//       "location": "query",
43418	//       "minimum": "0",
43419	//       "type": "integer"
43420	//     },
43421	//     "orderBy": {
43422	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
43423	//       "location": "query",
43424	//       "type": "string"
43425	//     },
43426	//     "pageToken": {
43427	//       "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.",
43428	//       "location": "query",
43429	//       "type": "string"
43430	//     },
43431	//     "project": {
43432	//       "description": "Project ID for this request.",
43433	//       "location": "path",
43434	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43435	//       "required": true,
43436	//       "type": "string"
43437	//     }
43438	//   },
43439	//   "path": "{project}/global/instanceTemplates",
43440	//   "response": {
43441	//     "$ref": "InstanceTemplateList"
43442	//   },
43443	//   "scopes": [
43444	//     "https://www.googleapis.com/auth/cloud-platform",
43445	//     "https://www.googleapis.com/auth/compute",
43446	//     "https://www.googleapis.com/auth/compute.readonly"
43447	//   ]
43448	// }
43449
43450}
43451
43452// Pages invokes f for each page of results.
43453// A non-nil error returned from f will halt the iteration.
43454// The provided context supersedes any context provided to the Context method.
43455func (c *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error {
43456	c.ctx_ = ctx
43457	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43458	for {
43459		x, err := c.Do()
43460		if err != nil {
43461			return err
43462		}
43463		if err := f(x); err != nil {
43464			return err
43465		}
43466		if x.NextPageToken == "" {
43467			return nil
43468		}
43469		c.PageToken(x.NextPageToken)
43470	}
43471}
43472
43473// method id "compute.instanceTemplates.testIamPermissions":
43474
43475type InstanceTemplatesTestIamPermissionsCall struct {
43476	s                      *Service
43477	project                string
43478	resource               string
43479	testpermissionsrequest *TestPermissionsRequest
43480	urlParams_             gensupport.URLParams
43481	ctx_                   context.Context
43482	header_                http.Header
43483}
43484
43485// TestIamPermissions: Returns permissions that a caller has on the
43486// specified resource.
43487func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall {
43488	c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43489	c.project = project
43490	c.resource = resource
43491	c.testpermissionsrequest = testpermissionsrequest
43492	return c
43493}
43494
43495// Fields allows partial responses to be retrieved. See
43496// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43497// for more information.
43498func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall {
43499	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43500	return c
43501}
43502
43503// Context sets the context to be used in this call's Do method. Any
43504// pending HTTP request will be aborted if the provided context is
43505// canceled.
43506func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall {
43507	c.ctx_ = ctx
43508	return c
43509}
43510
43511// Header returns an http.Header that can be modified by the caller to
43512// add HTTP headers to the request.
43513func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header {
43514	if c.header_ == nil {
43515		c.header_ = make(http.Header)
43516	}
43517	return c.header_
43518}
43519
43520func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
43521	reqHeaders := make(http.Header)
43522	for k, v := range c.header_ {
43523		reqHeaders[k] = v
43524	}
43525	reqHeaders.Set("User-Agent", c.s.userAgent())
43526	var body io.Reader = nil
43527	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
43528	if err != nil {
43529		return nil, err
43530	}
43531	reqHeaders.Set("Content-Type", "application/json")
43532	c.urlParams_.Set("alt", alt)
43533	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{resource}/testIamPermissions")
43534	urls += "?" + c.urlParams_.Encode()
43535	req, _ := http.NewRequest("POST", urls, body)
43536	req.Header = reqHeaders
43537	googleapi.Expand(req.URL, map[string]string{
43538		"project":  c.project,
43539		"resource": c.resource,
43540	})
43541	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43542}
43543
43544// Do executes the "compute.instanceTemplates.testIamPermissions" call.
43545// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
43546// non-2xx status code is an error. Response headers are in either
43547// *TestPermissionsResponse.ServerResponse.Header or (if a response was
43548// returned at all) in error.(*googleapi.Error).Header. Use
43549// googleapi.IsNotModified to check whether the returned error was
43550// because http.StatusNotModified was returned.
43551func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
43552	gensupport.SetOptions(c.urlParams_, opts...)
43553	res, err := c.doRequest("json")
43554	if res != nil && res.StatusCode == http.StatusNotModified {
43555		if res.Body != nil {
43556			res.Body.Close()
43557		}
43558		return nil, &googleapi.Error{
43559			Code:   res.StatusCode,
43560			Header: res.Header,
43561		}
43562	}
43563	if err != nil {
43564		return nil, err
43565	}
43566	defer googleapi.CloseBody(res)
43567	if err := googleapi.CheckResponse(res); err != nil {
43568		return nil, err
43569	}
43570	ret := &TestPermissionsResponse{
43571		ServerResponse: googleapi.ServerResponse{
43572			Header:         res.Header,
43573			HTTPStatusCode: res.StatusCode,
43574		},
43575	}
43576	target := &ret
43577	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
43578		return nil, err
43579	}
43580	return ret, nil
43581	// {
43582	//   "description": "Returns permissions that a caller has on the specified resource.",
43583	//   "httpMethod": "POST",
43584	//   "id": "compute.instanceTemplates.testIamPermissions",
43585	//   "parameterOrder": [
43586	//     "project",
43587	//     "resource"
43588	//   ],
43589	//   "parameters": {
43590	//     "project": {
43591	//       "description": "Project ID for this request.",
43592	//       "location": "path",
43593	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43594	//       "required": true,
43595	//       "type": "string"
43596	//     },
43597	//     "resource": {
43598	//       "description": "Name of the resource for this request.",
43599	//       "location": "path",
43600	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
43601	//       "required": true,
43602	//       "type": "string"
43603	//     }
43604	//   },
43605	//   "path": "{project}/global/instanceTemplates/{resource}/testIamPermissions",
43606	//   "request": {
43607	//     "$ref": "TestPermissionsRequest"
43608	//   },
43609	//   "response": {
43610	//     "$ref": "TestPermissionsResponse"
43611	//   },
43612	//   "scopes": [
43613	//     "https://www.googleapis.com/auth/cloud-platform",
43614	//     "https://www.googleapis.com/auth/compute",
43615	//     "https://www.googleapis.com/auth/compute.readonly"
43616	//   ]
43617	// }
43618
43619}
43620
43621// method id "compute.instances.addAccessConfig":
43622
43623type InstancesAddAccessConfigCall struct {
43624	s            *Service
43625	project      string
43626	zone         string
43627	instance     string
43628	accessconfig *AccessConfig
43629	urlParams_   gensupport.URLParams
43630	ctx_         context.Context
43631	header_      http.Header
43632}
43633
43634// AddAccessConfig: Adds an access config to an instance's network
43635// interface.
43636// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/addAccessConfig
43637func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall {
43638	c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43639	c.project = project
43640	c.zone = zone
43641	c.instance = instance
43642	c.urlParams_.Set("networkInterface", networkInterface)
43643	c.accessconfig = accessconfig
43644	return c
43645}
43646
43647// RequestId sets the optional parameter "requestId": An optional
43648// request ID to identify requests. Specify a unique request ID so that
43649// if you must retry your request, the server will know to ignore the
43650// request if it has already been completed.
43651//
43652// For example, consider a situation where you make an initial request
43653// and the request times out. If you make the request again with the
43654// same request ID, the server can check if original operation with the
43655// same request ID was received, and if so, will ignore the second
43656// request. This prevents clients from accidentally creating duplicate
43657// commitments.
43658//
43659// The request ID must be a valid UUID with the exception that zero UUID
43660// is not supported (00000000-0000-0000-0000-000000000000).
43661func (c *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall {
43662	c.urlParams_.Set("requestId", requestId)
43663	return c
43664}
43665
43666// Fields allows partial responses to be retrieved. See
43667// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43668// for more information.
43669func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall {
43670	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43671	return c
43672}
43673
43674// Context sets the context to be used in this call's Do method. Any
43675// pending HTTP request will be aborted if the provided context is
43676// canceled.
43677func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall {
43678	c.ctx_ = ctx
43679	return c
43680}
43681
43682// Header returns an http.Header that can be modified by the caller to
43683// add HTTP headers to the request.
43684func (c *InstancesAddAccessConfigCall) Header() http.Header {
43685	if c.header_ == nil {
43686		c.header_ = make(http.Header)
43687	}
43688	return c.header_
43689}
43690
43691func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) {
43692	reqHeaders := make(http.Header)
43693	for k, v := range c.header_ {
43694		reqHeaders[k] = v
43695	}
43696	reqHeaders.Set("User-Agent", c.s.userAgent())
43697	var body io.Reader = nil
43698	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig)
43699	if err != nil {
43700		return nil, err
43701	}
43702	reqHeaders.Set("Content-Type", "application/json")
43703	c.urlParams_.Set("alt", alt)
43704	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig")
43705	urls += "?" + c.urlParams_.Encode()
43706	req, _ := http.NewRequest("POST", urls, body)
43707	req.Header = reqHeaders
43708	googleapi.Expand(req.URL, map[string]string{
43709		"project":  c.project,
43710		"zone":     c.zone,
43711		"instance": c.instance,
43712	})
43713	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43714}
43715
43716// Do executes the "compute.instances.addAccessConfig" call.
43717// Exactly one of *Operation or error will be non-nil. Any non-2xx
43718// status code is an error. Response headers are in either
43719// *Operation.ServerResponse.Header or (if a response was returned at
43720// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43721// to check whether the returned error was because
43722// http.StatusNotModified was returned.
43723func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
43724	gensupport.SetOptions(c.urlParams_, opts...)
43725	res, err := c.doRequest("json")
43726	if res != nil && res.StatusCode == http.StatusNotModified {
43727		if res.Body != nil {
43728			res.Body.Close()
43729		}
43730		return nil, &googleapi.Error{
43731			Code:   res.StatusCode,
43732			Header: res.Header,
43733		}
43734	}
43735	if err != nil {
43736		return nil, err
43737	}
43738	defer googleapi.CloseBody(res)
43739	if err := googleapi.CheckResponse(res); err != nil {
43740		return nil, err
43741	}
43742	ret := &Operation{
43743		ServerResponse: googleapi.ServerResponse{
43744			Header:         res.Header,
43745			HTTPStatusCode: res.StatusCode,
43746		},
43747	}
43748	target := &ret
43749	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
43750		return nil, err
43751	}
43752	return ret, nil
43753	// {
43754	//   "description": "Adds an access config to an instance's network interface.",
43755	//   "httpMethod": "POST",
43756	//   "id": "compute.instances.addAccessConfig",
43757	//   "parameterOrder": [
43758	//     "project",
43759	//     "zone",
43760	//     "instance",
43761	//     "networkInterface"
43762	//   ],
43763	//   "parameters": {
43764	//     "instance": {
43765	//       "description": "The instance name for this request.",
43766	//       "location": "path",
43767	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43768	//       "required": true,
43769	//       "type": "string"
43770	//     },
43771	//     "networkInterface": {
43772	//       "description": "The name of the network interface to add to this instance.",
43773	//       "location": "query",
43774	//       "required": true,
43775	//       "type": "string"
43776	//     },
43777	//     "project": {
43778	//       "description": "Project ID for this request.",
43779	//       "location": "path",
43780	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43781	//       "required": true,
43782	//       "type": "string"
43783	//     },
43784	//     "requestId": {
43785	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
43786	//       "location": "query",
43787	//       "type": "string"
43788	//     },
43789	//     "zone": {
43790	//       "description": "The name of the zone for this request.",
43791	//       "location": "path",
43792	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43793	//       "required": true,
43794	//       "type": "string"
43795	//     }
43796	//   },
43797	//   "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig",
43798	//   "request": {
43799	//     "$ref": "AccessConfig"
43800	//   },
43801	//   "response": {
43802	//     "$ref": "Operation"
43803	//   },
43804	//   "scopes": [
43805	//     "https://www.googleapis.com/auth/cloud-platform",
43806	//     "https://www.googleapis.com/auth/compute"
43807	//   ]
43808	// }
43809
43810}
43811
43812// method id "compute.instances.aggregatedList":
43813
43814type InstancesAggregatedListCall struct {
43815	s            *Service
43816	project      string
43817	urlParams_   gensupport.URLParams
43818	ifNoneMatch_ string
43819	ctx_         context.Context
43820	header_      http.Header
43821}
43822
43823// AggregatedList: Retrieves aggregated list of instances.
43824// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList
43825func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall {
43826	c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43827	c.project = project
43828	return c
43829}
43830
43831// Filter sets the optional parameter "filter": Sets a filter
43832// {expression} for filtering listed resources. Your {expression} must
43833// be in the format: field_name comparison_string literal_string.
43834//
43835// The field_name is the name of the field you want to compare. Only
43836// atomic field types are supported (string, number, boolean). The
43837// comparison_string must be either eq (equals) or ne (not equals). The
43838// literal_string is the string value to filter to. The literal value
43839// must be valid for the type of field you are filtering by (string,
43840// number, boolean). For string fields, the literal value is interpreted
43841// as a regular expression using RE2 syntax. The literal value must
43842// match the entire field.
43843//
43844// For example, to filter for instances that do not have a name of
43845// example-instance, you would use name ne example-instance.
43846//
43847// You can filter on nested fields. For example, you could filter on
43848// instances that have set the scheduling.automaticRestart field to
43849// true. Use filtering on nested fields to take advantage of labels to
43850// organize and search for results based on label values.
43851//
43852// To filter on multiple expressions, provide each separate expression
43853// within parentheses. For example, (scheduling.automaticRestart eq
43854// true) (zone eq us-central1-f). Multiple expressions are treated as
43855// AND expressions, meaning that resources must match all expressions to
43856// pass the filters.
43857func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall {
43858	c.urlParams_.Set("filter", filter)
43859	return c
43860}
43861
43862// MaxResults sets the optional parameter "maxResults": The maximum
43863// number of results per page that should be returned. If the number of
43864// available results is larger than maxResults, Compute Engine returns a
43865// nextPageToken that can be used to get the next page of results in
43866// subsequent list requests. Acceptable values are 0 to 500, inclusive.
43867// (Default: 500)
43868func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall {
43869	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43870	return c
43871}
43872
43873// OrderBy sets the optional parameter "orderBy": Sorts list results by
43874// a certain order. By default, results are returned in alphanumerical
43875// order based on the resource name.
43876//
43877// You can also sort results in descending order based on the creation
43878// timestamp using orderBy="creationTimestamp desc". This sorts results
43879// based on the creationTimestamp field in reverse chronological order
43880// (newest result first). Use this to sort resources like operations so
43881// that the newest operation is returned first.
43882//
43883// Currently, only sorting by name or creationTimestamp desc is
43884// supported.
43885func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall {
43886	c.urlParams_.Set("orderBy", orderBy)
43887	return c
43888}
43889
43890// PageToken sets the optional parameter "pageToken": Specifies a page
43891// token to use. Set pageToken to the nextPageToken returned by a
43892// previous list request to get the next page of results.
43893func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall {
43894	c.urlParams_.Set("pageToken", pageToken)
43895	return c
43896}
43897
43898// Fields allows partial responses to be retrieved. See
43899// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43900// for more information.
43901func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall {
43902	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43903	return c
43904}
43905
43906// IfNoneMatch sets the optional parameter which makes the operation
43907// fail if the object's ETag matches the given value. This is useful for
43908// getting updates only after the object has changed since the last
43909// request. Use googleapi.IsNotModified to check whether the response
43910// error from Do is the result of In-None-Match.
43911func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall {
43912	c.ifNoneMatch_ = entityTag
43913	return c
43914}
43915
43916// Context sets the context to be used in this call's Do method. Any
43917// pending HTTP request will be aborted if the provided context is
43918// canceled.
43919func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall {
43920	c.ctx_ = ctx
43921	return c
43922}
43923
43924// Header returns an http.Header that can be modified by the caller to
43925// add HTTP headers to the request.
43926func (c *InstancesAggregatedListCall) Header() http.Header {
43927	if c.header_ == nil {
43928		c.header_ = make(http.Header)
43929	}
43930	return c.header_
43931}
43932
43933func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
43934	reqHeaders := make(http.Header)
43935	for k, v := range c.header_ {
43936		reqHeaders[k] = v
43937	}
43938	reqHeaders.Set("User-Agent", c.s.userAgent())
43939	if c.ifNoneMatch_ != "" {
43940		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
43941	}
43942	var body io.Reader = nil
43943	c.urlParams_.Set("alt", alt)
43944	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instances")
43945	urls += "?" + c.urlParams_.Encode()
43946	req, _ := http.NewRequest("GET", urls, body)
43947	req.Header = reqHeaders
43948	googleapi.Expand(req.URL, map[string]string{
43949		"project": c.project,
43950	})
43951	return gensupport.SendRequest(c.ctx_, c.s.client, req)
43952}
43953
43954// Do executes the "compute.instances.aggregatedList" call.
43955// Exactly one of *InstanceAggregatedList or error will be non-nil. Any
43956// non-2xx status code is an error. Response headers are in either
43957// *InstanceAggregatedList.ServerResponse.Header or (if a response was
43958// returned at all) in error.(*googleapi.Error).Header. Use
43959// googleapi.IsNotModified to check whether the returned error was
43960// because http.StatusNotModified was returned.
43961func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) {
43962	gensupport.SetOptions(c.urlParams_, opts...)
43963	res, err := c.doRequest("json")
43964	if res != nil && res.StatusCode == http.StatusNotModified {
43965		if res.Body != nil {
43966			res.Body.Close()
43967		}
43968		return nil, &googleapi.Error{
43969			Code:   res.StatusCode,
43970			Header: res.Header,
43971		}
43972	}
43973	if err != nil {
43974		return nil, err
43975	}
43976	defer googleapi.CloseBody(res)
43977	if err := googleapi.CheckResponse(res); err != nil {
43978		return nil, err
43979	}
43980	ret := &InstanceAggregatedList{
43981		ServerResponse: googleapi.ServerResponse{
43982			Header:         res.Header,
43983			HTTPStatusCode: res.StatusCode,
43984		},
43985	}
43986	target := &ret
43987	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
43988		return nil, err
43989	}
43990	return ret, nil
43991	// {
43992	//   "description": "Retrieves aggregated list of instances.",
43993	//   "httpMethod": "GET",
43994	//   "id": "compute.instances.aggregatedList",
43995	//   "parameterOrder": [
43996	//     "project"
43997	//   ],
43998	//   "parameters": {
43999	//     "filter": {
44000	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
44001	//       "location": "query",
44002	//       "type": "string"
44003	//     },
44004	//     "maxResults": {
44005	//       "default": "500",
44006	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
44007	//       "format": "uint32",
44008	//       "location": "query",
44009	//       "minimum": "0",
44010	//       "type": "integer"
44011	//     },
44012	//     "orderBy": {
44013	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
44014	//       "location": "query",
44015	//       "type": "string"
44016	//     },
44017	//     "pageToken": {
44018	//       "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.",
44019	//       "location": "query",
44020	//       "type": "string"
44021	//     },
44022	//     "project": {
44023	//       "description": "Project ID for this request.",
44024	//       "location": "path",
44025	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44026	//       "required": true,
44027	//       "type": "string"
44028	//     }
44029	//   },
44030	//   "path": "{project}/aggregated/instances",
44031	//   "response": {
44032	//     "$ref": "InstanceAggregatedList"
44033	//   },
44034	//   "scopes": [
44035	//     "https://www.googleapis.com/auth/cloud-platform",
44036	//     "https://www.googleapis.com/auth/compute",
44037	//     "https://www.googleapis.com/auth/compute.readonly"
44038	//   ]
44039	// }
44040
44041}
44042
44043// Pages invokes f for each page of results.
44044// A non-nil error returned from f will halt the iteration.
44045// The provided context supersedes any context provided to the Context method.
44046func (c *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error {
44047	c.ctx_ = ctx
44048	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44049	for {
44050		x, err := c.Do()
44051		if err != nil {
44052			return err
44053		}
44054		if err := f(x); err != nil {
44055			return err
44056		}
44057		if x.NextPageToken == "" {
44058			return nil
44059		}
44060		c.PageToken(x.NextPageToken)
44061	}
44062}
44063
44064// method id "compute.instances.attachDisk":
44065
44066type InstancesAttachDiskCall struct {
44067	s            *Service
44068	project      string
44069	zone         string
44070	instance     string
44071	attacheddisk *AttachedDisk
44072	urlParams_   gensupport.URLParams
44073	ctx_         context.Context
44074	header_      http.Header
44075}
44076
44077// AttachDisk: Attaches an existing Disk resource to an instance. You
44078// must first create the disk before you can attach it. It is not
44079// possible to create and attach a disk at the same time. For more
44080// information, read Adding a persistent disk to your instance.
44081// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/attachDisk
44082func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall {
44083	c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44084	c.project = project
44085	c.zone = zone
44086	c.instance = instance
44087	c.attacheddisk = attacheddisk
44088	return c
44089}
44090
44091// RequestId sets the optional parameter "requestId": An optional
44092// request ID to identify requests. Specify a unique request ID so that
44093// if you must retry your request, the server will know to ignore the
44094// request if it has already been completed.
44095//
44096// For example, consider a situation where you make an initial request
44097// and the request times out. If you make the request again with the
44098// same request ID, the server can check if original operation with the
44099// same request ID was received, and if so, will ignore the second
44100// request. This prevents clients from accidentally creating duplicate
44101// commitments.
44102//
44103// The request ID must be a valid UUID with the exception that zero UUID
44104// is not supported (00000000-0000-0000-0000-000000000000).
44105func (c *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall {
44106	c.urlParams_.Set("requestId", requestId)
44107	return c
44108}
44109
44110// Fields allows partial responses to be retrieved. See
44111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44112// for more information.
44113func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall {
44114	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44115	return c
44116}
44117
44118// Context sets the context to be used in this call's Do method. Any
44119// pending HTTP request will be aborted if the provided context is
44120// canceled.
44121func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall {
44122	c.ctx_ = ctx
44123	return c
44124}
44125
44126// Header returns an http.Header that can be modified by the caller to
44127// add HTTP headers to the request.
44128func (c *InstancesAttachDiskCall) Header() http.Header {
44129	if c.header_ == nil {
44130		c.header_ = make(http.Header)
44131	}
44132	return c.header_
44133}
44134
44135func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) {
44136	reqHeaders := make(http.Header)
44137	for k, v := range c.header_ {
44138		reqHeaders[k] = v
44139	}
44140	reqHeaders.Set("User-Agent", c.s.userAgent())
44141	var body io.Reader = nil
44142	body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk)
44143	if err != nil {
44144		return nil, err
44145	}
44146	reqHeaders.Set("Content-Type", "application/json")
44147	c.urlParams_.Set("alt", alt)
44148	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk")
44149	urls += "?" + c.urlParams_.Encode()
44150	req, _ := http.NewRequest("POST", urls, body)
44151	req.Header = reqHeaders
44152	googleapi.Expand(req.URL, map[string]string{
44153		"project":  c.project,
44154		"zone":     c.zone,
44155		"instance": c.instance,
44156	})
44157	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44158}
44159
44160// Do executes the "compute.instances.attachDisk" call.
44161// Exactly one of *Operation or error will be non-nil. Any non-2xx
44162// status code is an error. Response headers are in either
44163// *Operation.ServerResponse.Header or (if a response was returned at
44164// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44165// to check whether the returned error was because
44166// http.StatusNotModified was returned.
44167func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
44168	gensupport.SetOptions(c.urlParams_, opts...)
44169	res, err := c.doRequest("json")
44170	if res != nil && res.StatusCode == http.StatusNotModified {
44171		if res.Body != nil {
44172			res.Body.Close()
44173		}
44174		return nil, &googleapi.Error{
44175			Code:   res.StatusCode,
44176			Header: res.Header,
44177		}
44178	}
44179	if err != nil {
44180		return nil, err
44181	}
44182	defer googleapi.CloseBody(res)
44183	if err := googleapi.CheckResponse(res); err != nil {
44184		return nil, err
44185	}
44186	ret := &Operation{
44187		ServerResponse: googleapi.ServerResponse{
44188			Header:         res.Header,
44189			HTTPStatusCode: res.StatusCode,
44190		},
44191	}
44192	target := &ret
44193	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
44194		return nil, err
44195	}
44196	return ret, nil
44197	// {
44198	//   "description": "Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.",
44199	//   "httpMethod": "POST",
44200	//   "id": "compute.instances.attachDisk",
44201	//   "parameterOrder": [
44202	//     "project",
44203	//     "zone",
44204	//     "instance"
44205	//   ],
44206	//   "parameters": {
44207	//     "instance": {
44208	//       "description": "The instance name for this request.",
44209	//       "location": "path",
44210	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44211	//       "required": true,
44212	//       "type": "string"
44213	//     },
44214	//     "project": {
44215	//       "description": "Project ID for this request.",
44216	//       "location": "path",
44217	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44218	//       "required": true,
44219	//       "type": "string"
44220	//     },
44221	//     "requestId": {
44222	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
44223	//       "location": "query",
44224	//       "type": "string"
44225	//     },
44226	//     "zone": {
44227	//       "description": "The name of the zone for this request.",
44228	//       "location": "path",
44229	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44230	//       "required": true,
44231	//       "type": "string"
44232	//     }
44233	//   },
44234	//   "path": "{project}/zones/{zone}/instances/{instance}/attachDisk",
44235	//   "request": {
44236	//     "$ref": "AttachedDisk"
44237	//   },
44238	//   "response": {
44239	//     "$ref": "Operation"
44240	//   },
44241	//   "scopes": [
44242	//     "https://www.googleapis.com/auth/cloud-platform",
44243	//     "https://www.googleapis.com/auth/compute"
44244	//   ]
44245	// }
44246
44247}
44248
44249// method id "compute.instances.delete":
44250
44251type InstancesDeleteCall struct {
44252	s          *Service
44253	project    string
44254	zone       string
44255	instance   string
44256	urlParams_ gensupport.URLParams
44257	ctx_       context.Context
44258	header_    http.Header
44259}
44260
44261// Delete: Deletes the specified Instance resource. For more
44262// information, see Stopping or Deleting an Instance.
44263// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/delete
44264func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall {
44265	c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44266	c.project = project
44267	c.zone = zone
44268	c.instance = instance
44269	return c
44270}
44271
44272// RequestId sets the optional parameter "requestId": An optional
44273// request ID to identify requests. Specify a unique request ID so that
44274// if you must retry your request, the server will know to ignore the
44275// request if it has already been completed.
44276//
44277// For example, consider a situation where you make an initial request
44278// and the request times out. If you make the request again with the
44279// same request ID, the server can check if original operation with the
44280// same request ID was received, and if so, will ignore the second
44281// request. This prevents clients from accidentally creating duplicate
44282// commitments.
44283//
44284// The request ID must be a valid UUID with the exception that zero UUID
44285// is not supported (00000000-0000-0000-0000-000000000000).
44286func (c *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall {
44287	c.urlParams_.Set("requestId", requestId)
44288	return c
44289}
44290
44291// Fields allows partial responses to be retrieved. See
44292// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44293// for more information.
44294func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall {
44295	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44296	return c
44297}
44298
44299// Context sets the context to be used in this call's Do method. Any
44300// pending HTTP request will be aborted if the provided context is
44301// canceled.
44302func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
44303	c.ctx_ = ctx
44304	return c
44305}
44306
44307// Header returns an http.Header that can be modified by the caller to
44308// add HTTP headers to the request.
44309func (c *InstancesDeleteCall) Header() http.Header {
44310	if c.header_ == nil {
44311		c.header_ = make(http.Header)
44312	}
44313	return c.header_
44314}
44315
44316func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
44317	reqHeaders := make(http.Header)
44318	for k, v := range c.header_ {
44319		reqHeaders[k] = v
44320	}
44321	reqHeaders.Set("User-Agent", c.s.userAgent())
44322	var body io.Reader = nil
44323	c.urlParams_.Set("alt", alt)
44324	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}")
44325	urls += "?" + c.urlParams_.Encode()
44326	req, _ := http.NewRequest("DELETE", urls, body)
44327	req.Header = reqHeaders
44328	googleapi.Expand(req.URL, map[string]string{
44329		"project":  c.project,
44330		"zone":     c.zone,
44331		"instance": c.instance,
44332	})
44333	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44334}
44335
44336// Do executes the "compute.instances.delete" call.
44337// Exactly one of *Operation or error will be non-nil. Any non-2xx
44338// status code is an error. Response headers are in either
44339// *Operation.ServerResponse.Header or (if a response was returned at
44340// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44341// to check whether the returned error was because
44342// http.StatusNotModified was returned.
44343func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
44344	gensupport.SetOptions(c.urlParams_, opts...)
44345	res, err := c.doRequest("json")
44346	if res != nil && res.StatusCode == http.StatusNotModified {
44347		if res.Body != nil {
44348			res.Body.Close()
44349		}
44350		return nil, &googleapi.Error{
44351			Code:   res.StatusCode,
44352			Header: res.Header,
44353		}
44354	}
44355	if err != nil {
44356		return nil, err
44357	}
44358	defer googleapi.CloseBody(res)
44359	if err := googleapi.CheckResponse(res); err != nil {
44360		return nil, err
44361	}
44362	ret := &Operation{
44363		ServerResponse: googleapi.ServerResponse{
44364			Header:         res.Header,
44365			HTTPStatusCode: res.StatusCode,
44366		},
44367	}
44368	target := &ret
44369	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
44370		return nil, err
44371	}
44372	return ret, nil
44373	// {
44374	//   "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.",
44375	//   "httpMethod": "DELETE",
44376	//   "id": "compute.instances.delete",
44377	//   "parameterOrder": [
44378	//     "project",
44379	//     "zone",
44380	//     "instance"
44381	//   ],
44382	//   "parameters": {
44383	//     "instance": {
44384	//       "description": "Name of the instance resource to delete.",
44385	//       "location": "path",
44386	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44387	//       "required": true,
44388	//       "type": "string"
44389	//     },
44390	//     "project": {
44391	//       "description": "Project ID for this request.",
44392	//       "location": "path",
44393	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44394	//       "required": true,
44395	//       "type": "string"
44396	//     },
44397	//     "requestId": {
44398	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
44399	//       "location": "query",
44400	//       "type": "string"
44401	//     },
44402	//     "zone": {
44403	//       "description": "The name of the zone for this request.",
44404	//       "location": "path",
44405	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44406	//       "required": true,
44407	//       "type": "string"
44408	//     }
44409	//   },
44410	//   "path": "{project}/zones/{zone}/instances/{instance}",
44411	//   "response": {
44412	//     "$ref": "Operation"
44413	//   },
44414	//   "scopes": [
44415	//     "https://www.googleapis.com/auth/cloud-platform",
44416	//     "https://www.googleapis.com/auth/compute"
44417	//   ]
44418	// }
44419
44420}
44421
44422// method id "compute.instances.deleteAccessConfig":
44423
44424type InstancesDeleteAccessConfigCall struct {
44425	s          *Service
44426	project    string
44427	zone       string
44428	instance   string
44429	urlParams_ gensupport.URLParams
44430	ctx_       context.Context
44431	header_    http.Header
44432}
44433
44434// DeleteAccessConfig: Deletes an access config from an instance's
44435// network interface.
44436// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/deleteAccessConfig
44437func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall {
44438	c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44439	c.project = project
44440	c.zone = zone
44441	c.instance = instance
44442	c.urlParams_.Set("accessConfig", accessConfig)
44443	c.urlParams_.Set("networkInterface", networkInterface)
44444	return c
44445}
44446
44447// RequestId sets the optional parameter "requestId": An optional
44448// request ID to identify requests. Specify a unique request ID so that
44449// if you must retry your request, the server will know to ignore the
44450// request if it has already been completed.
44451//
44452// For example, consider a situation where you make an initial request
44453// and the request times out. If you make the request again with the
44454// same request ID, the server can check if original operation with the
44455// same request ID was received, and if so, will ignore the second
44456// request. This prevents clients from accidentally creating duplicate
44457// commitments.
44458//
44459// The request ID must be a valid UUID with the exception that zero UUID
44460// is not supported (00000000-0000-0000-0000-000000000000).
44461func (c *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall {
44462	c.urlParams_.Set("requestId", requestId)
44463	return c
44464}
44465
44466// Fields allows partial responses to be retrieved. See
44467// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44468// for more information.
44469func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall {
44470	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44471	return c
44472}
44473
44474// Context sets the context to be used in this call's Do method. Any
44475// pending HTTP request will be aborted if the provided context is
44476// canceled.
44477func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall {
44478	c.ctx_ = ctx
44479	return c
44480}
44481
44482// Header returns an http.Header that can be modified by the caller to
44483// add HTTP headers to the request.
44484func (c *InstancesDeleteAccessConfigCall) Header() http.Header {
44485	if c.header_ == nil {
44486		c.header_ = make(http.Header)
44487	}
44488	return c.header_
44489}
44490
44491func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) {
44492	reqHeaders := make(http.Header)
44493	for k, v := range c.header_ {
44494		reqHeaders[k] = v
44495	}
44496	reqHeaders.Set("User-Agent", c.s.userAgent())
44497	var body io.Reader = nil
44498	c.urlParams_.Set("alt", alt)
44499	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig")
44500	urls += "?" + c.urlParams_.Encode()
44501	req, _ := http.NewRequest("POST", urls, body)
44502	req.Header = reqHeaders
44503	googleapi.Expand(req.URL, map[string]string{
44504		"project":  c.project,
44505		"zone":     c.zone,
44506		"instance": c.instance,
44507	})
44508	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44509}
44510
44511// Do executes the "compute.instances.deleteAccessConfig" call.
44512// Exactly one of *Operation or error will be non-nil. Any non-2xx
44513// status code is an error. Response headers are in either
44514// *Operation.ServerResponse.Header or (if a response was returned at
44515// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44516// to check whether the returned error was because
44517// http.StatusNotModified was returned.
44518func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
44519	gensupport.SetOptions(c.urlParams_, opts...)
44520	res, err := c.doRequest("json")
44521	if res != nil && res.StatusCode == http.StatusNotModified {
44522		if res.Body != nil {
44523			res.Body.Close()
44524		}
44525		return nil, &googleapi.Error{
44526			Code:   res.StatusCode,
44527			Header: res.Header,
44528		}
44529	}
44530	if err != nil {
44531		return nil, err
44532	}
44533	defer googleapi.CloseBody(res)
44534	if err := googleapi.CheckResponse(res); err != nil {
44535		return nil, err
44536	}
44537	ret := &Operation{
44538		ServerResponse: googleapi.ServerResponse{
44539			Header:         res.Header,
44540			HTTPStatusCode: res.StatusCode,
44541		},
44542	}
44543	target := &ret
44544	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
44545		return nil, err
44546	}
44547	return ret, nil
44548	// {
44549	//   "description": "Deletes an access config from an instance's network interface.",
44550	//   "httpMethod": "POST",
44551	//   "id": "compute.instances.deleteAccessConfig",
44552	//   "parameterOrder": [
44553	//     "project",
44554	//     "zone",
44555	//     "instance",
44556	//     "accessConfig",
44557	//     "networkInterface"
44558	//   ],
44559	//   "parameters": {
44560	//     "accessConfig": {
44561	//       "description": "The name of the access config to delete.",
44562	//       "location": "query",
44563	//       "required": true,
44564	//       "type": "string"
44565	//     },
44566	//     "instance": {
44567	//       "description": "The instance name for this request.",
44568	//       "location": "path",
44569	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44570	//       "required": true,
44571	//       "type": "string"
44572	//     },
44573	//     "networkInterface": {
44574	//       "description": "The name of the network interface.",
44575	//       "location": "query",
44576	//       "required": true,
44577	//       "type": "string"
44578	//     },
44579	//     "project": {
44580	//       "description": "Project ID for this request.",
44581	//       "location": "path",
44582	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44583	//       "required": true,
44584	//       "type": "string"
44585	//     },
44586	//     "requestId": {
44587	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
44588	//       "location": "query",
44589	//       "type": "string"
44590	//     },
44591	//     "zone": {
44592	//       "description": "The name of the zone for this request.",
44593	//       "location": "path",
44594	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44595	//       "required": true,
44596	//       "type": "string"
44597	//     }
44598	//   },
44599	//   "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig",
44600	//   "response": {
44601	//     "$ref": "Operation"
44602	//   },
44603	//   "scopes": [
44604	//     "https://www.googleapis.com/auth/cloud-platform",
44605	//     "https://www.googleapis.com/auth/compute"
44606	//   ]
44607	// }
44608
44609}
44610
44611// method id "compute.instances.detachDisk":
44612
44613type InstancesDetachDiskCall struct {
44614	s          *Service
44615	project    string
44616	zone       string
44617	instance   string
44618	urlParams_ gensupport.URLParams
44619	ctx_       context.Context
44620	header_    http.Header
44621}
44622
44623// DetachDisk: Detaches a disk from an instance.
44624// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/detachDisk
44625func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall {
44626	c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44627	c.project = project
44628	c.zone = zone
44629	c.instance = instance
44630	c.urlParams_.Set("deviceName", deviceName)
44631	return c
44632}
44633
44634// RequestId sets the optional parameter "requestId": An optional
44635// request ID to identify requests. Specify a unique request ID so that
44636// if you must retry your request, the server will know to ignore the
44637// request if it has already been completed.
44638//
44639// For example, consider a situation where you make an initial request
44640// and the request times out. If you make the request again with the
44641// same request ID, the server can check if original operation with the
44642// same request ID was received, and if so, will ignore the second
44643// request. This prevents clients from accidentally creating duplicate
44644// commitments.
44645//
44646// The request ID must be a valid UUID with the exception that zero UUID
44647// is not supported (00000000-0000-0000-0000-000000000000).
44648func (c *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall {
44649	c.urlParams_.Set("requestId", requestId)
44650	return c
44651}
44652
44653// Fields allows partial responses to be retrieved. See
44654// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44655// for more information.
44656func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall {
44657	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44658	return c
44659}
44660
44661// Context sets the context to be used in this call's Do method. Any
44662// pending HTTP request will be aborted if the provided context is
44663// canceled.
44664func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall {
44665	c.ctx_ = ctx
44666	return c
44667}
44668
44669// Header returns an http.Header that can be modified by the caller to
44670// add HTTP headers to the request.
44671func (c *InstancesDetachDiskCall) Header() http.Header {
44672	if c.header_ == nil {
44673		c.header_ = make(http.Header)
44674	}
44675	return c.header_
44676}
44677
44678func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) {
44679	reqHeaders := make(http.Header)
44680	for k, v := range c.header_ {
44681		reqHeaders[k] = v
44682	}
44683	reqHeaders.Set("User-Agent", c.s.userAgent())
44684	var body io.Reader = nil
44685	c.urlParams_.Set("alt", alt)
44686	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/detachDisk")
44687	urls += "?" + c.urlParams_.Encode()
44688	req, _ := http.NewRequest("POST", urls, body)
44689	req.Header = reqHeaders
44690	googleapi.Expand(req.URL, map[string]string{
44691		"project":  c.project,
44692		"zone":     c.zone,
44693		"instance": c.instance,
44694	})
44695	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44696}
44697
44698// Do executes the "compute.instances.detachDisk" call.
44699// Exactly one of *Operation or error will be non-nil. Any non-2xx
44700// status code is an error. Response headers are in either
44701// *Operation.ServerResponse.Header or (if a response was returned at
44702// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44703// to check whether the returned error was because
44704// http.StatusNotModified was returned.
44705func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
44706	gensupport.SetOptions(c.urlParams_, opts...)
44707	res, err := c.doRequest("json")
44708	if res != nil && res.StatusCode == http.StatusNotModified {
44709		if res.Body != nil {
44710			res.Body.Close()
44711		}
44712		return nil, &googleapi.Error{
44713			Code:   res.StatusCode,
44714			Header: res.Header,
44715		}
44716	}
44717	if err != nil {
44718		return nil, err
44719	}
44720	defer googleapi.CloseBody(res)
44721	if err := googleapi.CheckResponse(res); err != nil {
44722		return nil, err
44723	}
44724	ret := &Operation{
44725		ServerResponse: googleapi.ServerResponse{
44726			Header:         res.Header,
44727			HTTPStatusCode: res.StatusCode,
44728		},
44729	}
44730	target := &ret
44731	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
44732		return nil, err
44733	}
44734	return ret, nil
44735	// {
44736	//   "description": "Detaches a disk from an instance.",
44737	//   "httpMethod": "POST",
44738	//   "id": "compute.instances.detachDisk",
44739	//   "parameterOrder": [
44740	//     "project",
44741	//     "zone",
44742	//     "instance",
44743	//     "deviceName"
44744	//   ],
44745	//   "parameters": {
44746	//     "deviceName": {
44747	//       "description": "Disk device name to detach.",
44748	//       "location": "query",
44749	//       "required": true,
44750	//       "type": "string"
44751	//     },
44752	//     "instance": {
44753	//       "description": "Instance name.",
44754	//       "location": "path",
44755	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44756	//       "required": true,
44757	//       "type": "string"
44758	//     },
44759	//     "project": {
44760	//       "description": "Project ID for this request.",
44761	//       "location": "path",
44762	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44763	//       "required": true,
44764	//       "type": "string"
44765	//     },
44766	//     "requestId": {
44767	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
44768	//       "location": "query",
44769	//       "type": "string"
44770	//     },
44771	//     "zone": {
44772	//       "description": "The name of the zone for this request.",
44773	//       "location": "path",
44774	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44775	//       "required": true,
44776	//       "type": "string"
44777	//     }
44778	//   },
44779	//   "path": "{project}/zones/{zone}/instances/{instance}/detachDisk",
44780	//   "response": {
44781	//     "$ref": "Operation"
44782	//   },
44783	//   "scopes": [
44784	//     "https://www.googleapis.com/auth/cloud-platform",
44785	//     "https://www.googleapis.com/auth/compute"
44786	//   ]
44787	// }
44788
44789}
44790
44791// method id "compute.instances.get":
44792
44793type InstancesGetCall struct {
44794	s            *Service
44795	project      string
44796	zone         string
44797	instance     string
44798	urlParams_   gensupport.URLParams
44799	ifNoneMatch_ string
44800	ctx_         context.Context
44801	header_      http.Header
44802}
44803
44804// Get: Returns the specified Instance resource. Get a list of available
44805// instances by making a list() request.
44806// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get
44807func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall {
44808	c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44809	c.project = project
44810	c.zone = zone
44811	c.instance = instance
44812	return c
44813}
44814
44815// Fields allows partial responses to be retrieved. See
44816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44817// for more information.
44818func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall {
44819	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44820	return c
44821}
44822
44823// IfNoneMatch sets the optional parameter which makes the operation
44824// fail if the object's ETag matches the given value. This is useful for
44825// getting updates only after the object has changed since the last
44826// request. Use googleapi.IsNotModified to check whether the response
44827// error from Do is the result of In-None-Match.
44828func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall {
44829	c.ifNoneMatch_ = entityTag
44830	return c
44831}
44832
44833// Context sets the context to be used in this call's Do method. Any
44834// pending HTTP request will be aborted if the provided context is
44835// canceled.
44836func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
44837	c.ctx_ = ctx
44838	return c
44839}
44840
44841// Header returns an http.Header that can be modified by the caller to
44842// add HTTP headers to the request.
44843func (c *InstancesGetCall) Header() http.Header {
44844	if c.header_ == nil {
44845		c.header_ = make(http.Header)
44846	}
44847	return c.header_
44848}
44849
44850func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
44851	reqHeaders := make(http.Header)
44852	for k, v := range c.header_ {
44853		reqHeaders[k] = v
44854	}
44855	reqHeaders.Set("User-Agent", c.s.userAgent())
44856	if c.ifNoneMatch_ != "" {
44857		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
44858	}
44859	var body io.Reader = nil
44860	c.urlParams_.Set("alt", alt)
44861	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}")
44862	urls += "?" + c.urlParams_.Encode()
44863	req, _ := http.NewRequest("GET", urls, body)
44864	req.Header = reqHeaders
44865	googleapi.Expand(req.URL, map[string]string{
44866		"project":  c.project,
44867		"zone":     c.zone,
44868		"instance": c.instance,
44869	})
44870	return gensupport.SendRequest(c.ctx_, c.s.client, req)
44871}
44872
44873// Do executes the "compute.instances.get" call.
44874// Exactly one of *Instance or error will be non-nil. Any non-2xx status
44875// code is an error. Response headers are in either
44876// *Instance.ServerResponse.Header or (if a response was returned at
44877// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44878// to check whether the returned error was because
44879// http.StatusNotModified was returned.
44880func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
44881	gensupport.SetOptions(c.urlParams_, opts...)
44882	res, err := c.doRequest("json")
44883	if res != nil && res.StatusCode == http.StatusNotModified {
44884		if res.Body != nil {
44885			res.Body.Close()
44886		}
44887		return nil, &googleapi.Error{
44888			Code:   res.StatusCode,
44889			Header: res.Header,
44890		}
44891	}
44892	if err != nil {
44893		return nil, err
44894	}
44895	defer googleapi.CloseBody(res)
44896	if err := googleapi.CheckResponse(res); err != nil {
44897		return nil, err
44898	}
44899	ret := &Instance{
44900		ServerResponse: googleapi.ServerResponse{
44901			Header:         res.Header,
44902			HTTPStatusCode: res.StatusCode,
44903		},
44904	}
44905	target := &ret
44906	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
44907		return nil, err
44908	}
44909	return ret, nil
44910	// {
44911	//   "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.",
44912	//   "httpMethod": "GET",
44913	//   "id": "compute.instances.get",
44914	//   "parameterOrder": [
44915	//     "project",
44916	//     "zone",
44917	//     "instance"
44918	//   ],
44919	//   "parameters": {
44920	//     "instance": {
44921	//       "description": "Name of the instance resource to return.",
44922	//       "location": "path",
44923	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44924	//       "required": true,
44925	//       "type": "string"
44926	//     },
44927	//     "project": {
44928	//       "description": "Project ID for this request.",
44929	//       "location": "path",
44930	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44931	//       "required": true,
44932	//       "type": "string"
44933	//     },
44934	//     "zone": {
44935	//       "description": "The name of the zone for this request.",
44936	//       "location": "path",
44937	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44938	//       "required": true,
44939	//       "type": "string"
44940	//     }
44941	//   },
44942	//   "path": "{project}/zones/{zone}/instances/{instance}",
44943	//   "response": {
44944	//     "$ref": "Instance"
44945	//   },
44946	//   "scopes": [
44947	//     "https://www.googleapis.com/auth/cloud-platform",
44948	//     "https://www.googleapis.com/auth/compute",
44949	//     "https://www.googleapis.com/auth/compute.readonly"
44950	//   ]
44951	// }
44952
44953}
44954
44955// method id "compute.instances.getSerialPortOutput":
44956
44957type InstancesGetSerialPortOutputCall struct {
44958	s            *Service
44959	project      string
44960	zone         string
44961	instance     string
44962	urlParams_   gensupport.URLParams
44963	ifNoneMatch_ string
44964	ctx_         context.Context
44965	header_      http.Header
44966}
44967
44968// GetSerialPortOutput: Returns the specified instance's serial port
44969// output.
44970// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput
44971func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall {
44972	c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44973	c.project = project
44974	c.zone = zone
44975	c.instance = instance
44976	return c
44977}
44978
44979// Port sets the optional parameter "port": Specifies which COM or
44980// serial port to retrieve data from.
44981func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall {
44982	c.urlParams_.Set("port", fmt.Sprint(port))
44983	return c
44984}
44985
44986// Start sets the optional parameter "start": Returns output starting
44987// from a specific byte position. Use this to page through output when
44988// the output is too large to return in a single request. For the
44989// initial request, leave this field unspecified. For subsequent calls,
44990// this field should be set to the next value returned in the previous
44991// call.
44992func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall {
44993	c.urlParams_.Set("start", fmt.Sprint(start))
44994	return c
44995}
44996
44997// Fields allows partial responses to be retrieved. See
44998// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44999// for more information.
45000func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall {
45001	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45002	return c
45003}
45004
45005// IfNoneMatch sets the optional parameter which makes the operation
45006// fail if the object's ETag matches the given value. This is useful for
45007// getting updates only after the object has changed since the last
45008// request. Use googleapi.IsNotModified to check whether the response
45009// error from Do is the result of In-None-Match.
45010func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall {
45011	c.ifNoneMatch_ = entityTag
45012	return c
45013}
45014
45015// Context sets the context to be used in this call's Do method. Any
45016// pending HTTP request will be aborted if the provided context is
45017// canceled.
45018func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall {
45019	c.ctx_ = ctx
45020	return c
45021}
45022
45023// Header returns an http.Header that can be modified by the caller to
45024// add HTTP headers to the request.
45025func (c *InstancesGetSerialPortOutputCall) Header() http.Header {
45026	if c.header_ == nil {
45027		c.header_ = make(http.Header)
45028	}
45029	return c.header_
45030}
45031
45032func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) {
45033	reqHeaders := make(http.Header)
45034	for k, v := range c.header_ {
45035		reqHeaders[k] = v
45036	}
45037	reqHeaders.Set("User-Agent", c.s.userAgent())
45038	if c.ifNoneMatch_ != "" {
45039		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45040	}
45041	var body io.Reader = nil
45042	c.urlParams_.Set("alt", alt)
45043	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/serialPort")
45044	urls += "?" + c.urlParams_.Encode()
45045	req, _ := http.NewRequest("GET", urls, body)
45046	req.Header = reqHeaders
45047	googleapi.Expand(req.URL, map[string]string{
45048		"project":  c.project,
45049		"zone":     c.zone,
45050		"instance": c.instance,
45051	})
45052	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45053}
45054
45055// Do executes the "compute.instances.getSerialPortOutput" call.
45056// Exactly one of *SerialPortOutput or error will be non-nil. Any
45057// non-2xx status code is an error. Response headers are in either
45058// *SerialPortOutput.ServerResponse.Header or (if a response was
45059// returned at all) in error.(*googleapi.Error).Header. Use
45060// googleapi.IsNotModified to check whether the returned error was
45061// because http.StatusNotModified was returned.
45062func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) {
45063	gensupport.SetOptions(c.urlParams_, opts...)
45064	res, err := c.doRequest("json")
45065	if res != nil && res.StatusCode == http.StatusNotModified {
45066		if res.Body != nil {
45067			res.Body.Close()
45068		}
45069		return nil, &googleapi.Error{
45070			Code:   res.StatusCode,
45071			Header: res.Header,
45072		}
45073	}
45074	if err != nil {
45075		return nil, err
45076	}
45077	defer googleapi.CloseBody(res)
45078	if err := googleapi.CheckResponse(res); err != nil {
45079		return nil, err
45080	}
45081	ret := &SerialPortOutput{
45082		ServerResponse: googleapi.ServerResponse{
45083			Header:         res.Header,
45084			HTTPStatusCode: res.StatusCode,
45085		},
45086	}
45087	target := &ret
45088	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
45089		return nil, err
45090	}
45091	return ret, nil
45092	// {
45093	//   "description": "Returns the specified instance's serial port output.",
45094	//   "httpMethod": "GET",
45095	//   "id": "compute.instances.getSerialPortOutput",
45096	//   "parameterOrder": [
45097	//     "project",
45098	//     "zone",
45099	//     "instance"
45100	//   ],
45101	//   "parameters": {
45102	//     "instance": {
45103	//       "description": "Name of the instance scoping this request.",
45104	//       "location": "path",
45105	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45106	//       "required": true,
45107	//       "type": "string"
45108	//     },
45109	//     "port": {
45110	//       "default": "1",
45111	//       "description": "Specifies which COM or serial port to retrieve data from.",
45112	//       "format": "int32",
45113	//       "location": "query",
45114	//       "maximum": "4",
45115	//       "minimum": "1",
45116	//       "type": "integer"
45117	//     },
45118	//     "project": {
45119	//       "description": "Project ID for this request.",
45120	//       "location": "path",
45121	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45122	//       "required": true,
45123	//       "type": "string"
45124	//     },
45125	//     "start": {
45126	//       "description": "Returns output starting from a specific byte position. Use this to page through output when the output is too large to return in a single request. For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value returned in the previous call.",
45127	//       "format": "int64",
45128	//       "location": "query",
45129	//       "type": "string"
45130	//     },
45131	//     "zone": {
45132	//       "description": "The name of the zone for this request.",
45133	//       "location": "path",
45134	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45135	//       "required": true,
45136	//       "type": "string"
45137	//     }
45138	//   },
45139	//   "path": "{project}/zones/{zone}/instances/{instance}/serialPort",
45140	//   "response": {
45141	//     "$ref": "SerialPortOutput"
45142	//   },
45143	//   "scopes": [
45144	//     "https://www.googleapis.com/auth/cloud-platform",
45145	//     "https://www.googleapis.com/auth/compute",
45146	//     "https://www.googleapis.com/auth/compute.readonly"
45147	//   ]
45148	// }
45149
45150}
45151
45152// method id "compute.instances.insert":
45153
45154type InstancesInsertCall struct {
45155	s          *Service
45156	project    string
45157	zone       string
45158	instance   *Instance
45159	urlParams_ gensupport.URLParams
45160	ctx_       context.Context
45161	header_    http.Header
45162}
45163
45164// Insert: Creates an instance resource in the specified project using
45165// the data included in the request.
45166// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/insert
45167func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall {
45168	c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45169	c.project = project
45170	c.zone = zone
45171	c.instance = instance
45172	return c
45173}
45174
45175// RequestId sets the optional parameter "requestId": An optional
45176// request ID to identify requests. Specify a unique request ID so that
45177// if you must retry your request, the server will know to ignore the
45178// request if it has already been completed.
45179//
45180// For example, consider a situation where you make an initial request
45181// and the request times out. If you make the request again with the
45182// same request ID, the server can check if original operation with the
45183// same request ID was received, and if so, will ignore the second
45184// request. This prevents clients from accidentally creating duplicate
45185// commitments.
45186//
45187// The request ID must be a valid UUID with the exception that zero UUID
45188// is not supported (00000000-0000-0000-0000-000000000000).
45189func (c *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall {
45190	c.urlParams_.Set("requestId", requestId)
45191	return c
45192}
45193
45194// Fields allows partial responses to be retrieved. See
45195// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45196// for more information.
45197func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall {
45198	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45199	return c
45200}
45201
45202// Context sets the context to be used in this call's Do method. Any
45203// pending HTTP request will be aborted if the provided context is
45204// canceled.
45205func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
45206	c.ctx_ = ctx
45207	return c
45208}
45209
45210// Header returns an http.Header that can be modified by the caller to
45211// add HTTP headers to the request.
45212func (c *InstancesInsertCall) Header() http.Header {
45213	if c.header_ == nil {
45214		c.header_ = make(http.Header)
45215	}
45216	return c.header_
45217}
45218
45219func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
45220	reqHeaders := make(http.Header)
45221	for k, v := range c.header_ {
45222		reqHeaders[k] = v
45223	}
45224	reqHeaders.Set("User-Agent", c.s.userAgent())
45225	var body io.Reader = nil
45226	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
45227	if err != nil {
45228		return nil, err
45229	}
45230	reqHeaders.Set("Content-Type", "application/json")
45231	c.urlParams_.Set("alt", alt)
45232	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances")
45233	urls += "?" + c.urlParams_.Encode()
45234	req, _ := http.NewRequest("POST", urls, body)
45235	req.Header = reqHeaders
45236	googleapi.Expand(req.URL, map[string]string{
45237		"project": c.project,
45238		"zone":    c.zone,
45239	})
45240	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45241}
45242
45243// Do executes the "compute.instances.insert" call.
45244// Exactly one of *Operation or error will be non-nil. Any non-2xx
45245// status code is an error. Response headers are in either
45246// *Operation.ServerResponse.Header or (if a response was returned at
45247// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45248// to check whether the returned error was because
45249// http.StatusNotModified was returned.
45250func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
45251	gensupport.SetOptions(c.urlParams_, opts...)
45252	res, err := c.doRequest("json")
45253	if res != nil && res.StatusCode == http.StatusNotModified {
45254		if res.Body != nil {
45255			res.Body.Close()
45256		}
45257		return nil, &googleapi.Error{
45258			Code:   res.StatusCode,
45259			Header: res.Header,
45260		}
45261	}
45262	if err != nil {
45263		return nil, err
45264	}
45265	defer googleapi.CloseBody(res)
45266	if err := googleapi.CheckResponse(res); err != nil {
45267		return nil, err
45268	}
45269	ret := &Operation{
45270		ServerResponse: googleapi.ServerResponse{
45271			Header:         res.Header,
45272			HTTPStatusCode: res.StatusCode,
45273		},
45274	}
45275	target := &ret
45276	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
45277		return nil, err
45278	}
45279	return ret, nil
45280	// {
45281	//   "description": "Creates an instance resource in the specified project using the data included in the request.",
45282	//   "httpMethod": "POST",
45283	//   "id": "compute.instances.insert",
45284	//   "parameterOrder": [
45285	//     "project",
45286	//     "zone"
45287	//   ],
45288	//   "parameters": {
45289	//     "project": {
45290	//       "description": "Project ID for this request.",
45291	//       "location": "path",
45292	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45293	//       "required": true,
45294	//       "type": "string"
45295	//     },
45296	//     "requestId": {
45297	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
45298	//       "location": "query",
45299	//       "type": "string"
45300	//     },
45301	//     "zone": {
45302	//       "description": "The name of the zone for this request.",
45303	//       "location": "path",
45304	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45305	//       "required": true,
45306	//       "type": "string"
45307	//     }
45308	//   },
45309	//   "path": "{project}/zones/{zone}/instances",
45310	//   "request": {
45311	//     "$ref": "Instance"
45312	//   },
45313	//   "response": {
45314	//     "$ref": "Operation"
45315	//   },
45316	//   "scopes": [
45317	//     "https://www.googleapis.com/auth/cloud-platform",
45318	//     "https://www.googleapis.com/auth/compute"
45319	//   ]
45320	// }
45321
45322}
45323
45324// method id "compute.instances.list":
45325
45326type InstancesListCall struct {
45327	s            *Service
45328	project      string
45329	zone         string
45330	urlParams_   gensupport.URLParams
45331	ifNoneMatch_ string
45332	ctx_         context.Context
45333	header_      http.Header
45334}
45335
45336// List: Retrieves the list of instances contained within the specified
45337// zone.
45338// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list
45339func (r *InstancesService) List(project string, zone string) *InstancesListCall {
45340	c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45341	c.project = project
45342	c.zone = zone
45343	return c
45344}
45345
45346// Filter sets the optional parameter "filter": Sets a filter
45347// {expression} for filtering listed resources. Your {expression} must
45348// be in the format: field_name comparison_string literal_string.
45349//
45350// The field_name is the name of the field you want to compare. Only
45351// atomic field types are supported (string, number, boolean). The
45352// comparison_string must be either eq (equals) or ne (not equals). The
45353// literal_string is the string value to filter to. The literal value
45354// must be valid for the type of field you are filtering by (string,
45355// number, boolean). For string fields, the literal value is interpreted
45356// as a regular expression using RE2 syntax. The literal value must
45357// match the entire field.
45358//
45359// For example, to filter for instances that do not have a name of
45360// example-instance, you would use name ne example-instance.
45361//
45362// You can filter on nested fields. For example, you could filter on
45363// instances that have set the scheduling.automaticRestart field to
45364// true. Use filtering on nested fields to take advantage of labels to
45365// organize and search for results based on label values.
45366//
45367// To filter on multiple expressions, provide each separate expression
45368// within parentheses. For example, (scheduling.automaticRestart eq
45369// true) (zone eq us-central1-f). Multiple expressions are treated as
45370// AND expressions, meaning that resources must match all expressions to
45371// pass the filters.
45372func (c *InstancesListCall) Filter(filter string) *InstancesListCall {
45373	c.urlParams_.Set("filter", filter)
45374	return c
45375}
45376
45377// MaxResults sets the optional parameter "maxResults": The maximum
45378// number of results per page that should be returned. If the number of
45379// available results is larger than maxResults, Compute Engine returns a
45380// nextPageToken that can be used to get the next page of results in
45381// subsequent list requests. Acceptable values are 0 to 500, inclusive.
45382// (Default: 500)
45383func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall {
45384	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45385	return c
45386}
45387
45388// OrderBy sets the optional parameter "orderBy": Sorts list results by
45389// a certain order. By default, results are returned in alphanumerical
45390// order based on the resource name.
45391//
45392// You can also sort results in descending order based on the creation
45393// timestamp using orderBy="creationTimestamp desc". This sorts results
45394// based on the creationTimestamp field in reverse chronological order
45395// (newest result first). Use this to sort resources like operations so
45396// that the newest operation is returned first.
45397//
45398// Currently, only sorting by name or creationTimestamp desc is
45399// supported.
45400func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall {
45401	c.urlParams_.Set("orderBy", orderBy)
45402	return c
45403}
45404
45405// PageToken sets the optional parameter "pageToken": Specifies a page
45406// token to use. Set pageToken to the nextPageToken returned by a
45407// previous list request to get the next page of results.
45408func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall {
45409	c.urlParams_.Set("pageToken", pageToken)
45410	return c
45411}
45412
45413// Fields allows partial responses to be retrieved. See
45414// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45415// for more information.
45416func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall {
45417	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45418	return c
45419}
45420
45421// IfNoneMatch sets the optional parameter which makes the operation
45422// fail if the object's ETag matches the given value. This is useful for
45423// getting updates only after the object has changed since the last
45424// request. Use googleapi.IsNotModified to check whether the response
45425// error from Do is the result of In-None-Match.
45426func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall {
45427	c.ifNoneMatch_ = entityTag
45428	return c
45429}
45430
45431// Context sets the context to be used in this call's Do method. Any
45432// pending HTTP request will be aborted if the provided context is
45433// canceled.
45434func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
45435	c.ctx_ = ctx
45436	return c
45437}
45438
45439// Header returns an http.Header that can be modified by the caller to
45440// add HTTP headers to the request.
45441func (c *InstancesListCall) Header() http.Header {
45442	if c.header_ == nil {
45443		c.header_ = make(http.Header)
45444	}
45445	return c.header_
45446}
45447
45448func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
45449	reqHeaders := make(http.Header)
45450	for k, v := range c.header_ {
45451		reqHeaders[k] = v
45452	}
45453	reqHeaders.Set("User-Agent", c.s.userAgent())
45454	if c.ifNoneMatch_ != "" {
45455		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45456	}
45457	var body io.Reader = nil
45458	c.urlParams_.Set("alt", alt)
45459	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances")
45460	urls += "?" + c.urlParams_.Encode()
45461	req, _ := http.NewRequest("GET", urls, body)
45462	req.Header = reqHeaders
45463	googleapi.Expand(req.URL, map[string]string{
45464		"project": c.project,
45465		"zone":    c.zone,
45466	})
45467	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45468}
45469
45470// Do executes the "compute.instances.list" call.
45471// Exactly one of *InstanceList or error will be non-nil. Any non-2xx
45472// status code is an error. Response headers are in either
45473// *InstanceList.ServerResponse.Header or (if a response was returned at
45474// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45475// to check whether the returned error was because
45476// http.StatusNotModified was returned.
45477func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, error) {
45478	gensupport.SetOptions(c.urlParams_, opts...)
45479	res, err := c.doRequest("json")
45480	if res != nil && res.StatusCode == http.StatusNotModified {
45481		if res.Body != nil {
45482			res.Body.Close()
45483		}
45484		return nil, &googleapi.Error{
45485			Code:   res.StatusCode,
45486			Header: res.Header,
45487		}
45488	}
45489	if err != nil {
45490		return nil, err
45491	}
45492	defer googleapi.CloseBody(res)
45493	if err := googleapi.CheckResponse(res); err != nil {
45494		return nil, err
45495	}
45496	ret := &InstanceList{
45497		ServerResponse: googleapi.ServerResponse{
45498			Header:         res.Header,
45499			HTTPStatusCode: res.StatusCode,
45500		},
45501	}
45502	target := &ret
45503	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
45504		return nil, err
45505	}
45506	return ret, nil
45507	// {
45508	//   "description": "Retrieves the list of instances contained within the specified zone.",
45509	//   "httpMethod": "GET",
45510	//   "id": "compute.instances.list",
45511	//   "parameterOrder": [
45512	//     "project",
45513	//     "zone"
45514	//   ],
45515	//   "parameters": {
45516	//     "filter": {
45517	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
45518	//       "location": "query",
45519	//       "type": "string"
45520	//     },
45521	//     "maxResults": {
45522	//       "default": "500",
45523	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
45524	//       "format": "uint32",
45525	//       "location": "query",
45526	//       "minimum": "0",
45527	//       "type": "integer"
45528	//     },
45529	//     "orderBy": {
45530	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
45531	//       "location": "query",
45532	//       "type": "string"
45533	//     },
45534	//     "pageToken": {
45535	//       "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.",
45536	//       "location": "query",
45537	//       "type": "string"
45538	//     },
45539	//     "project": {
45540	//       "description": "Project ID for this request.",
45541	//       "location": "path",
45542	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45543	//       "required": true,
45544	//       "type": "string"
45545	//     },
45546	//     "zone": {
45547	//       "description": "The name of the zone for this request.",
45548	//       "location": "path",
45549	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45550	//       "required": true,
45551	//       "type": "string"
45552	//     }
45553	//   },
45554	//   "path": "{project}/zones/{zone}/instances",
45555	//   "response": {
45556	//     "$ref": "InstanceList"
45557	//   },
45558	//   "scopes": [
45559	//     "https://www.googleapis.com/auth/cloud-platform",
45560	//     "https://www.googleapis.com/auth/compute",
45561	//     "https://www.googleapis.com/auth/compute.readonly"
45562	//   ]
45563	// }
45564
45565}
45566
45567// Pages invokes f for each page of results.
45568// A non-nil error returned from f will halt the iteration.
45569// The provided context supersedes any context provided to the Context method.
45570func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error {
45571	c.ctx_ = ctx
45572	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45573	for {
45574		x, err := c.Do()
45575		if err != nil {
45576			return err
45577		}
45578		if err := f(x); err != nil {
45579			return err
45580		}
45581		if x.NextPageToken == "" {
45582			return nil
45583		}
45584		c.PageToken(x.NextPageToken)
45585	}
45586}
45587
45588// method id "compute.instances.listReferrers":
45589
45590type InstancesListReferrersCall struct {
45591	s            *Service
45592	project      string
45593	zone         string
45594	instance     string
45595	urlParams_   gensupport.URLParams
45596	ifNoneMatch_ string
45597	ctx_         context.Context
45598	header_      http.Header
45599}
45600
45601// ListReferrers: Retrieves the list of referrers to instances contained
45602// within the specified zone.
45603func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall {
45604	c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45605	c.project = project
45606	c.zone = zone
45607	c.instance = instance
45608	return c
45609}
45610
45611// Filter sets the optional parameter "filter": Sets a filter
45612// {expression} for filtering listed resources. Your {expression} must
45613// be in the format: field_name comparison_string literal_string.
45614//
45615// The field_name is the name of the field you want to compare. Only
45616// atomic field types are supported (string, number, boolean). The
45617// comparison_string must be either eq (equals) or ne (not equals). The
45618// literal_string is the string value to filter to. The literal value
45619// must be valid for the type of field you are filtering by (string,
45620// number, boolean). For string fields, the literal value is interpreted
45621// as a regular expression using RE2 syntax. The literal value must
45622// match the entire field.
45623//
45624// For example, to filter for instances that do not have a name of
45625// example-instance, you would use name ne example-instance.
45626//
45627// You can filter on nested fields. For example, you could filter on
45628// instances that have set the scheduling.automaticRestart field to
45629// true. Use filtering on nested fields to take advantage of labels to
45630// organize and search for results based on label values.
45631//
45632// To filter on multiple expressions, provide each separate expression
45633// within parentheses. For example, (scheduling.automaticRestart eq
45634// true) (zone eq us-central1-f). Multiple expressions are treated as
45635// AND expressions, meaning that resources must match all expressions to
45636// pass the filters.
45637func (c *InstancesListReferrersCall) Filter(filter string) *InstancesListReferrersCall {
45638	c.urlParams_.Set("filter", filter)
45639	return c
45640}
45641
45642// MaxResults sets the optional parameter "maxResults": The maximum
45643// number of results per page that should be returned. If the number of
45644// available results is larger than maxResults, Compute Engine returns a
45645// nextPageToken that can be used to get the next page of results in
45646// subsequent list requests. Acceptable values are 0 to 500, inclusive.
45647// (Default: 500)
45648func (c *InstancesListReferrersCall) MaxResults(maxResults int64) *InstancesListReferrersCall {
45649	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45650	return c
45651}
45652
45653// OrderBy sets the optional parameter "orderBy": Sorts list results by
45654// a certain order. By default, results are returned in alphanumerical
45655// order based on the resource name.
45656//
45657// You can also sort results in descending order based on the creation
45658// timestamp using orderBy="creationTimestamp desc". This sorts results
45659// based on the creationTimestamp field in reverse chronological order
45660// (newest result first). Use this to sort resources like operations so
45661// that the newest operation is returned first.
45662//
45663// Currently, only sorting by name or creationTimestamp desc is
45664// supported.
45665func (c *InstancesListReferrersCall) OrderBy(orderBy string) *InstancesListReferrersCall {
45666	c.urlParams_.Set("orderBy", orderBy)
45667	return c
45668}
45669
45670// PageToken sets the optional parameter "pageToken": Specifies a page
45671// token to use. Set pageToken to the nextPageToken returned by a
45672// previous list request to get the next page of results.
45673func (c *InstancesListReferrersCall) PageToken(pageToken string) *InstancesListReferrersCall {
45674	c.urlParams_.Set("pageToken", pageToken)
45675	return c
45676}
45677
45678// Fields allows partial responses to be retrieved. See
45679// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45680// for more information.
45681func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesListReferrersCall {
45682	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45683	return c
45684}
45685
45686// IfNoneMatch sets the optional parameter which makes the operation
45687// fail if the object's ETag matches the given value. This is useful for
45688// getting updates only after the object has changed since the last
45689// request. Use googleapi.IsNotModified to check whether the response
45690// error from Do is the result of In-None-Match.
45691func (c *InstancesListReferrersCall) IfNoneMatch(entityTag string) *InstancesListReferrersCall {
45692	c.ifNoneMatch_ = entityTag
45693	return c
45694}
45695
45696// Context sets the context to be used in this call's Do method. Any
45697// pending HTTP request will be aborted if the provided context is
45698// canceled.
45699func (c *InstancesListReferrersCall) Context(ctx context.Context) *InstancesListReferrersCall {
45700	c.ctx_ = ctx
45701	return c
45702}
45703
45704// Header returns an http.Header that can be modified by the caller to
45705// add HTTP headers to the request.
45706func (c *InstancesListReferrersCall) Header() http.Header {
45707	if c.header_ == nil {
45708		c.header_ = make(http.Header)
45709	}
45710	return c.header_
45711}
45712
45713func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) {
45714	reqHeaders := make(http.Header)
45715	for k, v := range c.header_ {
45716		reqHeaders[k] = v
45717	}
45718	reqHeaders.Set("User-Agent", c.s.userAgent())
45719	if c.ifNoneMatch_ != "" {
45720		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
45721	}
45722	var body io.Reader = nil
45723	c.urlParams_.Set("alt", alt)
45724	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/referrers")
45725	urls += "?" + c.urlParams_.Encode()
45726	req, _ := http.NewRequest("GET", urls, body)
45727	req.Header = reqHeaders
45728	googleapi.Expand(req.URL, map[string]string{
45729		"project":  c.project,
45730		"zone":     c.zone,
45731		"instance": c.instance,
45732	})
45733	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45734}
45735
45736// Do executes the "compute.instances.listReferrers" call.
45737// Exactly one of *InstanceListReferrers or error will be non-nil. Any
45738// non-2xx status code is an error. Response headers are in either
45739// *InstanceListReferrers.ServerResponse.Header or (if a response was
45740// returned at all) in error.(*googleapi.Error).Header. Use
45741// googleapi.IsNotModified to check whether the returned error was
45742// because http.StatusNotModified was returned.
45743func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*InstanceListReferrers, error) {
45744	gensupport.SetOptions(c.urlParams_, opts...)
45745	res, err := c.doRequest("json")
45746	if res != nil && res.StatusCode == http.StatusNotModified {
45747		if res.Body != nil {
45748			res.Body.Close()
45749		}
45750		return nil, &googleapi.Error{
45751			Code:   res.StatusCode,
45752			Header: res.Header,
45753		}
45754	}
45755	if err != nil {
45756		return nil, err
45757	}
45758	defer googleapi.CloseBody(res)
45759	if err := googleapi.CheckResponse(res); err != nil {
45760		return nil, err
45761	}
45762	ret := &InstanceListReferrers{
45763		ServerResponse: googleapi.ServerResponse{
45764			Header:         res.Header,
45765			HTTPStatusCode: res.StatusCode,
45766		},
45767	}
45768	target := &ret
45769	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
45770		return nil, err
45771	}
45772	return ret, nil
45773	// {
45774	//   "description": "Retrieves the list of referrers to instances contained within the specified zone.",
45775	//   "httpMethod": "GET",
45776	//   "id": "compute.instances.listReferrers",
45777	//   "parameterOrder": [
45778	//     "project",
45779	//     "zone",
45780	//     "instance"
45781	//   ],
45782	//   "parameters": {
45783	//     "filter": {
45784	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
45785	//       "location": "query",
45786	//       "type": "string"
45787	//     },
45788	//     "instance": {
45789	//       "description": "Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.",
45790	//       "location": "path",
45791	//       "pattern": "-|[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45792	//       "required": true,
45793	//       "type": "string"
45794	//     },
45795	//     "maxResults": {
45796	//       "default": "500",
45797	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
45798	//       "format": "uint32",
45799	//       "location": "query",
45800	//       "minimum": "0",
45801	//       "type": "integer"
45802	//     },
45803	//     "orderBy": {
45804	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
45805	//       "location": "query",
45806	//       "type": "string"
45807	//     },
45808	//     "pageToken": {
45809	//       "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.",
45810	//       "location": "query",
45811	//       "type": "string"
45812	//     },
45813	//     "project": {
45814	//       "description": "Project ID for this request.",
45815	//       "location": "path",
45816	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45817	//       "required": true,
45818	//       "type": "string"
45819	//     },
45820	//     "zone": {
45821	//       "description": "The name of the zone for this request.",
45822	//       "location": "path",
45823	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45824	//       "required": true,
45825	//       "type": "string"
45826	//     }
45827	//   },
45828	//   "path": "{project}/zones/{zone}/instances/{instance}/referrers",
45829	//   "response": {
45830	//     "$ref": "InstanceListReferrers"
45831	//   },
45832	//   "scopes": [
45833	//     "https://www.googleapis.com/auth/cloud-platform",
45834	//     "https://www.googleapis.com/auth/compute",
45835	//     "https://www.googleapis.com/auth/compute.readonly"
45836	//   ]
45837	// }
45838
45839}
45840
45841// Pages invokes f for each page of results.
45842// A non-nil error returned from f will halt the iteration.
45843// The provided context supersedes any context provided to the Context method.
45844func (c *InstancesListReferrersCall) Pages(ctx context.Context, f func(*InstanceListReferrers) error) error {
45845	c.ctx_ = ctx
45846	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45847	for {
45848		x, err := c.Do()
45849		if err != nil {
45850			return err
45851		}
45852		if err := f(x); err != nil {
45853			return err
45854		}
45855		if x.NextPageToken == "" {
45856			return nil
45857		}
45858		c.PageToken(x.NextPageToken)
45859	}
45860}
45861
45862// method id "compute.instances.reset":
45863
45864type InstancesResetCall struct {
45865	s          *Service
45866	project    string
45867	zone       string
45868	instance   string
45869	urlParams_ gensupport.URLParams
45870	ctx_       context.Context
45871	header_    http.Header
45872}
45873
45874// Reset: Performs a reset on the instance. For more information, see
45875// Resetting an instance.
45876// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset
45877func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall {
45878	c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45879	c.project = project
45880	c.zone = zone
45881	c.instance = instance
45882	return c
45883}
45884
45885// RequestId sets the optional parameter "requestId": An optional
45886// request ID to identify requests. Specify a unique request ID so that
45887// if you must retry your request, the server will know to ignore the
45888// request if it has already been completed.
45889//
45890// For example, consider a situation where you make an initial request
45891// and the request times out. If you make the request again with the
45892// same request ID, the server can check if original operation with the
45893// same request ID was received, and if so, will ignore the second
45894// request. This prevents clients from accidentally creating duplicate
45895// commitments.
45896//
45897// The request ID must be a valid UUID with the exception that zero UUID
45898// is not supported (00000000-0000-0000-0000-000000000000).
45899func (c *InstancesResetCall) RequestId(requestId string) *InstancesResetCall {
45900	c.urlParams_.Set("requestId", requestId)
45901	return c
45902}
45903
45904// Fields allows partial responses to be retrieved. See
45905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45906// for more information.
45907func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall {
45908	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45909	return c
45910}
45911
45912// Context sets the context to be used in this call's Do method. Any
45913// pending HTTP request will be aborted if the provided context is
45914// canceled.
45915func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall {
45916	c.ctx_ = ctx
45917	return c
45918}
45919
45920// Header returns an http.Header that can be modified by the caller to
45921// add HTTP headers to the request.
45922func (c *InstancesResetCall) Header() http.Header {
45923	if c.header_ == nil {
45924		c.header_ = make(http.Header)
45925	}
45926	return c.header_
45927}
45928
45929func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) {
45930	reqHeaders := make(http.Header)
45931	for k, v := range c.header_ {
45932		reqHeaders[k] = v
45933	}
45934	reqHeaders.Set("User-Agent", c.s.userAgent())
45935	var body io.Reader = nil
45936	c.urlParams_.Set("alt", alt)
45937	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/reset")
45938	urls += "?" + c.urlParams_.Encode()
45939	req, _ := http.NewRequest("POST", urls, body)
45940	req.Header = reqHeaders
45941	googleapi.Expand(req.URL, map[string]string{
45942		"project":  c.project,
45943		"zone":     c.zone,
45944		"instance": c.instance,
45945	})
45946	return gensupport.SendRequest(c.ctx_, c.s.client, req)
45947}
45948
45949// Do executes the "compute.instances.reset" call.
45950// Exactly one of *Operation or error will be non-nil. Any non-2xx
45951// status code is an error. Response headers are in either
45952// *Operation.ServerResponse.Header or (if a response was returned at
45953// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45954// to check whether the returned error was because
45955// http.StatusNotModified was returned.
45956func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
45957	gensupport.SetOptions(c.urlParams_, opts...)
45958	res, err := c.doRequest("json")
45959	if res != nil && res.StatusCode == http.StatusNotModified {
45960		if res.Body != nil {
45961			res.Body.Close()
45962		}
45963		return nil, &googleapi.Error{
45964			Code:   res.StatusCode,
45965			Header: res.Header,
45966		}
45967	}
45968	if err != nil {
45969		return nil, err
45970	}
45971	defer googleapi.CloseBody(res)
45972	if err := googleapi.CheckResponse(res); err != nil {
45973		return nil, err
45974	}
45975	ret := &Operation{
45976		ServerResponse: googleapi.ServerResponse{
45977			Header:         res.Header,
45978			HTTPStatusCode: res.StatusCode,
45979		},
45980	}
45981	target := &ret
45982	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
45983		return nil, err
45984	}
45985	return ret, nil
45986	// {
45987	//   "description": "Performs a reset on the instance. For more information, see Resetting an instance.",
45988	//   "httpMethod": "POST",
45989	//   "id": "compute.instances.reset",
45990	//   "parameterOrder": [
45991	//     "project",
45992	//     "zone",
45993	//     "instance"
45994	//   ],
45995	//   "parameters": {
45996	//     "instance": {
45997	//       "description": "Name of the instance scoping this request.",
45998	//       "location": "path",
45999	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46000	//       "required": true,
46001	//       "type": "string"
46002	//     },
46003	//     "project": {
46004	//       "description": "Project ID for this request.",
46005	//       "location": "path",
46006	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46007	//       "required": true,
46008	//       "type": "string"
46009	//     },
46010	//     "requestId": {
46011	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
46012	//       "location": "query",
46013	//       "type": "string"
46014	//     },
46015	//     "zone": {
46016	//       "description": "The name of the zone for this request.",
46017	//       "location": "path",
46018	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46019	//       "required": true,
46020	//       "type": "string"
46021	//     }
46022	//   },
46023	//   "path": "{project}/zones/{zone}/instances/{instance}/reset",
46024	//   "response": {
46025	//     "$ref": "Operation"
46026	//   },
46027	//   "scopes": [
46028	//     "https://www.googleapis.com/auth/cloud-platform",
46029	//     "https://www.googleapis.com/auth/compute"
46030	//   ]
46031	// }
46032
46033}
46034
46035// method id "compute.instances.setDiskAutoDelete":
46036
46037type InstancesSetDiskAutoDeleteCall struct {
46038	s          *Service
46039	project    string
46040	zone       string
46041	instance   string
46042	urlParams_ gensupport.URLParams
46043	ctx_       context.Context
46044	header_    http.Header
46045}
46046
46047// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to
46048// an instance.
46049// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setDiskAutoDelete
46050func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall {
46051	c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46052	c.project = project
46053	c.zone = zone
46054	c.instance = instance
46055	c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete))
46056	c.urlParams_.Set("deviceName", deviceName)
46057	return c
46058}
46059
46060// RequestId sets the optional parameter "requestId": An optional
46061// request ID to identify requests. Specify a unique request ID so that
46062// if you must retry your request, the server will know to ignore the
46063// request if it has already been completed.
46064//
46065// For example, consider a situation where you make an initial request
46066// and the request times out. If you make the request again with the
46067// same request ID, the server can check if original operation with the
46068// same request ID was received, and if so, will ignore the second
46069// request. This prevents clients from accidentally creating duplicate
46070// commitments.
46071//
46072// The request ID must be a valid UUID with the exception that zero UUID
46073// is not supported (00000000-0000-0000-0000-000000000000).
46074func (c *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall {
46075	c.urlParams_.Set("requestId", requestId)
46076	return c
46077}
46078
46079// Fields allows partial responses to be retrieved. See
46080// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46081// for more information.
46082func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall {
46083	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46084	return c
46085}
46086
46087// Context sets the context to be used in this call's Do method. Any
46088// pending HTTP request will be aborted if the provided context is
46089// canceled.
46090func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall {
46091	c.ctx_ = ctx
46092	return c
46093}
46094
46095// Header returns an http.Header that can be modified by the caller to
46096// add HTTP headers to the request.
46097func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header {
46098	if c.header_ == nil {
46099		c.header_ = make(http.Header)
46100	}
46101	return c.header_
46102}
46103
46104func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) {
46105	reqHeaders := make(http.Header)
46106	for k, v := range c.header_ {
46107		reqHeaders[k] = v
46108	}
46109	reqHeaders.Set("User-Agent", c.s.userAgent())
46110	var body io.Reader = nil
46111	c.urlParams_.Set("alt", alt)
46112	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete")
46113	urls += "?" + c.urlParams_.Encode()
46114	req, _ := http.NewRequest("POST", urls, body)
46115	req.Header = reqHeaders
46116	googleapi.Expand(req.URL, map[string]string{
46117		"project":  c.project,
46118		"zone":     c.zone,
46119		"instance": c.instance,
46120	})
46121	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46122}
46123
46124// Do executes the "compute.instances.setDiskAutoDelete" call.
46125// Exactly one of *Operation or error will be non-nil. Any non-2xx
46126// status code is an error. Response headers are in either
46127// *Operation.ServerResponse.Header or (if a response was returned at
46128// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46129// to check whether the returned error was because
46130// http.StatusNotModified was returned.
46131func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
46132	gensupport.SetOptions(c.urlParams_, opts...)
46133	res, err := c.doRequest("json")
46134	if res != nil && res.StatusCode == http.StatusNotModified {
46135		if res.Body != nil {
46136			res.Body.Close()
46137		}
46138		return nil, &googleapi.Error{
46139			Code:   res.StatusCode,
46140			Header: res.Header,
46141		}
46142	}
46143	if err != nil {
46144		return nil, err
46145	}
46146	defer googleapi.CloseBody(res)
46147	if err := googleapi.CheckResponse(res); err != nil {
46148		return nil, err
46149	}
46150	ret := &Operation{
46151		ServerResponse: googleapi.ServerResponse{
46152			Header:         res.Header,
46153			HTTPStatusCode: res.StatusCode,
46154		},
46155	}
46156	target := &ret
46157	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
46158		return nil, err
46159	}
46160	return ret, nil
46161	// {
46162	//   "description": "Sets the auto-delete flag for a disk attached to an instance.",
46163	//   "httpMethod": "POST",
46164	//   "id": "compute.instances.setDiskAutoDelete",
46165	//   "parameterOrder": [
46166	//     "project",
46167	//     "zone",
46168	//     "instance",
46169	//     "autoDelete",
46170	//     "deviceName"
46171	//   ],
46172	//   "parameters": {
46173	//     "autoDelete": {
46174	//       "description": "Whether to auto-delete the disk when the instance is deleted.",
46175	//       "location": "query",
46176	//       "required": true,
46177	//       "type": "boolean"
46178	//     },
46179	//     "deviceName": {
46180	//       "description": "The device name of the disk to modify.",
46181	//       "location": "query",
46182	//       "pattern": "\\w[\\w.-]{0,254}",
46183	//       "required": true,
46184	//       "type": "string"
46185	//     },
46186	//     "instance": {
46187	//       "description": "The instance name.",
46188	//       "location": "path",
46189	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46190	//       "required": true,
46191	//       "type": "string"
46192	//     },
46193	//     "project": {
46194	//       "description": "Project ID for this request.",
46195	//       "location": "path",
46196	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46197	//       "required": true,
46198	//       "type": "string"
46199	//     },
46200	//     "requestId": {
46201	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
46202	//       "location": "query",
46203	//       "type": "string"
46204	//     },
46205	//     "zone": {
46206	//       "description": "The name of the zone for this request.",
46207	//       "location": "path",
46208	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46209	//       "required": true,
46210	//       "type": "string"
46211	//     }
46212	//   },
46213	//   "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete",
46214	//   "response": {
46215	//     "$ref": "Operation"
46216	//   },
46217	//   "scopes": [
46218	//     "https://www.googleapis.com/auth/cloud-platform",
46219	//     "https://www.googleapis.com/auth/compute"
46220	//   ]
46221	// }
46222
46223}
46224
46225// method id "compute.instances.setLabels":
46226
46227type InstancesSetLabelsCall struct {
46228	s                         *Service
46229	project                   string
46230	zone                      string
46231	instance                  string
46232	instancessetlabelsrequest *InstancesSetLabelsRequest
46233	urlParams_                gensupport.URLParams
46234	ctx_                      context.Context
46235	header_                   http.Header
46236}
46237
46238// SetLabels: Sets labels on an instance. To learn more about labels,
46239// read the Labeling Resources documentation.
46240func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall {
46241	c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46242	c.project = project
46243	c.zone = zone
46244	c.instance = instance
46245	c.instancessetlabelsrequest = instancessetlabelsrequest
46246	return c
46247}
46248
46249// RequestId sets the optional parameter "requestId": An optional
46250// request ID to identify requests. Specify a unique request ID so that
46251// if you must retry your request, the server will know to ignore the
46252// request if it has already been completed.
46253//
46254// For example, consider a situation where you make an initial request
46255// and the request times out. If you make the request again with the
46256// same request ID, the server can check if original operation with the
46257// same request ID was received, and if so, will ignore the second
46258// request. This prevents clients from accidentally creating duplicate
46259// commitments.
46260//
46261// The request ID must be a valid UUID with the exception that zero UUID
46262// is not supported (00000000-0000-0000-0000-000000000000).
46263func (c *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall {
46264	c.urlParams_.Set("requestId", requestId)
46265	return c
46266}
46267
46268// Fields allows partial responses to be retrieved. See
46269// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46270// for more information.
46271func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall {
46272	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46273	return c
46274}
46275
46276// Context sets the context to be used in this call's Do method. Any
46277// pending HTTP request will be aborted if the provided context is
46278// canceled.
46279func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall {
46280	c.ctx_ = ctx
46281	return c
46282}
46283
46284// Header returns an http.Header that can be modified by the caller to
46285// add HTTP headers to the request.
46286func (c *InstancesSetLabelsCall) Header() http.Header {
46287	if c.header_ == nil {
46288		c.header_ = make(http.Header)
46289	}
46290	return c.header_
46291}
46292
46293func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) {
46294	reqHeaders := make(http.Header)
46295	for k, v := range c.header_ {
46296		reqHeaders[k] = v
46297	}
46298	reqHeaders.Set("User-Agent", c.s.userAgent())
46299	var body io.Reader = nil
46300	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetlabelsrequest)
46301	if err != nil {
46302		return nil, err
46303	}
46304	reqHeaders.Set("Content-Type", "application/json")
46305	c.urlParams_.Set("alt", alt)
46306	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setLabels")
46307	urls += "?" + c.urlParams_.Encode()
46308	req, _ := http.NewRequest("POST", urls, body)
46309	req.Header = reqHeaders
46310	googleapi.Expand(req.URL, map[string]string{
46311		"project":  c.project,
46312		"zone":     c.zone,
46313		"instance": c.instance,
46314	})
46315	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46316}
46317
46318// Do executes the "compute.instances.setLabels" call.
46319// Exactly one of *Operation or error will be non-nil. Any non-2xx
46320// status code is an error. Response headers are in either
46321// *Operation.ServerResponse.Header or (if a response was returned at
46322// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46323// to check whether the returned error was because
46324// http.StatusNotModified was returned.
46325func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
46326	gensupport.SetOptions(c.urlParams_, opts...)
46327	res, err := c.doRequest("json")
46328	if res != nil && res.StatusCode == http.StatusNotModified {
46329		if res.Body != nil {
46330			res.Body.Close()
46331		}
46332		return nil, &googleapi.Error{
46333			Code:   res.StatusCode,
46334			Header: res.Header,
46335		}
46336	}
46337	if err != nil {
46338		return nil, err
46339	}
46340	defer googleapi.CloseBody(res)
46341	if err := googleapi.CheckResponse(res); err != nil {
46342		return nil, err
46343	}
46344	ret := &Operation{
46345		ServerResponse: googleapi.ServerResponse{
46346			Header:         res.Header,
46347			HTTPStatusCode: res.StatusCode,
46348		},
46349	}
46350	target := &ret
46351	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
46352		return nil, err
46353	}
46354	return ret, nil
46355	// {
46356	//   "description": "Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.",
46357	//   "httpMethod": "POST",
46358	//   "id": "compute.instances.setLabels",
46359	//   "parameterOrder": [
46360	//     "project",
46361	//     "zone",
46362	//     "instance"
46363	//   ],
46364	//   "parameters": {
46365	//     "instance": {
46366	//       "description": "Name of the instance scoping this request.",
46367	//       "location": "path",
46368	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46369	//       "required": true,
46370	//       "type": "string"
46371	//     },
46372	//     "project": {
46373	//       "description": "Project ID for this request.",
46374	//       "location": "path",
46375	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46376	//       "required": true,
46377	//       "type": "string"
46378	//     },
46379	//     "requestId": {
46380	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
46381	//       "location": "query",
46382	//       "type": "string"
46383	//     },
46384	//     "zone": {
46385	//       "description": "The name of the zone for this request.",
46386	//       "location": "path",
46387	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46388	//       "required": true,
46389	//       "type": "string"
46390	//     }
46391	//   },
46392	//   "path": "{project}/zones/{zone}/instances/{instance}/setLabels",
46393	//   "request": {
46394	//     "$ref": "InstancesSetLabelsRequest"
46395	//   },
46396	//   "response": {
46397	//     "$ref": "Operation"
46398	//   },
46399	//   "scopes": [
46400	//     "https://www.googleapis.com/auth/cloud-platform",
46401	//     "https://www.googleapis.com/auth/compute"
46402	//   ]
46403	// }
46404
46405}
46406
46407// method id "compute.instances.setMachineResources":
46408
46409type InstancesSetMachineResourcesCall struct {
46410	s                                   *Service
46411	project                             string
46412	zone                                string
46413	instance                            string
46414	instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest
46415	urlParams_                          gensupport.URLParams
46416	ctx_                                context.Context
46417	header_                             http.Header
46418}
46419
46420// SetMachineResources: Changes the number and/or type of accelerator
46421// for a stopped instance to the values specified in the request.
46422func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall {
46423	c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46424	c.project = project
46425	c.zone = zone
46426	c.instance = instance
46427	c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest
46428	return c
46429}
46430
46431// RequestId sets the optional parameter "requestId": An optional
46432// request ID to identify requests. Specify a unique request ID so that
46433// if you must retry your request, the server will know to ignore the
46434// request if it has already been completed.
46435//
46436// For example, consider a situation where you make an initial request
46437// and the request times out. If you make the request again with the
46438// same request ID, the server can check if original operation with the
46439// same request ID was received, and if so, will ignore the second
46440// request. This prevents clients from accidentally creating duplicate
46441// commitments.
46442//
46443// The request ID must be a valid UUID with the exception that zero UUID
46444// is not supported (00000000-0000-0000-0000-000000000000).
46445func (c *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall {
46446	c.urlParams_.Set("requestId", requestId)
46447	return c
46448}
46449
46450// Fields allows partial responses to be retrieved. See
46451// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46452// for more information.
46453func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall {
46454	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46455	return c
46456}
46457
46458// Context sets the context to be used in this call's Do method. Any
46459// pending HTTP request will be aborted if the provided context is
46460// canceled.
46461func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall {
46462	c.ctx_ = ctx
46463	return c
46464}
46465
46466// Header returns an http.Header that can be modified by the caller to
46467// add HTTP headers to the request.
46468func (c *InstancesSetMachineResourcesCall) Header() http.Header {
46469	if c.header_ == nil {
46470		c.header_ = make(http.Header)
46471	}
46472	return c.header_
46473}
46474
46475func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) {
46476	reqHeaders := make(http.Header)
46477	for k, v := range c.header_ {
46478		reqHeaders[k] = v
46479	}
46480	reqHeaders.Set("User-Agent", c.s.userAgent())
46481	var body io.Reader = nil
46482	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachineresourcesrequest)
46483	if err != nil {
46484		return nil, err
46485	}
46486	reqHeaders.Set("Content-Type", "application/json")
46487	c.urlParams_.Set("alt", alt)
46488	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineResources")
46489	urls += "?" + c.urlParams_.Encode()
46490	req, _ := http.NewRequest("POST", urls, body)
46491	req.Header = reqHeaders
46492	googleapi.Expand(req.URL, map[string]string{
46493		"project":  c.project,
46494		"zone":     c.zone,
46495		"instance": c.instance,
46496	})
46497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46498}
46499
46500// Do executes the "compute.instances.setMachineResources" call.
46501// Exactly one of *Operation or error will be non-nil. Any non-2xx
46502// status code is an error. Response headers are in either
46503// *Operation.ServerResponse.Header or (if a response was returned at
46504// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46505// to check whether the returned error was because
46506// http.StatusNotModified was returned.
46507func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
46508	gensupport.SetOptions(c.urlParams_, opts...)
46509	res, err := c.doRequest("json")
46510	if res != nil && res.StatusCode == http.StatusNotModified {
46511		if res.Body != nil {
46512			res.Body.Close()
46513		}
46514		return nil, &googleapi.Error{
46515			Code:   res.StatusCode,
46516			Header: res.Header,
46517		}
46518	}
46519	if err != nil {
46520		return nil, err
46521	}
46522	defer googleapi.CloseBody(res)
46523	if err := googleapi.CheckResponse(res); err != nil {
46524		return nil, err
46525	}
46526	ret := &Operation{
46527		ServerResponse: googleapi.ServerResponse{
46528			Header:         res.Header,
46529			HTTPStatusCode: res.StatusCode,
46530		},
46531	}
46532	target := &ret
46533	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
46534		return nil, err
46535	}
46536	return ret, nil
46537	// {
46538	//   "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.",
46539	//   "httpMethod": "POST",
46540	//   "id": "compute.instances.setMachineResources",
46541	//   "parameterOrder": [
46542	//     "project",
46543	//     "zone",
46544	//     "instance"
46545	//   ],
46546	//   "parameters": {
46547	//     "instance": {
46548	//       "description": "Name of the instance scoping this request.",
46549	//       "location": "path",
46550	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46551	//       "required": true,
46552	//       "type": "string"
46553	//     },
46554	//     "project": {
46555	//       "description": "Project ID for this request.",
46556	//       "location": "path",
46557	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46558	//       "required": true,
46559	//       "type": "string"
46560	//     },
46561	//     "requestId": {
46562	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
46563	//       "location": "query",
46564	//       "type": "string"
46565	//     },
46566	//     "zone": {
46567	//       "description": "The name of the zone for this request.",
46568	//       "location": "path",
46569	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46570	//       "required": true,
46571	//       "type": "string"
46572	//     }
46573	//   },
46574	//   "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources",
46575	//   "request": {
46576	//     "$ref": "InstancesSetMachineResourcesRequest"
46577	//   },
46578	//   "response": {
46579	//     "$ref": "Operation"
46580	//   },
46581	//   "scopes": [
46582	//     "https://www.googleapis.com/auth/cloud-platform",
46583	//     "https://www.googleapis.com/auth/compute"
46584	//   ]
46585	// }
46586
46587}
46588
46589// method id "compute.instances.setMachineType":
46590
46591type InstancesSetMachineTypeCall struct {
46592	s                              *Service
46593	project                        string
46594	zone                           string
46595	instance                       string
46596	instancessetmachinetyperequest *InstancesSetMachineTypeRequest
46597	urlParams_                     gensupport.URLParams
46598	ctx_                           context.Context
46599	header_                        http.Header
46600}
46601
46602// SetMachineType: Changes the machine type for a stopped instance to
46603// the machine type specified in the request.
46604func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall {
46605	c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46606	c.project = project
46607	c.zone = zone
46608	c.instance = instance
46609	c.instancessetmachinetyperequest = instancessetmachinetyperequest
46610	return c
46611}
46612
46613// RequestId sets the optional parameter "requestId": An optional
46614// request ID to identify requests. Specify a unique request ID so that
46615// if you must retry your request, the server will know to ignore the
46616// request if it has already been completed.
46617//
46618// For example, consider a situation where you make an initial request
46619// and the request times out. If you make the request again with the
46620// same request ID, the server can check if original operation with the
46621// same request ID was received, and if so, will ignore the second
46622// request. This prevents clients from accidentally creating duplicate
46623// commitments.
46624//
46625// The request ID must be a valid UUID with the exception that zero UUID
46626// is not supported (00000000-0000-0000-0000-000000000000).
46627func (c *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall {
46628	c.urlParams_.Set("requestId", requestId)
46629	return c
46630}
46631
46632// Fields allows partial responses to be retrieved. See
46633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46634// for more information.
46635func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall {
46636	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46637	return c
46638}
46639
46640// Context sets the context to be used in this call's Do method. Any
46641// pending HTTP request will be aborted if the provided context is
46642// canceled.
46643func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall {
46644	c.ctx_ = ctx
46645	return c
46646}
46647
46648// Header returns an http.Header that can be modified by the caller to
46649// add HTTP headers to the request.
46650func (c *InstancesSetMachineTypeCall) Header() http.Header {
46651	if c.header_ == nil {
46652		c.header_ = make(http.Header)
46653	}
46654	return c.header_
46655}
46656
46657func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) {
46658	reqHeaders := make(http.Header)
46659	for k, v := range c.header_ {
46660		reqHeaders[k] = v
46661	}
46662	reqHeaders.Set("User-Agent", c.s.userAgent())
46663	var body io.Reader = nil
46664	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest)
46665	if err != nil {
46666		return nil, err
46667	}
46668	reqHeaders.Set("Content-Type", "application/json")
46669	c.urlParams_.Set("alt", alt)
46670	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineType")
46671	urls += "?" + c.urlParams_.Encode()
46672	req, _ := http.NewRequest("POST", urls, body)
46673	req.Header = reqHeaders
46674	googleapi.Expand(req.URL, map[string]string{
46675		"project":  c.project,
46676		"zone":     c.zone,
46677		"instance": c.instance,
46678	})
46679	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46680}
46681
46682// Do executes the "compute.instances.setMachineType" call.
46683// Exactly one of *Operation or error will be non-nil. Any non-2xx
46684// status code is an error. Response headers are in either
46685// *Operation.ServerResponse.Header or (if a response was returned at
46686// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46687// to check whether the returned error was because
46688// http.StatusNotModified was returned.
46689func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
46690	gensupport.SetOptions(c.urlParams_, opts...)
46691	res, err := c.doRequest("json")
46692	if res != nil && res.StatusCode == http.StatusNotModified {
46693		if res.Body != nil {
46694			res.Body.Close()
46695		}
46696		return nil, &googleapi.Error{
46697			Code:   res.StatusCode,
46698			Header: res.Header,
46699		}
46700	}
46701	if err != nil {
46702		return nil, err
46703	}
46704	defer googleapi.CloseBody(res)
46705	if err := googleapi.CheckResponse(res); err != nil {
46706		return nil, err
46707	}
46708	ret := &Operation{
46709		ServerResponse: googleapi.ServerResponse{
46710			Header:         res.Header,
46711			HTTPStatusCode: res.StatusCode,
46712		},
46713	}
46714	target := &ret
46715	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
46716		return nil, err
46717	}
46718	return ret, nil
46719	// {
46720	//   "description": "Changes the machine type for a stopped instance to the machine type specified in the request.",
46721	//   "httpMethod": "POST",
46722	//   "id": "compute.instances.setMachineType",
46723	//   "parameterOrder": [
46724	//     "project",
46725	//     "zone",
46726	//     "instance"
46727	//   ],
46728	//   "parameters": {
46729	//     "instance": {
46730	//       "description": "Name of the instance scoping this request.",
46731	//       "location": "path",
46732	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46733	//       "required": true,
46734	//       "type": "string"
46735	//     },
46736	//     "project": {
46737	//       "description": "Project ID for this request.",
46738	//       "location": "path",
46739	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46740	//       "required": true,
46741	//       "type": "string"
46742	//     },
46743	//     "requestId": {
46744	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
46745	//       "location": "query",
46746	//       "type": "string"
46747	//     },
46748	//     "zone": {
46749	//       "description": "The name of the zone for this request.",
46750	//       "location": "path",
46751	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46752	//       "required": true,
46753	//       "type": "string"
46754	//     }
46755	//   },
46756	//   "path": "{project}/zones/{zone}/instances/{instance}/setMachineType",
46757	//   "request": {
46758	//     "$ref": "InstancesSetMachineTypeRequest"
46759	//   },
46760	//   "response": {
46761	//     "$ref": "Operation"
46762	//   },
46763	//   "scopes": [
46764	//     "https://www.googleapis.com/auth/cloud-platform",
46765	//     "https://www.googleapis.com/auth/compute"
46766	//   ]
46767	// }
46768
46769}
46770
46771// method id "compute.instances.setMetadata":
46772
46773type InstancesSetMetadataCall struct {
46774	s          *Service
46775	project    string
46776	zone       string
46777	instance   string
46778	metadata   *Metadata
46779	urlParams_ gensupport.URLParams
46780	ctx_       context.Context
46781	header_    http.Header
46782}
46783
46784// SetMetadata: Sets metadata for the specified instance to the data
46785// included in the request.
46786// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setMetadata
46787func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall {
46788	c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46789	c.project = project
46790	c.zone = zone
46791	c.instance = instance
46792	c.metadata = metadata
46793	return c
46794}
46795
46796// RequestId sets the optional parameter "requestId": An optional
46797// request ID to identify requests. Specify a unique request ID so that
46798// if you must retry your request, the server will know to ignore the
46799// request if it has already been completed.
46800//
46801// For example, consider a situation where you make an initial request
46802// and the request times out. If you make the request again with the
46803// same request ID, the server can check if original operation with the
46804// same request ID was received, and if so, will ignore the second
46805// request. This prevents clients from accidentally creating duplicate
46806// commitments.
46807//
46808// The request ID must be a valid UUID with the exception that zero UUID
46809// is not supported (00000000-0000-0000-0000-000000000000).
46810func (c *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall {
46811	c.urlParams_.Set("requestId", requestId)
46812	return c
46813}
46814
46815// Fields allows partial responses to be retrieved. See
46816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46817// for more information.
46818func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall {
46819	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46820	return c
46821}
46822
46823// Context sets the context to be used in this call's Do method. Any
46824// pending HTTP request will be aborted if the provided context is
46825// canceled.
46826func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall {
46827	c.ctx_ = ctx
46828	return c
46829}
46830
46831// Header returns an http.Header that can be modified by the caller to
46832// add HTTP headers to the request.
46833func (c *InstancesSetMetadataCall) Header() http.Header {
46834	if c.header_ == nil {
46835		c.header_ = make(http.Header)
46836	}
46837	return c.header_
46838}
46839
46840func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) {
46841	reqHeaders := make(http.Header)
46842	for k, v := range c.header_ {
46843		reqHeaders[k] = v
46844	}
46845	reqHeaders.Set("User-Agent", c.s.userAgent())
46846	var body io.Reader = nil
46847	body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
46848	if err != nil {
46849		return nil, err
46850	}
46851	reqHeaders.Set("Content-Type", "application/json")
46852	c.urlParams_.Set("alt", alt)
46853	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata")
46854	urls += "?" + c.urlParams_.Encode()
46855	req, _ := http.NewRequest("POST", urls, body)
46856	req.Header = reqHeaders
46857	googleapi.Expand(req.URL, map[string]string{
46858		"project":  c.project,
46859		"zone":     c.zone,
46860		"instance": c.instance,
46861	})
46862	return gensupport.SendRequest(c.ctx_, c.s.client, req)
46863}
46864
46865// Do executes the "compute.instances.setMetadata" call.
46866// Exactly one of *Operation or error will be non-nil. Any non-2xx
46867// status code is an error. Response headers are in either
46868// *Operation.ServerResponse.Header or (if a response was returned at
46869// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46870// to check whether the returned error was because
46871// http.StatusNotModified was returned.
46872func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
46873	gensupport.SetOptions(c.urlParams_, opts...)
46874	res, err := c.doRequest("json")
46875	if res != nil && res.StatusCode == http.StatusNotModified {
46876		if res.Body != nil {
46877			res.Body.Close()
46878		}
46879		return nil, &googleapi.Error{
46880			Code:   res.StatusCode,
46881			Header: res.Header,
46882		}
46883	}
46884	if err != nil {
46885		return nil, err
46886	}
46887	defer googleapi.CloseBody(res)
46888	if err := googleapi.CheckResponse(res); err != nil {
46889		return nil, err
46890	}
46891	ret := &Operation{
46892		ServerResponse: googleapi.ServerResponse{
46893			Header:         res.Header,
46894			HTTPStatusCode: res.StatusCode,
46895		},
46896	}
46897	target := &ret
46898	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
46899		return nil, err
46900	}
46901	return ret, nil
46902	// {
46903	//   "description": "Sets metadata for the specified instance to the data included in the request.",
46904	//   "httpMethod": "POST",
46905	//   "id": "compute.instances.setMetadata",
46906	//   "parameterOrder": [
46907	//     "project",
46908	//     "zone",
46909	//     "instance"
46910	//   ],
46911	//   "parameters": {
46912	//     "instance": {
46913	//       "description": "Name of the instance scoping this request.",
46914	//       "location": "path",
46915	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46916	//       "required": true,
46917	//       "type": "string"
46918	//     },
46919	//     "project": {
46920	//       "description": "Project ID for this request.",
46921	//       "location": "path",
46922	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46923	//       "required": true,
46924	//       "type": "string"
46925	//     },
46926	//     "requestId": {
46927	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
46928	//       "location": "query",
46929	//       "type": "string"
46930	//     },
46931	//     "zone": {
46932	//       "description": "The name of the zone for this request.",
46933	//       "location": "path",
46934	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46935	//       "required": true,
46936	//       "type": "string"
46937	//     }
46938	//   },
46939	//   "path": "{project}/zones/{zone}/instances/{instance}/setMetadata",
46940	//   "request": {
46941	//     "$ref": "Metadata"
46942	//   },
46943	//   "response": {
46944	//     "$ref": "Operation"
46945	//   },
46946	//   "scopes": [
46947	//     "https://www.googleapis.com/auth/cloud-platform",
46948	//     "https://www.googleapis.com/auth/compute"
46949	//   ]
46950	// }
46951
46952}
46953
46954// method id "compute.instances.setMinCpuPlatform":
46955
46956type InstancesSetMinCpuPlatformCall struct {
46957	s                                 *Service
46958	project                           string
46959	zone                              string
46960	instance                          string
46961	instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest
46962	urlParams_                        gensupport.URLParams
46963	ctx_                              context.Context
46964	header_                           http.Header
46965}
46966
46967// SetMinCpuPlatform: Changes the minimum CPU platform that this
46968// instance should use. This method can only be called on a stopped
46969// instance. For more information, read Specifying a Minimum CPU
46970// Platform.
46971func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall {
46972	c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46973	c.project = project
46974	c.zone = zone
46975	c.instance = instance
46976	c.instancessetmincpuplatformrequest = instancessetmincpuplatformrequest
46977	return c
46978}
46979
46980// RequestId sets the optional parameter "requestId": An optional
46981// request ID to identify requests. Specify a unique request ID so that
46982// if you must retry your request, the server will know to ignore the
46983// request if it has already been completed.
46984//
46985// For example, consider a situation where you make an initial request
46986// and the request times out. If you make the request again with the
46987// same request ID, the server can check if original operation with the
46988// same request ID was received, and if so, will ignore the second
46989// request. This prevents clients from accidentally creating duplicate
46990// commitments.
46991//
46992// The request ID must be a valid UUID with the exception that zero UUID
46993// is not supported (00000000-0000-0000-0000-000000000000).
46994func (c *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesSetMinCpuPlatformCall {
46995	c.urlParams_.Set("requestId", requestId)
46996	return c
46997}
46998
46999// Fields allows partial responses to be retrieved. See
47000// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47001// for more information.
47002func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *InstancesSetMinCpuPlatformCall {
47003	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47004	return c
47005}
47006
47007// Context sets the context to be used in this call's Do method. Any
47008// pending HTTP request will be aborted if the provided context is
47009// canceled.
47010func (c *InstancesSetMinCpuPlatformCall) Context(ctx context.Context) *InstancesSetMinCpuPlatformCall {
47011	c.ctx_ = ctx
47012	return c
47013}
47014
47015// Header returns an http.Header that can be modified by the caller to
47016// add HTTP headers to the request.
47017func (c *InstancesSetMinCpuPlatformCall) Header() http.Header {
47018	if c.header_ == nil {
47019		c.header_ = make(http.Header)
47020	}
47021	return c.header_
47022}
47023
47024func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) {
47025	reqHeaders := make(http.Header)
47026	for k, v := range c.header_ {
47027		reqHeaders[k] = v
47028	}
47029	reqHeaders.Set("User-Agent", c.s.userAgent())
47030	var body io.Reader = nil
47031	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmincpuplatformrequest)
47032	if err != nil {
47033		return nil, err
47034	}
47035	reqHeaders.Set("Content-Type", "application/json")
47036	c.urlParams_.Set("alt", alt)
47037	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform")
47038	urls += "?" + c.urlParams_.Encode()
47039	req, _ := http.NewRequest("POST", urls, body)
47040	req.Header = reqHeaders
47041	googleapi.Expand(req.URL, map[string]string{
47042		"project":  c.project,
47043		"zone":     c.zone,
47044		"instance": c.instance,
47045	})
47046	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47047}
47048
47049// Do executes the "compute.instances.setMinCpuPlatform" call.
47050// Exactly one of *Operation or error will be non-nil. Any non-2xx
47051// status code is an error. Response headers are in either
47052// *Operation.ServerResponse.Header or (if a response was returned at
47053// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47054// to check whether the returned error was because
47055// http.StatusNotModified was returned.
47056func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
47057	gensupport.SetOptions(c.urlParams_, opts...)
47058	res, err := c.doRequest("json")
47059	if res != nil && res.StatusCode == http.StatusNotModified {
47060		if res.Body != nil {
47061			res.Body.Close()
47062		}
47063		return nil, &googleapi.Error{
47064			Code:   res.StatusCode,
47065			Header: res.Header,
47066		}
47067	}
47068	if err != nil {
47069		return nil, err
47070	}
47071	defer googleapi.CloseBody(res)
47072	if err := googleapi.CheckResponse(res); err != nil {
47073		return nil, err
47074	}
47075	ret := &Operation{
47076		ServerResponse: googleapi.ServerResponse{
47077			Header:         res.Header,
47078			HTTPStatusCode: res.StatusCode,
47079		},
47080	}
47081	target := &ret
47082	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
47083		return nil, err
47084	}
47085	return ret, nil
47086	// {
47087	//   "description": "Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.",
47088	//   "httpMethod": "POST",
47089	//   "id": "compute.instances.setMinCpuPlatform",
47090	//   "parameterOrder": [
47091	//     "project",
47092	//     "zone",
47093	//     "instance"
47094	//   ],
47095	//   "parameters": {
47096	//     "instance": {
47097	//       "description": "Name of the instance scoping this request.",
47098	//       "location": "path",
47099	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47100	//       "required": true,
47101	//       "type": "string"
47102	//     },
47103	//     "project": {
47104	//       "description": "Project ID for this request.",
47105	//       "location": "path",
47106	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47107	//       "required": true,
47108	//       "type": "string"
47109	//     },
47110	//     "requestId": {
47111	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
47112	//       "location": "query",
47113	//       "type": "string"
47114	//     },
47115	//     "zone": {
47116	//       "description": "The name of the zone for this request.",
47117	//       "location": "path",
47118	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47119	//       "required": true,
47120	//       "type": "string"
47121	//     }
47122	//   },
47123	//   "path": "{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform",
47124	//   "request": {
47125	//     "$ref": "InstancesSetMinCpuPlatformRequest"
47126	//   },
47127	//   "response": {
47128	//     "$ref": "Operation"
47129	//   },
47130	//   "scopes": [
47131	//     "https://www.googleapis.com/auth/cloud-platform",
47132	//     "https://www.googleapis.com/auth/compute"
47133	//   ]
47134	// }
47135
47136}
47137
47138// method id "compute.instances.setScheduling":
47139
47140type InstancesSetSchedulingCall struct {
47141	s          *Service
47142	project    string
47143	zone       string
47144	instance   string
47145	scheduling *Scheduling
47146	urlParams_ gensupport.URLParams
47147	ctx_       context.Context
47148	header_    http.Header
47149}
47150
47151// SetScheduling: Sets an instance's scheduling options.
47152// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setScheduling
47153func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall {
47154	c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47155	c.project = project
47156	c.zone = zone
47157	c.instance = instance
47158	c.scheduling = scheduling
47159	return c
47160}
47161
47162// RequestId sets the optional parameter "requestId": An optional
47163// request ID to identify requests. Specify a unique request ID so that
47164// if you must retry your request, the server will know to ignore the
47165// request if it has already been completed.
47166//
47167// For example, consider a situation where you make an initial request
47168// and the request times out. If you make the request again with the
47169// same request ID, the server can check if original operation with the
47170// same request ID was received, and if so, will ignore the second
47171// request. This prevents clients from accidentally creating duplicate
47172// commitments.
47173//
47174// The request ID must be a valid UUID with the exception that zero UUID
47175// is not supported (00000000-0000-0000-0000-000000000000).
47176func (c *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall {
47177	c.urlParams_.Set("requestId", requestId)
47178	return c
47179}
47180
47181// Fields allows partial responses to be retrieved. See
47182// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47183// for more information.
47184func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall {
47185	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47186	return c
47187}
47188
47189// Context sets the context to be used in this call's Do method. Any
47190// pending HTTP request will be aborted if the provided context is
47191// canceled.
47192func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall {
47193	c.ctx_ = ctx
47194	return c
47195}
47196
47197// Header returns an http.Header that can be modified by the caller to
47198// add HTTP headers to the request.
47199func (c *InstancesSetSchedulingCall) Header() http.Header {
47200	if c.header_ == nil {
47201		c.header_ = make(http.Header)
47202	}
47203	return c.header_
47204}
47205
47206func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) {
47207	reqHeaders := make(http.Header)
47208	for k, v := range c.header_ {
47209		reqHeaders[k] = v
47210	}
47211	reqHeaders.Set("User-Agent", c.s.userAgent())
47212	var body io.Reader = nil
47213	body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling)
47214	if err != nil {
47215		return nil, err
47216	}
47217	reqHeaders.Set("Content-Type", "application/json")
47218	c.urlParams_.Set("alt", alt)
47219	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setScheduling")
47220	urls += "?" + c.urlParams_.Encode()
47221	req, _ := http.NewRequest("POST", urls, body)
47222	req.Header = reqHeaders
47223	googleapi.Expand(req.URL, map[string]string{
47224		"project":  c.project,
47225		"zone":     c.zone,
47226		"instance": c.instance,
47227	})
47228	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47229}
47230
47231// Do executes the "compute.instances.setScheduling" call.
47232// Exactly one of *Operation or error will be non-nil. Any non-2xx
47233// status code is an error. Response headers are in either
47234// *Operation.ServerResponse.Header or (if a response was returned at
47235// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47236// to check whether the returned error was because
47237// http.StatusNotModified was returned.
47238func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
47239	gensupport.SetOptions(c.urlParams_, opts...)
47240	res, err := c.doRequest("json")
47241	if res != nil && res.StatusCode == http.StatusNotModified {
47242		if res.Body != nil {
47243			res.Body.Close()
47244		}
47245		return nil, &googleapi.Error{
47246			Code:   res.StatusCode,
47247			Header: res.Header,
47248		}
47249	}
47250	if err != nil {
47251		return nil, err
47252	}
47253	defer googleapi.CloseBody(res)
47254	if err := googleapi.CheckResponse(res); err != nil {
47255		return nil, err
47256	}
47257	ret := &Operation{
47258		ServerResponse: googleapi.ServerResponse{
47259			Header:         res.Header,
47260			HTTPStatusCode: res.StatusCode,
47261		},
47262	}
47263	target := &ret
47264	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
47265		return nil, err
47266	}
47267	return ret, nil
47268	// {
47269	//   "description": "Sets an instance's scheduling options.",
47270	//   "httpMethod": "POST",
47271	//   "id": "compute.instances.setScheduling",
47272	//   "parameterOrder": [
47273	//     "project",
47274	//     "zone",
47275	//     "instance"
47276	//   ],
47277	//   "parameters": {
47278	//     "instance": {
47279	//       "description": "Instance name.",
47280	//       "location": "path",
47281	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47282	//       "required": true,
47283	//       "type": "string"
47284	//     },
47285	//     "project": {
47286	//       "description": "Project ID for this request.",
47287	//       "location": "path",
47288	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47289	//       "required": true,
47290	//       "type": "string"
47291	//     },
47292	//     "requestId": {
47293	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
47294	//       "location": "query",
47295	//       "type": "string"
47296	//     },
47297	//     "zone": {
47298	//       "description": "The name of the zone for this request.",
47299	//       "location": "path",
47300	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47301	//       "required": true,
47302	//       "type": "string"
47303	//     }
47304	//   },
47305	//   "path": "{project}/zones/{zone}/instances/{instance}/setScheduling",
47306	//   "request": {
47307	//     "$ref": "Scheduling"
47308	//   },
47309	//   "response": {
47310	//     "$ref": "Operation"
47311	//   },
47312	//   "scopes": [
47313	//     "https://www.googleapis.com/auth/cloud-platform",
47314	//     "https://www.googleapis.com/auth/compute"
47315	//   ]
47316	// }
47317
47318}
47319
47320// method id "compute.instances.setServiceAccount":
47321
47322type InstancesSetServiceAccountCall struct {
47323	s                                 *Service
47324	project                           string
47325	zone                              string
47326	instance                          string
47327	instancessetserviceaccountrequest *InstancesSetServiceAccountRequest
47328	urlParams_                        gensupport.URLParams
47329	ctx_                              context.Context
47330	header_                           http.Header
47331}
47332
47333// SetServiceAccount: Sets the service account on the instance. For more
47334// information, read Changing the service account and access scopes for
47335// an instance.
47336func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall {
47337	c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47338	c.project = project
47339	c.zone = zone
47340	c.instance = instance
47341	c.instancessetserviceaccountrequest = instancessetserviceaccountrequest
47342	return c
47343}
47344
47345// RequestId sets the optional parameter "requestId": An optional
47346// request ID to identify requests. Specify a unique request ID so that
47347// if you must retry your request, the server will know to ignore the
47348// request if it has already been completed.
47349//
47350// For example, consider a situation where you make an initial request
47351// and the request times out. If you make the request again with the
47352// same request ID, the server can check if original operation with the
47353// same request ID was received, and if so, will ignore the second
47354// request. This prevents clients from accidentally creating duplicate
47355// commitments.
47356//
47357// The request ID must be a valid UUID with the exception that zero UUID
47358// is not supported (00000000-0000-0000-0000-000000000000).
47359func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall {
47360	c.urlParams_.Set("requestId", requestId)
47361	return c
47362}
47363
47364// Fields allows partial responses to be retrieved. See
47365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47366// for more information.
47367func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall {
47368	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47369	return c
47370}
47371
47372// Context sets the context to be used in this call's Do method. Any
47373// pending HTTP request will be aborted if the provided context is
47374// canceled.
47375func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall {
47376	c.ctx_ = ctx
47377	return c
47378}
47379
47380// Header returns an http.Header that can be modified by the caller to
47381// add HTTP headers to the request.
47382func (c *InstancesSetServiceAccountCall) Header() http.Header {
47383	if c.header_ == nil {
47384		c.header_ = make(http.Header)
47385	}
47386	return c.header_
47387}
47388
47389func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) {
47390	reqHeaders := make(http.Header)
47391	for k, v := range c.header_ {
47392		reqHeaders[k] = v
47393	}
47394	reqHeaders.Set("User-Agent", c.s.userAgent())
47395	var body io.Reader = nil
47396	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest)
47397	if err != nil {
47398		return nil, err
47399	}
47400	reqHeaders.Set("Content-Type", "application/json")
47401	c.urlParams_.Set("alt", alt)
47402	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setServiceAccount")
47403	urls += "?" + c.urlParams_.Encode()
47404	req, _ := http.NewRequest("POST", urls, body)
47405	req.Header = reqHeaders
47406	googleapi.Expand(req.URL, map[string]string{
47407		"project":  c.project,
47408		"zone":     c.zone,
47409		"instance": c.instance,
47410	})
47411	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47412}
47413
47414// Do executes the "compute.instances.setServiceAccount" call.
47415// Exactly one of *Operation or error will be non-nil. Any non-2xx
47416// status code is an error. Response headers are in either
47417// *Operation.ServerResponse.Header or (if a response was returned at
47418// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47419// to check whether the returned error was because
47420// http.StatusNotModified was returned.
47421func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
47422	gensupport.SetOptions(c.urlParams_, opts...)
47423	res, err := c.doRequest("json")
47424	if res != nil && res.StatusCode == http.StatusNotModified {
47425		if res.Body != nil {
47426			res.Body.Close()
47427		}
47428		return nil, &googleapi.Error{
47429			Code:   res.StatusCode,
47430			Header: res.Header,
47431		}
47432	}
47433	if err != nil {
47434		return nil, err
47435	}
47436	defer googleapi.CloseBody(res)
47437	if err := googleapi.CheckResponse(res); err != nil {
47438		return nil, err
47439	}
47440	ret := &Operation{
47441		ServerResponse: googleapi.ServerResponse{
47442			Header:         res.Header,
47443			HTTPStatusCode: res.StatusCode,
47444		},
47445	}
47446	target := &ret
47447	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
47448		return nil, err
47449	}
47450	return ret, nil
47451	// {
47452	//   "description": "Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.",
47453	//   "httpMethod": "POST",
47454	//   "id": "compute.instances.setServiceAccount",
47455	//   "parameterOrder": [
47456	//     "project",
47457	//     "zone",
47458	//     "instance"
47459	//   ],
47460	//   "parameters": {
47461	//     "instance": {
47462	//       "description": "Name of the instance resource to start.",
47463	//       "location": "path",
47464	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47465	//       "required": true,
47466	//       "type": "string"
47467	//     },
47468	//     "project": {
47469	//       "description": "Project ID for this request.",
47470	//       "location": "path",
47471	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47472	//       "required": true,
47473	//       "type": "string"
47474	//     },
47475	//     "requestId": {
47476	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
47477	//       "location": "query",
47478	//       "type": "string"
47479	//     },
47480	//     "zone": {
47481	//       "description": "The name of the zone for this request.",
47482	//       "location": "path",
47483	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47484	//       "required": true,
47485	//       "type": "string"
47486	//     }
47487	//   },
47488	//   "path": "{project}/zones/{zone}/instances/{instance}/setServiceAccount",
47489	//   "request": {
47490	//     "$ref": "InstancesSetServiceAccountRequest"
47491	//   },
47492	//   "response": {
47493	//     "$ref": "Operation"
47494	//   },
47495	//   "scopes": [
47496	//     "https://www.googleapis.com/auth/cloud-platform",
47497	//     "https://www.googleapis.com/auth/compute"
47498	//   ]
47499	// }
47500
47501}
47502
47503// method id "compute.instances.setTags":
47504
47505type InstancesSetTagsCall struct {
47506	s          *Service
47507	project    string
47508	zone       string
47509	instance   string
47510	tags       *Tags
47511	urlParams_ gensupport.URLParams
47512	ctx_       context.Context
47513	header_    http.Header
47514}
47515
47516// SetTags: Sets tags for the specified instance to the data included in
47517// the request.
47518// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setTags
47519func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall {
47520	c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47521	c.project = project
47522	c.zone = zone
47523	c.instance = instance
47524	c.tags = tags
47525	return c
47526}
47527
47528// RequestId sets the optional parameter "requestId": An optional
47529// request ID to identify requests. Specify a unique request ID so that
47530// if you must retry your request, the server will know to ignore the
47531// request if it has already been completed.
47532//
47533// For example, consider a situation where you make an initial request
47534// and the request times out. If you make the request again with the
47535// same request ID, the server can check if original operation with the
47536// same request ID was received, and if so, will ignore the second
47537// request. This prevents clients from accidentally creating duplicate
47538// commitments.
47539//
47540// The request ID must be a valid UUID with the exception that zero UUID
47541// is not supported (00000000-0000-0000-0000-000000000000).
47542func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall {
47543	c.urlParams_.Set("requestId", requestId)
47544	return c
47545}
47546
47547// Fields allows partial responses to be retrieved. See
47548// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47549// for more information.
47550func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall {
47551	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47552	return c
47553}
47554
47555// Context sets the context to be used in this call's Do method. Any
47556// pending HTTP request will be aborted if the provided context is
47557// canceled.
47558func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall {
47559	c.ctx_ = ctx
47560	return c
47561}
47562
47563// Header returns an http.Header that can be modified by the caller to
47564// add HTTP headers to the request.
47565func (c *InstancesSetTagsCall) Header() http.Header {
47566	if c.header_ == nil {
47567		c.header_ = make(http.Header)
47568	}
47569	return c.header_
47570}
47571
47572func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) {
47573	reqHeaders := make(http.Header)
47574	for k, v := range c.header_ {
47575		reqHeaders[k] = v
47576	}
47577	reqHeaders.Set("User-Agent", c.s.userAgent())
47578	var body io.Reader = nil
47579	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags)
47580	if err != nil {
47581		return nil, err
47582	}
47583	reqHeaders.Set("Content-Type", "application/json")
47584	c.urlParams_.Set("alt", alt)
47585	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags")
47586	urls += "?" + c.urlParams_.Encode()
47587	req, _ := http.NewRequest("POST", urls, body)
47588	req.Header = reqHeaders
47589	googleapi.Expand(req.URL, map[string]string{
47590		"project":  c.project,
47591		"zone":     c.zone,
47592		"instance": c.instance,
47593	})
47594	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47595}
47596
47597// Do executes the "compute.instances.setTags" call.
47598// Exactly one of *Operation or error will be non-nil. Any non-2xx
47599// status code is an error. Response headers are in either
47600// *Operation.ServerResponse.Header or (if a response was returned at
47601// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47602// to check whether the returned error was because
47603// http.StatusNotModified was returned.
47604func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
47605	gensupport.SetOptions(c.urlParams_, opts...)
47606	res, err := c.doRequest("json")
47607	if res != nil && res.StatusCode == http.StatusNotModified {
47608		if res.Body != nil {
47609			res.Body.Close()
47610		}
47611		return nil, &googleapi.Error{
47612			Code:   res.StatusCode,
47613			Header: res.Header,
47614		}
47615	}
47616	if err != nil {
47617		return nil, err
47618	}
47619	defer googleapi.CloseBody(res)
47620	if err := googleapi.CheckResponse(res); err != nil {
47621		return nil, err
47622	}
47623	ret := &Operation{
47624		ServerResponse: googleapi.ServerResponse{
47625			Header:         res.Header,
47626			HTTPStatusCode: res.StatusCode,
47627		},
47628	}
47629	target := &ret
47630	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
47631		return nil, err
47632	}
47633	return ret, nil
47634	// {
47635	//   "description": "Sets tags for the specified instance to the data included in the request.",
47636	//   "httpMethod": "POST",
47637	//   "id": "compute.instances.setTags",
47638	//   "parameterOrder": [
47639	//     "project",
47640	//     "zone",
47641	//     "instance"
47642	//   ],
47643	//   "parameters": {
47644	//     "instance": {
47645	//       "description": "Name of the instance scoping this request.",
47646	//       "location": "path",
47647	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47648	//       "required": true,
47649	//       "type": "string"
47650	//     },
47651	//     "project": {
47652	//       "description": "Project ID for this request.",
47653	//       "location": "path",
47654	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47655	//       "required": true,
47656	//       "type": "string"
47657	//     },
47658	//     "requestId": {
47659	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
47660	//       "location": "query",
47661	//       "type": "string"
47662	//     },
47663	//     "zone": {
47664	//       "description": "The name of the zone for this request.",
47665	//       "location": "path",
47666	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47667	//       "required": true,
47668	//       "type": "string"
47669	//     }
47670	//   },
47671	//   "path": "{project}/zones/{zone}/instances/{instance}/setTags",
47672	//   "request": {
47673	//     "$ref": "Tags"
47674	//   },
47675	//   "response": {
47676	//     "$ref": "Operation"
47677	//   },
47678	//   "scopes": [
47679	//     "https://www.googleapis.com/auth/cloud-platform",
47680	//     "https://www.googleapis.com/auth/compute"
47681	//   ]
47682	// }
47683
47684}
47685
47686// method id "compute.instances.start":
47687
47688type InstancesStartCall struct {
47689	s          *Service
47690	project    string
47691	zone       string
47692	instance   string
47693	urlParams_ gensupport.URLParams
47694	ctx_       context.Context
47695	header_    http.Header
47696}
47697
47698// Start: Starts an instance that was stopped using the using the
47699// instances().stop method. For more information, see Restart an
47700// instance.
47701// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start
47702func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall {
47703	c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47704	c.project = project
47705	c.zone = zone
47706	c.instance = instance
47707	return c
47708}
47709
47710// RequestId sets the optional parameter "requestId": An optional
47711// request ID to identify requests. Specify a unique request ID so that
47712// if you must retry your request, the server will know to ignore the
47713// request if it has already been completed.
47714//
47715// For example, consider a situation where you make an initial request
47716// and the request times out. If you make the request again with the
47717// same request ID, the server can check if original operation with the
47718// same request ID was received, and if so, will ignore the second
47719// request. This prevents clients from accidentally creating duplicate
47720// commitments.
47721//
47722// The request ID must be a valid UUID with the exception that zero UUID
47723// is not supported (00000000-0000-0000-0000-000000000000).
47724func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall {
47725	c.urlParams_.Set("requestId", requestId)
47726	return c
47727}
47728
47729// Fields allows partial responses to be retrieved. See
47730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47731// for more information.
47732func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall {
47733	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47734	return c
47735}
47736
47737// Context sets the context to be used in this call's Do method. Any
47738// pending HTTP request will be aborted if the provided context is
47739// canceled.
47740func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall {
47741	c.ctx_ = ctx
47742	return c
47743}
47744
47745// Header returns an http.Header that can be modified by the caller to
47746// add HTTP headers to the request.
47747func (c *InstancesStartCall) Header() http.Header {
47748	if c.header_ == nil {
47749		c.header_ = make(http.Header)
47750	}
47751	return c.header_
47752}
47753
47754func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) {
47755	reqHeaders := make(http.Header)
47756	for k, v := range c.header_ {
47757		reqHeaders[k] = v
47758	}
47759	reqHeaders.Set("User-Agent", c.s.userAgent())
47760	var body io.Reader = nil
47761	c.urlParams_.Set("alt", alt)
47762	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/start")
47763	urls += "?" + c.urlParams_.Encode()
47764	req, _ := http.NewRequest("POST", urls, body)
47765	req.Header = reqHeaders
47766	googleapi.Expand(req.URL, map[string]string{
47767		"project":  c.project,
47768		"zone":     c.zone,
47769		"instance": c.instance,
47770	})
47771	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47772}
47773
47774// Do executes the "compute.instances.start" call.
47775// Exactly one of *Operation or error will be non-nil. Any non-2xx
47776// status code is an error. Response headers are in either
47777// *Operation.ServerResponse.Header or (if a response was returned at
47778// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47779// to check whether the returned error was because
47780// http.StatusNotModified was returned.
47781func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
47782	gensupport.SetOptions(c.urlParams_, opts...)
47783	res, err := c.doRequest("json")
47784	if res != nil && res.StatusCode == http.StatusNotModified {
47785		if res.Body != nil {
47786			res.Body.Close()
47787		}
47788		return nil, &googleapi.Error{
47789			Code:   res.StatusCode,
47790			Header: res.Header,
47791		}
47792	}
47793	if err != nil {
47794		return nil, err
47795	}
47796	defer googleapi.CloseBody(res)
47797	if err := googleapi.CheckResponse(res); err != nil {
47798		return nil, err
47799	}
47800	ret := &Operation{
47801		ServerResponse: googleapi.ServerResponse{
47802			Header:         res.Header,
47803			HTTPStatusCode: res.StatusCode,
47804		},
47805	}
47806	target := &ret
47807	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
47808		return nil, err
47809	}
47810	return ret, nil
47811	// {
47812	//   "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.",
47813	//   "httpMethod": "POST",
47814	//   "id": "compute.instances.start",
47815	//   "parameterOrder": [
47816	//     "project",
47817	//     "zone",
47818	//     "instance"
47819	//   ],
47820	//   "parameters": {
47821	//     "instance": {
47822	//       "description": "Name of the instance resource to start.",
47823	//       "location": "path",
47824	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47825	//       "required": true,
47826	//       "type": "string"
47827	//     },
47828	//     "project": {
47829	//       "description": "Project ID for this request.",
47830	//       "location": "path",
47831	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47832	//       "required": true,
47833	//       "type": "string"
47834	//     },
47835	//     "requestId": {
47836	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
47837	//       "location": "query",
47838	//       "type": "string"
47839	//     },
47840	//     "zone": {
47841	//       "description": "The name of the zone for this request.",
47842	//       "location": "path",
47843	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47844	//       "required": true,
47845	//       "type": "string"
47846	//     }
47847	//   },
47848	//   "path": "{project}/zones/{zone}/instances/{instance}/start",
47849	//   "response": {
47850	//     "$ref": "Operation"
47851	//   },
47852	//   "scopes": [
47853	//     "https://www.googleapis.com/auth/cloud-platform",
47854	//     "https://www.googleapis.com/auth/compute"
47855	//   ]
47856	// }
47857
47858}
47859
47860// method id "compute.instances.startWithEncryptionKey":
47861
47862type InstancesStartWithEncryptionKeyCall struct {
47863	s                                      *Service
47864	project                                string
47865	zone                                   string
47866	instance                               string
47867	instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest
47868	urlParams_                             gensupport.URLParams
47869	ctx_                                   context.Context
47870	header_                                http.Header
47871}
47872
47873// StartWithEncryptionKey: Starts an instance that was stopped using the
47874// using the instances().stop method. For more information, see Restart
47875// an instance.
47876func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall {
47877	c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47878	c.project = project
47879	c.zone = zone
47880	c.instance = instance
47881	c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest
47882	return c
47883}
47884
47885// RequestId sets the optional parameter "requestId": An optional
47886// request ID to identify requests. Specify a unique request ID so that
47887// if you must retry your request, the server will know to ignore the
47888// request if it has already been completed.
47889//
47890// For example, consider a situation where you make an initial request
47891// and the request times out. If you make the request again with the
47892// same request ID, the server can check if original operation with the
47893// same request ID was received, and if so, will ignore the second
47894// request. This prevents clients from accidentally creating duplicate
47895// commitments.
47896//
47897// The request ID must be a valid UUID with the exception that zero UUID
47898// is not supported (00000000-0000-0000-0000-000000000000).
47899func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall {
47900	c.urlParams_.Set("requestId", requestId)
47901	return c
47902}
47903
47904// Fields allows partial responses to be retrieved. See
47905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47906// for more information.
47907func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall {
47908	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47909	return c
47910}
47911
47912// Context sets the context to be used in this call's Do method. Any
47913// pending HTTP request will be aborted if the provided context is
47914// canceled.
47915func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall {
47916	c.ctx_ = ctx
47917	return c
47918}
47919
47920// Header returns an http.Header that can be modified by the caller to
47921// add HTTP headers to the request.
47922func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header {
47923	if c.header_ == nil {
47924		c.header_ = make(http.Header)
47925	}
47926	return c.header_
47927}
47928
47929func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) {
47930	reqHeaders := make(http.Header)
47931	for k, v := range c.header_ {
47932		reqHeaders[k] = v
47933	}
47934	reqHeaders.Set("User-Agent", c.s.userAgent())
47935	var body io.Reader = nil
47936	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesstartwithencryptionkeyrequest)
47937	if err != nil {
47938		return nil, err
47939	}
47940	reqHeaders.Set("Content-Type", "application/json")
47941	c.urlParams_.Set("alt", alt)
47942	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey")
47943	urls += "?" + c.urlParams_.Encode()
47944	req, _ := http.NewRequest("POST", urls, body)
47945	req.Header = reqHeaders
47946	googleapi.Expand(req.URL, map[string]string{
47947		"project":  c.project,
47948		"zone":     c.zone,
47949		"instance": c.instance,
47950	})
47951	return gensupport.SendRequest(c.ctx_, c.s.client, req)
47952}
47953
47954// Do executes the "compute.instances.startWithEncryptionKey" call.
47955// Exactly one of *Operation or error will be non-nil. Any non-2xx
47956// status code is an error. Response headers are in either
47957// *Operation.ServerResponse.Header or (if a response was returned at
47958// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47959// to check whether the returned error was because
47960// http.StatusNotModified was returned.
47961func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
47962	gensupport.SetOptions(c.urlParams_, opts...)
47963	res, err := c.doRequest("json")
47964	if res != nil && res.StatusCode == http.StatusNotModified {
47965		if res.Body != nil {
47966			res.Body.Close()
47967		}
47968		return nil, &googleapi.Error{
47969			Code:   res.StatusCode,
47970			Header: res.Header,
47971		}
47972	}
47973	if err != nil {
47974		return nil, err
47975	}
47976	defer googleapi.CloseBody(res)
47977	if err := googleapi.CheckResponse(res); err != nil {
47978		return nil, err
47979	}
47980	ret := &Operation{
47981		ServerResponse: googleapi.ServerResponse{
47982			Header:         res.Header,
47983			HTTPStatusCode: res.StatusCode,
47984		},
47985	}
47986	target := &ret
47987	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
47988		return nil, err
47989	}
47990	return ret, nil
47991	// {
47992	//   "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.",
47993	//   "httpMethod": "POST",
47994	//   "id": "compute.instances.startWithEncryptionKey",
47995	//   "parameterOrder": [
47996	//     "project",
47997	//     "zone",
47998	//     "instance"
47999	//   ],
48000	//   "parameters": {
48001	//     "instance": {
48002	//       "description": "Name of the instance resource to start.",
48003	//       "location": "path",
48004	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48005	//       "required": true,
48006	//       "type": "string"
48007	//     },
48008	//     "project": {
48009	//       "description": "Project ID for this request.",
48010	//       "location": "path",
48011	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
48012	//       "required": true,
48013	//       "type": "string"
48014	//     },
48015	//     "requestId": {
48016	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
48017	//       "location": "query",
48018	//       "type": "string"
48019	//     },
48020	//     "zone": {
48021	//       "description": "The name of the zone for this request.",
48022	//       "location": "path",
48023	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48024	//       "required": true,
48025	//       "type": "string"
48026	//     }
48027	//   },
48028	//   "path": "{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey",
48029	//   "request": {
48030	//     "$ref": "InstancesStartWithEncryptionKeyRequest"
48031	//   },
48032	//   "response": {
48033	//     "$ref": "Operation"
48034	//   },
48035	//   "scopes": [
48036	//     "https://www.googleapis.com/auth/cloud-platform",
48037	//     "https://www.googleapis.com/auth/compute"
48038	//   ]
48039	// }
48040
48041}
48042
48043// method id "compute.instances.stop":
48044
48045type InstancesStopCall struct {
48046	s          *Service
48047	project    string
48048	zone       string
48049	instance   string
48050	urlParams_ gensupport.URLParams
48051	ctx_       context.Context
48052	header_    http.Header
48053}
48054
48055// Stop: Stops a running instance, shutting it down cleanly, and allows
48056// you to restart the instance at a later time. Stopped instances do not
48057// incur per-minute, virtual machine usage charges while they are
48058// stopped, but any resources that the virtual machine is using, such as
48059// persistent disks and static IP addresses, will continue to be charged
48060// until they are deleted. For more information, see Stopping an
48061// instance.
48062// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop
48063func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall {
48064	c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48065	c.project = project
48066	c.zone = zone
48067	c.instance = instance
48068	return c
48069}
48070
48071// RequestId sets the optional parameter "requestId": An optional
48072// request ID to identify requests. Specify a unique request ID so that
48073// if you must retry your request, the server will know to ignore the
48074// request if it has already been completed.
48075//
48076// For example, consider a situation where you make an initial request
48077// and the request times out. If you make the request again with the
48078// same request ID, the server can check if original operation with the
48079// same request ID was received, and if so, will ignore the second
48080// request. This prevents clients from accidentally creating duplicate
48081// commitments.
48082//
48083// The request ID must be a valid UUID with the exception that zero UUID
48084// is not supported (00000000-0000-0000-0000-000000000000).
48085func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall {
48086	c.urlParams_.Set("requestId", requestId)
48087	return c
48088}
48089
48090// Fields allows partial responses to be retrieved. See
48091// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48092// for more information.
48093func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall {
48094	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48095	return c
48096}
48097
48098// Context sets the context to be used in this call's Do method. Any
48099// pending HTTP request will be aborted if the provided context is
48100// canceled.
48101func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall {
48102	c.ctx_ = ctx
48103	return c
48104}
48105
48106// Header returns an http.Header that can be modified by the caller to
48107// add HTTP headers to the request.
48108func (c *InstancesStopCall) Header() http.Header {
48109	if c.header_ == nil {
48110		c.header_ = make(http.Header)
48111	}
48112	return c.header_
48113}
48114
48115func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) {
48116	reqHeaders := make(http.Header)
48117	for k, v := range c.header_ {
48118		reqHeaders[k] = v
48119	}
48120	reqHeaders.Set("User-Agent", c.s.userAgent())
48121	var body io.Reader = nil
48122	c.urlParams_.Set("alt", alt)
48123	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/stop")
48124	urls += "?" + c.urlParams_.Encode()
48125	req, _ := http.NewRequest("POST", urls, body)
48126	req.Header = reqHeaders
48127	googleapi.Expand(req.URL, map[string]string{
48128		"project":  c.project,
48129		"zone":     c.zone,
48130		"instance": c.instance,
48131	})
48132	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48133}
48134
48135// Do executes the "compute.instances.stop" call.
48136// Exactly one of *Operation or error will be non-nil. Any non-2xx
48137// status code is an error. Response headers are in either
48138// *Operation.ServerResponse.Header or (if a response was returned at
48139// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
48140// to check whether the returned error was because
48141// http.StatusNotModified was returned.
48142func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
48143	gensupport.SetOptions(c.urlParams_, opts...)
48144	res, err := c.doRequest("json")
48145	if res != nil && res.StatusCode == http.StatusNotModified {
48146		if res.Body != nil {
48147			res.Body.Close()
48148		}
48149		return nil, &googleapi.Error{
48150			Code:   res.StatusCode,
48151			Header: res.Header,
48152		}
48153	}
48154	if err != nil {
48155		return nil, err
48156	}
48157	defer googleapi.CloseBody(res)
48158	if err := googleapi.CheckResponse(res); err != nil {
48159		return nil, err
48160	}
48161	ret := &Operation{
48162		ServerResponse: googleapi.ServerResponse{
48163			Header:         res.Header,
48164			HTTPStatusCode: res.StatusCode,
48165		},
48166	}
48167	target := &ret
48168	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
48169		return nil, err
48170	}
48171	return ret, nil
48172	// {
48173	//   "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.",
48174	//   "httpMethod": "POST",
48175	//   "id": "compute.instances.stop",
48176	//   "parameterOrder": [
48177	//     "project",
48178	//     "zone",
48179	//     "instance"
48180	//   ],
48181	//   "parameters": {
48182	//     "instance": {
48183	//       "description": "Name of the instance resource to stop.",
48184	//       "location": "path",
48185	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48186	//       "required": true,
48187	//       "type": "string"
48188	//     },
48189	//     "project": {
48190	//       "description": "Project ID for this request.",
48191	//       "location": "path",
48192	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
48193	//       "required": true,
48194	//       "type": "string"
48195	//     },
48196	//     "requestId": {
48197	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
48198	//       "location": "query",
48199	//       "type": "string"
48200	//     },
48201	//     "zone": {
48202	//       "description": "The name of the zone for this request.",
48203	//       "location": "path",
48204	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48205	//       "required": true,
48206	//       "type": "string"
48207	//     }
48208	//   },
48209	//   "path": "{project}/zones/{zone}/instances/{instance}/stop",
48210	//   "response": {
48211	//     "$ref": "Operation"
48212	//   },
48213	//   "scopes": [
48214	//     "https://www.googleapis.com/auth/cloud-platform",
48215	//     "https://www.googleapis.com/auth/compute"
48216	//   ]
48217	// }
48218
48219}
48220
48221// method id "compute.instances.testIamPermissions":
48222
48223type InstancesTestIamPermissionsCall struct {
48224	s                      *Service
48225	project                string
48226	zone                   string
48227	resource               string
48228	testpermissionsrequest *TestPermissionsRequest
48229	urlParams_             gensupport.URLParams
48230	ctx_                   context.Context
48231	header_                http.Header
48232}
48233
48234// TestIamPermissions: Returns permissions that a caller has on the
48235// specified resource.
48236func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall {
48237	c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48238	c.project = project
48239	c.zone = zone
48240	c.resource = resource
48241	c.testpermissionsrequest = testpermissionsrequest
48242	return c
48243}
48244
48245// Fields allows partial responses to be retrieved. See
48246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48247// for more information.
48248func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall {
48249	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48250	return c
48251}
48252
48253// Context sets the context to be used in this call's Do method. Any
48254// pending HTTP request will be aborted if the provided context is
48255// canceled.
48256func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall {
48257	c.ctx_ = ctx
48258	return c
48259}
48260
48261// Header returns an http.Header that can be modified by the caller to
48262// add HTTP headers to the request.
48263func (c *InstancesTestIamPermissionsCall) Header() http.Header {
48264	if c.header_ == nil {
48265		c.header_ = make(http.Header)
48266	}
48267	return c.header_
48268}
48269
48270func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
48271	reqHeaders := make(http.Header)
48272	for k, v := range c.header_ {
48273		reqHeaders[k] = v
48274	}
48275	reqHeaders.Set("User-Agent", c.s.userAgent())
48276	var body io.Reader = nil
48277	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
48278	if err != nil {
48279		return nil, err
48280	}
48281	reqHeaders.Set("Content-Type", "application/json")
48282	c.urlParams_.Set("alt", alt)
48283	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/testIamPermissions")
48284	urls += "?" + c.urlParams_.Encode()
48285	req, _ := http.NewRequest("POST", urls, body)
48286	req.Header = reqHeaders
48287	googleapi.Expand(req.URL, map[string]string{
48288		"project":  c.project,
48289		"zone":     c.zone,
48290		"resource": c.resource,
48291	})
48292	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48293}
48294
48295// Do executes the "compute.instances.testIamPermissions" call.
48296// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
48297// non-2xx status code is an error. Response headers are in either
48298// *TestPermissionsResponse.ServerResponse.Header or (if a response was
48299// returned at all) in error.(*googleapi.Error).Header. Use
48300// googleapi.IsNotModified to check whether the returned error was
48301// because http.StatusNotModified was returned.
48302func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
48303	gensupport.SetOptions(c.urlParams_, opts...)
48304	res, err := c.doRequest("json")
48305	if res != nil && res.StatusCode == http.StatusNotModified {
48306		if res.Body != nil {
48307			res.Body.Close()
48308		}
48309		return nil, &googleapi.Error{
48310			Code:   res.StatusCode,
48311			Header: res.Header,
48312		}
48313	}
48314	if err != nil {
48315		return nil, err
48316	}
48317	defer googleapi.CloseBody(res)
48318	if err := googleapi.CheckResponse(res); err != nil {
48319		return nil, err
48320	}
48321	ret := &TestPermissionsResponse{
48322		ServerResponse: googleapi.ServerResponse{
48323			Header:         res.Header,
48324			HTTPStatusCode: res.StatusCode,
48325		},
48326	}
48327	target := &ret
48328	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
48329		return nil, err
48330	}
48331	return ret, nil
48332	// {
48333	//   "description": "Returns permissions that a caller has on the specified resource.",
48334	//   "httpMethod": "POST",
48335	//   "id": "compute.instances.testIamPermissions",
48336	//   "parameterOrder": [
48337	//     "project",
48338	//     "zone",
48339	//     "resource"
48340	//   ],
48341	//   "parameters": {
48342	//     "project": {
48343	//       "description": "Project ID for this request.",
48344	//       "location": "path",
48345	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
48346	//       "required": true,
48347	//       "type": "string"
48348	//     },
48349	//     "resource": {
48350	//       "description": "Name of the resource for this request.",
48351	//       "location": "path",
48352	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48353	//       "required": true,
48354	//       "type": "string"
48355	//     },
48356	//     "zone": {
48357	//       "description": "The name of the zone for this request.",
48358	//       "location": "path",
48359	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48360	//       "required": true,
48361	//       "type": "string"
48362	//     }
48363	//   },
48364	//   "path": "{project}/zones/{zone}/instances/{resource}/testIamPermissions",
48365	//   "request": {
48366	//     "$ref": "TestPermissionsRequest"
48367	//   },
48368	//   "response": {
48369	//     "$ref": "TestPermissionsResponse"
48370	//   },
48371	//   "scopes": [
48372	//     "https://www.googleapis.com/auth/cloud-platform",
48373	//     "https://www.googleapis.com/auth/compute",
48374	//     "https://www.googleapis.com/auth/compute.readonly"
48375	//   ]
48376	// }
48377
48378}
48379
48380// method id "compute.interconnectAttachments.aggregatedList":
48381
48382type InterconnectAttachmentsAggregatedListCall struct {
48383	s            *Service
48384	project      string
48385	urlParams_   gensupport.URLParams
48386	ifNoneMatch_ string
48387	ctx_         context.Context
48388	header_      http.Header
48389}
48390
48391// AggregatedList: Retrieves an aggregated list of interconnect
48392// attachments.
48393func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall {
48394	c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48395	c.project = project
48396	return c
48397}
48398
48399// Filter sets the optional parameter "filter": Sets a filter
48400// {expression} for filtering listed resources. Your {expression} must
48401// be in the format: field_name comparison_string literal_string.
48402//
48403// The field_name is the name of the field you want to compare. Only
48404// atomic field types are supported (string, number, boolean). The
48405// comparison_string must be either eq (equals) or ne (not equals). The
48406// literal_string is the string value to filter to. The literal value
48407// must be valid for the type of field you are filtering by (string,
48408// number, boolean). For string fields, the literal value is interpreted
48409// as a regular expression using RE2 syntax. The literal value must
48410// match the entire field.
48411//
48412// For example, to filter for instances that do not have a name of
48413// example-instance, you would use name ne example-instance.
48414//
48415// You can filter on nested fields. For example, you could filter on
48416// instances that have set the scheduling.automaticRestart field to
48417// true. Use filtering on nested fields to take advantage of labels to
48418// organize and search for results based on label values.
48419//
48420// To filter on multiple expressions, provide each separate expression
48421// within parentheses. For example, (scheduling.automaticRestart eq
48422// true) (zone eq us-central1-f). Multiple expressions are treated as
48423// AND expressions, meaning that resources must match all expressions to
48424// pass the filters.
48425func (c *InterconnectAttachmentsAggregatedListCall) Filter(filter string) *InterconnectAttachmentsAggregatedListCall {
48426	c.urlParams_.Set("filter", filter)
48427	return c
48428}
48429
48430// MaxResults sets the optional parameter "maxResults": The maximum
48431// number of results per page that should be returned. If the number of
48432// available results is larger than maxResults, Compute Engine returns a
48433// nextPageToken that can be used to get the next page of results in
48434// subsequent list requests. Acceptable values are 0 to 500, inclusive.
48435// (Default: 500)
48436func (c *InterconnectAttachmentsAggregatedListCall) MaxResults(maxResults int64) *InterconnectAttachmentsAggregatedListCall {
48437	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
48438	return c
48439}
48440
48441// OrderBy sets the optional parameter "orderBy": Sorts list results by
48442// a certain order. By default, results are returned in alphanumerical
48443// order based on the resource name.
48444//
48445// You can also sort results in descending order based on the creation
48446// timestamp using orderBy="creationTimestamp desc". This sorts results
48447// based on the creationTimestamp field in reverse chronological order
48448// (newest result first). Use this to sort resources like operations so
48449// that the newest operation is returned first.
48450//
48451// Currently, only sorting by name or creationTimestamp desc is
48452// supported.
48453func (c *InterconnectAttachmentsAggregatedListCall) OrderBy(orderBy string) *InterconnectAttachmentsAggregatedListCall {
48454	c.urlParams_.Set("orderBy", orderBy)
48455	return c
48456}
48457
48458// PageToken sets the optional parameter "pageToken": Specifies a page
48459// token to use. Set pageToken to the nextPageToken returned by a
48460// previous list request to get the next page of results.
48461func (c *InterconnectAttachmentsAggregatedListCall) PageToken(pageToken string) *InterconnectAttachmentsAggregatedListCall {
48462	c.urlParams_.Set("pageToken", pageToken)
48463	return c
48464}
48465
48466// Fields allows partial responses to be retrieved. See
48467// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48468// for more information.
48469func (c *InterconnectAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsAggregatedListCall {
48470	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48471	return c
48472}
48473
48474// IfNoneMatch sets the optional parameter which makes the operation
48475// fail if the object's ETag matches the given value. This is useful for
48476// getting updates only after the object has changed since the last
48477// request. Use googleapi.IsNotModified to check whether the response
48478// error from Do is the result of In-None-Match.
48479func (c *InterconnectAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsAggregatedListCall {
48480	c.ifNoneMatch_ = entityTag
48481	return c
48482}
48483
48484// Context sets the context to be used in this call's Do method. Any
48485// pending HTTP request will be aborted if the provided context is
48486// canceled.
48487func (c *InterconnectAttachmentsAggregatedListCall) Context(ctx context.Context) *InterconnectAttachmentsAggregatedListCall {
48488	c.ctx_ = ctx
48489	return c
48490}
48491
48492// Header returns an http.Header that can be modified by the caller to
48493// add HTTP headers to the request.
48494func (c *InterconnectAttachmentsAggregatedListCall) Header() http.Header {
48495	if c.header_ == nil {
48496		c.header_ = make(http.Header)
48497	}
48498	return c.header_
48499}
48500
48501func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
48502	reqHeaders := make(http.Header)
48503	for k, v := range c.header_ {
48504		reqHeaders[k] = v
48505	}
48506	reqHeaders.Set("User-Agent", c.s.userAgent())
48507	if c.ifNoneMatch_ != "" {
48508		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48509	}
48510	var body io.Reader = nil
48511	c.urlParams_.Set("alt", alt)
48512	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/interconnectAttachments")
48513	urls += "?" + c.urlParams_.Encode()
48514	req, _ := http.NewRequest("GET", urls, body)
48515	req.Header = reqHeaders
48516	googleapi.Expand(req.URL, map[string]string{
48517		"project": c.project,
48518	})
48519	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48520}
48521
48522// Do executes the "compute.interconnectAttachments.aggregatedList" call.
48523// Exactly one of *InterconnectAttachmentAggregatedList or error will be
48524// non-nil. Any non-2xx status code is an error. Response headers are in
48525// either *InterconnectAttachmentAggregatedList.ServerResponse.Header or
48526// (if a response was returned at all) in
48527// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
48528// whether the returned error was because http.StatusNotModified was
48529// returned.
48530func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentAggregatedList, error) {
48531	gensupport.SetOptions(c.urlParams_, opts...)
48532	res, err := c.doRequest("json")
48533	if res != nil && res.StatusCode == http.StatusNotModified {
48534		if res.Body != nil {
48535			res.Body.Close()
48536		}
48537		return nil, &googleapi.Error{
48538			Code:   res.StatusCode,
48539			Header: res.Header,
48540		}
48541	}
48542	if err != nil {
48543		return nil, err
48544	}
48545	defer googleapi.CloseBody(res)
48546	if err := googleapi.CheckResponse(res); err != nil {
48547		return nil, err
48548	}
48549	ret := &InterconnectAttachmentAggregatedList{
48550		ServerResponse: googleapi.ServerResponse{
48551			Header:         res.Header,
48552			HTTPStatusCode: res.StatusCode,
48553		},
48554	}
48555	target := &ret
48556	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
48557		return nil, err
48558	}
48559	return ret, nil
48560	// {
48561	//   "description": "Retrieves an aggregated list of interconnect attachments.",
48562	//   "httpMethod": "GET",
48563	//   "id": "compute.interconnectAttachments.aggregatedList",
48564	//   "parameterOrder": [
48565	//     "project"
48566	//   ],
48567	//   "parameters": {
48568	//     "filter": {
48569	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
48570	//       "location": "query",
48571	//       "type": "string"
48572	//     },
48573	//     "maxResults": {
48574	//       "default": "500",
48575	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
48576	//       "format": "uint32",
48577	//       "location": "query",
48578	//       "minimum": "0",
48579	//       "type": "integer"
48580	//     },
48581	//     "orderBy": {
48582	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
48583	//       "location": "query",
48584	//       "type": "string"
48585	//     },
48586	//     "pageToken": {
48587	//       "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.",
48588	//       "location": "query",
48589	//       "type": "string"
48590	//     },
48591	//     "project": {
48592	//       "description": "Project ID for this request.",
48593	//       "location": "path",
48594	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
48595	//       "required": true,
48596	//       "type": "string"
48597	//     }
48598	//   },
48599	//   "path": "{project}/aggregated/interconnectAttachments",
48600	//   "response": {
48601	//     "$ref": "InterconnectAttachmentAggregatedList"
48602	//   },
48603	//   "scopes": [
48604	//     "https://www.googleapis.com/auth/cloud-platform",
48605	//     "https://www.googleapis.com/auth/compute",
48606	//     "https://www.googleapis.com/auth/compute.readonly"
48607	//   ]
48608	// }
48609
48610}
48611
48612// Pages invokes f for each page of results.
48613// A non-nil error returned from f will halt the iteration.
48614// The provided context supersedes any context provided to the Context method.
48615func (c *InterconnectAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentAggregatedList) error) error {
48616	c.ctx_ = ctx
48617	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48618	for {
48619		x, err := c.Do()
48620		if err != nil {
48621			return err
48622		}
48623		if err := f(x); err != nil {
48624			return err
48625		}
48626		if x.NextPageToken == "" {
48627			return nil
48628		}
48629		c.PageToken(x.NextPageToken)
48630	}
48631}
48632
48633// method id "compute.interconnectAttachments.delete":
48634
48635type InterconnectAttachmentsDeleteCall struct {
48636	s                      *Service
48637	project                string
48638	region                 string
48639	interconnectAttachment string
48640	urlParams_             gensupport.URLParams
48641	ctx_                   context.Context
48642	header_                http.Header
48643}
48644
48645// Delete: Deletes the specified interconnect attachment.
48646func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall {
48647	c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48648	c.project = project
48649	c.region = region
48650	c.interconnectAttachment = interconnectAttachment
48651	return c
48652}
48653
48654// RequestId sets the optional parameter "requestId": An optional
48655// request ID to identify requests. Specify a unique request ID so that
48656// if you must retry your request, the server will know to ignore the
48657// request if it has already been completed.
48658//
48659// For example, consider a situation where you make an initial request
48660// and the request times out. If you make the request again with the
48661// same request ID, the server can check if original operation with the
48662// same request ID was received, and if so, will ignore the second
48663// request. This prevents clients from accidentally creating duplicate
48664// commitments.
48665//
48666// The request ID must be a valid UUID with the exception that zero UUID
48667// is not supported (00000000-0000-0000-0000-000000000000).
48668func (c *InterconnectAttachmentsDeleteCall) RequestId(requestId string) *InterconnectAttachmentsDeleteCall {
48669	c.urlParams_.Set("requestId", requestId)
48670	return c
48671}
48672
48673// Fields allows partial responses to be retrieved. See
48674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48675// for more information.
48676func (c *InterconnectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsDeleteCall {
48677	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48678	return c
48679}
48680
48681// Context sets the context to be used in this call's Do method. Any
48682// pending HTTP request will be aborted if the provided context is
48683// canceled.
48684func (c *InterconnectAttachmentsDeleteCall) Context(ctx context.Context) *InterconnectAttachmentsDeleteCall {
48685	c.ctx_ = ctx
48686	return c
48687}
48688
48689// Header returns an http.Header that can be modified by the caller to
48690// add HTTP headers to the request.
48691func (c *InterconnectAttachmentsDeleteCall) Header() http.Header {
48692	if c.header_ == nil {
48693		c.header_ = make(http.Header)
48694	}
48695	return c.header_
48696}
48697
48698func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
48699	reqHeaders := make(http.Header)
48700	for k, v := range c.header_ {
48701		reqHeaders[k] = v
48702	}
48703	reqHeaders.Set("User-Agent", c.s.userAgent())
48704	var body io.Reader = nil
48705	c.urlParams_.Set("alt", alt)
48706	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}")
48707	urls += "?" + c.urlParams_.Encode()
48708	req, _ := http.NewRequest("DELETE", urls, body)
48709	req.Header = reqHeaders
48710	googleapi.Expand(req.URL, map[string]string{
48711		"project":                c.project,
48712		"region":                 c.region,
48713		"interconnectAttachment": c.interconnectAttachment,
48714	})
48715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48716}
48717
48718// Do executes the "compute.interconnectAttachments.delete" call.
48719// Exactly one of *Operation or error will be non-nil. Any non-2xx
48720// status code is an error. Response headers are in either
48721// *Operation.ServerResponse.Header or (if a response was returned at
48722// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
48723// to check whether the returned error was because
48724// http.StatusNotModified was returned.
48725func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
48726	gensupport.SetOptions(c.urlParams_, opts...)
48727	res, err := c.doRequest("json")
48728	if res != nil && res.StatusCode == http.StatusNotModified {
48729		if res.Body != nil {
48730			res.Body.Close()
48731		}
48732		return nil, &googleapi.Error{
48733			Code:   res.StatusCode,
48734			Header: res.Header,
48735		}
48736	}
48737	if err != nil {
48738		return nil, err
48739	}
48740	defer googleapi.CloseBody(res)
48741	if err := googleapi.CheckResponse(res); err != nil {
48742		return nil, err
48743	}
48744	ret := &Operation{
48745		ServerResponse: googleapi.ServerResponse{
48746			Header:         res.Header,
48747			HTTPStatusCode: res.StatusCode,
48748		},
48749	}
48750	target := &ret
48751	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
48752		return nil, err
48753	}
48754	return ret, nil
48755	// {
48756	//   "description": "Deletes the specified interconnect attachment.",
48757	//   "httpMethod": "DELETE",
48758	//   "id": "compute.interconnectAttachments.delete",
48759	//   "parameterOrder": [
48760	//     "project",
48761	//     "region",
48762	//     "interconnectAttachment"
48763	//   ],
48764	//   "parameters": {
48765	//     "interconnectAttachment": {
48766	//       "description": "Name of the interconnect attachment to delete.",
48767	//       "location": "path",
48768	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48769	//       "required": true,
48770	//       "type": "string"
48771	//     },
48772	//     "project": {
48773	//       "description": "Project ID for this request.",
48774	//       "location": "path",
48775	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
48776	//       "required": true,
48777	//       "type": "string"
48778	//     },
48779	//     "region": {
48780	//       "description": "Name of the region for this request.",
48781	//       "location": "path",
48782	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48783	//       "required": true,
48784	//       "type": "string"
48785	//     },
48786	//     "requestId": {
48787	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
48788	//       "location": "query",
48789	//       "type": "string"
48790	//     }
48791	//   },
48792	//   "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}",
48793	//   "response": {
48794	//     "$ref": "Operation"
48795	//   },
48796	//   "scopes": [
48797	//     "https://www.googleapis.com/auth/cloud-platform",
48798	//     "https://www.googleapis.com/auth/compute"
48799	//   ]
48800	// }
48801
48802}
48803
48804// method id "compute.interconnectAttachments.get":
48805
48806type InterconnectAttachmentsGetCall struct {
48807	s                      *Service
48808	project                string
48809	region                 string
48810	interconnectAttachment string
48811	urlParams_             gensupport.URLParams
48812	ifNoneMatch_           string
48813	ctx_                   context.Context
48814	header_                http.Header
48815}
48816
48817// Get: Returns the specified interconnect attachment.
48818func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall {
48819	c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48820	c.project = project
48821	c.region = region
48822	c.interconnectAttachment = interconnectAttachment
48823	return c
48824}
48825
48826// Fields allows partial responses to be retrieved. See
48827// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48828// for more information.
48829func (c *InterconnectAttachmentsGetCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsGetCall {
48830	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48831	return c
48832}
48833
48834// IfNoneMatch sets the optional parameter which makes the operation
48835// fail if the object's ETag matches the given value. This is useful for
48836// getting updates only after the object has changed since the last
48837// request. Use googleapi.IsNotModified to check whether the response
48838// error from Do is the result of In-None-Match.
48839func (c *InterconnectAttachmentsGetCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsGetCall {
48840	c.ifNoneMatch_ = entityTag
48841	return c
48842}
48843
48844// Context sets the context to be used in this call's Do method. Any
48845// pending HTTP request will be aborted if the provided context is
48846// canceled.
48847func (c *InterconnectAttachmentsGetCall) Context(ctx context.Context) *InterconnectAttachmentsGetCall {
48848	c.ctx_ = ctx
48849	return c
48850}
48851
48852// Header returns an http.Header that can be modified by the caller to
48853// add HTTP headers to the request.
48854func (c *InterconnectAttachmentsGetCall) Header() http.Header {
48855	if c.header_ == nil {
48856		c.header_ = make(http.Header)
48857	}
48858	return c.header_
48859}
48860
48861func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) {
48862	reqHeaders := make(http.Header)
48863	for k, v := range c.header_ {
48864		reqHeaders[k] = v
48865	}
48866	reqHeaders.Set("User-Agent", c.s.userAgent())
48867	if c.ifNoneMatch_ != "" {
48868		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
48869	}
48870	var body io.Reader = nil
48871	c.urlParams_.Set("alt", alt)
48872	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}")
48873	urls += "?" + c.urlParams_.Encode()
48874	req, _ := http.NewRequest("GET", urls, body)
48875	req.Header = reqHeaders
48876	googleapi.Expand(req.URL, map[string]string{
48877		"project":                c.project,
48878		"region":                 c.region,
48879		"interconnectAttachment": c.interconnectAttachment,
48880	})
48881	return gensupport.SendRequest(c.ctx_, c.s.client, req)
48882}
48883
48884// Do executes the "compute.interconnectAttachments.get" call.
48885// Exactly one of *InterconnectAttachment or error will be non-nil. Any
48886// non-2xx status code is an error. Response headers are in either
48887// *InterconnectAttachment.ServerResponse.Header or (if a response was
48888// returned at all) in error.(*googleapi.Error).Header. Use
48889// googleapi.IsNotModified to check whether the returned error was
48890// because http.StatusNotModified was returned.
48891func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachment, error) {
48892	gensupport.SetOptions(c.urlParams_, opts...)
48893	res, err := c.doRequest("json")
48894	if res != nil && res.StatusCode == http.StatusNotModified {
48895		if res.Body != nil {
48896			res.Body.Close()
48897		}
48898		return nil, &googleapi.Error{
48899			Code:   res.StatusCode,
48900			Header: res.Header,
48901		}
48902	}
48903	if err != nil {
48904		return nil, err
48905	}
48906	defer googleapi.CloseBody(res)
48907	if err := googleapi.CheckResponse(res); err != nil {
48908		return nil, err
48909	}
48910	ret := &InterconnectAttachment{
48911		ServerResponse: googleapi.ServerResponse{
48912			Header:         res.Header,
48913			HTTPStatusCode: res.StatusCode,
48914		},
48915	}
48916	target := &ret
48917	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
48918		return nil, err
48919	}
48920	return ret, nil
48921	// {
48922	//   "description": "Returns the specified interconnect attachment.",
48923	//   "httpMethod": "GET",
48924	//   "id": "compute.interconnectAttachments.get",
48925	//   "parameterOrder": [
48926	//     "project",
48927	//     "region",
48928	//     "interconnectAttachment"
48929	//   ],
48930	//   "parameters": {
48931	//     "interconnectAttachment": {
48932	//       "description": "Name of the interconnect attachment to return.",
48933	//       "location": "path",
48934	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48935	//       "required": true,
48936	//       "type": "string"
48937	//     },
48938	//     "project": {
48939	//       "description": "Project ID for this request.",
48940	//       "location": "path",
48941	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
48942	//       "required": true,
48943	//       "type": "string"
48944	//     },
48945	//     "region": {
48946	//       "description": "Name of the region for this request.",
48947	//       "location": "path",
48948	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48949	//       "required": true,
48950	//       "type": "string"
48951	//     }
48952	//   },
48953	//   "path": "{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}",
48954	//   "response": {
48955	//     "$ref": "InterconnectAttachment"
48956	//   },
48957	//   "scopes": [
48958	//     "https://www.googleapis.com/auth/cloud-platform",
48959	//     "https://www.googleapis.com/auth/compute",
48960	//     "https://www.googleapis.com/auth/compute.readonly"
48961	//   ]
48962	// }
48963
48964}
48965
48966// method id "compute.interconnectAttachments.insert":
48967
48968type InterconnectAttachmentsInsertCall struct {
48969	s                      *Service
48970	project                string
48971	region                 string
48972	interconnectattachment *InterconnectAttachment
48973	urlParams_             gensupport.URLParams
48974	ctx_                   context.Context
48975	header_                http.Header
48976}
48977
48978// Insert: Creates an InterconnectAttachment in the specified project
48979// using the data included in the request.
48980func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall {
48981	c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48982	c.project = project
48983	c.region = region
48984	c.interconnectattachment = interconnectattachment
48985	return c
48986}
48987
48988// RequestId sets the optional parameter "requestId": An optional
48989// request ID to identify requests. Specify a unique request ID so that
48990// if you must retry your request, the server will know to ignore the
48991// request if it has already been completed.
48992//
48993// For example, consider a situation where you make an initial request
48994// and the request times out. If you make the request again with the
48995// same request ID, the server can check if original operation with the
48996// same request ID was received, and if so, will ignore the second
48997// request. This prevents clients from accidentally creating duplicate
48998// commitments.
48999//
49000// The request ID must be a valid UUID with the exception that zero UUID
49001// is not supported (00000000-0000-0000-0000-000000000000).
49002func (c *InterconnectAttachmentsInsertCall) RequestId(requestId string) *InterconnectAttachmentsInsertCall {
49003	c.urlParams_.Set("requestId", requestId)
49004	return c
49005}
49006
49007// Fields allows partial responses to be retrieved. See
49008// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49009// for more information.
49010func (c *InterconnectAttachmentsInsertCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsInsertCall {
49011	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49012	return c
49013}
49014
49015// Context sets the context to be used in this call's Do method. Any
49016// pending HTTP request will be aborted if the provided context is
49017// canceled.
49018func (c *InterconnectAttachmentsInsertCall) Context(ctx context.Context) *InterconnectAttachmentsInsertCall {
49019	c.ctx_ = ctx
49020	return c
49021}
49022
49023// Header returns an http.Header that can be modified by the caller to
49024// add HTTP headers to the request.
49025func (c *InterconnectAttachmentsInsertCall) Header() http.Header {
49026	if c.header_ == nil {
49027		c.header_ = make(http.Header)
49028	}
49029	return c.header_
49030}
49031
49032func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) {
49033	reqHeaders := make(http.Header)
49034	for k, v := range c.header_ {
49035		reqHeaders[k] = v
49036	}
49037	reqHeaders.Set("User-Agent", c.s.userAgent())
49038	var body io.Reader = nil
49039	body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnectattachment)
49040	if err != nil {
49041		return nil, err
49042	}
49043	reqHeaders.Set("Content-Type", "application/json")
49044	c.urlParams_.Set("alt", alt)
49045	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments")
49046	urls += "?" + c.urlParams_.Encode()
49047	req, _ := http.NewRequest("POST", urls, body)
49048	req.Header = reqHeaders
49049	googleapi.Expand(req.URL, map[string]string{
49050		"project": c.project,
49051		"region":  c.region,
49052	})
49053	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49054}
49055
49056// Do executes the "compute.interconnectAttachments.insert" call.
49057// Exactly one of *Operation or error will be non-nil. Any non-2xx
49058// status code is an error. Response headers are in either
49059// *Operation.ServerResponse.Header or (if a response was returned at
49060// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
49061// to check whether the returned error was because
49062// http.StatusNotModified was returned.
49063func (c *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
49064	gensupport.SetOptions(c.urlParams_, opts...)
49065	res, err := c.doRequest("json")
49066	if res != nil && res.StatusCode == http.StatusNotModified {
49067		if res.Body != nil {
49068			res.Body.Close()
49069		}
49070		return nil, &googleapi.Error{
49071			Code:   res.StatusCode,
49072			Header: res.Header,
49073		}
49074	}
49075	if err != nil {
49076		return nil, err
49077	}
49078	defer googleapi.CloseBody(res)
49079	if err := googleapi.CheckResponse(res); err != nil {
49080		return nil, err
49081	}
49082	ret := &Operation{
49083		ServerResponse: googleapi.ServerResponse{
49084			Header:         res.Header,
49085			HTTPStatusCode: res.StatusCode,
49086		},
49087	}
49088	target := &ret
49089	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
49090		return nil, err
49091	}
49092	return ret, nil
49093	// {
49094	//   "description": "Creates an InterconnectAttachment in the specified project using the data included in the request.",
49095	//   "httpMethod": "POST",
49096	//   "id": "compute.interconnectAttachments.insert",
49097	//   "parameterOrder": [
49098	//     "project",
49099	//     "region"
49100	//   ],
49101	//   "parameters": {
49102	//     "project": {
49103	//       "description": "Project ID for this request.",
49104	//       "location": "path",
49105	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
49106	//       "required": true,
49107	//       "type": "string"
49108	//     },
49109	//     "region": {
49110	//       "description": "Name of the region for this request.",
49111	//       "location": "path",
49112	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
49113	//       "required": true,
49114	//       "type": "string"
49115	//     },
49116	//     "requestId": {
49117	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
49118	//       "location": "query",
49119	//       "type": "string"
49120	//     }
49121	//   },
49122	//   "path": "{project}/regions/{region}/interconnectAttachments",
49123	//   "request": {
49124	//     "$ref": "InterconnectAttachment"
49125	//   },
49126	//   "response": {
49127	//     "$ref": "Operation"
49128	//   },
49129	//   "scopes": [
49130	//     "https://www.googleapis.com/auth/cloud-platform",
49131	//     "https://www.googleapis.com/auth/compute"
49132	//   ]
49133	// }
49134
49135}
49136
49137// method id "compute.interconnectAttachments.list":
49138
49139type InterconnectAttachmentsListCall struct {
49140	s            *Service
49141	project      string
49142	region       string
49143	urlParams_   gensupport.URLParams
49144	ifNoneMatch_ string
49145	ctx_         context.Context
49146	header_      http.Header
49147}
49148
49149// List: Retrieves the list of interconnect attachments contained within
49150// the specified region.
49151func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall {
49152	c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49153	c.project = project
49154	c.region = region
49155	return c
49156}
49157
49158// Filter sets the optional parameter "filter": Sets a filter
49159// {expression} for filtering listed resources. Your {expression} must
49160// be in the format: field_name comparison_string literal_string.
49161//
49162// The field_name is the name of the field you want to compare. Only
49163// atomic field types are supported (string, number, boolean). The
49164// comparison_string must be either eq (equals) or ne (not equals). The
49165// literal_string is the string value to filter to. The literal value
49166// must be valid for the type of field you are filtering by (string,
49167// number, boolean). For string fields, the literal value is interpreted
49168// as a regular expression using RE2 syntax. The literal value must
49169// match the entire field.
49170//
49171// For example, to filter for instances that do not have a name of
49172// example-instance, you would use name ne example-instance.
49173//
49174// You can filter on nested fields. For example, you could filter on
49175// instances that have set the scheduling.automaticRestart field to
49176// true. Use filtering on nested fields to take advantage of labels to
49177// organize and search for results based on label values.
49178//
49179// To filter on multiple expressions, provide each separate expression
49180// within parentheses. For example, (scheduling.automaticRestart eq
49181// true) (zone eq us-central1-f). Multiple expressions are treated as
49182// AND expressions, meaning that resources must match all expressions to
49183// pass the filters.
49184func (c *InterconnectAttachmentsListCall) Filter(filter string) *InterconnectAttachmentsListCall {
49185	c.urlParams_.Set("filter", filter)
49186	return c
49187}
49188
49189// MaxResults sets the optional parameter "maxResults": The maximum
49190// number of results per page that should be returned. If the number of
49191// available results is larger than maxResults, Compute Engine returns a
49192// nextPageToken that can be used to get the next page of results in
49193// subsequent list requests. Acceptable values are 0 to 500, inclusive.
49194// (Default: 500)
49195func (c *InterconnectAttachmentsListCall) MaxResults(maxResults int64) *InterconnectAttachmentsListCall {
49196	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
49197	return c
49198}
49199
49200// OrderBy sets the optional parameter "orderBy": Sorts list results by
49201// a certain order. By default, results are returned in alphanumerical
49202// order based on the resource name.
49203//
49204// You can also sort results in descending order based on the creation
49205// timestamp using orderBy="creationTimestamp desc". This sorts results
49206// based on the creationTimestamp field in reverse chronological order
49207// (newest result first). Use this to sort resources like operations so
49208// that the newest operation is returned first.
49209//
49210// Currently, only sorting by name or creationTimestamp desc is
49211// supported.
49212func (c *InterconnectAttachmentsListCall) OrderBy(orderBy string) *InterconnectAttachmentsListCall {
49213	c.urlParams_.Set("orderBy", orderBy)
49214	return c
49215}
49216
49217// PageToken sets the optional parameter "pageToken": Specifies a page
49218// token to use. Set pageToken to the nextPageToken returned by a
49219// previous list request to get the next page of results.
49220func (c *InterconnectAttachmentsListCall) PageToken(pageToken string) *InterconnectAttachmentsListCall {
49221	c.urlParams_.Set("pageToken", pageToken)
49222	return c
49223}
49224
49225// Fields allows partial responses to be retrieved. See
49226// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49227// for more information.
49228func (c *InterconnectAttachmentsListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsListCall {
49229	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49230	return c
49231}
49232
49233// IfNoneMatch sets the optional parameter which makes the operation
49234// fail if the object's ETag matches the given value. This is useful for
49235// getting updates only after the object has changed since the last
49236// request. Use googleapi.IsNotModified to check whether the response
49237// error from Do is the result of In-None-Match.
49238func (c *InterconnectAttachmentsListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsListCall {
49239	c.ifNoneMatch_ = entityTag
49240	return c
49241}
49242
49243// Context sets the context to be used in this call's Do method. Any
49244// pending HTTP request will be aborted if the provided context is
49245// canceled.
49246func (c *InterconnectAttachmentsListCall) Context(ctx context.Context) *InterconnectAttachmentsListCall {
49247	c.ctx_ = ctx
49248	return c
49249}
49250
49251// Header returns an http.Header that can be modified by the caller to
49252// add HTTP headers to the request.
49253func (c *InterconnectAttachmentsListCall) Header() http.Header {
49254	if c.header_ == nil {
49255		c.header_ = make(http.Header)
49256	}
49257	return c.header_
49258}
49259
49260func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) {
49261	reqHeaders := make(http.Header)
49262	for k, v := range c.header_ {
49263		reqHeaders[k] = v
49264	}
49265	reqHeaders.Set("User-Agent", c.s.userAgent())
49266	if c.ifNoneMatch_ != "" {
49267		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49268	}
49269	var body io.Reader = nil
49270	c.urlParams_.Set("alt", alt)
49271	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments")
49272	urls += "?" + c.urlParams_.Encode()
49273	req, _ := http.NewRequest("GET", urls, body)
49274	req.Header = reqHeaders
49275	googleapi.Expand(req.URL, map[string]string{
49276		"project": c.project,
49277		"region":  c.region,
49278	})
49279	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49280}
49281
49282// Do executes the "compute.interconnectAttachments.list" call.
49283// Exactly one of *InterconnectAttachmentList or error will be non-nil.
49284// Any non-2xx status code is an error. Response headers are in either
49285// *InterconnectAttachmentList.ServerResponse.Header or (if a response
49286// was returned at all) in error.(*googleapi.Error).Header. Use
49287// googleapi.IsNotModified to check whether the returned error was
49288// because http.StatusNotModified was returned.
49289func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentList, error) {
49290	gensupport.SetOptions(c.urlParams_, opts...)
49291	res, err := c.doRequest("json")
49292	if res != nil && res.StatusCode == http.StatusNotModified {
49293		if res.Body != nil {
49294			res.Body.Close()
49295		}
49296		return nil, &googleapi.Error{
49297			Code:   res.StatusCode,
49298			Header: res.Header,
49299		}
49300	}
49301	if err != nil {
49302		return nil, err
49303	}
49304	defer googleapi.CloseBody(res)
49305	if err := googleapi.CheckResponse(res); err != nil {
49306		return nil, err
49307	}
49308	ret := &InterconnectAttachmentList{
49309		ServerResponse: googleapi.ServerResponse{
49310			Header:         res.Header,
49311			HTTPStatusCode: res.StatusCode,
49312		},
49313	}
49314	target := &ret
49315	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
49316		return nil, err
49317	}
49318	return ret, nil
49319	// {
49320	//   "description": "Retrieves the list of interconnect attachments contained within the specified region.",
49321	//   "httpMethod": "GET",
49322	//   "id": "compute.interconnectAttachments.list",
49323	//   "parameterOrder": [
49324	//     "project",
49325	//     "region"
49326	//   ],
49327	//   "parameters": {
49328	//     "filter": {
49329	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
49330	//       "location": "query",
49331	//       "type": "string"
49332	//     },
49333	//     "maxResults": {
49334	//       "default": "500",
49335	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
49336	//       "format": "uint32",
49337	//       "location": "query",
49338	//       "minimum": "0",
49339	//       "type": "integer"
49340	//     },
49341	//     "orderBy": {
49342	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
49343	//       "location": "query",
49344	//       "type": "string"
49345	//     },
49346	//     "pageToken": {
49347	//       "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.",
49348	//       "location": "query",
49349	//       "type": "string"
49350	//     },
49351	//     "project": {
49352	//       "description": "Project ID for this request.",
49353	//       "location": "path",
49354	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
49355	//       "required": true,
49356	//       "type": "string"
49357	//     },
49358	//     "region": {
49359	//       "description": "Name of the region for this request.",
49360	//       "location": "path",
49361	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
49362	//       "required": true,
49363	//       "type": "string"
49364	//     }
49365	//   },
49366	//   "path": "{project}/regions/{region}/interconnectAttachments",
49367	//   "response": {
49368	//     "$ref": "InterconnectAttachmentList"
49369	//   },
49370	//   "scopes": [
49371	//     "https://www.googleapis.com/auth/cloud-platform",
49372	//     "https://www.googleapis.com/auth/compute",
49373	//     "https://www.googleapis.com/auth/compute.readonly"
49374	//   ]
49375	// }
49376
49377}
49378
49379// Pages invokes f for each page of results.
49380// A non-nil error returned from f will halt the iteration.
49381// The provided context supersedes any context provided to the Context method.
49382func (c *InterconnectAttachmentsListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentList) error) error {
49383	c.ctx_ = ctx
49384	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
49385	for {
49386		x, err := c.Do()
49387		if err != nil {
49388			return err
49389		}
49390		if err := f(x); err != nil {
49391			return err
49392		}
49393		if x.NextPageToken == "" {
49394			return nil
49395		}
49396		c.PageToken(x.NextPageToken)
49397	}
49398}
49399
49400// method id "compute.interconnectAttachments.testIamPermissions":
49401
49402type InterconnectAttachmentsTestIamPermissionsCall struct {
49403	s                      *Service
49404	project                string
49405	region                 string
49406	resource               string
49407	testpermissionsrequest *TestPermissionsRequest
49408	urlParams_             gensupport.URLParams
49409	ctx_                   context.Context
49410	header_                http.Header
49411}
49412
49413// TestIamPermissions: Returns permissions that a caller has on the
49414// specified resource.
49415func (r *InterconnectAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectAttachmentsTestIamPermissionsCall {
49416	c := &InterconnectAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49417	c.project = project
49418	c.region = region
49419	c.resource = resource
49420	c.testpermissionsrequest = testpermissionsrequest
49421	return c
49422}
49423
49424// Fields allows partial responses to be retrieved. See
49425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49426// for more information.
49427func (c *InterconnectAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsTestIamPermissionsCall {
49428	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49429	return c
49430}
49431
49432// Context sets the context to be used in this call's Do method. Any
49433// pending HTTP request will be aborted if the provided context is
49434// canceled.
49435func (c *InterconnectAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectAttachmentsTestIamPermissionsCall {
49436	c.ctx_ = ctx
49437	return c
49438}
49439
49440// Header returns an http.Header that can be modified by the caller to
49441// add HTTP headers to the request.
49442func (c *InterconnectAttachmentsTestIamPermissionsCall) Header() http.Header {
49443	if c.header_ == nil {
49444		c.header_ = make(http.Header)
49445	}
49446	return c.header_
49447}
49448
49449func (c *InterconnectAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
49450	reqHeaders := make(http.Header)
49451	for k, v := range c.header_ {
49452		reqHeaders[k] = v
49453	}
49454	reqHeaders.Set("User-Agent", c.s.userAgent())
49455	var body io.Reader = nil
49456	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
49457	if err != nil {
49458		return nil, err
49459	}
49460	reqHeaders.Set("Content-Type", "application/json")
49461	c.urlParams_.Set("alt", alt)
49462	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions")
49463	urls += "?" + c.urlParams_.Encode()
49464	req, _ := http.NewRequest("POST", urls, body)
49465	req.Header = reqHeaders
49466	googleapi.Expand(req.URL, map[string]string{
49467		"project":  c.project,
49468		"region":   c.region,
49469		"resource": c.resource,
49470	})
49471	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49472}
49473
49474// Do executes the "compute.interconnectAttachments.testIamPermissions" call.
49475// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
49476// non-2xx status code is an error. Response headers are in either
49477// *TestPermissionsResponse.ServerResponse.Header or (if a response was
49478// returned at all) in error.(*googleapi.Error).Header. Use
49479// googleapi.IsNotModified to check whether the returned error was
49480// because http.StatusNotModified was returned.
49481func (c *InterconnectAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
49482	gensupport.SetOptions(c.urlParams_, opts...)
49483	res, err := c.doRequest("json")
49484	if res != nil && res.StatusCode == http.StatusNotModified {
49485		if res.Body != nil {
49486			res.Body.Close()
49487		}
49488		return nil, &googleapi.Error{
49489			Code:   res.StatusCode,
49490			Header: res.Header,
49491		}
49492	}
49493	if err != nil {
49494		return nil, err
49495	}
49496	defer googleapi.CloseBody(res)
49497	if err := googleapi.CheckResponse(res); err != nil {
49498		return nil, err
49499	}
49500	ret := &TestPermissionsResponse{
49501		ServerResponse: googleapi.ServerResponse{
49502			Header:         res.Header,
49503			HTTPStatusCode: res.StatusCode,
49504		},
49505	}
49506	target := &ret
49507	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
49508		return nil, err
49509	}
49510	return ret, nil
49511	// {
49512	//   "description": "Returns permissions that a caller has on the specified resource.",
49513	//   "httpMethod": "POST",
49514	//   "id": "compute.interconnectAttachments.testIamPermissions",
49515	//   "parameterOrder": [
49516	//     "project",
49517	//     "region",
49518	//     "resource"
49519	//   ],
49520	//   "parameters": {
49521	//     "project": {
49522	//       "description": "Project ID for this request.",
49523	//       "location": "path",
49524	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
49525	//       "required": true,
49526	//       "type": "string"
49527	//     },
49528	//     "region": {
49529	//       "description": "The name of the region for this request.",
49530	//       "location": "path",
49531	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
49532	//       "required": true,
49533	//       "type": "string"
49534	//     },
49535	//     "resource": {
49536	//       "description": "Name of the resource for this request.",
49537	//       "location": "path",
49538	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
49539	//       "required": true,
49540	//       "type": "string"
49541	//     }
49542	//   },
49543	//   "path": "{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions",
49544	//   "request": {
49545	//     "$ref": "TestPermissionsRequest"
49546	//   },
49547	//   "response": {
49548	//     "$ref": "TestPermissionsResponse"
49549	//   },
49550	//   "scopes": [
49551	//     "https://www.googleapis.com/auth/cloud-platform",
49552	//     "https://www.googleapis.com/auth/compute",
49553	//     "https://www.googleapis.com/auth/compute.readonly"
49554	//   ]
49555	// }
49556
49557}
49558
49559// method id "compute.interconnectLocations.get":
49560
49561type InterconnectLocationsGetCall struct {
49562	s                    *Service
49563	project              string
49564	interconnectLocation string
49565	urlParams_           gensupport.URLParams
49566	ifNoneMatch_         string
49567	ctx_                 context.Context
49568	header_              http.Header
49569}
49570
49571// Get: Returns the details for the specified interconnect location. Get
49572// a list of available interconnect locations by making a list()
49573// request.
49574func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall {
49575	c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49576	c.project = project
49577	c.interconnectLocation = interconnectLocation
49578	return c
49579}
49580
49581// Fields allows partial responses to be retrieved. See
49582// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49583// for more information.
49584func (c *InterconnectLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectLocationsGetCall {
49585	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49586	return c
49587}
49588
49589// IfNoneMatch sets the optional parameter which makes the operation
49590// fail if the object's ETag matches the given value. This is useful for
49591// getting updates only after the object has changed since the last
49592// request. Use googleapi.IsNotModified to check whether the response
49593// error from Do is the result of In-None-Match.
49594func (c *InterconnectLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectLocationsGetCall {
49595	c.ifNoneMatch_ = entityTag
49596	return c
49597}
49598
49599// Context sets the context to be used in this call's Do method. Any
49600// pending HTTP request will be aborted if the provided context is
49601// canceled.
49602func (c *InterconnectLocationsGetCall) Context(ctx context.Context) *InterconnectLocationsGetCall {
49603	c.ctx_ = ctx
49604	return c
49605}
49606
49607// Header returns an http.Header that can be modified by the caller to
49608// add HTTP headers to the request.
49609func (c *InterconnectLocationsGetCall) Header() http.Header {
49610	if c.header_ == nil {
49611		c.header_ = make(http.Header)
49612	}
49613	return c.header_
49614}
49615
49616func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) {
49617	reqHeaders := make(http.Header)
49618	for k, v := range c.header_ {
49619		reqHeaders[k] = v
49620	}
49621	reqHeaders.Set("User-Agent", c.s.userAgent())
49622	if c.ifNoneMatch_ != "" {
49623		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49624	}
49625	var body io.Reader = nil
49626	c.urlParams_.Set("alt", alt)
49627	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnectLocations/{interconnectLocation}")
49628	urls += "?" + c.urlParams_.Encode()
49629	req, _ := http.NewRequest("GET", urls, body)
49630	req.Header = reqHeaders
49631	googleapi.Expand(req.URL, map[string]string{
49632		"project":              c.project,
49633		"interconnectLocation": c.interconnectLocation,
49634	})
49635	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49636}
49637
49638// Do executes the "compute.interconnectLocations.get" call.
49639// Exactly one of *InterconnectLocation or error will be non-nil. Any
49640// non-2xx status code is an error. Response headers are in either
49641// *InterconnectLocation.ServerResponse.Header or (if a response was
49642// returned at all) in error.(*googleapi.Error).Header. Use
49643// googleapi.IsNotModified to check whether the returned error was
49644// because http.StatusNotModified was returned.
49645func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectLocation, error) {
49646	gensupport.SetOptions(c.urlParams_, opts...)
49647	res, err := c.doRequest("json")
49648	if res != nil && res.StatusCode == http.StatusNotModified {
49649		if res.Body != nil {
49650			res.Body.Close()
49651		}
49652		return nil, &googleapi.Error{
49653			Code:   res.StatusCode,
49654			Header: res.Header,
49655		}
49656	}
49657	if err != nil {
49658		return nil, err
49659	}
49660	defer googleapi.CloseBody(res)
49661	if err := googleapi.CheckResponse(res); err != nil {
49662		return nil, err
49663	}
49664	ret := &InterconnectLocation{
49665		ServerResponse: googleapi.ServerResponse{
49666			Header:         res.Header,
49667			HTTPStatusCode: res.StatusCode,
49668		},
49669	}
49670	target := &ret
49671	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
49672		return nil, err
49673	}
49674	return ret, nil
49675	// {
49676	//   "description": "Returns the details for the specified interconnect location. Get a list of available interconnect locations by making a list() request.",
49677	//   "httpMethod": "GET",
49678	//   "id": "compute.interconnectLocations.get",
49679	//   "parameterOrder": [
49680	//     "project",
49681	//     "interconnectLocation"
49682	//   ],
49683	//   "parameters": {
49684	//     "interconnectLocation": {
49685	//       "description": "Name of the interconnect location to return.",
49686	//       "location": "path",
49687	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
49688	//       "required": true,
49689	//       "type": "string"
49690	//     },
49691	//     "project": {
49692	//       "description": "Project ID for this request.",
49693	//       "location": "path",
49694	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
49695	//       "required": true,
49696	//       "type": "string"
49697	//     }
49698	//   },
49699	//   "path": "{project}/global/interconnectLocations/{interconnectLocation}",
49700	//   "response": {
49701	//     "$ref": "InterconnectLocation"
49702	//   },
49703	//   "scopes": [
49704	//     "https://www.googleapis.com/auth/cloud-platform",
49705	//     "https://www.googleapis.com/auth/compute",
49706	//     "https://www.googleapis.com/auth/compute.readonly"
49707	//   ]
49708	// }
49709
49710}
49711
49712// method id "compute.interconnectLocations.list":
49713
49714type InterconnectLocationsListCall struct {
49715	s            *Service
49716	project      string
49717	urlParams_   gensupport.URLParams
49718	ifNoneMatch_ string
49719	ctx_         context.Context
49720	header_      http.Header
49721}
49722
49723// List: Retrieves the list of interconnect locations available to the
49724// specified project.
49725func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall {
49726	c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49727	c.project = project
49728	return c
49729}
49730
49731// Filter sets the optional parameter "filter": Sets a filter
49732// {expression} for filtering listed resources. Your {expression} must
49733// be in the format: field_name comparison_string literal_string.
49734//
49735// The field_name is the name of the field you want to compare. Only
49736// atomic field types are supported (string, number, boolean). The
49737// comparison_string must be either eq (equals) or ne (not equals). The
49738// literal_string is the string value to filter to. The literal value
49739// must be valid for the type of field you are filtering by (string,
49740// number, boolean). For string fields, the literal value is interpreted
49741// as a regular expression using RE2 syntax. The literal value must
49742// match the entire field.
49743//
49744// For example, to filter for instances that do not have a name of
49745// example-instance, you would use name ne example-instance.
49746//
49747// You can filter on nested fields. For example, you could filter on
49748// instances that have set the scheduling.automaticRestart field to
49749// true. Use filtering on nested fields to take advantage of labels to
49750// organize and search for results based on label values.
49751//
49752// To filter on multiple expressions, provide each separate expression
49753// within parentheses. For example, (scheduling.automaticRestart eq
49754// true) (zone eq us-central1-f). Multiple expressions are treated as
49755// AND expressions, meaning that resources must match all expressions to
49756// pass the filters.
49757func (c *InterconnectLocationsListCall) Filter(filter string) *InterconnectLocationsListCall {
49758	c.urlParams_.Set("filter", filter)
49759	return c
49760}
49761
49762// MaxResults sets the optional parameter "maxResults": The maximum
49763// number of results per page that should be returned. If the number of
49764// available results is larger than maxResults, Compute Engine returns a
49765// nextPageToken that can be used to get the next page of results in
49766// subsequent list requests. Acceptable values are 0 to 500, inclusive.
49767// (Default: 500)
49768func (c *InterconnectLocationsListCall) MaxResults(maxResults int64) *InterconnectLocationsListCall {
49769	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
49770	return c
49771}
49772
49773// OrderBy sets the optional parameter "orderBy": Sorts list results by
49774// a certain order. By default, results are returned in alphanumerical
49775// order based on the resource name.
49776//
49777// You can also sort results in descending order based on the creation
49778// timestamp using orderBy="creationTimestamp desc". This sorts results
49779// based on the creationTimestamp field in reverse chronological order
49780// (newest result first). Use this to sort resources like operations so
49781// that the newest operation is returned first.
49782//
49783// Currently, only sorting by name or creationTimestamp desc is
49784// supported.
49785func (c *InterconnectLocationsListCall) OrderBy(orderBy string) *InterconnectLocationsListCall {
49786	c.urlParams_.Set("orderBy", orderBy)
49787	return c
49788}
49789
49790// PageToken sets the optional parameter "pageToken": Specifies a page
49791// token to use. Set pageToken to the nextPageToken returned by a
49792// previous list request to get the next page of results.
49793func (c *InterconnectLocationsListCall) PageToken(pageToken string) *InterconnectLocationsListCall {
49794	c.urlParams_.Set("pageToken", pageToken)
49795	return c
49796}
49797
49798// Fields allows partial responses to be retrieved. See
49799// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
49800// for more information.
49801func (c *InterconnectLocationsListCall) Fields(s ...googleapi.Field) *InterconnectLocationsListCall {
49802	c.urlParams_.Set("fields", googleapi.CombineFields(s))
49803	return c
49804}
49805
49806// IfNoneMatch sets the optional parameter which makes the operation
49807// fail if the object's ETag matches the given value. This is useful for
49808// getting updates only after the object has changed since the last
49809// request. Use googleapi.IsNotModified to check whether the response
49810// error from Do is the result of In-None-Match.
49811func (c *InterconnectLocationsListCall) IfNoneMatch(entityTag string) *InterconnectLocationsListCall {
49812	c.ifNoneMatch_ = entityTag
49813	return c
49814}
49815
49816// Context sets the context to be used in this call's Do method. Any
49817// pending HTTP request will be aborted if the provided context is
49818// canceled.
49819func (c *InterconnectLocationsListCall) Context(ctx context.Context) *InterconnectLocationsListCall {
49820	c.ctx_ = ctx
49821	return c
49822}
49823
49824// Header returns an http.Header that can be modified by the caller to
49825// add HTTP headers to the request.
49826func (c *InterconnectLocationsListCall) Header() http.Header {
49827	if c.header_ == nil {
49828		c.header_ = make(http.Header)
49829	}
49830	return c.header_
49831}
49832
49833func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) {
49834	reqHeaders := make(http.Header)
49835	for k, v := range c.header_ {
49836		reqHeaders[k] = v
49837	}
49838	reqHeaders.Set("User-Agent", c.s.userAgent())
49839	if c.ifNoneMatch_ != "" {
49840		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
49841	}
49842	var body io.Reader = nil
49843	c.urlParams_.Set("alt", alt)
49844	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnectLocations")
49845	urls += "?" + c.urlParams_.Encode()
49846	req, _ := http.NewRequest("GET", urls, body)
49847	req.Header = reqHeaders
49848	googleapi.Expand(req.URL, map[string]string{
49849		"project": c.project,
49850	})
49851	return gensupport.SendRequest(c.ctx_, c.s.client, req)
49852}
49853
49854// Do executes the "compute.interconnectLocations.list" call.
49855// Exactly one of *InterconnectLocationList or error will be non-nil.
49856// Any non-2xx status code is an error. Response headers are in either
49857// *InterconnectLocationList.ServerResponse.Header or (if a response was
49858// returned at all) in error.(*googleapi.Error).Header. Use
49859// googleapi.IsNotModified to check whether the returned error was
49860// because http.StatusNotModified was returned.
49861func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectLocationList, error) {
49862	gensupport.SetOptions(c.urlParams_, opts...)
49863	res, err := c.doRequest("json")
49864	if res != nil && res.StatusCode == http.StatusNotModified {
49865		if res.Body != nil {
49866			res.Body.Close()
49867		}
49868		return nil, &googleapi.Error{
49869			Code:   res.StatusCode,
49870			Header: res.Header,
49871		}
49872	}
49873	if err != nil {
49874		return nil, err
49875	}
49876	defer googleapi.CloseBody(res)
49877	if err := googleapi.CheckResponse(res); err != nil {
49878		return nil, err
49879	}
49880	ret := &InterconnectLocationList{
49881		ServerResponse: googleapi.ServerResponse{
49882			Header:         res.Header,
49883			HTTPStatusCode: res.StatusCode,
49884		},
49885	}
49886	target := &ret
49887	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
49888		return nil, err
49889	}
49890	return ret, nil
49891	// {
49892	//   "description": "Retrieves the list of interconnect locations available to the specified project.",
49893	//   "httpMethod": "GET",
49894	//   "id": "compute.interconnectLocations.list",
49895	//   "parameterOrder": [
49896	//     "project"
49897	//   ],
49898	//   "parameters": {
49899	//     "filter": {
49900	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
49901	//       "location": "query",
49902	//       "type": "string"
49903	//     },
49904	//     "maxResults": {
49905	//       "default": "500",
49906	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
49907	//       "format": "uint32",
49908	//       "location": "query",
49909	//       "minimum": "0",
49910	//       "type": "integer"
49911	//     },
49912	//     "orderBy": {
49913	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
49914	//       "location": "query",
49915	//       "type": "string"
49916	//     },
49917	//     "pageToken": {
49918	//       "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.",
49919	//       "location": "query",
49920	//       "type": "string"
49921	//     },
49922	//     "project": {
49923	//       "description": "Project ID for this request.",
49924	//       "location": "path",
49925	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
49926	//       "required": true,
49927	//       "type": "string"
49928	//     }
49929	//   },
49930	//   "path": "{project}/global/interconnectLocations",
49931	//   "response": {
49932	//     "$ref": "InterconnectLocationList"
49933	//   },
49934	//   "scopes": [
49935	//     "https://www.googleapis.com/auth/cloud-platform",
49936	//     "https://www.googleapis.com/auth/compute",
49937	//     "https://www.googleapis.com/auth/compute.readonly"
49938	//   ]
49939	// }
49940
49941}
49942
49943// Pages invokes f for each page of results.
49944// A non-nil error returned from f will halt the iteration.
49945// The provided context supersedes any context provided to the Context method.
49946func (c *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*InterconnectLocationList) error) error {
49947	c.ctx_ = ctx
49948	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
49949	for {
49950		x, err := c.Do()
49951		if err != nil {
49952			return err
49953		}
49954		if err := f(x); err != nil {
49955			return err
49956		}
49957		if x.NextPageToken == "" {
49958			return nil
49959		}
49960		c.PageToken(x.NextPageToken)
49961	}
49962}
49963
49964// method id "compute.interconnects.delete":
49965
49966type InterconnectsDeleteCall struct {
49967	s            *Service
49968	project      string
49969	interconnect string
49970	urlParams_   gensupport.URLParams
49971	ctx_         context.Context
49972	header_      http.Header
49973}
49974
49975// Delete: Deletes the specified interconnect.
49976func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall {
49977	c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
49978	c.project = project
49979	c.interconnect = interconnect
49980	return c
49981}
49982
49983// RequestId sets the optional parameter "requestId": An optional
49984// request ID to identify requests. Specify a unique request ID so that
49985// if you must retry your request, the server will know to ignore the
49986// request if it has already been completed.
49987//
49988// For example, consider a situation where you make an initial request
49989// and the request times out. If you make the request again with the
49990// same request ID, the server can check if original operation with the
49991// same request ID was received, and if so, will ignore the second
49992// request. This prevents clients from accidentally creating duplicate
49993// commitments.
49994//
49995// The request ID must be a valid UUID with the exception that zero UUID
49996// is not supported (00000000-0000-0000-0000-000000000000).
49997func (c *InterconnectsDeleteCall) RequestId(requestId string) *InterconnectsDeleteCall {
49998	c.urlParams_.Set("requestId", requestId)
49999	return c
50000}
50001
50002// Fields allows partial responses to be retrieved. See
50003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50004// for more information.
50005func (c *InterconnectsDeleteCall) Fields(s ...googleapi.Field) *InterconnectsDeleteCall {
50006	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50007	return c
50008}
50009
50010// Context sets the context to be used in this call's Do method. Any
50011// pending HTTP request will be aborted if the provided context is
50012// canceled.
50013func (c *InterconnectsDeleteCall) Context(ctx context.Context) *InterconnectsDeleteCall {
50014	c.ctx_ = ctx
50015	return c
50016}
50017
50018// Header returns an http.Header that can be modified by the caller to
50019// add HTTP headers to the request.
50020func (c *InterconnectsDeleteCall) Header() http.Header {
50021	if c.header_ == nil {
50022		c.header_ = make(http.Header)
50023	}
50024	return c.header_
50025}
50026
50027func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) {
50028	reqHeaders := make(http.Header)
50029	for k, v := range c.header_ {
50030		reqHeaders[k] = v
50031	}
50032	reqHeaders.Set("User-Agent", c.s.userAgent())
50033	var body io.Reader = nil
50034	c.urlParams_.Set("alt", alt)
50035	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}")
50036	urls += "?" + c.urlParams_.Encode()
50037	req, _ := http.NewRequest("DELETE", urls, body)
50038	req.Header = reqHeaders
50039	googleapi.Expand(req.URL, map[string]string{
50040		"project":      c.project,
50041		"interconnect": c.interconnect,
50042	})
50043	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50044}
50045
50046// Do executes the "compute.interconnects.delete" call.
50047// Exactly one of *Operation or error will be non-nil. Any non-2xx
50048// status code is an error. Response headers are in either
50049// *Operation.ServerResponse.Header or (if a response was returned at
50050// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50051// to check whether the returned error was because
50052// http.StatusNotModified was returned.
50053func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
50054	gensupport.SetOptions(c.urlParams_, opts...)
50055	res, err := c.doRequest("json")
50056	if res != nil && res.StatusCode == http.StatusNotModified {
50057		if res.Body != nil {
50058			res.Body.Close()
50059		}
50060		return nil, &googleapi.Error{
50061			Code:   res.StatusCode,
50062			Header: res.Header,
50063		}
50064	}
50065	if err != nil {
50066		return nil, err
50067	}
50068	defer googleapi.CloseBody(res)
50069	if err := googleapi.CheckResponse(res); err != nil {
50070		return nil, err
50071	}
50072	ret := &Operation{
50073		ServerResponse: googleapi.ServerResponse{
50074			Header:         res.Header,
50075			HTTPStatusCode: res.StatusCode,
50076		},
50077	}
50078	target := &ret
50079	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
50080		return nil, err
50081	}
50082	return ret, nil
50083	// {
50084	//   "description": "Deletes the specified interconnect.",
50085	//   "httpMethod": "DELETE",
50086	//   "id": "compute.interconnects.delete",
50087	//   "parameterOrder": [
50088	//     "project",
50089	//     "interconnect"
50090	//   ],
50091	//   "parameters": {
50092	//     "interconnect": {
50093	//       "description": "Name of the interconnect to delete.",
50094	//       "location": "path",
50095	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
50096	//       "required": true,
50097	//       "type": "string"
50098	//     },
50099	//     "project": {
50100	//       "description": "Project ID for this request.",
50101	//       "location": "path",
50102	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
50103	//       "required": true,
50104	//       "type": "string"
50105	//     },
50106	//     "requestId": {
50107	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
50108	//       "location": "query",
50109	//       "type": "string"
50110	//     }
50111	//   },
50112	//   "path": "{project}/global/interconnects/{interconnect}",
50113	//   "response": {
50114	//     "$ref": "Operation"
50115	//   },
50116	//   "scopes": [
50117	//     "https://www.googleapis.com/auth/cloud-platform",
50118	//     "https://www.googleapis.com/auth/compute"
50119	//   ]
50120	// }
50121
50122}
50123
50124// method id "compute.interconnects.get":
50125
50126type InterconnectsGetCall struct {
50127	s            *Service
50128	project      string
50129	interconnect string
50130	urlParams_   gensupport.URLParams
50131	ifNoneMatch_ string
50132	ctx_         context.Context
50133	header_      http.Header
50134}
50135
50136// Get: Returns the specified interconnect. Get a list of available
50137// interconnects by making a list() request.
50138func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall {
50139	c := &InterconnectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50140	c.project = project
50141	c.interconnect = interconnect
50142	return c
50143}
50144
50145// Fields allows partial responses to be retrieved. See
50146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50147// for more information.
50148func (c *InterconnectsGetCall) Fields(s ...googleapi.Field) *InterconnectsGetCall {
50149	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50150	return c
50151}
50152
50153// IfNoneMatch sets the optional parameter which makes the operation
50154// fail if the object's ETag matches the given value. This is useful for
50155// getting updates only after the object has changed since the last
50156// request. Use googleapi.IsNotModified to check whether the response
50157// error from Do is the result of In-None-Match.
50158func (c *InterconnectsGetCall) IfNoneMatch(entityTag string) *InterconnectsGetCall {
50159	c.ifNoneMatch_ = entityTag
50160	return c
50161}
50162
50163// Context sets the context to be used in this call's Do method. Any
50164// pending HTTP request will be aborted if the provided context is
50165// canceled.
50166func (c *InterconnectsGetCall) Context(ctx context.Context) *InterconnectsGetCall {
50167	c.ctx_ = ctx
50168	return c
50169}
50170
50171// Header returns an http.Header that can be modified by the caller to
50172// add HTTP headers to the request.
50173func (c *InterconnectsGetCall) Header() http.Header {
50174	if c.header_ == nil {
50175		c.header_ = make(http.Header)
50176	}
50177	return c.header_
50178}
50179
50180func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) {
50181	reqHeaders := make(http.Header)
50182	for k, v := range c.header_ {
50183		reqHeaders[k] = v
50184	}
50185	reqHeaders.Set("User-Agent", c.s.userAgent())
50186	if c.ifNoneMatch_ != "" {
50187		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50188	}
50189	var body io.Reader = nil
50190	c.urlParams_.Set("alt", alt)
50191	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}")
50192	urls += "?" + c.urlParams_.Encode()
50193	req, _ := http.NewRequest("GET", urls, body)
50194	req.Header = reqHeaders
50195	googleapi.Expand(req.URL, map[string]string{
50196		"project":      c.project,
50197		"interconnect": c.interconnect,
50198	})
50199	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50200}
50201
50202// Do executes the "compute.interconnects.get" call.
50203// Exactly one of *Interconnect or error will be non-nil. Any non-2xx
50204// status code is an error. Response headers are in either
50205// *Interconnect.ServerResponse.Header or (if a response was returned at
50206// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50207// to check whether the returned error was because
50208// http.StatusNotModified was returned.
50209func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, error) {
50210	gensupport.SetOptions(c.urlParams_, opts...)
50211	res, err := c.doRequest("json")
50212	if res != nil && res.StatusCode == http.StatusNotModified {
50213		if res.Body != nil {
50214			res.Body.Close()
50215		}
50216		return nil, &googleapi.Error{
50217			Code:   res.StatusCode,
50218			Header: res.Header,
50219		}
50220	}
50221	if err != nil {
50222		return nil, err
50223	}
50224	defer googleapi.CloseBody(res)
50225	if err := googleapi.CheckResponse(res); err != nil {
50226		return nil, err
50227	}
50228	ret := &Interconnect{
50229		ServerResponse: googleapi.ServerResponse{
50230			Header:         res.Header,
50231			HTTPStatusCode: res.StatusCode,
50232		},
50233	}
50234	target := &ret
50235	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
50236		return nil, err
50237	}
50238	return ret, nil
50239	// {
50240	//   "description": "Returns the specified interconnect. Get a list of available interconnects by making a list() request.",
50241	//   "httpMethod": "GET",
50242	//   "id": "compute.interconnects.get",
50243	//   "parameterOrder": [
50244	//     "project",
50245	//     "interconnect"
50246	//   ],
50247	//   "parameters": {
50248	//     "interconnect": {
50249	//       "description": "Name of the interconnect to return.",
50250	//       "location": "path",
50251	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
50252	//       "required": true,
50253	//       "type": "string"
50254	//     },
50255	//     "project": {
50256	//       "description": "Project ID for this request.",
50257	//       "location": "path",
50258	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
50259	//       "required": true,
50260	//       "type": "string"
50261	//     }
50262	//   },
50263	//   "path": "{project}/global/interconnects/{interconnect}",
50264	//   "response": {
50265	//     "$ref": "Interconnect"
50266	//   },
50267	//   "scopes": [
50268	//     "https://www.googleapis.com/auth/cloud-platform",
50269	//     "https://www.googleapis.com/auth/compute",
50270	//     "https://www.googleapis.com/auth/compute.readonly"
50271	//   ]
50272	// }
50273
50274}
50275
50276// method id "compute.interconnects.insert":
50277
50278type InterconnectsInsertCall struct {
50279	s            *Service
50280	project      string
50281	interconnect *Interconnect
50282	urlParams_   gensupport.URLParams
50283	ctx_         context.Context
50284	header_      http.Header
50285}
50286
50287// Insert: Creates a Interconnect in the specified project using the
50288// data included in the request.
50289func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall {
50290	c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50291	c.project = project
50292	c.interconnect = interconnect
50293	return c
50294}
50295
50296// RequestId sets the optional parameter "requestId": An optional
50297// request ID to identify requests. Specify a unique request ID so that
50298// if you must retry your request, the server will know to ignore the
50299// request if it has already been completed.
50300//
50301// For example, consider a situation where you make an initial request
50302// and the request times out. If you make the request again with the
50303// same request ID, the server can check if original operation with the
50304// same request ID was received, and if so, will ignore the second
50305// request. This prevents clients from accidentally creating duplicate
50306// commitments.
50307//
50308// The request ID must be a valid UUID with the exception that zero UUID
50309// is not supported (00000000-0000-0000-0000-000000000000).
50310func (c *InterconnectsInsertCall) RequestId(requestId string) *InterconnectsInsertCall {
50311	c.urlParams_.Set("requestId", requestId)
50312	return c
50313}
50314
50315// Fields allows partial responses to be retrieved. See
50316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50317// for more information.
50318func (c *InterconnectsInsertCall) Fields(s ...googleapi.Field) *InterconnectsInsertCall {
50319	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50320	return c
50321}
50322
50323// Context sets the context to be used in this call's Do method. Any
50324// pending HTTP request will be aborted if the provided context is
50325// canceled.
50326func (c *InterconnectsInsertCall) Context(ctx context.Context) *InterconnectsInsertCall {
50327	c.ctx_ = ctx
50328	return c
50329}
50330
50331// Header returns an http.Header that can be modified by the caller to
50332// add HTTP headers to the request.
50333func (c *InterconnectsInsertCall) Header() http.Header {
50334	if c.header_ == nil {
50335		c.header_ = make(http.Header)
50336	}
50337	return c.header_
50338}
50339
50340func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) {
50341	reqHeaders := make(http.Header)
50342	for k, v := range c.header_ {
50343		reqHeaders[k] = v
50344	}
50345	reqHeaders.Set("User-Agent", c.s.userAgent())
50346	var body io.Reader = nil
50347	body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnect)
50348	if err != nil {
50349		return nil, err
50350	}
50351	reqHeaders.Set("Content-Type", "application/json")
50352	c.urlParams_.Set("alt", alt)
50353	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects")
50354	urls += "?" + c.urlParams_.Encode()
50355	req, _ := http.NewRequest("POST", urls, body)
50356	req.Header = reqHeaders
50357	googleapi.Expand(req.URL, map[string]string{
50358		"project": c.project,
50359	})
50360	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50361}
50362
50363// Do executes the "compute.interconnects.insert" call.
50364// Exactly one of *Operation or error will be non-nil. Any non-2xx
50365// status code is an error. Response headers are in either
50366// *Operation.ServerResponse.Header or (if a response was returned at
50367// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50368// to check whether the returned error was because
50369// http.StatusNotModified was returned.
50370func (c *InterconnectsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
50371	gensupport.SetOptions(c.urlParams_, opts...)
50372	res, err := c.doRequest("json")
50373	if res != nil && res.StatusCode == http.StatusNotModified {
50374		if res.Body != nil {
50375			res.Body.Close()
50376		}
50377		return nil, &googleapi.Error{
50378			Code:   res.StatusCode,
50379			Header: res.Header,
50380		}
50381	}
50382	if err != nil {
50383		return nil, err
50384	}
50385	defer googleapi.CloseBody(res)
50386	if err := googleapi.CheckResponse(res); err != nil {
50387		return nil, err
50388	}
50389	ret := &Operation{
50390		ServerResponse: googleapi.ServerResponse{
50391			Header:         res.Header,
50392			HTTPStatusCode: res.StatusCode,
50393		},
50394	}
50395	target := &ret
50396	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
50397		return nil, err
50398	}
50399	return ret, nil
50400	// {
50401	//   "description": "Creates a Interconnect in the specified project using the data included in the request.",
50402	//   "httpMethod": "POST",
50403	//   "id": "compute.interconnects.insert",
50404	//   "parameterOrder": [
50405	//     "project"
50406	//   ],
50407	//   "parameters": {
50408	//     "project": {
50409	//       "description": "Project ID for this request.",
50410	//       "location": "path",
50411	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
50412	//       "required": true,
50413	//       "type": "string"
50414	//     },
50415	//     "requestId": {
50416	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
50417	//       "location": "query",
50418	//       "type": "string"
50419	//     }
50420	//   },
50421	//   "path": "{project}/global/interconnects",
50422	//   "request": {
50423	//     "$ref": "Interconnect"
50424	//   },
50425	//   "response": {
50426	//     "$ref": "Operation"
50427	//   },
50428	//   "scopes": [
50429	//     "https://www.googleapis.com/auth/cloud-platform",
50430	//     "https://www.googleapis.com/auth/compute"
50431	//   ]
50432	// }
50433
50434}
50435
50436// method id "compute.interconnects.list":
50437
50438type InterconnectsListCall struct {
50439	s            *Service
50440	project      string
50441	urlParams_   gensupport.URLParams
50442	ifNoneMatch_ string
50443	ctx_         context.Context
50444	header_      http.Header
50445}
50446
50447// List: Retrieves the list of interconnect available to the specified
50448// project.
50449func (r *InterconnectsService) List(project string) *InterconnectsListCall {
50450	c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50451	c.project = project
50452	return c
50453}
50454
50455// Filter sets the optional parameter "filter": Sets a filter
50456// {expression} for filtering listed resources. Your {expression} must
50457// be in the format: field_name comparison_string literal_string.
50458//
50459// The field_name is the name of the field you want to compare. Only
50460// atomic field types are supported (string, number, boolean). The
50461// comparison_string must be either eq (equals) or ne (not equals). The
50462// literal_string is the string value to filter to. The literal value
50463// must be valid for the type of field you are filtering by (string,
50464// number, boolean). For string fields, the literal value is interpreted
50465// as a regular expression using RE2 syntax. The literal value must
50466// match the entire field.
50467//
50468// For example, to filter for instances that do not have a name of
50469// example-instance, you would use name ne example-instance.
50470//
50471// You can filter on nested fields. For example, you could filter on
50472// instances that have set the scheduling.automaticRestart field to
50473// true. Use filtering on nested fields to take advantage of labels to
50474// organize and search for results based on label values.
50475//
50476// To filter on multiple expressions, provide each separate expression
50477// within parentheses. For example, (scheduling.automaticRestart eq
50478// true) (zone eq us-central1-f). Multiple expressions are treated as
50479// AND expressions, meaning that resources must match all expressions to
50480// pass the filters.
50481func (c *InterconnectsListCall) Filter(filter string) *InterconnectsListCall {
50482	c.urlParams_.Set("filter", filter)
50483	return c
50484}
50485
50486// MaxResults sets the optional parameter "maxResults": The maximum
50487// number of results per page that should be returned. If the number of
50488// available results is larger than maxResults, Compute Engine returns a
50489// nextPageToken that can be used to get the next page of results in
50490// subsequent list requests. Acceptable values are 0 to 500, inclusive.
50491// (Default: 500)
50492func (c *InterconnectsListCall) MaxResults(maxResults int64) *InterconnectsListCall {
50493	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
50494	return c
50495}
50496
50497// OrderBy sets the optional parameter "orderBy": Sorts list results by
50498// a certain order. By default, results are returned in alphanumerical
50499// order based on the resource name.
50500//
50501// You can also sort results in descending order based on the creation
50502// timestamp using orderBy="creationTimestamp desc". This sorts results
50503// based on the creationTimestamp field in reverse chronological order
50504// (newest result first). Use this to sort resources like operations so
50505// that the newest operation is returned first.
50506//
50507// Currently, only sorting by name or creationTimestamp desc is
50508// supported.
50509func (c *InterconnectsListCall) OrderBy(orderBy string) *InterconnectsListCall {
50510	c.urlParams_.Set("orderBy", orderBy)
50511	return c
50512}
50513
50514// PageToken sets the optional parameter "pageToken": Specifies a page
50515// token to use. Set pageToken to the nextPageToken returned by a
50516// previous list request to get the next page of results.
50517func (c *InterconnectsListCall) PageToken(pageToken string) *InterconnectsListCall {
50518	c.urlParams_.Set("pageToken", pageToken)
50519	return c
50520}
50521
50522// Fields allows partial responses to be retrieved. See
50523// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50524// for more information.
50525func (c *InterconnectsListCall) Fields(s ...googleapi.Field) *InterconnectsListCall {
50526	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50527	return c
50528}
50529
50530// IfNoneMatch sets the optional parameter which makes the operation
50531// fail if the object's ETag matches the given value. This is useful for
50532// getting updates only after the object has changed since the last
50533// request. Use googleapi.IsNotModified to check whether the response
50534// error from Do is the result of In-None-Match.
50535func (c *InterconnectsListCall) IfNoneMatch(entityTag string) *InterconnectsListCall {
50536	c.ifNoneMatch_ = entityTag
50537	return c
50538}
50539
50540// Context sets the context to be used in this call's Do method. Any
50541// pending HTTP request will be aborted if the provided context is
50542// canceled.
50543func (c *InterconnectsListCall) Context(ctx context.Context) *InterconnectsListCall {
50544	c.ctx_ = ctx
50545	return c
50546}
50547
50548// Header returns an http.Header that can be modified by the caller to
50549// add HTTP headers to the request.
50550func (c *InterconnectsListCall) Header() http.Header {
50551	if c.header_ == nil {
50552		c.header_ = make(http.Header)
50553	}
50554	return c.header_
50555}
50556
50557func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) {
50558	reqHeaders := make(http.Header)
50559	for k, v := range c.header_ {
50560		reqHeaders[k] = v
50561	}
50562	reqHeaders.Set("User-Agent", c.s.userAgent())
50563	if c.ifNoneMatch_ != "" {
50564		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
50565	}
50566	var body io.Reader = nil
50567	c.urlParams_.Set("alt", alt)
50568	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects")
50569	urls += "?" + c.urlParams_.Encode()
50570	req, _ := http.NewRequest("GET", urls, body)
50571	req.Header = reqHeaders
50572	googleapi.Expand(req.URL, map[string]string{
50573		"project": c.project,
50574	})
50575	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50576}
50577
50578// Do executes the "compute.interconnects.list" call.
50579// Exactly one of *InterconnectList or error will be non-nil. Any
50580// non-2xx status code is an error. Response headers are in either
50581// *InterconnectList.ServerResponse.Header or (if a response was
50582// returned at all) in error.(*googleapi.Error).Header. Use
50583// googleapi.IsNotModified to check whether the returned error was
50584// because http.StatusNotModified was returned.
50585func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectList, error) {
50586	gensupport.SetOptions(c.urlParams_, opts...)
50587	res, err := c.doRequest("json")
50588	if res != nil && res.StatusCode == http.StatusNotModified {
50589		if res.Body != nil {
50590			res.Body.Close()
50591		}
50592		return nil, &googleapi.Error{
50593			Code:   res.StatusCode,
50594			Header: res.Header,
50595		}
50596	}
50597	if err != nil {
50598		return nil, err
50599	}
50600	defer googleapi.CloseBody(res)
50601	if err := googleapi.CheckResponse(res); err != nil {
50602		return nil, err
50603	}
50604	ret := &InterconnectList{
50605		ServerResponse: googleapi.ServerResponse{
50606			Header:         res.Header,
50607			HTTPStatusCode: res.StatusCode,
50608		},
50609	}
50610	target := &ret
50611	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
50612		return nil, err
50613	}
50614	return ret, nil
50615	// {
50616	//   "description": "Retrieves the list of interconnect available to the specified project.",
50617	//   "httpMethod": "GET",
50618	//   "id": "compute.interconnects.list",
50619	//   "parameterOrder": [
50620	//     "project"
50621	//   ],
50622	//   "parameters": {
50623	//     "filter": {
50624	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
50625	//       "location": "query",
50626	//       "type": "string"
50627	//     },
50628	//     "maxResults": {
50629	//       "default": "500",
50630	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
50631	//       "format": "uint32",
50632	//       "location": "query",
50633	//       "minimum": "0",
50634	//       "type": "integer"
50635	//     },
50636	//     "orderBy": {
50637	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
50638	//       "location": "query",
50639	//       "type": "string"
50640	//     },
50641	//     "pageToken": {
50642	//       "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.",
50643	//       "location": "query",
50644	//       "type": "string"
50645	//     },
50646	//     "project": {
50647	//       "description": "Project ID for this request.",
50648	//       "location": "path",
50649	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
50650	//       "required": true,
50651	//       "type": "string"
50652	//     }
50653	//   },
50654	//   "path": "{project}/global/interconnects",
50655	//   "response": {
50656	//     "$ref": "InterconnectList"
50657	//   },
50658	//   "scopes": [
50659	//     "https://www.googleapis.com/auth/cloud-platform",
50660	//     "https://www.googleapis.com/auth/compute",
50661	//     "https://www.googleapis.com/auth/compute.readonly"
50662	//   ]
50663	// }
50664
50665}
50666
50667// Pages invokes f for each page of results.
50668// A non-nil error returned from f will halt the iteration.
50669// The provided context supersedes any context provided to the Context method.
50670func (c *InterconnectsListCall) Pages(ctx context.Context, f func(*InterconnectList) error) error {
50671	c.ctx_ = ctx
50672	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
50673	for {
50674		x, err := c.Do()
50675		if err != nil {
50676			return err
50677		}
50678		if err := f(x); err != nil {
50679			return err
50680		}
50681		if x.NextPageToken == "" {
50682			return nil
50683		}
50684		c.PageToken(x.NextPageToken)
50685	}
50686}
50687
50688// method id "compute.interconnects.patch":
50689
50690type InterconnectsPatchCall struct {
50691	s             *Service
50692	project       string
50693	interconnect  string
50694	interconnect2 *Interconnect
50695	urlParams_    gensupport.URLParams
50696	ctx_          context.Context
50697	header_       http.Header
50698}
50699
50700// Patch: Updates the specified interconnect with the data included in
50701// the request. This method supports PATCH semantics and uses the JSON
50702// merge patch format and processing rules.
50703func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall {
50704	c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50705	c.project = project
50706	c.interconnect = interconnect
50707	c.interconnect2 = interconnect2
50708	return c
50709}
50710
50711// RequestId sets the optional parameter "requestId": An optional
50712// request ID to identify requests. Specify a unique request ID so that
50713// if you must retry your request, the server will know to ignore the
50714// request if it has already been completed.
50715//
50716// For example, consider a situation where you make an initial request
50717// and the request times out. If you make the request again with the
50718// same request ID, the server can check if original operation with the
50719// same request ID was received, and if so, will ignore the second
50720// request. This prevents clients from accidentally creating duplicate
50721// commitments.
50722//
50723// The request ID must be a valid UUID with the exception that zero UUID
50724// is not supported (00000000-0000-0000-0000-000000000000).
50725func (c *InterconnectsPatchCall) RequestId(requestId string) *InterconnectsPatchCall {
50726	c.urlParams_.Set("requestId", requestId)
50727	return c
50728}
50729
50730// Fields allows partial responses to be retrieved. See
50731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50732// for more information.
50733func (c *InterconnectsPatchCall) Fields(s ...googleapi.Field) *InterconnectsPatchCall {
50734	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50735	return c
50736}
50737
50738// Context sets the context to be used in this call's Do method. Any
50739// pending HTTP request will be aborted if the provided context is
50740// canceled.
50741func (c *InterconnectsPatchCall) Context(ctx context.Context) *InterconnectsPatchCall {
50742	c.ctx_ = ctx
50743	return c
50744}
50745
50746// Header returns an http.Header that can be modified by the caller to
50747// add HTTP headers to the request.
50748func (c *InterconnectsPatchCall) Header() http.Header {
50749	if c.header_ == nil {
50750		c.header_ = make(http.Header)
50751	}
50752	return c.header_
50753}
50754
50755func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) {
50756	reqHeaders := make(http.Header)
50757	for k, v := range c.header_ {
50758		reqHeaders[k] = v
50759	}
50760	reqHeaders.Set("User-Agent", c.s.userAgent())
50761	var body io.Reader = nil
50762	body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnect2)
50763	if err != nil {
50764		return nil, err
50765	}
50766	reqHeaders.Set("Content-Type", "application/json")
50767	c.urlParams_.Set("alt", alt)
50768	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{interconnect}")
50769	urls += "?" + c.urlParams_.Encode()
50770	req, _ := http.NewRequest("PATCH", urls, body)
50771	req.Header = reqHeaders
50772	googleapi.Expand(req.URL, map[string]string{
50773		"project":      c.project,
50774		"interconnect": c.interconnect,
50775	})
50776	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50777}
50778
50779// Do executes the "compute.interconnects.patch" call.
50780// Exactly one of *Operation or error will be non-nil. Any non-2xx
50781// status code is an error. Response headers are in either
50782// *Operation.ServerResponse.Header or (if a response was returned at
50783// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
50784// to check whether the returned error was because
50785// http.StatusNotModified was returned.
50786func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
50787	gensupport.SetOptions(c.urlParams_, opts...)
50788	res, err := c.doRequest("json")
50789	if res != nil && res.StatusCode == http.StatusNotModified {
50790		if res.Body != nil {
50791			res.Body.Close()
50792		}
50793		return nil, &googleapi.Error{
50794			Code:   res.StatusCode,
50795			Header: res.Header,
50796		}
50797	}
50798	if err != nil {
50799		return nil, err
50800	}
50801	defer googleapi.CloseBody(res)
50802	if err := googleapi.CheckResponse(res); err != nil {
50803		return nil, err
50804	}
50805	ret := &Operation{
50806		ServerResponse: googleapi.ServerResponse{
50807			Header:         res.Header,
50808			HTTPStatusCode: res.StatusCode,
50809		},
50810	}
50811	target := &ret
50812	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
50813		return nil, err
50814	}
50815	return ret, nil
50816	// {
50817	//   "description": "Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
50818	//   "httpMethod": "PATCH",
50819	//   "id": "compute.interconnects.patch",
50820	//   "parameterOrder": [
50821	//     "project",
50822	//     "interconnect"
50823	//   ],
50824	//   "parameters": {
50825	//     "interconnect": {
50826	//       "description": "Name of the interconnect to update.",
50827	//       "location": "path",
50828	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
50829	//       "required": true,
50830	//       "type": "string"
50831	//     },
50832	//     "project": {
50833	//       "description": "Project ID for this request.",
50834	//       "location": "path",
50835	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
50836	//       "required": true,
50837	//       "type": "string"
50838	//     },
50839	//     "requestId": {
50840	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
50841	//       "location": "query",
50842	//       "type": "string"
50843	//     }
50844	//   },
50845	//   "path": "{project}/global/interconnects/{interconnect}",
50846	//   "request": {
50847	//     "$ref": "Interconnect"
50848	//   },
50849	//   "response": {
50850	//     "$ref": "Operation"
50851	//   },
50852	//   "scopes": [
50853	//     "https://www.googleapis.com/auth/cloud-platform",
50854	//     "https://www.googleapis.com/auth/compute"
50855	//   ]
50856	// }
50857
50858}
50859
50860// method id "compute.interconnects.testIamPermissions":
50861
50862type InterconnectsTestIamPermissionsCall struct {
50863	s                      *Service
50864	project                string
50865	resource               string
50866	testpermissionsrequest *TestPermissionsRequest
50867	urlParams_             gensupport.URLParams
50868	ctx_                   context.Context
50869	header_                http.Header
50870}
50871
50872// TestIamPermissions: Returns permissions that a caller has on the
50873// specified resource.
50874func (r *InterconnectsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InterconnectsTestIamPermissionsCall {
50875	c := &InterconnectsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
50876	c.project = project
50877	c.resource = resource
50878	c.testpermissionsrequest = testpermissionsrequest
50879	return c
50880}
50881
50882// Fields allows partial responses to be retrieved. See
50883// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
50884// for more information.
50885func (c *InterconnectsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InterconnectsTestIamPermissionsCall {
50886	c.urlParams_.Set("fields", googleapi.CombineFields(s))
50887	return c
50888}
50889
50890// Context sets the context to be used in this call's Do method. Any
50891// pending HTTP request will be aborted if the provided context is
50892// canceled.
50893func (c *InterconnectsTestIamPermissionsCall) Context(ctx context.Context) *InterconnectsTestIamPermissionsCall {
50894	c.ctx_ = ctx
50895	return c
50896}
50897
50898// Header returns an http.Header that can be modified by the caller to
50899// add HTTP headers to the request.
50900func (c *InterconnectsTestIamPermissionsCall) Header() http.Header {
50901	if c.header_ == nil {
50902		c.header_ = make(http.Header)
50903	}
50904	return c.header_
50905}
50906
50907func (c *InterconnectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
50908	reqHeaders := make(http.Header)
50909	for k, v := range c.header_ {
50910		reqHeaders[k] = v
50911	}
50912	reqHeaders.Set("User-Agent", c.s.userAgent())
50913	var body io.Reader = nil
50914	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
50915	if err != nil {
50916		return nil, err
50917	}
50918	reqHeaders.Set("Content-Type", "application/json")
50919	c.urlParams_.Set("alt", alt)
50920	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/interconnects/{resource}/testIamPermissions")
50921	urls += "?" + c.urlParams_.Encode()
50922	req, _ := http.NewRequest("POST", urls, body)
50923	req.Header = reqHeaders
50924	googleapi.Expand(req.URL, map[string]string{
50925		"project":  c.project,
50926		"resource": c.resource,
50927	})
50928	return gensupport.SendRequest(c.ctx_, c.s.client, req)
50929}
50930
50931// Do executes the "compute.interconnects.testIamPermissions" call.
50932// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
50933// non-2xx status code is an error. Response headers are in either
50934// *TestPermissionsResponse.ServerResponse.Header or (if a response was
50935// returned at all) in error.(*googleapi.Error).Header. Use
50936// googleapi.IsNotModified to check whether the returned error was
50937// because http.StatusNotModified was returned.
50938func (c *InterconnectsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
50939	gensupport.SetOptions(c.urlParams_, opts...)
50940	res, err := c.doRequest("json")
50941	if res != nil && res.StatusCode == http.StatusNotModified {
50942		if res.Body != nil {
50943			res.Body.Close()
50944		}
50945		return nil, &googleapi.Error{
50946			Code:   res.StatusCode,
50947			Header: res.Header,
50948		}
50949	}
50950	if err != nil {
50951		return nil, err
50952	}
50953	defer googleapi.CloseBody(res)
50954	if err := googleapi.CheckResponse(res); err != nil {
50955		return nil, err
50956	}
50957	ret := &TestPermissionsResponse{
50958		ServerResponse: googleapi.ServerResponse{
50959			Header:         res.Header,
50960			HTTPStatusCode: res.StatusCode,
50961		},
50962	}
50963	target := &ret
50964	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
50965		return nil, err
50966	}
50967	return ret, nil
50968	// {
50969	//   "description": "Returns permissions that a caller has on the specified resource.",
50970	//   "httpMethod": "POST",
50971	//   "id": "compute.interconnects.testIamPermissions",
50972	//   "parameterOrder": [
50973	//     "project",
50974	//     "resource"
50975	//   ],
50976	//   "parameters": {
50977	//     "project": {
50978	//       "description": "Project ID for this request.",
50979	//       "location": "path",
50980	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
50981	//       "required": true,
50982	//       "type": "string"
50983	//     },
50984	//     "resource": {
50985	//       "description": "Name of the resource for this request.",
50986	//       "location": "path",
50987	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
50988	//       "required": true,
50989	//       "type": "string"
50990	//     }
50991	//   },
50992	//   "path": "{project}/global/interconnects/{resource}/testIamPermissions",
50993	//   "request": {
50994	//     "$ref": "TestPermissionsRequest"
50995	//   },
50996	//   "response": {
50997	//     "$ref": "TestPermissionsResponse"
50998	//   },
50999	//   "scopes": [
51000	//     "https://www.googleapis.com/auth/cloud-platform",
51001	//     "https://www.googleapis.com/auth/compute",
51002	//     "https://www.googleapis.com/auth/compute.readonly"
51003	//   ]
51004	// }
51005
51006}
51007
51008// method id "compute.licenses.get":
51009
51010type LicensesGetCall struct {
51011	s            *Service
51012	project      string
51013	license      string
51014	urlParams_   gensupport.URLParams
51015	ifNoneMatch_ string
51016	ctx_         context.Context
51017	header_      http.Header
51018}
51019
51020// Get: Returns the specified License resource.
51021// For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get
51022func (r *LicensesService) Get(project string, license string) *LicensesGetCall {
51023	c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51024	c.project = project
51025	c.license = license
51026	return c
51027}
51028
51029// Fields allows partial responses to be retrieved. See
51030// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51031// for more information.
51032func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall {
51033	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51034	return c
51035}
51036
51037// IfNoneMatch sets the optional parameter which makes the operation
51038// fail if the object's ETag matches the given value. This is useful for
51039// getting updates only after the object has changed since the last
51040// request. Use googleapi.IsNotModified to check whether the response
51041// error from Do is the result of In-None-Match.
51042func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall {
51043	c.ifNoneMatch_ = entityTag
51044	return c
51045}
51046
51047// Context sets the context to be used in this call's Do method. Any
51048// pending HTTP request will be aborted if the provided context is
51049// canceled.
51050func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall {
51051	c.ctx_ = ctx
51052	return c
51053}
51054
51055// Header returns an http.Header that can be modified by the caller to
51056// add HTTP headers to the request.
51057func (c *LicensesGetCall) Header() http.Header {
51058	if c.header_ == nil {
51059		c.header_ = make(http.Header)
51060	}
51061	return c.header_
51062}
51063
51064func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) {
51065	reqHeaders := make(http.Header)
51066	for k, v := range c.header_ {
51067		reqHeaders[k] = v
51068	}
51069	reqHeaders.Set("User-Agent", c.s.userAgent())
51070	if c.ifNoneMatch_ != "" {
51071		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51072	}
51073	var body io.Reader = nil
51074	c.urlParams_.Set("alt", alt)
51075	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{license}")
51076	urls += "?" + c.urlParams_.Encode()
51077	req, _ := http.NewRequest("GET", urls, body)
51078	req.Header = reqHeaders
51079	googleapi.Expand(req.URL, map[string]string{
51080		"project": c.project,
51081		"license": c.license,
51082	})
51083	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51084}
51085
51086// Do executes the "compute.licenses.get" call.
51087// Exactly one of *License or error will be non-nil. Any non-2xx status
51088// code is an error. Response headers are in either
51089// *License.ServerResponse.Header or (if a response was returned at all)
51090// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
51091// check whether the returned error was because http.StatusNotModified
51092// was returned.
51093func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) {
51094	gensupport.SetOptions(c.urlParams_, opts...)
51095	res, err := c.doRequest("json")
51096	if res != nil && res.StatusCode == http.StatusNotModified {
51097		if res.Body != nil {
51098			res.Body.Close()
51099		}
51100		return nil, &googleapi.Error{
51101			Code:   res.StatusCode,
51102			Header: res.Header,
51103		}
51104	}
51105	if err != nil {
51106		return nil, err
51107	}
51108	defer googleapi.CloseBody(res)
51109	if err := googleapi.CheckResponse(res); err != nil {
51110		return nil, err
51111	}
51112	ret := &License{
51113		ServerResponse: googleapi.ServerResponse{
51114			Header:         res.Header,
51115			HTTPStatusCode: res.StatusCode,
51116		},
51117	}
51118	target := &ret
51119	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
51120		return nil, err
51121	}
51122	return ret, nil
51123	// {
51124	//   "description": "Returns the specified License resource.",
51125	//   "httpMethod": "GET",
51126	//   "id": "compute.licenses.get",
51127	//   "parameterOrder": [
51128	//     "project",
51129	//     "license"
51130	//   ],
51131	//   "parameters": {
51132	//     "license": {
51133	//       "description": "Name of the License resource to return.",
51134	//       "location": "path",
51135	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
51136	//       "required": true,
51137	//       "type": "string"
51138	//     },
51139	//     "project": {
51140	//       "description": "Project ID for this request.",
51141	//       "location": "path",
51142	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
51143	//       "required": true,
51144	//       "type": "string"
51145	//     }
51146	//   },
51147	//   "path": "{project}/global/licenses/{license}",
51148	//   "response": {
51149	//     "$ref": "License"
51150	//   },
51151	//   "scopes": [
51152	//     "https://www.googleapis.com/auth/cloud-platform",
51153	//     "https://www.googleapis.com/auth/compute",
51154	//     "https://www.googleapis.com/auth/compute.readonly"
51155	//   ]
51156	// }
51157
51158}
51159
51160// method id "compute.machineTypes.aggregatedList":
51161
51162type MachineTypesAggregatedListCall struct {
51163	s            *Service
51164	project      string
51165	urlParams_   gensupport.URLParams
51166	ifNoneMatch_ string
51167	ctx_         context.Context
51168	header_      http.Header
51169}
51170
51171// AggregatedList: Retrieves an aggregated list of machine types.
51172// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList
51173func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall {
51174	c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51175	c.project = project
51176	return c
51177}
51178
51179// Filter sets the optional parameter "filter": Sets a filter
51180// {expression} for filtering listed resources. Your {expression} must
51181// be in the format: field_name comparison_string literal_string.
51182//
51183// The field_name is the name of the field you want to compare. Only
51184// atomic field types are supported (string, number, boolean). The
51185// comparison_string must be either eq (equals) or ne (not equals). The
51186// literal_string is the string value to filter to. The literal value
51187// must be valid for the type of field you are filtering by (string,
51188// number, boolean). For string fields, the literal value is interpreted
51189// as a regular expression using RE2 syntax. The literal value must
51190// match the entire field.
51191//
51192// For example, to filter for instances that do not have a name of
51193// example-instance, you would use name ne example-instance.
51194//
51195// You can filter on nested fields. For example, you could filter on
51196// instances that have set the scheduling.automaticRestart field to
51197// true. Use filtering on nested fields to take advantage of labels to
51198// organize and search for results based on label values.
51199//
51200// To filter on multiple expressions, provide each separate expression
51201// within parentheses. For example, (scheduling.automaticRestart eq
51202// true) (zone eq us-central1-f). Multiple expressions are treated as
51203// AND expressions, meaning that resources must match all expressions to
51204// pass the filters.
51205func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall {
51206	c.urlParams_.Set("filter", filter)
51207	return c
51208}
51209
51210// MaxResults sets the optional parameter "maxResults": The maximum
51211// number of results per page that should be returned. If the number of
51212// available results is larger than maxResults, Compute Engine returns a
51213// nextPageToken that can be used to get the next page of results in
51214// subsequent list requests. Acceptable values are 0 to 500, inclusive.
51215// (Default: 500)
51216func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall {
51217	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
51218	return c
51219}
51220
51221// OrderBy sets the optional parameter "orderBy": Sorts list results by
51222// a certain order. By default, results are returned in alphanumerical
51223// order based on the resource name.
51224//
51225// You can also sort results in descending order based on the creation
51226// timestamp using orderBy="creationTimestamp desc". This sorts results
51227// based on the creationTimestamp field in reverse chronological order
51228// (newest result first). Use this to sort resources like operations so
51229// that the newest operation is returned first.
51230//
51231// Currently, only sorting by name or creationTimestamp desc is
51232// supported.
51233func (c *MachineTypesAggregatedListCall) OrderBy(orderBy string) *MachineTypesAggregatedListCall {
51234	c.urlParams_.Set("orderBy", orderBy)
51235	return c
51236}
51237
51238// PageToken sets the optional parameter "pageToken": Specifies a page
51239// token to use. Set pageToken to the nextPageToken returned by a
51240// previous list request to get the next page of results.
51241func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall {
51242	c.urlParams_.Set("pageToken", pageToken)
51243	return c
51244}
51245
51246// Fields allows partial responses to be retrieved. See
51247// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51248// for more information.
51249func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall {
51250	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51251	return c
51252}
51253
51254// IfNoneMatch sets the optional parameter which makes the operation
51255// fail if the object's ETag matches the given value. This is useful for
51256// getting updates only after the object has changed since the last
51257// request. Use googleapi.IsNotModified to check whether the response
51258// error from Do is the result of In-None-Match.
51259func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall {
51260	c.ifNoneMatch_ = entityTag
51261	return c
51262}
51263
51264// Context sets the context to be used in this call's Do method. Any
51265// pending HTTP request will be aborted if the provided context is
51266// canceled.
51267func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall {
51268	c.ctx_ = ctx
51269	return c
51270}
51271
51272// Header returns an http.Header that can be modified by the caller to
51273// add HTTP headers to the request.
51274func (c *MachineTypesAggregatedListCall) Header() http.Header {
51275	if c.header_ == nil {
51276		c.header_ = make(http.Header)
51277	}
51278	return c.header_
51279}
51280
51281func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
51282	reqHeaders := make(http.Header)
51283	for k, v := range c.header_ {
51284		reqHeaders[k] = v
51285	}
51286	reqHeaders.Set("User-Agent", c.s.userAgent())
51287	if c.ifNoneMatch_ != "" {
51288		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51289	}
51290	var body io.Reader = nil
51291	c.urlParams_.Set("alt", alt)
51292	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/machineTypes")
51293	urls += "?" + c.urlParams_.Encode()
51294	req, _ := http.NewRequest("GET", urls, body)
51295	req.Header = reqHeaders
51296	googleapi.Expand(req.URL, map[string]string{
51297		"project": c.project,
51298	})
51299	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51300}
51301
51302// Do executes the "compute.machineTypes.aggregatedList" call.
51303// Exactly one of *MachineTypeAggregatedList or error will be non-nil.
51304// Any non-2xx status code is an error. Response headers are in either
51305// *MachineTypeAggregatedList.ServerResponse.Header or (if a response
51306// was returned at all) in error.(*googleapi.Error).Header. Use
51307// googleapi.IsNotModified to check whether the returned error was
51308// because http.StatusNotModified was returned.
51309func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, error) {
51310	gensupport.SetOptions(c.urlParams_, opts...)
51311	res, err := c.doRequest("json")
51312	if res != nil && res.StatusCode == http.StatusNotModified {
51313		if res.Body != nil {
51314			res.Body.Close()
51315		}
51316		return nil, &googleapi.Error{
51317			Code:   res.StatusCode,
51318			Header: res.Header,
51319		}
51320	}
51321	if err != nil {
51322		return nil, err
51323	}
51324	defer googleapi.CloseBody(res)
51325	if err := googleapi.CheckResponse(res); err != nil {
51326		return nil, err
51327	}
51328	ret := &MachineTypeAggregatedList{
51329		ServerResponse: googleapi.ServerResponse{
51330			Header:         res.Header,
51331			HTTPStatusCode: res.StatusCode,
51332		},
51333	}
51334	target := &ret
51335	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
51336		return nil, err
51337	}
51338	return ret, nil
51339	// {
51340	//   "description": "Retrieves an aggregated list of machine types.",
51341	//   "httpMethod": "GET",
51342	//   "id": "compute.machineTypes.aggregatedList",
51343	//   "parameterOrder": [
51344	//     "project"
51345	//   ],
51346	//   "parameters": {
51347	//     "filter": {
51348	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
51349	//       "location": "query",
51350	//       "type": "string"
51351	//     },
51352	//     "maxResults": {
51353	//       "default": "500",
51354	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
51355	//       "format": "uint32",
51356	//       "location": "query",
51357	//       "minimum": "0",
51358	//       "type": "integer"
51359	//     },
51360	//     "orderBy": {
51361	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
51362	//       "location": "query",
51363	//       "type": "string"
51364	//     },
51365	//     "pageToken": {
51366	//       "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.",
51367	//       "location": "query",
51368	//       "type": "string"
51369	//     },
51370	//     "project": {
51371	//       "description": "Project ID for this request.",
51372	//       "location": "path",
51373	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
51374	//       "required": true,
51375	//       "type": "string"
51376	//     }
51377	//   },
51378	//   "path": "{project}/aggregated/machineTypes",
51379	//   "response": {
51380	//     "$ref": "MachineTypeAggregatedList"
51381	//   },
51382	//   "scopes": [
51383	//     "https://www.googleapis.com/auth/cloud-platform",
51384	//     "https://www.googleapis.com/auth/compute",
51385	//     "https://www.googleapis.com/auth/compute.readonly"
51386	//   ]
51387	// }
51388
51389}
51390
51391// Pages invokes f for each page of results.
51392// A non-nil error returned from f will halt the iteration.
51393// The provided context supersedes any context provided to the Context method.
51394func (c *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error {
51395	c.ctx_ = ctx
51396	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
51397	for {
51398		x, err := c.Do()
51399		if err != nil {
51400			return err
51401		}
51402		if err := f(x); err != nil {
51403			return err
51404		}
51405		if x.NextPageToken == "" {
51406			return nil
51407		}
51408		c.PageToken(x.NextPageToken)
51409	}
51410}
51411
51412// method id "compute.machineTypes.get":
51413
51414type MachineTypesGetCall struct {
51415	s            *Service
51416	project      string
51417	zone         string
51418	machineType  string
51419	urlParams_   gensupport.URLParams
51420	ifNoneMatch_ string
51421	ctx_         context.Context
51422	header_      http.Header
51423}
51424
51425// Get: Returns the specified machine type. Get a list of available
51426// machine types by making a list() request.
51427// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get
51428func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall {
51429	c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51430	c.project = project
51431	c.zone = zone
51432	c.machineType = machineType
51433	return c
51434}
51435
51436// Fields allows partial responses to be retrieved. See
51437// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51438// for more information.
51439func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall {
51440	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51441	return c
51442}
51443
51444// IfNoneMatch sets the optional parameter which makes the operation
51445// fail if the object's ETag matches the given value. This is useful for
51446// getting updates only after the object has changed since the last
51447// request. Use googleapi.IsNotModified to check whether the response
51448// error from Do is the result of In-None-Match.
51449func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall {
51450	c.ifNoneMatch_ = entityTag
51451	return c
51452}
51453
51454// Context sets the context to be used in this call's Do method. Any
51455// pending HTTP request will be aborted if the provided context is
51456// canceled.
51457func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall {
51458	c.ctx_ = ctx
51459	return c
51460}
51461
51462// Header returns an http.Header that can be modified by the caller to
51463// add HTTP headers to the request.
51464func (c *MachineTypesGetCall) Header() http.Header {
51465	if c.header_ == nil {
51466		c.header_ = make(http.Header)
51467	}
51468	return c.header_
51469}
51470
51471func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) {
51472	reqHeaders := make(http.Header)
51473	for k, v := range c.header_ {
51474		reqHeaders[k] = v
51475	}
51476	reqHeaders.Set("User-Agent", c.s.userAgent())
51477	if c.ifNoneMatch_ != "" {
51478		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51479	}
51480	var body io.Reader = nil
51481	c.urlParams_.Set("alt", alt)
51482	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes/{machineType}")
51483	urls += "?" + c.urlParams_.Encode()
51484	req, _ := http.NewRequest("GET", urls, body)
51485	req.Header = reqHeaders
51486	googleapi.Expand(req.URL, map[string]string{
51487		"project":     c.project,
51488		"zone":        c.zone,
51489		"machineType": c.machineType,
51490	})
51491	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51492}
51493
51494// Do executes the "compute.machineTypes.get" call.
51495// Exactly one of *MachineType or error will be non-nil. Any non-2xx
51496// status code is an error. Response headers are in either
51497// *MachineType.ServerResponse.Header or (if a response was returned at
51498// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
51499// to check whether the returned error was because
51500// http.StatusNotModified was returned.
51501func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, error) {
51502	gensupport.SetOptions(c.urlParams_, opts...)
51503	res, err := c.doRequest("json")
51504	if res != nil && res.StatusCode == http.StatusNotModified {
51505		if res.Body != nil {
51506			res.Body.Close()
51507		}
51508		return nil, &googleapi.Error{
51509			Code:   res.StatusCode,
51510			Header: res.Header,
51511		}
51512	}
51513	if err != nil {
51514		return nil, err
51515	}
51516	defer googleapi.CloseBody(res)
51517	if err := googleapi.CheckResponse(res); err != nil {
51518		return nil, err
51519	}
51520	ret := &MachineType{
51521		ServerResponse: googleapi.ServerResponse{
51522			Header:         res.Header,
51523			HTTPStatusCode: res.StatusCode,
51524		},
51525	}
51526	target := &ret
51527	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
51528		return nil, err
51529	}
51530	return ret, nil
51531	// {
51532	//   "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.",
51533	//   "httpMethod": "GET",
51534	//   "id": "compute.machineTypes.get",
51535	//   "parameterOrder": [
51536	//     "project",
51537	//     "zone",
51538	//     "machineType"
51539	//   ],
51540	//   "parameters": {
51541	//     "machineType": {
51542	//       "description": "Name of the machine type to return.",
51543	//       "location": "path",
51544	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
51545	//       "required": true,
51546	//       "type": "string"
51547	//     },
51548	//     "project": {
51549	//       "description": "Project ID for this request.",
51550	//       "location": "path",
51551	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
51552	//       "required": true,
51553	//       "type": "string"
51554	//     },
51555	//     "zone": {
51556	//       "description": "The name of the zone for this request.",
51557	//       "location": "path",
51558	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
51559	//       "required": true,
51560	//       "type": "string"
51561	//     }
51562	//   },
51563	//   "path": "{project}/zones/{zone}/machineTypes/{machineType}",
51564	//   "response": {
51565	//     "$ref": "MachineType"
51566	//   },
51567	//   "scopes": [
51568	//     "https://www.googleapis.com/auth/cloud-platform",
51569	//     "https://www.googleapis.com/auth/compute",
51570	//     "https://www.googleapis.com/auth/compute.readonly"
51571	//   ]
51572	// }
51573
51574}
51575
51576// method id "compute.machineTypes.list":
51577
51578type MachineTypesListCall struct {
51579	s            *Service
51580	project      string
51581	zone         string
51582	urlParams_   gensupport.URLParams
51583	ifNoneMatch_ string
51584	ctx_         context.Context
51585	header_      http.Header
51586}
51587
51588// List: Retrieves a list of machine types available to the specified
51589// project.
51590// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list
51591func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall {
51592	c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51593	c.project = project
51594	c.zone = zone
51595	return c
51596}
51597
51598// Filter sets the optional parameter "filter": Sets a filter
51599// {expression} for filtering listed resources. Your {expression} must
51600// be in the format: field_name comparison_string literal_string.
51601//
51602// The field_name is the name of the field you want to compare. Only
51603// atomic field types are supported (string, number, boolean). The
51604// comparison_string must be either eq (equals) or ne (not equals). The
51605// literal_string is the string value to filter to. The literal value
51606// must be valid for the type of field you are filtering by (string,
51607// number, boolean). For string fields, the literal value is interpreted
51608// as a regular expression using RE2 syntax. The literal value must
51609// match the entire field.
51610//
51611// For example, to filter for instances that do not have a name of
51612// example-instance, you would use name ne example-instance.
51613//
51614// You can filter on nested fields. For example, you could filter on
51615// instances that have set the scheduling.automaticRestart field to
51616// true. Use filtering on nested fields to take advantage of labels to
51617// organize and search for results based on label values.
51618//
51619// To filter on multiple expressions, provide each separate expression
51620// within parentheses. For example, (scheduling.automaticRestart eq
51621// true) (zone eq us-central1-f). Multiple expressions are treated as
51622// AND expressions, meaning that resources must match all expressions to
51623// pass the filters.
51624func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall {
51625	c.urlParams_.Set("filter", filter)
51626	return c
51627}
51628
51629// MaxResults sets the optional parameter "maxResults": The maximum
51630// number of results per page that should be returned. If the number of
51631// available results is larger than maxResults, Compute Engine returns a
51632// nextPageToken that can be used to get the next page of results in
51633// subsequent list requests. Acceptable values are 0 to 500, inclusive.
51634// (Default: 500)
51635func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall {
51636	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
51637	return c
51638}
51639
51640// OrderBy sets the optional parameter "orderBy": Sorts list results by
51641// a certain order. By default, results are returned in alphanumerical
51642// order based on the resource name.
51643//
51644// You can also sort results in descending order based on the creation
51645// timestamp using orderBy="creationTimestamp desc". This sorts results
51646// based on the creationTimestamp field in reverse chronological order
51647// (newest result first). Use this to sort resources like operations so
51648// that the newest operation is returned first.
51649//
51650// Currently, only sorting by name or creationTimestamp desc is
51651// supported.
51652func (c *MachineTypesListCall) OrderBy(orderBy string) *MachineTypesListCall {
51653	c.urlParams_.Set("orderBy", orderBy)
51654	return c
51655}
51656
51657// PageToken sets the optional parameter "pageToken": Specifies a page
51658// token to use. Set pageToken to the nextPageToken returned by a
51659// previous list request to get the next page of results.
51660func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall {
51661	c.urlParams_.Set("pageToken", pageToken)
51662	return c
51663}
51664
51665// Fields allows partial responses to be retrieved. See
51666// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51667// for more information.
51668func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall {
51669	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51670	return c
51671}
51672
51673// IfNoneMatch sets the optional parameter which makes the operation
51674// fail if the object's ETag matches the given value. This is useful for
51675// getting updates only after the object has changed since the last
51676// request. Use googleapi.IsNotModified to check whether the response
51677// error from Do is the result of In-None-Match.
51678func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall {
51679	c.ifNoneMatch_ = entityTag
51680	return c
51681}
51682
51683// Context sets the context to be used in this call's Do method. Any
51684// pending HTTP request will be aborted if the provided context is
51685// canceled.
51686func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall {
51687	c.ctx_ = ctx
51688	return c
51689}
51690
51691// Header returns an http.Header that can be modified by the caller to
51692// add HTTP headers to the request.
51693func (c *MachineTypesListCall) Header() http.Header {
51694	if c.header_ == nil {
51695		c.header_ = make(http.Header)
51696	}
51697	return c.header_
51698}
51699
51700func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) {
51701	reqHeaders := make(http.Header)
51702	for k, v := range c.header_ {
51703		reqHeaders[k] = v
51704	}
51705	reqHeaders.Set("User-Agent", c.s.userAgent())
51706	if c.ifNoneMatch_ != "" {
51707		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
51708	}
51709	var body io.Reader = nil
51710	c.urlParams_.Set("alt", alt)
51711	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes")
51712	urls += "?" + c.urlParams_.Encode()
51713	req, _ := http.NewRequest("GET", urls, body)
51714	req.Header = reqHeaders
51715	googleapi.Expand(req.URL, map[string]string{
51716		"project": c.project,
51717		"zone":    c.zone,
51718	})
51719	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51720}
51721
51722// Do executes the "compute.machineTypes.list" call.
51723// Exactly one of *MachineTypeList or error will be non-nil. Any non-2xx
51724// status code is an error. Response headers are in either
51725// *MachineTypeList.ServerResponse.Header or (if a response was returned
51726// at all) in error.(*googleapi.Error).Header. Use
51727// googleapi.IsNotModified to check whether the returned error was
51728// because http.StatusNotModified was returned.
51729func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, error) {
51730	gensupport.SetOptions(c.urlParams_, opts...)
51731	res, err := c.doRequest("json")
51732	if res != nil && res.StatusCode == http.StatusNotModified {
51733		if res.Body != nil {
51734			res.Body.Close()
51735		}
51736		return nil, &googleapi.Error{
51737			Code:   res.StatusCode,
51738			Header: res.Header,
51739		}
51740	}
51741	if err != nil {
51742		return nil, err
51743	}
51744	defer googleapi.CloseBody(res)
51745	if err := googleapi.CheckResponse(res); err != nil {
51746		return nil, err
51747	}
51748	ret := &MachineTypeList{
51749		ServerResponse: googleapi.ServerResponse{
51750			Header:         res.Header,
51751			HTTPStatusCode: res.StatusCode,
51752		},
51753	}
51754	target := &ret
51755	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
51756		return nil, err
51757	}
51758	return ret, nil
51759	// {
51760	//   "description": "Retrieves a list of machine types available to the specified project.",
51761	//   "httpMethod": "GET",
51762	//   "id": "compute.machineTypes.list",
51763	//   "parameterOrder": [
51764	//     "project",
51765	//     "zone"
51766	//   ],
51767	//   "parameters": {
51768	//     "filter": {
51769	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
51770	//       "location": "query",
51771	//       "type": "string"
51772	//     },
51773	//     "maxResults": {
51774	//       "default": "500",
51775	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
51776	//       "format": "uint32",
51777	//       "location": "query",
51778	//       "minimum": "0",
51779	//       "type": "integer"
51780	//     },
51781	//     "orderBy": {
51782	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
51783	//       "location": "query",
51784	//       "type": "string"
51785	//     },
51786	//     "pageToken": {
51787	//       "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.",
51788	//       "location": "query",
51789	//       "type": "string"
51790	//     },
51791	//     "project": {
51792	//       "description": "Project ID for this request.",
51793	//       "location": "path",
51794	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
51795	//       "required": true,
51796	//       "type": "string"
51797	//     },
51798	//     "zone": {
51799	//       "description": "The name of the zone for this request.",
51800	//       "location": "path",
51801	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
51802	//       "required": true,
51803	//       "type": "string"
51804	//     }
51805	//   },
51806	//   "path": "{project}/zones/{zone}/machineTypes",
51807	//   "response": {
51808	//     "$ref": "MachineTypeList"
51809	//   },
51810	//   "scopes": [
51811	//     "https://www.googleapis.com/auth/cloud-platform",
51812	//     "https://www.googleapis.com/auth/compute",
51813	//     "https://www.googleapis.com/auth/compute.readonly"
51814	//   ]
51815	// }
51816
51817}
51818
51819// Pages invokes f for each page of results.
51820// A non-nil error returned from f will halt the iteration.
51821// The provided context supersedes any context provided to the Context method.
51822func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error {
51823	c.ctx_ = ctx
51824	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
51825	for {
51826		x, err := c.Do()
51827		if err != nil {
51828			return err
51829		}
51830		if err := f(x); err != nil {
51831			return err
51832		}
51833		if x.NextPageToken == "" {
51834			return nil
51835		}
51836		c.PageToken(x.NextPageToken)
51837	}
51838}
51839
51840// method id "compute.networks.addPeering":
51841
51842type NetworksAddPeeringCall struct {
51843	s                         *Service
51844	project                   string
51845	network                   string
51846	networksaddpeeringrequest *NetworksAddPeeringRequest
51847	urlParams_                gensupport.URLParams
51848	ctx_                      context.Context
51849	header_                   http.Header
51850}
51851
51852// AddPeering: Adds a peering to the specified network.
51853func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall {
51854	c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)}
51855	c.project = project
51856	c.network = network
51857	c.networksaddpeeringrequest = networksaddpeeringrequest
51858	return c
51859}
51860
51861// RequestId sets the optional parameter "requestId": An optional
51862// request ID to identify requests. Specify a unique request ID so that
51863// if you must retry your request, the server will know to ignore the
51864// request if it has already been completed.
51865//
51866// For example, consider a situation where you make an initial request
51867// and the request times out. If you make the request again with the
51868// same request ID, the server can check if original operation with the
51869// same request ID was received, and if so, will ignore the second
51870// request. This prevents clients from accidentally creating duplicate
51871// commitments.
51872//
51873// The request ID must be a valid UUID with the exception that zero UUID
51874// is not supported (00000000-0000-0000-0000-000000000000).
51875func (c *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall {
51876	c.urlParams_.Set("requestId", requestId)
51877	return c
51878}
51879
51880// Fields allows partial responses to be retrieved. See
51881// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
51882// for more information.
51883func (c *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall {
51884	c.urlParams_.Set("fields", googleapi.CombineFields(s))
51885	return c
51886}
51887
51888// Context sets the context to be used in this call's Do method. Any
51889// pending HTTP request will be aborted if the provided context is
51890// canceled.
51891func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall {
51892	c.ctx_ = ctx
51893	return c
51894}
51895
51896// Header returns an http.Header that can be modified by the caller to
51897// add HTTP headers to the request.
51898func (c *NetworksAddPeeringCall) Header() http.Header {
51899	if c.header_ == nil {
51900		c.header_ = make(http.Header)
51901	}
51902	return c.header_
51903}
51904
51905func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) {
51906	reqHeaders := make(http.Header)
51907	for k, v := range c.header_ {
51908		reqHeaders[k] = v
51909	}
51910	reqHeaders.Set("User-Agent", c.s.userAgent())
51911	var body io.Reader = nil
51912	body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksaddpeeringrequest)
51913	if err != nil {
51914		return nil, err
51915	}
51916	reqHeaders.Set("Content-Type", "application/json")
51917	c.urlParams_.Set("alt", alt)
51918	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/addPeering")
51919	urls += "?" + c.urlParams_.Encode()
51920	req, _ := http.NewRequest("POST", urls, body)
51921	req.Header = reqHeaders
51922	googleapi.Expand(req.URL, map[string]string{
51923		"project": c.project,
51924		"network": c.network,
51925	})
51926	return gensupport.SendRequest(c.ctx_, c.s.client, req)
51927}
51928
51929// Do executes the "compute.networks.addPeering" call.
51930// Exactly one of *Operation or error will be non-nil. Any non-2xx
51931// status code is an error. Response headers are in either
51932// *Operation.ServerResponse.Header or (if a response was returned at
51933// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
51934// to check whether the returned error was because
51935// http.StatusNotModified was returned.
51936func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
51937	gensupport.SetOptions(c.urlParams_, opts...)
51938	res, err := c.doRequest("json")
51939	if res != nil && res.StatusCode == http.StatusNotModified {
51940		if res.Body != nil {
51941			res.Body.Close()
51942		}
51943		return nil, &googleapi.Error{
51944			Code:   res.StatusCode,
51945			Header: res.Header,
51946		}
51947	}
51948	if err != nil {
51949		return nil, err
51950	}
51951	defer googleapi.CloseBody(res)
51952	if err := googleapi.CheckResponse(res); err != nil {
51953		return nil, err
51954	}
51955	ret := &Operation{
51956		ServerResponse: googleapi.ServerResponse{
51957			Header:         res.Header,
51958			HTTPStatusCode: res.StatusCode,
51959		},
51960	}
51961	target := &ret
51962	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
51963		return nil, err
51964	}
51965	return ret, nil
51966	// {
51967	//   "description": "Adds a peering to the specified network.",
51968	//   "httpMethod": "POST",
51969	//   "id": "compute.networks.addPeering",
51970	//   "parameterOrder": [
51971	//     "project",
51972	//     "network"
51973	//   ],
51974	//   "parameters": {
51975	//     "network": {
51976	//       "description": "Name of the network resource to add peering to.",
51977	//       "location": "path",
51978	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
51979	//       "required": true,
51980	//       "type": "string"
51981	//     },
51982	//     "project": {
51983	//       "description": "Project ID for this request.",
51984	//       "location": "path",
51985	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
51986	//       "required": true,
51987	//       "type": "string"
51988	//     },
51989	//     "requestId": {
51990	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
51991	//       "location": "query",
51992	//       "type": "string"
51993	//     }
51994	//   },
51995	//   "path": "{project}/global/networks/{network}/addPeering",
51996	//   "request": {
51997	//     "$ref": "NetworksAddPeeringRequest"
51998	//   },
51999	//   "response": {
52000	//     "$ref": "Operation"
52001	//   },
52002	//   "scopes": [
52003	//     "https://www.googleapis.com/auth/cloud-platform",
52004	//     "https://www.googleapis.com/auth/compute"
52005	//   ]
52006	// }
52007
52008}
52009
52010// method id "compute.networks.delete":
52011
52012type NetworksDeleteCall struct {
52013	s          *Service
52014	project    string
52015	network    string
52016	urlParams_ gensupport.URLParams
52017	ctx_       context.Context
52018	header_    http.Header
52019}
52020
52021// Delete: Deletes the specified network.
52022// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete
52023func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall {
52024	c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52025	c.project = project
52026	c.network = network
52027	return c
52028}
52029
52030// RequestId sets the optional parameter "requestId": An optional
52031// request ID to identify requests. Specify a unique request ID so that
52032// if you must retry your request, the server will know to ignore the
52033// request if it has already been completed.
52034//
52035// For example, consider a situation where you make an initial request
52036// and the request times out. If you make the request again with the
52037// same request ID, the server can check if original operation with the
52038// same request ID was received, and if so, will ignore the second
52039// request. This prevents clients from accidentally creating duplicate
52040// commitments.
52041//
52042// The request ID must be a valid UUID with the exception that zero UUID
52043// is not supported (00000000-0000-0000-0000-000000000000).
52044func (c *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall {
52045	c.urlParams_.Set("requestId", requestId)
52046	return c
52047}
52048
52049// Fields allows partial responses to be retrieved. See
52050// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52051// for more information.
52052func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall {
52053	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52054	return c
52055}
52056
52057// Context sets the context to be used in this call's Do method. Any
52058// pending HTTP request will be aborted if the provided context is
52059// canceled.
52060func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall {
52061	c.ctx_ = ctx
52062	return c
52063}
52064
52065// Header returns an http.Header that can be modified by the caller to
52066// add HTTP headers to the request.
52067func (c *NetworksDeleteCall) Header() http.Header {
52068	if c.header_ == nil {
52069		c.header_ = make(http.Header)
52070	}
52071	return c.header_
52072}
52073
52074func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) {
52075	reqHeaders := make(http.Header)
52076	for k, v := range c.header_ {
52077		reqHeaders[k] = v
52078	}
52079	reqHeaders.Set("User-Agent", c.s.userAgent())
52080	var body io.Reader = nil
52081	c.urlParams_.Set("alt", alt)
52082	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}")
52083	urls += "?" + c.urlParams_.Encode()
52084	req, _ := http.NewRequest("DELETE", urls, body)
52085	req.Header = reqHeaders
52086	googleapi.Expand(req.URL, map[string]string{
52087		"project": c.project,
52088		"network": c.network,
52089	})
52090	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52091}
52092
52093// Do executes the "compute.networks.delete" call.
52094// Exactly one of *Operation or error will be non-nil. Any non-2xx
52095// status code is an error. Response headers are in either
52096// *Operation.ServerResponse.Header or (if a response was returned at
52097// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
52098// to check whether the returned error was because
52099// http.StatusNotModified was returned.
52100func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
52101	gensupport.SetOptions(c.urlParams_, opts...)
52102	res, err := c.doRequest("json")
52103	if res != nil && res.StatusCode == http.StatusNotModified {
52104		if res.Body != nil {
52105			res.Body.Close()
52106		}
52107		return nil, &googleapi.Error{
52108			Code:   res.StatusCode,
52109			Header: res.Header,
52110		}
52111	}
52112	if err != nil {
52113		return nil, err
52114	}
52115	defer googleapi.CloseBody(res)
52116	if err := googleapi.CheckResponse(res); err != nil {
52117		return nil, err
52118	}
52119	ret := &Operation{
52120		ServerResponse: googleapi.ServerResponse{
52121			Header:         res.Header,
52122			HTTPStatusCode: res.StatusCode,
52123		},
52124	}
52125	target := &ret
52126	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
52127		return nil, err
52128	}
52129	return ret, nil
52130	// {
52131	//   "description": "Deletes the specified network.",
52132	//   "httpMethod": "DELETE",
52133	//   "id": "compute.networks.delete",
52134	//   "parameterOrder": [
52135	//     "project",
52136	//     "network"
52137	//   ],
52138	//   "parameters": {
52139	//     "network": {
52140	//       "description": "Name of the network to delete.",
52141	//       "location": "path",
52142	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
52143	//       "required": true,
52144	//       "type": "string"
52145	//     },
52146	//     "project": {
52147	//       "description": "Project ID for this request.",
52148	//       "location": "path",
52149	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
52150	//       "required": true,
52151	//       "type": "string"
52152	//     },
52153	//     "requestId": {
52154	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
52155	//       "location": "query",
52156	//       "type": "string"
52157	//     }
52158	//   },
52159	//   "path": "{project}/global/networks/{network}",
52160	//   "response": {
52161	//     "$ref": "Operation"
52162	//   },
52163	//   "scopes": [
52164	//     "https://www.googleapis.com/auth/cloud-platform",
52165	//     "https://www.googleapis.com/auth/compute"
52166	//   ]
52167	// }
52168
52169}
52170
52171// method id "compute.networks.get":
52172
52173type NetworksGetCall struct {
52174	s            *Service
52175	project      string
52176	network      string
52177	urlParams_   gensupport.URLParams
52178	ifNoneMatch_ string
52179	ctx_         context.Context
52180	header_      http.Header
52181}
52182
52183// Get: Returns the specified network. Get a list of available networks
52184// by making a list() request.
52185// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get
52186func (r *NetworksService) Get(project string, network string) *NetworksGetCall {
52187	c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52188	c.project = project
52189	c.network = network
52190	return c
52191}
52192
52193// Fields allows partial responses to be retrieved. See
52194// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52195// for more information.
52196func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall {
52197	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52198	return c
52199}
52200
52201// IfNoneMatch sets the optional parameter which makes the operation
52202// fail if the object's ETag matches the given value. This is useful for
52203// getting updates only after the object has changed since the last
52204// request. Use googleapi.IsNotModified to check whether the response
52205// error from Do is the result of In-None-Match.
52206func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall {
52207	c.ifNoneMatch_ = entityTag
52208	return c
52209}
52210
52211// Context sets the context to be used in this call's Do method. Any
52212// pending HTTP request will be aborted if the provided context is
52213// canceled.
52214func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall {
52215	c.ctx_ = ctx
52216	return c
52217}
52218
52219// Header returns an http.Header that can be modified by the caller to
52220// add HTTP headers to the request.
52221func (c *NetworksGetCall) Header() http.Header {
52222	if c.header_ == nil {
52223		c.header_ = make(http.Header)
52224	}
52225	return c.header_
52226}
52227
52228func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) {
52229	reqHeaders := make(http.Header)
52230	for k, v := range c.header_ {
52231		reqHeaders[k] = v
52232	}
52233	reqHeaders.Set("User-Agent", c.s.userAgent())
52234	if c.ifNoneMatch_ != "" {
52235		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
52236	}
52237	var body io.Reader = nil
52238	c.urlParams_.Set("alt", alt)
52239	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}")
52240	urls += "?" + c.urlParams_.Encode()
52241	req, _ := http.NewRequest("GET", urls, body)
52242	req.Header = reqHeaders
52243	googleapi.Expand(req.URL, map[string]string{
52244		"project": c.project,
52245		"network": c.network,
52246	})
52247	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52248}
52249
52250// Do executes the "compute.networks.get" call.
52251// Exactly one of *Network or error will be non-nil. Any non-2xx status
52252// code is an error. Response headers are in either
52253// *Network.ServerResponse.Header or (if a response was returned at all)
52254// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
52255// check whether the returned error was because http.StatusNotModified
52256// was returned.
52257func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) {
52258	gensupport.SetOptions(c.urlParams_, opts...)
52259	res, err := c.doRequest("json")
52260	if res != nil && res.StatusCode == http.StatusNotModified {
52261		if res.Body != nil {
52262			res.Body.Close()
52263		}
52264		return nil, &googleapi.Error{
52265			Code:   res.StatusCode,
52266			Header: res.Header,
52267		}
52268	}
52269	if err != nil {
52270		return nil, err
52271	}
52272	defer googleapi.CloseBody(res)
52273	if err := googleapi.CheckResponse(res); err != nil {
52274		return nil, err
52275	}
52276	ret := &Network{
52277		ServerResponse: googleapi.ServerResponse{
52278			Header:         res.Header,
52279			HTTPStatusCode: res.StatusCode,
52280		},
52281	}
52282	target := &ret
52283	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
52284		return nil, err
52285	}
52286	return ret, nil
52287	// {
52288	//   "description": "Returns the specified network. Get a list of available networks by making a list() request.",
52289	//   "httpMethod": "GET",
52290	//   "id": "compute.networks.get",
52291	//   "parameterOrder": [
52292	//     "project",
52293	//     "network"
52294	//   ],
52295	//   "parameters": {
52296	//     "network": {
52297	//       "description": "Name of the network to return.",
52298	//       "location": "path",
52299	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
52300	//       "required": true,
52301	//       "type": "string"
52302	//     },
52303	//     "project": {
52304	//       "description": "Project ID for this request.",
52305	//       "location": "path",
52306	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
52307	//       "required": true,
52308	//       "type": "string"
52309	//     }
52310	//   },
52311	//   "path": "{project}/global/networks/{network}",
52312	//   "response": {
52313	//     "$ref": "Network"
52314	//   },
52315	//   "scopes": [
52316	//     "https://www.googleapis.com/auth/cloud-platform",
52317	//     "https://www.googleapis.com/auth/compute",
52318	//     "https://www.googleapis.com/auth/compute.readonly"
52319	//   ]
52320	// }
52321
52322}
52323
52324// method id "compute.networks.insert":
52325
52326type NetworksInsertCall struct {
52327	s          *Service
52328	project    string
52329	network    *Network
52330	urlParams_ gensupport.URLParams
52331	ctx_       context.Context
52332	header_    http.Header
52333}
52334
52335// Insert: Creates a network in the specified project using the data
52336// included in the request.
52337// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert
52338func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall {
52339	c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52340	c.project = project
52341	c.network = network
52342	return c
52343}
52344
52345// RequestId sets the optional parameter "requestId": An optional
52346// request ID to identify requests. Specify a unique request ID so that
52347// if you must retry your request, the server will know to ignore the
52348// request if it has already been completed.
52349//
52350// For example, consider a situation where you make an initial request
52351// and the request times out. If you make the request again with the
52352// same request ID, the server can check if original operation with the
52353// same request ID was received, and if so, will ignore the second
52354// request. This prevents clients from accidentally creating duplicate
52355// commitments.
52356//
52357// The request ID must be a valid UUID with the exception that zero UUID
52358// is not supported (00000000-0000-0000-0000-000000000000).
52359func (c *NetworksInsertCall) RequestId(requestId string) *NetworksInsertCall {
52360	c.urlParams_.Set("requestId", requestId)
52361	return c
52362}
52363
52364// Fields allows partial responses to be retrieved. See
52365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52366// for more information.
52367func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall {
52368	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52369	return c
52370}
52371
52372// Context sets the context to be used in this call's Do method. Any
52373// pending HTTP request will be aborted if the provided context is
52374// canceled.
52375func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall {
52376	c.ctx_ = ctx
52377	return c
52378}
52379
52380// Header returns an http.Header that can be modified by the caller to
52381// add HTTP headers to the request.
52382func (c *NetworksInsertCall) Header() http.Header {
52383	if c.header_ == nil {
52384		c.header_ = make(http.Header)
52385	}
52386	return c.header_
52387}
52388
52389func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) {
52390	reqHeaders := make(http.Header)
52391	for k, v := range c.header_ {
52392		reqHeaders[k] = v
52393	}
52394	reqHeaders.Set("User-Agent", c.s.userAgent())
52395	var body io.Reader = nil
52396	body, err := googleapi.WithoutDataWrapper.JSONReader(c.network)
52397	if err != nil {
52398		return nil, err
52399	}
52400	reqHeaders.Set("Content-Type", "application/json")
52401	c.urlParams_.Set("alt", alt)
52402	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks")
52403	urls += "?" + c.urlParams_.Encode()
52404	req, _ := http.NewRequest("POST", urls, body)
52405	req.Header = reqHeaders
52406	googleapi.Expand(req.URL, map[string]string{
52407		"project": c.project,
52408	})
52409	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52410}
52411
52412// Do executes the "compute.networks.insert" call.
52413// Exactly one of *Operation or error will be non-nil. Any non-2xx
52414// status code is an error. Response headers are in either
52415// *Operation.ServerResponse.Header or (if a response was returned at
52416// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
52417// to check whether the returned error was because
52418// http.StatusNotModified was returned.
52419func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
52420	gensupport.SetOptions(c.urlParams_, opts...)
52421	res, err := c.doRequest("json")
52422	if res != nil && res.StatusCode == http.StatusNotModified {
52423		if res.Body != nil {
52424			res.Body.Close()
52425		}
52426		return nil, &googleapi.Error{
52427			Code:   res.StatusCode,
52428			Header: res.Header,
52429		}
52430	}
52431	if err != nil {
52432		return nil, err
52433	}
52434	defer googleapi.CloseBody(res)
52435	if err := googleapi.CheckResponse(res); err != nil {
52436		return nil, err
52437	}
52438	ret := &Operation{
52439		ServerResponse: googleapi.ServerResponse{
52440			Header:         res.Header,
52441			HTTPStatusCode: res.StatusCode,
52442		},
52443	}
52444	target := &ret
52445	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
52446		return nil, err
52447	}
52448	return ret, nil
52449	// {
52450	//   "description": "Creates a network in the specified project using the data included in the request.",
52451	//   "httpMethod": "POST",
52452	//   "id": "compute.networks.insert",
52453	//   "parameterOrder": [
52454	//     "project"
52455	//   ],
52456	//   "parameters": {
52457	//     "project": {
52458	//       "description": "Project ID for this request.",
52459	//       "location": "path",
52460	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
52461	//       "required": true,
52462	//       "type": "string"
52463	//     },
52464	//     "requestId": {
52465	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
52466	//       "location": "query",
52467	//       "type": "string"
52468	//     }
52469	//   },
52470	//   "path": "{project}/global/networks",
52471	//   "request": {
52472	//     "$ref": "Network"
52473	//   },
52474	//   "response": {
52475	//     "$ref": "Operation"
52476	//   },
52477	//   "scopes": [
52478	//     "https://www.googleapis.com/auth/cloud-platform",
52479	//     "https://www.googleapis.com/auth/compute"
52480	//   ]
52481	// }
52482
52483}
52484
52485// method id "compute.networks.list":
52486
52487type NetworksListCall struct {
52488	s            *Service
52489	project      string
52490	urlParams_   gensupport.URLParams
52491	ifNoneMatch_ string
52492	ctx_         context.Context
52493	header_      http.Header
52494}
52495
52496// List: Retrieves the list of networks available to the specified
52497// project.
52498// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list
52499func (r *NetworksService) List(project string) *NetworksListCall {
52500	c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52501	c.project = project
52502	return c
52503}
52504
52505// Filter sets the optional parameter "filter": Sets a filter
52506// {expression} for filtering listed resources. Your {expression} must
52507// be in the format: field_name comparison_string literal_string.
52508//
52509// The field_name is the name of the field you want to compare. Only
52510// atomic field types are supported (string, number, boolean). The
52511// comparison_string must be either eq (equals) or ne (not equals). The
52512// literal_string is the string value to filter to. The literal value
52513// must be valid for the type of field you are filtering by (string,
52514// number, boolean). For string fields, the literal value is interpreted
52515// as a regular expression using RE2 syntax. The literal value must
52516// match the entire field.
52517//
52518// For example, to filter for instances that do not have a name of
52519// example-instance, you would use name ne example-instance.
52520//
52521// You can filter on nested fields. For example, you could filter on
52522// instances that have set the scheduling.automaticRestart field to
52523// true. Use filtering on nested fields to take advantage of labels to
52524// organize and search for results based on label values.
52525//
52526// To filter on multiple expressions, provide each separate expression
52527// within parentheses. For example, (scheduling.automaticRestart eq
52528// true) (zone eq us-central1-f). Multiple expressions are treated as
52529// AND expressions, meaning that resources must match all expressions to
52530// pass the filters.
52531func (c *NetworksListCall) Filter(filter string) *NetworksListCall {
52532	c.urlParams_.Set("filter", filter)
52533	return c
52534}
52535
52536// MaxResults sets the optional parameter "maxResults": The maximum
52537// number of results per page that should be returned. If the number of
52538// available results is larger than maxResults, Compute Engine returns a
52539// nextPageToken that can be used to get the next page of results in
52540// subsequent list requests. Acceptable values are 0 to 500, inclusive.
52541// (Default: 500)
52542func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall {
52543	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
52544	return c
52545}
52546
52547// OrderBy sets the optional parameter "orderBy": Sorts list results by
52548// a certain order. By default, results are returned in alphanumerical
52549// order based on the resource name.
52550//
52551// You can also sort results in descending order based on the creation
52552// timestamp using orderBy="creationTimestamp desc". This sorts results
52553// based on the creationTimestamp field in reverse chronological order
52554// (newest result first). Use this to sort resources like operations so
52555// that the newest operation is returned first.
52556//
52557// Currently, only sorting by name or creationTimestamp desc is
52558// supported.
52559func (c *NetworksListCall) OrderBy(orderBy string) *NetworksListCall {
52560	c.urlParams_.Set("orderBy", orderBy)
52561	return c
52562}
52563
52564// PageToken sets the optional parameter "pageToken": Specifies a page
52565// token to use. Set pageToken to the nextPageToken returned by a
52566// previous list request to get the next page of results.
52567func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall {
52568	c.urlParams_.Set("pageToken", pageToken)
52569	return c
52570}
52571
52572// Fields allows partial responses to be retrieved. See
52573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52574// for more information.
52575func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall {
52576	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52577	return c
52578}
52579
52580// IfNoneMatch sets the optional parameter which makes the operation
52581// fail if the object's ETag matches the given value. This is useful for
52582// getting updates only after the object has changed since the last
52583// request. Use googleapi.IsNotModified to check whether the response
52584// error from Do is the result of In-None-Match.
52585func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall {
52586	c.ifNoneMatch_ = entityTag
52587	return c
52588}
52589
52590// Context sets the context to be used in this call's Do method. Any
52591// pending HTTP request will be aborted if the provided context is
52592// canceled.
52593func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall {
52594	c.ctx_ = ctx
52595	return c
52596}
52597
52598// Header returns an http.Header that can be modified by the caller to
52599// add HTTP headers to the request.
52600func (c *NetworksListCall) Header() http.Header {
52601	if c.header_ == nil {
52602		c.header_ = make(http.Header)
52603	}
52604	return c.header_
52605}
52606
52607func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) {
52608	reqHeaders := make(http.Header)
52609	for k, v := range c.header_ {
52610		reqHeaders[k] = v
52611	}
52612	reqHeaders.Set("User-Agent", c.s.userAgent())
52613	if c.ifNoneMatch_ != "" {
52614		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
52615	}
52616	var body io.Reader = nil
52617	c.urlParams_.Set("alt", alt)
52618	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks")
52619	urls += "?" + c.urlParams_.Encode()
52620	req, _ := http.NewRequest("GET", urls, body)
52621	req.Header = reqHeaders
52622	googleapi.Expand(req.URL, map[string]string{
52623		"project": c.project,
52624	})
52625	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52626}
52627
52628// Do executes the "compute.networks.list" call.
52629// Exactly one of *NetworkList or error will be non-nil. Any non-2xx
52630// status code is an error. Response headers are in either
52631// *NetworkList.ServerResponse.Header or (if a response was returned at
52632// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
52633// to check whether the returned error was because
52634// http.StatusNotModified was returned.
52635func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error) {
52636	gensupport.SetOptions(c.urlParams_, opts...)
52637	res, err := c.doRequest("json")
52638	if res != nil && res.StatusCode == http.StatusNotModified {
52639		if res.Body != nil {
52640			res.Body.Close()
52641		}
52642		return nil, &googleapi.Error{
52643			Code:   res.StatusCode,
52644			Header: res.Header,
52645		}
52646	}
52647	if err != nil {
52648		return nil, err
52649	}
52650	defer googleapi.CloseBody(res)
52651	if err := googleapi.CheckResponse(res); err != nil {
52652		return nil, err
52653	}
52654	ret := &NetworkList{
52655		ServerResponse: googleapi.ServerResponse{
52656			Header:         res.Header,
52657			HTTPStatusCode: res.StatusCode,
52658		},
52659	}
52660	target := &ret
52661	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
52662		return nil, err
52663	}
52664	return ret, nil
52665	// {
52666	//   "description": "Retrieves the list of networks available to the specified project.",
52667	//   "httpMethod": "GET",
52668	//   "id": "compute.networks.list",
52669	//   "parameterOrder": [
52670	//     "project"
52671	//   ],
52672	//   "parameters": {
52673	//     "filter": {
52674	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
52675	//       "location": "query",
52676	//       "type": "string"
52677	//     },
52678	//     "maxResults": {
52679	//       "default": "500",
52680	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
52681	//       "format": "uint32",
52682	//       "location": "query",
52683	//       "minimum": "0",
52684	//       "type": "integer"
52685	//     },
52686	//     "orderBy": {
52687	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
52688	//       "location": "query",
52689	//       "type": "string"
52690	//     },
52691	//     "pageToken": {
52692	//       "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.",
52693	//       "location": "query",
52694	//       "type": "string"
52695	//     },
52696	//     "project": {
52697	//       "description": "Project ID for this request.",
52698	//       "location": "path",
52699	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
52700	//       "required": true,
52701	//       "type": "string"
52702	//     }
52703	//   },
52704	//   "path": "{project}/global/networks",
52705	//   "response": {
52706	//     "$ref": "NetworkList"
52707	//   },
52708	//   "scopes": [
52709	//     "https://www.googleapis.com/auth/cloud-platform",
52710	//     "https://www.googleapis.com/auth/compute",
52711	//     "https://www.googleapis.com/auth/compute.readonly"
52712	//   ]
52713	// }
52714
52715}
52716
52717// Pages invokes f for each page of results.
52718// A non-nil error returned from f will halt the iteration.
52719// The provided context supersedes any context provided to the Context method.
52720func (c *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error {
52721	c.ctx_ = ctx
52722	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
52723	for {
52724		x, err := c.Do()
52725		if err != nil {
52726			return err
52727		}
52728		if err := f(x); err != nil {
52729			return err
52730		}
52731		if x.NextPageToken == "" {
52732			return nil
52733		}
52734		c.PageToken(x.NextPageToken)
52735	}
52736}
52737
52738// method id "compute.networks.patch":
52739
52740type NetworksPatchCall struct {
52741	s          *Service
52742	project    string
52743	network    string
52744	network2   *Network
52745	urlParams_ gensupport.URLParams
52746	ctx_       context.Context
52747	header_    http.Header
52748}
52749
52750// Patch: Patches the specified network with the data included in the
52751// request.
52752func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall {
52753	c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52754	c.project = project
52755	c.network = network
52756	c.network2 = network2
52757	return c
52758}
52759
52760// RequestId sets the optional parameter "requestId": An optional
52761// request ID to identify requests. Specify a unique request ID so that
52762// if you must retry your request, the server will know to ignore the
52763// request if it has already been completed.
52764//
52765// For example, consider a situation where you make an initial request
52766// and the request times out. If you make the request again with the
52767// same request ID, the server can check if original operation with the
52768// same request ID was received, and if so, will ignore the second
52769// request. This prevents clients from accidentally creating duplicate
52770// commitments.
52771//
52772// The request ID must be a valid UUID with the exception that zero UUID
52773// is not supported (00000000-0000-0000-0000-000000000000).
52774func (c *NetworksPatchCall) RequestId(requestId string) *NetworksPatchCall {
52775	c.urlParams_.Set("requestId", requestId)
52776	return c
52777}
52778
52779// Fields allows partial responses to be retrieved. See
52780// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52781// for more information.
52782func (c *NetworksPatchCall) Fields(s ...googleapi.Field) *NetworksPatchCall {
52783	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52784	return c
52785}
52786
52787// Context sets the context to be used in this call's Do method. Any
52788// pending HTTP request will be aborted if the provided context is
52789// canceled.
52790func (c *NetworksPatchCall) Context(ctx context.Context) *NetworksPatchCall {
52791	c.ctx_ = ctx
52792	return c
52793}
52794
52795// Header returns an http.Header that can be modified by the caller to
52796// add HTTP headers to the request.
52797func (c *NetworksPatchCall) Header() http.Header {
52798	if c.header_ == nil {
52799		c.header_ = make(http.Header)
52800	}
52801	return c.header_
52802}
52803
52804func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) {
52805	reqHeaders := make(http.Header)
52806	for k, v := range c.header_ {
52807		reqHeaders[k] = v
52808	}
52809	reqHeaders.Set("User-Agent", c.s.userAgent())
52810	var body io.Reader = nil
52811	body, err := googleapi.WithoutDataWrapper.JSONReader(c.network2)
52812	if err != nil {
52813		return nil, err
52814	}
52815	reqHeaders.Set("Content-Type", "application/json")
52816	c.urlParams_.Set("alt", alt)
52817	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}")
52818	urls += "?" + c.urlParams_.Encode()
52819	req, _ := http.NewRequest("PATCH", urls, body)
52820	req.Header = reqHeaders
52821	googleapi.Expand(req.URL, map[string]string{
52822		"project": c.project,
52823		"network": c.network,
52824	})
52825	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52826}
52827
52828// Do executes the "compute.networks.patch" call.
52829// Exactly one of *Operation or error will be non-nil. Any non-2xx
52830// status code is an error. Response headers are in either
52831// *Operation.ServerResponse.Header or (if a response was returned at
52832// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
52833// to check whether the returned error was because
52834// http.StatusNotModified was returned.
52835func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
52836	gensupport.SetOptions(c.urlParams_, opts...)
52837	res, err := c.doRequest("json")
52838	if res != nil && res.StatusCode == http.StatusNotModified {
52839		if res.Body != nil {
52840			res.Body.Close()
52841		}
52842		return nil, &googleapi.Error{
52843			Code:   res.StatusCode,
52844			Header: res.Header,
52845		}
52846	}
52847	if err != nil {
52848		return nil, err
52849	}
52850	defer googleapi.CloseBody(res)
52851	if err := googleapi.CheckResponse(res); err != nil {
52852		return nil, err
52853	}
52854	ret := &Operation{
52855		ServerResponse: googleapi.ServerResponse{
52856			Header:         res.Header,
52857			HTTPStatusCode: res.StatusCode,
52858		},
52859	}
52860	target := &ret
52861	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
52862		return nil, err
52863	}
52864	return ret, nil
52865	// {
52866	//   "description": "Patches the specified network with the data included in the request.",
52867	//   "httpMethod": "PATCH",
52868	//   "id": "compute.networks.patch",
52869	//   "parameterOrder": [
52870	//     "project",
52871	//     "network"
52872	//   ],
52873	//   "parameters": {
52874	//     "network": {
52875	//       "description": "Name of the network to update.",
52876	//       "location": "path",
52877	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
52878	//       "required": true,
52879	//       "type": "string"
52880	//     },
52881	//     "project": {
52882	//       "description": "Project ID for this request.",
52883	//       "location": "path",
52884	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
52885	//       "required": true,
52886	//       "type": "string"
52887	//     },
52888	//     "requestId": {
52889	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
52890	//       "location": "query",
52891	//       "type": "string"
52892	//     }
52893	//   },
52894	//   "path": "{project}/global/networks/{network}",
52895	//   "request": {
52896	//     "$ref": "Network"
52897	//   },
52898	//   "response": {
52899	//     "$ref": "Operation"
52900	//   },
52901	//   "scopes": [
52902	//     "https://www.googleapis.com/auth/cloud-platform",
52903	//     "https://www.googleapis.com/auth/compute"
52904	//   ]
52905	// }
52906
52907}
52908
52909// method id "compute.networks.removePeering":
52910
52911type NetworksRemovePeeringCall struct {
52912	s                            *Service
52913	project                      string
52914	network                      string
52915	networksremovepeeringrequest *NetworksRemovePeeringRequest
52916	urlParams_                   gensupport.URLParams
52917	ctx_                         context.Context
52918	header_                      http.Header
52919}
52920
52921// RemovePeering: Removes a peering from the specified network.
52922func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall {
52923	c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)}
52924	c.project = project
52925	c.network = network
52926	c.networksremovepeeringrequest = networksremovepeeringrequest
52927	return c
52928}
52929
52930// RequestId sets the optional parameter "requestId": An optional
52931// request ID to identify requests. Specify a unique request ID so that
52932// if you must retry your request, the server will know to ignore the
52933// request if it has already been completed.
52934//
52935// For example, consider a situation where you make an initial request
52936// and the request times out. If you make the request again with the
52937// same request ID, the server can check if original operation with the
52938// same request ID was received, and if so, will ignore the second
52939// request. This prevents clients from accidentally creating duplicate
52940// commitments.
52941//
52942// The request ID must be a valid UUID with the exception that zero UUID
52943// is not supported (00000000-0000-0000-0000-000000000000).
52944func (c *NetworksRemovePeeringCall) RequestId(requestId string) *NetworksRemovePeeringCall {
52945	c.urlParams_.Set("requestId", requestId)
52946	return c
52947}
52948
52949// Fields allows partial responses to be retrieved. See
52950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
52951// for more information.
52952func (c *NetworksRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRemovePeeringCall {
52953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
52954	return c
52955}
52956
52957// Context sets the context to be used in this call's Do method. Any
52958// pending HTTP request will be aborted if the provided context is
52959// canceled.
52960func (c *NetworksRemovePeeringCall) Context(ctx context.Context) *NetworksRemovePeeringCall {
52961	c.ctx_ = ctx
52962	return c
52963}
52964
52965// Header returns an http.Header that can be modified by the caller to
52966// add HTTP headers to the request.
52967func (c *NetworksRemovePeeringCall) Header() http.Header {
52968	if c.header_ == nil {
52969		c.header_ = make(http.Header)
52970	}
52971	return c.header_
52972}
52973
52974func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) {
52975	reqHeaders := make(http.Header)
52976	for k, v := range c.header_ {
52977		reqHeaders[k] = v
52978	}
52979	reqHeaders.Set("User-Agent", c.s.userAgent())
52980	var body io.Reader = nil
52981	body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksremovepeeringrequest)
52982	if err != nil {
52983		return nil, err
52984	}
52985	reqHeaders.Set("Content-Type", "application/json")
52986	c.urlParams_.Set("alt", alt)
52987	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/removePeering")
52988	urls += "?" + c.urlParams_.Encode()
52989	req, _ := http.NewRequest("POST", urls, body)
52990	req.Header = reqHeaders
52991	googleapi.Expand(req.URL, map[string]string{
52992		"project": c.project,
52993		"network": c.network,
52994	})
52995	return gensupport.SendRequest(c.ctx_, c.s.client, req)
52996}
52997
52998// Do executes the "compute.networks.removePeering" call.
52999// Exactly one of *Operation or error will be non-nil. Any non-2xx
53000// status code is an error. Response headers are in either
53001// *Operation.ServerResponse.Header or (if a response was returned at
53002// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
53003// to check whether the returned error was because
53004// http.StatusNotModified was returned.
53005func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
53006	gensupport.SetOptions(c.urlParams_, opts...)
53007	res, err := c.doRequest("json")
53008	if res != nil && res.StatusCode == http.StatusNotModified {
53009		if res.Body != nil {
53010			res.Body.Close()
53011		}
53012		return nil, &googleapi.Error{
53013			Code:   res.StatusCode,
53014			Header: res.Header,
53015		}
53016	}
53017	if err != nil {
53018		return nil, err
53019	}
53020	defer googleapi.CloseBody(res)
53021	if err := googleapi.CheckResponse(res); err != nil {
53022		return nil, err
53023	}
53024	ret := &Operation{
53025		ServerResponse: googleapi.ServerResponse{
53026			Header:         res.Header,
53027			HTTPStatusCode: res.StatusCode,
53028		},
53029	}
53030	target := &ret
53031	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
53032		return nil, err
53033	}
53034	return ret, nil
53035	// {
53036	//   "description": "Removes a peering from the specified network.",
53037	//   "httpMethod": "POST",
53038	//   "id": "compute.networks.removePeering",
53039	//   "parameterOrder": [
53040	//     "project",
53041	//     "network"
53042	//   ],
53043	//   "parameters": {
53044	//     "network": {
53045	//       "description": "Name of the network resource to remove peering from.",
53046	//       "location": "path",
53047	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
53048	//       "required": true,
53049	//       "type": "string"
53050	//     },
53051	//     "project": {
53052	//       "description": "Project ID for this request.",
53053	//       "location": "path",
53054	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
53055	//       "required": true,
53056	//       "type": "string"
53057	//     },
53058	//     "requestId": {
53059	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
53060	//       "location": "query",
53061	//       "type": "string"
53062	//     }
53063	//   },
53064	//   "path": "{project}/global/networks/{network}/removePeering",
53065	//   "request": {
53066	//     "$ref": "NetworksRemovePeeringRequest"
53067	//   },
53068	//   "response": {
53069	//     "$ref": "Operation"
53070	//   },
53071	//   "scopes": [
53072	//     "https://www.googleapis.com/auth/cloud-platform",
53073	//     "https://www.googleapis.com/auth/compute"
53074	//   ]
53075	// }
53076
53077}
53078
53079// method id "compute.networks.switchToCustomMode":
53080
53081type NetworksSwitchToCustomModeCall struct {
53082	s          *Service
53083	project    string
53084	network    string
53085	urlParams_ gensupport.URLParams
53086	ctx_       context.Context
53087	header_    http.Header
53088}
53089
53090// SwitchToCustomMode: Switches the network mode from auto subnet mode
53091// to custom subnet mode.
53092func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall {
53093	c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
53094	c.project = project
53095	c.network = network
53096	return c
53097}
53098
53099// RequestId sets the optional parameter "requestId": An optional
53100// request ID to identify requests. Specify a unique request ID so that
53101// if you must retry your request, the server will know to ignore the
53102// request if it has already been completed.
53103//
53104// For example, consider a situation where you make an initial request
53105// and the request times out. If you make the request again with the
53106// same request ID, the server can check if original operation with the
53107// same request ID was received, and if so, will ignore the second
53108// request. This prevents clients from accidentally creating duplicate
53109// commitments.
53110//
53111// The request ID must be a valid UUID with the exception that zero UUID
53112// is not supported (00000000-0000-0000-0000-000000000000).
53113func (c *NetworksSwitchToCustomModeCall) RequestId(requestId string) *NetworksSwitchToCustomModeCall {
53114	c.urlParams_.Set("requestId", requestId)
53115	return c
53116}
53117
53118// Fields allows partial responses to be retrieved. See
53119// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
53120// for more information.
53121func (c *NetworksSwitchToCustomModeCall) Fields(s ...googleapi.Field) *NetworksSwitchToCustomModeCall {
53122	c.urlParams_.Set("fields", googleapi.CombineFields(s))
53123	return c
53124}
53125
53126// Context sets the context to be used in this call's Do method. Any
53127// pending HTTP request will be aborted if the provided context is
53128// canceled.
53129func (c *NetworksSwitchToCustomModeCall) Context(ctx context.Context) *NetworksSwitchToCustomModeCall {
53130	c.ctx_ = ctx
53131	return c
53132}
53133
53134// Header returns an http.Header that can be modified by the caller to
53135// add HTTP headers to the request.
53136func (c *NetworksSwitchToCustomModeCall) Header() http.Header {
53137	if c.header_ == nil {
53138		c.header_ = make(http.Header)
53139	}
53140	return c.header_
53141}
53142
53143func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) {
53144	reqHeaders := make(http.Header)
53145	for k, v := range c.header_ {
53146		reqHeaders[k] = v
53147	}
53148	reqHeaders.Set("User-Agent", c.s.userAgent())
53149	var body io.Reader = nil
53150	c.urlParams_.Set("alt", alt)
53151	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}/switchToCustomMode")
53152	urls += "?" + c.urlParams_.Encode()
53153	req, _ := http.NewRequest("POST", urls, body)
53154	req.Header = reqHeaders
53155	googleapi.Expand(req.URL, map[string]string{
53156		"project": c.project,
53157		"network": c.network,
53158	})
53159	return gensupport.SendRequest(c.ctx_, c.s.client, req)
53160}
53161
53162// Do executes the "compute.networks.switchToCustomMode" call.
53163// Exactly one of *Operation or error will be non-nil. Any non-2xx
53164// status code is an error. Response headers are in either
53165// *Operation.ServerResponse.Header or (if a response was returned at
53166// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
53167// to check whether the returned error was because
53168// http.StatusNotModified was returned.
53169func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
53170	gensupport.SetOptions(c.urlParams_, opts...)
53171	res, err := c.doRequest("json")
53172	if res != nil && res.StatusCode == http.StatusNotModified {
53173		if res.Body != nil {
53174			res.Body.Close()
53175		}
53176		return nil, &googleapi.Error{
53177			Code:   res.StatusCode,
53178			Header: res.Header,
53179		}
53180	}
53181	if err != nil {
53182		return nil, err
53183	}
53184	defer googleapi.CloseBody(res)
53185	if err := googleapi.CheckResponse(res); err != nil {
53186		return nil, err
53187	}
53188	ret := &Operation{
53189		ServerResponse: googleapi.ServerResponse{
53190			Header:         res.Header,
53191			HTTPStatusCode: res.StatusCode,
53192		},
53193	}
53194	target := &ret
53195	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
53196		return nil, err
53197	}
53198	return ret, nil
53199	// {
53200	//   "description": "Switches the network mode from auto subnet mode to custom subnet mode.",
53201	//   "httpMethod": "POST",
53202	//   "id": "compute.networks.switchToCustomMode",
53203	//   "parameterOrder": [
53204	//     "project",
53205	//     "network"
53206	//   ],
53207	//   "parameters": {
53208	//     "network": {
53209	//       "description": "Name of the network to be updated.",
53210	//       "location": "path",
53211	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
53212	//       "required": true,
53213	//       "type": "string"
53214	//     },
53215	//     "project": {
53216	//       "description": "Project ID for this request.",
53217	//       "location": "path",
53218	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
53219	//       "required": true,
53220	//       "type": "string"
53221	//     },
53222	//     "requestId": {
53223	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
53224	//       "location": "query",
53225	//       "type": "string"
53226	//     }
53227	//   },
53228	//   "path": "{project}/global/networks/{network}/switchToCustomMode",
53229	//   "response": {
53230	//     "$ref": "Operation"
53231	//   },
53232	//   "scopes": [
53233	//     "https://www.googleapis.com/auth/cloud-platform",
53234	//     "https://www.googleapis.com/auth/compute"
53235	//   ]
53236	// }
53237
53238}
53239
53240// method id "compute.networks.testIamPermissions":
53241
53242type NetworksTestIamPermissionsCall struct {
53243	s                      *Service
53244	project                string
53245	resource               string
53246	testpermissionsrequest *TestPermissionsRequest
53247	urlParams_             gensupport.URLParams
53248	ctx_                   context.Context
53249	header_                http.Header
53250}
53251
53252// TestIamPermissions: Returns permissions that a caller has on the
53253// specified resource.
53254func (r *NetworksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworksTestIamPermissionsCall {
53255	c := &NetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
53256	c.project = project
53257	c.resource = resource
53258	c.testpermissionsrequest = testpermissionsrequest
53259	return c
53260}
53261
53262// Fields allows partial responses to be retrieved. See
53263// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
53264// for more information.
53265func (c *NetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworksTestIamPermissionsCall {
53266	c.urlParams_.Set("fields", googleapi.CombineFields(s))
53267	return c
53268}
53269
53270// Context sets the context to be used in this call's Do method. Any
53271// pending HTTP request will be aborted if the provided context is
53272// canceled.
53273func (c *NetworksTestIamPermissionsCall) Context(ctx context.Context) *NetworksTestIamPermissionsCall {
53274	c.ctx_ = ctx
53275	return c
53276}
53277
53278// Header returns an http.Header that can be modified by the caller to
53279// add HTTP headers to the request.
53280func (c *NetworksTestIamPermissionsCall) Header() http.Header {
53281	if c.header_ == nil {
53282		c.header_ = make(http.Header)
53283	}
53284	return c.header_
53285}
53286
53287func (c *NetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
53288	reqHeaders := make(http.Header)
53289	for k, v := range c.header_ {
53290		reqHeaders[k] = v
53291	}
53292	reqHeaders.Set("User-Agent", c.s.userAgent())
53293	var body io.Reader = nil
53294	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
53295	if err != nil {
53296		return nil, err
53297	}
53298	reqHeaders.Set("Content-Type", "application/json")
53299	c.urlParams_.Set("alt", alt)
53300	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{resource}/testIamPermissions")
53301	urls += "?" + c.urlParams_.Encode()
53302	req, _ := http.NewRequest("POST", urls, body)
53303	req.Header = reqHeaders
53304	googleapi.Expand(req.URL, map[string]string{
53305		"project":  c.project,
53306		"resource": c.resource,
53307	})
53308	return gensupport.SendRequest(c.ctx_, c.s.client, req)
53309}
53310
53311// Do executes the "compute.networks.testIamPermissions" call.
53312// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
53313// non-2xx status code is an error. Response headers are in either
53314// *TestPermissionsResponse.ServerResponse.Header or (if a response was
53315// returned at all) in error.(*googleapi.Error).Header. Use
53316// googleapi.IsNotModified to check whether the returned error was
53317// because http.StatusNotModified was returned.
53318func (c *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
53319	gensupport.SetOptions(c.urlParams_, opts...)
53320	res, err := c.doRequest("json")
53321	if res != nil && res.StatusCode == http.StatusNotModified {
53322		if res.Body != nil {
53323			res.Body.Close()
53324		}
53325		return nil, &googleapi.Error{
53326			Code:   res.StatusCode,
53327			Header: res.Header,
53328		}
53329	}
53330	if err != nil {
53331		return nil, err
53332	}
53333	defer googleapi.CloseBody(res)
53334	if err := googleapi.CheckResponse(res); err != nil {
53335		return nil, err
53336	}
53337	ret := &TestPermissionsResponse{
53338		ServerResponse: googleapi.ServerResponse{
53339			Header:         res.Header,
53340			HTTPStatusCode: res.StatusCode,
53341		},
53342	}
53343	target := &ret
53344	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
53345		return nil, err
53346	}
53347	return ret, nil
53348	// {
53349	//   "description": "Returns permissions that a caller has on the specified resource.",
53350	//   "httpMethod": "POST",
53351	//   "id": "compute.networks.testIamPermissions",
53352	//   "parameterOrder": [
53353	//     "project",
53354	//     "resource"
53355	//   ],
53356	//   "parameters": {
53357	//     "project": {
53358	//       "description": "Project ID for this request.",
53359	//       "location": "path",
53360	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
53361	//       "required": true,
53362	//       "type": "string"
53363	//     },
53364	//     "resource": {
53365	//       "description": "Name of the resource for this request.",
53366	//       "location": "path",
53367	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
53368	//       "required": true,
53369	//       "type": "string"
53370	//     }
53371	//   },
53372	//   "path": "{project}/global/networks/{resource}/testIamPermissions",
53373	//   "request": {
53374	//     "$ref": "TestPermissionsRequest"
53375	//   },
53376	//   "response": {
53377	//     "$ref": "TestPermissionsResponse"
53378	//   },
53379	//   "scopes": [
53380	//     "https://www.googleapis.com/auth/cloud-platform",
53381	//     "https://www.googleapis.com/auth/compute",
53382	//     "https://www.googleapis.com/auth/compute.readonly"
53383	//   ]
53384	// }
53385
53386}
53387
53388// method id "compute.projects.disableXpnHost":
53389
53390type ProjectsDisableXpnHostCall struct {
53391	s          *Service
53392	project    string
53393	urlParams_ gensupport.URLParams
53394	ctx_       context.Context
53395	header_    http.Header
53396}
53397
53398// DisableXpnHost: Disable this project as a shared VPC host project.
53399func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall {
53400	c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)}
53401	c.project = project
53402	return c
53403}
53404
53405// RequestId sets the optional parameter "requestId": An optional
53406// request ID to identify requests. Specify a unique request ID so that
53407// if you must retry your request, the server will know to ignore the
53408// request if it has already been completed.
53409//
53410// For example, consider a situation where you make an initial request
53411// and the request times out. If you make the request again with the
53412// same request ID, the server can check if original operation with the
53413// same request ID was received, and if so, will ignore the second
53414// request. This prevents clients from accidentally creating duplicate
53415// commitments.
53416//
53417// The request ID must be a valid UUID with the exception that zero UUID
53418// is not supported (00000000-0000-0000-0000-000000000000).
53419func (c *ProjectsDisableXpnHostCall) RequestId(requestId string) *ProjectsDisableXpnHostCall {
53420	c.urlParams_.Set("requestId", requestId)
53421	return c
53422}
53423
53424// Fields allows partial responses to be retrieved. See
53425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
53426// for more information.
53427func (c *ProjectsDisableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnHostCall {
53428	c.urlParams_.Set("fields", googleapi.CombineFields(s))
53429	return c
53430}
53431
53432// Context sets the context to be used in this call's Do method. Any
53433// pending HTTP request will be aborted if the provided context is
53434// canceled.
53435func (c *ProjectsDisableXpnHostCall) Context(ctx context.Context) *ProjectsDisableXpnHostCall {
53436	c.ctx_ = ctx
53437	return c
53438}
53439
53440// Header returns an http.Header that can be modified by the caller to
53441// add HTTP headers to the request.
53442func (c *ProjectsDisableXpnHostCall) Header() http.Header {
53443	if c.header_ == nil {
53444		c.header_ = make(http.Header)
53445	}
53446	return c.header_
53447}
53448
53449func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) {
53450	reqHeaders := make(http.Header)
53451	for k, v := range c.header_ {
53452		reqHeaders[k] = v
53453	}
53454	reqHeaders.Set("User-Agent", c.s.userAgent())
53455	var body io.Reader = nil
53456	c.urlParams_.Set("alt", alt)
53457	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnHost")
53458	urls += "?" + c.urlParams_.Encode()
53459	req, _ := http.NewRequest("POST", urls, body)
53460	req.Header = reqHeaders
53461	googleapi.Expand(req.URL, map[string]string{
53462		"project": c.project,
53463	})
53464	return gensupport.SendRequest(c.ctx_, c.s.client, req)
53465}
53466
53467// Do executes the "compute.projects.disableXpnHost" call.
53468// Exactly one of *Operation or error will be non-nil. Any non-2xx
53469// status code is an error. Response headers are in either
53470// *Operation.ServerResponse.Header or (if a response was returned at
53471// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
53472// to check whether the returned error was because
53473// http.StatusNotModified was returned.
53474func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
53475	gensupport.SetOptions(c.urlParams_, opts...)
53476	res, err := c.doRequest("json")
53477	if res != nil && res.StatusCode == http.StatusNotModified {
53478		if res.Body != nil {
53479			res.Body.Close()
53480		}
53481		return nil, &googleapi.Error{
53482			Code:   res.StatusCode,
53483			Header: res.Header,
53484		}
53485	}
53486	if err != nil {
53487		return nil, err
53488	}
53489	defer googleapi.CloseBody(res)
53490	if err := googleapi.CheckResponse(res); err != nil {
53491		return nil, err
53492	}
53493	ret := &Operation{
53494		ServerResponse: googleapi.ServerResponse{
53495			Header:         res.Header,
53496			HTTPStatusCode: res.StatusCode,
53497		},
53498	}
53499	target := &ret
53500	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
53501		return nil, err
53502	}
53503	return ret, nil
53504	// {
53505	//   "description": "Disable this project as a shared VPC host project.",
53506	//   "httpMethod": "POST",
53507	//   "id": "compute.projects.disableXpnHost",
53508	//   "parameterOrder": [
53509	//     "project"
53510	//   ],
53511	//   "parameters": {
53512	//     "project": {
53513	//       "description": "Project ID for this request.",
53514	//       "location": "path",
53515	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
53516	//       "required": true,
53517	//       "type": "string"
53518	//     },
53519	//     "requestId": {
53520	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
53521	//       "location": "query",
53522	//       "type": "string"
53523	//     }
53524	//   },
53525	//   "path": "{project}/disableXpnHost",
53526	//   "response": {
53527	//     "$ref": "Operation"
53528	//   },
53529	//   "scopes": [
53530	//     "https://www.googleapis.com/auth/cloud-platform",
53531	//     "https://www.googleapis.com/auth/compute"
53532	//   ]
53533	// }
53534
53535}
53536
53537// method id "compute.projects.disableXpnResource":
53538
53539type ProjectsDisableXpnResourceCall struct {
53540	s                                 *Service
53541	project                           string
53542	projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest
53543	urlParams_                        gensupport.URLParams
53544	ctx_                              context.Context
53545	header_                           http.Header
53546}
53547
53548// DisableXpnResource: Disable a serivce resource (a.k.a service
53549// project) associated with this host project.
53550func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall {
53551	c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
53552	c.project = project
53553	c.projectsdisablexpnresourcerequest = projectsdisablexpnresourcerequest
53554	return c
53555}
53556
53557// RequestId sets the optional parameter "requestId": An optional
53558// request ID to identify requests. Specify a unique request ID so that
53559// if you must retry your request, the server will know to ignore the
53560// request if it has already been completed.
53561//
53562// For example, consider a situation where you make an initial request
53563// and the request times out. If you make the request again with the
53564// same request ID, the server can check if original operation with the
53565// same request ID was received, and if so, will ignore the second
53566// request. This prevents clients from accidentally creating duplicate
53567// commitments.
53568//
53569// The request ID must be a valid UUID with the exception that zero UUID
53570// is not supported (00000000-0000-0000-0000-000000000000).
53571func (c *ProjectsDisableXpnResourceCall) RequestId(requestId string) *ProjectsDisableXpnResourceCall {
53572	c.urlParams_.Set("requestId", requestId)
53573	return c
53574}
53575
53576// Fields allows partial responses to be retrieved. See
53577// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
53578// for more information.
53579func (c *ProjectsDisableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnResourceCall {
53580	c.urlParams_.Set("fields", googleapi.CombineFields(s))
53581	return c
53582}
53583
53584// Context sets the context to be used in this call's Do method. Any
53585// pending HTTP request will be aborted if the provided context is
53586// canceled.
53587func (c *ProjectsDisableXpnResourceCall) Context(ctx context.Context) *ProjectsDisableXpnResourceCall {
53588	c.ctx_ = ctx
53589	return c
53590}
53591
53592// Header returns an http.Header that can be modified by the caller to
53593// add HTTP headers to the request.
53594func (c *ProjectsDisableXpnResourceCall) Header() http.Header {
53595	if c.header_ == nil {
53596		c.header_ = make(http.Header)
53597	}
53598	return c.header_
53599}
53600
53601func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) {
53602	reqHeaders := make(http.Header)
53603	for k, v := range c.header_ {
53604		reqHeaders[k] = v
53605	}
53606	reqHeaders.Set("User-Agent", c.s.userAgent())
53607	var body io.Reader = nil
53608	body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsdisablexpnresourcerequest)
53609	if err != nil {
53610		return nil, err
53611	}
53612	reqHeaders.Set("Content-Type", "application/json")
53613	c.urlParams_.Set("alt", alt)
53614	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/disableXpnResource")
53615	urls += "?" + c.urlParams_.Encode()
53616	req, _ := http.NewRequest("POST", urls, body)
53617	req.Header = reqHeaders
53618	googleapi.Expand(req.URL, map[string]string{
53619		"project": c.project,
53620	})
53621	return gensupport.SendRequest(c.ctx_, c.s.client, req)
53622}
53623
53624// Do executes the "compute.projects.disableXpnResource" call.
53625// Exactly one of *Operation or error will be non-nil. Any non-2xx
53626// status code is an error. Response headers are in either
53627// *Operation.ServerResponse.Header or (if a response was returned at
53628// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
53629// to check whether the returned error was because
53630// http.StatusNotModified was returned.
53631func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
53632	gensupport.SetOptions(c.urlParams_, opts...)
53633	res, err := c.doRequest("json")
53634	if res != nil && res.StatusCode == http.StatusNotModified {
53635		if res.Body != nil {
53636			res.Body.Close()
53637		}
53638		return nil, &googleapi.Error{
53639			Code:   res.StatusCode,
53640			Header: res.Header,
53641		}
53642	}
53643	if err != nil {
53644		return nil, err
53645	}
53646	defer googleapi.CloseBody(res)
53647	if err := googleapi.CheckResponse(res); err != nil {
53648		return nil, err
53649	}
53650	ret := &Operation{
53651		ServerResponse: googleapi.ServerResponse{
53652			Header:         res.Header,
53653			HTTPStatusCode: res.StatusCode,
53654		},
53655	}
53656	target := &ret
53657	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
53658		return nil, err
53659	}
53660	return ret, nil
53661	// {
53662	//   "description": "Disable a serivce resource (a.k.a service project) associated with this host project.",
53663	//   "httpMethod": "POST",
53664	//   "id": "compute.projects.disableXpnResource",
53665	//   "parameterOrder": [
53666	//     "project"
53667	//   ],
53668	//   "parameters": {
53669	//     "project": {
53670	//       "description": "Project ID for this request.",
53671	//       "location": "path",
53672	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
53673	//       "required": true,
53674	//       "type": "string"
53675	//     },
53676	//     "requestId": {
53677	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
53678	//       "location": "query",
53679	//       "type": "string"
53680	//     }
53681	//   },
53682	//   "path": "{project}/disableXpnResource",
53683	//   "request": {
53684	//     "$ref": "ProjectsDisableXpnResourceRequest"
53685	//   },
53686	//   "response": {
53687	//     "$ref": "Operation"
53688	//   },
53689	//   "scopes": [
53690	//     "https://www.googleapis.com/auth/cloud-platform",
53691	//     "https://www.googleapis.com/auth/compute"
53692	//   ]
53693	// }
53694
53695}
53696
53697// method id "compute.projects.enableXpnHost":
53698
53699type ProjectsEnableXpnHostCall struct {
53700	s          *Service
53701	project    string
53702	urlParams_ gensupport.URLParams
53703	ctx_       context.Context
53704	header_    http.Header
53705}
53706
53707// EnableXpnHost: Enable this project as a shared VPC host project.
53708func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall {
53709	c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)}
53710	c.project = project
53711	return c
53712}
53713
53714// RequestId sets the optional parameter "requestId": An optional
53715// request ID to identify requests. Specify a unique request ID so that
53716// if you must retry your request, the server will know to ignore the
53717// request if it has already been completed.
53718//
53719// For example, consider a situation where you make an initial request
53720// and the request times out. If you make the request again with the
53721// same request ID, the server can check if original operation with the
53722// same request ID was received, and if so, will ignore the second
53723// request. This prevents clients from accidentally creating duplicate
53724// commitments.
53725//
53726// The request ID must be a valid UUID with the exception that zero UUID
53727// is not supported (00000000-0000-0000-0000-000000000000).
53728func (c *ProjectsEnableXpnHostCall) RequestId(requestId string) *ProjectsEnableXpnHostCall {
53729	c.urlParams_.Set("requestId", requestId)
53730	return c
53731}
53732
53733// Fields allows partial responses to be retrieved. See
53734// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
53735// for more information.
53736func (c *ProjectsEnableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnHostCall {
53737	c.urlParams_.Set("fields", googleapi.CombineFields(s))
53738	return c
53739}
53740
53741// Context sets the context to be used in this call's Do method. Any
53742// pending HTTP request will be aborted if the provided context is
53743// canceled.
53744func (c *ProjectsEnableXpnHostCall) Context(ctx context.Context) *ProjectsEnableXpnHostCall {
53745	c.ctx_ = ctx
53746	return c
53747}
53748
53749// Header returns an http.Header that can be modified by the caller to
53750// add HTTP headers to the request.
53751func (c *ProjectsEnableXpnHostCall) Header() http.Header {
53752	if c.header_ == nil {
53753		c.header_ = make(http.Header)
53754	}
53755	return c.header_
53756}
53757
53758func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) {
53759	reqHeaders := make(http.Header)
53760	for k, v := range c.header_ {
53761		reqHeaders[k] = v
53762	}
53763	reqHeaders.Set("User-Agent", c.s.userAgent())
53764	var body io.Reader = nil
53765	c.urlParams_.Set("alt", alt)
53766	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnHost")
53767	urls += "?" + c.urlParams_.Encode()
53768	req, _ := http.NewRequest("POST", urls, body)
53769	req.Header = reqHeaders
53770	googleapi.Expand(req.URL, map[string]string{
53771		"project": c.project,
53772	})
53773	return gensupport.SendRequest(c.ctx_, c.s.client, req)
53774}
53775
53776// Do executes the "compute.projects.enableXpnHost" call.
53777// Exactly one of *Operation or error will be non-nil. Any non-2xx
53778// status code is an error. Response headers are in either
53779// *Operation.ServerResponse.Header or (if a response was returned at
53780// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
53781// to check whether the returned error was because
53782// http.StatusNotModified was returned.
53783func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
53784	gensupport.SetOptions(c.urlParams_, opts...)
53785	res, err := c.doRequest("json")
53786	if res != nil && res.StatusCode == http.StatusNotModified {
53787		if res.Body != nil {
53788			res.Body.Close()
53789		}
53790		return nil, &googleapi.Error{
53791			Code:   res.StatusCode,
53792			Header: res.Header,
53793		}
53794	}
53795	if err != nil {
53796		return nil, err
53797	}
53798	defer googleapi.CloseBody(res)
53799	if err := googleapi.CheckResponse(res); err != nil {
53800		return nil, err
53801	}
53802	ret := &Operation{
53803		ServerResponse: googleapi.ServerResponse{
53804			Header:         res.Header,
53805			HTTPStatusCode: res.StatusCode,
53806		},
53807	}
53808	target := &ret
53809	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
53810		return nil, err
53811	}
53812	return ret, nil
53813	// {
53814	//   "description": "Enable this project as a shared VPC host project.",
53815	//   "httpMethod": "POST",
53816	//   "id": "compute.projects.enableXpnHost",
53817	//   "parameterOrder": [
53818	//     "project"
53819	//   ],
53820	//   "parameters": {
53821	//     "project": {
53822	//       "description": "Project ID for this request.",
53823	//       "location": "path",
53824	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
53825	//       "required": true,
53826	//       "type": "string"
53827	//     },
53828	//     "requestId": {
53829	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
53830	//       "location": "query",
53831	//       "type": "string"
53832	//     }
53833	//   },
53834	//   "path": "{project}/enableXpnHost",
53835	//   "response": {
53836	//     "$ref": "Operation"
53837	//   },
53838	//   "scopes": [
53839	//     "https://www.googleapis.com/auth/cloud-platform",
53840	//     "https://www.googleapis.com/auth/compute"
53841	//   ]
53842	// }
53843
53844}
53845
53846// method id "compute.projects.enableXpnResource":
53847
53848type ProjectsEnableXpnResourceCall struct {
53849	s                                *Service
53850	project                          string
53851	projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest
53852	urlParams_                       gensupport.URLParams
53853	ctx_                             context.Context
53854	header_                          http.Header
53855}
53856
53857// EnableXpnResource: Enable service resource (a.k.a service project)
53858// for a host project, so that subnets in the host project can be used
53859// by instances in the service project.
53860func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall {
53861	c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
53862	c.project = project
53863	c.projectsenablexpnresourcerequest = projectsenablexpnresourcerequest
53864	return c
53865}
53866
53867// RequestId sets the optional parameter "requestId": An optional
53868// request ID to identify requests. Specify a unique request ID so that
53869// if you must retry your request, the server will know to ignore the
53870// request if it has already been completed.
53871//
53872// For example, consider a situation where you make an initial request
53873// and the request times out. If you make the request again with the
53874// same request ID, the server can check if original operation with the
53875// same request ID was received, and if so, will ignore the second
53876// request. This prevents clients from accidentally creating duplicate
53877// commitments.
53878//
53879// The request ID must be a valid UUID with the exception that zero UUID
53880// is not supported (00000000-0000-0000-0000-000000000000).
53881func (c *ProjectsEnableXpnResourceCall) RequestId(requestId string) *ProjectsEnableXpnResourceCall {
53882	c.urlParams_.Set("requestId", requestId)
53883	return c
53884}
53885
53886// Fields allows partial responses to be retrieved. See
53887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
53888// for more information.
53889func (c *ProjectsEnableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnResourceCall {
53890	c.urlParams_.Set("fields", googleapi.CombineFields(s))
53891	return c
53892}
53893
53894// Context sets the context to be used in this call's Do method. Any
53895// pending HTTP request will be aborted if the provided context is
53896// canceled.
53897func (c *ProjectsEnableXpnResourceCall) Context(ctx context.Context) *ProjectsEnableXpnResourceCall {
53898	c.ctx_ = ctx
53899	return c
53900}
53901
53902// Header returns an http.Header that can be modified by the caller to
53903// add HTTP headers to the request.
53904func (c *ProjectsEnableXpnResourceCall) Header() http.Header {
53905	if c.header_ == nil {
53906		c.header_ = make(http.Header)
53907	}
53908	return c.header_
53909}
53910
53911func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) {
53912	reqHeaders := make(http.Header)
53913	for k, v := range c.header_ {
53914		reqHeaders[k] = v
53915	}
53916	reqHeaders.Set("User-Agent", c.s.userAgent())
53917	var body io.Reader = nil
53918	body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsenablexpnresourcerequest)
53919	if err != nil {
53920		return nil, err
53921	}
53922	reqHeaders.Set("Content-Type", "application/json")
53923	c.urlParams_.Set("alt", alt)
53924	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/enableXpnResource")
53925	urls += "?" + c.urlParams_.Encode()
53926	req, _ := http.NewRequest("POST", urls, body)
53927	req.Header = reqHeaders
53928	googleapi.Expand(req.URL, map[string]string{
53929		"project": c.project,
53930	})
53931	return gensupport.SendRequest(c.ctx_, c.s.client, req)
53932}
53933
53934// Do executes the "compute.projects.enableXpnResource" call.
53935// Exactly one of *Operation or error will be non-nil. Any non-2xx
53936// status code is an error. Response headers are in either
53937// *Operation.ServerResponse.Header or (if a response was returned at
53938// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
53939// to check whether the returned error was because
53940// http.StatusNotModified was returned.
53941func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
53942	gensupport.SetOptions(c.urlParams_, opts...)
53943	res, err := c.doRequest("json")
53944	if res != nil && res.StatusCode == http.StatusNotModified {
53945		if res.Body != nil {
53946			res.Body.Close()
53947		}
53948		return nil, &googleapi.Error{
53949			Code:   res.StatusCode,
53950			Header: res.Header,
53951		}
53952	}
53953	if err != nil {
53954		return nil, err
53955	}
53956	defer googleapi.CloseBody(res)
53957	if err := googleapi.CheckResponse(res); err != nil {
53958		return nil, err
53959	}
53960	ret := &Operation{
53961		ServerResponse: googleapi.ServerResponse{
53962			Header:         res.Header,
53963			HTTPStatusCode: res.StatusCode,
53964		},
53965	}
53966	target := &ret
53967	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
53968		return nil, err
53969	}
53970	return ret, nil
53971	// {
53972	//   "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.",
53973	//   "httpMethod": "POST",
53974	//   "id": "compute.projects.enableXpnResource",
53975	//   "parameterOrder": [
53976	//     "project"
53977	//   ],
53978	//   "parameters": {
53979	//     "project": {
53980	//       "description": "Project ID for this request.",
53981	//       "location": "path",
53982	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
53983	//       "required": true,
53984	//       "type": "string"
53985	//     },
53986	//     "requestId": {
53987	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
53988	//       "location": "query",
53989	//       "type": "string"
53990	//     }
53991	//   },
53992	//   "path": "{project}/enableXpnResource",
53993	//   "request": {
53994	//     "$ref": "ProjectsEnableXpnResourceRequest"
53995	//   },
53996	//   "response": {
53997	//     "$ref": "Operation"
53998	//   },
53999	//   "scopes": [
54000	//     "https://www.googleapis.com/auth/cloud-platform",
54001	//     "https://www.googleapis.com/auth/compute"
54002	//   ]
54003	// }
54004
54005}
54006
54007// method id "compute.projects.get":
54008
54009type ProjectsGetCall struct {
54010	s            *Service
54011	project      string
54012	urlParams_   gensupport.URLParams
54013	ifNoneMatch_ string
54014	ctx_         context.Context
54015	header_      http.Header
54016}
54017
54018// Get: Returns the specified Project resource.
54019// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get
54020func (r *ProjectsService) Get(project string) *ProjectsGetCall {
54021	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
54022	c.project = project
54023	return c
54024}
54025
54026// Fields allows partial responses to be retrieved. See
54027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
54028// for more information.
54029func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
54030	c.urlParams_.Set("fields", googleapi.CombineFields(s))
54031	return c
54032}
54033
54034// IfNoneMatch sets the optional parameter which makes the operation
54035// fail if the object's ETag matches the given value. This is useful for
54036// getting updates only after the object has changed since the last
54037// request. Use googleapi.IsNotModified to check whether the response
54038// error from Do is the result of In-None-Match.
54039func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
54040	c.ifNoneMatch_ = entityTag
54041	return c
54042}
54043
54044// Context sets the context to be used in this call's Do method. Any
54045// pending HTTP request will be aborted if the provided context is
54046// canceled.
54047func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
54048	c.ctx_ = ctx
54049	return c
54050}
54051
54052// Header returns an http.Header that can be modified by the caller to
54053// add HTTP headers to the request.
54054func (c *ProjectsGetCall) Header() http.Header {
54055	if c.header_ == nil {
54056		c.header_ = make(http.Header)
54057	}
54058	return c.header_
54059}
54060
54061func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
54062	reqHeaders := make(http.Header)
54063	for k, v := range c.header_ {
54064		reqHeaders[k] = v
54065	}
54066	reqHeaders.Set("User-Agent", c.s.userAgent())
54067	if c.ifNoneMatch_ != "" {
54068		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
54069	}
54070	var body io.Reader = nil
54071	c.urlParams_.Set("alt", alt)
54072	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}")
54073	urls += "?" + c.urlParams_.Encode()
54074	req, _ := http.NewRequest("GET", urls, body)
54075	req.Header = reqHeaders
54076	googleapi.Expand(req.URL, map[string]string{
54077		"project": c.project,
54078	})
54079	return gensupport.SendRequest(c.ctx_, c.s.client, req)
54080}
54081
54082// Do executes the "compute.projects.get" call.
54083// Exactly one of *Project or error will be non-nil. Any non-2xx status
54084// code is an error. Response headers are in either
54085// *Project.ServerResponse.Header or (if a response was returned at all)
54086// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
54087// check whether the returned error was because http.StatusNotModified
54088// was returned.
54089func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
54090	gensupport.SetOptions(c.urlParams_, opts...)
54091	res, err := c.doRequest("json")
54092	if res != nil && res.StatusCode == http.StatusNotModified {
54093		if res.Body != nil {
54094			res.Body.Close()
54095		}
54096		return nil, &googleapi.Error{
54097			Code:   res.StatusCode,
54098			Header: res.Header,
54099		}
54100	}
54101	if err != nil {
54102		return nil, err
54103	}
54104	defer googleapi.CloseBody(res)
54105	if err := googleapi.CheckResponse(res); err != nil {
54106		return nil, err
54107	}
54108	ret := &Project{
54109		ServerResponse: googleapi.ServerResponse{
54110			Header:         res.Header,
54111			HTTPStatusCode: res.StatusCode,
54112		},
54113	}
54114	target := &ret
54115	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
54116		return nil, err
54117	}
54118	return ret, nil
54119	// {
54120	//   "description": "Returns the specified Project resource.",
54121	//   "httpMethod": "GET",
54122	//   "id": "compute.projects.get",
54123	//   "parameterOrder": [
54124	//     "project"
54125	//   ],
54126	//   "parameters": {
54127	//     "project": {
54128	//       "description": "Project ID for this request.",
54129	//       "location": "path",
54130	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
54131	//       "required": true,
54132	//       "type": "string"
54133	//     }
54134	//   },
54135	//   "path": "{project}",
54136	//   "response": {
54137	//     "$ref": "Project"
54138	//   },
54139	//   "scopes": [
54140	//     "https://www.googleapis.com/auth/cloud-platform",
54141	//     "https://www.googleapis.com/auth/compute",
54142	//     "https://www.googleapis.com/auth/compute.readonly"
54143	//   ]
54144	// }
54145
54146}
54147
54148// method id "compute.projects.getXpnHost":
54149
54150type ProjectsGetXpnHostCall struct {
54151	s            *Service
54152	project      string
54153	urlParams_   gensupport.URLParams
54154	ifNoneMatch_ string
54155	ctx_         context.Context
54156	header_      http.Header
54157}
54158
54159// GetXpnHost: Get the shared VPC host project that this project links
54160// to. May be empty if no link exists.
54161func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall {
54162	c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)}
54163	c.project = project
54164	return c
54165}
54166
54167// Fields allows partial responses to be retrieved. See
54168// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
54169// for more information.
54170func (c *ProjectsGetXpnHostCall) Fields(s ...googleapi.Field) *ProjectsGetXpnHostCall {
54171	c.urlParams_.Set("fields", googleapi.CombineFields(s))
54172	return c
54173}
54174
54175// IfNoneMatch sets the optional parameter which makes the operation
54176// fail if the object's ETag matches the given value. This is useful for
54177// getting updates only after the object has changed since the last
54178// request. Use googleapi.IsNotModified to check whether the response
54179// error from Do is the result of In-None-Match.
54180func (c *ProjectsGetXpnHostCall) IfNoneMatch(entityTag string) *ProjectsGetXpnHostCall {
54181	c.ifNoneMatch_ = entityTag
54182	return c
54183}
54184
54185// Context sets the context to be used in this call's Do method. Any
54186// pending HTTP request will be aborted if the provided context is
54187// canceled.
54188func (c *ProjectsGetXpnHostCall) Context(ctx context.Context) *ProjectsGetXpnHostCall {
54189	c.ctx_ = ctx
54190	return c
54191}
54192
54193// Header returns an http.Header that can be modified by the caller to
54194// add HTTP headers to the request.
54195func (c *ProjectsGetXpnHostCall) Header() http.Header {
54196	if c.header_ == nil {
54197		c.header_ = make(http.Header)
54198	}
54199	return c.header_
54200}
54201
54202func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) {
54203	reqHeaders := make(http.Header)
54204	for k, v := range c.header_ {
54205		reqHeaders[k] = v
54206	}
54207	reqHeaders.Set("User-Agent", c.s.userAgent())
54208	if c.ifNoneMatch_ != "" {
54209		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
54210	}
54211	var body io.Reader = nil
54212	c.urlParams_.Set("alt", alt)
54213	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/getXpnHost")
54214	urls += "?" + c.urlParams_.Encode()
54215	req, _ := http.NewRequest("GET", urls, body)
54216	req.Header = reqHeaders
54217	googleapi.Expand(req.URL, map[string]string{
54218		"project": c.project,
54219	})
54220	return gensupport.SendRequest(c.ctx_, c.s.client, req)
54221}
54222
54223// Do executes the "compute.projects.getXpnHost" call.
54224// Exactly one of *Project or error will be non-nil. Any non-2xx status
54225// code is an error. Response headers are in either
54226// *Project.ServerResponse.Header or (if a response was returned at all)
54227// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
54228// check whether the returned error was because http.StatusNotModified
54229// was returned.
54230func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, error) {
54231	gensupport.SetOptions(c.urlParams_, opts...)
54232	res, err := c.doRequest("json")
54233	if res != nil && res.StatusCode == http.StatusNotModified {
54234		if res.Body != nil {
54235			res.Body.Close()
54236		}
54237		return nil, &googleapi.Error{
54238			Code:   res.StatusCode,
54239			Header: res.Header,
54240		}
54241	}
54242	if err != nil {
54243		return nil, err
54244	}
54245	defer googleapi.CloseBody(res)
54246	if err := googleapi.CheckResponse(res); err != nil {
54247		return nil, err
54248	}
54249	ret := &Project{
54250		ServerResponse: googleapi.ServerResponse{
54251			Header:         res.Header,
54252			HTTPStatusCode: res.StatusCode,
54253		},
54254	}
54255	target := &ret
54256	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
54257		return nil, err
54258	}
54259	return ret, nil
54260	// {
54261	//   "description": "Get the shared VPC host project that this project links to. May be empty if no link exists.",
54262	//   "httpMethod": "GET",
54263	//   "id": "compute.projects.getXpnHost",
54264	//   "parameterOrder": [
54265	//     "project"
54266	//   ],
54267	//   "parameters": {
54268	//     "project": {
54269	//       "description": "Project ID for this request.",
54270	//       "location": "path",
54271	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
54272	//       "required": true,
54273	//       "type": "string"
54274	//     }
54275	//   },
54276	//   "path": "{project}/getXpnHost",
54277	//   "response": {
54278	//     "$ref": "Project"
54279	//   },
54280	//   "scopes": [
54281	//     "https://www.googleapis.com/auth/cloud-platform",
54282	//     "https://www.googleapis.com/auth/compute"
54283	//   ]
54284	// }
54285
54286}
54287
54288// method id "compute.projects.getXpnResources":
54289
54290type ProjectsGetXpnResourcesCall struct {
54291	s            *Service
54292	project      string
54293	urlParams_   gensupport.URLParams
54294	ifNoneMatch_ string
54295	ctx_         context.Context
54296	header_      http.Header
54297}
54298
54299// GetXpnResources: Get service resources (a.k.a service project)
54300// associated with this host project.
54301func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall {
54302	c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
54303	c.project = project
54304	return c
54305}
54306
54307// Filter sets the optional parameter "filter":
54308func (c *ProjectsGetXpnResourcesCall) Filter(filter string) *ProjectsGetXpnResourcesCall {
54309	c.urlParams_.Set("filter", filter)
54310	return c
54311}
54312
54313// MaxResults sets the optional parameter "maxResults":
54314func (c *ProjectsGetXpnResourcesCall) MaxResults(maxResults int64) *ProjectsGetXpnResourcesCall {
54315	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
54316	return c
54317}
54318
54319// OrderBy sets the optional parameter "order_by":
54320func (c *ProjectsGetXpnResourcesCall) OrderBy(orderBy string) *ProjectsGetXpnResourcesCall {
54321	c.urlParams_.Set("order_by", orderBy)
54322	return c
54323}
54324
54325// PageToken sets the optional parameter "pageToken":
54326func (c *ProjectsGetXpnResourcesCall) PageToken(pageToken string) *ProjectsGetXpnResourcesCall {
54327	c.urlParams_.Set("pageToken", pageToken)
54328	return c
54329}
54330
54331// Fields allows partial responses to be retrieved. See
54332// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
54333// for more information.
54334func (c *ProjectsGetXpnResourcesCall) Fields(s ...googleapi.Field) *ProjectsGetXpnResourcesCall {
54335	c.urlParams_.Set("fields", googleapi.CombineFields(s))
54336	return c
54337}
54338
54339// IfNoneMatch sets the optional parameter which makes the operation
54340// fail if the object's ETag matches the given value. This is useful for
54341// getting updates only after the object has changed since the last
54342// request. Use googleapi.IsNotModified to check whether the response
54343// error from Do is the result of In-None-Match.
54344func (c *ProjectsGetXpnResourcesCall) IfNoneMatch(entityTag string) *ProjectsGetXpnResourcesCall {
54345	c.ifNoneMatch_ = entityTag
54346	return c
54347}
54348
54349// Context sets the context to be used in this call's Do method. Any
54350// pending HTTP request will be aborted if the provided context is
54351// canceled.
54352func (c *ProjectsGetXpnResourcesCall) Context(ctx context.Context) *ProjectsGetXpnResourcesCall {
54353	c.ctx_ = ctx
54354	return c
54355}
54356
54357// Header returns an http.Header that can be modified by the caller to
54358// add HTTP headers to the request.
54359func (c *ProjectsGetXpnResourcesCall) Header() http.Header {
54360	if c.header_ == nil {
54361		c.header_ = make(http.Header)
54362	}
54363	return c.header_
54364}
54365
54366func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) {
54367	reqHeaders := make(http.Header)
54368	for k, v := range c.header_ {
54369		reqHeaders[k] = v
54370	}
54371	reqHeaders.Set("User-Agent", c.s.userAgent())
54372	if c.ifNoneMatch_ != "" {
54373		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
54374	}
54375	var body io.Reader = nil
54376	c.urlParams_.Set("alt", alt)
54377	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/getXpnResources")
54378	urls += "?" + c.urlParams_.Encode()
54379	req, _ := http.NewRequest("GET", urls, body)
54380	req.Header = reqHeaders
54381	googleapi.Expand(req.URL, map[string]string{
54382		"project": c.project,
54383	})
54384	return gensupport.SendRequest(c.ctx_, c.s.client, req)
54385}
54386
54387// Do executes the "compute.projects.getXpnResources" call.
54388// Exactly one of *ProjectsGetXpnResources or error will be non-nil. Any
54389// non-2xx status code is an error. Response headers are in either
54390// *ProjectsGetXpnResources.ServerResponse.Header or (if a response was
54391// returned at all) in error.(*googleapi.Error).Header. Use
54392// googleapi.IsNotModified to check whether the returned error was
54393// because http.StatusNotModified was returned.
54394func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*ProjectsGetXpnResources, error) {
54395	gensupport.SetOptions(c.urlParams_, opts...)
54396	res, err := c.doRequest("json")
54397	if res != nil && res.StatusCode == http.StatusNotModified {
54398		if res.Body != nil {
54399			res.Body.Close()
54400		}
54401		return nil, &googleapi.Error{
54402			Code:   res.StatusCode,
54403			Header: res.Header,
54404		}
54405	}
54406	if err != nil {
54407		return nil, err
54408	}
54409	defer googleapi.CloseBody(res)
54410	if err := googleapi.CheckResponse(res); err != nil {
54411		return nil, err
54412	}
54413	ret := &ProjectsGetXpnResources{
54414		ServerResponse: googleapi.ServerResponse{
54415			Header:         res.Header,
54416			HTTPStatusCode: res.StatusCode,
54417		},
54418	}
54419	target := &ret
54420	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
54421		return nil, err
54422	}
54423	return ret, nil
54424	// {
54425	//   "description": "Get service resources (a.k.a service project) associated with this host project.",
54426	//   "httpMethod": "GET",
54427	//   "id": "compute.projects.getXpnResources",
54428	//   "parameterOrder": [
54429	//     "project"
54430	//   ],
54431	//   "parameters": {
54432	//     "filter": {
54433	//       "location": "query",
54434	//       "type": "string"
54435	//     },
54436	//     "maxResults": {
54437	//       "default": "500",
54438	//       "format": "uint32",
54439	//       "location": "query",
54440	//       "minimum": "0",
54441	//       "type": "integer"
54442	//     },
54443	//     "order_by": {
54444	//       "location": "query",
54445	//       "type": "string"
54446	//     },
54447	//     "pageToken": {
54448	//       "location": "query",
54449	//       "type": "string"
54450	//     },
54451	//     "project": {
54452	//       "description": "Project ID for this request.",
54453	//       "location": "path",
54454	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
54455	//       "required": true,
54456	//       "type": "string"
54457	//     }
54458	//   },
54459	//   "path": "{project}/getXpnResources",
54460	//   "response": {
54461	//     "$ref": "ProjectsGetXpnResources"
54462	//   },
54463	//   "scopes": [
54464	//     "https://www.googleapis.com/auth/cloud-platform",
54465	//     "https://www.googleapis.com/auth/compute"
54466	//   ]
54467	// }
54468
54469}
54470
54471// Pages invokes f for each page of results.
54472// A non-nil error returned from f will halt the iteration.
54473// The provided context supersedes any context provided to the Context method.
54474func (c *ProjectsGetXpnResourcesCall) Pages(ctx context.Context, f func(*ProjectsGetXpnResources) error) error {
54475	c.ctx_ = ctx
54476	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
54477	for {
54478		x, err := c.Do()
54479		if err != nil {
54480			return err
54481		}
54482		if err := f(x); err != nil {
54483			return err
54484		}
54485		if x.NextPageToken == "" {
54486			return nil
54487		}
54488		c.PageToken(x.NextPageToken)
54489	}
54490}
54491
54492// method id "compute.projects.listXpnHosts":
54493
54494type ProjectsListXpnHostsCall struct {
54495	s                           *Service
54496	project                     string
54497	projectslistxpnhostsrequest *ProjectsListXpnHostsRequest
54498	urlParams_                  gensupport.URLParams
54499	ctx_                        context.Context
54500	header_                     http.Header
54501}
54502
54503// ListXpnHosts: List all shared VPC host projects visible to the user
54504// in an organization.
54505func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall {
54506	c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
54507	c.project = project
54508	c.projectslistxpnhostsrequest = projectslistxpnhostsrequest
54509	return c
54510}
54511
54512// Filter sets the optional parameter "filter":
54513func (c *ProjectsListXpnHostsCall) Filter(filter string) *ProjectsListXpnHostsCall {
54514	c.urlParams_.Set("filter", filter)
54515	return c
54516}
54517
54518// MaxResults sets the optional parameter "maxResults":
54519func (c *ProjectsListXpnHostsCall) MaxResults(maxResults int64) *ProjectsListXpnHostsCall {
54520	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
54521	return c
54522}
54523
54524// OrderBy sets the optional parameter "order_by":
54525func (c *ProjectsListXpnHostsCall) OrderBy(orderBy string) *ProjectsListXpnHostsCall {
54526	c.urlParams_.Set("order_by", orderBy)
54527	return c
54528}
54529
54530// PageToken sets the optional parameter "pageToken":
54531func (c *ProjectsListXpnHostsCall) PageToken(pageToken string) *ProjectsListXpnHostsCall {
54532	c.urlParams_.Set("pageToken", pageToken)
54533	return c
54534}
54535
54536// Fields allows partial responses to be retrieved. See
54537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
54538// for more information.
54539func (c *ProjectsListXpnHostsCall) Fields(s ...googleapi.Field) *ProjectsListXpnHostsCall {
54540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
54541	return c
54542}
54543
54544// Context sets the context to be used in this call's Do method. Any
54545// pending HTTP request will be aborted if the provided context is
54546// canceled.
54547func (c *ProjectsListXpnHostsCall) Context(ctx context.Context) *ProjectsListXpnHostsCall {
54548	c.ctx_ = ctx
54549	return c
54550}
54551
54552// Header returns an http.Header that can be modified by the caller to
54553// add HTTP headers to the request.
54554func (c *ProjectsListXpnHostsCall) Header() http.Header {
54555	if c.header_ == nil {
54556		c.header_ = make(http.Header)
54557	}
54558	return c.header_
54559}
54560
54561func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) {
54562	reqHeaders := make(http.Header)
54563	for k, v := range c.header_ {
54564		reqHeaders[k] = v
54565	}
54566	reqHeaders.Set("User-Agent", c.s.userAgent())
54567	var body io.Reader = nil
54568	body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectslistxpnhostsrequest)
54569	if err != nil {
54570		return nil, err
54571	}
54572	reqHeaders.Set("Content-Type", "application/json")
54573	c.urlParams_.Set("alt", alt)
54574	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/listXpnHosts")
54575	urls += "?" + c.urlParams_.Encode()
54576	req, _ := http.NewRequest("POST", urls, body)
54577	req.Header = reqHeaders
54578	googleapi.Expand(req.URL, map[string]string{
54579		"project": c.project,
54580	})
54581	return gensupport.SendRequest(c.ctx_, c.s.client, req)
54582}
54583
54584// Do executes the "compute.projects.listXpnHosts" call.
54585// Exactly one of *XpnHostList or error will be non-nil. Any non-2xx
54586// status code is an error. Response headers are in either
54587// *XpnHostList.ServerResponse.Header or (if a response was returned at
54588// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
54589// to check whether the returned error was because
54590// http.StatusNotModified was returned.
54591func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostList, error) {
54592	gensupport.SetOptions(c.urlParams_, opts...)
54593	res, err := c.doRequest("json")
54594	if res != nil && res.StatusCode == http.StatusNotModified {
54595		if res.Body != nil {
54596			res.Body.Close()
54597		}
54598		return nil, &googleapi.Error{
54599			Code:   res.StatusCode,
54600			Header: res.Header,
54601		}
54602	}
54603	if err != nil {
54604		return nil, err
54605	}
54606	defer googleapi.CloseBody(res)
54607	if err := googleapi.CheckResponse(res); err != nil {
54608		return nil, err
54609	}
54610	ret := &XpnHostList{
54611		ServerResponse: googleapi.ServerResponse{
54612			Header:         res.Header,
54613			HTTPStatusCode: res.StatusCode,
54614		},
54615	}
54616	target := &ret
54617	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
54618		return nil, err
54619	}
54620	return ret, nil
54621	// {
54622	//   "description": "List all shared VPC host projects visible to the user in an organization.",
54623	//   "httpMethod": "POST",
54624	//   "id": "compute.projects.listXpnHosts",
54625	//   "parameterOrder": [
54626	//     "project"
54627	//   ],
54628	//   "parameters": {
54629	//     "filter": {
54630	//       "location": "query",
54631	//       "type": "string"
54632	//     },
54633	//     "maxResults": {
54634	//       "default": "500",
54635	//       "format": "uint32",
54636	//       "location": "query",
54637	//       "minimum": "0",
54638	//       "type": "integer"
54639	//     },
54640	//     "order_by": {
54641	//       "location": "query",
54642	//       "type": "string"
54643	//     },
54644	//     "pageToken": {
54645	//       "location": "query",
54646	//       "type": "string"
54647	//     },
54648	//     "project": {
54649	//       "description": "Project ID for this request.",
54650	//       "location": "path",
54651	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
54652	//       "required": true,
54653	//       "type": "string"
54654	//     }
54655	//   },
54656	//   "path": "{project}/listXpnHosts",
54657	//   "request": {
54658	//     "$ref": "ProjectsListXpnHostsRequest"
54659	//   },
54660	//   "response": {
54661	//     "$ref": "XpnHostList"
54662	//   },
54663	//   "scopes": [
54664	//     "https://www.googleapis.com/auth/cloud-platform",
54665	//     "https://www.googleapis.com/auth/compute"
54666	//   ]
54667	// }
54668
54669}
54670
54671// Pages invokes f for each page of results.
54672// A non-nil error returned from f will halt the iteration.
54673// The provided context supersedes any context provided to the Context method.
54674func (c *ProjectsListXpnHostsCall) Pages(ctx context.Context, f func(*XpnHostList) error) error {
54675	c.ctx_ = ctx
54676	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
54677	for {
54678		x, err := c.Do()
54679		if err != nil {
54680			return err
54681		}
54682		if err := f(x); err != nil {
54683			return err
54684		}
54685		if x.NextPageToken == "" {
54686			return nil
54687		}
54688		c.PageToken(x.NextPageToken)
54689	}
54690}
54691
54692// method id "compute.projects.moveDisk":
54693
54694type ProjectsMoveDiskCall struct {
54695	s               *Service
54696	project         string
54697	diskmoverequest *DiskMoveRequest
54698	urlParams_      gensupport.URLParams
54699	ctx_            context.Context
54700	header_         http.Header
54701}
54702
54703// MoveDisk: Moves a persistent disk from one zone to another.
54704func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall {
54705	c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)}
54706	c.project = project
54707	c.diskmoverequest = diskmoverequest
54708	return c
54709}
54710
54711// RequestId sets the optional parameter "requestId": An optional
54712// request ID to identify requests. Specify a unique request ID so that
54713// if you must retry your request, the server will know to ignore the
54714// request if it has already been completed.
54715//
54716// For example, consider a situation where you make an initial request
54717// and the request times out. If you make the request again with the
54718// same request ID, the server can check if original operation with the
54719// same request ID was received, and if so, will ignore the second
54720// request. This prevents clients from accidentally creating duplicate
54721// commitments.
54722//
54723// The request ID must be a valid UUID with the exception that zero UUID
54724// is not supported (00000000-0000-0000-0000-000000000000).
54725func (c *ProjectsMoveDiskCall) RequestId(requestId string) *ProjectsMoveDiskCall {
54726	c.urlParams_.Set("requestId", requestId)
54727	return c
54728}
54729
54730// Fields allows partial responses to be retrieved. See
54731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
54732// for more information.
54733func (c *ProjectsMoveDiskCall) Fields(s ...googleapi.Field) *ProjectsMoveDiskCall {
54734	c.urlParams_.Set("fields", googleapi.CombineFields(s))
54735	return c
54736}
54737
54738// Context sets the context to be used in this call's Do method. Any
54739// pending HTTP request will be aborted if the provided context is
54740// canceled.
54741func (c *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall {
54742	c.ctx_ = ctx
54743	return c
54744}
54745
54746// Header returns an http.Header that can be modified by the caller to
54747// add HTTP headers to the request.
54748func (c *ProjectsMoveDiskCall) Header() http.Header {
54749	if c.header_ == nil {
54750		c.header_ = make(http.Header)
54751	}
54752	return c.header_
54753}
54754
54755func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) {
54756	reqHeaders := make(http.Header)
54757	for k, v := range c.header_ {
54758		reqHeaders[k] = v
54759	}
54760	reqHeaders.Set("User-Agent", c.s.userAgent())
54761	var body io.Reader = nil
54762	body, err := googleapi.WithoutDataWrapper.JSONReader(c.diskmoverequest)
54763	if err != nil {
54764		return nil, err
54765	}
54766	reqHeaders.Set("Content-Type", "application/json")
54767	c.urlParams_.Set("alt", alt)
54768	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveDisk")
54769	urls += "?" + c.urlParams_.Encode()
54770	req, _ := http.NewRequest("POST", urls, body)
54771	req.Header = reqHeaders
54772	googleapi.Expand(req.URL, map[string]string{
54773		"project": c.project,
54774	})
54775	return gensupport.SendRequest(c.ctx_, c.s.client, req)
54776}
54777
54778// Do executes the "compute.projects.moveDisk" call.
54779// Exactly one of *Operation or error will be non-nil. Any non-2xx
54780// status code is an error. Response headers are in either
54781// *Operation.ServerResponse.Header or (if a response was returned at
54782// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
54783// to check whether the returned error was because
54784// http.StatusNotModified was returned.
54785func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
54786	gensupport.SetOptions(c.urlParams_, opts...)
54787	res, err := c.doRequest("json")
54788	if res != nil && res.StatusCode == http.StatusNotModified {
54789		if res.Body != nil {
54790			res.Body.Close()
54791		}
54792		return nil, &googleapi.Error{
54793			Code:   res.StatusCode,
54794			Header: res.Header,
54795		}
54796	}
54797	if err != nil {
54798		return nil, err
54799	}
54800	defer googleapi.CloseBody(res)
54801	if err := googleapi.CheckResponse(res); err != nil {
54802		return nil, err
54803	}
54804	ret := &Operation{
54805		ServerResponse: googleapi.ServerResponse{
54806			Header:         res.Header,
54807			HTTPStatusCode: res.StatusCode,
54808		},
54809	}
54810	target := &ret
54811	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
54812		return nil, err
54813	}
54814	return ret, nil
54815	// {
54816	//   "description": "Moves a persistent disk from one zone to another.",
54817	//   "httpMethod": "POST",
54818	//   "id": "compute.projects.moveDisk",
54819	//   "parameterOrder": [
54820	//     "project"
54821	//   ],
54822	//   "parameters": {
54823	//     "project": {
54824	//       "description": "Project ID for this request.",
54825	//       "location": "path",
54826	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
54827	//       "required": true,
54828	//       "type": "string"
54829	//     },
54830	//     "requestId": {
54831	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
54832	//       "location": "query",
54833	//       "type": "string"
54834	//     }
54835	//   },
54836	//   "path": "{project}/moveDisk",
54837	//   "request": {
54838	//     "$ref": "DiskMoveRequest"
54839	//   },
54840	//   "response": {
54841	//     "$ref": "Operation"
54842	//   },
54843	//   "scopes": [
54844	//     "https://www.googleapis.com/auth/cloud-platform",
54845	//     "https://www.googleapis.com/auth/compute"
54846	//   ]
54847	// }
54848
54849}
54850
54851// method id "compute.projects.moveInstance":
54852
54853type ProjectsMoveInstanceCall struct {
54854	s                   *Service
54855	project             string
54856	instancemoverequest *InstanceMoveRequest
54857	urlParams_          gensupport.URLParams
54858	ctx_                context.Context
54859	header_             http.Header
54860}
54861
54862// MoveInstance: Moves an instance and its attached persistent disks
54863// from one zone to another.
54864func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall {
54865	c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
54866	c.project = project
54867	c.instancemoverequest = instancemoverequest
54868	return c
54869}
54870
54871// RequestId sets the optional parameter "requestId": An optional
54872// request ID to identify requests. Specify a unique request ID so that
54873// if you must retry your request, the server will know to ignore the
54874// request if it has already been completed.
54875//
54876// For example, consider a situation where you make an initial request
54877// and the request times out. If you make the request again with the
54878// same request ID, the server can check if original operation with the
54879// same request ID was received, and if so, will ignore the second
54880// request. This prevents clients from accidentally creating duplicate
54881// commitments.
54882//
54883// The request ID must be a valid UUID with the exception that zero UUID
54884// is not supported (00000000-0000-0000-0000-000000000000).
54885func (c *ProjectsMoveInstanceCall) RequestId(requestId string) *ProjectsMoveInstanceCall {
54886	c.urlParams_.Set("requestId", requestId)
54887	return c
54888}
54889
54890// Fields allows partial responses to be retrieved. See
54891// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
54892// for more information.
54893func (c *ProjectsMoveInstanceCall) Fields(s ...googleapi.Field) *ProjectsMoveInstanceCall {
54894	c.urlParams_.Set("fields", googleapi.CombineFields(s))
54895	return c
54896}
54897
54898// Context sets the context to be used in this call's Do method. Any
54899// pending HTTP request will be aborted if the provided context is
54900// canceled.
54901func (c *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall {
54902	c.ctx_ = ctx
54903	return c
54904}
54905
54906// Header returns an http.Header that can be modified by the caller to
54907// add HTTP headers to the request.
54908func (c *ProjectsMoveInstanceCall) Header() http.Header {
54909	if c.header_ == nil {
54910		c.header_ = make(http.Header)
54911	}
54912	return c.header_
54913}
54914
54915func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) {
54916	reqHeaders := make(http.Header)
54917	for k, v := range c.header_ {
54918		reqHeaders[k] = v
54919	}
54920	reqHeaders.Set("User-Agent", c.s.userAgent())
54921	var body io.Reader = nil
54922	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancemoverequest)
54923	if err != nil {
54924		return nil, err
54925	}
54926	reqHeaders.Set("Content-Type", "application/json")
54927	c.urlParams_.Set("alt", alt)
54928	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/moveInstance")
54929	urls += "?" + c.urlParams_.Encode()
54930	req, _ := http.NewRequest("POST", urls, body)
54931	req.Header = reqHeaders
54932	googleapi.Expand(req.URL, map[string]string{
54933		"project": c.project,
54934	})
54935	return gensupport.SendRequest(c.ctx_, c.s.client, req)
54936}
54937
54938// Do executes the "compute.projects.moveInstance" call.
54939// Exactly one of *Operation or error will be non-nil. Any non-2xx
54940// status code is an error. Response headers are in either
54941// *Operation.ServerResponse.Header or (if a response was returned at
54942// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
54943// to check whether the returned error was because
54944// http.StatusNotModified was returned.
54945func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
54946	gensupport.SetOptions(c.urlParams_, opts...)
54947	res, err := c.doRequest("json")
54948	if res != nil && res.StatusCode == http.StatusNotModified {
54949		if res.Body != nil {
54950			res.Body.Close()
54951		}
54952		return nil, &googleapi.Error{
54953			Code:   res.StatusCode,
54954			Header: res.Header,
54955		}
54956	}
54957	if err != nil {
54958		return nil, err
54959	}
54960	defer googleapi.CloseBody(res)
54961	if err := googleapi.CheckResponse(res); err != nil {
54962		return nil, err
54963	}
54964	ret := &Operation{
54965		ServerResponse: googleapi.ServerResponse{
54966			Header:         res.Header,
54967			HTTPStatusCode: res.StatusCode,
54968		},
54969	}
54970	target := &ret
54971	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
54972		return nil, err
54973	}
54974	return ret, nil
54975	// {
54976	//   "description": "Moves an instance and its attached persistent disks from one zone to another.",
54977	//   "httpMethod": "POST",
54978	//   "id": "compute.projects.moveInstance",
54979	//   "parameterOrder": [
54980	//     "project"
54981	//   ],
54982	//   "parameters": {
54983	//     "project": {
54984	//       "description": "Project ID for this request.",
54985	//       "location": "path",
54986	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
54987	//       "required": true,
54988	//       "type": "string"
54989	//     },
54990	//     "requestId": {
54991	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
54992	//       "location": "query",
54993	//       "type": "string"
54994	//     }
54995	//   },
54996	//   "path": "{project}/moveInstance",
54997	//   "request": {
54998	//     "$ref": "InstanceMoveRequest"
54999	//   },
55000	//   "response": {
55001	//     "$ref": "Operation"
55002	//   },
55003	//   "scopes": [
55004	//     "https://www.googleapis.com/auth/cloud-platform",
55005	//     "https://www.googleapis.com/auth/compute"
55006	//   ]
55007	// }
55008
55009}
55010
55011// method id "compute.projects.setCommonInstanceMetadata":
55012
55013type ProjectsSetCommonInstanceMetadataCall struct {
55014	s          *Service
55015	project    string
55016	metadata   *Metadata
55017	urlParams_ gensupport.URLParams
55018	ctx_       context.Context
55019	header_    http.Header
55020}
55021
55022// SetCommonInstanceMetadata: Sets metadata common to all instances
55023// within the specified project using the data included in the request.
55024// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setCommonInstanceMetadata
55025func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall {
55026	c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
55027	c.project = project
55028	c.metadata = metadata
55029	return c
55030}
55031
55032// RequestId sets the optional parameter "requestId": An optional
55033// request ID to identify requests. Specify a unique request ID so that
55034// if you must retry your request, the server will know to ignore the
55035// request if it has already been completed.
55036//
55037// For example, consider a situation where you make an initial request
55038// and the request times out. If you make the request again with the
55039// same request ID, the server can check if original operation with the
55040// same request ID was received, and if so, will ignore the second
55041// request. This prevents clients from accidentally creating duplicate
55042// commitments.
55043//
55044// The request ID must be a valid UUID with the exception that zero UUID
55045// is not supported (00000000-0000-0000-0000-000000000000).
55046func (c *ProjectsSetCommonInstanceMetadataCall) RequestId(requestId string) *ProjectsSetCommonInstanceMetadataCall {
55047	c.urlParams_.Set("requestId", requestId)
55048	return c
55049}
55050
55051// Fields allows partial responses to be retrieved. See
55052// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
55053// for more information.
55054func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall {
55055	c.urlParams_.Set("fields", googleapi.CombineFields(s))
55056	return c
55057}
55058
55059// Context sets the context to be used in this call's Do method. Any
55060// pending HTTP request will be aborted if the provided context is
55061// canceled.
55062func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall {
55063	c.ctx_ = ctx
55064	return c
55065}
55066
55067// Header returns an http.Header that can be modified by the caller to
55068// add HTTP headers to the request.
55069func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header {
55070	if c.header_ == nil {
55071		c.header_ = make(http.Header)
55072	}
55073	return c.header_
55074}
55075
55076func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) {
55077	reqHeaders := make(http.Header)
55078	for k, v := range c.header_ {
55079		reqHeaders[k] = v
55080	}
55081	reqHeaders.Set("User-Agent", c.s.userAgent())
55082	var body io.Reader = nil
55083	body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
55084	if err != nil {
55085		return nil, err
55086	}
55087	reqHeaders.Set("Content-Type", "application/json")
55088	c.urlParams_.Set("alt", alt)
55089	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata")
55090	urls += "?" + c.urlParams_.Encode()
55091	req, _ := http.NewRequest("POST", urls, body)
55092	req.Header = reqHeaders
55093	googleapi.Expand(req.URL, map[string]string{
55094		"project": c.project,
55095	})
55096	return gensupport.SendRequest(c.ctx_, c.s.client, req)
55097}
55098
55099// Do executes the "compute.projects.setCommonInstanceMetadata" call.
55100// Exactly one of *Operation or error will be non-nil. Any non-2xx
55101// status code is an error. Response headers are in either
55102// *Operation.ServerResponse.Header or (if a response was returned at
55103// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
55104// to check whether the returned error was because
55105// http.StatusNotModified was returned.
55106func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
55107	gensupport.SetOptions(c.urlParams_, opts...)
55108	res, err := c.doRequest("json")
55109	if res != nil && res.StatusCode == http.StatusNotModified {
55110		if res.Body != nil {
55111			res.Body.Close()
55112		}
55113		return nil, &googleapi.Error{
55114			Code:   res.StatusCode,
55115			Header: res.Header,
55116		}
55117	}
55118	if err != nil {
55119		return nil, err
55120	}
55121	defer googleapi.CloseBody(res)
55122	if err := googleapi.CheckResponse(res); err != nil {
55123		return nil, err
55124	}
55125	ret := &Operation{
55126		ServerResponse: googleapi.ServerResponse{
55127			Header:         res.Header,
55128			HTTPStatusCode: res.StatusCode,
55129		},
55130	}
55131	target := &ret
55132	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
55133		return nil, err
55134	}
55135	return ret, nil
55136	// {
55137	//   "description": "Sets metadata common to all instances within the specified project using the data included in the request.",
55138	//   "httpMethod": "POST",
55139	//   "id": "compute.projects.setCommonInstanceMetadata",
55140	//   "parameterOrder": [
55141	//     "project"
55142	//   ],
55143	//   "parameters": {
55144	//     "project": {
55145	//       "description": "Project ID for this request.",
55146	//       "location": "path",
55147	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
55148	//       "required": true,
55149	//       "type": "string"
55150	//     },
55151	//     "requestId": {
55152	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
55153	//       "location": "query",
55154	//       "type": "string"
55155	//     }
55156	//   },
55157	//   "path": "{project}/setCommonInstanceMetadata",
55158	//   "request": {
55159	//     "$ref": "Metadata"
55160	//   },
55161	//   "response": {
55162	//     "$ref": "Operation"
55163	//   },
55164	//   "scopes": [
55165	//     "https://www.googleapis.com/auth/cloud-platform",
55166	//     "https://www.googleapis.com/auth/compute"
55167	//   ]
55168	// }
55169
55170}
55171
55172// method id "compute.projects.setUsageExportBucket":
55173
55174type ProjectsSetUsageExportBucketCall struct {
55175	s                   *Service
55176	project             string
55177	usageexportlocation *UsageExportLocation
55178	urlParams_          gensupport.URLParams
55179	ctx_                context.Context
55180	header_             http.Header
55181}
55182
55183// SetUsageExportBucket: Enables the usage export feature and sets the
55184// usage export bucket where reports are stored. If you provide an empty
55185// request body using this method, the usage export feature will be
55186// disabled.
55187// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setUsageExportBucket
55188func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall {
55189	c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
55190	c.project = project
55191	c.usageexportlocation = usageexportlocation
55192	return c
55193}
55194
55195// RequestId sets the optional parameter "requestId": An optional
55196// request ID to identify requests. Specify a unique request ID so that
55197// if you must retry your request, the server will know to ignore the
55198// request if it has already been completed.
55199//
55200// For example, consider a situation where you make an initial request
55201// and the request times out. If you make the request again with the
55202// same request ID, the server can check if original operation with the
55203// same request ID was received, and if so, will ignore the second
55204// request. This prevents clients from accidentally creating duplicate
55205// commitments.
55206//
55207// The request ID must be a valid UUID with the exception that zero UUID
55208// is not supported (00000000-0000-0000-0000-000000000000).
55209func (c *ProjectsSetUsageExportBucketCall) RequestId(requestId string) *ProjectsSetUsageExportBucketCall {
55210	c.urlParams_.Set("requestId", requestId)
55211	return c
55212}
55213
55214// Fields allows partial responses to be retrieved. See
55215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
55216// for more information.
55217func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall {
55218	c.urlParams_.Set("fields", googleapi.CombineFields(s))
55219	return c
55220}
55221
55222// Context sets the context to be used in this call's Do method. Any
55223// pending HTTP request will be aborted if the provided context is
55224// canceled.
55225func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall {
55226	c.ctx_ = ctx
55227	return c
55228}
55229
55230// Header returns an http.Header that can be modified by the caller to
55231// add HTTP headers to the request.
55232func (c *ProjectsSetUsageExportBucketCall) Header() http.Header {
55233	if c.header_ == nil {
55234		c.header_ = make(http.Header)
55235	}
55236	return c.header_
55237}
55238
55239func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) {
55240	reqHeaders := make(http.Header)
55241	for k, v := range c.header_ {
55242		reqHeaders[k] = v
55243	}
55244	reqHeaders.Set("User-Agent", c.s.userAgent())
55245	var body io.Reader = nil
55246	body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation)
55247	if err != nil {
55248		return nil, err
55249	}
55250	reqHeaders.Set("Content-Type", "application/json")
55251	c.urlParams_.Set("alt", alt)
55252	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket")
55253	urls += "?" + c.urlParams_.Encode()
55254	req, _ := http.NewRequest("POST", urls, body)
55255	req.Header = reqHeaders
55256	googleapi.Expand(req.URL, map[string]string{
55257		"project": c.project,
55258	})
55259	return gensupport.SendRequest(c.ctx_, c.s.client, req)
55260}
55261
55262// Do executes the "compute.projects.setUsageExportBucket" call.
55263// Exactly one of *Operation or error will be non-nil. Any non-2xx
55264// status code is an error. Response headers are in either
55265// *Operation.ServerResponse.Header or (if a response was returned at
55266// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
55267// to check whether the returned error was because
55268// http.StatusNotModified was returned.
55269func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
55270	gensupport.SetOptions(c.urlParams_, opts...)
55271	res, err := c.doRequest("json")
55272	if res != nil && res.StatusCode == http.StatusNotModified {
55273		if res.Body != nil {
55274			res.Body.Close()
55275		}
55276		return nil, &googleapi.Error{
55277			Code:   res.StatusCode,
55278			Header: res.Header,
55279		}
55280	}
55281	if err != nil {
55282		return nil, err
55283	}
55284	defer googleapi.CloseBody(res)
55285	if err := googleapi.CheckResponse(res); err != nil {
55286		return nil, err
55287	}
55288	ret := &Operation{
55289		ServerResponse: googleapi.ServerResponse{
55290			Header:         res.Header,
55291			HTTPStatusCode: res.StatusCode,
55292		},
55293	}
55294	target := &ret
55295	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
55296		return nil, err
55297	}
55298	return ret, nil
55299	// {
55300	//   "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.",
55301	//   "httpMethod": "POST",
55302	//   "id": "compute.projects.setUsageExportBucket",
55303	//   "parameterOrder": [
55304	//     "project"
55305	//   ],
55306	//   "parameters": {
55307	//     "project": {
55308	//       "description": "Project ID for this request.",
55309	//       "location": "path",
55310	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
55311	//       "required": true,
55312	//       "type": "string"
55313	//     },
55314	//     "requestId": {
55315	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
55316	//       "location": "query",
55317	//       "type": "string"
55318	//     }
55319	//   },
55320	//   "path": "{project}/setUsageExportBucket",
55321	//   "request": {
55322	//     "$ref": "UsageExportLocation"
55323	//   },
55324	//   "response": {
55325	//     "$ref": "Operation"
55326	//   },
55327	//   "scopes": [
55328	//     "https://www.googleapis.com/auth/cloud-platform",
55329	//     "https://www.googleapis.com/auth/compute",
55330	//     "https://www.googleapis.com/auth/devstorage.full_control",
55331	//     "https://www.googleapis.com/auth/devstorage.read_only",
55332	//     "https://www.googleapis.com/auth/devstorage.read_write"
55333	//   ]
55334	// }
55335
55336}
55337
55338// method id "compute.regionAutoscalers.delete":
55339
55340type RegionAutoscalersDeleteCall struct {
55341	s          *Service
55342	project    string
55343	region     string
55344	autoscaler string
55345	urlParams_ gensupport.URLParams
55346	ctx_       context.Context
55347	header_    http.Header
55348}
55349
55350// Delete: Deletes the specified autoscaler.
55351func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall {
55352	c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
55353	c.project = project
55354	c.region = region
55355	c.autoscaler = autoscaler
55356	return c
55357}
55358
55359// RequestId sets the optional parameter "requestId": An optional
55360// request ID to identify requests. Specify a unique request ID so that
55361// if you must retry your request, the server will know to ignore the
55362// request if it has already been completed.
55363//
55364// For example, consider a situation where you make an initial request
55365// and the request times out. If you make the request again with the
55366// same request ID, the server can check if original operation with the
55367// same request ID was received, and if so, will ignore the second
55368// request. This prevents clients from accidentally creating duplicate
55369// commitments.
55370//
55371// The request ID must be a valid UUID with the exception that zero UUID
55372// is not supported (00000000-0000-0000-0000-000000000000).
55373func (c *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall {
55374	c.urlParams_.Set("requestId", requestId)
55375	return c
55376}
55377
55378// Fields allows partial responses to be retrieved. See
55379// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
55380// for more information.
55381func (c *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall {
55382	c.urlParams_.Set("fields", googleapi.CombineFields(s))
55383	return c
55384}
55385
55386// Context sets the context to be used in this call's Do method. Any
55387// pending HTTP request will be aborted if the provided context is
55388// canceled.
55389func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall {
55390	c.ctx_ = ctx
55391	return c
55392}
55393
55394// Header returns an http.Header that can be modified by the caller to
55395// add HTTP headers to the request.
55396func (c *RegionAutoscalersDeleteCall) Header() http.Header {
55397	if c.header_ == nil {
55398		c.header_ = make(http.Header)
55399	}
55400	return c.header_
55401}
55402
55403func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) {
55404	reqHeaders := make(http.Header)
55405	for k, v := range c.header_ {
55406		reqHeaders[k] = v
55407	}
55408	reqHeaders.Set("User-Agent", c.s.userAgent())
55409	var body io.Reader = nil
55410	c.urlParams_.Set("alt", alt)
55411	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{autoscaler}")
55412	urls += "?" + c.urlParams_.Encode()
55413	req, _ := http.NewRequest("DELETE", urls, body)
55414	req.Header = reqHeaders
55415	googleapi.Expand(req.URL, map[string]string{
55416		"project":    c.project,
55417		"region":     c.region,
55418		"autoscaler": c.autoscaler,
55419	})
55420	return gensupport.SendRequest(c.ctx_, c.s.client, req)
55421}
55422
55423// Do executes the "compute.regionAutoscalers.delete" call.
55424// Exactly one of *Operation or error will be non-nil. Any non-2xx
55425// status code is an error. Response headers are in either
55426// *Operation.ServerResponse.Header or (if a response was returned at
55427// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
55428// to check whether the returned error was because
55429// http.StatusNotModified was returned.
55430func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
55431	gensupport.SetOptions(c.urlParams_, opts...)
55432	res, err := c.doRequest("json")
55433	if res != nil && res.StatusCode == http.StatusNotModified {
55434		if res.Body != nil {
55435			res.Body.Close()
55436		}
55437		return nil, &googleapi.Error{
55438			Code:   res.StatusCode,
55439			Header: res.Header,
55440		}
55441	}
55442	if err != nil {
55443		return nil, err
55444	}
55445	defer googleapi.CloseBody(res)
55446	if err := googleapi.CheckResponse(res); err != nil {
55447		return nil, err
55448	}
55449	ret := &Operation{
55450		ServerResponse: googleapi.ServerResponse{
55451			Header:         res.Header,
55452			HTTPStatusCode: res.StatusCode,
55453		},
55454	}
55455	target := &ret
55456	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
55457		return nil, err
55458	}
55459	return ret, nil
55460	// {
55461	//   "description": "Deletes the specified autoscaler.",
55462	//   "httpMethod": "DELETE",
55463	//   "id": "compute.regionAutoscalers.delete",
55464	//   "parameterOrder": [
55465	//     "project",
55466	//     "region",
55467	//     "autoscaler"
55468	//   ],
55469	//   "parameters": {
55470	//     "autoscaler": {
55471	//       "description": "Name of the autoscaler to delete.",
55472	//       "location": "path",
55473	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
55474	//       "required": true,
55475	//       "type": "string"
55476	//     },
55477	//     "project": {
55478	//       "description": "Project ID for this request.",
55479	//       "location": "path",
55480	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
55481	//       "required": true,
55482	//       "type": "string"
55483	//     },
55484	//     "region": {
55485	//       "description": "Name of the region scoping this request.",
55486	//       "location": "path",
55487	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
55488	//       "required": true,
55489	//       "type": "string"
55490	//     },
55491	//     "requestId": {
55492	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
55493	//       "location": "query",
55494	//       "type": "string"
55495	//     }
55496	//   },
55497	//   "path": "{project}/regions/{region}/autoscalers/{autoscaler}",
55498	//   "response": {
55499	//     "$ref": "Operation"
55500	//   },
55501	//   "scopes": [
55502	//     "https://www.googleapis.com/auth/cloud-platform",
55503	//     "https://www.googleapis.com/auth/compute"
55504	//   ]
55505	// }
55506
55507}
55508
55509// method id "compute.regionAutoscalers.get":
55510
55511type RegionAutoscalersGetCall struct {
55512	s            *Service
55513	project      string
55514	region       string
55515	autoscaler   string
55516	urlParams_   gensupport.URLParams
55517	ifNoneMatch_ string
55518	ctx_         context.Context
55519	header_      http.Header
55520}
55521
55522// Get: Returns the specified autoscaler.
55523func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall {
55524	c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
55525	c.project = project
55526	c.region = region
55527	c.autoscaler = autoscaler
55528	return c
55529}
55530
55531// Fields allows partial responses to be retrieved. See
55532// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
55533// for more information.
55534func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall {
55535	c.urlParams_.Set("fields", googleapi.CombineFields(s))
55536	return c
55537}
55538
55539// IfNoneMatch sets the optional parameter which makes the operation
55540// fail if the object's ETag matches the given value. This is useful for
55541// getting updates only after the object has changed since the last
55542// request. Use googleapi.IsNotModified to check whether the response
55543// error from Do is the result of In-None-Match.
55544func (c *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall {
55545	c.ifNoneMatch_ = entityTag
55546	return c
55547}
55548
55549// Context sets the context to be used in this call's Do method. Any
55550// pending HTTP request will be aborted if the provided context is
55551// canceled.
55552func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall {
55553	c.ctx_ = ctx
55554	return c
55555}
55556
55557// Header returns an http.Header that can be modified by the caller to
55558// add HTTP headers to the request.
55559func (c *RegionAutoscalersGetCall) Header() http.Header {
55560	if c.header_ == nil {
55561		c.header_ = make(http.Header)
55562	}
55563	return c.header_
55564}
55565
55566func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) {
55567	reqHeaders := make(http.Header)
55568	for k, v := range c.header_ {
55569		reqHeaders[k] = v
55570	}
55571	reqHeaders.Set("User-Agent", c.s.userAgent())
55572	if c.ifNoneMatch_ != "" {
55573		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
55574	}
55575	var body io.Reader = nil
55576	c.urlParams_.Set("alt", alt)
55577	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{autoscaler}")
55578	urls += "?" + c.urlParams_.Encode()
55579	req, _ := http.NewRequest("GET", urls, body)
55580	req.Header = reqHeaders
55581	googleapi.Expand(req.URL, map[string]string{
55582		"project":    c.project,
55583		"region":     c.region,
55584		"autoscaler": c.autoscaler,
55585	})
55586	return gensupport.SendRequest(c.ctx_, c.s.client, req)
55587}
55588
55589// Do executes the "compute.regionAutoscalers.get" call.
55590// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx
55591// status code is an error. Response headers are in either
55592// *Autoscaler.ServerResponse.Header or (if a response was returned at
55593// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
55594// to check whether the returned error was because
55595// http.StatusNotModified was returned.
55596func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) {
55597	gensupport.SetOptions(c.urlParams_, opts...)
55598	res, err := c.doRequest("json")
55599	if res != nil && res.StatusCode == http.StatusNotModified {
55600		if res.Body != nil {
55601			res.Body.Close()
55602		}
55603		return nil, &googleapi.Error{
55604			Code:   res.StatusCode,
55605			Header: res.Header,
55606		}
55607	}
55608	if err != nil {
55609		return nil, err
55610	}
55611	defer googleapi.CloseBody(res)
55612	if err := googleapi.CheckResponse(res); err != nil {
55613		return nil, err
55614	}
55615	ret := &Autoscaler{
55616		ServerResponse: googleapi.ServerResponse{
55617			Header:         res.Header,
55618			HTTPStatusCode: res.StatusCode,
55619		},
55620	}
55621	target := &ret
55622	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
55623		return nil, err
55624	}
55625	return ret, nil
55626	// {
55627	//   "description": "Returns the specified autoscaler.",
55628	//   "httpMethod": "GET",
55629	//   "id": "compute.regionAutoscalers.get",
55630	//   "parameterOrder": [
55631	//     "project",
55632	//     "region",
55633	//     "autoscaler"
55634	//   ],
55635	//   "parameters": {
55636	//     "autoscaler": {
55637	//       "description": "Name of the autoscaler to return.",
55638	//       "location": "path",
55639	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
55640	//       "required": true,
55641	//       "type": "string"
55642	//     },
55643	//     "project": {
55644	//       "description": "Project ID for this request.",
55645	//       "location": "path",
55646	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
55647	//       "required": true,
55648	//       "type": "string"
55649	//     },
55650	//     "region": {
55651	//       "description": "Name of the region scoping this request.",
55652	//       "location": "path",
55653	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
55654	//       "required": true,
55655	//       "type": "string"
55656	//     }
55657	//   },
55658	//   "path": "{project}/regions/{region}/autoscalers/{autoscaler}",
55659	//   "response": {
55660	//     "$ref": "Autoscaler"
55661	//   },
55662	//   "scopes": [
55663	//     "https://www.googleapis.com/auth/cloud-platform",
55664	//     "https://www.googleapis.com/auth/compute",
55665	//     "https://www.googleapis.com/auth/compute.readonly"
55666	//   ]
55667	// }
55668
55669}
55670
55671// method id "compute.regionAutoscalers.insert":
55672
55673type RegionAutoscalersInsertCall struct {
55674	s          *Service
55675	project    string
55676	region     string
55677	autoscaler *Autoscaler
55678	urlParams_ gensupport.URLParams
55679	ctx_       context.Context
55680	header_    http.Header
55681}
55682
55683// Insert: Creates an autoscaler in the specified project using the data
55684// included in the request.
55685func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall {
55686	c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
55687	c.project = project
55688	c.region = region
55689	c.autoscaler = autoscaler
55690	return c
55691}
55692
55693// RequestId sets the optional parameter "requestId": An optional
55694// request ID to identify requests. Specify a unique request ID so that
55695// if you must retry your request, the server will know to ignore the
55696// request if it has already been completed.
55697//
55698// For example, consider a situation where you make an initial request
55699// and the request times out. If you make the request again with the
55700// same request ID, the server can check if original operation with the
55701// same request ID was received, and if so, will ignore the second
55702// request. This prevents clients from accidentally creating duplicate
55703// commitments.
55704//
55705// The request ID must be a valid UUID with the exception that zero UUID
55706// is not supported (00000000-0000-0000-0000-000000000000).
55707func (c *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall {
55708	c.urlParams_.Set("requestId", requestId)
55709	return c
55710}
55711
55712// Fields allows partial responses to be retrieved. See
55713// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
55714// for more information.
55715func (c *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall {
55716	c.urlParams_.Set("fields", googleapi.CombineFields(s))
55717	return c
55718}
55719
55720// Context sets the context to be used in this call's Do method. Any
55721// pending HTTP request will be aborted if the provided context is
55722// canceled.
55723func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall {
55724	c.ctx_ = ctx
55725	return c
55726}
55727
55728// Header returns an http.Header that can be modified by the caller to
55729// add HTTP headers to the request.
55730func (c *RegionAutoscalersInsertCall) Header() http.Header {
55731	if c.header_ == nil {
55732		c.header_ = make(http.Header)
55733	}
55734	return c.header_
55735}
55736
55737func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) {
55738	reqHeaders := make(http.Header)
55739	for k, v := range c.header_ {
55740		reqHeaders[k] = v
55741	}
55742	reqHeaders.Set("User-Agent", c.s.userAgent())
55743	var body io.Reader = nil
55744	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
55745	if err != nil {
55746		return nil, err
55747	}
55748	reqHeaders.Set("Content-Type", "application/json")
55749	c.urlParams_.Set("alt", alt)
55750	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers")
55751	urls += "?" + c.urlParams_.Encode()
55752	req, _ := http.NewRequest("POST", urls, body)
55753	req.Header = reqHeaders
55754	googleapi.Expand(req.URL, map[string]string{
55755		"project": c.project,
55756		"region":  c.region,
55757	})
55758	return gensupport.SendRequest(c.ctx_, c.s.client, req)
55759}
55760
55761// Do executes the "compute.regionAutoscalers.insert" call.
55762// Exactly one of *Operation or error will be non-nil. Any non-2xx
55763// status code is an error. Response headers are in either
55764// *Operation.ServerResponse.Header or (if a response was returned at
55765// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
55766// to check whether the returned error was because
55767// http.StatusNotModified was returned.
55768func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
55769	gensupport.SetOptions(c.urlParams_, opts...)
55770	res, err := c.doRequest("json")
55771	if res != nil && res.StatusCode == http.StatusNotModified {
55772		if res.Body != nil {
55773			res.Body.Close()
55774		}
55775		return nil, &googleapi.Error{
55776			Code:   res.StatusCode,
55777			Header: res.Header,
55778		}
55779	}
55780	if err != nil {
55781		return nil, err
55782	}
55783	defer googleapi.CloseBody(res)
55784	if err := googleapi.CheckResponse(res); err != nil {
55785		return nil, err
55786	}
55787	ret := &Operation{
55788		ServerResponse: googleapi.ServerResponse{
55789			Header:         res.Header,
55790			HTTPStatusCode: res.StatusCode,
55791		},
55792	}
55793	target := &ret
55794	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
55795		return nil, err
55796	}
55797	return ret, nil
55798	// {
55799	//   "description": "Creates an autoscaler in the specified project using the data included in the request.",
55800	//   "httpMethod": "POST",
55801	//   "id": "compute.regionAutoscalers.insert",
55802	//   "parameterOrder": [
55803	//     "project",
55804	//     "region"
55805	//   ],
55806	//   "parameters": {
55807	//     "project": {
55808	//       "description": "Project ID for this request.",
55809	//       "location": "path",
55810	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
55811	//       "required": true,
55812	//       "type": "string"
55813	//     },
55814	//     "region": {
55815	//       "description": "Name of the region scoping this request.",
55816	//       "location": "path",
55817	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
55818	//       "required": true,
55819	//       "type": "string"
55820	//     },
55821	//     "requestId": {
55822	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
55823	//       "location": "query",
55824	//       "type": "string"
55825	//     }
55826	//   },
55827	//   "path": "{project}/regions/{region}/autoscalers",
55828	//   "request": {
55829	//     "$ref": "Autoscaler"
55830	//   },
55831	//   "response": {
55832	//     "$ref": "Operation"
55833	//   },
55834	//   "scopes": [
55835	//     "https://www.googleapis.com/auth/cloud-platform",
55836	//     "https://www.googleapis.com/auth/compute"
55837	//   ]
55838	// }
55839
55840}
55841
55842// method id "compute.regionAutoscalers.list":
55843
55844type RegionAutoscalersListCall struct {
55845	s            *Service
55846	project      string
55847	region       string
55848	urlParams_   gensupport.URLParams
55849	ifNoneMatch_ string
55850	ctx_         context.Context
55851	header_      http.Header
55852}
55853
55854// List: Retrieves a list of autoscalers contained within the specified
55855// region.
55856func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall {
55857	c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
55858	c.project = project
55859	c.region = region
55860	return c
55861}
55862
55863// Filter sets the optional parameter "filter": Sets a filter
55864// {expression} for filtering listed resources. Your {expression} must
55865// be in the format: field_name comparison_string literal_string.
55866//
55867// The field_name is the name of the field you want to compare. Only
55868// atomic field types are supported (string, number, boolean). The
55869// comparison_string must be either eq (equals) or ne (not equals). The
55870// literal_string is the string value to filter to. The literal value
55871// must be valid for the type of field you are filtering by (string,
55872// number, boolean). For string fields, the literal value is interpreted
55873// as a regular expression using RE2 syntax. The literal value must
55874// match the entire field.
55875//
55876// For example, to filter for instances that do not have a name of
55877// example-instance, you would use name ne example-instance.
55878//
55879// You can filter on nested fields. For example, you could filter on
55880// instances that have set the scheduling.automaticRestart field to
55881// true. Use filtering on nested fields to take advantage of labels to
55882// organize and search for results based on label values.
55883//
55884// To filter on multiple expressions, provide each separate expression
55885// within parentheses. For example, (scheduling.automaticRestart eq
55886// true) (zone eq us-central1-f). Multiple expressions are treated as
55887// AND expressions, meaning that resources must match all expressions to
55888// pass the filters.
55889func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall {
55890	c.urlParams_.Set("filter", filter)
55891	return c
55892}
55893
55894// MaxResults sets the optional parameter "maxResults": The maximum
55895// number of results per page that should be returned. If the number of
55896// available results is larger than maxResults, Compute Engine returns a
55897// nextPageToken that can be used to get the next page of results in
55898// subsequent list requests. Acceptable values are 0 to 500, inclusive.
55899// (Default: 500)
55900func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall {
55901	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
55902	return c
55903}
55904
55905// OrderBy sets the optional parameter "orderBy": Sorts list results by
55906// a certain order. By default, results are returned in alphanumerical
55907// order based on the resource name.
55908//
55909// You can also sort results in descending order based on the creation
55910// timestamp using orderBy="creationTimestamp desc". This sorts results
55911// based on the creationTimestamp field in reverse chronological order
55912// (newest result first). Use this to sort resources like operations so
55913// that the newest operation is returned first.
55914//
55915// Currently, only sorting by name or creationTimestamp desc is
55916// supported.
55917func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall {
55918	c.urlParams_.Set("orderBy", orderBy)
55919	return c
55920}
55921
55922// PageToken sets the optional parameter "pageToken": Specifies a page
55923// token to use. Set pageToken to the nextPageToken returned by a
55924// previous list request to get the next page of results.
55925func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall {
55926	c.urlParams_.Set("pageToken", pageToken)
55927	return c
55928}
55929
55930// Fields allows partial responses to be retrieved. See
55931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
55932// for more information.
55933func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall {
55934	c.urlParams_.Set("fields", googleapi.CombineFields(s))
55935	return c
55936}
55937
55938// IfNoneMatch sets the optional parameter which makes the operation
55939// fail if the object's ETag matches the given value. This is useful for
55940// getting updates only after the object has changed since the last
55941// request. Use googleapi.IsNotModified to check whether the response
55942// error from Do is the result of In-None-Match.
55943func (c *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall {
55944	c.ifNoneMatch_ = entityTag
55945	return c
55946}
55947
55948// Context sets the context to be used in this call's Do method. Any
55949// pending HTTP request will be aborted if the provided context is
55950// canceled.
55951func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall {
55952	c.ctx_ = ctx
55953	return c
55954}
55955
55956// Header returns an http.Header that can be modified by the caller to
55957// add HTTP headers to the request.
55958func (c *RegionAutoscalersListCall) Header() http.Header {
55959	if c.header_ == nil {
55960		c.header_ = make(http.Header)
55961	}
55962	return c.header_
55963}
55964
55965func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) {
55966	reqHeaders := make(http.Header)
55967	for k, v := range c.header_ {
55968		reqHeaders[k] = v
55969	}
55970	reqHeaders.Set("User-Agent", c.s.userAgent())
55971	if c.ifNoneMatch_ != "" {
55972		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
55973	}
55974	var body io.Reader = nil
55975	c.urlParams_.Set("alt", alt)
55976	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers")
55977	urls += "?" + c.urlParams_.Encode()
55978	req, _ := http.NewRequest("GET", urls, body)
55979	req.Header = reqHeaders
55980	googleapi.Expand(req.URL, map[string]string{
55981		"project": c.project,
55982		"region":  c.region,
55983	})
55984	return gensupport.SendRequest(c.ctx_, c.s.client, req)
55985}
55986
55987// Do executes the "compute.regionAutoscalers.list" call.
55988// Exactly one of *RegionAutoscalerList or error will be non-nil. Any
55989// non-2xx status code is an error. Response headers are in either
55990// *RegionAutoscalerList.ServerResponse.Header or (if a response was
55991// returned at all) in error.(*googleapi.Error).Header. Use
55992// googleapi.IsNotModified to check whether the returned error was
55993// because http.StatusNotModified was returned.
55994func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, error) {
55995	gensupport.SetOptions(c.urlParams_, opts...)
55996	res, err := c.doRequest("json")
55997	if res != nil && res.StatusCode == http.StatusNotModified {
55998		if res.Body != nil {
55999			res.Body.Close()
56000		}
56001		return nil, &googleapi.Error{
56002			Code:   res.StatusCode,
56003			Header: res.Header,
56004		}
56005	}
56006	if err != nil {
56007		return nil, err
56008	}
56009	defer googleapi.CloseBody(res)
56010	if err := googleapi.CheckResponse(res); err != nil {
56011		return nil, err
56012	}
56013	ret := &RegionAutoscalerList{
56014		ServerResponse: googleapi.ServerResponse{
56015			Header:         res.Header,
56016			HTTPStatusCode: res.StatusCode,
56017		},
56018	}
56019	target := &ret
56020	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
56021		return nil, err
56022	}
56023	return ret, nil
56024	// {
56025	//   "description": "Retrieves a list of autoscalers contained within the specified region.",
56026	//   "httpMethod": "GET",
56027	//   "id": "compute.regionAutoscalers.list",
56028	//   "parameterOrder": [
56029	//     "project",
56030	//     "region"
56031	//   ],
56032	//   "parameters": {
56033	//     "filter": {
56034	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
56035	//       "location": "query",
56036	//       "type": "string"
56037	//     },
56038	//     "maxResults": {
56039	//       "default": "500",
56040	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
56041	//       "format": "uint32",
56042	//       "location": "query",
56043	//       "minimum": "0",
56044	//       "type": "integer"
56045	//     },
56046	//     "orderBy": {
56047	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
56048	//       "location": "query",
56049	//       "type": "string"
56050	//     },
56051	//     "pageToken": {
56052	//       "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.",
56053	//       "location": "query",
56054	//       "type": "string"
56055	//     },
56056	//     "project": {
56057	//       "description": "Project ID for this request.",
56058	//       "location": "path",
56059	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
56060	//       "required": true,
56061	//       "type": "string"
56062	//     },
56063	//     "region": {
56064	//       "description": "Name of the region scoping this request.",
56065	//       "location": "path",
56066	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56067	//       "required": true,
56068	//       "type": "string"
56069	//     }
56070	//   },
56071	//   "path": "{project}/regions/{region}/autoscalers",
56072	//   "response": {
56073	//     "$ref": "RegionAutoscalerList"
56074	//   },
56075	//   "scopes": [
56076	//     "https://www.googleapis.com/auth/cloud-platform",
56077	//     "https://www.googleapis.com/auth/compute",
56078	//     "https://www.googleapis.com/auth/compute.readonly"
56079	//   ]
56080	// }
56081
56082}
56083
56084// Pages invokes f for each page of results.
56085// A non-nil error returned from f will halt the iteration.
56086// The provided context supersedes any context provided to the Context method.
56087func (c *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) error) error {
56088	c.ctx_ = ctx
56089	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
56090	for {
56091		x, err := c.Do()
56092		if err != nil {
56093			return err
56094		}
56095		if err := f(x); err != nil {
56096			return err
56097		}
56098		if x.NextPageToken == "" {
56099			return nil
56100		}
56101		c.PageToken(x.NextPageToken)
56102	}
56103}
56104
56105// method id "compute.regionAutoscalers.patch":
56106
56107type RegionAutoscalersPatchCall struct {
56108	s          *Service
56109	project    string
56110	region     string
56111	autoscaler *Autoscaler
56112	urlParams_ gensupport.URLParams
56113	ctx_       context.Context
56114	header_    http.Header
56115}
56116
56117// Patch: Updates an autoscaler in the specified project using the data
56118// included in the request. This method supports PATCH semantics and
56119// uses the JSON merge patch format and processing rules.
56120func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall {
56121	c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
56122	c.project = project
56123	c.region = region
56124	c.autoscaler = autoscaler
56125	return c
56126}
56127
56128// Autoscaler sets the optional parameter "autoscaler": Name of the
56129// autoscaler to patch.
56130func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall {
56131	c.urlParams_.Set("autoscaler", autoscaler)
56132	return c
56133}
56134
56135// RequestId sets the optional parameter "requestId": An optional
56136// request ID to identify requests. Specify a unique request ID so that
56137// if you must retry your request, the server will know to ignore the
56138// request if it has already been completed.
56139//
56140// For example, consider a situation where you make an initial request
56141// and the request times out. If you make the request again with the
56142// same request ID, the server can check if original operation with the
56143// same request ID was received, and if so, will ignore the second
56144// request. This prevents clients from accidentally creating duplicate
56145// commitments.
56146//
56147// The request ID must be a valid UUID with the exception that zero UUID
56148// is not supported (00000000-0000-0000-0000-000000000000).
56149func (c *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall {
56150	c.urlParams_.Set("requestId", requestId)
56151	return c
56152}
56153
56154// Fields allows partial responses to be retrieved. See
56155// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
56156// for more information.
56157func (c *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall {
56158	c.urlParams_.Set("fields", googleapi.CombineFields(s))
56159	return c
56160}
56161
56162// Context sets the context to be used in this call's Do method. Any
56163// pending HTTP request will be aborted if the provided context is
56164// canceled.
56165func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall {
56166	c.ctx_ = ctx
56167	return c
56168}
56169
56170// Header returns an http.Header that can be modified by the caller to
56171// add HTTP headers to the request.
56172func (c *RegionAutoscalersPatchCall) Header() http.Header {
56173	if c.header_ == nil {
56174		c.header_ = make(http.Header)
56175	}
56176	return c.header_
56177}
56178
56179func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) {
56180	reqHeaders := make(http.Header)
56181	for k, v := range c.header_ {
56182		reqHeaders[k] = v
56183	}
56184	reqHeaders.Set("User-Agent", c.s.userAgent())
56185	var body io.Reader = nil
56186	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
56187	if err != nil {
56188		return nil, err
56189	}
56190	reqHeaders.Set("Content-Type", "application/json")
56191	c.urlParams_.Set("alt", alt)
56192	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers")
56193	urls += "?" + c.urlParams_.Encode()
56194	req, _ := http.NewRequest("PATCH", urls, body)
56195	req.Header = reqHeaders
56196	googleapi.Expand(req.URL, map[string]string{
56197		"project": c.project,
56198		"region":  c.region,
56199	})
56200	return gensupport.SendRequest(c.ctx_, c.s.client, req)
56201}
56202
56203// Do executes the "compute.regionAutoscalers.patch" call.
56204// Exactly one of *Operation or error will be non-nil. Any non-2xx
56205// status code is an error. Response headers are in either
56206// *Operation.ServerResponse.Header or (if a response was returned at
56207// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
56208// to check whether the returned error was because
56209// http.StatusNotModified was returned.
56210func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
56211	gensupport.SetOptions(c.urlParams_, opts...)
56212	res, err := c.doRequest("json")
56213	if res != nil && res.StatusCode == http.StatusNotModified {
56214		if res.Body != nil {
56215			res.Body.Close()
56216		}
56217		return nil, &googleapi.Error{
56218			Code:   res.StatusCode,
56219			Header: res.Header,
56220		}
56221	}
56222	if err != nil {
56223		return nil, err
56224	}
56225	defer googleapi.CloseBody(res)
56226	if err := googleapi.CheckResponse(res); err != nil {
56227		return nil, err
56228	}
56229	ret := &Operation{
56230		ServerResponse: googleapi.ServerResponse{
56231			Header:         res.Header,
56232			HTTPStatusCode: res.StatusCode,
56233		},
56234	}
56235	target := &ret
56236	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
56237		return nil, err
56238	}
56239	return ret, nil
56240	// {
56241	//   "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
56242	//   "httpMethod": "PATCH",
56243	//   "id": "compute.regionAutoscalers.patch",
56244	//   "parameterOrder": [
56245	//     "project",
56246	//     "region"
56247	//   ],
56248	//   "parameters": {
56249	//     "autoscaler": {
56250	//       "description": "Name of the autoscaler to patch.",
56251	//       "location": "query",
56252	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56253	//       "type": "string"
56254	//     },
56255	//     "project": {
56256	//       "description": "Project ID for this request.",
56257	//       "location": "path",
56258	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
56259	//       "required": true,
56260	//       "type": "string"
56261	//     },
56262	//     "region": {
56263	//       "description": "Name of the region scoping this request.",
56264	//       "location": "path",
56265	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56266	//       "required": true,
56267	//       "type": "string"
56268	//     },
56269	//     "requestId": {
56270	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
56271	//       "location": "query",
56272	//       "type": "string"
56273	//     }
56274	//   },
56275	//   "path": "{project}/regions/{region}/autoscalers",
56276	//   "request": {
56277	//     "$ref": "Autoscaler"
56278	//   },
56279	//   "response": {
56280	//     "$ref": "Operation"
56281	//   },
56282	//   "scopes": [
56283	//     "https://www.googleapis.com/auth/cloud-platform",
56284	//     "https://www.googleapis.com/auth/compute"
56285	//   ]
56286	// }
56287
56288}
56289
56290// method id "compute.regionAutoscalers.testIamPermissions":
56291
56292type RegionAutoscalersTestIamPermissionsCall struct {
56293	s                      *Service
56294	project                string
56295	region                 string
56296	resource               string
56297	testpermissionsrequest *TestPermissionsRequest
56298	urlParams_             gensupport.URLParams
56299	ctx_                   context.Context
56300	header_                http.Header
56301}
56302
56303// TestIamPermissions: Returns permissions that a caller has on the
56304// specified resource.
56305func (r *RegionAutoscalersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionAutoscalersTestIamPermissionsCall {
56306	c := &RegionAutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
56307	c.project = project
56308	c.region = region
56309	c.resource = resource
56310	c.testpermissionsrequest = testpermissionsrequest
56311	return c
56312}
56313
56314// Fields allows partial responses to be retrieved. See
56315// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
56316// for more information.
56317func (c *RegionAutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionAutoscalersTestIamPermissionsCall {
56318	c.urlParams_.Set("fields", googleapi.CombineFields(s))
56319	return c
56320}
56321
56322// Context sets the context to be used in this call's Do method. Any
56323// pending HTTP request will be aborted if the provided context is
56324// canceled.
56325func (c *RegionAutoscalersTestIamPermissionsCall) Context(ctx context.Context) *RegionAutoscalersTestIamPermissionsCall {
56326	c.ctx_ = ctx
56327	return c
56328}
56329
56330// Header returns an http.Header that can be modified by the caller to
56331// add HTTP headers to the request.
56332func (c *RegionAutoscalersTestIamPermissionsCall) Header() http.Header {
56333	if c.header_ == nil {
56334		c.header_ = make(http.Header)
56335	}
56336	return c.header_
56337}
56338
56339func (c *RegionAutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
56340	reqHeaders := make(http.Header)
56341	for k, v := range c.header_ {
56342		reqHeaders[k] = v
56343	}
56344	reqHeaders.Set("User-Agent", c.s.userAgent())
56345	var body io.Reader = nil
56346	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
56347	if err != nil {
56348		return nil, err
56349	}
56350	reqHeaders.Set("Content-Type", "application/json")
56351	c.urlParams_.Set("alt", alt)
56352	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers/{resource}/testIamPermissions")
56353	urls += "?" + c.urlParams_.Encode()
56354	req, _ := http.NewRequest("POST", urls, body)
56355	req.Header = reqHeaders
56356	googleapi.Expand(req.URL, map[string]string{
56357		"project":  c.project,
56358		"region":   c.region,
56359		"resource": c.resource,
56360	})
56361	return gensupport.SendRequest(c.ctx_, c.s.client, req)
56362}
56363
56364// Do executes the "compute.regionAutoscalers.testIamPermissions" call.
56365// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
56366// non-2xx status code is an error. Response headers are in either
56367// *TestPermissionsResponse.ServerResponse.Header or (if a response was
56368// returned at all) in error.(*googleapi.Error).Header. Use
56369// googleapi.IsNotModified to check whether the returned error was
56370// because http.StatusNotModified was returned.
56371func (c *RegionAutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
56372	gensupport.SetOptions(c.urlParams_, opts...)
56373	res, err := c.doRequest("json")
56374	if res != nil && res.StatusCode == http.StatusNotModified {
56375		if res.Body != nil {
56376			res.Body.Close()
56377		}
56378		return nil, &googleapi.Error{
56379			Code:   res.StatusCode,
56380			Header: res.Header,
56381		}
56382	}
56383	if err != nil {
56384		return nil, err
56385	}
56386	defer googleapi.CloseBody(res)
56387	if err := googleapi.CheckResponse(res); err != nil {
56388		return nil, err
56389	}
56390	ret := &TestPermissionsResponse{
56391		ServerResponse: googleapi.ServerResponse{
56392			Header:         res.Header,
56393			HTTPStatusCode: res.StatusCode,
56394		},
56395	}
56396	target := &ret
56397	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
56398		return nil, err
56399	}
56400	return ret, nil
56401	// {
56402	//   "description": "Returns permissions that a caller has on the specified resource.",
56403	//   "httpMethod": "POST",
56404	//   "id": "compute.regionAutoscalers.testIamPermissions",
56405	//   "parameterOrder": [
56406	//     "project",
56407	//     "region",
56408	//     "resource"
56409	//   ],
56410	//   "parameters": {
56411	//     "project": {
56412	//       "description": "Project ID for this request.",
56413	//       "location": "path",
56414	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
56415	//       "required": true,
56416	//       "type": "string"
56417	//     },
56418	//     "region": {
56419	//       "description": "The name of the region for this request.",
56420	//       "location": "path",
56421	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56422	//       "required": true,
56423	//       "type": "string"
56424	//     },
56425	//     "resource": {
56426	//       "description": "Name of the resource for this request.",
56427	//       "location": "path",
56428	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56429	//       "required": true,
56430	//       "type": "string"
56431	//     }
56432	//   },
56433	//   "path": "{project}/regions/{region}/autoscalers/{resource}/testIamPermissions",
56434	//   "request": {
56435	//     "$ref": "TestPermissionsRequest"
56436	//   },
56437	//   "response": {
56438	//     "$ref": "TestPermissionsResponse"
56439	//   },
56440	//   "scopes": [
56441	//     "https://www.googleapis.com/auth/cloud-platform",
56442	//     "https://www.googleapis.com/auth/compute",
56443	//     "https://www.googleapis.com/auth/compute.readonly"
56444	//   ]
56445	// }
56446
56447}
56448
56449// method id "compute.regionAutoscalers.update":
56450
56451type RegionAutoscalersUpdateCall struct {
56452	s          *Service
56453	project    string
56454	region     string
56455	autoscaler *Autoscaler
56456	urlParams_ gensupport.URLParams
56457	ctx_       context.Context
56458	header_    http.Header
56459}
56460
56461// Update: Updates an autoscaler in the specified project using the data
56462// included in the request.
56463func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall {
56464	c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
56465	c.project = project
56466	c.region = region
56467	c.autoscaler = autoscaler
56468	return c
56469}
56470
56471// Autoscaler sets the optional parameter "autoscaler": Name of the
56472// autoscaler to update.
56473func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall {
56474	c.urlParams_.Set("autoscaler", autoscaler)
56475	return c
56476}
56477
56478// RequestId sets the optional parameter "requestId": An optional
56479// request ID to identify requests. Specify a unique request ID so that
56480// if you must retry your request, the server will know to ignore the
56481// request if it has already been completed.
56482//
56483// For example, consider a situation where you make an initial request
56484// and the request times out. If you make the request again with the
56485// same request ID, the server can check if original operation with the
56486// same request ID was received, and if so, will ignore the second
56487// request. This prevents clients from accidentally creating duplicate
56488// commitments.
56489//
56490// The request ID must be a valid UUID with the exception that zero UUID
56491// is not supported (00000000-0000-0000-0000-000000000000).
56492func (c *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall {
56493	c.urlParams_.Set("requestId", requestId)
56494	return c
56495}
56496
56497// Fields allows partial responses to be retrieved. See
56498// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
56499// for more information.
56500func (c *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall {
56501	c.urlParams_.Set("fields", googleapi.CombineFields(s))
56502	return c
56503}
56504
56505// Context sets the context to be used in this call's Do method. Any
56506// pending HTTP request will be aborted if the provided context is
56507// canceled.
56508func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall {
56509	c.ctx_ = ctx
56510	return c
56511}
56512
56513// Header returns an http.Header that can be modified by the caller to
56514// add HTTP headers to the request.
56515func (c *RegionAutoscalersUpdateCall) Header() http.Header {
56516	if c.header_ == nil {
56517		c.header_ = make(http.Header)
56518	}
56519	return c.header_
56520}
56521
56522func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) {
56523	reqHeaders := make(http.Header)
56524	for k, v := range c.header_ {
56525		reqHeaders[k] = v
56526	}
56527	reqHeaders.Set("User-Agent", c.s.userAgent())
56528	var body io.Reader = nil
56529	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
56530	if err != nil {
56531		return nil, err
56532	}
56533	reqHeaders.Set("Content-Type", "application/json")
56534	c.urlParams_.Set("alt", alt)
56535	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/autoscalers")
56536	urls += "?" + c.urlParams_.Encode()
56537	req, _ := http.NewRequest("PUT", urls, body)
56538	req.Header = reqHeaders
56539	googleapi.Expand(req.URL, map[string]string{
56540		"project": c.project,
56541		"region":  c.region,
56542	})
56543	return gensupport.SendRequest(c.ctx_, c.s.client, req)
56544}
56545
56546// Do executes the "compute.regionAutoscalers.update" call.
56547// Exactly one of *Operation or error will be non-nil. Any non-2xx
56548// status code is an error. Response headers are in either
56549// *Operation.ServerResponse.Header or (if a response was returned at
56550// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
56551// to check whether the returned error was because
56552// http.StatusNotModified was returned.
56553func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
56554	gensupport.SetOptions(c.urlParams_, opts...)
56555	res, err := c.doRequest("json")
56556	if res != nil && res.StatusCode == http.StatusNotModified {
56557		if res.Body != nil {
56558			res.Body.Close()
56559		}
56560		return nil, &googleapi.Error{
56561			Code:   res.StatusCode,
56562			Header: res.Header,
56563		}
56564	}
56565	if err != nil {
56566		return nil, err
56567	}
56568	defer googleapi.CloseBody(res)
56569	if err := googleapi.CheckResponse(res); err != nil {
56570		return nil, err
56571	}
56572	ret := &Operation{
56573		ServerResponse: googleapi.ServerResponse{
56574			Header:         res.Header,
56575			HTTPStatusCode: res.StatusCode,
56576		},
56577	}
56578	target := &ret
56579	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
56580		return nil, err
56581	}
56582	return ret, nil
56583	// {
56584	//   "description": "Updates an autoscaler in the specified project using the data included in the request.",
56585	//   "httpMethod": "PUT",
56586	//   "id": "compute.regionAutoscalers.update",
56587	//   "parameterOrder": [
56588	//     "project",
56589	//     "region"
56590	//   ],
56591	//   "parameters": {
56592	//     "autoscaler": {
56593	//       "description": "Name of the autoscaler to update.",
56594	//       "location": "query",
56595	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56596	//       "type": "string"
56597	//     },
56598	//     "project": {
56599	//       "description": "Project ID for this request.",
56600	//       "location": "path",
56601	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
56602	//       "required": true,
56603	//       "type": "string"
56604	//     },
56605	//     "region": {
56606	//       "description": "Name of the region scoping this request.",
56607	//       "location": "path",
56608	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56609	//       "required": true,
56610	//       "type": "string"
56611	//     },
56612	//     "requestId": {
56613	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
56614	//       "location": "query",
56615	//       "type": "string"
56616	//     }
56617	//   },
56618	//   "path": "{project}/regions/{region}/autoscalers",
56619	//   "request": {
56620	//     "$ref": "Autoscaler"
56621	//   },
56622	//   "response": {
56623	//     "$ref": "Operation"
56624	//   },
56625	//   "scopes": [
56626	//     "https://www.googleapis.com/auth/cloud-platform",
56627	//     "https://www.googleapis.com/auth/compute"
56628	//   ]
56629	// }
56630
56631}
56632
56633// method id "compute.regionBackendServices.delete":
56634
56635type RegionBackendServicesDeleteCall struct {
56636	s              *Service
56637	project        string
56638	region         string
56639	backendService string
56640	urlParams_     gensupport.URLParams
56641	ctx_           context.Context
56642	header_        http.Header
56643}
56644
56645// Delete: Deletes the specified regional BackendService resource.
56646func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall {
56647	c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
56648	c.project = project
56649	c.region = region
56650	c.backendService = backendService
56651	return c
56652}
56653
56654// RequestId sets the optional parameter "requestId": An optional
56655// request ID to identify requests. Specify a unique request ID so that
56656// if you must retry your request, the server will know to ignore the
56657// request if it has already been completed.
56658//
56659// For example, consider a situation where you make an initial request
56660// and the request times out. If you make the request again with the
56661// same request ID, the server can check if original operation with the
56662// same request ID was received, and if so, will ignore the second
56663// request. This prevents clients from accidentally creating duplicate
56664// commitments.
56665//
56666// The request ID must be a valid UUID with the exception that zero UUID
56667// is not supported (00000000-0000-0000-0000-000000000000).
56668func (c *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall {
56669	c.urlParams_.Set("requestId", requestId)
56670	return c
56671}
56672
56673// Fields allows partial responses to be retrieved. See
56674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
56675// for more information.
56676func (c *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall {
56677	c.urlParams_.Set("fields", googleapi.CombineFields(s))
56678	return c
56679}
56680
56681// Context sets the context to be used in this call's Do method. Any
56682// pending HTTP request will be aborted if the provided context is
56683// canceled.
56684func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall {
56685	c.ctx_ = ctx
56686	return c
56687}
56688
56689// Header returns an http.Header that can be modified by the caller to
56690// add HTTP headers to the request.
56691func (c *RegionBackendServicesDeleteCall) Header() http.Header {
56692	if c.header_ == nil {
56693		c.header_ = make(http.Header)
56694	}
56695	return c.header_
56696}
56697
56698func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
56699	reqHeaders := make(http.Header)
56700	for k, v := range c.header_ {
56701		reqHeaders[k] = v
56702	}
56703	reqHeaders.Set("User-Agent", c.s.userAgent())
56704	var body io.Reader = nil
56705	c.urlParams_.Set("alt", alt)
56706	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}")
56707	urls += "?" + c.urlParams_.Encode()
56708	req, _ := http.NewRequest("DELETE", urls, body)
56709	req.Header = reqHeaders
56710	googleapi.Expand(req.URL, map[string]string{
56711		"project":        c.project,
56712		"region":         c.region,
56713		"backendService": c.backendService,
56714	})
56715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
56716}
56717
56718// Do executes the "compute.regionBackendServices.delete" call.
56719// Exactly one of *Operation or error will be non-nil. Any non-2xx
56720// status code is an error. Response headers are in either
56721// *Operation.ServerResponse.Header or (if a response was returned at
56722// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
56723// to check whether the returned error was because
56724// http.StatusNotModified was returned.
56725func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
56726	gensupport.SetOptions(c.urlParams_, opts...)
56727	res, err := c.doRequest("json")
56728	if res != nil && res.StatusCode == http.StatusNotModified {
56729		if res.Body != nil {
56730			res.Body.Close()
56731		}
56732		return nil, &googleapi.Error{
56733			Code:   res.StatusCode,
56734			Header: res.Header,
56735		}
56736	}
56737	if err != nil {
56738		return nil, err
56739	}
56740	defer googleapi.CloseBody(res)
56741	if err := googleapi.CheckResponse(res); err != nil {
56742		return nil, err
56743	}
56744	ret := &Operation{
56745		ServerResponse: googleapi.ServerResponse{
56746			Header:         res.Header,
56747			HTTPStatusCode: res.StatusCode,
56748		},
56749	}
56750	target := &ret
56751	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
56752		return nil, err
56753	}
56754	return ret, nil
56755	// {
56756	//   "description": "Deletes the specified regional BackendService resource.",
56757	//   "httpMethod": "DELETE",
56758	//   "id": "compute.regionBackendServices.delete",
56759	//   "parameterOrder": [
56760	//     "project",
56761	//     "region",
56762	//     "backendService"
56763	//   ],
56764	//   "parameters": {
56765	//     "backendService": {
56766	//       "description": "Name of the BackendService resource to delete.",
56767	//       "location": "path",
56768	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56769	//       "required": true,
56770	//       "type": "string"
56771	//     },
56772	//     "project": {
56773	//       "description": "Project ID for this request.",
56774	//       "location": "path",
56775	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
56776	//       "required": true,
56777	//       "type": "string"
56778	//     },
56779	//     "region": {
56780	//       "description": "Name of the region scoping this request.",
56781	//       "location": "path",
56782	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56783	//       "required": true,
56784	//       "type": "string"
56785	//     },
56786	//     "requestId": {
56787	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
56788	//       "location": "query",
56789	//       "type": "string"
56790	//     }
56791	//   },
56792	//   "path": "{project}/regions/{region}/backendServices/{backendService}",
56793	//   "response": {
56794	//     "$ref": "Operation"
56795	//   },
56796	//   "scopes": [
56797	//     "https://www.googleapis.com/auth/cloud-platform",
56798	//     "https://www.googleapis.com/auth/compute"
56799	//   ]
56800	// }
56801
56802}
56803
56804// method id "compute.regionBackendServices.get":
56805
56806type RegionBackendServicesGetCall struct {
56807	s              *Service
56808	project        string
56809	region         string
56810	backendService string
56811	urlParams_     gensupport.URLParams
56812	ifNoneMatch_   string
56813	ctx_           context.Context
56814	header_        http.Header
56815}
56816
56817// Get: Returns the specified regional BackendService resource.
56818func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall {
56819	c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
56820	c.project = project
56821	c.region = region
56822	c.backendService = backendService
56823	return c
56824}
56825
56826// Fields allows partial responses to be retrieved. See
56827// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
56828// for more information.
56829func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall {
56830	c.urlParams_.Set("fields", googleapi.CombineFields(s))
56831	return c
56832}
56833
56834// IfNoneMatch sets the optional parameter which makes the operation
56835// fail if the object's ETag matches the given value. This is useful for
56836// getting updates only after the object has changed since the last
56837// request. Use googleapi.IsNotModified to check whether the response
56838// error from Do is the result of In-None-Match.
56839func (c *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall {
56840	c.ifNoneMatch_ = entityTag
56841	return c
56842}
56843
56844// Context sets the context to be used in this call's Do method. Any
56845// pending HTTP request will be aborted if the provided context is
56846// canceled.
56847func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall {
56848	c.ctx_ = ctx
56849	return c
56850}
56851
56852// Header returns an http.Header that can be modified by the caller to
56853// add HTTP headers to the request.
56854func (c *RegionBackendServicesGetCall) Header() http.Header {
56855	if c.header_ == nil {
56856		c.header_ = make(http.Header)
56857	}
56858	return c.header_
56859}
56860
56861func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) {
56862	reqHeaders := make(http.Header)
56863	for k, v := range c.header_ {
56864		reqHeaders[k] = v
56865	}
56866	reqHeaders.Set("User-Agent", c.s.userAgent())
56867	if c.ifNoneMatch_ != "" {
56868		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
56869	}
56870	var body io.Reader = nil
56871	c.urlParams_.Set("alt", alt)
56872	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}")
56873	urls += "?" + c.urlParams_.Encode()
56874	req, _ := http.NewRequest("GET", urls, body)
56875	req.Header = reqHeaders
56876	googleapi.Expand(req.URL, map[string]string{
56877		"project":        c.project,
56878		"region":         c.region,
56879		"backendService": c.backendService,
56880	})
56881	return gensupport.SendRequest(c.ctx_, c.s.client, req)
56882}
56883
56884// Do executes the "compute.regionBackendServices.get" call.
56885// Exactly one of *BackendService or error will be non-nil. Any non-2xx
56886// status code is an error. Response headers are in either
56887// *BackendService.ServerResponse.Header or (if a response was returned
56888// at all) in error.(*googleapi.Error).Header. Use
56889// googleapi.IsNotModified to check whether the returned error was
56890// because http.StatusNotModified was returned.
56891func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) {
56892	gensupport.SetOptions(c.urlParams_, opts...)
56893	res, err := c.doRequest("json")
56894	if res != nil && res.StatusCode == http.StatusNotModified {
56895		if res.Body != nil {
56896			res.Body.Close()
56897		}
56898		return nil, &googleapi.Error{
56899			Code:   res.StatusCode,
56900			Header: res.Header,
56901		}
56902	}
56903	if err != nil {
56904		return nil, err
56905	}
56906	defer googleapi.CloseBody(res)
56907	if err := googleapi.CheckResponse(res); err != nil {
56908		return nil, err
56909	}
56910	ret := &BackendService{
56911		ServerResponse: googleapi.ServerResponse{
56912			Header:         res.Header,
56913			HTTPStatusCode: res.StatusCode,
56914		},
56915	}
56916	target := &ret
56917	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
56918		return nil, err
56919	}
56920	return ret, nil
56921	// {
56922	//   "description": "Returns the specified regional BackendService resource.",
56923	//   "httpMethod": "GET",
56924	//   "id": "compute.regionBackendServices.get",
56925	//   "parameterOrder": [
56926	//     "project",
56927	//     "region",
56928	//     "backendService"
56929	//   ],
56930	//   "parameters": {
56931	//     "backendService": {
56932	//       "description": "Name of the BackendService resource to return.",
56933	//       "location": "path",
56934	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56935	//       "required": true,
56936	//       "type": "string"
56937	//     },
56938	//     "project": {
56939	//       "description": "Project ID for this request.",
56940	//       "location": "path",
56941	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
56942	//       "required": true,
56943	//       "type": "string"
56944	//     },
56945	//     "region": {
56946	//       "description": "Name of the region scoping this request.",
56947	//       "location": "path",
56948	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
56949	//       "required": true,
56950	//       "type": "string"
56951	//     }
56952	//   },
56953	//   "path": "{project}/regions/{region}/backendServices/{backendService}",
56954	//   "response": {
56955	//     "$ref": "BackendService"
56956	//   },
56957	//   "scopes": [
56958	//     "https://www.googleapis.com/auth/cloud-platform",
56959	//     "https://www.googleapis.com/auth/compute",
56960	//     "https://www.googleapis.com/auth/compute.readonly"
56961	//   ]
56962	// }
56963
56964}
56965
56966// method id "compute.regionBackendServices.getHealth":
56967
56968type RegionBackendServicesGetHealthCall struct {
56969	s                      *Service
56970	project                string
56971	region                 string
56972	backendService         string
56973	resourcegroupreference *ResourceGroupReference
56974	urlParams_             gensupport.URLParams
56975	ctx_                   context.Context
56976	header_                http.Header
56977}
56978
56979// GetHealth: Gets the most recent health check results for this
56980// regional BackendService.
56981func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall {
56982	c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
56983	c.project = project
56984	c.region = region
56985	c.backendService = backendService
56986	c.resourcegroupreference = resourcegroupreference
56987	return c
56988}
56989
56990// Fields allows partial responses to be retrieved. See
56991// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
56992// for more information.
56993func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall {
56994	c.urlParams_.Set("fields", googleapi.CombineFields(s))
56995	return c
56996}
56997
56998// Context sets the context to be used in this call's Do method. Any
56999// pending HTTP request will be aborted if the provided context is
57000// canceled.
57001func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall {
57002	c.ctx_ = ctx
57003	return c
57004}
57005
57006// Header returns an http.Header that can be modified by the caller to
57007// add HTTP headers to the request.
57008func (c *RegionBackendServicesGetHealthCall) Header() http.Header {
57009	if c.header_ == nil {
57010		c.header_ = make(http.Header)
57011	}
57012	return c.header_
57013}
57014
57015func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) {
57016	reqHeaders := make(http.Header)
57017	for k, v := range c.header_ {
57018		reqHeaders[k] = v
57019	}
57020	reqHeaders.Set("User-Agent", c.s.userAgent())
57021	var body io.Reader = nil
57022	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference)
57023	if err != nil {
57024		return nil, err
57025	}
57026	reqHeaders.Set("Content-Type", "application/json")
57027	c.urlParams_.Set("alt", alt)
57028	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}/getHealth")
57029	urls += "?" + c.urlParams_.Encode()
57030	req, _ := http.NewRequest("POST", urls, body)
57031	req.Header = reqHeaders
57032	googleapi.Expand(req.URL, map[string]string{
57033		"project":        c.project,
57034		"region":         c.region,
57035		"backendService": c.backendService,
57036	})
57037	return gensupport.SendRequest(c.ctx_, c.s.client, req)
57038}
57039
57040// Do executes the "compute.regionBackendServices.getHealth" call.
57041// Exactly one of *BackendServiceGroupHealth or error will be non-nil.
57042// Any non-2xx status code is an error. Response headers are in either
57043// *BackendServiceGroupHealth.ServerResponse.Header or (if a response
57044// was returned at all) in error.(*googleapi.Error).Header. Use
57045// googleapi.IsNotModified to check whether the returned error was
57046// because http.StatusNotModified was returned.
57047func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) {
57048	gensupport.SetOptions(c.urlParams_, opts...)
57049	res, err := c.doRequest("json")
57050	if res != nil && res.StatusCode == http.StatusNotModified {
57051		if res.Body != nil {
57052			res.Body.Close()
57053		}
57054		return nil, &googleapi.Error{
57055			Code:   res.StatusCode,
57056			Header: res.Header,
57057		}
57058	}
57059	if err != nil {
57060		return nil, err
57061	}
57062	defer googleapi.CloseBody(res)
57063	if err := googleapi.CheckResponse(res); err != nil {
57064		return nil, err
57065	}
57066	ret := &BackendServiceGroupHealth{
57067		ServerResponse: googleapi.ServerResponse{
57068			Header:         res.Header,
57069			HTTPStatusCode: res.StatusCode,
57070		},
57071	}
57072	target := &ret
57073	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
57074		return nil, err
57075	}
57076	return ret, nil
57077	// {
57078	//   "description": "Gets the most recent health check results for this regional BackendService.",
57079	//   "httpMethod": "POST",
57080	//   "id": "compute.regionBackendServices.getHealth",
57081	//   "parameterOrder": [
57082	//     "project",
57083	//     "region",
57084	//     "backendService"
57085	//   ],
57086	//   "parameters": {
57087	//     "backendService": {
57088	//       "description": "Name of the BackendService resource to which the queried instance belongs.",
57089	//       "location": "path",
57090	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
57091	//       "required": true,
57092	//       "type": "string"
57093	//     },
57094	//     "project": {
57095	//       "location": "path",
57096	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
57097	//       "required": true,
57098	//       "type": "string"
57099	//     },
57100	//     "region": {
57101	//       "description": "Name of the region scoping this request.",
57102	//       "location": "path",
57103	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
57104	//       "required": true,
57105	//       "type": "string"
57106	//     }
57107	//   },
57108	//   "path": "{project}/regions/{region}/backendServices/{backendService}/getHealth",
57109	//   "request": {
57110	//     "$ref": "ResourceGroupReference"
57111	//   },
57112	//   "response": {
57113	//     "$ref": "BackendServiceGroupHealth"
57114	//   },
57115	//   "scopes": [
57116	//     "https://www.googleapis.com/auth/cloud-platform",
57117	//     "https://www.googleapis.com/auth/compute",
57118	//     "https://www.googleapis.com/auth/compute.readonly"
57119	//   ]
57120	// }
57121
57122}
57123
57124// method id "compute.regionBackendServices.insert":
57125
57126type RegionBackendServicesInsertCall struct {
57127	s              *Service
57128	project        string
57129	region         string
57130	backendservice *BackendService
57131	urlParams_     gensupport.URLParams
57132	ctx_           context.Context
57133	header_        http.Header
57134}
57135
57136// Insert: Creates a regional BackendService resource in the specified
57137// project using the data included in the request. There are several
57138// restrictions and guidelines to keep in mind when creating a regional
57139// backend service. Read  Restrictions and Guidelines for more
57140// information.
57141func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall {
57142	c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
57143	c.project = project
57144	c.region = region
57145	c.backendservice = backendservice
57146	return c
57147}
57148
57149// RequestId sets the optional parameter "requestId": An optional
57150// request ID to identify requests. Specify a unique request ID so that
57151// if you must retry your request, the server will know to ignore the
57152// request if it has already been completed.
57153//
57154// For example, consider a situation where you make an initial request
57155// and the request times out. If you make the request again with the
57156// same request ID, the server can check if original operation with the
57157// same request ID was received, and if so, will ignore the second
57158// request. This prevents clients from accidentally creating duplicate
57159// commitments.
57160//
57161// The request ID must be a valid UUID with the exception that zero UUID
57162// is not supported (00000000-0000-0000-0000-000000000000).
57163func (c *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall {
57164	c.urlParams_.Set("requestId", requestId)
57165	return c
57166}
57167
57168// Fields allows partial responses to be retrieved. See
57169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
57170// for more information.
57171func (c *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall {
57172	c.urlParams_.Set("fields", googleapi.CombineFields(s))
57173	return c
57174}
57175
57176// Context sets the context to be used in this call's Do method. Any
57177// pending HTTP request will be aborted if the provided context is
57178// canceled.
57179func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall {
57180	c.ctx_ = ctx
57181	return c
57182}
57183
57184// Header returns an http.Header that can be modified by the caller to
57185// add HTTP headers to the request.
57186func (c *RegionBackendServicesInsertCall) Header() http.Header {
57187	if c.header_ == nil {
57188		c.header_ = make(http.Header)
57189	}
57190	return c.header_
57191}
57192
57193func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) {
57194	reqHeaders := make(http.Header)
57195	for k, v := range c.header_ {
57196		reqHeaders[k] = v
57197	}
57198	reqHeaders.Set("User-Agent", c.s.userAgent())
57199	var body io.Reader = nil
57200	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
57201	if err != nil {
57202		return nil, err
57203	}
57204	reqHeaders.Set("Content-Type", "application/json")
57205	c.urlParams_.Set("alt", alt)
57206	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices")
57207	urls += "?" + c.urlParams_.Encode()
57208	req, _ := http.NewRequest("POST", urls, body)
57209	req.Header = reqHeaders
57210	googleapi.Expand(req.URL, map[string]string{
57211		"project": c.project,
57212		"region":  c.region,
57213	})
57214	return gensupport.SendRequest(c.ctx_, c.s.client, req)
57215}
57216
57217// Do executes the "compute.regionBackendServices.insert" call.
57218// Exactly one of *Operation or error will be non-nil. Any non-2xx
57219// status code is an error. Response headers are in either
57220// *Operation.ServerResponse.Header or (if a response was returned at
57221// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
57222// to check whether the returned error was because
57223// http.StatusNotModified was returned.
57224func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
57225	gensupport.SetOptions(c.urlParams_, opts...)
57226	res, err := c.doRequest("json")
57227	if res != nil && res.StatusCode == http.StatusNotModified {
57228		if res.Body != nil {
57229			res.Body.Close()
57230		}
57231		return nil, &googleapi.Error{
57232			Code:   res.StatusCode,
57233			Header: res.Header,
57234		}
57235	}
57236	if err != nil {
57237		return nil, err
57238	}
57239	defer googleapi.CloseBody(res)
57240	if err := googleapi.CheckResponse(res); err != nil {
57241		return nil, err
57242	}
57243	ret := &Operation{
57244		ServerResponse: googleapi.ServerResponse{
57245			Header:         res.Header,
57246			HTTPStatusCode: res.StatusCode,
57247		},
57248	}
57249	target := &ret
57250	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
57251		return nil, err
57252	}
57253	return ret, nil
57254	// {
57255	//   "description": "Creates a regional 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 regional backend service. Read  Restrictions and Guidelines for more information.",
57256	//   "httpMethod": "POST",
57257	//   "id": "compute.regionBackendServices.insert",
57258	//   "parameterOrder": [
57259	//     "project",
57260	//     "region"
57261	//   ],
57262	//   "parameters": {
57263	//     "project": {
57264	//       "description": "Project ID for this request.",
57265	//       "location": "path",
57266	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
57267	//       "required": true,
57268	//       "type": "string"
57269	//     },
57270	//     "region": {
57271	//       "description": "Name of the region scoping this request.",
57272	//       "location": "path",
57273	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
57274	//       "required": true,
57275	//       "type": "string"
57276	//     },
57277	//     "requestId": {
57278	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
57279	//       "location": "query",
57280	//       "type": "string"
57281	//     }
57282	//   },
57283	//   "path": "{project}/regions/{region}/backendServices",
57284	//   "request": {
57285	//     "$ref": "BackendService"
57286	//   },
57287	//   "response": {
57288	//     "$ref": "Operation"
57289	//   },
57290	//   "scopes": [
57291	//     "https://www.googleapis.com/auth/cloud-platform",
57292	//     "https://www.googleapis.com/auth/compute"
57293	//   ]
57294	// }
57295
57296}
57297
57298// method id "compute.regionBackendServices.list":
57299
57300type RegionBackendServicesListCall struct {
57301	s            *Service
57302	project      string
57303	region       string
57304	urlParams_   gensupport.URLParams
57305	ifNoneMatch_ string
57306	ctx_         context.Context
57307	header_      http.Header
57308}
57309
57310// List: Retrieves the list of regional BackendService resources
57311// available to the specified project in the given region.
57312func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall {
57313	c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
57314	c.project = project
57315	c.region = region
57316	return c
57317}
57318
57319// Filter sets the optional parameter "filter": Sets a filter
57320// {expression} for filtering listed resources. Your {expression} must
57321// be in the format: field_name comparison_string literal_string.
57322//
57323// The field_name is the name of the field you want to compare. Only
57324// atomic field types are supported (string, number, boolean). The
57325// comparison_string must be either eq (equals) or ne (not equals). The
57326// literal_string is the string value to filter to. The literal value
57327// must be valid for the type of field you are filtering by (string,
57328// number, boolean). For string fields, the literal value is interpreted
57329// as a regular expression using RE2 syntax. The literal value must
57330// match the entire field.
57331//
57332// For example, to filter for instances that do not have a name of
57333// example-instance, you would use name ne example-instance.
57334//
57335// You can filter on nested fields. For example, you could filter on
57336// instances that have set the scheduling.automaticRestart field to
57337// true. Use filtering on nested fields to take advantage of labels to
57338// organize and search for results based on label values.
57339//
57340// To filter on multiple expressions, provide each separate expression
57341// within parentheses. For example, (scheduling.automaticRestart eq
57342// true) (zone eq us-central1-f). Multiple expressions are treated as
57343// AND expressions, meaning that resources must match all expressions to
57344// pass the filters.
57345func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall {
57346	c.urlParams_.Set("filter", filter)
57347	return c
57348}
57349
57350// MaxResults sets the optional parameter "maxResults": The maximum
57351// number of results per page that should be returned. If the number of
57352// available results is larger than maxResults, Compute Engine returns a
57353// nextPageToken that can be used to get the next page of results in
57354// subsequent list requests. Acceptable values are 0 to 500, inclusive.
57355// (Default: 500)
57356func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall {
57357	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
57358	return c
57359}
57360
57361// OrderBy sets the optional parameter "orderBy": Sorts list results by
57362// a certain order. By default, results are returned in alphanumerical
57363// order based on the resource name.
57364//
57365// You can also sort results in descending order based on the creation
57366// timestamp using orderBy="creationTimestamp desc". This sorts results
57367// based on the creationTimestamp field in reverse chronological order
57368// (newest result first). Use this to sort resources like operations so
57369// that the newest operation is returned first.
57370//
57371// Currently, only sorting by name or creationTimestamp desc is
57372// supported.
57373func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall {
57374	c.urlParams_.Set("orderBy", orderBy)
57375	return c
57376}
57377
57378// PageToken sets the optional parameter "pageToken": Specifies a page
57379// token to use. Set pageToken to the nextPageToken returned by a
57380// previous list request to get the next page of results.
57381func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall {
57382	c.urlParams_.Set("pageToken", pageToken)
57383	return c
57384}
57385
57386// Fields allows partial responses to be retrieved. See
57387// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
57388// for more information.
57389func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall {
57390	c.urlParams_.Set("fields", googleapi.CombineFields(s))
57391	return c
57392}
57393
57394// IfNoneMatch sets the optional parameter which makes the operation
57395// fail if the object's ETag matches the given value. This is useful for
57396// getting updates only after the object has changed since the last
57397// request. Use googleapi.IsNotModified to check whether the response
57398// error from Do is the result of In-None-Match.
57399func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall {
57400	c.ifNoneMatch_ = entityTag
57401	return c
57402}
57403
57404// Context sets the context to be used in this call's Do method. Any
57405// pending HTTP request will be aborted if the provided context is
57406// canceled.
57407func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall {
57408	c.ctx_ = ctx
57409	return c
57410}
57411
57412// Header returns an http.Header that can be modified by the caller to
57413// add HTTP headers to the request.
57414func (c *RegionBackendServicesListCall) Header() http.Header {
57415	if c.header_ == nil {
57416		c.header_ = make(http.Header)
57417	}
57418	return c.header_
57419}
57420
57421func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) {
57422	reqHeaders := make(http.Header)
57423	for k, v := range c.header_ {
57424		reqHeaders[k] = v
57425	}
57426	reqHeaders.Set("User-Agent", c.s.userAgent())
57427	if c.ifNoneMatch_ != "" {
57428		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
57429	}
57430	var body io.Reader = nil
57431	c.urlParams_.Set("alt", alt)
57432	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices")
57433	urls += "?" + c.urlParams_.Encode()
57434	req, _ := http.NewRequest("GET", urls, body)
57435	req.Header = reqHeaders
57436	googleapi.Expand(req.URL, map[string]string{
57437		"project": c.project,
57438		"region":  c.region,
57439	})
57440	return gensupport.SendRequest(c.ctx_, c.s.client, req)
57441}
57442
57443// Do executes the "compute.regionBackendServices.list" call.
57444// Exactly one of *BackendServiceList or error will be non-nil. Any
57445// non-2xx status code is an error. Response headers are in either
57446// *BackendServiceList.ServerResponse.Header or (if a response was
57447// returned at all) in error.(*googleapi.Error).Header. Use
57448// googleapi.IsNotModified to check whether the returned error was
57449// because http.StatusNotModified was returned.
57450func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) {
57451	gensupport.SetOptions(c.urlParams_, opts...)
57452	res, err := c.doRequest("json")
57453	if res != nil && res.StatusCode == http.StatusNotModified {
57454		if res.Body != nil {
57455			res.Body.Close()
57456		}
57457		return nil, &googleapi.Error{
57458			Code:   res.StatusCode,
57459			Header: res.Header,
57460		}
57461	}
57462	if err != nil {
57463		return nil, err
57464	}
57465	defer googleapi.CloseBody(res)
57466	if err := googleapi.CheckResponse(res); err != nil {
57467		return nil, err
57468	}
57469	ret := &BackendServiceList{
57470		ServerResponse: googleapi.ServerResponse{
57471			Header:         res.Header,
57472			HTTPStatusCode: res.StatusCode,
57473		},
57474	}
57475	target := &ret
57476	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
57477		return nil, err
57478	}
57479	return ret, nil
57480	// {
57481	//   "description": "Retrieves the list of regional BackendService resources available to the specified project in the given region.",
57482	//   "httpMethod": "GET",
57483	//   "id": "compute.regionBackendServices.list",
57484	//   "parameterOrder": [
57485	//     "project",
57486	//     "region"
57487	//   ],
57488	//   "parameters": {
57489	//     "filter": {
57490	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
57491	//       "location": "query",
57492	//       "type": "string"
57493	//     },
57494	//     "maxResults": {
57495	//       "default": "500",
57496	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
57497	//       "format": "uint32",
57498	//       "location": "query",
57499	//       "minimum": "0",
57500	//       "type": "integer"
57501	//     },
57502	//     "orderBy": {
57503	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
57504	//       "location": "query",
57505	//       "type": "string"
57506	//     },
57507	//     "pageToken": {
57508	//       "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.",
57509	//       "location": "query",
57510	//       "type": "string"
57511	//     },
57512	//     "project": {
57513	//       "description": "Project ID for this request.",
57514	//       "location": "path",
57515	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
57516	//       "required": true,
57517	//       "type": "string"
57518	//     },
57519	//     "region": {
57520	//       "description": "Name of the region scoping this request.",
57521	//       "location": "path",
57522	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
57523	//       "required": true,
57524	//       "type": "string"
57525	//     }
57526	//   },
57527	//   "path": "{project}/regions/{region}/backendServices",
57528	//   "response": {
57529	//     "$ref": "BackendServiceList"
57530	//   },
57531	//   "scopes": [
57532	//     "https://www.googleapis.com/auth/cloud-platform",
57533	//     "https://www.googleapis.com/auth/compute",
57534	//     "https://www.googleapis.com/auth/compute.readonly"
57535	//   ]
57536	// }
57537
57538}
57539
57540// Pages invokes f for each page of results.
57541// A non-nil error returned from f will halt the iteration.
57542// The provided context supersedes any context provided to the Context method.
57543func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error {
57544	c.ctx_ = ctx
57545	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
57546	for {
57547		x, err := c.Do()
57548		if err != nil {
57549			return err
57550		}
57551		if err := f(x); err != nil {
57552			return err
57553		}
57554		if x.NextPageToken == "" {
57555			return nil
57556		}
57557		c.PageToken(x.NextPageToken)
57558	}
57559}
57560
57561// method id "compute.regionBackendServices.patch":
57562
57563type RegionBackendServicesPatchCall struct {
57564	s              *Service
57565	project        string
57566	region         string
57567	backendService string
57568	backendservice *BackendService
57569	urlParams_     gensupport.URLParams
57570	ctx_           context.Context
57571	header_        http.Header
57572}
57573
57574// Patch: Updates the specified regional BackendService resource with
57575// the data included in the request. There are several restrictions and
57576// guidelines to keep in mind when updating a backend service. Read
57577// Restrictions and Guidelines for more information. This method
57578// supports PATCH semantics and uses the JSON merge patch format and
57579// processing rules.
57580func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall {
57581	c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
57582	c.project = project
57583	c.region = region
57584	c.backendService = backendService
57585	c.backendservice = backendservice
57586	return c
57587}
57588
57589// RequestId sets the optional parameter "requestId": An optional
57590// request ID to identify requests. Specify a unique request ID so that
57591// if you must retry your request, the server will know to ignore the
57592// request if it has already been completed.
57593//
57594// For example, consider a situation where you make an initial request
57595// and the request times out. If you make the request again with the
57596// same request ID, the server can check if original operation with the
57597// same request ID was received, and if so, will ignore the second
57598// request. This prevents clients from accidentally creating duplicate
57599// commitments.
57600//
57601// The request ID must be a valid UUID with the exception that zero UUID
57602// is not supported (00000000-0000-0000-0000-000000000000).
57603func (c *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall {
57604	c.urlParams_.Set("requestId", requestId)
57605	return c
57606}
57607
57608// Fields allows partial responses to be retrieved. See
57609// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
57610// for more information.
57611func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall {
57612	c.urlParams_.Set("fields", googleapi.CombineFields(s))
57613	return c
57614}
57615
57616// Context sets the context to be used in this call's Do method. Any
57617// pending HTTP request will be aborted if the provided context is
57618// canceled.
57619func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall {
57620	c.ctx_ = ctx
57621	return c
57622}
57623
57624// Header returns an http.Header that can be modified by the caller to
57625// add HTTP headers to the request.
57626func (c *RegionBackendServicesPatchCall) Header() http.Header {
57627	if c.header_ == nil {
57628		c.header_ = make(http.Header)
57629	}
57630	return c.header_
57631}
57632
57633func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) {
57634	reqHeaders := make(http.Header)
57635	for k, v := range c.header_ {
57636		reqHeaders[k] = v
57637	}
57638	reqHeaders.Set("User-Agent", c.s.userAgent())
57639	var body io.Reader = nil
57640	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
57641	if err != nil {
57642		return nil, err
57643	}
57644	reqHeaders.Set("Content-Type", "application/json")
57645	c.urlParams_.Set("alt", alt)
57646	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}")
57647	urls += "?" + c.urlParams_.Encode()
57648	req, _ := http.NewRequest("PATCH", urls, body)
57649	req.Header = reqHeaders
57650	googleapi.Expand(req.URL, map[string]string{
57651		"project":        c.project,
57652		"region":         c.region,
57653		"backendService": c.backendService,
57654	})
57655	return gensupport.SendRequest(c.ctx_, c.s.client, req)
57656}
57657
57658// Do executes the "compute.regionBackendServices.patch" call.
57659// Exactly one of *Operation or error will be non-nil. Any non-2xx
57660// status code is an error. Response headers are in either
57661// *Operation.ServerResponse.Header or (if a response was returned at
57662// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
57663// to check whether the returned error was because
57664// http.StatusNotModified was returned.
57665func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
57666	gensupport.SetOptions(c.urlParams_, opts...)
57667	res, err := c.doRequest("json")
57668	if res != nil && res.StatusCode == http.StatusNotModified {
57669		if res.Body != nil {
57670			res.Body.Close()
57671		}
57672		return nil, &googleapi.Error{
57673			Code:   res.StatusCode,
57674			Header: res.Header,
57675		}
57676	}
57677	if err != nil {
57678		return nil, err
57679	}
57680	defer googleapi.CloseBody(res)
57681	if err := googleapi.CheckResponse(res); err != nil {
57682		return nil, err
57683	}
57684	ret := &Operation{
57685		ServerResponse: googleapi.ServerResponse{
57686			Header:         res.Header,
57687			HTTPStatusCode: res.StatusCode,
57688		},
57689	}
57690	target := &ret
57691	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
57692		return nil, err
57693	}
57694	return ret, nil
57695	// {
57696	//   "description": "Updates the specified regional BackendService resource with the data included in the request. 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 and uses the JSON merge patch format and processing rules.",
57697	//   "httpMethod": "PATCH",
57698	//   "id": "compute.regionBackendServices.patch",
57699	//   "parameterOrder": [
57700	//     "project",
57701	//     "region",
57702	//     "backendService"
57703	//   ],
57704	//   "parameters": {
57705	//     "backendService": {
57706	//       "description": "Name of the BackendService resource to patch.",
57707	//       "location": "path",
57708	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
57709	//       "required": true,
57710	//       "type": "string"
57711	//     },
57712	//     "project": {
57713	//       "description": "Project ID for this request.",
57714	//       "location": "path",
57715	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
57716	//       "required": true,
57717	//       "type": "string"
57718	//     },
57719	//     "region": {
57720	//       "description": "Name of the region scoping this request.",
57721	//       "location": "path",
57722	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
57723	//       "required": true,
57724	//       "type": "string"
57725	//     },
57726	//     "requestId": {
57727	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
57728	//       "location": "query",
57729	//       "type": "string"
57730	//     }
57731	//   },
57732	//   "path": "{project}/regions/{region}/backendServices/{backendService}",
57733	//   "request": {
57734	//     "$ref": "BackendService"
57735	//   },
57736	//   "response": {
57737	//     "$ref": "Operation"
57738	//   },
57739	//   "scopes": [
57740	//     "https://www.googleapis.com/auth/cloud-platform",
57741	//     "https://www.googleapis.com/auth/compute"
57742	//   ]
57743	// }
57744
57745}
57746
57747// method id "compute.regionBackendServices.testIamPermissions":
57748
57749type RegionBackendServicesTestIamPermissionsCall struct {
57750	s                      *Service
57751	project                string
57752	region                 string
57753	resource               string
57754	testpermissionsrequest *TestPermissionsRequest
57755	urlParams_             gensupport.URLParams
57756	ctx_                   context.Context
57757	header_                http.Header
57758}
57759
57760// TestIamPermissions: Returns permissions that a caller has on the
57761// specified resource.
57762func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall {
57763	c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
57764	c.project = project
57765	c.region = region
57766	c.resource = resource
57767	c.testpermissionsrequest = testpermissionsrequest
57768	return c
57769}
57770
57771// Fields allows partial responses to be retrieved. See
57772// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
57773// for more information.
57774func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall {
57775	c.urlParams_.Set("fields", googleapi.CombineFields(s))
57776	return c
57777}
57778
57779// Context sets the context to be used in this call's Do method. Any
57780// pending HTTP request will be aborted if the provided context is
57781// canceled.
57782func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall {
57783	c.ctx_ = ctx
57784	return c
57785}
57786
57787// Header returns an http.Header that can be modified by the caller to
57788// add HTTP headers to the request.
57789func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header {
57790	if c.header_ == nil {
57791		c.header_ = make(http.Header)
57792	}
57793	return c.header_
57794}
57795
57796func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
57797	reqHeaders := make(http.Header)
57798	for k, v := range c.header_ {
57799		reqHeaders[k] = v
57800	}
57801	reqHeaders.Set("User-Agent", c.s.userAgent())
57802	var body io.Reader = nil
57803	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
57804	if err != nil {
57805		return nil, err
57806	}
57807	reqHeaders.Set("Content-Type", "application/json")
57808	c.urlParams_.Set("alt", alt)
57809	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{resource}/testIamPermissions")
57810	urls += "?" + c.urlParams_.Encode()
57811	req, _ := http.NewRequest("POST", urls, body)
57812	req.Header = reqHeaders
57813	googleapi.Expand(req.URL, map[string]string{
57814		"project":  c.project,
57815		"region":   c.region,
57816		"resource": c.resource,
57817	})
57818	return gensupport.SendRequest(c.ctx_, c.s.client, req)
57819}
57820
57821// Do executes the "compute.regionBackendServices.testIamPermissions" call.
57822// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
57823// non-2xx status code is an error. Response headers are in either
57824// *TestPermissionsResponse.ServerResponse.Header or (if a response was
57825// returned at all) in error.(*googleapi.Error).Header. Use
57826// googleapi.IsNotModified to check whether the returned error was
57827// because http.StatusNotModified was returned.
57828func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
57829	gensupport.SetOptions(c.urlParams_, opts...)
57830	res, err := c.doRequest("json")
57831	if res != nil && res.StatusCode == http.StatusNotModified {
57832		if res.Body != nil {
57833			res.Body.Close()
57834		}
57835		return nil, &googleapi.Error{
57836			Code:   res.StatusCode,
57837			Header: res.Header,
57838		}
57839	}
57840	if err != nil {
57841		return nil, err
57842	}
57843	defer googleapi.CloseBody(res)
57844	if err := googleapi.CheckResponse(res); err != nil {
57845		return nil, err
57846	}
57847	ret := &TestPermissionsResponse{
57848		ServerResponse: googleapi.ServerResponse{
57849			Header:         res.Header,
57850			HTTPStatusCode: res.StatusCode,
57851		},
57852	}
57853	target := &ret
57854	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
57855		return nil, err
57856	}
57857	return ret, nil
57858	// {
57859	//   "description": "Returns permissions that a caller has on the specified resource.",
57860	//   "httpMethod": "POST",
57861	//   "id": "compute.regionBackendServices.testIamPermissions",
57862	//   "parameterOrder": [
57863	//     "project",
57864	//     "region",
57865	//     "resource"
57866	//   ],
57867	//   "parameters": {
57868	//     "project": {
57869	//       "description": "Project ID for this request.",
57870	//       "location": "path",
57871	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
57872	//       "required": true,
57873	//       "type": "string"
57874	//     },
57875	//     "region": {
57876	//       "description": "The name of the region for this request.",
57877	//       "location": "path",
57878	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
57879	//       "required": true,
57880	//       "type": "string"
57881	//     },
57882	//     "resource": {
57883	//       "description": "Name of the resource for this request.",
57884	//       "location": "path",
57885	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
57886	//       "required": true,
57887	//       "type": "string"
57888	//     }
57889	//   },
57890	//   "path": "{project}/regions/{region}/backendServices/{resource}/testIamPermissions",
57891	//   "request": {
57892	//     "$ref": "TestPermissionsRequest"
57893	//   },
57894	//   "response": {
57895	//     "$ref": "TestPermissionsResponse"
57896	//   },
57897	//   "scopes": [
57898	//     "https://www.googleapis.com/auth/cloud-platform",
57899	//     "https://www.googleapis.com/auth/compute",
57900	//     "https://www.googleapis.com/auth/compute.readonly"
57901	//   ]
57902	// }
57903
57904}
57905
57906// method id "compute.regionBackendServices.update":
57907
57908type RegionBackendServicesUpdateCall struct {
57909	s              *Service
57910	project        string
57911	region         string
57912	backendService string
57913	backendservice *BackendService
57914	urlParams_     gensupport.URLParams
57915	ctx_           context.Context
57916	header_        http.Header
57917}
57918
57919// Update: Updates the specified regional BackendService resource with
57920// the data included in the request. There are several restrictions and
57921// guidelines to keep in mind when updating a backend service. Read
57922// Restrictions and Guidelines for more information.
57923func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall {
57924	c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
57925	c.project = project
57926	c.region = region
57927	c.backendService = backendService
57928	c.backendservice = backendservice
57929	return c
57930}
57931
57932// RequestId sets the optional parameter "requestId": An optional
57933// request ID to identify requests. Specify a unique request ID so that
57934// if you must retry your request, the server will know to ignore the
57935// request if it has already been completed.
57936//
57937// For example, consider a situation where you make an initial request
57938// and the request times out. If you make the request again with the
57939// same request ID, the server can check if original operation with the
57940// same request ID was received, and if so, will ignore the second
57941// request. This prevents clients from accidentally creating duplicate
57942// commitments.
57943//
57944// The request ID must be a valid UUID with the exception that zero UUID
57945// is not supported (00000000-0000-0000-0000-000000000000).
57946func (c *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall {
57947	c.urlParams_.Set("requestId", requestId)
57948	return c
57949}
57950
57951// Fields allows partial responses to be retrieved. See
57952// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
57953// for more information.
57954func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall {
57955	c.urlParams_.Set("fields", googleapi.CombineFields(s))
57956	return c
57957}
57958
57959// Context sets the context to be used in this call's Do method. Any
57960// pending HTTP request will be aborted if the provided context is
57961// canceled.
57962func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall {
57963	c.ctx_ = ctx
57964	return c
57965}
57966
57967// Header returns an http.Header that can be modified by the caller to
57968// add HTTP headers to the request.
57969func (c *RegionBackendServicesUpdateCall) Header() http.Header {
57970	if c.header_ == nil {
57971		c.header_ = make(http.Header)
57972	}
57973	return c.header_
57974}
57975
57976func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) {
57977	reqHeaders := make(http.Header)
57978	for k, v := range c.header_ {
57979		reqHeaders[k] = v
57980	}
57981	reqHeaders.Set("User-Agent", c.s.userAgent())
57982	var body io.Reader = nil
57983	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
57984	if err != nil {
57985		return nil, err
57986	}
57987	reqHeaders.Set("Content-Type", "application/json")
57988	c.urlParams_.Set("alt", alt)
57989	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/backendServices/{backendService}")
57990	urls += "?" + c.urlParams_.Encode()
57991	req, _ := http.NewRequest("PUT", urls, body)
57992	req.Header = reqHeaders
57993	googleapi.Expand(req.URL, map[string]string{
57994		"project":        c.project,
57995		"region":         c.region,
57996		"backendService": c.backendService,
57997	})
57998	return gensupport.SendRequest(c.ctx_, c.s.client, req)
57999}
58000
58001// Do executes the "compute.regionBackendServices.update" call.
58002// Exactly one of *Operation or error will be non-nil. Any non-2xx
58003// status code is an error. Response headers are in either
58004// *Operation.ServerResponse.Header or (if a response was returned at
58005// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
58006// to check whether the returned error was because
58007// http.StatusNotModified was returned.
58008func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
58009	gensupport.SetOptions(c.urlParams_, opts...)
58010	res, err := c.doRequest("json")
58011	if res != nil && res.StatusCode == http.StatusNotModified {
58012		if res.Body != nil {
58013			res.Body.Close()
58014		}
58015		return nil, &googleapi.Error{
58016			Code:   res.StatusCode,
58017			Header: res.Header,
58018		}
58019	}
58020	if err != nil {
58021		return nil, err
58022	}
58023	defer googleapi.CloseBody(res)
58024	if err := googleapi.CheckResponse(res); err != nil {
58025		return nil, err
58026	}
58027	ret := &Operation{
58028		ServerResponse: googleapi.ServerResponse{
58029			Header:         res.Header,
58030			HTTPStatusCode: res.StatusCode,
58031		},
58032	}
58033	target := &ret
58034	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
58035		return nil, err
58036	}
58037	return ret, nil
58038	// {
58039	//   "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read  Restrictions and Guidelines for more information.",
58040	//   "httpMethod": "PUT",
58041	//   "id": "compute.regionBackendServices.update",
58042	//   "parameterOrder": [
58043	//     "project",
58044	//     "region",
58045	//     "backendService"
58046	//   ],
58047	//   "parameters": {
58048	//     "backendService": {
58049	//       "description": "Name of the BackendService resource to update.",
58050	//       "location": "path",
58051	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
58052	//       "required": true,
58053	//       "type": "string"
58054	//     },
58055	//     "project": {
58056	//       "description": "Project ID for this request.",
58057	//       "location": "path",
58058	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
58059	//       "required": true,
58060	//       "type": "string"
58061	//     },
58062	//     "region": {
58063	//       "description": "Name of the region scoping this request.",
58064	//       "location": "path",
58065	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
58066	//       "required": true,
58067	//       "type": "string"
58068	//     },
58069	//     "requestId": {
58070	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
58071	//       "location": "query",
58072	//       "type": "string"
58073	//     }
58074	//   },
58075	//   "path": "{project}/regions/{region}/backendServices/{backendService}",
58076	//   "request": {
58077	//     "$ref": "BackendService"
58078	//   },
58079	//   "response": {
58080	//     "$ref": "Operation"
58081	//   },
58082	//   "scopes": [
58083	//     "https://www.googleapis.com/auth/cloud-platform",
58084	//     "https://www.googleapis.com/auth/compute"
58085	//   ]
58086	// }
58087
58088}
58089
58090// method id "compute.regionCommitments.aggregatedList":
58091
58092type RegionCommitmentsAggregatedListCall struct {
58093	s            *Service
58094	project      string
58095	urlParams_   gensupport.URLParams
58096	ifNoneMatch_ string
58097	ctx_         context.Context
58098	header_      http.Header
58099}
58100
58101// AggregatedList: Retrieves an aggregated list of commitments.
58102func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall {
58103	c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
58104	c.project = project
58105	return c
58106}
58107
58108// Filter sets the optional parameter "filter": Sets a filter
58109// {expression} for filtering listed resources. Your {expression} must
58110// be in the format: field_name comparison_string literal_string.
58111//
58112// The field_name is the name of the field you want to compare. Only
58113// atomic field types are supported (string, number, boolean). The
58114// comparison_string must be either eq (equals) or ne (not equals). The
58115// literal_string is the string value to filter to. The literal value
58116// must be valid for the type of field you are filtering by (string,
58117// number, boolean). For string fields, the literal value is interpreted
58118// as a regular expression using RE2 syntax. The literal value must
58119// match the entire field.
58120//
58121// For example, to filter for instances that do not have a name of
58122// example-instance, you would use name ne example-instance.
58123//
58124// You can filter on nested fields. For example, you could filter on
58125// instances that have set the scheduling.automaticRestart field to
58126// true. Use filtering on nested fields to take advantage of labels to
58127// organize and search for results based on label values.
58128//
58129// To filter on multiple expressions, provide each separate expression
58130// within parentheses. For example, (scheduling.automaticRestart eq
58131// true) (zone eq us-central1-f). Multiple expressions are treated as
58132// AND expressions, meaning that resources must match all expressions to
58133// pass the filters.
58134func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall {
58135	c.urlParams_.Set("filter", filter)
58136	return c
58137}
58138
58139// MaxResults sets the optional parameter "maxResults": The maximum
58140// number of results per page that should be returned. If the number of
58141// available results is larger than maxResults, Compute Engine returns a
58142// nextPageToken that can be used to get the next page of results in
58143// subsequent list requests. Acceptable values are 0 to 500, inclusive.
58144// (Default: 500)
58145func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall {
58146	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
58147	return c
58148}
58149
58150// OrderBy sets the optional parameter "orderBy": Sorts list results by
58151// a certain order. By default, results are returned in alphanumerical
58152// order based on the resource name.
58153//
58154// You can also sort results in descending order based on the creation
58155// timestamp using orderBy="creationTimestamp desc". This sorts results
58156// based on the creationTimestamp field in reverse chronological order
58157// (newest result first). Use this to sort resources like operations so
58158// that the newest operation is returned first.
58159//
58160// Currently, only sorting by name or creationTimestamp desc is
58161// supported.
58162func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall {
58163	c.urlParams_.Set("orderBy", orderBy)
58164	return c
58165}
58166
58167// PageToken sets the optional parameter "pageToken": Specifies a page
58168// token to use. Set pageToken to the nextPageToken returned by a
58169// previous list request to get the next page of results.
58170func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall {
58171	c.urlParams_.Set("pageToken", pageToken)
58172	return c
58173}
58174
58175// Fields allows partial responses to be retrieved. See
58176// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
58177// for more information.
58178func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall {
58179	c.urlParams_.Set("fields", googleapi.CombineFields(s))
58180	return c
58181}
58182
58183// IfNoneMatch sets the optional parameter which makes the operation
58184// fail if the object's ETag matches the given value. This is useful for
58185// getting updates only after the object has changed since the last
58186// request. Use googleapi.IsNotModified to check whether the response
58187// error from Do is the result of In-None-Match.
58188func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall {
58189	c.ifNoneMatch_ = entityTag
58190	return c
58191}
58192
58193// Context sets the context to be used in this call's Do method. Any
58194// pending HTTP request will be aborted if the provided context is
58195// canceled.
58196func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall {
58197	c.ctx_ = ctx
58198	return c
58199}
58200
58201// Header returns an http.Header that can be modified by the caller to
58202// add HTTP headers to the request.
58203func (c *RegionCommitmentsAggregatedListCall) Header() http.Header {
58204	if c.header_ == nil {
58205		c.header_ = make(http.Header)
58206	}
58207	return c.header_
58208}
58209
58210func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
58211	reqHeaders := make(http.Header)
58212	for k, v := range c.header_ {
58213		reqHeaders[k] = v
58214	}
58215	reqHeaders.Set("User-Agent", c.s.userAgent())
58216	if c.ifNoneMatch_ != "" {
58217		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
58218	}
58219	var body io.Reader = nil
58220	c.urlParams_.Set("alt", alt)
58221	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/commitments")
58222	urls += "?" + c.urlParams_.Encode()
58223	req, _ := http.NewRequest("GET", urls, body)
58224	req.Header = reqHeaders
58225	googleapi.Expand(req.URL, map[string]string{
58226		"project": c.project,
58227	})
58228	return gensupport.SendRequest(c.ctx_, c.s.client, req)
58229}
58230
58231// Do executes the "compute.regionCommitments.aggregatedList" call.
58232// Exactly one of *CommitmentAggregatedList or error will be non-nil.
58233// Any non-2xx status code is an error. Response headers are in either
58234// *CommitmentAggregatedList.ServerResponse.Header or (if a response was
58235// returned at all) in error.(*googleapi.Error).Header. Use
58236// googleapi.IsNotModified to check whether the returned error was
58237// because http.StatusNotModified was returned.
58238func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) {
58239	gensupport.SetOptions(c.urlParams_, opts...)
58240	res, err := c.doRequest("json")
58241	if res != nil && res.StatusCode == http.StatusNotModified {
58242		if res.Body != nil {
58243			res.Body.Close()
58244		}
58245		return nil, &googleapi.Error{
58246			Code:   res.StatusCode,
58247			Header: res.Header,
58248		}
58249	}
58250	if err != nil {
58251		return nil, err
58252	}
58253	defer googleapi.CloseBody(res)
58254	if err := googleapi.CheckResponse(res); err != nil {
58255		return nil, err
58256	}
58257	ret := &CommitmentAggregatedList{
58258		ServerResponse: googleapi.ServerResponse{
58259			Header:         res.Header,
58260			HTTPStatusCode: res.StatusCode,
58261		},
58262	}
58263	target := &ret
58264	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
58265		return nil, err
58266	}
58267	return ret, nil
58268	// {
58269	//   "description": "Retrieves an aggregated list of commitments.",
58270	//   "httpMethod": "GET",
58271	//   "id": "compute.regionCommitments.aggregatedList",
58272	//   "parameterOrder": [
58273	//     "project"
58274	//   ],
58275	//   "parameters": {
58276	//     "filter": {
58277	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
58278	//       "location": "query",
58279	//       "type": "string"
58280	//     },
58281	//     "maxResults": {
58282	//       "default": "500",
58283	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
58284	//       "format": "uint32",
58285	//       "location": "query",
58286	//       "minimum": "0",
58287	//       "type": "integer"
58288	//     },
58289	//     "orderBy": {
58290	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
58291	//       "location": "query",
58292	//       "type": "string"
58293	//     },
58294	//     "pageToken": {
58295	//       "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.",
58296	//       "location": "query",
58297	//       "type": "string"
58298	//     },
58299	//     "project": {
58300	//       "description": "Project ID for this request.",
58301	//       "location": "path",
58302	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
58303	//       "required": true,
58304	//       "type": "string"
58305	//     }
58306	//   },
58307	//   "path": "{project}/aggregated/commitments",
58308	//   "response": {
58309	//     "$ref": "CommitmentAggregatedList"
58310	//   },
58311	//   "scopes": [
58312	//     "https://www.googleapis.com/auth/cloud-platform",
58313	//     "https://www.googleapis.com/auth/compute",
58314	//     "https://www.googleapis.com/auth/compute.readonly"
58315	//   ]
58316	// }
58317
58318}
58319
58320// Pages invokes f for each page of results.
58321// A non-nil error returned from f will halt the iteration.
58322// The provided context supersedes any context provided to the Context method.
58323func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error {
58324	c.ctx_ = ctx
58325	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
58326	for {
58327		x, err := c.Do()
58328		if err != nil {
58329			return err
58330		}
58331		if err := f(x); err != nil {
58332			return err
58333		}
58334		if x.NextPageToken == "" {
58335			return nil
58336		}
58337		c.PageToken(x.NextPageToken)
58338	}
58339}
58340
58341// method id "compute.regionCommitments.get":
58342
58343type RegionCommitmentsGetCall struct {
58344	s            *Service
58345	project      string
58346	region       string
58347	commitment   string
58348	urlParams_   gensupport.URLParams
58349	ifNoneMatch_ string
58350	ctx_         context.Context
58351	header_      http.Header
58352}
58353
58354// Get: Returns the specified commitment resource. Get a list of
58355// available commitments by making a list() request.
58356func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall {
58357	c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
58358	c.project = project
58359	c.region = region
58360	c.commitment = commitment
58361	return c
58362}
58363
58364// Fields allows partial responses to be retrieved. See
58365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
58366// for more information.
58367func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall {
58368	c.urlParams_.Set("fields", googleapi.CombineFields(s))
58369	return c
58370}
58371
58372// IfNoneMatch sets the optional parameter which makes the operation
58373// fail if the object's ETag matches the given value. This is useful for
58374// getting updates only after the object has changed since the last
58375// request. Use googleapi.IsNotModified to check whether the response
58376// error from Do is the result of In-None-Match.
58377func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall {
58378	c.ifNoneMatch_ = entityTag
58379	return c
58380}
58381
58382// Context sets the context to be used in this call's Do method. Any
58383// pending HTTP request will be aborted if the provided context is
58384// canceled.
58385func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall {
58386	c.ctx_ = ctx
58387	return c
58388}
58389
58390// Header returns an http.Header that can be modified by the caller to
58391// add HTTP headers to the request.
58392func (c *RegionCommitmentsGetCall) Header() http.Header {
58393	if c.header_ == nil {
58394		c.header_ = make(http.Header)
58395	}
58396	return c.header_
58397}
58398
58399func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) {
58400	reqHeaders := make(http.Header)
58401	for k, v := range c.header_ {
58402		reqHeaders[k] = v
58403	}
58404	reqHeaders.Set("User-Agent", c.s.userAgent())
58405	if c.ifNoneMatch_ != "" {
58406		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
58407	}
58408	var body io.Reader = nil
58409	c.urlParams_.Set("alt", alt)
58410	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments/{commitment}")
58411	urls += "?" + c.urlParams_.Encode()
58412	req, _ := http.NewRequest("GET", urls, body)
58413	req.Header = reqHeaders
58414	googleapi.Expand(req.URL, map[string]string{
58415		"project":    c.project,
58416		"region":     c.region,
58417		"commitment": c.commitment,
58418	})
58419	return gensupport.SendRequest(c.ctx_, c.s.client, req)
58420}
58421
58422// Do executes the "compute.regionCommitments.get" call.
58423// Exactly one of *Commitment or error will be non-nil. Any non-2xx
58424// status code is an error. Response headers are in either
58425// *Commitment.ServerResponse.Header or (if a response was returned at
58426// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
58427// to check whether the returned error was because
58428// http.StatusNotModified was returned.
58429func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) {
58430	gensupport.SetOptions(c.urlParams_, opts...)
58431	res, err := c.doRequest("json")
58432	if res != nil && res.StatusCode == http.StatusNotModified {
58433		if res.Body != nil {
58434			res.Body.Close()
58435		}
58436		return nil, &googleapi.Error{
58437			Code:   res.StatusCode,
58438			Header: res.Header,
58439		}
58440	}
58441	if err != nil {
58442		return nil, err
58443	}
58444	defer googleapi.CloseBody(res)
58445	if err := googleapi.CheckResponse(res); err != nil {
58446		return nil, err
58447	}
58448	ret := &Commitment{
58449		ServerResponse: googleapi.ServerResponse{
58450			Header:         res.Header,
58451			HTTPStatusCode: res.StatusCode,
58452		},
58453	}
58454	target := &ret
58455	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
58456		return nil, err
58457	}
58458	return ret, nil
58459	// {
58460	//   "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.",
58461	//   "httpMethod": "GET",
58462	//   "id": "compute.regionCommitments.get",
58463	//   "parameterOrder": [
58464	//     "project",
58465	//     "region",
58466	//     "commitment"
58467	//   ],
58468	//   "parameters": {
58469	//     "commitment": {
58470	//       "description": "Name of the commitment to return.",
58471	//       "location": "path",
58472	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
58473	//       "required": true,
58474	//       "type": "string"
58475	//     },
58476	//     "project": {
58477	//       "description": "Project ID for this request.",
58478	//       "location": "path",
58479	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
58480	//       "required": true,
58481	//       "type": "string"
58482	//     },
58483	//     "region": {
58484	//       "description": "Name of the region for this request.",
58485	//       "location": "path",
58486	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
58487	//       "required": true,
58488	//       "type": "string"
58489	//     }
58490	//   },
58491	//   "path": "{project}/regions/{region}/commitments/{commitment}",
58492	//   "response": {
58493	//     "$ref": "Commitment"
58494	//   },
58495	//   "scopes": [
58496	//     "https://www.googleapis.com/auth/cloud-platform",
58497	//     "https://www.googleapis.com/auth/compute",
58498	//     "https://www.googleapis.com/auth/compute.readonly"
58499	//   ]
58500	// }
58501
58502}
58503
58504// method id "compute.regionCommitments.insert":
58505
58506type RegionCommitmentsInsertCall struct {
58507	s          *Service
58508	project    string
58509	region     string
58510	commitment *Commitment
58511	urlParams_ gensupport.URLParams
58512	ctx_       context.Context
58513	header_    http.Header
58514}
58515
58516// Insert: Creates a commitment in the specified project using the data
58517// included in the request.
58518func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall {
58519	c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
58520	c.project = project
58521	c.region = region
58522	c.commitment = commitment
58523	return c
58524}
58525
58526// RequestId sets the optional parameter "requestId": An optional
58527// request ID to identify requests. Specify a unique request ID so that
58528// if you must retry your request, the server will know to ignore the
58529// request if it has already been completed.
58530//
58531// For example, consider a situation where you make an initial request
58532// and the request times out. If you make the request again with the
58533// same request ID, the server can check if original operation with the
58534// same request ID was received, and if so, will ignore the second
58535// request. This prevents clients from accidentally creating duplicate
58536// commitments.
58537//
58538// The request ID must be a valid UUID with the exception that zero UUID
58539// is not supported (00000000-0000-0000-0000-000000000000).
58540func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall {
58541	c.urlParams_.Set("requestId", requestId)
58542	return c
58543}
58544
58545// Fields allows partial responses to be retrieved. See
58546// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
58547// for more information.
58548func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall {
58549	c.urlParams_.Set("fields", googleapi.CombineFields(s))
58550	return c
58551}
58552
58553// Context sets the context to be used in this call's Do method. Any
58554// pending HTTP request will be aborted if the provided context is
58555// canceled.
58556func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall {
58557	c.ctx_ = ctx
58558	return c
58559}
58560
58561// Header returns an http.Header that can be modified by the caller to
58562// add HTTP headers to the request.
58563func (c *RegionCommitmentsInsertCall) Header() http.Header {
58564	if c.header_ == nil {
58565		c.header_ = make(http.Header)
58566	}
58567	return c.header_
58568}
58569
58570func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) {
58571	reqHeaders := make(http.Header)
58572	for k, v := range c.header_ {
58573		reqHeaders[k] = v
58574	}
58575	reqHeaders.Set("User-Agent", c.s.userAgent())
58576	var body io.Reader = nil
58577	body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitment)
58578	if err != nil {
58579		return nil, err
58580	}
58581	reqHeaders.Set("Content-Type", "application/json")
58582	c.urlParams_.Set("alt", alt)
58583	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments")
58584	urls += "?" + c.urlParams_.Encode()
58585	req, _ := http.NewRequest("POST", urls, body)
58586	req.Header = reqHeaders
58587	googleapi.Expand(req.URL, map[string]string{
58588		"project": c.project,
58589		"region":  c.region,
58590	})
58591	return gensupport.SendRequest(c.ctx_, c.s.client, req)
58592}
58593
58594// Do executes the "compute.regionCommitments.insert" call.
58595// Exactly one of *Operation or error will be non-nil. Any non-2xx
58596// status code is an error. Response headers are in either
58597// *Operation.ServerResponse.Header or (if a response was returned at
58598// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
58599// to check whether the returned error was because
58600// http.StatusNotModified was returned.
58601func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
58602	gensupport.SetOptions(c.urlParams_, opts...)
58603	res, err := c.doRequest("json")
58604	if res != nil && res.StatusCode == http.StatusNotModified {
58605		if res.Body != nil {
58606			res.Body.Close()
58607		}
58608		return nil, &googleapi.Error{
58609			Code:   res.StatusCode,
58610			Header: res.Header,
58611		}
58612	}
58613	if err != nil {
58614		return nil, err
58615	}
58616	defer googleapi.CloseBody(res)
58617	if err := googleapi.CheckResponse(res); err != nil {
58618		return nil, err
58619	}
58620	ret := &Operation{
58621		ServerResponse: googleapi.ServerResponse{
58622			Header:         res.Header,
58623			HTTPStatusCode: res.StatusCode,
58624		},
58625	}
58626	target := &ret
58627	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
58628		return nil, err
58629	}
58630	return ret, nil
58631	// {
58632	//   "description": "Creates a commitment in the specified project using the data included in the request.",
58633	//   "httpMethod": "POST",
58634	//   "id": "compute.regionCommitments.insert",
58635	//   "parameterOrder": [
58636	//     "project",
58637	//     "region"
58638	//   ],
58639	//   "parameters": {
58640	//     "project": {
58641	//       "description": "Project ID for this request.",
58642	//       "location": "path",
58643	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
58644	//       "required": true,
58645	//       "type": "string"
58646	//     },
58647	//     "region": {
58648	//       "description": "Name of the region for this request.",
58649	//       "location": "path",
58650	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
58651	//       "required": true,
58652	//       "type": "string"
58653	//     },
58654	//     "requestId": {
58655	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
58656	//       "location": "query",
58657	//       "type": "string"
58658	//     }
58659	//   },
58660	//   "path": "{project}/regions/{region}/commitments",
58661	//   "request": {
58662	//     "$ref": "Commitment"
58663	//   },
58664	//   "response": {
58665	//     "$ref": "Operation"
58666	//   },
58667	//   "scopes": [
58668	//     "https://www.googleapis.com/auth/cloud-platform",
58669	//     "https://www.googleapis.com/auth/compute"
58670	//   ]
58671	// }
58672
58673}
58674
58675// method id "compute.regionCommitments.list":
58676
58677type RegionCommitmentsListCall struct {
58678	s            *Service
58679	project      string
58680	region       string
58681	urlParams_   gensupport.URLParams
58682	ifNoneMatch_ string
58683	ctx_         context.Context
58684	header_      http.Header
58685}
58686
58687// List: Retrieves a list of commitments contained within the specified
58688// region.
58689func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall {
58690	c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
58691	c.project = project
58692	c.region = region
58693	return c
58694}
58695
58696// Filter sets the optional parameter "filter": Sets a filter
58697// {expression} for filtering listed resources. Your {expression} must
58698// be in the format: field_name comparison_string literal_string.
58699//
58700// The field_name is the name of the field you want to compare. Only
58701// atomic field types are supported (string, number, boolean). The
58702// comparison_string must be either eq (equals) or ne (not equals). The
58703// literal_string is the string value to filter to. The literal value
58704// must be valid for the type of field you are filtering by (string,
58705// number, boolean). For string fields, the literal value is interpreted
58706// as a regular expression using RE2 syntax. The literal value must
58707// match the entire field.
58708//
58709// For example, to filter for instances that do not have a name of
58710// example-instance, you would use name ne example-instance.
58711//
58712// You can filter on nested fields. For example, you could filter on
58713// instances that have set the scheduling.automaticRestart field to
58714// true. Use filtering on nested fields to take advantage of labels to
58715// organize and search for results based on label values.
58716//
58717// To filter on multiple expressions, provide each separate expression
58718// within parentheses. For example, (scheduling.automaticRestart eq
58719// true) (zone eq us-central1-f). Multiple expressions are treated as
58720// AND expressions, meaning that resources must match all expressions to
58721// pass the filters.
58722func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall {
58723	c.urlParams_.Set("filter", filter)
58724	return c
58725}
58726
58727// MaxResults sets the optional parameter "maxResults": The maximum
58728// number of results per page that should be returned. If the number of
58729// available results is larger than maxResults, Compute Engine returns a
58730// nextPageToken that can be used to get the next page of results in
58731// subsequent list requests. Acceptable values are 0 to 500, inclusive.
58732// (Default: 500)
58733func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall {
58734	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
58735	return c
58736}
58737
58738// OrderBy sets the optional parameter "orderBy": Sorts list results by
58739// a certain order. By default, results are returned in alphanumerical
58740// order based on the resource name.
58741//
58742// You can also sort results in descending order based on the creation
58743// timestamp using orderBy="creationTimestamp desc". This sorts results
58744// based on the creationTimestamp field in reverse chronological order
58745// (newest result first). Use this to sort resources like operations so
58746// that the newest operation is returned first.
58747//
58748// Currently, only sorting by name or creationTimestamp desc is
58749// supported.
58750func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall {
58751	c.urlParams_.Set("orderBy", orderBy)
58752	return c
58753}
58754
58755// PageToken sets the optional parameter "pageToken": Specifies a page
58756// token to use. Set pageToken to the nextPageToken returned by a
58757// previous list request to get the next page of results.
58758func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall {
58759	c.urlParams_.Set("pageToken", pageToken)
58760	return c
58761}
58762
58763// Fields allows partial responses to be retrieved. See
58764// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
58765// for more information.
58766func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall {
58767	c.urlParams_.Set("fields", googleapi.CombineFields(s))
58768	return c
58769}
58770
58771// IfNoneMatch sets the optional parameter which makes the operation
58772// fail if the object's ETag matches the given value. This is useful for
58773// getting updates only after the object has changed since the last
58774// request. Use googleapi.IsNotModified to check whether the response
58775// error from Do is the result of In-None-Match.
58776func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall {
58777	c.ifNoneMatch_ = entityTag
58778	return c
58779}
58780
58781// Context sets the context to be used in this call's Do method. Any
58782// pending HTTP request will be aborted if the provided context is
58783// canceled.
58784func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall {
58785	c.ctx_ = ctx
58786	return c
58787}
58788
58789// Header returns an http.Header that can be modified by the caller to
58790// add HTTP headers to the request.
58791func (c *RegionCommitmentsListCall) Header() http.Header {
58792	if c.header_ == nil {
58793		c.header_ = make(http.Header)
58794	}
58795	return c.header_
58796}
58797
58798func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) {
58799	reqHeaders := make(http.Header)
58800	for k, v := range c.header_ {
58801		reqHeaders[k] = v
58802	}
58803	reqHeaders.Set("User-Agent", c.s.userAgent())
58804	if c.ifNoneMatch_ != "" {
58805		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
58806	}
58807	var body io.Reader = nil
58808	c.urlParams_.Set("alt", alt)
58809	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments")
58810	urls += "?" + c.urlParams_.Encode()
58811	req, _ := http.NewRequest("GET", urls, body)
58812	req.Header = reqHeaders
58813	googleapi.Expand(req.URL, map[string]string{
58814		"project": c.project,
58815		"region":  c.region,
58816	})
58817	return gensupport.SendRequest(c.ctx_, c.s.client, req)
58818}
58819
58820// Do executes the "compute.regionCommitments.list" call.
58821// Exactly one of *CommitmentList or error will be non-nil. Any non-2xx
58822// status code is an error. Response headers are in either
58823// *CommitmentList.ServerResponse.Header or (if a response was returned
58824// at all) in error.(*googleapi.Error).Header. Use
58825// googleapi.IsNotModified to check whether the returned error was
58826// because http.StatusNotModified was returned.
58827func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) {
58828	gensupport.SetOptions(c.urlParams_, opts...)
58829	res, err := c.doRequest("json")
58830	if res != nil && res.StatusCode == http.StatusNotModified {
58831		if res.Body != nil {
58832			res.Body.Close()
58833		}
58834		return nil, &googleapi.Error{
58835			Code:   res.StatusCode,
58836			Header: res.Header,
58837		}
58838	}
58839	if err != nil {
58840		return nil, err
58841	}
58842	defer googleapi.CloseBody(res)
58843	if err := googleapi.CheckResponse(res); err != nil {
58844		return nil, err
58845	}
58846	ret := &CommitmentList{
58847		ServerResponse: googleapi.ServerResponse{
58848			Header:         res.Header,
58849			HTTPStatusCode: res.StatusCode,
58850		},
58851	}
58852	target := &ret
58853	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
58854		return nil, err
58855	}
58856	return ret, nil
58857	// {
58858	//   "description": "Retrieves a list of commitments contained within the specified region.",
58859	//   "httpMethod": "GET",
58860	//   "id": "compute.regionCommitments.list",
58861	//   "parameterOrder": [
58862	//     "project",
58863	//     "region"
58864	//   ],
58865	//   "parameters": {
58866	//     "filter": {
58867	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
58868	//       "location": "query",
58869	//       "type": "string"
58870	//     },
58871	//     "maxResults": {
58872	//       "default": "500",
58873	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
58874	//       "format": "uint32",
58875	//       "location": "query",
58876	//       "minimum": "0",
58877	//       "type": "integer"
58878	//     },
58879	//     "orderBy": {
58880	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
58881	//       "location": "query",
58882	//       "type": "string"
58883	//     },
58884	//     "pageToken": {
58885	//       "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.",
58886	//       "location": "query",
58887	//       "type": "string"
58888	//     },
58889	//     "project": {
58890	//       "description": "Project ID for this request.",
58891	//       "location": "path",
58892	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
58893	//       "required": true,
58894	//       "type": "string"
58895	//     },
58896	//     "region": {
58897	//       "description": "Name of the region for this request.",
58898	//       "location": "path",
58899	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
58900	//       "required": true,
58901	//       "type": "string"
58902	//     }
58903	//   },
58904	//   "path": "{project}/regions/{region}/commitments",
58905	//   "response": {
58906	//     "$ref": "CommitmentList"
58907	//   },
58908	//   "scopes": [
58909	//     "https://www.googleapis.com/auth/cloud-platform",
58910	//     "https://www.googleapis.com/auth/compute",
58911	//     "https://www.googleapis.com/auth/compute.readonly"
58912	//   ]
58913	// }
58914
58915}
58916
58917// Pages invokes f for each page of results.
58918// A non-nil error returned from f will halt the iteration.
58919// The provided context supersedes any context provided to the Context method.
58920func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error {
58921	c.ctx_ = ctx
58922	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
58923	for {
58924		x, err := c.Do()
58925		if err != nil {
58926			return err
58927		}
58928		if err := f(x); err != nil {
58929			return err
58930		}
58931		if x.NextPageToken == "" {
58932			return nil
58933		}
58934		c.PageToken(x.NextPageToken)
58935	}
58936}
58937
58938// method id "compute.regionInstanceGroupManagers.abandonInstances":
58939
58940type RegionInstanceGroupManagersAbandonInstancesCall struct {
58941	s                                                  *Service
58942	project                                            string
58943	region                                             string
58944	instanceGroupManager                               string
58945	regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest
58946	urlParams_                                         gensupport.URLParams
58947	ctx_                                               context.Context
58948	header_                                            http.Header
58949}
58950
58951// AbandonInstances: Schedules a group action to remove the specified
58952// instances from the managed instance group. Abandoning an instance
58953// does not delete the instance, but it does remove the instance from
58954// any target pools that are applied by the managed instance group. This
58955// method reduces the targetSize of the managed instance group by the
58956// number of instances that you abandon. This operation is marked as
58957// DONE when the action is scheduled even if the instances have not yet
58958// been removed from the group. You must separately verify the status of
58959// the abandoning action with the listmanagedinstances method.
58960//
58961// If the group is part of a backend service that has enabled connection
58962// draining, it can take up to 60 seconds after the connection draining
58963// duration has elapsed before the VM instance is removed or
58964// deleted.
58965//
58966// You can specify a maximum of 1000 instances with this method per
58967// request.
58968func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall {
58969	c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
58970	c.project = project
58971	c.region = region
58972	c.instanceGroupManager = instanceGroupManager
58973	c.regioninstancegroupmanagersabandoninstancesrequest = regioninstancegroupmanagersabandoninstancesrequest
58974	return c
58975}
58976
58977// RequestId sets the optional parameter "requestId": An optional
58978// request ID to identify requests. Specify a unique request ID so that
58979// if you must retry your request, the server will know to ignore the
58980// request if it has already been completed.
58981//
58982// For example, consider a situation where you make an initial request
58983// and the request times out. If you make the request again with the
58984// same request ID, the server can check if original operation with the
58985// same request ID was received, and if so, will ignore the second
58986// request. This prevents clients from accidentally creating duplicate
58987// commitments.
58988//
58989// The request ID must be a valid UUID with the exception that zero UUID
58990// is not supported (00000000-0000-0000-0000-000000000000).
58991func (c *RegionInstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersAbandonInstancesCall {
58992	c.urlParams_.Set("requestId", requestId)
58993	return c
58994}
58995
58996// Fields allows partial responses to be retrieved. See
58997// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
58998// for more information.
58999func (c *RegionInstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersAbandonInstancesCall {
59000	c.urlParams_.Set("fields", googleapi.CombineFields(s))
59001	return c
59002}
59003
59004// Context sets the context to be used in this call's Do method. Any
59005// pending HTTP request will be aborted if the provided context is
59006// canceled.
59007func (c *RegionInstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersAbandonInstancesCall {
59008	c.ctx_ = ctx
59009	return c
59010}
59011
59012// Header returns an http.Header that can be modified by the caller to
59013// add HTTP headers to the request.
59014func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header {
59015	if c.header_ == nil {
59016		c.header_ = make(http.Header)
59017	}
59018	return c.header_
59019}
59020
59021func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) {
59022	reqHeaders := make(http.Header)
59023	for k, v := range c.header_ {
59024		reqHeaders[k] = v
59025	}
59026	reqHeaders.Set("User-Agent", c.s.userAgent())
59027	var body io.Reader = nil
59028	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersabandoninstancesrequest)
59029	if err != nil {
59030		return nil, err
59031	}
59032	reqHeaders.Set("Content-Type", "application/json")
59033	c.urlParams_.Set("alt", alt)
59034	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances")
59035	urls += "?" + c.urlParams_.Encode()
59036	req, _ := http.NewRequest("POST", urls, body)
59037	req.Header = reqHeaders
59038	googleapi.Expand(req.URL, map[string]string{
59039		"project":              c.project,
59040		"region":               c.region,
59041		"instanceGroupManager": c.instanceGroupManager,
59042	})
59043	return gensupport.SendRequest(c.ctx_, c.s.client, req)
59044}
59045
59046// Do executes the "compute.regionInstanceGroupManagers.abandonInstances" call.
59047// Exactly one of *Operation or error will be non-nil. Any non-2xx
59048// status code is an error. Response headers are in either
59049// *Operation.ServerResponse.Header or (if a response was returned at
59050// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
59051// to check whether the returned error was because
59052// http.StatusNotModified was returned.
59053func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
59054	gensupport.SetOptions(c.urlParams_, opts...)
59055	res, err := c.doRequest("json")
59056	if res != nil && res.StatusCode == http.StatusNotModified {
59057		if res.Body != nil {
59058			res.Body.Close()
59059		}
59060		return nil, &googleapi.Error{
59061			Code:   res.StatusCode,
59062			Header: res.Header,
59063		}
59064	}
59065	if err != nil {
59066		return nil, err
59067	}
59068	defer googleapi.CloseBody(res)
59069	if err := googleapi.CheckResponse(res); err != nil {
59070		return nil, err
59071	}
59072	ret := &Operation{
59073		ServerResponse: googleapi.ServerResponse{
59074			Header:         res.Header,
59075			HTTPStatusCode: res.StatusCode,
59076		},
59077	}
59078	target := &ret
59079	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
59080		return nil, err
59081	}
59082	return ret, nil
59083	// {
59084	//   "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.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.",
59085	//   "httpMethod": "POST",
59086	//   "id": "compute.regionInstanceGroupManagers.abandonInstances",
59087	//   "parameterOrder": [
59088	//     "project",
59089	//     "region",
59090	//     "instanceGroupManager"
59091	//   ],
59092	//   "parameters": {
59093	//     "instanceGroupManager": {
59094	//       "description": "Name of the managed instance group.",
59095	//       "location": "path",
59096	//       "required": true,
59097	//       "type": "string"
59098	//     },
59099	//     "project": {
59100	//       "description": "Project ID for this request.",
59101	//       "location": "path",
59102	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
59103	//       "required": true,
59104	//       "type": "string"
59105	//     },
59106	//     "region": {
59107	//       "description": "Name of the region scoping this request.",
59108	//       "location": "path",
59109	//       "required": true,
59110	//       "type": "string"
59111	//     },
59112	//     "requestId": {
59113	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
59114	//       "location": "query",
59115	//       "type": "string"
59116	//     }
59117	//   },
59118	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances",
59119	//   "request": {
59120	//     "$ref": "RegionInstanceGroupManagersAbandonInstancesRequest"
59121	//   },
59122	//   "response": {
59123	//     "$ref": "Operation"
59124	//   },
59125	//   "scopes": [
59126	//     "https://www.googleapis.com/auth/cloud-platform",
59127	//     "https://www.googleapis.com/auth/compute"
59128	//   ]
59129	// }
59130
59131}
59132
59133// method id "compute.regionInstanceGroupManagers.delete":
59134
59135type RegionInstanceGroupManagersDeleteCall struct {
59136	s                    *Service
59137	project              string
59138	region               string
59139	instanceGroupManager string
59140	urlParams_           gensupport.URLParams
59141	ctx_                 context.Context
59142	header_              http.Header
59143}
59144
59145// Delete: Deletes the specified managed instance group and all of the
59146// instances in that group.
59147func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall {
59148	c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
59149	c.project = project
59150	c.region = region
59151	c.instanceGroupManager = instanceGroupManager
59152	return c
59153}
59154
59155// RequestId sets the optional parameter "requestId": An optional
59156// request ID to identify requests. Specify a unique request ID so that
59157// if you must retry your request, the server will know to ignore the
59158// request if it has already been completed.
59159//
59160// For example, consider a situation where you make an initial request
59161// and the request times out. If you make the request again with the
59162// same request ID, the server can check if original operation with the
59163// same request ID was received, and if so, will ignore the second
59164// request. This prevents clients from accidentally creating duplicate
59165// commitments.
59166//
59167// The request ID must be a valid UUID with the exception that zero UUID
59168// is not supported (00000000-0000-0000-0000-000000000000).
59169func (c *RegionInstanceGroupManagersDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteCall {
59170	c.urlParams_.Set("requestId", requestId)
59171	return c
59172}
59173
59174// Fields allows partial responses to be retrieved. See
59175// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
59176// for more information.
59177func (c *RegionInstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteCall {
59178	c.urlParams_.Set("fields", googleapi.CombineFields(s))
59179	return c
59180}
59181
59182// Context sets the context to be used in this call's Do method. Any
59183// pending HTTP request will be aborted if the provided context is
59184// canceled.
59185func (c *RegionInstanceGroupManagersDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteCall {
59186	c.ctx_ = ctx
59187	return c
59188}
59189
59190// Header returns an http.Header that can be modified by the caller to
59191// add HTTP headers to the request.
59192func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header {
59193	if c.header_ == nil {
59194		c.header_ = make(http.Header)
59195	}
59196	return c.header_
59197}
59198
59199func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) {
59200	reqHeaders := make(http.Header)
59201	for k, v := range c.header_ {
59202		reqHeaders[k] = v
59203	}
59204	reqHeaders.Set("User-Agent", c.s.userAgent())
59205	var body io.Reader = nil
59206	c.urlParams_.Set("alt", alt)
59207	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}")
59208	urls += "?" + c.urlParams_.Encode()
59209	req, _ := http.NewRequest("DELETE", urls, body)
59210	req.Header = reqHeaders
59211	googleapi.Expand(req.URL, map[string]string{
59212		"project":              c.project,
59213		"region":               c.region,
59214		"instanceGroupManager": c.instanceGroupManager,
59215	})
59216	return gensupport.SendRequest(c.ctx_, c.s.client, req)
59217}
59218
59219// Do executes the "compute.regionInstanceGroupManagers.delete" call.
59220// Exactly one of *Operation or error will be non-nil. Any non-2xx
59221// status code is an error. Response headers are in either
59222// *Operation.ServerResponse.Header or (if a response was returned at
59223// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
59224// to check whether the returned error was because
59225// http.StatusNotModified was returned.
59226func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
59227	gensupport.SetOptions(c.urlParams_, opts...)
59228	res, err := c.doRequest("json")
59229	if res != nil && res.StatusCode == http.StatusNotModified {
59230		if res.Body != nil {
59231			res.Body.Close()
59232		}
59233		return nil, &googleapi.Error{
59234			Code:   res.StatusCode,
59235			Header: res.Header,
59236		}
59237	}
59238	if err != nil {
59239		return nil, err
59240	}
59241	defer googleapi.CloseBody(res)
59242	if err := googleapi.CheckResponse(res); err != nil {
59243		return nil, err
59244	}
59245	ret := &Operation{
59246		ServerResponse: googleapi.ServerResponse{
59247			Header:         res.Header,
59248			HTTPStatusCode: res.StatusCode,
59249		},
59250	}
59251	target := &ret
59252	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
59253		return nil, err
59254	}
59255	return ret, nil
59256	// {
59257	//   "description": "Deletes the specified managed instance group and all of the instances in that group.",
59258	//   "httpMethod": "DELETE",
59259	//   "id": "compute.regionInstanceGroupManagers.delete",
59260	//   "parameterOrder": [
59261	//     "project",
59262	//     "region",
59263	//     "instanceGroupManager"
59264	//   ],
59265	//   "parameters": {
59266	//     "instanceGroupManager": {
59267	//       "description": "Name of the managed instance group to delete.",
59268	//       "location": "path",
59269	//       "required": true,
59270	//       "type": "string"
59271	//     },
59272	//     "project": {
59273	//       "description": "Project ID for this request.",
59274	//       "location": "path",
59275	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
59276	//       "required": true,
59277	//       "type": "string"
59278	//     },
59279	//     "region": {
59280	//       "description": "Name of the region scoping this request.",
59281	//       "location": "path",
59282	//       "required": true,
59283	//       "type": "string"
59284	//     },
59285	//     "requestId": {
59286	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
59287	//       "location": "query",
59288	//       "type": "string"
59289	//     }
59290	//   },
59291	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}",
59292	//   "response": {
59293	//     "$ref": "Operation"
59294	//   },
59295	//   "scopes": [
59296	//     "https://www.googleapis.com/auth/cloud-platform",
59297	//     "https://www.googleapis.com/auth/compute"
59298	//   ]
59299	// }
59300
59301}
59302
59303// method id "compute.regionInstanceGroupManagers.deleteInstances":
59304
59305type RegionInstanceGroupManagersDeleteInstancesCall struct {
59306	s                                                 *Service
59307	project                                           string
59308	region                                            string
59309	instanceGroupManager                              string
59310	regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest
59311	urlParams_                                        gensupport.URLParams
59312	ctx_                                              context.Context
59313	header_                                           http.Header
59314}
59315
59316// DeleteInstances: Schedules a group action to delete the specified
59317// instances in the managed instance group. The instances are also
59318// removed from any target pools of which they were a member. This
59319// method reduces the targetSize of the managed instance group by the
59320// number of instances that you delete. This operation is marked as DONE
59321// when the action is scheduled even if the instances are still being
59322// deleted. You must separately verify the status of the deleting action
59323// with the listmanagedinstances method.
59324//
59325// If the group is part of a backend service that has enabled connection
59326// draining, it can take up to 60 seconds after the connection draining
59327// duration has elapsed before the VM instance is removed or
59328// deleted.
59329//
59330// You can specify a maximum of 1000 instances with this method per
59331// request.
59332func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall {
59333	c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
59334	c.project = project
59335	c.region = region
59336	c.instanceGroupManager = instanceGroupManager
59337	c.regioninstancegroupmanagersdeleteinstancesrequest = regioninstancegroupmanagersdeleteinstancesrequest
59338	return c
59339}
59340
59341// RequestId sets the optional parameter "requestId": An optional
59342// request ID to identify requests. Specify a unique request ID so that
59343// if you must retry your request, the server will know to ignore the
59344// request if it has already been completed.
59345//
59346// For example, consider a situation where you make an initial request
59347// and the request times out. If you make the request again with the
59348// same request ID, the server can check if original operation with the
59349// same request ID was received, and if so, will ignore the second
59350// request. This prevents clients from accidentally creating duplicate
59351// commitments.
59352//
59353// The request ID must be a valid UUID with the exception that zero UUID
59354// is not supported (00000000-0000-0000-0000-000000000000).
59355func (c *RegionInstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteInstancesCall {
59356	c.urlParams_.Set("requestId", requestId)
59357	return c
59358}
59359
59360// Fields allows partial responses to be retrieved. See
59361// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
59362// for more information.
59363func (c *RegionInstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteInstancesCall {
59364	c.urlParams_.Set("fields", googleapi.CombineFields(s))
59365	return c
59366}
59367
59368// Context sets the context to be used in this call's Do method. Any
59369// pending HTTP request will be aborted if the provided context is
59370// canceled.
59371func (c *RegionInstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteInstancesCall {
59372	c.ctx_ = ctx
59373	return c
59374}
59375
59376// Header returns an http.Header that can be modified by the caller to
59377// add HTTP headers to the request.
59378func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header {
59379	if c.header_ == nil {
59380		c.header_ = make(http.Header)
59381	}
59382	return c.header_
59383}
59384
59385func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) {
59386	reqHeaders := make(http.Header)
59387	for k, v := range c.header_ {
59388		reqHeaders[k] = v
59389	}
59390	reqHeaders.Set("User-Agent", c.s.userAgent())
59391	var body io.Reader = nil
59392	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersdeleteinstancesrequest)
59393	if err != nil {
59394		return nil, err
59395	}
59396	reqHeaders.Set("Content-Type", "application/json")
59397	c.urlParams_.Set("alt", alt)
59398	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances")
59399	urls += "?" + c.urlParams_.Encode()
59400	req, _ := http.NewRequest("POST", urls, body)
59401	req.Header = reqHeaders
59402	googleapi.Expand(req.URL, map[string]string{
59403		"project":              c.project,
59404		"region":               c.region,
59405		"instanceGroupManager": c.instanceGroupManager,
59406	})
59407	return gensupport.SendRequest(c.ctx_, c.s.client, req)
59408}
59409
59410// Do executes the "compute.regionInstanceGroupManagers.deleteInstances" call.
59411// Exactly one of *Operation or error will be non-nil. Any non-2xx
59412// status code is an error. Response headers are in either
59413// *Operation.ServerResponse.Header or (if a response was returned at
59414// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
59415// to check whether the returned error was because
59416// http.StatusNotModified was returned.
59417func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
59418	gensupport.SetOptions(c.urlParams_, opts...)
59419	res, err := c.doRequest("json")
59420	if res != nil && res.StatusCode == http.StatusNotModified {
59421		if res.Body != nil {
59422			res.Body.Close()
59423		}
59424		return nil, &googleapi.Error{
59425			Code:   res.StatusCode,
59426			Header: res.Header,
59427		}
59428	}
59429	if err != nil {
59430		return nil, err
59431	}
59432	defer googleapi.CloseBody(res)
59433	if err := googleapi.CheckResponse(res); err != nil {
59434		return nil, err
59435	}
59436	ret := &Operation{
59437		ServerResponse: googleapi.ServerResponse{
59438			Header:         res.Header,
59439			HTTPStatusCode: res.StatusCode,
59440		},
59441	}
59442	target := &ret
59443	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
59444		return nil, err
59445	}
59446	return ret, nil
59447	// {
59448	//   "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.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.",
59449	//   "httpMethod": "POST",
59450	//   "id": "compute.regionInstanceGroupManagers.deleteInstances",
59451	//   "parameterOrder": [
59452	//     "project",
59453	//     "region",
59454	//     "instanceGroupManager"
59455	//   ],
59456	//   "parameters": {
59457	//     "instanceGroupManager": {
59458	//       "description": "Name of the managed instance group.",
59459	//       "location": "path",
59460	//       "required": true,
59461	//       "type": "string"
59462	//     },
59463	//     "project": {
59464	//       "description": "Project ID for this request.",
59465	//       "location": "path",
59466	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
59467	//       "required": true,
59468	//       "type": "string"
59469	//     },
59470	//     "region": {
59471	//       "description": "Name of the region scoping this request.",
59472	//       "location": "path",
59473	//       "required": true,
59474	//       "type": "string"
59475	//     },
59476	//     "requestId": {
59477	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
59478	//       "location": "query",
59479	//       "type": "string"
59480	//     }
59481	//   },
59482	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances",
59483	//   "request": {
59484	//     "$ref": "RegionInstanceGroupManagersDeleteInstancesRequest"
59485	//   },
59486	//   "response": {
59487	//     "$ref": "Operation"
59488	//   },
59489	//   "scopes": [
59490	//     "https://www.googleapis.com/auth/cloud-platform",
59491	//     "https://www.googleapis.com/auth/compute"
59492	//   ]
59493	// }
59494
59495}
59496
59497// method id "compute.regionInstanceGroupManagers.get":
59498
59499type RegionInstanceGroupManagersGetCall struct {
59500	s                    *Service
59501	project              string
59502	region               string
59503	instanceGroupManager string
59504	urlParams_           gensupport.URLParams
59505	ifNoneMatch_         string
59506	ctx_                 context.Context
59507	header_              http.Header
59508}
59509
59510// Get: Returns all of the details about the specified managed instance
59511// group.
59512func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall {
59513	c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
59514	c.project = project
59515	c.region = region
59516	c.instanceGroupManager = instanceGroupManager
59517	return c
59518}
59519
59520// Fields allows partial responses to be retrieved. See
59521// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
59522// for more information.
59523func (c *RegionInstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersGetCall {
59524	c.urlParams_.Set("fields", googleapi.CombineFields(s))
59525	return c
59526}
59527
59528// IfNoneMatch sets the optional parameter which makes the operation
59529// fail if the object's ETag matches the given value. This is useful for
59530// getting updates only after the object has changed since the last
59531// request. Use googleapi.IsNotModified to check whether the response
59532// error from Do is the result of In-None-Match.
59533func (c *RegionInstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersGetCall {
59534	c.ifNoneMatch_ = entityTag
59535	return c
59536}
59537
59538// Context sets the context to be used in this call's Do method. Any
59539// pending HTTP request will be aborted if the provided context is
59540// canceled.
59541func (c *RegionInstanceGroupManagersGetCall) Context(ctx context.Context) *RegionInstanceGroupManagersGetCall {
59542	c.ctx_ = ctx
59543	return c
59544}
59545
59546// Header returns an http.Header that can be modified by the caller to
59547// add HTTP headers to the request.
59548func (c *RegionInstanceGroupManagersGetCall) Header() http.Header {
59549	if c.header_ == nil {
59550		c.header_ = make(http.Header)
59551	}
59552	return c.header_
59553}
59554
59555func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) {
59556	reqHeaders := make(http.Header)
59557	for k, v := range c.header_ {
59558		reqHeaders[k] = v
59559	}
59560	reqHeaders.Set("User-Agent", c.s.userAgent())
59561	if c.ifNoneMatch_ != "" {
59562		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
59563	}
59564	var body io.Reader = nil
59565	c.urlParams_.Set("alt", alt)
59566	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}")
59567	urls += "?" + c.urlParams_.Encode()
59568	req, _ := http.NewRequest("GET", urls, body)
59569	req.Header = reqHeaders
59570	googleapi.Expand(req.URL, map[string]string{
59571		"project":              c.project,
59572		"region":               c.region,
59573		"instanceGroupManager": c.instanceGroupManager,
59574	})
59575	return gensupport.SendRequest(c.ctx_, c.s.client, req)
59576}
59577
59578// Do executes the "compute.regionInstanceGroupManagers.get" call.
59579// Exactly one of *InstanceGroupManager or error will be non-nil. Any
59580// non-2xx status code is an error. Response headers are in either
59581// *InstanceGroupManager.ServerResponse.Header or (if a response was
59582// returned at all) in error.(*googleapi.Error).Header. Use
59583// googleapi.IsNotModified to check whether the returned error was
59584// because http.StatusNotModified was returned.
59585func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) {
59586	gensupport.SetOptions(c.urlParams_, opts...)
59587	res, err := c.doRequest("json")
59588	if res != nil && res.StatusCode == http.StatusNotModified {
59589		if res.Body != nil {
59590			res.Body.Close()
59591		}
59592		return nil, &googleapi.Error{
59593			Code:   res.StatusCode,
59594			Header: res.Header,
59595		}
59596	}
59597	if err != nil {
59598		return nil, err
59599	}
59600	defer googleapi.CloseBody(res)
59601	if err := googleapi.CheckResponse(res); err != nil {
59602		return nil, err
59603	}
59604	ret := &InstanceGroupManager{
59605		ServerResponse: googleapi.ServerResponse{
59606			Header:         res.Header,
59607			HTTPStatusCode: res.StatusCode,
59608		},
59609	}
59610	target := &ret
59611	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
59612		return nil, err
59613	}
59614	return ret, nil
59615	// {
59616	//   "description": "Returns all of the details about the specified managed instance group.",
59617	//   "httpMethod": "GET",
59618	//   "id": "compute.regionInstanceGroupManagers.get",
59619	//   "parameterOrder": [
59620	//     "project",
59621	//     "region",
59622	//     "instanceGroupManager"
59623	//   ],
59624	//   "parameters": {
59625	//     "instanceGroupManager": {
59626	//       "description": "Name of the managed instance group to return.",
59627	//       "location": "path",
59628	//       "required": true,
59629	//       "type": "string"
59630	//     },
59631	//     "project": {
59632	//       "description": "Project ID for this request.",
59633	//       "location": "path",
59634	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
59635	//       "required": true,
59636	//       "type": "string"
59637	//     },
59638	//     "region": {
59639	//       "description": "Name of the region scoping this request.",
59640	//       "location": "path",
59641	//       "required": true,
59642	//       "type": "string"
59643	//     }
59644	//   },
59645	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}",
59646	//   "response": {
59647	//     "$ref": "InstanceGroupManager"
59648	//   },
59649	//   "scopes": [
59650	//     "https://www.googleapis.com/auth/cloud-platform",
59651	//     "https://www.googleapis.com/auth/compute",
59652	//     "https://www.googleapis.com/auth/compute.readonly"
59653	//   ]
59654	// }
59655
59656}
59657
59658// method id "compute.regionInstanceGroupManagers.insert":
59659
59660type RegionInstanceGroupManagersInsertCall struct {
59661	s                    *Service
59662	project              string
59663	region               string
59664	instancegroupmanager *InstanceGroupManager
59665	urlParams_           gensupport.URLParams
59666	ctx_                 context.Context
59667	header_              http.Header
59668}
59669
59670// Insert: Creates a managed instance group using the information that
59671// you specify in the request. After the group is created, it schedules
59672// an action to create instances in the group using the specified
59673// instance template. This operation is marked as DONE when the group is
59674// created even if the instances in the group have not yet been created.
59675// You must separately verify the status of the individual instances
59676// with the listmanagedinstances method.
59677//
59678// A regional managed instance group can contain up to 2000 instances.
59679func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall {
59680	c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
59681	c.project = project
59682	c.region = region
59683	c.instancegroupmanager = instancegroupmanager
59684	return c
59685}
59686
59687// RequestId sets the optional parameter "requestId": An optional
59688// request ID to identify requests. Specify a unique request ID so that
59689// if you must retry your request, the server will know to ignore the
59690// request if it has already been completed.
59691//
59692// For example, consider a situation where you make an initial request
59693// and the request times out. If you make the request again with the
59694// same request ID, the server can check if original operation with the
59695// same request ID was received, and if so, will ignore the second
59696// request. This prevents clients from accidentally creating duplicate
59697// commitments.
59698//
59699// The request ID must be a valid UUID with the exception that zero UUID
59700// is not supported (00000000-0000-0000-0000-000000000000).
59701func (c *RegionInstanceGroupManagersInsertCall) RequestId(requestId string) *RegionInstanceGroupManagersInsertCall {
59702	c.urlParams_.Set("requestId", requestId)
59703	return c
59704}
59705
59706// Fields allows partial responses to be retrieved. See
59707// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
59708// for more information.
59709func (c *RegionInstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersInsertCall {
59710	c.urlParams_.Set("fields", googleapi.CombineFields(s))
59711	return c
59712}
59713
59714// Context sets the context to be used in this call's Do method. Any
59715// pending HTTP request will be aborted if the provided context is
59716// canceled.
59717func (c *RegionInstanceGroupManagersInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagersInsertCall {
59718	c.ctx_ = ctx
59719	return c
59720}
59721
59722// Header returns an http.Header that can be modified by the caller to
59723// add HTTP headers to the request.
59724func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header {
59725	if c.header_ == nil {
59726		c.header_ = make(http.Header)
59727	}
59728	return c.header_
59729}
59730
59731func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) {
59732	reqHeaders := make(http.Header)
59733	for k, v := range c.header_ {
59734		reqHeaders[k] = v
59735	}
59736	reqHeaders.Set("User-Agent", c.s.userAgent())
59737	var body io.Reader = nil
59738	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
59739	if err != nil {
59740		return nil, err
59741	}
59742	reqHeaders.Set("Content-Type", "application/json")
59743	c.urlParams_.Set("alt", alt)
59744	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers")
59745	urls += "?" + c.urlParams_.Encode()
59746	req, _ := http.NewRequest("POST", urls, body)
59747	req.Header = reqHeaders
59748	googleapi.Expand(req.URL, map[string]string{
59749		"project": c.project,
59750		"region":  c.region,
59751	})
59752	return gensupport.SendRequest(c.ctx_, c.s.client, req)
59753}
59754
59755// Do executes the "compute.regionInstanceGroupManagers.insert" call.
59756// Exactly one of *Operation or error will be non-nil. Any non-2xx
59757// status code is an error. Response headers are in either
59758// *Operation.ServerResponse.Header or (if a response was returned at
59759// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
59760// to check whether the returned error was because
59761// http.StatusNotModified was returned.
59762func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
59763	gensupport.SetOptions(c.urlParams_, opts...)
59764	res, err := c.doRequest("json")
59765	if res != nil && res.StatusCode == http.StatusNotModified {
59766		if res.Body != nil {
59767			res.Body.Close()
59768		}
59769		return nil, &googleapi.Error{
59770			Code:   res.StatusCode,
59771			Header: res.Header,
59772		}
59773	}
59774	if err != nil {
59775		return nil, err
59776	}
59777	defer googleapi.CloseBody(res)
59778	if err := googleapi.CheckResponse(res); err != nil {
59779		return nil, err
59780	}
59781	ret := &Operation{
59782		ServerResponse: googleapi.ServerResponse{
59783			Header:         res.Header,
59784			HTTPStatusCode: res.StatusCode,
59785		},
59786	}
59787	target := &ret
59788	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
59789		return nil, err
59790	}
59791	return ret, nil
59792	// {
59793	//   "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.\n\nA regional managed instance group can contain up to 2000 instances.",
59794	//   "httpMethod": "POST",
59795	//   "id": "compute.regionInstanceGroupManagers.insert",
59796	//   "parameterOrder": [
59797	//     "project",
59798	//     "region"
59799	//   ],
59800	//   "parameters": {
59801	//     "project": {
59802	//       "description": "Project ID for this request.",
59803	//       "location": "path",
59804	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
59805	//       "required": true,
59806	//       "type": "string"
59807	//     },
59808	//     "region": {
59809	//       "description": "Name of the region scoping this request.",
59810	//       "location": "path",
59811	//       "required": true,
59812	//       "type": "string"
59813	//     },
59814	//     "requestId": {
59815	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
59816	//       "location": "query",
59817	//       "type": "string"
59818	//     }
59819	//   },
59820	//   "path": "{project}/regions/{region}/instanceGroupManagers",
59821	//   "request": {
59822	//     "$ref": "InstanceGroupManager"
59823	//   },
59824	//   "response": {
59825	//     "$ref": "Operation"
59826	//   },
59827	//   "scopes": [
59828	//     "https://www.googleapis.com/auth/cloud-platform",
59829	//     "https://www.googleapis.com/auth/compute"
59830	//   ]
59831	// }
59832
59833}
59834
59835// method id "compute.regionInstanceGroupManagers.list":
59836
59837type RegionInstanceGroupManagersListCall struct {
59838	s            *Service
59839	project      string
59840	region       string
59841	urlParams_   gensupport.URLParams
59842	ifNoneMatch_ string
59843	ctx_         context.Context
59844	header_      http.Header
59845}
59846
59847// List: Retrieves the list of managed instance groups that are
59848// contained within the specified region.
59849func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall {
59850	c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
59851	c.project = project
59852	c.region = region
59853	return c
59854}
59855
59856// Filter sets the optional parameter "filter": Sets a filter
59857// {expression} for filtering listed resources. Your {expression} must
59858// be in the format: field_name comparison_string literal_string.
59859//
59860// The field_name is the name of the field you want to compare. Only
59861// atomic field types are supported (string, number, boolean). The
59862// comparison_string must be either eq (equals) or ne (not equals). The
59863// literal_string is the string value to filter to. The literal value
59864// must be valid for the type of field you are filtering by (string,
59865// number, boolean). For string fields, the literal value is interpreted
59866// as a regular expression using RE2 syntax. The literal value must
59867// match the entire field.
59868//
59869// For example, to filter for instances that do not have a name of
59870// example-instance, you would use name ne example-instance.
59871//
59872// You can filter on nested fields. For example, you could filter on
59873// instances that have set the scheduling.automaticRestart field to
59874// true. Use filtering on nested fields to take advantage of labels to
59875// organize and search for results based on label values.
59876//
59877// To filter on multiple expressions, provide each separate expression
59878// within parentheses. For example, (scheduling.automaticRestart eq
59879// true) (zone eq us-central1-f). Multiple expressions are treated as
59880// AND expressions, meaning that resources must match all expressions to
59881// pass the filters.
59882func (c *RegionInstanceGroupManagersListCall) Filter(filter string) *RegionInstanceGroupManagersListCall {
59883	c.urlParams_.Set("filter", filter)
59884	return c
59885}
59886
59887// MaxResults sets the optional parameter "maxResults": The maximum
59888// number of results per page that should be returned. If the number of
59889// available results is larger than maxResults, Compute Engine returns a
59890// nextPageToken that can be used to get the next page of results in
59891// subsequent list requests. Acceptable values are 0 to 500, inclusive.
59892// (Default: 500)
59893func (c *RegionInstanceGroupManagersListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListCall {
59894	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
59895	return c
59896}
59897
59898// OrderBy sets the optional parameter "orderBy": Sorts list results by
59899// a certain order. By default, results are returned in alphanumerical
59900// order based on the resource name.
59901//
59902// You can also sort results in descending order based on the creation
59903// timestamp using orderBy="creationTimestamp desc". This sorts results
59904// based on the creationTimestamp field in reverse chronological order
59905// (newest result first). Use this to sort resources like operations so
59906// that the newest operation is returned first.
59907//
59908// Currently, only sorting by name or creationTimestamp desc is
59909// supported.
59910func (c *RegionInstanceGroupManagersListCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListCall {
59911	c.urlParams_.Set("orderBy", orderBy)
59912	return c
59913}
59914
59915// PageToken sets the optional parameter "pageToken": Specifies a page
59916// token to use. Set pageToken to the nextPageToken returned by a
59917// previous list request to get the next page of results.
59918func (c *RegionInstanceGroupManagersListCall) PageToken(pageToken string) *RegionInstanceGroupManagersListCall {
59919	c.urlParams_.Set("pageToken", pageToken)
59920	return c
59921}
59922
59923// Fields allows partial responses to be retrieved. See
59924// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
59925// for more information.
59926func (c *RegionInstanceGroupManagersListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListCall {
59927	c.urlParams_.Set("fields", googleapi.CombineFields(s))
59928	return c
59929}
59930
59931// IfNoneMatch sets the optional parameter which makes the operation
59932// fail if the object's ETag matches the given value. This is useful for
59933// getting updates only after the object has changed since the last
59934// request. Use googleapi.IsNotModified to check whether the response
59935// error from Do is the result of In-None-Match.
59936func (c *RegionInstanceGroupManagersListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListCall {
59937	c.ifNoneMatch_ = entityTag
59938	return c
59939}
59940
59941// Context sets the context to be used in this call's Do method. Any
59942// pending HTTP request will be aborted if the provided context is
59943// canceled.
59944func (c *RegionInstanceGroupManagersListCall) Context(ctx context.Context) *RegionInstanceGroupManagersListCall {
59945	c.ctx_ = ctx
59946	return c
59947}
59948
59949// Header returns an http.Header that can be modified by the caller to
59950// add HTTP headers to the request.
59951func (c *RegionInstanceGroupManagersListCall) Header() http.Header {
59952	if c.header_ == nil {
59953		c.header_ = make(http.Header)
59954	}
59955	return c.header_
59956}
59957
59958func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) {
59959	reqHeaders := make(http.Header)
59960	for k, v := range c.header_ {
59961		reqHeaders[k] = v
59962	}
59963	reqHeaders.Set("User-Agent", c.s.userAgent())
59964	if c.ifNoneMatch_ != "" {
59965		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
59966	}
59967	var body io.Reader = nil
59968	c.urlParams_.Set("alt", alt)
59969	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers")
59970	urls += "?" + c.urlParams_.Encode()
59971	req, _ := http.NewRequest("GET", urls, body)
59972	req.Header = reqHeaders
59973	googleapi.Expand(req.URL, map[string]string{
59974		"project": c.project,
59975		"region":  c.region,
59976	})
59977	return gensupport.SendRequest(c.ctx_, c.s.client, req)
59978}
59979
59980// Do executes the "compute.regionInstanceGroupManagers.list" call.
59981// Exactly one of *RegionInstanceGroupManagerList or error will be
59982// non-nil. Any non-2xx status code is an error. Response headers are in
59983// either *RegionInstanceGroupManagerList.ServerResponse.Header or (if a
59984// response was returned at all) in error.(*googleapi.Error).Header. Use
59985// googleapi.IsNotModified to check whether the returned error was
59986// because http.StatusNotModified was returned.
59987func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerList, error) {
59988	gensupport.SetOptions(c.urlParams_, opts...)
59989	res, err := c.doRequest("json")
59990	if res != nil && res.StatusCode == http.StatusNotModified {
59991		if res.Body != nil {
59992			res.Body.Close()
59993		}
59994		return nil, &googleapi.Error{
59995			Code:   res.StatusCode,
59996			Header: res.Header,
59997		}
59998	}
59999	if err != nil {
60000		return nil, err
60001	}
60002	defer googleapi.CloseBody(res)
60003	if err := googleapi.CheckResponse(res); err != nil {
60004		return nil, err
60005	}
60006	ret := &RegionInstanceGroupManagerList{
60007		ServerResponse: googleapi.ServerResponse{
60008			Header:         res.Header,
60009			HTTPStatusCode: res.StatusCode,
60010		},
60011	}
60012	target := &ret
60013	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
60014		return nil, err
60015	}
60016	return ret, nil
60017	// {
60018	//   "description": "Retrieves the list of managed instance groups that are contained within the specified region.",
60019	//   "httpMethod": "GET",
60020	//   "id": "compute.regionInstanceGroupManagers.list",
60021	//   "parameterOrder": [
60022	//     "project",
60023	//     "region"
60024	//   ],
60025	//   "parameters": {
60026	//     "filter": {
60027	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
60028	//       "location": "query",
60029	//       "type": "string"
60030	//     },
60031	//     "maxResults": {
60032	//       "default": "500",
60033	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
60034	//       "format": "uint32",
60035	//       "location": "query",
60036	//       "minimum": "0",
60037	//       "type": "integer"
60038	//     },
60039	//     "orderBy": {
60040	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
60041	//       "location": "query",
60042	//       "type": "string"
60043	//     },
60044	//     "pageToken": {
60045	//       "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.",
60046	//       "location": "query",
60047	//       "type": "string"
60048	//     },
60049	//     "project": {
60050	//       "description": "Project ID for this request.",
60051	//       "location": "path",
60052	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
60053	//       "required": true,
60054	//       "type": "string"
60055	//     },
60056	//     "region": {
60057	//       "description": "Name of the region scoping this request.",
60058	//       "location": "path",
60059	//       "required": true,
60060	//       "type": "string"
60061	//     }
60062	//   },
60063	//   "path": "{project}/regions/{region}/instanceGroupManagers",
60064	//   "response": {
60065	//     "$ref": "RegionInstanceGroupManagerList"
60066	//   },
60067	//   "scopes": [
60068	//     "https://www.googleapis.com/auth/cloud-platform",
60069	//     "https://www.googleapis.com/auth/compute",
60070	//     "https://www.googleapis.com/auth/compute.readonly"
60071	//   ]
60072	// }
60073
60074}
60075
60076// Pages invokes f for each page of results.
60077// A non-nil error returned from f will halt the iteration.
60078// The provided context supersedes any context provided to the Context method.
60079func (c *RegionInstanceGroupManagersListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerList) error) error {
60080	c.ctx_ = ctx
60081	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
60082	for {
60083		x, err := c.Do()
60084		if err != nil {
60085			return err
60086		}
60087		if err := f(x); err != nil {
60088			return err
60089		}
60090		if x.NextPageToken == "" {
60091			return nil
60092		}
60093		c.PageToken(x.NextPageToken)
60094	}
60095}
60096
60097// method id "compute.regionInstanceGroupManagers.listManagedInstances":
60098
60099type RegionInstanceGroupManagersListManagedInstancesCall struct {
60100	s                    *Service
60101	project              string
60102	region               string
60103	instanceGroupManager string
60104	urlParams_           gensupport.URLParams
60105	ctx_                 context.Context
60106	header_              http.Header
60107}
60108
60109// ListManagedInstances: Lists the instances in the managed instance
60110// group and instances that are scheduled to be created. The list
60111// includes any current actions that the group has scheduled for its
60112// instances.
60113func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall {
60114	c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
60115	c.project = project
60116	c.region = region
60117	c.instanceGroupManager = instanceGroupManager
60118	return c
60119}
60120
60121// Filter sets the optional parameter "filter":
60122func (c *RegionInstanceGroupManagersListManagedInstancesCall) Filter(filter string) *RegionInstanceGroupManagersListManagedInstancesCall {
60123	c.urlParams_.Set("filter", filter)
60124	return c
60125}
60126
60127// MaxResults sets the optional parameter "maxResults":
60128func (c *RegionInstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListManagedInstancesCall {
60129	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
60130	return c
60131}
60132
60133// OrderBy sets the optional parameter "order_by":
60134func (c *RegionInstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListManagedInstancesCall {
60135	c.urlParams_.Set("order_by", orderBy)
60136	return c
60137}
60138
60139// PageToken sets the optional parameter "pageToken":
60140func (c *RegionInstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *RegionInstanceGroupManagersListManagedInstancesCall {
60141	c.urlParams_.Set("pageToken", pageToken)
60142	return c
60143}
60144
60145// Fields allows partial responses to be retrieved. See
60146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
60147// for more information.
60148func (c *RegionInstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListManagedInstancesCall {
60149	c.urlParams_.Set("fields", googleapi.CombineFields(s))
60150	return c
60151}
60152
60153// Context sets the context to be used in this call's Do method. Any
60154// pending HTTP request will be aborted if the provided context is
60155// canceled.
60156func (c *RegionInstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersListManagedInstancesCall {
60157	c.ctx_ = ctx
60158	return c
60159}
60160
60161// Header returns an http.Header that can be modified by the caller to
60162// add HTTP headers to the request.
60163func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Header {
60164	if c.header_ == nil {
60165		c.header_ = make(http.Header)
60166	}
60167	return c.header_
60168}
60169
60170func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) {
60171	reqHeaders := make(http.Header)
60172	for k, v := range c.header_ {
60173		reqHeaders[k] = v
60174	}
60175	reqHeaders.Set("User-Agent", c.s.userAgent())
60176	var body io.Reader = nil
60177	c.urlParams_.Set("alt", alt)
60178	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances")
60179	urls += "?" + c.urlParams_.Encode()
60180	req, _ := http.NewRequest("POST", urls, body)
60181	req.Header = reqHeaders
60182	googleapi.Expand(req.URL, map[string]string{
60183		"project":              c.project,
60184		"region":               c.region,
60185		"instanceGroupManager": c.instanceGroupManager,
60186	})
60187	return gensupport.SendRequest(c.ctx_, c.s.client, req)
60188}
60189
60190// Do executes the "compute.regionInstanceGroupManagers.listManagedInstances" call.
60191// Exactly one of *RegionInstanceGroupManagersListInstancesResponse or
60192// error will be non-nil. Any non-2xx status code is an error. Response
60193// headers are in either
60194// *RegionInstanceGroupManagersListInstancesResponse.ServerResponse.Heade
60195// r or (if a response was returned at all) in
60196// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
60197// whether the returned error was because http.StatusNotModified was
60198// returned.
60199func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstancesResponse, error) {
60200	gensupport.SetOptions(c.urlParams_, opts...)
60201	res, err := c.doRequest("json")
60202	if res != nil && res.StatusCode == http.StatusNotModified {
60203		if res.Body != nil {
60204			res.Body.Close()
60205		}
60206		return nil, &googleapi.Error{
60207			Code:   res.StatusCode,
60208			Header: res.Header,
60209		}
60210	}
60211	if err != nil {
60212		return nil, err
60213	}
60214	defer googleapi.CloseBody(res)
60215	if err := googleapi.CheckResponse(res); err != nil {
60216		return nil, err
60217	}
60218	ret := &RegionInstanceGroupManagersListInstancesResponse{
60219		ServerResponse: googleapi.ServerResponse{
60220			Header:         res.Header,
60221			HTTPStatusCode: res.StatusCode,
60222		},
60223	}
60224	target := &ret
60225	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
60226		return nil, err
60227	}
60228	return ret, nil
60229	// {
60230	//   "description": "Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances.",
60231	//   "httpMethod": "POST",
60232	//   "id": "compute.regionInstanceGroupManagers.listManagedInstances",
60233	//   "parameterOrder": [
60234	//     "project",
60235	//     "region",
60236	//     "instanceGroupManager"
60237	//   ],
60238	//   "parameters": {
60239	//     "filter": {
60240	//       "location": "query",
60241	//       "type": "string"
60242	//     },
60243	//     "instanceGroupManager": {
60244	//       "description": "The name of the managed instance group.",
60245	//       "location": "path",
60246	//       "required": true,
60247	//       "type": "string"
60248	//     },
60249	//     "maxResults": {
60250	//       "default": "500",
60251	//       "format": "uint32",
60252	//       "location": "query",
60253	//       "minimum": "0",
60254	//       "type": "integer"
60255	//     },
60256	//     "order_by": {
60257	//       "location": "query",
60258	//       "type": "string"
60259	//     },
60260	//     "pageToken": {
60261	//       "location": "query",
60262	//       "type": "string"
60263	//     },
60264	//     "project": {
60265	//       "description": "Project ID for this request.",
60266	//       "location": "path",
60267	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
60268	//       "required": true,
60269	//       "type": "string"
60270	//     },
60271	//     "region": {
60272	//       "description": "Name of the region scoping this request.",
60273	//       "location": "path",
60274	//       "required": true,
60275	//       "type": "string"
60276	//     }
60277	//   },
60278	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances",
60279	//   "response": {
60280	//     "$ref": "RegionInstanceGroupManagersListInstancesResponse"
60281	//   },
60282	//   "scopes": [
60283	//     "https://www.googleapis.com/auth/cloud-platform",
60284	//     "https://www.googleapis.com/auth/compute",
60285	//     "https://www.googleapis.com/auth/compute.readonly"
60286	//   ]
60287	// }
60288
60289}
60290
60291// Pages invokes f for each page of results.
60292// A non-nil error returned from f will halt the iteration.
60293// The provided context supersedes any context provided to the Context method.
60294func (c *RegionInstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstancesResponse) error) error {
60295	c.ctx_ = ctx
60296	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
60297	for {
60298		x, err := c.Do()
60299		if err != nil {
60300			return err
60301		}
60302		if err := f(x); err != nil {
60303			return err
60304		}
60305		if x.NextPageToken == "" {
60306			return nil
60307		}
60308		c.PageToken(x.NextPageToken)
60309	}
60310}
60311
60312// method id "compute.regionInstanceGroupManagers.patch":
60313
60314type RegionInstanceGroupManagersPatchCall struct {
60315	s                    *Service
60316	project              string
60317	region               string
60318	instanceGroupManager string
60319	instancegroupmanager *InstanceGroupManager
60320	urlParams_           gensupport.URLParams
60321	ctx_                 context.Context
60322	header_              http.Header
60323}
60324
60325// Patch: Updates a managed instance group using the information that
60326// you specify in the request. This operation is marked as DONE when the
60327// group is patched even if the instances in the group are still in the
60328// process of being patched. You must separately verify the status of
60329// the individual instances with the listmanagedinstances method. This
60330// method supports PATCH semantics and uses the JSON merge patch format
60331// and processing rules.
60332func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall {
60333	c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
60334	c.project = project
60335	c.region = region
60336	c.instanceGroupManager = instanceGroupManager
60337	c.instancegroupmanager = instancegroupmanager
60338	return c
60339}
60340
60341// RequestId sets the optional parameter "requestId": An optional
60342// request ID to identify requests. Specify a unique request ID so that
60343// if you must retry your request, the server will know to ignore the
60344// request if it has already been completed.
60345//
60346// For example, consider a situation where you make an initial request
60347// and the request times out. If you make the request again with the
60348// same request ID, the server can check if original operation with the
60349// same request ID was received, and if so, will ignore the second
60350// request. This prevents clients from accidentally creating duplicate
60351// commitments.
60352//
60353// The request ID must be a valid UUID with the exception that zero UUID
60354// is not supported (00000000-0000-0000-0000-000000000000).
60355func (c *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall {
60356	c.urlParams_.Set("requestId", requestId)
60357	return c
60358}
60359
60360// Fields allows partial responses to be retrieved. See
60361// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
60362// for more information.
60363func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall {
60364	c.urlParams_.Set("fields", googleapi.CombineFields(s))
60365	return c
60366}
60367
60368// Context sets the context to be used in this call's Do method. Any
60369// pending HTTP request will be aborted if the provided context is
60370// canceled.
60371func (c *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall {
60372	c.ctx_ = ctx
60373	return c
60374}
60375
60376// Header returns an http.Header that can be modified by the caller to
60377// add HTTP headers to the request.
60378func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header {
60379	if c.header_ == nil {
60380		c.header_ = make(http.Header)
60381	}
60382	return c.header_
60383}
60384
60385func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) {
60386	reqHeaders := make(http.Header)
60387	for k, v := range c.header_ {
60388		reqHeaders[k] = v
60389	}
60390	reqHeaders.Set("User-Agent", c.s.userAgent())
60391	var body io.Reader = nil
60392	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
60393	if err != nil {
60394		return nil, err
60395	}
60396	reqHeaders.Set("Content-Type", "application/json")
60397	c.urlParams_.Set("alt", alt)
60398	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}")
60399	urls += "?" + c.urlParams_.Encode()
60400	req, _ := http.NewRequest("PATCH", urls, body)
60401	req.Header = reqHeaders
60402	googleapi.Expand(req.URL, map[string]string{
60403		"project":              c.project,
60404		"region":               c.region,
60405		"instanceGroupManager": c.instanceGroupManager,
60406	})
60407	return gensupport.SendRequest(c.ctx_, c.s.client, req)
60408}
60409
60410// Do executes the "compute.regionInstanceGroupManagers.patch" call.
60411// Exactly one of *Operation or error will be non-nil. Any non-2xx
60412// status code is an error. Response headers are in either
60413// *Operation.ServerResponse.Header or (if a response was returned at
60414// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
60415// to check whether the returned error was because
60416// http.StatusNotModified was returned.
60417func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
60418	gensupport.SetOptions(c.urlParams_, opts...)
60419	res, err := c.doRequest("json")
60420	if res != nil && res.StatusCode == http.StatusNotModified {
60421		if res.Body != nil {
60422			res.Body.Close()
60423		}
60424		return nil, &googleapi.Error{
60425			Code:   res.StatusCode,
60426			Header: res.Header,
60427		}
60428	}
60429	if err != nil {
60430		return nil, err
60431	}
60432	defer googleapi.CloseBody(res)
60433	if err := googleapi.CheckResponse(res); err != nil {
60434		return nil, err
60435	}
60436	ret := &Operation{
60437		ServerResponse: googleapi.ServerResponse{
60438			Header:         res.Header,
60439			HTTPStatusCode: res.StatusCode,
60440		},
60441	}
60442	target := &ret
60443	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
60444		return nil, err
60445	}
60446	return ret, nil
60447	// {
60448	//   "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
60449	//   "httpMethod": "PATCH",
60450	//   "id": "compute.regionInstanceGroupManagers.patch",
60451	//   "parameterOrder": [
60452	//     "project",
60453	//     "region",
60454	//     "instanceGroupManager"
60455	//   ],
60456	//   "parameters": {
60457	//     "instanceGroupManager": {
60458	//       "description": "The name of the instance group manager.",
60459	//       "location": "path",
60460	//       "required": true,
60461	//       "type": "string"
60462	//     },
60463	//     "project": {
60464	//       "description": "Project ID for this request.",
60465	//       "location": "path",
60466	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
60467	//       "required": true,
60468	//       "type": "string"
60469	//     },
60470	//     "region": {
60471	//       "description": "Name of the region scoping this request.",
60472	//       "location": "path",
60473	//       "required": true,
60474	//       "type": "string"
60475	//     },
60476	//     "requestId": {
60477	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
60478	//       "location": "query",
60479	//       "type": "string"
60480	//     }
60481	//   },
60482	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}",
60483	//   "request": {
60484	//     "$ref": "InstanceGroupManager"
60485	//   },
60486	//   "response": {
60487	//     "$ref": "Operation"
60488	//   },
60489	//   "scopes": [
60490	//     "https://www.googleapis.com/auth/cloud-platform",
60491	//     "https://www.googleapis.com/auth/compute"
60492	//   ]
60493	// }
60494
60495}
60496
60497// method id "compute.regionInstanceGroupManagers.recreateInstances":
60498
60499type RegionInstanceGroupManagersRecreateInstancesCall struct {
60500	s                                          *Service
60501	project                                    string
60502	region                                     string
60503	instanceGroupManager                       string
60504	regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest
60505	urlParams_                                 gensupport.URLParams
60506	ctx_                                       context.Context
60507	header_                                    http.Header
60508}
60509
60510// RecreateInstances: Schedules a group action to recreate the specified
60511// instances in the managed instance group. The instances are deleted
60512// and recreated using the current instance template for the managed
60513// instance group. This operation is marked as DONE when the action is
60514// scheduled even if the instances have not yet been recreated. You must
60515// separately verify the status of the recreating action with the
60516// listmanagedinstances method.
60517//
60518// If the group is part of a backend service that has enabled connection
60519// draining, it can take up to 60 seconds after the connection draining
60520// duration has elapsed before the VM instance is removed or
60521// deleted.
60522//
60523// You can specify a maximum of 1000 instances with this method per
60524// request.
60525func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall {
60526	c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
60527	c.project = project
60528	c.region = region
60529	c.instanceGroupManager = instanceGroupManager
60530	c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest
60531	return c
60532}
60533
60534// RequestId sets the optional parameter "requestId": An optional
60535// request ID to identify requests. Specify a unique request ID so that
60536// if you must retry your request, the server will know to ignore the
60537// request if it has already been completed.
60538//
60539// For example, consider a situation where you make an initial request
60540// and the request times out. If you make the request again with the
60541// same request ID, the server can check if original operation with the
60542// same request ID was received, and if so, will ignore the second
60543// request. This prevents clients from accidentally creating duplicate
60544// commitments.
60545//
60546// The request ID must be a valid UUID with the exception that zero UUID
60547// is not supported (00000000-0000-0000-0000-000000000000).
60548func (c *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall {
60549	c.urlParams_.Set("requestId", requestId)
60550	return c
60551}
60552
60553// Fields allows partial responses to be retrieved. See
60554// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
60555// for more information.
60556func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall {
60557	c.urlParams_.Set("fields", googleapi.CombineFields(s))
60558	return c
60559}
60560
60561// Context sets the context to be used in this call's Do method. Any
60562// pending HTTP request will be aborted if the provided context is
60563// canceled.
60564func (c *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall {
60565	c.ctx_ = ctx
60566	return c
60567}
60568
60569// Header returns an http.Header that can be modified by the caller to
60570// add HTTP headers to the request.
60571func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header {
60572	if c.header_ == nil {
60573		c.header_ = make(http.Header)
60574	}
60575	return c.header_
60576}
60577
60578func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) {
60579	reqHeaders := make(http.Header)
60580	for k, v := range c.header_ {
60581		reqHeaders[k] = v
60582	}
60583	reqHeaders.Set("User-Agent", c.s.userAgent())
60584	var body io.Reader = nil
60585	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersrecreaterequest)
60586	if err != nil {
60587		return nil, err
60588	}
60589	reqHeaders.Set("Content-Type", "application/json")
60590	c.urlParams_.Set("alt", alt)
60591	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances")
60592	urls += "?" + c.urlParams_.Encode()
60593	req, _ := http.NewRequest("POST", urls, body)
60594	req.Header = reqHeaders
60595	googleapi.Expand(req.URL, map[string]string{
60596		"project":              c.project,
60597		"region":               c.region,
60598		"instanceGroupManager": c.instanceGroupManager,
60599	})
60600	return gensupport.SendRequest(c.ctx_, c.s.client, req)
60601}
60602
60603// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call.
60604// Exactly one of *Operation or error will be non-nil. Any non-2xx
60605// status code is an error. Response headers are in either
60606// *Operation.ServerResponse.Header or (if a response was returned at
60607// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
60608// to check whether the returned error was because
60609// http.StatusNotModified was returned.
60610func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
60611	gensupport.SetOptions(c.urlParams_, opts...)
60612	res, err := c.doRequest("json")
60613	if res != nil && res.StatusCode == http.StatusNotModified {
60614		if res.Body != nil {
60615			res.Body.Close()
60616		}
60617		return nil, &googleapi.Error{
60618			Code:   res.StatusCode,
60619			Header: res.Header,
60620		}
60621	}
60622	if err != nil {
60623		return nil, err
60624	}
60625	defer googleapi.CloseBody(res)
60626	if err := googleapi.CheckResponse(res); err != nil {
60627		return nil, err
60628	}
60629	ret := &Operation{
60630		ServerResponse: googleapi.ServerResponse{
60631			Header:         res.Header,
60632			HTTPStatusCode: res.StatusCode,
60633		},
60634	}
60635	target := &ret
60636	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
60637		return nil, err
60638	}
60639	return ret, nil
60640	// {
60641	//   "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.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.\n\nYou can specify a maximum of 1000 instances with this method per request.",
60642	//   "httpMethod": "POST",
60643	//   "id": "compute.regionInstanceGroupManagers.recreateInstances",
60644	//   "parameterOrder": [
60645	//     "project",
60646	//     "region",
60647	//     "instanceGroupManager"
60648	//   ],
60649	//   "parameters": {
60650	//     "instanceGroupManager": {
60651	//       "description": "Name of the managed instance group.",
60652	//       "location": "path",
60653	//       "required": true,
60654	//       "type": "string"
60655	//     },
60656	//     "project": {
60657	//       "description": "Project ID for this request.",
60658	//       "location": "path",
60659	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
60660	//       "required": true,
60661	//       "type": "string"
60662	//     },
60663	//     "region": {
60664	//       "description": "Name of the region scoping this request.",
60665	//       "location": "path",
60666	//       "required": true,
60667	//       "type": "string"
60668	//     },
60669	//     "requestId": {
60670	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
60671	//       "location": "query",
60672	//       "type": "string"
60673	//     }
60674	//   },
60675	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances",
60676	//   "request": {
60677	//     "$ref": "RegionInstanceGroupManagersRecreateRequest"
60678	//   },
60679	//   "response": {
60680	//     "$ref": "Operation"
60681	//   },
60682	//   "scopes": [
60683	//     "https://www.googleapis.com/auth/cloud-platform",
60684	//     "https://www.googleapis.com/auth/compute"
60685	//   ]
60686	// }
60687
60688}
60689
60690// method id "compute.regionInstanceGroupManagers.resize":
60691
60692type RegionInstanceGroupManagersResizeCall struct {
60693	s                    *Service
60694	project              string
60695	region               string
60696	instanceGroupManager string
60697	urlParams_           gensupport.URLParams
60698	ctx_                 context.Context
60699	header_              http.Header
60700}
60701
60702// Resize: Changes the intended size for the managed instance group. If
60703// you increase the size, the group schedules actions to create new
60704// instances using the current instance template. If you decrease the
60705// size, the group schedules delete actions on one or more instances.
60706// The resize operation is marked DONE when the resize actions are
60707// scheduled even if the group has not yet added or deleted any
60708// instances. You must separately verify the status of the creating or
60709// deleting actions with the listmanagedinstances method.
60710//
60711// If the group is part of a backend service that has enabled connection
60712// draining, it can take up to 60 seconds after the connection draining
60713// duration has elapsed before the VM instance is removed or deleted.
60714func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall {
60715	c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
60716	c.project = project
60717	c.region = region
60718	c.instanceGroupManager = instanceGroupManager
60719	c.urlParams_.Set("size", fmt.Sprint(size))
60720	return c
60721}
60722
60723// RequestId sets the optional parameter "requestId": An optional
60724// request ID to identify requests. Specify a unique request ID so that
60725// if you must retry your request, the server will know to ignore the
60726// request if it has already been completed.
60727//
60728// For example, consider a situation where you make an initial request
60729// and the request times out. If you make the request again with the
60730// same request ID, the server can check if original operation with the
60731// same request ID was received, and if so, will ignore the second
60732// request. This prevents clients from accidentally creating duplicate
60733// commitments.
60734//
60735// The request ID must be a valid UUID with the exception that zero UUID
60736// is not supported (00000000-0000-0000-0000-000000000000).
60737func (c *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall {
60738	c.urlParams_.Set("requestId", requestId)
60739	return c
60740}
60741
60742// Fields allows partial responses to be retrieved. See
60743// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
60744// for more information.
60745func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall {
60746	c.urlParams_.Set("fields", googleapi.CombineFields(s))
60747	return c
60748}
60749
60750// Context sets the context to be used in this call's Do method. Any
60751// pending HTTP request will be aborted if the provided context is
60752// canceled.
60753func (c *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall {
60754	c.ctx_ = ctx
60755	return c
60756}
60757
60758// Header returns an http.Header that can be modified by the caller to
60759// add HTTP headers to the request.
60760func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header {
60761	if c.header_ == nil {
60762		c.header_ = make(http.Header)
60763	}
60764	return c.header_
60765}
60766
60767func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) {
60768	reqHeaders := make(http.Header)
60769	for k, v := range c.header_ {
60770		reqHeaders[k] = v
60771	}
60772	reqHeaders.Set("User-Agent", c.s.userAgent())
60773	var body io.Reader = nil
60774	c.urlParams_.Set("alt", alt)
60775	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize")
60776	urls += "?" + c.urlParams_.Encode()
60777	req, _ := http.NewRequest("POST", urls, body)
60778	req.Header = reqHeaders
60779	googleapi.Expand(req.URL, map[string]string{
60780		"project":              c.project,
60781		"region":               c.region,
60782		"instanceGroupManager": c.instanceGroupManager,
60783	})
60784	return gensupport.SendRequest(c.ctx_, c.s.client, req)
60785}
60786
60787// Do executes the "compute.regionInstanceGroupManagers.resize" call.
60788// Exactly one of *Operation or error will be non-nil. Any non-2xx
60789// status code is an error. Response headers are in either
60790// *Operation.ServerResponse.Header or (if a response was returned at
60791// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
60792// to check whether the returned error was because
60793// http.StatusNotModified was returned.
60794func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
60795	gensupport.SetOptions(c.urlParams_, opts...)
60796	res, err := c.doRequest("json")
60797	if res != nil && res.StatusCode == http.StatusNotModified {
60798		if res.Body != nil {
60799			res.Body.Close()
60800		}
60801		return nil, &googleapi.Error{
60802			Code:   res.StatusCode,
60803			Header: res.Header,
60804		}
60805	}
60806	if err != nil {
60807		return nil, err
60808	}
60809	defer googleapi.CloseBody(res)
60810	if err := googleapi.CheckResponse(res); err != nil {
60811		return nil, err
60812	}
60813	ret := &Operation{
60814		ServerResponse: googleapi.ServerResponse{
60815			Header:         res.Header,
60816			HTTPStatusCode: res.StatusCode,
60817		},
60818	}
60819	target := &ret
60820	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
60821		return nil, err
60822	}
60823	return ret, nil
60824	// {
60825	//   "description": "Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more 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.\n\nIf the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.",
60826	//   "httpMethod": "POST",
60827	//   "id": "compute.regionInstanceGroupManagers.resize",
60828	//   "parameterOrder": [
60829	//     "project",
60830	//     "region",
60831	//     "instanceGroupManager",
60832	//     "size"
60833	//   ],
60834	//   "parameters": {
60835	//     "instanceGroupManager": {
60836	//       "description": "Name of the managed instance group.",
60837	//       "location": "path",
60838	//       "required": true,
60839	//       "type": "string"
60840	//     },
60841	//     "project": {
60842	//       "description": "Project ID for this request.",
60843	//       "location": "path",
60844	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
60845	//       "required": true,
60846	//       "type": "string"
60847	//     },
60848	//     "region": {
60849	//       "description": "Name of the region scoping this request.",
60850	//       "location": "path",
60851	//       "required": true,
60852	//       "type": "string"
60853	//     },
60854	//     "requestId": {
60855	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
60856	//       "location": "query",
60857	//       "type": "string"
60858	//     },
60859	//     "size": {
60860	//       "description": "Number of instances that should exist in this instance group manager.",
60861	//       "format": "int32",
60862	//       "location": "query",
60863	//       "minimum": "0",
60864	//       "required": true,
60865	//       "type": "integer"
60866	//     }
60867	//   },
60868	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize",
60869	//   "response": {
60870	//     "$ref": "Operation"
60871	//   },
60872	//   "scopes": [
60873	//     "https://www.googleapis.com/auth/cloud-platform",
60874	//     "https://www.googleapis.com/auth/compute"
60875	//   ]
60876	// }
60877
60878}
60879
60880// method id "compute.regionInstanceGroupManagers.setAutoHealingPolicies":
60881
60882type RegionInstanceGroupManagersSetAutoHealingPoliciesCall struct {
60883	s                                                *Service
60884	project                                          string
60885	region                                           string
60886	instanceGroupManager                             string
60887	regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest
60888	urlParams_                                       gensupport.URLParams
60889	ctx_                                             context.Context
60890	header_                                          http.Header
60891}
60892
60893// SetAutoHealingPolicies: Modifies the autohealing policy for the
60894// instances in this managed instance group.
60895func (r *RegionInstanceGroupManagersService) SetAutoHealingPolicies(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssetautohealingrequest *RegionInstanceGroupManagersSetAutoHealingRequest) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall {
60896	c := &RegionInstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
60897	c.project = project
60898	c.region = region
60899	c.instanceGroupManager = instanceGroupManager
60900	c.regioninstancegroupmanagerssetautohealingrequest = regioninstancegroupmanagerssetautohealingrequest
60901	return c
60902}
60903
60904// RequestId sets the optional parameter "requestId": An optional
60905// request ID to identify requests. Specify a unique request ID so that
60906// if you must retry your request, the server will know to ignore the
60907// request if it has already been completed.
60908//
60909// For example, consider a situation where you make an initial request
60910// and the request times out. If you make the request again with the
60911// same request ID, the server can check if original operation with the
60912// same request ID was received, and if so, will ignore the second
60913// request. This prevents clients from accidentally creating duplicate
60914// commitments.
60915//
60916// The request ID must be a valid UUID with the exception that zero UUID
60917// is not supported (00000000-0000-0000-0000-000000000000).
60918func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) RequestId(requestId string) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall {
60919	c.urlParams_.Set("requestId", requestId)
60920	return c
60921}
60922
60923// Fields allows partial responses to be retrieved. See
60924// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
60925// for more information.
60926func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall {
60927	c.urlParams_.Set("fields", googleapi.CombineFields(s))
60928	return c
60929}
60930
60931// Context sets the context to be used in this call's Do method. Any
60932// pending HTTP request will be aborted if the provided context is
60933// canceled.
60934func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetAutoHealingPoliciesCall {
60935	c.ctx_ = ctx
60936	return c
60937}
60938
60939// Header returns an http.Header that can be modified by the caller to
60940// add HTTP headers to the request.
60941func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Header() http.Header {
60942	if c.header_ == nil {
60943		c.header_ = make(http.Header)
60944	}
60945	return c.header_
60946}
60947
60948func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) {
60949	reqHeaders := make(http.Header)
60950	for k, v := range c.header_ {
60951		reqHeaders[k] = v
60952	}
60953	reqHeaders.Set("User-Agent", c.s.userAgent())
60954	var body io.Reader = nil
60955	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssetautohealingrequest)
60956	if err != nil {
60957		return nil, err
60958	}
60959	reqHeaders.Set("Content-Type", "application/json")
60960	c.urlParams_.Set("alt", alt)
60961	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies")
60962	urls += "?" + c.urlParams_.Encode()
60963	req, _ := http.NewRequest("POST", urls, body)
60964	req.Header = reqHeaders
60965	googleapi.Expand(req.URL, map[string]string{
60966		"project":              c.project,
60967		"region":               c.region,
60968		"instanceGroupManager": c.instanceGroupManager,
60969	})
60970	return gensupport.SendRequest(c.ctx_, c.s.client, req)
60971}
60972
60973// Do executes the "compute.regionInstanceGroupManagers.setAutoHealingPolicies" call.
60974// Exactly one of *Operation or error will be non-nil. Any non-2xx
60975// status code is an error. Response headers are in either
60976// *Operation.ServerResponse.Header or (if a response was returned at
60977// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
60978// to check whether the returned error was because
60979// http.StatusNotModified was returned.
60980func (c *RegionInstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
60981	gensupport.SetOptions(c.urlParams_, opts...)
60982	res, err := c.doRequest("json")
60983	if res != nil && res.StatusCode == http.StatusNotModified {
60984		if res.Body != nil {
60985			res.Body.Close()
60986		}
60987		return nil, &googleapi.Error{
60988			Code:   res.StatusCode,
60989			Header: res.Header,
60990		}
60991	}
60992	if err != nil {
60993		return nil, err
60994	}
60995	defer googleapi.CloseBody(res)
60996	if err := googleapi.CheckResponse(res); err != nil {
60997		return nil, err
60998	}
60999	ret := &Operation{
61000		ServerResponse: googleapi.ServerResponse{
61001			Header:         res.Header,
61002			HTTPStatusCode: res.StatusCode,
61003		},
61004	}
61005	target := &ret
61006	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
61007		return nil, err
61008	}
61009	return ret, nil
61010	// {
61011	//   "description": "Modifies the autohealing policy for the instances in this managed instance group.",
61012	//   "httpMethod": "POST",
61013	//   "id": "compute.regionInstanceGroupManagers.setAutoHealingPolicies",
61014	//   "parameterOrder": [
61015	//     "project",
61016	//     "region",
61017	//     "instanceGroupManager"
61018	//   ],
61019	//   "parameters": {
61020	//     "instanceGroupManager": {
61021	//       "description": "Name of the managed instance group.",
61022	//       "location": "path",
61023	//       "required": true,
61024	//       "type": "string"
61025	//     },
61026	//     "project": {
61027	//       "description": "Project ID for this request.",
61028	//       "location": "path",
61029	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
61030	//       "required": true,
61031	//       "type": "string"
61032	//     },
61033	//     "region": {
61034	//       "description": "Name of the region scoping this request.",
61035	//       "location": "path",
61036	//       "required": true,
61037	//       "type": "string"
61038	//     },
61039	//     "requestId": {
61040	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
61041	//       "location": "query",
61042	//       "type": "string"
61043	//     }
61044	//   },
61045	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies",
61046	//   "request": {
61047	//     "$ref": "RegionInstanceGroupManagersSetAutoHealingRequest"
61048	//   },
61049	//   "response": {
61050	//     "$ref": "Operation"
61051	//   },
61052	//   "scopes": [
61053	//     "https://www.googleapis.com/auth/cloud-platform",
61054	//     "https://www.googleapis.com/auth/compute"
61055	//   ]
61056	// }
61057
61058}
61059
61060// method id "compute.regionInstanceGroupManagers.setInstanceTemplate":
61061
61062type RegionInstanceGroupManagersSetInstanceTemplateCall struct {
61063	s                                             *Service
61064	project                                       string
61065	region                                        string
61066	instanceGroupManager                          string
61067	regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest
61068	urlParams_                                    gensupport.URLParams
61069	ctx_                                          context.Context
61070	header_                                       http.Header
61071}
61072
61073// SetInstanceTemplate: Sets the instance template to use when creating
61074// new instances or recreating instances in this group. Existing
61075// instances are not affected.
61076func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall {
61077	c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
61078	c.project = project
61079	c.region = region
61080	c.instanceGroupManager = instanceGroupManager
61081	c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest
61082	return c
61083}
61084
61085// RequestId sets the optional parameter "requestId": An optional
61086// request ID to identify requests. Specify a unique request ID so that
61087// if you must retry your request, the server will know to ignore the
61088// request if it has already been completed.
61089//
61090// For example, consider a situation where you make an initial request
61091// and the request times out. If you make the request again with the
61092// same request ID, the server can check if original operation with the
61093// same request ID was received, and if so, will ignore the second
61094// request. This prevents clients from accidentally creating duplicate
61095// commitments.
61096//
61097// The request ID must be a valid UUID with the exception that zero UUID
61098// is not supported (00000000-0000-0000-0000-000000000000).
61099func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall {
61100	c.urlParams_.Set("requestId", requestId)
61101	return c
61102}
61103
61104// Fields allows partial responses to be retrieved. See
61105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
61106// for more information.
61107func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall {
61108	c.urlParams_.Set("fields", googleapi.CombineFields(s))
61109	return c
61110}
61111
61112// Context sets the context to be used in this call's Do method. Any
61113// pending HTTP request will be aborted if the provided context is
61114// canceled.
61115func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall {
61116	c.ctx_ = ctx
61117	return c
61118}
61119
61120// Header returns an http.Header that can be modified by the caller to
61121// add HTTP headers to the request.
61122func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header {
61123	if c.header_ == nil {
61124		c.header_ = make(http.Header)
61125	}
61126	return c.header_
61127}
61128
61129func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) {
61130	reqHeaders := make(http.Header)
61131	for k, v := range c.header_ {
61132		reqHeaders[k] = v
61133	}
61134	reqHeaders.Set("User-Agent", c.s.userAgent())
61135	var body io.Reader = nil
61136	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettemplaterequest)
61137	if err != nil {
61138		return nil, err
61139	}
61140	reqHeaders.Set("Content-Type", "application/json")
61141	c.urlParams_.Set("alt", alt)
61142	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate")
61143	urls += "?" + c.urlParams_.Encode()
61144	req, _ := http.NewRequest("POST", urls, body)
61145	req.Header = reqHeaders
61146	googleapi.Expand(req.URL, map[string]string{
61147		"project":              c.project,
61148		"region":               c.region,
61149		"instanceGroupManager": c.instanceGroupManager,
61150	})
61151	return gensupport.SendRequest(c.ctx_, c.s.client, req)
61152}
61153
61154// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call.
61155// Exactly one of *Operation or error will be non-nil. Any non-2xx
61156// status code is an error. Response headers are in either
61157// *Operation.ServerResponse.Header or (if a response was returned at
61158// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
61159// to check whether the returned error was because
61160// http.StatusNotModified was returned.
61161func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
61162	gensupport.SetOptions(c.urlParams_, opts...)
61163	res, err := c.doRequest("json")
61164	if res != nil && res.StatusCode == http.StatusNotModified {
61165		if res.Body != nil {
61166			res.Body.Close()
61167		}
61168		return nil, &googleapi.Error{
61169			Code:   res.StatusCode,
61170			Header: res.Header,
61171		}
61172	}
61173	if err != nil {
61174		return nil, err
61175	}
61176	defer googleapi.CloseBody(res)
61177	if err := googleapi.CheckResponse(res); err != nil {
61178		return nil, err
61179	}
61180	ret := &Operation{
61181		ServerResponse: googleapi.ServerResponse{
61182			Header:         res.Header,
61183			HTTPStatusCode: res.StatusCode,
61184		},
61185	}
61186	target := &ret
61187	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
61188		return nil, err
61189	}
61190	return ret, nil
61191	// {
61192	//   "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.",
61193	//   "httpMethod": "POST",
61194	//   "id": "compute.regionInstanceGroupManagers.setInstanceTemplate",
61195	//   "parameterOrder": [
61196	//     "project",
61197	//     "region",
61198	//     "instanceGroupManager"
61199	//   ],
61200	//   "parameters": {
61201	//     "instanceGroupManager": {
61202	//       "description": "The name of the managed instance group.",
61203	//       "location": "path",
61204	//       "required": true,
61205	//       "type": "string"
61206	//     },
61207	//     "project": {
61208	//       "description": "Project ID for this request.",
61209	//       "location": "path",
61210	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
61211	//       "required": true,
61212	//       "type": "string"
61213	//     },
61214	//     "region": {
61215	//       "description": "Name of the region scoping this request.",
61216	//       "location": "path",
61217	//       "required": true,
61218	//       "type": "string"
61219	//     },
61220	//     "requestId": {
61221	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
61222	//       "location": "query",
61223	//       "type": "string"
61224	//     }
61225	//   },
61226	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate",
61227	//   "request": {
61228	//     "$ref": "RegionInstanceGroupManagersSetTemplateRequest"
61229	//   },
61230	//   "response": {
61231	//     "$ref": "Operation"
61232	//   },
61233	//   "scopes": [
61234	//     "https://www.googleapis.com/auth/cloud-platform",
61235	//     "https://www.googleapis.com/auth/compute"
61236	//   ]
61237	// }
61238
61239}
61240
61241// method id "compute.regionInstanceGroupManagers.setTargetPools":
61242
61243type RegionInstanceGroupManagersSetTargetPoolsCall struct {
61244	s                                                *Service
61245	project                                          string
61246	region                                           string
61247	instanceGroupManager                             string
61248	regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest
61249	urlParams_                                       gensupport.URLParams
61250	ctx_                                             context.Context
61251	header_                                          http.Header
61252}
61253
61254// SetTargetPools: Modifies the target pools to which all new instances
61255// in this group are assigned. Existing instances in the group are not
61256// affected.
61257func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall {
61258	c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
61259	c.project = project
61260	c.region = region
61261	c.instanceGroupManager = instanceGroupManager
61262	c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest
61263	return c
61264}
61265
61266// RequestId sets the optional parameter "requestId": An optional
61267// request ID to identify requests. Specify a unique request ID so that
61268// if you must retry your request, the server will know to ignore the
61269// request if it has already been completed.
61270//
61271// For example, consider a situation where you make an initial request
61272// and the request times out. If you make the request again with the
61273// same request ID, the server can check if original operation with the
61274// same request ID was received, and if so, will ignore the second
61275// request. This prevents clients from accidentally creating duplicate
61276// commitments.
61277//
61278// The request ID must be a valid UUID with the exception that zero UUID
61279// is not supported (00000000-0000-0000-0000-000000000000).
61280func (c *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall {
61281	c.urlParams_.Set("requestId", requestId)
61282	return c
61283}
61284
61285// Fields allows partial responses to be retrieved. See
61286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
61287// for more information.
61288func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall {
61289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
61290	return c
61291}
61292
61293// Context sets the context to be used in this call's Do method. Any
61294// pending HTTP request will be aborted if the provided context is
61295// canceled.
61296func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall {
61297	c.ctx_ = ctx
61298	return c
61299}
61300
61301// Header returns an http.Header that can be modified by the caller to
61302// add HTTP headers to the request.
61303func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header {
61304	if c.header_ == nil {
61305		c.header_ = make(http.Header)
61306	}
61307	return c.header_
61308}
61309
61310func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) {
61311	reqHeaders := make(http.Header)
61312	for k, v := range c.header_ {
61313		reqHeaders[k] = v
61314	}
61315	reqHeaders.Set("User-Agent", c.s.userAgent())
61316	var body io.Reader = nil
61317	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettargetpoolsrequest)
61318	if err != nil {
61319		return nil, err
61320	}
61321	reqHeaders.Set("Content-Type", "application/json")
61322	c.urlParams_.Set("alt", alt)
61323	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools")
61324	urls += "?" + c.urlParams_.Encode()
61325	req, _ := http.NewRequest("POST", urls, body)
61326	req.Header = reqHeaders
61327	googleapi.Expand(req.URL, map[string]string{
61328		"project":              c.project,
61329		"region":               c.region,
61330		"instanceGroupManager": c.instanceGroupManager,
61331	})
61332	return gensupport.SendRequest(c.ctx_, c.s.client, req)
61333}
61334
61335// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call.
61336// Exactly one of *Operation or error will be non-nil. Any non-2xx
61337// status code is an error. Response headers are in either
61338// *Operation.ServerResponse.Header or (if a response was returned at
61339// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
61340// to check whether the returned error was because
61341// http.StatusNotModified was returned.
61342func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
61343	gensupport.SetOptions(c.urlParams_, opts...)
61344	res, err := c.doRequest("json")
61345	if res != nil && res.StatusCode == http.StatusNotModified {
61346		if res.Body != nil {
61347			res.Body.Close()
61348		}
61349		return nil, &googleapi.Error{
61350			Code:   res.StatusCode,
61351			Header: res.Header,
61352		}
61353	}
61354	if err != nil {
61355		return nil, err
61356	}
61357	defer googleapi.CloseBody(res)
61358	if err := googleapi.CheckResponse(res); err != nil {
61359		return nil, err
61360	}
61361	ret := &Operation{
61362		ServerResponse: googleapi.ServerResponse{
61363			Header:         res.Header,
61364			HTTPStatusCode: res.StatusCode,
61365		},
61366	}
61367	target := &ret
61368	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
61369		return nil, err
61370	}
61371	return ret, nil
61372	// {
61373	//   "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.",
61374	//   "httpMethod": "POST",
61375	//   "id": "compute.regionInstanceGroupManagers.setTargetPools",
61376	//   "parameterOrder": [
61377	//     "project",
61378	//     "region",
61379	//     "instanceGroupManager"
61380	//   ],
61381	//   "parameters": {
61382	//     "instanceGroupManager": {
61383	//       "description": "Name of the managed instance group.",
61384	//       "location": "path",
61385	//       "required": true,
61386	//       "type": "string"
61387	//     },
61388	//     "project": {
61389	//       "description": "Project ID for this request.",
61390	//       "location": "path",
61391	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
61392	//       "required": true,
61393	//       "type": "string"
61394	//     },
61395	//     "region": {
61396	//       "description": "Name of the region scoping this request.",
61397	//       "location": "path",
61398	//       "required": true,
61399	//       "type": "string"
61400	//     },
61401	//     "requestId": {
61402	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
61403	//       "location": "query",
61404	//       "type": "string"
61405	//     }
61406	//   },
61407	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools",
61408	//   "request": {
61409	//     "$ref": "RegionInstanceGroupManagersSetTargetPoolsRequest"
61410	//   },
61411	//   "response": {
61412	//     "$ref": "Operation"
61413	//   },
61414	//   "scopes": [
61415	//     "https://www.googleapis.com/auth/cloud-platform",
61416	//     "https://www.googleapis.com/auth/compute"
61417	//   ]
61418	// }
61419
61420}
61421
61422// method id "compute.regionInstanceGroupManagers.testIamPermissions":
61423
61424type RegionInstanceGroupManagersTestIamPermissionsCall struct {
61425	s                      *Service
61426	project                string
61427	region                 string
61428	resource               string
61429	testpermissionsrequest *TestPermissionsRequest
61430	urlParams_             gensupport.URLParams
61431	ctx_                   context.Context
61432	header_                http.Header
61433}
61434
61435// TestIamPermissions: Returns permissions that a caller has on the
61436// specified resource.
61437func (r *RegionInstanceGroupManagersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupManagersTestIamPermissionsCall {
61438	c := &RegionInstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
61439	c.project = project
61440	c.region = region
61441	c.resource = resource
61442	c.testpermissionsrequest = testpermissionsrequest
61443	return c
61444}
61445
61446// Fields allows partial responses to be retrieved. See
61447// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
61448// for more information.
61449func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersTestIamPermissionsCall {
61450	c.urlParams_.Set("fields", googleapi.CombineFields(s))
61451	return c
61452}
61453
61454// Context sets the context to be used in this call's Do method. Any
61455// pending HTTP request will be aborted if the provided context is
61456// canceled.
61457func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupManagersTestIamPermissionsCall {
61458	c.ctx_ = ctx
61459	return c
61460}
61461
61462// Header returns an http.Header that can be modified by the caller to
61463// add HTTP headers to the request.
61464func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Header() http.Header {
61465	if c.header_ == nil {
61466		c.header_ = make(http.Header)
61467	}
61468	return c.header_
61469}
61470
61471func (c *RegionInstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
61472	reqHeaders := make(http.Header)
61473	for k, v := range c.header_ {
61474		reqHeaders[k] = v
61475	}
61476	reqHeaders.Set("User-Agent", c.s.userAgent())
61477	var body io.Reader = nil
61478	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
61479	if err != nil {
61480		return nil, err
61481	}
61482	reqHeaders.Set("Content-Type", "application/json")
61483	c.urlParams_.Set("alt", alt)
61484	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions")
61485	urls += "?" + c.urlParams_.Encode()
61486	req, _ := http.NewRequest("POST", urls, body)
61487	req.Header = reqHeaders
61488	googleapi.Expand(req.URL, map[string]string{
61489		"project":  c.project,
61490		"region":   c.region,
61491		"resource": c.resource,
61492	})
61493	return gensupport.SendRequest(c.ctx_, c.s.client, req)
61494}
61495
61496// Do executes the "compute.regionInstanceGroupManagers.testIamPermissions" call.
61497// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
61498// non-2xx status code is an error. Response headers are in either
61499// *TestPermissionsResponse.ServerResponse.Header or (if a response was
61500// returned at all) in error.(*googleapi.Error).Header. Use
61501// googleapi.IsNotModified to check whether the returned error was
61502// because http.StatusNotModified was returned.
61503func (c *RegionInstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
61504	gensupport.SetOptions(c.urlParams_, opts...)
61505	res, err := c.doRequest("json")
61506	if res != nil && res.StatusCode == http.StatusNotModified {
61507		if res.Body != nil {
61508			res.Body.Close()
61509		}
61510		return nil, &googleapi.Error{
61511			Code:   res.StatusCode,
61512			Header: res.Header,
61513		}
61514	}
61515	if err != nil {
61516		return nil, err
61517	}
61518	defer googleapi.CloseBody(res)
61519	if err := googleapi.CheckResponse(res); err != nil {
61520		return nil, err
61521	}
61522	ret := &TestPermissionsResponse{
61523		ServerResponse: googleapi.ServerResponse{
61524			Header:         res.Header,
61525			HTTPStatusCode: res.StatusCode,
61526		},
61527	}
61528	target := &ret
61529	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
61530		return nil, err
61531	}
61532	return ret, nil
61533	// {
61534	//   "description": "Returns permissions that a caller has on the specified resource.",
61535	//   "httpMethod": "POST",
61536	//   "id": "compute.regionInstanceGroupManagers.testIamPermissions",
61537	//   "parameterOrder": [
61538	//     "project",
61539	//     "region",
61540	//     "resource"
61541	//   ],
61542	//   "parameters": {
61543	//     "project": {
61544	//       "description": "Project ID for this request.",
61545	//       "location": "path",
61546	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
61547	//       "required": true,
61548	//       "type": "string"
61549	//     },
61550	//     "region": {
61551	//       "description": "The name of the region for this request.",
61552	//       "location": "path",
61553	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
61554	//       "required": true,
61555	//       "type": "string"
61556	//     },
61557	//     "resource": {
61558	//       "description": "Name of the resource for this request.",
61559	//       "location": "path",
61560	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
61561	//       "required": true,
61562	//       "type": "string"
61563	//     }
61564	//   },
61565	//   "path": "{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions",
61566	//   "request": {
61567	//     "$ref": "TestPermissionsRequest"
61568	//   },
61569	//   "response": {
61570	//     "$ref": "TestPermissionsResponse"
61571	//   },
61572	//   "scopes": [
61573	//     "https://www.googleapis.com/auth/cloud-platform",
61574	//     "https://www.googleapis.com/auth/compute",
61575	//     "https://www.googleapis.com/auth/compute.readonly"
61576	//   ]
61577	// }
61578
61579}
61580
61581// method id "compute.regionInstanceGroupManagers.update":
61582
61583type RegionInstanceGroupManagersUpdateCall struct {
61584	s                    *Service
61585	project              string
61586	region               string
61587	instanceGroupManager string
61588	instancegroupmanager *InstanceGroupManager
61589	urlParams_           gensupport.URLParams
61590	ctx_                 context.Context
61591	header_              http.Header
61592}
61593
61594// Update: Updates a managed instance group using the information that
61595// you specify in the request. This operation is marked as DONE when the
61596// group is updated even if the instances in the group have not yet been
61597// updated. You must separately verify the status of the individual
61598// instances with the listmanagedinstances method.
61599func (r *RegionInstanceGroupManagersService) Update(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersUpdateCall {
61600	c := &RegionInstanceGroupManagersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
61601	c.project = project
61602	c.region = region
61603	c.instanceGroupManager = instanceGroupManager
61604	c.instancegroupmanager = instancegroupmanager
61605	return c
61606}
61607
61608// RequestId sets the optional parameter "requestId": An optional
61609// request ID to identify requests. Specify a unique request ID so that
61610// if you must retry your request, the server will know to ignore the
61611// request if it has already been completed.
61612//
61613// For example, consider a situation where you make an initial request
61614// and the request times out. If you make the request again with the
61615// same request ID, the server can check if original operation with the
61616// same request ID was received, and if so, will ignore the second
61617// request. This prevents clients from accidentally creating duplicate
61618// commitments.
61619//
61620// The request ID must be a valid UUID with the exception that zero UUID
61621// is not supported (00000000-0000-0000-0000-000000000000).
61622func (c *RegionInstanceGroupManagersUpdateCall) RequestId(requestId string) *RegionInstanceGroupManagersUpdateCall {
61623	c.urlParams_.Set("requestId", requestId)
61624	return c
61625}
61626
61627// Fields allows partial responses to be retrieved. See
61628// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
61629// for more information.
61630func (c *RegionInstanceGroupManagersUpdateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersUpdateCall {
61631	c.urlParams_.Set("fields", googleapi.CombineFields(s))
61632	return c
61633}
61634
61635// Context sets the context to be used in this call's Do method. Any
61636// pending HTTP request will be aborted if the provided context is
61637// canceled.
61638func (c *RegionInstanceGroupManagersUpdateCall) Context(ctx context.Context) *RegionInstanceGroupManagersUpdateCall {
61639	c.ctx_ = ctx
61640	return c
61641}
61642
61643// Header returns an http.Header that can be modified by the caller to
61644// add HTTP headers to the request.
61645func (c *RegionInstanceGroupManagersUpdateCall) Header() http.Header {
61646	if c.header_ == nil {
61647		c.header_ = make(http.Header)
61648	}
61649	return c.header_
61650}
61651
61652func (c *RegionInstanceGroupManagersUpdateCall) doRequest(alt string) (*http.Response, error) {
61653	reqHeaders := make(http.Header)
61654	for k, v := range c.header_ {
61655		reqHeaders[k] = v
61656	}
61657	reqHeaders.Set("User-Agent", c.s.userAgent())
61658	var body io.Reader = nil
61659	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
61660	if err != nil {
61661		return nil, err
61662	}
61663	reqHeaders.Set("Content-Type", "application/json")
61664	c.urlParams_.Set("alt", alt)
61665	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}")
61666	urls += "?" + c.urlParams_.Encode()
61667	req, _ := http.NewRequest("PUT", urls, body)
61668	req.Header = reqHeaders
61669	googleapi.Expand(req.URL, map[string]string{
61670		"project":              c.project,
61671		"region":               c.region,
61672		"instanceGroupManager": c.instanceGroupManager,
61673	})
61674	return gensupport.SendRequest(c.ctx_, c.s.client, req)
61675}
61676
61677// Do executes the "compute.regionInstanceGroupManagers.update" call.
61678// Exactly one of *Operation or error will be non-nil. Any non-2xx
61679// status code is an error. Response headers are in either
61680// *Operation.ServerResponse.Header or (if a response was returned at
61681// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
61682// to check whether the returned error was because
61683// http.StatusNotModified was returned.
61684func (c *RegionInstanceGroupManagersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
61685	gensupport.SetOptions(c.urlParams_, opts...)
61686	res, err := c.doRequest("json")
61687	if res != nil && res.StatusCode == http.StatusNotModified {
61688		if res.Body != nil {
61689			res.Body.Close()
61690		}
61691		return nil, &googleapi.Error{
61692			Code:   res.StatusCode,
61693			Header: res.Header,
61694		}
61695	}
61696	if err != nil {
61697		return nil, err
61698	}
61699	defer googleapi.CloseBody(res)
61700	if err := googleapi.CheckResponse(res); err != nil {
61701		return nil, err
61702	}
61703	ret := &Operation{
61704		ServerResponse: googleapi.ServerResponse{
61705			Header:         res.Header,
61706			HTTPStatusCode: res.StatusCode,
61707		},
61708	}
61709	target := &ret
61710	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
61711		return nil, err
61712	}
61713	return ret, nil
61714	// {
61715	//   "description": "Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method.",
61716	//   "httpMethod": "PUT",
61717	//   "id": "compute.regionInstanceGroupManagers.update",
61718	//   "parameterOrder": [
61719	//     "project",
61720	//     "region",
61721	//     "instanceGroupManager"
61722	//   ],
61723	//   "parameters": {
61724	//     "instanceGroupManager": {
61725	//       "description": "The name of the instance group manager.",
61726	//       "location": "path",
61727	//       "required": true,
61728	//       "type": "string"
61729	//     },
61730	//     "project": {
61731	//       "description": "Project ID for this request.",
61732	//       "location": "path",
61733	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
61734	//       "required": true,
61735	//       "type": "string"
61736	//     },
61737	//     "region": {
61738	//       "description": "Name of the region scoping this request.",
61739	//       "location": "path",
61740	//       "required": true,
61741	//       "type": "string"
61742	//     },
61743	//     "requestId": {
61744	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
61745	//       "location": "query",
61746	//       "type": "string"
61747	//     }
61748	//   },
61749	//   "path": "{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}",
61750	//   "request": {
61751	//     "$ref": "InstanceGroupManager"
61752	//   },
61753	//   "response": {
61754	//     "$ref": "Operation"
61755	//   },
61756	//   "scopes": [
61757	//     "https://www.googleapis.com/auth/cloud-platform",
61758	//     "https://www.googleapis.com/auth/compute"
61759	//   ]
61760	// }
61761
61762}
61763
61764// method id "compute.regionInstanceGroups.get":
61765
61766type RegionInstanceGroupsGetCall struct {
61767	s             *Service
61768	project       string
61769	region        string
61770	instanceGroup string
61771	urlParams_    gensupport.URLParams
61772	ifNoneMatch_  string
61773	ctx_          context.Context
61774	header_       http.Header
61775}
61776
61777// Get: Returns the specified instance group resource.
61778func (r *RegionInstanceGroupsService) Get(project string, region string, instanceGroup string) *RegionInstanceGroupsGetCall {
61779	c := &RegionInstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
61780	c.project = project
61781	c.region = region
61782	c.instanceGroup = instanceGroup
61783	return c
61784}
61785
61786// Fields allows partial responses to be retrieved. See
61787// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
61788// for more information.
61789func (c *RegionInstanceGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsGetCall {
61790	c.urlParams_.Set("fields", googleapi.CombineFields(s))
61791	return c
61792}
61793
61794// IfNoneMatch sets the optional parameter which makes the operation
61795// fail if the object's ETag matches the given value. This is useful for
61796// getting updates only after the object has changed since the last
61797// request. Use googleapi.IsNotModified to check whether the response
61798// error from Do is the result of In-None-Match.
61799func (c *RegionInstanceGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsGetCall {
61800	c.ifNoneMatch_ = entityTag
61801	return c
61802}
61803
61804// Context sets the context to be used in this call's Do method. Any
61805// pending HTTP request will be aborted if the provided context is
61806// canceled.
61807func (c *RegionInstanceGroupsGetCall) Context(ctx context.Context) *RegionInstanceGroupsGetCall {
61808	c.ctx_ = ctx
61809	return c
61810}
61811
61812// Header returns an http.Header that can be modified by the caller to
61813// add HTTP headers to the request.
61814func (c *RegionInstanceGroupsGetCall) Header() http.Header {
61815	if c.header_ == nil {
61816		c.header_ = make(http.Header)
61817	}
61818	return c.header_
61819}
61820
61821func (c *RegionInstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) {
61822	reqHeaders := make(http.Header)
61823	for k, v := range c.header_ {
61824		reqHeaders[k] = v
61825	}
61826	reqHeaders.Set("User-Agent", c.s.userAgent())
61827	if c.ifNoneMatch_ != "" {
61828		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
61829	}
61830	var body io.Reader = nil
61831	c.urlParams_.Set("alt", alt)
61832	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}")
61833	urls += "?" + c.urlParams_.Encode()
61834	req, _ := http.NewRequest("GET", urls, body)
61835	req.Header = reqHeaders
61836	googleapi.Expand(req.URL, map[string]string{
61837		"project":       c.project,
61838		"region":        c.region,
61839		"instanceGroup": c.instanceGroup,
61840	})
61841	return gensupport.SendRequest(c.ctx_, c.s.client, req)
61842}
61843
61844// Do executes the "compute.regionInstanceGroups.get" call.
61845// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx
61846// status code is an error. Response headers are in either
61847// *InstanceGroup.ServerResponse.Header or (if a response was returned
61848// at all) in error.(*googleapi.Error).Header. Use
61849// googleapi.IsNotModified to check whether the returned error was
61850// because http.StatusNotModified was returned.
61851func (c *RegionInstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) {
61852	gensupport.SetOptions(c.urlParams_, opts...)
61853	res, err := c.doRequest("json")
61854	if res != nil && res.StatusCode == http.StatusNotModified {
61855		if res.Body != nil {
61856			res.Body.Close()
61857		}
61858		return nil, &googleapi.Error{
61859			Code:   res.StatusCode,
61860			Header: res.Header,
61861		}
61862	}
61863	if err != nil {
61864		return nil, err
61865	}
61866	defer googleapi.CloseBody(res)
61867	if err := googleapi.CheckResponse(res); err != nil {
61868		return nil, err
61869	}
61870	ret := &InstanceGroup{
61871		ServerResponse: googleapi.ServerResponse{
61872			Header:         res.Header,
61873			HTTPStatusCode: res.StatusCode,
61874		},
61875	}
61876	target := &ret
61877	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
61878		return nil, err
61879	}
61880	return ret, nil
61881	// {
61882	//   "description": "Returns the specified instance group resource.",
61883	//   "httpMethod": "GET",
61884	//   "id": "compute.regionInstanceGroups.get",
61885	//   "parameterOrder": [
61886	//     "project",
61887	//     "region",
61888	//     "instanceGroup"
61889	//   ],
61890	//   "parameters": {
61891	//     "instanceGroup": {
61892	//       "description": "Name of the instance group resource to return.",
61893	//       "location": "path",
61894	//       "required": true,
61895	//       "type": "string"
61896	//     },
61897	//     "project": {
61898	//       "description": "Project ID for this request.",
61899	//       "location": "path",
61900	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
61901	//       "required": true,
61902	//       "type": "string"
61903	//     },
61904	//     "region": {
61905	//       "description": "Name of the region scoping this request.",
61906	//       "location": "path",
61907	//       "required": true,
61908	//       "type": "string"
61909	//     }
61910	//   },
61911	//   "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}",
61912	//   "response": {
61913	//     "$ref": "InstanceGroup"
61914	//   },
61915	//   "scopes": [
61916	//     "https://www.googleapis.com/auth/cloud-platform",
61917	//     "https://www.googleapis.com/auth/compute",
61918	//     "https://www.googleapis.com/auth/compute.readonly"
61919	//   ]
61920	// }
61921
61922}
61923
61924// method id "compute.regionInstanceGroups.list":
61925
61926type RegionInstanceGroupsListCall struct {
61927	s            *Service
61928	project      string
61929	region       string
61930	urlParams_   gensupport.URLParams
61931	ifNoneMatch_ string
61932	ctx_         context.Context
61933	header_      http.Header
61934}
61935
61936// List: Retrieves the list of instance group resources contained within
61937// the specified region.
61938func (r *RegionInstanceGroupsService) List(project string, region string) *RegionInstanceGroupsListCall {
61939	c := &RegionInstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
61940	c.project = project
61941	c.region = region
61942	return c
61943}
61944
61945// Filter sets the optional parameter "filter": Sets a filter
61946// {expression} for filtering listed resources. Your {expression} must
61947// be in the format: field_name comparison_string literal_string.
61948//
61949// The field_name is the name of the field you want to compare. Only
61950// atomic field types are supported (string, number, boolean). The
61951// comparison_string must be either eq (equals) or ne (not equals). The
61952// literal_string is the string value to filter to. The literal value
61953// must be valid for the type of field you are filtering by (string,
61954// number, boolean). For string fields, the literal value is interpreted
61955// as a regular expression using RE2 syntax. The literal value must
61956// match the entire field.
61957//
61958// For example, to filter for instances that do not have a name of
61959// example-instance, you would use name ne example-instance.
61960//
61961// You can filter on nested fields. For example, you could filter on
61962// instances that have set the scheduling.automaticRestart field to
61963// true. Use filtering on nested fields to take advantage of labels to
61964// organize and search for results based on label values.
61965//
61966// To filter on multiple expressions, provide each separate expression
61967// within parentheses. For example, (scheduling.automaticRestart eq
61968// true) (zone eq us-central1-f). Multiple expressions are treated as
61969// AND expressions, meaning that resources must match all expressions to
61970// pass the filters.
61971func (c *RegionInstanceGroupsListCall) Filter(filter string) *RegionInstanceGroupsListCall {
61972	c.urlParams_.Set("filter", filter)
61973	return c
61974}
61975
61976// MaxResults sets the optional parameter "maxResults": The maximum
61977// number of results per page that should be returned. If the number of
61978// available results is larger than maxResults, Compute Engine returns a
61979// nextPageToken that can be used to get the next page of results in
61980// subsequent list requests. Acceptable values are 0 to 500, inclusive.
61981// (Default: 500)
61982func (c *RegionInstanceGroupsListCall) MaxResults(maxResults int64) *RegionInstanceGroupsListCall {
61983	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
61984	return c
61985}
61986
61987// OrderBy sets the optional parameter "orderBy": Sorts list results by
61988// a certain order. By default, results are returned in alphanumerical
61989// order based on the resource name.
61990//
61991// You can also sort results in descending order based on the creation
61992// timestamp using orderBy="creationTimestamp desc". This sorts results
61993// based on the creationTimestamp field in reverse chronological order
61994// (newest result first). Use this to sort resources like operations so
61995// that the newest operation is returned first.
61996//
61997// Currently, only sorting by name or creationTimestamp desc is
61998// supported.
61999func (c *RegionInstanceGroupsListCall) OrderBy(orderBy string) *RegionInstanceGroupsListCall {
62000	c.urlParams_.Set("orderBy", orderBy)
62001	return c
62002}
62003
62004// PageToken sets the optional parameter "pageToken": Specifies a page
62005// token to use. Set pageToken to the nextPageToken returned by a
62006// previous list request to get the next page of results.
62007func (c *RegionInstanceGroupsListCall) PageToken(pageToken string) *RegionInstanceGroupsListCall {
62008	c.urlParams_.Set("pageToken", pageToken)
62009	return c
62010}
62011
62012// Fields allows partial responses to be retrieved. See
62013// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
62014// for more information.
62015func (c *RegionInstanceGroupsListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListCall {
62016	c.urlParams_.Set("fields", googleapi.CombineFields(s))
62017	return c
62018}
62019
62020// IfNoneMatch sets the optional parameter which makes the operation
62021// fail if the object's ETag matches the given value. This is useful for
62022// getting updates only after the object has changed since the last
62023// request. Use googleapi.IsNotModified to check whether the response
62024// error from Do is the result of In-None-Match.
62025func (c *RegionInstanceGroupsListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupsListCall {
62026	c.ifNoneMatch_ = entityTag
62027	return c
62028}
62029
62030// Context sets the context to be used in this call's Do method. Any
62031// pending HTTP request will be aborted if the provided context is
62032// canceled.
62033func (c *RegionInstanceGroupsListCall) Context(ctx context.Context) *RegionInstanceGroupsListCall {
62034	c.ctx_ = ctx
62035	return c
62036}
62037
62038// Header returns an http.Header that can be modified by the caller to
62039// add HTTP headers to the request.
62040func (c *RegionInstanceGroupsListCall) Header() http.Header {
62041	if c.header_ == nil {
62042		c.header_ = make(http.Header)
62043	}
62044	return c.header_
62045}
62046
62047func (c *RegionInstanceGroupsListCall) doRequest(alt string) (*http.Response, error) {
62048	reqHeaders := make(http.Header)
62049	for k, v := range c.header_ {
62050		reqHeaders[k] = v
62051	}
62052	reqHeaders.Set("User-Agent", c.s.userAgent())
62053	if c.ifNoneMatch_ != "" {
62054		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
62055	}
62056	var body io.Reader = nil
62057	c.urlParams_.Set("alt", alt)
62058	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups")
62059	urls += "?" + c.urlParams_.Encode()
62060	req, _ := http.NewRequest("GET", urls, body)
62061	req.Header = reqHeaders
62062	googleapi.Expand(req.URL, map[string]string{
62063		"project": c.project,
62064		"region":  c.region,
62065	})
62066	return gensupport.SendRequest(c.ctx_, c.s.client, req)
62067}
62068
62069// Do executes the "compute.regionInstanceGroups.list" call.
62070// Exactly one of *RegionInstanceGroupList or error will be non-nil. Any
62071// non-2xx status code is an error. Response headers are in either
62072// *RegionInstanceGroupList.ServerResponse.Header or (if a response was
62073// returned at all) in error.(*googleapi.Error).Header. Use
62074// googleapi.IsNotModified to check whether the returned error was
62075// because http.StatusNotModified was returned.
62076func (c *RegionInstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupList, error) {
62077	gensupport.SetOptions(c.urlParams_, opts...)
62078	res, err := c.doRequest("json")
62079	if res != nil && res.StatusCode == http.StatusNotModified {
62080		if res.Body != nil {
62081			res.Body.Close()
62082		}
62083		return nil, &googleapi.Error{
62084			Code:   res.StatusCode,
62085			Header: res.Header,
62086		}
62087	}
62088	if err != nil {
62089		return nil, err
62090	}
62091	defer googleapi.CloseBody(res)
62092	if err := googleapi.CheckResponse(res); err != nil {
62093		return nil, err
62094	}
62095	ret := &RegionInstanceGroupList{
62096		ServerResponse: googleapi.ServerResponse{
62097			Header:         res.Header,
62098			HTTPStatusCode: res.StatusCode,
62099		},
62100	}
62101	target := &ret
62102	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
62103		return nil, err
62104	}
62105	return ret, nil
62106	// {
62107	//   "description": "Retrieves the list of instance group resources contained within the specified region.",
62108	//   "httpMethod": "GET",
62109	//   "id": "compute.regionInstanceGroups.list",
62110	//   "parameterOrder": [
62111	//     "project",
62112	//     "region"
62113	//   ],
62114	//   "parameters": {
62115	//     "filter": {
62116	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
62117	//       "location": "query",
62118	//       "type": "string"
62119	//     },
62120	//     "maxResults": {
62121	//       "default": "500",
62122	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
62123	//       "format": "uint32",
62124	//       "location": "query",
62125	//       "minimum": "0",
62126	//       "type": "integer"
62127	//     },
62128	//     "orderBy": {
62129	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
62130	//       "location": "query",
62131	//       "type": "string"
62132	//     },
62133	//     "pageToken": {
62134	//       "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.",
62135	//       "location": "query",
62136	//       "type": "string"
62137	//     },
62138	//     "project": {
62139	//       "description": "Project ID for this request.",
62140	//       "location": "path",
62141	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
62142	//       "required": true,
62143	//       "type": "string"
62144	//     },
62145	//     "region": {
62146	//       "description": "Name of the region scoping this request.",
62147	//       "location": "path",
62148	//       "required": true,
62149	//       "type": "string"
62150	//     }
62151	//   },
62152	//   "path": "{project}/regions/{region}/instanceGroups",
62153	//   "response": {
62154	//     "$ref": "RegionInstanceGroupList"
62155	//   },
62156	//   "scopes": [
62157	//     "https://www.googleapis.com/auth/cloud-platform",
62158	//     "https://www.googleapis.com/auth/compute",
62159	//     "https://www.googleapis.com/auth/compute.readonly"
62160	//   ]
62161	// }
62162
62163}
62164
62165// Pages invokes f for each page of results.
62166// A non-nil error returned from f will halt the iteration.
62167// The provided context supersedes any context provided to the Context method.
62168func (c *RegionInstanceGroupsListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupList) error) error {
62169	c.ctx_ = ctx
62170	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
62171	for {
62172		x, err := c.Do()
62173		if err != nil {
62174			return err
62175		}
62176		if err := f(x); err != nil {
62177			return err
62178		}
62179		if x.NextPageToken == "" {
62180			return nil
62181		}
62182		c.PageToken(x.NextPageToken)
62183	}
62184}
62185
62186// method id "compute.regionInstanceGroups.listInstances":
62187
62188type RegionInstanceGroupsListInstancesCall struct {
62189	s                                        *Service
62190	project                                  string
62191	region                                   string
62192	instanceGroup                            string
62193	regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest
62194	urlParams_                               gensupport.URLParams
62195	ctx_                                     context.Context
62196	header_                                  http.Header
62197}
62198
62199// ListInstances: Lists the instances in the specified instance group
62200// and displays information about the named ports. Depending on the
62201// specified options, this method can list all instances or only the
62202// instances that are running.
62203func (r *RegionInstanceGroupsService) ListInstances(project string, region string, instanceGroup string, regioninstancegroupslistinstancesrequest *RegionInstanceGroupsListInstancesRequest) *RegionInstanceGroupsListInstancesCall {
62204	c := &RegionInstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
62205	c.project = project
62206	c.region = region
62207	c.instanceGroup = instanceGroup
62208	c.regioninstancegroupslistinstancesrequest = regioninstancegroupslistinstancesrequest
62209	return c
62210}
62211
62212// Filter sets the optional parameter "filter": Sets a filter
62213// {expression} for filtering listed resources. Your {expression} must
62214// be in the format: field_name comparison_string literal_string.
62215//
62216// The field_name is the name of the field you want to compare. Only
62217// atomic field types are supported (string, number, boolean). The
62218// comparison_string must be either eq (equals) or ne (not equals). The
62219// literal_string is the string value to filter to. The literal value
62220// must be valid for the type of field you are filtering by (string,
62221// number, boolean). For string fields, the literal value is interpreted
62222// as a regular expression using RE2 syntax. The literal value must
62223// match the entire field.
62224//
62225// For example, to filter for instances that do not have a name of
62226// example-instance, you would use name ne example-instance.
62227//
62228// You can filter on nested fields. For example, you could filter on
62229// instances that have set the scheduling.automaticRestart field to
62230// true. Use filtering on nested fields to take advantage of labels to
62231// organize and search for results based on label values.
62232//
62233// To filter on multiple expressions, provide each separate expression
62234// within parentheses. For example, (scheduling.automaticRestart eq
62235// true) (zone eq us-central1-f). Multiple expressions are treated as
62236// AND expressions, meaning that resources must match all expressions to
62237// pass the filters.
62238func (c *RegionInstanceGroupsListInstancesCall) Filter(filter string) *RegionInstanceGroupsListInstancesCall {
62239	c.urlParams_.Set("filter", filter)
62240	return c
62241}
62242
62243// MaxResults sets the optional parameter "maxResults": The maximum
62244// number of results per page that should be returned. If the number of
62245// available results is larger than maxResults, Compute Engine returns a
62246// nextPageToken that can be used to get the next page of results in
62247// subsequent list requests. Acceptable values are 0 to 500, inclusive.
62248// (Default: 500)
62249func (c *RegionInstanceGroupsListInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupsListInstancesCall {
62250	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
62251	return c
62252}
62253
62254// OrderBy sets the optional parameter "orderBy": Sorts list results by
62255// a certain order. By default, results are returned in alphanumerical
62256// order based on the resource name.
62257//
62258// You can also sort results in descending order based on the creation
62259// timestamp using orderBy="creationTimestamp desc". This sorts results
62260// based on the creationTimestamp field in reverse chronological order
62261// (newest result first). Use this to sort resources like operations so
62262// that the newest operation is returned first.
62263//
62264// Currently, only sorting by name or creationTimestamp desc is
62265// supported.
62266func (c *RegionInstanceGroupsListInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupsListInstancesCall {
62267	c.urlParams_.Set("orderBy", orderBy)
62268	return c
62269}
62270
62271// PageToken sets the optional parameter "pageToken": Specifies a page
62272// token to use. Set pageToken to the nextPageToken returned by a
62273// previous list request to get the next page of results.
62274func (c *RegionInstanceGroupsListInstancesCall) PageToken(pageToken string) *RegionInstanceGroupsListInstancesCall {
62275	c.urlParams_.Set("pageToken", pageToken)
62276	return c
62277}
62278
62279// Fields allows partial responses to be retrieved. See
62280// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
62281// for more information.
62282func (c *RegionInstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsListInstancesCall {
62283	c.urlParams_.Set("fields", googleapi.CombineFields(s))
62284	return c
62285}
62286
62287// Context sets the context to be used in this call's Do method. Any
62288// pending HTTP request will be aborted if the provided context is
62289// canceled.
62290func (c *RegionInstanceGroupsListInstancesCall) Context(ctx context.Context) *RegionInstanceGroupsListInstancesCall {
62291	c.ctx_ = ctx
62292	return c
62293}
62294
62295// Header returns an http.Header that can be modified by the caller to
62296// add HTTP headers to the request.
62297func (c *RegionInstanceGroupsListInstancesCall) Header() http.Header {
62298	if c.header_ == nil {
62299		c.header_ = make(http.Header)
62300	}
62301	return c.header_
62302}
62303
62304func (c *RegionInstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) {
62305	reqHeaders := make(http.Header)
62306	for k, v := range c.header_ {
62307		reqHeaders[k] = v
62308	}
62309	reqHeaders.Set("User-Agent", c.s.userAgent())
62310	var body io.Reader = nil
62311	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupslistinstancesrequest)
62312	if err != nil {
62313		return nil, err
62314	}
62315	reqHeaders.Set("Content-Type", "application/json")
62316	c.urlParams_.Set("alt", alt)
62317	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances")
62318	urls += "?" + c.urlParams_.Encode()
62319	req, _ := http.NewRequest("POST", urls, body)
62320	req.Header = reqHeaders
62321	googleapi.Expand(req.URL, map[string]string{
62322		"project":       c.project,
62323		"region":        c.region,
62324		"instanceGroup": c.instanceGroup,
62325	})
62326	return gensupport.SendRequest(c.ctx_, c.s.client, req)
62327}
62328
62329// Do executes the "compute.regionInstanceGroups.listInstances" call.
62330// Exactly one of *RegionInstanceGroupsListInstances or error will be
62331// non-nil. Any non-2xx status code is an error. Response headers are in
62332// either *RegionInstanceGroupsListInstances.ServerResponse.Header or
62333// (if a response was returned at all) in
62334// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
62335// whether the returned error was because http.StatusNotModified was
62336// returned.
62337func (c *RegionInstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupsListInstances, error) {
62338	gensupport.SetOptions(c.urlParams_, opts...)
62339	res, err := c.doRequest("json")
62340	if res != nil && res.StatusCode == http.StatusNotModified {
62341		if res.Body != nil {
62342			res.Body.Close()
62343		}
62344		return nil, &googleapi.Error{
62345			Code:   res.StatusCode,
62346			Header: res.Header,
62347		}
62348	}
62349	if err != nil {
62350		return nil, err
62351	}
62352	defer googleapi.CloseBody(res)
62353	if err := googleapi.CheckResponse(res); err != nil {
62354		return nil, err
62355	}
62356	ret := &RegionInstanceGroupsListInstances{
62357		ServerResponse: googleapi.ServerResponse{
62358			Header:         res.Header,
62359			HTTPStatusCode: res.StatusCode,
62360		},
62361	}
62362	target := &ret
62363	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
62364		return nil, err
62365	}
62366	return ret, nil
62367	// {
62368	//   "description": "Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running.",
62369	//   "httpMethod": "POST",
62370	//   "id": "compute.regionInstanceGroups.listInstances",
62371	//   "parameterOrder": [
62372	//     "project",
62373	//     "region",
62374	//     "instanceGroup"
62375	//   ],
62376	//   "parameters": {
62377	//     "filter": {
62378	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
62379	//       "location": "query",
62380	//       "type": "string"
62381	//     },
62382	//     "instanceGroup": {
62383	//       "description": "Name of the regional instance group for which we want to list the instances.",
62384	//       "location": "path",
62385	//       "required": true,
62386	//       "type": "string"
62387	//     },
62388	//     "maxResults": {
62389	//       "default": "500",
62390	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
62391	//       "format": "uint32",
62392	//       "location": "query",
62393	//       "minimum": "0",
62394	//       "type": "integer"
62395	//     },
62396	//     "orderBy": {
62397	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
62398	//       "location": "query",
62399	//       "type": "string"
62400	//     },
62401	//     "pageToken": {
62402	//       "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.",
62403	//       "location": "query",
62404	//       "type": "string"
62405	//     },
62406	//     "project": {
62407	//       "description": "Project ID for this request.",
62408	//       "location": "path",
62409	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
62410	//       "required": true,
62411	//       "type": "string"
62412	//     },
62413	//     "region": {
62414	//       "description": "Name of the region scoping this request.",
62415	//       "location": "path",
62416	//       "required": true,
62417	//       "type": "string"
62418	//     }
62419	//   },
62420	//   "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances",
62421	//   "request": {
62422	//     "$ref": "RegionInstanceGroupsListInstancesRequest"
62423	//   },
62424	//   "response": {
62425	//     "$ref": "RegionInstanceGroupsListInstances"
62426	//   },
62427	//   "scopes": [
62428	//     "https://www.googleapis.com/auth/cloud-platform",
62429	//     "https://www.googleapis.com/auth/compute",
62430	//     "https://www.googleapis.com/auth/compute.readonly"
62431	//   ]
62432	// }
62433
62434}
62435
62436// Pages invokes f for each page of results.
62437// A non-nil error returned from f will halt the iteration.
62438// The provided context supersedes any context provided to the Context method.
62439func (c *RegionInstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupsListInstances) error) error {
62440	c.ctx_ = ctx
62441	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
62442	for {
62443		x, err := c.Do()
62444		if err != nil {
62445			return err
62446		}
62447		if err := f(x); err != nil {
62448			return err
62449		}
62450		if x.NextPageToken == "" {
62451			return nil
62452		}
62453		c.PageToken(x.NextPageToken)
62454	}
62455}
62456
62457// method id "compute.regionInstanceGroups.setNamedPorts":
62458
62459type RegionInstanceGroupsSetNamedPortsCall struct {
62460	s                                        *Service
62461	project                                  string
62462	region                                   string
62463	instanceGroup                            string
62464	regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest
62465	urlParams_                               gensupport.URLParams
62466	ctx_                                     context.Context
62467	header_                                  http.Header
62468}
62469
62470// SetNamedPorts: Sets the named ports for the specified regional
62471// instance group.
62472func (r *RegionInstanceGroupsService) SetNamedPorts(project string, region string, instanceGroup string, regioninstancegroupssetnamedportsrequest *RegionInstanceGroupsSetNamedPortsRequest) *RegionInstanceGroupsSetNamedPortsCall {
62473	c := &RegionInstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
62474	c.project = project
62475	c.region = region
62476	c.instanceGroup = instanceGroup
62477	c.regioninstancegroupssetnamedportsrequest = regioninstancegroupssetnamedportsrequest
62478	return c
62479}
62480
62481// RequestId sets the optional parameter "requestId": An optional
62482// request ID to identify requests. Specify a unique request ID so that
62483// if you must retry your request, the server will know to ignore the
62484// request if it has already been completed.
62485//
62486// For example, consider a situation where you make an initial request
62487// and the request times out. If you make the request again with the
62488// same request ID, the server can check if original operation with the
62489// same request ID was received, and if so, will ignore the second
62490// request. This prevents clients from accidentally creating duplicate
62491// commitments.
62492//
62493// The request ID must be a valid UUID with the exception that zero UUID
62494// is not supported (00000000-0000-0000-0000-000000000000).
62495func (c *RegionInstanceGroupsSetNamedPortsCall) RequestId(requestId string) *RegionInstanceGroupsSetNamedPortsCall {
62496	c.urlParams_.Set("requestId", requestId)
62497	return c
62498}
62499
62500// Fields allows partial responses to be retrieved. See
62501// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
62502// for more information.
62503func (c *RegionInstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsSetNamedPortsCall {
62504	c.urlParams_.Set("fields", googleapi.CombineFields(s))
62505	return c
62506}
62507
62508// Context sets the context to be used in this call's Do method. Any
62509// pending HTTP request will be aborted if the provided context is
62510// canceled.
62511func (c *RegionInstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *RegionInstanceGroupsSetNamedPortsCall {
62512	c.ctx_ = ctx
62513	return c
62514}
62515
62516// Header returns an http.Header that can be modified by the caller to
62517// add HTTP headers to the request.
62518func (c *RegionInstanceGroupsSetNamedPortsCall) Header() http.Header {
62519	if c.header_ == nil {
62520		c.header_ = make(http.Header)
62521	}
62522	return c.header_
62523}
62524
62525func (c *RegionInstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) {
62526	reqHeaders := make(http.Header)
62527	for k, v := range c.header_ {
62528		reqHeaders[k] = v
62529	}
62530	reqHeaders.Set("User-Agent", c.s.userAgent())
62531	var body io.Reader = nil
62532	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupssetnamedportsrequest)
62533	if err != nil {
62534		return nil, err
62535	}
62536	reqHeaders.Set("Content-Type", "application/json")
62537	c.urlParams_.Set("alt", alt)
62538	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts")
62539	urls += "?" + c.urlParams_.Encode()
62540	req, _ := http.NewRequest("POST", urls, body)
62541	req.Header = reqHeaders
62542	googleapi.Expand(req.URL, map[string]string{
62543		"project":       c.project,
62544		"region":        c.region,
62545		"instanceGroup": c.instanceGroup,
62546	})
62547	return gensupport.SendRequest(c.ctx_, c.s.client, req)
62548}
62549
62550// Do executes the "compute.regionInstanceGroups.setNamedPorts" call.
62551// Exactly one of *Operation or error will be non-nil. Any non-2xx
62552// status code is an error. Response headers are in either
62553// *Operation.ServerResponse.Header or (if a response was returned at
62554// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
62555// to check whether the returned error was because
62556// http.StatusNotModified was returned.
62557func (c *RegionInstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
62558	gensupport.SetOptions(c.urlParams_, opts...)
62559	res, err := c.doRequest("json")
62560	if res != nil && res.StatusCode == http.StatusNotModified {
62561		if res.Body != nil {
62562			res.Body.Close()
62563		}
62564		return nil, &googleapi.Error{
62565			Code:   res.StatusCode,
62566			Header: res.Header,
62567		}
62568	}
62569	if err != nil {
62570		return nil, err
62571	}
62572	defer googleapi.CloseBody(res)
62573	if err := googleapi.CheckResponse(res); err != nil {
62574		return nil, err
62575	}
62576	ret := &Operation{
62577		ServerResponse: googleapi.ServerResponse{
62578			Header:         res.Header,
62579			HTTPStatusCode: res.StatusCode,
62580		},
62581	}
62582	target := &ret
62583	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
62584		return nil, err
62585	}
62586	return ret, nil
62587	// {
62588	//   "description": "Sets the named ports for the specified regional instance group.",
62589	//   "httpMethod": "POST",
62590	//   "id": "compute.regionInstanceGroups.setNamedPorts",
62591	//   "parameterOrder": [
62592	//     "project",
62593	//     "region",
62594	//     "instanceGroup"
62595	//   ],
62596	//   "parameters": {
62597	//     "instanceGroup": {
62598	//       "description": "The name of the regional instance group where the named ports are updated.",
62599	//       "location": "path",
62600	//       "required": true,
62601	//       "type": "string"
62602	//     },
62603	//     "project": {
62604	//       "description": "Project ID for this request.",
62605	//       "location": "path",
62606	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
62607	//       "required": true,
62608	//       "type": "string"
62609	//     },
62610	//     "region": {
62611	//       "description": "Name of the region scoping this request.",
62612	//       "location": "path",
62613	//       "required": true,
62614	//       "type": "string"
62615	//     },
62616	//     "requestId": {
62617	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
62618	//       "location": "query",
62619	//       "type": "string"
62620	//     }
62621	//   },
62622	//   "path": "{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts",
62623	//   "request": {
62624	//     "$ref": "RegionInstanceGroupsSetNamedPortsRequest"
62625	//   },
62626	//   "response": {
62627	//     "$ref": "Operation"
62628	//   },
62629	//   "scopes": [
62630	//     "https://www.googleapis.com/auth/cloud-platform",
62631	//     "https://www.googleapis.com/auth/compute"
62632	//   ]
62633	// }
62634
62635}
62636
62637// method id "compute.regionInstanceGroups.testIamPermissions":
62638
62639type RegionInstanceGroupsTestIamPermissionsCall struct {
62640	s                      *Service
62641	project                string
62642	region                 string
62643	resource               string
62644	testpermissionsrequest *TestPermissionsRequest
62645	urlParams_             gensupport.URLParams
62646	ctx_                   context.Context
62647	header_                http.Header
62648}
62649
62650// TestIamPermissions: Returns permissions that a caller has on the
62651// specified resource.
62652func (r *RegionInstanceGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstanceGroupsTestIamPermissionsCall {
62653	c := &RegionInstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
62654	c.project = project
62655	c.region = region
62656	c.resource = resource
62657	c.testpermissionsrequest = testpermissionsrequest
62658	return c
62659}
62660
62661// Fields allows partial responses to be retrieved. See
62662// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
62663// for more information.
62664func (c *RegionInstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupsTestIamPermissionsCall {
62665	c.urlParams_.Set("fields", googleapi.CombineFields(s))
62666	return c
62667}
62668
62669// Context sets the context to be used in this call's Do method. Any
62670// pending HTTP request will be aborted if the provided context is
62671// canceled.
62672func (c *RegionInstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstanceGroupsTestIamPermissionsCall {
62673	c.ctx_ = ctx
62674	return c
62675}
62676
62677// Header returns an http.Header that can be modified by the caller to
62678// add HTTP headers to the request.
62679func (c *RegionInstanceGroupsTestIamPermissionsCall) Header() http.Header {
62680	if c.header_ == nil {
62681		c.header_ = make(http.Header)
62682	}
62683	return c.header_
62684}
62685
62686func (c *RegionInstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
62687	reqHeaders := make(http.Header)
62688	for k, v := range c.header_ {
62689		reqHeaders[k] = v
62690	}
62691	reqHeaders.Set("User-Agent", c.s.userAgent())
62692	var body io.Reader = nil
62693	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
62694	if err != nil {
62695		return nil, err
62696	}
62697	reqHeaders.Set("Content-Type", "application/json")
62698	c.urlParams_.Set("alt", alt)
62699	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions")
62700	urls += "?" + c.urlParams_.Encode()
62701	req, _ := http.NewRequest("POST", urls, body)
62702	req.Header = reqHeaders
62703	googleapi.Expand(req.URL, map[string]string{
62704		"project":  c.project,
62705		"region":   c.region,
62706		"resource": c.resource,
62707	})
62708	return gensupport.SendRequest(c.ctx_, c.s.client, req)
62709}
62710
62711// Do executes the "compute.regionInstanceGroups.testIamPermissions" call.
62712// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
62713// non-2xx status code is an error. Response headers are in either
62714// *TestPermissionsResponse.ServerResponse.Header or (if a response was
62715// returned at all) in error.(*googleapi.Error).Header. Use
62716// googleapi.IsNotModified to check whether the returned error was
62717// because http.StatusNotModified was returned.
62718func (c *RegionInstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
62719	gensupport.SetOptions(c.urlParams_, opts...)
62720	res, err := c.doRequest("json")
62721	if res != nil && res.StatusCode == http.StatusNotModified {
62722		if res.Body != nil {
62723			res.Body.Close()
62724		}
62725		return nil, &googleapi.Error{
62726			Code:   res.StatusCode,
62727			Header: res.Header,
62728		}
62729	}
62730	if err != nil {
62731		return nil, err
62732	}
62733	defer googleapi.CloseBody(res)
62734	if err := googleapi.CheckResponse(res); err != nil {
62735		return nil, err
62736	}
62737	ret := &TestPermissionsResponse{
62738		ServerResponse: googleapi.ServerResponse{
62739			Header:         res.Header,
62740			HTTPStatusCode: res.StatusCode,
62741		},
62742	}
62743	target := &ret
62744	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
62745		return nil, err
62746	}
62747	return ret, nil
62748	// {
62749	//   "description": "Returns permissions that a caller has on the specified resource.",
62750	//   "httpMethod": "POST",
62751	//   "id": "compute.regionInstanceGroups.testIamPermissions",
62752	//   "parameterOrder": [
62753	//     "project",
62754	//     "region",
62755	//     "resource"
62756	//   ],
62757	//   "parameters": {
62758	//     "project": {
62759	//       "description": "Project ID for this request.",
62760	//       "location": "path",
62761	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
62762	//       "required": true,
62763	//       "type": "string"
62764	//     },
62765	//     "region": {
62766	//       "description": "The name of the region for this request.",
62767	//       "location": "path",
62768	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
62769	//       "required": true,
62770	//       "type": "string"
62771	//     },
62772	//     "resource": {
62773	//       "description": "Name of the resource for this request.",
62774	//       "location": "path",
62775	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
62776	//       "required": true,
62777	//       "type": "string"
62778	//     }
62779	//   },
62780	//   "path": "{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions",
62781	//   "request": {
62782	//     "$ref": "TestPermissionsRequest"
62783	//   },
62784	//   "response": {
62785	//     "$ref": "TestPermissionsResponse"
62786	//   },
62787	//   "scopes": [
62788	//     "https://www.googleapis.com/auth/cloud-platform",
62789	//     "https://www.googleapis.com/auth/compute",
62790	//     "https://www.googleapis.com/auth/compute.readonly"
62791	//   ]
62792	// }
62793
62794}
62795
62796// method id "compute.regionOperations.delete":
62797
62798type RegionOperationsDeleteCall struct {
62799	s          *Service
62800	project    string
62801	region     string
62802	operation  string
62803	urlParams_ gensupport.URLParams
62804	ctx_       context.Context
62805	header_    http.Header
62806}
62807
62808// Delete: Deletes the specified region-specific Operations resource.
62809// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/delete
62810func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall {
62811	c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
62812	c.project = project
62813	c.region = region
62814	c.operation = operation
62815	return c
62816}
62817
62818// Fields allows partial responses to be retrieved. See
62819// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
62820// for more information.
62821func (c *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall {
62822	c.urlParams_.Set("fields", googleapi.CombineFields(s))
62823	return c
62824}
62825
62826// Context sets the context to be used in this call's Do method. Any
62827// pending HTTP request will be aborted if the provided context is
62828// canceled.
62829func (c *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall {
62830	c.ctx_ = ctx
62831	return c
62832}
62833
62834// Header returns an http.Header that can be modified by the caller to
62835// add HTTP headers to the request.
62836func (c *RegionOperationsDeleteCall) Header() http.Header {
62837	if c.header_ == nil {
62838		c.header_ = make(http.Header)
62839	}
62840	return c.header_
62841}
62842
62843func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
62844	reqHeaders := make(http.Header)
62845	for k, v := range c.header_ {
62846		reqHeaders[k] = v
62847	}
62848	reqHeaders.Set("User-Agent", c.s.userAgent())
62849	var body io.Reader = nil
62850	c.urlParams_.Set("alt", alt)
62851	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}")
62852	urls += "?" + c.urlParams_.Encode()
62853	req, _ := http.NewRequest("DELETE", urls, body)
62854	req.Header = reqHeaders
62855	googleapi.Expand(req.URL, map[string]string{
62856		"project":   c.project,
62857		"region":    c.region,
62858		"operation": c.operation,
62859	})
62860	return gensupport.SendRequest(c.ctx_, c.s.client, req)
62861}
62862
62863// Do executes the "compute.regionOperations.delete" call.
62864func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
62865	gensupport.SetOptions(c.urlParams_, opts...)
62866	res, err := c.doRequest("json")
62867	if err != nil {
62868		return err
62869	}
62870	defer googleapi.CloseBody(res)
62871	if err := googleapi.CheckResponse(res); err != nil {
62872		return err
62873	}
62874	return nil
62875	// {
62876	//   "description": "Deletes the specified region-specific Operations resource.",
62877	//   "httpMethod": "DELETE",
62878	//   "id": "compute.regionOperations.delete",
62879	//   "parameterOrder": [
62880	//     "project",
62881	//     "region",
62882	//     "operation"
62883	//   ],
62884	//   "parameters": {
62885	//     "operation": {
62886	//       "description": "Name of the Operations resource to delete.",
62887	//       "location": "path",
62888	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
62889	//       "required": true,
62890	//       "type": "string"
62891	//     },
62892	//     "project": {
62893	//       "description": "Project ID for this request.",
62894	//       "location": "path",
62895	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
62896	//       "required": true,
62897	//       "type": "string"
62898	//     },
62899	//     "region": {
62900	//       "description": "Name of the region for this request.",
62901	//       "location": "path",
62902	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
62903	//       "required": true,
62904	//       "type": "string"
62905	//     }
62906	//   },
62907	//   "path": "{project}/regions/{region}/operations/{operation}",
62908	//   "scopes": [
62909	//     "https://www.googleapis.com/auth/cloud-platform",
62910	//     "https://www.googleapis.com/auth/compute"
62911	//   ]
62912	// }
62913
62914}
62915
62916// method id "compute.regionOperations.get":
62917
62918type RegionOperationsGetCall struct {
62919	s            *Service
62920	project      string
62921	region       string
62922	operation    string
62923	urlParams_   gensupport.URLParams
62924	ifNoneMatch_ string
62925	ctx_         context.Context
62926	header_      http.Header
62927}
62928
62929// Get: Retrieves the specified region-specific Operations resource.
62930// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/get
62931func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall {
62932	c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
62933	c.project = project
62934	c.region = region
62935	c.operation = operation
62936	return c
62937}
62938
62939// Fields allows partial responses to be retrieved. See
62940// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
62941// for more information.
62942func (c *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall {
62943	c.urlParams_.Set("fields", googleapi.CombineFields(s))
62944	return c
62945}
62946
62947// IfNoneMatch sets the optional parameter which makes the operation
62948// fail if the object's ETag matches the given value. This is useful for
62949// getting updates only after the object has changed since the last
62950// request. Use googleapi.IsNotModified to check whether the response
62951// error from Do is the result of In-None-Match.
62952func (c *RegionOperationsGetCall) IfNoneMatch(entityTag string) *RegionOperationsGetCall {
62953	c.ifNoneMatch_ = entityTag
62954	return c
62955}
62956
62957// Context sets the context to be used in this call's Do method. Any
62958// pending HTTP request will be aborted if the provided context is
62959// canceled.
62960func (c *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall {
62961	c.ctx_ = ctx
62962	return c
62963}
62964
62965// Header returns an http.Header that can be modified by the caller to
62966// add HTTP headers to the request.
62967func (c *RegionOperationsGetCall) Header() http.Header {
62968	if c.header_ == nil {
62969		c.header_ = make(http.Header)
62970	}
62971	return c.header_
62972}
62973
62974func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) {
62975	reqHeaders := make(http.Header)
62976	for k, v := range c.header_ {
62977		reqHeaders[k] = v
62978	}
62979	reqHeaders.Set("User-Agent", c.s.userAgent())
62980	if c.ifNoneMatch_ != "" {
62981		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
62982	}
62983	var body io.Reader = nil
62984	c.urlParams_.Set("alt", alt)
62985	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}")
62986	urls += "?" + c.urlParams_.Encode()
62987	req, _ := http.NewRequest("GET", urls, body)
62988	req.Header = reqHeaders
62989	googleapi.Expand(req.URL, map[string]string{
62990		"project":   c.project,
62991		"region":    c.region,
62992		"operation": c.operation,
62993	})
62994	return gensupport.SendRequest(c.ctx_, c.s.client, req)
62995}
62996
62997// Do executes the "compute.regionOperations.get" call.
62998// Exactly one of *Operation or error will be non-nil. Any non-2xx
62999// status code is an error. Response headers are in either
63000// *Operation.ServerResponse.Header or (if a response was returned at
63001// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
63002// to check whether the returned error was because
63003// http.StatusNotModified was returned.
63004func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
63005	gensupport.SetOptions(c.urlParams_, opts...)
63006	res, err := c.doRequest("json")
63007	if res != nil && res.StatusCode == http.StatusNotModified {
63008		if res.Body != nil {
63009			res.Body.Close()
63010		}
63011		return nil, &googleapi.Error{
63012			Code:   res.StatusCode,
63013			Header: res.Header,
63014		}
63015	}
63016	if err != nil {
63017		return nil, err
63018	}
63019	defer googleapi.CloseBody(res)
63020	if err := googleapi.CheckResponse(res); err != nil {
63021		return nil, err
63022	}
63023	ret := &Operation{
63024		ServerResponse: googleapi.ServerResponse{
63025			Header:         res.Header,
63026			HTTPStatusCode: res.StatusCode,
63027		},
63028	}
63029	target := &ret
63030	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
63031		return nil, err
63032	}
63033	return ret, nil
63034	// {
63035	//   "description": "Retrieves the specified region-specific Operations resource.",
63036	//   "httpMethod": "GET",
63037	//   "id": "compute.regionOperations.get",
63038	//   "parameterOrder": [
63039	//     "project",
63040	//     "region",
63041	//     "operation"
63042	//   ],
63043	//   "parameters": {
63044	//     "operation": {
63045	//       "description": "Name of the Operations resource to return.",
63046	//       "location": "path",
63047	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
63048	//       "required": true,
63049	//       "type": "string"
63050	//     },
63051	//     "project": {
63052	//       "description": "Project ID for this request.",
63053	//       "location": "path",
63054	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
63055	//       "required": true,
63056	//       "type": "string"
63057	//     },
63058	//     "region": {
63059	//       "description": "Name of the region for this request.",
63060	//       "location": "path",
63061	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
63062	//       "required": true,
63063	//       "type": "string"
63064	//     }
63065	//   },
63066	//   "path": "{project}/regions/{region}/operations/{operation}",
63067	//   "response": {
63068	//     "$ref": "Operation"
63069	//   },
63070	//   "scopes": [
63071	//     "https://www.googleapis.com/auth/cloud-platform",
63072	//     "https://www.googleapis.com/auth/compute",
63073	//     "https://www.googleapis.com/auth/compute.readonly"
63074	//   ]
63075	// }
63076
63077}
63078
63079// method id "compute.regionOperations.list":
63080
63081type RegionOperationsListCall struct {
63082	s            *Service
63083	project      string
63084	region       string
63085	urlParams_   gensupport.URLParams
63086	ifNoneMatch_ string
63087	ctx_         context.Context
63088	header_      http.Header
63089}
63090
63091// List: Retrieves a list of Operation resources contained within the
63092// specified region.
63093// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list
63094func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall {
63095	c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
63096	c.project = project
63097	c.region = region
63098	return c
63099}
63100
63101// Filter sets the optional parameter "filter": Sets a filter
63102// {expression} for filtering listed resources. Your {expression} must
63103// be in the format: field_name comparison_string literal_string.
63104//
63105// The field_name is the name of the field you want to compare. Only
63106// atomic field types are supported (string, number, boolean). The
63107// comparison_string must be either eq (equals) or ne (not equals). The
63108// literal_string is the string value to filter to. The literal value
63109// must be valid for the type of field you are filtering by (string,
63110// number, boolean). For string fields, the literal value is interpreted
63111// as a regular expression using RE2 syntax. The literal value must
63112// match the entire field.
63113//
63114// For example, to filter for instances that do not have a name of
63115// example-instance, you would use name ne example-instance.
63116//
63117// You can filter on nested fields. For example, you could filter on
63118// instances that have set the scheduling.automaticRestart field to
63119// true. Use filtering on nested fields to take advantage of labels to
63120// organize and search for results based on label values.
63121//
63122// To filter on multiple expressions, provide each separate expression
63123// within parentheses. For example, (scheduling.automaticRestart eq
63124// true) (zone eq us-central1-f). Multiple expressions are treated as
63125// AND expressions, meaning that resources must match all expressions to
63126// pass the filters.
63127func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall {
63128	c.urlParams_.Set("filter", filter)
63129	return c
63130}
63131
63132// MaxResults sets the optional parameter "maxResults": The maximum
63133// number of results per page that should be returned. If the number of
63134// available results is larger than maxResults, Compute Engine returns a
63135// nextPageToken that can be used to get the next page of results in
63136// subsequent list requests. Acceptable values are 0 to 500, inclusive.
63137// (Default: 500)
63138func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall {
63139	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
63140	return c
63141}
63142
63143// OrderBy sets the optional parameter "orderBy": Sorts list results by
63144// a certain order. By default, results are returned in alphanumerical
63145// order based on the resource name.
63146//
63147// You can also sort results in descending order based on the creation
63148// timestamp using orderBy="creationTimestamp desc". This sorts results
63149// based on the creationTimestamp field in reverse chronological order
63150// (newest result first). Use this to sort resources like operations so
63151// that the newest operation is returned first.
63152//
63153// Currently, only sorting by name or creationTimestamp desc is
63154// supported.
63155func (c *RegionOperationsListCall) OrderBy(orderBy string) *RegionOperationsListCall {
63156	c.urlParams_.Set("orderBy", orderBy)
63157	return c
63158}
63159
63160// PageToken sets the optional parameter "pageToken": Specifies a page
63161// token to use. Set pageToken to the nextPageToken returned by a
63162// previous list request to get the next page of results.
63163func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperationsListCall {
63164	c.urlParams_.Set("pageToken", pageToken)
63165	return c
63166}
63167
63168// Fields allows partial responses to be retrieved. See
63169// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
63170// for more information.
63171func (c *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall {
63172	c.urlParams_.Set("fields", googleapi.CombineFields(s))
63173	return c
63174}
63175
63176// IfNoneMatch sets the optional parameter which makes the operation
63177// fail if the object's ETag matches the given value. This is useful for
63178// getting updates only after the object has changed since the last
63179// request. Use googleapi.IsNotModified to check whether the response
63180// error from Do is the result of In-None-Match.
63181func (c *RegionOperationsListCall) IfNoneMatch(entityTag string) *RegionOperationsListCall {
63182	c.ifNoneMatch_ = entityTag
63183	return c
63184}
63185
63186// Context sets the context to be used in this call's Do method. Any
63187// pending HTTP request will be aborted if the provided context is
63188// canceled.
63189func (c *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall {
63190	c.ctx_ = ctx
63191	return c
63192}
63193
63194// Header returns an http.Header that can be modified by the caller to
63195// add HTTP headers to the request.
63196func (c *RegionOperationsListCall) Header() http.Header {
63197	if c.header_ == nil {
63198		c.header_ = make(http.Header)
63199	}
63200	return c.header_
63201}
63202
63203func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) {
63204	reqHeaders := make(http.Header)
63205	for k, v := range c.header_ {
63206		reqHeaders[k] = v
63207	}
63208	reqHeaders.Set("User-Agent", c.s.userAgent())
63209	if c.ifNoneMatch_ != "" {
63210		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
63211	}
63212	var body io.Reader = nil
63213	c.urlParams_.Set("alt", alt)
63214	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations")
63215	urls += "?" + c.urlParams_.Encode()
63216	req, _ := http.NewRequest("GET", urls, body)
63217	req.Header = reqHeaders
63218	googleapi.Expand(req.URL, map[string]string{
63219		"project": c.project,
63220		"region":  c.region,
63221	})
63222	return gensupport.SendRequest(c.ctx_, c.s.client, req)
63223}
63224
63225// Do executes the "compute.regionOperations.list" call.
63226// Exactly one of *OperationList or error will be non-nil. Any non-2xx
63227// status code is an error. Response headers are in either
63228// *OperationList.ServerResponse.Header or (if a response was returned
63229// at all) in error.(*googleapi.Error).Header. Use
63230// googleapi.IsNotModified to check whether the returned error was
63231// because http.StatusNotModified was returned.
63232func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) {
63233	gensupport.SetOptions(c.urlParams_, opts...)
63234	res, err := c.doRequest("json")
63235	if res != nil && res.StatusCode == http.StatusNotModified {
63236		if res.Body != nil {
63237			res.Body.Close()
63238		}
63239		return nil, &googleapi.Error{
63240			Code:   res.StatusCode,
63241			Header: res.Header,
63242		}
63243	}
63244	if err != nil {
63245		return nil, err
63246	}
63247	defer googleapi.CloseBody(res)
63248	if err := googleapi.CheckResponse(res); err != nil {
63249		return nil, err
63250	}
63251	ret := &OperationList{
63252		ServerResponse: googleapi.ServerResponse{
63253			Header:         res.Header,
63254			HTTPStatusCode: res.StatusCode,
63255		},
63256	}
63257	target := &ret
63258	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
63259		return nil, err
63260	}
63261	return ret, nil
63262	// {
63263	//   "description": "Retrieves a list of Operation resources contained within the specified region.",
63264	//   "httpMethod": "GET",
63265	//   "id": "compute.regionOperations.list",
63266	//   "parameterOrder": [
63267	//     "project",
63268	//     "region"
63269	//   ],
63270	//   "parameters": {
63271	//     "filter": {
63272	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
63273	//       "location": "query",
63274	//       "type": "string"
63275	//     },
63276	//     "maxResults": {
63277	//       "default": "500",
63278	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
63279	//       "format": "uint32",
63280	//       "location": "query",
63281	//       "minimum": "0",
63282	//       "type": "integer"
63283	//     },
63284	//     "orderBy": {
63285	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
63286	//       "location": "query",
63287	//       "type": "string"
63288	//     },
63289	//     "pageToken": {
63290	//       "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.",
63291	//       "location": "query",
63292	//       "type": "string"
63293	//     },
63294	//     "project": {
63295	//       "description": "Project ID for this request.",
63296	//       "location": "path",
63297	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
63298	//       "required": true,
63299	//       "type": "string"
63300	//     },
63301	//     "region": {
63302	//       "description": "Name of the region for this request.",
63303	//       "location": "path",
63304	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
63305	//       "required": true,
63306	//       "type": "string"
63307	//     }
63308	//   },
63309	//   "path": "{project}/regions/{region}/operations",
63310	//   "response": {
63311	//     "$ref": "OperationList"
63312	//   },
63313	//   "scopes": [
63314	//     "https://www.googleapis.com/auth/cloud-platform",
63315	//     "https://www.googleapis.com/auth/compute",
63316	//     "https://www.googleapis.com/auth/compute.readonly"
63317	//   ]
63318	// }
63319
63320}
63321
63322// Pages invokes f for each page of results.
63323// A non-nil error returned from f will halt the iteration.
63324// The provided context supersedes any context provided to the Context method.
63325func (c *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error {
63326	c.ctx_ = ctx
63327	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
63328	for {
63329		x, err := c.Do()
63330		if err != nil {
63331			return err
63332		}
63333		if err := f(x); err != nil {
63334			return err
63335		}
63336		if x.NextPageToken == "" {
63337			return nil
63338		}
63339		c.PageToken(x.NextPageToken)
63340	}
63341}
63342
63343// method id "compute.regions.get":
63344
63345type RegionsGetCall struct {
63346	s            *Service
63347	project      string
63348	region       string
63349	urlParams_   gensupport.URLParams
63350	ifNoneMatch_ string
63351	ctx_         context.Context
63352	header_      http.Header
63353}
63354
63355// Get: Returns the specified Region resource. Get a list of available
63356// regions by making a list() request.
63357// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get
63358func (r *RegionsService) Get(project string, region string) *RegionsGetCall {
63359	c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
63360	c.project = project
63361	c.region = region
63362	return c
63363}
63364
63365// Fields allows partial responses to be retrieved. See
63366// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
63367// for more information.
63368func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall {
63369	c.urlParams_.Set("fields", googleapi.CombineFields(s))
63370	return c
63371}
63372
63373// IfNoneMatch sets the optional parameter which makes the operation
63374// fail if the object's ETag matches the given value. This is useful for
63375// getting updates only after the object has changed since the last
63376// request. Use googleapi.IsNotModified to check whether the response
63377// error from Do is the result of In-None-Match.
63378func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall {
63379	c.ifNoneMatch_ = entityTag
63380	return c
63381}
63382
63383// Context sets the context to be used in this call's Do method. Any
63384// pending HTTP request will be aborted if the provided context is
63385// canceled.
63386func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall {
63387	c.ctx_ = ctx
63388	return c
63389}
63390
63391// Header returns an http.Header that can be modified by the caller to
63392// add HTTP headers to the request.
63393func (c *RegionsGetCall) Header() http.Header {
63394	if c.header_ == nil {
63395		c.header_ = make(http.Header)
63396	}
63397	return c.header_
63398}
63399
63400func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) {
63401	reqHeaders := make(http.Header)
63402	for k, v := range c.header_ {
63403		reqHeaders[k] = v
63404	}
63405	reqHeaders.Set("User-Agent", c.s.userAgent())
63406	if c.ifNoneMatch_ != "" {
63407		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
63408	}
63409	var body io.Reader = nil
63410	c.urlParams_.Set("alt", alt)
63411	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}")
63412	urls += "?" + c.urlParams_.Encode()
63413	req, _ := http.NewRequest("GET", urls, body)
63414	req.Header = reqHeaders
63415	googleapi.Expand(req.URL, map[string]string{
63416		"project": c.project,
63417		"region":  c.region,
63418	})
63419	return gensupport.SendRequest(c.ctx_, c.s.client, req)
63420}
63421
63422// Do executes the "compute.regions.get" call.
63423// Exactly one of *Region or error will be non-nil. Any non-2xx status
63424// code is an error. Response headers are in either
63425// *Region.ServerResponse.Header or (if a response was returned at all)
63426// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
63427// check whether the returned error was because http.StatusNotModified
63428// was returned.
63429func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) {
63430	gensupport.SetOptions(c.urlParams_, opts...)
63431	res, err := c.doRequest("json")
63432	if res != nil && res.StatusCode == http.StatusNotModified {
63433		if res.Body != nil {
63434			res.Body.Close()
63435		}
63436		return nil, &googleapi.Error{
63437			Code:   res.StatusCode,
63438			Header: res.Header,
63439		}
63440	}
63441	if err != nil {
63442		return nil, err
63443	}
63444	defer googleapi.CloseBody(res)
63445	if err := googleapi.CheckResponse(res); err != nil {
63446		return nil, err
63447	}
63448	ret := &Region{
63449		ServerResponse: googleapi.ServerResponse{
63450			Header:         res.Header,
63451			HTTPStatusCode: res.StatusCode,
63452		},
63453	}
63454	target := &ret
63455	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
63456		return nil, err
63457	}
63458	return ret, nil
63459	// {
63460	//   "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.",
63461	//   "httpMethod": "GET",
63462	//   "id": "compute.regions.get",
63463	//   "parameterOrder": [
63464	//     "project",
63465	//     "region"
63466	//   ],
63467	//   "parameters": {
63468	//     "project": {
63469	//       "description": "Project ID for this request.",
63470	//       "location": "path",
63471	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
63472	//       "required": true,
63473	//       "type": "string"
63474	//     },
63475	//     "region": {
63476	//       "description": "Name of the region resource to return.",
63477	//       "location": "path",
63478	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
63479	//       "required": true,
63480	//       "type": "string"
63481	//     }
63482	//   },
63483	//   "path": "{project}/regions/{region}",
63484	//   "response": {
63485	//     "$ref": "Region"
63486	//   },
63487	//   "scopes": [
63488	//     "https://www.googleapis.com/auth/cloud-platform",
63489	//     "https://www.googleapis.com/auth/compute",
63490	//     "https://www.googleapis.com/auth/compute.readonly"
63491	//   ]
63492	// }
63493
63494}
63495
63496// method id "compute.regions.list":
63497
63498type RegionsListCall struct {
63499	s            *Service
63500	project      string
63501	urlParams_   gensupport.URLParams
63502	ifNoneMatch_ string
63503	ctx_         context.Context
63504	header_      http.Header
63505}
63506
63507// List: Retrieves the list of region resources available to the
63508// specified project.
63509// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/list
63510func (r *RegionsService) List(project string) *RegionsListCall {
63511	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
63512	c.project = project
63513	return c
63514}
63515
63516// Filter sets the optional parameter "filter": Sets a filter
63517// {expression} for filtering listed resources. Your {expression} must
63518// be in the format: field_name comparison_string literal_string.
63519//
63520// The field_name is the name of the field you want to compare. Only
63521// atomic field types are supported (string, number, boolean). The
63522// comparison_string must be either eq (equals) or ne (not equals). The
63523// literal_string is the string value to filter to. The literal value
63524// must be valid for the type of field you are filtering by (string,
63525// number, boolean). For string fields, the literal value is interpreted
63526// as a regular expression using RE2 syntax. The literal value must
63527// match the entire field.
63528//
63529// For example, to filter for instances that do not have a name of
63530// example-instance, you would use name ne example-instance.
63531//
63532// You can filter on nested fields. For example, you could filter on
63533// instances that have set the scheduling.automaticRestart field to
63534// true. Use filtering on nested fields to take advantage of labels to
63535// organize and search for results based on label values.
63536//
63537// To filter on multiple expressions, provide each separate expression
63538// within parentheses. For example, (scheduling.automaticRestart eq
63539// true) (zone eq us-central1-f). Multiple expressions are treated as
63540// AND expressions, meaning that resources must match all expressions to
63541// pass the filters.
63542func (c *RegionsListCall) Filter(filter string) *RegionsListCall {
63543	c.urlParams_.Set("filter", filter)
63544	return c
63545}
63546
63547// MaxResults sets the optional parameter "maxResults": The maximum
63548// number of results per page that should be returned. If the number of
63549// available results is larger than maxResults, Compute Engine returns a
63550// nextPageToken that can be used to get the next page of results in
63551// subsequent list requests. Acceptable values are 0 to 500, inclusive.
63552// (Default: 500)
63553func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall {
63554	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
63555	return c
63556}
63557
63558// OrderBy sets the optional parameter "orderBy": Sorts list results by
63559// a certain order. By default, results are returned in alphanumerical
63560// order based on the resource name.
63561//
63562// You can also sort results in descending order based on the creation
63563// timestamp using orderBy="creationTimestamp desc". This sorts results
63564// based on the creationTimestamp field in reverse chronological order
63565// (newest result first). Use this to sort resources like operations so
63566// that the newest operation is returned first.
63567//
63568// Currently, only sorting by name or creationTimestamp desc is
63569// supported.
63570func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall {
63571	c.urlParams_.Set("orderBy", orderBy)
63572	return c
63573}
63574
63575// PageToken sets the optional parameter "pageToken": Specifies a page
63576// token to use. Set pageToken to the nextPageToken returned by a
63577// previous list request to get the next page of results.
63578func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall {
63579	c.urlParams_.Set("pageToken", pageToken)
63580	return c
63581}
63582
63583// Fields allows partial responses to be retrieved. See
63584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
63585// for more information.
63586func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
63587	c.urlParams_.Set("fields", googleapi.CombineFields(s))
63588	return c
63589}
63590
63591// IfNoneMatch sets the optional parameter which makes the operation
63592// fail if the object's ETag matches the given value. This is useful for
63593// getting updates only after the object has changed since the last
63594// request. Use googleapi.IsNotModified to check whether the response
63595// error from Do is the result of In-None-Match.
63596func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
63597	c.ifNoneMatch_ = entityTag
63598	return c
63599}
63600
63601// Context sets the context to be used in this call's Do method. Any
63602// pending HTTP request will be aborted if the provided context is
63603// canceled.
63604func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
63605	c.ctx_ = ctx
63606	return c
63607}
63608
63609// Header returns an http.Header that can be modified by the caller to
63610// add HTTP headers to the request.
63611func (c *RegionsListCall) Header() http.Header {
63612	if c.header_ == nil {
63613		c.header_ = make(http.Header)
63614	}
63615	return c.header_
63616}
63617
63618func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
63619	reqHeaders := make(http.Header)
63620	for k, v := range c.header_ {
63621		reqHeaders[k] = v
63622	}
63623	reqHeaders.Set("User-Agent", c.s.userAgent())
63624	if c.ifNoneMatch_ != "" {
63625		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
63626	}
63627	var body io.Reader = nil
63628	c.urlParams_.Set("alt", alt)
63629	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions")
63630	urls += "?" + c.urlParams_.Encode()
63631	req, _ := http.NewRequest("GET", urls, body)
63632	req.Header = reqHeaders
63633	googleapi.Expand(req.URL, map[string]string{
63634		"project": c.project,
63635	})
63636	return gensupport.SendRequest(c.ctx_, c.s.client, req)
63637}
63638
63639// Do executes the "compute.regions.list" call.
63640// Exactly one of *RegionList or error will be non-nil. Any non-2xx
63641// status code is an error. Response headers are in either
63642// *RegionList.ServerResponse.Header or (if a response was returned at
63643// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
63644// to check whether the returned error was because
63645// http.StatusNotModified was returned.
63646func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) {
63647	gensupport.SetOptions(c.urlParams_, opts...)
63648	res, err := c.doRequest("json")
63649	if res != nil && res.StatusCode == http.StatusNotModified {
63650		if res.Body != nil {
63651			res.Body.Close()
63652		}
63653		return nil, &googleapi.Error{
63654			Code:   res.StatusCode,
63655			Header: res.Header,
63656		}
63657	}
63658	if err != nil {
63659		return nil, err
63660	}
63661	defer googleapi.CloseBody(res)
63662	if err := googleapi.CheckResponse(res); err != nil {
63663		return nil, err
63664	}
63665	ret := &RegionList{
63666		ServerResponse: googleapi.ServerResponse{
63667			Header:         res.Header,
63668			HTTPStatusCode: res.StatusCode,
63669		},
63670	}
63671	target := &ret
63672	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
63673		return nil, err
63674	}
63675	return ret, nil
63676	// {
63677	//   "description": "Retrieves the list of region resources available to the specified project.",
63678	//   "httpMethod": "GET",
63679	//   "id": "compute.regions.list",
63680	//   "parameterOrder": [
63681	//     "project"
63682	//   ],
63683	//   "parameters": {
63684	//     "filter": {
63685	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
63686	//       "location": "query",
63687	//       "type": "string"
63688	//     },
63689	//     "maxResults": {
63690	//       "default": "500",
63691	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
63692	//       "format": "uint32",
63693	//       "location": "query",
63694	//       "minimum": "0",
63695	//       "type": "integer"
63696	//     },
63697	//     "orderBy": {
63698	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
63699	//       "location": "query",
63700	//       "type": "string"
63701	//     },
63702	//     "pageToken": {
63703	//       "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.",
63704	//       "location": "query",
63705	//       "type": "string"
63706	//     },
63707	//     "project": {
63708	//       "description": "Project ID for this request.",
63709	//       "location": "path",
63710	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
63711	//       "required": true,
63712	//       "type": "string"
63713	//     }
63714	//   },
63715	//   "path": "{project}/regions",
63716	//   "response": {
63717	//     "$ref": "RegionList"
63718	//   },
63719	//   "scopes": [
63720	//     "https://www.googleapis.com/auth/cloud-platform",
63721	//     "https://www.googleapis.com/auth/compute",
63722	//     "https://www.googleapis.com/auth/compute.readonly"
63723	//   ]
63724	// }
63725
63726}
63727
63728// Pages invokes f for each page of results.
63729// A non-nil error returned from f will halt the iteration.
63730// The provided context supersedes any context provided to the Context method.
63731func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error {
63732	c.ctx_ = ctx
63733	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
63734	for {
63735		x, err := c.Do()
63736		if err != nil {
63737			return err
63738		}
63739		if err := f(x); err != nil {
63740			return err
63741		}
63742		if x.NextPageToken == "" {
63743			return nil
63744		}
63745		c.PageToken(x.NextPageToken)
63746	}
63747}
63748
63749// method id "compute.routers.aggregatedList":
63750
63751type RoutersAggregatedListCall struct {
63752	s            *Service
63753	project      string
63754	urlParams_   gensupport.URLParams
63755	ifNoneMatch_ string
63756	ctx_         context.Context
63757	header_      http.Header
63758}
63759
63760// AggregatedList: Retrieves an aggregated list of routers.
63761func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall {
63762	c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
63763	c.project = project
63764	return c
63765}
63766
63767// Filter sets the optional parameter "filter": Sets a filter
63768// {expression} for filtering listed resources. Your {expression} must
63769// be in the format: field_name comparison_string literal_string.
63770//
63771// The field_name is the name of the field you want to compare. Only
63772// atomic field types are supported (string, number, boolean). The
63773// comparison_string must be either eq (equals) or ne (not equals). The
63774// literal_string is the string value to filter to. The literal value
63775// must be valid for the type of field you are filtering by (string,
63776// number, boolean). For string fields, the literal value is interpreted
63777// as a regular expression using RE2 syntax. The literal value must
63778// match the entire field.
63779//
63780// For example, to filter for instances that do not have a name of
63781// example-instance, you would use name ne example-instance.
63782//
63783// You can filter on nested fields. For example, you could filter on
63784// instances that have set the scheduling.automaticRestart field to
63785// true. Use filtering on nested fields to take advantage of labels to
63786// organize and search for results based on label values.
63787//
63788// To filter on multiple expressions, provide each separate expression
63789// within parentheses. For example, (scheduling.automaticRestart eq
63790// true) (zone eq us-central1-f). Multiple expressions are treated as
63791// AND expressions, meaning that resources must match all expressions to
63792// pass the filters.
63793func (c *RoutersAggregatedListCall) Filter(filter string) *RoutersAggregatedListCall {
63794	c.urlParams_.Set("filter", filter)
63795	return c
63796}
63797
63798// MaxResults sets the optional parameter "maxResults": The maximum
63799// number of results per page that should be returned. If the number of
63800// available results is larger than maxResults, Compute Engine returns a
63801// nextPageToken that can be used to get the next page of results in
63802// subsequent list requests. Acceptable values are 0 to 500, inclusive.
63803// (Default: 500)
63804func (c *RoutersAggregatedListCall) MaxResults(maxResults int64) *RoutersAggregatedListCall {
63805	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
63806	return c
63807}
63808
63809// OrderBy sets the optional parameter "orderBy": Sorts list results by
63810// a certain order. By default, results are returned in alphanumerical
63811// order based on the resource name.
63812//
63813// You can also sort results in descending order based on the creation
63814// timestamp using orderBy="creationTimestamp desc". This sorts results
63815// based on the creationTimestamp field in reverse chronological order
63816// (newest result first). Use this to sort resources like operations so
63817// that the newest operation is returned first.
63818//
63819// Currently, only sorting by name or creationTimestamp desc is
63820// supported.
63821func (c *RoutersAggregatedListCall) OrderBy(orderBy string) *RoutersAggregatedListCall {
63822	c.urlParams_.Set("orderBy", orderBy)
63823	return c
63824}
63825
63826// PageToken sets the optional parameter "pageToken": Specifies a page
63827// token to use. Set pageToken to the nextPageToken returned by a
63828// previous list request to get the next page of results.
63829func (c *RoutersAggregatedListCall) PageToken(pageToken string) *RoutersAggregatedListCall {
63830	c.urlParams_.Set("pageToken", pageToken)
63831	return c
63832}
63833
63834// Fields allows partial responses to be retrieved. See
63835// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
63836// for more information.
63837func (c *RoutersAggregatedListCall) Fields(s ...googleapi.Field) *RoutersAggregatedListCall {
63838	c.urlParams_.Set("fields", googleapi.CombineFields(s))
63839	return c
63840}
63841
63842// IfNoneMatch sets the optional parameter which makes the operation
63843// fail if the object's ETag matches the given value. This is useful for
63844// getting updates only after the object has changed since the last
63845// request. Use googleapi.IsNotModified to check whether the response
63846// error from Do is the result of In-None-Match.
63847func (c *RoutersAggregatedListCall) IfNoneMatch(entityTag string) *RoutersAggregatedListCall {
63848	c.ifNoneMatch_ = entityTag
63849	return c
63850}
63851
63852// Context sets the context to be used in this call's Do method. Any
63853// pending HTTP request will be aborted if the provided context is
63854// canceled.
63855func (c *RoutersAggregatedListCall) Context(ctx context.Context) *RoutersAggregatedListCall {
63856	c.ctx_ = ctx
63857	return c
63858}
63859
63860// Header returns an http.Header that can be modified by the caller to
63861// add HTTP headers to the request.
63862func (c *RoutersAggregatedListCall) Header() http.Header {
63863	if c.header_ == nil {
63864		c.header_ = make(http.Header)
63865	}
63866	return c.header_
63867}
63868
63869func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
63870	reqHeaders := make(http.Header)
63871	for k, v := range c.header_ {
63872		reqHeaders[k] = v
63873	}
63874	reqHeaders.Set("User-Agent", c.s.userAgent())
63875	if c.ifNoneMatch_ != "" {
63876		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
63877	}
63878	var body io.Reader = nil
63879	c.urlParams_.Set("alt", alt)
63880	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/routers")
63881	urls += "?" + c.urlParams_.Encode()
63882	req, _ := http.NewRequest("GET", urls, body)
63883	req.Header = reqHeaders
63884	googleapi.Expand(req.URL, map[string]string{
63885		"project": c.project,
63886	})
63887	return gensupport.SendRequest(c.ctx_, c.s.client, req)
63888}
63889
63890// Do executes the "compute.routers.aggregatedList" call.
63891// Exactly one of *RouterAggregatedList or error will be non-nil. Any
63892// non-2xx status code is an error. Response headers are in either
63893// *RouterAggregatedList.ServerResponse.Header or (if a response was
63894// returned at all) in error.(*googleapi.Error).Header. Use
63895// googleapi.IsNotModified to check whether the returned error was
63896// because http.StatusNotModified was returned.
63897func (c *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAggregatedList, error) {
63898	gensupport.SetOptions(c.urlParams_, opts...)
63899	res, err := c.doRequest("json")
63900	if res != nil && res.StatusCode == http.StatusNotModified {
63901		if res.Body != nil {
63902			res.Body.Close()
63903		}
63904		return nil, &googleapi.Error{
63905			Code:   res.StatusCode,
63906			Header: res.Header,
63907		}
63908	}
63909	if err != nil {
63910		return nil, err
63911	}
63912	defer googleapi.CloseBody(res)
63913	if err := googleapi.CheckResponse(res); err != nil {
63914		return nil, err
63915	}
63916	ret := &RouterAggregatedList{
63917		ServerResponse: googleapi.ServerResponse{
63918			Header:         res.Header,
63919			HTTPStatusCode: res.StatusCode,
63920		},
63921	}
63922	target := &ret
63923	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
63924		return nil, err
63925	}
63926	return ret, nil
63927	// {
63928	//   "description": "Retrieves an aggregated list of routers.",
63929	//   "httpMethod": "GET",
63930	//   "id": "compute.routers.aggregatedList",
63931	//   "parameterOrder": [
63932	//     "project"
63933	//   ],
63934	//   "parameters": {
63935	//     "filter": {
63936	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
63937	//       "location": "query",
63938	//       "type": "string"
63939	//     },
63940	//     "maxResults": {
63941	//       "default": "500",
63942	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
63943	//       "format": "uint32",
63944	//       "location": "query",
63945	//       "minimum": "0",
63946	//       "type": "integer"
63947	//     },
63948	//     "orderBy": {
63949	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
63950	//       "location": "query",
63951	//       "type": "string"
63952	//     },
63953	//     "pageToken": {
63954	//       "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.",
63955	//       "location": "query",
63956	//       "type": "string"
63957	//     },
63958	//     "project": {
63959	//       "description": "Project ID for this request.",
63960	//       "location": "path",
63961	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
63962	//       "required": true,
63963	//       "type": "string"
63964	//     }
63965	//   },
63966	//   "path": "{project}/aggregated/routers",
63967	//   "response": {
63968	//     "$ref": "RouterAggregatedList"
63969	//   },
63970	//   "scopes": [
63971	//     "https://www.googleapis.com/auth/cloud-platform",
63972	//     "https://www.googleapis.com/auth/compute",
63973	//     "https://www.googleapis.com/auth/compute.readonly"
63974	//   ]
63975	// }
63976
63977}
63978
63979// Pages invokes f for each page of results.
63980// A non-nil error returned from f will halt the iteration.
63981// The provided context supersedes any context provided to the Context method.
63982func (c *RoutersAggregatedListCall) Pages(ctx context.Context, f func(*RouterAggregatedList) error) error {
63983	c.ctx_ = ctx
63984	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
63985	for {
63986		x, err := c.Do()
63987		if err != nil {
63988			return err
63989		}
63990		if err := f(x); err != nil {
63991			return err
63992		}
63993		if x.NextPageToken == "" {
63994			return nil
63995		}
63996		c.PageToken(x.NextPageToken)
63997	}
63998}
63999
64000// method id "compute.routers.delete":
64001
64002type RoutersDeleteCall struct {
64003	s          *Service
64004	project    string
64005	region     string
64006	router     string
64007	urlParams_ gensupport.URLParams
64008	ctx_       context.Context
64009	header_    http.Header
64010}
64011
64012// Delete: Deletes the specified Router resource.
64013func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall {
64014	c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
64015	c.project = project
64016	c.region = region
64017	c.router = router
64018	return c
64019}
64020
64021// RequestId sets the optional parameter "requestId": An optional
64022// request ID to identify requests. Specify a unique request ID so that
64023// if you must retry your request, the server will know to ignore the
64024// request if it has already been completed.
64025//
64026// For example, consider a situation where you make an initial request
64027// and the request times out. If you make the request again with the
64028// same request ID, the server can check if original operation with the
64029// same request ID was received, and if so, will ignore the second
64030// request. This prevents clients from accidentally creating duplicate
64031// commitments.
64032//
64033// The request ID must be a valid UUID with the exception that zero UUID
64034// is not supported (00000000-0000-0000-0000-000000000000).
64035func (c *RoutersDeleteCall) RequestId(requestId string) *RoutersDeleteCall {
64036	c.urlParams_.Set("requestId", requestId)
64037	return c
64038}
64039
64040// Fields allows partial responses to be retrieved. See
64041// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
64042// for more information.
64043func (c *RoutersDeleteCall) Fields(s ...googleapi.Field) *RoutersDeleteCall {
64044	c.urlParams_.Set("fields", googleapi.CombineFields(s))
64045	return c
64046}
64047
64048// Context sets the context to be used in this call's Do method. Any
64049// pending HTTP request will be aborted if the provided context is
64050// canceled.
64051func (c *RoutersDeleteCall) Context(ctx context.Context) *RoutersDeleteCall {
64052	c.ctx_ = ctx
64053	return c
64054}
64055
64056// Header returns an http.Header that can be modified by the caller to
64057// add HTTP headers to the request.
64058func (c *RoutersDeleteCall) Header() http.Header {
64059	if c.header_ == nil {
64060		c.header_ = make(http.Header)
64061	}
64062	return c.header_
64063}
64064
64065func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) {
64066	reqHeaders := make(http.Header)
64067	for k, v := range c.header_ {
64068		reqHeaders[k] = v
64069	}
64070	reqHeaders.Set("User-Agent", c.s.userAgent())
64071	var body io.Reader = nil
64072	c.urlParams_.Set("alt", alt)
64073	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}")
64074	urls += "?" + c.urlParams_.Encode()
64075	req, _ := http.NewRequest("DELETE", urls, body)
64076	req.Header = reqHeaders
64077	googleapi.Expand(req.URL, map[string]string{
64078		"project": c.project,
64079		"region":  c.region,
64080		"router":  c.router,
64081	})
64082	return gensupport.SendRequest(c.ctx_, c.s.client, req)
64083}
64084
64085// Do executes the "compute.routers.delete" call.
64086// Exactly one of *Operation or error will be non-nil. Any non-2xx
64087// status code is an error. Response headers are in either
64088// *Operation.ServerResponse.Header or (if a response was returned at
64089// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
64090// to check whether the returned error was because
64091// http.StatusNotModified was returned.
64092func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
64093	gensupport.SetOptions(c.urlParams_, opts...)
64094	res, err := c.doRequest("json")
64095	if res != nil && res.StatusCode == http.StatusNotModified {
64096		if res.Body != nil {
64097			res.Body.Close()
64098		}
64099		return nil, &googleapi.Error{
64100			Code:   res.StatusCode,
64101			Header: res.Header,
64102		}
64103	}
64104	if err != nil {
64105		return nil, err
64106	}
64107	defer googleapi.CloseBody(res)
64108	if err := googleapi.CheckResponse(res); err != nil {
64109		return nil, err
64110	}
64111	ret := &Operation{
64112		ServerResponse: googleapi.ServerResponse{
64113			Header:         res.Header,
64114			HTTPStatusCode: res.StatusCode,
64115		},
64116	}
64117	target := &ret
64118	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
64119		return nil, err
64120	}
64121	return ret, nil
64122	// {
64123	//   "description": "Deletes the specified Router resource.",
64124	//   "httpMethod": "DELETE",
64125	//   "id": "compute.routers.delete",
64126	//   "parameterOrder": [
64127	//     "project",
64128	//     "region",
64129	//     "router"
64130	//   ],
64131	//   "parameters": {
64132	//     "project": {
64133	//       "description": "Project ID for this request.",
64134	//       "location": "path",
64135	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
64136	//       "required": true,
64137	//       "type": "string"
64138	//     },
64139	//     "region": {
64140	//       "description": "Name of the region for this request.",
64141	//       "location": "path",
64142	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
64143	//       "required": true,
64144	//       "type": "string"
64145	//     },
64146	//     "requestId": {
64147	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
64148	//       "location": "query",
64149	//       "type": "string"
64150	//     },
64151	//     "router": {
64152	//       "description": "Name of the Router resource to delete.",
64153	//       "location": "path",
64154	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
64155	//       "required": true,
64156	//       "type": "string"
64157	//     }
64158	//   },
64159	//   "path": "{project}/regions/{region}/routers/{router}",
64160	//   "response": {
64161	//     "$ref": "Operation"
64162	//   },
64163	//   "scopes": [
64164	//     "https://www.googleapis.com/auth/cloud-platform",
64165	//     "https://www.googleapis.com/auth/compute"
64166	//   ]
64167	// }
64168
64169}
64170
64171// method id "compute.routers.get":
64172
64173type RoutersGetCall struct {
64174	s            *Service
64175	project      string
64176	region       string
64177	router       string
64178	urlParams_   gensupport.URLParams
64179	ifNoneMatch_ string
64180	ctx_         context.Context
64181	header_      http.Header
64182}
64183
64184// Get: Returns the specified Router resource. Get a list of available
64185// routers by making a list() request.
64186func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall {
64187	c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
64188	c.project = project
64189	c.region = region
64190	c.router = router
64191	return c
64192}
64193
64194// Fields allows partial responses to be retrieved. See
64195// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
64196// for more information.
64197func (c *RoutersGetCall) Fields(s ...googleapi.Field) *RoutersGetCall {
64198	c.urlParams_.Set("fields", googleapi.CombineFields(s))
64199	return c
64200}
64201
64202// IfNoneMatch sets the optional parameter which makes the operation
64203// fail if the object's ETag matches the given value. This is useful for
64204// getting updates only after the object has changed since the last
64205// request. Use googleapi.IsNotModified to check whether the response
64206// error from Do is the result of In-None-Match.
64207func (c *RoutersGetCall) IfNoneMatch(entityTag string) *RoutersGetCall {
64208	c.ifNoneMatch_ = entityTag
64209	return c
64210}
64211
64212// Context sets the context to be used in this call's Do method. Any
64213// pending HTTP request will be aborted if the provided context is
64214// canceled.
64215func (c *RoutersGetCall) Context(ctx context.Context) *RoutersGetCall {
64216	c.ctx_ = ctx
64217	return c
64218}
64219
64220// Header returns an http.Header that can be modified by the caller to
64221// add HTTP headers to the request.
64222func (c *RoutersGetCall) Header() http.Header {
64223	if c.header_ == nil {
64224		c.header_ = make(http.Header)
64225	}
64226	return c.header_
64227}
64228
64229func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) {
64230	reqHeaders := make(http.Header)
64231	for k, v := range c.header_ {
64232		reqHeaders[k] = v
64233	}
64234	reqHeaders.Set("User-Agent", c.s.userAgent())
64235	if c.ifNoneMatch_ != "" {
64236		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
64237	}
64238	var body io.Reader = nil
64239	c.urlParams_.Set("alt", alt)
64240	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}")
64241	urls += "?" + c.urlParams_.Encode()
64242	req, _ := http.NewRequest("GET", urls, body)
64243	req.Header = reqHeaders
64244	googleapi.Expand(req.URL, map[string]string{
64245		"project": c.project,
64246		"region":  c.region,
64247		"router":  c.router,
64248	})
64249	return gensupport.SendRequest(c.ctx_, c.s.client, req)
64250}
64251
64252// Do executes the "compute.routers.get" call.
64253// Exactly one of *Router or error will be non-nil. Any non-2xx status
64254// code is an error. Response headers are in either
64255// *Router.ServerResponse.Header or (if a response was returned at all)
64256// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
64257// check whether the returned error was because http.StatusNotModified
64258// was returned.
64259func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) {
64260	gensupport.SetOptions(c.urlParams_, opts...)
64261	res, err := c.doRequest("json")
64262	if res != nil && res.StatusCode == http.StatusNotModified {
64263		if res.Body != nil {
64264			res.Body.Close()
64265		}
64266		return nil, &googleapi.Error{
64267			Code:   res.StatusCode,
64268			Header: res.Header,
64269		}
64270	}
64271	if err != nil {
64272		return nil, err
64273	}
64274	defer googleapi.CloseBody(res)
64275	if err := googleapi.CheckResponse(res); err != nil {
64276		return nil, err
64277	}
64278	ret := &Router{
64279		ServerResponse: googleapi.ServerResponse{
64280			Header:         res.Header,
64281			HTTPStatusCode: res.StatusCode,
64282		},
64283	}
64284	target := &ret
64285	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
64286		return nil, err
64287	}
64288	return ret, nil
64289	// {
64290	//   "description": "Returns the specified Router resource. Get a list of available routers by making a list() request.",
64291	//   "httpMethod": "GET",
64292	//   "id": "compute.routers.get",
64293	//   "parameterOrder": [
64294	//     "project",
64295	//     "region",
64296	//     "router"
64297	//   ],
64298	//   "parameters": {
64299	//     "project": {
64300	//       "description": "Project ID for this request.",
64301	//       "location": "path",
64302	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
64303	//       "required": true,
64304	//       "type": "string"
64305	//     },
64306	//     "region": {
64307	//       "description": "Name of the region for this request.",
64308	//       "location": "path",
64309	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
64310	//       "required": true,
64311	//       "type": "string"
64312	//     },
64313	//     "router": {
64314	//       "description": "Name of the Router resource to return.",
64315	//       "location": "path",
64316	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
64317	//       "required": true,
64318	//       "type": "string"
64319	//     }
64320	//   },
64321	//   "path": "{project}/regions/{region}/routers/{router}",
64322	//   "response": {
64323	//     "$ref": "Router"
64324	//   },
64325	//   "scopes": [
64326	//     "https://www.googleapis.com/auth/cloud-platform",
64327	//     "https://www.googleapis.com/auth/compute",
64328	//     "https://www.googleapis.com/auth/compute.readonly"
64329	//   ]
64330	// }
64331
64332}
64333
64334// method id "compute.routers.getRouterStatus":
64335
64336type RoutersGetRouterStatusCall struct {
64337	s            *Service
64338	project      string
64339	region       string
64340	router       string
64341	urlParams_   gensupport.URLParams
64342	ifNoneMatch_ string
64343	ctx_         context.Context
64344	header_      http.Header
64345}
64346
64347// GetRouterStatus: Retrieves runtime information of the specified
64348// router.
64349func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall {
64350	c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
64351	c.project = project
64352	c.region = region
64353	c.router = router
64354	return c
64355}
64356
64357// Fields allows partial responses to be retrieved. See
64358// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
64359// for more information.
64360func (c *RoutersGetRouterStatusCall) Fields(s ...googleapi.Field) *RoutersGetRouterStatusCall {
64361	c.urlParams_.Set("fields", googleapi.CombineFields(s))
64362	return c
64363}
64364
64365// IfNoneMatch sets the optional parameter which makes the operation
64366// fail if the object's ETag matches the given value. This is useful for
64367// getting updates only after the object has changed since the last
64368// request. Use googleapi.IsNotModified to check whether the response
64369// error from Do is the result of In-None-Match.
64370func (c *RoutersGetRouterStatusCall) IfNoneMatch(entityTag string) *RoutersGetRouterStatusCall {
64371	c.ifNoneMatch_ = entityTag
64372	return c
64373}
64374
64375// Context sets the context to be used in this call's Do method. Any
64376// pending HTTP request will be aborted if the provided context is
64377// canceled.
64378func (c *RoutersGetRouterStatusCall) Context(ctx context.Context) *RoutersGetRouterStatusCall {
64379	c.ctx_ = ctx
64380	return c
64381}
64382
64383// Header returns an http.Header that can be modified by the caller to
64384// add HTTP headers to the request.
64385func (c *RoutersGetRouterStatusCall) Header() http.Header {
64386	if c.header_ == nil {
64387		c.header_ = make(http.Header)
64388	}
64389	return c.header_
64390}
64391
64392func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) {
64393	reqHeaders := make(http.Header)
64394	for k, v := range c.header_ {
64395		reqHeaders[k] = v
64396	}
64397	reqHeaders.Set("User-Agent", c.s.userAgent())
64398	if c.ifNoneMatch_ != "" {
64399		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
64400	}
64401	var body io.Reader = nil
64402	c.urlParams_.Set("alt", alt)
64403	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/getRouterStatus")
64404	urls += "?" + c.urlParams_.Encode()
64405	req, _ := http.NewRequest("GET", urls, body)
64406	req.Header = reqHeaders
64407	googleapi.Expand(req.URL, map[string]string{
64408		"project": c.project,
64409		"region":  c.region,
64410		"router":  c.router,
64411	})
64412	return gensupport.SendRequest(c.ctx_, c.s.client, req)
64413}
64414
64415// Do executes the "compute.routers.getRouterStatus" call.
64416// Exactly one of *RouterStatusResponse or error will be non-nil. Any
64417// non-2xx status code is an error. Response headers are in either
64418// *RouterStatusResponse.ServerResponse.Header or (if a response was
64419// returned at all) in error.(*googleapi.Error).Header. Use
64420// googleapi.IsNotModified to check whether the returned error was
64421// because http.StatusNotModified was returned.
64422func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterStatusResponse, error) {
64423	gensupport.SetOptions(c.urlParams_, opts...)
64424	res, err := c.doRequest("json")
64425	if res != nil && res.StatusCode == http.StatusNotModified {
64426		if res.Body != nil {
64427			res.Body.Close()
64428		}
64429		return nil, &googleapi.Error{
64430			Code:   res.StatusCode,
64431			Header: res.Header,
64432		}
64433	}
64434	if err != nil {
64435		return nil, err
64436	}
64437	defer googleapi.CloseBody(res)
64438	if err := googleapi.CheckResponse(res); err != nil {
64439		return nil, err
64440	}
64441	ret := &RouterStatusResponse{
64442		ServerResponse: googleapi.ServerResponse{
64443			Header:         res.Header,
64444			HTTPStatusCode: res.StatusCode,
64445		},
64446	}
64447	target := &ret
64448	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
64449		return nil, err
64450	}
64451	return ret, nil
64452	// {
64453	//   "description": "Retrieves runtime information of the specified router.",
64454	//   "httpMethod": "GET",
64455	//   "id": "compute.routers.getRouterStatus",
64456	//   "parameterOrder": [
64457	//     "project",
64458	//     "region",
64459	//     "router"
64460	//   ],
64461	//   "parameters": {
64462	//     "project": {
64463	//       "description": "Project ID for this request.",
64464	//       "location": "path",
64465	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
64466	//       "required": true,
64467	//       "type": "string"
64468	//     },
64469	//     "region": {
64470	//       "description": "Name of the region for this request.",
64471	//       "location": "path",
64472	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
64473	//       "required": true,
64474	//       "type": "string"
64475	//     },
64476	//     "router": {
64477	//       "description": "Name of the Router resource to query.",
64478	//       "location": "path",
64479	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
64480	//       "required": true,
64481	//       "type": "string"
64482	//     }
64483	//   },
64484	//   "path": "{project}/regions/{region}/routers/{router}/getRouterStatus",
64485	//   "response": {
64486	//     "$ref": "RouterStatusResponse"
64487	//   },
64488	//   "scopes": [
64489	//     "https://www.googleapis.com/auth/cloud-platform",
64490	//     "https://www.googleapis.com/auth/compute",
64491	//     "https://www.googleapis.com/auth/compute.readonly"
64492	//   ]
64493	// }
64494
64495}
64496
64497// method id "compute.routers.insert":
64498
64499type RoutersInsertCall struct {
64500	s          *Service
64501	project    string
64502	region     string
64503	router     *Router
64504	urlParams_ gensupport.URLParams
64505	ctx_       context.Context
64506	header_    http.Header
64507}
64508
64509// Insert: Creates a Router resource in the specified project and region
64510// using the data included in the request.
64511func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall {
64512	c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
64513	c.project = project
64514	c.region = region
64515	c.router = router
64516	return c
64517}
64518
64519// RequestId sets the optional parameter "requestId": An optional
64520// request ID to identify requests. Specify a unique request ID so that
64521// if you must retry your request, the server will know to ignore the
64522// request if it has already been completed.
64523//
64524// For example, consider a situation where you make an initial request
64525// and the request times out. If you make the request again with the
64526// same request ID, the server can check if original operation with the
64527// same request ID was received, and if so, will ignore the second
64528// request. This prevents clients from accidentally creating duplicate
64529// commitments.
64530//
64531// The request ID must be a valid UUID with the exception that zero UUID
64532// is not supported (00000000-0000-0000-0000-000000000000).
64533func (c *RoutersInsertCall) RequestId(requestId string) *RoutersInsertCall {
64534	c.urlParams_.Set("requestId", requestId)
64535	return c
64536}
64537
64538// Fields allows partial responses to be retrieved. See
64539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
64540// for more information.
64541func (c *RoutersInsertCall) Fields(s ...googleapi.Field) *RoutersInsertCall {
64542	c.urlParams_.Set("fields", googleapi.CombineFields(s))
64543	return c
64544}
64545
64546// Context sets the context to be used in this call's Do method. Any
64547// pending HTTP request will be aborted if the provided context is
64548// canceled.
64549func (c *RoutersInsertCall) Context(ctx context.Context) *RoutersInsertCall {
64550	c.ctx_ = ctx
64551	return c
64552}
64553
64554// Header returns an http.Header that can be modified by the caller to
64555// add HTTP headers to the request.
64556func (c *RoutersInsertCall) Header() http.Header {
64557	if c.header_ == nil {
64558		c.header_ = make(http.Header)
64559	}
64560	return c.header_
64561}
64562
64563func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) {
64564	reqHeaders := make(http.Header)
64565	for k, v := range c.header_ {
64566		reqHeaders[k] = v
64567	}
64568	reqHeaders.Set("User-Agent", c.s.userAgent())
64569	var body io.Reader = nil
64570	body, err := googleapi.WithoutDataWrapper.JSONReader(c.router)
64571	if err != nil {
64572		return nil, err
64573	}
64574	reqHeaders.Set("Content-Type", "application/json")
64575	c.urlParams_.Set("alt", alt)
64576	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers")
64577	urls += "?" + c.urlParams_.Encode()
64578	req, _ := http.NewRequest("POST", urls, body)
64579	req.Header = reqHeaders
64580	googleapi.Expand(req.URL, map[string]string{
64581		"project": c.project,
64582		"region":  c.region,
64583	})
64584	return gensupport.SendRequest(c.ctx_, c.s.client, req)
64585}
64586
64587// Do executes the "compute.routers.insert" call.
64588// Exactly one of *Operation or error will be non-nil. Any non-2xx
64589// status code is an error. Response headers are in either
64590// *Operation.ServerResponse.Header or (if a response was returned at
64591// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
64592// to check whether the returned error was because
64593// http.StatusNotModified was returned.
64594func (c *RoutersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
64595	gensupport.SetOptions(c.urlParams_, opts...)
64596	res, err := c.doRequest("json")
64597	if res != nil && res.StatusCode == http.StatusNotModified {
64598		if res.Body != nil {
64599			res.Body.Close()
64600		}
64601		return nil, &googleapi.Error{
64602			Code:   res.StatusCode,
64603			Header: res.Header,
64604		}
64605	}
64606	if err != nil {
64607		return nil, err
64608	}
64609	defer googleapi.CloseBody(res)
64610	if err := googleapi.CheckResponse(res); err != nil {
64611		return nil, err
64612	}
64613	ret := &Operation{
64614		ServerResponse: googleapi.ServerResponse{
64615			Header:         res.Header,
64616			HTTPStatusCode: res.StatusCode,
64617		},
64618	}
64619	target := &ret
64620	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
64621		return nil, err
64622	}
64623	return ret, nil
64624	// {
64625	//   "description": "Creates a Router resource in the specified project and region using the data included in the request.",
64626	//   "httpMethod": "POST",
64627	//   "id": "compute.routers.insert",
64628	//   "parameterOrder": [
64629	//     "project",
64630	//     "region"
64631	//   ],
64632	//   "parameters": {
64633	//     "project": {
64634	//       "description": "Project ID for this request.",
64635	//       "location": "path",
64636	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
64637	//       "required": true,
64638	//       "type": "string"
64639	//     },
64640	//     "region": {
64641	//       "description": "Name of the region for this request.",
64642	//       "location": "path",
64643	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
64644	//       "required": true,
64645	//       "type": "string"
64646	//     },
64647	//     "requestId": {
64648	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
64649	//       "location": "query",
64650	//       "type": "string"
64651	//     }
64652	//   },
64653	//   "path": "{project}/regions/{region}/routers",
64654	//   "request": {
64655	//     "$ref": "Router"
64656	//   },
64657	//   "response": {
64658	//     "$ref": "Operation"
64659	//   },
64660	//   "scopes": [
64661	//     "https://www.googleapis.com/auth/cloud-platform",
64662	//     "https://www.googleapis.com/auth/compute"
64663	//   ]
64664	// }
64665
64666}
64667
64668// method id "compute.routers.list":
64669
64670type RoutersListCall struct {
64671	s            *Service
64672	project      string
64673	region       string
64674	urlParams_   gensupport.URLParams
64675	ifNoneMatch_ string
64676	ctx_         context.Context
64677	header_      http.Header
64678}
64679
64680// List: Retrieves a list of Router resources available to the specified
64681// project.
64682func (r *RoutersService) List(project string, region string) *RoutersListCall {
64683	c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
64684	c.project = project
64685	c.region = region
64686	return c
64687}
64688
64689// Filter sets the optional parameter "filter": Sets a filter
64690// {expression} for filtering listed resources. Your {expression} must
64691// be in the format: field_name comparison_string literal_string.
64692//
64693// The field_name is the name of the field you want to compare. Only
64694// atomic field types are supported (string, number, boolean). The
64695// comparison_string must be either eq (equals) or ne (not equals). The
64696// literal_string is the string value to filter to. The literal value
64697// must be valid for the type of field you are filtering by (string,
64698// number, boolean). For string fields, the literal value is interpreted
64699// as a regular expression using RE2 syntax. The literal value must
64700// match the entire field.
64701//
64702// For example, to filter for instances that do not have a name of
64703// example-instance, you would use name ne example-instance.
64704//
64705// You can filter on nested fields. For example, you could filter on
64706// instances that have set the scheduling.automaticRestart field to
64707// true. Use filtering on nested fields to take advantage of labels to
64708// organize and search for results based on label values.
64709//
64710// To filter on multiple expressions, provide each separate expression
64711// within parentheses. For example, (scheduling.automaticRestart eq
64712// true) (zone eq us-central1-f). Multiple expressions are treated as
64713// AND expressions, meaning that resources must match all expressions to
64714// pass the filters.
64715func (c *RoutersListCall) Filter(filter string) *RoutersListCall {
64716	c.urlParams_.Set("filter", filter)
64717	return c
64718}
64719
64720// MaxResults sets the optional parameter "maxResults": The maximum
64721// number of results per page that should be returned. If the number of
64722// available results is larger than maxResults, Compute Engine returns a
64723// nextPageToken that can be used to get the next page of results in
64724// subsequent list requests. Acceptable values are 0 to 500, inclusive.
64725// (Default: 500)
64726func (c *RoutersListCall) MaxResults(maxResults int64) *RoutersListCall {
64727	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
64728	return c
64729}
64730
64731// OrderBy sets the optional parameter "orderBy": Sorts list results by
64732// a certain order. By default, results are returned in alphanumerical
64733// order based on the resource name.
64734//
64735// You can also sort results in descending order based on the creation
64736// timestamp using orderBy="creationTimestamp desc". This sorts results
64737// based on the creationTimestamp field in reverse chronological order
64738// (newest result first). Use this to sort resources like operations so
64739// that the newest operation is returned first.
64740//
64741// Currently, only sorting by name or creationTimestamp desc is
64742// supported.
64743func (c *RoutersListCall) OrderBy(orderBy string) *RoutersListCall {
64744	c.urlParams_.Set("orderBy", orderBy)
64745	return c
64746}
64747
64748// PageToken sets the optional parameter "pageToken": Specifies a page
64749// token to use. Set pageToken to the nextPageToken returned by a
64750// previous list request to get the next page of results.
64751func (c *RoutersListCall) PageToken(pageToken string) *RoutersListCall {
64752	c.urlParams_.Set("pageToken", pageToken)
64753	return c
64754}
64755
64756// Fields allows partial responses to be retrieved. See
64757// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
64758// for more information.
64759func (c *RoutersListCall) Fields(s ...googleapi.Field) *RoutersListCall {
64760	c.urlParams_.Set("fields", googleapi.CombineFields(s))
64761	return c
64762}
64763
64764// IfNoneMatch sets the optional parameter which makes the operation
64765// fail if the object's ETag matches the given value. This is useful for
64766// getting updates only after the object has changed since the last
64767// request. Use googleapi.IsNotModified to check whether the response
64768// error from Do is the result of In-None-Match.
64769func (c *RoutersListCall) IfNoneMatch(entityTag string) *RoutersListCall {
64770	c.ifNoneMatch_ = entityTag
64771	return c
64772}
64773
64774// Context sets the context to be used in this call's Do method. Any
64775// pending HTTP request will be aborted if the provided context is
64776// canceled.
64777func (c *RoutersListCall) Context(ctx context.Context) *RoutersListCall {
64778	c.ctx_ = ctx
64779	return c
64780}
64781
64782// Header returns an http.Header that can be modified by the caller to
64783// add HTTP headers to the request.
64784func (c *RoutersListCall) Header() http.Header {
64785	if c.header_ == nil {
64786		c.header_ = make(http.Header)
64787	}
64788	return c.header_
64789}
64790
64791func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) {
64792	reqHeaders := make(http.Header)
64793	for k, v := range c.header_ {
64794		reqHeaders[k] = v
64795	}
64796	reqHeaders.Set("User-Agent", c.s.userAgent())
64797	if c.ifNoneMatch_ != "" {
64798		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
64799	}
64800	var body io.Reader = nil
64801	c.urlParams_.Set("alt", alt)
64802	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers")
64803	urls += "?" + c.urlParams_.Encode()
64804	req, _ := http.NewRequest("GET", urls, body)
64805	req.Header = reqHeaders
64806	googleapi.Expand(req.URL, map[string]string{
64807		"project": c.project,
64808		"region":  c.region,
64809	})
64810	return gensupport.SendRequest(c.ctx_, c.s.client, req)
64811}
64812
64813// Do executes the "compute.routers.list" call.
64814// Exactly one of *RouterList or error will be non-nil. Any non-2xx
64815// status code is an error. Response headers are in either
64816// *RouterList.ServerResponse.Header or (if a response was returned at
64817// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
64818// to check whether the returned error was because
64819// http.StatusNotModified was returned.
64820func (c *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, error) {
64821	gensupport.SetOptions(c.urlParams_, opts...)
64822	res, err := c.doRequest("json")
64823	if res != nil && res.StatusCode == http.StatusNotModified {
64824		if res.Body != nil {
64825			res.Body.Close()
64826		}
64827		return nil, &googleapi.Error{
64828			Code:   res.StatusCode,
64829			Header: res.Header,
64830		}
64831	}
64832	if err != nil {
64833		return nil, err
64834	}
64835	defer googleapi.CloseBody(res)
64836	if err := googleapi.CheckResponse(res); err != nil {
64837		return nil, err
64838	}
64839	ret := &RouterList{
64840		ServerResponse: googleapi.ServerResponse{
64841			Header:         res.Header,
64842			HTTPStatusCode: res.StatusCode,
64843		},
64844	}
64845	target := &ret
64846	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
64847		return nil, err
64848	}
64849	return ret, nil
64850	// {
64851	//   "description": "Retrieves a list of Router resources available to the specified project.",
64852	//   "httpMethod": "GET",
64853	//   "id": "compute.routers.list",
64854	//   "parameterOrder": [
64855	//     "project",
64856	//     "region"
64857	//   ],
64858	//   "parameters": {
64859	//     "filter": {
64860	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
64861	//       "location": "query",
64862	//       "type": "string"
64863	//     },
64864	//     "maxResults": {
64865	//       "default": "500",
64866	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
64867	//       "format": "uint32",
64868	//       "location": "query",
64869	//       "minimum": "0",
64870	//       "type": "integer"
64871	//     },
64872	//     "orderBy": {
64873	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
64874	//       "location": "query",
64875	//       "type": "string"
64876	//     },
64877	//     "pageToken": {
64878	//       "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.",
64879	//       "location": "query",
64880	//       "type": "string"
64881	//     },
64882	//     "project": {
64883	//       "description": "Project ID for this request.",
64884	//       "location": "path",
64885	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
64886	//       "required": true,
64887	//       "type": "string"
64888	//     },
64889	//     "region": {
64890	//       "description": "Name of the region for this request.",
64891	//       "location": "path",
64892	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
64893	//       "required": true,
64894	//       "type": "string"
64895	//     }
64896	//   },
64897	//   "path": "{project}/regions/{region}/routers",
64898	//   "response": {
64899	//     "$ref": "RouterList"
64900	//   },
64901	//   "scopes": [
64902	//     "https://www.googleapis.com/auth/cloud-platform",
64903	//     "https://www.googleapis.com/auth/compute",
64904	//     "https://www.googleapis.com/auth/compute.readonly"
64905	//   ]
64906	// }
64907
64908}
64909
64910// Pages invokes f for each page of results.
64911// A non-nil error returned from f will halt the iteration.
64912// The provided context supersedes any context provided to the Context method.
64913func (c *RoutersListCall) Pages(ctx context.Context, f func(*RouterList) error) error {
64914	c.ctx_ = ctx
64915	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
64916	for {
64917		x, err := c.Do()
64918		if err != nil {
64919			return err
64920		}
64921		if err := f(x); err != nil {
64922			return err
64923		}
64924		if x.NextPageToken == "" {
64925			return nil
64926		}
64927		c.PageToken(x.NextPageToken)
64928	}
64929}
64930
64931// method id "compute.routers.patch":
64932
64933type RoutersPatchCall struct {
64934	s          *Service
64935	project    string
64936	region     string
64937	router     string
64938	router2    *Router
64939	urlParams_ gensupport.URLParams
64940	ctx_       context.Context
64941	header_    http.Header
64942}
64943
64944// Patch: Patches the specified Router resource with the data included
64945// in the request. This method supports PATCH semantics and uses JSON
64946// merge patch format and processing rules.
64947func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall {
64948	c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
64949	c.project = project
64950	c.region = region
64951	c.router = router
64952	c.router2 = router2
64953	return c
64954}
64955
64956// RequestId sets the optional parameter "requestId": An optional
64957// request ID to identify requests. Specify a unique request ID so that
64958// if you must retry your request, the server will know to ignore the
64959// request if it has already been completed.
64960//
64961// For example, consider a situation where you make an initial request
64962// and the request times out. If you make the request again with the
64963// same request ID, the server can check if original operation with the
64964// same request ID was received, and if so, will ignore the second
64965// request. This prevents clients from accidentally creating duplicate
64966// commitments.
64967//
64968// The request ID must be a valid UUID with the exception that zero UUID
64969// is not supported (00000000-0000-0000-0000-000000000000).
64970func (c *RoutersPatchCall) RequestId(requestId string) *RoutersPatchCall {
64971	c.urlParams_.Set("requestId", requestId)
64972	return c
64973}
64974
64975// Fields allows partial responses to be retrieved. See
64976// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
64977// for more information.
64978func (c *RoutersPatchCall) Fields(s ...googleapi.Field) *RoutersPatchCall {
64979	c.urlParams_.Set("fields", googleapi.CombineFields(s))
64980	return c
64981}
64982
64983// Context sets the context to be used in this call's Do method. Any
64984// pending HTTP request will be aborted if the provided context is
64985// canceled.
64986func (c *RoutersPatchCall) Context(ctx context.Context) *RoutersPatchCall {
64987	c.ctx_ = ctx
64988	return c
64989}
64990
64991// Header returns an http.Header that can be modified by the caller to
64992// add HTTP headers to the request.
64993func (c *RoutersPatchCall) Header() http.Header {
64994	if c.header_ == nil {
64995		c.header_ = make(http.Header)
64996	}
64997	return c.header_
64998}
64999
65000func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) {
65001	reqHeaders := make(http.Header)
65002	for k, v := range c.header_ {
65003		reqHeaders[k] = v
65004	}
65005	reqHeaders.Set("User-Agent", c.s.userAgent())
65006	var body io.Reader = nil
65007	body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2)
65008	if err != nil {
65009		return nil, err
65010	}
65011	reqHeaders.Set("Content-Type", "application/json")
65012	c.urlParams_.Set("alt", alt)
65013	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}")
65014	urls += "?" + c.urlParams_.Encode()
65015	req, _ := http.NewRequest("PATCH", urls, body)
65016	req.Header = reqHeaders
65017	googleapi.Expand(req.URL, map[string]string{
65018		"project": c.project,
65019		"region":  c.region,
65020		"router":  c.router,
65021	})
65022	return gensupport.SendRequest(c.ctx_, c.s.client, req)
65023}
65024
65025// Do executes the "compute.routers.patch" call.
65026// Exactly one of *Operation or error will be non-nil. Any non-2xx
65027// status code is an error. Response headers are in either
65028// *Operation.ServerResponse.Header or (if a response was returned at
65029// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
65030// to check whether the returned error was because
65031// http.StatusNotModified was returned.
65032func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
65033	gensupport.SetOptions(c.urlParams_, opts...)
65034	res, err := c.doRequest("json")
65035	if res != nil && res.StatusCode == http.StatusNotModified {
65036		if res.Body != nil {
65037			res.Body.Close()
65038		}
65039		return nil, &googleapi.Error{
65040			Code:   res.StatusCode,
65041			Header: res.Header,
65042		}
65043	}
65044	if err != nil {
65045		return nil, err
65046	}
65047	defer googleapi.CloseBody(res)
65048	if err := googleapi.CheckResponse(res); err != nil {
65049		return nil, err
65050	}
65051	ret := &Operation{
65052		ServerResponse: googleapi.ServerResponse{
65053			Header:         res.Header,
65054			HTTPStatusCode: res.StatusCode,
65055		},
65056	}
65057	target := &ret
65058	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
65059		return nil, err
65060	}
65061	return ret, nil
65062	// {
65063	//   "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.",
65064	//   "httpMethod": "PATCH",
65065	//   "id": "compute.routers.patch",
65066	//   "parameterOrder": [
65067	//     "project",
65068	//     "region",
65069	//     "router"
65070	//   ],
65071	//   "parameters": {
65072	//     "project": {
65073	//       "description": "Project ID for this request.",
65074	//       "location": "path",
65075	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
65076	//       "required": true,
65077	//       "type": "string"
65078	//     },
65079	//     "region": {
65080	//       "description": "Name of the region for this request.",
65081	//       "location": "path",
65082	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65083	//       "required": true,
65084	//       "type": "string"
65085	//     },
65086	//     "requestId": {
65087	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
65088	//       "location": "query",
65089	//       "type": "string"
65090	//     },
65091	//     "router": {
65092	//       "description": "Name of the Router resource to patch.",
65093	//       "location": "path",
65094	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65095	//       "required": true,
65096	//       "type": "string"
65097	//     }
65098	//   },
65099	//   "path": "{project}/regions/{region}/routers/{router}",
65100	//   "request": {
65101	//     "$ref": "Router"
65102	//   },
65103	//   "response": {
65104	//     "$ref": "Operation"
65105	//   },
65106	//   "scopes": [
65107	//     "https://www.googleapis.com/auth/cloud-platform",
65108	//     "https://www.googleapis.com/auth/compute"
65109	//   ]
65110	// }
65111
65112}
65113
65114// method id "compute.routers.preview":
65115
65116type RoutersPreviewCall struct {
65117	s          *Service
65118	project    string
65119	region     string
65120	router     string
65121	router2    *Router
65122	urlParams_ gensupport.URLParams
65123	ctx_       context.Context
65124	header_    http.Header
65125}
65126
65127// Preview: Preview fields auto-generated during router create and
65128// update operations. Calling this method does NOT create or update the
65129// router.
65130func (r *RoutersService) Preview(project string, region string, router string, router2 *Router) *RoutersPreviewCall {
65131	c := &RoutersPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)}
65132	c.project = project
65133	c.region = region
65134	c.router = router
65135	c.router2 = router2
65136	return c
65137}
65138
65139// Fields allows partial responses to be retrieved. See
65140// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
65141// for more information.
65142func (c *RoutersPreviewCall) Fields(s ...googleapi.Field) *RoutersPreviewCall {
65143	c.urlParams_.Set("fields", googleapi.CombineFields(s))
65144	return c
65145}
65146
65147// Context sets the context to be used in this call's Do method. Any
65148// pending HTTP request will be aborted if the provided context is
65149// canceled.
65150func (c *RoutersPreviewCall) Context(ctx context.Context) *RoutersPreviewCall {
65151	c.ctx_ = ctx
65152	return c
65153}
65154
65155// Header returns an http.Header that can be modified by the caller to
65156// add HTTP headers to the request.
65157func (c *RoutersPreviewCall) Header() http.Header {
65158	if c.header_ == nil {
65159		c.header_ = make(http.Header)
65160	}
65161	return c.header_
65162}
65163
65164func (c *RoutersPreviewCall) doRequest(alt string) (*http.Response, error) {
65165	reqHeaders := make(http.Header)
65166	for k, v := range c.header_ {
65167		reqHeaders[k] = v
65168	}
65169	reqHeaders.Set("User-Agent", c.s.userAgent())
65170	var body io.Reader = nil
65171	body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2)
65172	if err != nil {
65173		return nil, err
65174	}
65175	reqHeaders.Set("Content-Type", "application/json")
65176	c.urlParams_.Set("alt", alt)
65177	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/preview")
65178	urls += "?" + c.urlParams_.Encode()
65179	req, _ := http.NewRequest("POST", urls, body)
65180	req.Header = reqHeaders
65181	googleapi.Expand(req.URL, map[string]string{
65182		"project": c.project,
65183		"region":  c.region,
65184		"router":  c.router,
65185	})
65186	return gensupport.SendRequest(c.ctx_, c.s.client, req)
65187}
65188
65189// Do executes the "compute.routers.preview" call.
65190// Exactly one of *RoutersPreviewResponse or error will be non-nil. Any
65191// non-2xx status code is an error. Response headers are in either
65192// *RoutersPreviewResponse.ServerResponse.Header or (if a response was
65193// returned at all) in error.(*googleapi.Error).Header. Use
65194// googleapi.IsNotModified to check whether the returned error was
65195// because http.StatusNotModified was returned.
65196func (c *RoutersPreviewCall) Do(opts ...googleapi.CallOption) (*RoutersPreviewResponse, error) {
65197	gensupport.SetOptions(c.urlParams_, opts...)
65198	res, err := c.doRequest("json")
65199	if res != nil && res.StatusCode == http.StatusNotModified {
65200		if res.Body != nil {
65201			res.Body.Close()
65202		}
65203		return nil, &googleapi.Error{
65204			Code:   res.StatusCode,
65205			Header: res.Header,
65206		}
65207	}
65208	if err != nil {
65209		return nil, err
65210	}
65211	defer googleapi.CloseBody(res)
65212	if err := googleapi.CheckResponse(res); err != nil {
65213		return nil, err
65214	}
65215	ret := &RoutersPreviewResponse{
65216		ServerResponse: googleapi.ServerResponse{
65217			Header:         res.Header,
65218			HTTPStatusCode: res.StatusCode,
65219		},
65220	}
65221	target := &ret
65222	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
65223		return nil, err
65224	}
65225	return ret, nil
65226	// {
65227	//   "description": "Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.",
65228	//   "httpMethod": "POST",
65229	//   "id": "compute.routers.preview",
65230	//   "parameterOrder": [
65231	//     "project",
65232	//     "region",
65233	//     "router"
65234	//   ],
65235	//   "parameters": {
65236	//     "project": {
65237	//       "description": "Project ID for this request.",
65238	//       "location": "path",
65239	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
65240	//       "required": true,
65241	//       "type": "string"
65242	//     },
65243	//     "region": {
65244	//       "description": "Name of the region for this request.",
65245	//       "location": "path",
65246	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65247	//       "required": true,
65248	//       "type": "string"
65249	//     },
65250	//     "router": {
65251	//       "description": "Name of the Router resource to query.",
65252	//       "location": "path",
65253	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65254	//       "required": true,
65255	//       "type": "string"
65256	//     }
65257	//   },
65258	//   "path": "{project}/regions/{region}/routers/{router}/preview",
65259	//   "request": {
65260	//     "$ref": "Router"
65261	//   },
65262	//   "response": {
65263	//     "$ref": "RoutersPreviewResponse"
65264	//   },
65265	//   "scopes": [
65266	//     "https://www.googleapis.com/auth/cloud-platform",
65267	//     "https://www.googleapis.com/auth/compute",
65268	//     "https://www.googleapis.com/auth/compute.readonly"
65269	//   ]
65270	// }
65271
65272}
65273
65274// method id "compute.routers.testIamPermissions":
65275
65276type RoutersTestIamPermissionsCall struct {
65277	s                      *Service
65278	project                string
65279	region                 string
65280	resource               string
65281	testpermissionsrequest *TestPermissionsRequest
65282	urlParams_             gensupport.URLParams
65283	ctx_                   context.Context
65284	header_                http.Header
65285}
65286
65287// TestIamPermissions: Returns permissions that a caller has on the
65288// specified resource.
65289func (r *RoutersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutersTestIamPermissionsCall {
65290	c := &RoutersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
65291	c.project = project
65292	c.region = region
65293	c.resource = resource
65294	c.testpermissionsrequest = testpermissionsrequest
65295	return c
65296}
65297
65298// Fields allows partial responses to be retrieved. See
65299// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
65300// for more information.
65301func (c *RoutersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutersTestIamPermissionsCall {
65302	c.urlParams_.Set("fields", googleapi.CombineFields(s))
65303	return c
65304}
65305
65306// Context sets the context to be used in this call's Do method. Any
65307// pending HTTP request will be aborted if the provided context is
65308// canceled.
65309func (c *RoutersTestIamPermissionsCall) Context(ctx context.Context) *RoutersTestIamPermissionsCall {
65310	c.ctx_ = ctx
65311	return c
65312}
65313
65314// Header returns an http.Header that can be modified by the caller to
65315// add HTTP headers to the request.
65316func (c *RoutersTestIamPermissionsCall) Header() http.Header {
65317	if c.header_ == nil {
65318		c.header_ = make(http.Header)
65319	}
65320	return c.header_
65321}
65322
65323func (c *RoutersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
65324	reqHeaders := make(http.Header)
65325	for k, v := range c.header_ {
65326		reqHeaders[k] = v
65327	}
65328	reqHeaders.Set("User-Agent", c.s.userAgent())
65329	var body io.Reader = nil
65330	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
65331	if err != nil {
65332		return nil, err
65333	}
65334	reqHeaders.Set("Content-Type", "application/json")
65335	c.urlParams_.Set("alt", alt)
65336	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{resource}/testIamPermissions")
65337	urls += "?" + c.urlParams_.Encode()
65338	req, _ := http.NewRequest("POST", urls, body)
65339	req.Header = reqHeaders
65340	googleapi.Expand(req.URL, map[string]string{
65341		"project":  c.project,
65342		"region":   c.region,
65343		"resource": c.resource,
65344	})
65345	return gensupport.SendRequest(c.ctx_, c.s.client, req)
65346}
65347
65348// Do executes the "compute.routers.testIamPermissions" call.
65349// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
65350// non-2xx status code is an error. Response headers are in either
65351// *TestPermissionsResponse.ServerResponse.Header or (if a response was
65352// returned at all) in error.(*googleapi.Error).Header. Use
65353// googleapi.IsNotModified to check whether the returned error was
65354// because http.StatusNotModified was returned.
65355func (c *RoutersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
65356	gensupport.SetOptions(c.urlParams_, opts...)
65357	res, err := c.doRequest("json")
65358	if res != nil && res.StatusCode == http.StatusNotModified {
65359		if res.Body != nil {
65360			res.Body.Close()
65361		}
65362		return nil, &googleapi.Error{
65363			Code:   res.StatusCode,
65364			Header: res.Header,
65365		}
65366	}
65367	if err != nil {
65368		return nil, err
65369	}
65370	defer googleapi.CloseBody(res)
65371	if err := googleapi.CheckResponse(res); err != nil {
65372		return nil, err
65373	}
65374	ret := &TestPermissionsResponse{
65375		ServerResponse: googleapi.ServerResponse{
65376			Header:         res.Header,
65377			HTTPStatusCode: res.StatusCode,
65378		},
65379	}
65380	target := &ret
65381	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
65382		return nil, err
65383	}
65384	return ret, nil
65385	// {
65386	//   "description": "Returns permissions that a caller has on the specified resource.",
65387	//   "httpMethod": "POST",
65388	//   "id": "compute.routers.testIamPermissions",
65389	//   "parameterOrder": [
65390	//     "project",
65391	//     "region",
65392	//     "resource"
65393	//   ],
65394	//   "parameters": {
65395	//     "project": {
65396	//       "description": "Project ID for this request.",
65397	//       "location": "path",
65398	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
65399	//       "required": true,
65400	//       "type": "string"
65401	//     },
65402	//     "region": {
65403	//       "description": "The name of the region for this request.",
65404	//       "location": "path",
65405	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65406	//       "required": true,
65407	//       "type": "string"
65408	//     },
65409	//     "resource": {
65410	//       "description": "Name of the resource for this request.",
65411	//       "location": "path",
65412	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65413	//       "required": true,
65414	//       "type": "string"
65415	//     }
65416	//   },
65417	//   "path": "{project}/regions/{region}/routers/{resource}/testIamPermissions",
65418	//   "request": {
65419	//     "$ref": "TestPermissionsRequest"
65420	//   },
65421	//   "response": {
65422	//     "$ref": "TestPermissionsResponse"
65423	//   },
65424	//   "scopes": [
65425	//     "https://www.googleapis.com/auth/cloud-platform",
65426	//     "https://www.googleapis.com/auth/compute",
65427	//     "https://www.googleapis.com/auth/compute.readonly"
65428	//   ]
65429	// }
65430
65431}
65432
65433// method id "compute.routers.update":
65434
65435type RoutersUpdateCall struct {
65436	s          *Service
65437	project    string
65438	region     string
65439	router     string
65440	router2    *Router
65441	urlParams_ gensupport.URLParams
65442	ctx_       context.Context
65443	header_    http.Header
65444}
65445
65446// Update: Updates the specified Router resource with the data included
65447// in the request.
65448func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall {
65449	c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
65450	c.project = project
65451	c.region = region
65452	c.router = router
65453	c.router2 = router2
65454	return c
65455}
65456
65457// RequestId sets the optional parameter "requestId": An optional
65458// request ID to identify requests. Specify a unique request ID so that
65459// if you must retry your request, the server will know to ignore the
65460// request if it has already been completed.
65461//
65462// For example, consider a situation where you make an initial request
65463// and the request times out. If you make the request again with the
65464// same request ID, the server can check if original operation with the
65465// same request ID was received, and if so, will ignore the second
65466// request. This prevents clients from accidentally creating duplicate
65467// commitments.
65468//
65469// The request ID must be a valid UUID with the exception that zero UUID
65470// is not supported (00000000-0000-0000-0000-000000000000).
65471func (c *RoutersUpdateCall) RequestId(requestId string) *RoutersUpdateCall {
65472	c.urlParams_.Set("requestId", requestId)
65473	return c
65474}
65475
65476// Fields allows partial responses to be retrieved. See
65477// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
65478// for more information.
65479func (c *RoutersUpdateCall) Fields(s ...googleapi.Field) *RoutersUpdateCall {
65480	c.urlParams_.Set("fields", googleapi.CombineFields(s))
65481	return c
65482}
65483
65484// Context sets the context to be used in this call's Do method. Any
65485// pending HTTP request will be aborted if the provided context is
65486// canceled.
65487func (c *RoutersUpdateCall) Context(ctx context.Context) *RoutersUpdateCall {
65488	c.ctx_ = ctx
65489	return c
65490}
65491
65492// Header returns an http.Header that can be modified by the caller to
65493// add HTTP headers to the request.
65494func (c *RoutersUpdateCall) Header() http.Header {
65495	if c.header_ == nil {
65496		c.header_ = make(http.Header)
65497	}
65498	return c.header_
65499}
65500
65501func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) {
65502	reqHeaders := make(http.Header)
65503	for k, v := range c.header_ {
65504		reqHeaders[k] = v
65505	}
65506	reqHeaders.Set("User-Agent", c.s.userAgent())
65507	var body io.Reader = nil
65508	body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2)
65509	if err != nil {
65510		return nil, err
65511	}
65512	reqHeaders.Set("Content-Type", "application/json")
65513	c.urlParams_.Set("alt", alt)
65514	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}")
65515	urls += "?" + c.urlParams_.Encode()
65516	req, _ := http.NewRequest("PUT", urls, body)
65517	req.Header = reqHeaders
65518	googleapi.Expand(req.URL, map[string]string{
65519		"project": c.project,
65520		"region":  c.region,
65521		"router":  c.router,
65522	})
65523	return gensupport.SendRequest(c.ctx_, c.s.client, req)
65524}
65525
65526// Do executes the "compute.routers.update" call.
65527// Exactly one of *Operation or error will be non-nil. Any non-2xx
65528// status code is an error. Response headers are in either
65529// *Operation.ServerResponse.Header or (if a response was returned at
65530// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
65531// to check whether the returned error was because
65532// http.StatusNotModified was returned.
65533func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
65534	gensupport.SetOptions(c.urlParams_, opts...)
65535	res, err := c.doRequest("json")
65536	if res != nil && res.StatusCode == http.StatusNotModified {
65537		if res.Body != nil {
65538			res.Body.Close()
65539		}
65540		return nil, &googleapi.Error{
65541			Code:   res.StatusCode,
65542			Header: res.Header,
65543		}
65544	}
65545	if err != nil {
65546		return nil, err
65547	}
65548	defer googleapi.CloseBody(res)
65549	if err := googleapi.CheckResponse(res); err != nil {
65550		return nil, err
65551	}
65552	ret := &Operation{
65553		ServerResponse: googleapi.ServerResponse{
65554			Header:         res.Header,
65555			HTTPStatusCode: res.StatusCode,
65556		},
65557	}
65558	target := &ret
65559	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
65560		return nil, err
65561	}
65562	return ret, nil
65563	// {
65564	//   "description": "Updates the specified Router resource with the data included in the request.",
65565	//   "httpMethod": "PUT",
65566	//   "id": "compute.routers.update",
65567	//   "parameterOrder": [
65568	//     "project",
65569	//     "region",
65570	//     "router"
65571	//   ],
65572	//   "parameters": {
65573	//     "project": {
65574	//       "description": "Project ID for this request.",
65575	//       "location": "path",
65576	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
65577	//       "required": true,
65578	//       "type": "string"
65579	//     },
65580	//     "region": {
65581	//       "description": "Name of the region for this request.",
65582	//       "location": "path",
65583	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65584	//       "required": true,
65585	//       "type": "string"
65586	//     },
65587	//     "requestId": {
65588	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
65589	//       "location": "query",
65590	//       "type": "string"
65591	//     },
65592	//     "router": {
65593	//       "description": "Name of the Router resource to update.",
65594	//       "location": "path",
65595	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65596	//       "required": true,
65597	//       "type": "string"
65598	//     }
65599	//   },
65600	//   "path": "{project}/regions/{region}/routers/{router}",
65601	//   "request": {
65602	//     "$ref": "Router"
65603	//   },
65604	//   "response": {
65605	//     "$ref": "Operation"
65606	//   },
65607	//   "scopes": [
65608	//     "https://www.googleapis.com/auth/cloud-platform",
65609	//     "https://www.googleapis.com/auth/compute"
65610	//   ]
65611	// }
65612
65613}
65614
65615// method id "compute.routes.delete":
65616
65617type RoutesDeleteCall struct {
65618	s          *Service
65619	project    string
65620	route      string
65621	urlParams_ gensupport.URLParams
65622	ctx_       context.Context
65623	header_    http.Header
65624}
65625
65626// Delete: Deletes the specified Route resource.
65627// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete
65628func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall {
65629	c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
65630	c.project = project
65631	c.route = route
65632	return c
65633}
65634
65635// RequestId sets the optional parameter "requestId": An optional
65636// request ID to identify requests. Specify a unique request ID so that
65637// if you must retry your request, the server will know to ignore the
65638// request if it has already been completed.
65639//
65640// For example, consider a situation where you make an initial request
65641// and the request times out. If you make the request again with the
65642// same request ID, the server can check if original operation with the
65643// same request ID was received, and if so, will ignore the second
65644// request. This prevents clients from accidentally creating duplicate
65645// commitments.
65646//
65647// The request ID must be a valid UUID with the exception that zero UUID
65648// is not supported (00000000-0000-0000-0000-000000000000).
65649func (c *RoutesDeleteCall) RequestId(requestId string) *RoutesDeleteCall {
65650	c.urlParams_.Set("requestId", requestId)
65651	return c
65652}
65653
65654// Fields allows partial responses to be retrieved. See
65655// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
65656// for more information.
65657func (c *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall {
65658	c.urlParams_.Set("fields", googleapi.CombineFields(s))
65659	return c
65660}
65661
65662// Context sets the context to be used in this call's Do method. Any
65663// pending HTTP request will be aborted if the provided context is
65664// canceled.
65665func (c *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall {
65666	c.ctx_ = ctx
65667	return c
65668}
65669
65670// Header returns an http.Header that can be modified by the caller to
65671// add HTTP headers to the request.
65672func (c *RoutesDeleteCall) Header() http.Header {
65673	if c.header_ == nil {
65674		c.header_ = make(http.Header)
65675	}
65676	return c.header_
65677}
65678
65679func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
65680	reqHeaders := make(http.Header)
65681	for k, v := range c.header_ {
65682		reqHeaders[k] = v
65683	}
65684	reqHeaders.Set("User-Agent", c.s.userAgent())
65685	var body io.Reader = nil
65686	c.urlParams_.Set("alt", alt)
65687	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}")
65688	urls += "?" + c.urlParams_.Encode()
65689	req, _ := http.NewRequest("DELETE", urls, body)
65690	req.Header = reqHeaders
65691	googleapi.Expand(req.URL, map[string]string{
65692		"project": c.project,
65693		"route":   c.route,
65694	})
65695	return gensupport.SendRequest(c.ctx_, c.s.client, req)
65696}
65697
65698// Do executes the "compute.routes.delete" call.
65699// Exactly one of *Operation or error will be non-nil. Any non-2xx
65700// status code is an error. Response headers are in either
65701// *Operation.ServerResponse.Header or (if a response was returned at
65702// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
65703// to check whether the returned error was because
65704// http.StatusNotModified was returned.
65705func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
65706	gensupport.SetOptions(c.urlParams_, opts...)
65707	res, err := c.doRequest("json")
65708	if res != nil && res.StatusCode == http.StatusNotModified {
65709		if res.Body != nil {
65710			res.Body.Close()
65711		}
65712		return nil, &googleapi.Error{
65713			Code:   res.StatusCode,
65714			Header: res.Header,
65715		}
65716	}
65717	if err != nil {
65718		return nil, err
65719	}
65720	defer googleapi.CloseBody(res)
65721	if err := googleapi.CheckResponse(res); err != nil {
65722		return nil, err
65723	}
65724	ret := &Operation{
65725		ServerResponse: googleapi.ServerResponse{
65726			Header:         res.Header,
65727			HTTPStatusCode: res.StatusCode,
65728		},
65729	}
65730	target := &ret
65731	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
65732		return nil, err
65733	}
65734	return ret, nil
65735	// {
65736	//   "description": "Deletes the specified Route resource.",
65737	//   "httpMethod": "DELETE",
65738	//   "id": "compute.routes.delete",
65739	//   "parameterOrder": [
65740	//     "project",
65741	//     "route"
65742	//   ],
65743	//   "parameters": {
65744	//     "project": {
65745	//       "description": "Project ID for this request.",
65746	//       "location": "path",
65747	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
65748	//       "required": true,
65749	//       "type": "string"
65750	//     },
65751	//     "requestId": {
65752	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
65753	//       "location": "query",
65754	//       "type": "string"
65755	//     },
65756	//     "route": {
65757	//       "description": "Name of the Route resource to delete.",
65758	//       "location": "path",
65759	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65760	//       "required": true,
65761	//       "type": "string"
65762	//     }
65763	//   },
65764	//   "path": "{project}/global/routes/{route}",
65765	//   "response": {
65766	//     "$ref": "Operation"
65767	//   },
65768	//   "scopes": [
65769	//     "https://www.googleapis.com/auth/cloud-platform",
65770	//     "https://www.googleapis.com/auth/compute"
65771	//   ]
65772	// }
65773
65774}
65775
65776// method id "compute.routes.get":
65777
65778type RoutesGetCall struct {
65779	s            *Service
65780	project      string
65781	route        string
65782	urlParams_   gensupport.URLParams
65783	ifNoneMatch_ string
65784	ctx_         context.Context
65785	header_      http.Header
65786}
65787
65788// Get: Returns the specified Route resource. Get a list of available
65789// routes by making a list() request.
65790// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get
65791func (r *RoutesService) Get(project string, route string) *RoutesGetCall {
65792	c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
65793	c.project = project
65794	c.route = route
65795	return c
65796}
65797
65798// Fields allows partial responses to be retrieved. See
65799// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
65800// for more information.
65801func (c *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall {
65802	c.urlParams_.Set("fields", googleapi.CombineFields(s))
65803	return c
65804}
65805
65806// IfNoneMatch sets the optional parameter which makes the operation
65807// fail if the object's ETag matches the given value. This is useful for
65808// getting updates only after the object has changed since the last
65809// request. Use googleapi.IsNotModified to check whether the response
65810// error from Do is the result of In-None-Match.
65811func (c *RoutesGetCall) IfNoneMatch(entityTag string) *RoutesGetCall {
65812	c.ifNoneMatch_ = entityTag
65813	return c
65814}
65815
65816// Context sets the context to be used in this call's Do method. Any
65817// pending HTTP request will be aborted if the provided context is
65818// canceled.
65819func (c *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall {
65820	c.ctx_ = ctx
65821	return c
65822}
65823
65824// Header returns an http.Header that can be modified by the caller to
65825// add HTTP headers to the request.
65826func (c *RoutesGetCall) Header() http.Header {
65827	if c.header_ == nil {
65828		c.header_ = make(http.Header)
65829	}
65830	return c.header_
65831}
65832
65833func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) {
65834	reqHeaders := make(http.Header)
65835	for k, v := range c.header_ {
65836		reqHeaders[k] = v
65837	}
65838	reqHeaders.Set("User-Agent", c.s.userAgent())
65839	if c.ifNoneMatch_ != "" {
65840		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
65841	}
65842	var body io.Reader = nil
65843	c.urlParams_.Set("alt", alt)
65844	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}")
65845	urls += "?" + c.urlParams_.Encode()
65846	req, _ := http.NewRequest("GET", urls, body)
65847	req.Header = reqHeaders
65848	googleapi.Expand(req.URL, map[string]string{
65849		"project": c.project,
65850		"route":   c.route,
65851	})
65852	return gensupport.SendRequest(c.ctx_, c.s.client, req)
65853}
65854
65855// Do executes the "compute.routes.get" call.
65856// Exactly one of *Route or error will be non-nil. Any non-2xx status
65857// code is an error. Response headers are in either
65858// *Route.ServerResponse.Header or (if a response was returned at all)
65859// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
65860// check whether the returned error was because http.StatusNotModified
65861// was returned.
65862func (c *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) {
65863	gensupport.SetOptions(c.urlParams_, opts...)
65864	res, err := c.doRequest("json")
65865	if res != nil && res.StatusCode == http.StatusNotModified {
65866		if res.Body != nil {
65867			res.Body.Close()
65868		}
65869		return nil, &googleapi.Error{
65870			Code:   res.StatusCode,
65871			Header: res.Header,
65872		}
65873	}
65874	if err != nil {
65875		return nil, err
65876	}
65877	defer googleapi.CloseBody(res)
65878	if err := googleapi.CheckResponse(res); err != nil {
65879		return nil, err
65880	}
65881	ret := &Route{
65882		ServerResponse: googleapi.ServerResponse{
65883			Header:         res.Header,
65884			HTTPStatusCode: res.StatusCode,
65885		},
65886	}
65887	target := &ret
65888	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
65889		return nil, err
65890	}
65891	return ret, nil
65892	// {
65893	//   "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.",
65894	//   "httpMethod": "GET",
65895	//   "id": "compute.routes.get",
65896	//   "parameterOrder": [
65897	//     "project",
65898	//     "route"
65899	//   ],
65900	//   "parameters": {
65901	//     "project": {
65902	//       "description": "Project ID for this request.",
65903	//       "location": "path",
65904	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
65905	//       "required": true,
65906	//       "type": "string"
65907	//     },
65908	//     "route": {
65909	//       "description": "Name of the Route resource to return.",
65910	//       "location": "path",
65911	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
65912	//       "required": true,
65913	//       "type": "string"
65914	//     }
65915	//   },
65916	//   "path": "{project}/global/routes/{route}",
65917	//   "response": {
65918	//     "$ref": "Route"
65919	//   },
65920	//   "scopes": [
65921	//     "https://www.googleapis.com/auth/cloud-platform",
65922	//     "https://www.googleapis.com/auth/compute",
65923	//     "https://www.googleapis.com/auth/compute.readonly"
65924	//   ]
65925	// }
65926
65927}
65928
65929// method id "compute.routes.insert":
65930
65931type RoutesInsertCall struct {
65932	s          *Service
65933	project    string
65934	route      *Route
65935	urlParams_ gensupport.URLParams
65936	ctx_       context.Context
65937	header_    http.Header
65938}
65939
65940// Insert: Creates a Route resource in the specified project using the
65941// data included in the request.
65942// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert
65943func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall {
65944	c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
65945	c.project = project
65946	c.route = route
65947	return c
65948}
65949
65950// RequestId sets the optional parameter "requestId": An optional
65951// request ID to identify requests. Specify a unique request ID so that
65952// if you must retry your request, the server will know to ignore the
65953// request if it has already been completed.
65954//
65955// For example, consider a situation where you make an initial request
65956// and the request times out. If you make the request again with the
65957// same request ID, the server can check if original operation with the
65958// same request ID was received, and if so, will ignore the second
65959// request. This prevents clients from accidentally creating duplicate
65960// commitments.
65961//
65962// The request ID must be a valid UUID with the exception that zero UUID
65963// is not supported (00000000-0000-0000-0000-000000000000).
65964func (c *RoutesInsertCall) RequestId(requestId string) *RoutesInsertCall {
65965	c.urlParams_.Set("requestId", requestId)
65966	return c
65967}
65968
65969// Fields allows partial responses to be retrieved. See
65970// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
65971// for more information.
65972func (c *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall {
65973	c.urlParams_.Set("fields", googleapi.CombineFields(s))
65974	return c
65975}
65976
65977// Context sets the context to be used in this call's Do method. Any
65978// pending HTTP request will be aborted if the provided context is
65979// canceled.
65980func (c *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall {
65981	c.ctx_ = ctx
65982	return c
65983}
65984
65985// Header returns an http.Header that can be modified by the caller to
65986// add HTTP headers to the request.
65987func (c *RoutesInsertCall) Header() http.Header {
65988	if c.header_ == nil {
65989		c.header_ = make(http.Header)
65990	}
65991	return c.header_
65992}
65993
65994func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) {
65995	reqHeaders := make(http.Header)
65996	for k, v := range c.header_ {
65997		reqHeaders[k] = v
65998	}
65999	reqHeaders.Set("User-Agent", c.s.userAgent())
66000	var body io.Reader = nil
66001	body, err := googleapi.WithoutDataWrapper.JSONReader(c.route)
66002	if err != nil {
66003		return nil, err
66004	}
66005	reqHeaders.Set("Content-Type", "application/json")
66006	c.urlParams_.Set("alt", alt)
66007	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes")
66008	urls += "?" + c.urlParams_.Encode()
66009	req, _ := http.NewRequest("POST", urls, body)
66010	req.Header = reqHeaders
66011	googleapi.Expand(req.URL, map[string]string{
66012		"project": c.project,
66013	})
66014	return gensupport.SendRequest(c.ctx_, c.s.client, req)
66015}
66016
66017// Do executes the "compute.routes.insert" call.
66018// Exactly one of *Operation or error will be non-nil. Any non-2xx
66019// status code is an error. Response headers are in either
66020// *Operation.ServerResponse.Header or (if a response was returned at
66021// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
66022// to check whether the returned error was because
66023// http.StatusNotModified was returned.
66024func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
66025	gensupport.SetOptions(c.urlParams_, opts...)
66026	res, err := c.doRequest("json")
66027	if res != nil && res.StatusCode == http.StatusNotModified {
66028		if res.Body != nil {
66029			res.Body.Close()
66030		}
66031		return nil, &googleapi.Error{
66032			Code:   res.StatusCode,
66033			Header: res.Header,
66034		}
66035	}
66036	if err != nil {
66037		return nil, err
66038	}
66039	defer googleapi.CloseBody(res)
66040	if err := googleapi.CheckResponse(res); err != nil {
66041		return nil, err
66042	}
66043	ret := &Operation{
66044		ServerResponse: googleapi.ServerResponse{
66045			Header:         res.Header,
66046			HTTPStatusCode: res.StatusCode,
66047		},
66048	}
66049	target := &ret
66050	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
66051		return nil, err
66052	}
66053	return ret, nil
66054	// {
66055	//   "description": "Creates a Route resource in the specified project using the data included in the request.",
66056	//   "httpMethod": "POST",
66057	//   "id": "compute.routes.insert",
66058	//   "parameterOrder": [
66059	//     "project"
66060	//   ],
66061	//   "parameters": {
66062	//     "project": {
66063	//       "description": "Project ID for this request.",
66064	//       "location": "path",
66065	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
66066	//       "required": true,
66067	//       "type": "string"
66068	//     },
66069	//     "requestId": {
66070	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
66071	//       "location": "query",
66072	//       "type": "string"
66073	//     }
66074	//   },
66075	//   "path": "{project}/global/routes",
66076	//   "request": {
66077	//     "$ref": "Route"
66078	//   },
66079	//   "response": {
66080	//     "$ref": "Operation"
66081	//   },
66082	//   "scopes": [
66083	//     "https://www.googleapis.com/auth/cloud-platform",
66084	//     "https://www.googleapis.com/auth/compute"
66085	//   ]
66086	// }
66087
66088}
66089
66090// method id "compute.routes.list":
66091
66092type RoutesListCall struct {
66093	s            *Service
66094	project      string
66095	urlParams_   gensupport.URLParams
66096	ifNoneMatch_ string
66097	ctx_         context.Context
66098	header_      http.Header
66099}
66100
66101// List: Retrieves the list of Route resources available to the
66102// specified project.
66103// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list
66104func (r *RoutesService) List(project string) *RoutesListCall {
66105	c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
66106	c.project = project
66107	return c
66108}
66109
66110// Filter sets the optional parameter "filter": Sets a filter
66111// {expression} for filtering listed resources. Your {expression} must
66112// be in the format: field_name comparison_string literal_string.
66113//
66114// The field_name is the name of the field you want to compare. Only
66115// atomic field types are supported (string, number, boolean). The
66116// comparison_string must be either eq (equals) or ne (not equals). The
66117// literal_string is the string value to filter to. The literal value
66118// must be valid for the type of field you are filtering by (string,
66119// number, boolean). For string fields, the literal value is interpreted
66120// as a regular expression using RE2 syntax. The literal value must
66121// match the entire field.
66122//
66123// For example, to filter for instances that do not have a name of
66124// example-instance, you would use name ne example-instance.
66125//
66126// You can filter on nested fields. For example, you could filter on
66127// instances that have set the scheduling.automaticRestart field to
66128// true. Use filtering on nested fields to take advantage of labels to
66129// organize and search for results based on label values.
66130//
66131// To filter on multiple expressions, provide each separate expression
66132// within parentheses. For example, (scheduling.automaticRestart eq
66133// true) (zone eq us-central1-f). Multiple expressions are treated as
66134// AND expressions, meaning that resources must match all expressions to
66135// pass the filters.
66136func (c *RoutesListCall) Filter(filter string) *RoutesListCall {
66137	c.urlParams_.Set("filter", filter)
66138	return c
66139}
66140
66141// MaxResults sets the optional parameter "maxResults": The maximum
66142// number of results per page that should be returned. If the number of
66143// available results is larger than maxResults, Compute Engine returns a
66144// nextPageToken that can be used to get the next page of results in
66145// subsequent list requests. Acceptable values are 0 to 500, inclusive.
66146// (Default: 500)
66147func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall {
66148	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
66149	return c
66150}
66151
66152// OrderBy sets the optional parameter "orderBy": Sorts list results by
66153// a certain order. By default, results are returned in alphanumerical
66154// order based on the resource name.
66155//
66156// You can also sort results in descending order based on the creation
66157// timestamp using orderBy="creationTimestamp desc". This sorts results
66158// based on the creationTimestamp field in reverse chronological order
66159// (newest result first). Use this to sort resources like operations so
66160// that the newest operation is returned first.
66161//
66162// Currently, only sorting by name or creationTimestamp desc is
66163// supported.
66164func (c *RoutesListCall) OrderBy(orderBy string) *RoutesListCall {
66165	c.urlParams_.Set("orderBy", orderBy)
66166	return c
66167}
66168
66169// PageToken sets the optional parameter "pageToken": Specifies a page
66170// token to use. Set pageToken to the nextPageToken returned by a
66171// previous list request to get the next page of results.
66172func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall {
66173	c.urlParams_.Set("pageToken", pageToken)
66174	return c
66175}
66176
66177// Fields allows partial responses to be retrieved. See
66178// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
66179// for more information.
66180func (c *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall {
66181	c.urlParams_.Set("fields", googleapi.CombineFields(s))
66182	return c
66183}
66184
66185// IfNoneMatch sets the optional parameter which makes the operation
66186// fail if the object's ETag matches the given value. This is useful for
66187// getting updates only after the object has changed since the last
66188// request. Use googleapi.IsNotModified to check whether the response
66189// error from Do is the result of In-None-Match.
66190func (c *RoutesListCall) IfNoneMatch(entityTag string) *RoutesListCall {
66191	c.ifNoneMatch_ = entityTag
66192	return c
66193}
66194
66195// Context sets the context to be used in this call's Do method. Any
66196// pending HTTP request will be aborted if the provided context is
66197// canceled.
66198func (c *RoutesListCall) Context(ctx context.Context) *RoutesListCall {
66199	c.ctx_ = ctx
66200	return c
66201}
66202
66203// Header returns an http.Header that can be modified by the caller to
66204// add HTTP headers to the request.
66205func (c *RoutesListCall) Header() http.Header {
66206	if c.header_ == nil {
66207		c.header_ = make(http.Header)
66208	}
66209	return c.header_
66210}
66211
66212func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) {
66213	reqHeaders := make(http.Header)
66214	for k, v := range c.header_ {
66215		reqHeaders[k] = v
66216	}
66217	reqHeaders.Set("User-Agent", c.s.userAgent())
66218	if c.ifNoneMatch_ != "" {
66219		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
66220	}
66221	var body io.Reader = nil
66222	c.urlParams_.Set("alt", alt)
66223	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes")
66224	urls += "?" + c.urlParams_.Encode()
66225	req, _ := http.NewRequest("GET", urls, body)
66226	req.Header = reqHeaders
66227	googleapi.Expand(req.URL, map[string]string{
66228		"project": c.project,
66229	})
66230	return gensupport.SendRequest(c.ctx_, c.s.client, req)
66231}
66232
66233// Do executes the "compute.routes.list" call.
66234// Exactly one of *RouteList or error will be non-nil. Any non-2xx
66235// status code is an error. Response headers are in either
66236// *RouteList.ServerResponse.Header or (if a response was returned at
66237// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
66238// to check whether the returned error was because
66239// http.StatusNotModified was returned.
66240func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, error) {
66241	gensupport.SetOptions(c.urlParams_, opts...)
66242	res, err := c.doRequest("json")
66243	if res != nil && res.StatusCode == http.StatusNotModified {
66244		if res.Body != nil {
66245			res.Body.Close()
66246		}
66247		return nil, &googleapi.Error{
66248			Code:   res.StatusCode,
66249			Header: res.Header,
66250		}
66251	}
66252	if err != nil {
66253		return nil, err
66254	}
66255	defer googleapi.CloseBody(res)
66256	if err := googleapi.CheckResponse(res); err != nil {
66257		return nil, err
66258	}
66259	ret := &RouteList{
66260		ServerResponse: googleapi.ServerResponse{
66261			Header:         res.Header,
66262			HTTPStatusCode: res.StatusCode,
66263		},
66264	}
66265	target := &ret
66266	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
66267		return nil, err
66268	}
66269	return ret, nil
66270	// {
66271	//   "description": "Retrieves the list of Route resources available to the specified project.",
66272	//   "httpMethod": "GET",
66273	//   "id": "compute.routes.list",
66274	//   "parameterOrder": [
66275	//     "project"
66276	//   ],
66277	//   "parameters": {
66278	//     "filter": {
66279	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
66280	//       "location": "query",
66281	//       "type": "string"
66282	//     },
66283	//     "maxResults": {
66284	//       "default": "500",
66285	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
66286	//       "format": "uint32",
66287	//       "location": "query",
66288	//       "minimum": "0",
66289	//       "type": "integer"
66290	//     },
66291	//     "orderBy": {
66292	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
66293	//       "location": "query",
66294	//       "type": "string"
66295	//     },
66296	//     "pageToken": {
66297	//       "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.",
66298	//       "location": "query",
66299	//       "type": "string"
66300	//     },
66301	//     "project": {
66302	//       "description": "Project ID for this request.",
66303	//       "location": "path",
66304	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
66305	//       "required": true,
66306	//       "type": "string"
66307	//     }
66308	//   },
66309	//   "path": "{project}/global/routes",
66310	//   "response": {
66311	//     "$ref": "RouteList"
66312	//   },
66313	//   "scopes": [
66314	//     "https://www.googleapis.com/auth/cloud-platform",
66315	//     "https://www.googleapis.com/auth/compute",
66316	//     "https://www.googleapis.com/auth/compute.readonly"
66317	//   ]
66318	// }
66319
66320}
66321
66322// Pages invokes f for each page of results.
66323// A non-nil error returned from f will halt the iteration.
66324// The provided context supersedes any context provided to the Context method.
66325func (c *RoutesListCall) Pages(ctx context.Context, f func(*RouteList) error) error {
66326	c.ctx_ = ctx
66327	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
66328	for {
66329		x, err := c.Do()
66330		if err != nil {
66331			return err
66332		}
66333		if err := f(x); err != nil {
66334			return err
66335		}
66336		if x.NextPageToken == "" {
66337			return nil
66338		}
66339		c.PageToken(x.NextPageToken)
66340	}
66341}
66342
66343// method id "compute.routes.testIamPermissions":
66344
66345type RoutesTestIamPermissionsCall struct {
66346	s                      *Service
66347	project                string
66348	resource               string
66349	testpermissionsrequest *TestPermissionsRequest
66350	urlParams_             gensupport.URLParams
66351	ctx_                   context.Context
66352	header_                http.Header
66353}
66354
66355// TestIamPermissions: Returns permissions that a caller has on the
66356// specified resource.
66357func (r *RoutesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutesTestIamPermissionsCall {
66358	c := &RoutesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
66359	c.project = project
66360	c.resource = resource
66361	c.testpermissionsrequest = testpermissionsrequest
66362	return c
66363}
66364
66365// Fields allows partial responses to be retrieved. See
66366// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
66367// for more information.
66368func (c *RoutesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutesTestIamPermissionsCall {
66369	c.urlParams_.Set("fields", googleapi.CombineFields(s))
66370	return c
66371}
66372
66373// Context sets the context to be used in this call's Do method. Any
66374// pending HTTP request will be aborted if the provided context is
66375// canceled.
66376func (c *RoutesTestIamPermissionsCall) Context(ctx context.Context) *RoutesTestIamPermissionsCall {
66377	c.ctx_ = ctx
66378	return c
66379}
66380
66381// Header returns an http.Header that can be modified by the caller to
66382// add HTTP headers to the request.
66383func (c *RoutesTestIamPermissionsCall) Header() http.Header {
66384	if c.header_ == nil {
66385		c.header_ = make(http.Header)
66386	}
66387	return c.header_
66388}
66389
66390func (c *RoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
66391	reqHeaders := make(http.Header)
66392	for k, v := range c.header_ {
66393		reqHeaders[k] = v
66394	}
66395	reqHeaders.Set("User-Agent", c.s.userAgent())
66396	var body io.Reader = nil
66397	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
66398	if err != nil {
66399		return nil, err
66400	}
66401	reqHeaders.Set("Content-Type", "application/json")
66402	c.urlParams_.Set("alt", alt)
66403	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{resource}/testIamPermissions")
66404	urls += "?" + c.urlParams_.Encode()
66405	req, _ := http.NewRequest("POST", urls, body)
66406	req.Header = reqHeaders
66407	googleapi.Expand(req.URL, map[string]string{
66408		"project":  c.project,
66409		"resource": c.resource,
66410	})
66411	return gensupport.SendRequest(c.ctx_, c.s.client, req)
66412}
66413
66414// Do executes the "compute.routes.testIamPermissions" call.
66415// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
66416// non-2xx status code is an error. Response headers are in either
66417// *TestPermissionsResponse.ServerResponse.Header or (if a response was
66418// returned at all) in error.(*googleapi.Error).Header. Use
66419// googleapi.IsNotModified to check whether the returned error was
66420// because http.StatusNotModified was returned.
66421func (c *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
66422	gensupport.SetOptions(c.urlParams_, opts...)
66423	res, err := c.doRequest("json")
66424	if res != nil && res.StatusCode == http.StatusNotModified {
66425		if res.Body != nil {
66426			res.Body.Close()
66427		}
66428		return nil, &googleapi.Error{
66429			Code:   res.StatusCode,
66430			Header: res.Header,
66431		}
66432	}
66433	if err != nil {
66434		return nil, err
66435	}
66436	defer googleapi.CloseBody(res)
66437	if err := googleapi.CheckResponse(res); err != nil {
66438		return nil, err
66439	}
66440	ret := &TestPermissionsResponse{
66441		ServerResponse: googleapi.ServerResponse{
66442			Header:         res.Header,
66443			HTTPStatusCode: res.StatusCode,
66444		},
66445	}
66446	target := &ret
66447	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
66448		return nil, err
66449	}
66450	return ret, nil
66451	// {
66452	//   "description": "Returns permissions that a caller has on the specified resource.",
66453	//   "httpMethod": "POST",
66454	//   "id": "compute.routes.testIamPermissions",
66455	//   "parameterOrder": [
66456	//     "project",
66457	//     "resource"
66458	//   ],
66459	//   "parameters": {
66460	//     "project": {
66461	//       "description": "Project ID for this request.",
66462	//       "location": "path",
66463	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
66464	//       "required": true,
66465	//       "type": "string"
66466	//     },
66467	//     "resource": {
66468	//       "description": "Name of the resource for this request.",
66469	//       "location": "path",
66470	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
66471	//       "required": true,
66472	//       "type": "string"
66473	//     }
66474	//   },
66475	//   "path": "{project}/global/routes/{resource}/testIamPermissions",
66476	//   "request": {
66477	//     "$ref": "TestPermissionsRequest"
66478	//   },
66479	//   "response": {
66480	//     "$ref": "TestPermissionsResponse"
66481	//   },
66482	//   "scopes": [
66483	//     "https://www.googleapis.com/auth/cloud-platform",
66484	//     "https://www.googleapis.com/auth/compute",
66485	//     "https://www.googleapis.com/auth/compute.readonly"
66486	//   ]
66487	// }
66488
66489}
66490
66491// method id "compute.securityPolicies.delete":
66492
66493type SecurityPoliciesDeleteCall struct {
66494	s              *Service
66495	project        string
66496	securityPolicy string
66497	urlParams_     gensupport.URLParams
66498	ctx_           context.Context
66499	header_        http.Header
66500}
66501
66502// Delete: Deletes the specified policy.
66503func (r *SecurityPoliciesService) Delete(project string, securityPolicy string) *SecurityPoliciesDeleteCall {
66504	c := &SecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
66505	c.project = project
66506	c.securityPolicy = securityPolicy
66507	return c
66508}
66509
66510// RequestId sets the optional parameter "requestId": An optional
66511// request ID to identify requests. Specify a unique request ID so that
66512// if you must retry your request, the server will know to ignore the
66513// request if it has already been completed.
66514//
66515// For example, consider a situation where you make an initial request
66516// and the request times out. If you make the request again with the
66517// same request ID, the server can check if original operation with the
66518// same request ID was received, and if so, will ignore the second
66519// request. This prevents clients from accidentally creating duplicate
66520// commitments.
66521//
66522// The request ID must be a valid UUID with the exception that zero UUID
66523// is not supported (00000000-0000-0000-0000-000000000000).
66524func (c *SecurityPoliciesDeleteCall) RequestId(requestId string) *SecurityPoliciesDeleteCall {
66525	c.urlParams_.Set("requestId", requestId)
66526	return c
66527}
66528
66529// Fields allows partial responses to be retrieved. See
66530// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
66531// for more information.
66532func (c *SecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *SecurityPoliciesDeleteCall {
66533	c.urlParams_.Set("fields", googleapi.CombineFields(s))
66534	return c
66535}
66536
66537// Context sets the context to be used in this call's Do method. Any
66538// pending HTTP request will be aborted if the provided context is
66539// canceled.
66540func (c *SecurityPoliciesDeleteCall) Context(ctx context.Context) *SecurityPoliciesDeleteCall {
66541	c.ctx_ = ctx
66542	return c
66543}
66544
66545// Header returns an http.Header that can be modified by the caller to
66546// add HTTP headers to the request.
66547func (c *SecurityPoliciesDeleteCall) Header() http.Header {
66548	if c.header_ == nil {
66549		c.header_ = make(http.Header)
66550	}
66551	return c.header_
66552}
66553
66554func (c *SecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
66555	reqHeaders := make(http.Header)
66556	for k, v := range c.header_ {
66557		reqHeaders[k] = v
66558	}
66559	reqHeaders.Set("User-Agent", c.s.userAgent())
66560	var body io.Reader = nil
66561	c.urlParams_.Set("alt", alt)
66562	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}")
66563	urls += "?" + c.urlParams_.Encode()
66564	req, _ := http.NewRequest("DELETE", urls, body)
66565	req.Header = reqHeaders
66566	googleapi.Expand(req.URL, map[string]string{
66567		"project":        c.project,
66568		"securityPolicy": c.securityPolicy,
66569	})
66570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
66571}
66572
66573// Do executes the "compute.securityPolicies.delete" call.
66574// Exactly one of *Operation or error will be non-nil. Any non-2xx
66575// status code is an error. Response headers are in either
66576// *Operation.ServerResponse.Header or (if a response was returned at
66577// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
66578// to check whether the returned error was because
66579// http.StatusNotModified was returned.
66580func (c *SecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
66581	gensupport.SetOptions(c.urlParams_, opts...)
66582	res, err := c.doRequest("json")
66583	if res != nil && res.StatusCode == http.StatusNotModified {
66584		if res.Body != nil {
66585			res.Body.Close()
66586		}
66587		return nil, &googleapi.Error{
66588			Code:   res.StatusCode,
66589			Header: res.Header,
66590		}
66591	}
66592	if err != nil {
66593		return nil, err
66594	}
66595	defer googleapi.CloseBody(res)
66596	if err := googleapi.CheckResponse(res); err != nil {
66597		return nil, err
66598	}
66599	ret := &Operation{
66600		ServerResponse: googleapi.ServerResponse{
66601			Header:         res.Header,
66602			HTTPStatusCode: res.StatusCode,
66603		},
66604	}
66605	target := &ret
66606	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
66607		return nil, err
66608	}
66609	return ret, nil
66610	// {
66611	//   "description": "Deletes the specified policy.",
66612	//   "httpMethod": "DELETE",
66613	//   "id": "compute.securityPolicies.delete",
66614	//   "parameterOrder": [
66615	//     "project",
66616	//     "securityPolicy"
66617	//   ],
66618	//   "parameters": {
66619	//     "project": {
66620	//       "description": "Project ID for this request.",
66621	//       "location": "path",
66622	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
66623	//       "required": true,
66624	//       "type": "string"
66625	//     },
66626	//     "requestId": {
66627	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
66628	//       "location": "query",
66629	//       "type": "string"
66630	//     },
66631	//     "securityPolicy": {
66632	//       "description": "Name of the security policy to delete.",
66633	//       "location": "path",
66634	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
66635	//       "required": true,
66636	//       "type": "string"
66637	//     }
66638	//   },
66639	//   "path": "{project}/global/securityPolicies/{securityPolicy}",
66640	//   "response": {
66641	//     "$ref": "Operation"
66642	//   },
66643	//   "scopes": [
66644	//     "https://www.googleapis.com/auth/cloud-platform",
66645	//     "https://www.googleapis.com/auth/compute"
66646	//   ]
66647	// }
66648
66649}
66650
66651// method id "compute.securityPolicies.get":
66652
66653type SecurityPoliciesGetCall struct {
66654	s              *Service
66655	project        string
66656	securityPolicy string
66657	urlParams_     gensupport.URLParams
66658	ifNoneMatch_   string
66659	ctx_           context.Context
66660	header_        http.Header
66661}
66662
66663// Get: List all of the ordered rules present in a single specified
66664// policy.
66665func (r *SecurityPoliciesService) Get(project string, securityPolicy string) *SecurityPoliciesGetCall {
66666	c := &SecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
66667	c.project = project
66668	c.securityPolicy = securityPolicy
66669	return c
66670}
66671
66672// Fields allows partial responses to be retrieved. See
66673// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
66674// for more information.
66675func (c *SecurityPoliciesGetCall) Fields(s ...googleapi.Field) *SecurityPoliciesGetCall {
66676	c.urlParams_.Set("fields", googleapi.CombineFields(s))
66677	return c
66678}
66679
66680// IfNoneMatch sets the optional parameter which makes the operation
66681// fail if the object's ETag matches the given value. This is useful for
66682// getting updates only after the object has changed since the last
66683// request. Use googleapi.IsNotModified to check whether the response
66684// error from Do is the result of In-None-Match.
66685func (c *SecurityPoliciesGetCall) IfNoneMatch(entityTag string) *SecurityPoliciesGetCall {
66686	c.ifNoneMatch_ = entityTag
66687	return c
66688}
66689
66690// Context sets the context to be used in this call's Do method. Any
66691// pending HTTP request will be aborted if the provided context is
66692// canceled.
66693func (c *SecurityPoliciesGetCall) Context(ctx context.Context) *SecurityPoliciesGetCall {
66694	c.ctx_ = ctx
66695	return c
66696}
66697
66698// Header returns an http.Header that can be modified by the caller to
66699// add HTTP headers to the request.
66700func (c *SecurityPoliciesGetCall) Header() http.Header {
66701	if c.header_ == nil {
66702		c.header_ = make(http.Header)
66703	}
66704	return c.header_
66705}
66706
66707func (c *SecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
66708	reqHeaders := make(http.Header)
66709	for k, v := range c.header_ {
66710		reqHeaders[k] = v
66711	}
66712	reqHeaders.Set("User-Agent", c.s.userAgent())
66713	if c.ifNoneMatch_ != "" {
66714		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
66715	}
66716	var body io.Reader = nil
66717	c.urlParams_.Set("alt", alt)
66718	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}")
66719	urls += "?" + c.urlParams_.Encode()
66720	req, _ := http.NewRequest("GET", urls, body)
66721	req.Header = reqHeaders
66722	googleapi.Expand(req.URL, map[string]string{
66723		"project":        c.project,
66724		"securityPolicy": c.securityPolicy,
66725	})
66726	return gensupport.SendRequest(c.ctx_, c.s.client, req)
66727}
66728
66729// Do executes the "compute.securityPolicies.get" call.
66730// Exactly one of *SecurityPolicy or error will be non-nil. Any non-2xx
66731// status code is an error. Response headers are in either
66732// *SecurityPolicy.ServerResponse.Header or (if a response was returned
66733// at all) in error.(*googleapi.Error).Header. Use
66734// googleapi.IsNotModified to check whether the returned error was
66735// because http.StatusNotModified was returned.
66736func (c *SecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*SecurityPolicy, error) {
66737	gensupport.SetOptions(c.urlParams_, opts...)
66738	res, err := c.doRequest("json")
66739	if res != nil && res.StatusCode == http.StatusNotModified {
66740		if res.Body != nil {
66741			res.Body.Close()
66742		}
66743		return nil, &googleapi.Error{
66744			Code:   res.StatusCode,
66745			Header: res.Header,
66746		}
66747	}
66748	if err != nil {
66749		return nil, err
66750	}
66751	defer googleapi.CloseBody(res)
66752	if err := googleapi.CheckResponse(res); err != nil {
66753		return nil, err
66754	}
66755	ret := &SecurityPolicy{
66756		ServerResponse: googleapi.ServerResponse{
66757			Header:         res.Header,
66758			HTTPStatusCode: res.StatusCode,
66759		},
66760	}
66761	target := &ret
66762	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
66763		return nil, err
66764	}
66765	return ret, nil
66766	// {
66767	//   "description": "List all of the ordered rules present in a single specified policy.",
66768	//   "httpMethod": "GET",
66769	//   "id": "compute.securityPolicies.get",
66770	//   "parameterOrder": [
66771	//     "project",
66772	//     "securityPolicy"
66773	//   ],
66774	//   "parameters": {
66775	//     "project": {
66776	//       "description": "Project ID for this request.",
66777	//       "location": "path",
66778	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
66779	//       "required": true,
66780	//       "type": "string"
66781	//     },
66782	//     "securityPolicy": {
66783	//       "description": "Name of the security policy to get.",
66784	//       "location": "path",
66785	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
66786	//       "required": true,
66787	//       "type": "string"
66788	//     }
66789	//   },
66790	//   "path": "{project}/global/securityPolicies/{securityPolicy}",
66791	//   "response": {
66792	//     "$ref": "SecurityPolicy"
66793	//   },
66794	//   "scopes": [
66795	//     "https://www.googleapis.com/auth/cloud-platform",
66796	//     "https://www.googleapis.com/auth/compute",
66797	//     "https://www.googleapis.com/auth/compute.readonly"
66798	//   ]
66799	// }
66800
66801}
66802
66803// method id "compute.securityPolicies.insert":
66804
66805type SecurityPoliciesInsertCall struct {
66806	s              *Service
66807	project        string
66808	securitypolicy *SecurityPolicy
66809	urlParams_     gensupport.URLParams
66810	ctx_           context.Context
66811	header_        http.Header
66812}
66813
66814// Insert: Creates a new policy in the specified project using the data
66815// included in the request.
66816func (r *SecurityPoliciesService) Insert(project string, securitypolicy *SecurityPolicy) *SecurityPoliciesInsertCall {
66817	c := &SecurityPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
66818	c.project = project
66819	c.securitypolicy = securitypolicy
66820	return c
66821}
66822
66823// RequestId sets the optional parameter "requestId": An optional
66824// request ID to identify requests. Specify a unique request ID so that
66825// if you must retry your request, the server will know to ignore the
66826// request if it has already been completed.
66827//
66828// For example, consider a situation where you make an initial request
66829// and the request times out. If you make the request again with the
66830// same request ID, the server can check if original operation with the
66831// same request ID was received, and if so, will ignore the second
66832// request. This prevents clients from accidentally creating duplicate
66833// commitments.
66834//
66835// The request ID must be a valid UUID with the exception that zero UUID
66836// is not supported (00000000-0000-0000-0000-000000000000).
66837func (c *SecurityPoliciesInsertCall) RequestId(requestId string) *SecurityPoliciesInsertCall {
66838	c.urlParams_.Set("requestId", requestId)
66839	return c
66840}
66841
66842// Fields allows partial responses to be retrieved. See
66843// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
66844// for more information.
66845func (c *SecurityPoliciesInsertCall) Fields(s ...googleapi.Field) *SecurityPoliciesInsertCall {
66846	c.urlParams_.Set("fields", googleapi.CombineFields(s))
66847	return c
66848}
66849
66850// Context sets the context to be used in this call's Do method. Any
66851// pending HTTP request will be aborted if the provided context is
66852// canceled.
66853func (c *SecurityPoliciesInsertCall) Context(ctx context.Context) *SecurityPoliciesInsertCall {
66854	c.ctx_ = ctx
66855	return c
66856}
66857
66858// Header returns an http.Header that can be modified by the caller to
66859// add HTTP headers to the request.
66860func (c *SecurityPoliciesInsertCall) Header() http.Header {
66861	if c.header_ == nil {
66862		c.header_ = make(http.Header)
66863	}
66864	return c.header_
66865}
66866
66867func (c *SecurityPoliciesInsertCall) doRequest(alt string) (*http.Response, error) {
66868	reqHeaders := make(http.Header)
66869	for k, v := range c.header_ {
66870		reqHeaders[k] = v
66871	}
66872	reqHeaders.Set("User-Agent", c.s.userAgent())
66873	var body io.Reader = nil
66874	body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicy)
66875	if err != nil {
66876		return nil, err
66877	}
66878	reqHeaders.Set("Content-Type", "application/json")
66879	c.urlParams_.Set("alt", alt)
66880	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies")
66881	urls += "?" + c.urlParams_.Encode()
66882	req, _ := http.NewRequest("POST", urls, body)
66883	req.Header = reqHeaders
66884	googleapi.Expand(req.URL, map[string]string{
66885		"project": c.project,
66886	})
66887	return gensupport.SendRequest(c.ctx_, c.s.client, req)
66888}
66889
66890// Do executes the "compute.securityPolicies.insert" call.
66891// Exactly one of *Operation or error will be non-nil. Any non-2xx
66892// status code is an error. Response headers are in either
66893// *Operation.ServerResponse.Header or (if a response was returned at
66894// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
66895// to check whether the returned error was because
66896// http.StatusNotModified was returned.
66897func (c *SecurityPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
66898	gensupport.SetOptions(c.urlParams_, opts...)
66899	res, err := c.doRequest("json")
66900	if res != nil && res.StatusCode == http.StatusNotModified {
66901		if res.Body != nil {
66902			res.Body.Close()
66903		}
66904		return nil, &googleapi.Error{
66905			Code:   res.StatusCode,
66906			Header: res.Header,
66907		}
66908	}
66909	if err != nil {
66910		return nil, err
66911	}
66912	defer googleapi.CloseBody(res)
66913	if err := googleapi.CheckResponse(res); err != nil {
66914		return nil, err
66915	}
66916	ret := &Operation{
66917		ServerResponse: googleapi.ServerResponse{
66918			Header:         res.Header,
66919			HTTPStatusCode: res.StatusCode,
66920		},
66921	}
66922	target := &ret
66923	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
66924		return nil, err
66925	}
66926	return ret, nil
66927	// {
66928	//   "description": "Creates a new policy in the specified project using the data included in the request.",
66929	//   "httpMethod": "POST",
66930	//   "id": "compute.securityPolicies.insert",
66931	//   "parameterOrder": [
66932	//     "project"
66933	//   ],
66934	//   "parameters": {
66935	//     "project": {
66936	//       "description": "Project ID for this request.",
66937	//       "location": "path",
66938	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
66939	//       "required": true,
66940	//       "type": "string"
66941	//     },
66942	//     "requestId": {
66943	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
66944	//       "location": "query",
66945	//       "type": "string"
66946	//     }
66947	//   },
66948	//   "path": "{project}/global/securityPolicies",
66949	//   "request": {
66950	//     "$ref": "SecurityPolicy"
66951	//   },
66952	//   "response": {
66953	//     "$ref": "Operation"
66954	//   },
66955	//   "scopes": [
66956	//     "https://www.googleapis.com/auth/cloud-platform",
66957	//     "https://www.googleapis.com/auth/compute"
66958	//   ]
66959	// }
66960
66961}
66962
66963// method id "compute.securityPolicies.list":
66964
66965type SecurityPoliciesListCall struct {
66966	s            *Service
66967	project      string
66968	urlParams_   gensupport.URLParams
66969	ifNoneMatch_ string
66970	ctx_         context.Context
66971	header_      http.Header
66972}
66973
66974// List: List all the policies that have been configured for the
66975// specified project.
66976func (r *SecurityPoliciesService) List(project string) *SecurityPoliciesListCall {
66977	c := &SecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
66978	c.project = project
66979	return c
66980}
66981
66982// Filter sets the optional parameter "filter": Sets a filter
66983// {expression} for filtering listed resources. Your {expression} must
66984// be in the format: field_name comparison_string literal_string.
66985//
66986// The field_name is the name of the field you want to compare. Only
66987// atomic field types are supported (string, number, boolean). The
66988// comparison_string must be either eq (equals) or ne (not equals). The
66989// literal_string is the string value to filter to. The literal value
66990// must be valid for the type of field you are filtering by (string,
66991// number, boolean). For string fields, the literal value is interpreted
66992// as a regular expression using RE2 syntax. The literal value must
66993// match the entire field.
66994//
66995// For example, to filter for instances that do not have a name of
66996// example-instance, you would use name ne example-instance.
66997//
66998// You can filter on nested fields. For example, you could filter on
66999// instances that have set the scheduling.automaticRestart field to
67000// true. Use filtering on nested fields to take advantage of labels to
67001// organize and search for results based on label values.
67002//
67003// To filter on multiple expressions, provide each separate expression
67004// within parentheses. For example, (scheduling.automaticRestart eq
67005// true) (zone eq us-central1-f). Multiple expressions are treated as
67006// AND expressions, meaning that resources must match all expressions to
67007// pass the filters.
67008func (c *SecurityPoliciesListCall) Filter(filter string) *SecurityPoliciesListCall {
67009	c.urlParams_.Set("filter", filter)
67010	return c
67011}
67012
67013// MaxResults sets the optional parameter "maxResults": The maximum
67014// number of results per page that should be returned. If the number of
67015// available results is larger than maxResults, Compute Engine returns a
67016// nextPageToken that can be used to get the next page of results in
67017// subsequent list requests. Acceptable values are 0 to 500, inclusive.
67018// (Default: 500)
67019func (c *SecurityPoliciesListCall) MaxResults(maxResults int64) *SecurityPoliciesListCall {
67020	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
67021	return c
67022}
67023
67024// OrderBy sets the optional parameter "orderBy": Sorts list results by
67025// a certain order. By default, results are returned in alphanumerical
67026// order based on the resource name.
67027//
67028// You can also sort results in descending order based on the creation
67029// timestamp using orderBy="creationTimestamp desc". This sorts results
67030// based on the creationTimestamp field in reverse chronological order
67031// (newest result first). Use this to sort resources like operations so
67032// that the newest operation is returned first.
67033//
67034// Currently, only sorting by name or creationTimestamp desc is
67035// supported.
67036func (c *SecurityPoliciesListCall) OrderBy(orderBy string) *SecurityPoliciesListCall {
67037	c.urlParams_.Set("orderBy", orderBy)
67038	return c
67039}
67040
67041// PageToken sets the optional parameter "pageToken": Specifies a page
67042// token to use. Set pageToken to the nextPageToken returned by a
67043// previous list request to get the next page of results.
67044func (c *SecurityPoliciesListCall) PageToken(pageToken string) *SecurityPoliciesListCall {
67045	c.urlParams_.Set("pageToken", pageToken)
67046	return c
67047}
67048
67049// Fields allows partial responses to be retrieved. See
67050// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
67051// for more information.
67052func (c *SecurityPoliciesListCall) Fields(s ...googleapi.Field) *SecurityPoliciesListCall {
67053	c.urlParams_.Set("fields", googleapi.CombineFields(s))
67054	return c
67055}
67056
67057// IfNoneMatch sets the optional parameter which makes the operation
67058// fail if the object's ETag matches the given value. This is useful for
67059// getting updates only after the object has changed since the last
67060// request. Use googleapi.IsNotModified to check whether the response
67061// error from Do is the result of In-None-Match.
67062func (c *SecurityPoliciesListCall) IfNoneMatch(entityTag string) *SecurityPoliciesListCall {
67063	c.ifNoneMatch_ = entityTag
67064	return c
67065}
67066
67067// Context sets the context to be used in this call's Do method. Any
67068// pending HTTP request will be aborted if the provided context is
67069// canceled.
67070func (c *SecurityPoliciesListCall) Context(ctx context.Context) *SecurityPoliciesListCall {
67071	c.ctx_ = ctx
67072	return c
67073}
67074
67075// Header returns an http.Header that can be modified by the caller to
67076// add HTTP headers to the request.
67077func (c *SecurityPoliciesListCall) Header() http.Header {
67078	if c.header_ == nil {
67079		c.header_ = make(http.Header)
67080	}
67081	return c.header_
67082}
67083
67084func (c *SecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) {
67085	reqHeaders := make(http.Header)
67086	for k, v := range c.header_ {
67087		reqHeaders[k] = v
67088	}
67089	reqHeaders.Set("User-Agent", c.s.userAgent())
67090	if c.ifNoneMatch_ != "" {
67091		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
67092	}
67093	var body io.Reader = nil
67094	c.urlParams_.Set("alt", alt)
67095	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies")
67096	urls += "?" + c.urlParams_.Encode()
67097	req, _ := http.NewRequest("GET", urls, body)
67098	req.Header = reqHeaders
67099	googleapi.Expand(req.URL, map[string]string{
67100		"project": c.project,
67101	})
67102	return gensupport.SendRequest(c.ctx_, c.s.client, req)
67103}
67104
67105// Do executes the "compute.securityPolicies.list" call.
67106// Exactly one of *SecurityPoliciesList or error will be non-nil. Any
67107// non-2xx status code is an error. Response headers are in either
67108// *SecurityPoliciesList.ServerResponse.Header or (if a response was
67109// returned at all) in error.(*googleapi.Error).Header. Use
67110// googleapi.IsNotModified to check whether the returned error was
67111// because http.StatusNotModified was returned.
67112func (c *SecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*SecurityPoliciesList, error) {
67113	gensupport.SetOptions(c.urlParams_, opts...)
67114	res, err := c.doRequest("json")
67115	if res != nil && res.StatusCode == http.StatusNotModified {
67116		if res.Body != nil {
67117			res.Body.Close()
67118		}
67119		return nil, &googleapi.Error{
67120			Code:   res.StatusCode,
67121			Header: res.Header,
67122		}
67123	}
67124	if err != nil {
67125		return nil, err
67126	}
67127	defer googleapi.CloseBody(res)
67128	if err := googleapi.CheckResponse(res); err != nil {
67129		return nil, err
67130	}
67131	ret := &SecurityPoliciesList{
67132		ServerResponse: googleapi.ServerResponse{
67133			Header:         res.Header,
67134			HTTPStatusCode: res.StatusCode,
67135		},
67136	}
67137	target := &ret
67138	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
67139		return nil, err
67140	}
67141	return ret, nil
67142	// {
67143	//   "description": "List all the policies that have been configured for the specified project.",
67144	//   "httpMethod": "GET",
67145	//   "id": "compute.securityPolicies.list",
67146	//   "parameterOrder": [
67147	//     "project"
67148	//   ],
67149	//   "parameters": {
67150	//     "filter": {
67151	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
67152	//       "location": "query",
67153	//       "type": "string"
67154	//     },
67155	//     "maxResults": {
67156	//       "default": "500",
67157	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
67158	//       "format": "uint32",
67159	//       "location": "query",
67160	//       "minimum": "0",
67161	//       "type": "integer"
67162	//     },
67163	//     "orderBy": {
67164	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
67165	//       "location": "query",
67166	//       "type": "string"
67167	//     },
67168	//     "pageToken": {
67169	//       "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.",
67170	//       "location": "query",
67171	//       "type": "string"
67172	//     },
67173	//     "project": {
67174	//       "description": "Project ID for this request.",
67175	//       "location": "path",
67176	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
67177	//       "required": true,
67178	//       "type": "string"
67179	//     }
67180	//   },
67181	//   "path": "{project}/global/securityPolicies",
67182	//   "response": {
67183	//     "$ref": "SecurityPoliciesList"
67184	//   },
67185	//   "scopes": [
67186	//     "https://www.googleapis.com/auth/cloud-platform",
67187	//     "https://www.googleapis.com/auth/compute",
67188	//     "https://www.googleapis.com/auth/compute.readonly"
67189	//   ]
67190	// }
67191
67192}
67193
67194// Pages invokes f for each page of results.
67195// A non-nil error returned from f will halt the iteration.
67196// The provided context supersedes any context provided to the Context method.
67197func (c *SecurityPoliciesListCall) Pages(ctx context.Context, f func(*SecurityPoliciesList) error) error {
67198	c.ctx_ = ctx
67199	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
67200	for {
67201		x, err := c.Do()
67202		if err != nil {
67203			return err
67204		}
67205		if err := f(x); err != nil {
67206			return err
67207		}
67208		if x.NextPageToken == "" {
67209			return nil
67210		}
67211		c.PageToken(x.NextPageToken)
67212	}
67213}
67214
67215// method id "compute.securityPolicies.patch":
67216
67217type SecurityPoliciesPatchCall struct {
67218	s              *Service
67219	project        string
67220	securityPolicy string
67221	securitypolicy *SecurityPolicy
67222	urlParams_     gensupport.URLParams
67223	ctx_           context.Context
67224	header_        http.Header
67225}
67226
67227// Patch: Patches the specified policy with the data included in the
67228// request.
67229func (r *SecurityPoliciesService) Patch(project string, securityPolicy string, securitypolicy *SecurityPolicy) *SecurityPoliciesPatchCall {
67230	c := &SecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
67231	c.project = project
67232	c.securityPolicy = securityPolicy
67233	c.securitypolicy = securitypolicy
67234	return c
67235}
67236
67237// RequestId sets the optional parameter "requestId": An optional
67238// request ID to identify requests. Specify a unique request ID so that
67239// if you must retry your request, the server will know to ignore the
67240// request if it has already been completed.
67241//
67242// For example, consider a situation where you make an initial request
67243// and the request times out. If you make the request again with the
67244// same request ID, the server can check if original operation with the
67245// same request ID was received, and if so, will ignore the second
67246// request. This prevents clients from accidentally creating duplicate
67247// commitments.
67248//
67249// The request ID must be a valid UUID with the exception that zero UUID
67250// is not supported (00000000-0000-0000-0000-000000000000).
67251func (c *SecurityPoliciesPatchCall) RequestId(requestId string) *SecurityPoliciesPatchCall {
67252	c.urlParams_.Set("requestId", requestId)
67253	return c
67254}
67255
67256// Fields allows partial responses to be retrieved. See
67257// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
67258// for more information.
67259func (c *SecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *SecurityPoliciesPatchCall {
67260	c.urlParams_.Set("fields", googleapi.CombineFields(s))
67261	return c
67262}
67263
67264// Context sets the context to be used in this call's Do method. Any
67265// pending HTTP request will be aborted if the provided context is
67266// canceled.
67267func (c *SecurityPoliciesPatchCall) Context(ctx context.Context) *SecurityPoliciesPatchCall {
67268	c.ctx_ = ctx
67269	return c
67270}
67271
67272// Header returns an http.Header that can be modified by the caller to
67273// add HTTP headers to the request.
67274func (c *SecurityPoliciesPatchCall) Header() http.Header {
67275	if c.header_ == nil {
67276		c.header_ = make(http.Header)
67277	}
67278	return c.header_
67279}
67280
67281func (c *SecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
67282	reqHeaders := make(http.Header)
67283	for k, v := range c.header_ {
67284		reqHeaders[k] = v
67285	}
67286	reqHeaders.Set("User-Agent", c.s.userAgent())
67287	var body io.Reader = nil
67288	body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicy)
67289	if err != nil {
67290		return nil, err
67291	}
67292	reqHeaders.Set("Content-Type", "application/json")
67293	c.urlParams_.Set("alt", alt)
67294	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{securityPolicy}")
67295	urls += "?" + c.urlParams_.Encode()
67296	req, _ := http.NewRequest("PATCH", urls, body)
67297	req.Header = reqHeaders
67298	googleapi.Expand(req.URL, map[string]string{
67299		"project":        c.project,
67300		"securityPolicy": c.securityPolicy,
67301	})
67302	return gensupport.SendRequest(c.ctx_, c.s.client, req)
67303}
67304
67305// Do executes the "compute.securityPolicies.patch" call.
67306// Exactly one of *Operation or error will be non-nil. Any non-2xx
67307// status code is an error. Response headers are in either
67308// *Operation.ServerResponse.Header or (if a response was returned at
67309// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
67310// to check whether the returned error was because
67311// http.StatusNotModified was returned.
67312func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
67313	gensupport.SetOptions(c.urlParams_, opts...)
67314	res, err := c.doRequest("json")
67315	if res != nil && res.StatusCode == http.StatusNotModified {
67316		if res.Body != nil {
67317			res.Body.Close()
67318		}
67319		return nil, &googleapi.Error{
67320			Code:   res.StatusCode,
67321			Header: res.Header,
67322		}
67323	}
67324	if err != nil {
67325		return nil, err
67326	}
67327	defer googleapi.CloseBody(res)
67328	if err := googleapi.CheckResponse(res); err != nil {
67329		return nil, err
67330	}
67331	ret := &Operation{
67332		ServerResponse: googleapi.ServerResponse{
67333			Header:         res.Header,
67334			HTTPStatusCode: res.StatusCode,
67335		},
67336	}
67337	target := &ret
67338	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
67339		return nil, err
67340	}
67341	return ret, nil
67342	// {
67343	//   "description": "Patches the specified policy with the data included in the request.",
67344	//   "httpMethod": "PATCH",
67345	//   "id": "compute.securityPolicies.patch",
67346	//   "parameterOrder": [
67347	//     "project",
67348	//     "securityPolicy"
67349	//   ],
67350	//   "parameters": {
67351	//     "project": {
67352	//       "description": "Project ID for this request.",
67353	//       "location": "path",
67354	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
67355	//       "required": true,
67356	//       "type": "string"
67357	//     },
67358	//     "requestId": {
67359	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
67360	//       "location": "query",
67361	//       "type": "string"
67362	//     },
67363	//     "securityPolicy": {
67364	//       "description": "Name of the security policy to update.",
67365	//       "location": "path",
67366	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
67367	//       "required": true,
67368	//       "type": "string"
67369	//     }
67370	//   },
67371	//   "path": "{project}/global/securityPolicies/{securityPolicy}",
67372	//   "request": {
67373	//     "$ref": "SecurityPolicy"
67374	//   },
67375	//   "response": {
67376	//     "$ref": "Operation"
67377	//   },
67378	//   "scopes": [
67379	//     "https://www.googleapis.com/auth/cloud-platform",
67380	//     "https://www.googleapis.com/auth/compute"
67381	//   ]
67382	// }
67383
67384}
67385
67386// method id "compute.securityPolicies.testIamPermissions":
67387
67388type SecurityPoliciesTestIamPermissionsCall struct {
67389	s                      *Service
67390	project                string
67391	resource               string
67392	testpermissionsrequest *TestPermissionsRequest
67393	urlParams_             gensupport.URLParams
67394	ctx_                   context.Context
67395	header_                http.Header
67396}
67397
67398// TestIamPermissions: Returns permissions that a caller has on the
67399// specified resource.
67400func (r *SecurityPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SecurityPoliciesTestIamPermissionsCall {
67401	c := &SecurityPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
67402	c.project = project
67403	c.resource = resource
67404	c.testpermissionsrequest = testpermissionsrequest
67405	return c
67406}
67407
67408// Fields allows partial responses to be retrieved. See
67409// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
67410// for more information.
67411func (c *SecurityPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SecurityPoliciesTestIamPermissionsCall {
67412	c.urlParams_.Set("fields", googleapi.CombineFields(s))
67413	return c
67414}
67415
67416// Context sets the context to be used in this call's Do method. Any
67417// pending HTTP request will be aborted if the provided context is
67418// canceled.
67419func (c *SecurityPoliciesTestIamPermissionsCall) Context(ctx context.Context) *SecurityPoliciesTestIamPermissionsCall {
67420	c.ctx_ = ctx
67421	return c
67422}
67423
67424// Header returns an http.Header that can be modified by the caller to
67425// add HTTP headers to the request.
67426func (c *SecurityPoliciesTestIamPermissionsCall) Header() http.Header {
67427	if c.header_ == nil {
67428		c.header_ = make(http.Header)
67429	}
67430	return c.header_
67431}
67432
67433func (c *SecurityPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
67434	reqHeaders := make(http.Header)
67435	for k, v := range c.header_ {
67436		reqHeaders[k] = v
67437	}
67438	reqHeaders.Set("User-Agent", c.s.userAgent())
67439	var body io.Reader = nil
67440	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
67441	if err != nil {
67442		return nil, err
67443	}
67444	reqHeaders.Set("Content-Type", "application/json")
67445	c.urlParams_.Set("alt", alt)
67446	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/securityPolicies/{resource}/testIamPermissions")
67447	urls += "?" + c.urlParams_.Encode()
67448	req, _ := http.NewRequest("POST", urls, body)
67449	req.Header = reqHeaders
67450	googleapi.Expand(req.URL, map[string]string{
67451		"project":  c.project,
67452		"resource": c.resource,
67453	})
67454	return gensupport.SendRequest(c.ctx_, c.s.client, req)
67455}
67456
67457// Do executes the "compute.securityPolicies.testIamPermissions" call.
67458// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
67459// non-2xx status code is an error. Response headers are in either
67460// *TestPermissionsResponse.ServerResponse.Header or (if a response was
67461// returned at all) in error.(*googleapi.Error).Header. Use
67462// googleapi.IsNotModified to check whether the returned error was
67463// because http.StatusNotModified was returned.
67464func (c *SecurityPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
67465	gensupport.SetOptions(c.urlParams_, opts...)
67466	res, err := c.doRequest("json")
67467	if res != nil && res.StatusCode == http.StatusNotModified {
67468		if res.Body != nil {
67469			res.Body.Close()
67470		}
67471		return nil, &googleapi.Error{
67472			Code:   res.StatusCode,
67473			Header: res.Header,
67474		}
67475	}
67476	if err != nil {
67477		return nil, err
67478	}
67479	defer googleapi.CloseBody(res)
67480	if err := googleapi.CheckResponse(res); err != nil {
67481		return nil, err
67482	}
67483	ret := &TestPermissionsResponse{
67484		ServerResponse: googleapi.ServerResponse{
67485			Header:         res.Header,
67486			HTTPStatusCode: res.StatusCode,
67487		},
67488	}
67489	target := &ret
67490	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
67491		return nil, err
67492	}
67493	return ret, nil
67494	// {
67495	//   "description": "Returns permissions that a caller has on the specified resource.",
67496	//   "httpMethod": "POST",
67497	//   "id": "compute.securityPolicies.testIamPermissions",
67498	//   "parameterOrder": [
67499	//     "project",
67500	//     "resource"
67501	//   ],
67502	//   "parameters": {
67503	//     "project": {
67504	//       "description": "Project ID for this request.",
67505	//       "location": "path",
67506	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
67507	//       "required": true,
67508	//       "type": "string"
67509	//     },
67510	//     "resource": {
67511	//       "description": "Name of the resource for this request.",
67512	//       "location": "path",
67513	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
67514	//       "required": true,
67515	//       "type": "string"
67516	//     }
67517	//   },
67518	//   "path": "{project}/global/securityPolicies/{resource}/testIamPermissions",
67519	//   "request": {
67520	//     "$ref": "TestPermissionsRequest"
67521	//   },
67522	//   "response": {
67523	//     "$ref": "TestPermissionsResponse"
67524	//   },
67525	//   "scopes": [
67526	//     "https://www.googleapis.com/auth/cloud-platform",
67527	//     "https://www.googleapis.com/auth/compute",
67528	//     "https://www.googleapis.com/auth/compute.readonly"
67529	//   ]
67530	// }
67531
67532}
67533
67534// method id "compute.snapshots.delete":
67535
67536type SnapshotsDeleteCall struct {
67537	s          *Service
67538	project    string
67539	snapshot   string
67540	urlParams_ gensupport.URLParams
67541	ctx_       context.Context
67542	header_    http.Header
67543}
67544
67545// Delete: Deletes the specified Snapshot resource. Keep in mind that
67546// deleting a single snapshot might not necessarily delete all the data
67547// on that snapshot. If any data on the snapshot that is marked for
67548// deletion is needed for subsequent snapshots, the data will be moved
67549// to the next corresponding snapshot.
67550//
67551// For more information, see Deleting snaphots.
67552// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete
67553func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall {
67554	c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
67555	c.project = project
67556	c.snapshot = snapshot
67557	return c
67558}
67559
67560// RequestId sets the optional parameter "requestId": An optional
67561// request ID to identify requests. Specify a unique request ID so that
67562// if you must retry your request, the server will know to ignore the
67563// request if it has already been completed.
67564//
67565// For example, consider a situation where you make an initial request
67566// and the request times out. If you make the request again with the
67567// same request ID, the server can check if original operation with the
67568// same request ID was received, and if so, will ignore the second
67569// request. This prevents clients from accidentally creating duplicate
67570// commitments.
67571//
67572// The request ID must be a valid UUID with the exception that zero UUID
67573// is not supported (00000000-0000-0000-0000-000000000000).
67574func (c *SnapshotsDeleteCall) RequestId(requestId string) *SnapshotsDeleteCall {
67575	c.urlParams_.Set("requestId", requestId)
67576	return c
67577}
67578
67579// Fields allows partial responses to be retrieved. See
67580// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
67581// for more information.
67582func (c *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall {
67583	c.urlParams_.Set("fields", googleapi.CombineFields(s))
67584	return c
67585}
67586
67587// Context sets the context to be used in this call's Do method. Any
67588// pending HTTP request will be aborted if the provided context is
67589// canceled.
67590func (c *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall {
67591	c.ctx_ = ctx
67592	return c
67593}
67594
67595// Header returns an http.Header that can be modified by the caller to
67596// add HTTP headers to the request.
67597func (c *SnapshotsDeleteCall) Header() http.Header {
67598	if c.header_ == nil {
67599		c.header_ = make(http.Header)
67600	}
67601	return c.header_
67602}
67603
67604func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) {
67605	reqHeaders := make(http.Header)
67606	for k, v := range c.header_ {
67607		reqHeaders[k] = v
67608	}
67609	reqHeaders.Set("User-Agent", c.s.userAgent())
67610	var body io.Reader = nil
67611	c.urlParams_.Set("alt", alt)
67612	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}")
67613	urls += "?" + c.urlParams_.Encode()
67614	req, _ := http.NewRequest("DELETE", urls, body)
67615	req.Header = reqHeaders
67616	googleapi.Expand(req.URL, map[string]string{
67617		"project":  c.project,
67618		"snapshot": c.snapshot,
67619	})
67620	return gensupport.SendRequest(c.ctx_, c.s.client, req)
67621}
67622
67623// Do executes the "compute.snapshots.delete" call.
67624// Exactly one of *Operation or error will be non-nil. Any non-2xx
67625// status code is an error. Response headers are in either
67626// *Operation.ServerResponse.Header or (if a response was returned at
67627// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
67628// to check whether the returned error was because
67629// http.StatusNotModified was returned.
67630func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
67631	gensupport.SetOptions(c.urlParams_, opts...)
67632	res, err := c.doRequest("json")
67633	if res != nil && res.StatusCode == http.StatusNotModified {
67634		if res.Body != nil {
67635			res.Body.Close()
67636		}
67637		return nil, &googleapi.Error{
67638			Code:   res.StatusCode,
67639			Header: res.Header,
67640		}
67641	}
67642	if err != nil {
67643		return nil, err
67644	}
67645	defer googleapi.CloseBody(res)
67646	if err := googleapi.CheckResponse(res); err != nil {
67647		return nil, err
67648	}
67649	ret := &Operation{
67650		ServerResponse: googleapi.ServerResponse{
67651			Header:         res.Header,
67652			HTTPStatusCode: res.StatusCode,
67653		},
67654	}
67655	target := &ret
67656	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
67657		return nil, err
67658	}
67659	return ret, nil
67660	// {
67661	//   "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.",
67662	//   "httpMethod": "DELETE",
67663	//   "id": "compute.snapshots.delete",
67664	//   "parameterOrder": [
67665	//     "project",
67666	//     "snapshot"
67667	//   ],
67668	//   "parameters": {
67669	//     "project": {
67670	//       "description": "Project ID for this request.",
67671	//       "location": "path",
67672	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
67673	//       "required": true,
67674	//       "type": "string"
67675	//     },
67676	//     "requestId": {
67677	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
67678	//       "location": "query",
67679	//       "type": "string"
67680	//     },
67681	//     "snapshot": {
67682	//       "description": "Name of the Snapshot resource to delete.",
67683	//       "location": "path",
67684	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
67685	//       "required": true,
67686	//       "type": "string"
67687	//     }
67688	//   },
67689	//   "path": "{project}/global/snapshots/{snapshot}",
67690	//   "response": {
67691	//     "$ref": "Operation"
67692	//   },
67693	//   "scopes": [
67694	//     "https://www.googleapis.com/auth/cloud-platform",
67695	//     "https://www.googleapis.com/auth/compute"
67696	//   ]
67697	// }
67698
67699}
67700
67701// method id "compute.snapshots.get":
67702
67703type SnapshotsGetCall struct {
67704	s            *Service
67705	project      string
67706	snapshot     string
67707	urlParams_   gensupport.URLParams
67708	ifNoneMatch_ string
67709	ctx_         context.Context
67710	header_      http.Header
67711}
67712
67713// Get: Returns the specified Snapshot resource. Get a list of available
67714// snapshots by making a list() request.
67715// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get
67716func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall {
67717	c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
67718	c.project = project
67719	c.snapshot = snapshot
67720	return c
67721}
67722
67723// Fields allows partial responses to be retrieved. See
67724// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
67725// for more information.
67726func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall {
67727	c.urlParams_.Set("fields", googleapi.CombineFields(s))
67728	return c
67729}
67730
67731// IfNoneMatch sets the optional parameter which makes the operation
67732// fail if the object's ETag matches the given value. This is useful for
67733// getting updates only after the object has changed since the last
67734// request. Use googleapi.IsNotModified to check whether the response
67735// error from Do is the result of In-None-Match.
67736func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall {
67737	c.ifNoneMatch_ = entityTag
67738	return c
67739}
67740
67741// Context sets the context to be used in this call's Do method. Any
67742// pending HTTP request will be aborted if the provided context is
67743// canceled.
67744func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall {
67745	c.ctx_ = ctx
67746	return c
67747}
67748
67749// Header returns an http.Header that can be modified by the caller to
67750// add HTTP headers to the request.
67751func (c *SnapshotsGetCall) Header() http.Header {
67752	if c.header_ == nil {
67753		c.header_ = make(http.Header)
67754	}
67755	return c.header_
67756}
67757
67758func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
67759	reqHeaders := make(http.Header)
67760	for k, v := range c.header_ {
67761		reqHeaders[k] = v
67762	}
67763	reqHeaders.Set("User-Agent", c.s.userAgent())
67764	if c.ifNoneMatch_ != "" {
67765		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
67766	}
67767	var body io.Reader = nil
67768	c.urlParams_.Set("alt", alt)
67769	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}")
67770	urls += "?" + c.urlParams_.Encode()
67771	req, _ := http.NewRequest("GET", urls, body)
67772	req.Header = reqHeaders
67773	googleapi.Expand(req.URL, map[string]string{
67774		"project":  c.project,
67775		"snapshot": c.snapshot,
67776	})
67777	return gensupport.SendRequest(c.ctx_, c.s.client, req)
67778}
67779
67780// Do executes the "compute.snapshots.get" call.
67781// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status
67782// code is an error. Response headers are in either
67783// *Snapshot.ServerResponse.Header or (if a response was returned at
67784// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
67785// to check whether the returned error was because
67786// http.StatusNotModified was returned.
67787func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) {
67788	gensupport.SetOptions(c.urlParams_, opts...)
67789	res, err := c.doRequest("json")
67790	if res != nil && res.StatusCode == http.StatusNotModified {
67791		if res.Body != nil {
67792			res.Body.Close()
67793		}
67794		return nil, &googleapi.Error{
67795			Code:   res.StatusCode,
67796			Header: res.Header,
67797		}
67798	}
67799	if err != nil {
67800		return nil, err
67801	}
67802	defer googleapi.CloseBody(res)
67803	if err := googleapi.CheckResponse(res); err != nil {
67804		return nil, err
67805	}
67806	ret := &Snapshot{
67807		ServerResponse: googleapi.ServerResponse{
67808			Header:         res.Header,
67809			HTTPStatusCode: res.StatusCode,
67810		},
67811	}
67812	target := &ret
67813	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
67814		return nil, err
67815	}
67816	return ret, nil
67817	// {
67818	//   "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.",
67819	//   "httpMethod": "GET",
67820	//   "id": "compute.snapshots.get",
67821	//   "parameterOrder": [
67822	//     "project",
67823	//     "snapshot"
67824	//   ],
67825	//   "parameters": {
67826	//     "project": {
67827	//       "description": "Project ID for this request.",
67828	//       "location": "path",
67829	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
67830	//       "required": true,
67831	//       "type": "string"
67832	//     },
67833	//     "snapshot": {
67834	//       "description": "Name of the Snapshot resource to return.",
67835	//       "location": "path",
67836	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
67837	//       "required": true,
67838	//       "type": "string"
67839	//     }
67840	//   },
67841	//   "path": "{project}/global/snapshots/{snapshot}",
67842	//   "response": {
67843	//     "$ref": "Snapshot"
67844	//   },
67845	//   "scopes": [
67846	//     "https://www.googleapis.com/auth/cloud-platform",
67847	//     "https://www.googleapis.com/auth/compute",
67848	//     "https://www.googleapis.com/auth/compute.readonly"
67849	//   ]
67850	// }
67851
67852}
67853
67854// method id "compute.snapshots.list":
67855
67856type SnapshotsListCall struct {
67857	s            *Service
67858	project      string
67859	urlParams_   gensupport.URLParams
67860	ifNoneMatch_ string
67861	ctx_         context.Context
67862	header_      http.Header
67863}
67864
67865// List: Retrieves the list of Snapshot resources contained within the
67866// specified project.
67867// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/list
67868func (r *SnapshotsService) List(project string) *SnapshotsListCall {
67869	c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
67870	c.project = project
67871	return c
67872}
67873
67874// Filter sets the optional parameter "filter": Sets a filter
67875// {expression} for filtering listed resources. Your {expression} must
67876// be in the format: field_name comparison_string literal_string.
67877//
67878// The field_name is the name of the field you want to compare. Only
67879// atomic field types are supported (string, number, boolean). The
67880// comparison_string must be either eq (equals) or ne (not equals). The
67881// literal_string is the string value to filter to. The literal value
67882// must be valid for the type of field you are filtering by (string,
67883// number, boolean). For string fields, the literal value is interpreted
67884// as a regular expression using RE2 syntax. The literal value must
67885// match the entire field.
67886//
67887// For example, to filter for instances that do not have a name of
67888// example-instance, you would use name ne example-instance.
67889//
67890// You can filter on nested fields. For example, you could filter on
67891// instances that have set the scheduling.automaticRestart field to
67892// true. Use filtering on nested fields to take advantage of labels to
67893// organize and search for results based on label values.
67894//
67895// To filter on multiple expressions, provide each separate expression
67896// within parentheses. For example, (scheduling.automaticRestart eq
67897// true) (zone eq us-central1-f). Multiple expressions are treated as
67898// AND expressions, meaning that resources must match all expressions to
67899// pass the filters.
67900func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall {
67901	c.urlParams_.Set("filter", filter)
67902	return c
67903}
67904
67905// MaxResults sets the optional parameter "maxResults": The maximum
67906// number of results per page that should be returned. If the number of
67907// available results is larger than maxResults, Compute Engine returns a
67908// nextPageToken that can be used to get the next page of results in
67909// subsequent list requests. Acceptable values are 0 to 500, inclusive.
67910// (Default: 500)
67911func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall {
67912	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
67913	return c
67914}
67915
67916// OrderBy sets the optional parameter "orderBy": Sorts list results by
67917// a certain order. By default, results are returned in alphanumerical
67918// order based on the resource name.
67919//
67920// You can also sort results in descending order based on the creation
67921// timestamp using orderBy="creationTimestamp desc". This sorts results
67922// based on the creationTimestamp field in reverse chronological order
67923// (newest result first). Use this to sort resources like operations so
67924// that the newest operation is returned first.
67925//
67926// Currently, only sorting by name or creationTimestamp desc is
67927// supported.
67928func (c *SnapshotsListCall) OrderBy(orderBy string) *SnapshotsListCall {
67929	c.urlParams_.Set("orderBy", orderBy)
67930	return c
67931}
67932
67933// PageToken sets the optional parameter "pageToken": Specifies a page
67934// token to use. Set pageToken to the nextPageToken returned by a
67935// previous list request to get the next page of results.
67936func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall {
67937	c.urlParams_.Set("pageToken", pageToken)
67938	return c
67939}
67940
67941// Fields allows partial responses to be retrieved. See
67942// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
67943// for more information.
67944func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall {
67945	c.urlParams_.Set("fields", googleapi.CombineFields(s))
67946	return c
67947}
67948
67949// IfNoneMatch sets the optional parameter which makes the operation
67950// fail if the object's ETag matches the given value. This is useful for
67951// getting updates only after the object has changed since the last
67952// request. Use googleapi.IsNotModified to check whether the response
67953// error from Do is the result of In-None-Match.
67954func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall {
67955	c.ifNoneMatch_ = entityTag
67956	return c
67957}
67958
67959// Context sets the context to be used in this call's Do method. Any
67960// pending HTTP request will be aborted if the provided context is
67961// canceled.
67962func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall {
67963	c.ctx_ = ctx
67964	return c
67965}
67966
67967// Header returns an http.Header that can be modified by the caller to
67968// add HTTP headers to the request.
67969func (c *SnapshotsListCall) Header() http.Header {
67970	if c.header_ == nil {
67971		c.header_ = make(http.Header)
67972	}
67973	return c.header_
67974}
67975
67976func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) {
67977	reqHeaders := make(http.Header)
67978	for k, v := range c.header_ {
67979		reqHeaders[k] = v
67980	}
67981	reqHeaders.Set("User-Agent", c.s.userAgent())
67982	if c.ifNoneMatch_ != "" {
67983		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
67984	}
67985	var body io.Reader = nil
67986	c.urlParams_.Set("alt", alt)
67987	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots")
67988	urls += "?" + c.urlParams_.Encode()
67989	req, _ := http.NewRequest("GET", urls, body)
67990	req.Header = reqHeaders
67991	googleapi.Expand(req.URL, map[string]string{
67992		"project": c.project,
67993	})
67994	return gensupport.SendRequest(c.ctx_, c.s.client, req)
67995}
67996
67997// Do executes the "compute.snapshots.list" call.
67998// Exactly one of *SnapshotList or error will be non-nil. Any non-2xx
67999// status code is an error. Response headers are in either
68000// *SnapshotList.ServerResponse.Header or (if a response was returned at
68001// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
68002// to check whether the returned error was because
68003// http.StatusNotModified was returned.
68004func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, error) {
68005	gensupport.SetOptions(c.urlParams_, opts...)
68006	res, err := c.doRequest("json")
68007	if res != nil && res.StatusCode == http.StatusNotModified {
68008		if res.Body != nil {
68009			res.Body.Close()
68010		}
68011		return nil, &googleapi.Error{
68012			Code:   res.StatusCode,
68013			Header: res.Header,
68014		}
68015	}
68016	if err != nil {
68017		return nil, err
68018	}
68019	defer googleapi.CloseBody(res)
68020	if err := googleapi.CheckResponse(res); err != nil {
68021		return nil, err
68022	}
68023	ret := &SnapshotList{
68024		ServerResponse: googleapi.ServerResponse{
68025			Header:         res.Header,
68026			HTTPStatusCode: res.StatusCode,
68027		},
68028	}
68029	target := &ret
68030	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
68031		return nil, err
68032	}
68033	return ret, nil
68034	// {
68035	//   "description": "Retrieves the list of Snapshot resources contained within the specified project.",
68036	//   "httpMethod": "GET",
68037	//   "id": "compute.snapshots.list",
68038	//   "parameterOrder": [
68039	//     "project"
68040	//   ],
68041	//   "parameters": {
68042	//     "filter": {
68043	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
68044	//       "location": "query",
68045	//       "type": "string"
68046	//     },
68047	//     "maxResults": {
68048	//       "default": "500",
68049	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
68050	//       "format": "uint32",
68051	//       "location": "query",
68052	//       "minimum": "0",
68053	//       "type": "integer"
68054	//     },
68055	//     "orderBy": {
68056	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
68057	//       "location": "query",
68058	//       "type": "string"
68059	//     },
68060	//     "pageToken": {
68061	//       "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.",
68062	//       "location": "query",
68063	//       "type": "string"
68064	//     },
68065	//     "project": {
68066	//       "description": "Project ID for this request.",
68067	//       "location": "path",
68068	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
68069	//       "required": true,
68070	//       "type": "string"
68071	//     }
68072	//   },
68073	//   "path": "{project}/global/snapshots",
68074	//   "response": {
68075	//     "$ref": "SnapshotList"
68076	//   },
68077	//   "scopes": [
68078	//     "https://www.googleapis.com/auth/cloud-platform",
68079	//     "https://www.googleapis.com/auth/compute",
68080	//     "https://www.googleapis.com/auth/compute.readonly"
68081	//   ]
68082	// }
68083
68084}
68085
68086// Pages invokes f for each page of results.
68087// A non-nil error returned from f will halt the iteration.
68088// The provided context supersedes any context provided to the Context method.
68089func (c *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error {
68090	c.ctx_ = ctx
68091	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
68092	for {
68093		x, err := c.Do()
68094		if err != nil {
68095			return err
68096		}
68097		if err := f(x); err != nil {
68098			return err
68099		}
68100		if x.NextPageToken == "" {
68101			return nil
68102		}
68103		c.PageToken(x.NextPageToken)
68104	}
68105}
68106
68107// method id "compute.snapshots.setLabels":
68108
68109type SnapshotsSetLabelsCall struct {
68110	s                      *Service
68111	project                string
68112	resource               string
68113	globalsetlabelsrequest *GlobalSetLabelsRequest
68114	urlParams_             gensupport.URLParams
68115	ctx_                   context.Context
68116	header_                http.Header
68117}
68118
68119// SetLabels: Sets the labels on a snapshot. To learn more about labels,
68120// read the Labeling Resources documentation.
68121func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall {
68122	c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
68123	c.project = project
68124	c.resource = resource
68125	c.globalsetlabelsrequest = globalsetlabelsrequest
68126	return c
68127}
68128
68129// Fields allows partial responses to be retrieved. See
68130// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
68131// for more information.
68132func (c *SnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *SnapshotsSetLabelsCall {
68133	c.urlParams_.Set("fields", googleapi.CombineFields(s))
68134	return c
68135}
68136
68137// Context sets the context to be used in this call's Do method. Any
68138// pending HTTP request will be aborted if the provided context is
68139// canceled.
68140func (c *SnapshotsSetLabelsCall) Context(ctx context.Context) *SnapshotsSetLabelsCall {
68141	c.ctx_ = ctx
68142	return c
68143}
68144
68145// Header returns an http.Header that can be modified by the caller to
68146// add HTTP headers to the request.
68147func (c *SnapshotsSetLabelsCall) Header() http.Header {
68148	if c.header_ == nil {
68149		c.header_ = make(http.Header)
68150	}
68151	return c.header_
68152}
68153
68154func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) {
68155	reqHeaders := make(http.Header)
68156	for k, v := range c.header_ {
68157		reqHeaders[k] = v
68158	}
68159	reqHeaders.Set("User-Agent", c.s.userAgent())
68160	var body io.Reader = nil
68161	body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest)
68162	if err != nil {
68163		return nil, err
68164	}
68165	reqHeaders.Set("Content-Type", "application/json")
68166	c.urlParams_.Set("alt", alt)
68167	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setLabels")
68168	urls += "?" + c.urlParams_.Encode()
68169	req, _ := http.NewRequest("POST", urls, body)
68170	req.Header = reqHeaders
68171	googleapi.Expand(req.URL, map[string]string{
68172		"project":  c.project,
68173		"resource": c.resource,
68174	})
68175	return gensupport.SendRequest(c.ctx_, c.s.client, req)
68176}
68177
68178// Do executes the "compute.snapshots.setLabels" call.
68179// Exactly one of *Operation or error will be non-nil. Any non-2xx
68180// status code is an error. Response headers are in either
68181// *Operation.ServerResponse.Header or (if a response was returned at
68182// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
68183// to check whether the returned error was because
68184// http.StatusNotModified was returned.
68185func (c *SnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
68186	gensupport.SetOptions(c.urlParams_, opts...)
68187	res, err := c.doRequest("json")
68188	if res != nil && res.StatusCode == http.StatusNotModified {
68189		if res.Body != nil {
68190			res.Body.Close()
68191		}
68192		return nil, &googleapi.Error{
68193			Code:   res.StatusCode,
68194			Header: res.Header,
68195		}
68196	}
68197	if err != nil {
68198		return nil, err
68199	}
68200	defer googleapi.CloseBody(res)
68201	if err := googleapi.CheckResponse(res); err != nil {
68202		return nil, err
68203	}
68204	ret := &Operation{
68205		ServerResponse: googleapi.ServerResponse{
68206			Header:         res.Header,
68207			HTTPStatusCode: res.StatusCode,
68208		},
68209	}
68210	target := &ret
68211	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
68212		return nil, err
68213	}
68214	return ret, nil
68215	// {
68216	//   "description": "Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.",
68217	//   "httpMethod": "POST",
68218	//   "id": "compute.snapshots.setLabels",
68219	//   "parameterOrder": [
68220	//     "project",
68221	//     "resource"
68222	//   ],
68223	//   "parameters": {
68224	//     "project": {
68225	//       "description": "Project ID for this request.",
68226	//       "location": "path",
68227	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
68228	//       "required": true,
68229	//       "type": "string"
68230	//     },
68231	//     "resource": {
68232	//       "description": "Name of the resource for this request.",
68233	//       "location": "path",
68234	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
68235	//       "required": true,
68236	//       "type": "string"
68237	//     }
68238	//   },
68239	//   "path": "{project}/global/snapshots/{resource}/setLabels",
68240	//   "request": {
68241	//     "$ref": "GlobalSetLabelsRequest"
68242	//   },
68243	//   "response": {
68244	//     "$ref": "Operation"
68245	//   },
68246	//   "scopes": [
68247	//     "https://www.googleapis.com/auth/cloud-platform",
68248	//     "https://www.googleapis.com/auth/compute"
68249	//   ]
68250	// }
68251
68252}
68253
68254// method id "compute.snapshots.testIamPermissions":
68255
68256type SnapshotsTestIamPermissionsCall struct {
68257	s                      *Service
68258	project                string
68259	resource               string
68260	testpermissionsrequest *TestPermissionsRequest
68261	urlParams_             gensupport.URLParams
68262	ctx_                   context.Context
68263	header_                http.Header
68264}
68265
68266// TestIamPermissions: Returns permissions that a caller has on the
68267// specified resource.
68268func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall {
68269	c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
68270	c.project = project
68271	c.resource = resource
68272	c.testpermissionsrequest = testpermissionsrequest
68273	return c
68274}
68275
68276// Fields allows partial responses to be retrieved. See
68277// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
68278// for more information.
68279func (c *SnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *SnapshotsTestIamPermissionsCall {
68280	c.urlParams_.Set("fields", googleapi.CombineFields(s))
68281	return c
68282}
68283
68284// Context sets the context to be used in this call's Do method. Any
68285// pending HTTP request will be aborted if the provided context is
68286// canceled.
68287func (c *SnapshotsTestIamPermissionsCall) Context(ctx context.Context) *SnapshotsTestIamPermissionsCall {
68288	c.ctx_ = ctx
68289	return c
68290}
68291
68292// Header returns an http.Header that can be modified by the caller to
68293// add HTTP headers to the request.
68294func (c *SnapshotsTestIamPermissionsCall) Header() http.Header {
68295	if c.header_ == nil {
68296		c.header_ = make(http.Header)
68297	}
68298	return c.header_
68299}
68300
68301func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
68302	reqHeaders := make(http.Header)
68303	for k, v := range c.header_ {
68304		reqHeaders[k] = v
68305	}
68306	reqHeaders.Set("User-Agent", c.s.userAgent())
68307	var body io.Reader = nil
68308	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
68309	if err != nil {
68310		return nil, err
68311	}
68312	reqHeaders.Set("Content-Type", "application/json")
68313	c.urlParams_.Set("alt", alt)
68314	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/testIamPermissions")
68315	urls += "?" + c.urlParams_.Encode()
68316	req, _ := http.NewRequest("POST", urls, body)
68317	req.Header = reqHeaders
68318	googleapi.Expand(req.URL, map[string]string{
68319		"project":  c.project,
68320		"resource": c.resource,
68321	})
68322	return gensupport.SendRequest(c.ctx_, c.s.client, req)
68323}
68324
68325// Do executes the "compute.snapshots.testIamPermissions" call.
68326// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
68327// non-2xx status code is an error. Response headers are in either
68328// *TestPermissionsResponse.ServerResponse.Header or (if a response was
68329// returned at all) in error.(*googleapi.Error).Header. Use
68330// googleapi.IsNotModified to check whether the returned error was
68331// because http.StatusNotModified was returned.
68332func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
68333	gensupport.SetOptions(c.urlParams_, opts...)
68334	res, err := c.doRequest("json")
68335	if res != nil && res.StatusCode == http.StatusNotModified {
68336		if res.Body != nil {
68337			res.Body.Close()
68338		}
68339		return nil, &googleapi.Error{
68340			Code:   res.StatusCode,
68341			Header: res.Header,
68342		}
68343	}
68344	if err != nil {
68345		return nil, err
68346	}
68347	defer googleapi.CloseBody(res)
68348	if err := googleapi.CheckResponse(res); err != nil {
68349		return nil, err
68350	}
68351	ret := &TestPermissionsResponse{
68352		ServerResponse: googleapi.ServerResponse{
68353			Header:         res.Header,
68354			HTTPStatusCode: res.StatusCode,
68355		},
68356	}
68357	target := &ret
68358	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
68359		return nil, err
68360	}
68361	return ret, nil
68362	// {
68363	//   "description": "Returns permissions that a caller has on the specified resource.",
68364	//   "httpMethod": "POST",
68365	//   "id": "compute.snapshots.testIamPermissions",
68366	//   "parameterOrder": [
68367	//     "project",
68368	//     "resource"
68369	//   ],
68370	//   "parameters": {
68371	//     "project": {
68372	//       "description": "Project ID for this request.",
68373	//       "location": "path",
68374	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
68375	//       "required": true,
68376	//       "type": "string"
68377	//     },
68378	//     "resource": {
68379	//       "description": "Name of the resource for this request.",
68380	//       "location": "path",
68381	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
68382	//       "required": true,
68383	//       "type": "string"
68384	//     }
68385	//   },
68386	//   "path": "{project}/global/snapshots/{resource}/testIamPermissions",
68387	//   "request": {
68388	//     "$ref": "TestPermissionsRequest"
68389	//   },
68390	//   "response": {
68391	//     "$ref": "TestPermissionsResponse"
68392	//   },
68393	//   "scopes": [
68394	//     "https://www.googleapis.com/auth/cloud-platform",
68395	//     "https://www.googleapis.com/auth/compute",
68396	//     "https://www.googleapis.com/auth/compute.readonly"
68397	//   ]
68398	// }
68399
68400}
68401
68402// method id "compute.sslCertificates.delete":
68403
68404type SslCertificatesDeleteCall struct {
68405	s              *Service
68406	project        string
68407	sslCertificate string
68408	urlParams_     gensupport.URLParams
68409	ctx_           context.Context
68410	header_        http.Header
68411}
68412
68413// Delete: Deletes the specified SslCertificate resource.
68414func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall {
68415	c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
68416	c.project = project
68417	c.sslCertificate = sslCertificate
68418	return c
68419}
68420
68421// RequestId sets the optional parameter "requestId": An optional
68422// request ID to identify requests. Specify a unique request ID so that
68423// if you must retry your request, the server will know to ignore the
68424// request if it has already been completed.
68425//
68426// For example, consider a situation where you make an initial request
68427// and the request times out. If you make the request again with the
68428// same request ID, the server can check if original operation with the
68429// same request ID was received, and if so, will ignore the second
68430// request. This prevents clients from accidentally creating duplicate
68431// commitments.
68432//
68433// The request ID must be a valid UUID with the exception that zero UUID
68434// is not supported (00000000-0000-0000-0000-000000000000).
68435func (c *SslCertificatesDeleteCall) RequestId(requestId string) *SslCertificatesDeleteCall {
68436	c.urlParams_.Set("requestId", requestId)
68437	return c
68438}
68439
68440// Fields allows partial responses to be retrieved. See
68441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
68442// for more information.
68443func (c *SslCertificatesDeleteCall) Fields(s ...googleapi.Field) *SslCertificatesDeleteCall {
68444	c.urlParams_.Set("fields", googleapi.CombineFields(s))
68445	return c
68446}
68447
68448// Context sets the context to be used in this call's Do method. Any
68449// pending HTTP request will be aborted if the provided context is
68450// canceled.
68451func (c *SslCertificatesDeleteCall) Context(ctx context.Context) *SslCertificatesDeleteCall {
68452	c.ctx_ = ctx
68453	return c
68454}
68455
68456// Header returns an http.Header that can be modified by the caller to
68457// add HTTP headers to the request.
68458func (c *SslCertificatesDeleteCall) Header() http.Header {
68459	if c.header_ == nil {
68460		c.header_ = make(http.Header)
68461	}
68462	return c.header_
68463}
68464
68465func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
68466	reqHeaders := make(http.Header)
68467	for k, v := range c.header_ {
68468		reqHeaders[k] = v
68469	}
68470	reqHeaders.Set("User-Agent", c.s.userAgent())
68471	var body io.Reader = nil
68472	c.urlParams_.Set("alt", alt)
68473	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}")
68474	urls += "?" + c.urlParams_.Encode()
68475	req, _ := http.NewRequest("DELETE", urls, body)
68476	req.Header = reqHeaders
68477	googleapi.Expand(req.URL, map[string]string{
68478		"project":        c.project,
68479		"sslCertificate": c.sslCertificate,
68480	})
68481	return gensupport.SendRequest(c.ctx_, c.s.client, req)
68482}
68483
68484// Do executes the "compute.sslCertificates.delete" call.
68485// Exactly one of *Operation or error will be non-nil. Any non-2xx
68486// status code is an error. Response headers are in either
68487// *Operation.ServerResponse.Header or (if a response was returned at
68488// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
68489// to check whether the returned error was because
68490// http.StatusNotModified was returned.
68491func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
68492	gensupport.SetOptions(c.urlParams_, opts...)
68493	res, err := c.doRequest("json")
68494	if res != nil && res.StatusCode == http.StatusNotModified {
68495		if res.Body != nil {
68496			res.Body.Close()
68497		}
68498		return nil, &googleapi.Error{
68499			Code:   res.StatusCode,
68500			Header: res.Header,
68501		}
68502	}
68503	if err != nil {
68504		return nil, err
68505	}
68506	defer googleapi.CloseBody(res)
68507	if err := googleapi.CheckResponse(res); err != nil {
68508		return nil, err
68509	}
68510	ret := &Operation{
68511		ServerResponse: googleapi.ServerResponse{
68512			Header:         res.Header,
68513			HTTPStatusCode: res.StatusCode,
68514		},
68515	}
68516	target := &ret
68517	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
68518		return nil, err
68519	}
68520	return ret, nil
68521	// {
68522	//   "description": "Deletes the specified SslCertificate resource.",
68523	//   "httpMethod": "DELETE",
68524	//   "id": "compute.sslCertificates.delete",
68525	//   "parameterOrder": [
68526	//     "project",
68527	//     "sslCertificate"
68528	//   ],
68529	//   "parameters": {
68530	//     "project": {
68531	//       "description": "Project ID for this request.",
68532	//       "location": "path",
68533	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
68534	//       "required": true,
68535	//       "type": "string"
68536	//     },
68537	//     "requestId": {
68538	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
68539	//       "location": "query",
68540	//       "type": "string"
68541	//     },
68542	//     "sslCertificate": {
68543	//       "description": "Name of the SslCertificate resource to delete.",
68544	//       "location": "path",
68545	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
68546	//       "required": true,
68547	//       "type": "string"
68548	//     }
68549	//   },
68550	//   "path": "{project}/global/sslCertificates/{sslCertificate}",
68551	//   "response": {
68552	//     "$ref": "Operation"
68553	//   },
68554	//   "scopes": [
68555	//     "https://www.googleapis.com/auth/cloud-platform",
68556	//     "https://www.googleapis.com/auth/compute"
68557	//   ]
68558	// }
68559
68560}
68561
68562// method id "compute.sslCertificates.get":
68563
68564type SslCertificatesGetCall struct {
68565	s              *Service
68566	project        string
68567	sslCertificate string
68568	urlParams_     gensupport.URLParams
68569	ifNoneMatch_   string
68570	ctx_           context.Context
68571	header_        http.Header
68572}
68573
68574// Get: Returns the specified SslCertificate resource. Get a list of
68575// available SSL certificates by making a list() request.
68576func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall {
68577	c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
68578	c.project = project
68579	c.sslCertificate = sslCertificate
68580	return c
68581}
68582
68583// Fields allows partial responses to be retrieved. See
68584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
68585// for more information.
68586func (c *SslCertificatesGetCall) Fields(s ...googleapi.Field) *SslCertificatesGetCall {
68587	c.urlParams_.Set("fields", googleapi.CombineFields(s))
68588	return c
68589}
68590
68591// IfNoneMatch sets the optional parameter which makes the operation
68592// fail if the object's ETag matches the given value. This is useful for
68593// getting updates only after the object has changed since the last
68594// request. Use googleapi.IsNotModified to check whether the response
68595// error from Do is the result of In-None-Match.
68596func (c *SslCertificatesGetCall) IfNoneMatch(entityTag string) *SslCertificatesGetCall {
68597	c.ifNoneMatch_ = entityTag
68598	return c
68599}
68600
68601// Context sets the context to be used in this call's Do method. Any
68602// pending HTTP request will be aborted if the provided context is
68603// canceled.
68604func (c *SslCertificatesGetCall) Context(ctx context.Context) *SslCertificatesGetCall {
68605	c.ctx_ = ctx
68606	return c
68607}
68608
68609// Header returns an http.Header that can be modified by the caller to
68610// add HTTP headers to the request.
68611func (c *SslCertificatesGetCall) Header() http.Header {
68612	if c.header_ == nil {
68613		c.header_ = make(http.Header)
68614	}
68615	return c.header_
68616}
68617
68618func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
68619	reqHeaders := make(http.Header)
68620	for k, v := range c.header_ {
68621		reqHeaders[k] = v
68622	}
68623	reqHeaders.Set("User-Agent", c.s.userAgent())
68624	if c.ifNoneMatch_ != "" {
68625		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
68626	}
68627	var body io.Reader = nil
68628	c.urlParams_.Set("alt", alt)
68629	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}")
68630	urls += "?" + c.urlParams_.Encode()
68631	req, _ := http.NewRequest("GET", urls, body)
68632	req.Header = reqHeaders
68633	googleapi.Expand(req.URL, map[string]string{
68634		"project":        c.project,
68635		"sslCertificate": c.sslCertificate,
68636	})
68637	return gensupport.SendRequest(c.ctx_, c.s.client, req)
68638}
68639
68640// Do executes the "compute.sslCertificates.get" call.
68641// Exactly one of *SslCertificate or error will be non-nil. Any non-2xx
68642// status code is an error. Response headers are in either
68643// *SslCertificate.ServerResponse.Header or (if a response was returned
68644// at all) in error.(*googleapi.Error).Header. Use
68645// googleapi.IsNotModified to check whether the returned error was
68646// because http.StatusNotModified was returned.
68647func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, error) {
68648	gensupport.SetOptions(c.urlParams_, opts...)
68649	res, err := c.doRequest("json")
68650	if res != nil && res.StatusCode == http.StatusNotModified {
68651		if res.Body != nil {
68652			res.Body.Close()
68653		}
68654		return nil, &googleapi.Error{
68655			Code:   res.StatusCode,
68656			Header: res.Header,
68657		}
68658	}
68659	if err != nil {
68660		return nil, err
68661	}
68662	defer googleapi.CloseBody(res)
68663	if err := googleapi.CheckResponse(res); err != nil {
68664		return nil, err
68665	}
68666	ret := &SslCertificate{
68667		ServerResponse: googleapi.ServerResponse{
68668			Header:         res.Header,
68669			HTTPStatusCode: res.StatusCode,
68670		},
68671	}
68672	target := &ret
68673	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
68674		return nil, err
68675	}
68676	return ret, nil
68677	// {
68678	//   "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.",
68679	//   "httpMethod": "GET",
68680	//   "id": "compute.sslCertificates.get",
68681	//   "parameterOrder": [
68682	//     "project",
68683	//     "sslCertificate"
68684	//   ],
68685	//   "parameters": {
68686	//     "project": {
68687	//       "description": "Project ID for this request.",
68688	//       "location": "path",
68689	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
68690	//       "required": true,
68691	//       "type": "string"
68692	//     },
68693	//     "sslCertificate": {
68694	//       "description": "Name of the SslCertificate resource to return.",
68695	//       "location": "path",
68696	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
68697	//       "required": true,
68698	//       "type": "string"
68699	//     }
68700	//   },
68701	//   "path": "{project}/global/sslCertificates/{sslCertificate}",
68702	//   "response": {
68703	//     "$ref": "SslCertificate"
68704	//   },
68705	//   "scopes": [
68706	//     "https://www.googleapis.com/auth/cloud-platform",
68707	//     "https://www.googleapis.com/auth/compute",
68708	//     "https://www.googleapis.com/auth/compute.readonly"
68709	//   ]
68710	// }
68711
68712}
68713
68714// method id "compute.sslCertificates.insert":
68715
68716type SslCertificatesInsertCall struct {
68717	s              *Service
68718	project        string
68719	sslcertificate *SslCertificate
68720	urlParams_     gensupport.URLParams
68721	ctx_           context.Context
68722	header_        http.Header
68723}
68724
68725// Insert: Creates a SslCertificate resource in the specified project
68726// using the data included in the request.
68727func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall {
68728	c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
68729	c.project = project
68730	c.sslcertificate = sslcertificate
68731	return c
68732}
68733
68734// RequestId sets the optional parameter "requestId": An optional
68735// request ID to identify requests. Specify a unique request ID so that
68736// if you must retry your request, the server will know to ignore the
68737// request if it has already been completed.
68738//
68739// For example, consider a situation where you make an initial request
68740// and the request times out. If you make the request again with the
68741// same request ID, the server can check if original operation with the
68742// same request ID was received, and if so, will ignore the second
68743// request. This prevents clients from accidentally creating duplicate
68744// commitments.
68745//
68746// The request ID must be a valid UUID with the exception that zero UUID
68747// is not supported (00000000-0000-0000-0000-000000000000).
68748func (c *SslCertificatesInsertCall) RequestId(requestId string) *SslCertificatesInsertCall {
68749	c.urlParams_.Set("requestId", requestId)
68750	return c
68751}
68752
68753// Fields allows partial responses to be retrieved. See
68754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
68755// for more information.
68756func (c *SslCertificatesInsertCall) Fields(s ...googleapi.Field) *SslCertificatesInsertCall {
68757	c.urlParams_.Set("fields", googleapi.CombineFields(s))
68758	return c
68759}
68760
68761// Context sets the context to be used in this call's Do method. Any
68762// pending HTTP request will be aborted if the provided context is
68763// canceled.
68764func (c *SslCertificatesInsertCall) Context(ctx context.Context) *SslCertificatesInsertCall {
68765	c.ctx_ = ctx
68766	return c
68767}
68768
68769// Header returns an http.Header that can be modified by the caller to
68770// add HTTP headers to the request.
68771func (c *SslCertificatesInsertCall) Header() http.Header {
68772	if c.header_ == nil {
68773		c.header_ = make(http.Header)
68774	}
68775	return c.header_
68776}
68777
68778func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) {
68779	reqHeaders := make(http.Header)
68780	for k, v := range c.header_ {
68781		reqHeaders[k] = v
68782	}
68783	reqHeaders.Set("User-Agent", c.s.userAgent())
68784	var body io.Reader = nil
68785	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertificate)
68786	if err != nil {
68787		return nil, err
68788	}
68789	reqHeaders.Set("Content-Type", "application/json")
68790	c.urlParams_.Set("alt", alt)
68791	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates")
68792	urls += "?" + c.urlParams_.Encode()
68793	req, _ := http.NewRequest("POST", urls, body)
68794	req.Header = reqHeaders
68795	googleapi.Expand(req.URL, map[string]string{
68796		"project": c.project,
68797	})
68798	return gensupport.SendRequest(c.ctx_, c.s.client, req)
68799}
68800
68801// Do executes the "compute.sslCertificates.insert" call.
68802// Exactly one of *Operation or error will be non-nil. Any non-2xx
68803// status code is an error. Response headers are in either
68804// *Operation.ServerResponse.Header or (if a response was returned at
68805// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
68806// to check whether the returned error was because
68807// http.StatusNotModified was returned.
68808func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
68809	gensupport.SetOptions(c.urlParams_, opts...)
68810	res, err := c.doRequest("json")
68811	if res != nil && res.StatusCode == http.StatusNotModified {
68812		if res.Body != nil {
68813			res.Body.Close()
68814		}
68815		return nil, &googleapi.Error{
68816			Code:   res.StatusCode,
68817			Header: res.Header,
68818		}
68819	}
68820	if err != nil {
68821		return nil, err
68822	}
68823	defer googleapi.CloseBody(res)
68824	if err := googleapi.CheckResponse(res); err != nil {
68825		return nil, err
68826	}
68827	ret := &Operation{
68828		ServerResponse: googleapi.ServerResponse{
68829			Header:         res.Header,
68830			HTTPStatusCode: res.StatusCode,
68831		},
68832	}
68833	target := &ret
68834	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
68835		return nil, err
68836	}
68837	return ret, nil
68838	// {
68839	//   "description": "Creates a SslCertificate resource in the specified project using the data included in the request.",
68840	//   "httpMethod": "POST",
68841	//   "id": "compute.sslCertificates.insert",
68842	//   "parameterOrder": [
68843	//     "project"
68844	//   ],
68845	//   "parameters": {
68846	//     "project": {
68847	//       "description": "Project ID for this request.",
68848	//       "location": "path",
68849	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
68850	//       "required": true,
68851	//       "type": "string"
68852	//     },
68853	//     "requestId": {
68854	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
68855	//       "location": "query",
68856	//       "type": "string"
68857	//     }
68858	//   },
68859	//   "path": "{project}/global/sslCertificates",
68860	//   "request": {
68861	//     "$ref": "SslCertificate"
68862	//   },
68863	//   "response": {
68864	//     "$ref": "Operation"
68865	//   },
68866	//   "scopes": [
68867	//     "https://www.googleapis.com/auth/cloud-platform",
68868	//     "https://www.googleapis.com/auth/compute"
68869	//   ]
68870	// }
68871
68872}
68873
68874// method id "compute.sslCertificates.list":
68875
68876type SslCertificatesListCall struct {
68877	s            *Service
68878	project      string
68879	urlParams_   gensupport.URLParams
68880	ifNoneMatch_ string
68881	ctx_         context.Context
68882	header_      http.Header
68883}
68884
68885// List: Retrieves the list of SslCertificate resources available to the
68886// specified project.
68887func (r *SslCertificatesService) List(project string) *SslCertificatesListCall {
68888	c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
68889	c.project = project
68890	return c
68891}
68892
68893// Filter sets the optional parameter "filter": Sets a filter
68894// {expression} for filtering listed resources. Your {expression} must
68895// be in the format: field_name comparison_string literal_string.
68896//
68897// The field_name is the name of the field you want to compare. Only
68898// atomic field types are supported (string, number, boolean). The
68899// comparison_string must be either eq (equals) or ne (not equals). The
68900// literal_string is the string value to filter to. The literal value
68901// must be valid for the type of field you are filtering by (string,
68902// number, boolean). For string fields, the literal value is interpreted
68903// as a regular expression using RE2 syntax. The literal value must
68904// match the entire field.
68905//
68906// For example, to filter for instances that do not have a name of
68907// example-instance, you would use name ne example-instance.
68908//
68909// You can filter on nested fields. For example, you could filter on
68910// instances that have set the scheduling.automaticRestart field to
68911// true. Use filtering on nested fields to take advantage of labels to
68912// organize and search for results based on label values.
68913//
68914// To filter on multiple expressions, provide each separate expression
68915// within parentheses. For example, (scheduling.automaticRestart eq
68916// true) (zone eq us-central1-f). Multiple expressions are treated as
68917// AND expressions, meaning that resources must match all expressions to
68918// pass the filters.
68919func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall {
68920	c.urlParams_.Set("filter", filter)
68921	return c
68922}
68923
68924// MaxResults sets the optional parameter "maxResults": The maximum
68925// number of results per page that should be returned. If the number of
68926// available results is larger than maxResults, Compute Engine returns a
68927// nextPageToken that can be used to get the next page of results in
68928// subsequent list requests. Acceptable values are 0 to 500, inclusive.
68929// (Default: 500)
68930func (c *SslCertificatesListCall) MaxResults(maxResults int64) *SslCertificatesListCall {
68931	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
68932	return c
68933}
68934
68935// OrderBy sets the optional parameter "orderBy": Sorts list results by
68936// a certain order. By default, results are returned in alphanumerical
68937// order based on the resource name.
68938//
68939// You can also sort results in descending order based on the creation
68940// timestamp using orderBy="creationTimestamp desc". This sorts results
68941// based on the creationTimestamp field in reverse chronological order
68942// (newest result first). Use this to sort resources like operations so
68943// that the newest operation is returned first.
68944//
68945// Currently, only sorting by name or creationTimestamp desc is
68946// supported.
68947func (c *SslCertificatesListCall) OrderBy(orderBy string) *SslCertificatesListCall {
68948	c.urlParams_.Set("orderBy", orderBy)
68949	return c
68950}
68951
68952// PageToken sets the optional parameter "pageToken": Specifies a page
68953// token to use. Set pageToken to the nextPageToken returned by a
68954// previous list request to get the next page of results.
68955func (c *SslCertificatesListCall) PageToken(pageToken string) *SslCertificatesListCall {
68956	c.urlParams_.Set("pageToken", pageToken)
68957	return c
68958}
68959
68960// Fields allows partial responses to be retrieved. See
68961// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
68962// for more information.
68963func (c *SslCertificatesListCall) Fields(s ...googleapi.Field) *SslCertificatesListCall {
68964	c.urlParams_.Set("fields", googleapi.CombineFields(s))
68965	return c
68966}
68967
68968// IfNoneMatch sets the optional parameter which makes the operation
68969// fail if the object's ETag matches the given value. This is useful for
68970// getting updates only after the object has changed since the last
68971// request. Use googleapi.IsNotModified to check whether the response
68972// error from Do is the result of In-None-Match.
68973func (c *SslCertificatesListCall) IfNoneMatch(entityTag string) *SslCertificatesListCall {
68974	c.ifNoneMatch_ = entityTag
68975	return c
68976}
68977
68978// Context sets the context to be used in this call's Do method. Any
68979// pending HTTP request will be aborted if the provided context is
68980// canceled.
68981func (c *SslCertificatesListCall) Context(ctx context.Context) *SslCertificatesListCall {
68982	c.ctx_ = ctx
68983	return c
68984}
68985
68986// Header returns an http.Header that can be modified by the caller to
68987// add HTTP headers to the request.
68988func (c *SslCertificatesListCall) Header() http.Header {
68989	if c.header_ == nil {
68990		c.header_ = make(http.Header)
68991	}
68992	return c.header_
68993}
68994
68995func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) {
68996	reqHeaders := make(http.Header)
68997	for k, v := range c.header_ {
68998		reqHeaders[k] = v
68999	}
69000	reqHeaders.Set("User-Agent", c.s.userAgent())
69001	if c.ifNoneMatch_ != "" {
69002		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
69003	}
69004	var body io.Reader = nil
69005	c.urlParams_.Set("alt", alt)
69006	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates")
69007	urls += "?" + c.urlParams_.Encode()
69008	req, _ := http.NewRequest("GET", urls, body)
69009	req.Header = reqHeaders
69010	googleapi.Expand(req.URL, map[string]string{
69011		"project": c.project,
69012	})
69013	return gensupport.SendRequest(c.ctx_, c.s.client, req)
69014}
69015
69016// Do executes the "compute.sslCertificates.list" call.
69017// Exactly one of *SslCertificateList or error will be non-nil. Any
69018// non-2xx status code is an error. Response headers are in either
69019// *SslCertificateList.ServerResponse.Header or (if a response was
69020// returned at all) in error.(*googleapi.Error).Header. Use
69021// googleapi.IsNotModified to check whether the returned error was
69022// because http.StatusNotModified was returned.
69023func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, error) {
69024	gensupport.SetOptions(c.urlParams_, opts...)
69025	res, err := c.doRequest("json")
69026	if res != nil && res.StatusCode == http.StatusNotModified {
69027		if res.Body != nil {
69028			res.Body.Close()
69029		}
69030		return nil, &googleapi.Error{
69031			Code:   res.StatusCode,
69032			Header: res.Header,
69033		}
69034	}
69035	if err != nil {
69036		return nil, err
69037	}
69038	defer googleapi.CloseBody(res)
69039	if err := googleapi.CheckResponse(res); err != nil {
69040		return nil, err
69041	}
69042	ret := &SslCertificateList{
69043		ServerResponse: googleapi.ServerResponse{
69044			Header:         res.Header,
69045			HTTPStatusCode: res.StatusCode,
69046		},
69047	}
69048	target := &ret
69049	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
69050		return nil, err
69051	}
69052	return ret, nil
69053	// {
69054	//   "description": "Retrieves the list of SslCertificate resources available to the specified project.",
69055	//   "httpMethod": "GET",
69056	//   "id": "compute.sslCertificates.list",
69057	//   "parameterOrder": [
69058	//     "project"
69059	//   ],
69060	//   "parameters": {
69061	//     "filter": {
69062	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
69063	//       "location": "query",
69064	//       "type": "string"
69065	//     },
69066	//     "maxResults": {
69067	//       "default": "500",
69068	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
69069	//       "format": "uint32",
69070	//       "location": "query",
69071	//       "minimum": "0",
69072	//       "type": "integer"
69073	//     },
69074	//     "orderBy": {
69075	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
69076	//       "location": "query",
69077	//       "type": "string"
69078	//     },
69079	//     "pageToken": {
69080	//       "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.",
69081	//       "location": "query",
69082	//       "type": "string"
69083	//     },
69084	//     "project": {
69085	//       "description": "Project ID for this request.",
69086	//       "location": "path",
69087	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
69088	//       "required": true,
69089	//       "type": "string"
69090	//     }
69091	//   },
69092	//   "path": "{project}/global/sslCertificates",
69093	//   "response": {
69094	//     "$ref": "SslCertificateList"
69095	//   },
69096	//   "scopes": [
69097	//     "https://www.googleapis.com/auth/cloud-platform",
69098	//     "https://www.googleapis.com/auth/compute",
69099	//     "https://www.googleapis.com/auth/compute.readonly"
69100	//   ]
69101	// }
69102
69103}
69104
69105// Pages invokes f for each page of results.
69106// A non-nil error returned from f will halt the iteration.
69107// The provided context supersedes any context provided to the Context method.
69108func (c *SslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error {
69109	c.ctx_ = ctx
69110	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
69111	for {
69112		x, err := c.Do()
69113		if err != nil {
69114			return err
69115		}
69116		if err := f(x); err != nil {
69117			return err
69118		}
69119		if x.NextPageToken == "" {
69120			return nil
69121		}
69122		c.PageToken(x.NextPageToken)
69123	}
69124}
69125
69126// method id "compute.sslCertificates.testIamPermissions":
69127
69128type SslCertificatesTestIamPermissionsCall struct {
69129	s                      *Service
69130	project                string
69131	resource               string
69132	testpermissionsrequest *TestPermissionsRequest
69133	urlParams_             gensupport.URLParams
69134	ctx_                   context.Context
69135	header_                http.Header
69136}
69137
69138// TestIamPermissions: Returns permissions that a caller has on the
69139// specified resource.
69140func (r *SslCertificatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslCertificatesTestIamPermissionsCall {
69141	c := &SslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
69142	c.project = project
69143	c.resource = resource
69144	c.testpermissionsrequest = testpermissionsrequest
69145	return c
69146}
69147
69148// Fields allows partial responses to be retrieved. See
69149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
69150// for more information.
69151func (c *SslCertificatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SslCertificatesTestIamPermissionsCall {
69152	c.urlParams_.Set("fields", googleapi.CombineFields(s))
69153	return c
69154}
69155
69156// Context sets the context to be used in this call's Do method. Any
69157// pending HTTP request will be aborted if the provided context is
69158// canceled.
69159func (c *SslCertificatesTestIamPermissionsCall) Context(ctx context.Context) *SslCertificatesTestIamPermissionsCall {
69160	c.ctx_ = ctx
69161	return c
69162}
69163
69164// Header returns an http.Header that can be modified by the caller to
69165// add HTTP headers to the request.
69166func (c *SslCertificatesTestIamPermissionsCall) Header() http.Header {
69167	if c.header_ == nil {
69168		c.header_ = make(http.Header)
69169	}
69170	return c.header_
69171}
69172
69173func (c *SslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
69174	reqHeaders := make(http.Header)
69175	for k, v := range c.header_ {
69176		reqHeaders[k] = v
69177	}
69178	reqHeaders.Set("User-Agent", c.s.userAgent())
69179	var body io.Reader = nil
69180	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
69181	if err != nil {
69182		return nil, err
69183	}
69184	reqHeaders.Set("Content-Type", "application/json")
69185	c.urlParams_.Set("alt", alt)
69186	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{resource}/testIamPermissions")
69187	urls += "?" + c.urlParams_.Encode()
69188	req, _ := http.NewRequest("POST", urls, body)
69189	req.Header = reqHeaders
69190	googleapi.Expand(req.URL, map[string]string{
69191		"project":  c.project,
69192		"resource": c.resource,
69193	})
69194	return gensupport.SendRequest(c.ctx_, c.s.client, req)
69195}
69196
69197// Do executes the "compute.sslCertificates.testIamPermissions" call.
69198// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
69199// non-2xx status code is an error. Response headers are in either
69200// *TestPermissionsResponse.ServerResponse.Header or (if a response was
69201// returned at all) in error.(*googleapi.Error).Header. Use
69202// googleapi.IsNotModified to check whether the returned error was
69203// because http.StatusNotModified was returned.
69204func (c *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
69205	gensupport.SetOptions(c.urlParams_, opts...)
69206	res, err := c.doRequest("json")
69207	if res != nil && res.StatusCode == http.StatusNotModified {
69208		if res.Body != nil {
69209			res.Body.Close()
69210		}
69211		return nil, &googleapi.Error{
69212			Code:   res.StatusCode,
69213			Header: res.Header,
69214		}
69215	}
69216	if err != nil {
69217		return nil, err
69218	}
69219	defer googleapi.CloseBody(res)
69220	if err := googleapi.CheckResponse(res); err != nil {
69221		return nil, err
69222	}
69223	ret := &TestPermissionsResponse{
69224		ServerResponse: googleapi.ServerResponse{
69225			Header:         res.Header,
69226			HTTPStatusCode: res.StatusCode,
69227		},
69228	}
69229	target := &ret
69230	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
69231		return nil, err
69232	}
69233	return ret, nil
69234	// {
69235	//   "description": "Returns permissions that a caller has on the specified resource.",
69236	//   "httpMethod": "POST",
69237	//   "id": "compute.sslCertificates.testIamPermissions",
69238	//   "parameterOrder": [
69239	//     "project",
69240	//     "resource"
69241	//   ],
69242	//   "parameters": {
69243	//     "project": {
69244	//       "description": "Project ID for this request.",
69245	//       "location": "path",
69246	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
69247	//       "required": true,
69248	//       "type": "string"
69249	//     },
69250	//     "resource": {
69251	//       "description": "Name of the resource for this request.",
69252	//       "location": "path",
69253	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
69254	//       "required": true,
69255	//       "type": "string"
69256	//     }
69257	//   },
69258	//   "path": "{project}/global/sslCertificates/{resource}/testIamPermissions",
69259	//   "request": {
69260	//     "$ref": "TestPermissionsRequest"
69261	//   },
69262	//   "response": {
69263	//     "$ref": "TestPermissionsResponse"
69264	//   },
69265	//   "scopes": [
69266	//     "https://www.googleapis.com/auth/cloud-platform",
69267	//     "https://www.googleapis.com/auth/compute",
69268	//     "https://www.googleapis.com/auth/compute.readonly"
69269	//   ]
69270	// }
69271
69272}
69273
69274// method id "compute.subnetworks.aggregatedList":
69275
69276type SubnetworksAggregatedListCall struct {
69277	s            *Service
69278	project      string
69279	urlParams_   gensupport.URLParams
69280	ifNoneMatch_ string
69281	ctx_         context.Context
69282	header_      http.Header
69283}
69284
69285// AggregatedList: Retrieves an aggregated list of subnetworks.
69286func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall {
69287	c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
69288	c.project = project
69289	return c
69290}
69291
69292// Filter sets the optional parameter "filter": Sets a filter
69293// {expression} for filtering listed resources. Your {expression} must
69294// be in the format: field_name comparison_string literal_string.
69295//
69296// The field_name is the name of the field you want to compare. Only
69297// atomic field types are supported (string, number, boolean). The
69298// comparison_string must be either eq (equals) or ne (not equals). The
69299// literal_string is the string value to filter to. The literal value
69300// must be valid for the type of field you are filtering by (string,
69301// number, boolean). For string fields, the literal value is interpreted
69302// as a regular expression using RE2 syntax. The literal value must
69303// match the entire field.
69304//
69305// For example, to filter for instances that do not have a name of
69306// example-instance, you would use name ne example-instance.
69307//
69308// You can filter on nested fields. For example, you could filter on
69309// instances that have set the scheduling.automaticRestart field to
69310// true. Use filtering on nested fields to take advantage of labels to
69311// organize and search for results based on label values.
69312//
69313// To filter on multiple expressions, provide each separate expression
69314// within parentheses. For example, (scheduling.automaticRestart eq
69315// true) (zone eq us-central1-f). Multiple expressions are treated as
69316// AND expressions, meaning that resources must match all expressions to
69317// pass the filters.
69318func (c *SubnetworksAggregatedListCall) Filter(filter string) *SubnetworksAggregatedListCall {
69319	c.urlParams_.Set("filter", filter)
69320	return c
69321}
69322
69323// MaxResults sets the optional parameter "maxResults": The maximum
69324// number of results per page that should be returned. If the number of
69325// available results is larger than maxResults, Compute Engine returns a
69326// nextPageToken that can be used to get the next page of results in
69327// subsequent list requests. Acceptable values are 0 to 500, inclusive.
69328// (Default: 500)
69329func (c *SubnetworksAggregatedListCall) MaxResults(maxResults int64) *SubnetworksAggregatedListCall {
69330	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
69331	return c
69332}
69333
69334// OrderBy sets the optional parameter "orderBy": Sorts list results by
69335// a certain order. By default, results are returned in alphanumerical
69336// order based on the resource name.
69337//
69338// You can also sort results in descending order based on the creation
69339// timestamp using orderBy="creationTimestamp desc". This sorts results
69340// based on the creationTimestamp field in reverse chronological order
69341// (newest result first). Use this to sort resources like operations so
69342// that the newest operation is returned first.
69343//
69344// Currently, only sorting by name or creationTimestamp desc is
69345// supported.
69346func (c *SubnetworksAggregatedListCall) OrderBy(orderBy string) *SubnetworksAggregatedListCall {
69347	c.urlParams_.Set("orderBy", orderBy)
69348	return c
69349}
69350
69351// PageToken sets the optional parameter "pageToken": Specifies a page
69352// token to use. Set pageToken to the nextPageToken returned by a
69353// previous list request to get the next page of results.
69354func (c *SubnetworksAggregatedListCall) PageToken(pageToken string) *SubnetworksAggregatedListCall {
69355	c.urlParams_.Set("pageToken", pageToken)
69356	return c
69357}
69358
69359// Fields allows partial responses to be retrieved. See
69360// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
69361// for more information.
69362func (c *SubnetworksAggregatedListCall) Fields(s ...googleapi.Field) *SubnetworksAggregatedListCall {
69363	c.urlParams_.Set("fields", googleapi.CombineFields(s))
69364	return c
69365}
69366
69367// IfNoneMatch sets the optional parameter which makes the operation
69368// fail if the object's ETag matches the given value. This is useful for
69369// getting updates only after the object has changed since the last
69370// request. Use googleapi.IsNotModified to check whether the response
69371// error from Do is the result of In-None-Match.
69372func (c *SubnetworksAggregatedListCall) IfNoneMatch(entityTag string) *SubnetworksAggregatedListCall {
69373	c.ifNoneMatch_ = entityTag
69374	return c
69375}
69376
69377// Context sets the context to be used in this call's Do method. Any
69378// pending HTTP request will be aborted if the provided context is
69379// canceled.
69380func (c *SubnetworksAggregatedListCall) Context(ctx context.Context) *SubnetworksAggregatedListCall {
69381	c.ctx_ = ctx
69382	return c
69383}
69384
69385// Header returns an http.Header that can be modified by the caller to
69386// add HTTP headers to the request.
69387func (c *SubnetworksAggregatedListCall) Header() http.Header {
69388	if c.header_ == nil {
69389		c.header_ = make(http.Header)
69390	}
69391	return c.header_
69392}
69393
69394func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) {
69395	reqHeaders := make(http.Header)
69396	for k, v := range c.header_ {
69397		reqHeaders[k] = v
69398	}
69399	reqHeaders.Set("User-Agent", c.s.userAgent())
69400	if c.ifNoneMatch_ != "" {
69401		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
69402	}
69403	var body io.Reader = nil
69404	c.urlParams_.Set("alt", alt)
69405	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/subnetworks")
69406	urls += "?" + c.urlParams_.Encode()
69407	req, _ := http.NewRequest("GET", urls, body)
69408	req.Header = reqHeaders
69409	googleapi.Expand(req.URL, map[string]string{
69410		"project": c.project,
69411	})
69412	return gensupport.SendRequest(c.ctx_, c.s.client, req)
69413}
69414
69415// Do executes the "compute.subnetworks.aggregatedList" call.
69416// Exactly one of *SubnetworkAggregatedList or error will be non-nil.
69417// Any non-2xx status code is an error. Response headers are in either
69418// *SubnetworkAggregatedList.ServerResponse.Header or (if a response was
69419// returned at all) in error.(*googleapi.Error).Header. Use
69420// googleapi.IsNotModified to check whether the returned error was
69421// because http.StatusNotModified was returned.
69422func (c *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*SubnetworkAggregatedList, error) {
69423	gensupport.SetOptions(c.urlParams_, opts...)
69424	res, err := c.doRequest("json")
69425	if res != nil && res.StatusCode == http.StatusNotModified {
69426		if res.Body != nil {
69427			res.Body.Close()
69428		}
69429		return nil, &googleapi.Error{
69430			Code:   res.StatusCode,
69431			Header: res.Header,
69432		}
69433	}
69434	if err != nil {
69435		return nil, err
69436	}
69437	defer googleapi.CloseBody(res)
69438	if err := googleapi.CheckResponse(res); err != nil {
69439		return nil, err
69440	}
69441	ret := &SubnetworkAggregatedList{
69442		ServerResponse: googleapi.ServerResponse{
69443			Header:         res.Header,
69444			HTTPStatusCode: res.StatusCode,
69445		},
69446	}
69447	target := &ret
69448	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
69449		return nil, err
69450	}
69451	return ret, nil
69452	// {
69453	//   "description": "Retrieves an aggregated list of subnetworks.",
69454	//   "httpMethod": "GET",
69455	//   "id": "compute.subnetworks.aggregatedList",
69456	//   "parameterOrder": [
69457	//     "project"
69458	//   ],
69459	//   "parameters": {
69460	//     "filter": {
69461	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
69462	//       "location": "query",
69463	//       "type": "string"
69464	//     },
69465	//     "maxResults": {
69466	//       "default": "500",
69467	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
69468	//       "format": "uint32",
69469	//       "location": "query",
69470	//       "minimum": "0",
69471	//       "type": "integer"
69472	//     },
69473	//     "orderBy": {
69474	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
69475	//       "location": "query",
69476	//       "type": "string"
69477	//     },
69478	//     "pageToken": {
69479	//       "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.",
69480	//       "location": "query",
69481	//       "type": "string"
69482	//     },
69483	//     "project": {
69484	//       "description": "Project ID for this request.",
69485	//       "location": "path",
69486	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
69487	//       "required": true,
69488	//       "type": "string"
69489	//     }
69490	//   },
69491	//   "path": "{project}/aggregated/subnetworks",
69492	//   "response": {
69493	//     "$ref": "SubnetworkAggregatedList"
69494	//   },
69495	//   "scopes": [
69496	//     "https://www.googleapis.com/auth/cloud-platform",
69497	//     "https://www.googleapis.com/auth/compute",
69498	//     "https://www.googleapis.com/auth/compute.readonly"
69499	//   ]
69500	// }
69501
69502}
69503
69504// Pages invokes f for each page of results.
69505// A non-nil error returned from f will halt the iteration.
69506// The provided context supersedes any context provided to the Context method.
69507func (c *SubnetworksAggregatedListCall) Pages(ctx context.Context, f func(*SubnetworkAggregatedList) error) error {
69508	c.ctx_ = ctx
69509	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
69510	for {
69511		x, err := c.Do()
69512		if err != nil {
69513			return err
69514		}
69515		if err := f(x); err != nil {
69516			return err
69517		}
69518		if x.NextPageToken == "" {
69519			return nil
69520		}
69521		c.PageToken(x.NextPageToken)
69522	}
69523}
69524
69525// method id "compute.subnetworks.delete":
69526
69527type SubnetworksDeleteCall struct {
69528	s          *Service
69529	project    string
69530	region     string
69531	subnetwork string
69532	urlParams_ gensupport.URLParams
69533	ctx_       context.Context
69534	header_    http.Header
69535}
69536
69537// Delete: Deletes the specified subnetwork.
69538func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall {
69539	c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
69540	c.project = project
69541	c.region = region
69542	c.subnetwork = subnetwork
69543	return c
69544}
69545
69546// RequestId sets the optional parameter "requestId": An optional
69547// request ID to identify requests. Specify a unique request ID so that
69548// if you must retry your request, the server will know to ignore the
69549// request if it has already been completed.
69550//
69551// For example, consider a situation where you make an initial request
69552// and the request times out. If you make the request again with the
69553// same request ID, the server can check if original operation with the
69554// same request ID was received, and if so, will ignore the second
69555// request. This prevents clients from accidentally creating duplicate
69556// commitments.
69557//
69558// The request ID must be a valid UUID with the exception that zero UUID
69559// is not supported (00000000-0000-0000-0000-000000000000).
69560func (c *SubnetworksDeleteCall) RequestId(requestId string) *SubnetworksDeleteCall {
69561	c.urlParams_.Set("requestId", requestId)
69562	return c
69563}
69564
69565// Fields allows partial responses to be retrieved. See
69566// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
69567// for more information.
69568func (c *SubnetworksDeleteCall) Fields(s ...googleapi.Field) *SubnetworksDeleteCall {
69569	c.urlParams_.Set("fields", googleapi.CombineFields(s))
69570	return c
69571}
69572
69573// Context sets the context to be used in this call's Do method. Any
69574// pending HTTP request will be aborted if the provided context is
69575// canceled.
69576func (c *SubnetworksDeleteCall) Context(ctx context.Context) *SubnetworksDeleteCall {
69577	c.ctx_ = ctx
69578	return c
69579}
69580
69581// Header returns an http.Header that can be modified by the caller to
69582// add HTTP headers to the request.
69583func (c *SubnetworksDeleteCall) Header() http.Header {
69584	if c.header_ == nil {
69585		c.header_ = make(http.Header)
69586	}
69587	return c.header_
69588}
69589
69590func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) {
69591	reqHeaders := make(http.Header)
69592	for k, v := range c.header_ {
69593		reqHeaders[k] = v
69594	}
69595	reqHeaders.Set("User-Agent", c.s.userAgent())
69596	var body io.Reader = nil
69597	c.urlParams_.Set("alt", alt)
69598	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}")
69599	urls += "?" + c.urlParams_.Encode()
69600	req, _ := http.NewRequest("DELETE", urls, body)
69601	req.Header = reqHeaders
69602	googleapi.Expand(req.URL, map[string]string{
69603		"project":    c.project,
69604		"region":     c.region,
69605		"subnetwork": c.subnetwork,
69606	})
69607	return gensupport.SendRequest(c.ctx_, c.s.client, req)
69608}
69609
69610// Do executes the "compute.subnetworks.delete" call.
69611// Exactly one of *Operation or error will be non-nil. Any non-2xx
69612// status code is an error. Response headers are in either
69613// *Operation.ServerResponse.Header or (if a response was returned at
69614// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
69615// to check whether the returned error was because
69616// http.StatusNotModified was returned.
69617func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
69618	gensupport.SetOptions(c.urlParams_, opts...)
69619	res, err := c.doRequest("json")
69620	if res != nil && res.StatusCode == http.StatusNotModified {
69621		if res.Body != nil {
69622			res.Body.Close()
69623		}
69624		return nil, &googleapi.Error{
69625			Code:   res.StatusCode,
69626			Header: res.Header,
69627		}
69628	}
69629	if err != nil {
69630		return nil, err
69631	}
69632	defer googleapi.CloseBody(res)
69633	if err := googleapi.CheckResponse(res); err != nil {
69634		return nil, err
69635	}
69636	ret := &Operation{
69637		ServerResponse: googleapi.ServerResponse{
69638			Header:         res.Header,
69639			HTTPStatusCode: res.StatusCode,
69640		},
69641	}
69642	target := &ret
69643	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
69644		return nil, err
69645	}
69646	return ret, nil
69647	// {
69648	//   "description": "Deletes the specified subnetwork.",
69649	//   "httpMethod": "DELETE",
69650	//   "id": "compute.subnetworks.delete",
69651	//   "parameterOrder": [
69652	//     "project",
69653	//     "region",
69654	//     "subnetwork"
69655	//   ],
69656	//   "parameters": {
69657	//     "project": {
69658	//       "description": "Project ID for this request.",
69659	//       "location": "path",
69660	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
69661	//       "required": true,
69662	//       "type": "string"
69663	//     },
69664	//     "region": {
69665	//       "description": "Name of the region scoping this request.",
69666	//       "location": "path",
69667	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
69668	//       "required": true,
69669	//       "type": "string"
69670	//     },
69671	//     "requestId": {
69672	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
69673	//       "location": "query",
69674	//       "type": "string"
69675	//     },
69676	//     "subnetwork": {
69677	//       "description": "Name of the Subnetwork resource to delete.",
69678	//       "location": "path",
69679	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
69680	//       "required": true,
69681	//       "type": "string"
69682	//     }
69683	//   },
69684	//   "path": "{project}/regions/{region}/subnetworks/{subnetwork}",
69685	//   "response": {
69686	//     "$ref": "Operation"
69687	//   },
69688	//   "scopes": [
69689	//     "https://www.googleapis.com/auth/cloud-platform",
69690	//     "https://www.googleapis.com/auth/compute"
69691	//   ]
69692	// }
69693
69694}
69695
69696// method id "compute.subnetworks.expandIpCidrRange":
69697
69698type SubnetworksExpandIpCidrRangeCall struct {
69699	s                                   *Service
69700	project                             string
69701	region                              string
69702	subnetwork                          string
69703	subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest
69704	urlParams_                          gensupport.URLParams
69705	ctx_                                context.Context
69706	header_                             http.Header
69707}
69708
69709// ExpandIpCidrRange: Expands the IP CIDR range of the subnetwork to a
69710// specified value.
69711func (r *SubnetworksService) ExpandIpCidrRange(project string, region string, subnetwork string, subnetworksexpandipcidrrangerequest *SubnetworksExpandIpCidrRangeRequest) *SubnetworksExpandIpCidrRangeCall {
69712	c := &SubnetworksExpandIpCidrRangeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
69713	c.project = project
69714	c.region = region
69715	c.subnetwork = subnetwork
69716	c.subnetworksexpandipcidrrangerequest = subnetworksexpandipcidrrangerequest
69717	return c
69718}
69719
69720// RequestId sets the optional parameter "requestId": An optional
69721// request ID to identify requests. Specify a unique request ID so that
69722// if you must retry your request, the server will know to ignore the
69723// request if it has already been completed.
69724//
69725// For example, consider a situation where you make an initial request
69726// and the request times out. If you make the request again with the
69727// same request ID, the server can check if original operation with the
69728// same request ID was received, and if so, will ignore the second
69729// request. This prevents clients from accidentally creating duplicate
69730// commitments.
69731//
69732// The request ID must be a valid UUID with the exception that zero UUID
69733// is not supported (00000000-0000-0000-0000-000000000000).
69734func (c *SubnetworksExpandIpCidrRangeCall) RequestId(requestId string) *SubnetworksExpandIpCidrRangeCall {
69735	c.urlParams_.Set("requestId", requestId)
69736	return c
69737}
69738
69739// Fields allows partial responses to be retrieved. See
69740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
69741// for more information.
69742func (c *SubnetworksExpandIpCidrRangeCall) Fields(s ...googleapi.Field) *SubnetworksExpandIpCidrRangeCall {
69743	c.urlParams_.Set("fields", googleapi.CombineFields(s))
69744	return c
69745}
69746
69747// Context sets the context to be used in this call's Do method. Any
69748// pending HTTP request will be aborted if the provided context is
69749// canceled.
69750func (c *SubnetworksExpandIpCidrRangeCall) Context(ctx context.Context) *SubnetworksExpandIpCidrRangeCall {
69751	c.ctx_ = ctx
69752	return c
69753}
69754
69755// Header returns an http.Header that can be modified by the caller to
69756// add HTTP headers to the request.
69757func (c *SubnetworksExpandIpCidrRangeCall) Header() http.Header {
69758	if c.header_ == nil {
69759		c.header_ = make(http.Header)
69760	}
69761	return c.header_
69762}
69763
69764func (c *SubnetworksExpandIpCidrRangeCall) doRequest(alt string) (*http.Response, error) {
69765	reqHeaders := make(http.Header)
69766	for k, v := range c.header_ {
69767		reqHeaders[k] = v
69768	}
69769	reqHeaders.Set("User-Agent", c.s.userAgent())
69770	var body io.Reader = nil
69771	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetworksexpandipcidrrangerequest)
69772	if err != nil {
69773		return nil, err
69774	}
69775	reqHeaders.Set("Content-Type", "application/json")
69776	c.urlParams_.Set("alt", alt)
69777	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange")
69778	urls += "?" + c.urlParams_.Encode()
69779	req, _ := http.NewRequest("POST", urls, body)
69780	req.Header = reqHeaders
69781	googleapi.Expand(req.URL, map[string]string{
69782		"project":    c.project,
69783		"region":     c.region,
69784		"subnetwork": c.subnetwork,
69785	})
69786	return gensupport.SendRequest(c.ctx_, c.s.client, req)
69787}
69788
69789// Do executes the "compute.subnetworks.expandIpCidrRange" call.
69790// Exactly one of *Operation or error will be non-nil. Any non-2xx
69791// status code is an error. Response headers are in either
69792// *Operation.ServerResponse.Header or (if a response was returned at
69793// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
69794// to check whether the returned error was because
69795// http.StatusNotModified was returned.
69796func (c *SubnetworksExpandIpCidrRangeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
69797	gensupport.SetOptions(c.urlParams_, opts...)
69798	res, err := c.doRequest("json")
69799	if res != nil && res.StatusCode == http.StatusNotModified {
69800		if res.Body != nil {
69801			res.Body.Close()
69802		}
69803		return nil, &googleapi.Error{
69804			Code:   res.StatusCode,
69805			Header: res.Header,
69806		}
69807	}
69808	if err != nil {
69809		return nil, err
69810	}
69811	defer googleapi.CloseBody(res)
69812	if err := googleapi.CheckResponse(res); err != nil {
69813		return nil, err
69814	}
69815	ret := &Operation{
69816		ServerResponse: googleapi.ServerResponse{
69817			Header:         res.Header,
69818			HTTPStatusCode: res.StatusCode,
69819		},
69820	}
69821	target := &ret
69822	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
69823		return nil, err
69824	}
69825	return ret, nil
69826	// {
69827	//   "description": "Expands the IP CIDR range of the subnetwork to a specified value.",
69828	//   "httpMethod": "POST",
69829	//   "id": "compute.subnetworks.expandIpCidrRange",
69830	//   "parameterOrder": [
69831	//     "project",
69832	//     "region",
69833	//     "subnetwork"
69834	//   ],
69835	//   "parameters": {
69836	//     "project": {
69837	//       "description": "Project ID for this request.",
69838	//       "location": "path",
69839	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
69840	//       "required": true,
69841	//       "type": "string"
69842	//     },
69843	//     "region": {
69844	//       "description": "Name of the region scoping this request.",
69845	//       "location": "path",
69846	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
69847	//       "required": true,
69848	//       "type": "string"
69849	//     },
69850	//     "requestId": {
69851	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
69852	//       "location": "query",
69853	//       "type": "string"
69854	//     },
69855	//     "subnetwork": {
69856	//       "description": "Name of the Subnetwork resource to update.",
69857	//       "location": "path",
69858	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
69859	//       "required": true,
69860	//       "type": "string"
69861	//     }
69862	//   },
69863	//   "path": "{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange",
69864	//   "request": {
69865	//     "$ref": "SubnetworksExpandIpCidrRangeRequest"
69866	//   },
69867	//   "response": {
69868	//     "$ref": "Operation"
69869	//   },
69870	//   "scopes": [
69871	//     "https://www.googleapis.com/auth/cloud-platform",
69872	//     "https://www.googleapis.com/auth/compute"
69873	//   ]
69874	// }
69875
69876}
69877
69878// method id "compute.subnetworks.get":
69879
69880type SubnetworksGetCall struct {
69881	s            *Service
69882	project      string
69883	region       string
69884	subnetwork   string
69885	urlParams_   gensupport.URLParams
69886	ifNoneMatch_ string
69887	ctx_         context.Context
69888	header_      http.Header
69889}
69890
69891// Get: Returns the specified subnetwork. Get a list of available
69892// subnetworks list() request.
69893func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall {
69894	c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
69895	c.project = project
69896	c.region = region
69897	c.subnetwork = subnetwork
69898	return c
69899}
69900
69901// Fields allows partial responses to be retrieved. See
69902// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
69903// for more information.
69904func (c *SubnetworksGetCall) Fields(s ...googleapi.Field) *SubnetworksGetCall {
69905	c.urlParams_.Set("fields", googleapi.CombineFields(s))
69906	return c
69907}
69908
69909// IfNoneMatch sets the optional parameter which makes the operation
69910// fail if the object's ETag matches the given value. This is useful for
69911// getting updates only after the object has changed since the last
69912// request. Use googleapi.IsNotModified to check whether the response
69913// error from Do is the result of In-None-Match.
69914func (c *SubnetworksGetCall) IfNoneMatch(entityTag string) *SubnetworksGetCall {
69915	c.ifNoneMatch_ = entityTag
69916	return c
69917}
69918
69919// Context sets the context to be used in this call's Do method. Any
69920// pending HTTP request will be aborted if the provided context is
69921// canceled.
69922func (c *SubnetworksGetCall) Context(ctx context.Context) *SubnetworksGetCall {
69923	c.ctx_ = ctx
69924	return c
69925}
69926
69927// Header returns an http.Header that can be modified by the caller to
69928// add HTTP headers to the request.
69929func (c *SubnetworksGetCall) Header() http.Header {
69930	if c.header_ == nil {
69931		c.header_ = make(http.Header)
69932	}
69933	return c.header_
69934}
69935
69936func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) {
69937	reqHeaders := make(http.Header)
69938	for k, v := range c.header_ {
69939		reqHeaders[k] = v
69940	}
69941	reqHeaders.Set("User-Agent", c.s.userAgent())
69942	if c.ifNoneMatch_ != "" {
69943		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
69944	}
69945	var body io.Reader = nil
69946	c.urlParams_.Set("alt", alt)
69947	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}")
69948	urls += "?" + c.urlParams_.Encode()
69949	req, _ := http.NewRequest("GET", urls, body)
69950	req.Header = reqHeaders
69951	googleapi.Expand(req.URL, map[string]string{
69952		"project":    c.project,
69953		"region":     c.region,
69954		"subnetwork": c.subnetwork,
69955	})
69956	return gensupport.SendRequest(c.ctx_, c.s.client, req)
69957}
69958
69959// Do executes the "compute.subnetworks.get" call.
69960// Exactly one of *Subnetwork or error will be non-nil. Any non-2xx
69961// status code is an error. Response headers are in either
69962// *Subnetwork.ServerResponse.Header or (if a response was returned at
69963// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
69964// to check whether the returned error was because
69965// http.StatusNotModified was returned.
69966func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, error) {
69967	gensupport.SetOptions(c.urlParams_, opts...)
69968	res, err := c.doRequest("json")
69969	if res != nil && res.StatusCode == http.StatusNotModified {
69970		if res.Body != nil {
69971			res.Body.Close()
69972		}
69973		return nil, &googleapi.Error{
69974			Code:   res.StatusCode,
69975			Header: res.Header,
69976		}
69977	}
69978	if err != nil {
69979		return nil, err
69980	}
69981	defer googleapi.CloseBody(res)
69982	if err := googleapi.CheckResponse(res); err != nil {
69983		return nil, err
69984	}
69985	ret := &Subnetwork{
69986		ServerResponse: googleapi.ServerResponse{
69987			Header:         res.Header,
69988			HTTPStatusCode: res.StatusCode,
69989		},
69990	}
69991	target := &ret
69992	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
69993		return nil, err
69994	}
69995	return ret, nil
69996	// {
69997	//   "description": "Returns the specified subnetwork. Get a list of available subnetworks list() request.",
69998	//   "httpMethod": "GET",
69999	//   "id": "compute.subnetworks.get",
70000	//   "parameterOrder": [
70001	//     "project",
70002	//     "region",
70003	//     "subnetwork"
70004	//   ],
70005	//   "parameters": {
70006	//     "project": {
70007	//       "description": "Project ID for this request.",
70008	//       "location": "path",
70009	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
70010	//       "required": true,
70011	//       "type": "string"
70012	//     },
70013	//     "region": {
70014	//       "description": "Name of the region scoping this request.",
70015	//       "location": "path",
70016	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70017	//       "required": true,
70018	//       "type": "string"
70019	//     },
70020	//     "subnetwork": {
70021	//       "description": "Name of the Subnetwork resource to return.",
70022	//       "location": "path",
70023	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70024	//       "required": true,
70025	//       "type": "string"
70026	//     }
70027	//   },
70028	//   "path": "{project}/regions/{region}/subnetworks/{subnetwork}",
70029	//   "response": {
70030	//     "$ref": "Subnetwork"
70031	//   },
70032	//   "scopes": [
70033	//     "https://www.googleapis.com/auth/cloud-platform",
70034	//     "https://www.googleapis.com/auth/compute",
70035	//     "https://www.googleapis.com/auth/compute.readonly"
70036	//   ]
70037	// }
70038
70039}
70040
70041// method id "compute.subnetworks.getIamPolicy":
70042
70043type SubnetworksGetIamPolicyCall struct {
70044	s            *Service
70045	project      string
70046	region       string
70047	resource     string
70048	urlParams_   gensupport.URLParams
70049	ifNoneMatch_ string
70050	ctx_         context.Context
70051	header_      http.Header
70052}
70053
70054// GetIamPolicy: Gets the access control policy for a resource. May be
70055// empty if no such policy or resource exists.
70056func (r *SubnetworksService) GetIamPolicy(project string, region string, resource string) *SubnetworksGetIamPolicyCall {
70057	c := &SubnetworksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
70058	c.project = project
70059	c.region = region
70060	c.resource = resource
70061	return c
70062}
70063
70064// Fields allows partial responses to be retrieved. See
70065// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
70066// for more information.
70067func (c *SubnetworksGetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksGetIamPolicyCall {
70068	c.urlParams_.Set("fields", googleapi.CombineFields(s))
70069	return c
70070}
70071
70072// IfNoneMatch sets the optional parameter which makes the operation
70073// fail if the object's ETag matches the given value. This is useful for
70074// getting updates only after the object has changed since the last
70075// request. Use googleapi.IsNotModified to check whether the response
70076// error from Do is the result of In-None-Match.
70077func (c *SubnetworksGetIamPolicyCall) IfNoneMatch(entityTag string) *SubnetworksGetIamPolicyCall {
70078	c.ifNoneMatch_ = entityTag
70079	return c
70080}
70081
70082// Context sets the context to be used in this call's Do method. Any
70083// pending HTTP request will be aborted if the provided context is
70084// canceled.
70085func (c *SubnetworksGetIamPolicyCall) Context(ctx context.Context) *SubnetworksGetIamPolicyCall {
70086	c.ctx_ = ctx
70087	return c
70088}
70089
70090// Header returns an http.Header that can be modified by the caller to
70091// add HTTP headers to the request.
70092func (c *SubnetworksGetIamPolicyCall) Header() http.Header {
70093	if c.header_ == nil {
70094		c.header_ = make(http.Header)
70095	}
70096	return c.header_
70097}
70098
70099func (c *SubnetworksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
70100	reqHeaders := make(http.Header)
70101	for k, v := range c.header_ {
70102		reqHeaders[k] = v
70103	}
70104	reqHeaders.Set("User-Agent", c.s.userAgent())
70105	if c.ifNoneMatch_ != "" {
70106		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
70107	}
70108	var body io.Reader = nil
70109	c.urlParams_.Set("alt", alt)
70110	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy")
70111	urls += "?" + c.urlParams_.Encode()
70112	req, _ := http.NewRequest("GET", urls, body)
70113	req.Header = reqHeaders
70114	googleapi.Expand(req.URL, map[string]string{
70115		"project":  c.project,
70116		"region":   c.region,
70117		"resource": c.resource,
70118	})
70119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
70120}
70121
70122// Do executes the "compute.subnetworks.getIamPolicy" call.
70123// Exactly one of *Policy or error will be non-nil. Any non-2xx status
70124// code is an error. Response headers are in either
70125// *Policy.ServerResponse.Header or (if a response was returned at all)
70126// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
70127// check whether the returned error was because http.StatusNotModified
70128// was returned.
70129func (c *SubnetworksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
70130	gensupport.SetOptions(c.urlParams_, opts...)
70131	res, err := c.doRequest("json")
70132	if res != nil && res.StatusCode == http.StatusNotModified {
70133		if res.Body != nil {
70134			res.Body.Close()
70135		}
70136		return nil, &googleapi.Error{
70137			Code:   res.StatusCode,
70138			Header: res.Header,
70139		}
70140	}
70141	if err != nil {
70142		return nil, err
70143	}
70144	defer googleapi.CloseBody(res)
70145	if err := googleapi.CheckResponse(res); err != nil {
70146		return nil, err
70147	}
70148	ret := &Policy{
70149		ServerResponse: googleapi.ServerResponse{
70150			Header:         res.Header,
70151			HTTPStatusCode: res.StatusCode,
70152		},
70153	}
70154	target := &ret
70155	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
70156		return nil, err
70157	}
70158	return ret, nil
70159	// {
70160	//   "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
70161	//   "httpMethod": "GET",
70162	//   "id": "compute.subnetworks.getIamPolicy",
70163	//   "parameterOrder": [
70164	//     "project",
70165	//     "region",
70166	//     "resource"
70167	//   ],
70168	//   "parameters": {
70169	//     "project": {
70170	//       "description": "Project ID for this request.",
70171	//       "location": "path",
70172	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
70173	//       "required": true,
70174	//       "type": "string"
70175	//     },
70176	//     "region": {
70177	//       "description": "The name of the region for this request.",
70178	//       "location": "path",
70179	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70180	//       "required": true,
70181	//       "type": "string"
70182	//     },
70183	//     "resource": {
70184	//       "description": "Name of the resource for this request.",
70185	//       "location": "path",
70186	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70187	//       "required": true,
70188	//       "type": "string"
70189	//     }
70190	//   },
70191	//   "path": "{project}/regions/{region}/subnetworks/{resource}/getIamPolicy",
70192	//   "response": {
70193	//     "$ref": "Policy"
70194	//   },
70195	//   "scopes": [
70196	//     "https://www.googleapis.com/auth/cloud-platform",
70197	//     "https://www.googleapis.com/auth/compute",
70198	//     "https://www.googleapis.com/auth/compute.readonly"
70199	//   ]
70200	// }
70201
70202}
70203
70204// method id "compute.subnetworks.insert":
70205
70206type SubnetworksInsertCall struct {
70207	s          *Service
70208	project    string
70209	region     string
70210	subnetwork *Subnetwork
70211	urlParams_ gensupport.URLParams
70212	ctx_       context.Context
70213	header_    http.Header
70214}
70215
70216// Insert: Creates a subnetwork in the specified project using the data
70217// included in the request.
70218func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall {
70219	c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
70220	c.project = project
70221	c.region = region
70222	c.subnetwork = subnetwork
70223	return c
70224}
70225
70226// RequestId sets the optional parameter "requestId": An optional
70227// request ID to identify requests. Specify a unique request ID so that
70228// if you must retry your request, the server will know to ignore the
70229// request if it has already been completed.
70230//
70231// For example, consider a situation where you make an initial request
70232// and the request times out. If you make the request again with the
70233// same request ID, the server can check if original operation with the
70234// same request ID was received, and if so, will ignore the second
70235// request. This prevents clients from accidentally creating duplicate
70236// commitments.
70237//
70238// The request ID must be a valid UUID with the exception that zero UUID
70239// is not supported (00000000-0000-0000-0000-000000000000).
70240func (c *SubnetworksInsertCall) RequestId(requestId string) *SubnetworksInsertCall {
70241	c.urlParams_.Set("requestId", requestId)
70242	return c
70243}
70244
70245// Fields allows partial responses to be retrieved. See
70246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
70247// for more information.
70248func (c *SubnetworksInsertCall) Fields(s ...googleapi.Field) *SubnetworksInsertCall {
70249	c.urlParams_.Set("fields", googleapi.CombineFields(s))
70250	return c
70251}
70252
70253// Context sets the context to be used in this call's Do method. Any
70254// pending HTTP request will be aborted if the provided context is
70255// canceled.
70256func (c *SubnetworksInsertCall) Context(ctx context.Context) *SubnetworksInsertCall {
70257	c.ctx_ = ctx
70258	return c
70259}
70260
70261// Header returns an http.Header that can be modified by the caller to
70262// add HTTP headers to the request.
70263func (c *SubnetworksInsertCall) Header() http.Header {
70264	if c.header_ == nil {
70265		c.header_ = make(http.Header)
70266	}
70267	return c.header_
70268}
70269
70270func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) {
70271	reqHeaders := make(http.Header)
70272	for k, v := range c.header_ {
70273		reqHeaders[k] = v
70274	}
70275	reqHeaders.Set("User-Agent", c.s.userAgent())
70276	var body io.Reader = nil
70277	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork)
70278	if err != nil {
70279		return nil, err
70280	}
70281	reqHeaders.Set("Content-Type", "application/json")
70282	c.urlParams_.Set("alt", alt)
70283	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks")
70284	urls += "?" + c.urlParams_.Encode()
70285	req, _ := http.NewRequest("POST", urls, body)
70286	req.Header = reqHeaders
70287	googleapi.Expand(req.URL, map[string]string{
70288		"project": c.project,
70289		"region":  c.region,
70290	})
70291	return gensupport.SendRequest(c.ctx_, c.s.client, req)
70292}
70293
70294// Do executes the "compute.subnetworks.insert" call.
70295// Exactly one of *Operation or error will be non-nil. Any non-2xx
70296// status code is an error. Response headers are in either
70297// *Operation.ServerResponse.Header or (if a response was returned at
70298// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
70299// to check whether the returned error was because
70300// http.StatusNotModified was returned.
70301func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
70302	gensupport.SetOptions(c.urlParams_, opts...)
70303	res, err := c.doRequest("json")
70304	if res != nil && res.StatusCode == http.StatusNotModified {
70305		if res.Body != nil {
70306			res.Body.Close()
70307		}
70308		return nil, &googleapi.Error{
70309			Code:   res.StatusCode,
70310			Header: res.Header,
70311		}
70312	}
70313	if err != nil {
70314		return nil, err
70315	}
70316	defer googleapi.CloseBody(res)
70317	if err := googleapi.CheckResponse(res); err != nil {
70318		return nil, err
70319	}
70320	ret := &Operation{
70321		ServerResponse: googleapi.ServerResponse{
70322			Header:         res.Header,
70323			HTTPStatusCode: res.StatusCode,
70324		},
70325	}
70326	target := &ret
70327	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
70328		return nil, err
70329	}
70330	return ret, nil
70331	// {
70332	//   "description": "Creates a subnetwork in the specified project using the data included in the request.",
70333	//   "httpMethod": "POST",
70334	//   "id": "compute.subnetworks.insert",
70335	//   "parameterOrder": [
70336	//     "project",
70337	//     "region"
70338	//   ],
70339	//   "parameters": {
70340	//     "project": {
70341	//       "description": "Project ID for this request.",
70342	//       "location": "path",
70343	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
70344	//       "required": true,
70345	//       "type": "string"
70346	//     },
70347	//     "region": {
70348	//       "description": "Name of the region scoping this request.",
70349	//       "location": "path",
70350	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70351	//       "required": true,
70352	//       "type": "string"
70353	//     },
70354	//     "requestId": {
70355	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
70356	//       "location": "query",
70357	//       "type": "string"
70358	//     }
70359	//   },
70360	//   "path": "{project}/regions/{region}/subnetworks",
70361	//   "request": {
70362	//     "$ref": "Subnetwork"
70363	//   },
70364	//   "response": {
70365	//     "$ref": "Operation"
70366	//   },
70367	//   "scopes": [
70368	//     "https://www.googleapis.com/auth/cloud-platform",
70369	//     "https://www.googleapis.com/auth/compute"
70370	//   ]
70371	// }
70372
70373}
70374
70375// method id "compute.subnetworks.list":
70376
70377type SubnetworksListCall struct {
70378	s            *Service
70379	project      string
70380	region       string
70381	urlParams_   gensupport.URLParams
70382	ifNoneMatch_ string
70383	ctx_         context.Context
70384	header_      http.Header
70385}
70386
70387// List: Retrieves a list of subnetworks available to the specified
70388// project.
70389func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall {
70390	c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
70391	c.project = project
70392	c.region = region
70393	return c
70394}
70395
70396// Filter sets the optional parameter "filter": Sets a filter
70397// {expression} for filtering listed resources. Your {expression} must
70398// be in the format: field_name comparison_string literal_string.
70399//
70400// The field_name is the name of the field you want to compare. Only
70401// atomic field types are supported (string, number, boolean). The
70402// comparison_string must be either eq (equals) or ne (not equals). The
70403// literal_string is the string value to filter to. The literal value
70404// must be valid for the type of field you are filtering by (string,
70405// number, boolean). For string fields, the literal value is interpreted
70406// as a regular expression using RE2 syntax. The literal value must
70407// match the entire field.
70408//
70409// For example, to filter for instances that do not have a name of
70410// example-instance, you would use name ne example-instance.
70411//
70412// You can filter on nested fields. For example, you could filter on
70413// instances that have set the scheduling.automaticRestart field to
70414// true. Use filtering on nested fields to take advantage of labels to
70415// organize and search for results based on label values.
70416//
70417// To filter on multiple expressions, provide each separate expression
70418// within parentheses. For example, (scheduling.automaticRestart eq
70419// true) (zone eq us-central1-f). Multiple expressions are treated as
70420// AND expressions, meaning that resources must match all expressions to
70421// pass the filters.
70422func (c *SubnetworksListCall) Filter(filter string) *SubnetworksListCall {
70423	c.urlParams_.Set("filter", filter)
70424	return c
70425}
70426
70427// MaxResults sets the optional parameter "maxResults": The maximum
70428// number of results per page that should be returned. If the number of
70429// available results is larger than maxResults, Compute Engine returns a
70430// nextPageToken that can be used to get the next page of results in
70431// subsequent list requests. Acceptable values are 0 to 500, inclusive.
70432// (Default: 500)
70433func (c *SubnetworksListCall) MaxResults(maxResults int64) *SubnetworksListCall {
70434	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
70435	return c
70436}
70437
70438// OrderBy sets the optional parameter "orderBy": Sorts list results by
70439// a certain order. By default, results are returned in alphanumerical
70440// order based on the resource name.
70441//
70442// You can also sort results in descending order based on the creation
70443// timestamp using orderBy="creationTimestamp desc". This sorts results
70444// based on the creationTimestamp field in reverse chronological order
70445// (newest result first). Use this to sort resources like operations so
70446// that the newest operation is returned first.
70447//
70448// Currently, only sorting by name or creationTimestamp desc is
70449// supported.
70450func (c *SubnetworksListCall) OrderBy(orderBy string) *SubnetworksListCall {
70451	c.urlParams_.Set("orderBy", orderBy)
70452	return c
70453}
70454
70455// PageToken sets the optional parameter "pageToken": Specifies a page
70456// token to use. Set pageToken to the nextPageToken returned by a
70457// previous list request to get the next page of results.
70458func (c *SubnetworksListCall) PageToken(pageToken string) *SubnetworksListCall {
70459	c.urlParams_.Set("pageToken", pageToken)
70460	return c
70461}
70462
70463// Fields allows partial responses to be retrieved. See
70464// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
70465// for more information.
70466func (c *SubnetworksListCall) Fields(s ...googleapi.Field) *SubnetworksListCall {
70467	c.urlParams_.Set("fields", googleapi.CombineFields(s))
70468	return c
70469}
70470
70471// IfNoneMatch sets the optional parameter which makes the operation
70472// fail if the object's ETag matches the given value. This is useful for
70473// getting updates only after the object has changed since the last
70474// request. Use googleapi.IsNotModified to check whether the response
70475// error from Do is the result of In-None-Match.
70476func (c *SubnetworksListCall) IfNoneMatch(entityTag string) *SubnetworksListCall {
70477	c.ifNoneMatch_ = entityTag
70478	return c
70479}
70480
70481// Context sets the context to be used in this call's Do method. Any
70482// pending HTTP request will be aborted if the provided context is
70483// canceled.
70484func (c *SubnetworksListCall) Context(ctx context.Context) *SubnetworksListCall {
70485	c.ctx_ = ctx
70486	return c
70487}
70488
70489// Header returns an http.Header that can be modified by the caller to
70490// add HTTP headers to the request.
70491func (c *SubnetworksListCall) Header() http.Header {
70492	if c.header_ == nil {
70493		c.header_ = make(http.Header)
70494	}
70495	return c.header_
70496}
70497
70498func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) {
70499	reqHeaders := make(http.Header)
70500	for k, v := range c.header_ {
70501		reqHeaders[k] = v
70502	}
70503	reqHeaders.Set("User-Agent", c.s.userAgent())
70504	if c.ifNoneMatch_ != "" {
70505		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
70506	}
70507	var body io.Reader = nil
70508	c.urlParams_.Set("alt", alt)
70509	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks")
70510	urls += "?" + c.urlParams_.Encode()
70511	req, _ := http.NewRequest("GET", urls, body)
70512	req.Header = reqHeaders
70513	googleapi.Expand(req.URL, map[string]string{
70514		"project": c.project,
70515		"region":  c.region,
70516	})
70517	return gensupport.SendRequest(c.ctx_, c.s.client, req)
70518}
70519
70520// Do executes the "compute.subnetworks.list" call.
70521// Exactly one of *SubnetworkList or error will be non-nil. Any non-2xx
70522// status code is an error. Response headers are in either
70523// *SubnetworkList.ServerResponse.Header or (if a response was returned
70524// at all) in error.(*googleapi.Error).Header. Use
70525// googleapi.IsNotModified to check whether the returned error was
70526// because http.StatusNotModified was returned.
70527func (c *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, error) {
70528	gensupport.SetOptions(c.urlParams_, opts...)
70529	res, err := c.doRequest("json")
70530	if res != nil && res.StatusCode == http.StatusNotModified {
70531		if res.Body != nil {
70532			res.Body.Close()
70533		}
70534		return nil, &googleapi.Error{
70535			Code:   res.StatusCode,
70536			Header: res.Header,
70537		}
70538	}
70539	if err != nil {
70540		return nil, err
70541	}
70542	defer googleapi.CloseBody(res)
70543	if err := googleapi.CheckResponse(res); err != nil {
70544		return nil, err
70545	}
70546	ret := &SubnetworkList{
70547		ServerResponse: googleapi.ServerResponse{
70548			Header:         res.Header,
70549			HTTPStatusCode: res.StatusCode,
70550		},
70551	}
70552	target := &ret
70553	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
70554		return nil, err
70555	}
70556	return ret, nil
70557	// {
70558	//   "description": "Retrieves a list of subnetworks available to the specified project.",
70559	//   "httpMethod": "GET",
70560	//   "id": "compute.subnetworks.list",
70561	//   "parameterOrder": [
70562	//     "project",
70563	//     "region"
70564	//   ],
70565	//   "parameters": {
70566	//     "filter": {
70567	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
70568	//       "location": "query",
70569	//       "type": "string"
70570	//     },
70571	//     "maxResults": {
70572	//       "default": "500",
70573	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
70574	//       "format": "uint32",
70575	//       "location": "query",
70576	//       "minimum": "0",
70577	//       "type": "integer"
70578	//     },
70579	//     "orderBy": {
70580	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
70581	//       "location": "query",
70582	//       "type": "string"
70583	//     },
70584	//     "pageToken": {
70585	//       "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.",
70586	//       "location": "query",
70587	//       "type": "string"
70588	//     },
70589	//     "project": {
70590	//       "description": "Project ID for this request.",
70591	//       "location": "path",
70592	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
70593	//       "required": true,
70594	//       "type": "string"
70595	//     },
70596	//     "region": {
70597	//       "description": "Name of the region scoping this request.",
70598	//       "location": "path",
70599	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70600	//       "required": true,
70601	//       "type": "string"
70602	//     }
70603	//   },
70604	//   "path": "{project}/regions/{region}/subnetworks",
70605	//   "response": {
70606	//     "$ref": "SubnetworkList"
70607	//   },
70608	//   "scopes": [
70609	//     "https://www.googleapis.com/auth/cloud-platform",
70610	//     "https://www.googleapis.com/auth/compute",
70611	//     "https://www.googleapis.com/auth/compute.readonly"
70612	//   ]
70613	// }
70614
70615}
70616
70617// Pages invokes f for each page of results.
70618// A non-nil error returned from f will halt the iteration.
70619// The provided context supersedes any context provided to the Context method.
70620func (c *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList) error) error {
70621	c.ctx_ = ctx
70622	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
70623	for {
70624		x, err := c.Do()
70625		if err != nil {
70626			return err
70627		}
70628		if err := f(x); err != nil {
70629			return err
70630		}
70631		if x.NextPageToken == "" {
70632			return nil
70633		}
70634		c.PageToken(x.NextPageToken)
70635	}
70636}
70637
70638// method id "compute.subnetworks.setIamPolicy":
70639
70640type SubnetworksSetIamPolicyCall struct {
70641	s          *Service
70642	project    string
70643	region     string
70644	resource   string
70645	policy     *Policy
70646	urlParams_ gensupport.URLParams
70647	ctx_       context.Context
70648	header_    http.Header
70649}
70650
70651// SetIamPolicy: Sets the access control policy on the specified
70652// resource. Replaces any existing policy.
70653func (r *SubnetworksService) SetIamPolicy(project string, region string, resource string, policy *Policy) *SubnetworksSetIamPolicyCall {
70654	c := &SubnetworksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
70655	c.project = project
70656	c.region = region
70657	c.resource = resource
70658	c.policy = policy
70659	return c
70660}
70661
70662// Fields allows partial responses to be retrieved. See
70663// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
70664// for more information.
70665func (c *SubnetworksSetIamPolicyCall) Fields(s ...googleapi.Field) *SubnetworksSetIamPolicyCall {
70666	c.urlParams_.Set("fields", googleapi.CombineFields(s))
70667	return c
70668}
70669
70670// Context sets the context to be used in this call's Do method. Any
70671// pending HTTP request will be aborted if the provided context is
70672// canceled.
70673func (c *SubnetworksSetIamPolicyCall) Context(ctx context.Context) *SubnetworksSetIamPolicyCall {
70674	c.ctx_ = ctx
70675	return c
70676}
70677
70678// Header returns an http.Header that can be modified by the caller to
70679// add HTTP headers to the request.
70680func (c *SubnetworksSetIamPolicyCall) Header() http.Header {
70681	if c.header_ == nil {
70682		c.header_ = make(http.Header)
70683	}
70684	return c.header_
70685}
70686
70687func (c *SubnetworksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
70688	reqHeaders := make(http.Header)
70689	for k, v := range c.header_ {
70690		reqHeaders[k] = v
70691	}
70692	reqHeaders.Set("User-Agent", c.s.userAgent())
70693	var body io.Reader = nil
70694	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
70695	if err != nil {
70696		return nil, err
70697	}
70698	reqHeaders.Set("Content-Type", "application/json")
70699	c.urlParams_.Set("alt", alt)
70700	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy")
70701	urls += "?" + c.urlParams_.Encode()
70702	req, _ := http.NewRequest("POST", urls, body)
70703	req.Header = reqHeaders
70704	googleapi.Expand(req.URL, map[string]string{
70705		"project":  c.project,
70706		"region":   c.region,
70707		"resource": c.resource,
70708	})
70709	return gensupport.SendRequest(c.ctx_, c.s.client, req)
70710}
70711
70712// Do executes the "compute.subnetworks.setIamPolicy" call.
70713// Exactly one of *Policy or error will be non-nil. Any non-2xx status
70714// code is an error. Response headers are in either
70715// *Policy.ServerResponse.Header or (if a response was returned at all)
70716// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
70717// check whether the returned error was because http.StatusNotModified
70718// was returned.
70719func (c *SubnetworksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
70720	gensupport.SetOptions(c.urlParams_, opts...)
70721	res, err := c.doRequest("json")
70722	if res != nil && res.StatusCode == http.StatusNotModified {
70723		if res.Body != nil {
70724			res.Body.Close()
70725		}
70726		return nil, &googleapi.Error{
70727			Code:   res.StatusCode,
70728			Header: res.Header,
70729		}
70730	}
70731	if err != nil {
70732		return nil, err
70733	}
70734	defer googleapi.CloseBody(res)
70735	if err := googleapi.CheckResponse(res); err != nil {
70736		return nil, err
70737	}
70738	ret := &Policy{
70739		ServerResponse: googleapi.ServerResponse{
70740			Header:         res.Header,
70741			HTTPStatusCode: res.StatusCode,
70742		},
70743	}
70744	target := &ret
70745	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
70746		return nil, err
70747	}
70748	return ret, nil
70749	// {
70750	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
70751	//   "httpMethod": "POST",
70752	//   "id": "compute.subnetworks.setIamPolicy",
70753	//   "parameterOrder": [
70754	//     "project",
70755	//     "region",
70756	//     "resource"
70757	//   ],
70758	//   "parameters": {
70759	//     "project": {
70760	//       "description": "Project ID for this request.",
70761	//       "location": "path",
70762	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
70763	//       "required": true,
70764	//       "type": "string"
70765	//     },
70766	//     "region": {
70767	//       "description": "The name of the region for this request.",
70768	//       "location": "path",
70769	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70770	//       "required": true,
70771	//       "type": "string"
70772	//     },
70773	//     "resource": {
70774	//       "description": "Name of the resource for this request.",
70775	//       "location": "path",
70776	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70777	//       "required": true,
70778	//       "type": "string"
70779	//     }
70780	//   },
70781	//   "path": "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy",
70782	//   "request": {
70783	//     "$ref": "Policy"
70784	//   },
70785	//   "response": {
70786	//     "$ref": "Policy"
70787	//   },
70788	//   "scopes": [
70789	//     "https://www.googleapis.com/auth/cloud-platform",
70790	//     "https://www.googleapis.com/auth/compute"
70791	//   ]
70792	// }
70793
70794}
70795
70796// method id "compute.subnetworks.setPrivateIpGoogleAccess":
70797
70798type SubnetworksSetPrivateIpGoogleAccessCall struct {
70799	s                                          *Service
70800	project                                    string
70801	region                                     string
70802	subnetwork                                 string
70803	subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest
70804	urlParams_                                 gensupport.URLParams
70805	ctx_                                       context.Context
70806	header_                                    http.Header
70807}
70808
70809// SetPrivateIpGoogleAccess: Set whether VMs in this subnet can access
70810// Google services without assigning external IP addresses through
70811// Private Google Access.
70812func (r *SubnetworksService) SetPrivateIpGoogleAccess(project string, region string, subnetwork string, subnetworkssetprivateipgoogleaccessrequest *SubnetworksSetPrivateIpGoogleAccessRequest) *SubnetworksSetPrivateIpGoogleAccessCall {
70813	c := &SubnetworksSetPrivateIpGoogleAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
70814	c.project = project
70815	c.region = region
70816	c.subnetwork = subnetwork
70817	c.subnetworkssetprivateipgoogleaccessrequest = subnetworkssetprivateipgoogleaccessrequest
70818	return c
70819}
70820
70821// RequestId sets the optional parameter "requestId": An optional
70822// request ID to identify requests. Specify a unique request ID so that
70823// if you must retry your request, the server will know to ignore the
70824// request if it has already been completed.
70825//
70826// For example, consider a situation where you make an initial request
70827// and the request times out. If you make the request again with the
70828// same request ID, the server can check if original operation with the
70829// same request ID was received, and if so, will ignore the second
70830// request. This prevents clients from accidentally creating duplicate
70831// commitments.
70832//
70833// The request ID must be a valid UUID with the exception that zero UUID
70834// is not supported (00000000-0000-0000-0000-000000000000).
70835func (c *SubnetworksSetPrivateIpGoogleAccessCall) RequestId(requestId string) *SubnetworksSetPrivateIpGoogleAccessCall {
70836	c.urlParams_.Set("requestId", requestId)
70837	return c
70838}
70839
70840// Fields allows partial responses to be retrieved. See
70841// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
70842// for more information.
70843func (c *SubnetworksSetPrivateIpGoogleAccessCall) Fields(s ...googleapi.Field) *SubnetworksSetPrivateIpGoogleAccessCall {
70844	c.urlParams_.Set("fields", googleapi.CombineFields(s))
70845	return c
70846}
70847
70848// Context sets the context to be used in this call's Do method. Any
70849// pending HTTP request will be aborted if the provided context is
70850// canceled.
70851func (c *SubnetworksSetPrivateIpGoogleAccessCall) Context(ctx context.Context) *SubnetworksSetPrivateIpGoogleAccessCall {
70852	c.ctx_ = ctx
70853	return c
70854}
70855
70856// Header returns an http.Header that can be modified by the caller to
70857// add HTTP headers to the request.
70858func (c *SubnetworksSetPrivateIpGoogleAccessCall) Header() http.Header {
70859	if c.header_ == nil {
70860		c.header_ = make(http.Header)
70861	}
70862	return c.header_
70863}
70864
70865func (c *SubnetworksSetPrivateIpGoogleAccessCall) doRequest(alt string) (*http.Response, error) {
70866	reqHeaders := make(http.Header)
70867	for k, v := range c.header_ {
70868		reqHeaders[k] = v
70869	}
70870	reqHeaders.Set("User-Agent", c.s.userAgent())
70871	var body io.Reader = nil
70872	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetworkssetprivateipgoogleaccessrequest)
70873	if err != nil {
70874		return nil, err
70875	}
70876	reqHeaders.Set("Content-Type", "application/json")
70877	c.urlParams_.Set("alt", alt)
70878	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess")
70879	urls += "?" + c.urlParams_.Encode()
70880	req, _ := http.NewRequest("POST", urls, body)
70881	req.Header = reqHeaders
70882	googleapi.Expand(req.URL, map[string]string{
70883		"project":    c.project,
70884		"region":     c.region,
70885		"subnetwork": c.subnetwork,
70886	})
70887	return gensupport.SendRequest(c.ctx_, c.s.client, req)
70888}
70889
70890// Do executes the "compute.subnetworks.setPrivateIpGoogleAccess" call.
70891// Exactly one of *Operation or error will be non-nil. Any non-2xx
70892// status code is an error. Response headers are in either
70893// *Operation.ServerResponse.Header or (if a response was returned at
70894// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
70895// to check whether the returned error was because
70896// http.StatusNotModified was returned.
70897func (c *SubnetworksSetPrivateIpGoogleAccessCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
70898	gensupport.SetOptions(c.urlParams_, opts...)
70899	res, err := c.doRequest("json")
70900	if res != nil && res.StatusCode == http.StatusNotModified {
70901		if res.Body != nil {
70902			res.Body.Close()
70903		}
70904		return nil, &googleapi.Error{
70905			Code:   res.StatusCode,
70906			Header: res.Header,
70907		}
70908	}
70909	if err != nil {
70910		return nil, err
70911	}
70912	defer googleapi.CloseBody(res)
70913	if err := googleapi.CheckResponse(res); err != nil {
70914		return nil, err
70915	}
70916	ret := &Operation{
70917		ServerResponse: googleapi.ServerResponse{
70918			Header:         res.Header,
70919			HTTPStatusCode: res.StatusCode,
70920		},
70921	}
70922	target := &ret
70923	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
70924		return nil, err
70925	}
70926	return ret, nil
70927	// {
70928	//   "description": "Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.",
70929	//   "httpMethod": "POST",
70930	//   "id": "compute.subnetworks.setPrivateIpGoogleAccess",
70931	//   "parameterOrder": [
70932	//     "project",
70933	//     "region",
70934	//     "subnetwork"
70935	//   ],
70936	//   "parameters": {
70937	//     "project": {
70938	//       "description": "Project ID for this request.",
70939	//       "location": "path",
70940	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
70941	//       "required": true,
70942	//       "type": "string"
70943	//     },
70944	//     "region": {
70945	//       "description": "Name of the region scoping this request.",
70946	//       "location": "path",
70947	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70948	//       "required": true,
70949	//       "type": "string"
70950	//     },
70951	//     "requestId": {
70952	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
70953	//       "location": "query",
70954	//       "type": "string"
70955	//     },
70956	//     "subnetwork": {
70957	//       "description": "Name of the Subnetwork resource.",
70958	//       "location": "path",
70959	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
70960	//       "required": true,
70961	//       "type": "string"
70962	//     }
70963	//   },
70964	//   "path": "{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess",
70965	//   "request": {
70966	//     "$ref": "SubnetworksSetPrivateIpGoogleAccessRequest"
70967	//   },
70968	//   "response": {
70969	//     "$ref": "Operation"
70970	//   },
70971	//   "scopes": [
70972	//     "https://www.googleapis.com/auth/cloud-platform",
70973	//     "https://www.googleapis.com/auth/compute"
70974	//   ]
70975	// }
70976
70977}
70978
70979// method id "compute.subnetworks.testIamPermissions":
70980
70981type SubnetworksTestIamPermissionsCall struct {
70982	s                      *Service
70983	project                string
70984	region                 string
70985	resource               string
70986	testpermissionsrequest *TestPermissionsRequest
70987	urlParams_             gensupport.URLParams
70988	ctx_                   context.Context
70989	header_                http.Header
70990}
70991
70992// TestIamPermissions: Returns permissions that a caller has on the
70993// specified resource.
70994func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall {
70995	c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
70996	c.project = project
70997	c.region = region
70998	c.resource = resource
70999	c.testpermissionsrequest = testpermissionsrequest
71000	return c
71001}
71002
71003// Fields allows partial responses to be retrieved. See
71004// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
71005// for more information.
71006func (c *SubnetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *SubnetworksTestIamPermissionsCall {
71007	c.urlParams_.Set("fields", googleapi.CombineFields(s))
71008	return c
71009}
71010
71011// Context sets the context to be used in this call's Do method. Any
71012// pending HTTP request will be aborted if the provided context is
71013// canceled.
71014func (c *SubnetworksTestIamPermissionsCall) Context(ctx context.Context) *SubnetworksTestIamPermissionsCall {
71015	c.ctx_ = ctx
71016	return c
71017}
71018
71019// Header returns an http.Header that can be modified by the caller to
71020// add HTTP headers to the request.
71021func (c *SubnetworksTestIamPermissionsCall) Header() http.Header {
71022	if c.header_ == nil {
71023		c.header_ = make(http.Header)
71024	}
71025	return c.header_
71026}
71027
71028func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
71029	reqHeaders := make(http.Header)
71030	for k, v := range c.header_ {
71031		reqHeaders[k] = v
71032	}
71033	reqHeaders.Set("User-Agent", c.s.userAgent())
71034	var body io.Reader = nil
71035	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
71036	if err != nil {
71037		return nil, err
71038	}
71039	reqHeaders.Set("Content-Type", "application/json")
71040	c.urlParams_.Set("alt", alt)
71041	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions")
71042	urls += "?" + c.urlParams_.Encode()
71043	req, _ := http.NewRequest("POST", urls, body)
71044	req.Header = reqHeaders
71045	googleapi.Expand(req.URL, map[string]string{
71046		"project":  c.project,
71047		"region":   c.region,
71048		"resource": c.resource,
71049	})
71050	return gensupport.SendRequest(c.ctx_, c.s.client, req)
71051}
71052
71053// Do executes the "compute.subnetworks.testIamPermissions" call.
71054// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
71055// non-2xx status code is an error. Response headers are in either
71056// *TestPermissionsResponse.ServerResponse.Header or (if a response was
71057// returned at all) in error.(*googleapi.Error).Header. Use
71058// googleapi.IsNotModified to check whether the returned error was
71059// because http.StatusNotModified was returned.
71060func (c *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
71061	gensupport.SetOptions(c.urlParams_, opts...)
71062	res, err := c.doRequest("json")
71063	if res != nil && res.StatusCode == http.StatusNotModified {
71064		if res.Body != nil {
71065			res.Body.Close()
71066		}
71067		return nil, &googleapi.Error{
71068			Code:   res.StatusCode,
71069			Header: res.Header,
71070		}
71071	}
71072	if err != nil {
71073		return nil, err
71074	}
71075	defer googleapi.CloseBody(res)
71076	if err := googleapi.CheckResponse(res); err != nil {
71077		return nil, err
71078	}
71079	ret := &TestPermissionsResponse{
71080		ServerResponse: googleapi.ServerResponse{
71081			Header:         res.Header,
71082			HTTPStatusCode: res.StatusCode,
71083		},
71084	}
71085	target := &ret
71086	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
71087		return nil, err
71088	}
71089	return ret, nil
71090	// {
71091	//   "description": "Returns permissions that a caller has on the specified resource.",
71092	//   "httpMethod": "POST",
71093	//   "id": "compute.subnetworks.testIamPermissions",
71094	//   "parameterOrder": [
71095	//     "project",
71096	//     "region",
71097	//     "resource"
71098	//   ],
71099	//   "parameters": {
71100	//     "project": {
71101	//       "description": "Project ID for this request.",
71102	//       "location": "path",
71103	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
71104	//       "required": true,
71105	//       "type": "string"
71106	//     },
71107	//     "region": {
71108	//       "description": "The name of the region for this request.",
71109	//       "location": "path",
71110	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
71111	//       "required": true,
71112	//       "type": "string"
71113	//     },
71114	//     "resource": {
71115	//       "description": "Name of the resource for this request.",
71116	//       "location": "path",
71117	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
71118	//       "required": true,
71119	//       "type": "string"
71120	//     }
71121	//   },
71122	//   "path": "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions",
71123	//   "request": {
71124	//     "$ref": "TestPermissionsRequest"
71125	//   },
71126	//   "response": {
71127	//     "$ref": "TestPermissionsResponse"
71128	//   },
71129	//   "scopes": [
71130	//     "https://www.googleapis.com/auth/cloud-platform",
71131	//     "https://www.googleapis.com/auth/compute",
71132	//     "https://www.googleapis.com/auth/compute.readonly"
71133	//   ]
71134	// }
71135
71136}
71137
71138// method id "compute.targetHttpProxies.delete":
71139
71140type TargetHttpProxiesDeleteCall struct {
71141	s               *Service
71142	project         string
71143	targetHttpProxy string
71144	urlParams_      gensupport.URLParams
71145	ctx_            context.Context
71146	header_         http.Header
71147}
71148
71149// Delete: Deletes the specified TargetHttpProxy resource.
71150// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/delete
71151func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall {
71152	c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
71153	c.project = project
71154	c.targetHttpProxy = targetHttpProxy
71155	return c
71156}
71157
71158// RequestId sets the optional parameter "requestId": An optional
71159// request ID to identify requests. Specify a unique request ID so that
71160// if you must retry your request, the server will know to ignore the
71161// request if it has already been completed.
71162//
71163// For example, consider a situation where you make an initial request
71164// and the request times out. If you make the request again with the
71165// same request ID, the server can check if original operation with the
71166// same request ID was received, and if so, will ignore the second
71167// request. This prevents clients from accidentally creating duplicate
71168// commitments.
71169//
71170// The request ID must be a valid UUID with the exception that zero UUID
71171// is not supported (00000000-0000-0000-0000-000000000000).
71172func (c *TargetHttpProxiesDeleteCall) RequestId(requestId string) *TargetHttpProxiesDeleteCall {
71173	c.urlParams_.Set("requestId", requestId)
71174	return c
71175}
71176
71177// Fields allows partial responses to be retrieved. See
71178// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
71179// for more information.
71180func (c *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall {
71181	c.urlParams_.Set("fields", googleapi.CombineFields(s))
71182	return c
71183}
71184
71185// Context sets the context to be used in this call's Do method. Any
71186// pending HTTP request will be aborted if the provided context is
71187// canceled.
71188func (c *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall {
71189	c.ctx_ = ctx
71190	return c
71191}
71192
71193// Header returns an http.Header that can be modified by the caller to
71194// add HTTP headers to the request.
71195func (c *TargetHttpProxiesDeleteCall) Header() http.Header {
71196	if c.header_ == nil {
71197		c.header_ = make(http.Header)
71198	}
71199	return c.header_
71200}
71201
71202func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
71203	reqHeaders := make(http.Header)
71204	for k, v := range c.header_ {
71205		reqHeaders[k] = v
71206	}
71207	reqHeaders.Set("User-Agent", c.s.userAgent())
71208	var body io.Reader = nil
71209	c.urlParams_.Set("alt", alt)
71210	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}")
71211	urls += "?" + c.urlParams_.Encode()
71212	req, _ := http.NewRequest("DELETE", urls, body)
71213	req.Header = reqHeaders
71214	googleapi.Expand(req.URL, map[string]string{
71215		"project":         c.project,
71216		"targetHttpProxy": c.targetHttpProxy,
71217	})
71218	return gensupport.SendRequest(c.ctx_, c.s.client, req)
71219}
71220
71221// Do executes the "compute.targetHttpProxies.delete" call.
71222// Exactly one of *Operation or error will be non-nil. Any non-2xx
71223// status code is an error. Response headers are in either
71224// *Operation.ServerResponse.Header or (if a response was returned at
71225// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
71226// to check whether the returned error was because
71227// http.StatusNotModified was returned.
71228func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
71229	gensupport.SetOptions(c.urlParams_, opts...)
71230	res, err := c.doRequest("json")
71231	if res != nil && res.StatusCode == http.StatusNotModified {
71232		if res.Body != nil {
71233			res.Body.Close()
71234		}
71235		return nil, &googleapi.Error{
71236			Code:   res.StatusCode,
71237			Header: res.Header,
71238		}
71239	}
71240	if err != nil {
71241		return nil, err
71242	}
71243	defer googleapi.CloseBody(res)
71244	if err := googleapi.CheckResponse(res); err != nil {
71245		return nil, err
71246	}
71247	ret := &Operation{
71248		ServerResponse: googleapi.ServerResponse{
71249			Header:         res.Header,
71250			HTTPStatusCode: res.StatusCode,
71251		},
71252	}
71253	target := &ret
71254	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
71255		return nil, err
71256	}
71257	return ret, nil
71258	// {
71259	//   "description": "Deletes the specified TargetHttpProxy resource.",
71260	//   "httpMethod": "DELETE",
71261	//   "id": "compute.targetHttpProxies.delete",
71262	//   "parameterOrder": [
71263	//     "project",
71264	//     "targetHttpProxy"
71265	//   ],
71266	//   "parameters": {
71267	//     "project": {
71268	//       "description": "Project ID for this request.",
71269	//       "location": "path",
71270	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
71271	//       "required": true,
71272	//       "type": "string"
71273	//     },
71274	//     "requestId": {
71275	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
71276	//       "location": "query",
71277	//       "type": "string"
71278	//     },
71279	//     "targetHttpProxy": {
71280	//       "description": "Name of the TargetHttpProxy resource to delete.",
71281	//       "location": "path",
71282	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
71283	//       "required": true,
71284	//       "type": "string"
71285	//     }
71286	//   },
71287	//   "path": "{project}/global/targetHttpProxies/{targetHttpProxy}",
71288	//   "response": {
71289	//     "$ref": "Operation"
71290	//   },
71291	//   "scopes": [
71292	//     "https://www.googleapis.com/auth/cloud-platform",
71293	//     "https://www.googleapis.com/auth/compute"
71294	//   ]
71295	// }
71296
71297}
71298
71299// method id "compute.targetHttpProxies.get":
71300
71301type TargetHttpProxiesGetCall struct {
71302	s               *Service
71303	project         string
71304	targetHttpProxy string
71305	urlParams_      gensupport.URLParams
71306	ifNoneMatch_    string
71307	ctx_            context.Context
71308	header_         http.Header
71309}
71310
71311// Get: Returns the specified TargetHttpProxy resource. Get a list of
71312// available target HTTP proxies by making a list() request.
71313// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get
71314func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall {
71315	c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
71316	c.project = project
71317	c.targetHttpProxy = targetHttpProxy
71318	return c
71319}
71320
71321// Fields allows partial responses to be retrieved. See
71322// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
71323// for more information.
71324func (c *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall {
71325	c.urlParams_.Set("fields", googleapi.CombineFields(s))
71326	return c
71327}
71328
71329// IfNoneMatch sets the optional parameter which makes the operation
71330// fail if the object's ETag matches the given value. This is useful for
71331// getting updates only after the object has changed since the last
71332// request. Use googleapi.IsNotModified to check whether the response
71333// error from Do is the result of In-None-Match.
71334func (c *TargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpProxiesGetCall {
71335	c.ifNoneMatch_ = entityTag
71336	return c
71337}
71338
71339// Context sets the context to be used in this call's Do method. Any
71340// pending HTTP request will be aborted if the provided context is
71341// canceled.
71342func (c *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall {
71343	c.ctx_ = ctx
71344	return c
71345}
71346
71347// Header returns an http.Header that can be modified by the caller to
71348// add HTTP headers to the request.
71349func (c *TargetHttpProxiesGetCall) Header() http.Header {
71350	if c.header_ == nil {
71351		c.header_ = make(http.Header)
71352	}
71353	return c.header_
71354}
71355
71356func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) {
71357	reqHeaders := make(http.Header)
71358	for k, v := range c.header_ {
71359		reqHeaders[k] = v
71360	}
71361	reqHeaders.Set("User-Agent", c.s.userAgent())
71362	if c.ifNoneMatch_ != "" {
71363		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
71364	}
71365	var body io.Reader = nil
71366	c.urlParams_.Set("alt", alt)
71367	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}")
71368	urls += "?" + c.urlParams_.Encode()
71369	req, _ := http.NewRequest("GET", urls, body)
71370	req.Header = reqHeaders
71371	googleapi.Expand(req.URL, map[string]string{
71372		"project":         c.project,
71373		"targetHttpProxy": c.targetHttpProxy,
71374	})
71375	return gensupport.SendRequest(c.ctx_, c.s.client, req)
71376}
71377
71378// Do executes the "compute.targetHttpProxies.get" call.
71379// Exactly one of *TargetHttpProxy or error will be non-nil. Any non-2xx
71380// status code is an error. Response headers are in either
71381// *TargetHttpProxy.ServerResponse.Header or (if a response was returned
71382// at all) in error.(*googleapi.Error).Header. Use
71383// googleapi.IsNotModified to check whether the returned error was
71384// because http.StatusNotModified was returned.
71385func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, error) {
71386	gensupport.SetOptions(c.urlParams_, opts...)
71387	res, err := c.doRequest("json")
71388	if res != nil && res.StatusCode == http.StatusNotModified {
71389		if res.Body != nil {
71390			res.Body.Close()
71391		}
71392		return nil, &googleapi.Error{
71393			Code:   res.StatusCode,
71394			Header: res.Header,
71395		}
71396	}
71397	if err != nil {
71398		return nil, err
71399	}
71400	defer googleapi.CloseBody(res)
71401	if err := googleapi.CheckResponse(res); err != nil {
71402		return nil, err
71403	}
71404	ret := &TargetHttpProxy{
71405		ServerResponse: googleapi.ServerResponse{
71406			Header:         res.Header,
71407			HTTPStatusCode: res.StatusCode,
71408		},
71409	}
71410	target := &ret
71411	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
71412		return nil, err
71413	}
71414	return ret, nil
71415	// {
71416	//   "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.",
71417	//   "httpMethod": "GET",
71418	//   "id": "compute.targetHttpProxies.get",
71419	//   "parameterOrder": [
71420	//     "project",
71421	//     "targetHttpProxy"
71422	//   ],
71423	//   "parameters": {
71424	//     "project": {
71425	//       "description": "Project ID for this request.",
71426	//       "location": "path",
71427	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
71428	//       "required": true,
71429	//       "type": "string"
71430	//     },
71431	//     "targetHttpProxy": {
71432	//       "description": "Name of the TargetHttpProxy resource to return.",
71433	//       "location": "path",
71434	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
71435	//       "required": true,
71436	//       "type": "string"
71437	//     }
71438	//   },
71439	//   "path": "{project}/global/targetHttpProxies/{targetHttpProxy}",
71440	//   "response": {
71441	//     "$ref": "TargetHttpProxy"
71442	//   },
71443	//   "scopes": [
71444	//     "https://www.googleapis.com/auth/cloud-platform",
71445	//     "https://www.googleapis.com/auth/compute",
71446	//     "https://www.googleapis.com/auth/compute.readonly"
71447	//   ]
71448	// }
71449
71450}
71451
71452// method id "compute.targetHttpProxies.insert":
71453
71454type TargetHttpProxiesInsertCall struct {
71455	s               *Service
71456	project         string
71457	targethttpproxy *TargetHttpProxy
71458	urlParams_      gensupport.URLParams
71459	ctx_            context.Context
71460	header_         http.Header
71461}
71462
71463// Insert: Creates a TargetHttpProxy resource in the specified project
71464// using the data included in the request.
71465// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/insert
71466func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall {
71467	c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
71468	c.project = project
71469	c.targethttpproxy = targethttpproxy
71470	return c
71471}
71472
71473// RequestId sets the optional parameter "requestId": An optional
71474// request ID to identify requests. Specify a unique request ID so that
71475// if you must retry your request, the server will know to ignore the
71476// request if it has already been completed.
71477//
71478// For example, consider a situation where you make an initial request
71479// and the request times out. If you make the request again with the
71480// same request ID, the server can check if original operation with the
71481// same request ID was received, and if so, will ignore the second
71482// request. This prevents clients from accidentally creating duplicate
71483// commitments.
71484//
71485// The request ID must be a valid UUID with the exception that zero UUID
71486// is not supported (00000000-0000-0000-0000-000000000000).
71487func (c *TargetHttpProxiesInsertCall) RequestId(requestId string) *TargetHttpProxiesInsertCall {
71488	c.urlParams_.Set("requestId", requestId)
71489	return c
71490}
71491
71492// Fields allows partial responses to be retrieved. See
71493// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
71494// for more information.
71495func (c *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall {
71496	c.urlParams_.Set("fields", googleapi.CombineFields(s))
71497	return c
71498}
71499
71500// Context sets the context to be used in this call's Do method. Any
71501// pending HTTP request will be aborted if the provided context is
71502// canceled.
71503func (c *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall {
71504	c.ctx_ = ctx
71505	return c
71506}
71507
71508// Header returns an http.Header that can be modified by the caller to
71509// add HTTP headers to the request.
71510func (c *TargetHttpProxiesInsertCall) Header() http.Header {
71511	if c.header_ == nil {
71512		c.header_ = make(http.Header)
71513	}
71514	return c.header_
71515}
71516
71517func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
71518	reqHeaders := make(http.Header)
71519	for k, v := range c.header_ {
71520		reqHeaders[k] = v
71521	}
71522	reqHeaders.Set("User-Agent", c.s.userAgent())
71523	var body io.Reader = nil
71524	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy)
71525	if err != nil {
71526		return nil, err
71527	}
71528	reqHeaders.Set("Content-Type", "application/json")
71529	c.urlParams_.Set("alt", alt)
71530	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies")
71531	urls += "?" + c.urlParams_.Encode()
71532	req, _ := http.NewRequest("POST", urls, body)
71533	req.Header = reqHeaders
71534	googleapi.Expand(req.URL, map[string]string{
71535		"project": c.project,
71536	})
71537	return gensupport.SendRequest(c.ctx_, c.s.client, req)
71538}
71539
71540// Do executes the "compute.targetHttpProxies.insert" call.
71541// Exactly one of *Operation or error will be non-nil. Any non-2xx
71542// status code is an error. Response headers are in either
71543// *Operation.ServerResponse.Header or (if a response was returned at
71544// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
71545// to check whether the returned error was because
71546// http.StatusNotModified was returned.
71547func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
71548	gensupport.SetOptions(c.urlParams_, opts...)
71549	res, err := c.doRequest("json")
71550	if res != nil && res.StatusCode == http.StatusNotModified {
71551		if res.Body != nil {
71552			res.Body.Close()
71553		}
71554		return nil, &googleapi.Error{
71555			Code:   res.StatusCode,
71556			Header: res.Header,
71557		}
71558	}
71559	if err != nil {
71560		return nil, err
71561	}
71562	defer googleapi.CloseBody(res)
71563	if err := googleapi.CheckResponse(res); err != nil {
71564		return nil, err
71565	}
71566	ret := &Operation{
71567		ServerResponse: googleapi.ServerResponse{
71568			Header:         res.Header,
71569			HTTPStatusCode: res.StatusCode,
71570		},
71571	}
71572	target := &ret
71573	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
71574		return nil, err
71575	}
71576	return ret, nil
71577	// {
71578	//   "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.",
71579	//   "httpMethod": "POST",
71580	//   "id": "compute.targetHttpProxies.insert",
71581	//   "parameterOrder": [
71582	//     "project"
71583	//   ],
71584	//   "parameters": {
71585	//     "project": {
71586	//       "description": "Project ID for this request.",
71587	//       "location": "path",
71588	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
71589	//       "required": true,
71590	//       "type": "string"
71591	//     },
71592	//     "requestId": {
71593	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
71594	//       "location": "query",
71595	//       "type": "string"
71596	//     }
71597	//   },
71598	//   "path": "{project}/global/targetHttpProxies",
71599	//   "request": {
71600	//     "$ref": "TargetHttpProxy"
71601	//   },
71602	//   "response": {
71603	//     "$ref": "Operation"
71604	//   },
71605	//   "scopes": [
71606	//     "https://www.googleapis.com/auth/cloud-platform",
71607	//     "https://www.googleapis.com/auth/compute"
71608	//   ]
71609	// }
71610
71611}
71612
71613// method id "compute.targetHttpProxies.list":
71614
71615type TargetHttpProxiesListCall struct {
71616	s            *Service
71617	project      string
71618	urlParams_   gensupport.URLParams
71619	ifNoneMatch_ string
71620	ctx_         context.Context
71621	header_      http.Header
71622}
71623
71624// List: Retrieves the list of TargetHttpProxy resources available to
71625// the specified project.
71626// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/list
71627func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall {
71628	c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
71629	c.project = project
71630	return c
71631}
71632
71633// Filter sets the optional parameter "filter": Sets a filter
71634// {expression} for filtering listed resources. Your {expression} must
71635// be in the format: field_name comparison_string literal_string.
71636//
71637// The field_name is the name of the field you want to compare. Only
71638// atomic field types are supported (string, number, boolean). The
71639// comparison_string must be either eq (equals) or ne (not equals). The
71640// literal_string is the string value to filter to. The literal value
71641// must be valid for the type of field you are filtering by (string,
71642// number, boolean). For string fields, the literal value is interpreted
71643// as a regular expression using RE2 syntax. The literal value must
71644// match the entire field.
71645//
71646// For example, to filter for instances that do not have a name of
71647// example-instance, you would use name ne example-instance.
71648//
71649// You can filter on nested fields. For example, you could filter on
71650// instances that have set the scheduling.automaticRestart field to
71651// true. Use filtering on nested fields to take advantage of labels to
71652// organize and search for results based on label values.
71653//
71654// To filter on multiple expressions, provide each separate expression
71655// within parentheses. For example, (scheduling.automaticRestart eq
71656// true) (zone eq us-central1-f). Multiple expressions are treated as
71657// AND expressions, meaning that resources must match all expressions to
71658// pass the filters.
71659func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall {
71660	c.urlParams_.Set("filter", filter)
71661	return c
71662}
71663
71664// MaxResults sets the optional parameter "maxResults": The maximum
71665// number of results per page that should be returned. If the number of
71666// available results is larger than maxResults, Compute Engine returns a
71667// nextPageToken that can be used to get the next page of results in
71668// subsequent list requests. Acceptable values are 0 to 500, inclusive.
71669// (Default: 500)
71670func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall {
71671	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
71672	return c
71673}
71674
71675// OrderBy sets the optional parameter "orderBy": Sorts list results by
71676// a certain order. By default, results are returned in alphanumerical
71677// order based on the resource name.
71678//
71679// You can also sort results in descending order based on the creation
71680// timestamp using orderBy="creationTimestamp desc". This sorts results
71681// based on the creationTimestamp field in reverse chronological order
71682// (newest result first). Use this to sort resources like operations so
71683// that the newest operation is returned first.
71684//
71685// Currently, only sorting by name or creationTimestamp desc is
71686// supported.
71687func (c *TargetHttpProxiesListCall) OrderBy(orderBy string) *TargetHttpProxiesListCall {
71688	c.urlParams_.Set("orderBy", orderBy)
71689	return c
71690}
71691
71692// PageToken sets the optional parameter "pageToken": Specifies a page
71693// token to use. Set pageToken to the nextPageToken returned by a
71694// previous list request to get the next page of results.
71695func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxiesListCall {
71696	c.urlParams_.Set("pageToken", pageToken)
71697	return c
71698}
71699
71700// Fields allows partial responses to be retrieved. See
71701// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
71702// for more information.
71703func (c *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall {
71704	c.urlParams_.Set("fields", googleapi.CombineFields(s))
71705	return c
71706}
71707
71708// IfNoneMatch sets the optional parameter which makes the operation
71709// fail if the object's ETag matches the given value. This is useful for
71710// getting updates only after the object has changed since the last
71711// request. Use googleapi.IsNotModified to check whether the response
71712// error from Do is the result of In-None-Match.
71713func (c *TargetHttpProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesListCall {
71714	c.ifNoneMatch_ = entityTag
71715	return c
71716}
71717
71718// Context sets the context to be used in this call's Do method. Any
71719// pending HTTP request will be aborted if the provided context is
71720// canceled.
71721func (c *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall {
71722	c.ctx_ = ctx
71723	return c
71724}
71725
71726// Header returns an http.Header that can be modified by the caller to
71727// add HTTP headers to the request.
71728func (c *TargetHttpProxiesListCall) Header() http.Header {
71729	if c.header_ == nil {
71730		c.header_ = make(http.Header)
71731	}
71732	return c.header_
71733}
71734
71735func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) {
71736	reqHeaders := make(http.Header)
71737	for k, v := range c.header_ {
71738		reqHeaders[k] = v
71739	}
71740	reqHeaders.Set("User-Agent", c.s.userAgent())
71741	if c.ifNoneMatch_ != "" {
71742		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
71743	}
71744	var body io.Reader = nil
71745	c.urlParams_.Set("alt", alt)
71746	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies")
71747	urls += "?" + c.urlParams_.Encode()
71748	req, _ := http.NewRequest("GET", urls, body)
71749	req.Header = reqHeaders
71750	googleapi.Expand(req.URL, map[string]string{
71751		"project": c.project,
71752	})
71753	return gensupport.SendRequest(c.ctx_, c.s.client, req)
71754}
71755
71756// Do executes the "compute.targetHttpProxies.list" call.
71757// Exactly one of *TargetHttpProxyList or error will be non-nil. Any
71758// non-2xx status code is an error. Response headers are in either
71759// *TargetHttpProxyList.ServerResponse.Header or (if a response was
71760// returned at all) in error.(*googleapi.Error).Header. Use
71761// googleapi.IsNotModified to check whether the returned error was
71762// because http.StatusNotModified was returned.
71763func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, error) {
71764	gensupport.SetOptions(c.urlParams_, opts...)
71765	res, err := c.doRequest("json")
71766	if res != nil && res.StatusCode == http.StatusNotModified {
71767		if res.Body != nil {
71768			res.Body.Close()
71769		}
71770		return nil, &googleapi.Error{
71771			Code:   res.StatusCode,
71772			Header: res.Header,
71773		}
71774	}
71775	if err != nil {
71776		return nil, err
71777	}
71778	defer googleapi.CloseBody(res)
71779	if err := googleapi.CheckResponse(res); err != nil {
71780		return nil, err
71781	}
71782	ret := &TargetHttpProxyList{
71783		ServerResponse: googleapi.ServerResponse{
71784			Header:         res.Header,
71785			HTTPStatusCode: res.StatusCode,
71786		},
71787	}
71788	target := &ret
71789	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
71790		return nil, err
71791	}
71792	return ret, nil
71793	// {
71794	//   "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.",
71795	//   "httpMethod": "GET",
71796	//   "id": "compute.targetHttpProxies.list",
71797	//   "parameterOrder": [
71798	//     "project"
71799	//   ],
71800	//   "parameters": {
71801	//     "filter": {
71802	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
71803	//       "location": "query",
71804	//       "type": "string"
71805	//     },
71806	//     "maxResults": {
71807	//       "default": "500",
71808	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
71809	//       "format": "uint32",
71810	//       "location": "query",
71811	//       "minimum": "0",
71812	//       "type": "integer"
71813	//     },
71814	//     "orderBy": {
71815	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
71816	//       "location": "query",
71817	//       "type": "string"
71818	//     },
71819	//     "pageToken": {
71820	//       "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.",
71821	//       "location": "query",
71822	//       "type": "string"
71823	//     },
71824	//     "project": {
71825	//       "description": "Project ID for this request.",
71826	//       "location": "path",
71827	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
71828	//       "required": true,
71829	//       "type": "string"
71830	//     }
71831	//   },
71832	//   "path": "{project}/global/targetHttpProxies",
71833	//   "response": {
71834	//     "$ref": "TargetHttpProxyList"
71835	//   },
71836	//   "scopes": [
71837	//     "https://www.googleapis.com/auth/cloud-platform",
71838	//     "https://www.googleapis.com/auth/compute",
71839	//     "https://www.googleapis.com/auth/compute.readonly"
71840	//   ]
71841	// }
71842
71843}
71844
71845// Pages invokes f for each page of results.
71846// A non-nil error returned from f will halt the iteration.
71847// The provided context supersedes any context provided to the Context method.
71848func (c *TargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error {
71849	c.ctx_ = ctx
71850	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
71851	for {
71852		x, err := c.Do()
71853		if err != nil {
71854			return err
71855		}
71856		if err := f(x); err != nil {
71857			return err
71858		}
71859		if x.NextPageToken == "" {
71860			return nil
71861		}
71862		c.PageToken(x.NextPageToken)
71863	}
71864}
71865
71866// method id "compute.targetHttpProxies.setUrlMap":
71867
71868type TargetHttpProxiesSetUrlMapCall struct {
71869	s               *Service
71870	project         string
71871	targetHttpProxy string
71872	urlmapreference *UrlMapReference
71873	urlParams_      gensupport.URLParams
71874	ctx_            context.Context
71875	header_         http.Header
71876}
71877
71878// SetUrlMap: Changes the URL map for TargetHttpProxy.
71879// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/setUrlMap
71880func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall {
71881	c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)}
71882	c.project = project
71883	c.targetHttpProxy = targetHttpProxy
71884	c.urlmapreference = urlmapreference
71885	return c
71886}
71887
71888// RequestId sets the optional parameter "requestId": An optional
71889// request ID to identify requests. Specify a unique request ID so that
71890// if you must retry your request, the server will know to ignore the
71891// request if it has already been completed.
71892//
71893// For example, consider a situation where you make an initial request
71894// and the request times out. If you make the request again with the
71895// same request ID, the server can check if original operation with the
71896// same request ID was received, and if so, will ignore the second
71897// request. This prevents clients from accidentally creating duplicate
71898// commitments.
71899//
71900// The request ID must be a valid UUID with the exception that zero UUID
71901// is not supported (00000000-0000-0000-0000-000000000000).
71902func (c *TargetHttpProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpProxiesSetUrlMapCall {
71903	c.urlParams_.Set("requestId", requestId)
71904	return c
71905}
71906
71907// Fields allows partial responses to be retrieved. See
71908// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
71909// for more information.
71910func (c *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall {
71911	c.urlParams_.Set("fields", googleapi.CombineFields(s))
71912	return c
71913}
71914
71915// Context sets the context to be used in this call's Do method. Any
71916// pending HTTP request will be aborted if the provided context is
71917// canceled.
71918func (c *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall {
71919	c.ctx_ = ctx
71920	return c
71921}
71922
71923// Header returns an http.Header that can be modified by the caller to
71924// add HTTP headers to the request.
71925func (c *TargetHttpProxiesSetUrlMapCall) Header() http.Header {
71926	if c.header_ == nil {
71927		c.header_ = make(http.Header)
71928	}
71929	return c.header_
71930}
71931
71932func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
71933	reqHeaders := make(http.Header)
71934	for k, v := range c.header_ {
71935		reqHeaders[k] = v
71936	}
71937	reqHeaders.Set("User-Agent", c.s.userAgent())
71938	var body io.Reader = nil
71939	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
71940	if err != nil {
71941		return nil, err
71942	}
71943	reqHeaders.Set("Content-Type", "application/json")
71944	c.urlParams_.Set("alt", alt)
71945	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap")
71946	urls += "?" + c.urlParams_.Encode()
71947	req, _ := http.NewRequest("POST", urls, body)
71948	req.Header = reqHeaders
71949	googleapi.Expand(req.URL, map[string]string{
71950		"project":         c.project,
71951		"targetHttpProxy": c.targetHttpProxy,
71952	})
71953	return gensupport.SendRequest(c.ctx_, c.s.client, req)
71954}
71955
71956// Do executes the "compute.targetHttpProxies.setUrlMap" call.
71957// Exactly one of *Operation or error will be non-nil. Any non-2xx
71958// status code is an error. Response headers are in either
71959// *Operation.ServerResponse.Header or (if a response was returned at
71960// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
71961// to check whether the returned error was because
71962// http.StatusNotModified was returned.
71963func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
71964	gensupport.SetOptions(c.urlParams_, opts...)
71965	res, err := c.doRequest("json")
71966	if res != nil && res.StatusCode == http.StatusNotModified {
71967		if res.Body != nil {
71968			res.Body.Close()
71969		}
71970		return nil, &googleapi.Error{
71971			Code:   res.StatusCode,
71972			Header: res.Header,
71973		}
71974	}
71975	if err != nil {
71976		return nil, err
71977	}
71978	defer googleapi.CloseBody(res)
71979	if err := googleapi.CheckResponse(res); err != nil {
71980		return nil, err
71981	}
71982	ret := &Operation{
71983		ServerResponse: googleapi.ServerResponse{
71984			Header:         res.Header,
71985			HTTPStatusCode: res.StatusCode,
71986		},
71987	}
71988	target := &ret
71989	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
71990		return nil, err
71991	}
71992	return ret, nil
71993	// {
71994	//   "description": "Changes the URL map for TargetHttpProxy.",
71995	//   "httpMethod": "POST",
71996	//   "id": "compute.targetHttpProxies.setUrlMap",
71997	//   "parameterOrder": [
71998	//     "project",
71999	//     "targetHttpProxy"
72000	//   ],
72001	//   "parameters": {
72002	//     "project": {
72003	//       "description": "Project ID for this request.",
72004	//       "location": "path",
72005	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
72006	//       "required": true,
72007	//       "type": "string"
72008	//     },
72009	//     "requestId": {
72010	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
72011	//       "location": "query",
72012	//       "type": "string"
72013	//     },
72014	//     "targetHttpProxy": {
72015	//       "description": "Name of the TargetHttpProxy to set a URL map for.",
72016	//       "location": "path",
72017	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
72018	//       "required": true,
72019	//       "type": "string"
72020	//     }
72021	//   },
72022	//   "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap",
72023	//   "request": {
72024	//     "$ref": "UrlMapReference"
72025	//   },
72026	//   "response": {
72027	//     "$ref": "Operation"
72028	//   },
72029	//   "scopes": [
72030	//     "https://www.googleapis.com/auth/cloud-platform",
72031	//     "https://www.googleapis.com/auth/compute"
72032	//   ]
72033	// }
72034
72035}
72036
72037// method id "compute.targetHttpProxies.testIamPermissions":
72038
72039type TargetHttpProxiesTestIamPermissionsCall struct {
72040	s                      *Service
72041	project                string
72042	resource               string
72043	testpermissionsrequest *TestPermissionsRequest
72044	urlParams_             gensupport.URLParams
72045	ctx_                   context.Context
72046	header_                http.Header
72047}
72048
72049// TestIamPermissions: Returns permissions that a caller has on the
72050// specified resource.
72051func (r *TargetHttpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpProxiesTestIamPermissionsCall {
72052	c := &TargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
72053	c.project = project
72054	c.resource = resource
72055	c.testpermissionsrequest = testpermissionsrequest
72056	return c
72057}
72058
72059// Fields allows partial responses to be retrieved. See
72060// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
72061// for more information.
72062func (c *TargetHttpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpProxiesTestIamPermissionsCall {
72063	c.urlParams_.Set("fields", googleapi.CombineFields(s))
72064	return c
72065}
72066
72067// Context sets the context to be used in this call's Do method. Any
72068// pending HTTP request will be aborted if the provided context is
72069// canceled.
72070func (c *TargetHttpProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpProxiesTestIamPermissionsCall {
72071	c.ctx_ = ctx
72072	return c
72073}
72074
72075// Header returns an http.Header that can be modified by the caller to
72076// add HTTP headers to the request.
72077func (c *TargetHttpProxiesTestIamPermissionsCall) Header() http.Header {
72078	if c.header_ == nil {
72079		c.header_ = make(http.Header)
72080	}
72081	return c.header_
72082}
72083
72084func (c *TargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
72085	reqHeaders := make(http.Header)
72086	for k, v := range c.header_ {
72087		reqHeaders[k] = v
72088	}
72089	reqHeaders.Set("User-Agent", c.s.userAgent())
72090	var body io.Reader = nil
72091	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
72092	if err != nil {
72093		return nil, err
72094	}
72095	reqHeaders.Set("Content-Type", "application/json")
72096	c.urlParams_.Set("alt", alt)
72097	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{resource}/testIamPermissions")
72098	urls += "?" + c.urlParams_.Encode()
72099	req, _ := http.NewRequest("POST", urls, body)
72100	req.Header = reqHeaders
72101	googleapi.Expand(req.URL, map[string]string{
72102		"project":  c.project,
72103		"resource": c.resource,
72104	})
72105	return gensupport.SendRequest(c.ctx_, c.s.client, req)
72106}
72107
72108// Do executes the "compute.targetHttpProxies.testIamPermissions" call.
72109// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
72110// non-2xx status code is an error. Response headers are in either
72111// *TestPermissionsResponse.ServerResponse.Header or (if a response was
72112// returned at all) in error.(*googleapi.Error).Header. Use
72113// googleapi.IsNotModified to check whether the returned error was
72114// because http.StatusNotModified was returned.
72115func (c *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
72116	gensupport.SetOptions(c.urlParams_, opts...)
72117	res, err := c.doRequest("json")
72118	if res != nil && res.StatusCode == http.StatusNotModified {
72119		if res.Body != nil {
72120			res.Body.Close()
72121		}
72122		return nil, &googleapi.Error{
72123			Code:   res.StatusCode,
72124			Header: res.Header,
72125		}
72126	}
72127	if err != nil {
72128		return nil, err
72129	}
72130	defer googleapi.CloseBody(res)
72131	if err := googleapi.CheckResponse(res); err != nil {
72132		return nil, err
72133	}
72134	ret := &TestPermissionsResponse{
72135		ServerResponse: googleapi.ServerResponse{
72136			Header:         res.Header,
72137			HTTPStatusCode: res.StatusCode,
72138		},
72139	}
72140	target := &ret
72141	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
72142		return nil, err
72143	}
72144	return ret, nil
72145	// {
72146	//   "description": "Returns permissions that a caller has on the specified resource.",
72147	//   "httpMethod": "POST",
72148	//   "id": "compute.targetHttpProxies.testIamPermissions",
72149	//   "parameterOrder": [
72150	//     "project",
72151	//     "resource"
72152	//   ],
72153	//   "parameters": {
72154	//     "project": {
72155	//       "description": "Project ID for this request.",
72156	//       "location": "path",
72157	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
72158	//       "required": true,
72159	//       "type": "string"
72160	//     },
72161	//     "resource": {
72162	//       "description": "Name of the resource for this request.",
72163	//       "location": "path",
72164	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
72165	//       "required": true,
72166	//       "type": "string"
72167	//     }
72168	//   },
72169	//   "path": "{project}/global/targetHttpProxies/{resource}/testIamPermissions",
72170	//   "request": {
72171	//     "$ref": "TestPermissionsRequest"
72172	//   },
72173	//   "response": {
72174	//     "$ref": "TestPermissionsResponse"
72175	//   },
72176	//   "scopes": [
72177	//     "https://www.googleapis.com/auth/cloud-platform",
72178	//     "https://www.googleapis.com/auth/compute",
72179	//     "https://www.googleapis.com/auth/compute.readonly"
72180	//   ]
72181	// }
72182
72183}
72184
72185// method id "compute.targetHttpsProxies.delete":
72186
72187type TargetHttpsProxiesDeleteCall struct {
72188	s                *Service
72189	project          string
72190	targetHttpsProxy string
72191	urlParams_       gensupport.URLParams
72192	ctx_             context.Context
72193	header_          http.Header
72194}
72195
72196// Delete: Deletes the specified TargetHttpsProxy resource.
72197func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall {
72198	c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
72199	c.project = project
72200	c.targetHttpsProxy = targetHttpsProxy
72201	return c
72202}
72203
72204// RequestId sets the optional parameter "requestId": An optional
72205// request ID to identify requests. Specify a unique request ID so that
72206// if you must retry your request, the server will know to ignore the
72207// request if it has already been completed.
72208//
72209// For example, consider a situation where you make an initial request
72210// and the request times out. If you make the request again with the
72211// same request ID, the server can check if original operation with the
72212// same request ID was received, and if so, will ignore the second
72213// request. This prevents clients from accidentally creating duplicate
72214// commitments.
72215//
72216// The request ID must be a valid UUID with the exception that zero UUID
72217// is not supported (00000000-0000-0000-0000-000000000000).
72218func (c *TargetHttpsProxiesDeleteCall) RequestId(requestId string) *TargetHttpsProxiesDeleteCall {
72219	c.urlParams_.Set("requestId", requestId)
72220	return c
72221}
72222
72223// Fields allows partial responses to be retrieved. See
72224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
72225// for more information.
72226func (c *TargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesDeleteCall {
72227	c.urlParams_.Set("fields", googleapi.CombineFields(s))
72228	return c
72229}
72230
72231// Context sets the context to be used in this call's Do method. Any
72232// pending HTTP request will be aborted if the provided context is
72233// canceled.
72234func (c *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttpsProxiesDeleteCall {
72235	c.ctx_ = ctx
72236	return c
72237}
72238
72239// Header returns an http.Header that can be modified by the caller to
72240// add HTTP headers to the request.
72241func (c *TargetHttpsProxiesDeleteCall) Header() http.Header {
72242	if c.header_ == nil {
72243		c.header_ = make(http.Header)
72244	}
72245	return c.header_
72246}
72247
72248func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
72249	reqHeaders := make(http.Header)
72250	for k, v := range c.header_ {
72251		reqHeaders[k] = v
72252	}
72253	reqHeaders.Set("User-Agent", c.s.userAgent())
72254	var body io.Reader = nil
72255	c.urlParams_.Set("alt", alt)
72256	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}")
72257	urls += "?" + c.urlParams_.Encode()
72258	req, _ := http.NewRequest("DELETE", urls, body)
72259	req.Header = reqHeaders
72260	googleapi.Expand(req.URL, map[string]string{
72261		"project":          c.project,
72262		"targetHttpsProxy": c.targetHttpsProxy,
72263	})
72264	return gensupport.SendRequest(c.ctx_, c.s.client, req)
72265}
72266
72267// Do executes the "compute.targetHttpsProxies.delete" call.
72268// Exactly one of *Operation or error will be non-nil. Any non-2xx
72269// status code is an error. Response headers are in either
72270// *Operation.ServerResponse.Header or (if a response was returned at
72271// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
72272// to check whether the returned error was because
72273// http.StatusNotModified was returned.
72274func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
72275	gensupport.SetOptions(c.urlParams_, opts...)
72276	res, err := c.doRequest("json")
72277	if res != nil && res.StatusCode == http.StatusNotModified {
72278		if res.Body != nil {
72279			res.Body.Close()
72280		}
72281		return nil, &googleapi.Error{
72282			Code:   res.StatusCode,
72283			Header: res.Header,
72284		}
72285	}
72286	if err != nil {
72287		return nil, err
72288	}
72289	defer googleapi.CloseBody(res)
72290	if err := googleapi.CheckResponse(res); err != nil {
72291		return nil, err
72292	}
72293	ret := &Operation{
72294		ServerResponse: googleapi.ServerResponse{
72295			Header:         res.Header,
72296			HTTPStatusCode: res.StatusCode,
72297		},
72298	}
72299	target := &ret
72300	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
72301		return nil, err
72302	}
72303	return ret, nil
72304	// {
72305	//   "description": "Deletes the specified TargetHttpsProxy resource.",
72306	//   "httpMethod": "DELETE",
72307	//   "id": "compute.targetHttpsProxies.delete",
72308	//   "parameterOrder": [
72309	//     "project",
72310	//     "targetHttpsProxy"
72311	//   ],
72312	//   "parameters": {
72313	//     "project": {
72314	//       "description": "Project ID for this request.",
72315	//       "location": "path",
72316	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
72317	//       "required": true,
72318	//       "type": "string"
72319	//     },
72320	//     "requestId": {
72321	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
72322	//       "location": "query",
72323	//       "type": "string"
72324	//     },
72325	//     "targetHttpsProxy": {
72326	//       "description": "Name of the TargetHttpsProxy resource to delete.",
72327	//       "location": "path",
72328	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
72329	//       "required": true,
72330	//       "type": "string"
72331	//     }
72332	//   },
72333	//   "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}",
72334	//   "response": {
72335	//     "$ref": "Operation"
72336	//   },
72337	//   "scopes": [
72338	//     "https://www.googleapis.com/auth/cloud-platform",
72339	//     "https://www.googleapis.com/auth/compute"
72340	//   ]
72341	// }
72342
72343}
72344
72345// method id "compute.targetHttpsProxies.get":
72346
72347type TargetHttpsProxiesGetCall struct {
72348	s                *Service
72349	project          string
72350	targetHttpsProxy string
72351	urlParams_       gensupport.URLParams
72352	ifNoneMatch_     string
72353	ctx_             context.Context
72354	header_          http.Header
72355}
72356
72357// Get: Returns the specified TargetHttpsProxy resource. Get a list of
72358// available target HTTPS proxies by making a list() request.
72359func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall {
72360	c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
72361	c.project = project
72362	c.targetHttpsProxy = targetHttpsProxy
72363	return c
72364}
72365
72366// Fields allows partial responses to be retrieved. See
72367// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
72368// for more information.
72369func (c *TargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesGetCall {
72370	c.urlParams_.Set("fields", googleapi.CombineFields(s))
72371	return c
72372}
72373
72374// IfNoneMatch sets the optional parameter which makes the operation
72375// fail if the object's ETag matches the given value. This is useful for
72376// getting updates only after the object has changed since the last
72377// request. Use googleapi.IsNotModified to check whether the response
72378// error from Do is the result of In-None-Match.
72379func (c *TargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesGetCall {
72380	c.ifNoneMatch_ = entityTag
72381	return c
72382}
72383
72384// Context sets the context to be used in this call's Do method. Any
72385// pending HTTP request will be aborted if the provided context is
72386// canceled.
72387func (c *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsProxiesGetCall {
72388	c.ctx_ = ctx
72389	return c
72390}
72391
72392// Header returns an http.Header that can be modified by the caller to
72393// add HTTP headers to the request.
72394func (c *TargetHttpsProxiesGetCall) Header() http.Header {
72395	if c.header_ == nil {
72396		c.header_ = make(http.Header)
72397	}
72398	return c.header_
72399}
72400
72401func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) {
72402	reqHeaders := make(http.Header)
72403	for k, v := range c.header_ {
72404		reqHeaders[k] = v
72405	}
72406	reqHeaders.Set("User-Agent", c.s.userAgent())
72407	if c.ifNoneMatch_ != "" {
72408		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
72409	}
72410	var body io.Reader = nil
72411	c.urlParams_.Set("alt", alt)
72412	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}")
72413	urls += "?" + c.urlParams_.Encode()
72414	req, _ := http.NewRequest("GET", urls, body)
72415	req.Header = reqHeaders
72416	googleapi.Expand(req.URL, map[string]string{
72417		"project":          c.project,
72418		"targetHttpsProxy": c.targetHttpsProxy,
72419	})
72420	return gensupport.SendRequest(c.ctx_, c.s.client, req)
72421}
72422
72423// Do executes the "compute.targetHttpsProxies.get" call.
72424// Exactly one of *TargetHttpsProxy or error will be non-nil. Any
72425// non-2xx status code is an error. Response headers are in either
72426// *TargetHttpsProxy.ServerResponse.Header or (if a response was
72427// returned at all) in error.(*googleapi.Error).Header. Use
72428// googleapi.IsNotModified to check whether the returned error was
72429// because http.StatusNotModified was returned.
72430func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, error) {
72431	gensupport.SetOptions(c.urlParams_, opts...)
72432	res, err := c.doRequest("json")
72433	if res != nil && res.StatusCode == http.StatusNotModified {
72434		if res.Body != nil {
72435			res.Body.Close()
72436		}
72437		return nil, &googleapi.Error{
72438			Code:   res.StatusCode,
72439			Header: res.Header,
72440		}
72441	}
72442	if err != nil {
72443		return nil, err
72444	}
72445	defer googleapi.CloseBody(res)
72446	if err := googleapi.CheckResponse(res); err != nil {
72447		return nil, err
72448	}
72449	ret := &TargetHttpsProxy{
72450		ServerResponse: googleapi.ServerResponse{
72451			Header:         res.Header,
72452			HTTPStatusCode: res.StatusCode,
72453		},
72454	}
72455	target := &ret
72456	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
72457		return nil, err
72458	}
72459	return ret, nil
72460	// {
72461	//   "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.",
72462	//   "httpMethod": "GET",
72463	//   "id": "compute.targetHttpsProxies.get",
72464	//   "parameterOrder": [
72465	//     "project",
72466	//     "targetHttpsProxy"
72467	//   ],
72468	//   "parameters": {
72469	//     "project": {
72470	//       "description": "Project ID for this request.",
72471	//       "location": "path",
72472	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
72473	//       "required": true,
72474	//       "type": "string"
72475	//     },
72476	//     "targetHttpsProxy": {
72477	//       "description": "Name of the TargetHttpsProxy resource to return.",
72478	//       "location": "path",
72479	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
72480	//       "required": true,
72481	//       "type": "string"
72482	//     }
72483	//   },
72484	//   "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}",
72485	//   "response": {
72486	//     "$ref": "TargetHttpsProxy"
72487	//   },
72488	//   "scopes": [
72489	//     "https://www.googleapis.com/auth/cloud-platform",
72490	//     "https://www.googleapis.com/auth/compute",
72491	//     "https://www.googleapis.com/auth/compute.readonly"
72492	//   ]
72493	// }
72494
72495}
72496
72497// method id "compute.targetHttpsProxies.insert":
72498
72499type TargetHttpsProxiesInsertCall struct {
72500	s                *Service
72501	project          string
72502	targethttpsproxy *TargetHttpsProxy
72503	urlParams_       gensupport.URLParams
72504	ctx_             context.Context
72505	header_          http.Header
72506}
72507
72508// Insert: Creates a TargetHttpsProxy resource in the specified project
72509// using the data included in the request.
72510func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall {
72511	c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
72512	c.project = project
72513	c.targethttpsproxy = targethttpsproxy
72514	return c
72515}
72516
72517// RequestId sets the optional parameter "requestId": An optional
72518// request ID to identify requests. Specify a unique request ID so that
72519// if you must retry your request, the server will know to ignore the
72520// request if it has already been completed.
72521//
72522// For example, consider a situation where you make an initial request
72523// and the request times out. If you make the request again with the
72524// same request ID, the server can check if original operation with the
72525// same request ID was received, and if so, will ignore the second
72526// request. This prevents clients from accidentally creating duplicate
72527// commitments.
72528//
72529// The request ID must be a valid UUID with the exception that zero UUID
72530// is not supported (00000000-0000-0000-0000-000000000000).
72531func (c *TargetHttpsProxiesInsertCall) RequestId(requestId string) *TargetHttpsProxiesInsertCall {
72532	c.urlParams_.Set("requestId", requestId)
72533	return c
72534}
72535
72536// Fields allows partial responses to be retrieved. See
72537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
72538// for more information.
72539func (c *TargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesInsertCall {
72540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
72541	return c
72542}
72543
72544// Context sets the context to be used in this call's Do method. Any
72545// pending HTTP request will be aborted if the provided context is
72546// canceled.
72547func (c *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttpsProxiesInsertCall {
72548	c.ctx_ = ctx
72549	return c
72550}
72551
72552// Header returns an http.Header that can be modified by the caller to
72553// add HTTP headers to the request.
72554func (c *TargetHttpsProxiesInsertCall) Header() http.Header {
72555	if c.header_ == nil {
72556		c.header_ = make(http.Header)
72557	}
72558	return c.header_
72559}
72560
72561func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
72562	reqHeaders := make(http.Header)
72563	for k, v := range c.header_ {
72564		reqHeaders[k] = v
72565	}
72566	reqHeaders.Set("User-Agent", c.s.userAgent())
72567	var body io.Reader = nil
72568	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxy)
72569	if err != nil {
72570		return nil, err
72571	}
72572	reqHeaders.Set("Content-Type", "application/json")
72573	c.urlParams_.Set("alt", alt)
72574	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies")
72575	urls += "?" + c.urlParams_.Encode()
72576	req, _ := http.NewRequest("POST", urls, body)
72577	req.Header = reqHeaders
72578	googleapi.Expand(req.URL, map[string]string{
72579		"project": c.project,
72580	})
72581	return gensupport.SendRequest(c.ctx_, c.s.client, req)
72582}
72583
72584// Do executes the "compute.targetHttpsProxies.insert" call.
72585// Exactly one of *Operation or error will be non-nil. Any non-2xx
72586// status code is an error. Response headers are in either
72587// *Operation.ServerResponse.Header or (if a response was returned at
72588// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
72589// to check whether the returned error was because
72590// http.StatusNotModified was returned.
72591func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
72592	gensupport.SetOptions(c.urlParams_, opts...)
72593	res, err := c.doRequest("json")
72594	if res != nil && res.StatusCode == http.StatusNotModified {
72595		if res.Body != nil {
72596			res.Body.Close()
72597		}
72598		return nil, &googleapi.Error{
72599			Code:   res.StatusCode,
72600			Header: res.Header,
72601		}
72602	}
72603	if err != nil {
72604		return nil, err
72605	}
72606	defer googleapi.CloseBody(res)
72607	if err := googleapi.CheckResponse(res); err != nil {
72608		return nil, err
72609	}
72610	ret := &Operation{
72611		ServerResponse: googleapi.ServerResponse{
72612			Header:         res.Header,
72613			HTTPStatusCode: res.StatusCode,
72614		},
72615	}
72616	target := &ret
72617	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
72618		return nil, err
72619	}
72620	return ret, nil
72621	// {
72622	//   "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.",
72623	//   "httpMethod": "POST",
72624	//   "id": "compute.targetHttpsProxies.insert",
72625	//   "parameterOrder": [
72626	//     "project"
72627	//   ],
72628	//   "parameters": {
72629	//     "project": {
72630	//       "description": "Project ID for this request.",
72631	//       "location": "path",
72632	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
72633	//       "required": true,
72634	//       "type": "string"
72635	//     },
72636	//     "requestId": {
72637	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
72638	//       "location": "query",
72639	//       "type": "string"
72640	//     }
72641	//   },
72642	//   "path": "{project}/global/targetHttpsProxies",
72643	//   "request": {
72644	//     "$ref": "TargetHttpsProxy"
72645	//   },
72646	//   "response": {
72647	//     "$ref": "Operation"
72648	//   },
72649	//   "scopes": [
72650	//     "https://www.googleapis.com/auth/cloud-platform",
72651	//     "https://www.googleapis.com/auth/compute"
72652	//   ]
72653	// }
72654
72655}
72656
72657// method id "compute.targetHttpsProxies.list":
72658
72659type TargetHttpsProxiesListCall struct {
72660	s            *Service
72661	project      string
72662	urlParams_   gensupport.URLParams
72663	ifNoneMatch_ string
72664	ctx_         context.Context
72665	header_      http.Header
72666}
72667
72668// List: Retrieves the list of TargetHttpsProxy resources available to
72669// the specified project.
72670func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall {
72671	c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
72672	c.project = project
72673	return c
72674}
72675
72676// Filter sets the optional parameter "filter": Sets a filter
72677// {expression} for filtering listed resources. Your {expression} must
72678// be in the format: field_name comparison_string literal_string.
72679//
72680// The field_name is the name of the field you want to compare. Only
72681// atomic field types are supported (string, number, boolean). The
72682// comparison_string must be either eq (equals) or ne (not equals). The
72683// literal_string is the string value to filter to. The literal value
72684// must be valid for the type of field you are filtering by (string,
72685// number, boolean). For string fields, the literal value is interpreted
72686// as a regular expression using RE2 syntax. The literal value must
72687// match the entire field.
72688//
72689// For example, to filter for instances that do not have a name of
72690// example-instance, you would use name ne example-instance.
72691//
72692// You can filter on nested fields. For example, you could filter on
72693// instances that have set the scheduling.automaticRestart field to
72694// true. Use filtering on nested fields to take advantage of labels to
72695// organize and search for results based on label values.
72696//
72697// To filter on multiple expressions, provide each separate expression
72698// within parentheses. For example, (scheduling.automaticRestart eq
72699// true) (zone eq us-central1-f). Multiple expressions are treated as
72700// AND expressions, meaning that resources must match all expressions to
72701// pass the filters.
72702func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall {
72703	c.urlParams_.Set("filter", filter)
72704	return c
72705}
72706
72707// MaxResults sets the optional parameter "maxResults": The maximum
72708// number of results per page that should be returned. If the number of
72709// available results is larger than maxResults, Compute Engine returns a
72710// nextPageToken that can be used to get the next page of results in
72711// subsequent list requests. Acceptable values are 0 to 500, inclusive.
72712// (Default: 500)
72713func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall {
72714	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
72715	return c
72716}
72717
72718// OrderBy sets the optional parameter "orderBy": Sorts list results by
72719// a certain order. By default, results are returned in alphanumerical
72720// order based on the resource name.
72721//
72722// You can also sort results in descending order based on the creation
72723// timestamp using orderBy="creationTimestamp desc". This sorts results
72724// based on the creationTimestamp field in reverse chronological order
72725// (newest result first). Use this to sort resources like operations so
72726// that the newest operation is returned first.
72727//
72728// Currently, only sorting by name or creationTimestamp desc is
72729// supported.
72730func (c *TargetHttpsProxiesListCall) OrderBy(orderBy string) *TargetHttpsProxiesListCall {
72731	c.urlParams_.Set("orderBy", orderBy)
72732	return c
72733}
72734
72735// PageToken sets the optional parameter "pageToken": Specifies a page
72736// token to use. Set pageToken to the nextPageToken returned by a
72737// previous list request to get the next page of results.
72738func (c *TargetHttpsProxiesListCall) PageToken(pageToken string) *TargetHttpsProxiesListCall {
72739	c.urlParams_.Set("pageToken", pageToken)
72740	return c
72741}
72742
72743// Fields allows partial responses to be retrieved. See
72744// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
72745// for more information.
72746func (c *TargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesListCall {
72747	c.urlParams_.Set("fields", googleapi.CombineFields(s))
72748	return c
72749}
72750
72751// IfNoneMatch sets the optional parameter which makes the operation
72752// fail if the object's ETag matches the given value. This is useful for
72753// getting updates only after the object has changed since the last
72754// request. Use googleapi.IsNotModified to check whether the response
72755// error from Do is the result of In-None-Match.
72756func (c *TargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesListCall {
72757	c.ifNoneMatch_ = entityTag
72758	return c
72759}
72760
72761// Context sets the context to be used in this call's Do method. Any
72762// pending HTTP request will be aborted if the provided context is
72763// canceled.
72764func (c *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsProxiesListCall {
72765	c.ctx_ = ctx
72766	return c
72767}
72768
72769// Header returns an http.Header that can be modified by the caller to
72770// add HTTP headers to the request.
72771func (c *TargetHttpsProxiesListCall) Header() http.Header {
72772	if c.header_ == nil {
72773		c.header_ = make(http.Header)
72774	}
72775	return c.header_
72776}
72777
72778func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) {
72779	reqHeaders := make(http.Header)
72780	for k, v := range c.header_ {
72781		reqHeaders[k] = v
72782	}
72783	reqHeaders.Set("User-Agent", c.s.userAgent())
72784	if c.ifNoneMatch_ != "" {
72785		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
72786	}
72787	var body io.Reader = nil
72788	c.urlParams_.Set("alt", alt)
72789	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies")
72790	urls += "?" + c.urlParams_.Encode()
72791	req, _ := http.NewRequest("GET", urls, body)
72792	req.Header = reqHeaders
72793	googleapi.Expand(req.URL, map[string]string{
72794		"project": c.project,
72795	})
72796	return gensupport.SendRequest(c.ctx_, c.s.client, req)
72797}
72798
72799// Do executes the "compute.targetHttpsProxies.list" call.
72800// Exactly one of *TargetHttpsProxyList or error will be non-nil. Any
72801// non-2xx status code is an error. Response headers are in either
72802// *TargetHttpsProxyList.ServerResponse.Header or (if a response was
72803// returned at all) in error.(*googleapi.Error).Header. Use
72804// googleapi.IsNotModified to check whether the returned error was
72805// because http.StatusNotModified was returned.
72806func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, error) {
72807	gensupport.SetOptions(c.urlParams_, opts...)
72808	res, err := c.doRequest("json")
72809	if res != nil && res.StatusCode == http.StatusNotModified {
72810		if res.Body != nil {
72811			res.Body.Close()
72812		}
72813		return nil, &googleapi.Error{
72814			Code:   res.StatusCode,
72815			Header: res.Header,
72816		}
72817	}
72818	if err != nil {
72819		return nil, err
72820	}
72821	defer googleapi.CloseBody(res)
72822	if err := googleapi.CheckResponse(res); err != nil {
72823		return nil, err
72824	}
72825	ret := &TargetHttpsProxyList{
72826		ServerResponse: googleapi.ServerResponse{
72827			Header:         res.Header,
72828			HTTPStatusCode: res.StatusCode,
72829		},
72830	}
72831	target := &ret
72832	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
72833		return nil, err
72834	}
72835	return ret, nil
72836	// {
72837	//   "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.",
72838	//   "httpMethod": "GET",
72839	//   "id": "compute.targetHttpsProxies.list",
72840	//   "parameterOrder": [
72841	//     "project"
72842	//   ],
72843	//   "parameters": {
72844	//     "filter": {
72845	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
72846	//       "location": "query",
72847	//       "type": "string"
72848	//     },
72849	//     "maxResults": {
72850	//       "default": "500",
72851	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
72852	//       "format": "uint32",
72853	//       "location": "query",
72854	//       "minimum": "0",
72855	//       "type": "integer"
72856	//     },
72857	//     "orderBy": {
72858	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
72859	//       "location": "query",
72860	//       "type": "string"
72861	//     },
72862	//     "pageToken": {
72863	//       "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.",
72864	//       "location": "query",
72865	//       "type": "string"
72866	//     },
72867	//     "project": {
72868	//       "description": "Project ID for this request.",
72869	//       "location": "path",
72870	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
72871	//       "required": true,
72872	//       "type": "string"
72873	//     }
72874	//   },
72875	//   "path": "{project}/global/targetHttpsProxies",
72876	//   "response": {
72877	//     "$ref": "TargetHttpsProxyList"
72878	//   },
72879	//   "scopes": [
72880	//     "https://www.googleapis.com/auth/cloud-platform",
72881	//     "https://www.googleapis.com/auth/compute",
72882	//     "https://www.googleapis.com/auth/compute.readonly"
72883	//   ]
72884	// }
72885
72886}
72887
72888// Pages invokes f for each page of results.
72889// A non-nil error returned from f will halt the iteration.
72890// The provided context supersedes any context provided to the Context method.
72891func (c *TargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error {
72892	c.ctx_ = ctx
72893	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
72894	for {
72895		x, err := c.Do()
72896		if err != nil {
72897			return err
72898		}
72899		if err := f(x); err != nil {
72900			return err
72901		}
72902		if x.NextPageToken == "" {
72903			return nil
72904		}
72905		c.PageToken(x.NextPageToken)
72906	}
72907}
72908
72909// method id "compute.targetHttpsProxies.setSslCertificates":
72910
72911type TargetHttpsProxiesSetSslCertificatesCall struct {
72912	s                                           *Service
72913	project                                     string
72914	targetHttpsProxy                            string
72915	targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest
72916	urlParams_                                  gensupport.URLParams
72917	ctx_                                        context.Context
72918	header_                                     http.Header
72919}
72920
72921// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy.
72922func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall {
72923	c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
72924	c.project = project
72925	c.targetHttpsProxy = targetHttpsProxy
72926	c.targethttpsproxiessetsslcertificatesrequest = targethttpsproxiessetsslcertificatesrequest
72927	return c
72928}
72929
72930// RequestId sets the optional parameter "requestId": An optional
72931// request ID to identify requests. Specify a unique request ID so that
72932// if you must retry your request, the server will know to ignore the
72933// request if it has already been completed.
72934//
72935// For example, consider a situation where you make an initial request
72936// and the request times out. If you make the request again with the
72937// same request ID, the server can check if original operation with the
72938// same request ID was received, and if so, will ignore the second
72939// request. This prevents clients from accidentally creating duplicate
72940// commitments.
72941//
72942// The request ID must be a valid UUID with the exception that zero UUID
72943// is not supported (00000000-0000-0000-0000-000000000000).
72944func (c *TargetHttpsProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetHttpsProxiesSetSslCertificatesCall {
72945	c.urlParams_.Set("requestId", requestId)
72946	return c
72947}
72948
72949// Fields allows partial responses to be retrieved. See
72950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
72951// for more information.
72952func (c *TargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslCertificatesCall {
72953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
72954	return c
72955}
72956
72957// Context sets the context to be used in this call's Do method. Any
72958// pending HTTP request will be aborted if the provided context is
72959// canceled.
72960func (c *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslCertificatesCall {
72961	c.ctx_ = ctx
72962	return c
72963}
72964
72965// Header returns an http.Header that can be modified by the caller to
72966// add HTTP headers to the request.
72967func (c *TargetHttpsProxiesSetSslCertificatesCall) Header() http.Header {
72968	if c.header_ == nil {
72969		c.header_ = make(http.Header)
72970	}
72971	return c.header_
72972}
72973
72974func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) {
72975	reqHeaders := make(http.Header)
72976	for k, v := range c.header_ {
72977		reqHeaders[k] = v
72978	}
72979	reqHeaders.Set("User-Agent", c.s.userAgent())
72980	var body io.Reader = nil
72981	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxiessetsslcertificatesrequest)
72982	if err != nil {
72983		return nil, err
72984	}
72985	reqHeaders.Set("Content-Type", "application/json")
72986	c.urlParams_.Set("alt", alt)
72987	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates")
72988	urls += "?" + c.urlParams_.Encode()
72989	req, _ := http.NewRequest("POST", urls, body)
72990	req.Header = reqHeaders
72991	googleapi.Expand(req.URL, map[string]string{
72992		"project":          c.project,
72993		"targetHttpsProxy": c.targetHttpsProxy,
72994	})
72995	return gensupport.SendRequest(c.ctx_, c.s.client, req)
72996}
72997
72998// Do executes the "compute.targetHttpsProxies.setSslCertificates" call.
72999// Exactly one of *Operation or error will be non-nil. Any non-2xx
73000// status code is an error. Response headers are in either
73001// *Operation.ServerResponse.Header or (if a response was returned at
73002// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
73003// to check whether the returned error was because
73004// http.StatusNotModified was returned.
73005func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
73006	gensupport.SetOptions(c.urlParams_, opts...)
73007	res, err := c.doRequest("json")
73008	if res != nil && res.StatusCode == http.StatusNotModified {
73009		if res.Body != nil {
73010			res.Body.Close()
73011		}
73012		return nil, &googleapi.Error{
73013			Code:   res.StatusCode,
73014			Header: res.Header,
73015		}
73016	}
73017	if err != nil {
73018		return nil, err
73019	}
73020	defer googleapi.CloseBody(res)
73021	if err := googleapi.CheckResponse(res); err != nil {
73022		return nil, err
73023	}
73024	ret := &Operation{
73025		ServerResponse: googleapi.ServerResponse{
73026			Header:         res.Header,
73027			HTTPStatusCode: res.StatusCode,
73028		},
73029	}
73030	target := &ret
73031	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
73032		return nil, err
73033	}
73034	return ret, nil
73035	// {
73036	//   "description": "Replaces SslCertificates for TargetHttpsProxy.",
73037	//   "httpMethod": "POST",
73038	//   "id": "compute.targetHttpsProxies.setSslCertificates",
73039	//   "parameterOrder": [
73040	//     "project",
73041	//     "targetHttpsProxy"
73042	//   ],
73043	//   "parameters": {
73044	//     "project": {
73045	//       "description": "Project ID for this request.",
73046	//       "location": "path",
73047	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
73048	//       "required": true,
73049	//       "type": "string"
73050	//     },
73051	//     "requestId": {
73052	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
73053	//       "location": "query",
73054	//       "type": "string"
73055	//     },
73056	//     "targetHttpsProxy": {
73057	//       "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.",
73058	//       "location": "path",
73059	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
73060	//       "required": true,
73061	//       "type": "string"
73062	//     }
73063	//   },
73064	//   "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates",
73065	//   "request": {
73066	//     "$ref": "TargetHttpsProxiesSetSslCertificatesRequest"
73067	//   },
73068	//   "response": {
73069	//     "$ref": "Operation"
73070	//   },
73071	//   "scopes": [
73072	//     "https://www.googleapis.com/auth/cloud-platform",
73073	//     "https://www.googleapis.com/auth/compute"
73074	//   ]
73075	// }
73076
73077}
73078
73079// method id "compute.targetHttpsProxies.setUrlMap":
73080
73081type TargetHttpsProxiesSetUrlMapCall struct {
73082	s                *Service
73083	project          string
73084	targetHttpsProxy string
73085	urlmapreference  *UrlMapReference
73086	urlParams_       gensupport.URLParams
73087	ctx_             context.Context
73088	header_          http.Header
73089}
73090
73091// SetUrlMap: Changes the URL map for TargetHttpsProxy.
73092func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall {
73093	c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)}
73094	c.project = project
73095	c.targetHttpsProxy = targetHttpsProxy
73096	c.urlmapreference = urlmapreference
73097	return c
73098}
73099
73100// RequestId sets the optional parameter "requestId": An optional
73101// request ID to identify requests. Specify a unique request ID so that
73102// if you must retry your request, the server will know to ignore the
73103// request if it has already been completed.
73104//
73105// For example, consider a situation where you make an initial request
73106// and the request times out. If you make the request again with the
73107// same request ID, the server can check if original operation with the
73108// same request ID was received, and if so, will ignore the second
73109// request. This prevents clients from accidentally creating duplicate
73110// commitments.
73111//
73112// The request ID must be a valid UUID with the exception that zero UUID
73113// is not supported (00000000-0000-0000-0000-000000000000).
73114func (c *TargetHttpsProxiesSetUrlMapCall) RequestId(requestId string) *TargetHttpsProxiesSetUrlMapCall {
73115	c.urlParams_.Set("requestId", requestId)
73116	return c
73117}
73118
73119// Fields allows partial responses to be retrieved. See
73120// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
73121// for more information.
73122func (c *TargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetUrlMapCall {
73123	c.urlParams_.Set("fields", googleapi.CombineFields(s))
73124	return c
73125}
73126
73127// Context sets the context to be used in this call's Do method. Any
73128// pending HTTP request will be aborted if the provided context is
73129// canceled.
73130func (c *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetUrlMapCall {
73131	c.ctx_ = ctx
73132	return c
73133}
73134
73135// Header returns an http.Header that can be modified by the caller to
73136// add HTTP headers to the request.
73137func (c *TargetHttpsProxiesSetUrlMapCall) Header() http.Header {
73138	if c.header_ == nil {
73139		c.header_ = make(http.Header)
73140	}
73141	return c.header_
73142}
73143
73144func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
73145	reqHeaders := make(http.Header)
73146	for k, v := range c.header_ {
73147		reqHeaders[k] = v
73148	}
73149	reqHeaders.Set("User-Agent", c.s.userAgent())
73150	var body io.Reader = nil
73151	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
73152	if err != nil {
73153		return nil, err
73154	}
73155	reqHeaders.Set("Content-Type", "application/json")
73156	c.urlParams_.Set("alt", alt)
73157	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap")
73158	urls += "?" + c.urlParams_.Encode()
73159	req, _ := http.NewRequest("POST", urls, body)
73160	req.Header = reqHeaders
73161	googleapi.Expand(req.URL, map[string]string{
73162		"project":          c.project,
73163		"targetHttpsProxy": c.targetHttpsProxy,
73164	})
73165	return gensupport.SendRequest(c.ctx_, c.s.client, req)
73166}
73167
73168// Do executes the "compute.targetHttpsProxies.setUrlMap" call.
73169// Exactly one of *Operation or error will be non-nil. Any non-2xx
73170// status code is an error. Response headers are in either
73171// *Operation.ServerResponse.Header or (if a response was returned at
73172// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
73173// to check whether the returned error was because
73174// http.StatusNotModified was returned.
73175func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
73176	gensupport.SetOptions(c.urlParams_, opts...)
73177	res, err := c.doRequest("json")
73178	if res != nil && res.StatusCode == http.StatusNotModified {
73179		if res.Body != nil {
73180			res.Body.Close()
73181		}
73182		return nil, &googleapi.Error{
73183			Code:   res.StatusCode,
73184			Header: res.Header,
73185		}
73186	}
73187	if err != nil {
73188		return nil, err
73189	}
73190	defer googleapi.CloseBody(res)
73191	if err := googleapi.CheckResponse(res); err != nil {
73192		return nil, err
73193	}
73194	ret := &Operation{
73195		ServerResponse: googleapi.ServerResponse{
73196			Header:         res.Header,
73197			HTTPStatusCode: res.StatusCode,
73198		},
73199	}
73200	target := &ret
73201	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
73202		return nil, err
73203	}
73204	return ret, nil
73205	// {
73206	//   "description": "Changes the URL map for TargetHttpsProxy.",
73207	//   "httpMethod": "POST",
73208	//   "id": "compute.targetHttpsProxies.setUrlMap",
73209	//   "parameterOrder": [
73210	//     "project",
73211	//     "targetHttpsProxy"
73212	//   ],
73213	//   "parameters": {
73214	//     "project": {
73215	//       "description": "Project ID for this request.",
73216	//       "location": "path",
73217	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
73218	//       "required": true,
73219	//       "type": "string"
73220	//     },
73221	//     "requestId": {
73222	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
73223	//       "location": "query",
73224	//       "type": "string"
73225	//     },
73226	//     "targetHttpsProxy": {
73227	//       "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.",
73228	//       "location": "path",
73229	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
73230	//       "required": true,
73231	//       "type": "string"
73232	//     }
73233	//   },
73234	//   "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap",
73235	//   "request": {
73236	//     "$ref": "UrlMapReference"
73237	//   },
73238	//   "response": {
73239	//     "$ref": "Operation"
73240	//   },
73241	//   "scopes": [
73242	//     "https://www.googleapis.com/auth/cloud-platform",
73243	//     "https://www.googleapis.com/auth/compute"
73244	//   ]
73245	// }
73246
73247}
73248
73249// method id "compute.targetHttpsProxies.testIamPermissions":
73250
73251type TargetHttpsProxiesTestIamPermissionsCall struct {
73252	s                      *Service
73253	project                string
73254	resource               string
73255	testpermissionsrequest *TestPermissionsRequest
73256	urlParams_             gensupport.URLParams
73257	ctx_                   context.Context
73258	header_                http.Header
73259}
73260
73261// TestIamPermissions: Returns permissions that a caller has on the
73262// specified resource.
73263func (r *TargetHttpsProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpsProxiesTestIamPermissionsCall {
73264	c := &TargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
73265	c.project = project
73266	c.resource = resource
73267	c.testpermissionsrequest = testpermissionsrequest
73268	return c
73269}
73270
73271// Fields allows partial responses to be retrieved. See
73272// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
73273// for more information.
73274func (c *TargetHttpsProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesTestIamPermissionsCall {
73275	c.urlParams_.Set("fields", googleapi.CombineFields(s))
73276	return c
73277}
73278
73279// Context sets the context to be used in this call's Do method. Any
73280// pending HTTP request will be aborted if the provided context is
73281// canceled.
73282func (c *TargetHttpsProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpsProxiesTestIamPermissionsCall {
73283	c.ctx_ = ctx
73284	return c
73285}
73286
73287// Header returns an http.Header that can be modified by the caller to
73288// add HTTP headers to the request.
73289func (c *TargetHttpsProxiesTestIamPermissionsCall) Header() http.Header {
73290	if c.header_ == nil {
73291		c.header_ = make(http.Header)
73292	}
73293	return c.header_
73294}
73295
73296func (c *TargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
73297	reqHeaders := make(http.Header)
73298	for k, v := range c.header_ {
73299		reqHeaders[k] = v
73300	}
73301	reqHeaders.Set("User-Agent", c.s.userAgent())
73302	var body io.Reader = nil
73303	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
73304	if err != nil {
73305		return nil, err
73306	}
73307	reqHeaders.Set("Content-Type", "application/json")
73308	c.urlParams_.Set("alt", alt)
73309	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{resource}/testIamPermissions")
73310	urls += "?" + c.urlParams_.Encode()
73311	req, _ := http.NewRequest("POST", urls, body)
73312	req.Header = reqHeaders
73313	googleapi.Expand(req.URL, map[string]string{
73314		"project":  c.project,
73315		"resource": c.resource,
73316	})
73317	return gensupport.SendRequest(c.ctx_, c.s.client, req)
73318}
73319
73320// Do executes the "compute.targetHttpsProxies.testIamPermissions" call.
73321// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
73322// non-2xx status code is an error. Response headers are in either
73323// *TestPermissionsResponse.ServerResponse.Header or (if a response was
73324// returned at all) in error.(*googleapi.Error).Header. Use
73325// googleapi.IsNotModified to check whether the returned error was
73326// because http.StatusNotModified was returned.
73327func (c *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
73328	gensupport.SetOptions(c.urlParams_, opts...)
73329	res, err := c.doRequest("json")
73330	if res != nil && res.StatusCode == http.StatusNotModified {
73331		if res.Body != nil {
73332			res.Body.Close()
73333		}
73334		return nil, &googleapi.Error{
73335			Code:   res.StatusCode,
73336			Header: res.Header,
73337		}
73338	}
73339	if err != nil {
73340		return nil, err
73341	}
73342	defer googleapi.CloseBody(res)
73343	if err := googleapi.CheckResponse(res); err != nil {
73344		return nil, err
73345	}
73346	ret := &TestPermissionsResponse{
73347		ServerResponse: googleapi.ServerResponse{
73348			Header:         res.Header,
73349			HTTPStatusCode: res.StatusCode,
73350		},
73351	}
73352	target := &ret
73353	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
73354		return nil, err
73355	}
73356	return ret, nil
73357	// {
73358	//   "description": "Returns permissions that a caller has on the specified resource.",
73359	//   "httpMethod": "POST",
73360	//   "id": "compute.targetHttpsProxies.testIamPermissions",
73361	//   "parameterOrder": [
73362	//     "project",
73363	//     "resource"
73364	//   ],
73365	//   "parameters": {
73366	//     "project": {
73367	//       "description": "Project ID for this request.",
73368	//       "location": "path",
73369	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
73370	//       "required": true,
73371	//       "type": "string"
73372	//     },
73373	//     "resource": {
73374	//       "description": "Name of the resource for this request.",
73375	//       "location": "path",
73376	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
73377	//       "required": true,
73378	//       "type": "string"
73379	//     }
73380	//   },
73381	//   "path": "{project}/global/targetHttpsProxies/{resource}/testIamPermissions",
73382	//   "request": {
73383	//     "$ref": "TestPermissionsRequest"
73384	//   },
73385	//   "response": {
73386	//     "$ref": "TestPermissionsResponse"
73387	//   },
73388	//   "scopes": [
73389	//     "https://www.googleapis.com/auth/cloud-platform",
73390	//     "https://www.googleapis.com/auth/compute",
73391	//     "https://www.googleapis.com/auth/compute.readonly"
73392	//   ]
73393	// }
73394
73395}
73396
73397// method id "compute.targetInstances.aggregatedList":
73398
73399type TargetInstancesAggregatedListCall struct {
73400	s            *Service
73401	project      string
73402	urlParams_   gensupport.URLParams
73403	ifNoneMatch_ string
73404	ctx_         context.Context
73405	header_      http.Header
73406}
73407
73408// AggregatedList: Retrieves an aggregated list of target instances.
73409// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList
73410func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall {
73411	c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
73412	c.project = project
73413	return c
73414}
73415
73416// Filter sets the optional parameter "filter": Sets a filter
73417// {expression} for filtering listed resources. Your {expression} must
73418// be in the format: field_name comparison_string literal_string.
73419//
73420// The field_name is the name of the field you want to compare. Only
73421// atomic field types are supported (string, number, boolean). The
73422// comparison_string must be either eq (equals) or ne (not equals). The
73423// literal_string is the string value to filter to. The literal value
73424// must be valid for the type of field you are filtering by (string,
73425// number, boolean). For string fields, the literal value is interpreted
73426// as a regular expression using RE2 syntax. The literal value must
73427// match the entire field.
73428//
73429// For example, to filter for instances that do not have a name of
73430// example-instance, you would use name ne example-instance.
73431//
73432// You can filter on nested fields. For example, you could filter on
73433// instances that have set the scheduling.automaticRestart field to
73434// true. Use filtering on nested fields to take advantage of labels to
73435// organize and search for results based on label values.
73436//
73437// To filter on multiple expressions, provide each separate expression
73438// within parentheses. For example, (scheduling.automaticRestart eq
73439// true) (zone eq us-central1-f). Multiple expressions are treated as
73440// AND expressions, meaning that resources must match all expressions to
73441// pass the filters.
73442func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall {
73443	c.urlParams_.Set("filter", filter)
73444	return c
73445}
73446
73447// MaxResults sets the optional parameter "maxResults": The maximum
73448// number of results per page that should be returned. If the number of
73449// available results is larger than maxResults, Compute Engine returns a
73450// nextPageToken that can be used to get the next page of results in
73451// subsequent list requests. Acceptable values are 0 to 500, inclusive.
73452// (Default: 500)
73453func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall {
73454	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
73455	return c
73456}
73457
73458// OrderBy sets the optional parameter "orderBy": Sorts list results by
73459// a certain order. By default, results are returned in alphanumerical
73460// order based on the resource name.
73461//
73462// You can also sort results in descending order based on the creation
73463// timestamp using orderBy="creationTimestamp desc". This sorts results
73464// based on the creationTimestamp field in reverse chronological order
73465// (newest result first). Use this to sort resources like operations so
73466// that the newest operation is returned first.
73467//
73468// Currently, only sorting by name or creationTimestamp desc is
73469// supported.
73470func (c *TargetInstancesAggregatedListCall) OrderBy(orderBy string) *TargetInstancesAggregatedListCall {
73471	c.urlParams_.Set("orderBy", orderBy)
73472	return c
73473}
73474
73475// PageToken sets the optional parameter "pageToken": Specifies a page
73476// token to use. Set pageToken to the nextPageToken returned by a
73477// previous list request to get the next page of results.
73478func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetInstancesAggregatedListCall {
73479	c.urlParams_.Set("pageToken", pageToken)
73480	return c
73481}
73482
73483// Fields allows partial responses to be retrieved. See
73484// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
73485// for more information.
73486func (c *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall {
73487	c.urlParams_.Set("fields", googleapi.CombineFields(s))
73488	return c
73489}
73490
73491// IfNoneMatch sets the optional parameter which makes the operation
73492// fail if the object's ETag matches the given value. This is useful for
73493// getting updates only after the object has changed since the last
73494// request. Use googleapi.IsNotModified to check whether the response
73495// error from Do is the result of In-None-Match.
73496func (c *TargetInstancesAggregatedListCall) IfNoneMatch(entityTag string) *TargetInstancesAggregatedListCall {
73497	c.ifNoneMatch_ = entityTag
73498	return c
73499}
73500
73501// Context sets the context to be used in this call's Do method. Any
73502// pending HTTP request will be aborted if the provided context is
73503// canceled.
73504func (c *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall {
73505	c.ctx_ = ctx
73506	return c
73507}
73508
73509// Header returns an http.Header that can be modified by the caller to
73510// add HTTP headers to the request.
73511func (c *TargetInstancesAggregatedListCall) Header() http.Header {
73512	if c.header_ == nil {
73513		c.header_ = make(http.Header)
73514	}
73515	return c.header_
73516}
73517
73518func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
73519	reqHeaders := make(http.Header)
73520	for k, v := range c.header_ {
73521		reqHeaders[k] = v
73522	}
73523	reqHeaders.Set("User-Agent", c.s.userAgent())
73524	if c.ifNoneMatch_ != "" {
73525		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
73526	}
73527	var body io.Reader = nil
73528	c.urlParams_.Set("alt", alt)
73529	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetInstances")
73530	urls += "?" + c.urlParams_.Encode()
73531	req, _ := http.NewRequest("GET", urls, body)
73532	req.Header = reqHeaders
73533	googleapi.Expand(req.URL, map[string]string{
73534		"project": c.project,
73535	})
73536	return gensupport.SendRequest(c.ctx_, c.s.client, req)
73537}
73538
73539// Do executes the "compute.targetInstances.aggregatedList" call.
73540// Exactly one of *TargetInstanceAggregatedList or error will be
73541// non-nil. Any non-2xx status code is an error. Response headers are in
73542// either *TargetInstanceAggregatedList.ServerResponse.Header or (if a
73543// response was returned at all) in error.(*googleapi.Error).Header. Use
73544// googleapi.IsNotModified to check whether the returned error was
73545// because http.StatusNotModified was returned.
73546func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceAggregatedList, error) {
73547	gensupport.SetOptions(c.urlParams_, opts...)
73548	res, err := c.doRequest("json")
73549	if res != nil && res.StatusCode == http.StatusNotModified {
73550		if res.Body != nil {
73551			res.Body.Close()
73552		}
73553		return nil, &googleapi.Error{
73554			Code:   res.StatusCode,
73555			Header: res.Header,
73556		}
73557	}
73558	if err != nil {
73559		return nil, err
73560	}
73561	defer googleapi.CloseBody(res)
73562	if err := googleapi.CheckResponse(res); err != nil {
73563		return nil, err
73564	}
73565	ret := &TargetInstanceAggregatedList{
73566		ServerResponse: googleapi.ServerResponse{
73567			Header:         res.Header,
73568			HTTPStatusCode: res.StatusCode,
73569		},
73570	}
73571	target := &ret
73572	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
73573		return nil, err
73574	}
73575	return ret, nil
73576	// {
73577	//   "description": "Retrieves an aggregated list of target instances.",
73578	//   "httpMethod": "GET",
73579	//   "id": "compute.targetInstances.aggregatedList",
73580	//   "parameterOrder": [
73581	//     "project"
73582	//   ],
73583	//   "parameters": {
73584	//     "filter": {
73585	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
73586	//       "location": "query",
73587	//       "type": "string"
73588	//     },
73589	//     "maxResults": {
73590	//       "default": "500",
73591	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
73592	//       "format": "uint32",
73593	//       "location": "query",
73594	//       "minimum": "0",
73595	//       "type": "integer"
73596	//     },
73597	//     "orderBy": {
73598	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
73599	//       "location": "query",
73600	//       "type": "string"
73601	//     },
73602	//     "pageToken": {
73603	//       "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.",
73604	//       "location": "query",
73605	//       "type": "string"
73606	//     },
73607	//     "project": {
73608	//       "description": "Project ID for this request.",
73609	//       "location": "path",
73610	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
73611	//       "required": true,
73612	//       "type": "string"
73613	//     }
73614	//   },
73615	//   "path": "{project}/aggregated/targetInstances",
73616	//   "response": {
73617	//     "$ref": "TargetInstanceAggregatedList"
73618	//   },
73619	//   "scopes": [
73620	//     "https://www.googleapis.com/auth/cloud-platform",
73621	//     "https://www.googleapis.com/auth/compute",
73622	//     "https://www.googleapis.com/auth/compute.readonly"
73623	//   ]
73624	// }
73625
73626}
73627
73628// Pages invokes f for each page of results.
73629// A non-nil error returned from f will halt the iteration.
73630// The provided context supersedes any context provided to the Context method.
73631func (c *TargetInstancesAggregatedListCall) Pages(ctx context.Context, f func(*TargetInstanceAggregatedList) error) error {
73632	c.ctx_ = ctx
73633	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
73634	for {
73635		x, err := c.Do()
73636		if err != nil {
73637			return err
73638		}
73639		if err := f(x); err != nil {
73640			return err
73641		}
73642		if x.NextPageToken == "" {
73643			return nil
73644		}
73645		c.PageToken(x.NextPageToken)
73646	}
73647}
73648
73649// method id "compute.targetInstances.delete":
73650
73651type TargetInstancesDeleteCall struct {
73652	s              *Service
73653	project        string
73654	zone           string
73655	targetInstance string
73656	urlParams_     gensupport.URLParams
73657	ctx_           context.Context
73658	header_        http.Header
73659}
73660
73661// Delete: Deletes the specified TargetInstance resource.
73662// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/delete
73663func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall {
73664	c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
73665	c.project = project
73666	c.zone = zone
73667	c.targetInstance = targetInstance
73668	return c
73669}
73670
73671// RequestId sets the optional parameter "requestId": An optional
73672// request ID to identify requests. Specify a unique request ID so that
73673// if you must retry your request, the server will know to ignore the
73674// request if it has already been completed.
73675//
73676// For example, consider a situation where you make an initial request
73677// and the request times out. If you make the request again with the
73678// same request ID, the server can check if original operation with the
73679// same request ID was received, and if so, will ignore the second
73680// request. This prevents clients from accidentally creating duplicate
73681// commitments.
73682//
73683// The request ID must be a valid UUID with the exception that zero UUID
73684// is not supported (00000000-0000-0000-0000-000000000000).
73685func (c *TargetInstancesDeleteCall) RequestId(requestId string) *TargetInstancesDeleteCall {
73686	c.urlParams_.Set("requestId", requestId)
73687	return c
73688}
73689
73690// Fields allows partial responses to be retrieved. See
73691// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
73692// for more information.
73693func (c *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall {
73694	c.urlParams_.Set("fields", googleapi.CombineFields(s))
73695	return c
73696}
73697
73698// Context sets the context to be used in this call's Do method. Any
73699// pending HTTP request will be aborted if the provided context is
73700// canceled.
73701func (c *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall {
73702	c.ctx_ = ctx
73703	return c
73704}
73705
73706// Header returns an http.Header that can be modified by the caller to
73707// add HTTP headers to the request.
73708func (c *TargetInstancesDeleteCall) Header() http.Header {
73709	if c.header_ == nil {
73710		c.header_ = make(http.Header)
73711	}
73712	return c.header_
73713}
73714
73715func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
73716	reqHeaders := make(http.Header)
73717	for k, v := range c.header_ {
73718		reqHeaders[k] = v
73719	}
73720	reqHeaders.Set("User-Agent", c.s.userAgent())
73721	var body io.Reader = nil
73722	c.urlParams_.Set("alt", alt)
73723	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}")
73724	urls += "?" + c.urlParams_.Encode()
73725	req, _ := http.NewRequest("DELETE", urls, body)
73726	req.Header = reqHeaders
73727	googleapi.Expand(req.URL, map[string]string{
73728		"project":        c.project,
73729		"zone":           c.zone,
73730		"targetInstance": c.targetInstance,
73731	})
73732	return gensupport.SendRequest(c.ctx_, c.s.client, req)
73733}
73734
73735// Do executes the "compute.targetInstances.delete" call.
73736// Exactly one of *Operation or error will be non-nil. Any non-2xx
73737// status code is an error. Response headers are in either
73738// *Operation.ServerResponse.Header or (if a response was returned at
73739// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
73740// to check whether the returned error was because
73741// http.StatusNotModified was returned.
73742func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
73743	gensupport.SetOptions(c.urlParams_, opts...)
73744	res, err := c.doRequest("json")
73745	if res != nil && res.StatusCode == http.StatusNotModified {
73746		if res.Body != nil {
73747			res.Body.Close()
73748		}
73749		return nil, &googleapi.Error{
73750			Code:   res.StatusCode,
73751			Header: res.Header,
73752		}
73753	}
73754	if err != nil {
73755		return nil, err
73756	}
73757	defer googleapi.CloseBody(res)
73758	if err := googleapi.CheckResponse(res); err != nil {
73759		return nil, err
73760	}
73761	ret := &Operation{
73762		ServerResponse: googleapi.ServerResponse{
73763			Header:         res.Header,
73764			HTTPStatusCode: res.StatusCode,
73765		},
73766	}
73767	target := &ret
73768	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
73769		return nil, err
73770	}
73771	return ret, nil
73772	// {
73773	//   "description": "Deletes the specified TargetInstance resource.",
73774	//   "httpMethod": "DELETE",
73775	//   "id": "compute.targetInstances.delete",
73776	//   "parameterOrder": [
73777	//     "project",
73778	//     "zone",
73779	//     "targetInstance"
73780	//   ],
73781	//   "parameters": {
73782	//     "project": {
73783	//       "description": "Project ID for this request.",
73784	//       "location": "path",
73785	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
73786	//       "required": true,
73787	//       "type": "string"
73788	//     },
73789	//     "requestId": {
73790	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
73791	//       "location": "query",
73792	//       "type": "string"
73793	//     },
73794	//     "targetInstance": {
73795	//       "description": "Name of the TargetInstance resource to delete.",
73796	//       "location": "path",
73797	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
73798	//       "required": true,
73799	//       "type": "string"
73800	//     },
73801	//     "zone": {
73802	//       "description": "Name of the zone scoping this request.",
73803	//       "location": "path",
73804	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
73805	//       "required": true,
73806	//       "type": "string"
73807	//     }
73808	//   },
73809	//   "path": "{project}/zones/{zone}/targetInstances/{targetInstance}",
73810	//   "response": {
73811	//     "$ref": "Operation"
73812	//   },
73813	//   "scopes": [
73814	//     "https://www.googleapis.com/auth/cloud-platform",
73815	//     "https://www.googleapis.com/auth/compute"
73816	//   ]
73817	// }
73818
73819}
73820
73821// method id "compute.targetInstances.get":
73822
73823type TargetInstancesGetCall struct {
73824	s              *Service
73825	project        string
73826	zone           string
73827	targetInstance string
73828	urlParams_     gensupport.URLParams
73829	ifNoneMatch_   string
73830	ctx_           context.Context
73831	header_        http.Header
73832}
73833
73834// Get: Returns the specified TargetInstance resource. Get a list of
73835// available target instances by making a list() request.
73836// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get
73837func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall {
73838	c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
73839	c.project = project
73840	c.zone = zone
73841	c.targetInstance = targetInstance
73842	return c
73843}
73844
73845// Fields allows partial responses to be retrieved. See
73846// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
73847// for more information.
73848func (c *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall {
73849	c.urlParams_.Set("fields", googleapi.CombineFields(s))
73850	return c
73851}
73852
73853// IfNoneMatch sets the optional parameter which makes the operation
73854// fail if the object's ETag matches the given value. This is useful for
73855// getting updates only after the object has changed since the last
73856// request. Use googleapi.IsNotModified to check whether the response
73857// error from Do is the result of In-None-Match.
73858func (c *TargetInstancesGetCall) IfNoneMatch(entityTag string) *TargetInstancesGetCall {
73859	c.ifNoneMatch_ = entityTag
73860	return c
73861}
73862
73863// Context sets the context to be used in this call's Do method. Any
73864// pending HTTP request will be aborted if the provided context is
73865// canceled.
73866func (c *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall {
73867	c.ctx_ = ctx
73868	return c
73869}
73870
73871// Header returns an http.Header that can be modified by the caller to
73872// add HTTP headers to the request.
73873func (c *TargetInstancesGetCall) Header() http.Header {
73874	if c.header_ == nil {
73875		c.header_ = make(http.Header)
73876	}
73877	return c.header_
73878}
73879
73880func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) {
73881	reqHeaders := make(http.Header)
73882	for k, v := range c.header_ {
73883		reqHeaders[k] = v
73884	}
73885	reqHeaders.Set("User-Agent", c.s.userAgent())
73886	if c.ifNoneMatch_ != "" {
73887		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
73888	}
73889	var body io.Reader = nil
73890	c.urlParams_.Set("alt", alt)
73891	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}")
73892	urls += "?" + c.urlParams_.Encode()
73893	req, _ := http.NewRequest("GET", urls, body)
73894	req.Header = reqHeaders
73895	googleapi.Expand(req.URL, map[string]string{
73896		"project":        c.project,
73897		"zone":           c.zone,
73898		"targetInstance": c.targetInstance,
73899	})
73900	return gensupport.SendRequest(c.ctx_, c.s.client, req)
73901}
73902
73903// Do executes the "compute.targetInstances.get" call.
73904// Exactly one of *TargetInstance or error will be non-nil. Any non-2xx
73905// status code is an error. Response headers are in either
73906// *TargetInstance.ServerResponse.Header or (if a response was returned
73907// at all) in error.(*googleapi.Error).Header. Use
73908// googleapi.IsNotModified to check whether the returned error was
73909// because http.StatusNotModified was returned.
73910func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstance, error) {
73911	gensupport.SetOptions(c.urlParams_, opts...)
73912	res, err := c.doRequest("json")
73913	if res != nil && res.StatusCode == http.StatusNotModified {
73914		if res.Body != nil {
73915			res.Body.Close()
73916		}
73917		return nil, &googleapi.Error{
73918			Code:   res.StatusCode,
73919			Header: res.Header,
73920		}
73921	}
73922	if err != nil {
73923		return nil, err
73924	}
73925	defer googleapi.CloseBody(res)
73926	if err := googleapi.CheckResponse(res); err != nil {
73927		return nil, err
73928	}
73929	ret := &TargetInstance{
73930		ServerResponse: googleapi.ServerResponse{
73931			Header:         res.Header,
73932			HTTPStatusCode: res.StatusCode,
73933		},
73934	}
73935	target := &ret
73936	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
73937		return nil, err
73938	}
73939	return ret, nil
73940	// {
73941	//   "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.",
73942	//   "httpMethod": "GET",
73943	//   "id": "compute.targetInstances.get",
73944	//   "parameterOrder": [
73945	//     "project",
73946	//     "zone",
73947	//     "targetInstance"
73948	//   ],
73949	//   "parameters": {
73950	//     "project": {
73951	//       "description": "Project ID for this request.",
73952	//       "location": "path",
73953	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
73954	//       "required": true,
73955	//       "type": "string"
73956	//     },
73957	//     "targetInstance": {
73958	//       "description": "Name of the TargetInstance resource to return.",
73959	//       "location": "path",
73960	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
73961	//       "required": true,
73962	//       "type": "string"
73963	//     },
73964	//     "zone": {
73965	//       "description": "Name of the zone scoping this request.",
73966	//       "location": "path",
73967	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
73968	//       "required": true,
73969	//       "type": "string"
73970	//     }
73971	//   },
73972	//   "path": "{project}/zones/{zone}/targetInstances/{targetInstance}",
73973	//   "response": {
73974	//     "$ref": "TargetInstance"
73975	//   },
73976	//   "scopes": [
73977	//     "https://www.googleapis.com/auth/cloud-platform",
73978	//     "https://www.googleapis.com/auth/compute",
73979	//     "https://www.googleapis.com/auth/compute.readonly"
73980	//   ]
73981	// }
73982
73983}
73984
73985// method id "compute.targetInstances.insert":
73986
73987type TargetInstancesInsertCall struct {
73988	s              *Service
73989	project        string
73990	zone           string
73991	targetinstance *TargetInstance
73992	urlParams_     gensupport.URLParams
73993	ctx_           context.Context
73994	header_        http.Header
73995}
73996
73997// Insert: Creates a TargetInstance resource in the specified project
73998// and zone using the data included in the request.
73999// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/insert
74000func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall {
74001	c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
74002	c.project = project
74003	c.zone = zone
74004	c.targetinstance = targetinstance
74005	return c
74006}
74007
74008// RequestId sets the optional parameter "requestId": An optional
74009// request ID to identify requests. Specify a unique request ID so that
74010// if you must retry your request, the server will know to ignore the
74011// request if it has already been completed.
74012//
74013// For example, consider a situation where you make an initial request
74014// and the request times out. If you make the request again with the
74015// same request ID, the server can check if original operation with the
74016// same request ID was received, and if so, will ignore the second
74017// request. This prevents clients from accidentally creating duplicate
74018// commitments.
74019//
74020// The request ID must be a valid UUID with the exception that zero UUID
74021// is not supported (00000000-0000-0000-0000-000000000000).
74022func (c *TargetInstancesInsertCall) RequestId(requestId string) *TargetInstancesInsertCall {
74023	c.urlParams_.Set("requestId", requestId)
74024	return c
74025}
74026
74027// Fields allows partial responses to be retrieved. See
74028// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
74029// for more information.
74030func (c *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall {
74031	c.urlParams_.Set("fields", googleapi.CombineFields(s))
74032	return c
74033}
74034
74035// Context sets the context to be used in this call's Do method. Any
74036// pending HTTP request will be aborted if the provided context is
74037// canceled.
74038func (c *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall {
74039	c.ctx_ = ctx
74040	return c
74041}
74042
74043// Header returns an http.Header that can be modified by the caller to
74044// add HTTP headers to the request.
74045func (c *TargetInstancesInsertCall) Header() http.Header {
74046	if c.header_ == nil {
74047		c.header_ = make(http.Header)
74048	}
74049	return c.header_
74050}
74051
74052func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) {
74053	reqHeaders := make(http.Header)
74054	for k, v := range c.header_ {
74055		reqHeaders[k] = v
74056	}
74057	reqHeaders.Set("User-Agent", c.s.userAgent())
74058	var body io.Reader = nil
74059	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance)
74060	if err != nil {
74061		return nil, err
74062	}
74063	reqHeaders.Set("Content-Type", "application/json")
74064	c.urlParams_.Set("alt", alt)
74065	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances")
74066	urls += "?" + c.urlParams_.Encode()
74067	req, _ := http.NewRequest("POST", urls, body)
74068	req.Header = reqHeaders
74069	googleapi.Expand(req.URL, map[string]string{
74070		"project": c.project,
74071		"zone":    c.zone,
74072	})
74073	return gensupport.SendRequest(c.ctx_, c.s.client, req)
74074}
74075
74076// Do executes the "compute.targetInstances.insert" call.
74077// Exactly one of *Operation or error will be non-nil. Any non-2xx
74078// status code is an error. Response headers are in either
74079// *Operation.ServerResponse.Header or (if a response was returned at
74080// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
74081// to check whether the returned error was because
74082// http.StatusNotModified was returned.
74083func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
74084	gensupport.SetOptions(c.urlParams_, opts...)
74085	res, err := c.doRequest("json")
74086	if res != nil && res.StatusCode == http.StatusNotModified {
74087		if res.Body != nil {
74088			res.Body.Close()
74089		}
74090		return nil, &googleapi.Error{
74091			Code:   res.StatusCode,
74092			Header: res.Header,
74093		}
74094	}
74095	if err != nil {
74096		return nil, err
74097	}
74098	defer googleapi.CloseBody(res)
74099	if err := googleapi.CheckResponse(res); err != nil {
74100		return nil, err
74101	}
74102	ret := &Operation{
74103		ServerResponse: googleapi.ServerResponse{
74104			Header:         res.Header,
74105			HTTPStatusCode: res.StatusCode,
74106		},
74107	}
74108	target := &ret
74109	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
74110		return nil, err
74111	}
74112	return ret, nil
74113	// {
74114	//   "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.",
74115	//   "httpMethod": "POST",
74116	//   "id": "compute.targetInstances.insert",
74117	//   "parameterOrder": [
74118	//     "project",
74119	//     "zone"
74120	//   ],
74121	//   "parameters": {
74122	//     "project": {
74123	//       "description": "Project ID for this request.",
74124	//       "location": "path",
74125	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
74126	//       "required": true,
74127	//       "type": "string"
74128	//     },
74129	//     "requestId": {
74130	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
74131	//       "location": "query",
74132	//       "type": "string"
74133	//     },
74134	//     "zone": {
74135	//       "description": "Name of the zone scoping this request.",
74136	//       "location": "path",
74137	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
74138	//       "required": true,
74139	//       "type": "string"
74140	//     }
74141	//   },
74142	//   "path": "{project}/zones/{zone}/targetInstances",
74143	//   "request": {
74144	//     "$ref": "TargetInstance"
74145	//   },
74146	//   "response": {
74147	//     "$ref": "Operation"
74148	//   },
74149	//   "scopes": [
74150	//     "https://www.googleapis.com/auth/cloud-platform",
74151	//     "https://www.googleapis.com/auth/compute"
74152	//   ]
74153	// }
74154
74155}
74156
74157// method id "compute.targetInstances.list":
74158
74159type TargetInstancesListCall struct {
74160	s            *Service
74161	project      string
74162	zone         string
74163	urlParams_   gensupport.URLParams
74164	ifNoneMatch_ string
74165	ctx_         context.Context
74166	header_      http.Header
74167}
74168
74169// List: Retrieves a list of TargetInstance resources available to the
74170// specified project and zone.
74171// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list
74172func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall {
74173	c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
74174	c.project = project
74175	c.zone = zone
74176	return c
74177}
74178
74179// Filter sets the optional parameter "filter": Sets a filter
74180// {expression} for filtering listed resources. Your {expression} must
74181// be in the format: field_name comparison_string literal_string.
74182//
74183// The field_name is the name of the field you want to compare. Only
74184// atomic field types are supported (string, number, boolean). The
74185// comparison_string must be either eq (equals) or ne (not equals). The
74186// literal_string is the string value to filter to. The literal value
74187// must be valid for the type of field you are filtering by (string,
74188// number, boolean). For string fields, the literal value is interpreted
74189// as a regular expression using RE2 syntax. The literal value must
74190// match the entire field.
74191//
74192// For example, to filter for instances that do not have a name of
74193// example-instance, you would use name ne example-instance.
74194//
74195// You can filter on nested fields. For example, you could filter on
74196// instances that have set the scheduling.automaticRestart field to
74197// true. Use filtering on nested fields to take advantage of labels to
74198// organize and search for results based on label values.
74199//
74200// To filter on multiple expressions, provide each separate expression
74201// within parentheses. For example, (scheduling.automaticRestart eq
74202// true) (zone eq us-central1-f). Multiple expressions are treated as
74203// AND expressions, meaning that resources must match all expressions to
74204// pass the filters.
74205func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall {
74206	c.urlParams_.Set("filter", filter)
74207	return c
74208}
74209
74210// MaxResults sets the optional parameter "maxResults": The maximum
74211// number of results per page that should be returned. If the number of
74212// available results is larger than maxResults, Compute Engine returns a
74213// nextPageToken that can be used to get the next page of results in
74214// subsequent list requests. Acceptable values are 0 to 500, inclusive.
74215// (Default: 500)
74216func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall {
74217	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
74218	return c
74219}
74220
74221// OrderBy sets the optional parameter "orderBy": Sorts list results by
74222// a certain order. By default, results are returned in alphanumerical
74223// order based on the resource name.
74224//
74225// You can also sort results in descending order based on the creation
74226// timestamp using orderBy="creationTimestamp desc". This sorts results
74227// based on the creationTimestamp field in reverse chronological order
74228// (newest result first). Use this to sort resources like operations so
74229// that the newest operation is returned first.
74230//
74231// Currently, only sorting by name or creationTimestamp desc is
74232// supported.
74233func (c *TargetInstancesListCall) OrderBy(orderBy string) *TargetInstancesListCall {
74234	c.urlParams_.Set("orderBy", orderBy)
74235	return c
74236}
74237
74238// PageToken sets the optional parameter "pageToken": Specifies a page
74239// token to use. Set pageToken to the nextPageToken returned by a
74240// previous list request to get the next page of results.
74241func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesListCall {
74242	c.urlParams_.Set("pageToken", pageToken)
74243	return c
74244}
74245
74246// Fields allows partial responses to be retrieved. See
74247// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
74248// for more information.
74249func (c *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall {
74250	c.urlParams_.Set("fields", googleapi.CombineFields(s))
74251	return c
74252}
74253
74254// IfNoneMatch sets the optional parameter which makes the operation
74255// fail if the object's ETag matches the given value. This is useful for
74256// getting updates only after the object has changed since the last
74257// request. Use googleapi.IsNotModified to check whether the response
74258// error from Do is the result of In-None-Match.
74259func (c *TargetInstancesListCall) IfNoneMatch(entityTag string) *TargetInstancesListCall {
74260	c.ifNoneMatch_ = entityTag
74261	return c
74262}
74263
74264// Context sets the context to be used in this call's Do method. Any
74265// pending HTTP request will be aborted if the provided context is
74266// canceled.
74267func (c *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall {
74268	c.ctx_ = ctx
74269	return c
74270}
74271
74272// Header returns an http.Header that can be modified by the caller to
74273// add HTTP headers to the request.
74274func (c *TargetInstancesListCall) Header() http.Header {
74275	if c.header_ == nil {
74276		c.header_ = make(http.Header)
74277	}
74278	return c.header_
74279}
74280
74281func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) {
74282	reqHeaders := make(http.Header)
74283	for k, v := range c.header_ {
74284		reqHeaders[k] = v
74285	}
74286	reqHeaders.Set("User-Agent", c.s.userAgent())
74287	if c.ifNoneMatch_ != "" {
74288		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
74289	}
74290	var body io.Reader = nil
74291	c.urlParams_.Set("alt", alt)
74292	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances")
74293	urls += "?" + c.urlParams_.Encode()
74294	req, _ := http.NewRequest("GET", urls, body)
74295	req.Header = reqHeaders
74296	googleapi.Expand(req.URL, map[string]string{
74297		"project": c.project,
74298		"zone":    c.zone,
74299	})
74300	return gensupport.SendRequest(c.ctx_, c.s.client, req)
74301}
74302
74303// Do executes the "compute.targetInstances.list" call.
74304// Exactly one of *TargetInstanceList or error will be non-nil. Any
74305// non-2xx status code is an error. Response headers are in either
74306// *TargetInstanceList.ServerResponse.Header or (if a response was
74307// returned at all) in error.(*googleapi.Error).Header. Use
74308// googleapi.IsNotModified to check whether the returned error was
74309// because http.StatusNotModified was returned.
74310func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceList, error) {
74311	gensupport.SetOptions(c.urlParams_, opts...)
74312	res, err := c.doRequest("json")
74313	if res != nil && res.StatusCode == http.StatusNotModified {
74314		if res.Body != nil {
74315			res.Body.Close()
74316		}
74317		return nil, &googleapi.Error{
74318			Code:   res.StatusCode,
74319			Header: res.Header,
74320		}
74321	}
74322	if err != nil {
74323		return nil, err
74324	}
74325	defer googleapi.CloseBody(res)
74326	if err := googleapi.CheckResponse(res); err != nil {
74327		return nil, err
74328	}
74329	ret := &TargetInstanceList{
74330		ServerResponse: googleapi.ServerResponse{
74331			Header:         res.Header,
74332			HTTPStatusCode: res.StatusCode,
74333		},
74334	}
74335	target := &ret
74336	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
74337		return nil, err
74338	}
74339	return ret, nil
74340	// {
74341	//   "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.",
74342	//   "httpMethod": "GET",
74343	//   "id": "compute.targetInstances.list",
74344	//   "parameterOrder": [
74345	//     "project",
74346	//     "zone"
74347	//   ],
74348	//   "parameters": {
74349	//     "filter": {
74350	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
74351	//       "location": "query",
74352	//       "type": "string"
74353	//     },
74354	//     "maxResults": {
74355	//       "default": "500",
74356	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
74357	//       "format": "uint32",
74358	//       "location": "query",
74359	//       "minimum": "0",
74360	//       "type": "integer"
74361	//     },
74362	//     "orderBy": {
74363	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
74364	//       "location": "query",
74365	//       "type": "string"
74366	//     },
74367	//     "pageToken": {
74368	//       "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.",
74369	//       "location": "query",
74370	//       "type": "string"
74371	//     },
74372	//     "project": {
74373	//       "description": "Project ID for this request.",
74374	//       "location": "path",
74375	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
74376	//       "required": true,
74377	//       "type": "string"
74378	//     },
74379	//     "zone": {
74380	//       "description": "Name of the zone scoping this request.",
74381	//       "location": "path",
74382	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
74383	//       "required": true,
74384	//       "type": "string"
74385	//     }
74386	//   },
74387	//   "path": "{project}/zones/{zone}/targetInstances",
74388	//   "response": {
74389	//     "$ref": "TargetInstanceList"
74390	//   },
74391	//   "scopes": [
74392	//     "https://www.googleapis.com/auth/cloud-platform",
74393	//     "https://www.googleapis.com/auth/compute",
74394	//     "https://www.googleapis.com/auth/compute.readonly"
74395	//   ]
74396	// }
74397
74398}
74399
74400// Pages invokes f for each page of results.
74401// A non-nil error returned from f will halt the iteration.
74402// The provided context supersedes any context provided to the Context method.
74403func (c *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInstanceList) error) error {
74404	c.ctx_ = ctx
74405	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
74406	for {
74407		x, err := c.Do()
74408		if err != nil {
74409			return err
74410		}
74411		if err := f(x); err != nil {
74412			return err
74413		}
74414		if x.NextPageToken == "" {
74415			return nil
74416		}
74417		c.PageToken(x.NextPageToken)
74418	}
74419}
74420
74421// method id "compute.targetInstances.testIamPermissions":
74422
74423type TargetInstancesTestIamPermissionsCall struct {
74424	s                      *Service
74425	project                string
74426	zone                   string
74427	resource               string
74428	testpermissionsrequest *TestPermissionsRequest
74429	urlParams_             gensupport.URLParams
74430	ctx_                   context.Context
74431	header_                http.Header
74432}
74433
74434// TestIamPermissions: Returns permissions that a caller has on the
74435// specified resource.
74436func (r *TargetInstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetInstancesTestIamPermissionsCall {
74437	c := &TargetInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
74438	c.project = project
74439	c.zone = zone
74440	c.resource = resource
74441	c.testpermissionsrequest = testpermissionsrequest
74442	return c
74443}
74444
74445// Fields allows partial responses to be retrieved. See
74446// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
74447// for more information.
74448func (c *TargetInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetInstancesTestIamPermissionsCall {
74449	c.urlParams_.Set("fields", googleapi.CombineFields(s))
74450	return c
74451}
74452
74453// Context sets the context to be used in this call's Do method. Any
74454// pending HTTP request will be aborted if the provided context is
74455// canceled.
74456func (c *TargetInstancesTestIamPermissionsCall) Context(ctx context.Context) *TargetInstancesTestIamPermissionsCall {
74457	c.ctx_ = ctx
74458	return c
74459}
74460
74461// Header returns an http.Header that can be modified by the caller to
74462// add HTTP headers to the request.
74463func (c *TargetInstancesTestIamPermissionsCall) Header() http.Header {
74464	if c.header_ == nil {
74465		c.header_ = make(http.Header)
74466	}
74467	return c.header_
74468}
74469
74470func (c *TargetInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
74471	reqHeaders := make(http.Header)
74472	for k, v := range c.header_ {
74473		reqHeaders[k] = v
74474	}
74475	reqHeaders.Set("User-Agent", c.s.userAgent())
74476	var body io.Reader = nil
74477	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
74478	if err != nil {
74479		return nil, err
74480	}
74481	reqHeaders.Set("Content-Type", "application/json")
74482	c.urlParams_.Set("alt", alt)
74483	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions")
74484	urls += "?" + c.urlParams_.Encode()
74485	req, _ := http.NewRequest("POST", urls, body)
74486	req.Header = reqHeaders
74487	googleapi.Expand(req.URL, map[string]string{
74488		"project":  c.project,
74489		"zone":     c.zone,
74490		"resource": c.resource,
74491	})
74492	return gensupport.SendRequest(c.ctx_, c.s.client, req)
74493}
74494
74495// Do executes the "compute.targetInstances.testIamPermissions" call.
74496// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
74497// non-2xx status code is an error. Response headers are in either
74498// *TestPermissionsResponse.ServerResponse.Header or (if a response was
74499// returned at all) in error.(*googleapi.Error).Header. Use
74500// googleapi.IsNotModified to check whether the returned error was
74501// because http.StatusNotModified was returned.
74502func (c *TargetInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
74503	gensupport.SetOptions(c.urlParams_, opts...)
74504	res, err := c.doRequest("json")
74505	if res != nil && res.StatusCode == http.StatusNotModified {
74506		if res.Body != nil {
74507			res.Body.Close()
74508		}
74509		return nil, &googleapi.Error{
74510			Code:   res.StatusCode,
74511			Header: res.Header,
74512		}
74513	}
74514	if err != nil {
74515		return nil, err
74516	}
74517	defer googleapi.CloseBody(res)
74518	if err := googleapi.CheckResponse(res); err != nil {
74519		return nil, err
74520	}
74521	ret := &TestPermissionsResponse{
74522		ServerResponse: googleapi.ServerResponse{
74523			Header:         res.Header,
74524			HTTPStatusCode: res.StatusCode,
74525		},
74526	}
74527	target := &ret
74528	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
74529		return nil, err
74530	}
74531	return ret, nil
74532	// {
74533	//   "description": "Returns permissions that a caller has on the specified resource.",
74534	//   "httpMethod": "POST",
74535	//   "id": "compute.targetInstances.testIamPermissions",
74536	//   "parameterOrder": [
74537	//     "project",
74538	//     "zone",
74539	//     "resource"
74540	//   ],
74541	//   "parameters": {
74542	//     "project": {
74543	//       "description": "Project ID for this request.",
74544	//       "location": "path",
74545	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
74546	//       "required": true,
74547	//       "type": "string"
74548	//     },
74549	//     "resource": {
74550	//       "description": "Name of the resource for this request.",
74551	//       "location": "path",
74552	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
74553	//       "required": true,
74554	//       "type": "string"
74555	//     },
74556	//     "zone": {
74557	//       "description": "The name of the zone for this request.",
74558	//       "location": "path",
74559	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
74560	//       "required": true,
74561	//       "type": "string"
74562	//     }
74563	//   },
74564	//   "path": "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions",
74565	//   "request": {
74566	//     "$ref": "TestPermissionsRequest"
74567	//   },
74568	//   "response": {
74569	//     "$ref": "TestPermissionsResponse"
74570	//   },
74571	//   "scopes": [
74572	//     "https://www.googleapis.com/auth/cloud-platform",
74573	//     "https://www.googleapis.com/auth/compute",
74574	//     "https://www.googleapis.com/auth/compute.readonly"
74575	//   ]
74576	// }
74577
74578}
74579
74580// method id "compute.targetPools.addHealthCheck":
74581
74582type TargetPoolsAddHealthCheckCall struct {
74583	s                                *Service
74584	project                          string
74585	region                           string
74586	targetPool                       string
74587	targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest
74588	urlParams_                       gensupport.URLParams
74589	ctx_                             context.Context
74590	header_                          http.Header
74591}
74592
74593// AddHealthCheck: Adds health check URLs to a target pool.
74594// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck
74595func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall {
74596	c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
74597	c.project = project
74598	c.region = region
74599	c.targetPool = targetPool
74600	c.targetpoolsaddhealthcheckrequest = targetpoolsaddhealthcheckrequest
74601	return c
74602}
74603
74604// RequestId sets the optional parameter "requestId": An optional
74605// request ID to identify requests. Specify a unique request ID so that
74606// if you must retry your request, the server will know to ignore the
74607// request if it has already been completed.
74608//
74609// For example, consider a situation where you make an initial request
74610// and the request times out. If you make the request again with the
74611// same request ID, the server can check if original operation with the
74612// same request ID was received, and if so, will ignore the second
74613// request. This prevents clients from accidentally creating duplicate
74614// commitments.
74615//
74616// The request ID must be a valid UUID with the exception that zero UUID
74617// is not supported (00000000-0000-0000-0000-000000000000).
74618func (c *TargetPoolsAddHealthCheckCall) RequestId(requestId string) *TargetPoolsAddHealthCheckCall {
74619	c.urlParams_.Set("requestId", requestId)
74620	return c
74621}
74622
74623// Fields allows partial responses to be retrieved. See
74624// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
74625// for more information.
74626func (c *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall {
74627	c.urlParams_.Set("fields", googleapi.CombineFields(s))
74628	return c
74629}
74630
74631// Context sets the context to be used in this call's Do method. Any
74632// pending HTTP request will be aborted if the provided context is
74633// canceled.
74634func (c *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall {
74635	c.ctx_ = ctx
74636	return c
74637}
74638
74639// Header returns an http.Header that can be modified by the caller to
74640// add HTTP headers to the request.
74641func (c *TargetPoolsAddHealthCheckCall) Header() http.Header {
74642	if c.header_ == nil {
74643		c.header_ = make(http.Header)
74644	}
74645	return c.header_
74646}
74647
74648func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) {
74649	reqHeaders := make(http.Header)
74650	for k, v := range c.header_ {
74651		reqHeaders[k] = v
74652	}
74653	reqHeaders.Set("User-Agent", c.s.userAgent())
74654	var body io.Reader = nil
74655	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest)
74656	if err != nil {
74657		return nil, err
74658	}
74659	reqHeaders.Set("Content-Type", "application/json")
74660	c.urlParams_.Set("alt", alt)
74661	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck")
74662	urls += "?" + c.urlParams_.Encode()
74663	req, _ := http.NewRequest("POST", urls, body)
74664	req.Header = reqHeaders
74665	googleapi.Expand(req.URL, map[string]string{
74666		"project":    c.project,
74667		"region":     c.region,
74668		"targetPool": c.targetPool,
74669	})
74670	return gensupport.SendRequest(c.ctx_, c.s.client, req)
74671}
74672
74673// Do executes the "compute.targetPools.addHealthCheck" call.
74674// Exactly one of *Operation or error will be non-nil. Any non-2xx
74675// status code is an error. Response headers are in either
74676// *Operation.ServerResponse.Header or (if a response was returned at
74677// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
74678// to check whether the returned error was because
74679// http.StatusNotModified was returned.
74680func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
74681	gensupport.SetOptions(c.urlParams_, opts...)
74682	res, err := c.doRequest("json")
74683	if res != nil && res.StatusCode == http.StatusNotModified {
74684		if res.Body != nil {
74685			res.Body.Close()
74686		}
74687		return nil, &googleapi.Error{
74688			Code:   res.StatusCode,
74689			Header: res.Header,
74690		}
74691	}
74692	if err != nil {
74693		return nil, err
74694	}
74695	defer googleapi.CloseBody(res)
74696	if err := googleapi.CheckResponse(res); err != nil {
74697		return nil, err
74698	}
74699	ret := &Operation{
74700		ServerResponse: googleapi.ServerResponse{
74701			Header:         res.Header,
74702			HTTPStatusCode: res.StatusCode,
74703		},
74704	}
74705	target := &ret
74706	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
74707		return nil, err
74708	}
74709	return ret, nil
74710	// {
74711	//   "description": "Adds health check URLs to a target pool.",
74712	//   "httpMethod": "POST",
74713	//   "id": "compute.targetPools.addHealthCheck",
74714	//   "parameterOrder": [
74715	//     "project",
74716	//     "region",
74717	//     "targetPool"
74718	//   ],
74719	//   "parameters": {
74720	//     "project": {
74721	//       "description": "Project ID for this request.",
74722	//       "location": "path",
74723	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
74724	//       "required": true,
74725	//       "type": "string"
74726	//     },
74727	//     "region": {
74728	//       "description": "Name of the region scoping this request.",
74729	//       "location": "path",
74730	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
74731	//       "required": true,
74732	//       "type": "string"
74733	//     },
74734	//     "requestId": {
74735	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
74736	//       "location": "query",
74737	//       "type": "string"
74738	//     },
74739	//     "targetPool": {
74740	//       "description": "Name of the target pool to add a health check to.",
74741	//       "location": "path",
74742	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
74743	//       "required": true,
74744	//       "type": "string"
74745	//     }
74746	//   },
74747	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck",
74748	//   "request": {
74749	//     "$ref": "TargetPoolsAddHealthCheckRequest"
74750	//   },
74751	//   "response": {
74752	//     "$ref": "Operation"
74753	//   },
74754	//   "scopes": [
74755	//     "https://www.googleapis.com/auth/cloud-platform",
74756	//     "https://www.googleapis.com/auth/compute"
74757	//   ]
74758	// }
74759
74760}
74761
74762// method id "compute.targetPools.addInstance":
74763
74764type TargetPoolsAddInstanceCall struct {
74765	s                             *Service
74766	project                       string
74767	region                        string
74768	targetPool                    string
74769	targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest
74770	urlParams_                    gensupport.URLParams
74771	ctx_                          context.Context
74772	header_                       http.Header
74773}
74774
74775// AddInstance: Adds an instance to a target pool.
74776// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance
74777func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall {
74778	c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
74779	c.project = project
74780	c.region = region
74781	c.targetPool = targetPool
74782	c.targetpoolsaddinstancerequest = targetpoolsaddinstancerequest
74783	return c
74784}
74785
74786// RequestId sets the optional parameter "requestId": An optional
74787// request ID to identify requests. Specify a unique request ID so that
74788// if you must retry your request, the server will know to ignore the
74789// request if it has already been completed.
74790//
74791// For example, consider a situation where you make an initial request
74792// and the request times out. If you make the request again with the
74793// same request ID, the server can check if original operation with the
74794// same request ID was received, and if so, will ignore the second
74795// request. This prevents clients from accidentally creating duplicate
74796// commitments.
74797//
74798// The request ID must be a valid UUID with the exception that zero UUID
74799// is not supported (00000000-0000-0000-0000-000000000000).
74800func (c *TargetPoolsAddInstanceCall) RequestId(requestId string) *TargetPoolsAddInstanceCall {
74801	c.urlParams_.Set("requestId", requestId)
74802	return c
74803}
74804
74805// Fields allows partial responses to be retrieved. See
74806// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
74807// for more information.
74808func (c *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall {
74809	c.urlParams_.Set("fields", googleapi.CombineFields(s))
74810	return c
74811}
74812
74813// Context sets the context to be used in this call's Do method. Any
74814// pending HTTP request will be aborted if the provided context is
74815// canceled.
74816func (c *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall {
74817	c.ctx_ = ctx
74818	return c
74819}
74820
74821// Header returns an http.Header that can be modified by the caller to
74822// add HTTP headers to the request.
74823func (c *TargetPoolsAddInstanceCall) Header() http.Header {
74824	if c.header_ == nil {
74825		c.header_ = make(http.Header)
74826	}
74827	return c.header_
74828}
74829
74830func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) {
74831	reqHeaders := make(http.Header)
74832	for k, v := range c.header_ {
74833		reqHeaders[k] = v
74834	}
74835	reqHeaders.Set("User-Agent", c.s.userAgent())
74836	var body io.Reader = nil
74837	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest)
74838	if err != nil {
74839		return nil, err
74840	}
74841	reqHeaders.Set("Content-Type", "application/json")
74842	c.urlParams_.Set("alt", alt)
74843	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addInstance")
74844	urls += "?" + c.urlParams_.Encode()
74845	req, _ := http.NewRequest("POST", urls, body)
74846	req.Header = reqHeaders
74847	googleapi.Expand(req.URL, map[string]string{
74848		"project":    c.project,
74849		"region":     c.region,
74850		"targetPool": c.targetPool,
74851	})
74852	return gensupport.SendRequest(c.ctx_, c.s.client, req)
74853}
74854
74855// Do executes the "compute.targetPools.addInstance" call.
74856// Exactly one of *Operation or error will be non-nil. Any non-2xx
74857// status code is an error. Response headers are in either
74858// *Operation.ServerResponse.Header or (if a response was returned at
74859// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
74860// to check whether the returned error was because
74861// http.StatusNotModified was returned.
74862func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
74863	gensupport.SetOptions(c.urlParams_, opts...)
74864	res, err := c.doRequest("json")
74865	if res != nil && res.StatusCode == http.StatusNotModified {
74866		if res.Body != nil {
74867			res.Body.Close()
74868		}
74869		return nil, &googleapi.Error{
74870			Code:   res.StatusCode,
74871			Header: res.Header,
74872		}
74873	}
74874	if err != nil {
74875		return nil, err
74876	}
74877	defer googleapi.CloseBody(res)
74878	if err := googleapi.CheckResponse(res); err != nil {
74879		return nil, err
74880	}
74881	ret := &Operation{
74882		ServerResponse: googleapi.ServerResponse{
74883			Header:         res.Header,
74884			HTTPStatusCode: res.StatusCode,
74885		},
74886	}
74887	target := &ret
74888	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
74889		return nil, err
74890	}
74891	return ret, nil
74892	// {
74893	//   "description": "Adds an instance to a target pool.",
74894	//   "httpMethod": "POST",
74895	//   "id": "compute.targetPools.addInstance",
74896	//   "parameterOrder": [
74897	//     "project",
74898	//     "region",
74899	//     "targetPool"
74900	//   ],
74901	//   "parameters": {
74902	//     "project": {
74903	//       "description": "Project ID for this request.",
74904	//       "location": "path",
74905	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
74906	//       "required": true,
74907	//       "type": "string"
74908	//     },
74909	//     "region": {
74910	//       "description": "Name of the region scoping this request.",
74911	//       "location": "path",
74912	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
74913	//       "required": true,
74914	//       "type": "string"
74915	//     },
74916	//     "requestId": {
74917	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
74918	//       "location": "query",
74919	//       "type": "string"
74920	//     },
74921	//     "targetPool": {
74922	//       "description": "Name of the TargetPool resource to add instances to.",
74923	//       "location": "path",
74924	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
74925	//       "required": true,
74926	//       "type": "string"
74927	//     }
74928	//   },
74929	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance",
74930	//   "request": {
74931	//     "$ref": "TargetPoolsAddInstanceRequest"
74932	//   },
74933	//   "response": {
74934	//     "$ref": "Operation"
74935	//   },
74936	//   "scopes": [
74937	//     "https://www.googleapis.com/auth/cloud-platform",
74938	//     "https://www.googleapis.com/auth/compute"
74939	//   ]
74940	// }
74941
74942}
74943
74944// method id "compute.targetPools.aggregatedList":
74945
74946type TargetPoolsAggregatedListCall struct {
74947	s            *Service
74948	project      string
74949	urlParams_   gensupport.URLParams
74950	ifNoneMatch_ string
74951	ctx_         context.Context
74952	header_      http.Header
74953}
74954
74955// AggregatedList: Retrieves an aggregated list of target pools.
74956// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList
74957func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall {
74958	c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
74959	c.project = project
74960	return c
74961}
74962
74963// Filter sets the optional parameter "filter": Sets a filter
74964// {expression} for filtering listed resources. Your {expression} must
74965// be in the format: field_name comparison_string literal_string.
74966//
74967// The field_name is the name of the field you want to compare. Only
74968// atomic field types are supported (string, number, boolean). The
74969// comparison_string must be either eq (equals) or ne (not equals). The
74970// literal_string is the string value to filter to. The literal value
74971// must be valid for the type of field you are filtering by (string,
74972// number, boolean). For string fields, the literal value is interpreted
74973// as a regular expression using RE2 syntax. The literal value must
74974// match the entire field.
74975//
74976// For example, to filter for instances that do not have a name of
74977// example-instance, you would use name ne example-instance.
74978//
74979// You can filter on nested fields. For example, you could filter on
74980// instances that have set the scheduling.automaticRestart field to
74981// true. Use filtering on nested fields to take advantage of labels to
74982// organize and search for results based on label values.
74983//
74984// To filter on multiple expressions, provide each separate expression
74985// within parentheses. For example, (scheduling.automaticRestart eq
74986// true) (zone eq us-central1-f). Multiple expressions are treated as
74987// AND expressions, meaning that resources must match all expressions to
74988// pass the filters.
74989func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall {
74990	c.urlParams_.Set("filter", filter)
74991	return c
74992}
74993
74994// MaxResults sets the optional parameter "maxResults": The maximum
74995// number of results per page that should be returned. If the number of
74996// available results is larger than maxResults, Compute Engine returns a
74997// nextPageToken that can be used to get the next page of results in
74998// subsequent list requests. Acceptable values are 0 to 500, inclusive.
74999// (Default: 500)
75000func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall {
75001	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
75002	return c
75003}
75004
75005// OrderBy sets the optional parameter "orderBy": Sorts list results by
75006// a certain order. By default, results are returned in alphanumerical
75007// order based on the resource name.
75008//
75009// You can also sort results in descending order based on the creation
75010// timestamp using orderBy="creationTimestamp desc". This sorts results
75011// based on the creationTimestamp field in reverse chronological order
75012// (newest result first). Use this to sort resources like operations so
75013// that the newest operation is returned first.
75014//
75015// Currently, only sorting by name or creationTimestamp desc is
75016// supported.
75017func (c *TargetPoolsAggregatedListCall) OrderBy(orderBy string) *TargetPoolsAggregatedListCall {
75018	c.urlParams_.Set("orderBy", orderBy)
75019	return c
75020}
75021
75022// PageToken sets the optional parameter "pageToken": Specifies a page
75023// token to use. Set pageToken to the nextPageToken returned by a
75024// previous list request to get the next page of results.
75025func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPoolsAggregatedListCall {
75026	c.urlParams_.Set("pageToken", pageToken)
75027	return c
75028}
75029
75030// Fields allows partial responses to be retrieved. See
75031// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
75032// for more information.
75033func (c *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall {
75034	c.urlParams_.Set("fields", googleapi.CombineFields(s))
75035	return c
75036}
75037
75038// IfNoneMatch sets the optional parameter which makes the operation
75039// fail if the object's ETag matches the given value. This is useful for
75040// getting updates only after the object has changed since the last
75041// request. Use googleapi.IsNotModified to check whether the response
75042// error from Do is the result of In-None-Match.
75043func (c *TargetPoolsAggregatedListCall) IfNoneMatch(entityTag string) *TargetPoolsAggregatedListCall {
75044	c.ifNoneMatch_ = entityTag
75045	return c
75046}
75047
75048// Context sets the context to be used in this call's Do method. Any
75049// pending HTTP request will be aborted if the provided context is
75050// canceled.
75051func (c *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall {
75052	c.ctx_ = ctx
75053	return c
75054}
75055
75056// Header returns an http.Header that can be modified by the caller to
75057// add HTTP headers to the request.
75058func (c *TargetPoolsAggregatedListCall) Header() http.Header {
75059	if c.header_ == nil {
75060		c.header_ = make(http.Header)
75061	}
75062	return c.header_
75063}
75064
75065func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
75066	reqHeaders := make(http.Header)
75067	for k, v := range c.header_ {
75068		reqHeaders[k] = v
75069	}
75070	reqHeaders.Set("User-Agent", c.s.userAgent())
75071	if c.ifNoneMatch_ != "" {
75072		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
75073	}
75074	var body io.Reader = nil
75075	c.urlParams_.Set("alt", alt)
75076	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetPools")
75077	urls += "?" + c.urlParams_.Encode()
75078	req, _ := http.NewRequest("GET", urls, body)
75079	req.Header = reqHeaders
75080	googleapi.Expand(req.URL, map[string]string{
75081		"project": c.project,
75082	})
75083	return gensupport.SendRequest(c.ctx_, c.s.client, req)
75084}
75085
75086// Do executes the "compute.targetPools.aggregatedList" call.
75087// Exactly one of *TargetPoolAggregatedList or error will be non-nil.
75088// Any non-2xx status code is an error. Response headers are in either
75089// *TargetPoolAggregatedList.ServerResponse.Header or (if a response was
75090// returned at all) in error.(*googleapi.Error).Header. Use
75091// googleapi.IsNotModified to check whether the returned error was
75092// because http.StatusNotModified was returned.
75093func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetPoolAggregatedList, error) {
75094	gensupport.SetOptions(c.urlParams_, opts...)
75095	res, err := c.doRequest("json")
75096	if res != nil && res.StatusCode == http.StatusNotModified {
75097		if res.Body != nil {
75098			res.Body.Close()
75099		}
75100		return nil, &googleapi.Error{
75101			Code:   res.StatusCode,
75102			Header: res.Header,
75103		}
75104	}
75105	if err != nil {
75106		return nil, err
75107	}
75108	defer googleapi.CloseBody(res)
75109	if err := googleapi.CheckResponse(res); err != nil {
75110		return nil, err
75111	}
75112	ret := &TargetPoolAggregatedList{
75113		ServerResponse: googleapi.ServerResponse{
75114			Header:         res.Header,
75115			HTTPStatusCode: res.StatusCode,
75116		},
75117	}
75118	target := &ret
75119	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
75120		return nil, err
75121	}
75122	return ret, nil
75123	// {
75124	//   "description": "Retrieves an aggregated list of target pools.",
75125	//   "httpMethod": "GET",
75126	//   "id": "compute.targetPools.aggregatedList",
75127	//   "parameterOrder": [
75128	//     "project"
75129	//   ],
75130	//   "parameters": {
75131	//     "filter": {
75132	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
75133	//       "location": "query",
75134	//       "type": "string"
75135	//     },
75136	//     "maxResults": {
75137	//       "default": "500",
75138	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
75139	//       "format": "uint32",
75140	//       "location": "query",
75141	//       "minimum": "0",
75142	//       "type": "integer"
75143	//     },
75144	//     "orderBy": {
75145	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
75146	//       "location": "query",
75147	//       "type": "string"
75148	//     },
75149	//     "pageToken": {
75150	//       "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.",
75151	//       "location": "query",
75152	//       "type": "string"
75153	//     },
75154	//     "project": {
75155	//       "description": "Project ID for this request.",
75156	//       "location": "path",
75157	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
75158	//       "required": true,
75159	//       "type": "string"
75160	//     }
75161	//   },
75162	//   "path": "{project}/aggregated/targetPools",
75163	//   "response": {
75164	//     "$ref": "TargetPoolAggregatedList"
75165	//   },
75166	//   "scopes": [
75167	//     "https://www.googleapis.com/auth/cloud-platform",
75168	//     "https://www.googleapis.com/auth/compute",
75169	//     "https://www.googleapis.com/auth/compute.readonly"
75170	//   ]
75171	// }
75172
75173}
75174
75175// Pages invokes f for each page of results.
75176// A non-nil error returned from f will halt the iteration.
75177// The provided context supersedes any context provided to the Context method.
75178func (c *TargetPoolsAggregatedListCall) Pages(ctx context.Context, f func(*TargetPoolAggregatedList) error) error {
75179	c.ctx_ = ctx
75180	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
75181	for {
75182		x, err := c.Do()
75183		if err != nil {
75184			return err
75185		}
75186		if err := f(x); err != nil {
75187			return err
75188		}
75189		if x.NextPageToken == "" {
75190			return nil
75191		}
75192		c.PageToken(x.NextPageToken)
75193	}
75194}
75195
75196// method id "compute.targetPools.delete":
75197
75198type TargetPoolsDeleteCall struct {
75199	s          *Service
75200	project    string
75201	region     string
75202	targetPool string
75203	urlParams_ gensupport.URLParams
75204	ctx_       context.Context
75205	header_    http.Header
75206}
75207
75208// Delete: Deletes the specified target pool.
75209// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete
75210func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall {
75211	c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
75212	c.project = project
75213	c.region = region
75214	c.targetPool = targetPool
75215	return c
75216}
75217
75218// RequestId sets the optional parameter "requestId": An optional
75219// request ID to identify requests. Specify a unique request ID so that
75220// if you must retry your request, the server will know to ignore the
75221// request if it has already been completed.
75222//
75223// For example, consider a situation where you make an initial request
75224// and the request times out. If you make the request again with the
75225// same request ID, the server can check if original operation with the
75226// same request ID was received, and if so, will ignore the second
75227// request. This prevents clients from accidentally creating duplicate
75228// commitments.
75229//
75230// The request ID must be a valid UUID with the exception that zero UUID
75231// is not supported (00000000-0000-0000-0000-000000000000).
75232func (c *TargetPoolsDeleteCall) RequestId(requestId string) *TargetPoolsDeleteCall {
75233	c.urlParams_.Set("requestId", requestId)
75234	return c
75235}
75236
75237// Fields allows partial responses to be retrieved. See
75238// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
75239// for more information.
75240func (c *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall {
75241	c.urlParams_.Set("fields", googleapi.CombineFields(s))
75242	return c
75243}
75244
75245// Context sets the context to be used in this call's Do method. Any
75246// pending HTTP request will be aborted if the provided context is
75247// canceled.
75248func (c *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall {
75249	c.ctx_ = ctx
75250	return c
75251}
75252
75253// Header returns an http.Header that can be modified by the caller to
75254// add HTTP headers to the request.
75255func (c *TargetPoolsDeleteCall) Header() http.Header {
75256	if c.header_ == nil {
75257		c.header_ = make(http.Header)
75258	}
75259	return c.header_
75260}
75261
75262func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
75263	reqHeaders := make(http.Header)
75264	for k, v := range c.header_ {
75265		reqHeaders[k] = v
75266	}
75267	reqHeaders.Set("User-Agent", c.s.userAgent())
75268	var body io.Reader = nil
75269	c.urlParams_.Set("alt", alt)
75270	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}")
75271	urls += "?" + c.urlParams_.Encode()
75272	req, _ := http.NewRequest("DELETE", urls, body)
75273	req.Header = reqHeaders
75274	googleapi.Expand(req.URL, map[string]string{
75275		"project":    c.project,
75276		"region":     c.region,
75277		"targetPool": c.targetPool,
75278	})
75279	return gensupport.SendRequest(c.ctx_, c.s.client, req)
75280}
75281
75282// Do executes the "compute.targetPools.delete" call.
75283// Exactly one of *Operation or error will be non-nil. Any non-2xx
75284// status code is an error. Response headers are in either
75285// *Operation.ServerResponse.Header or (if a response was returned at
75286// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
75287// to check whether the returned error was because
75288// http.StatusNotModified was returned.
75289func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
75290	gensupport.SetOptions(c.urlParams_, opts...)
75291	res, err := c.doRequest("json")
75292	if res != nil && res.StatusCode == http.StatusNotModified {
75293		if res.Body != nil {
75294			res.Body.Close()
75295		}
75296		return nil, &googleapi.Error{
75297			Code:   res.StatusCode,
75298			Header: res.Header,
75299		}
75300	}
75301	if err != nil {
75302		return nil, err
75303	}
75304	defer googleapi.CloseBody(res)
75305	if err := googleapi.CheckResponse(res); err != nil {
75306		return nil, err
75307	}
75308	ret := &Operation{
75309		ServerResponse: googleapi.ServerResponse{
75310			Header:         res.Header,
75311			HTTPStatusCode: res.StatusCode,
75312		},
75313	}
75314	target := &ret
75315	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
75316		return nil, err
75317	}
75318	return ret, nil
75319	// {
75320	//   "description": "Deletes the specified target pool.",
75321	//   "httpMethod": "DELETE",
75322	//   "id": "compute.targetPools.delete",
75323	//   "parameterOrder": [
75324	//     "project",
75325	//     "region",
75326	//     "targetPool"
75327	//   ],
75328	//   "parameters": {
75329	//     "project": {
75330	//       "description": "Project ID for this request.",
75331	//       "location": "path",
75332	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
75333	//       "required": true,
75334	//       "type": "string"
75335	//     },
75336	//     "region": {
75337	//       "description": "Name of the region scoping this request.",
75338	//       "location": "path",
75339	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
75340	//       "required": true,
75341	//       "type": "string"
75342	//     },
75343	//     "requestId": {
75344	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
75345	//       "location": "query",
75346	//       "type": "string"
75347	//     },
75348	//     "targetPool": {
75349	//       "description": "Name of the TargetPool resource to delete.",
75350	//       "location": "path",
75351	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
75352	//       "required": true,
75353	//       "type": "string"
75354	//     }
75355	//   },
75356	//   "path": "{project}/regions/{region}/targetPools/{targetPool}",
75357	//   "response": {
75358	//     "$ref": "Operation"
75359	//   },
75360	//   "scopes": [
75361	//     "https://www.googleapis.com/auth/cloud-platform",
75362	//     "https://www.googleapis.com/auth/compute"
75363	//   ]
75364	// }
75365
75366}
75367
75368// method id "compute.targetPools.get":
75369
75370type TargetPoolsGetCall struct {
75371	s            *Service
75372	project      string
75373	region       string
75374	targetPool   string
75375	urlParams_   gensupport.URLParams
75376	ifNoneMatch_ string
75377	ctx_         context.Context
75378	header_      http.Header
75379}
75380
75381// Get: Returns the specified target pool. Get a list of available
75382// target pools by making a list() request.
75383// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get
75384func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall {
75385	c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
75386	c.project = project
75387	c.region = region
75388	c.targetPool = targetPool
75389	return c
75390}
75391
75392// Fields allows partial responses to be retrieved. See
75393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
75394// for more information.
75395func (c *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall {
75396	c.urlParams_.Set("fields", googleapi.CombineFields(s))
75397	return c
75398}
75399
75400// IfNoneMatch sets the optional parameter which makes the operation
75401// fail if the object's ETag matches the given value. This is useful for
75402// getting updates only after the object has changed since the last
75403// request. Use googleapi.IsNotModified to check whether the response
75404// error from Do is the result of In-None-Match.
75405func (c *TargetPoolsGetCall) IfNoneMatch(entityTag string) *TargetPoolsGetCall {
75406	c.ifNoneMatch_ = entityTag
75407	return c
75408}
75409
75410// Context sets the context to be used in this call's Do method. Any
75411// pending HTTP request will be aborted if the provided context is
75412// canceled.
75413func (c *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall {
75414	c.ctx_ = ctx
75415	return c
75416}
75417
75418// Header returns an http.Header that can be modified by the caller to
75419// add HTTP headers to the request.
75420func (c *TargetPoolsGetCall) Header() http.Header {
75421	if c.header_ == nil {
75422		c.header_ = make(http.Header)
75423	}
75424	return c.header_
75425}
75426
75427func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) {
75428	reqHeaders := make(http.Header)
75429	for k, v := range c.header_ {
75430		reqHeaders[k] = v
75431	}
75432	reqHeaders.Set("User-Agent", c.s.userAgent())
75433	if c.ifNoneMatch_ != "" {
75434		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
75435	}
75436	var body io.Reader = nil
75437	c.urlParams_.Set("alt", alt)
75438	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}")
75439	urls += "?" + c.urlParams_.Encode()
75440	req, _ := http.NewRequest("GET", urls, body)
75441	req.Header = reqHeaders
75442	googleapi.Expand(req.URL, map[string]string{
75443		"project":    c.project,
75444		"region":     c.region,
75445		"targetPool": c.targetPool,
75446	})
75447	return gensupport.SendRequest(c.ctx_, c.s.client, req)
75448}
75449
75450// Do executes the "compute.targetPools.get" call.
75451// Exactly one of *TargetPool or error will be non-nil. Any non-2xx
75452// status code is an error. Response headers are in either
75453// *TargetPool.ServerResponse.Header or (if a response was returned at
75454// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
75455// to check whether the returned error was because
75456// http.StatusNotModified was returned.
75457func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, error) {
75458	gensupport.SetOptions(c.urlParams_, opts...)
75459	res, err := c.doRequest("json")
75460	if res != nil && res.StatusCode == http.StatusNotModified {
75461		if res.Body != nil {
75462			res.Body.Close()
75463		}
75464		return nil, &googleapi.Error{
75465			Code:   res.StatusCode,
75466			Header: res.Header,
75467		}
75468	}
75469	if err != nil {
75470		return nil, err
75471	}
75472	defer googleapi.CloseBody(res)
75473	if err := googleapi.CheckResponse(res); err != nil {
75474		return nil, err
75475	}
75476	ret := &TargetPool{
75477		ServerResponse: googleapi.ServerResponse{
75478			Header:         res.Header,
75479			HTTPStatusCode: res.StatusCode,
75480		},
75481	}
75482	target := &ret
75483	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
75484		return nil, err
75485	}
75486	return ret, nil
75487	// {
75488	//   "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.",
75489	//   "httpMethod": "GET",
75490	//   "id": "compute.targetPools.get",
75491	//   "parameterOrder": [
75492	//     "project",
75493	//     "region",
75494	//     "targetPool"
75495	//   ],
75496	//   "parameters": {
75497	//     "project": {
75498	//       "description": "Project ID for this request.",
75499	//       "location": "path",
75500	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
75501	//       "required": true,
75502	//       "type": "string"
75503	//     },
75504	//     "region": {
75505	//       "description": "Name of the region scoping this request.",
75506	//       "location": "path",
75507	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
75508	//       "required": true,
75509	//       "type": "string"
75510	//     },
75511	//     "targetPool": {
75512	//       "description": "Name of the TargetPool resource to return.",
75513	//       "location": "path",
75514	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
75515	//       "required": true,
75516	//       "type": "string"
75517	//     }
75518	//   },
75519	//   "path": "{project}/regions/{region}/targetPools/{targetPool}",
75520	//   "response": {
75521	//     "$ref": "TargetPool"
75522	//   },
75523	//   "scopes": [
75524	//     "https://www.googleapis.com/auth/cloud-platform",
75525	//     "https://www.googleapis.com/auth/compute",
75526	//     "https://www.googleapis.com/auth/compute.readonly"
75527	//   ]
75528	// }
75529
75530}
75531
75532// method id "compute.targetPools.getHealth":
75533
75534type TargetPoolsGetHealthCall struct {
75535	s                 *Service
75536	project           string
75537	region            string
75538	targetPool        string
75539	instancereference *InstanceReference
75540	urlParams_        gensupport.URLParams
75541	ctx_              context.Context
75542	header_           http.Header
75543}
75544
75545// GetHealth: Gets the most recent health check results for each IP for
75546// the instance that is referenced by the given target pool.
75547// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth
75548func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall {
75549	c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
75550	c.project = project
75551	c.region = region
75552	c.targetPool = targetPool
75553	c.instancereference = instancereference
75554	return c
75555}
75556
75557// Fields allows partial responses to be retrieved. See
75558// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
75559// for more information.
75560func (c *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall {
75561	c.urlParams_.Set("fields", googleapi.CombineFields(s))
75562	return c
75563}
75564
75565// Context sets the context to be used in this call's Do method. Any
75566// pending HTTP request will be aborted if the provided context is
75567// canceled.
75568func (c *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall {
75569	c.ctx_ = ctx
75570	return c
75571}
75572
75573// Header returns an http.Header that can be modified by the caller to
75574// add HTTP headers to the request.
75575func (c *TargetPoolsGetHealthCall) Header() http.Header {
75576	if c.header_ == nil {
75577		c.header_ = make(http.Header)
75578	}
75579	return c.header_
75580}
75581
75582func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) {
75583	reqHeaders := make(http.Header)
75584	for k, v := range c.header_ {
75585		reqHeaders[k] = v
75586	}
75587	reqHeaders.Set("User-Agent", c.s.userAgent())
75588	var body io.Reader = nil
75589	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference)
75590	if err != nil {
75591		return nil, err
75592	}
75593	reqHeaders.Set("Content-Type", "application/json")
75594	c.urlParams_.Set("alt", alt)
75595	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth")
75596	urls += "?" + c.urlParams_.Encode()
75597	req, _ := http.NewRequest("POST", urls, body)
75598	req.Header = reqHeaders
75599	googleapi.Expand(req.URL, map[string]string{
75600		"project":    c.project,
75601		"region":     c.region,
75602		"targetPool": c.targetPool,
75603	})
75604	return gensupport.SendRequest(c.ctx_, c.s.client, req)
75605}
75606
75607// Do executes the "compute.targetPools.getHealth" call.
75608// Exactly one of *TargetPoolInstanceHealth or error will be non-nil.
75609// Any non-2xx status code is an error. Response headers are in either
75610// *TargetPoolInstanceHealth.ServerResponse.Header or (if a response was
75611// returned at all) in error.(*googleapi.Error).Header. Use
75612// googleapi.IsNotModified to check whether the returned error was
75613// because http.StatusNotModified was returned.
75614func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPoolInstanceHealth, error) {
75615	gensupport.SetOptions(c.urlParams_, opts...)
75616	res, err := c.doRequest("json")
75617	if res != nil && res.StatusCode == http.StatusNotModified {
75618		if res.Body != nil {
75619			res.Body.Close()
75620		}
75621		return nil, &googleapi.Error{
75622			Code:   res.StatusCode,
75623			Header: res.Header,
75624		}
75625	}
75626	if err != nil {
75627		return nil, err
75628	}
75629	defer googleapi.CloseBody(res)
75630	if err := googleapi.CheckResponse(res); err != nil {
75631		return nil, err
75632	}
75633	ret := &TargetPoolInstanceHealth{
75634		ServerResponse: googleapi.ServerResponse{
75635			Header:         res.Header,
75636			HTTPStatusCode: res.StatusCode,
75637		},
75638	}
75639	target := &ret
75640	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
75641		return nil, err
75642	}
75643	return ret, nil
75644	// {
75645	//   "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.",
75646	//   "httpMethod": "POST",
75647	//   "id": "compute.targetPools.getHealth",
75648	//   "parameterOrder": [
75649	//     "project",
75650	//     "region",
75651	//     "targetPool"
75652	//   ],
75653	//   "parameters": {
75654	//     "project": {
75655	//       "description": "Project ID for this request.",
75656	//       "location": "path",
75657	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
75658	//       "required": true,
75659	//       "type": "string"
75660	//     },
75661	//     "region": {
75662	//       "description": "Name of the region scoping this request.",
75663	//       "location": "path",
75664	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
75665	//       "required": true,
75666	//       "type": "string"
75667	//     },
75668	//     "targetPool": {
75669	//       "description": "Name of the TargetPool resource to which the queried instance belongs.",
75670	//       "location": "path",
75671	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
75672	//       "required": true,
75673	//       "type": "string"
75674	//     }
75675	//   },
75676	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth",
75677	//   "request": {
75678	//     "$ref": "InstanceReference"
75679	//   },
75680	//   "response": {
75681	//     "$ref": "TargetPoolInstanceHealth"
75682	//   },
75683	//   "scopes": [
75684	//     "https://www.googleapis.com/auth/cloud-platform",
75685	//     "https://www.googleapis.com/auth/compute",
75686	//     "https://www.googleapis.com/auth/compute.readonly"
75687	//   ]
75688	// }
75689
75690}
75691
75692// method id "compute.targetPools.insert":
75693
75694type TargetPoolsInsertCall struct {
75695	s          *Service
75696	project    string
75697	region     string
75698	targetpool *TargetPool
75699	urlParams_ gensupport.URLParams
75700	ctx_       context.Context
75701	header_    http.Header
75702}
75703
75704// Insert: Creates a target pool in the specified project and region
75705// using the data included in the request.
75706// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert
75707func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall {
75708	c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
75709	c.project = project
75710	c.region = region
75711	c.targetpool = targetpool
75712	return c
75713}
75714
75715// RequestId sets the optional parameter "requestId": An optional
75716// request ID to identify requests. Specify a unique request ID so that
75717// if you must retry your request, the server will know to ignore the
75718// request if it has already been completed.
75719//
75720// For example, consider a situation where you make an initial request
75721// and the request times out. If you make the request again with the
75722// same request ID, the server can check if original operation with the
75723// same request ID was received, and if so, will ignore the second
75724// request. This prevents clients from accidentally creating duplicate
75725// commitments.
75726//
75727// The request ID must be a valid UUID with the exception that zero UUID
75728// is not supported (00000000-0000-0000-0000-000000000000).
75729func (c *TargetPoolsInsertCall) RequestId(requestId string) *TargetPoolsInsertCall {
75730	c.urlParams_.Set("requestId", requestId)
75731	return c
75732}
75733
75734// Fields allows partial responses to be retrieved. See
75735// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
75736// for more information.
75737func (c *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall {
75738	c.urlParams_.Set("fields", googleapi.CombineFields(s))
75739	return c
75740}
75741
75742// Context sets the context to be used in this call's Do method. Any
75743// pending HTTP request will be aborted if the provided context is
75744// canceled.
75745func (c *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall {
75746	c.ctx_ = ctx
75747	return c
75748}
75749
75750// Header returns an http.Header that can be modified by the caller to
75751// add HTTP headers to the request.
75752func (c *TargetPoolsInsertCall) Header() http.Header {
75753	if c.header_ == nil {
75754		c.header_ = make(http.Header)
75755	}
75756	return c.header_
75757}
75758
75759func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) {
75760	reqHeaders := make(http.Header)
75761	for k, v := range c.header_ {
75762		reqHeaders[k] = v
75763	}
75764	reqHeaders.Set("User-Agent", c.s.userAgent())
75765	var body io.Reader = nil
75766	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool)
75767	if err != nil {
75768		return nil, err
75769	}
75770	reqHeaders.Set("Content-Type", "application/json")
75771	c.urlParams_.Set("alt", alt)
75772	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools")
75773	urls += "?" + c.urlParams_.Encode()
75774	req, _ := http.NewRequest("POST", urls, body)
75775	req.Header = reqHeaders
75776	googleapi.Expand(req.URL, map[string]string{
75777		"project": c.project,
75778		"region":  c.region,
75779	})
75780	return gensupport.SendRequest(c.ctx_, c.s.client, req)
75781}
75782
75783// Do executes the "compute.targetPools.insert" call.
75784// Exactly one of *Operation or error will be non-nil. Any non-2xx
75785// status code is an error. Response headers are in either
75786// *Operation.ServerResponse.Header or (if a response was returned at
75787// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
75788// to check whether the returned error was because
75789// http.StatusNotModified was returned.
75790func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
75791	gensupport.SetOptions(c.urlParams_, opts...)
75792	res, err := c.doRequest("json")
75793	if res != nil && res.StatusCode == http.StatusNotModified {
75794		if res.Body != nil {
75795			res.Body.Close()
75796		}
75797		return nil, &googleapi.Error{
75798			Code:   res.StatusCode,
75799			Header: res.Header,
75800		}
75801	}
75802	if err != nil {
75803		return nil, err
75804	}
75805	defer googleapi.CloseBody(res)
75806	if err := googleapi.CheckResponse(res); err != nil {
75807		return nil, err
75808	}
75809	ret := &Operation{
75810		ServerResponse: googleapi.ServerResponse{
75811			Header:         res.Header,
75812			HTTPStatusCode: res.StatusCode,
75813		},
75814	}
75815	target := &ret
75816	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
75817		return nil, err
75818	}
75819	return ret, nil
75820	// {
75821	//   "description": "Creates a target pool in the specified project and region using the data included in the request.",
75822	//   "httpMethod": "POST",
75823	//   "id": "compute.targetPools.insert",
75824	//   "parameterOrder": [
75825	//     "project",
75826	//     "region"
75827	//   ],
75828	//   "parameters": {
75829	//     "project": {
75830	//       "description": "Project ID for this request.",
75831	//       "location": "path",
75832	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
75833	//       "required": true,
75834	//       "type": "string"
75835	//     },
75836	//     "region": {
75837	//       "description": "Name of the region scoping this request.",
75838	//       "location": "path",
75839	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
75840	//       "required": true,
75841	//       "type": "string"
75842	//     },
75843	//     "requestId": {
75844	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
75845	//       "location": "query",
75846	//       "type": "string"
75847	//     }
75848	//   },
75849	//   "path": "{project}/regions/{region}/targetPools",
75850	//   "request": {
75851	//     "$ref": "TargetPool"
75852	//   },
75853	//   "response": {
75854	//     "$ref": "Operation"
75855	//   },
75856	//   "scopes": [
75857	//     "https://www.googleapis.com/auth/cloud-platform",
75858	//     "https://www.googleapis.com/auth/compute"
75859	//   ]
75860	// }
75861
75862}
75863
75864// method id "compute.targetPools.list":
75865
75866type TargetPoolsListCall struct {
75867	s            *Service
75868	project      string
75869	region       string
75870	urlParams_   gensupport.URLParams
75871	ifNoneMatch_ string
75872	ctx_         context.Context
75873	header_      http.Header
75874}
75875
75876// List: Retrieves a list of target pools available to the specified
75877// project and region.
75878// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list
75879func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall {
75880	c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
75881	c.project = project
75882	c.region = region
75883	return c
75884}
75885
75886// Filter sets the optional parameter "filter": Sets a filter
75887// {expression} for filtering listed resources. Your {expression} must
75888// be in the format: field_name comparison_string literal_string.
75889//
75890// The field_name is the name of the field you want to compare. Only
75891// atomic field types are supported (string, number, boolean). The
75892// comparison_string must be either eq (equals) or ne (not equals). The
75893// literal_string is the string value to filter to. The literal value
75894// must be valid for the type of field you are filtering by (string,
75895// number, boolean). For string fields, the literal value is interpreted
75896// as a regular expression using RE2 syntax. The literal value must
75897// match the entire field.
75898//
75899// For example, to filter for instances that do not have a name of
75900// example-instance, you would use name ne example-instance.
75901//
75902// You can filter on nested fields. For example, you could filter on
75903// instances that have set the scheduling.automaticRestart field to
75904// true. Use filtering on nested fields to take advantage of labels to
75905// organize and search for results based on label values.
75906//
75907// To filter on multiple expressions, provide each separate expression
75908// within parentheses. For example, (scheduling.automaticRestart eq
75909// true) (zone eq us-central1-f). Multiple expressions are treated as
75910// AND expressions, meaning that resources must match all expressions to
75911// pass the filters.
75912func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall {
75913	c.urlParams_.Set("filter", filter)
75914	return c
75915}
75916
75917// MaxResults sets the optional parameter "maxResults": The maximum
75918// number of results per page that should be returned. If the number of
75919// available results is larger than maxResults, Compute Engine returns a
75920// nextPageToken that can be used to get the next page of results in
75921// subsequent list requests. Acceptable values are 0 to 500, inclusive.
75922// (Default: 500)
75923func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall {
75924	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
75925	return c
75926}
75927
75928// OrderBy sets the optional parameter "orderBy": Sorts list results by
75929// a certain order. By default, results are returned in alphanumerical
75930// order based on the resource name.
75931//
75932// You can also sort results in descending order based on the creation
75933// timestamp using orderBy="creationTimestamp desc". This sorts results
75934// based on the creationTimestamp field in reverse chronological order
75935// (newest result first). Use this to sort resources like operations so
75936// that the newest operation is returned first.
75937//
75938// Currently, only sorting by name or creationTimestamp desc is
75939// supported.
75940func (c *TargetPoolsListCall) OrderBy(orderBy string) *TargetPoolsListCall {
75941	c.urlParams_.Set("orderBy", orderBy)
75942	return c
75943}
75944
75945// PageToken sets the optional parameter "pageToken": Specifies a page
75946// token to use. Set pageToken to the nextPageToken returned by a
75947// previous list request to get the next page of results.
75948func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall {
75949	c.urlParams_.Set("pageToken", pageToken)
75950	return c
75951}
75952
75953// Fields allows partial responses to be retrieved. See
75954// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
75955// for more information.
75956func (c *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall {
75957	c.urlParams_.Set("fields", googleapi.CombineFields(s))
75958	return c
75959}
75960
75961// IfNoneMatch sets the optional parameter which makes the operation
75962// fail if the object's ETag matches the given value. This is useful for
75963// getting updates only after the object has changed since the last
75964// request. Use googleapi.IsNotModified to check whether the response
75965// error from Do is the result of In-None-Match.
75966func (c *TargetPoolsListCall) IfNoneMatch(entityTag string) *TargetPoolsListCall {
75967	c.ifNoneMatch_ = entityTag
75968	return c
75969}
75970
75971// Context sets the context to be used in this call's Do method. Any
75972// pending HTTP request will be aborted if the provided context is
75973// canceled.
75974func (c *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall {
75975	c.ctx_ = ctx
75976	return c
75977}
75978
75979// Header returns an http.Header that can be modified by the caller to
75980// add HTTP headers to the request.
75981func (c *TargetPoolsListCall) Header() http.Header {
75982	if c.header_ == nil {
75983		c.header_ = make(http.Header)
75984	}
75985	return c.header_
75986}
75987
75988func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) {
75989	reqHeaders := make(http.Header)
75990	for k, v := range c.header_ {
75991		reqHeaders[k] = v
75992	}
75993	reqHeaders.Set("User-Agent", c.s.userAgent())
75994	if c.ifNoneMatch_ != "" {
75995		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
75996	}
75997	var body io.Reader = nil
75998	c.urlParams_.Set("alt", alt)
75999	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools")
76000	urls += "?" + c.urlParams_.Encode()
76001	req, _ := http.NewRequest("GET", urls, body)
76002	req.Header = reqHeaders
76003	googleapi.Expand(req.URL, map[string]string{
76004		"project": c.project,
76005		"region":  c.region,
76006	})
76007	return gensupport.SendRequest(c.ctx_, c.s.client, req)
76008}
76009
76010// Do executes the "compute.targetPools.list" call.
76011// Exactly one of *TargetPoolList or error will be non-nil. Any non-2xx
76012// status code is an error. Response headers are in either
76013// *TargetPoolList.ServerResponse.Header or (if a response was returned
76014// at all) in error.(*googleapi.Error).Header. Use
76015// googleapi.IsNotModified to check whether the returned error was
76016// because http.StatusNotModified was returned.
76017func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, error) {
76018	gensupport.SetOptions(c.urlParams_, opts...)
76019	res, err := c.doRequest("json")
76020	if res != nil && res.StatusCode == http.StatusNotModified {
76021		if res.Body != nil {
76022			res.Body.Close()
76023		}
76024		return nil, &googleapi.Error{
76025			Code:   res.StatusCode,
76026			Header: res.Header,
76027		}
76028	}
76029	if err != nil {
76030		return nil, err
76031	}
76032	defer googleapi.CloseBody(res)
76033	if err := googleapi.CheckResponse(res); err != nil {
76034		return nil, err
76035	}
76036	ret := &TargetPoolList{
76037		ServerResponse: googleapi.ServerResponse{
76038			Header:         res.Header,
76039			HTTPStatusCode: res.StatusCode,
76040		},
76041	}
76042	target := &ret
76043	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
76044		return nil, err
76045	}
76046	return ret, nil
76047	// {
76048	//   "description": "Retrieves a list of target pools available to the specified project and region.",
76049	//   "httpMethod": "GET",
76050	//   "id": "compute.targetPools.list",
76051	//   "parameterOrder": [
76052	//     "project",
76053	//     "region"
76054	//   ],
76055	//   "parameters": {
76056	//     "filter": {
76057	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
76058	//       "location": "query",
76059	//       "type": "string"
76060	//     },
76061	//     "maxResults": {
76062	//       "default": "500",
76063	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
76064	//       "format": "uint32",
76065	//       "location": "query",
76066	//       "minimum": "0",
76067	//       "type": "integer"
76068	//     },
76069	//     "orderBy": {
76070	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
76071	//       "location": "query",
76072	//       "type": "string"
76073	//     },
76074	//     "pageToken": {
76075	//       "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.",
76076	//       "location": "query",
76077	//       "type": "string"
76078	//     },
76079	//     "project": {
76080	//       "description": "Project ID for this request.",
76081	//       "location": "path",
76082	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
76083	//       "required": true,
76084	//       "type": "string"
76085	//     },
76086	//     "region": {
76087	//       "description": "Name of the region scoping this request.",
76088	//       "location": "path",
76089	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76090	//       "required": true,
76091	//       "type": "string"
76092	//     }
76093	//   },
76094	//   "path": "{project}/regions/{region}/targetPools",
76095	//   "response": {
76096	//     "$ref": "TargetPoolList"
76097	//   },
76098	//   "scopes": [
76099	//     "https://www.googleapis.com/auth/cloud-platform",
76100	//     "https://www.googleapis.com/auth/compute",
76101	//     "https://www.googleapis.com/auth/compute.readonly"
76102	//   ]
76103	// }
76104
76105}
76106
76107// Pages invokes f for each page of results.
76108// A non-nil error returned from f will halt the iteration.
76109// The provided context supersedes any context provided to the Context method.
76110func (c *TargetPoolsListCall) Pages(ctx context.Context, f func(*TargetPoolList) error) error {
76111	c.ctx_ = ctx
76112	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
76113	for {
76114		x, err := c.Do()
76115		if err != nil {
76116			return err
76117		}
76118		if err := f(x); err != nil {
76119			return err
76120		}
76121		if x.NextPageToken == "" {
76122			return nil
76123		}
76124		c.PageToken(x.NextPageToken)
76125	}
76126}
76127
76128// method id "compute.targetPools.removeHealthCheck":
76129
76130type TargetPoolsRemoveHealthCheckCall struct {
76131	s                                   *Service
76132	project                             string
76133	region                              string
76134	targetPool                          string
76135	targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest
76136	urlParams_                          gensupport.URLParams
76137	ctx_                                context.Context
76138	header_                             http.Header
76139}
76140
76141// RemoveHealthCheck: Removes health check URL from a target pool.
76142// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck
76143func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall {
76144	c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
76145	c.project = project
76146	c.region = region
76147	c.targetPool = targetPool
76148	c.targetpoolsremovehealthcheckrequest = targetpoolsremovehealthcheckrequest
76149	return c
76150}
76151
76152// RequestId sets the optional parameter "requestId": An optional
76153// request ID to identify requests. Specify a unique request ID so that
76154// if you must retry your request, the server will know to ignore the
76155// request if it has already been completed.
76156//
76157// For example, consider a situation where you make an initial request
76158// and the request times out. If you make the request again with the
76159// same request ID, the server can check if original operation with the
76160// same request ID was received, and if so, will ignore the second
76161// request. This prevents clients from accidentally creating duplicate
76162// commitments.
76163//
76164// The request ID must be a valid UUID with the exception that zero UUID
76165// is not supported (00000000-0000-0000-0000-000000000000).
76166func (c *TargetPoolsRemoveHealthCheckCall) RequestId(requestId string) *TargetPoolsRemoveHealthCheckCall {
76167	c.urlParams_.Set("requestId", requestId)
76168	return c
76169}
76170
76171// Fields allows partial responses to be retrieved. See
76172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
76173// for more information.
76174func (c *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall {
76175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
76176	return c
76177}
76178
76179// Context sets the context to be used in this call's Do method. Any
76180// pending HTTP request will be aborted if the provided context is
76181// canceled.
76182func (c *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall {
76183	c.ctx_ = ctx
76184	return c
76185}
76186
76187// Header returns an http.Header that can be modified by the caller to
76188// add HTTP headers to the request.
76189func (c *TargetPoolsRemoveHealthCheckCall) Header() http.Header {
76190	if c.header_ == nil {
76191		c.header_ = make(http.Header)
76192	}
76193	return c.header_
76194}
76195
76196func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) {
76197	reqHeaders := make(http.Header)
76198	for k, v := range c.header_ {
76199		reqHeaders[k] = v
76200	}
76201	reqHeaders.Set("User-Agent", c.s.userAgent())
76202	var body io.Reader = nil
76203	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest)
76204	if err != nil {
76205		return nil, err
76206	}
76207	reqHeaders.Set("Content-Type", "application/json")
76208	c.urlParams_.Set("alt", alt)
76209	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck")
76210	urls += "?" + c.urlParams_.Encode()
76211	req, _ := http.NewRequest("POST", urls, body)
76212	req.Header = reqHeaders
76213	googleapi.Expand(req.URL, map[string]string{
76214		"project":    c.project,
76215		"region":     c.region,
76216		"targetPool": c.targetPool,
76217	})
76218	return gensupport.SendRequest(c.ctx_, c.s.client, req)
76219}
76220
76221// Do executes the "compute.targetPools.removeHealthCheck" call.
76222// Exactly one of *Operation or error will be non-nil. Any non-2xx
76223// status code is an error. Response headers are in either
76224// *Operation.ServerResponse.Header or (if a response was returned at
76225// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
76226// to check whether the returned error was because
76227// http.StatusNotModified was returned.
76228func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
76229	gensupport.SetOptions(c.urlParams_, opts...)
76230	res, err := c.doRequest("json")
76231	if res != nil && res.StatusCode == http.StatusNotModified {
76232		if res.Body != nil {
76233			res.Body.Close()
76234		}
76235		return nil, &googleapi.Error{
76236			Code:   res.StatusCode,
76237			Header: res.Header,
76238		}
76239	}
76240	if err != nil {
76241		return nil, err
76242	}
76243	defer googleapi.CloseBody(res)
76244	if err := googleapi.CheckResponse(res); err != nil {
76245		return nil, err
76246	}
76247	ret := &Operation{
76248		ServerResponse: googleapi.ServerResponse{
76249			Header:         res.Header,
76250			HTTPStatusCode: res.StatusCode,
76251		},
76252	}
76253	target := &ret
76254	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
76255		return nil, err
76256	}
76257	return ret, nil
76258	// {
76259	//   "description": "Removes health check URL from a target pool.",
76260	//   "httpMethod": "POST",
76261	//   "id": "compute.targetPools.removeHealthCheck",
76262	//   "parameterOrder": [
76263	//     "project",
76264	//     "region",
76265	//     "targetPool"
76266	//   ],
76267	//   "parameters": {
76268	//     "project": {
76269	//       "description": "Project ID for this request.",
76270	//       "location": "path",
76271	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
76272	//       "required": true,
76273	//       "type": "string"
76274	//     },
76275	//     "region": {
76276	//       "description": "Name of the region for this request.",
76277	//       "location": "path",
76278	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76279	//       "required": true,
76280	//       "type": "string"
76281	//     },
76282	//     "requestId": {
76283	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
76284	//       "location": "query",
76285	//       "type": "string"
76286	//     },
76287	//     "targetPool": {
76288	//       "description": "Name of the target pool to remove health checks from.",
76289	//       "location": "path",
76290	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76291	//       "required": true,
76292	//       "type": "string"
76293	//     }
76294	//   },
76295	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck",
76296	//   "request": {
76297	//     "$ref": "TargetPoolsRemoveHealthCheckRequest"
76298	//   },
76299	//   "response": {
76300	//     "$ref": "Operation"
76301	//   },
76302	//   "scopes": [
76303	//     "https://www.googleapis.com/auth/cloud-platform",
76304	//     "https://www.googleapis.com/auth/compute"
76305	//   ]
76306	// }
76307
76308}
76309
76310// method id "compute.targetPools.removeInstance":
76311
76312type TargetPoolsRemoveInstanceCall struct {
76313	s                                *Service
76314	project                          string
76315	region                           string
76316	targetPool                       string
76317	targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest
76318	urlParams_                       gensupport.URLParams
76319	ctx_                             context.Context
76320	header_                          http.Header
76321}
76322
76323// RemoveInstance: Removes instance URL from a target pool.
76324// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance
76325func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall {
76326	c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
76327	c.project = project
76328	c.region = region
76329	c.targetPool = targetPool
76330	c.targetpoolsremoveinstancerequest = targetpoolsremoveinstancerequest
76331	return c
76332}
76333
76334// RequestId sets the optional parameter "requestId": An optional
76335// request ID to identify requests. Specify a unique request ID so that
76336// if you must retry your request, the server will know to ignore the
76337// request if it has already been completed.
76338//
76339// For example, consider a situation where you make an initial request
76340// and the request times out. If you make the request again with the
76341// same request ID, the server can check if original operation with the
76342// same request ID was received, and if so, will ignore the second
76343// request. This prevents clients from accidentally creating duplicate
76344// commitments.
76345//
76346// The request ID must be a valid UUID with the exception that zero UUID
76347// is not supported (00000000-0000-0000-0000-000000000000).
76348func (c *TargetPoolsRemoveInstanceCall) RequestId(requestId string) *TargetPoolsRemoveInstanceCall {
76349	c.urlParams_.Set("requestId", requestId)
76350	return c
76351}
76352
76353// Fields allows partial responses to be retrieved. See
76354// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
76355// for more information.
76356func (c *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall {
76357	c.urlParams_.Set("fields", googleapi.CombineFields(s))
76358	return c
76359}
76360
76361// Context sets the context to be used in this call's Do method. Any
76362// pending HTTP request will be aborted if the provided context is
76363// canceled.
76364func (c *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall {
76365	c.ctx_ = ctx
76366	return c
76367}
76368
76369// Header returns an http.Header that can be modified by the caller to
76370// add HTTP headers to the request.
76371func (c *TargetPoolsRemoveInstanceCall) Header() http.Header {
76372	if c.header_ == nil {
76373		c.header_ = make(http.Header)
76374	}
76375	return c.header_
76376}
76377
76378func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) {
76379	reqHeaders := make(http.Header)
76380	for k, v := range c.header_ {
76381		reqHeaders[k] = v
76382	}
76383	reqHeaders.Set("User-Agent", c.s.userAgent())
76384	var body io.Reader = nil
76385	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest)
76386	if err != nil {
76387		return nil, err
76388	}
76389	reqHeaders.Set("Content-Type", "application/json")
76390	c.urlParams_.Set("alt", alt)
76391	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance")
76392	urls += "?" + c.urlParams_.Encode()
76393	req, _ := http.NewRequest("POST", urls, body)
76394	req.Header = reqHeaders
76395	googleapi.Expand(req.URL, map[string]string{
76396		"project":    c.project,
76397		"region":     c.region,
76398		"targetPool": c.targetPool,
76399	})
76400	return gensupport.SendRequest(c.ctx_, c.s.client, req)
76401}
76402
76403// Do executes the "compute.targetPools.removeInstance" call.
76404// Exactly one of *Operation or error will be non-nil. Any non-2xx
76405// status code is an error. Response headers are in either
76406// *Operation.ServerResponse.Header or (if a response was returned at
76407// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
76408// to check whether the returned error was because
76409// http.StatusNotModified was returned.
76410func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
76411	gensupport.SetOptions(c.urlParams_, opts...)
76412	res, err := c.doRequest("json")
76413	if res != nil && res.StatusCode == http.StatusNotModified {
76414		if res.Body != nil {
76415			res.Body.Close()
76416		}
76417		return nil, &googleapi.Error{
76418			Code:   res.StatusCode,
76419			Header: res.Header,
76420		}
76421	}
76422	if err != nil {
76423		return nil, err
76424	}
76425	defer googleapi.CloseBody(res)
76426	if err := googleapi.CheckResponse(res); err != nil {
76427		return nil, err
76428	}
76429	ret := &Operation{
76430		ServerResponse: googleapi.ServerResponse{
76431			Header:         res.Header,
76432			HTTPStatusCode: res.StatusCode,
76433		},
76434	}
76435	target := &ret
76436	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
76437		return nil, err
76438	}
76439	return ret, nil
76440	// {
76441	//   "description": "Removes instance URL from a target pool.",
76442	//   "httpMethod": "POST",
76443	//   "id": "compute.targetPools.removeInstance",
76444	//   "parameterOrder": [
76445	//     "project",
76446	//     "region",
76447	//     "targetPool"
76448	//   ],
76449	//   "parameters": {
76450	//     "project": {
76451	//       "description": "Project ID for this request.",
76452	//       "location": "path",
76453	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
76454	//       "required": true,
76455	//       "type": "string"
76456	//     },
76457	//     "region": {
76458	//       "description": "Name of the region scoping this request.",
76459	//       "location": "path",
76460	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76461	//       "required": true,
76462	//       "type": "string"
76463	//     },
76464	//     "requestId": {
76465	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
76466	//       "location": "query",
76467	//       "type": "string"
76468	//     },
76469	//     "targetPool": {
76470	//       "description": "Name of the TargetPool resource to remove instances from.",
76471	//       "location": "path",
76472	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76473	//       "required": true,
76474	//       "type": "string"
76475	//     }
76476	//   },
76477	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance",
76478	//   "request": {
76479	//     "$ref": "TargetPoolsRemoveInstanceRequest"
76480	//   },
76481	//   "response": {
76482	//     "$ref": "Operation"
76483	//   },
76484	//   "scopes": [
76485	//     "https://www.googleapis.com/auth/cloud-platform",
76486	//     "https://www.googleapis.com/auth/compute"
76487	//   ]
76488	// }
76489
76490}
76491
76492// method id "compute.targetPools.setBackup":
76493
76494type TargetPoolsSetBackupCall struct {
76495	s               *Service
76496	project         string
76497	region          string
76498	targetPool      string
76499	targetreference *TargetReference
76500	urlParams_      gensupport.URLParams
76501	ctx_            context.Context
76502	header_         http.Header
76503}
76504
76505// SetBackup: Changes a backup target pool's configurations.
76506// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup
76507func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall {
76508	c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
76509	c.project = project
76510	c.region = region
76511	c.targetPool = targetPool
76512	c.targetreference = targetreference
76513	return c
76514}
76515
76516// FailoverRatio sets the optional parameter "failoverRatio": New
76517// failoverRatio value for the target pool.
76518func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall {
76519	c.urlParams_.Set("failoverRatio", fmt.Sprint(failoverRatio))
76520	return c
76521}
76522
76523// RequestId sets the optional parameter "requestId": An optional
76524// request ID to identify requests. Specify a unique request ID so that
76525// if you must retry your request, the server will know to ignore the
76526// request if it has already been completed.
76527//
76528// For example, consider a situation where you make an initial request
76529// and the request times out. If you make the request again with the
76530// same request ID, the server can check if original operation with the
76531// same request ID was received, and if so, will ignore the second
76532// request. This prevents clients from accidentally creating duplicate
76533// commitments.
76534//
76535// The request ID must be a valid UUID with the exception that zero UUID
76536// is not supported (00000000-0000-0000-0000-000000000000).
76537func (c *TargetPoolsSetBackupCall) RequestId(requestId string) *TargetPoolsSetBackupCall {
76538	c.urlParams_.Set("requestId", requestId)
76539	return c
76540}
76541
76542// Fields allows partial responses to be retrieved. See
76543// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
76544// for more information.
76545func (c *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall {
76546	c.urlParams_.Set("fields", googleapi.CombineFields(s))
76547	return c
76548}
76549
76550// Context sets the context to be used in this call's Do method. Any
76551// pending HTTP request will be aborted if the provided context is
76552// canceled.
76553func (c *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall {
76554	c.ctx_ = ctx
76555	return c
76556}
76557
76558// Header returns an http.Header that can be modified by the caller to
76559// add HTTP headers to the request.
76560func (c *TargetPoolsSetBackupCall) Header() http.Header {
76561	if c.header_ == nil {
76562		c.header_ = make(http.Header)
76563	}
76564	return c.header_
76565}
76566
76567func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) {
76568	reqHeaders := make(http.Header)
76569	for k, v := range c.header_ {
76570		reqHeaders[k] = v
76571	}
76572	reqHeaders.Set("User-Agent", c.s.userAgent())
76573	var body io.Reader = nil
76574	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
76575	if err != nil {
76576		return nil, err
76577	}
76578	reqHeaders.Set("Content-Type", "application/json")
76579	c.urlParams_.Set("alt", alt)
76580	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup")
76581	urls += "?" + c.urlParams_.Encode()
76582	req, _ := http.NewRequest("POST", urls, body)
76583	req.Header = reqHeaders
76584	googleapi.Expand(req.URL, map[string]string{
76585		"project":    c.project,
76586		"region":     c.region,
76587		"targetPool": c.targetPool,
76588	})
76589	return gensupport.SendRequest(c.ctx_, c.s.client, req)
76590}
76591
76592// Do executes the "compute.targetPools.setBackup" call.
76593// Exactly one of *Operation or error will be non-nil. Any non-2xx
76594// status code is an error. Response headers are in either
76595// *Operation.ServerResponse.Header or (if a response was returned at
76596// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
76597// to check whether the returned error was because
76598// http.StatusNotModified was returned.
76599func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
76600	gensupport.SetOptions(c.urlParams_, opts...)
76601	res, err := c.doRequest("json")
76602	if res != nil && res.StatusCode == http.StatusNotModified {
76603		if res.Body != nil {
76604			res.Body.Close()
76605		}
76606		return nil, &googleapi.Error{
76607			Code:   res.StatusCode,
76608			Header: res.Header,
76609		}
76610	}
76611	if err != nil {
76612		return nil, err
76613	}
76614	defer googleapi.CloseBody(res)
76615	if err := googleapi.CheckResponse(res); err != nil {
76616		return nil, err
76617	}
76618	ret := &Operation{
76619		ServerResponse: googleapi.ServerResponse{
76620			Header:         res.Header,
76621			HTTPStatusCode: res.StatusCode,
76622		},
76623	}
76624	target := &ret
76625	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
76626		return nil, err
76627	}
76628	return ret, nil
76629	// {
76630	//   "description": "Changes a backup target pool's configurations.",
76631	//   "httpMethod": "POST",
76632	//   "id": "compute.targetPools.setBackup",
76633	//   "parameterOrder": [
76634	//     "project",
76635	//     "region",
76636	//     "targetPool"
76637	//   ],
76638	//   "parameters": {
76639	//     "failoverRatio": {
76640	//       "description": "New failoverRatio value for the target pool.",
76641	//       "format": "float",
76642	//       "location": "query",
76643	//       "type": "number"
76644	//     },
76645	//     "project": {
76646	//       "description": "Project ID for this request.",
76647	//       "location": "path",
76648	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
76649	//       "required": true,
76650	//       "type": "string"
76651	//     },
76652	//     "region": {
76653	//       "description": "Name of the region scoping this request.",
76654	//       "location": "path",
76655	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76656	//       "required": true,
76657	//       "type": "string"
76658	//     },
76659	//     "requestId": {
76660	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
76661	//       "location": "query",
76662	//       "type": "string"
76663	//     },
76664	//     "targetPool": {
76665	//       "description": "Name of the TargetPool resource to set a backup pool for.",
76666	//       "location": "path",
76667	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76668	//       "required": true,
76669	//       "type": "string"
76670	//     }
76671	//   },
76672	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup",
76673	//   "request": {
76674	//     "$ref": "TargetReference"
76675	//   },
76676	//   "response": {
76677	//     "$ref": "Operation"
76678	//   },
76679	//   "scopes": [
76680	//     "https://www.googleapis.com/auth/cloud-platform",
76681	//     "https://www.googleapis.com/auth/compute"
76682	//   ]
76683	// }
76684
76685}
76686
76687// method id "compute.targetPools.testIamPermissions":
76688
76689type TargetPoolsTestIamPermissionsCall struct {
76690	s                      *Service
76691	project                string
76692	region                 string
76693	resource               string
76694	testpermissionsrequest *TestPermissionsRequest
76695	urlParams_             gensupport.URLParams
76696	ctx_                   context.Context
76697	header_                http.Header
76698}
76699
76700// TestIamPermissions: Returns permissions that a caller has on the
76701// specified resource.
76702func (r *TargetPoolsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetPoolsTestIamPermissionsCall {
76703	c := &TargetPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
76704	c.project = project
76705	c.region = region
76706	c.resource = resource
76707	c.testpermissionsrequest = testpermissionsrequest
76708	return c
76709}
76710
76711// Fields allows partial responses to be retrieved. See
76712// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
76713// for more information.
76714func (c *TargetPoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetPoolsTestIamPermissionsCall {
76715	c.urlParams_.Set("fields", googleapi.CombineFields(s))
76716	return c
76717}
76718
76719// Context sets the context to be used in this call's Do method. Any
76720// pending HTTP request will be aborted if the provided context is
76721// canceled.
76722func (c *TargetPoolsTestIamPermissionsCall) Context(ctx context.Context) *TargetPoolsTestIamPermissionsCall {
76723	c.ctx_ = ctx
76724	return c
76725}
76726
76727// Header returns an http.Header that can be modified by the caller to
76728// add HTTP headers to the request.
76729func (c *TargetPoolsTestIamPermissionsCall) Header() http.Header {
76730	if c.header_ == nil {
76731		c.header_ = make(http.Header)
76732	}
76733	return c.header_
76734}
76735
76736func (c *TargetPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
76737	reqHeaders := make(http.Header)
76738	for k, v := range c.header_ {
76739		reqHeaders[k] = v
76740	}
76741	reqHeaders.Set("User-Agent", c.s.userAgent())
76742	var body io.Reader = nil
76743	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
76744	if err != nil {
76745		return nil, err
76746	}
76747	reqHeaders.Set("Content-Type", "application/json")
76748	c.urlParams_.Set("alt", alt)
76749	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{resource}/testIamPermissions")
76750	urls += "?" + c.urlParams_.Encode()
76751	req, _ := http.NewRequest("POST", urls, body)
76752	req.Header = reqHeaders
76753	googleapi.Expand(req.URL, map[string]string{
76754		"project":  c.project,
76755		"region":   c.region,
76756		"resource": c.resource,
76757	})
76758	return gensupport.SendRequest(c.ctx_, c.s.client, req)
76759}
76760
76761// Do executes the "compute.targetPools.testIamPermissions" call.
76762// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
76763// non-2xx status code is an error. Response headers are in either
76764// *TestPermissionsResponse.ServerResponse.Header or (if a response was
76765// returned at all) in error.(*googleapi.Error).Header. Use
76766// googleapi.IsNotModified to check whether the returned error was
76767// because http.StatusNotModified was returned.
76768func (c *TargetPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
76769	gensupport.SetOptions(c.urlParams_, opts...)
76770	res, err := c.doRequest("json")
76771	if res != nil && res.StatusCode == http.StatusNotModified {
76772		if res.Body != nil {
76773			res.Body.Close()
76774		}
76775		return nil, &googleapi.Error{
76776			Code:   res.StatusCode,
76777			Header: res.Header,
76778		}
76779	}
76780	if err != nil {
76781		return nil, err
76782	}
76783	defer googleapi.CloseBody(res)
76784	if err := googleapi.CheckResponse(res); err != nil {
76785		return nil, err
76786	}
76787	ret := &TestPermissionsResponse{
76788		ServerResponse: googleapi.ServerResponse{
76789			Header:         res.Header,
76790			HTTPStatusCode: res.StatusCode,
76791		},
76792	}
76793	target := &ret
76794	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
76795		return nil, err
76796	}
76797	return ret, nil
76798	// {
76799	//   "description": "Returns permissions that a caller has on the specified resource.",
76800	//   "httpMethod": "POST",
76801	//   "id": "compute.targetPools.testIamPermissions",
76802	//   "parameterOrder": [
76803	//     "project",
76804	//     "region",
76805	//     "resource"
76806	//   ],
76807	//   "parameters": {
76808	//     "project": {
76809	//       "description": "Project ID for this request.",
76810	//       "location": "path",
76811	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
76812	//       "required": true,
76813	//       "type": "string"
76814	//     },
76815	//     "region": {
76816	//       "description": "The name of the region for this request.",
76817	//       "location": "path",
76818	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76819	//       "required": true,
76820	//       "type": "string"
76821	//     },
76822	//     "resource": {
76823	//       "description": "Name of the resource for this request.",
76824	//       "location": "path",
76825	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76826	//       "required": true,
76827	//       "type": "string"
76828	//     }
76829	//   },
76830	//   "path": "{project}/regions/{region}/targetPools/{resource}/testIamPermissions",
76831	//   "request": {
76832	//     "$ref": "TestPermissionsRequest"
76833	//   },
76834	//   "response": {
76835	//     "$ref": "TestPermissionsResponse"
76836	//   },
76837	//   "scopes": [
76838	//     "https://www.googleapis.com/auth/cloud-platform",
76839	//     "https://www.googleapis.com/auth/compute",
76840	//     "https://www.googleapis.com/auth/compute.readonly"
76841	//   ]
76842	// }
76843
76844}
76845
76846// method id "compute.targetSslProxies.delete":
76847
76848type TargetSslProxiesDeleteCall struct {
76849	s              *Service
76850	project        string
76851	targetSslProxy string
76852	urlParams_     gensupport.URLParams
76853	ctx_           context.Context
76854	header_        http.Header
76855}
76856
76857// Delete: Deletes the specified TargetSslProxy resource.
76858func (r *TargetSslProxiesService) Delete(project string, targetSslProxy string) *TargetSslProxiesDeleteCall {
76859	c := &TargetSslProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
76860	c.project = project
76861	c.targetSslProxy = targetSslProxy
76862	return c
76863}
76864
76865// RequestId sets the optional parameter "requestId": An optional
76866// request ID to identify requests. Specify a unique request ID so that
76867// if you must retry your request, the server will know to ignore the
76868// request if it has already been completed.
76869//
76870// For example, consider a situation where you make an initial request
76871// and the request times out. If you make the request again with the
76872// same request ID, the server can check if original operation with the
76873// same request ID was received, and if so, will ignore the second
76874// request. This prevents clients from accidentally creating duplicate
76875// commitments.
76876//
76877// The request ID must be a valid UUID with the exception that zero UUID
76878// is not supported (00000000-0000-0000-0000-000000000000).
76879func (c *TargetSslProxiesDeleteCall) RequestId(requestId string) *TargetSslProxiesDeleteCall {
76880	c.urlParams_.Set("requestId", requestId)
76881	return c
76882}
76883
76884// Fields allows partial responses to be retrieved. See
76885// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
76886// for more information.
76887func (c *TargetSslProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetSslProxiesDeleteCall {
76888	c.urlParams_.Set("fields", googleapi.CombineFields(s))
76889	return c
76890}
76891
76892// Context sets the context to be used in this call's Do method. Any
76893// pending HTTP request will be aborted if the provided context is
76894// canceled.
76895func (c *TargetSslProxiesDeleteCall) Context(ctx context.Context) *TargetSslProxiesDeleteCall {
76896	c.ctx_ = ctx
76897	return c
76898}
76899
76900// Header returns an http.Header that can be modified by the caller to
76901// add HTTP headers to the request.
76902func (c *TargetSslProxiesDeleteCall) Header() http.Header {
76903	if c.header_ == nil {
76904		c.header_ = make(http.Header)
76905	}
76906	return c.header_
76907}
76908
76909func (c *TargetSslProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
76910	reqHeaders := make(http.Header)
76911	for k, v := range c.header_ {
76912		reqHeaders[k] = v
76913	}
76914	reqHeaders.Set("User-Agent", c.s.userAgent())
76915	var body io.Reader = nil
76916	c.urlParams_.Set("alt", alt)
76917	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}")
76918	urls += "?" + c.urlParams_.Encode()
76919	req, _ := http.NewRequest("DELETE", urls, body)
76920	req.Header = reqHeaders
76921	googleapi.Expand(req.URL, map[string]string{
76922		"project":        c.project,
76923		"targetSslProxy": c.targetSslProxy,
76924	})
76925	return gensupport.SendRequest(c.ctx_, c.s.client, req)
76926}
76927
76928// Do executes the "compute.targetSslProxies.delete" call.
76929// Exactly one of *Operation or error will be non-nil. Any non-2xx
76930// status code is an error. Response headers are in either
76931// *Operation.ServerResponse.Header or (if a response was returned at
76932// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
76933// to check whether the returned error was because
76934// http.StatusNotModified was returned.
76935func (c *TargetSslProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
76936	gensupport.SetOptions(c.urlParams_, opts...)
76937	res, err := c.doRequest("json")
76938	if res != nil && res.StatusCode == http.StatusNotModified {
76939		if res.Body != nil {
76940			res.Body.Close()
76941		}
76942		return nil, &googleapi.Error{
76943			Code:   res.StatusCode,
76944			Header: res.Header,
76945		}
76946	}
76947	if err != nil {
76948		return nil, err
76949	}
76950	defer googleapi.CloseBody(res)
76951	if err := googleapi.CheckResponse(res); err != nil {
76952		return nil, err
76953	}
76954	ret := &Operation{
76955		ServerResponse: googleapi.ServerResponse{
76956			Header:         res.Header,
76957			HTTPStatusCode: res.StatusCode,
76958		},
76959	}
76960	target := &ret
76961	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
76962		return nil, err
76963	}
76964	return ret, nil
76965	// {
76966	//   "description": "Deletes the specified TargetSslProxy resource.",
76967	//   "httpMethod": "DELETE",
76968	//   "id": "compute.targetSslProxies.delete",
76969	//   "parameterOrder": [
76970	//     "project",
76971	//     "targetSslProxy"
76972	//   ],
76973	//   "parameters": {
76974	//     "project": {
76975	//       "description": "Project ID for this request.",
76976	//       "location": "path",
76977	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
76978	//       "required": true,
76979	//       "type": "string"
76980	//     },
76981	//     "requestId": {
76982	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
76983	//       "location": "query",
76984	//       "type": "string"
76985	//     },
76986	//     "targetSslProxy": {
76987	//       "description": "Name of the TargetSslProxy resource to delete.",
76988	//       "location": "path",
76989	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
76990	//       "required": true,
76991	//       "type": "string"
76992	//     }
76993	//   },
76994	//   "path": "{project}/global/targetSslProxies/{targetSslProxy}",
76995	//   "response": {
76996	//     "$ref": "Operation"
76997	//   },
76998	//   "scopes": [
76999	//     "https://www.googleapis.com/auth/cloud-platform",
77000	//     "https://www.googleapis.com/auth/compute"
77001	//   ]
77002	// }
77003
77004}
77005
77006// method id "compute.targetSslProxies.get":
77007
77008type TargetSslProxiesGetCall struct {
77009	s              *Service
77010	project        string
77011	targetSslProxy string
77012	urlParams_     gensupport.URLParams
77013	ifNoneMatch_   string
77014	ctx_           context.Context
77015	header_        http.Header
77016}
77017
77018// Get: Returns the specified TargetSslProxy resource. Get a list of
77019// available target SSL proxies by making a list() request.
77020func (r *TargetSslProxiesService) Get(project string, targetSslProxy string) *TargetSslProxiesGetCall {
77021	c := &TargetSslProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
77022	c.project = project
77023	c.targetSslProxy = targetSslProxy
77024	return c
77025}
77026
77027// Fields allows partial responses to be retrieved. See
77028// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
77029// for more information.
77030func (c *TargetSslProxiesGetCall) Fields(s ...googleapi.Field) *TargetSslProxiesGetCall {
77031	c.urlParams_.Set("fields", googleapi.CombineFields(s))
77032	return c
77033}
77034
77035// IfNoneMatch sets the optional parameter which makes the operation
77036// fail if the object's ETag matches the given value. This is useful for
77037// getting updates only after the object has changed since the last
77038// request. Use googleapi.IsNotModified to check whether the response
77039// error from Do is the result of In-None-Match.
77040func (c *TargetSslProxiesGetCall) IfNoneMatch(entityTag string) *TargetSslProxiesGetCall {
77041	c.ifNoneMatch_ = entityTag
77042	return c
77043}
77044
77045// Context sets the context to be used in this call's Do method. Any
77046// pending HTTP request will be aborted if the provided context is
77047// canceled.
77048func (c *TargetSslProxiesGetCall) Context(ctx context.Context) *TargetSslProxiesGetCall {
77049	c.ctx_ = ctx
77050	return c
77051}
77052
77053// Header returns an http.Header that can be modified by the caller to
77054// add HTTP headers to the request.
77055func (c *TargetSslProxiesGetCall) Header() http.Header {
77056	if c.header_ == nil {
77057		c.header_ = make(http.Header)
77058	}
77059	return c.header_
77060}
77061
77062func (c *TargetSslProxiesGetCall) doRequest(alt string) (*http.Response, error) {
77063	reqHeaders := make(http.Header)
77064	for k, v := range c.header_ {
77065		reqHeaders[k] = v
77066	}
77067	reqHeaders.Set("User-Agent", c.s.userAgent())
77068	if c.ifNoneMatch_ != "" {
77069		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
77070	}
77071	var body io.Reader = nil
77072	c.urlParams_.Set("alt", alt)
77073	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}")
77074	urls += "?" + c.urlParams_.Encode()
77075	req, _ := http.NewRequest("GET", urls, body)
77076	req.Header = reqHeaders
77077	googleapi.Expand(req.URL, map[string]string{
77078		"project":        c.project,
77079		"targetSslProxy": c.targetSslProxy,
77080	})
77081	return gensupport.SendRequest(c.ctx_, c.s.client, req)
77082}
77083
77084// Do executes the "compute.targetSslProxies.get" call.
77085// Exactly one of *TargetSslProxy or error will be non-nil. Any non-2xx
77086// status code is an error. Response headers are in either
77087// *TargetSslProxy.ServerResponse.Header or (if a response was returned
77088// at all) in error.(*googleapi.Error).Header. Use
77089// googleapi.IsNotModified to check whether the returned error was
77090// because http.StatusNotModified was returned.
77091func (c *TargetSslProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetSslProxy, error) {
77092	gensupport.SetOptions(c.urlParams_, opts...)
77093	res, err := c.doRequest("json")
77094	if res != nil && res.StatusCode == http.StatusNotModified {
77095		if res.Body != nil {
77096			res.Body.Close()
77097		}
77098		return nil, &googleapi.Error{
77099			Code:   res.StatusCode,
77100			Header: res.Header,
77101		}
77102	}
77103	if err != nil {
77104		return nil, err
77105	}
77106	defer googleapi.CloseBody(res)
77107	if err := googleapi.CheckResponse(res); err != nil {
77108		return nil, err
77109	}
77110	ret := &TargetSslProxy{
77111		ServerResponse: googleapi.ServerResponse{
77112			Header:         res.Header,
77113			HTTPStatusCode: res.StatusCode,
77114		},
77115	}
77116	target := &ret
77117	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
77118		return nil, err
77119	}
77120	return ret, nil
77121	// {
77122	//   "description": "Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request.",
77123	//   "httpMethod": "GET",
77124	//   "id": "compute.targetSslProxies.get",
77125	//   "parameterOrder": [
77126	//     "project",
77127	//     "targetSslProxy"
77128	//   ],
77129	//   "parameters": {
77130	//     "project": {
77131	//       "description": "Project ID for this request.",
77132	//       "location": "path",
77133	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
77134	//       "required": true,
77135	//       "type": "string"
77136	//     },
77137	//     "targetSslProxy": {
77138	//       "description": "Name of the TargetSslProxy resource to return.",
77139	//       "location": "path",
77140	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
77141	//       "required": true,
77142	//       "type": "string"
77143	//     }
77144	//   },
77145	//   "path": "{project}/global/targetSslProxies/{targetSslProxy}",
77146	//   "response": {
77147	//     "$ref": "TargetSslProxy"
77148	//   },
77149	//   "scopes": [
77150	//     "https://www.googleapis.com/auth/cloud-platform",
77151	//     "https://www.googleapis.com/auth/compute",
77152	//     "https://www.googleapis.com/auth/compute.readonly"
77153	//   ]
77154	// }
77155
77156}
77157
77158// method id "compute.targetSslProxies.insert":
77159
77160type TargetSslProxiesInsertCall struct {
77161	s              *Service
77162	project        string
77163	targetsslproxy *TargetSslProxy
77164	urlParams_     gensupport.URLParams
77165	ctx_           context.Context
77166	header_        http.Header
77167}
77168
77169// Insert: Creates a TargetSslProxy resource in the specified project
77170// using the data included in the request.
77171func (r *TargetSslProxiesService) Insert(project string, targetsslproxy *TargetSslProxy) *TargetSslProxiesInsertCall {
77172	c := &TargetSslProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
77173	c.project = project
77174	c.targetsslproxy = targetsslproxy
77175	return c
77176}
77177
77178// RequestId sets the optional parameter "requestId": An optional
77179// request ID to identify requests. Specify a unique request ID so that
77180// if you must retry your request, the server will know to ignore the
77181// request if it has already been completed.
77182//
77183// For example, consider a situation where you make an initial request
77184// and the request times out. If you make the request again with the
77185// same request ID, the server can check if original operation with the
77186// same request ID was received, and if so, will ignore the second
77187// request. This prevents clients from accidentally creating duplicate
77188// commitments.
77189//
77190// The request ID must be a valid UUID with the exception that zero UUID
77191// is not supported (00000000-0000-0000-0000-000000000000).
77192func (c *TargetSslProxiesInsertCall) RequestId(requestId string) *TargetSslProxiesInsertCall {
77193	c.urlParams_.Set("requestId", requestId)
77194	return c
77195}
77196
77197// Fields allows partial responses to be retrieved. See
77198// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
77199// for more information.
77200func (c *TargetSslProxiesInsertCall) Fields(s ...googleapi.Field) *TargetSslProxiesInsertCall {
77201	c.urlParams_.Set("fields", googleapi.CombineFields(s))
77202	return c
77203}
77204
77205// Context sets the context to be used in this call's Do method. Any
77206// pending HTTP request will be aborted if the provided context is
77207// canceled.
77208func (c *TargetSslProxiesInsertCall) Context(ctx context.Context) *TargetSslProxiesInsertCall {
77209	c.ctx_ = ctx
77210	return c
77211}
77212
77213// Header returns an http.Header that can be modified by the caller to
77214// add HTTP headers to the request.
77215func (c *TargetSslProxiesInsertCall) Header() http.Header {
77216	if c.header_ == nil {
77217		c.header_ = make(http.Header)
77218	}
77219	return c.header_
77220}
77221
77222func (c *TargetSslProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
77223	reqHeaders := make(http.Header)
77224	for k, v := range c.header_ {
77225		reqHeaders[k] = v
77226	}
77227	reqHeaders.Set("User-Agent", c.s.userAgent())
77228	var body io.Reader = nil
77229	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxy)
77230	if err != nil {
77231		return nil, err
77232	}
77233	reqHeaders.Set("Content-Type", "application/json")
77234	c.urlParams_.Set("alt", alt)
77235	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies")
77236	urls += "?" + c.urlParams_.Encode()
77237	req, _ := http.NewRequest("POST", urls, body)
77238	req.Header = reqHeaders
77239	googleapi.Expand(req.URL, map[string]string{
77240		"project": c.project,
77241	})
77242	return gensupport.SendRequest(c.ctx_, c.s.client, req)
77243}
77244
77245// Do executes the "compute.targetSslProxies.insert" call.
77246// Exactly one of *Operation or error will be non-nil. Any non-2xx
77247// status code is an error. Response headers are in either
77248// *Operation.ServerResponse.Header or (if a response was returned at
77249// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
77250// to check whether the returned error was because
77251// http.StatusNotModified was returned.
77252func (c *TargetSslProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
77253	gensupport.SetOptions(c.urlParams_, opts...)
77254	res, err := c.doRequest("json")
77255	if res != nil && res.StatusCode == http.StatusNotModified {
77256		if res.Body != nil {
77257			res.Body.Close()
77258		}
77259		return nil, &googleapi.Error{
77260			Code:   res.StatusCode,
77261			Header: res.Header,
77262		}
77263	}
77264	if err != nil {
77265		return nil, err
77266	}
77267	defer googleapi.CloseBody(res)
77268	if err := googleapi.CheckResponse(res); err != nil {
77269		return nil, err
77270	}
77271	ret := &Operation{
77272		ServerResponse: googleapi.ServerResponse{
77273			Header:         res.Header,
77274			HTTPStatusCode: res.StatusCode,
77275		},
77276	}
77277	target := &ret
77278	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
77279		return nil, err
77280	}
77281	return ret, nil
77282	// {
77283	//   "description": "Creates a TargetSslProxy resource in the specified project using the data included in the request.",
77284	//   "httpMethod": "POST",
77285	//   "id": "compute.targetSslProxies.insert",
77286	//   "parameterOrder": [
77287	//     "project"
77288	//   ],
77289	//   "parameters": {
77290	//     "project": {
77291	//       "description": "Project ID for this request.",
77292	//       "location": "path",
77293	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
77294	//       "required": true,
77295	//       "type": "string"
77296	//     },
77297	//     "requestId": {
77298	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
77299	//       "location": "query",
77300	//       "type": "string"
77301	//     }
77302	//   },
77303	//   "path": "{project}/global/targetSslProxies",
77304	//   "request": {
77305	//     "$ref": "TargetSslProxy"
77306	//   },
77307	//   "response": {
77308	//     "$ref": "Operation"
77309	//   },
77310	//   "scopes": [
77311	//     "https://www.googleapis.com/auth/cloud-platform",
77312	//     "https://www.googleapis.com/auth/compute"
77313	//   ]
77314	// }
77315
77316}
77317
77318// method id "compute.targetSslProxies.list":
77319
77320type TargetSslProxiesListCall struct {
77321	s            *Service
77322	project      string
77323	urlParams_   gensupport.URLParams
77324	ifNoneMatch_ string
77325	ctx_         context.Context
77326	header_      http.Header
77327}
77328
77329// List: Retrieves the list of TargetSslProxy resources available to the
77330// specified project.
77331func (r *TargetSslProxiesService) List(project string) *TargetSslProxiesListCall {
77332	c := &TargetSslProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
77333	c.project = project
77334	return c
77335}
77336
77337// Filter sets the optional parameter "filter": Sets a filter
77338// {expression} for filtering listed resources. Your {expression} must
77339// be in the format: field_name comparison_string literal_string.
77340//
77341// The field_name is the name of the field you want to compare. Only
77342// atomic field types are supported (string, number, boolean). The
77343// comparison_string must be either eq (equals) or ne (not equals). The
77344// literal_string is the string value to filter to. The literal value
77345// must be valid for the type of field you are filtering by (string,
77346// number, boolean). For string fields, the literal value is interpreted
77347// as a regular expression using RE2 syntax. The literal value must
77348// match the entire field.
77349//
77350// For example, to filter for instances that do not have a name of
77351// example-instance, you would use name ne example-instance.
77352//
77353// You can filter on nested fields. For example, you could filter on
77354// instances that have set the scheduling.automaticRestart field to
77355// true. Use filtering on nested fields to take advantage of labels to
77356// organize and search for results based on label values.
77357//
77358// To filter on multiple expressions, provide each separate expression
77359// within parentheses. For example, (scheduling.automaticRestart eq
77360// true) (zone eq us-central1-f). Multiple expressions are treated as
77361// AND expressions, meaning that resources must match all expressions to
77362// pass the filters.
77363func (c *TargetSslProxiesListCall) Filter(filter string) *TargetSslProxiesListCall {
77364	c.urlParams_.Set("filter", filter)
77365	return c
77366}
77367
77368// MaxResults sets the optional parameter "maxResults": The maximum
77369// number of results per page that should be returned. If the number of
77370// available results is larger than maxResults, Compute Engine returns a
77371// nextPageToken that can be used to get the next page of results in
77372// subsequent list requests. Acceptable values are 0 to 500, inclusive.
77373// (Default: 500)
77374func (c *TargetSslProxiesListCall) MaxResults(maxResults int64) *TargetSslProxiesListCall {
77375	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
77376	return c
77377}
77378
77379// OrderBy sets the optional parameter "orderBy": Sorts list results by
77380// a certain order. By default, results are returned in alphanumerical
77381// order based on the resource name.
77382//
77383// You can also sort results in descending order based on the creation
77384// timestamp using orderBy="creationTimestamp desc". This sorts results
77385// based on the creationTimestamp field in reverse chronological order
77386// (newest result first). Use this to sort resources like operations so
77387// that the newest operation is returned first.
77388//
77389// Currently, only sorting by name or creationTimestamp desc is
77390// supported.
77391func (c *TargetSslProxiesListCall) OrderBy(orderBy string) *TargetSslProxiesListCall {
77392	c.urlParams_.Set("orderBy", orderBy)
77393	return c
77394}
77395
77396// PageToken sets the optional parameter "pageToken": Specifies a page
77397// token to use. Set pageToken to the nextPageToken returned by a
77398// previous list request to get the next page of results.
77399func (c *TargetSslProxiesListCall) PageToken(pageToken string) *TargetSslProxiesListCall {
77400	c.urlParams_.Set("pageToken", pageToken)
77401	return c
77402}
77403
77404// Fields allows partial responses to be retrieved. See
77405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
77406// for more information.
77407func (c *TargetSslProxiesListCall) Fields(s ...googleapi.Field) *TargetSslProxiesListCall {
77408	c.urlParams_.Set("fields", googleapi.CombineFields(s))
77409	return c
77410}
77411
77412// IfNoneMatch sets the optional parameter which makes the operation
77413// fail if the object's ETag matches the given value. This is useful for
77414// getting updates only after the object has changed since the last
77415// request. Use googleapi.IsNotModified to check whether the response
77416// error from Do is the result of In-None-Match.
77417func (c *TargetSslProxiesListCall) IfNoneMatch(entityTag string) *TargetSslProxiesListCall {
77418	c.ifNoneMatch_ = entityTag
77419	return c
77420}
77421
77422// Context sets the context to be used in this call's Do method. Any
77423// pending HTTP request will be aborted if the provided context is
77424// canceled.
77425func (c *TargetSslProxiesListCall) Context(ctx context.Context) *TargetSslProxiesListCall {
77426	c.ctx_ = ctx
77427	return c
77428}
77429
77430// Header returns an http.Header that can be modified by the caller to
77431// add HTTP headers to the request.
77432func (c *TargetSslProxiesListCall) Header() http.Header {
77433	if c.header_ == nil {
77434		c.header_ = make(http.Header)
77435	}
77436	return c.header_
77437}
77438
77439func (c *TargetSslProxiesListCall) doRequest(alt string) (*http.Response, error) {
77440	reqHeaders := make(http.Header)
77441	for k, v := range c.header_ {
77442		reqHeaders[k] = v
77443	}
77444	reqHeaders.Set("User-Agent", c.s.userAgent())
77445	if c.ifNoneMatch_ != "" {
77446		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
77447	}
77448	var body io.Reader = nil
77449	c.urlParams_.Set("alt", alt)
77450	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies")
77451	urls += "?" + c.urlParams_.Encode()
77452	req, _ := http.NewRequest("GET", urls, body)
77453	req.Header = reqHeaders
77454	googleapi.Expand(req.URL, map[string]string{
77455		"project": c.project,
77456	})
77457	return gensupport.SendRequest(c.ctx_, c.s.client, req)
77458}
77459
77460// Do executes the "compute.targetSslProxies.list" call.
77461// Exactly one of *TargetSslProxyList or error will be non-nil. Any
77462// non-2xx status code is an error. Response headers are in either
77463// *TargetSslProxyList.ServerResponse.Header or (if a response was
77464// returned at all) in error.(*googleapi.Error).Header. Use
77465// googleapi.IsNotModified to check whether the returned error was
77466// because http.StatusNotModified was returned.
77467func (c *TargetSslProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetSslProxyList, error) {
77468	gensupport.SetOptions(c.urlParams_, opts...)
77469	res, err := c.doRequest("json")
77470	if res != nil && res.StatusCode == http.StatusNotModified {
77471		if res.Body != nil {
77472			res.Body.Close()
77473		}
77474		return nil, &googleapi.Error{
77475			Code:   res.StatusCode,
77476			Header: res.Header,
77477		}
77478	}
77479	if err != nil {
77480		return nil, err
77481	}
77482	defer googleapi.CloseBody(res)
77483	if err := googleapi.CheckResponse(res); err != nil {
77484		return nil, err
77485	}
77486	ret := &TargetSslProxyList{
77487		ServerResponse: googleapi.ServerResponse{
77488			Header:         res.Header,
77489			HTTPStatusCode: res.StatusCode,
77490		},
77491	}
77492	target := &ret
77493	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
77494		return nil, err
77495	}
77496	return ret, nil
77497	// {
77498	//   "description": "Retrieves the list of TargetSslProxy resources available to the specified project.",
77499	//   "httpMethod": "GET",
77500	//   "id": "compute.targetSslProxies.list",
77501	//   "parameterOrder": [
77502	//     "project"
77503	//   ],
77504	//   "parameters": {
77505	//     "filter": {
77506	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
77507	//       "location": "query",
77508	//       "type": "string"
77509	//     },
77510	//     "maxResults": {
77511	//       "default": "500",
77512	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
77513	//       "format": "uint32",
77514	//       "location": "query",
77515	//       "minimum": "0",
77516	//       "type": "integer"
77517	//     },
77518	//     "orderBy": {
77519	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
77520	//       "location": "query",
77521	//       "type": "string"
77522	//     },
77523	//     "pageToken": {
77524	//       "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.",
77525	//       "location": "query",
77526	//       "type": "string"
77527	//     },
77528	//     "project": {
77529	//       "description": "Project ID for this request.",
77530	//       "location": "path",
77531	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
77532	//       "required": true,
77533	//       "type": "string"
77534	//     }
77535	//   },
77536	//   "path": "{project}/global/targetSslProxies",
77537	//   "response": {
77538	//     "$ref": "TargetSslProxyList"
77539	//   },
77540	//   "scopes": [
77541	//     "https://www.googleapis.com/auth/cloud-platform",
77542	//     "https://www.googleapis.com/auth/compute",
77543	//     "https://www.googleapis.com/auth/compute.readonly"
77544	//   ]
77545	// }
77546
77547}
77548
77549// Pages invokes f for each page of results.
77550// A non-nil error returned from f will halt the iteration.
77551// The provided context supersedes any context provided to the Context method.
77552func (c *TargetSslProxiesListCall) Pages(ctx context.Context, f func(*TargetSslProxyList) error) error {
77553	c.ctx_ = ctx
77554	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
77555	for {
77556		x, err := c.Do()
77557		if err != nil {
77558			return err
77559		}
77560		if err := f(x); err != nil {
77561			return err
77562		}
77563		if x.NextPageToken == "" {
77564			return nil
77565		}
77566		c.PageToken(x.NextPageToken)
77567	}
77568}
77569
77570// method id "compute.targetSslProxies.setBackendService":
77571
77572type TargetSslProxiesSetBackendServiceCall struct {
77573	s                                        *Service
77574	project                                  string
77575	targetSslProxy                           string
77576	targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest
77577	urlParams_                               gensupport.URLParams
77578	ctx_                                     context.Context
77579	header_                                  http.Header
77580}
77581
77582// SetBackendService: Changes the BackendService for TargetSslProxy.
77583func (r *TargetSslProxiesService) SetBackendService(project string, targetSslProxy string, targetsslproxiessetbackendservicerequest *TargetSslProxiesSetBackendServiceRequest) *TargetSslProxiesSetBackendServiceCall {
77584	c := &TargetSslProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
77585	c.project = project
77586	c.targetSslProxy = targetSslProxy
77587	c.targetsslproxiessetbackendservicerequest = targetsslproxiessetbackendservicerequest
77588	return c
77589}
77590
77591// RequestId sets the optional parameter "requestId": An optional
77592// request ID to identify requests. Specify a unique request ID so that
77593// if you must retry your request, the server will know to ignore the
77594// request if it has already been completed.
77595//
77596// For example, consider a situation where you make an initial request
77597// and the request times out. If you make the request again with the
77598// same request ID, the server can check if original operation with the
77599// same request ID was received, and if so, will ignore the second
77600// request. This prevents clients from accidentally creating duplicate
77601// commitments.
77602//
77603// The request ID must be a valid UUID with the exception that zero UUID
77604// is not supported (00000000-0000-0000-0000-000000000000).
77605func (c *TargetSslProxiesSetBackendServiceCall) RequestId(requestId string) *TargetSslProxiesSetBackendServiceCall {
77606	c.urlParams_.Set("requestId", requestId)
77607	return c
77608}
77609
77610// Fields allows partial responses to be retrieved. See
77611// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
77612// for more information.
77613func (c *TargetSslProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetBackendServiceCall {
77614	c.urlParams_.Set("fields", googleapi.CombineFields(s))
77615	return c
77616}
77617
77618// Context sets the context to be used in this call's Do method. Any
77619// pending HTTP request will be aborted if the provided context is
77620// canceled.
77621func (c *TargetSslProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetSslProxiesSetBackendServiceCall {
77622	c.ctx_ = ctx
77623	return c
77624}
77625
77626// Header returns an http.Header that can be modified by the caller to
77627// add HTTP headers to the request.
77628func (c *TargetSslProxiesSetBackendServiceCall) Header() http.Header {
77629	if c.header_ == nil {
77630		c.header_ = make(http.Header)
77631	}
77632	return c.header_
77633}
77634
77635func (c *TargetSslProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) {
77636	reqHeaders := make(http.Header)
77637	for k, v := range c.header_ {
77638		reqHeaders[k] = v
77639	}
77640	reqHeaders.Set("User-Agent", c.s.userAgent())
77641	var body io.Reader = nil
77642	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetbackendservicerequest)
77643	if err != nil {
77644		return nil, err
77645	}
77646	reqHeaders.Set("Content-Type", "application/json")
77647	c.urlParams_.Set("alt", alt)
77648	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService")
77649	urls += "?" + c.urlParams_.Encode()
77650	req, _ := http.NewRequest("POST", urls, body)
77651	req.Header = reqHeaders
77652	googleapi.Expand(req.URL, map[string]string{
77653		"project":        c.project,
77654		"targetSslProxy": c.targetSslProxy,
77655	})
77656	return gensupport.SendRequest(c.ctx_, c.s.client, req)
77657}
77658
77659// Do executes the "compute.targetSslProxies.setBackendService" call.
77660// Exactly one of *Operation or error will be non-nil. Any non-2xx
77661// status code is an error. Response headers are in either
77662// *Operation.ServerResponse.Header or (if a response was returned at
77663// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
77664// to check whether the returned error was because
77665// http.StatusNotModified was returned.
77666func (c *TargetSslProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
77667	gensupport.SetOptions(c.urlParams_, opts...)
77668	res, err := c.doRequest("json")
77669	if res != nil && res.StatusCode == http.StatusNotModified {
77670		if res.Body != nil {
77671			res.Body.Close()
77672		}
77673		return nil, &googleapi.Error{
77674			Code:   res.StatusCode,
77675			Header: res.Header,
77676		}
77677	}
77678	if err != nil {
77679		return nil, err
77680	}
77681	defer googleapi.CloseBody(res)
77682	if err := googleapi.CheckResponse(res); err != nil {
77683		return nil, err
77684	}
77685	ret := &Operation{
77686		ServerResponse: googleapi.ServerResponse{
77687			Header:         res.Header,
77688			HTTPStatusCode: res.StatusCode,
77689		},
77690	}
77691	target := &ret
77692	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
77693		return nil, err
77694	}
77695	return ret, nil
77696	// {
77697	//   "description": "Changes the BackendService for TargetSslProxy.",
77698	//   "httpMethod": "POST",
77699	//   "id": "compute.targetSslProxies.setBackendService",
77700	//   "parameterOrder": [
77701	//     "project",
77702	//     "targetSslProxy"
77703	//   ],
77704	//   "parameters": {
77705	//     "project": {
77706	//       "description": "Project ID for this request.",
77707	//       "location": "path",
77708	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
77709	//       "required": true,
77710	//       "type": "string"
77711	//     },
77712	//     "requestId": {
77713	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
77714	//       "location": "query",
77715	//       "type": "string"
77716	//     },
77717	//     "targetSslProxy": {
77718	//       "description": "Name of the TargetSslProxy resource whose BackendService resource is to be set.",
77719	//       "location": "path",
77720	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
77721	//       "required": true,
77722	//       "type": "string"
77723	//     }
77724	//   },
77725	//   "path": "{project}/global/targetSslProxies/{targetSslProxy}/setBackendService",
77726	//   "request": {
77727	//     "$ref": "TargetSslProxiesSetBackendServiceRequest"
77728	//   },
77729	//   "response": {
77730	//     "$ref": "Operation"
77731	//   },
77732	//   "scopes": [
77733	//     "https://www.googleapis.com/auth/cloud-platform",
77734	//     "https://www.googleapis.com/auth/compute"
77735	//   ]
77736	// }
77737
77738}
77739
77740// method id "compute.targetSslProxies.setProxyHeader":
77741
77742type TargetSslProxiesSetProxyHeaderCall struct {
77743	s                                     *Service
77744	project                               string
77745	targetSslProxy                        string
77746	targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest
77747	urlParams_                            gensupport.URLParams
77748	ctx_                                  context.Context
77749	header_                               http.Header
77750}
77751
77752// SetProxyHeader: Changes the ProxyHeaderType for TargetSslProxy.
77753func (r *TargetSslProxiesService) SetProxyHeader(project string, targetSslProxy string, targetsslproxiessetproxyheaderrequest *TargetSslProxiesSetProxyHeaderRequest) *TargetSslProxiesSetProxyHeaderCall {
77754	c := &TargetSslProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
77755	c.project = project
77756	c.targetSslProxy = targetSslProxy
77757	c.targetsslproxiessetproxyheaderrequest = targetsslproxiessetproxyheaderrequest
77758	return c
77759}
77760
77761// RequestId sets the optional parameter "requestId": An optional
77762// request ID to identify requests. Specify a unique request ID so that
77763// if you must retry your request, the server will know to ignore the
77764// request if it has already been completed.
77765//
77766// For example, consider a situation where you make an initial request
77767// and the request times out. If you make the request again with the
77768// same request ID, the server can check if original operation with the
77769// same request ID was received, and if so, will ignore the second
77770// request. This prevents clients from accidentally creating duplicate
77771// commitments.
77772//
77773// The request ID must be a valid UUID with the exception that zero UUID
77774// is not supported (00000000-0000-0000-0000-000000000000).
77775func (c *TargetSslProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetSslProxiesSetProxyHeaderCall {
77776	c.urlParams_.Set("requestId", requestId)
77777	return c
77778}
77779
77780// Fields allows partial responses to be retrieved. See
77781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
77782// for more information.
77783func (c *TargetSslProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetProxyHeaderCall {
77784	c.urlParams_.Set("fields", googleapi.CombineFields(s))
77785	return c
77786}
77787
77788// Context sets the context to be used in this call's Do method. Any
77789// pending HTTP request will be aborted if the provided context is
77790// canceled.
77791func (c *TargetSslProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetSslProxiesSetProxyHeaderCall {
77792	c.ctx_ = ctx
77793	return c
77794}
77795
77796// Header returns an http.Header that can be modified by the caller to
77797// add HTTP headers to the request.
77798func (c *TargetSslProxiesSetProxyHeaderCall) Header() http.Header {
77799	if c.header_ == nil {
77800		c.header_ = make(http.Header)
77801	}
77802	return c.header_
77803}
77804
77805func (c *TargetSslProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) {
77806	reqHeaders := make(http.Header)
77807	for k, v := range c.header_ {
77808		reqHeaders[k] = v
77809	}
77810	reqHeaders.Set("User-Agent", c.s.userAgent())
77811	var body io.Reader = nil
77812	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetproxyheaderrequest)
77813	if err != nil {
77814		return nil, err
77815	}
77816	reqHeaders.Set("Content-Type", "application/json")
77817	c.urlParams_.Set("alt", alt)
77818	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader")
77819	urls += "?" + c.urlParams_.Encode()
77820	req, _ := http.NewRequest("POST", urls, body)
77821	req.Header = reqHeaders
77822	googleapi.Expand(req.URL, map[string]string{
77823		"project":        c.project,
77824		"targetSslProxy": c.targetSslProxy,
77825	})
77826	return gensupport.SendRequest(c.ctx_, c.s.client, req)
77827}
77828
77829// Do executes the "compute.targetSslProxies.setProxyHeader" call.
77830// Exactly one of *Operation or error will be non-nil. Any non-2xx
77831// status code is an error. Response headers are in either
77832// *Operation.ServerResponse.Header or (if a response was returned at
77833// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
77834// to check whether the returned error was because
77835// http.StatusNotModified was returned.
77836func (c *TargetSslProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
77837	gensupport.SetOptions(c.urlParams_, opts...)
77838	res, err := c.doRequest("json")
77839	if res != nil && res.StatusCode == http.StatusNotModified {
77840		if res.Body != nil {
77841			res.Body.Close()
77842		}
77843		return nil, &googleapi.Error{
77844			Code:   res.StatusCode,
77845			Header: res.Header,
77846		}
77847	}
77848	if err != nil {
77849		return nil, err
77850	}
77851	defer googleapi.CloseBody(res)
77852	if err := googleapi.CheckResponse(res); err != nil {
77853		return nil, err
77854	}
77855	ret := &Operation{
77856		ServerResponse: googleapi.ServerResponse{
77857			Header:         res.Header,
77858			HTTPStatusCode: res.StatusCode,
77859		},
77860	}
77861	target := &ret
77862	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
77863		return nil, err
77864	}
77865	return ret, nil
77866	// {
77867	//   "description": "Changes the ProxyHeaderType for TargetSslProxy.",
77868	//   "httpMethod": "POST",
77869	//   "id": "compute.targetSslProxies.setProxyHeader",
77870	//   "parameterOrder": [
77871	//     "project",
77872	//     "targetSslProxy"
77873	//   ],
77874	//   "parameters": {
77875	//     "project": {
77876	//       "description": "Project ID for this request.",
77877	//       "location": "path",
77878	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
77879	//       "required": true,
77880	//       "type": "string"
77881	//     },
77882	//     "requestId": {
77883	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
77884	//       "location": "query",
77885	//       "type": "string"
77886	//     },
77887	//     "targetSslProxy": {
77888	//       "description": "Name of the TargetSslProxy resource whose ProxyHeader is to be set.",
77889	//       "location": "path",
77890	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
77891	//       "required": true,
77892	//       "type": "string"
77893	//     }
77894	//   },
77895	//   "path": "{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader",
77896	//   "request": {
77897	//     "$ref": "TargetSslProxiesSetProxyHeaderRequest"
77898	//   },
77899	//   "response": {
77900	//     "$ref": "Operation"
77901	//   },
77902	//   "scopes": [
77903	//     "https://www.googleapis.com/auth/cloud-platform",
77904	//     "https://www.googleapis.com/auth/compute"
77905	//   ]
77906	// }
77907
77908}
77909
77910// method id "compute.targetSslProxies.setSslCertificates":
77911
77912type TargetSslProxiesSetSslCertificatesCall struct {
77913	s                                         *Service
77914	project                                   string
77915	targetSslProxy                            string
77916	targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest
77917	urlParams_                                gensupport.URLParams
77918	ctx_                                      context.Context
77919	header_                                   http.Header
77920}
77921
77922// SetSslCertificates: Changes SslCertificates for TargetSslProxy.
77923func (r *TargetSslProxiesService) SetSslCertificates(project string, targetSslProxy string, targetsslproxiessetsslcertificatesrequest *TargetSslProxiesSetSslCertificatesRequest) *TargetSslProxiesSetSslCertificatesCall {
77924	c := &TargetSslProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
77925	c.project = project
77926	c.targetSslProxy = targetSslProxy
77927	c.targetsslproxiessetsslcertificatesrequest = targetsslproxiessetsslcertificatesrequest
77928	return c
77929}
77930
77931// RequestId sets the optional parameter "requestId": An optional
77932// request ID to identify requests. Specify a unique request ID so that
77933// if you must retry your request, the server will know to ignore the
77934// request if it has already been completed.
77935//
77936// For example, consider a situation where you make an initial request
77937// and the request times out. If you make the request again with the
77938// same request ID, the server can check if original operation with the
77939// same request ID was received, and if so, will ignore the second
77940// request. This prevents clients from accidentally creating duplicate
77941// commitments.
77942//
77943// The request ID must be a valid UUID with the exception that zero UUID
77944// is not supported (00000000-0000-0000-0000-000000000000).
77945func (c *TargetSslProxiesSetSslCertificatesCall) RequestId(requestId string) *TargetSslProxiesSetSslCertificatesCall {
77946	c.urlParams_.Set("requestId", requestId)
77947	return c
77948}
77949
77950// Fields allows partial responses to be retrieved. See
77951// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
77952// for more information.
77953func (c *TargetSslProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetSslProxiesSetSslCertificatesCall {
77954	c.urlParams_.Set("fields", googleapi.CombineFields(s))
77955	return c
77956}
77957
77958// Context sets the context to be used in this call's Do method. Any
77959// pending HTTP request will be aborted if the provided context is
77960// canceled.
77961func (c *TargetSslProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetSslProxiesSetSslCertificatesCall {
77962	c.ctx_ = ctx
77963	return c
77964}
77965
77966// Header returns an http.Header that can be modified by the caller to
77967// add HTTP headers to the request.
77968func (c *TargetSslProxiesSetSslCertificatesCall) Header() http.Header {
77969	if c.header_ == nil {
77970		c.header_ = make(http.Header)
77971	}
77972	return c.header_
77973}
77974
77975func (c *TargetSslProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) {
77976	reqHeaders := make(http.Header)
77977	for k, v := range c.header_ {
77978		reqHeaders[k] = v
77979	}
77980	reqHeaders.Set("User-Agent", c.s.userAgent())
77981	var body io.Reader = nil
77982	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetsslproxiessetsslcertificatesrequest)
77983	if err != nil {
77984		return nil, err
77985	}
77986	reqHeaders.Set("Content-Type", "application/json")
77987	c.urlParams_.Set("alt", alt)
77988	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates")
77989	urls += "?" + c.urlParams_.Encode()
77990	req, _ := http.NewRequest("POST", urls, body)
77991	req.Header = reqHeaders
77992	googleapi.Expand(req.URL, map[string]string{
77993		"project":        c.project,
77994		"targetSslProxy": c.targetSslProxy,
77995	})
77996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
77997}
77998
77999// Do executes the "compute.targetSslProxies.setSslCertificates" call.
78000// Exactly one of *Operation or error will be non-nil. Any non-2xx
78001// status code is an error. Response headers are in either
78002// *Operation.ServerResponse.Header or (if a response was returned at
78003// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
78004// to check whether the returned error was because
78005// http.StatusNotModified was returned.
78006func (c *TargetSslProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
78007	gensupport.SetOptions(c.urlParams_, opts...)
78008	res, err := c.doRequest("json")
78009	if res != nil && res.StatusCode == http.StatusNotModified {
78010		if res.Body != nil {
78011			res.Body.Close()
78012		}
78013		return nil, &googleapi.Error{
78014			Code:   res.StatusCode,
78015			Header: res.Header,
78016		}
78017	}
78018	if err != nil {
78019		return nil, err
78020	}
78021	defer googleapi.CloseBody(res)
78022	if err := googleapi.CheckResponse(res); err != nil {
78023		return nil, err
78024	}
78025	ret := &Operation{
78026		ServerResponse: googleapi.ServerResponse{
78027			Header:         res.Header,
78028			HTTPStatusCode: res.StatusCode,
78029		},
78030	}
78031	target := &ret
78032	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
78033		return nil, err
78034	}
78035	return ret, nil
78036	// {
78037	//   "description": "Changes SslCertificates for TargetSslProxy.",
78038	//   "httpMethod": "POST",
78039	//   "id": "compute.targetSslProxies.setSslCertificates",
78040	//   "parameterOrder": [
78041	//     "project",
78042	//     "targetSslProxy"
78043	//   ],
78044	//   "parameters": {
78045	//     "project": {
78046	//       "description": "Project ID for this request.",
78047	//       "location": "path",
78048	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
78049	//       "required": true,
78050	//       "type": "string"
78051	//     },
78052	//     "requestId": {
78053	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
78054	//       "location": "query",
78055	//       "type": "string"
78056	//     },
78057	//     "targetSslProxy": {
78058	//       "description": "Name of the TargetSslProxy resource whose SslCertificate resource is to be set.",
78059	//       "location": "path",
78060	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
78061	//       "required": true,
78062	//       "type": "string"
78063	//     }
78064	//   },
78065	//   "path": "{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates",
78066	//   "request": {
78067	//     "$ref": "TargetSslProxiesSetSslCertificatesRequest"
78068	//   },
78069	//   "response": {
78070	//     "$ref": "Operation"
78071	//   },
78072	//   "scopes": [
78073	//     "https://www.googleapis.com/auth/cloud-platform",
78074	//     "https://www.googleapis.com/auth/compute"
78075	//   ]
78076	// }
78077
78078}
78079
78080// method id "compute.targetSslProxies.testIamPermissions":
78081
78082type TargetSslProxiesTestIamPermissionsCall struct {
78083	s                      *Service
78084	project                string
78085	resource               string
78086	testpermissionsrequest *TestPermissionsRequest
78087	urlParams_             gensupport.URLParams
78088	ctx_                   context.Context
78089	header_                http.Header
78090}
78091
78092// TestIamPermissions: Returns permissions that a caller has on the
78093// specified resource.
78094func (r *TargetSslProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetSslProxiesTestIamPermissionsCall {
78095	c := &TargetSslProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
78096	c.project = project
78097	c.resource = resource
78098	c.testpermissionsrequest = testpermissionsrequest
78099	return c
78100}
78101
78102// Fields allows partial responses to be retrieved. See
78103// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
78104// for more information.
78105func (c *TargetSslProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetSslProxiesTestIamPermissionsCall {
78106	c.urlParams_.Set("fields", googleapi.CombineFields(s))
78107	return c
78108}
78109
78110// Context sets the context to be used in this call's Do method. Any
78111// pending HTTP request will be aborted if the provided context is
78112// canceled.
78113func (c *TargetSslProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetSslProxiesTestIamPermissionsCall {
78114	c.ctx_ = ctx
78115	return c
78116}
78117
78118// Header returns an http.Header that can be modified by the caller to
78119// add HTTP headers to the request.
78120func (c *TargetSslProxiesTestIamPermissionsCall) Header() http.Header {
78121	if c.header_ == nil {
78122		c.header_ = make(http.Header)
78123	}
78124	return c.header_
78125}
78126
78127func (c *TargetSslProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
78128	reqHeaders := make(http.Header)
78129	for k, v := range c.header_ {
78130		reqHeaders[k] = v
78131	}
78132	reqHeaders.Set("User-Agent", c.s.userAgent())
78133	var body io.Reader = nil
78134	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
78135	if err != nil {
78136		return nil, err
78137	}
78138	reqHeaders.Set("Content-Type", "application/json")
78139	c.urlParams_.Set("alt", alt)
78140	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetSslProxies/{resource}/testIamPermissions")
78141	urls += "?" + c.urlParams_.Encode()
78142	req, _ := http.NewRequest("POST", urls, body)
78143	req.Header = reqHeaders
78144	googleapi.Expand(req.URL, map[string]string{
78145		"project":  c.project,
78146		"resource": c.resource,
78147	})
78148	return gensupport.SendRequest(c.ctx_, c.s.client, req)
78149}
78150
78151// Do executes the "compute.targetSslProxies.testIamPermissions" call.
78152// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
78153// non-2xx status code is an error. Response headers are in either
78154// *TestPermissionsResponse.ServerResponse.Header or (if a response was
78155// returned at all) in error.(*googleapi.Error).Header. Use
78156// googleapi.IsNotModified to check whether the returned error was
78157// because http.StatusNotModified was returned.
78158func (c *TargetSslProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
78159	gensupport.SetOptions(c.urlParams_, opts...)
78160	res, err := c.doRequest("json")
78161	if res != nil && res.StatusCode == http.StatusNotModified {
78162		if res.Body != nil {
78163			res.Body.Close()
78164		}
78165		return nil, &googleapi.Error{
78166			Code:   res.StatusCode,
78167			Header: res.Header,
78168		}
78169	}
78170	if err != nil {
78171		return nil, err
78172	}
78173	defer googleapi.CloseBody(res)
78174	if err := googleapi.CheckResponse(res); err != nil {
78175		return nil, err
78176	}
78177	ret := &TestPermissionsResponse{
78178		ServerResponse: googleapi.ServerResponse{
78179			Header:         res.Header,
78180			HTTPStatusCode: res.StatusCode,
78181		},
78182	}
78183	target := &ret
78184	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
78185		return nil, err
78186	}
78187	return ret, nil
78188	// {
78189	//   "description": "Returns permissions that a caller has on the specified resource.",
78190	//   "httpMethod": "POST",
78191	//   "id": "compute.targetSslProxies.testIamPermissions",
78192	//   "parameterOrder": [
78193	//     "project",
78194	//     "resource"
78195	//   ],
78196	//   "parameters": {
78197	//     "project": {
78198	//       "description": "Project ID for this request.",
78199	//       "location": "path",
78200	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
78201	//       "required": true,
78202	//       "type": "string"
78203	//     },
78204	//     "resource": {
78205	//       "description": "Name of the resource for this request.",
78206	//       "location": "path",
78207	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
78208	//       "required": true,
78209	//       "type": "string"
78210	//     }
78211	//   },
78212	//   "path": "{project}/global/targetSslProxies/{resource}/testIamPermissions",
78213	//   "request": {
78214	//     "$ref": "TestPermissionsRequest"
78215	//   },
78216	//   "response": {
78217	//     "$ref": "TestPermissionsResponse"
78218	//   },
78219	//   "scopes": [
78220	//     "https://www.googleapis.com/auth/cloud-platform",
78221	//     "https://www.googleapis.com/auth/compute",
78222	//     "https://www.googleapis.com/auth/compute.readonly"
78223	//   ]
78224	// }
78225
78226}
78227
78228// method id "compute.targetTcpProxies.delete":
78229
78230type TargetTcpProxiesDeleteCall struct {
78231	s              *Service
78232	project        string
78233	targetTcpProxy string
78234	urlParams_     gensupport.URLParams
78235	ctx_           context.Context
78236	header_        http.Header
78237}
78238
78239// Delete: Deletes the specified TargetTcpProxy resource.
78240func (r *TargetTcpProxiesService) Delete(project string, targetTcpProxy string) *TargetTcpProxiesDeleteCall {
78241	c := &TargetTcpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
78242	c.project = project
78243	c.targetTcpProxy = targetTcpProxy
78244	return c
78245}
78246
78247// RequestId sets the optional parameter "requestId": An optional
78248// request ID to identify requests. Specify a unique request ID so that
78249// if you must retry your request, the server will know to ignore the
78250// request if it has already been completed.
78251//
78252// For example, consider a situation where you make an initial request
78253// and the request times out. If you make the request again with the
78254// same request ID, the server can check if original operation with the
78255// same request ID was received, and if so, will ignore the second
78256// request. This prevents clients from accidentally creating duplicate
78257// commitments.
78258//
78259// The request ID must be a valid UUID with the exception that zero UUID
78260// is not supported (00000000-0000-0000-0000-000000000000).
78261func (c *TargetTcpProxiesDeleteCall) RequestId(requestId string) *TargetTcpProxiesDeleteCall {
78262	c.urlParams_.Set("requestId", requestId)
78263	return c
78264}
78265
78266// Fields allows partial responses to be retrieved. See
78267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
78268// for more information.
78269func (c *TargetTcpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetTcpProxiesDeleteCall {
78270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
78271	return c
78272}
78273
78274// Context sets the context to be used in this call's Do method. Any
78275// pending HTTP request will be aborted if the provided context is
78276// canceled.
78277func (c *TargetTcpProxiesDeleteCall) Context(ctx context.Context) *TargetTcpProxiesDeleteCall {
78278	c.ctx_ = ctx
78279	return c
78280}
78281
78282// Header returns an http.Header that can be modified by the caller to
78283// add HTTP headers to the request.
78284func (c *TargetTcpProxiesDeleteCall) Header() http.Header {
78285	if c.header_ == nil {
78286		c.header_ = make(http.Header)
78287	}
78288	return c.header_
78289}
78290
78291func (c *TargetTcpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
78292	reqHeaders := make(http.Header)
78293	for k, v := range c.header_ {
78294		reqHeaders[k] = v
78295	}
78296	reqHeaders.Set("User-Agent", c.s.userAgent())
78297	var body io.Reader = nil
78298	c.urlParams_.Set("alt", alt)
78299	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}")
78300	urls += "?" + c.urlParams_.Encode()
78301	req, _ := http.NewRequest("DELETE", urls, body)
78302	req.Header = reqHeaders
78303	googleapi.Expand(req.URL, map[string]string{
78304		"project":        c.project,
78305		"targetTcpProxy": c.targetTcpProxy,
78306	})
78307	return gensupport.SendRequest(c.ctx_, c.s.client, req)
78308}
78309
78310// Do executes the "compute.targetTcpProxies.delete" call.
78311// Exactly one of *Operation or error will be non-nil. Any non-2xx
78312// status code is an error. Response headers are in either
78313// *Operation.ServerResponse.Header or (if a response was returned at
78314// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
78315// to check whether the returned error was because
78316// http.StatusNotModified was returned.
78317func (c *TargetTcpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
78318	gensupport.SetOptions(c.urlParams_, opts...)
78319	res, err := c.doRequest("json")
78320	if res != nil && res.StatusCode == http.StatusNotModified {
78321		if res.Body != nil {
78322			res.Body.Close()
78323		}
78324		return nil, &googleapi.Error{
78325			Code:   res.StatusCode,
78326			Header: res.Header,
78327		}
78328	}
78329	if err != nil {
78330		return nil, err
78331	}
78332	defer googleapi.CloseBody(res)
78333	if err := googleapi.CheckResponse(res); err != nil {
78334		return nil, err
78335	}
78336	ret := &Operation{
78337		ServerResponse: googleapi.ServerResponse{
78338			Header:         res.Header,
78339			HTTPStatusCode: res.StatusCode,
78340		},
78341	}
78342	target := &ret
78343	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
78344		return nil, err
78345	}
78346	return ret, nil
78347	// {
78348	//   "description": "Deletes the specified TargetTcpProxy resource.",
78349	//   "httpMethod": "DELETE",
78350	//   "id": "compute.targetTcpProxies.delete",
78351	//   "parameterOrder": [
78352	//     "project",
78353	//     "targetTcpProxy"
78354	//   ],
78355	//   "parameters": {
78356	//     "project": {
78357	//       "description": "Project ID for this request.",
78358	//       "location": "path",
78359	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
78360	//       "required": true,
78361	//       "type": "string"
78362	//     },
78363	//     "requestId": {
78364	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
78365	//       "location": "query",
78366	//       "type": "string"
78367	//     },
78368	//     "targetTcpProxy": {
78369	//       "description": "Name of the TargetTcpProxy resource to delete.",
78370	//       "location": "path",
78371	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
78372	//       "required": true,
78373	//       "type": "string"
78374	//     }
78375	//   },
78376	//   "path": "{project}/global/targetTcpProxies/{targetTcpProxy}",
78377	//   "response": {
78378	//     "$ref": "Operation"
78379	//   },
78380	//   "scopes": [
78381	//     "https://www.googleapis.com/auth/cloud-platform",
78382	//     "https://www.googleapis.com/auth/compute"
78383	//   ]
78384	// }
78385
78386}
78387
78388// method id "compute.targetTcpProxies.get":
78389
78390type TargetTcpProxiesGetCall struct {
78391	s              *Service
78392	project        string
78393	targetTcpProxy string
78394	urlParams_     gensupport.URLParams
78395	ifNoneMatch_   string
78396	ctx_           context.Context
78397	header_        http.Header
78398}
78399
78400// Get: Returns the specified TargetTcpProxy resource. Get a list of
78401// available target TCP proxies by making a list() request.
78402func (r *TargetTcpProxiesService) Get(project string, targetTcpProxy string) *TargetTcpProxiesGetCall {
78403	c := &TargetTcpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
78404	c.project = project
78405	c.targetTcpProxy = targetTcpProxy
78406	return c
78407}
78408
78409// Fields allows partial responses to be retrieved. See
78410// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
78411// for more information.
78412func (c *TargetTcpProxiesGetCall) Fields(s ...googleapi.Field) *TargetTcpProxiesGetCall {
78413	c.urlParams_.Set("fields", googleapi.CombineFields(s))
78414	return c
78415}
78416
78417// IfNoneMatch sets the optional parameter which makes the operation
78418// fail if the object's ETag matches the given value. This is useful for
78419// getting updates only after the object has changed since the last
78420// request. Use googleapi.IsNotModified to check whether the response
78421// error from Do is the result of In-None-Match.
78422func (c *TargetTcpProxiesGetCall) IfNoneMatch(entityTag string) *TargetTcpProxiesGetCall {
78423	c.ifNoneMatch_ = entityTag
78424	return c
78425}
78426
78427// Context sets the context to be used in this call's Do method. Any
78428// pending HTTP request will be aborted if the provided context is
78429// canceled.
78430func (c *TargetTcpProxiesGetCall) Context(ctx context.Context) *TargetTcpProxiesGetCall {
78431	c.ctx_ = ctx
78432	return c
78433}
78434
78435// Header returns an http.Header that can be modified by the caller to
78436// add HTTP headers to the request.
78437func (c *TargetTcpProxiesGetCall) Header() http.Header {
78438	if c.header_ == nil {
78439		c.header_ = make(http.Header)
78440	}
78441	return c.header_
78442}
78443
78444func (c *TargetTcpProxiesGetCall) doRequest(alt string) (*http.Response, error) {
78445	reqHeaders := make(http.Header)
78446	for k, v := range c.header_ {
78447		reqHeaders[k] = v
78448	}
78449	reqHeaders.Set("User-Agent", c.s.userAgent())
78450	if c.ifNoneMatch_ != "" {
78451		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
78452	}
78453	var body io.Reader = nil
78454	c.urlParams_.Set("alt", alt)
78455	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}")
78456	urls += "?" + c.urlParams_.Encode()
78457	req, _ := http.NewRequest("GET", urls, body)
78458	req.Header = reqHeaders
78459	googleapi.Expand(req.URL, map[string]string{
78460		"project":        c.project,
78461		"targetTcpProxy": c.targetTcpProxy,
78462	})
78463	return gensupport.SendRequest(c.ctx_, c.s.client, req)
78464}
78465
78466// Do executes the "compute.targetTcpProxies.get" call.
78467// Exactly one of *TargetTcpProxy or error will be non-nil. Any non-2xx
78468// status code is an error. Response headers are in either
78469// *TargetTcpProxy.ServerResponse.Header or (if a response was returned
78470// at all) in error.(*googleapi.Error).Header. Use
78471// googleapi.IsNotModified to check whether the returned error was
78472// because http.StatusNotModified was returned.
78473func (c *TargetTcpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxy, error) {
78474	gensupport.SetOptions(c.urlParams_, opts...)
78475	res, err := c.doRequest("json")
78476	if res != nil && res.StatusCode == http.StatusNotModified {
78477		if res.Body != nil {
78478			res.Body.Close()
78479		}
78480		return nil, &googleapi.Error{
78481			Code:   res.StatusCode,
78482			Header: res.Header,
78483		}
78484	}
78485	if err != nil {
78486		return nil, err
78487	}
78488	defer googleapi.CloseBody(res)
78489	if err := googleapi.CheckResponse(res); err != nil {
78490		return nil, err
78491	}
78492	ret := &TargetTcpProxy{
78493		ServerResponse: googleapi.ServerResponse{
78494			Header:         res.Header,
78495			HTTPStatusCode: res.StatusCode,
78496		},
78497	}
78498	target := &ret
78499	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
78500		return nil, err
78501	}
78502	return ret, nil
78503	// {
78504	//   "description": "Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request.",
78505	//   "httpMethod": "GET",
78506	//   "id": "compute.targetTcpProxies.get",
78507	//   "parameterOrder": [
78508	//     "project",
78509	//     "targetTcpProxy"
78510	//   ],
78511	//   "parameters": {
78512	//     "project": {
78513	//       "description": "Project ID for this request.",
78514	//       "location": "path",
78515	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
78516	//       "required": true,
78517	//       "type": "string"
78518	//     },
78519	//     "targetTcpProxy": {
78520	//       "description": "Name of the TargetTcpProxy resource to return.",
78521	//       "location": "path",
78522	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
78523	//       "required": true,
78524	//       "type": "string"
78525	//     }
78526	//   },
78527	//   "path": "{project}/global/targetTcpProxies/{targetTcpProxy}",
78528	//   "response": {
78529	//     "$ref": "TargetTcpProxy"
78530	//   },
78531	//   "scopes": [
78532	//     "https://www.googleapis.com/auth/cloud-platform",
78533	//     "https://www.googleapis.com/auth/compute",
78534	//     "https://www.googleapis.com/auth/compute.readonly"
78535	//   ]
78536	// }
78537
78538}
78539
78540// method id "compute.targetTcpProxies.insert":
78541
78542type TargetTcpProxiesInsertCall struct {
78543	s              *Service
78544	project        string
78545	targettcpproxy *TargetTcpProxy
78546	urlParams_     gensupport.URLParams
78547	ctx_           context.Context
78548	header_        http.Header
78549}
78550
78551// Insert: Creates a TargetTcpProxy resource in the specified project
78552// using the data included in the request.
78553func (r *TargetTcpProxiesService) Insert(project string, targettcpproxy *TargetTcpProxy) *TargetTcpProxiesInsertCall {
78554	c := &TargetTcpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
78555	c.project = project
78556	c.targettcpproxy = targettcpproxy
78557	return c
78558}
78559
78560// RequestId sets the optional parameter "requestId": An optional
78561// request ID to identify requests. Specify a unique request ID so that
78562// if you must retry your request, the server will know to ignore the
78563// request if it has already been completed.
78564//
78565// For example, consider a situation where you make an initial request
78566// and the request times out. If you make the request again with the
78567// same request ID, the server can check if original operation with the
78568// same request ID was received, and if so, will ignore the second
78569// request. This prevents clients from accidentally creating duplicate
78570// commitments.
78571//
78572// The request ID must be a valid UUID with the exception that zero UUID
78573// is not supported (00000000-0000-0000-0000-000000000000).
78574func (c *TargetTcpProxiesInsertCall) RequestId(requestId string) *TargetTcpProxiesInsertCall {
78575	c.urlParams_.Set("requestId", requestId)
78576	return c
78577}
78578
78579// Fields allows partial responses to be retrieved. See
78580// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
78581// for more information.
78582func (c *TargetTcpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetTcpProxiesInsertCall {
78583	c.urlParams_.Set("fields", googleapi.CombineFields(s))
78584	return c
78585}
78586
78587// Context sets the context to be used in this call's Do method. Any
78588// pending HTTP request will be aborted if the provided context is
78589// canceled.
78590func (c *TargetTcpProxiesInsertCall) Context(ctx context.Context) *TargetTcpProxiesInsertCall {
78591	c.ctx_ = ctx
78592	return c
78593}
78594
78595// Header returns an http.Header that can be modified by the caller to
78596// add HTTP headers to the request.
78597func (c *TargetTcpProxiesInsertCall) Header() http.Header {
78598	if c.header_ == nil {
78599		c.header_ = make(http.Header)
78600	}
78601	return c.header_
78602}
78603
78604func (c *TargetTcpProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
78605	reqHeaders := make(http.Header)
78606	for k, v := range c.header_ {
78607		reqHeaders[k] = v
78608	}
78609	reqHeaders.Set("User-Agent", c.s.userAgent())
78610	var body io.Reader = nil
78611	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxy)
78612	if err != nil {
78613		return nil, err
78614	}
78615	reqHeaders.Set("Content-Type", "application/json")
78616	c.urlParams_.Set("alt", alt)
78617	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies")
78618	urls += "?" + c.urlParams_.Encode()
78619	req, _ := http.NewRequest("POST", urls, body)
78620	req.Header = reqHeaders
78621	googleapi.Expand(req.URL, map[string]string{
78622		"project": c.project,
78623	})
78624	return gensupport.SendRequest(c.ctx_, c.s.client, req)
78625}
78626
78627// Do executes the "compute.targetTcpProxies.insert" call.
78628// Exactly one of *Operation or error will be non-nil. Any non-2xx
78629// status code is an error. Response headers are in either
78630// *Operation.ServerResponse.Header or (if a response was returned at
78631// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
78632// to check whether the returned error was because
78633// http.StatusNotModified was returned.
78634func (c *TargetTcpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
78635	gensupport.SetOptions(c.urlParams_, opts...)
78636	res, err := c.doRequest("json")
78637	if res != nil && res.StatusCode == http.StatusNotModified {
78638		if res.Body != nil {
78639			res.Body.Close()
78640		}
78641		return nil, &googleapi.Error{
78642			Code:   res.StatusCode,
78643			Header: res.Header,
78644		}
78645	}
78646	if err != nil {
78647		return nil, err
78648	}
78649	defer googleapi.CloseBody(res)
78650	if err := googleapi.CheckResponse(res); err != nil {
78651		return nil, err
78652	}
78653	ret := &Operation{
78654		ServerResponse: googleapi.ServerResponse{
78655			Header:         res.Header,
78656			HTTPStatusCode: res.StatusCode,
78657		},
78658	}
78659	target := &ret
78660	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
78661		return nil, err
78662	}
78663	return ret, nil
78664	// {
78665	//   "description": "Creates a TargetTcpProxy resource in the specified project using the data included in the request.",
78666	//   "httpMethod": "POST",
78667	//   "id": "compute.targetTcpProxies.insert",
78668	//   "parameterOrder": [
78669	//     "project"
78670	//   ],
78671	//   "parameters": {
78672	//     "project": {
78673	//       "description": "Project ID for this request.",
78674	//       "location": "path",
78675	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
78676	//       "required": true,
78677	//       "type": "string"
78678	//     },
78679	//     "requestId": {
78680	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
78681	//       "location": "query",
78682	//       "type": "string"
78683	//     }
78684	//   },
78685	//   "path": "{project}/global/targetTcpProxies",
78686	//   "request": {
78687	//     "$ref": "TargetTcpProxy"
78688	//   },
78689	//   "response": {
78690	//     "$ref": "Operation"
78691	//   },
78692	//   "scopes": [
78693	//     "https://www.googleapis.com/auth/cloud-platform",
78694	//     "https://www.googleapis.com/auth/compute"
78695	//   ]
78696	// }
78697
78698}
78699
78700// method id "compute.targetTcpProxies.list":
78701
78702type TargetTcpProxiesListCall struct {
78703	s            *Service
78704	project      string
78705	urlParams_   gensupport.URLParams
78706	ifNoneMatch_ string
78707	ctx_         context.Context
78708	header_      http.Header
78709}
78710
78711// List: Retrieves the list of TargetTcpProxy resources available to the
78712// specified project.
78713func (r *TargetTcpProxiesService) List(project string) *TargetTcpProxiesListCall {
78714	c := &TargetTcpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
78715	c.project = project
78716	return c
78717}
78718
78719// Filter sets the optional parameter "filter": Sets a filter
78720// {expression} for filtering listed resources. Your {expression} must
78721// be in the format: field_name comparison_string literal_string.
78722//
78723// The field_name is the name of the field you want to compare. Only
78724// atomic field types are supported (string, number, boolean). The
78725// comparison_string must be either eq (equals) or ne (not equals). The
78726// literal_string is the string value to filter to. The literal value
78727// must be valid for the type of field you are filtering by (string,
78728// number, boolean). For string fields, the literal value is interpreted
78729// as a regular expression using RE2 syntax. The literal value must
78730// match the entire field.
78731//
78732// For example, to filter for instances that do not have a name of
78733// example-instance, you would use name ne example-instance.
78734//
78735// You can filter on nested fields. For example, you could filter on
78736// instances that have set the scheduling.automaticRestart field to
78737// true. Use filtering on nested fields to take advantage of labels to
78738// organize and search for results based on label values.
78739//
78740// To filter on multiple expressions, provide each separate expression
78741// within parentheses. For example, (scheduling.automaticRestart eq
78742// true) (zone eq us-central1-f). Multiple expressions are treated as
78743// AND expressions, meaning that resources must match all expressions to
78744// pass the filters.
78745func (c *TargetTcpProxiesListCall) Filter(filter string) *TargetTcpProxiesListCall {
78746	c.urlParams_.Set("filter", filter)
78747	return c
78748}
78749
78750// MaxResults sets the optional parameter "maxResults": The maximum
78751// number of results per page that should be returned. If the number of
78752// available results is larger than maxResults, Compute Engine returns a
78753// nextPageToken that can be used to get the next page of results in
78754// subsequent list requests. Acceptable values are 0 to 500, inclusive.
78755// (Default: 500)
78756func (c *TargetTcpProxiesListCall) MaxResults(maxResults int64) *TargetTcpProxiesListCall {
78757	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
78758	return c
78759}
78760
78761// OrderBy sets the optional parameter "orderBy": Sorts list results by
78762// a certain order. By default, results are returned in alphanumerical
78763// order based on the resource name.
78764//
78765// You can also sort results in descending order based on the creation
78766// timestamp using orderBy="creationTimestamp desc". This sorts results
78767// based on the creationTimestamp field in reverse chronological order
78768// (newest result first). Use this to sort resources like operations so
78769// that the newest operation is returned first.
78770//
78771// Currently, only sorting by name or creationTimestamp desc is
78772// supported.
78773func (c *TargetTcpProxiesListCall) OrderBy(orderBy string) *TargetTcpProxiesListCall {
78774	c.urlParams_.Set("orderBy", orderBy)
78775	return c
78776}
78777
78778// PageToken sets the optional parameter "pageToken": Specifies a page
78779// token to use. Set pageToken to the nextPageToken returned by a
78780// previous list request to get the next page of results.
78781func (c *TargetTcpProxiesListCall) PageToken(pageToken string) *TargetTcpProxiesListCall {
78782	c.urlParams_.Set("pageToken", pageToken)
78783	return c
78784}
78785
78786// Fields allows partial responses to be retrieved. See
78787// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
78788// for more information.
78789func (c *TargetTcpProxiesListCall) Fields(s ...googleapi.Field) *TargetTcpProxiesListCall {
78790	c.urlParams_.Set("fields", googleapi.CombineFields(s))
78791	return c
78792}
78793
78794// IfNoneMatch sets the optional parameter which makes the operation
78795// fail if the object's ETag matches the given value. This is useful for
78796// getting updates only after the object has changed since the last
78797// request. Use googleapi.IsNotModified to check whether the response
78798// error from Do is the result of In-None-Match.
78799func (c *TargetTcpProxiesListCall) IfNoneMatch(entityTag string) *TargetTcpProxiesListCall {
78800	c.ifNoneMatch_ = entityTag
78801	return c
78802}
78803
78804// Context sets the context to be used in this call's Do method. Any
78805// pending HTTP request will be aborted if the provided context is
78806// canceled.
78807func (c *TargetTcpProxiesListCall) Context(ctx context.Context) *TargetTcpProxiesListCall {
78808	c.ctx_ = ctx
78809	return c
78810}
78811
78812// Header returns an http.Header that can be modified by the caller to
78813// add HTTP headers to the request.
78814func (c *TargetTcpProxiesListCall) Header() http.Header {
78815	if c.header_ == nil {
78816		c.header_ = make(http.Header)
78817	}
78818	return c.header_
78819}
78820
78821func (c *TargetTcpProxiesListCall) doRequest(alt string) (*http.Response, error) {
78822	reqHeaders := make(http.Header)
78823	for k, v := range c.header_ {
78824		reqHeaders[k] = v
78825	}
78826	reqHeaders.Set("User-Agent", c.s.userAgent())
78827	if c.ifNoneMatch_ != "" {
78828		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
78829	}
78830	var body io.Reader = nil
78831	c.urlParams_.Set("alt", alt)
78832	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies")
78833	urls += "?" + c.urlParams_.Encode()
78834	req, _ := http.NewRequest("GET", urls, body)
78835	req.Header = reqHeaders
78836	googleapi.Expand(req.URL, map[string]string{
78837		"project": c.project,
78838	})
78839	return gensupport.SendRequest(c.ctx_, c.s.client, req)
78840}
78841
78842// Do executes the "compute.targetTcpProxies.list" call.
78843// Exactly one of *TargetTcpProxyList or error will be non-nil. Any
78844// non-2xx status code is an error. Response headers are in either
78845// *TargetTcpProxyList.ServerResponse.Header or (if a response was
78846// returned at all) in error.(*googleapi.Error).Header. Use
78847// googleapi.IsNotModified to check whether the returned error was
78848// because http.StatusNotModified was returned.
78849func (c *TargetTcpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetTcpProxyList, error) {
78850	gensupport.SetOptions(c.urlParams_, opts...)
78851	res, err := c.doRequest("json")
78852	if res != nil && res.StatusCode == http.StatusNotModified {
78853		if res.Body != nil {
78854			res.Body.Close()
78855		}
78856		return nil, &googleapi.Error{
78857			Code:   res.StatusCode,
78858			Header: res.Header,
78859		}
78860	}
78861	if err != nil {
78862		return nil, err
78863	}
78864	defer googleapi.CloseBody(res)
78865	if err := googleapi.CheckResponse(res); err != nil {
78866		return nil, err
78867	}
78868	ret := &TargetTcpProxyList{
78869		ServerResponse: googleapi.ServerResponse{
78870			Header:         res.Header,
78871			HTTPStatusCode: res.StatusCode,
78872		},
78873	}
78874	target := &ret
78875	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
78876		return nil, err
78877	}
78878	return ret, nil
78879	// {
78880	//   "description": "Retrieves the list of TargetTcpProxy resources available to the specified project.",
78881	//   "httpMethod": "GET",
78882	//   "id": "compute.targetTcpProxies.list",
78883	//   "parameterOrder": [
78884	//     "project"
78885	//   ],
78886	//   "parameters": {
78887	//     "filter": {
78888	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
78889	//       "location": "query",
78890	//       "type": "string"
78891	//     },
78892	//     "maxResults": {
78893	//       "default": "500",
78894	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
78895	//       "format": "uint32",
78896	//       "location": "query",
78897	//       "minimum": "0",
78898	//       "type": "integer"
78899	//     },
78900	//     "orderBy": {
78901	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
78902	//       "location": "query",
78903	//       "type": "string"
78904	//     },
78905	//     "pageToken": {
78906	//       "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.",
78907	//       "location": "query",
78908	//       "type": "string"
78909	//     },
78910	//     "project": {
78911	//       "description": "Project ID for this request.",
78912	//       "location": "path",
78913	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
78914	//       "required": true,
78915	//       "type": "string"
78916	//     }
78917	//   },
78918	//   "path": "{project}/global/targetTcpProxies",
78919	//   "response": {
78920	//     "$ref": "TargetTcpProxyList"
78921	//   },
78922	//   "scopes": [
78923	//     "https://www.googleapis.com/auth/cloud-platform",
78924	//     "https://www.googleapis.com/auth/compute",
78925	//     "https://www.googleapis.com/auth/compute.readonly"
78926	//   ]
78927	// }
78928
78929}
78930
78931// Pages invokes f for each page of results.
78932// A non-nil error returned from f will halt the iteration.
78933// The provided context supersedes any context provided to the Context method.
78934func (c *TargetTcpProxiesListCall) Pages(ctx context.Context, f func(*TargetTcpProxyList) error) error {
78935	c.ctx_ = ctx
78936	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
78937	for {
78938		x, err := c.Do()
78939		if err != nil {
78940			return err
78941		}
78942		if err := f(x); err != nil {
78943			return err
78944		}
78945		if x.NextPageToken == "" {
78946			return nil
78947		}
78948		c.PageToken(x.NextPageToken)
78949	}
78950}
78951
78952// method id "compute.targetTcpProxies.setBackendService":
78953
78954type TargetTcpProxiesSetBackendServiceCall struct {
78955	s                                        *Service
78956	project                                  string
78957	targetTcpProxy                           string
78958	targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest
78959	urlParams_                               gensupport.URLParams
78960	ctx_                                     context.Context
78961	header_                                  http.Header
78962}
78963
78964// SetBackendService: Changes the BackendService for TargetTcpProxy.
78965func (r *TargetTcpProxiesService) SetBackendService(project string, targetTcpProxy string, targettcpproxiessetbackendservicerequest *TargetTcpProxiesSetBackendServiceRequest) *TargetTcpProxiesSetBackendServiceCall {
78966	c := &TargetTcpProxiesSetBackendServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
78967	c.project = project
78968	c.targetTcpProxy = targetTcpProxy
78969	c.targettcpproxiessetbackendservicerequest = targettcpproxiessetbackendservicerequest
78970	return c
78971}
78972
78973// RequestId sets the optional parameter "requestId": An optional
78974// request ID to identify requests. Specify a unique request ID so that
78975// if you must retry your request, the server will know to ignore the
78976// request if it has already been completed.
78977//
78978// For example, consider a situation where you make an initial request
78979// and the request times out. If you make the request again with the
78980// same request ID, the server can check if original operation with the
78981// same request ID was received, and if so, will ignore the second
78982// request. This prevents clients from accidentally creating duplicate
78983// commitments.
78984//
78985// The request ID must be a valid UUID with the exception that zero UUID
78986// is not supported (00000000-0000-0000-0000-000000000000).
78987func (c *TargetTcpProxiesSetBackendServiceCall) RequestId(requestId string) *TargetTcpProxiesSetBackendServiceCall {
78988	c.urlParams_.Set("requestId", requestId)
78989	return c
78990}
78991
78992// Fields allows partial responses to be retrieved. See
78993// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
78994// for more information.
78995func (c *TargetTcpProxiesSetBackendServiceCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetBackendServiceCall {
78996	c.urlParams_.Set("fields", googleapi.CombineFields(s))
78997	return c
78998}
78999
79000// Context sets the context to be used in this call's Do method. Any
79001// pending HTTP request will be aborted if the provided context is
79002// canceled.
79003func (c *TargetTcpProxiesSetBackendServiceCall) Context(ctx context.Context) *TargetTcpProxiesSetBackendServiceCall {
79004	c.ctx_ = ctx
79005	return c
79006}
79007
79008// Header returns an http.Header that can be modified by the caller to
79009// add HTTP headers to the request.
79010func (c *TargetTcpProxiesSetBackendServiceCall) Header() http.Header {
79011	if c.header_ == nil {
79012		c.header_ = make(http.Header)
79013	}
79014	return c.header_
79015}
79016
79017func (c *TargetTcpProxiesSetBackendServiceCall) doRequest(alt string) (*http.Response, error) {
79018	reqHeaders := make(http.Header)
79019	for k, v := range c.header_ {
79020		reqHeaders[k] = v
79021	}
79022	reqHeaders.Set("User-Agent", c.s.userAgent())
79023	var body io.Reader = nil
79024	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetbackendservicerequest)
79025	if err != nil {
79026		return nil, err
79027	}
79028	reqHeaders.Set("Content-Type", "application/json")
79029	c.urlParams_.Set("alt", alt)
79030	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService")
79031	urls += "?" + c.urlParams_.Encode()
79032	req, _ := http.NewRequest("POST", urls, body)
79033	req.Header = reqHeaders
79034	googleapi.Expand(req.URL, map[string]string{
79035		"project":        c.project,
79036		"targetTcpProxy": c.targetTcpProxy,
79037	})
79038	return gensupport.SendRequest(c.ctx_, c.s.client, req)
79039}
79040
79041// Do executes the "compute.targetTcpProxies.setBackendService" call.
79042// Exactly one of *Operation or error will be non-nil. Any non-2xx
79043// status code is an error. Response headers are in either
79044// *Operation.ServerResponse.Header or (if a response was returned at
79045// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
79046// to check whether the returned error was because
79047// http.StatusNotModified was returned.
79048func (c *TargetTcpProxiesSetBackendServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
79049	gensupport.SetOptions(c.urlParams_, opts...)
79050	res, err := c.doRequest("json")
79051	if res != nil && res.StatusCode == http.StatusNotModified {
79052		if res.Body != nil {
79053			res.Body.Close()
79054		}
79055		return nil, &googleapi.Error{
79056			Code:   res.StatusCode,
79057			Header: res.Header,
79058		}
79059	}
79060	if err != nil {
79061		return nil, err
79062	}
79063	defer googleapi.CloseBody(res)
79064	if err := googleapi.CheckResponse(res); err != nil {
79065		return nil, err
79066	}
79067	ret := &Operation{
79068		ServerResponse: googleapi.ServerResponse{
79069			Header:         res.Header,
79070			HTTPStatusCode: res.StatusCode,
79071		},
79072	}
79073	target := &ret
79074	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
79075		return nil, err
79076	}
79077	return ret, nil
79078	// {
79079	//   "description": "Changes the BackendService for TargetTcpProxy.",
79080	//   "httpMethod": "POST",
79081	//   "id": "compute.targetTcpProxies.setBackendService",
79082	//   "parameterOrder": [
79083	//     "project",
79084	//     "targetTcpProxy"
79085	//   ],
79086	//   "parameters": {
79087	//     "project": {
79088	//       "description": "Project ID for this request.",
79089	//       "location": "path",
79090	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
79091	//       "required": true,
79092	//       "type": "string"
79093	//     },
79094	//     "requestId": {
79095	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
79096	//       "location": "query",
79097	//       "type": "string"
79098	//     },
79099	//     "targetTcpProxy": {
79100	//       "description": "Name of the TargetTcpProxy resource whose BackendService resource is to be set.",
79101	//       "location": "path",
79102	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
79103	//       "required": true,
79104	//       "type": "string"
79105	//     }
79106	//   },
79107	//   "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService",
79108	//   "request": {
79109	//     "$ref": "TargetTcpProxiesSetBackendServiceRequest"
79110	//   },
79111	//   "response": {
79112	//     "$ref": "Operation"
79113	//   },
79114	//   "scopes": [
79115	//     "https://www.googleapis.com/auth/cloud-platform",
79116	//     "https://www.googleapis.com/auth/compute"
79117	//   ]
79118	// }
79119
79120}
79121
79122// method id "compute.targetTcpProxies.setProxyHeader":
79123
79124type TargetTcpProxiesSetProxyHeaderCall struct {
79125	s                                     *Service
79126	project                               string
79127	targetTcpProxy                        string
79128	targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest
79129	urlParams_                            gensupport.URLParams
79130	ctx_                                  context.Context
79131	header_                               http.Header
79132}
79133
79134// SetProxyHeader: Changes the ProxyHeaderType for TargetTcpProxy.
79135func (r *TargetTcpProxiesService) SetProxyHeader(project string, targetTcpProxy string, targettcpproxiessetproxyheaderrequest *TargetTcpProxiesSetProxyHeaderRequest) *TargetTcpProxiesSetProxyHeaderCall {
79136	c := &TargetTcpProxiesSetProxyHeaderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
79137	c.project = project
79138	c.targetTcpProxy = targetTcpProxy
79139	c.targettcpproxiessetproxyheaderrequest = targettcpproxiessetproxyheaderrequest
79140	return c
79141}
79142
79143// RequestId sets the optional parameter "requestId": An optional
79144// request ID to identify requests. Specify a unique request ID so that
79145// if you must retry your request, the server will know to ignore the
79146// request if it has already been completed.
79147//
79148// For example, consider a situation where you make an initial request
79149// and the request times out. If you make the request again with the
79150// same request ID, the server can check if original operation with the
79151// same request ID was received, and if so, will ignore the second
79152// request. This prevents clients from accidentally creating duplicate
79153// commitments.
79154//
79155// The request ID must be a valid UUID with the exception that zero UUID
79156// is not supported (00000000-0000-0000-0000-000000000000).
79157func (c *TargetTcpProxiesSetProxyHeaderCall) RequestId(requestId string) *TargetTcpProxiesSetProxyHeaderCall {
79158	c.urlParams_.Set("requestId", requestId)
79159	return c
79160}
79161
79162// Fields allows partial responses to be retrieved. See
79163// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
79164// for more information.
79165func (c *TargetTcpProxiesSetProxyHeaderCall) Fields(s ...googleapi.Field) *TargetTcpProxiesSetProxyHeaderCall {
79166	c.urlParams_.Set("fields", googleapi.CombineFields(s))
79167	return c
79168}
79169
79170// Context sets the context to be used in this call's Do method. Any
79171// pending HTTP request will be aborted if the provided context is
79172// canceled.
79173func (c *TargetTcpProxiesSetProxyHeaderCall) Context(ctx context.Context) *TargetTcpProxiesSetProxyHeaderCall {
79174	c.ctx_ = ctx
79175	return c
79176}
79177
79178// Header returns an http.Header that can be modified by the caller to
79179// add HTTP headers to the request.
79180func (c *TargetTcpProxiesSetProxyHeaderCall) Header() http.Header {
79181	if c.header_ == nil {
79182		c.header_ = make(http.Header)
79183	}
79184	return c.header_
79185}
79186
79187func (c *TargetTcpProxiesSetProxyHeaderCall) doRequest(alt string) (*http.Response, error) {
79188	reqHeaders := make(http.Header)
79189	for k, v := range c.header_ {
79190		reqHeaders[k] = v
79191	}
79192	reqHeaders.Set("User-Agent", c.s.userAgent())
79193	var body io.Reader = nil
79194	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targettcpproxiessetproxyheaderrequest)
79195	if err != nil {
79196		return nil, err
79197	}
79198	reqHeaders.Set("Content-Type", "application/json")
79199	c.urlParams_.Set("alt", alt)
79200	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader")
79201	urls += "?" + c.urlParams_.Encode()
79202	req, _ := http.NewRequest("POST", urls, body)
79203	req.Header = reqHeaders
79204	googleapi.Expand(req.URL, map[string]string{
79205		"project":        c.project,
79206		"targetTcpProxy": c.targetTcpProxy,
79207	})
79208	return gensupport.SendRequest(c.ctx_, c.s.client, req)
79209}
79210
79211// Do executes the "compute.targetTcpProxies.setProxyHeader" call.
79212// Exactly one of *Operation or error will be non-nil. Any non-2xx
79213// status code is an error. Response headers are in either
79214// *Operation.ServerResponse.Header or (if a response was returned at
79215// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
79216// to check whether the returned error was because
79217// http.StatusNotModified was returned.
79218func (c *TargetTcpProxiesSetProxyHeaderCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
79219	gensupport.SetOptions(c.urlParams_, opts...)
79220	res, err := c.doRequest("json")
79221	if res != nil && res.StatusCode == http.StatusNotModified {
79222		if res.Body != nil {
79223			res.Body.Close()
79224		}
79225		return nil, &googleapi.Error{
79226			Code:   res.StatusCode,
79227			Header: res.Header,
79228		}
79229	}
79230	if err != nil {
79231		return nil, err
79232	}
79233	defer googleapi.CloseBody(res)
79234	if err := googleapi.CheckResponse(res); err != nil {
79235		return nil, err
79236	}
79237	ret := &Operation{
79238		ServerResponse: googleapi.ServerResponse{
79239			Header:         res.Header,
79240			HTTPStatusCode: res.StatusCode,
79241		},
79242	}
79243	target := &ret
79244	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
79245		return nil, err
79246	}
79247	return ret, nil
79248	// {
79249	//   "description": "Changes the ProxyHeaderType for TargetTcpProxy.",
79250	//   "httpMethod": "POST",
79251	//   "id": "compute.targetTcpProxies.setProxyHeader",
79252	//   "parameterOrder": [
79253	//     "project",
79254	//     "targetTcpProxy"
79255	//   ],
79256	//   "parameters": {
79257	//     "project": {
79258	//       "description": "Project ID for this request.",
79259	//       "location": "path",
79260	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
79261	//       "required": true,
79262	//       "type": "string"
79263	//     },
79264	//     "requestId": {
79265	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
79266	//       "location": "query",
79267	//       "type": "string"
79268	//     },
79269	//     "targetTcpProxy": {
79270	//       "description": "Name of the TargetTcpProxy resource whose ProxyHeader is to be set.",
79271	//       "location": "path",
79272	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
79273	//       "required": true,
79274	//       "type": "string"
79275	//     }
79276	//   },
79277	//   "path": "{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader",
79278	//   "request": {
79279	//     "$ref": "TargetTcpProxiesSetProxyHeaderRequest"
79280	//   },
79281	//   "response": {
79282	//     "$ref": "Operation"
79283	//   },
79284	//   "scopes": [
79285	//     "https://www.googleapis.com/auth/cloud-platform",
79286	//     "https://www.googleapis.com/auth/compute"
79287	//   ]
79288	// }
79289
79290}
79291
79292// method id "compute.targetVpnGateways.aggregatedList":
79293
79294type TargetVpnGatewaysAggregatedListCall struct {
79295	s            *Service
79296	project      string
79297	urlParams_   gensupport.URLParams
79298	ifNoneMatch_ string
79299	ctx_         context.Context
79300	header_      http.Header
79301}
79302
79303// AggregatedList: Retrieves an aggregated list of target VPN gateways.
79304func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall {
79305	c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
79306	c.project = project
79307	return c
79308}
79309
79310// Filter sets the optional parameter "filter": Sets a filter
79311// {expression} for filtering listed resources. Your {expression} must
79312// be in the format: field_name comparison_string literal_string.
79313//
79314// The field_name is the name of the field you want to compare. Only
79315// atomic field types are supported (string, number, boolean). The
79316// comparison_string must be either eq (equals) or ne (not equals). The
79317// literal_string is the string value to filter to. The literal value
79318// must be valid for the type of field you are filtering by (string,
79319// number, boolean). For string fields, the literal value is interpreted
79320// as a regular expression using RE2 syntax. The literal value must
79321// match the entire field.
79322//
79323// For example, to filter for instances that do not have a name of
79324// example-instance, you would use name ne example-instance.
79325//
79326// You can filter on nested fields. For example, you could filter on
79327// instances that have set the scheduling.automaticRestart field to
79328// true. Use filtering on nested fields to take advantage of labels to
79329// organize and search for results based on label values.
79330//
79331// To filter on multiple expressions, provide each separate expression
79332// within parentheses. For example, (scheduling.automaticRestart eq
79333// true) (zone eq us-central1-f). Multiple expressions are treated as
79334// AND expressions, meaning that resources must match all expressions to
79335// pass the filters.
79336func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall {
79337	c.urlParams_.Set("filter", filter)
79338	return c
79339}
79340
79341// MaxResults sets the optional parameter "maxResults": The maximum
79342// number of results per page that should be returned. If the number of
79343// available results is larger than maxResults, Compute Engine returns a
79344// nextPageToken that can be used to get the next page of results in
79345// subsequent list requests. Acceptable values are 0 to 500, inclusive.
79346// (Default: 500)
79347func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall {
79348	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
79349	return c
79350}
79351
79352// OrderBy sets the optional parameter "orderBy": Sorts list results by
79353// a certain order. By default, results are returned in alphanumerical
79354// order based on the resource name.
79355//
79356// You can also sort results in descending order based on the creation
79357// timestamp using orderBy="creationTimestamp desc". This sorts results
79358// based on the creationTimestamp field in reverse chronological order
79359// (newest result first). Use this to sort resources like operations so
79360// that the newest operation is returned first.
79361//
79362// Currently, only sorting by name or creationTimestamp desc is
79363// supported.
79364func (c *TargetVpnGatewaysAggregatedListCall) OrderBy(orderBy string) *TargetVpnGatewaysAggregatedListCall {
79365	c.urlParams_.Set("orderBy", orderBy)
79366	return c
79367}
79368
79369// PageToken sets the optional parameter "pageToken": Specifies a page
79370// token to use. Set pageToken to the nextPageToken returned by a
79371// previous list request to get the next page of results.
79372func (c *TargetVpnGatewaysAggregatedListCall) PageToken(pageToken string) *TargetVpnGatewaysAggregatedListCall {
79373	c.urlParams_.Set("pageToken", pageToken)
79374	return c
79375}
79376
79377// Fields allows partial responses to be retrieved. See
79378// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
79379// for more information.
79380func (c *TargetVpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysAggregatedListCall {
79381	c.urlParams_.Set("fields", googleapi.CombineFields(s))
79382	return c
79383}
79384
79385// IfNoneMatch sets the optional parameter which makes the operation
79386// fail if the object's ETag matches the given value. This is useful for
79387// getting updates only after the object has changed since the last
79388// request. Use googleapi.IsNotModified to check whether the response
79389// error from Do is the result of In-None-Match.
79390func (c *TargetVpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysAggregatedListCall {
79391	c.ifNoneMatch_ = entityTag
79392	return c
79393}
79394
79395// Context sets the context to be used in this call's Do method. Any
79396// pending HTTP request will be aborted if the provided context is
79397// canceled.
79398func (c *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall {
79399	c.ctx_ = ctx
79400	return c
79401}
79402
79403// Header returns an http.Header that can be modified by the caller to
79404// add HTTP headers to the request.
79405func (c *TargetVpnGatewaysAggregatedListCall) Header() http.Header {
79406	if c.header_ == nil {
79407		c.header_ = make(http.Header)
79408	}
79409	return c.header_
79410}
79411
79412func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) {
79413	reqHeaders := make(http.Header)
79414	for k, v := range c.header_ {
79415		reqHeaders[k] = v
79416	}
79417	reqHeaders.Set("User-Agent", c.s.userAgent())
79418	if c.ifNoneMatch_ != "" {
79419		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
79420	}
79421	var body io.Reader = nil
79422	c.urlParams_.Set("alt", alt)
79423	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetVpnGateways")
79424	urls += "?" + c.urlParams_.Encode()
79425	req, _ := http.NewRequest("GET", urls, body)
79426	req.Header = reqHeaders
79427	googleapi.Expand(req.URL, map[string]string{
79428		"project": c.project,
79429	})
79430	return gensupport.SendRequest(c.ctx_, c.s.client, req)
79431}
79432
79433// Do executes the "compute.targetVpnGateways.aggregatedList" call.
79434// Exactly one of *TargetVpnGatewayAggregatedList or error will be
79435// non-nil. Any non-2xx status code is an error. Response headers are in
79436// either *TargetVpnGatewayAggregatedList.ServerResponse.Header or (if a
79437// response was returned at all) in error.(*googleapi.Error).Header. Use
79438// googleapi.IsNotModified to check whether the returned error was
79439// because http.StatusNotModified was returned.
79440func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayAggregatedList, error) {
79441	gensupport.SetOptions(c.urlParams_, opts...)
79442	res, err := c.doRequest("json")
79443	if res != nil && res.StatusCode == http.StatusNotModified {
79444		if res.Body != nil {
79445			res.Body.Close()
79446		}
79447		return nil, &googleapi.Error{
79448			Code:   res.StatusCode,
79449			Header: res.Header,
79450		}
79451	}
79452	if err != nil {
79453		return nil, err
79454	}
79455	defer googleapi.CloseBody(res)
79456	if err := googleapi.CheckResponse(res); err != nil {
79457		return nil, err
79458	}
79459	ret := &TargetVpnGatewayAggregatedList{
79460		ServerResponse: googleapi.ServerResponse{
79461			Header:         res.Header,
79462			HTTPStatusCode: res.StatusCode,
79463		},
79464	}
79465	target := &ret
79466	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
79467		return nil, err
79468	}
79469	return ret, nil
79470	// {
79471	//   "description": "Retrieves an aggregated list of target VPN gateways.",
79472	//   "httpMethod": "GET",
79473	//   "id": "compute.targetVpnGateways.aggregatedList",
79474	//   "parameterOrder": [
79475	//     "project"
79476	//   ],
79477	//   "parameters": {
79478	//     "filter": {
79479	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
79480	//       "location": "query",
79481	//       "type": "string"
79482	//     },
79483	//     "maxResults": {
79484	//       "default": "500",
79485	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
79486	//       "format": "uint32",
79487	//       "location": "query",
79488	//       "minimum": "0",
79489	//       "type": "integer"
79490	//     },
79491	//     "orderBy": {
79492	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
79493	//       "location": "query",
79494	//       "type": "string"
79495	//     },
79496	//     "pageToken": {
79497	//       "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.",
79498	//       "location": "query",
79499	//       "type": "string"
79500	//     },
79501	//     "project": {
79502	//       "description": "Project ID for this request.",
79503	//       "location": "path",
79504	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
79505	//       "required": true,
79506	//       "type": "string"
79507	//     }
79508	//   },
79509	//   "path": "{project}/aggregated/targetVpnGateways",
79510	//   "response": {
79511	//     "$ref": "TargetVpnGatewayAggregatedList"
79512	//   },
79513	//   "scopes": [
79514	//     "https://www.googleapis.com/auth/cloud-platform",
79515	//     "https://www.googleapis.com/auth/compute",
79516	//     "https://www.googleapis.com/auth/compute.readonly"
79517	//   ]
79518	// }
79519
79520}
79521
79522// Pages invokes f for each page of results.
79523// A non-nil error returned from f will halt the iteration.
79524// The provided context supersedes any context provided to the Context method.
79525func (c *TargetVpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayAggregatedList) error) error {
79526	c.ctx_ = ctx
79527	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
79528	for {
79529		x, err := c.Do()
79530		if err != nil {
79531			return err
79532		}
79533		if err := f(x); err != nil {
79534			return err
79535		}
79536		if x.NextPageToken == "" {
79537			return nil
79538		}
79539		c.PageToken(x.NextPageToken)
79540	}
79541}
79542
79543// method id "compute.targetVpnGateways.delete":
79544
79545type TargetVpnGatewaysDeleteCall struct {
79546	s                *Service
79547	project          string
79548	region           string
79549	targetVpnGateway string
79550	urlParams_       gensupport.URLParams
79551	ctx_             context.Context
79552	header_          http.Header
79553}
79554
79555// Delete: Deletes the specified target VPN gateway.
79556func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall {
79557	c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
79558	c.project = project
79559	c.region = region
79560	c.targetVpnGateway = targetVpnGateway
79561	return c
79562}
79563
79564// RequestId sets the optional parameter "requestId": An optional
79565// request ID to identify requests. Specify a unique request ID so that
79566// if you must retry your request, the server will know to ignore the
79567// request if it has already been completed.
79568//
79569// For example, consider a situation where you make an initial request
79570// and the request times out. If you make the request again with the
79571// same request ID, the server can check if original operation with the
79572// same request ID was received, and if so, will ignore the second
79573// request. This prevents clients from accidentally creating duplicate
79574// commitments.
79575//
79576// The request ID must be a valid UUID with the exception that zero UUID
79577// is not supported (00000000-0000-0000-0000-000000000000).
79578func (c *TargetVpnGatewaysDeleteCall) RequestId(requestId string) *TargetVpnGatewaysDeleteCall {
79579	c.urlParams_.Set("requestId", requestId)
79580	return c
79581}
79582
79583// Fields allows partial responses to be retrieved. See
79584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
79585// for more information.
79586func (c *TargetVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysDeleteCall {
79587	c.urlParams_.Set("fields", googleapi.CombineFields(s))
79588	return c
79589}
79590
79591// Context sets the context to be used in this call's Do method. Any
79592// pending HTTP request will be aborted if the provided context is
79593// canceled.
79594func (c *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall {
79595	c.ctx_ = ctx
79596	return c
79597}
79598
79599// Header returns an http.Header that can be modified by the caller to
79600// add HTTP headers to the request.
79601func (c *TargetVpnGatewaysDeleteCall) Header() http.Header {
79602	if c.header_ == nil {
79603		c.header_ = make(http.Header)
79604	}
79605	return c.header_
79606}
79607
79608func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
79609	reqHeaders := make(http.Header)
79610	for k, v := range c.header_ {
79611		reqHeaders[k] = v
79612	}
79613	reqHeaders.Set("User-Agent", c.s.userAgent())
79614	var body io.Reader = nil
79615	c.urlParams_.Set("alt", alt)
79616	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}")
79617	urls += "?" + c.urlParams_.Encode()
79618	req, _ := http.NewRequest("DELETE", urls, body)
79619	req.Header = reqHeaders
79620	googleapi.Expand(req.URL, map[string]string{
79621		"project":          c.project,
79622		"region":           c.region,
79623		"targetVpnGateway": c.targetVpnGateway,
79624	})
79625	return gensupport.SendRequest(c.ctx_, c.s.client, req)
79626}
79627
79628// Do executes the "compute.targetVpnGateways.delete" call.
79629// Exactly one of *Operation or error will be non-nil. Any non-2xx
79630// status code is an error. Response headers are in either
79631// *Operation.ServerResponse.Header or (if a response was returned at
79632// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
79633// to check whether the returned error was because
79634// http.StatusNotModified was returned.
79635func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
79636	gensupport.SetOptions(c.urlParams_, opts...)
79637	res, err := c.doRequest("json")
79638	if res != nil && res.StatusCode == http.StatusNotModified {
79639		if res.Body != nil {
79640			res.Body.Close()
79641		}
79642		return nil, &googleapi.Error{
79643			Code:   res.StatusCode,
79644			Header: res.Header,
79645		}
79646	}
79647	if err != nil {
79648		return nil, err
79649	}
79650	defer googleapi.CloseBody(res)
79651	if err := googleapi.CheckResponse(res); err != nil {
79652		return nil, err
79653	}
79654	ret := &Operation{
79655		ServerResponse: googleapi.ServerResponse{
79656			Header:         res.Header,
79657			HTTPStatusCode: res.StatusCode,
79658		},
79659	}
79660	target := &ret
79661	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
79662		return nil, err
79663	}
79664	return ret, nil
79665	// {
79666	//   "description": "Deletes the specified target VPN gateway.",
79667	//   "httpMethod": "DELETE",
79668	//   "id": "compute.targetVpnGateways.delete",
79669	//   "parameterOrder": [
79670	//     "project",
79671	//     "region",
79672	//     "targetVpnGateway"
79673	//   ],
79674	//   "parameters": {
79675	//     "project": {
79676	//       "description": "Project ID for this request.",
79677	//       "location": "path",
79678	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
79679	//       "required": true,
79680	//       "type": "string"
79681	//     },
79682	//     "region": {
79683	//       "description": "Name of the region for this request.",
79684	//       "location": "path",
79685	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
79686	//       "required": true,
79687	//       "type": "string"
79688	//     },
79689	//     "requestId": {
79690	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
79691	//       "location": "query",
79692	//       "type": "string"
79693	//     },
79694	//     "targetVpnGateway": {
79695	//       "description": "Name of the target VPN gateway to delete.",
79696	//       "location": "path",
79697	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
79698	//       "required": true,
79699	//       "type": "string"
79700	//     }
79701	//   },
79702	//   "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}",
79703	//   "response": {
79704	//     "$ref": "Operation"
79705	//   },
79706	//   "scopes": [
79707	//     "https://www.googleapis.com/auth/cloud-platform",
79708	//     "https://www.googleapis.com/auth/compute"
79709	//   ]
79710	// }
79711
79712}
79713
79714// method id "compute.targetVpnGateways.get":
79715
79716type TargetVpnGatewaysGetCall struct {
79717	s                *Service
79718	project          string
79719	region           string
79720	targetVpnGateway string
79721	urlParams_       gensupport.URLParams
79722	ifNoneMatch_     string
79723	ctx_             context.Context
79724	header_          http.Header
79725}
79726
79727// Get: Returns the specified target VPN gateway. Get a list of
79728// available target VPN gateways by making a list() request.
79729func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall {
79730	c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
79731	c.project = project
79732	c.region = region
79733	c.targetVpnGateway = targetVpnGateway
79734	return c
79735}
79736
79737// Fields allows partial responses to be retrieved. See
79738// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
79739// for more information.
79740func (c *TargetVpnGatewaysGetCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysGetCall {
79741	c.urlParams_.Set("fields", googleapi.CombineFields(s))
79742	return c
79743}
79744
79745// IfNoneMatch sets the optional parameter which makes the operation
79746// fail if the object's ETag matches the given value. This is useful for
79747// getting updates only after the object has changed since the last
79748// request. Use googleapi.IsNotModified to check whether the response
79749// error from Do is the result of In-None-Match.
79750func (c *TargetVpnGatewaysGetCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysGetCall {
79751	c.ifNoneMatch_ = entityTag
79752	return c
79753}
79754
79755// Context sets the context to be used in this call's Do method. Any
79756// pending HTTP request will be aborted if the provided context is
79757// canceled.
79758func (c *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall {
79759	c.ctx_ = ctx
79760	return c
79761}
79762
79763// Header returns an http.Header that can be modified by the caller to
79764// add HTTP headers to the request.
79765func (c *TargetVpnGatewaysGetCall) Header() http.Header {
79766	if c.header_ == nil {
79767		c.header_ = make(http.Header)
79768	}
79769	return c.header_
79770}
79771
79772func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
79773	reqHeaders := make(http.Header)
79774	for k, v := range c.header_ {
79775		reqHeaders[k] = v
79776	}
79777	reqHeaders.Set("User-Agent", c.s.userAgent())
79778	if c.ifNoneMatch_ != "" {
79779		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
79780	}
79781	var body io.Reader = nil
79782	c.urlParams_.Set("alt", alt)
79783	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}")
79784	urls += "?" + c.urlParams_.Encode()
79785	req, _ := http.NewRequest("GET", urls, body)
79786	req.Header = reqHeaders
79787	googleapi.Expand(req.URL, map[string]string{
79788		"project":          c.project,
79789		"region":           c.region,
79790		"targetVpnGateway": c.targetVpnGateway,
79791	})
79792	return gensupport.SendRequest(c.ctx_, c.s.client, req)
79793}
79794
79795// Do executes the "compute.targetVpnGateways.get" call.
79796// Exactly one of *TargetVpnGateway or error will be non-nil. Any
79797// non-2xx status code is an error. Response headers are in either
79798// *TargetVpnGateway.ServerResponse.Header or (if a response was
79799// returned at all) in error.(*googleapi.Error).Header. Use
79800// googleapi.IsNotModified to check whether the returned error was
79801// because http.StatusNotModified was returned.
79802func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnGateway, error) {
79803	gensupport.SetOptions(c.urlParams_, opts...)
79804	res, err := c.doRequest("json")
79805	if res != nil && res.StatusCode == http.StatusNotModified {
79806		if res.Body != nil {
79807			res.Body.Close()
79808		}
79809		return nil, &googleapi.Error{
79810			Code:   res.StatusCode,
79811			Header: res.Header,
79812		}
79813	}
79814	if err != nil {
79815		return nil, err
79816	}
79817	defer googleapi.CloseBody(res)
79818	if err := googleapi.CheckResponse(res); err != nil {
79819		return nil, err
79820	}
79821	ret := &TargetVpnGateway{
79822		ServerResponse: googleapi.ServerResponse{
79823			Header:         res.Header,
79824			HTTPStatusCode: res.StatusCode,
79825		},
79826	}
79827	target := &ret
79828	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
79829		return nil, err
79830	}
79831	return ret, nil
79832	// {
79833	//   "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.",
79834	//   "httpMethod": "GET",
79835	//   "id": "compute.targetVpnGateways.get",
79836	//   "parameterOrder": [
79837	//     "project",
79838	//     "region",
79839	//     "targetVpnGateway"
79840	//   ],
79841	//   "parameters": {
79842	//     "project": {
79843	//       "description": "Project ID for this request.",
79844	//       "location": "path",
79845	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
79846	//       "required": true,
79847	//       "type": "string"
79848	//     },
79849	//     "region": {
79850	//       "description": "Name of the region for this request.",
79851	//       "location": "path",
79852	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
79853	//       "required": true,
79854	//       "type": "string"
79855	//     },
79856	//     "targetVpnGateway": {
79857	//       "description": "Name of the target VPN gateway to return.",
79858	//       "location": "path",
79859	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
79860	//       "required": true,
79861	//       "type": "string"
79862	//     }
79863	//   },
79864	//   "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}",
79865	//   "response": {
79866	//     "$ref": "TargetVpnGateway"
79867	//   },
79868	//   "scopes": [
79869	//     "https://www.googleapis.com/auth/cloud-platform",
79870	//     "https://www.googleapis.com/auth/compute",
79871	//     "https://www.googleapis.com/auth/compute.readonly"
79872	//   ]
79873	// }
79874
79875}
79876
79877// method id "compute.targetVpnGateways.insert":
79878
79879type TargetVpnGatewaysInsertCall struct {
79880	s                *Service
79881	project          string
79882	region           string
79883	targetvpngateway *TargetVpnGateway
79884	urlParams_       gensupport.URLParams
79885	ctx_             context.Context
79886	header_          http.Header
79887}
79888
79889// Insert: Creates a target VPN gateway in the specified project and
79890// region using the data included in the request.
79891func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall {
79892	c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
79893	c.project = project
79894	c.region = region
79895	c.targetvpngateway = targetvpngateway
79896	return c
79897}
79898
79899// RequestId sets the optional parameter "requestId": An optional
79900// request ID to identify requests. Specify a unique request ID so that
79901// if you must retry your request, the server will know to ignore the
79902// request if it has already been completed.
79903//
79904// For example, consider a situation where you make an initial request
79905// and the request times out. If you make the request again with the
79906// same request ID, the server can check if original operation with the
79907// same request ID was received, and if so, will ignore the second
79908// request. This prevents clients from accidentally creating duplicate
79909// commitments.
79910//
79911// The request ID must be a valid UUID with the exception that zero UUID
79912// is not supported (00000000-0000-0000-0000-000000000000).
79913func (c *TargetVpnGatewaysInsertCall) RequestId(requestId string) *TargetVpnGatewaysInsertCall {
79914	c.urlParams_.Set("requestId", requestId)
79915	return c
79916}
79917
79918// Fields allows partial responses to be retrieved. See
79919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
79920// for more information.
79921func (c *TargetVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysInsertCall {
79922	c.urlParams_.Set("fields", googleapi.CombineFields(s))
79923	return c
79924}
79925
79926// Context sets the context to be used in this call's Do method. Any
79927// pending HTTP request will be aborted if the provided context is
79928// canceled.
79929func (c *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall {
79930	c.ctx_ = ctx
79931	return c
79932}
79933
79934// Header returns an http.Header that can be modified by the caller to
79935// add HTTP headers to the request.
79936func (c *TargetVpnGatewaysInsertCall) Header() http.Header {
79937	if c.header_ == nil {
79938		c.header_ = make(http.Header)
79939	}
79940	return c.header_
79941}
79942
79943func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) {
79944	reqHeaders := make(http.Header)
79945	for k, v := range c.header_ {
79946		reqHeaders[k] = v
79947	}
79948	reqHeaders.Set("User-Agent", c.s.userAgent())
79949	var body io.Reader = nil
79950	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetvpngateway)
79951	if err != nil {
79952		return nil, err
79953	}
79954	reqHeaders.Set("Content-Type", "application/json")
79955	c.urlParams_.Set("alt", alt)
79956	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways")
79957	urls += "?" + c.urlParams_.Encode()
79958	req, _ := http.NewRequest("POST", urls, body)
79959	req.Header = reqHeaders
79960	googleapi.Expand(req.URL, map[string]string{
79961		"project": c.project,
79962		"region":  c.region,
79963	})
79964	return gensupport.SendRequest(c.ctx_, c.s.client, req)
79965}
79966
79967// Do executes the "compute.targetVpnGateways.insert" call.
79968// Exactly one of *Operation or error will be non-nil. Any non-2xx
79969// status code is an error. Response headers are in either
79970// *Operation.ServerResponse.Header or (if a response was returned at
79971// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
79972// to check whether the returned error was because
79973// http.StatusNotModified was returned.
79974func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
79975	gensupport.SetOptions(c.urlParams_, opts...)
79976	res, err := c.doRequest("json")
79977	if res != nil && res.StatusCode == http.StatusNotModified {
79978		if res.Body != nil {
79979			res.Body.Close()
79980		}
79981		return nil, &googleapi.Error{
79982			Code:   res.StatusCode,
79983			Header: res.Header,
79984		}
79985	}
79986	if err != nil {
79987		return nil, err
79988	}
79989	defer googleapi.CloseBody(res)
79990	if err := googleapi.CheckResponse(res); err != nil {
79991		return nil, err
79992	}
79993	ret := &Operation{
79994		ServerResponse: googleapi.ServerResponse{
79995			Header:         res.Header,
79996			HTTPStatusCode: res.StatusCode,
79997		},
79998	}
79999	target := &ret
80000	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
80001		return nil, err
80002	}
80003	return ret, nil
80004	// {
80005	//   "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.",
80006	//   "httpMethod": "POST",
80007	//   "id": "compute.targetVpnGateways.insert",
80008	//   "parameterOrder": [
80009	//     "project",
80010	//     "region"
80011	//   ],
80012	//   "parameters": {
80013	//     "project": {
80014	//       "description": "Project ID for this request.",
80015	//       "location": "path",
80016	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
80017	//       "required": true,
80018	//       "type": "string"
80019	//     },
80020	//     "region": {
80021	//       "description": "Name of the region for this request.",
80022	//       "location": "path",
80023	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
80024	//       "required": true,
80025	//       "type": "string"
80026	//     },
80027	//     "requestId": {
80028	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
80029	//       "location": "query",
80030	//       "type": "string"
80031	//     }
80032	//   },
80033	//   "path": "{project}/regions/{region}/targetVpnGateways",
80034	//   "request": {
80035	//     "$ref": "TargetVpnGateway"
80036	//   },
80037	//   "response": {
80038	//     "$ref": "Operation"
80039	//   },
80040	//   "scopes": [
80041	//     "https://www.googleapis.com/auth/cloud-platform",
80042	//     "https://www.googleapis.com/auth/compute"
80043	//   ]
80044	// }
80045
80046}
80047
80048// method id "compute.targetVpnGateways.list":
80049
80050type TargetVpnGatewaysListCall struct {
80051	s            *Service
80052	project      string
80053	region       string
80054	urlParams_   gensupport.URLParams
80055	ifNoneMatch_ string
80056	ctx_         context.Context
80057	header_      http.Header
80058}
80059
80060// List: Retrieves a list of target VPN gateways available to the
80061// specified project and region.
80062func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall {
80063	c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
80064	c.project = project
80065	c.region = region
80066	return c
80067}
80068
80069// Filter sets the optional parameter "filter": Sets a filter
80070// {expression} for filtering listed resources. Your {expression} must
80071// be in the format: field_name comparison_string literal_string.
80072//
80073// The field_name is the name of the field you want to compare. Only
80074// atomic field types are supported (string, number, boolean). The
80075// comparison_string must be either eq (equals) or ne (not equals). The
80076// literal_string is the string value to filter to. The literal value
80077// must be valid for the type of field you are filtering by (string,
80078// number, boolean). For string fields, the literal value is interpreted
80079// as a regular expression using RE2 syntax. The literal value must
80080// match the entire field.
80081//
80082// For example, to filter for instances that do not have a name of
80083// example-instance, you would use name ne example-instance.
80084//
80085// You can filter on nested fields. For example, you could filter on
80086// instances that have set the scheduling.automaticRestart field to
80087// true. Use filtering on nested fields to take advantage of labels to
80088// organize and search for results based on label values.
80089//
80090// To filter on multiple expressions, provide each separate expression
80091// within parentheses. For example, (scheduling.automaticRestart eq
80092// true) (zone eq us-central1-f). Multiple expressions are treated as
80093// AND expressions, meaning that resources must match all expressions to
80094// pass the filters.
80095func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall {
80096	c.urlParams_.Set("filter", filter)
80097	return c
80098}
80099
80100// MaxResults sets the optional parameter "maxResults": The maximum
80101// number of results per page that should be returned. If the number of
80102// available results is larger than maxResults, Compute Engine returns a
80103// nextPageToken that can be used to get the next page of results in
80104// subsequent list requests. Acceptable values are 0 to 500, inclusive.
80105// (Default: 500)
80106func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall {
80107	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
80108	return c
80109}
80110
80111// OrderBy sets the optional parameter "orderBy": Sorts list results by
80112// a certain order. By default, results are returned in alphanumerical
80113// order based on the resource name.
80114//
80115// You can also sort results in descending order based on the creation
80116// timestamp using orderBy="creationTimestamp desc". This sorts results
80117// based on the creationTimestamp field in reverse chronological order
80118// (newest result first). Use this to sort resources like operations so
80119// that the newest operation is returned first.
80120//
80121// Currently, only sorting by name or creationTimestamp desc is
80122// supported.
80123func (c *TargetVpnGatewaysListCall) OrderBy(orderBy string) *TargetVpnGatewaysListCall {
80124	c.urlParams_.Set("orderBy", orderBy)
80125	return c
80126}
80127
80128// PageToken sets the optional parameter "pageToken": Specifies a page
80129// token to use. Set pageToken to the nextPageToken returned by a
80130// previous list request to get the next page of results.
80131func (c *TargetVpnGatewaysListCall) PageToken(pageToken string) *TargetVpnGatewaysListCall {
80132	c.urlParams_.Set("pageToken", pageToken)
80133	return c
80134}
80135
80136// Fields allows partial responses to be retrieved. See
80137// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
80138// for more information.
80139func (c *TargetVpnGatewaysListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysListCall {
80140	c.urlParams_.Set("fields", googleapi.CombineFields(s))
80141	return c
80142}
80143
80144// IfNoneMatch sets the optional parameter which makes the operation
80145// fail if the object's ETag matches the given value. This is useful for
80146// getting updates only after the object has changed since the last
80147// request. Use googleapi.IsNotModified to check whether the response
80148// error from Do is the result of In-None-Match.
80149func (c *TargetVpnGatewaysListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysListCall {
80150	c.ifNoneMatch_ = entityTag
80151	return c
80152}
80153
80154// Context sets the context to be used in this call's Do method. Any
80155// pending HTTP request will be aborted if the provided context is
80156// canceled.
80157func (c *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall {
80158	c.ctx_ = ctx
80159	return c
80160}
80161
80162// Header returns an http.Header that can be modified by the caller to
80163// add HTTP headers to the request.
80164func (c *TargetVpnGatewaysListCall) Header() http.Header {
80165	if c.header_ == nil {
80166		c.header_ = make(http.Header)
80167	}
80168	return c.header_
80169}
80170
80171func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) {
80172	reqHeaders := make(http.Header)
80173	for k, v := range c.header_ {
80174		reqHeaders[k] = v
80175	}
80176	reqHeaders.Set("User-Agent", c.s.userAgent())
80177	if c.ifNoneMatch_ != "" {
80178		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
80179	}
80180	var body io.Reader = nil
80181	c.urlParams_.Set("alt", alt)
80182	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways")
80183	urls += "?" + c.urlParams_.Encode()
80184	req, _ := http.NewRequest("GET", urls, body)
80185	req.Header = reqHeaders
80186	googleapi.Expand(req.URL, map[string]string{
80187		"project": c.project,
80188		"region":  c.region,
80189	})
80190	return gensupport.SendRequest(c.ctx_, c.s.client, req)
80191}
80192
80193// Do executes the "compute.targetVpnGateways.list" call.
80194// Exactly one of *TargetVpnGatewayList or error will be non-nil. Any
80195// non-2xx status code is an error. Response headers are in either
80196// *TargetVpnGatewayList.ServerResponse.Header or (if a response was
80197// returned at all) in error.(*googleapi.Error).Header. Use
80198// googleapi.IsNotModified to check whether the returned error was
80199// because http.StatusNotModified was returned.
80200func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayList, error) {
80201	gensupport.SetOptions(c.urlParams_, opts...)
80202	res, err := c.doRequest("json")
80203	if res != nil && res.StatusCode == http.StatusNotModified {
80204		if res.Body != nil {
80205			res.Body.Close()
80206		}
80207		return nil, &googleapi.Error{
80208			Code:   res.StatusCode,
80209			Header: res.Header,
80210		}
80211	}
80212	if err != nil {
80213		return nil, err
80214	}
80215	defer googleapi.CloseBody(res)
80216	if err := googleapi.CheckResponse(res); err != nil {
80217		return nil, err
80218	}
80219	ret := &TargetVpnGatewayList{
80220		ServerResponse: googleapi.ServerResponse{
80221			Header:         res.Header,
80222			HTTPStatusCode: res.StatusCode,
80223		},
80224	}
80225	target := &ret
80226	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
80227		return nil, err
80228	}
80229	return ret, nil
80230	// {
80231	//   "description": "Retrieves a list of target VPN gateways available to the specified project and region.",
80232	//   "httpMethod": "GET",
80233	//   "id": "compute.targetVpnGateways.list",
80234	//   "parameterOrder": [
80235	//     "project",
80236	//     "region"
80237	//   ],
80238	//   "parameters": {
80239	//     "filter": {
80240	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
80241	//       "location": "query",
80242	//       "type": "string"
80243	//     },
80244	//     "maxResults": {
80245	//       "default": "500",
80246	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
80247	//       "format": "uint32",
80248	//       "location": "query",
80249	//       "minimum": "0",
80250	//       "type": "integer"
80251	//     },
80252	//     "orderBy": {
80253	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
80254	//       "location": "query",
80255	//       "type": "string"
80256	//     },
80257	//     "pageToken": {
80258	//       "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.",
80259	//       "location": "query",
80260	//       "type": "string"
80261	//     },
80262	//     "project": {
80263	//       "description": "Project ID for this request.",
80264	//       "location": "path",
80265	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
80266	//       "required": true,
80267	//       "type": "string"
80268	//     },
80269	//     "region": {
80270	//       "description": "Name of the region for this request.",
80271	//       "location": "path",
80272	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
80273	//       "required": true,
80274	//       "type": "string"
80275	//     }
80276	//   },
80277	//   "path": "{project}/regions/{region}/targetVpnGateways",
80278	//   "response": {
80279	//     "$ref": "TargetVpnGatewayList"
80280	//   },
80281	//   "scopes": [
80282	//     "https://www.googleapis.com/auth/cloud-platform",
80283	//     "https://www.googleapis.com/auth/compute",
80284	//     "https://www.googleapis.com/auth/compute.readonly"
80285	//   ]
80286	// }
80287
80288}
80289
80290// Pages invokes f for each page of results.
80291// A non-nil error returned from f will halt the iteration.
80292// The provided context supersedes any context provided to the Context method.
80293func (c *TargetVpnGatewaysListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayList) error) error {
80294	c.ctx_ = ctx
80295	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
80296	for {
80297		x, err := c.Do()
80298		if err != nil {
80299			return err
80300		}
80301		if err := f(x); err != nil {
80302			return err
80303		}
80304		if x.NextPageToken == "" {
80305			return nil
80306		}
80307		c.PageToken(x.NextPageToken)
80308	}
80309}
80310
80311// method id "compute.targetVpnGateways.testIamPermissions":
80312
80313type TargetVpnGatewaysTestIamPermissionsCall struct {
80314	s                      *Service
80315	project                string
80316	region                 string
80317	resource               string
80318	testpermissionsrequest *TestPermissionsRequest
80319	urlParams_             gensupport.URLParams
80320	ctx_                   context.Context
80321	header_                http.Header
80322}
80323
80324// TestIamPermissions: Returns permissions that a caller has on the
80325// specified resource.
80326func (r *TargetVpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetVpnGatewaysTestIamPermissionsCall {
80327	c := &TargetVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
80328	c.project = project
80329	c.region = region
80330	c.resource = resource
80331	c.testpermissionsrequest = testpermissionsrequest
80332	return c
80333}
80334
80335// Fields allows partial responses to be retrieved. See
80336// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
80337// for more information.
80338func (c *TargetVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysTestIamPermissionsCall {
80339	c.urlParams_.Set("fields", googleapi.CombineFields(s))
80340	return c
80341}
80342
80343// Context sets the context to be used in this call's Do method. Any
80344// pending HTTP request will be aborted if the provided context is
80345// canceled.
80346func (c *TargetVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *TargetVpnGatewaysTestIamPermissionsCall {
80347	c.ctx_ = ctx
80348	return c
80349}
80350
80351// Header returns an http.Header that can be modified by the caller to
80352// add HTTP headers to the request.
80353func (c *TargetVpnGatewaysTestIamPermissionsCall) Header() http.Header {
80354	if c.header_ == nil {
80355		c.header_ = make(http.Header)
80356	}
80357	return c.header_
80358}
80359
80360func (c *TargetVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
80361	reqHeaders := make(http.Header)
80362	for k, v := range c.header_ {
80363		reqHeaders[k] = v
80364	}
80365	reqHeaders.Set("User-Agent", c.s.userAgent())
80366	var body io.Reader = nil
80367	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
80368	if err != nil {
80369		return nil, err
80370	}
80371	reqHeaders.Set("Content-Type", "application/json")
80372	c.urlParams_.Set("alt", alt)
80373	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions")
80374	urls += "?" + c.urlParams_.Encode()
80375	req, _ := http.NewRequest("POST", urls, body)
80376	req.Header = reqHeaders
80377	googleapi.Expand(req.URL, map[string]string{
80378		"project":  c.project,
80379		"region":   c.region,
80380		"resource": c.resource,
80381	})
80382	return gensupport.SendRequest(c.ctx_, c.s.client, req)
80383}
80384
80385// Do executes the "compute.targetVpnGateways.testIamPermissions" call.
80386// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
80387// non-2xx status code is an error. Response headers are in either
80388// *TestPermissionsResponse.ServerResponse.Header or (if a response was
80389// returned at all) in error.(*googleapi.Error).Header. Use
80390// googleapi.IsNotModified to check whether the returned error was
80391// because http.StatusNotModified was returned.
80392func (c *TargetVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
80393	gensupport.SetOptions(c.urlParams_, opts...)
80394	res, err := c.doRequest("json")
80395	if res != nil && res.StatusCode == http.StatusNotModified {
80396		if res.Body != nil {
80397			res.Body.Close()
80398		}
80399		return nil, &googleapi.Error{
80400			Code:   res.StatusCode,
80401			Header: res.Header,
80402		}
80403	}
80404	if err != nil {
80405		return nil, err
80406	}
80407	defer googleapi.CloseBody(res)
80408	if err := googleapi.CheckResponse(res); err != nil {
80409		return nil, err
80410	}
80411	ret := &TestPermissionsResponse{
80412		ServerResponse: googleapi.ServerResponse{
80413			Header:         res.Header,
80414			HTTPStatusCode: res.StatusCode,
80415		},
80416	}
80417	target := &ret
80418	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
80419		return nil, err
80420	}
80421	return ret, nil
80422	// {
80423	//   "description": "Returns permissions that a caller has on the specified resource.",
80424	//   "httpMethod": "POST",
80425	//   "id": "compute.targetVpnGateways.testIamPermissions",
80426	//   "parameterOrder": [
80427	//     "project",
80428	//     "region",
80429	//     "resource"
80430	//   ],
80431	//   "parameters": {
80432	//     "project": {
80433	//       "description": "Project ID for this request.",
80434	//       "location": "path",
80435	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
80436	//       "required": true,
80437	//       "type": "string"
80438	//     },
80439	//     "region": {
80440	//       "description": "The name of the region for this request.",
80441	//       "location": "path",
80442	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
80443	//       "required": true,
80444	//       "type": "string"
80445	//     },
80446	//     "resource": {
80447	//       "description": "Name of the resource for this request.",
80448	//       "location": "path",
80449	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
80450	//       "required": true,
80451	//       "type": "string"
80452	//     }
80453	//   },
80454	//   "path": "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions",
80455	//   "request": {
80456	//     "$ref": "TestPermissionsRequest"
80457	//   },
80458	//   "response": {
80459	//     "$ref": "TestPermissionsResponse"
80460	//   },
80461	//   "scopes": [
80462	//     "https://www.googleapis.com/auth/cloud-platform",
80463	//     "https://www.googleapis.com/auth/compute",
80464	//     "https://www.googleapis.com/auth/compute.readonly"
80465	//   ]
80466	// }
80467
80468}
80469
80470// method id "compute.urlMaps.delete":
80471
80472type UrlMapsDeleteCall struct {
80473	s          *Service
80474	project    string
80475	urlMap     string
80476	urlParams_ gensupport.URLParams
80477	ctx_       context.Context
80478	header_    http.Header
80479}
80480
80481// Delete: Deletes the specified UrlMap resource.
80482// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/delete
80483func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall {
80484	c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
80485	c.project = project
80486	c.urlMap = urlMap
80487	return c
80488}
80489
80490// RequestId sets the optional parameter "requestId": An optional
80491// request ID to identify requests. Specify a unique request ID so that
80492// if you must retry your request, the server will know to ignore the
80493// request if it has already been completed.
80494//
80495// For example, consider a situation where you make an initial request
80496// and the request times out. If you make the request again with the
80497// same request ID, the server can check if original operation with the
80498// same request ID was received, and if so, will ignore the second
80499// request. This prevents clients from accidentally creating duplicate
80500// commitments.
80501//
80502// The request ID must be a valid UUID with the exception that zero UUID
80503// is not supported (00000000-0000-0000-0000-000000000000).
80504func (c *UrlMapsDeleteCall) RequestId(requestId string) *UrlMapsDeleteCall {
80505	c.urlParams_.Set("requestId", requestId)
80506	return c
80507}
80508
80509// Fields allows partial responses to be retrieved. See
80510// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
80511// for more information.
80512func (c *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall {
80513	c.urlParams_.Set("fields", googleapi.CombineFields(s))
80514	return c
80515}
80516
80517// Context sets the context to be used in this call's Do method. Any
80518// pending HTTP request will be aborted if the provided context is
80519// canceled.
80520func (c *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall {
80521	c.ctx_ = ctx
80522	return c
80523}
80524
80525// Header returns an http.Header that can be modified by the caller to
80526// add HTTP headers to the request.
80527func (c *UrlMapsDeleteCall) Header() http.Header {
80528	if c.header_ == nil {
80529		c.header_ = make(http.Header)
80530	}
80531	return c.header_
80532}
80533
80534func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) {
80535	reqHeaders := make(http.Header)
80536	for k, v := range c.header_ {
80537		reqHeaders[k] = v
80538	}
80539	reqHeaders.Set("User-Agent", c.s.userAgent())
80540	var body io.Reader = nil
80541	c.urlParams_.Set("alt", alt)
80542	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
80543	urls += "?" + c.urlParams_.Encode()
80544	req, _ := http.NewRequest("DELETE", urls, body)
80545	req.Header = reqHeaders
80546	googleapi.Expand(req.URL, map[string]string{
80547		"project": c.project,
80548		"urlMap":  c.urlMap,
80549	})
80550	return gensupport.SendRequest(c.ctx_, c.s.client, req)
80551}
80552
80553// Do executes the "compute.urlMaps.delete" call.
80554// Exactly one of *Operation or error will be non-nil. Any non-2xx
80555// status code is an error. Response headers are in either
80556// *Operation.ServerResponse.Header or (if a response was returned at
80557// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
80558// to check whether the returned error was because
80559// http.StatusNotModified was returned.
80560func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
80561	gensupport.SetOptions(c.urlParams_, opts...)
80562	res, err := c.doRequest("json")
80563	if res != nil && res.StatusCode == http.StatusNotModified {
80564		if res.Body != nil {
80565			res.Body.Close()
80566		}
80567		return nil, &googleapi.Error{
80568			Code:   res.StatusCode,
80569			Header: res.Header,
80570		}
80571	}
80572	if err != nil {
80573		return nil, err
80574	}
80575	defer googleapi.CloseBody(res)
80576	if err := googleapi.CheckResponse(res); err != nil {
80577		return nil, err
80578	}
80579	ret := &Operation{
80580		ServerResponse: googleapi.ServerResponse{
80581			Header:         res.Header,
80582			HTTPStatusCode: res.StatusCode,
80583		},
80584	}
80585	target := &ret
80586	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
80587		return nil, err
80588	}
80589	return ret, nil
80590	// {
80591	//   "description": "Deletes the specified UrlMap resource.",
80592	//   "httpMethod": "DELETE",
80593	//   "id": "compute.urlMaps.delete",
80594	//   "parameterOrder": [
80595	//     "project",
80596	//     "urlMap"
80597	//   ],
80598	//   "parameters": {
80599	//     "project": {
80600	//       "description": "Project ID for this request.",
80601	//       "location": "path",
80602	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
80603	//       "required": true,
80604	//       "type": "string"
80605	//     },
80606	//     "requestId": {
80607	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
80608	//       "location": "query",
80609	//       "type": "string"
80610	//     },
80611	//     "urlMap": {
80612	//       "description": "Name of the UrlMap resource to delete.",
80613	//       "location": "path",
80614	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
80615	//       "required": true,
80616	//       "type": "string"
80617	//     }
80618	//   },
80619	//   "path": "{project}/global/urlMaps/{urlMap}",
80620	//   "response": {
80621	//     "$ref": "Operation"
80622	//   },
80623	//   "scopes": [
80624	//     "https://www.googleapis.com/auth/cloud-platform",
80625	//     "https://www.googleapis.com/auth/compute"
80626	//   ]
80627	// }
80628
80629}
80630
80631// method id "compute.urlMaps.get":
80632
80633type UrlMapsGetCall struct {
80634	s            *Service
80635	project      string
80636	urlMap       string
80637	urlParams_   gensupport.URLParams
80638	ifNoneMatch_ string
80639	ctx_         context.Context
80640	header_      http.Header
80641}
80642
80643// Get: Returns the specified UrlMap resource. Get a list of available
80644// URL maps by making a list() request.
80645// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get
80646func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall {
80647	c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
80648	c.project = project
80649	c.urlMap = urlMap
80650	return c
80651}
80652
80653// Fields allows partial responses to be retrieved. See
80654// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
80655// for more information.
80656func (c *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall {
80657	c.urlParams_.Set("fields", googleapi.CombineFields(s))
80658	return c
80659}
80660
80661// IfNoneMatch sets the optional parameter which makes the operation
80662// fail if the object's ETag matches the given value. This is useful for
80663// getting updates only after the object has changed since the last
80664// request. Use googleapi.IsNotModified to check whether the response
80665// error from Do is the result of In-None-Match.
80666func (c *UrlMapsGetCall) IfNoneMatch(entityTag string) *UrlMapsGetCall {
80667	c.ifNoneMatch_ = entityTag
80668	return c
80669}
80670
80671// Context sets the context to be used in this call's Do method. Any
80672// pending HTTP request will be aborted if the provided context is
80673// canceled.
80674func (c *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall {
80675	c.ctx_ = ctx
80676	return c
80677}
80678
80679// Header returns an http.Header that can be modified by the caller to
80680// add HTTP headers to the request.
80681func (c *UrlMapsGetCall) Header() http.Header {
80682	if c.header_ == nil {
80683		c.header_ = make(http.Header)
80684	}
80685	return c.header_
80686}
80687
80688func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) {
80689	reqHeaders := make(http.Header)
80690	for k, v := range c.header_ {
80691		reqHeaders[k] = v
80692	}
80693	reqHeaders.Set("User-Agent", c.s.userAgent())
80694	if c.ifNoneMatch_ != "" {
80695		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
80696	}
80697	var body io.Reader = nil
80698	c.urlParams_.Set("alt", alt)
80699	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
80700	urls += "?" + c.urlParams_.Encode()
80701	req, _ := http.NewRequest("GET", urls, body)
80702	req.Header = reqHeaders
80703	googleapi.Expand(req.URL, map[string]string{
80704		"project": c.project,
80705		"urlMap":  c.urlMap,
80706	})
80707	return gensupport.SendRequest(c.ctx_, c.s.client, req)
80708}
80709
80710// Do executes the "compute.urlMaps.get" call.
80711// Exactly one of *UrlMap or error will be non-nil. Any non-2xx status
80712// code is an error. Response headers are in either
80713// *UrlMap.ServerResponse.Header or (if a response was returned at all)
80714// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
80715// check whether the returned error was because http.StatusNotModified
80716// was returned.
80717func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) {
80718	gensupport.SetOptions(c.urlParams_, opts...)
80719	res, err := c.doRequest("json")
80720	if res != nil && res.StatusCode == http.StatusNotModified {
80721		if res.Body != nil {
80722			res.Body.Close()
80723		}
80724		return nil, &googleapi.Error{
80725			Code:   res.StatusCode,
80726			Header: res.Header,
80727		}
80728	}
80729	if err != nil {
80730		return nil, err
80731	}
80732	defer googleapi.CloseBody(res)
80733	if err := googleapi.CheckResponse(res); err != nil {
80734		return nil, err
80735	}
80736	ret := &UrlMap{
80737		ServerResponse: googleapi.ServerResponse{
80738			Header:         res.Header,
80739			HTTPStatusCode: res.StatusCode,
80740		},
80741	}
80742	target := &ret
80743	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
80744		return nil, err
80745	}
80746	return ret, nil
80747	// {
80748	//   "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.",
80749	//   "httpMethod": "GET",
80750	//   "id": "compute.urlMaps.get",
80751	//   "parameterOrder": [
80752	//     "project",
80753	//     "urlMap"
80754	//   ],
80755	//   "parameters": {
80756	//     "project": {
80757	//       "description": "Project ID for this request.",
80758	//       "location": "path",
80759	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
80760	//       "required": true,
80761	//       "type": "string"
80762	//     },
80763	//     "urlMap": {
80764	//       "description": "Name of the UrlMap resource to return.",
80765	//       "location": "path",
80766	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
80767	//       "required": true,
80768	//       "type": "string"
80769	//     }
80770	//   },
80771	//   "path": "{project}/global/urlMaps/{urlMap}",
80772	//   "response": {
80773	//     "$ref": "UrlMap"
80774	//   },
80775	//   "scopes": [
80776	//     "https://www.googleapis.com/auth/cloud-platform",
80777	//     "https://www.googleapis.com/auth/compute",
80778	//     "https://www.googleapis.com/auth/compute.readonly"
80779	//   ]
80780	// }
80781
80782}
80783
80784// method id "compute.urlMaps.insert":
80785
80786type UrlMapsInsertCall struct {
80787	s          *Service
80788	project    string
80789	urlmap     *UrlMap
80790	urlParams_ gensupport.URLParams
80791	ctx_       context.Context
80792	header_    http.Header
80793}
80794
80795// Insert: Creates a UrlMap resource in the specified project using the
80796// data included in the request.
80797// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/insert
80798func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall {
80799	c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
80800	c.project = project
80801	c.urlmap = urlmap
80802	return c
80803}
80804
80805// RequestId sets the optional parameter "requestId": An optional
80806// request ID to identify requests. Specify a unique request ID so that
80807// if you must retry your request, the server will know to ignore the
80808// request if it has already been completed.
80809//
80810// For example, consider a situation where you make an initial request
80811// and the request times out. If you make the request again with the
80812// same request ID, the server can check if original operation with the
80813// same request ID was received, and if so, will ignore the second
80814// request. This prevents clients from accidentally creating duplicate
80815// commitments.
80816//
80817// The request ID must be a valid UUID with the exception that zero UUID
80818// is not supported (00000000-0000-0000-0000-000000000000).
80819func (c *UrlMapsInsertCall) RequestId(requestId string) *UrlMapsInsertCall {
80820	c.urlParams_.Set("requestId", requestId)
80821	return c
80822}
80823
80824// Fields allows partial responses to be retrieved. See
80825// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
80826// for more information.
80827func (c *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall {
80828	c.urlParams_.Set("fields", googleapi.CombineFields(s))
80829	return c
80830}
80831
80832// Context sets the context to be used in this call's Do method. Any
80833// pending HTTP request will be aborted if the provided context is
80834// canceled.
80835func (c *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall {
80836	c.ctx_ = ctx
80837	return c
80838}
80839
80840// Header returns an http.Header that can be modified by the caller to
80841// add HTTP headers to the request.
80842func (c *UrlMapsInsertCall) Header() http.Header {
80843	if c.header_ == nil {
80844		c.header_ = make(http.Header)
80845	}
80846	return c.header_
80847}
80848
80849func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) {
80850	reqHeaders := make(http.Header)
80851	for k, v := range c.header_ {
80852		reqHeaders[k] = v
80853	}
80854	reqHeaders.Set("User-Agent", c.s.userAgent())
80855	var body io.Reader = nil
80856	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
80857	if err != nil {
80858		return nil, err
80859	}
80860	reqHeaders.Set("Content-Type", "application/json")
80861	c.urlParams_.Set("alt", alt)
80862	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps")
80863	urls += "?" + c.urlParams_.Encode()
80864	req, _ := http.NewRequest("POST", urls, body)
80865	req.Header = reqHeaders
80866	googleapi.Expand(req.URL, map[string]string{
80867		"project": c.project,
80868	})
80869	return gensupport.SendRequest(c.ctx_, c.s.client, req)
80870}
80871
80872// Do executes the "compute.urlMaps.insert" call.
80873// Exactly one of *Operation or error will be non-nil. Any non-2xx
80874// status code is an error. Response headers are in either
80875// *Operation.ServerResponse.Header or (if a response was returned at
80876// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
80877// to check whether the returned error was because
80878// http.StatusNotModified was returned.
80879func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
80880	gensupport.SetOptions(c.urlParams_, opts...)
80881	res, err := c.doRequest("json")
80882	if res != nil && res.StatusCode == http.StatusNotModified {
80883		if res.Body != nil {
80884			res.Body.Close()
80885		}
80886		return nil, &googleapi.Error{
80887			Code:   res.StatusCode,
80888			Header: res.Header,
80889		}
80890	}
80891	if err != nil {
80892		return nil, err
80893	}
80894	defer googleapi.CloseBody(res)
80895	if err := googleapi.CheckResponse(res); err != nil {
80896		return nil, err
80897	}
80898	ret := &Operation{
80899		ServerResponse: googleapi.ServerResponse{
80900			Header:         res.Header,
80901			HTTPStatusCode: res.StatusCode,
80902		},
80903	}
80904	target := &ret
80905	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
80906		return nil, err
80907	}
80908	return ret, nil
80909	// {
80910	//   "description": "Creates a UrlMap resource in the specified project using the data included in the request.",
80911	//   "httpMethod": "POST",
80912	//   "id": "compute.urlMaps.insert",
80913	//   "parameterOrder": [
80914	//     "project"
80915	//   ],
80916	//   "parameters": {
80917	//     "project": {
80918	//       "description": "Project ID for this request.",
80919	//       "location": "path",
80920	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
80921	//       "required": true,
80922	//       "type": "string"
80923	//     },
80924	//     "requestId": {
80925	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
80926	//       "location": "query",
80927	//       "type": "string"
80928	//     }
80929	//   },
80930	//   "path": "{project}/global/urlMaps",
80931	//   "request": {
80932	//     "$ref": "UrlMap"
80933	//   },
80934	//   "response": {
80935	//     "$ref": "Operation"
80936	//   },
80937	//   "scopes": [
80938	//     "https://www.googleapis.com/auth/cloud-platform",
80939	//     "https://www.googleapis.com/auth/compute"
80940	//   ]
80941	// }
80942
80943}
80944
80945// method id "compute.urlMaps.invalidateCache":
80946
80947type UrlMapsInvalidateCacheCall struct {
80948	s                     *Service
80949	project               string
80950	urlMap                string
80951	cacheinvalidationrule *CacheInvalidationRule
80952	urlParams_            gensupport.URLParams
80953	ctx_                  context.Context
80954	header_               http.Header
80955}
80956
80957// InvalidateCache: Initiates a cache invalidation operation,
80958// invalidating the specified path, scoped to the specified UrlMap.
80959func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall {
80960	c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)}
80961	c.project = project
80962	c.urlMap = urlMap
80963	c.cacheinvalidationrule = cacheinvalidationrule
80964	return c
80965}
80966
80967// RequestId sets the optional parameter "requestId": An optional
80968// request ID to identify requests. Specify a unique request ID so that
80969// if you must retry your request, the server will know to ignore the
80970// request if it has already been completed.
80971//
80972// For example, consider a situation where you make an initial request
80973// and the request times out. If you make the request again with the
80974// same request ID, the server can check if original operation with the
80975// same request ID was received, and if so, will ignore the second
80976// request. This prevents clients from accidentally creating duplicate
80977// commitments.
80978//
80979// The request ID must be a valid UUID with the exception that zero UUID
80980// is not supported (00000000-0000-0000-0000-000000000000).
80981func (c *UrlMapsInvalidateCacheCall) RequestId(requestId string) *UrlMapsInvalidateCacheCall {
80982	c.urlParams_.Set("requestId", requestId)
80983	return c
80984}
80985
80986// Fields allows partial responses to be retrieved. See
80987// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
80988// for more information.
80989func (c *UrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *UrlMapsInvalidateCacheCall {
80990	c.urlParams_.Set("fields", googleapi.CombineFields(s))
80991	return c
80992}
80993
80994// Context sets the context to be used in this call's Do method. Any
80995// pending HTTP request will be aborted if the provided context is
80996// canceled.
80997func (c *UrlMapsInvalidateCacheCall) Context(ctx context.Context) *UrlMapsInvalidateCacheCall {
80998	c.ctx_ = ctx
80999	return c
81000}
81001
81002// Header returns an http.Header that can be modified by the caller to
81003// add HTTP headers to the request.
81004func (c *UrlMapsInvalidateCacheCall) Header() http.Header {
81005	if c.header_ == nil {
81006		c.header_ = make(http.Header)
81007	}
81008	return c.header_
81009}
81010
81011func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) {
81012	reqHeaders := make(http.Header)
81013	for k, v := range c.header_ {
81014		reqHeaders[k] = v
81015	}
81016	reqHeaders.Set("User-Agent", c.s.userAgent())
81017	var body io.Reader = nil
81018	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cacheinvalidationrule)
81019	if err != nil {
81020		return nil, err
81021	}
81022	reqHeaders.Set("Content-Type", "application/json")
81023	c.urlParams_.Set("alt", alt)
81024	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/invalidateCache")
81025	urls += "?" + c.urlParams_.Encode()
81026	req, _ := http.NewRequest("POST", urls, body)
81027	req.Header = reqHeaders
81028	googleapi.Expand(req.URL, map[string]string{
81029		"project": c.project,
81030		"urlMap":  c.urlMap,
81031	})
81032	return gensupport.SendRequest(c.ctx_, c.s.client, req)
81033}
81034
81035// Do executes the "compute.urlMaps.invalidateCache" call.
81036// Exactly one of *Operation or error will be non-nil. Any non-2xx
81037// status code is an error. Response headers are in either
81038// *Operation.ServerResponse.Header or (if a response was returned at
81039// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
81040// to check whether the returned error was because
81041// http.StatusNotModified was returned.
81042func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
81043	gensupport.SetOptions(c.urlParams_, opts...)
81044	res, err := c.doRequest("json")
81045	if res != nil && res.StatusCode == http.StatusNotModified {
81046		if res.Body != nil {
81047			res.Body.Close()
81048		}
81049		return nil, &googleapi.Error{
81050			Code:   res.StatusCode,
81051			Header: res.Header,
81052		}
81053	}
81054	if err != nil {
81055		return nil, err
81056	}
81057	defer googleapi.CloseBody(res)
81058	if err := googleapi.CheckResponse(res); err != nil {
81059		return nil, err
81060	}
81061	ret := &Operation{
81062		ServerResponse: googleapi.ServerResponse{
81063			Header:         res.Header,
81064			HTTPStatusCode: res.StatusCode,
81065		},
81066	}
81067	target := &ret
81068	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
81069		return nil, err
81070	}
81071	return ret, nil
81072	// {
81073	//   "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.",
81074	//   "httpMethod": "POST",
81075	//   "id": "compute.urlMaps.invalidateCache",
81076	//   "parameterOrder": [
81077	//     "project",
81078	//     "urlMap"
81079	//   ],
81080	//   "parameters": {
81081	//     "project": {
81082	//       "description": "Project ID for this request.",
81083	//       "location": "path",
81084	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
81085	//       "required": true,
81086	//       "type": "string"
81087	//     },
81088	//     "requestId": {
81089	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
81090	//       "location": "query",
81091	//       "type": "string"
81092	//     },
81093	//     "urlMap": {
81094	//       "description": "Name of the UrlMap scoping this request.",
81095	//       "location": "path",
81096	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
81097	//       "required": true,
81098	//       "type": "string"
81099	//     }
81100	//   },
81101	//   "path": "{project}/global/urlMaps/{urlMap}/invalidateCache",
81102	//   "request": {
81103	//     "$ref": "CacheInvalidationRule"
81104	//   },
81105	//   "response": {
81106	//     "$ref": "Operation"
81107	//   },
81108	//   "scopes": [
81109	//     "https://www.googleapis.com/auth/cloud-platform",
81110	//     "https://www.googleapis.com/auth/compute"
81111	//   ]
81112	// }
81113
81114}
81115
81116// method id "compute.urlMaps.list":
81117
81118type UrlMapsListCall struct {
81119	s            *Service
81120	project      string
81121	urlParams_   gensupport.URLParams
81122	ifNoneMatch_ string
81123	ctx_         context.Context
81124	header_      http.Header
81125}
81126
81127// List: Retrieves the list of UrlMap resources available to the
81128// specified project.
81129// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/list
81130func (r *UrlMapsService) List(project string) *UrlMapsListCall {
81131	c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
81132	c.project = project
81133	return c
81134}
81135
81136// Filter sets the optional parameter "filter": Sets a filter
81137// {expression} for filtering listed resources. Your {expression} must
81138// be in the format: field_name comparison_string literal_string.
81139//
81140// The field_name is the name of the field you want to compare. Only
81141// atomic field types are supported (string, number, boolean). The
81142// comparison_string must be either eq (equals) or ne (not equals). The
81143// literal_string is the string value to filter to. The literal value
81144// must be valid for the type of field you are filtering by (string,
81145// number, boolean). For string fields, the literal value is interpreted
81146// as a regular expression using RE2 syntax. The literal value must
81147// match the entire field.
81148//
81149// For example, to filter for instances that do not have a name of
81150// example-instance, you would use name ne example-instance.
81151//
81152// You can filter on nested fields. For example, you could filter on
81153// instances that have set the scheduling.automaticRestart field to
81154// true. Use filtering on nested fields to take advantage of labels to
81155// organize and search for results based on label values.
81156//
81157// To filter on multiple expressions, provide each separate expression
81158// within parentheses. For example, (scheduling.automaticRestart eq
81159// true) (zone eq us-central1-f). Multiple expressions are treated as
81160// AND expressions, meaning that resources must match all expressions to
81161// pass the filters.
81162func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall {
81163	c.urlParams_.Set("filter", filter)
81164	return c
81165}
81166
81167// MaxResults sets the optional parameter "maxResults": The maximum
81168// number of results per page that should be returned. If the number of
81169// available results is larger than maxResults, Compute Engine returns a
81170// nextPageToken that can be used to get the next page of results in
81171// subsequent list requests. Acceptable values are 0 to 500, inclusive.
81172// (Default: 500)
81173func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall {
81174	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
81175	return c
81176}
81177
81178// OrderBy sets the optional parameter "orderBy": Sorts list results by
81179// a certain order. By default, results are returned in alphanumerical
81180// order based on the resource name.
81181//
81182// You can also sort results in descending order based on the creation
81183// timestamp using orderBy="creationTimestamp desc". This sorts results
81184// based on the creationTimestamp field in reverse chronological order
81185// (newest result first). Use this to sort resources like operations so
81186// that the newest operation is returned first.
81187//
81188// Currently, only sorting by name or creationTimestamp desc is
81189// supported.
81190func (c *UrlMapsListCall) OrderBy(orderBy string) *UrlMapsListCall {
81191	c.urlParams_.Set("orderBy", orderBy)
81192	return c
81193}
81194
81195// PageToken sets the optional parameter "pageToken": Specifies a page
81196// token to use. Set pageToken to the nextPageToken returned by a
81197// previous list request to get the next page of results.
81198func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall {
81199	c.urlParams_.Set("pageToken", pageToken)
81200	return c
81201}
81202
81203// Fields allows partial responses to be retrieved. See
81204// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
81205// for more information.
81206func (c *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall {
81207	c.urlParams_.Set("fields", googleapi.CombineFields(s))
81208	return c
81209}
81210
81211// IfNoneMatch sets the optional parameter which makes the operation
81212// fail if the object's ETag matches the given value. This is useful for
81213// getting updates only after the object has changed since the last
81214// request. Use googleapi.IsNotModified to check whether the response
81215// error from Do is the result of In-None-Match.
81216func (c *UrlMapsListCall) IfNoneMatch(entityTag string) *UrlMapsListCall {
81217	c.ifNoneMatch_ = entityTag
81218	return c
81219}
81220
81221// Context sets the context to be used in this call's Do method. Any
81222// pending HTTP request will be aborted if the provided context is
81223// canceled.
81224func (c *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall {
81225	c.ctx_ = ctx
81226	return c
81227}
81228
81229// Header returns an http.Header that can be modified by the caller to
81230// add HTTP headers to the request.
81231func (c *UrlMapsListCall) Header() http.Header {
81232	if c.header_ == nil {
81233		c.header_ = make(http.Header)
81234	}
81235	return c.header_
81236}
81237
81238func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) {
81239	reqHeaders := make(http.Header)
81240	for k, v := range c.header_ {
81241		reqHeaders[k] = v
81242	}
81243	reqHeaders.Set("User-Agent", c.s.userAgent())
81244	if c.ifNoneMatch_ != "" {
81245		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
81246	}
81247	var body io.Reader = nil
81248	c.urlParams_.Set("alt", alt)
81249	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps")
81250	urls += "?" + c.urlParams_.Encode()
81251	req, _ := http.NewRequest("GET", urls, body)
81252	req.Header = reqHeaders
81253	googleapi.Expand(req.URL, map[string]string{
81254		"project": c.project,
81255	})
81256	return gensupport.SendRequest(c.ctx_, c.s.client, req)
81257}
81258
81259// Do executes the "compute.urlMaps.list" call.
81260// Exactly one of *UrlMapList or error will be non-nil. Any non-2xx
81261// status code is an error. Response headers are in either
81262// *UrlMapList.ServerResponse.Header or (if a response was returned at
81263// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
81264// to check whether the returned error was because
81265// http.StatusNotModified was returned.
81266func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) {
81267	gensupport.SetOptions(c.urlParams_, opts...)
81268	res, err := c.doRequest("json")
81269	if res != nil && res.StatusCode == http.StatusNotModified {
81270		if res.Body != nil {
81271			res.Body.Close()
81272		}
81273		return nil, &googleapi.Error{
81274			Code:   res.StatusCode,
81275			Header: res.Header,
81276		}
81277	}
81278	if err != nil {
81279		return nil, err
81280	}
81281	defer googleapi.CloseBody(res)
81282	if err := googleapi.CheckResponse(res); err != nil {
81283		return nil, err
81284	}
81285	ret := &UrlMapList{
81286		ServerResponse: googleapi.ServerResponse{
81287			Header:         res.Header,
81288			HTTPStatusCode: res.StatusCode,
81289		},
81290	}
81291	target := &ret
81292	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
81293		return nil, err
81294	}
81295	return ret, nil
81296	// {
81297	//   "description": "Retrieves the list of UrlMap resources available to the specified project.",
81298	//   "httpMethod": "GET",
81299	//   "id": "compute.urlMaps.list",
81300	//   "parameterOrder": [
81301	//     "project"
81302	//   ],
81303	//   "parameters": {
81304	//     "filter": {
81305	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
81306	//       "location": "query",
81307	//       "type": "string"
81308	//     },
81309	//     "maxResults": {
81310	//       "default": "500",
81311	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
81312	//       "format": "uint32",
81313	//       "location": "query",
81314	//       "minimum": "0",
81315	//       "type": "integer"
81316	//     },
81317	//     "orderBy": {
81318	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
81319	//       "location": "query",
81320	//       "type": "string"
81321	//     },
81322	//     "pageToken": {
81323	//       "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.",
81324	//       "location": "query",
81325	//       "type": "string"
81326	//     },
81327	//     "project": {
81328	//       "description": "Project ID for this request.",
81329	//       "location": "path",
81330	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
81331	//       "required": true,
81332	//       "type": "string"
81333	//     }
81334	//   },
81335	//   "path": "{project}/global/urlMaps",
81336	//   "response": {
81337	//     "$ref": "UrlMapList"
81338	//   },
81339	//   "scopes": [
81340	//     "https://www.googleapis.com/auth/cloud-platform",
81341	//     "https://www.googleapis.com/auth/compute",
81342	//     "https://www.googleapis.com/auth/compute.readonly"
81343	//   ]
81344	// }
81345
81346}
81347
81348// Pages invokes f for each page of results.
81349// A non-nil error returned from f will halt the iteration.
81350// The provided context supersedes any context provided to the Context method.
81351func (c *UrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error {
81352	c.ctx_ = ctx
81353	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
81354	for {
81355		x, err := c.Do()
81356		if err != nil {
81357			return err
81358		}
81359		if err := f(x); err != nil {
81360			return err
81361		}
81362		if x.NextPageToken == "" {
81363			return nil
81364		}
81365		c.PageToken(x.NextPageToken)
81366	}
81367}
81368
81369// method id "compute.urlMaps.patch":
81370
81371type UrlMapsPatchCall struct {
81372	s          *Service
81373	project    string
81374	urlMap     string
81375	urlmap     *UrlMap
81376	urlParams_ gensupport.URLParams
81377	ctx_       context.Context
81378	header_    http.Header
81379}
81380
81381// Patch: Patches the specified UrlMap resource with the data included
81382// in the request. This method supports PATCH semantics and uses the
81383// JSON merge patch format and processing rules.
81384// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch
81385func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall {
81386	c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
81387	c.project = project
81388	c.urlMap = urlMap
81389	c.urlmap = urlmap
81390	return c
81391}
81392
81393// RequestId sets the optional parameter "requestId": An optional
81394// request ID to identify requests. Specify a unique request ID so that
81395// if you must retry your request, the server will know to ignore the
81396// request if it has already been completed.
81397//
81398// For example, consider a situation where you make an initial request
81399// and the request times out. If you make the request again with the
81400// same request ID, the server can check if original operation with the
81401// same request ID was received, and if so, will ignore the second
81402// request. This prevents clients from accidentally creating duplicate
81403// commitments.
81404//
81405// The request ID must be a valid UUID with the exception that zero UUID
81406// is not supported (00000000-0000-0000-0000-000000000000).
81407func (c *UrlMapsPatchCall) RequestId(requestId string) *UrlMapsPatchCall {
81408	c.urlParams_.Set("requestId", requestId)
81409	return c
81410}
81411
81412// Fields allows partial responses to be retrieved. See
81413// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
81414// for more information.
81415func (c *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall {
81416	c.urlParams_.Set("fields", googleapi.CombineFields(s))
81417	return c
81418}
81419
81420// Context sets the context to be used in this call's Do method. Any
81421// pending HTTP request will be aborted if the provided context is
81422// canceled.
81423func (c *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall {
81424	c.ctx_ = ctx
81425	return c
81426}
81427
81428// Header returns an http.Header that can be modified by the caller to
81429// add HTTP headers to the request.
81430func (c *UrlMapsPatchCall) Header() http.Header {
81431	if c.header_ == nil {
81432		c.header_ = make(http.Header)
81433	}
81434	return c.header_
81435}
81436
81437func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) {
81438	reqHeaders := make(http.Header)
81439	for k, v := range c.header_ {
81440		reqHeaders[k] = v
81441	}
81442	reqHeaders.Set("User-Agent", c.s.userAgent())
81443	var body io.Reader = nil
81444	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
81445	if err != nil {
81446		return nil, err
81447	}
81448	reqHeaders.Set("Content-Type", "application/json")
81449	c.urlParams_.Set("alt", alt)
81450	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
81451	urls += "?" + c.urlParams_.Encode()
81452	req, _ := http.NewRequest("PATCH", urls, body)
81453	req.Header = reqHeaders
81454	googleapi.Expand(req.URL, map[string]string{
81455		"project": c.project,
81456		"urlMap":  c.urlMap,
81457	})
81458	return gensupport.SendRequest(c.ctx_, c.s.client, req)
81459}
81460
81461// Do executes the "compute.urlMaps.patch" call.
81462// Exactly one of *Operation or error will be non-nil. Any non-2xx
81463// status code is an error. Response headers are in either
81464// *Operation.ServerResponse.Header or (if a response was returned at
81465// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
81466// to check whether the returned error was because
81467// http.StatusNotModified was returned.
81468func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
81469	gensupport.SetOptions(c.urlParams_, opts...)
81470	res, err := c.doRequest("json")
81471	if res != nil && res.StatusCode == http.StatusNotModified {
81472		if res.Body != nil {
81473			res.Body.Close()
81474		}
81475		return nil, &googleapi.Error{
81476			Code:   res.StatusCode,
81477			Header: res.Header,
81478		}
81479	}
81480	if err != nil {
81481		return nil, err
81482	}
81483	defer googleapi.CloseBody(res)
81484	if err := googleapi.CheckResponse(res); err != nil {
81485		return nil, err
81486	}
81487	ret := &Operation{
81488		ServerResponse: googleapi.ServerResponse{
81489			Header:         res.Header,
81490			HTTPStatusCode: res.StatusCode,
81491		},
81492	}
81493	target := &ret
81494	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
81495		return nil, err
81496	}
81497	return ret, nil
81498	// {
81499	//   "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.",
81500	//   "httpMethod": "PATCH",
81501	//   "id": "compute.urlMaps.patch",
81502	//   "parameterOrder": [
81503	//     "project",
81504	//     "urlMap"
81505	//   ],
81506	//   "parameters": {
81507	//     "project": {
81508	//       "description": "Project ID for this request.",
81509	//       "location": "path",
81510	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
81511	//       "required": true,
81512	//       "type": "string"
81513	//     },
81514	//     "requestId": {
81515	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
81516	//       "location": "query",
81517	//       "type": "string"
81518	//     },
81519	//     "urlMap": {
81520	//       "description": "Name of the UrlMap resource to patch.",
81521	//       "location": "path",
81522	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
81523	//       "required": true,
81524	//       "type": "string"
81525	//     }
81526	//   },
81527	//   "path": "{project}/global/urlMaps/{urlMap}",
81528	//   "request": {
81529	//     "$ref": "UrlMap"
81530	//   },
81531	//   "response": {
81532	//     "$ref": "Operation"
81533	//   },
81534	//   "scopes": [
81535	//     "https://www.googleapis.com/auth/cloud-platform",
81536	//     "https://www.googleapis.com/auth/compute"
81537	//   ]
81538	// }
81539
81540}
81541
81542// method id "compute.urlMaps.testIamPermissions":
81543
81544type UrlMapsTestIamPermissionsCall struct {
81545	s                      *Service
81546	project                string
81547	resource               string
81548	testpermissionsrequest *TestPermissionsRequest
81549	urlParams_             gensupport.URLParams
81550	ctx_                   context.Context
81551	header_                http.Header
81552}
81553
81554// TestIamPermissions: Returns permissions that a caller has on the
81555// specified resource.
81556func (r *UrlMapsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UrlMapsTestIamPermissionsCall {
81557	c := &UrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
81558	c.project = project
81559	c.resource = resource
81560	c.testpermissionsrequest = testpermissionsrequest
81561	return c
81562}
81563
81564// Fields allows partial responses to be retrieved. See
81565// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
81566// for more information.
81567func (c *UrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *UrlMapsTestIamPermissionsCall {
81568	c.urlParams_.Set("fields", googleapi.CombineFields(s))
81569	return c
81570}
81571
81572// Context sets the context to be used in this call's Do method. Any
81573// pending HTTP request will be aborted if the provided context is
81574// canceled.
81575func (c *UrlMapsTestIamPermissionsCall) Context(ctx context.Context) *UrlMapsTestIamPermissionsCall {
81576	c.ctx_ = ctx
81577	return c
81578}
81579
81580// Header returns an http.Header that can be modified by the caller to
81581// add HTTP headers to the request.
81582func (c *UrlMapsTestIamPermissionsCall) Header() http.Header {
81583	if c.header_ == nil {
81584		c.header_ = make(http.Header)
81585	}
81586	return c.header_
81587}
81588
81589func (c *UrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
81590	reqHeaders := make(http.Header)
81591	for k, v := range c.header_ {
81592		reqHeaders[k] = v
81593	}
81594	reqHeaders.Set("User-Agent", c.s.userAgent())
81595	var body io.Reader = nil
81596	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
81597	if err != nil {
81598		return nil, err
81599	}
81600	reqHeaders.Set("Content-Type", "application/json")
81601	c.urlParams_.Set("alt", alt)
81602	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{resource}/testIamPermissions")
81603	urls += "?" + c.urlParams_.Encode()
81604	req, _ := http.NewRequest("POST", urls, body)
81605	req.Header = reqHeaders
81606	googleapi.Expand(req.URL, map[string]string{
81607		"project":  c.project,
81608		"resource": c.resource,
81609	})
81610	return gensupport.SendRequest(c.ctx_, c.s.client, req)
81611}
81612
81613// Do executes the "compute.urlMaps.testIamPermissions" call.
81614// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
81615// non-2xx status code is an error. Response headers are in either
81616// *TestPermissionsResponse.ServerResponse.Header or (if a response was
81617// returned at all) in error.(*googleapi.Error).Header. Use
81618// googleapi.IsNotModified to check whether the returned error was
81619// because http.StatusNotModified was returned.
81620func (c *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
81621	gensupport.SetOptions(c.urlParams_, opts...)
81622	res, err := c.doRequest("json")
81623	if res != nil && res.StatusCode == http.StatusNotModified {
81624		if res.Body != nil {
81625			res.Body.Close()
81626		}
81627		return nil, &googleapi.Error{
81628			Code:   res.StatusCode,
81629			Header: res.Header,
81630		}
81631	}
81632	if err != nil {
81633		return nil, err
81634	}
81635	defer googleapi.CloseBody(res)
81636	if err := googleapi.CheckResponse(res); err != nil {
81637		return nil, err
81638	}
81639	ret := &TestPermissionsResponse{
81640		ServerResponse: googleapi.ServerResponse{
81641			Header:         res.Header,
81642			HTTPStatusCode: res.StatusCode,
81643		},
81644	}
81645	target := &ret
81646	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
81647		return nil, err
81648	}
81649	return ret, nil
81650	// {
81651	//   "description": "Returns permissions that a caller has on the specified resource.",
81652	//   "httpMethod": "POST",
81653	//   "id": "compute.urlMaps.testIamPermissions",
81654	//   "parameterOrder": [
81655	//     "project",
81656	//     "resource"
81657	//   ],
81658	//   "parameters": {
81659	//     "project": {
81660	//       "description": "Project ID for this request.",
81661	//       "location": "path",
81662	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
81663	//       "required": true,
81664	//       "type": "string"
81665	//     },
81666	//     "resource": {
81667	//       "description": "Name of the resource for this request.",
81668	//       "location": "path",
81669	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
81670	//       "required": true,
81671	//       "type": "string"
81672	//     }
81673	//   },
81674	//   "path": "{project}/global/urlMaps/{resource}/testIamPermissions",
81675	//   "request": {
81676	//     "$ref": "TestPermissionsRequest"
81677	//   },
81678	//   "response": {
81679	//     "$ref": "TestPermissionsResponse"
81680	//   },
81681	//   "scopes": [
81682	//     "https://www.googleapis.com/auth/cloud-platform",
81683	//     "https://www.googleapis.com/auth/compute",
81684	//     "https://www.googleapis.com/auth/compute.readonly"
81685	//   ]
81686	// }
81687
81688}
81689
81690// method id "compute.urlMaps.update":
81691
81692type UrlMapsUpdateCall struct {
81693	s          *Service
81694	project    string
81695	urlMap     string
81696	urlmap     *UrlMap
81697	urlParams_ gensupport.URLParams
81698	ctx_       context.Context
81699	header_    http.Header
81700}
81701
81702// Update: Updates the specified UrlMap resource with the data included
81703// in the request.
81704// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update
81705func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall {
81706	c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
81707	c.project = project
81708	c.urlMap = urlMap
81709	c.urlmap = urlmap
81710	return c
81711}
81712
81713// RequestId sets the optional parameter "requestId": An optional
81714// request ID to identify requests. Specify a unique request ID so that
81715// if you must retry your request, the server will know to ignore the
81716// request if it has already been completed.
81717//
81718// For example, consider a situation where you make an initial request
81719// and the request times out. If you make the request again with the
81720// same request ID, the server can check if original operation with the
81721// same request ID was received, and if so, will ignore the second
81722// request. This prevents clients from accidentally creating duplicate
81723// commitments.
81724//
81725// The request ID must be a valid UUID with the exception that zero UUID
81726// is not supported (00000000-0000-0000-0000-000000000000).
81727func (c *UrlMapsUpdateCall) RequestId(requestId string) *UrlMapsUpdateCall {
81728	c.urlParams_.Set("requestId", requestId)
81729	return c
81730}
81731
81732// Fields allows partial responses to be retrieved. See
81733// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
81734// for more information.
81735func (c *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall {
81736	c.urlParams_.Set("fields", googleapi.CombineFields(s))
81737	return c
81738}
81739
81740// Context sets the context to be used in this call's Do method. Any
81741// pending HTTP request will be aborted if the provided context is
81742// canceled.
81743func (c *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall {
81744	c.ctx_ = ctx
81745	return c
81746}
81747
81748// Header returns an http.Header that can be modified by the caller to
81749// add HTTP headers to the request.
81750func (c *UrlMapsUpdateCall) Header() http.Header {
81751	if c.header_ == nil {
81752		c.header_ = make(http.Header)
81753	}
81754	return c.header_
81755}
81756
81757func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) {
81758	reqHeaders := make(http.Header)
81759	for k, v := range c.header_ {
81760		reqHeaders[k] = v
81761	}
81762	reqHeaders.Set("User-Agent", c.s.userAgent())
81763	var body io.Reader = nil
81764	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
81765	if err != nil {
81766		return nil, err
81767	}
81768	reqHeaders.Set("Content-Type", "application/json")
81769	c.urlParams_.Set("alt", alt)
81770	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
81771	urls += "?" + c.urlParams_.Encode()
81772	req, _ := http.NewRequest("PUT", urls, body)
81773	req.Header = reqHeaders
81774	googleapi.Expand(req.URL, map[string]string{
81775		"project": c.project,
81776		"urlMap":  c.urlMap,
81777	})
81778	return gensupport.SendRequest(c.ctx_, c.s.client, req)
81779}
81780
81781// Do executes the "compute.urlMaps.update" call.
81782// Exactly one of *Operation or error will be non-nil. Any non-2xx
81783// status code is an error. Response headers are in either
81784// *Operation.ServerResponse.Header or (if a response was returned at
81785// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
81786// to check whether the returned error was because
81787// http.StatusNotModified was returned.
81788func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
81789	gensupport.SetOptions(c.urlParams_, opts...)
81790	res, err := c.doRequest("json")
81791	if res != nil && res.StatusCode == http.StatusNotModified {
81792		if res.Body != nil {
81793			res.Body.Close()
81794		}
81795		return nil, &googleapi.Error{
81796			Code:   res.StatusCode,
81797			Header: res.Header,
81798		}
81799	}
81800	if err != nil {
81801		return nil, err
81802	}
81803	defer googleapi.CloseBody(res)
81804	if err := googleapi.CheckResponse(res); err != nil {
81805		return nil, err
81806	}
81807	ret := &Operation{
81808		ServerResponse: googleapi.ServerResponse{
81809			Header:         res.Header,
81810			HTTPStatusCode: res.StatusCode,
81811		},
81812	}
81813	target := &ret
81814	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
81815		return nil, err
81816	}
81817	return ret, nil
81818	// {
81819	//   "description": "Updates the specified UrlMap resource with the data included in the request.",
81820	//   "httpMethod": "PUT",
81821	//   "id": "compute.urlMaps.update",
81822	//   "parameterOrder": [
81823	//     "project",
81824	//     "urlMap"
81825	//   ],
81826	//   "parameters": {
81827	//     "project": {
81828	//       "description": "Project ID for this request.",
81829	//       "location": "path",
81830	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
81831	//       "required": true,
81832	//       "type": "string"
81833	//     },
81834	//     "requestId": {
81835	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
81836	//       "location": "query",
81837	//       "type": "string"
81838	//     },
81839	//     "urlMap": {
81840	//       "description": "Name of the UrlMap resource to update.",
81841	//       "location": "path",
81842	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
81843	//       "required": true,
81844	//       "type": "string"
81845	//     }
81846	//   },
81847	//   "path": "{project}/global/urlMaps/{urlMap}",
81848	//   "request": {
81849	//     "$ref": "UrlMap"
81850	//   },
81851	//   "response": {
81852	//     "$ref": "Operation"
81853	//   },
81854	//   "scopes": [
81855	//     "https://www.googleapis.com/auth/cloud-platform",
81856	//     "https://www.googleapis.com/auth/compute"
81857	//   ]
81858	// }
81859
81860}
81861
81862// method id "compute.urlMaps.validate":
81863
81864type UrlMapsValidateCall struct {
81865	s                      *Service
81866	project                string
81867	urlMap                 string
81868	urlmapsvalidaterequest *UrlMapsValidateRequest
81869	urlParams_             gensupport.URLParams
81870	ctx_                   context.Context
81871	header_                http.Header
81872}
81873
81874// Validate: Runs static validation for the UrlMap. In particular, the
81875// tests of the provided UrlMap will be run. Calling this method does
81876// NOT create the UrlMap.
81877// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate
81878func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall {
81879	c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
81880	c.project = project
81881	c.urlMap = urlMap
81882	c.urlmapsvalidaterequest = urlmapsvalidaterequest
81883	return c
81884}
81885
81886// Fields allows partial responses to be retrieved. See
81887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
81888// for more information.
81889func (c *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall {
81890	c.urlParams_.Set("fields", googleapi.CombineFields(s))
81891	return c
81892}
81893
81894// Context sets the context to be used in this call's Do method. Any
81895// pending HTTP request will be aborted if the provided context is
81896// canceled.
81897func (c *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall {
81898	c.ctx_ = ctx
81899	return c
81900}
81901
81902// Header returns an http.Header that can be modified by the caller to
81903// add HTTP headers to the request.
81904func (c *UrlMapsValidateCall) Header() http.Header {
81905	if c.header_ == nil {
81906		c.header_ = make(http.Header)
81907	}
81908	return c.header_
81909}
81910
81911func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) {
81912	reqHeaders := make(http.Header)
81913	for k, v := range c.header_ {
81914		reqHeaders[k] = v
81915	}
81916	reqHeaders.Set("User-Agent", c.s.userAgent())
81917	var body io.Reader = nil
81918	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest)
81919	if err != nil {
81920		return nil, err
81921	}
81922	reqHeaders.Set("Content-Type", "application/json")
81923	c.urlParams_.Set("alt", alt)
81924	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate")
81925	urls += "?" + c.urlParams_.Encode()
81926	req, _ := http.NewRequest("POST", urls, body)
81927	req.Header = reqHeaders
81928	googleapi.Expand(req.URL, map[string]string{
81929		"project": c.project,
81930		"urlMap":  c.urlMap,
81931	})
81932	return gensupport.SendRequest(c.ctx_, c.s.client, req)
81933}
81934
81935// Do executes the "compute.urlMaps.validate" call.
81936// Exactly one of *UrlMapsValidateResponse or error will be non-nil. Any
81937// non-2xx status code is an error. Response headers are in either
81938// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was
81939// returned at all) in error.(*googleapi.Error).Header. Use
81940// googleapi.IsNotModified to check whether the returned error was
81941// because http.StatusNotModified was returned.
81942func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) {
81943	gensupport.SetOptions(c.urlParams_, opts...)
81944	res, err := c.doRequest("json")
81945	if res != nil && res.StatusCode == http.StatusNotModified {
81946		if res.Body != nil {
81947			res.Body.Close()
81948		}
81949		return nil, &googleapi.Error{
81950			Code:   res.StatusCode,
81951			Header: res.Header,
81952		}
81953	}
81954	if err != nil {
81955		return nil, err
81956	}
81957	defer googleapi.CloseBody(res)
81958	if err := googleapi.CheckResponse(res); err != nil {
81959		return nil, err
81960	}
81961	ret := &UrlMapsValidateResponse{
81962		ServerResponse: googleapi.ServerResponse{
81963			Header:         res.Header,
81964			HTTPStatusCode: res.StatusCode,
81965		},
81966	}
81967	target := &ret
81968	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
81969		return nil, err
81970	}
81971	return ret, nil
81972	// {
81973	//   "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.",
81974	//   "httpMethod": "POST",
81975	//   "id": "compute.urlMaps.validate",
81976	//   "parameterOrder": [
81977	//     "project",
81978	//     "urlMap"
81979	//   ],
81980	//   "parameters": {
81981	//     "project": {
81982	//       "description": "Project ID for this request.",
81983	//       "location": "path",
81984	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
81985	//       "required": true,
81986	//       "type": "string"
81987	//     },
81988	//     "urlMap": {
81989	//       "description": "Name of the UrlMap resource to be validated as.",
81990	//       "location": "path",
81991	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
81992	//       "required": true,
81993	//       "type": "string"
81994	//     }
81995	//   },
81996	//   "path": "{project}/global/urlMaps/{urlMap}/validate",
81997	//   "request": {
81998	//     "$ref": "UrlMapsValidateRequest"
81999	//   },
82000	//   "response": {
82001	//     "$ref": "UrlMapsValidateResponse"
82002	//   },
82003	//   "scopes": [
82004	//     "https://www.googleapis.com/auth/cloud-platform",
82005	//     "https://www.googleapis.com/auth/compute"
82006	//   ]
82007	// }
82008
82009}
82010
82011// method id "compute.vpnTunnels.aggregatedList":
82012
82013type VpnTunnelsAggregatedListCall struct {
82014	s            *Service
82015	project      string
82016	urlParams_   gensupport.URLParams
82017	ifNoneMatch_ string
82018	ctx_         context.Context
82019	header_      http.Header
82020}
82021
82022// AggregatedList: Retrieves an aggregated list of VPN tunnels.
82023func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall {
82024	c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
82025	c.project = project
82026	return c
82027}
82028
82029// Filter sets the optional parameter "filter": Sets a filter
82030// {expression} for filtering listed resources. Your {expression} must
82031// be in the format: field_name comparison_string literal_string.
82032//
82033// The field_name is the name of the field you want to compare. Only
82034// atomic field types are supported (string, number, boolean). The
82035// comparison_string must be either eq (equals) or ne (not equals). The
82036// literal_string is the string value to filter to. The literal value
82037// must be valid for the type of field you are filtering by (string,
82038// number, boolean). For string fields, the literal value is interpreted
82039// as a regular expression using RE2 syntax. The literal value must
82040// match the entire field.
82041//
82042// For example, to filter for instances that do not have a name of
82043// example-instance, you would use name ne example-instance.
82044//
82045// You can filter on nested fields. For example, you could filter on
82046// instances that have set the scheduling.automaticRestart field to
82047// true. Use filtering on nested fields to take advantage of labels to
82048// organize and search for results based on label values.
82049//
82050// To filter on multiple expressions, provide each separate expression
82051// within parentheses. For example, (scheduling.automaticRestart eq
82052// true) (zone eq us-central1-f). Multiple expressions are treated as
82053// AND expressions, meaning that resources must match all expressions to
82054// pass the filters.
82055func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall {
82056	c.urlParams_.Set("filter", filter)
82057	return c
82058}
82059
82060// MaxResults sets the optional parameter "maxResults": The maximum
82061// number of results per page that should be returned. If the number of
82062// available results is larger than maxResults, Compute Engine returns a
82063// nextPageToken that can be used to get the next page of results in
82064// subsequent list requests. Acceptable values are 0 to 500, inclusive.
82065// (Default: 500)
82066func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall {
82067	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
82068	return c
82069}
82070
82071// OrderBy sets the optional parameter "orderBy": Sorts list results by
82072// a certain order. By default, results are returned in alphanumerical
82073// order based on the resource name.
82074//
82075// You can also sort results in descending order based on the creation
82076// timestamp using orderBy="creationTimestamp desc". This sorts results
82077// based on the creationTimestamp field in reverse chronological order
82078// (newest result first). Use this to sort resources like operations so
82079// that the newest operation is returned first.
82080//
82081// Currently, only sorting by name or creationTimestamp desc is
82082// supported.
82083func (c *VpnTunnelsAggregatedListCall) OrderBy(orderBy string) *VpnTunnelsAggregatedListCall {
82084	c.urlParams_.Set("orderBy", orderBy)
82085	return c
82086}
82087
82088// PageToken sets the optional parameter "pageToken": Specifies a page
82089// token to use. Set pageToken to the nextPageToken returned by a
82090// previous list request to get the next page of results.
82091func (c *VpnTunnelsAggregatedListCall) PageToken(pageToken string) *VpnTunnelsAggregatedListCall {
82092	c.urlParams_.Set("pageToken", pageToken)
82093	return c
82094}
82095
82096// Fields allows partial responses to be retrieved. See
82097// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
82098// for more information.
82099func (c *VpnTunnelsAggregatedListCall) Fields(s ...googleapi.Field) *VpnTunnelsAggregatedListCall {
82100	c.urlParams_.Set("fields", googleapi.CombineFields(s))
82101	return c
82102}
82103
82104// IfNoneMatch sets the optional parameter which makes the operation
82105// fail if the object's ETag matches the given value. This is useful for
82106// getting updates only after the object has changed since the last
82107// request. Use googleapi.IsNotModified to check whether the response
82108// error from Do is the result of In-None-Match.
82109func (c *VpnTunnelsAggregatedListCall) IfNoneMatch(entityTag string) *VpnTunnelsAggregatedListCall {
82110	c.ifNoneMatch_ = entityTag
82111	return c
82112}
82113
82114// Context sets the context to be used in this call's Do method. Any
82115// pending HTTP request will be aborted if the provided context is
82116// canceled.
82117func (c *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall {
82118	c.ctx_ = ctx
82119	return c
82120}
82121
82122// Header returns an http.Header that can be modified by the caller to
82123// add HTTP headers to the request.
82124func (c *VpnTunnelsAggregatedListCall) Header() http.Header {
82125	if c.header_ == nil {
82126		c.header_ = make(http.Header)
82127	}
82128	return c.header_
82129}
82130
82131func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
82132	reqHeaders := make(http.Header)
82133	for k, v := range c.header_ {
82134		reqHeaders[k] = v
82135	}
82136	reqHeaders.Set("User-Agent", c.s.userAgent())
82137	if c.ifNoneMatch_ != "" {
82138		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
82139	}
82140	var body io.Reader = nil
82141	c.urlParams_.Set("alt", alt)
82142	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnTunnels")
82143	urls += "?" + c.urlParams_.Encode()
82144	req, _ := http.NewRequest("GET", urls, body)
82145	req.Header = reqHeaders
82146	googleapi.Expand(req.URL, map[string]string{
82147		"project": c.project,
82148	})
82149	return gensupport.SendRequest(c.ctx_, c.s.client, req)
82150}
82151
82152// Do executes the "compute.vpnTunnels.aggregatedList" call.
82153// Exactly one of *VpnTunnelAggregatedList or error will be non-nil. Any
82154// non-2xx status code is an error. Response headers are in either
82155// *VpnTunnelAggregatedList.ServerResponse.Header or (if a response was
82156// returned at all) in error.(*googleapi.Error).Header. Use
82157// googleapi.IsNotModified to check whether the returned error was
82158// because http.StatusNotModified was returned.
82159func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelAggregatedList, error) {
82160	gensupport.SetOptions(c.urlParams_, opts...)
82161	res, err := c.doRequest("json")
82162	if res != nil && res.StatusCode == http.StatusNotModified {
82163		if res.Body != nil {
82164			res.Body.Close()
82165		}
82166		return nil, &googleapi.Error{
82167			Code:   res.StatusCode,
82168			Header: res.Header,
82169		}
82170	}
82171	if err != nil {
82172		return nil, err
82173	}
82174	defer googleapi.CloseBody(res)
82175	if err := googleapi.CheckResponse(res); err != nil {
82176		return nil, err
82177	}
82178	ret := &VpnTunnelAggregatedList{
82179		ServerResponse: googleapi.ServerResponse{
82180			Header:         res.Header,
82181			HTTPStatusCode: res.StatusCode,
82182		},
82183	}
82184	target := &ret
82185	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
82186		return nil, err
82187	}
82188	return ret, nil
82189	// {
82190	//   "description": "Retrieves an aggregated list of VPN tunnels.",
82191	//   "httpMethod": "GET",
82192	//   "id": "compute.vpnTunnels.aggregatedList",
82193	//   "parameterOrder": [
82194	//     "project"
82195	//   ],
82196	//   "parameters": {
82197	//     "filter": {
82198	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
82199	//       "location": "query",
82200	//       "type": "string"
82201	//     },
82202	//     "maxResults": {
82203	//       "default": "500",
82204	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
82205	//       "format": "uint32",
82206	//       "location": "query",
82207	//       "minimum": "0",
82208	//       "type": "integer"
82209	//     },
82210	//     "orderBy": {
82211	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
82212	//       "location": "query",
82213	//       "type": "string"
82214	//     },
82215	//     "pageToken": {
82216	//       "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.",
82217	//       "location": "query",
82218	//       "type": "string"
82219	//     },
82220	//     "project": {
82221	//       "description": "Project ID for this request.",
82222	//       "location": "path",
82223	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
82224	//       "required": true,
82225	//       "type": "string"
82226	//     }
82227	//   },
82228	//   "path": "{project}/aggregated/vpnTunnels",
82229	//   "response": {
82230	//     "$ref": "VpnTunnelAggregatedList"
82231	//   },
82232	//   "scopes": [
82233	//     "https://www.googleapis.com/auth/cloud-platform",
82234	//     "https://www.googleapis.com/auth/compute",
82235	//     "https://www.googleapis.com/auth/compute.readonly"
82236	//   ]
82237	// }
82238
82239}
82240
82241// Pages invokes f for each page of results.
82242// A non-nil error returned from f will halt the iteration.
82243// The provided context supersedes any context provided to the Context method.
82244func (c *VpnTunnelsAggregatedListCall) Pages(ctx context.Context, f func(*VpnTunnelAggregatedList) error) error {
82245	c.ctx_ = ctx
82246	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
82247	for {
82248		x, err := c.Do()
82249		if err != nil {
82250			return err
82251		}
82252		if err := f(x); err != nil {
82253			return err
82254		}
82255		if x.NextPageToken == "" {
82256			return nil
82257		}
82258		c.PageToken(x.NextPageToken)
82259	}
82260}
82261
82262// method id "compute.vpnTunnels.delete":
82263
82264type VpnTunnelsDeleteCall struct {
82265	s          *Service
82266	project    string
82267	region     string
82268	vpnTunnel  string
82269	urlParams_ gensupport.URLParams
82270	ctx_       context.Context
82271	header_    http.Header
82272}
82273
82274// Delete: Deletes the specified VpnTunnel resource.
82275func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall {
82276	c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
82277	c.project = project
82278	c.region = region
82279	c.vpnTunnel = vpnTunnel
82280	return c
82281}
82282
82283// RequestId sets the optional parameter "requestId": An optional
82284// request ID to identify requests. Specify a unique request ID so that
82285// if you must retry your request, the server will know to ignore the
82286// request if it has already been completed.
82287//
82288// For example, consider a situation where you make an initial request
82289// and the request times out. If you make the request again with the
82290// same request ID, the server can check if original operation with the
82291// same request ID was received, and if so, will ignore the second
82292// request. This prevents clients from accidentally creating duplicate
82293// commitments.
82294//
82295// The request ID must be a valid UUID with the exception that zero UUID
82296// is not supported (00000000-0000-0000-0000-000000000000).
82297func (c *VpnTunnelsDeleteCall) RequestId(requestId string) *VpnTunnelsDeleteCall {
82298	c.urlParams_.Set("requestId", requestId)
82299	return c
82300}
82301
82302// Fields allows partial responses to be retrieved. See
82303// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
82304// for more information.
82305func (c *VpnTunnelsDeleteCall) Fields(s ...googleapi.Field) *VpnTunnelsDeleteCall {
82306	c.urlParams_.Set("fields", googleapi.CombineFields(s))
82307	return c
82308}
82309
82310// Context sets the context to be used in this call's Do method. Any
82311// pending HTTP request will be aborted if the provided context is
82312// canceled.
82313func (c *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall {
82314	c.ctx_ = ctx
82315	return c
82316}
82317
82318// Header returns an http.Header that can be modified by the caller to
82319// add HTTP headers to the request.
82320func (c *VpnTunnelsDeleteCall) Header() http.Header {
82321	if c.header_ == nil {
82322		c.header_ = make(http.Header)
82323	}
82324	return c.header_
82325}
82326
82327func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) {
82328	reqHeaders := make(http.Header)
82329	for k, v := range c.header_ {
82330		reqHeaders[k] = v
82331	}
82332	reqHeaders.Set("User-Agent", c.s.userAgent())
82333	var body io.Reader = nil
82334	c.urlParams_.Set("alt", alt)
82335	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}")
82336	urls += "?" + c.urlParams_.Encode()
82337	req, _ := http.NewRequest("DELETE", urls, body)
82338	req.Header = reqHeaders
82339	googleapi.Expand(req.URL, map[string]string{
82340		"project":   c.project,
82341		"region":    c.region,
82342		"vpnTunnel": c.vpnTunnel,
82343	})
82344	return gensupport.SendRequest(c.ctx_, c.s.client, req)
82345}
82346
82347// Do executes the "compute.vpnTunnels.delete" call.
82348// Exactly one of *Operation or error will be non-nil. Any non-2xx
82349// status code is an error. Response headers are in either
82350// *Operation.ServerResponse.Header or (if a response was returned at
82351// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
82352// to check whether the returned error was because
82353// http.StatusNotModified was returned.
82354func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
82355	gensupport.SetOptions(c.urlParams_, opts...)
82356	res, err := c.doRequest("json")
82357	if res != nil && res.StatusCode == http.StatusNotModified {
82358		if res.Body != nil {
82359			res.Body.Close()
82360		}
82361		return nil, &googleapi.Error{
82362			Code:   res.StatusCode,
82363			Header: res.Header,
82364		}
82365	}
82366	if err != nil {
82367		return nil, err
82368	}
82369	defer googleapi.CloseBody(res)
82370	if err := googleapi.CheckResponse(res); err != nil {
82371		return nil, err
82372	}
82373	ret := &Operation{
82374		ServerResponse: googleapi.ServerResponse{
82375			Header:         res.Header,
82376			HTTPStatusCode: res.StatusCode,
82377		},
82378	}
82379	target := &ret
82380	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
82381		return nil, err
82382	}
82383	return ret, nil
82384	// {
82385	//   "description": "Deletes the specified VpnTunnel resource.",
82386	//   "httpMethod": "DELETE",
82387	//   "id": "compute.vpnTunnels.delete",
82388	//   "parameterOrder": [
82389	//     "project",
82390	//     "region",
82391	//     "vpnTunnel"
82392	//   ],
82393	//   "parameters": {
82394	//     "project": {
82395	//       "description": "Project ID for this request.",
82396	//       "location": "path",
82397	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
82398	//       "required": true,
82399	//       "type": "string"
82400	//     },
82401	//     "region": {
82402	//       "description": "Name of the region for this request.",
82403	//       "location": "path",
82404	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
82405	//       "required": true,
82406	//       "type": "string"
82407	//     },
82408	//     "requestId": {
82409	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
82410	//       "location": "query",
82411	//       "type": "string"
82412	//     },
82413	//     "vpnTunnel": {
82414	//       "description": "Name of the VpnTunnel resource to delete.",
82415	//       "location": "path",
82416	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
82417	//       "required": true,
82418	//       "type": "string"
82419	//     }
82420	//   },
82421	//   "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}",
82422	//   "response": {
82423	//     "$ref": "Operation"
82424	//   },
82425	//   "scopes": [
82426	//     "https://www.googleapis.com/auth/cloud-platform",
82427	//     "https://www.googleapis.com/auth/compute"
82428	//   ]
82429	// }
82430
82431}
82432
82433// method id "compute.vpnTunnels.get":
82434
82435type VpnTunnelsGetCall struct {
82436	s            *Service
82437	project      string
82438	region       string
82439	vpnTunnel    string
82440	urlParams_   gensupport.URLParams
82441	ifNoneMatch_ string
82442	ctx_         context.Context
82443	header_      http.Header
82444}
82445
82446// Get: Returns the specified VpnTunnel resource. Get a list of
82447// available VPN tunnels by making a list() request.
82448func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall {
82449	c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
82450	c.project = project
82451	c.region = region
82452	c.vpnTunnel = vpnTunnel
82453	return c
82454}
82455
82456// Fields allows partial responses to be retrieved. See
82457// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
82458// for more information.
82459func (c *VpnTunnelsGetCall) Fields(s ...googleapi.Field) *VpnTunnelsGetCall {
82460	c.urlParams_.Set("fields", googleapi.CombineFields(s))
82461	return c
82462}
82463
82464// IfNoneMatch sets the optional parameter which makes the operation
82465// fail if the object's ETag matches the given value. This is useful for
82466// getting updates only after the object has changed since the last
82467// request. Use googleapi.IsNotModified to check whether the response
82468// error from Do is the result of In-None-Match.
82469func (c *VpnTunnelsGetCall) IfNoneMatch(entityTag string) *VpnTunnelsGetCall {
82470	c.ifNoneMatch_ = entityTag
82471	return c
82472}
82473
82474// Context sets the context to be used in this call's Do method. Any
82475// pending HTTP request will be aborted if the provided context is
82476// canceled.
82477func (c *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall {
82478	c.ctx_ = ctx
82479	return c
82480}
82481
82482// Header returns an http.Header that can be modified by the caller to
82483// add HTTP headers to the request.
82484func (c *VpnTunnelsGetCall) Header() http.Header {
82485	if c.header_ == nil {
82486		c.header_ = make(http.Header)
82487	}
82488	return c.header_
82489}
82490
82491func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) {
82492	reqHeaders := make(http.Header)
82493	for k, v := range c.header_ {
82494		reqHeaders[k] = v
82495	}
82496	reqHeaders.Set("User-Agent", c.s.userAgent())
82497	if c.ifNoneMatch_ != "" {
82498		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
82499	}
82500	var body io.Reader = nil
82501	c.urlParams_.Set("alt", alt)
82502	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}")
82503	urls += "?" + c.urlParams_.Encode()
82504	req, _ := http.NewRequest("GET", urls, body)
82505	req.Header = reqHeaders
82506	googleapi.Expand(req.URL, map[string]string{
82507		"project":   c.project,
82508		"region":    c.region,
82509		"vpnTunnel": c.vpnTunnel,
82510	})
82511	return gensupport.SendRequest(c.ctx_, c.s.client, req)
82512}
82513
82514// Do executes the "compute.vpnTunnels.get" call.
82515// Exactly one of *VpnTunnel or error will be non-nil. Any non-2xx
82516// status code is an error. Response headers are in either
82517// *VpnTunnel.ServerResponse.Header or (if a response was returned at
82518// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
82519// to check whether the returned error was because
82520// http.StatusNotModified was returned.
82521func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) {
82522	gensupport.SetOptions(c.urlParams_, opts...)
82523	res, err := c.doRequest("json")
82524	if res != nil && res.StatusCode == http.StatusNotModified {
82525		if res.Body != nil {
82526			res.Body.Close()
82527		}
82528		return nil, &googleapi.Error{
82529			Code:   res.StatusCode,
82530			Header: res.Header,
82531		}
82532	}
82533	if err != nil {
82534		return nil, err
82535	}
82536	defer googleapi.CloseBody(res)
82537	if err := googleapi.CheckResponse(res); err != nil {
82538		return nil, err
82539	}
82540	ret := &VpnTunnel{
82541		ServerResponse: googleapi.ServerResponse{
82542			Header:         res.Header,
82543			HTTPStatusCode: res.StatusCode,
82544		},
82545	}
82546	target := &ret
82547	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
82548		return nil, err
82549	}
82550	return ret, nil
82551	// {
82552	//   "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.",
82553	//   "httpMethod": "GET",
82554	//   "id": "compute.vpnTunnels.get",
82555	//   "parameterOrder": [
82556	//     "project",
82557	//     "region",
82558	//     "vpnTunnel"
82559	//   ],
82560	//   "parameters": {
82561	//     "project": {
82562	//       "description": "Project ID for this request.",
82563	//       "location": "path",
82564	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
82565	//       "required": true,
82566	//       "type": "string"
82567	//     },
82568	//     "region": {
82569	//       "description": "Name of the region for this request.",
82570	//       "location": "path",
82571	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
82572	//       "required": true,
82573	//       "type": "string"
82574	//     },
82575	//     "vpnTunnel": {
82576	//       "description": "Name of the VpnTunnel resource to return.",
82577	//       "location": "path",
82578	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
82579	//       "required": true,
82580	//       "type": "string"
82581	//     }
82582	//   },
82583	//   "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}",
82584	//   "response": {
82585	//     "$ref": "VpnTunnel"
82586	//   },
82587	//   "scopes": [
82588	//     "https://www.googleapis.com/auth/cloud-platform",
82589	//     "https://www.googleapis.com/auth/compute",
82590	//     "https://www.googleapis.com/auth/compute.readonly"
82591	//   ]
82592	// }
82593
82594}
82595
82596// method id "compute.vpnTunnels.insert":
82597
82598type VpnTunnelsInsertCall struct {
82599	s          *Service
82600	project    string
82601	region     string
82602	vpntunnel  *VpnTunnel
82603	urlParams_ gensupport.URLParams
82604	ctx_       context.Context
82605	header_    http.Header
82606}
82607
82608// Insert: Creates a VpnTunnel resource in the specified project and
82609// region using the data included in the request.
82610func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall {
82611	c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
82612	c.project = project
82613	c.region = region
82614	c.vpntunnel = vpntunnel
82615	return c
82616}
82617
82618// RequestId sets the optional parameter "requestId": An optional
82619// request ID to identify requests. Specify a unique request ID so that
82620// if you must retry your request, the server will know to ignore the
82621// request if it has already been completed.
82622//
82623// For example, consider a situation where you make an initial request
82624// and the request times out. If you make the request again with the
82625// same request ID, the server can check if original operation with the
82626// same request ID was received, and if so, will ignore the second
82627// request. This prevents clients from accidentally creating duplicate
82628// commitments.
82629//
82630// The request ID must be a valid UUID with the exception that zero UUID
82631// is not supported (00000000-0000-0000-0000-000000000000).
82632func (c *VpnTunnelsInsertCall) RequestId(requestId string) *VpnTunnelsInsertCall {
82633	c.urlParams_.Set("requestId", requestId)
82634	return c
82635}
82636
82637// Fields allows partial responses to be retrieved. See
82638// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
82639// for more information.
82640func (c *VpnTunnelsInsertCall) Fields(s ...googleapi.Field) *VpnTunnelsInsertCall {
82641	c.urlParams_.Set("fields", googleapi.CombineFields(s))
82642	return c
82643}
82644
82645// Context sets the context to be used in this call's Do method. Any
82646// pending HTTP request will be aborted if the provided context is
82647// canceled.
82648func (c *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall {
82649	c.ctx_ = ctx
82650	return c
82651}
82652
82653// Header returns an http.Header that can be modified by the caller to
82654// add HTTP headers to the request.
82655func (c *VpnTunnelsInsertCall) Header() http.Header {
82656	if c.header_ == nil {
82657		c.header_ = make(http.Header)
82658	}
82659	return c.header_
82660}
82661
82662func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) {
82663	reqHeaders := make(http.Header)
82664	for k, v := range c.header_ {
82665		reqHeaders[k] = v
82666	}
82667	reqHeaders.Set("User-Agent", c.s.userAgent())
82668	var body io.Reader = nil
82669	body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpntunnel)
82670	if err != nil {
82671		return nil, err
82672	}
82673	reqHeaders.Set("Content-Type", "application/json")
82674	c.urlParams_.Set("alt", alt)
82675	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels")
82676	urls += "?" + c.urlParams_.Encode()
82677	req, _ := http.NewRequest("POST", urls, body)
82678	req.Header = reqHeaders
82679	googleapi.Expand(req.URL, map[string]string{
82680		"project": c.project,
82681		"region":  c.region,
82682	})
82683	return gensupport.SendRequest(c.ctx_, c.s.client, req)
82684}
82685
82686// Do executes the "compute.vpnTunnels.insert" call.
82687// Exactly one of *Operation or error will be non-nil. Any non-2xx
82688// status code is an error. Response headers are in either
82689// *Operation.ServerResponse.Header or (if a response was returned at
82690// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
82691// to check whether the returned error was because
82692// http.StatusNotModified was returned.
82693func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
82694	gensupport.SetOptions(c.urlParams_, opts...)
82695	res, err := c.doRequest("json")
82696	if res != nil && res.StatusCode == http.StatusNotModified {
82697		if res.Body != nil {
82698			res.Body.Close()
82699		}
82700		return nil, &googleapi.Error{
82701			Code:   res.StatusCode,
82702			Header: res.Header,
82703		}
82704	}
82705	if err != nil {
82706		return nil, err
82707	}
82708	defer googleapi.CloseBody(res)
82709	if err := googleapi.CheckResponse(res); err != nil {
82710		return nil, err
82711	}
82712	ret := &Operation{
82713		ServerResponse: googleapi.ServerResponse{
82714			Header:         res.Header,
82715			HTTPStatusCode: res.StatusCode,
82716		},
82717	}
82718	target := &ret
82719	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
82720		return nil, err
82721	}
82722	return ret, nil
82723	// {
82724	//   "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.",
82725	//   "httpMethod": "POST",
82726	//   "id": "compute.vpnTunnels.insert",
82727	//   "parameterOrder": [
82728	//     "project",
82729	//     "region"
82730	//   ],
82731	//   "parameters": {
82732	//     "project": {
82733	//       "description": "Project ID for this request.",
82734	//       "location": "path",
82735	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
82736	//       "required": true,
82737	//       "type": "string"
82738	//     },
82739	//     "region": {
82740	//       "description": "Name of the region for this request.",
82741	//       "location": "path",
82742	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
82743	//       "required": true,
82744	//       "type": "string"
82745	//     },
82746	//     "requestId": {
82747	//       "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
82748	//       "location": "query",
82749	//       "type": "string"
82750	//     }
82751	//   },
82752	//   "path": "{project}/regions/{region}/vpnTunnels",
82753	//   "request": {
82754	//     "$ref": "VpnTunnel"
82755	//   },
82756	//   "response": {
82757	//     "$ref": "Operation"
82758	//   },
82759	//   "scopes": [
82760	//     "https://www.googleapis.com/auth/cloud-platform",
82761	//     "https://www.googleapis.com/auth/compute"
82762	//   ]
82763	// }
82764
82765}
82766
82767// method id "compute.vpnTunnels.list":
82768
82769type VpnTunnelsListCall struct {
82770	s            *Service
82771	project      string
82772	region       string
82773	urlParams_   gensupport.URLParams
82774	ifNoneMatch_ string
82775	ctx_         context.Context
82776	header_      http.Header
82777}
82778
82779// List: Retrieves a list of VpnTunnel resources contained in the
82780// specified project and region.
82781func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall {
82782	c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
82783	c.project = project
82784	c.region = region
82785	return c
82786}
82787
82788// Filter sets the optional parameter "filter": Sets a filter
82789// {expression} for filtering listed resources. Your {expression} must
82790// be in the format: field_name comparison_string literal_string.
82791//
82792// The field_name is the name of the field you want to compare. Only
82793// atomic field types are supported (string, number, boolean). The
82794// comparison_string must be either eq (equals) or ne (not equals). The
82795// literal_string is the string value to filter to. The literal value
82796// must be valid for the type of field you are filtering by (string,
82797// number, boolean). For string fields, the literal value is interpreted
82798// as a regular expression using RE2 syntax. The literal value must
82799// match the entire field.
82800//
82801// For example, to filter for instances that do not have a name of
82802// example-instance, you would use name ne example-instance.
82803//
82804// You can filter on nested fields. For example, you could filter on
82805// instances that have set the scheduling.automaticRestart field to
82806// true. Use filtering on nested fields to take advantage of labels to
82807// organize and search for results based on label values.
82808//
82809// To filter on multiple expressions, provide each separate expression
82810// within parentheses. For example, (scheduling.automaticRestart eq
82811// true) (zone eq us-central1-f). Multiple expressions are treated as
82812// AND expressions, meaning that resources must match all expressions to
82813// pass the filters.
82814func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall {
82815	c.urlParams_.Set("filter", filter)
82816	return c
82817}
82818
82819// MaxResults sets the optional parameter "maxResults": The maximum
82820// number of results per page that should be returned. If the number of
82821// available results is larger than maxResults, Compute Engine returns a
82822// nextPageToken that can be used to get the next page of results in
82823// subsequent list requests. Acceptable values are 0 to 500, inclusive.
82824// (Default: 500)
82825func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall {
82826	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
82827	return c
82828}
82829
82830// OrderBy sets the optional parameter "orderBy": Sorts list results by
82831// a certain order. By default, results are returned in alphanumerical
82832// order based on the resource name.
82833//
82834// You can also sort results in descending order based on the creation
82835// timestamp using orderBy="creationTimestamp desc". This sorts results
82836// based on the creationTimestamp field in reverse chronological order
82837// (newest result first). Use this to sort resources like operations so
82838// that the newest operation is returned first.
82839//
82840// Currently, only sorting by name or creationTimestamp desc is
82841// supported.
82842func (c *VpnTunnelsListCall) OrderBy(orderBy string) *VpnTunnelsListCall {
82843	c.urlParams_.Set("orderBy", orderBy)
82844	return c
82845}
82846
82847// PageToken sets the optional parameter "pageToken": Specifies a page
82848// token to use. Set pageToken to the nextPageToken returned by a
82849// previous list request to get the next page of results.
82850func (c *VpnTunnelsListCall) PageToken(pageToken string) *VpnTunnelsListCall {
82851	c.urlParams_.Set("pageToken", pageToken)
82852	return c
82853}
82854
82855// Fields allows partial responses to be retrieved. See
82856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
82857// for more information.
82858func (c *VpnTunnelsListCall) Fields(s ...googleapi.Field) *VpnTunnelsListCall {
82859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
82860	return c
82861}
82862
82863// IfNoneMatch sets the optional parameter which makes the operation
82864// fail if the object's ETag matches the given value. This is useful for
82865// getting updates only after the object has changed since the last
82866// request. Use googleapi.IsNotModified to check whether the response
82867// error from Do is the result of In-None-Match.
82868func (c *VpnTunnelsListCall) IfNoneMatch(entityTag string) *VpnTunnelsListCall {
82869	c.ifNoneMatch_ = entityTag
82870	return c
82871}
82872
82873// Context sets the context to be used in this call's Do method. Any
82874// pending HTTP request will be aborted if the provided context is
82875// canceled.
82876func (c *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall {
82877	c.ctx_ = ctx
82878	return c
82879}
82880
82881// Header returns an http.Header that can be modified by the caller to
82882// add HTTP headers to the request.
82883func (c *VpnTunnelsListCall) Header() http.Header {
82884	if c.header_ == nil {
82885		c.header_ = make(http.Header)
82886	}
82887	return c.header_
82888}
82889
82890func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) {
82891	reqHeaders := make(http.Header)
82892	for k, v := range c.header_ {
82893		reqHeaders[k] = v
82894	}
82895	reqHeaders.Set("User-Agent", c.s.userAgent())
82896	if c.ifNoneMatch_ != "" {
82897		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
82898	}
82899	var body io.Reader = nil
82900	c.urlParams_.Set("alt", alt)
82901	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels")
82902	urls += "?" + c.urlParams_.Encode()
82903	req, _ := http.NewRequest("GET", urls, body)
82904	req.Header = reqHeaders
82905	googleapi.Expand(req.URL, map[string]string{
82906		"project": c.project,
82907		"region":  c.region,
82908	})
82909	return gensupport.SendRequest(c.ctx_, c.s.client, req)
82910}
82911
82912// Do executes the "compute.vpnTunnels.list" call.
82913// Exactly one of *VpnTunnelList or error will be non-nil. Any non-2xx
82914// status code is an error. Response headers are in either
82915// *VpnTunnelList.ServerResponse.Header or (if a response was returned
82916// at all) in error.(*googleapi.Error).Header. Use
82917// googleapi.IsNotModified to check whether the returned error was
82918// because http.StatusNotModified was returned.
82919func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, error) {
82920	gensupport.SetOptions(c.urlParams_, opts...)
82921	res, err := c.doRequest("json")
82922	if res != nil && res.StatusCode == http.StatusNotModified {
82923		if res.Body != nil {
82924			res.Body.Close()
82925		}
82926		return nil, &googleapi.Error{
82927			Code:   res.StatusCode,
82928			Header: res.Header,
82929		}
82930	}
82931	if err != nil {
82932		return nil, err
82933	}
82934	defer googleapi.CloseBody(res)
82935	if err := googleapi.CheckResponse(res); err != nil {
82936		return nil, err
82937	}
82938	ret := &VpnTunnelList{
82939		ServerResponse: googleapi.ServerResponse{
82940			Header:         res.Header,
82941			HTTPStatusCode: res.StatusCode,
82942		},
82943	}
82944	target := &ret
82945	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
82946		return nil, err
82947	}
82948	return ret, nil
82949	// {
82950	//   "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.",
82951	//   "httpMethod": "GET",
82952	//   "id": "compute.vpnTunnels.list",
82953	//   "parameterOrder": [
82954	//     "project",
82955	//     "region"
82956	//   ],
82957	//   "parameters": {
82958	//     "filter": {
82959	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
82960	//       "location": "query",
82961	//       "type": "string"
82962	//     },
82963	//     "maxResults": {
82964	//       "default": "500",
82965	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
82966	//       "format": "uint32",
82967	//       "location": "query",
82968	//       "minimum": "0",
82969	//       "type": "integer"
82970	//     },
82971	//     "orderBy": {
82972	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
82973	//       "location": "query",
82974	//       "type": "string"
82975	//     },
82976	//     "pageToken": {
82977	//       "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.",
82978	//       "location": "query",
82979	//       "type": "string"
82980	//     },
82981	//     "project": {
82982	//       "description": "Project ID for this request.",
82983	//       "location": "path",
82984	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
82985	//       "required": true,
82986	//       "type": "string"
82987	//     },
82988	//     "region": {
82989	//       "description": "Name of the region for this request.",
82990	//       "location": "path",
82991	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
82992	//       "required": true,
82993	//       "type": "string"
82994	//     }
82995	//   },
82996	//   "path": "{project}/regions/{region}/vpnTunnels",
82997	//   "response": {
82998	//     "$ref": "VpnTunnelList"
82999	//   },
83000	//   "scopes": [
83001	//     "https://www.googleapis.com/auth/cloud-platform",
83002	//     "https://www.googleapis.com/auth/compute",
83003	//     "https://www.googleapis.com/auth/compute.readonly"
83004	//   ]
83005	// }
83006
83007}
83008
83009// Pages invokes f for each page of results.
83010// A non-nil error returned from f will halt the iteration.
83011// The provided context supersedes any context provided to the Context method.
83012func (c *VpnTunnelsListCall) Pages(ctx context.Context, f func(*VpnTunnelList) error) error {
83013	c.ctx_ = ctx
83014	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
83015	for {
83016		x, err := c.Do()
83017		if err != nil {
83018			return err
83019		}
83020		if err := f(x); err != nil {
83021			return err
83022		}
83023		if x.NextPageToken == "" {
83024			return nil
83025		}
83026		c.PageToken(x.NextPageToken)
83027	}
83028}
83029
83030// method id "compute.vpnTunnels.testIamPermissions":
83031
83032type VpnTunnelsTestIamPermissionsCall struct {
83033	s                      *Service
83034	project                string
83035	region                 string
83036	resource               string
83037	testpermissionsrequest *TestPermissionsRequest
83038	urlParams_             gensupport.URLParams
83039	ctx_                   context.Context
83040	header_                http.Header
83041}
83042
83043// TestIamPermissions: Returns permissions that a caller has on the
83044// specified resource.
83045func (r *VpnTunnelsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnTunnelsTestIamPermissionsCall {
83046	c := &VpnTunnelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
83047	c.project = project
83048	c.region = region
83049	c.resource = resource
83050	c.testpermissionsrequest = testpermissionsrequest
83051	return c
83052}
83053
83054// Fields allows partial responses to be retrieved. See
83055// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
83056// for more information.
83057func (c *VpnTunnelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *VpnTunnelsTestIamPermissionsCall {
83058	c.urlParams_.Set("fields", googleapi.CombineFields(s))
83059	return c
83060}
83061
83062// Context sets the context to be used in this call's Do method. Any
83063// pending HTTP request will be aborted if the provided context is
83064// canceled.
83065func (c *VpnTunnelsTestIamPermissionsCall) Context(ctx context.Context) *VpnTunnelsTestIamPermissionsCall {
83066	c.ctx_ = ctx
83067	return c
83068}
83069
83070// Header returns an http.Header that can be modified by the caller to
83071// add HTTP headers to the request.
83072func (c *VpnTunnelsTestIamPermissionsCall) Header() http.Header {
83073	if c.header_ == nil {
83074		c.header_ = make(http.Header)
83075	}
83076	return c.header_
83077}
83078
83079func (c *VpnTunnelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
83080	reqHeaders := make(http.Header)
83081	for k, v := range c.header_ {
83082		reqHeaders[k] = v
83083	}
83084	reqHeaders.Set("User-Agent", c.s.userAgent())
83085	var body io.Reader = nil
83086	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
83087	if err != nil {
83088		return nil, err
83089	}
83090	reqHeaders.Set("Content-Type", "application/json")
83091	c.urlParams_.Set("alt", alt)
83092	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions")
83093	urls += "?" + c.urlParams_.Encode()
83094	req, _ := http.NewRequest("POST", urls, body)
83095	req.Header = reqHeaders
83096	googleapi.Expand(req.URL, map[string]string{
83097		"project":  c.project,
83098		"region":   c.region,
83099		"resource": c.resource,
83100	})
83101	return gensupport.SendRequest(c.ctx_, c.s.client, req)
83102}
83103
83104// Do executes the "compute.vpnTunnels.testIamPermissions" call.
83105// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
83106// non-2xx status code is an error. Response headers are in either
83107// *TestPermissionsResponse.ServerResponse.Header or (if a response was
83108// returned at all) in error.(*googleapi.Error).Header. Use
83109// googleapi.IsNotModified to check whether the returned error was
83110// because http.StatusNotModified was returned.
83111func (c *VpnTunnelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
83112	gensupport.SetOptions(c.urlParams_, opts...)
83113	res, err := c.doRequest("json")
83114	if res != nil && res.StatusCode == http.StatusNotModified {
83115		if res.Body != nil {
83116			res.Body.Close()
83117		}
83118		return nil, &googleapi.Error{
83119			Code:   res.StatusCode,
83120			Header: res.Header,
83121		}
83122	}
83123	if err != nil {
83124		return nil, err
83125	}
83126	defer googleapi.CloseBody(res)
83127	if err := googleapi.CheckResponse(res); err != nil {
83128		return nil, err
83129	}
83130	ret := &TestPermissionsResponse{
83131		ServerResponse: googleapi.ServerResponse{
83132			Header:         res.Header,
83133			HTTPStatusCode: res.StatusCode,
83134		},
83135	}
83136	target := &ret
83137	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
83138		return nil, err
83139	}
83140	return ret, nil
83141	// {
83142	//   "description": "Returns permissions that a caller has on the specified resource.",
83143	//   "httpMethod": "POST",
83144	//   "id": "compute.vpnTunnels.testIamPermissions",
83145	//   "parameterOrder": [
83146	//     "project",
83147	//     "region",
83148	//     "resource"
83149	//   ],
83150	//   "parameters": {
83151	//     "project": {
83152	//       "description": "Project ID for this request.",
83153	//       "location": "path",
83154	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
83155	//       "required": true,
83156	//       "type": "string"
83157	//     },
83158	//     "region": {
83159	//       "description": "The name of the region for this request.",
83160	//       "location": "path",
83161	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
83162	//       "required": true,
83163	//       "type": "string"
83164	//     },
83165	//     "resource": {
83166	//       "description": "Name of the resource for this request.",
83167	//       "location": "path",
83168	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
83169	//       "required": true,
83170	//       "type": "string"
83171	//     }
83172	//   },
83173	//   "path": "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions",
83174	//   "request": {
83175	//     "$ref": "TestPermissionsRequest"
83176	//   },
83177	//   "response": {
83178	//     "$ref": "TestPermissionsResponse"
83179	//   },
83180	//   "scopes": [
83181	//     "https://www.googleapis.com/auth/cloud-platform",
83182	//     "https://www.googleapis.com/auth/compute",
83183	//     "https://www.googleapis.com/auth/compute.readonly"
83184	//   ]
83185	// }
83186
83187}
83188
83189// method id "compute.zoneOperations.delete":
83190
83191type ZoneOperationsDeleteCall struct {
83192	s          *Service
83193	project    string
83194	zone       string
83195	operation  string
83196	urlParams_ gensupport.URLParams
83197	ctx_       context.Context
83198	header_    http.Header
83199}
83200
83201// Delete: Deletes the specified zone-specific Operations resource.
83202// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/delete
83203func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall {
83204	c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
83205	c.project = project
83206	c.zone = zone
83207	c.operation = operation
83208	return c
83209}
83210
83211// Fields allows partial responses to be retrieved. See
83212// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
83213// for more information.
83214func (c *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall {
83215	c.urlParams_.Set("fields", googleapi.CombineFields(s))
83216	return c
83217}
83218
83219// Context sets the context to be used in this call's Do method. Any
83220// pending HTTP request will be aborted if the provided context is
83221// canceled.
83222func (c *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall {
83223	c.ctx_ = ctx
83224	return c
83225}
83226
83227// Header returns an http.Header that can be modified by the caller to
83228// add HTTP headers to the request.
83229func (c *ZoneOperationsDeleteCall) Header() http.Header {
83230	if c.header_ == nil {
83231		c.header_ = make(http.Header)
83232	}
83233	return c.header_
83234}
83235
83236func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
83237	reqHeaders := make(http.Header)
83238	for k, v := range c.header_ {
83239		reqHeaders[k] = v
83240	}
83241	reqHeaders.Set("User-Agent", c.s.userAgent())
83242	var body io.Reader = nil
83243	c.urlParams_.Set("alt", alt)
83244	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}")
83245	urls += "?" + c.urlParams_.Encode()
83246	req, _ := http.NewRequest("DELETE", urls, body)
83247	req.Header = reqHeaders
83248	googleapi.Expand(req.URL, map[string]string{
83249		"project":   c.project,
83250		"zone":      c.zone,
83251		"operation": c.operation,
83252	})
83253	return gensupport.SendRequest(c.ctx_, c.s.client, req)
83254}
83255
83256// Do executes the "compute.zoneOperations.delete" call.
83257func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
83258	gensupport.SetOptions(c.urlParams_, opts...)
83259	res, err := c.doRequest("json")
83260	if err != nil {
83261		return err
83262	}
83263	defer googleapi.CloseBody(res)
83264	if err := googleapi.CheckResponse(res); err != nil {
83265		return err
83266	}
83267	return nil
83268	// {
83269	//   "description": "Deletes the specified zone-specific Operations resource.",
83270	//   "httpMethod": "DELETE",
83271	//   "id": "compute.zoneOperations.delete",
83272	//   "parameterOrder": [
83273	//     "project",
83274	//     "zone",
83275	//     "operation"
83276	//   ],
83277	//   "parameters": {
83278	//     "operation": {
83279	//       "description": "Name of the Operations resource to delete.",
83280	//       "location": "path",
83281	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
83282	//       "required": true,
83283	//       "type": "string"
83284	//     },
83285	//     "project": {
83286	//       "description": "Project ID for this request.",
83287	//       "location": "path",
83288	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
83289	//       "required": true,
83290	//       "type": "string"
83291	//     },
83292	//     "zone": {
83293	//       "description": "Name of the zone for this request.",
83294	//       "location": "path",
83295	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
83296	//       "required": true,
83297	//       "type": "string"
83298	//     }
83299	//   },
83300	//   "path": "{project}/zones/{zone}/operations/{operation}",
83301	//   "scopes": [
83302	//     "https://www.googleapis.com/auth/cloud-platform",
83303	//     "https://www.googleapis.com/auth/compute"
83304	//   ]
83305	// }
83306
83307}
83308
83309// method id "compute.zoneOperations.get":
83310
83311type ZoneOperationsGetCall struct {
83312	s            *Service
83313	project      string
83314	zone         string
83315	operation    string
83316	urlParams_   gensupport.URLParams
83317	ifNoneMatch_ string
83318	ctx_         context.Context
83319	header_      http.Header
83320}
83321
83322// Get: Retrieves the specified zone-specific Operations resource.
83323// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/get
83324func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall {
83325	c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
83326	c.project = project
83327	c.zone = zone
83328	c.operation = operation
83329	return c
83330}
83331
83332// Fields allows partial responses to be retrieved. See
83333// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
83334// for more information.
83335func (c *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall {
83336	c.urlParams_.Set("fields", googleapi.CombineFields(s))
83337	return c
83338}
83339
83340// IfNoneMatch sets the optional parameter which makes the operation
83341// fail if the object's ETag matches the given value. This is useful for
83342// getting updates only after the object has changed since the last
83343// request. Use googleapi.IsNotModified to check whether the response
83344// error from Do is the result of In-None-Match.
83345func (c *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall {
83346	c.ifNoneMatch_ = entityTag
83347	return c
83348}
83349
83350// Context sets the context to be used in this call's Do method. Any
83351// pending HTTP request will be aborted if the provided context is
83352// canceled.
83353func (c *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall {
83354	c.ctx_ = ctx
83355	return c
83356}
83357
83358// Header returns an http.Header that can be modified by the caller to
83359// add HTTP headers to the request.
83360func (c *ZoneOperationsGetCall) Header() http.Header {
83361	if c.header_ == nil {
83362		c.header_ = make(http.Header)
83363	}
83364	return c.header_
83365}
83366
83367func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
83368	reqHeaders := make(http.Header)
83369	for k, v := range c.header_ {
83370		reqHeaders[k] = v
83371	}
83372	reqHeaders.Set("User-Agent", c.s.userAgent())
83373	if c.ifNoneMatch_ != "" {
83374		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
83375	}
83376	var body io.Reader = nil
83377	c.urlParams_.Set("alt", alt)
83378	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}")
83379	urls += "?" + c.urlParams_.Encode()
83380	req, _ := http.NewRequest("GET", urls, body)
83381	req.Header = reqHeaders
83382	googleapi.Expand(req.URL, map[string]string{
83383		"project":   c.project,
83384		"zone":      c.zone,
83385		"operation": c.operation,
83386	})
83387	return gensupport.SendRequest(c.ctx_, c.s.client, req)
83388}
83389
83390// Do executes the "compute.zoneOperations.get" call.
83391// Exactly one of *Operation or error will be non-nil. Any non-2xx
83392// status code is an error. Response headers are in either
83393// *Operation.ServerResponse.Header or (if a response was returned at
83394// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
83395// to check whether the returned error was because
83396// http.StatusNotModified was returned.
83397func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
83398	gensupport.SetOptions(c.urlParams_, opts...)
83399	res, err := c.doRequest("json")
83400	if res != nil && res.StatusCode == http.StatusNotModified {
83401		if res.Body != nil {
83402			res.Body.Close()
83403		}
83404		return nil, &googleapi.Error{
83405			Code:   res.StatusCode,
83406			Header: res.Header,
83407		}
83408	}
83409	if err != nil {
83410		return nil, err
83411	}
83412	defer googleapi.CloseBody(res)
83413	if err := googleapi.CheckResponse(res); err != nil {
83414		return nil, err
83415	}
83416	ret := &Operation{
83417		ServerResponse: googleapi.ServerResponse{
83418			Header:         res.Header,
83419			HTTPStatusCode: res.StatusCode,
83420		},
83421	}
83422	target := &ret
83423	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
83424		return nil, err
83425	}
83426	return ret, nil
83427	// {
83428	//   "description": "Retrieves the specified zone-specific Operations resource.",
83429	//   "httpMethod": "GET",
83430	//   "id": "compute.zoneOperations.get",
83431	//   "parameterOrder": [
83432	//     "project",
83433	//     "zone",
83434	//     "operation"
83435	//   ],
83436	//   "parameters": {
83437	//     "operation": {
83438	//       "description": "Name of the Operations resource to return.",
83439	//       "location": "path",
83440	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
83441	//       "required": true,
83442	//       "type": "string"
83443	//     },
83444	//     "project": {
83445	//       "description": "Project ID for this request.",
83446	//       "location": "path",
83447	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
83448	//       "required": true,
83449	//       "type": "string"
83450	//     },
83451	//     "zone": {
83452	//       "description": "Name of the zone for this request.",
83453	//       "location": "path",
83454	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
83455	//       "required": true,
83456	//       "type": "string"
83457	//     }
83458	//   },
83459	//   "path": "{project}/zones/{zone}/operations/{operation}",
83460	//   "response": {
83461	//     "$ref": "Operation"
83462	//   },
83463	//   "scopes": [
83464	//     "https://www.googleapis.com/auth/cloud-platform",
83465	//     "https://www.googleapis.com/auth/compute",
83466	//     "https://www.googleapis.com/auth/compute.readonly"
83467	//   ]
83468	// }
83469
83470}
83471
83472// method id "compute.zoneOperations.list":
83473
83474type ZoneOperationsListCall struct {
83475	s            *Service
83476	project      string
83477	zone         string
83478	urlParams_   gensupport.URLParams
83479	ifNoneMatch_ string
83480	ctx_         context.Context
83481	header_      http.Header
83482}
83483
83484// List: Retrieves a list of Operation resources contained within the
83485// specified zone.
83486// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list
83487func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall {
83488	c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
83489	c.project = project
83490	c.zone = zone
83491	return c
83492}
83493
83494// Filter sets the optional parameter "filter": Sets a filter
83495// {expression} for filtering listed resources. Your {expression} must
83496// be in the format: field_name comparison_string literal_string.
83497//
83498// The field_name is the name of the field you want to compare. Only
83499// atomic field types are supported (string, number, boolean). The
83500// comparison_string must be either eq (equals) or ne (not equals). The
83501// literal_string is the string value to filter to. The literal value
83502// must be valid for the type of field you are filtering by (string,
83503// number, boolean). For string fields, the literal value is interpreted
83504// as a regular expression using RE2 syntax. The literal value must
83505// match the entire field.
83506//
83507// For example, to filter for instances that do not have a name of
83508// example-instance, you would use name ne example-instance.
83509//
83510// You can filter on nested fields. For example, you could filter on
83511// instances that have set the scheduling.automaticRestart field to
83512// true. Use filtering on nested fields to take advantage of labels to
83513// organize and search for results based on label values.
83514//
83515// To filter on multiple expressions, provide each separate expression
83516// within parentheses. For example, (scheduling.automaticRestart eq
83517// true) (zone eq us-central1-f). Multiple expressions are treated as
83518// AND expressions, meaning that resources must match all expressions to
83519// pass the filters.
83520func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall {
83521	c.urlParams_.Set("filter", filter)
83522	return c
83523}
83524
83525// MaxResults sets the optional parameter "maxResults": The maximum
83526// number of results per page that should be returned. If the number of
83527// available results is larger than maxResults, Compute Engine returns a
83528// nextPageToken that can be used to get the next page of results in
83529// subsequent list requests. Acceptable values are 0 to 500, inclusive.
83530// (Default: 500)
83531func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall {
83532	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
83533	return c
83534}
83535
83536// OrderBy sets the optional parameter "orderBy": Sorts list results by
83537// a certain order. By default, results are returned in alphanumerical
83538// order based on the resource name.
83539//
83540// You can also sort results in descending order based on the creation
83541// timestamp using orderBy="creationTimestamp desc". This sorts results
83542// based on the creationTimestamp field in reverse chronological order
83543// (newest result first). Use this to sort resources like operations so
83544// that the newest operation is returned first.
83545//
83546// Currently, only sorting by name or creationTimestamp desc is
83547// supported.
83548func (c *ZoneOperationsListCall) OrderBy(orderBy string) *ZoneOperationsListCall {
83549	c.urlParams_.Set("orderBy", orderBy)
83550	return c
83551}
83552
83553// PageToken sets the optional parameter "pageToken": Specifies a page
83554// token to use. Set pageToken to the nextPageToken returned by a
83555// previous list request to get the next page of results.
83556func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall {
83557	c.urlParams_.Set("pageToken", pageToken)
83558	return c
83559}
83560
83561// Fields allows partial responses to be retrieved. See
83562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
83563// for more information.
83564func (c *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall {
83565	c.urlParams_.Set("fields", googleapi.CombineFields(s))
83566	return c
83567}
83568
83569// IfNoneMatch sets the optional parameter which makes the operation
83570// fail if the object's ETag matches the given value. This is useful for
83571// getting updates only after the object has changed since the last
83572// request. Use googleapi.IsNotModified to check whether the response
83573// error from Do is the result of In-None-Match.
83574func (c *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall {
83575	c.ifNoneMatch_ = entityTag
83576	return c
83577}
83578
83579// Context sets the context to be used in this call's Do method. Any
83580// pending HTTP request will be aborted if the provided context is
83581// canceled.
83582func (c *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall {
83583	c.ctx_ = ctx
83584	return c
83585}
83586
83587// Header returns an http.Header that can be modified by the caller to
83588// add HTTP headers to the request.
83589func (c *ZoneOperationsListCall) Header() http.Header {
83590	if c.header_ == nil {
83591		c.header_ = make(http.Header)
83592	}
83593	return c.header_
83594}
83595
83596func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
83597	reqHeaders := make(http.Header)
83598	for k, v := range c.header_ {
83599		reqHeaders[k] = v
83600	}
83601	reqHeaders.Set("User-Agent", c.s.userAgent())
83602	if c.ifNoneMatch_ != "" {
83603		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
83604	}
83605	var body io.Reader = nil
83606	c.urlParams_.Set("alt", alt)
83607	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations")
83608	urls += "?" + c.urlParams_.Encode()
83609	req, _ := http.NewRequest("GET", urls, body)
83610	req.Header = reqHeaders
83611	googleapi.Expand(req.URL, map[string]string{
83612		"project": c.project,
83613		"zone":    c.zone,
83614	})
83615	return gensupport.SendRequest(c.ctx_, c.s.client, req)
83616}
83617
83618// Do executes the "compute.zoneOperations.list" call.
83619// Exactly one of *OperationList or error will be non-nil. Any non-2xx
83620// status code is an error. Response headers are in either
83621// *OperationList.ServerResponse.Header or (if a response was returned
83622// at all) in error.(*googleapi.Error).Header. Use
83623// googleapi.IsNotModified to check whether the returned error was
83624// because http.StatusNotModified was returned.
83625func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) {
83626	gensupport.SetOptions(c.urlParams_, opts...)
83627	res, err := c.doRequest("json")
83628	if res != nil && res.StatusCode == http.StatusNotModified {
83629		if res.Body != nil {
83630			res.Body.Close()
83631		}
83632		return nil, &googleapi.Error{
83633			Code:   res.StatusCode,
83634			Header: res.Header,
83635		}
83636	}
83637	if err != nil {
83638		return nil, err
83639	}
83640	defer googleapi.CloseBody(res)
83641	if err := googleapi.CheckResponse(res); err != nil {
83642		return nil, err
83643	}
83644	ret := &OperationList{
83645		ServerResponse: googleapi.ServerResponse{
83646			Header:         res.Header,
83647			HTTPStatusCode: res.StatusCode,
83648		},
83649	}
83650	target := &ret
83651	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
83652		return nil, err
83653	}
83654	return ret, nil
83655	// {
83656	//   "description": "Retrieves a list of Operation resources contained within the specified zone.",
83657	//   "httpMethod": "GET",
83658	//   "id": "compute.zoneOperations.list",
83659	//   "parameterOrder": [
83660	//     "project",
83661	//     "zone"
83662	//   ],
83663	//   "parameters": {
83664	//     "filter": {
83665	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
83666	//       "location": "query",
83667	//       "type": "string"
83668	//     },
83669	//     "maxResults": {
83670	//       "default": "500",
83671	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
83672	//       "format": "uint32",
83673	//       "location": "query",
83674	//       "minimum": "0",
83675	//       "type": "integer"
83676	//     },
83677	//     "orderBy": {
83678	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
83679	//       "location": "query",
83680	//       "type": "string"
83681	//     },
83682	//     "pageToken": {
83683	//       "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.",
83684	//       "location": "query",
83685	//       "type": "string"
83686	//     },
83687	//     "project": {
83688	//       "description": "Project ID for this request.",
83689	//       "location": "path",
83690	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
83691	//       "required": true,
83692	//       "type": "string"
83693	//     },
83694	//     "zone": {
83695	//       "description": "Name of the zone for request.",
83696	//       "location": "path",
83697	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
83698	//       "required": true,
83699	//       "type": "string"
83700	//     }
83701	//   },
83702	//   "path": "{project}/zones/{zone}/operations",
83703	//   "response": {
83704	//     "$ref": "OperationList"
83705	//   },
83706	//   "scopes": [
83707	//     "https://www.googleapis.com/auth/cloud-platform",
83708	//     "https://www.googleapis.com/auth/compute",
83709	//     "https://www.googleapis.com/auth/compute.readonly"
83710	//   ]
83711	// }
83712
83713}
83714
83715// Pages invokes f for each page of results.
83716// A non-nil error returned from f will halt the iteration.
83717// The provided context supersedes any context provided to the Context method.
83718func (c *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error {
83719	c.ctx_ = ctx
83720	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
83721	for {
83722		x, err := c.Do()
83723		if err != nil {
83724			return err
83725		}
83726		if err := f(x); err != nil {
83727			return err
83728		}
83729		if x.NextPageToken == "" {
83730			return nil
83731		}
83732		c.PageToken(x.NextPageToken)
83733	}
83734}
83735
83736// method id "compute.zones.get":
83737
83738type ZonesGetCall struct {
83739	s            *Service
83740	project      string
83741	zone         string
83742	urlParams_   gensupport.URLParams
83743	ifNoneMatch_ string
83744	ctx_         context.Context
83745	header_      http.Header
83746}
83747
83748// Get: Returns the specified Zone resource. Get a list of available
83749// zones by making a list() request.
83750// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get
83751func (r *ZonesService) Get(project string, zone string) *ZonesGetCall {
83752	c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
83753	c.project = project
83754	c.zone = zone
83755	return c
83756}
83757
83758// Fields allows partial responses to be retrieved. See
83759// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
83760// for more information.
83761func (c *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall {
83762	c.urlParams_.Set("fields", googleapi.CombineFields(s))
83763	return c
83764}
83765
83766// IfNoneMatch sets the optional parameter which makes the operation
83767// fail if the object's ETag matches the given value. This is useful for
83768// getting updates only after the object has changed since the last
83769// request. Use googleapi.IsNotModified to check whether the response
83770// error from Do is the result of In-None-Match.
83771func (c *ZonesGetCall) IfNoneMatch(entityTag string) *ZonesGetCall {
83772	c.ifNoneMatch_ = entityTag
83773	return c
83774}
83775
83776// Context sets the context to be used in this call's Do method. Any
83777// pending HTTP request will be aborted if the provided context is
83778// canceled.
83779func (c *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall {
83780	c.ctx_ = ctx
83781	return c
83782}
83783
83784// Header returns an http.Header that can be modified by the caller to
83785// add HTTP headers to the request.
83786func (c *ZonesGetCall) Header() http.Header {
83787	if c.header_ == nil {
83788		c.header_ = make(http.Header)
83789	}
83790	return c.header_
83791}
83792
83793func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) {
83794	reqHeaders := make(http.Header)
83795	for k, v := range c.header_ {
83796		reqHeaders[k] = v
83797	}
83798	reqHeaders.Set("User-Agent", c.s.userAgent())
83799	if c.ifNoneMatch_ != "" {
83800		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
83801	}
83802	var body io.Reader = nil
83803	c.urlParams_.Set("alt", alt)
83804	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}")
83805	urls += "?" + c.urlParams_.Encode()
83806	req, _ := http.NewRequest("GET", urls, body)
83807	req.Header = reqHeaders
83808	googleapi.Expand(req.URL, map[string]string{
83809		"project": c.project,
83810		"zone":    c.zone,
83811	})
83812	return gensupport.SendRequest(c.ctx_, c.s.client, req)
83813}
83814
83815// Do executes the "compute.zones.get" call.
83816// Exactly one of *Zone or error will be non-nil. Any non-2xx status
83817// code is an error. Response headers are in either
83818// *Zone.ServerResponse.Header or (if a response was returned at all) in
83819// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
83820// whether the returned error was because http.StatusNotModified was
83821// returned.
83822func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) {
83823	gensupport.SetOptions(c.urlParams_, opts...)
83824	res, err := c.doRequest("json")
83825	if res != nil && res.StatusCode == http.StatusNotModified {
83826		if res.Body != nil {
83827			res.Body.Close()
83828		}
83829		return nil, &googleapi.Error{
83830			Code:   res.StatusCode,
83831			Header: res.Header,
83832		}
83833	}
83834	if err != nil {
83835		return nil, err
83836	}
83837	defer googleapi.CloseBody(res)
83838	if err := googleapi.CheckResponse(res); err != nil {
83839		return nil, err
83840	}
83841	ret := &Zone{
83842		ServerResponse: googleapi.ServerResponse{
83843			Header:         res.Header,
83844			HTTPStatusCode: res.StatusCode,
83845		},
83846	}
83847	target := &ret
83848	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
83849		return nil, err
83850	}
83851	return ret, nil
83852	// {
83853	//   "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.",
83854	//   "httpMethod": "GET",
83855	//   "id": "compute.zones.get",
83856	//   "parameterOrder": [
83857	//     "project",
83858	//     "zone"
83859	//   ],
83860	//   "parameters": {
83861	//     "project": {
83862	//       "description": "Project ID for this request.",
83863	//       "location": "path",
83864	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
83865	//       "required": true,
83866	//       "type": "string"
83867	//     },
83868	//     "zone": {
83869	//       "description": "Name of the zone resource to return.",
83870	//       "location": "path",
83871	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
83872	//       "required": true,
83873	//       "type": "string"
83874	//     }
83875	//   },
83876	//   "path": "{project}/zones/{zone}",
83877	//   "response": {
83878	//     "$ref": "Zone"
83879	//   },
83880	//   "scopes": [
83881	//     "https://www.googleapis.com/auth/cloud-platform",
83882	//     "https://www.googleapis.com/auth/compute",
83883	//     "https://www.googleapis.com/auth/compute.readonly"
83884	//   ]
83885	// }
83886
83887}
83888
83889// method id "compute.zones.list":
83890
83891type ZonesListCall struct {
83892	s            *Service
83893	project      string
83894	urlParams_   gensupport.URLParams
83895	ifNoneMatch_ string
83896	ctx_         context.Context
83897	header_      http.Header
83898}
83899
83900// List: Retrieves the list of Zone resources available to the specified
83901// project.
83902// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list
83903func (r *ZonesService) List(project string) *ZonesListCall {
83904	c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
83905	c.project = project
83906	return c
83907}
83908
83909// Filter sets the optional parameter "filter": Sets a filter
83910// {expression} for filtering listed resources. Your {expression} must
83911// be in the format: field_name comparison_string literal_string.
83912//
83913// The field_name is the name of the field you want to compare. Only
83914// atomic field types are supported (string, number, boolean). The
83915// comparison_string must be either eq (equals) or ne (not equals). The
83916// literal_string is the string value to filter to. The literal value
83917// must be valid for the type of field you are filtering by (string,
83918// number, boolean). For string fields, the literal value is interpreted
83919// as a regular expression using RE2 syntax. The literal value must
83920// match the entire field.
83921//
83922// For example, to filter for instances that do not have a name of
83923// example-instance, you would use name ne example-instance.
83924//
83925// You can filter on nested fields. For example, you could filter on
83926// instances that have set the scheduling.automaticRestart field to
83927// true. Use filtering on nested fields to take advantage of labels to
83928// organize and search for results based on label values.
83929//
83930// To filter on multiple expressions, provide each separate expression
83931// within parentheses. For example, (scheduling.automaticRestart eq
83932// true) (zone eq us-central1-f). Multiple expressions are treated as
83933// AND expressions, meaning that resources must match all expressions to
83934// pass the filters.
83935func (c *ZonesListCall) Filter(filter string) *ZonesListCall {
83936	c.urlParams_.Set("filter", filter)
83937	return c
83938}
83939
83940// MaxResults sets the optional parameter "maxResults": The maximum
83941// number of results per page that should be returned. If the number of
83942// available results is larger than maxResults, Compute Engine returns a
83943// nextPageToken that can be used to get the next page of results in
83944// subsequent list requests. Acceptable values are 0 to 500, inclusive.
83945// (Default: 500)
83946func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall {
83947	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
83948	return c
83949}
83950
83951// OrderBy sets the optional parameter "orderBy": Sorts list results by
83952// a certain order. By default, results are returned in alphanumerical
83953// order based on the resource name.
83954//
83955// You can also sort results in descending order based on the creation
83956// timestamp using orderBy="creationTimestamp desc". This sorts results
83957// based on the creationTimestamp field in reverse chronological order
83958// (newest result first). Use this to sort resources like operations so
83959// that the newest operation is returned first.
83960//
83961// Currently, only sorting by name or creationTimestamp desc is
83962// supported.
83963func (c *ZonesListCall) OrderBy(orderBy string) *ZonesListCall {
83964	c.urlParams_.Set("orderBy", orderBy)
83965	return c
83966}
83967
83968// PageToken sets the optional parameter "pageToken": Specifies a page
83969// token to use. Set pageToken to the nextPageToken returned by a
83970// previous list request to get the next page of results.
83971func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall {
83972	c.urlParams_.Set("pageToken", pageToken)
83973	return c
83974}
83975
83976// Fields allows partial responses to be retrieved. See
83977// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
83978// for more information.
83979func (c *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall {
83980	c.urlParams_.Set("fields", googleapi.CombineFields(s))
83981	return c
83982}
83983
83984// IfNoneMatch sets the optional parameter which makes the operation
83985// fail if the object's ETag matches the given value. This is useful for
83986// getting updates only after the object has changed since the last
83987// request. Use googleapi.IsNotModified to check whether the response
83988// error from Do is the result of In-None-Match.
83989func (c *ZonesListCall) IfNoneMatch(entityTag string) *ZonesListCall {
83990	c.ifNoneMatch_ = entityTag
83991	return c
83992}
83993
83994// Context sets the context to be used in this call's Do method. Any
83995// pending HTTP request will be aborted if the provided context is
83996// canceled.
83997func (c *ZonesListCall) Context(ctx context.Context) *ZonesListCall {
83998	c.ctx_ = ctx
83999	return c
84000}
84001
84002// Header returns an http.Header that can be modified by the caller to
84003// add HTTP headers to the request.
84004func (c *ZonesListCall) Header() http.Header {
84005	if c.header_ == nil {
84006		c.header_ = make(http.Header)
84007	}
84008	return c.header_
84009}
84010
84011func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) {
84012	reqHeaders := make(http.Header)
84013	for k, v := range c.header_ {
84014		reqHeaders[k] = v
84015	}
84016	reqHeaders.Set("User-Agent", c.s.userAgent())
84017	if c.ifNoneMatch_ != "" {
84018		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
84019	}
84020	var body io.Reader = nil
84021	c.urlParams_.Set("alt", alt)
84022	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones")
84023	urls += "?" + c.urlParams_.Encode()
84024	req, _ := http.NewRequest("GET", urls, body)
84025	req.Header = reqHeaders
84026	googleapi.Expand(req.URL, map[string]string{
84027		"project": c.project,
84028	})
84029	return gensupport.SendRequest(c.ctx_, c.s.client, req)
84030}
84031
84032// Do executes the "compute.zones.list" call.
84033// Exactly one of *ZoneList or error will be non-nil. Any non-2xx status
84034// code is an error. Response headers are in either
84035// *ZoneList.ServerResponse.Header or (if a response was returned at
84036// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
84037// to check whether the returned error was because
84038// http.StatusNotModified was returned.
84039func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) {
84040	gensupport.SetOptions(c.urlParams_, opts...)
84041	res, err := c.doRequest("json")
84042	if res != nil && res.StatusCode == http.StatusNotModified {
84043		if res.Body != nil {
84044			res.Body.Close()
84045		}
84046		return nil, &googleapi.Error{
84047			Code:   res.StatusCode,
84048			Header: res.Header,
84049		}
84050	}
84051	if err != nil {
84052		return nil, err
84053	}
84054	defer googleapi.CloseBody(res)
84055	if err := googleapi.CheckResponse(res); err != nil {
84056		return nil, err
84057	}
84058	ret := &ZoneList{
84059		ServerResponse: googleapi.ServerResponse{
84060			Header:         res.Header,
84061			HTTPStatusCode: res.StatusCode,
84062		},
84063	}
84064	target := &ret
84065	if err := json.NewDecoder(res.Body).Decode(target); err != nil {
84066		return nil, err
84067	}
84068	return ret, nil
84069	// {
84070	//   "description": "Retrieves the list of Zone resources available to the specified project.",
84071	//   "httpMethod": "GET",
84072	//   "id": "compute.zones.list",
84073	//   "parameterOrder": [
84074	//     "project"
84075	//   ],
84076	//   "parameters": {
84077	//     "filter": {
84078	//       "description": "Sets a filter {expression} for filtering listed resources. 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 name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide 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.",
84079	//       "location": "query",
84080	//       "type": "string"
84081	//     },
84082	//     "maxResults": {
84083	//       "default": "500",
84084	//       "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. Acceptable values are 0 to 500, inclusive. (Default: 500)",
84085	//       "format": "uint32",
84086	//       "location": "query",
84087	//       "minimum": "0",
84088	//       "type": "integer"
84089	//     },
84090	//     "orderBy": {
84091	//       "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.",
84092	//       "location": "query",
84093	//       "type": "string"
84094	//     },
84095	//     "pageToken": {
84096	//       "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.",
84097	//       "location": "query",
84098	//       "type": "string"
84099	//     },
84100	//     "project": {
84101	//       "description": "Project ID for this request.",
84102	//       "location": "path",
84103	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
84104	//       "required": true,
84105	//       "type": "string"
84106	//     }
84107	//   },
84108	//   "path": "{project}/zones",
84109	//   "response": {
84110	//     "$ref": "ZoneList"
84111	//   },
84112	//   "scopes": [
84113	//     "https://www.googleapis.com/auth/cloud-platform",
84114	//     "https://www.googleapis.com/auth/compute",
84115	//     "https://www.googleapis.com/auth/compute.readonly"
84116	//   ]
84117	// }
84118
84119}
84120
84121// Pages invokes f for each page of results.
84122// A non-nil error returned from f will halt the iteration.
84123// The provided context supersedes any context provided to the Context method.
84124func (c *ZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error {
84125	c.ctx_ = ctx
84126	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
84127	for {
84128		x, err := c.Do()
84129		if err != nil {
84130			return err
84131		}
84132		if err := f(x); err != nil {
84133			return err
84134		}
84135		if x.NextPageToken == "" {
84136			return nil
84137		}
84138		c.PageToken(x.NextPageToken)
84139	}
84140}
84141