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 // import "google.golang.org/api/compute/v0.beta"
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.Addresses = NewAddressesService(s)
75	s.Autoscalers = NewAutoscalersService(s)
76	s.BackendServices = NewBackendServicesService(s)
77	s.DiskTypes = NewDiskTypesService(s)
78	s.Disks = NewDisksService(s)
79	s.Firewalls = NewFirewallsService(s)
80	s.ForwardingRules = NewForwardingRulesService(s)
81	s.GlobalAddresses = NewGlobalAddressesService(s)
82	s.GlobalForwardingRules = NewGlobalForwardingRulesService(s)
83	s.GlobalOperations = NewGlobalOperationsService(s)
84	s.HttpHealthChecks = NewHttpHealthChecksService(s)
85	s.HttpsHealthChecks = NewHttpsHealthChecksService(s)
86	s.Images = NewImagesService(s)
87	s.InstanceGroupManagers = NewInstanceGroupManagersService(s)
88	s.InstanceGroups = NewInstanceGroupsService(s)
89	s.InstanceTemplates = NewInstanceTemplatesService(s)
90	s.Instances = NewInstancesService(s)
91	s.Licenses = NewLicensesService(s)
92	s.MachineTypes = NewMachineTypesService(s)
93	s.Networks = NewNetworksService(s)
94	s.Projects = NewProjectsService(s)
95	s.RegionOperations = NewRegionOperationsService(s)
96	s.Regions = NewRegionsService(s)
97	s.Routers = NewRoutersService(s)
98	s.Routes = NewRoutesService(s)
99	s.Snapshots = NewSnapshotsService(s)
100	s.SslCertificates = NewSslCertificatesService(s)
101	s.Subnetworks = NewSubnetworksService(s)
102	s.TargetHttpProxies = NewTargetHttpProxiesService(s)
103	s.TargetHttpsProxies = NewTargetHttpsProxiesService(s)
104	s.TargetInstances = NewTargetInstancesService(s)
105	s.TargetPools = NewTargetPoolsService(s)
106	s.TargetVpnGateways = NewTargetVpnGatewaysService(s)
107	s.UrlMaps = NewUrlMapsService(s)
108	s.VpnTunnels = NewVpnTunnelsService(s)
109	s.ZoneOperations = NewZoneOperationsService(s)
110	s.Zones = NewZonesService(s)
111	return s, nil
112}
113
114type Service struct {
115	client    *http.Client
116	BasePath  string // API endpoint base URL
117	UserAgent string // optional additional User-Agent fragment
118
119	Addresses *AddressesService
120
121	Autoscalers *AutoscalersService
122
123	BackendServices *BackendServicesService
124
125	DiskTypes *DiskTypesService
126
127	Disks *DisksService
128
129	Firewalls *FirewallsService
130
131	ForwardingRules *ForwardingRulesService
132
133	GlobalAddresses *GlobalAddressesService
134
135	GlobalForwardingRules *GlobalForwardingRulesService
136
137	GlobalOperations *GlobalOperationsService
138
139	HttpHealthChecks *HttpHealthChecksService
140
141	HttpsHealthChecks *HttpsHealthChecksService
142
143	Images *ImagesService
144
145	InstanceGroupManagers *InstanceGroupManagersService
146
147	InstanceGroups *InstanceGroupsService
148
149	InstanceTemplates *InstanceTemplatesService
150
151	Instances *InstancesService
152
153	Licenses *LicensesService
154
155	MachineTypes *MachineTypesService
156
157	Networks *NetworksService
158
159	Projects *ProjectsService
160
161	RegionOperations *RegionOperationsService
162
163	Regions *RegionsService
164
165	Routers *RoutersService
166
167	Routes *RoutesService
168
169	Snapshots *SnapshotsService
170
171	SslCertificates *SslCertificatesService
172
173	Subnetworks *SubnetworksService
174
175	TargetHttpProxies *TargetHttpProxiesService
176
177	TargetHttpsProxies *TargetHttpsProxiesService
178
179	TargetInstances *TargetInstancesService
180
181	TargetPools *TargetPoolsService
182
183	TargetVpnGateways *TargetVpnGatewaysService
184
185	UrlMaps *UrlMapsService
186
187	VpnTunnels *VpnTunnelsService
188
189	ZoneOperations *ZoneOperationsService
190
191	Zones *ZonesService
192}
193
194func (s *Service) userAgent() string {
195	if s.UserAgent == "" {
196		return googleapi.UserAgent
197	}
198	return googleapi.UserAgent + " " + s.UserAgent
199}
200
201func NewAddressesService(s *Service) *AddressesService {
202	rs := &AddressesService{s: s}
203	return rs
204}
205
206type AddressesService struct {
207	s *Service
208}
209
210func NewAutoscalersService(s *Service) *AutoscalersService {
211	rs := &AutoscalersService{s: s}
212	return rs
213}
214
215type AutoscalersService struct {
216	s *Service
217}
218
219func NewBackendServicesService(s *Service) *BackendServicesService {
220	rs := &BackendServicesService{s: s}
221	return rs
222}
223
224type BackendServicesService struct {
225	s *Service
226}
227
228func NewDiskTypesService(s *Service) *DiskTypesService {
229	rs := &DiskTypesService{s: s}
230	return rs
231}
232
233type DiskTypesService struct {
234	s *Service
235}
236
237func NewDisksService(s *Service) *DisksService {
238	rs := &DisksService{s: s}
239	return rs
240}
241
242type DisksService struct {
243	s *Service
244}
245
246func NewFirewallsService(s *Service) *FirewallsService {
247	rs := &FirewallsService{s: s}
248	return rs
249}
250
251type FirewallsService struct {
252	s *Service
253}
254
255func NewForwardingRulesService(s *Service) *ForwardingRulesService {
256	rs := &ForwardingRulesService{s: s}
257	return rs
258}
259
260type ForwardingRulesService struct {
261	s *Service
262}
263
264func NewGlobalAddressesService(s *Service) *GlobalAddressesService {
265	rs := &GlobalAddressesService{s: s}
266	return rs
267}
268
269type GlobalAddressesService struct {
270	s *Service
271}
272
273func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService {
274	rs := &GlobalForwardingRulesService{s: s}
275	return rs
276}
277
278type GlobalForwardingRulesService struct {
279	s *Service
280}
281
282func NewGlobalOperationsService(s *Service) *GlobalOperationsService {
283	rs := &GlobalOperationsService{s: s}
284	return rs
285}
286
287type GlobalOperationsService struct {
288	s *Service
289}
290
291func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService {
292	rs := &HttpHealthChecksService{s: s}
293	return rs
294}
295
296type HttpHealthChecksService struct {
297	s *Service
298}
299
300func NewHttpsHealthChecksService(s *Service) *HttpsHealthChecksService {
301	rs := &HttpsHealthChecksService{s: s}
302	return rs
303}
304
305type HttpsHealthChecksService struct {
306	s *Service
307}
308
309func NewImagesService(s *Service) *ImagesService {
310	rs := &ImagesService{s: s}
311	return rs
312}
313
314type ImagesService struct {
315	s *Service
316}
317
318func NewInstanceGroupManagersService(s *Service) *InstanceGroupManagersService {
319	rs := &InstanceGroupManagersService{s: s}
320	return rs
321}
322
323type InstanceGroupManagersService struct {
324	s *Service
325}
326
327func NewInstanceGroupsService(s *Service) *InstanceGroupsService {
328	rs := &InstanceGroupsService{s: s}
329	return rs
330}
331
332type InstanceGroupsService struct {
333	s *Service
334}
335
336func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService {
337	rs := &InstanceTemplatesService{s: s}
338	return rs
339}
340
341type InstanceTemplatesService struct {
342	s *Service
343}
344
345func NewInstancesService(s *Service) *InstancesService {
346	rs := &InstancesService{s: s}
347	return rs
348}
349
350type InstancesService struct {
351	s *Service
352}
353
354func NewLicensesService(s *Service) *LicensesService {
355	rs := &LicensesService{s: s}
356	return rs
357}
358
359type LicensesService struct {
360	s *Service
361}
362
363func NewMachineTypesService(s *Service) *MachineTypesService {
364	rs := &MachineTypesService{s: s}
365	return rs
366}
367
368type MachineTypesService struct {
369	s *Service
370}
371
372func NewNetworksService(s *Service) *NetworksService {
373	rs := &NetworksService{s: s}
374	return rs
375}
376
377type NetworksService struct {
378	s *Service
379}
380
381func NewProjectsService(s *Service) *ProjectsService {
382	rs := &ProjectsService{s: s}
383	return rs
384}
385
386type ProjectsService struct {
387	s *Service
388}
389
390func NewRegionOperationsService(s *Service) *RegionOperationsService {
391	rs := &RegionOperationsService{s: s}
392	return rs
393}
394
395type RegionOperationsService struct {
396	s *Service
397}
398
399func NewRegionsService(s *Service) *RegionsService {
400	rs := &RegionsService{s: s}
401	return rs
402}
403
404type RegionsService struct {
405	s *Service
406}
407
408func NewRoutersService(s *Service) *RoutersService {
409	rs := &RoutersService{s: s}
410	return rs
411}
412
413type RoutersService struct {
414	s *Service
415}
416
417func NewRoutesService(s *Service) *RoutesService {
418	rs := &RoutesService{s: s}
419	return rs
420}
421
422type RoutesService struct {
423	s *Service
424}
425
426func NewSnapshotsService(s *Service) *SnapshotsService {
427	rs := &SnapshotsService{s: s}
428	return rs
429}
430
431type SnapshotsService struct {
432	s *Service
433}
434
435func NewSslCertificatesService(s *Service) *SslCertificatesService {
436	rs := &SslCertificatesService{s: s}
437	return rs
438}
439
440type SslCertificatesService struct {
441	s *Service
442}
443
444func NewSubnetworksService(s *Service) *SubnetworksService {
445	rs := &SubnetworksService{s: s}
446	return rs
447}
448
449type SubnetworksService struct {
450	s *Service
451}
452
453func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService {
454	rs := &TargetHttpProxiesService{s: s}
455	return rs
456}
457
458type TargetHttpProxiesService struct {
459	s *Service
460}
461
462func NewTargetHttpsProxiesService(s *Service) *TargetHttpsProxiesService {
463	rs := &TargetHttpsProxiesService{s: s}
464	return rs
465}
466
467type TargetHttpsProxiesService struct {
468	s *Service
469}
470
471func NewTargetInstancesService(s *Service) *TargetInstancesService {
472	rs := &TargetInstancesService{s: s}
473	return rs
474}
475
476type TargetInstancesService struct {
477	s *Service
478}
479
480func NewTargetPoolsService(s *Service) *TargetPoolsService {
481	rs := &TargetPoolsService{s: s}
482	return rs
483}
484
485type TargetPoolsService struct {
486	s *Service
487}
488
489func NewTargetVpnGatewaysService(s *Service) *TargetVpnGatewaysService {
490	rs := &TargetVpnGatewaysService{s: s}
491	return rs
492}
493
494type TargetVpnGatewaysService struct {
495	s *Service
496}
497
498func NewUrlMapsService(s *Service) *UrlMapsService {
499	rs := &UrlMapsService{s: s}
500	return rs
501}
502
503type UrlMapsService struct {
504	s *Service
505}
506
507func NewVpnTunnelsService(s *Service) *VpnTunnelsService {
508	rs := &VpnTunnelsService{s: s}
509	return rs
510}
511
512type VpnTunnelsService struct {
513	s *Service
514}
515
516func NewZoneOperationsService(s *Service) *ZoneOperationsService {
517	rs := &ZoneOperationsService{s: s}
518	return rs
519}
520
521type ZoneOperationsService struct {
522	s *Service
523}
524
525func NewZonesService(s *Service) *ZonesService {
526	rs := &ZonesService{s: s}
527	return rs
528}
529
530type ZonesService struct {
531	s *Service
532}
533
534// AccessConfig: An access configuration attached to an instance's
535// network interface.
536type AccessConfig struct {
537	// Kind: [Output Only] Type of the resource. Always compute#accessConfig
538	// for access configs.
539	Kind string `json:"kind,omitempty"`
540
541	// Name: Name of this access configuration.
542	Name string `json:"name,omitempty"`
543
544	// NatIP: An external IP address associated with this instance. Specify
545	// an unused static external IP address available to the project or
546	// leave this field undefined to use an IP from a shared ephemeral IP
547	// address pool. If you specify a static external IP address, it must
548	// live in the same region as the zone of the instance.
549	NatIP string `json:"natIP,omitempty"`
550
551	// Type: The type of configuration. The default and only option is
552	// ONE_TO_ONE_NAT.
553	//
554	// Possible values:
555	//   "ONE_TO_ONE_NAT" (default)
556	Type string `json:"type,omitempty"`
557
558	// ForceSendFields is a list of field names (e.g. "Kind") to
559	// unconditionally include in API requests. By default, fields with
560	// empty values are omitted from API requests. However, any non-pointer,
561	// non-interface field appearing in ForceSendFields will be sent to the
562	// server regardless of whether the field is empty or not. This may be
563	// used to include empty fields in Patch requests.
564	ForceSendFields []string `json:"-"`
565}
566
567func (s *AccessConfig) MarshalJSON() ([]byte, error) {
568	type noMethod AccessConfig
569	raw := noMethod(*s)
570	return gensupport.MarshalJSON(raw, s.ForceSendFields)
571}
572
573// Address: A reserved address resource.
574type Address struct {
575	// Address: The static external IP address represented by this resource.
576	Address string `json:"address,omitempty"`
577
578	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
579	// format.
580	CreationTimestamp string `json:"creationTimestamp,omitempty"`
581
582	// Description: An optional description of this resource. Provide this
583	// property when you create the resource.
584	Description string `json:"description,omitempty"`
585
586	// Id: [Output Only] The unique identifier for the resource. This
587	// identifier is defined by the server.
588	Id uint64 `json:"id,omitempty,string"`
589
590	// Kind: [Output Only] Type of the resource. Always compute#address for
591	// addresses.
592	Kind string `json:"kind,omitempty"`
593
594	// Name: Name of the resource. Provided by the client when the resource
595	// is created. The name must be 1-63 characters long, and comply with
596	// RFC1035. Specifically, the name must be 1-63 characters long and
597	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
598	// the first character must be a lowercase letter, and all following
599	// characters must be a dash, lowercase letter, or digit, except the
600	// last character, which cannot be a dash.
601	Name string `json:"name,omitempty"`
602
603	// Region: [Output Only] URL of the region where the regional address
604	// resides. This field is not applicable to global addresses.
605	Region string `json:"region,omitempty"`
606
607	// SelfLink: [Output Only] Server-defined URL for the resource.
608	SelfLink string `json:"selfLink,omitempty"`
609
610	// Status: [Output Only] The status of the address, which can be either
611	// IN_USE or RESERVED. An address that is RESERVED is currently reserved
612	// and available to use. An IN_USE address is currently being used by
613	// another resource and is not available.
614	//
615	// Possible values:
616	//   "IN_USE"
617	//   "RESERVED"
618	Status string `json:"status,omitempty"`
619
620	// Users: [Output Only] The URLs of the resources that are using this
621	// address.
622	Users []string `json:"users,omitempty"`
623
624	// ServerResponse contains the HTTP response code and headers from the
625	// server.
626	googleapi.ServerResponse `json:"-"`
627
628	// ForceSendFields is a list of field names (e.g. "Address") to
629	// unconditionally include in API requests. By default, fields with
630	// empty values are omitted from API requests. However, any non-pointer,
631	// non-interface field appearing in ForceSendFields will be sent to the
632	// server regardless of whether the field is empty or not. This may be
633	// used to include empty fields in Patch requests.
634	ForceSendFields []string `json:"-"`
635}
636
637func (s *Address) MarshalJSON() ([]byte, error) {
638	type noMethod Address
639	raw := noMethod(*s)
640	return gensupport.MarshalJSON(raw, s.ForceSendFields)
641}
642
643type AddressAggregatedList struct {
644	// Id: [Output Only] Unique identifier for the resource; defined by the
645	// server.
646	Id string `json:"id,omitempty"`
647
648	// Items: [Output Only] A map of scoped address lists.
649	Items map[string]AddressesScopedList `json:"items,omitempty"`
650
651	// Kind: [Output Only] Type of resource. Always
652	// compute#addressAggregatedList for aggregated lists of addresses.
653	Kind string `json:"kind,omitempty"`
654
655	// NextPageToken: [Output Only] This token allows you to get the next
656	// page of results for list requests. If the number of results is larger
657	// than maxResults, use the nextPageToken as a value for the query
658	// parameter pageToken in the next list request. Subsequent list
659	// requests will have their own nextPageToken to continue paging through
660	// the results.
661	NextPageToken string `json:"nextPageToken,omitempty"`
662
663	// SelfLink: [Output Only] Server-defined URL for this resource.
664	SelfLink string `json:"selfLink,omitempty"`
665
666	// ServerResponse contains the HTTP response code and headers from the
667	// server.
668	googleapi.ServerResponse `json:"-"`
669
670	// ForceSendFields is a list of field names (e.g. "Id") to
671	// unconditionally include in API requests. By default, fields with
672	// empty values are omitted from API requests. However, any non-pointer,
673	// non-interface field appearing in ForceSendFields will be sent to the
674	// server regardless of whether the field is empty or not. This may be
675	// used to include empty fields in Patch requests.
676	ForceSendFields []string `json:"-"`
677}
678
679func (s *AddressAggregatedList) MarshalJSON() ([]byte, error) {
680	type noMethod AddressAggregatedList
681	raw := noMethod(*s)
682	return gensupport.MarshalJSON(raw, s.ForceSendFields)
683}
684
685// AddressList: Contains a list of addresses.
686type AddressList struct {
687	// Id: [Output Only] The unique identifier for the resource. This
688	// identifier is defined by the server.
689	Id string `json:"id,omitempty"`
690
691	// Items: [Output Only] A list of addresses.
692	Items []*Address `json:"items,omitempty"`
693
694	// Kind: [Output Only] Type of resource. Always compute#addressList for
695	// lists of addresses.
696	Kind string `json:"kind,omitempty"`
697
698	// NextPageToken: [Output Only] This token allows you to get the next
699	// page of results for list requests. If the number of results is larger
700	// than maxResults, use the nextPageToken as a value for the query
701	// parameter pageToken in the next list request. Subsequent list
702	// requests will have their own nextPageToken to continue paging through
703	// the results.
704	NextPageToken string `json:"nextPageToken,omitempty"`
705
706	// SelfLink: [Output Only] Server-defined URL for the resource.
707	SelfLink string `json:"selfLink,omitempty"`
708
709	// ServerResponse contains the HTTP response code and headers from the
710	// server.
711	googleapi.ServerResponse `json:"-"`
712
713	// ForceSendFields is a list of field names (e.g. "Id") 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
722func (s *AddressList) MarshalJSON() ([]byte, error) {
723	type noMethod AddressList
724	raw := noMethod(*s)
725	return gensupport.MarshalJSON(raw, s.ForceSendFields)
726}
727
728type AddressesScopedList struct {
729	// Addresses: [Output Only] List of addresses contained in this scope.
730	Addresses []*Address `json:"addresses,omitempty"`
731
732	// Warning: [Output Only] Informational warning which replaces the list
733	// of addresses when the list is empty.
734	Warning *AddressesScopedListWarning `json:"warning,omitempty"`
735
736	// ForceSendFields is a list of field names (e.g. "Addresses") to
737	// unconditionally include in API requests. By default, fields with
738	// empty values are omitted from API requests. However, any non-pointer,
739	// non-interface field appearing in ForceSendFields will be sent to the
740	// server regardless of whether the field is empty or not. This may be
741	// used to include empty fields in Patch requests.
742	ForceSendFields []string `json:"-"`
743}
744
745func (s *AddressesScopedList) MarshalJSON() ([]byte, error) {
746	type noMethod AddressesScopedList
747	raw := noMethod(*s)
748	return gensupport.MarshalJSON(raw, s.ForceSendFields)
749}
750
751// AddressesScopedListWarning: [Output Only] Informational warning which
752// replaces the list of addresses when the list is empty.
753type AddressesScopedListWarning struct {
754	// Code: [Output Only] A warning code, if applicable. For example,
755	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
756	// the response.
757	//
758	// Possible values:
759	//   "CLEANUP_FAILED"
760	//   "DEPRECATED_RESOURCE_USED"
761	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
762	//   "INJECTED_KERNELS_DEPRECATED"
763	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
764	//   "NEXT_HOP_CANNOT_IP_FORWARD"
765	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
766	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
767	//   "NEXT_HOP_NOT_RUNNING"
768	//   "NOT_CRITICAL_ERROR"
769	//   "NO_RESULTS_ON_PAGE"
770	//   "REQUIRED_TOS_AGREEMENT"
771	//   "RESOURCE_NOT_DELETED"
772	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
773	//   "UNREACHABLE"
774	Code string `json:"code,omitempty"`
775
776	// Data: [Output Only] Metadata about this warning in key: value format.
777	// For example:
778	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
779	Data []*AddressesScopedListWarningData `json:"data,omitempty"`
780
781	// Message: [Output Only] A human-readable description of the warning
782	// code.
783	Message string `json:"message,omitempty"`
784
785	// ForceSendFields is a list of field names (e.g. "Code") to
786	// unconditionally include in API requests. By default, fields with
787	// empty values are omitted from API requests. However, any non-pointer,
788	// non-interface field appearing in ForceSendFields will be sent to the
789	// server regardless of whether the field is empty or not. This may be
790	// used to include empty fields in Patch requests.
791	ForceSendFields []string `json:"-"`
792}
793
794func (s *AddressesScopedListWarning) MarshalJSON() ([]byte, error) {
795	type noMethod AddressesScopedListWarning
796	raw := noMethod(*s)
797	return gensupport.MarshalJSON(raw, s.ForceSendFields)
798}
799
800type AddressesScopedListWarningData struct {
801	// Key: [Output Only] A key that provides more detail on the warning
802	// being returned. For example, for warnings where there are no results
803	// in a list request for a particular zone, this key might be scope and
804	// the key value might be the zone name. Other examples might be a key
805	// indicating a deprecated resource and a suggested replacement, or a
806	// warning about invalid network settings (for example, if an instance
807	// attempts to perform IP forwarding but is not enabled for IP
808	// forwarding).
809	Key string `json:"key,omitempty"`
810
811	// Value: [Output Only] A warning data value corresponding to the key.
812	Value string `json:"value,omitempty"`
813
814	// ForceSendFields is a list of field names (e.g. "Key") to
815	// unconditionally include in API requests. By default, fields with
816	// empty values are omitted from API requests. However, any non-pointer,
817	// non-interface field appearing in ForceSendFields will be sent to the
818	// server regardless of whether the field is empty or not. This may be
819	// used to include empty fields in Patch requests.
820	ForceSendFields []string `json:"-"`
821}
822
823func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) {
824	type noMethod AddressesScopedListWarningData
825	raw := noMethod(*s)
826	return gensupport.MarshalJSON(raw, s.ForceSendFields)
827}
828
829// AttachedDisk: An instance-attached disk resource.
830type AttachedDisk struct {
831	// AutoDelete: Specifies whether the disk will be auto-deleted when the
832	// instance is deleted (but not when the disk is detached from the
833	// instance).
834	AutoDelete bool `json:"autoDelete,omitempty"`
835
836	// Boot: Indicates that this is a boot disk. The virtual machine will
837	// use the first partition of the disk for its root filesystem.
838	Boot bool `json:"boot,omitempty"`
839
840	// DeviceName: Specifies a unique device name of your choice that is
841	// reflected into the /dev/disk/by-id/google-* tree of a Linux operating
842	// system running within the instance. This name can be used to
843	// reference the device for mounting, resizing, and so on, from within
844	// the instance.
845	//
846	// If not specified, the server chooses a default device name to apply
847	// to this disk, in the form persistent-disks-x, where x is a number
848	// assigned by Google Compute Engine. This field is only applicable for
849	// persistent disks.
850	DeviceName string `json:"deviceName,omitempty"`
851
852	// DiskEncryptionKey: Encrypts or decrypts a disk using a
853	// customer-supplied encryption key.
854	//
855	// If you are creating a new disk, this field encrypts the disk using a
856	// customer-supplied encryption key. If you are attaching an existing
857	// disk that is already encrypted, this field decrypts the disk using
858	// the customer-supplied encryption key.
859	//
860	// If you encrypt a new disk using a customer-supplied encryption key,
861	// you must provide the same key again when you attempt to use this
862	// resource at a later time. For example, you must provide the key when
863	// you create a snapshot or an image from the disk or when you attach
864	// the disk to a virtual machine instance.
865	//
866	// If no customer-supplied encryption key is provided at creation, then
867	// the disk will be encrypted using an automatically generated key and
868	// you do not need to provide a key to use the disk later.
869	DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"`
870
871	// Index: Assigns a zero-based index to this disk, where 0 is reserved
872	// for the boot disk. For example, if you have many disks attached to an
873	// instance, each disk would have a unique index number. If not
874	// specified, the server will choose an appropriate value.
875	Index int64 `json:"index,omitempty"`
876
877	// InitializeParams: [Input Only] Specifies the parameters for a new
878	// disk that will be created alongside the new instance. Use
879	// initialization parameters to create boot disks or local SSDs attached
880	// to the new instance.
881	//
882	// This property is mutually exclusive with the source property; you can
883	// only define one or the other, but not both.
884	InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"`
885
886	// Interface: Specifies the disk interface to use for attaching this
887	// disk, which is either SCSI or NVME. The default is SCSI. Persistent
888	// disks must always use SCSI and the request will fail if you attempt
889	// to attach a persistent disk in any other format than SCSI. Local SSDs
890	// can use either NVME or SCSI. For performance characteristics of SCSI
891	// over NVMe, see Local SSD performance.
892	//
893	// Possible values:
894	//   "NVME"
895	//   "SCSI"
896	Interface string `json:"interface,omitempty"`
897
898	// Kind: [Output Only] Type of the resource. Always compute#attachedDisk
899	// for attached disks.
900	Kind string `json:"kind,omitempty"`
901
902	// Licenses: [Output Only] Any valid publicly visible licenses.
903	Licenses []string `json:"licenses,omitempty"`
904
905	// Mode: The mode in which to attach this disk, either READ_WRITE or
906	// READ_ONLY. If not specified, the default is to attach the disk in
907	// READ_WRITE mode.
908	//
909	// Possible values:
910	//   "READ_ONLY"
911	//   "READ_WRITE"
912	Mode string `json:"mode,omitempty"`
913
914	// Source: Specifies a valid partial or full URL to an existing
915	// Persistent Disk resource. This field is only applicable for
916	// persistent disks.
917	Source string `json:"source,omitempty"`
918
919	// Type: Specifies the type of the disk, either SCRATCH or PERSISTENT.
920	// If not specified, the default is PERSISTENT.
921	//
922	// Possible values:
923	//   "PERSISTENT"
924	//   "SCRATCH"
925	Type string `json:"type,omitempty"`
926
927	// ForceSendFields is a list of field names (e.g. "AutoDelete") to
928	// unconditionally include in API requests. By default, fields with
929	// empty values are omitted from API requests. However, any non-pointer,
930	// non-interface field appearing in ForceSendFields will be sent to the
931	// server regardless of whether the field is empty or not. This may be
932	// used to include empty fields in Patch requests.
933	ForceSendFields []string `json:"-"`
934}
935
936func (s *AttachedDisk) MarshalJSON() ([]byte, error) {
937	type noMethod AttachedDisk
938	raw := noMethod(*s)
939	return gensupport.MarshalJSON(raw, s.ForceSendFields)
940}
941
942// AttachedDiskInitializeParams: [Input Only] Specifies the parameters
943// for a new disk that will be created alongside the new instance. Use
944// initialization parameters to create boot disks or local SSDs attached
945// to the new instance.
946//
947// This property is mutually exclusive with the source property; you can
948// only define one or the other, but not both.
949type AttachedDiskInitializeParams struct {
950	// DiskName: Specifies the disk name. If not specified, the default is
951	// to use the name of the instance.
952	DiskName string `json:"diskName,omitempty"`
953
954	// DiskSizeGb: Specifies the size of the disk in base-2 GB.
955	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
956
957	// DiskStorageType: [Deprecated] Storage type of the disk.
958	//
959	// Possible values:
960	//   "HDD"
961	//   "SSD"
962	DiskStorageType string `json:"diskStorageType,omitempty"`
963
964	// DiskType: Specifies the disk type to use to create the instance. If
965	// not specified, the default is pd-standard, specified using the full
966	// URL. For
967	// example:
968	//
969	// https://www.googleapis.com/compute/v1/projects/project/zones
970	// /zone/diskTypes/pd-standard
971	//
972	// Other values include pd-ssd and local-ssd. If you define this field,
973	// you can provide either the full or partial URL. For example, the
974	// following are valid values:
975	// -
976	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType
977	// - projects/project/zones/zone/diskTypes/diskType
978	// - zones/zone/diskTypes/diskType
979	DiskType string `json:"diskType,omitempty"`
980
981	// SourceImage: A source image used to create the disk. You can provide
982	// a private (custom) image, and Compute Engine will use the
983	// corresponding image from your project. For
984	// example:
985	//
986	// global/images/my-private-image
987	//
988	// Or you can provide an image from a publicly-available project. For
989	// example, to use a Debian image from the debian-cloud project, make
990	// sure to include the project in the
991	// URL:
992	//
993	// projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
994	//
995	// where vYYYYMMDD is the image version. The fully-qualified URL will
996	// also work in both cases.
997	SourceImage string `json:"sourceImage,omitempty"`
998
999	// SourceImageEncryptionKey: The customer-supplied encryption key of the
1000	// source image. This key is required if the source image is protected
1001	// by a customer-supplied encryption key.
1002	//
1003	// If the incorrect key is provided, the operation will fail.
1004	SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"`
1005
1006	// ForceSendFields is a list of field names (e.g. "DiskName") to
1007	// unconditionally include in API requests. By default, fields with
1008	// empty values are omitted from API requests. However, any non-pointer,
1009	// non-interface field appearing in ForceSendFields will be sent to the
1010	// server regardless of whether the field is empty or not. This may be
1011	// used to include empty fields in Patch requests.
1012	ForceSendFields []string `json:"-"`
1013}
1014
1015func (s *AttachedDiskInitializeParams) MarshalJSON() ([]byte, error) {
1016	type noMethod AttachedDiskInitializeParams
1017	raw := noMethod(*s)
1018	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1019}
1020
1021// Autoscaler: Represents an Autoscaler resource. Autoscalers allow you
1022// to automatically scale virtual machine instances in managed instance
1023// groups according to an autoscaling policy that you define. For more
1024// information, read Autoscaling Groups of Instances.
1025type Autoscaler struct {
1026	// AutoscalingPolicy: The configuration parameters for the autoscaling
1027	// algorithm. You can define one or more of the policies for an
1028	// autoscaler: cpuUtilization, customMetricUtilizations, and
1029	// loadBalancingUtilization.
1030	//
1031	// If none of these are specified, the default will be to autoscale
1032	// based on cpuUtilization to 0.8 or 80%.
1033	AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"`
1034
1035	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
1036	// format.
1037	CreationTimestamp string `json:"creationTimestamp,omitempty"`
1038
1039	// Description: An optional description of this resource. Provide this
1040	// property when you create the resource.
1041	Description string `json:"description,omitempty"`
1042
1043	// Id: [Output Only] The unique identifier for the resource. This
1044	// identifier is defined by the server.
1045	Id uint64 `json:"id,omitempty,string"`
1046
1047	// Kind: [Output Only] Type of the resource. Always compute#autoscaler
1048	// for autoscalers.
1049	Kind string `json:"kind,omitempty"`
1050
1051	// Name: Name of the resource. Provided by the client when the resource
1052	// is created. The name must be 1-63 characters long, and comply with
1053	// RFC1035. Specifically, the name must be 1-63 characters long and
1054	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
1055	// the first character must be a lowercase letter, and all following
1056	// characters must be a dash, lowercase letter, or digit, except the
1057	// last character, which cannot be a dash.
1058	Name string `json:"name,omitempty"`
1059
1060	// SelfLink: [Output Only] Server-defined URL for the resource.
1061	SelfLink string `json:"selfLink,omitempty"`
1062
1063	// Target: URL of the managed instance group that this autoscaler will
1064	// scale.
1065	Target string `json:"target,omitempty"`
1066
1067	// Zone: [Output Only] URL of the zone where the instance group resides.
1068	Zone string `json:"zone,omitempty"`
1069
1070	// ServerResponse contains the HTTP response code and headers from the
1071	// server.
1072	googleapi.ServerResponse `json:"-"`
1073
1074	// ForceSendFields is a list of field names (e.g. "AutoscalingPolicy")
1075	// to unconditionally include in API requests. By default, fields with
1076	// empty values are omitted from API requests. However, any non-pointer,
1077	// non-interface field appearing in ForceSendFields will be sent to the
1078	// server regardless of whether the field is empty or not. This may be
1079	// used to include empty fields in Patch requests.
1080	ForceSendFields []string `json:"-"`
1081}
1082
1083func (s *Autoscaler) MarshalJSON() ([]byte, error) {
1084	type noMethod Autoscaler
1085	raw := noMethod(*s)
1086	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1087}
1088
1089type AutoscalerAggregatedList struct {
1090	// Id: [Output Only] The unique identifier for the resource. This
1091	// identifier is defined by the server.
1092	Id string `json:"id,omitempty"`
1093
1094	// Items: A map of scoped autoscaler lists.
1095	Items map[string]AutoscalersScopedList `json:"items,omitempty"`
1096
1097	// Kind: [Output Only] Type of resource. Always
1098	// compute#autoscalerAggregatedList for aggregated lists of autoscalers.
1099	Kind string `json:"kind,omitempty"`
1100
1101	// NextPageToken: [Output Only] This token allows you to get the next
1102	// page of results for list requests. If the number of results is larger
1103	// than maxResults, use the nextPageToken as a value for the query
1104	// parameter pageToken in the next list request. Subsequent list
1105	// requests will have their own nextPageToken to continue paging through
1106	// the results.
1107	NextPageToken string `json:"nextPageToken,omitempty"`
1108
1109	// SelfLink: [Output Only] Server-defined URL for this resource.
1110	SelfLink string `json:"selfLink,omitempty"`
1111
1112	// ServerResponse contains the HTTP response code and headers from the
1113	// server.
1114	googleapi.ServerResponse `json:"-"`
1115
1116	// ForceSendFields is a list of field names (e.g. "Id") to
1117	// unconditionally include in API requests. By default, fields with
1118	// empty values are omitted from API requests. However, any non-pointer,
1119	// non-interface field appearing in ForceSendFields will be sent to the
1120	// server regardless of whether the field is empty or not. This may be
1121	// used to include empty fields in Patch requests.
1122	ForceSendFields []string `json:"-"`
1123}
1124
1125func (s *AutoscalerAggregatedList) MarshalJSON() ([]byte, error) {
1126	type noMethod AutoscalerAggregatedList
1127	raw := noMethod(*s)
1128	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1129}
1130
1131// AutoscalerList: Contains a list of Autoscaler resources.
1132type AutoscalerList struct {
1133	// Id: [Output Only] The unique identifier for the resource. This
1134	// identifier is defined by the server.
1135	Id string `json:"id,omitempty"`
1136
1137	// Items: A list of Autoscaler resources.
1138	Items []*Autoscaler `json:"items,omitempty"`
1139
1140	// Kind: [Output Only] Type of resource. Always compute#autoscalerList
1141	// for lists of autoscalers.
1142	Kind string `json:"kind,omitempty"`
1143
1144	// NextPageToken: [Output Only] This token allows you to get the next
1145	// page of results for list requests. If the number of results is larger
1146	// than maxResults, use the nextPageToken as a value for the query
1147	// parameter pageToken in the next list request. Subsequent list
1148	// requests will have their own nextPageToken to continue paging through
1149	// the results.
1150	NextPageToken string `json:"nextPageToken,omitempty"`
1151
1152	// SelfLink: [Output Only] Server-defined URL for this resource.
1153	SelfLink string `json:"selfLink,omitempty"`
1154
1155	// ServerResponse contains the HTTP response code and headers from the
1156	// server.
1157	googleapi.ServerResponse `json:"-"`
1158
1159	// ForceSendFields is a list of field names (e.g. "Id") to
1160	// unconditionally include in API requests. By default, fields with
1161	// empty values are omitted from API requests. However, any non-pointer,
1162	// non-interface field appearing in ForceSendFields will be sent to the
1163	// server regardless of whether the field is empty or not. This may be
1164	// used to include empty fields in Patch requests.
1165	ForceSendFields []string `json:"-"`
1166}
1167
1168func (s *AutoscalerList) MarshalJSON() ([]byte, error) {
1169	type noMethod AutoscalerList
1170	raw := noMethod(*s)
1171	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1172}
1173
1174type AutoscalersScopedList struct {
1175	// Autoscalers: [Output Only] List of autoscalers contained in this
1176	// scope.
1177	Autoscalers []*Autoscaler `json:"autoscalers,omitempty"`
1178
1179	// Warning: [Output Only] Informational warning which replaces the list
1180	// of autoscalers when the list is empty.
1181	Warning *AutoscalersScopedListWarning `json:"warning,omitempty"`
1182
1183	// ForceSendFields is a list of field names (e.g. "Autoscalers") to
1184	// unconditionally include in API requests. By default, fields with
1185	// empty values are omitted from API requests. However, any non-pointer,
1186	// non-interface field appearing in ForceSendFields will be sent to the
1187	// server regardless of whether the field is empty or not. This may be
1188	// used to include empty fields in Patch requests.
1189	ForceSendFields []string `json:"-"`
1190}
1191
1192func (s *AutoscalersScopedList) MarshalJSON() ([]byte, error) {
1193	type noMethod AutoscalersScopedList
1194	raw := noMethod(*s)
1195	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1196}
1197
1198// AutoscalersScopedListWarning: [Output Only] Informational warning
1199// which replaces the list of autoscalers when the list is empty.
1200type AutoscalersScopedListWarning struct {
1201	// Code: [Output Only] A warning code, if applicable. For example,
1202	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
1203	// the response.
1204	//
1205	// Possible values:
1206	//   "CLEANUP_FAILED"
1207	//   "DEPRECATED_RESOURCE_USED"
1208	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
1209	//   "INJECTED_KERNELS_DEPRECATED"
1210	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
1211	//   "NEXT_HOP_CANNOT_IP_FORWARD"
1212	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
1213	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
1214	//   "NEXT_HOP_NOT_RUNNING"
1215	//   "NOT_CRITICAL_ERROR"
1216	//   "NO_RESULTS_ON_PAGE"
1217	//   "REQUIRED_TOS_AGREEMENT"
1218	//   "RESOURCE_NOT_DELETED"
1219	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
1220	//   "UNREACHABLE"
1221	Code string `json:"code,omitempty"`
1222
1223	// Data: [Output Only] Metadata about this warning in key: value format.
1224	// For example:
1225	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1226	Data []*AutoscalersScopedListWarningData `json:"data,omitempty"`
1227
1228	// Message: [Output Only] A human-readable description of the warning
1229	// code.
1230	Message string `json:"message,omitempty"`
1231
1232	// ForceSendFields is a list of field names (e.g. "Code") to
1233	// unconditionally include in API requests. By default, fields with
1234	// empty values are omitted from API requests. However, any non-pointer,
1235	// non-interface field appearing in ForceSendFields will be sent to the
1236	// server regardless of whether the field is empty or not. This may be
1237	// used to include empty fields in Patch requests.
1238	ForceSendFields []string `json:"-"`
1239}
1240
1241func (s *AutoscalersScopedListWarning) MarshalJSON() ([]byte, error) {
1242	type noMethod AutoscalersScopedListWarning
1243	raw := noMethod(*s)
1244	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1245}
1246
1247type AutoscalersScopedListWarningData struct {
1248	// Key: [Output Only] A key that provides more detail on the warning
1249	// being returned. For example, for warnings where there are no results
1250	// in a list request for a particular zone, this key might be scope and
1251	// the key value might be the zone name. Other examples might be a key
1252	// indicating a deprecated resource and a suggested replacement, or a
1253	// warning about invalid network settings (for example, if an instance
1254	// attempts to perform IP forwarding but is not enabled for IP
1255	// forwarding).
1256	Key string `json:"key,omitempty"`
1257
1258	// Value: [Output Only] A warning data value corresponding to the key.
1259	Value string `json:"value,omitempty"`
1260
1261	// ForceSendFields is a list of field names (e.g. "Key") to
1262	// unconditionally include in API requests. By default, fields with
1263	// empty values are omitted from API requests. However, any non-pointer,
1264	// non-interface field appearing in ForceSendFields will be sent to the
1265	// server regardless of whether the field is empty or not. This may be
1266	// used to include empty fields in Patch requests.
1267	ForceSendFields []string `json:"-"`
1268}
1269
1270func (s *AutoscalersScopedListWarningData) MarshalJSON() ([]byte, error) {
1271	type noMethod AutoscalersScopedListWarningData
1272	raw := noMethod(*s)
1273	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1274}
1275
1276// AutoscalingPolicy: Cloud Autoscaler policy.
1277type AutoscalingPolicy struct {
1278	// CoolDownPeriodSec: The number of seconds that the autoscaler should
1279	// wait before it starts collecting information from a new instance.
1280	// This prevents the autoscaler from collecting information when the
1281	// instance is initializing, during which the collected usage would not
1282	// be reliable. The default time autoscaler waits is 60
1283	// seconds.
1284	//
1285	// Virtual machine initialization times might vary because of numerous
1286	// factors. We recommend that you test how long an instance may take to
1287	// initialize. To do this, create an instance and time the startup
1288	// process.
1289	CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"`
1290
1291	// CpuUtilization: Defines the CPU utilization policy that allows the
1292	// autoscaler to scale based on the average CPU utilization of a managed
1293	// instance group.
1294	CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,omitempty"`
1295
1296	// CustomMetricUtilizations: Configuration parameters of autoscaling
1297	// based on a custom metric.
1298	CustomMetricUtilizations []*AutoscalingPolicyCustomMetricUtilization `json:"customMetricUtilizations,omitempty"`
1299
1300	// LoadBalancingUtilization: Configuration parameters of autoscaling
1301	// based on load balancer.
1302	LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `json:"loadBalancingUtilization,omitempty"`
1303
1304	// MaxNumReplicas: The maximum number of instances that the autoscaler
1305	// can scale up to. This is required when creating or updating an
1306	// autoscaler. The maximum number of replicas should not be lower than
1307	// minimal number of replicas.
1308	MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"`
1309
1310	// MinNumReplicas: The minimum number of replicas that the autoscaler
1311	// can scale down to. This cannot be less than 0. If not provided,
1312	// autoscaler will choose a default value depending on maximum number of
1313	// instances allowed.
1314	MinNumReplicas int64 `json:"minNumReplicas,omitempty"`
1315
1316	// ForceSendFields is a list of field names (e.g. "CoolDownPeriodSec")
1317	// to unconditionally include in API requests. By default, fields with
1318	// empty values are omitted from API requests. However, any non-pointer,
1319	// non-interface field appearing in ForceSendFields will be sent to the
1320	// server regardless of whether the field is empty or not. This may be
1321	// used to include empty fields in Patch requests.
1322	ForceSendFields []string `json:"-"`
1323}
1324
1325func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) {
1326	type noMethod AutoscalingPolicy
1327	raw := noMethod(*s)
1328	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1329}
1330
1331// AutoscalingPolicyCpuUtilization: CPU utilization policy.
1332type AutoscalingPolicyCpuUtilization struct {
1333	// UtilizationTarget: The target CPU utilization that the autoscaler
1334	// should maintain. Must be a float value in the range (0, 1]. If not
1335	// specified, the default is 0.8.
1336	//
1337	// If the CPU level is below the target utilization, the autoscaler
1338	// scales down the number of instances until it reaches the minimum
1339	// number of instances you specified or until the average CPU of your
1340	// instances reaches the target utilization.
1341	//
1342	// If the average CPU is above the target utilization, the autoscaler
1343	// scales up until it reaches the maximum number of instances you
1344	// specified or until the average utilization reaches the target
1345	// utilization.
1346	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
1347
1348	// ForceSendFields is a list of field names (e.g. "UtilizationTarget")
1349	// to unconditionally include in API requests. By default, fields with
1350	// empty values are omitted from API requests. However, any non-pointer,
1351	// non-interface field appearing in ForceSendFields will be sent to the
1352	// server regardless of whether the field is empty or not. This may be
1353	// used to include empty fields in Patch requests.
1354	ForceSendFields []string `json:"-"`
1355}
1356
1357func (s *AutoscalingPolicyCpuUtilization) MarshalJSON() ([]byte, error) {
1358	type noMethod AutoscalingPolicyCpuUtilization
1359	raw := noMethod(*s)
1360	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1361}
1362
1363// AutoscalingPolicyCustomMetricUtilization: Custom utilization metric
1364// policy.
1365type AutoscalingPolicyCustomMetricUtilization struct {
1366	// Metric: The identifier of the Cloud Monitoring metric. The metric
1367	// cannot have negative values and should be a utilization metric, which
1368	// means that the number of virtual machines handling requests should
1369	// increase or decrease proportionally to the metric. The metric must
1370	// also have a label of compute.googleapis.com/resource_id with the
1371	// value of the instance's unique ID, although this alone does not
1372	// guarantee that the metric is valid.
1373	//
1374	// For example, the following is a valid
1375	// metric:
1376	// compute.googleapis.com/instance/network/received_bytes_count
1377	//
1378	//
1379	//
1380	// The following is not a valid metric because it does not increase or
1381	// decrease based on
1382	// usage:
1383	// compute.googleapis.com/instance/cpu/reserved_cores
1384	Metric string `json:"metric,omitempty"`
1385
1386	// UtilizationTarget: Target value of the metric which autoscaler should
1387	// maintain. Must be a positive value.
1388	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
1389
1390	// UtilizationTargetType: Defines how target utilization value is
1391	// expressed for a Cloud Monitoring metric. Either GAUGE,
1392	// DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default
1393	// is GAUGE.
1394	//
1395	// Possible values:
1396	//   "DELTA_PER_MINUTE"
1397	//   "DELTA_PER_SECOND"
1398	//   "GAUGE"
1399	UtilizationTargetType string `json:"utilizationTargetType,omitempty"`
1400
1401	// ForceSendFields is a list of field names (e.g. "Metric") to
1402	// unconditionally include in API requests. By default, fields with
1403	// empty values are omitted from API requests. However, any non-pointer,
1404	// non-interface field appearing in ForceSendFields will be sent to the
1405	// server regardless of whether the field is empty or not. This may be
1406	// used to include empty fields in Patch requests.
1407	ForceSendFields []string `json:"-"`
1408}
1409
1410func (s *AutoscalingPolicyCustomMetricUtilization) MarshalJSON() ([]byte, error) {
1411	type noMethod AutoscalingPolicyCustomMetricUtilization
1412	raw := noMethod(*s)
1413	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1414}
1415
1416// AutoscalingPolicyLoadBalancingUtilization: Configuration parameters
1417// of autoscaling based on load balancing.
1418type AutoscalingPolicyLoadBalancingUtilization struct {
1419	// UtilizationTarget: Fraction of backend capacity utilization (set in
1420	// HTTP(s) load balancing configuration) that autoscaler should
1421	// maintain. Must be a positive float value. If not defined, the default
1422	// is 0.8.
1423	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
1424
1425	// ForceSendFields is a list of field names (e.g. "UtilizationTarget")
1426	// to unconditionally include in API requests. By default, fields with
1427	// empty values are omitted from API requests. However, any non-pointer,
1428	// non-interface field appearing in ForceSendFields will be sent to the
1429	// server regardless of whether the field is empty or not. This may be
1430	// used to include empty fields in Patch requests.
1431	ForceSendFields []string `json:"-"`
1432}
1433
1434func (s *AutoscalingPolicyLoadBalancingUtilization) MarshalJSON() ([]byte, error) {
1435	type noMethod AutoscalingPolicyLoadBalancingUtilization
1436	raw := noMethod(*s)
1437	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1438}
1439
1440// Backend: Message containing information of one individual backend.
1441type Backend struct {
1442	// BalancingMode: Specifies the balancing mode for this backend. For
1443	// global HTTP(S) load balancing, the default is UTILIZATION. Valid
1444	// values are UTILIZATION and RATE.
1445	//
1446	// Possible values:
1447	//   "RATE"
1448	//   "UTILIZATION"
1449	BalancingMode string `json:"balancingMode,omitempty"`
1450
1451	// CapacityScaler: A multiplier applied to the group's maximum servicing
1452	// capacity (either UTILIZATION or RATE). Default value is 1, which
1453	// means the group will serve up to 100% of its configured CPU or RPS
1454	// (depending on balancingMode). A setting of 0 means the group is
1455	// completely drained, offering 0% of its available CPU or RPS. Valid
1456	// range is [0.0,1.0].
1457	CapacityScaler float64 `json:"capacityScaler,omitempty"`
1458
1459	// Description: An optional description of this resource. Provide this
1460	// property when you create the resource.
1461	Description string `json:"description,omitempty"`
1462
1463	// Group: The fully-qualified URL of a zonal Instance Group resource.
1464	// This instance group defines the list of instances that serve traffic.
1465	// Member virtual machine instances from each instance group must live
1466	// in the same zone as the instance group itself. No two backends in a
1467	// backend service are allowed to use same Instance Group
1468	// resource.
1469	//
1470	// Note that you must specify an Instance Group resource using the
1471	// fully-qualified URL, rather than a partial URL.
1472	Group string `json:"group,omitempty"`
1473
1474	// MaxRate: The max requests per second (RPS) of the group. Can be used
1475	// with either RATE or UTILIZATION balancing modes, but required if RATE
1476	// mode. For RATE mode, either maxRate or maxRatePerInstance must be
1477	// set.
1478	MaxRate int64 `json:"maxRate,omitempty"`
1479
1480	// MaxRatePerInstance: The max requests per second (RPS) that a single
1481	// backend instance can handle.This is used to calculate the capacity of
1482	// the group. Can be used in either balancing mode. For RATE mode,
1483	// either maxRate or maxRatePerInstance must be set.
1484	MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"`
1485
1486	// MaxUtilization: Used when balancingMode is UTILIZATION. This ratio
1487	// defines the CPU utilization target for the group. The default is 0.8.
1488	// Valid range is [0.0, 1.0].
1489	MaxUtilization float64 `json:"maxUtilization,omitempty"`
1490
1491	// ForceSendFields is a list of field names (e.g. "BalancingMode") to
1492	// unconditionally include in API requests. By default, fields with
1493	// empty values are omitted from API requests. However, any non-pointer,
1494	// non-interface field appearing in ForceSendFields will be sent to the
1495	// server regardless of whether the field is empty or not. This may be
1496	// used to include empty fields in Patch requests.
1497	ForceSendFields []string `json:"-"`
1498}
1499
1500func (s *Backend) MarshalJSON() ([]byte, error) {
1501	type noMethod Backend
1502	raw := noMethod(*s)
1503	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1504}
1505
1506// BackendService: A BackendService resource. This resource defines a
1507// group of backend virtual machines and their serving capacity.
1508type BackendService struct {
1509	// Backends: The list of backends that serve this BackendService.
1510	Backends []*Backend `json:"backends,omitempty"`
1511
1512	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
1513	// format.
1514	CreationTimestamp string `json:"creationTimestamp,omitempty"`
1515
1516	// Description: An optional description of this resource. Provide this
1517	// property when you create the resource.
1518	Description string `json:"description,omitempty"`
1519
1520	// EnableCDN: If true, enable Cloud CDN for this BackendService.
1521	EnableCDN bool `json:"enableCDN,omitempty"`
1522
1523	// Fingerprint: Fingerprint of this resource. A hash of the contents
1524	// stored in this object. This field is used in optimistic locking. This
1525	// field will be ignored when inserting a BackendService. An up-to-date
1526	// fingerprint must be provided in order to update the BackendService.
1527	Fingerprint string `json:"fingerprint,omitempty"`
1528
1529	// HealthChecks: The list of URLs to the HttpHealthCheck or
1530	// HttpsHealthCheck resource for health checking this BackendService.
1531	// Currently at most one health check can be specified, and a health
1532	// check is required.
1533	HealthChecks []string `json:"healthChecks,omitempty"`
1534
1535	// Id: [Output Only] The unique identifier for the resource. This
1536	// identifier is defined by the server.
1537	Id uint64 `json:"id,omitempty,string"`
1538
1539	// Kind: [Output Only] Type of resource. Always compute#backendService
1540	// for backend services.
1541	Kind string `json:"kind,omitempty"`
1542
1543	// Name: Name of the resource. Provided by the client when the resource
1544	// is created. The name must be 1-63 characters long, and comply with
1545	// RFC1035. Specifically, the name must be 1-63 characters long and
1546	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
1547	// the first character must be a lowercase letter, and all following
1548	// characters must be a dash, lowercase letter, or digit, except the
1549	// last character, which cannot be a dash.
1550	Name string `json:"name,omitempty"`
1551
1552	// Port: Deprecated in favor of portName. The TCP port to connect on the
1553	// backend. The default value is 80.
1554	Port int64 `json:"port,omitempty"`
1555
1556	// PortName: Name of backend port. The same name should appear in the
1557	// instance groups referenced by this service. Required.
1558	PortName string `json:"portName,omitempty"`
1559
1560	// Protocol: The protocol this BackendService uses to communicate with
1561	// backends.
1562	//
1563	// Possible values are HTTP, HTTPS, HTTP2, TCP and SSL.
1564	//
1565	// Possible values:
1566	//   "HTTP"
1567	//   "HTTPS"
1568	Protocol string `json:"protocol,omitempty"`
1569
1570	// SelfLink: [Output Only] Server-defined URL for the resource.
1571	SelfLink string `json:"selfLink,omitempty"`
1572
1573	// TimeoutSec: How many seconds to wait for the backend before
1574	// considering it a failed request. Default is 30 seconds.
1575	TimeoutSec int64 `json:"timeoutSec,omitempty"`
1576
1577	// ServerResponse contains the HTTP response code and headers from the
1578	// server.
1579	googleapi.ServerResponse `json:"-"`
1580
1581	// ForceSendFields is a list of field names (e.g. "Backends") to
1582	// unconditionally include in API requests. By default, fields with
1583	// empty values are omitted from API requests. However, any non-pointer,
1584	// non-interface field appearing in ForceSendFields will be sent to the
1585	// server regardless of whether the field is empty or not. This may be
1586	// used to include empty fields in Patch requests.
1587	ForceSendFields []string `json:"-"`
1588}
1589
1590func (s *BackendService) MarshalJSON() ([]byte, error) {
1591	type noMethod BackendService
1592	raw := noMethod(*s)
1593	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1594}
1595
1596type BackendServiceGroupHealth struct {
1597	HealthStatus []*HealthStatus `json:"healthStatus,omitempty"`
1598
1599	// Kind: [Output Only] Type of resource. Always
1600	// compute#backendServiceGroupHealth for the health of backend services.
1601	Kind string `json:"kind,omitempty"`
1602
1603	// ServerResponse contains the HTTP response code and headers from the
1604	// server.
1605	googleapi.ServerResponse `json:"-"`
1606
1607	// ForceSendFields is a list of field names (e.g. "HealthStatus") to
1608	// unconditionally include in API requests. By default, fields with
1609	// empty values are omitted from API requests. However, any non-pointer,
1610	// non-interface field appearing in ForceSendFields will be sent to the
1611	// server regardless of whether the field is empty or not. This may be
1612	// used to include empty fields in Patch requests.
1613	ForceSendFields []string `json:"-"`
1614}
1615
1616func (s *BackendServiceGroupHealth) MarshalJSON() ([]byte, error) {
1617	type noMethod BackendServiceGroupHealth
1618	raw := noMethod(*s)
1619	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1620}
1621
1622// BackendServiceList: Contains a list of BackendService resources.
1623type BackendServiceList struct {
1624	// Id: [Output Only] The unique identifier for the resource. This
1625	// identifier is defined by the server.
1626	Id string `json:"id,omitempty"`
1627
1628	// Items: A list of BackendService resources.
1629	Items []*BackendService `json:"items,omitempty"`
1630
1631	// Kind: [Output Only] Type of resource. Always
1632	// compute#backendServiceList for lists of backend services.
1633	Kind string `json:"kind,omitempty"`
1634
1635	// NextPageToken: [Output Only] This token allows you to get the next
1636	// page of results for list requests. If the number of results is larger
1637	// than maxResults, use the nextPageToken as a value for the query
1638	// parameter pageToken in the next list request. Subsequent list
1639	// requests will have their own nextPageToken to continue paging through
1640	// the results.
1641	NextPageToken string `json:"nextPageToken,omitempty"`
1642
1643	// SelfLink: [Output Only] Server-defined URL for this resource.
1644	SelfLink string `json:"selfLink,omitempty"`
1645
1646	// ServerResponse contains the HTTP response code and headers from the
1647	// server.
1648	googleapi.ServerResponse `json:"-"`
1649
1650	// ForceSendFields is a list of field names (e.g. "Id") to
1651	// unconditionally include in API requests. By default, fields with
1652	// empty values are omitted from API requests. However, any non-pointer,
1653	// non-interface field appearing in ForceSendFields will be sent to the
1654	// server regardless of whether the field is empty or not. This may be
1655	// used to include empty fields in Patch requests.
1656	ForceSendFields []string `json:"-"`
1657}
1658
1659func (s *BackendServiceList) MarshalJSON() ([]byte, error) {
1660	type noMethod BackendServiceList
1661	raw := noMethod(*s)
1662	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1663}
1664
1665type CacheInvalidationRule struct {
1666	Path string `json:"path,omitempty"`
1667
1668	// ForceSendFields is a list of field names (e.g. "Path") to
1669	// unconditionally include in API requests. By default, fields with
1670	// empty values are omitted from API requests. However, any non-pointer,
1671	// non-interface field appearing in ForceSendFields will be sent to the
1672	// server regardless of whether the field is empty or not. This may be
1673	// used to include empty fields in Patch requests.
1674	ForceSendFields []string `json:"-"`
1675}
1676
1677func (s *CacheInvalidationRule) MarshalJSON() ([]byte, error) {
1678	type noMethod CacheInvalidationRule
1679	raw := noMethod(*s)
1680	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1681}
1682
1683// CustomerEncryptionKey: Represents a customer-supplied encryption key
1684type CustomerEncryptionKey struct {
1685	// RawKey: Specifies a 256-bit customer-supplied encryption key, encoded
1686	// in base64 to either encrypt or decrypt this resource.
1687	RawKey string `json:"rawKey,omitempty"`
1688
1689	// RsaEncryptedKey: Specifies a base64 encoded, RSA-wrapped 2048-bit
1690	// customer-supplied encryption key to either encrypt or decrypt this
1691	// resource.
1692	//
1693	// The key must meet the following requirements before you can provide
1694	// it to Compute Engine:
1695	// - The key is wrapped using a RSA public key certificate provided by
1696	// Google.
1697	// - After being wrapped, the key must be encoded in base64 encoding.
1698	// Get the RSA public key certificate provided by Google
1699	// at:
1700	// https://cloud-certs.storage.googleapis.com/google-cloud-csek-ingre
1701	// ss.pem
1702	RsaEncryptedKey string `json:"rsaEncryptedKey,omitempty"`
1703
1704	// Sha256: [Output only] The base64 encoded SHA-256 hash of the
1705	// customer-supplied encryption key that protects this resource.
1706	Sha256 string `json:"sha256,omitempty"`
1707
1708	// ForceSendFields is a list of field names (e.g. "RawKey") to
1709	// unconditionally include in API requests. By default, fields with
1710	// empty values are omitted from API requests. However, any non-pointer,
1711	// non-interface field appearing in ForceSendFields will be sent to the
1712	// server regardless of whether the field is empty or not. This may be
1713	// used to include empty fields in Patch requests.
1714	ForceSendFields []string `json:"-"`
1715}
1716
1717func (s *CustomerEncryptionKey) MarshalJSON() ([]byte, error) {
1718	type noMethod CustomerEncryptionKey
1719	raw := noMethod(*s)
1720	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1721}
1722
1723// DeprecationStatus: Deprecation status for a public resource.
1724type DeprecationStatus struct {
1725	// Deleted: An optional RFC3339 timestamp on or after which the
1726	// deprecation state of this resource will be changed to DELETED.
1727	Deleted string `json:"deleted,omitempty"`
1728
1729	// Deprecated: An optional RFC3339 timestamp on or after which the
1730	// deprecation state of this resource will be changed to DEPRECATED.
1731	Deprecated string `json:"deprecated,omitempty"`
1732
1733	// Obsolete: An optional RFC3339 timestamp on or after which the
1734	// deprecation state of this resource will be changed to OBSOLETE.
1735	Obsolete string `json:"obsolete,omitempty"`
1736
1737	// Replacement: The URL of the suggested replacement for a deprecated
1738	// resource. The suggested replacement resource must be the same kind of
1739	// resource as the deprecated resource.
1740	Replacement string `json:"replacement,omitempty"`
1741
1742	// State: The deprecation state of this resource. This can be
1743	// DEPRECATED, OBSOLETE, or DELETED. Operations which create a new
1744	// resource using a DEPRECATED resource will return successfully, but
1745	// with a warning indicating the deprecated resource and recommending
1746	// its replacement. Operations which use OBSOLETE or DELETED resources
1747	// will be rejected and result in an error.
1748	//
1749	// Possible values:
1750	//   "DELETED"
1751	//   "DEPRECATED"
1752	//   "OBSOLETE"
1753	State string `json:"state,omitempty"`
1754
1755	// ForceSendFields is a list of field names (e.g. "Deleted") to
1756	// unconditionally include in API requests. By default, fields with
1757	// empty values are omitted from API requests. However, any non-pointer,
1758	// non-interface field appearing in ForceSendFields will be sent to the
1759	// server regardless of whether the field is empty or not. This may be
1760	// used to include empty fields in Patch requests.
1761	ForceSendFields []string `json:"-"`
1762}
1763
1764func (s *DeprecationStatus) MarshalJSON() ([]byte, error) {
1765	type noMethod DeprecationStatus
1766	raw := noMethod(*s)
1767	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1768}
1769
1770// Disk: A Disk resource.
1771type Disk struct {
1772	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
1773	// format.
1774	CreationTimestamp string `json:"creationTimestamp,omitempty"`
1775
1776	// Description: An optional description of this resource. Provide this
1777	// property when you create the resource.
1778	Description string `json:"description,omitempty"`
1779
1780	// DiskEncryptionKey: Encrypts the disk using a customer-supplied
1781	// encryption key.
1782	//
1783	// If you encrypt the disk using a customer-supplied encryption key, and
1784	// you want to use the disk later (e.g. to create a disk snapshot or an
1785	// image, or to attach the disk to a virtual machine), you must provide
1786	// the same key in your request. If you provide an incorrect key, or no
1787	// key, the operation will fail.
1788	//
1789	// Customer-supplied encryption keys do not protect access to metadata
1790	// of the disk.
1791	//
1792	// If no customer-supplied encryption key is provided at creation, then
1793	// the disk will be encrypted using an automatically generated key and
1794	// you do not need to provide a key to use the disk later.
1795	DiskEncryptionKey *CustomerEncryptionKey `json:"diskEncryptionKey,omitempty"`
1796
1797	// Id: [Output Only] The unique identifier for the resource. This
1798	// identifier is defined by the server.
1799	Id uint64 `json:"id,omitempty,string"`
1800
1801	// Kind: [Output Only] Type of the resource. Always compute#disk for
1802	// disks.
1803	Kind string `json:"kind,omitempty"`
1804
1805	// LabelFingerprint: A fingerprint for the labels being applied to this
1806	// disk, which is essentially a hash of the labels set used for
1807	// optimistic locking. The fingerprint is initially generated by Compute
1808	// Engine and changes after every request to modify or update metadata.
1809	// You must always provide an up-to-date fingerprint hash in order to
1810	// update or change labels.
1811	//
1812	// To see the latest fingerprint, make get() request to the disk.
1813	LabelFingerprint string `json:"labelFingerprint,omitempty"`
1814
1815	// Labels: Labels to apply to this disk. These can be later modified by
1816	// the setLabels method. Each label key & value must comply with
1817	// RFC1035. Label values may be empty.
1818	Labels map[string]string `json:"labels,omitempty"`
1819
1820	// LastAttachTimestamp: [Output Only] Last attach timestamp in RFC3339
1821	// text format.
1822	LastAttachTimestamp string `json:"lastAttachTimestamp,omitempty"`
1823
1824	// LastDetachTimestamp: [Output Only] Last detach timestamp in RFC3339
1825	// text format.
1826	LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"`
1827
1828	// Licenses: [Output Only] Any applicable publicly visible licenses.
1829	Licenses []string `json:"licenses,omitempty"`
1830
1831	// Name: Name of the resource. Provided by the client when the resource
1832	// is created. The name must be 1-63 characters long, and comply with
1833	// RFC1035. Specifically, the name must be 1-63 characters long and
1834	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
1835	// the first character must be a lowercase letter, and all following
1836	// characters must be a dash, lowercase letter, or digit, except the
1837	// last character, which cannot be a dash.
1838	Name string `json:"name,omitempty"`
1839
1840	// Options: Internal use only.
1841	Options string `json:"options,omitempty"`
1842
1843	// SelfLink: [Output Only] Server-defined fully-qualified URL for this
1844	// resource.
1845	SelfLink string `json:"selfLink,omitempty"`
1846
1847	// SizeGb: Size of the persistent disk, specified in GB. You can specify
1848	// this field when creating a persistent disk using the sourceImage or
1849	// sourceSnapshot parameter, or specify it alone to create an empty
1850	// persistent disk.
1851	//
1852	// If you specify this field along with sourceImage or sourceSnapshot,
1853	// the value of sizeGb must not be less than the size of the sourceImage
1854	// or the size of the snapshot.
1855	SizeGb int64 `json:"sizeGb,omitempty,string"`
1856
1857	// SourceImage: The source image used to create this disk. If the source
1858	// image is deleted from the system, this field will not be set, even if
1859	// an image with the same name has been re-created.
1860	//
1861	// When creating a disk, you can provide a private (custom) image using
1862	// the following input, and Compute Engine will use the corresponding
1863	// image from your project. For example:
1864	//
1865	// global/images/my-private-image
1866	//
1867	// Or you can provide an image from a publicly-available project. For
1868	// example, to use a Debian image from the debian-cloud project, make
1869	// sure to include the project in the
1870	// URL:
1871	//
1872	// projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD
1873	//
1874	// where vYYYYMMDD is the image version. The fully-qualified URL will
1875	// also work in both cases.
1876	//
1877	// You can also specify the latest image for a private image family by
1878	// replacing the image name suffix with family/family-name. For
1879	// example:
1880	//
1881	// global/images/family/my-private-family
1882	//
1883	// Or you can specify an image family from a publicly-available project.
1884	// For example, to use the latest Debian 7 from the debian-cloud
1885	// project, make sure to include the project in the
1886	// URL:
1887	//
1888	// projects/debian-cloud/global/images/family/debian-7
1889	SourceImage string `json:"sourceImage,omitempty"`
1890
1891	// SourceImageEncryptionKey: The customer-supplied encryption key of the
1892	// source image. This key is required if the source image is protected
1893	// by a customer-supplied encryption key.
1894	//
1895	// If the incorrect key is provided, the operation will fail.
1896	SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"`
1897
1898	// SourceImageId: [Output Only] The ID value of the image used to create
1899	// this disk. This value identifies the exact image that was used to
1900	// create this persistent disk. For example, if you created the
1901	// persistent disk from an image that was later deleted and recreated
1902	// under the same name, the source image ID would identify the exact
1903	// version of the image that was used.
1904	SourceImageId string `json:"sourceImageId,omitempty"`
1905
1906	// SourceSnapshot: The source snapshot used to create this disk. You can
1907	// provide this as a partial or full URL to the resource. For example,
1908	// the following are valid values:
1909	// -
1910	// https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot
1911	// - projects/project/global/snapshots/snapshot
1912	// - global/snapshots/snapshot
1913	SourceSnapshot string `json:"sourceSnapshot,omitempty"`
1914
1915	// SourceSnapshotEncryptionKey: The customer-supplied encryption key of
1916	// the source snapshot. This key is required if the source snapshot is
1917	// protected by a customer-supplied encryption key.
1918	//
1919	// If the incorrect key is provided, the operation will fail.
1920	SourceSnapshotEncryptionKey *CustomerEncryptionKey `json:"sourceSnapshotEncryptionKey,omitempty"`
1921
1922	// SourceSnapshotId: [Output Only] The unique ID of the snapshot used to
1923	// create this disk. This value identifies the exact snapshot that was
1924	// used to create this persistent disk. For example, if you created the
1925	// persistent disk from a snapshot that was later deleted and recreated
1926	// under the same name, the source snapshot ID would identify the exact
1927	// version of the snapshot that was used.
1928	SourceSnapshotId string `json:"sourceSnapshotId,omitempty"`
1929
1930	// Status: [Output Only] The status of disk creation. Applicable
1931	// statuses includes: CREATING, FAILED, READY, RESTORING.
1932	//
1933	// Possible values:
1934	//   "CREATING"
1935	//   "FAILED"
1936	//   "READY"
1937	//   "RESTORING"
1938	Status string `json:"status,omitempty"`
1939
1940	// StorageType: [Deprecated] Storage type of the persistent disk.
1941	//
1942	// Possible values:
1943	//   "HDD"
1944	//   "SSD"
1945	StorageType string `json:"storageType,omitempty"`
1946
1947	// Type: URL of the disk type resource describing which disk type to use
1948	// to create the disk. Provide this when creating the disk.
1949	Type string `json:"type,omitempty"`
1950
1951	// Users: [Output Only] Links to the users of the disk (attached
1952	// instances) in form: project/zones/zone/instances/instance
1953	Users []string `json:"users,omitempty"`
1954
1955	// Zone: [Output Only] URL of the zone where the disk resides.
1956	Zone string `json:"zone,omitempty"`
1957
1958	// ServerResponse contains the HTTP response code and headers from the
1959	// server.
1960	googleapi.ServerResponse `json:"-"`
1961
1962	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
1963	// to unconditionally include in API requests. By default, fields with
1964	// empty values are omitted from API requests. However, any non-pointer,
1965	// non-interface field appearing in ForceSendFields will be sent to the
1966	// server regardless of whether the field is empty or not. This may be
1967	// used to include empty fields in Patch requests.
1968	ForceSendFields []string `json:"-"`
1969}
1970
1971func (s *Disk) MarshalJSON() ([]byte, error) {
1972	type noMethod Disk
1973	raw := noMethod(*s)
1974	return gensupport.MarshalJSON(raw, s.ForceSendFields)
1975}
1976
1977type DiskAggregatedList struct {
1978	// Id: [Output Only] The unique identifier for the resource. This
1979	// identifier is defined by the server.
1980	Id string `json:"id,omitempty"`
1981
1982	// Items: [Output Only] A map of scoped disk lists.
1983	Items map[string]DisksScopedList `json:"items,omitempty"`
1984
1985	// Kind: [Output Only] Type of resource. Always
1986	// compute#diskAggregatedList for aggregated lists of persistent disks.
1987	Kind string `json:"kind,omitempty"`
1988
1989	// NextPageToken: [Output Only] This token allows you to get the next
1990	// page of results for list requests. If the number of results is larger
1991	// than maxResults, use the nextPageToken as a value for the query
1992	// parameter pageToken in the next list request. Subsequent list
1993	// requests will have their own nextPageToken to continue paging through
1994	// the results.
1995	NextPageToken string `json:"nextPageToken,omitempty"`
1996
1997	// SelfLink: [Output Only] Server-defined URL for this resource.
1998	SelfLink string `json:"selfLink,omitempty"`
1999
2000	// ServerResponse contains the HTTP response code and headers from the
2001	// server.
2002	googleapi.ServerResponse `json:"-"`
2003
2004	// ForceSendFields is a list of field names (e.g. "Id") to
2005	// unconditionally include in API requests. By default, fields with
2006	// empty values are omitted from API requests. However, any non-pointer,
2007	// non-interface field appearing in ForceSendFields will be sent to the
2008	// server regardless of whether the field is empty or not. This may be
2009	// used to include empty fields in Patch requests.
2010	ForceSendFields []string `json:"-"`
2011}
2012
2013func (s *DiskAggregatedList) MarshalJSON() ([]byte, error) {
2014	type noMethod DiskAggregatedList
2015	raw := noMethod(*s)
2016	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2017}
2018
2019// DiskList: A list of Disk resources.
2020type DiskList struct {
2021	// Id: [Output Only] The unique identifier for the resource. This
2022	// identifier is defined by the server.
2023	Id string `json:"id,omitempty"`
2024
2025	// Items: [Output Only] A list of persistent disks.
2026	Items []*Disk `json:"items,omitempty"`
2027
2028	// Kind: [Output Only] Type of resource. Always compute#diskList for
2029	// lists of disks.
2030	Kind string `json:"kind,omitempty"`
2031
2032	// NextPageToken: [Output Only] This token allows you to get the next
2033	// page of results for list requests. If the number of results is larger
2034	// than maxResults, use the nextPageToken as a value for the query
2035	// parameter pageToken in the next list request. Subsequent list
2036	// requests will have their own nextPageToken to continue paging through
2037	// the results.
2038	NextPageToken string `json:"nextPageToken,omitempty"`
2039
2040	// SelfLink: [Output Only] Server-defined URL for this resource.
2041	SelfLink string `json:"selfLink,omitempty"`
2042
2043	// ServerResponse contains the HTTP response code and headers from the
2044	// server.
2045	googleapi.ServerResponse `json:"-"`
2046
2047	// ForceSendFields is a list of field names (e.g. "Id") to
2048	// unconditionally include in API requests. By default, fields with
2049	// empty values are omitted from API requests. However, any non-pointer,
2050	// non-interface field appearing in ForceSendFields will be sent to the
2051	// server regardless of whether the field is empty or not. This may be
2052	// used to include empty fields in Patch requests.
2053	ForceSendFields []string `json:"-"`
2054}
2055
2056func (s *DiskList) MarshalJSON() ([]byte, error) {
2057	type noMethod DiskList
2058	raw := noMethod(*s)
2059	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2060}
2061
2062// DiskType: A DiskType resource.
2063type DiskType struct {
2064	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2065	// format.
2066	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2067
2068	// DefaultDiskSizeGb: [Output Only] Server-defined default disk size in
2069	// GB.
2070	DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"`
2071
2072	// Deprecated: [Output Only] The deprecation status associated with this
2073	// disk type.
2074	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
2075
2076	// Description: [Output Only] An optional description of this resource.
2077	Description string `json:"description,omitempty"`
2078
2079	// Id: [Output Only] The unique identifier for the resource. This
2080	// identifier is defined by the server.
2081	Id uint64 `json:"id,omitempty,string"`
2082
2083	// Kind: [Output Only] Type of the resource. Always compute#diskType for
2084	// disk types.
2085	Kind string `json:"kind,omitempty"`
2086
2087	// Name: [Output Only] Name of the resource.
2088	Name string `json:"name,omitempty"`
2089
2090	// SelfLink: [Output Only] Server-defined URL for the resource.
2091	SelfLink string `json:"selfLink,omitempty"`
2092
2093	// ValidDiskSize: [Output Only] An optional textual description of the
2094	// valid disk size, such as "10GB-10TB".
2095	ValidDiskSize string `json:"validDiskSize,omitempty"`
2096
2097	// Zone: [Output Only] URL of the zone where the disk type resides.
2098	Zone string `json:"zone,omitempty"`
2099
2100	// ServerResponse contains the HTTP response code and headers from the
2101	// server.
2102	googleapi.ServerResponse `json:"-"`
2103
2104	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
2105	// to unconditionally include in API requests. By default, fields with
2106	// empty values are omitted from API requests. However, any non-pointer,
2107	// non-interface field appearing in ForceSendFields will be sent to the
2108	// server regardless of whether the field is empty or not. This may be
2109	// used to include empty fields in Patch requests.
2110	ForceSendFields []string `json:"-"`
2111}
2112
2113func (s *DiskType) MarshalJSON() ([]byte, error) {
2114	type noMethod DiskType
2115	raw := noMethod(*s)
2116	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2117}
2118
2119type DiskTypeAggregatedList struct {
2120	// Id: [Output Only] The unique identifier for the resource. This
2121	// identifier is defined by the server.
2122	Id string `json:"id,omitempty"`
2123
2124	// Items: [Output Only] A map of scoped disk type lists.
2125	Items map[string]DiskTypesScopedList `json:"items,omitempty"`
2126
2127	// Kind: [Output Only] Type of resource. Always
2128	// compute#diskTypeAggregatedList.
2129	Kind string `json:"kind,omitempty"`
2130
2131	// NextPageToken: [Output Only] This token allows you to get the next
2132	// page of results for list requests. If the number of results is larger
2133	// than maxResults, use the nextPageToken as a value for the query
2134	// parameter pageToken in the next list request. Subsequent list
2135	// requests will have their own nextPageToken to continue paging through
2136	// the results.
2137	NextPageToken string `json:"nextPageToken,omitempty"`
2138
2139	// SelfLink: [Output Only] Server-defined URL for this resource.
2140	SelfLink string `json:"selfLink,omitempty"`
2141
2142	// ServerResponse contains the HTTP response code and headers from the
2143	// server.
2144	googleapi.ServerResponse `json:"-"`
2145
2146	// ForceSendFields is a list of field names (e.g. "Id") to
2147	// unconditionally include in API requests. By default, fields with
2148	// empty values are omitted from API requests. However, any non-pointer,
2149	// non-interface field appearing in ForceSendFields will be sent to the
2150	// server regardless of whether the field is empty or not. This may be
2151	// used to include empty fields in Patch requests.
2152	ForceSendFields []string `json:"-"`
2153}
2154
2155func (s *DiskTypeAggregatedList) MarshalJSON() ([]byte, error) {
2156	type noMethod DiskTypeAggregatedList
2157	raw := noMethod(*s)
2158	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2159}
2160
2161// DiskTypeList: Contains a list of disk types.
2162type DiskTypeList struct {
2163	// Id: [Output Only] The unique identifier for the resource. This
2164	// identifier is defined by the server.
2165	Id string `json:"id,omitempty"`
2166
2167	// Items: [Output Only] A list of Disk Type resources.
2168	Items []*DiskType `json:"items,omitempty"`
2169
2170	// Kind: [Output Only] Type of resource. Always compute#diskTypeList for
2171	// disk types.
2172	Kind string `json:"kind,omitempty"`
2173
2174	// NextPageToken: [Output Only] This token allows you to get the next
2175	// page of results for list requests. If the number of results is larger
2176	// than maxResults, use the nextPageToken as a value for the query
2177	// parameter pageToken in the next list request. Subsequent list
2178	// requests will have their own nextPageToken to continue paging through
2179	// the results.
2180	NextPageToken string `json:"nextPageToken,omitempty"`
2181
2182	// SelfLink: [Output Only] Server-defined URL for this resource.
2183	SelfLink string `json:"selfLink,omitempty"`
2184
2185	// ServerResponse contains the HTTP response code and headers from the
2186	// server.
2187	googleapi.ServerResponse `json:"-"`
2188
2189	// ForceSendFields is a list of field names (e.g. "Id") to
2190	// unconditionally include in API requests. By default, fields with
2191	// empty values are omitted from API requests. However, any non-pointer,
2192	// non-interface field appearing in ForceSendFields will be sent to the
2193	// server regardless of whether the field is empty or not. This may be
2194	// used to include empty fields in Patch requests.
2195	ForceSendFields []string `json:"-"`
2196}
2197
2198func (s *DiskTypeList) MarshalJSON() ([]byte, error) {
2199	type noMethod DiskTypeList
2200	raw := noMethod(*s)
2201	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2202}
2203
2204type DiskTypesScopedList struct {
2205	// DiskTypes: [Output Only] List of disk types contained in this scope.
2206	DiskTypes []*DiskType `json:"diskTypes,omitempty"`
2207
2208	// Warning: [Output Only] Informational warning which replaces the list
2209	// of disk types when the list is empty.
2210	Warning *DiskTypesScopedListWarning `json:"warning,omitempty"`
2211
2212	// ForceSendFields is a list of field names (e.g. "DiskTypes") to
2213	// unconditionally include in API requests. By default, fields with
2214	// empty values are omitted from API requests. However, any non-pointer,
2215	// non-interface field appearing in ForceSendFields will be sent to the
2216	// server regardless of whether the field is empty or not. This may be
2217	// used to include empty fields in Patch requests.
2218	ForceSendFields []string `json:"-"`
2219}
2220
2221func (s *DiskTypesScopedList) MarshalJSON() ([]byte, error) {
2222	type noMethod DiskTypesScopedList
2223	raw := noMethod(*s)
2224	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2225}
2226
2227// DiskTypesScopedListWarning: [Output Only] Informational warning which
2228// replaces the list of disk types when the list is empty.
2229type DiskTypesScopedListWarning struct {
2230	// Code: [Output Only] A warning code, if applicable. For example,
2231	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
2232	// the response.
2233	//
2234	// Possible values:
2235	//   "CLEANUP_FAILED"
2236	//   "DEPRECATED_RESOURCE_USED"
2237	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
2238	//   "INJECTED_KERNELS_DEPRECATED"
2239	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
2240	//   "NEXT_HOP_CANNOT_IP_FORWARD"
2241	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
2242	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
2243	//   "NEXT_HOP_NOT_RUNNING"
2244	//   "NOT_CRITICAL_ERROR"
2245	//   "NO_RESULTS_ON_PAGE"
2246	//   "REQUIRED_TOS_AGREEMENT"
2247	//   "RESOURCE_NOT_DELETED"
2248	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
2249	//   "UNREACHABLE"
2250	Code string `json:"code,omitempty"`
2251
2252	// Data: [Output Only] Metadata about this warning in key: value format.
2253	// For example:
2254	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2255	Data []*DiskTypesScopedListWarningData `json:"data,omitempty"`
2256
2257	// Message: [Output Only] A human-readable description of the warning
2258	// code.
2259	Message string `json:"message,omitempty"`
2260
2261	// ForceSendFields is a list of field names (e.g. "Code") to
2262	// unconditionally include in API requests. By default, fields with
2263	// empty values are omitted from API requests. However, any non-pointer,
2264	// non-interface field appearing in ForceSendFields will be sent to the
2265	// server regardless of whether the field is empty or not. This may be
2266	// used to include empty fields in Patch requests.
2267	ForceSendFields []string `json:"-"`
2268}
2269
2270func (s *DiskTypesScopedListWarning) MarshalJSON() ([]byte, error) {
2271	type noMethod DiskTypesScopedListWarning
2272	raw := noMethod(*s)
2273	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2274}
2275
2276type DiskTypesScopedListWarningData struct {
2277	// Key: [Output Only] A key that provides more detail on the warning
2278	// being returned. For example, for warnings where there are no results
2279	// in a list request for a particular zone, this key might be scope and
2280	// the key value might be the zone name. Other examples might be a key
2281	// indicating a deprecated resource and a suggested replacement, or a
2282	// warning about invalid network settings (for example, if an instance
2283	// attempts to perform IP forwarding but is not enabled for IP
2284	// forwarding).
2285	Key string `json:"key,omitempty"`
2286
2287	// Value: [Output Only] A warning data value corresponding to the key.
2288	Value string `json:"value,omitempty"`
2289
2290	// ForceSendFields is a list of field names (e.g. "Key") to
2291	// unconditionally include in API requests. By default, fields with
2292	// empty values are omitted from API requests. However, any non-pointer,
2293	// non-interface field appearing in ForceSendFields will be sent to the
2294	// server regardless of whether the field is empty or not. This may be
2295	// used to include empty fields in Patch requests.
2296	ForceSendFields []string `json:"-"`
2297}
2298
2299func (s *DiskTypesScopedListWarningData) MarshalJSON() ([]byte, error) {
2300	type noMethod DiskTypesScopedListWarningData
2301	raw := noMethod(*s)
2302	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2303}
2304
2305type DisksResizeRequest struct {
2306	// SizeGb: The new size of the persistent disk, which is specified in
2307	// GB.
2308	SizeGb int64 `json:"sizeGb,omitempty,string"`
2309
2310	// ForceSendFields is a list of field names (e.g. "SizeGb") to
2311	// unconditionally include in API requests. By default, fields with
2312	// empty values are omitted from API requests. However, any non-pointer,
2313	// non-interface field appearing in ForceSendFields will be sent to the
2314	// server regardless of whether the field is empty or not. This may be
2315	// used to include empty fields in Patch requests.
2316	ForceSendFields []string `json:"-"`
2317}
2318
2319func (s *DisksResizeRequest) MarshalJSON() ([]byte, error) {
2320	type noMethod DisksResizeRequest
2321	raw := noMethod(*s)
2322	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2323}
2324
2325type DisksScopedList struct {
2326	// Disks: [Output Only] List of disks contained in this scope.
2327	Disks []*Disk `json:"disks,omitempty"`
2328
2329	// Warning: [Output Only] Informational warning which replaces the list
2330	// of disks when the list is empty.
2331	Warning *DisksScopedListWarning `json:"warning,omitempty"`
2332
2333	// ForceSendFields is a list of field names (e.g. "Disks") to
2334	// unconditionally include in API requests. By default, fields with
2335	// empty values are omitted from API requests. However, any non-pointer,
2336	// non-interface field appearing in ForceSendFields will be sent to the
2337	// server regardless of whether the field is empty or not. This may be
2338	// used to include empty fields in Patch requests.
2339	ForceSendFields []string `json:"-"`
2340}
2341
2342func (s *DisksScopedList) MarshalJSON() ([]byte, error) {
2343	type noMethod DisksScopedList
2344	raw := noMethod(*s)
2345	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2346}
2347
2348// DisksScopedListWarning: [Output Only] Informational warning which
2349// replaces the list of disks when the list is empty.
2350type DisksScopedListWarning struct {
2351	// Code: [Output Only] A warning code, if applicable. For example,
2352	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
2353	// the response.
2354	//
2355	// Possible values:
2356	//   "CLEANUP_FAILED"
2357	//   "DEPRECATED_RESOURCE_USED"
2358	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
2359	//   "INJECTED_KERNELS_DEPRECATED"
2360	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
2361	//   "NEXT_HOP_CANNOT_IP_FORWARD"
2362	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
2363	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
2364	//   "NEXT_HOP_NOT_RUNNING"
2365	//   "NOT_CRITICAL_ERROR"
2366	//   "NO_RESULTS_ON_PAGE"
2367	//   "REQUIRED_TOS_AGREEMENT"
2368	//   "RESOURCE_NOT_DELETED"
2369	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
2370	//   "UNREACHABLE"
2371	Code string `json:"code,omitempty"`
2372
2373	// Data: [Output Only] Metadata about this warning in key: value format.
2374	// For example:
2375	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2376	Data []*DisksScopedListWarningData `json:"data,omitempty"`
2377
2378	// Message: [Output Only] A human-readable description of the warning
2379	// code.
2380	Message string `json:"message,omitempty"`
2381
2382	// ForceSendFields is a list of field names (e.g. "Code") to
2383	// unconditionally include in API requests. By default, fields with
2384	// empty values are omitted from API requests. However, any non-pointer,
2385	// non-interface field appearing in ForceSendFields will be sent to the
2386	// server regardless of whether the field is empty or not. This may be
2387	// used to include empty fields in Patch requests.
2388	ForceSendFields []string `json:"-"`
2389}
2390
2391func (s *DisksScopedListWarning) MarshalJSON() ([]byte, error) {
2392	type noMethod DisksScopedListWarning
2393	raw := noMethod(*s)
2394	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2395}
2396
2397type DisksScopedListWarningData struct {
2398	// Key: [Output Only] A key that provides more detail on the warning
2399	// being returned. For example, for warnings where there are no results
2400	// in a list request for a particular zone, this key might be scope and
2401	// the key value might be the zone name. Other examples might be a key
2402	// indicating a deprecated resource and a suggested replacement, or a
2403	// warning about invalid network settings (for example, if an instance
2404	// attempts to perform IP forwarding but is not enabled for IP
2405	// forwarding).
2406	Key string `json:"key,omitempty"`
2407
2408	// Value: [Output Only] A warning data value corresponding to the key.
2409	Value string `json:"value,omitempty"`
2410
2411	// ForceSendFields is a list of field names (e.g. "Key") to
2412	// unconditionally include in API requests. By default, fields with
2413	// empty values are omitted from API requests. However, any non-pointer,
2414	// non-interface field appearing in ForceSendFields will be sent to the
2415	// server regardless of whether the field is empty or not. This may be
2416	// used to include empty fields in Patch requests.
2417	ForceSendFields []string `json:"-"`
2418}
2419
2420func (s *DisksScopedListWarningData) MarshalJSON() ([]byte, error) {
2421	type noMethod DisksScopedListWarningData
2422	raw := noMethod(*s)
2423	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2424}
2425
2426// Firewall: Represents a Firewall resource.
2427type Firewall struct {
2428	// Allowed: The list of rules specified by this firewall. Each rule
2429	// specifies a protocol and port-range tuple that describes a permitted
2430	// connection.
2431	Allowed []*FirewallAllowed `json:"allowed,omitempty"`
2432
2433	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2434	// format.
2435	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2436
2437	// Description: An optional description of this resource. Provide this
2438	// property when you create the resource.
2439	Description string `json:"description,omitempty"`
2440
2441	// Id: [Output Only] The unique identifier for the resource. This
2442	// identifier is defined by the server.
2443	Id uint64 `json:"id,omitempty,string"`
2444
2445	// Kind: [Output Ony] Type of the resource. Always compute#firewall for
2446	// firewall rules.
2447	Kind string `json:"kind,omitempty"`
2448
2449	// Name: Name of the resource; provided by the client when the resource
2450	// is created. The name must be 1-63 characters long, and comply with
2451	// RFC1035. Specifically, the name must be 1-63 characters long and
2452	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
2453	// the first character must be a lowercase letter, and all following
2454	// characters must be a dash, lowercase letter, or digit, except the
2455	// last character, which cannot be a dash.
2456	Name string `json:"name,omitempty"`
2457
2458	// Network: URL of the network resource for this firewall rule. If not
2459	// specified when creating a firewall rule, the default network is
2460	// used:
2461	// global/networks/default
2462	// If you choose to specify this property, you can specify the network
2463	// as a full or partial URL. For example, the following are all valid
2464	// URLs:
2465	// -
2466	// https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network
2467	// - projects/myproject/global/networks/my-network
2468	// - global/networks/default
2469	Network string `json:"network,omitempty"`
2470
2471	// SelfLink: [Output Only] Server-defined URL for the resource.
2472	SelfLink string `json:"selfLink,omitempty"`
2473
2474	// SourceRanges: The IP address blocks that this rule applies to,
2475	// expressed in CIDR format. One or both of sourceRanges and sourceTags
2476	// may be set.
2477	//
2478	// If both properties are set, an inbound connection is allowed if the
2479	// range matches the sourceRanges OR the tag of the source matches the
2480	// sourceTags property. The connection does not need to match both
2481	// properties.
2482	SourceRanges []string `json:"sourceRanges,omitempty"`
2483
2484	// SourceTags: A list of instance tags which this rule applies to. One
2485	// or both of sourceRanges and sourceTags may be set.
2486	//
2487	// If both properties are set, an inbound connection is allowed if the
2488	// range matches the sourceRanges OR the tag of the source matches the
2489	// sourceTags property. The connection does not need to match both
2490	// properties.
2491	SourceTags []string `json:"sourceTags,omitempty"`
2492
2493	// TargetTags: A list of instance tags indicating sets of instances
2494	// located in the network that may make network connections as specified
2495	// in allowed[]. If no targetTags are specified, the firewall rule
2496	// applies to all instances on the specified network.
2497	TargetTags []string `json:"targetTags,omitempty"`
2498
2499	// ServerResponse contains the HTTP response code and headers from the
2500	// server.
2501	googleapi.ServerResponse `json:"-"`
2502
2503	// ForceSendFields is a list of field names (e.g. "Allowed") to
2504	// unconditionally include in API requests. By default, fields with
2505	// empty values are omitted from API requests. However, any non-pointer,
2506	// non-interface field appearing in ForceSendFields will be sent to the
2507	// server regardless of whether the field is empty or not. This may be
2508	// used to include empty fields in Patch requests.
2509	ForceSendFields []string `json:"-"`
2510}
2511
2512func (s *Firewall) MarshalJSON() ([]byte, error) {
2513	type noMethod Firewall
2514	raw := noMethod(*s)
2515	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2516}
2517
2518type FirewallAllowed struct {
2519	// IPProtocol: The IP protocol that is allowed for this rule. The
2520	// protocol type is required when creating a firewall rule. This value
2521	// can either be one of the following well known protocol strings (tcp,
2522	// udp, icmp, esp, ah, sctp), or the IP protocol number.
2523	IPProtocol string `json:"IPProtocol,omitempty"`
2524
2525	// Ports: An optional list of ports which are allowed. This field is
2526	// only applicable for UDP or TCP protocol. Each entry must be either an
2527	// integer or a range. If not specified, connections through any port
2528	// are allowed
2529	//
2530	// Example inputs include: ["22"], ["80","443"], and ["12345-12349"].
2531	Ports []string `json:"ports,omitempty"`
2532
2533	// ForceSendFields is a list of field names (e.g. "IPProtocol") to
2534	// unconditionally include in API requests. By default, fields with
2535	// empty values are omitted from API requests. However, any non-pointer,
2536	// non-interface field appearing in ForceSendFields will be sent to the
2537	// server regardless of whether the field is empty or not. This may be
2538	// used to include empty fields in Patch requests.
2539	ForceSendFields []string `json:"-"`
2540}
2541
2542func (s *FirewallAllowed) MarshalJSON() ([]byte, error) {
2543	type noMethod FirewallAllowed
2544	raw := noMethod(*s)
2545	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2546}
2547
2548// FirewallList: Contains a list of firewalls.
2549type FirewallList struct {
2550	// Id: [Output Only] The unique identifier for the resource. This
2551	// identifier is defined by the server.
2552	Id string `json:"id,omitempty"`
2553
2554	// Items: [Output Only] A list of Firewall resources.
2555	Items []*Firewall `json:"items,omitempty"`
2556
2557	// Kind: [Output Only] Type of resource. Always compute#firewallList for
2558	// lists of firewalls.
2559	Kind string `json:"kind,omitempty"`
2560
2561	// NextPageToken: [Output Only] This token allows you to get the next
2562	// page of results for list requests. If the number of results is larger
2563	// than maxResults, use the nextPageToken as a value for the query
2564	// parameter pageToken in the next list request. Subsequent list
2565	// requests will have their own nextPageToken to continue paging through
2566	// the results.
2567	NextPageToken string `json:"nextPageToken,omitempty"`
2568
2569	// SelfLink: [Output Only] Server-defined URL for this resource.
2570	SelfLink string `json:"selfLink,omitempty"`
2571
2572	// ServerResponse contains the HTTP response code and headers from the
2573	// server.
2574	googleapi.ServerResponse `json:"-"`
2575
2576	// ForceSendFields is a list of field names (e.g. "Id") to
2577	// unconditionally include in API requests. By default, fields with
2578	// empty values are omitted from API requests. However, any non-pointer,
2579	// non-interface field appearing in ForceSendFields will be sent to the
2580	// server regardless of whether the field is empty or not. This may be
2581	// used to include empty fields in Patch requests.
2582	ForceSendFields []string `json:"-"`
2583}
2584
2585func (s *FirewallList) MarshalJSON() ([]byte, error) {
2586	type noMethod FirewallList
2587	raw := noMethod(*s)
2588	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2589}
2590
2591// ForwardingRule: A ForwardingRule resource. A ForwardingRule resource
2592// specifies which pool of target virtual machines to forward a packet
2593// to if it matches the given [IPAddress, IPProtocol, portRange] tuple.
2594type ForwardingRule struct {
2595	// IPAddress: Value of the reserved IP address that this forwarding rule
2596	// is serving on behalf of. For global forwarding rules, the address
2597	// must be a global IP; for regional forwarding rules, the address must
2598	// live in the same region as the forwarding rule. If left empty
2599	// (default value), an ephemeral IP from the same scope (global or
2600	// regional) will be assigned.
2601	IPAddress string `json:"IPAddress,omitempty"`
2602
2603	// IPProtocol: The IP protocol to which this rule applies. Valid options
2604	// are TCP, UDP, ESP, AH or SCTP.
2605	//
2606	// Possible values:
2607	//   "AH"
2608	//   "ESP"
2609	//   "SCTP"
2610	//   "TCP"
2611	//   "UDP"
2612	IPProtocol string `json:"IPProtocol,omitempty"`
2613
2614	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2615	// format.
2616	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2617
2618	// Description: An optional description of this resource. Provide this
2619	// property when you create the resource.
2620	Description string `json:"description,omitempty"`
2621
2622	// Id: [Output Only] The unique identifier for the resource. This
2623	// identifier is defined by the server.
2624	Id uint64 `json:"id,omitempty,string"`
2625
2626	// Kind: [Output Only] Type of the resource. Always
2627	// compute#forwardingRule for Forwarding Rule resources.
2628	Kind string `json:"kind,omitempty"`
2629
2630	// Name: Name of the resource; provided by the client when the resource
2631	// is created. The name must be 1-63 characters long, and comply with
2632	// RFC1035. Specifically, the name must be 1-63 characters long and
2633	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
2634	// the first character must be a lowercase letter, and all following
2635	// characters must be a dash, lowercase letter, or digit, except the
2636	// last character, which cannot be a dash.
2637	Name string `json:"name,omitempty"`
2638
2639	// PortRange: Applicable only when IPProtocol is TCP, UDP, or SCTP, only
2640	// packets addressed to ports in the specified range will be forwarded
2641	// to target. Forwarding rules with the same [IPAddress, IPProtocol]
2642	// pair must have disjoint port ranges.
2643	PortRange string `json:"portRange,omitempty"`
2644
2645	// Region: [Output Only] URL of the region where the regional forwarding
2646	// rule resides. This field is not applicable to global forwarding
2647	// rules.
2648	Region string `json:"region,omitempty"`
2649
2650	// SelfLink: [Output Only] Server-defined URL for the resource.
2651	SelfLink string `json:"selfLink,omitempty"`
2652
2653	// Target: The URL of the target resource to receive the matched
2654	// traffic. For regional forwarding rules, this target must live in the
2655	// same region as the forwarding rule. For global forwarding rules, this
2656	// target must be a global TargetHttpProxy or TargetHttpsProxy resource.
2657	// The forwarded traffic must be of a type appropriate to the target
2658	// object. For example, TargetHttpProxy requires HTTP traffic, and
2659	// TargetHttpsProxy requires HTTPS traffic.
2660	Target string `json:"target,omitempty"`
2661
2662	// ServerResponse contains the HTTP response code and headers from the
2663	// server.
2664	googleapi.ServerResponse `json:"-"`
2665
2666	// ForceSendFields is a list of field names (e.g. "IPAddress") to
2667	// unconditionally include in API requests. By default, fields with
2668	// empty values are omitted from API requests. However, any non-pointer,
2669	// non-interface field appearing in ForceSendFields will be sent to the
2670	// server regardless of whether the field is empty or not. This may be
2671	// used to include empty fields in Patch requests.
2672	ForceSendFields []string `json:"-"`
2673}
2674
2675func (s *ForwardingRule) MarshalJSON() ([]byte, error) {
2676	type noMethod ForwardingRule
2677	raw := noMethod(*s)
2678	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2679}
2680
2681type ForwardingRuleAggregatedList struct {
2682	// Id: [Output Only] The unique identifier for the resource. This
2683	// identifier is defined by the server.
2684	Id string `json:"id,omitempty"`
2685
2686	// Items: A map of scoped forwarding rule lists.
2687	Items map[string]ForwardingRulesScopedList `json:"items,omitempty"`
2688
2689	// Kind: [Output Only] Type of resource. Always
2690	// compute#forwardingRuleAggregatedList for lists of forwarding rules.
2691	Kind string `json:"kind,omitempty"`
2692
2693	// NextPageToken: [Output Only] This token allows you to get the next
2694	// page of results for list requests. If the number of results is larger
2695	// than maxResults, use the nextPageToken as a value for the query
2696	// parameter pageToken in the next list request. Subsequent list
2697	// requests will have their own nextPageToken to continue paging through
2698	// the results.
2699	NextPageToken string `json:"nextPageToken,omitempty"`
2700
2701	// SelfLink: [Output Only] Server-defined URL for this resource.
2702	SelfLink string `json:"selfLink,omitempty"`
2703
2704	// ServerResponse contains the HTTP response code and headers from the
2705	// server.
2706	googleapi.ServerResponse `json:"-"`
2707
2708	// ForceSendFields is a list of field names (e.g. "Id") to
2709	// unconditionally include in API requests. By default, fields with
2710	// empty values are omitted from API requests. However, any non-pointer,
2711	// non-interface field appearing in ForceSendFields will be sent to the
2712	// server regardless of whether the field is empty or not. This may be
2713	// used to include empty fields in Patch requests.
2714	ForceSendFields []string `json:"-"`
2715}
2716
2717func (s *ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) {
2718	type noMethod ForwardingRuleAggregatedList
2719	raw := noMethod(*s)
2720	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2721}
2722
2723// ForwardingRuleList: Contains a list of ForwardingRule resources.
2724type ForwardingRuleList struct {
2725	// Id: [Output Only] Unique identifier for the resource. Set by the
2726	// server.
2727	Id string `json:"id,omitempty"`
2728
2729	// Items: A list of ForwardingRule resources.
2730	Items []*ForwardingRule `json:"items,omitempty"`
2731
2732	// Kind: Type of resource.
2733	Kind string `json:"kind,omitempty"`
2734
2735	// NextPageToken: [Output Only] This token allows you to get the next
2736	// page of results for list requests. If the number of results is larger
2737	// than maxResults, use the nextPageToken as a value for the query
2738	// parameter pageToken in the next list request. Subsequent list
2739	// requests will have their own nextPageToken to continue paging through
2740	// the results.
2741	NextPageToken string `json:"nextPageToken,omitempty"`
2742
2743	// SelfLink: [Output Only] Server-defined URL for this resource.
2744	SelfLink string `json:"selfLink,omitempty"`
2745
2746	// ServerResponse contains the HTTP response code and headers from the
2747	// server.
2748	googleapi.ServerResponse `json:"-"`
2749
2750	// ForceSendFields is a list of field names (e.g. "Id") to
2751	// unconditionally include in API requests. By default, fields with
2752	// empty values are omitted from API requests. However, any non-pointer,
2753	// non-interface field appearing in ForceSendFields will be sent to the
2754	// server regardless of whether the field is empty or not. This may be
2755	// used to include empty fields in Patch requests.
2756	ForceSendFields []string `json:"-"`
2757}
2758
2759func (s *ForwardingRuleList) MarshalJSON() ([]byte, error) {
2760	type noMethod ForwardingRuleList
2761	raw := noMethod(*s)
2762	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2763}
2764
2765type ForwardingRulesScopedList struct {
2766	// ForwardingRules: List of forwarding rules contained in this scope.
2767	ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"`
2768
2769	// Warning: Informational warning which replaces the list of forwarding
2770	// rules when the list is empty.
2771	Warning *ForwardingRulesScopedListWarning `json:"warning,omitempty"`
2772
2773	// ForceSendFields is a list of field names (e.g. "ForwardingRules") to
2774	// unconditionally include in API requests. By default, fields with
2775	// empty values are omitted from API requests. However, any non-pointer,
2776	// non-interface field appearing in ForceSendFields will be sent to the
2777	// server regardless of whether the field is empty or not. This may be
2778	// used to include empty fields in Patch requests.
2779	ForceSendFields []string `json:"-"`
2780}
2781
2782func (s *ForwardingRulesScopedList) MarshalJSON() ([]byte, error) {
2783	type noMethod ForwardingRulesScopedList
2784	raw := noMethod(*s)
2785	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2786}
2787
2788// ForwardingRulesScopedListWarning: Informational warning which
2789// replaces the list of forwarding rules when the list is empty.
2790type ForwardingRulesScopedListWarning struct {
2791	// Code: [Output Only] A warning code, if applicable. For example,
2792	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
2793	// the response.
2794	//
2795	// Possible values:
2796	//   "CLEANUP_FAILED"
2797	//   "DEPRECATED_RESOURCE_USED"
2798	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
2799	//   "INJECTED_KERNELS_DEPRECATED"
2800	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
2801	//   "NEXT_HOP_CANNOT_IP_FORWARD"
2802	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
2803	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
2804	//   "NEXT_HOP_NOT_RUNNING"
2805	//   "NOT_CRITICAL_ERROR"
2806	//   "NO_RESULTS_ON_PAGE"
2807	//   "REQUIRED_TOS_AGREEMENT"
2808	//   "RESOURCE_NOT_DELETED"
2809	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
2810	//   "UNREACHABLE"
2811	Code string `json:"code,omitempty"`
2812
2813	// Data: [Output Only] Metadata about this warning in key: value format.
2814	// For example:
2815	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2816	Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"`
2817
2818	// Message: [Output Only] A human-readable description of the warning
2819	// code.
2820	Message string `json:"message,omitempty"`
2821
2822	// ForceSendFields is a list of field names (e.g. "Code") to
2823	// unconditionally include in API requests. By default, fields with
2824	// empty values are omitted from API requests. However, any non-pointer,
2825	// non-interface field appearing in ForceSendFields will be sent to the
2826	// server regardless of whether the field is empty or not. This may be
2827	// used to include empty fields in Patch requests.
2828	ForceSendFields []string `json:"-"`
2829}
2830
2831func (s *ForwardingRulesScopedListWarning) MarshalJSON() ([]byte, error) {
2832	type noMethod ForwardingRulesScopedListWarning
2833	raw := noMethod(*s)
2834	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2835}
2836
2837type ForwardingRulesScopedListWarningData struct {
2838	// Key: [Output Only] A key that provides more detail on the warning
2839	// being returned. For example, for warnings where there are no results
2840	// in a list request for a particular zone, this key might be scope and
2841	// the key value might be the zone name. Other examples might be a key
2842	// indicating a deprecated resource and a suggested replacement, or a
2843	// warning about invalid network settings (for example, if an instance
2844	// attempts to perform IP forwarding but is not enabled for IP
2845	// forwarding).
2846	Key string `json:"key,omitempty"`
2847
2848	// Value: [Output Only] A warning data value corresponding to the key.
2849	Value string `json:"value,omitempty"`
2850
2851	// ForceSendFields is a list of field names (e.g. "Key") to
2852	// unconditionally include in API requests. By default, fields with
2853	// empty values are omitted from API requests. However, any non-pointer,
2854	// non-interface field appearing in ForceSendFields will be sent to the
2855	// server regardless of whether the field is empty or not. This may be
2856	// used to include empty fields in Patch requests.
2857	ForceSendFields []string `json:"-"`
2858}
2859
2860func (s *ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) {
2861	type noMethod ForwardingRulesScopedListWarningData
2862	raw := noMethod(*s)
2863	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2864}
2865
2866type GlobalSetLabelsRequest struct {
2867	// LabelFingerprint: Fingerprint of the previous set of labels for this
2868	// resource, used to detect conflicts.
2869	LabelFingerprint string `json:"labelFingerprint,omitempty"`
2870
2871	// Labels: The new labels for the resource.
2872	Labels map[string]string `json:"labels,omitempty"`
2873
2874	// ForceSendFields is a list of field names (e.g. "LabelFingerprint") to
2875	// unconditionally include in API requests. By default, fields with
2876	// empty values are omitted from API requests. However, any non-pointer,
2877	// non-interface field appearing in ForceSendFields will be sent to the
2878	// server regardless of whether the field is empty or not. This may be
2879	// used to include empty fields in Patch requests.
2880	ForceSendFields []string `json:"-"`
2881}
2882
2883func (s *GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) {
2884	type noMethod GlobalSetLabelsRequest
2885	raw := noMethod(*s)
2886	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2887}
2888
2889// HealthCheckReference: A full or valid partial URL to a health check.
2890// For example, the following are valid URLs:
2891// -
2892// https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check
2893// - projects/project-id/global/httpHealthChecks/health-check
2894// - global/httpHealthChecks/health-check
2895type HealthCheckReference struct {
2896	HealthCheck string `json:"healthCheck,omitempty"`
2897
2898	// ForceSendFields is a list of field names (e.g. "HealthCheck") to
2899	// unconditionally include in API requests. By default, fields with
2900	// empty values are omitted from API requests. However, any non-pointer,
2901	// non-interface field appearing in ForceSendFields will be sent to the
2902	// server regardless of whether the field is empty or not. This may be
2903	// used to include empty fields in Patch requests.
2904	ForceSendFields []string `json:"-"`
2905}
2906
2907func (s *HealthCheckReference) MarshalJSON() ([]byte, error) {
2908	type noMethod HealthCheckReference
2909	raw := noMethod(*s)
2910	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2911}
2912
2913type HealthStatus struct {
2914	// HealthState: Health state of the instance.
2915	//
2916	// Possible values:
2917	//   "HEALTHY"
2918	//   "UNHEALTHY"
2919	HealthState string `json:"healthState,omitempty"`
2920
2921	// Instance: URL of the instance resource.
2922	Instance string `json:"instance,omitempty"`
2923
2924	// IpAddress: The IP address represented by this resource.
2925	IpAddress string `json:"ipAddress,omitempty"`
2926
2927	// Port: The port on the instance.
2928	Port int64 `json:"port,omitempty"`
2929
2930	// ForceSendFields is a list of field names (e.g. "HealthState") to
2931	// unconditionally include in API requests. By default, fields with
2932	// empty values are omitted from API requests. However, any non-pointer,
2933	// non-interface field appearing in ForceSendFields will be sent to the
2934	// server regardless of whether the field is empty or not. This may be
2935	// used to include empty fields in Patch requests.
2936	ForceSendFields []string `json:"-"`
2937}
2938
2939func (s *HealthStatus) MarshalJSON() ([]byte, error) {
2940	type noMethod HealthStatus
2941	raw := noMethod(*s)
2942	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2943}
2944
2945// HostRule: UrlMaps A host-matching rule for a URL. If matched, will
2946// use the named PathMatcher to select the BackendService.
2947type HostRule struct {
2948	// Description: An optional description of this resource. Provide this
2949	// property when you create the resource.
2950	Description string `json:"description,omitempty"`
2951
2952	// Hosts: The list of host patterns to match. They must be valid
2953	// hostnames, except * will match any string of ([a-z0-9-.]*). In that
2954	// case, * must be the first character and must be followed in the
2955	// pattern by either - or ..
2956	Hosts []string `json:"hosts,omitempty"`
2957
2958	// PathMatcher: The name of the PathMatcher to use to match the path
2959	// portion of the URL if the hostRule matches the URL's host portion.
2960	PathMatcher string `json:"pathMatcher,omitempty"`
2961
2962	// ForceSendFields is a list of field names (e.g. "Description") to
2963	// unconditionally include in API requests. By default, fields with
2964	// empty values are omitted from API requests. However, any non-pointer,
2965	// non-interface field appearing in ForceSendFields will be sent to the
2966	// server regardless of whether the field is empty or not. This may be
2967	// used to include empty fields in Patch requests.
2968	ForceSendFields []string `json:"-"`
2969}
2970
2971func (s *HostRule) MarshalJSON() ([]byte, error) {
2972	type noMethod HostRule
2973	raw := noMethod(*s)
2974	return gensupport.MarshalJSON(raw, s.ForceSendFields)
2975}
2976
2977// HttpHealthCheck: An HttpHealthCheck resource. This resource defines a
2978// template for how individual instances should be checked for health,
2979// via HTTP.
2980type HttpHealthCheck struct {
2981	// CheckIntervalSec: How often (in seconds) to send a health check. The
2982	// default value is 5 seconds.
2983	CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"`
2984
2985	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
2986	// format.
2987	CreationTimestamp string `json:"creationTimestamp,omitempty"`
2988
2989	// Description: An optional description of this resource. Provide this
2990	// property when you create the resource.
2991	Description string `json:"description,omitempty"`
2992
2993	// HealthyThreshold: A so-far unhealthy instance will be marked healthy
2994	// after this many consecutive successes. The default value is 2.
2995	HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
2996
2997	// Host: The value of the host header in the HTTP health check request.
2998	// If left empty (default value), the public IP on behalf of which this
2999	// health check is performed will be used.
3000	Host string `json:"host,omitempty"`
3001
3002	// Id: [Output Only] The unique identifier for the resource. This
3003	// identifier is defined by the server.
3004	Id uint64 `json:"id,omitempty,string"`
3005
3006	// Kind: [Output Only] Type of the resource. Always
3007	// compute#httpHealthCheck for HTTP health checks.
3008	Kind string `json:"kind,omitempty"`
3009
3010	// Name: Name of the resource. Provided by the client when the resource
3011	// is created. The name must be 1-63 characters long, and comply with
3012	// RFC1035. Specifically, the name must be 1-63 characters long and
3013	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
3014	// the first character must be a lowercase letter, and all following
3015	// characters must be a dash, lowercase letter, or digit, except the
3016	// last character, which cannot be a dash.
3017	Name string `json:"name,omitempty"`
3018
3019	// Port: The TCP port number for the HTTP health check request. The
3020	// default value is 80.
3021	Port int64 `json:"port,omitempty"`
3022
3023	// RequestPath: The request path of the HTTP health check request. The
3024	// default value is /.
3025	RequestPath string `json:"requestPath,omitempty"`
3026
3027	// SelfLink: [Output Only] Server-defined URL for the resource.
3028	SelfLink string `json:"selfLink,omitempty"`
3029
3030	// TimeoutSec: How long (in seconds) to wait before claiming failure.
3031	// The default value is 5 seconds. It is invalid for timeoutSec to have
3032	// greater value than checkIntervalSec.
3033	TimeoutSec int64 `json:"timeoutSec,omitempty"`
3034
3035	// UnhealthyThreshold: A so-far healthy instance will be marked
3036	// unhealthy after this many consecutive failures. The default value is
3037	// 2.
3038	UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
3039
3040	// ServerResponse contains the HTTP response code and headers from the
3041	// server.
3042	googleapi.ServerResponse `json:"-"`
3043
3044	// ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to
3045	// unconditionally include in API requests. By default, fields with
3046	// empty values are omitted from API requests. However, any non-pointer,
3047	// non-interface field appearing in ForceSendFields will be sent to the
3048	// server regardless of whether the field is empty or not. This may be
3049	// used to include empty fields in Patch requests.
3050	ForceSendFields []string `json:"-"`
3051}
3052
3053func (s *HttpHealthCheck) MarshalJSON() ([]byte, error) {
3054	type noMethod HttpHealthCheck
3055	raw := noMethod(*s)
3056	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3057}
3058
3059// HttpHealthCheckList: Contains a list of HttpHealthCheck resources.
3060type HttpHealthCheckList struct {
3061	// Id: [Output Only] Unique identifier for the resource. Defined by the
3062	// server.
3063	Id string `json:"id,omitempty"`
3064
3065	// Items: A list of HttpHealthCheck resources.
3066	Items []*HttpHealthCheck `json:"items,omitempty"`
3067
3068	// Kind: Type of resource.
3069	Kind string `json:"kind,omitempty"`
3070
3071	// NextPageToken: [Output Only] This token allows you to get the next
3072	// page of results for list requests. If the number of results is larger
3073	// than maxResults, use the nextPageToken as a value for the query
3074	// parameter pageToken in the next list request. Subsequent list
3075	// requests will have their own nextPageToken to continue paging through
3076	// the results.
3077	NextPageToken string `json:"nextPageToken,omitempty"`
3078
3079	// SelfLink: [Output Only] Server-defined URL for this resource.
3080	SelfLink string `json:"selfLink,omitempty"`
3081
3082	// ServerResponse contains the HTTP response code and headers from the
3083	// server.
3084	googleapi.ServerResponse `json:"-"`
3085
3086	// ForceSendFields is a list of field names (e.g. "Id") to
3087	// unconditionally include in API requests. By default, fields with
3088	// empty values are omitted from API requests. However, any non-pointer,
3089	// non-interface field appearing in ForceSendFields will be sent to the
3090	// server regardless of whether the field is empty or not. This may be
3091	// used to include empty fields in Patch requests.
3092	ForceSendFields []string `json:"-"`
3093}
3094
3095func (s *HttpHealthCheckList) MarshalJSON() ([]byte, error) {
3096	type noMethod HttpHealthCheckList
3097	raw := noMethod(*s)
3098	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3099}
3100
3101// HttpsHealthCheck: An HttpsHealthCheck resource. This resource defines
3102// a template for how individual instances should be checked for health,
3103// via HTTPS.
3104type HttpsHealthCheck struct {
3105	// CheckIntervalSec: How often (in seconds) to send a health check. The
3106	// default value is 5 seconds.
3107	CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"`
3108
3109	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
3110	// format.
3111	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3112
3113	// Description: An optional description of this resource. Provide this
3114	// property when you create the resource.
3115	Description string `json:"description,omitempty"`
3116
3117	// HealthyThreshold: A so-far unhealthy instance will be marked healthy
3118	// after this many consecutive successes. The default value is 2.
3119	HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
3120
3121	// Host: The value of the host header in the HTTPS health check request.
3122	// If left empty (default value), the public IP on behalf of which this
3123	// health check is performed will be used.
3124	Host string `json:"host,omitempty"`
3125
3126	// Id: [Output Only] The unique identifier for the resource. This
3127	// identifier is defined by the server.
3128	Id uint64 `json:"id,omitempty,string"`
3129
3130	// Kind: Type of the resource.
3131	Kind string `json:"kind,omitempty"`
3132
3133	// Name: Name of the resource. Provided by the client when the resource
3134	// is created. The name must be 1-63 characters long, and comply with
3135	// RFC1035. Specifically, the name must be 1-63 characters long and
3136	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
3137	// the first character must be a lowercase letter, and all following
3138	// characters must be a dash, lowercase letter, or digit, except the
3139	// last character, which cannot be a dash.
3140	Name string `json:"name,omitempty"`
3141
3142	// Port: The TCP port number for the HTTPS health check request. The
3143	// default value is 443.
3144	Port int64 `json:"port,omitempty"`
3145
3146	// RequestPath: The request path of the HTTPS health check request. The
3147	// default value is "/".
3148	RequestPath string `json:"requestPath,omitempty"`
3149
3150	// SelfLink: [Output Only] Server-defined URL for the resource.
3151	SelfLink string `json:"selfLink,omitempty"`
3152
3153	// TimeoutSec: How long (in seconds) to wait before claiming failure.
3154	// The default value is 5 seconds. It is invalid for timeoutSec to have
3155	// a greater value than checkIntervalSec.
3156	TimeoutSec int64 `json:"timeoutSec,omitempty"`
3157
3158	// UnhealthyThreshold: A so-far healthy instance will be marked
3159	// unhealthy after this many consecutive failures. The default value is
3160	// 2.
3161	UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
3162
3163	// ServerResponse contains the HTTP response code and headers from the
3164	// server.
3165	googleapi.ServerResponse `json:"-"`
3166
3167	// ForceSendFields is a list of field names (e.g. "CheckIntervalSec") to
3168	// unconditionally include in API requests. By default, fields with
3169	// empty values are omitted from API requests. However, any non-pointer,
3170	// non-interface field appearing in ForceSendFields will be sent to the
3171	// server regardless of whether the field is empty or not. This may be
3172	// used to include empty fields in Patch requests.
3173	ForceSendFields []string `json:"-"`
3174}
3175
3176func (s *HttpsHealthCheck) MarshalJSON() ([]byte, error) {
3177	type noMethod HttpsHealthCheck
3178	raw := noMethod(*s)
3179	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3180}
3181
3182// HttpsHealthCheckList: Contains a list of HttpsHealthCheck resources.
3183type HttpsHealthCheckList struct {
3184	// Id: [Output Only] Unique identifier for the resource; defined by the
3185	// server.
3186	Id string `json:"id,omitempty"`
3187
3188	// Items: A list of HttpsHealthCheck resources.
3189	Items []*HttpsHealthCheck `json:"items,omitempty"`
3190
3191	// Kind: Type of resource.
3192	Kind string `json:"kind,omitempty"`
3193
3194	// NextPageToken: [Output Only] This token allows you to get the next
3195	// page of results for list requests. If the number of results is larger
3196	// than maxResults, use the nextPageToken as a value for the query
3197	// parameter pageToken in the next list request. Subsequent list
3198	// requests will have their own nextPageToken to continue paging through
3199	// the results.
3200	NextPageToken string `json:"nextPageToken,omitempty"`
3201
3202	// SelfLink: [Output Only] Server-defined URL for this resource.
3203	SelfLink string `json:"selfLink,omitempty"`
3204
3205	// ServerResponse contains the HTTP response code and headers from the
3206	// server.
3207	googleapi.ServerResponse `json:"-"`
3208
3209	// ForceSendFields is a list of field names (e.g. "Id") to
3210	// unconditionally include in API requests. By default, fields with
3211	// empty values are omitted from API requests. However, any non-pointer,
3212	// non-interface field appearing in ForceSendFields will be sent to the
3213	// server regardless of whether the field is empty or not. This may be
3214	// used to include empty fields in Patch requests.
3215	ForceSendFields []string `json:"-"`
3216}
3217
3218func (s *HttpsHealthCheckList) MarshalJSON() ([]byte, error) {
3219	type noMethod HttpsHealthCheckList
3220	raw := noMethod(*s)
3221	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3222}
3223
3224// Image: An Image resource.
3225type Image struct {
3226	// ArchiveSizeBytes: Size of the image tar.gz archive stored in Google
3227	// Cloud Storage (in bytes).
3228	ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"`
3229
3230	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
3231	// format.
3232	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3233
3234	// Deprecated: The deprecation status associated with this image.
3235	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
3236
3237	// Description: An optional description of this resource. Provide this
3238	// property when you create the resource.
3239	Description string `json:"description,omitempty"`
3240
3241	// DiskSizeGb: Size of the image when restored onto a persistent disk
3242	// (in GB).
3243	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
3244
3245	// Family: Image family for the resource; provided by the client when
3246	// the resource is created.
3247	Family string `json:"family,omitempty"`
3248
3249	// Id: [Output Only] The unique identifier for the resource. This
3250	// identifier is defined by the server.
3251	Id uint64 `json:"id,omitempty,string"`
3252
3253	// ImageEncryptionKey: Encrypts the image using a customer-supplied
3254	// encryption key.
3255	//
3256	// If you encrypt an image using a customer-supplied encryption key, and
3257	// you want to use the image later (e.g. to create a disk from the
3258	// image), you must provide the same key used encrypt the image in your
3259	// future request. If you provide an incorrect key, or no key, the
3260	// operation will fail.
3261	//
3262	// Customer-supplied encryption keys do not protect access to metadata
3263	// of the disk.
3264	//
3265	// If no customer-supplied encryption key is provided at creation, then
3266	// the disk will be encrypted using an automatically generated key and
3267	// you do not need to provide a key to use the image later.
3268	ImageEncryptionKey *CustomerEncryptionKey `json:"imageEncryptionKey,omitempty"`
3269
3270	// Kind: [Output Only] Type of the resource. Always compute#image for
3271	// images.
3272	Kind string `json:"kind,omitempty"`
3273
3274	// LabelFingerprint: A fingerprint for the labels being applied to this
3275	// image, which is essentially a hash of the labels set used for
3276	// optimistic locking. The fingerprint is initially generated by Compute
3277	// Engine and changes after every request to modify or update metadata.
3278	// You must always provide an up-to-date fingerprint hash in order to
3279	// update or change labels.
3280	//
3281	// To see the latest fingerprint, make get() request to retrieve the
3282	// image.
3283	LabelFingerprint string `json:"labelFingerprint,omitempty"`
3284
3285	// Labels: Labels to apply to this image. These can be later modified by
3286	// the setLabels method. Each label key & value must comply with
3287	// RFC1035. Label values may be empty.
3288	Labels map[string]string `json:"labels,omitempty"`
3289
3290	// Licenses: Any applicable publicly visible licenses.
3291	Licenses []string `json:"licenses,omitempty"`
3292
3293	// Name: Name of the resource; provided by the client when the resource
3294	// is created. The name must be 1-63 characters long, and comply with
3295	// RFC1035. Specifically, the name must be 1-63 characters long and
3296	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
3297	// the first character must be a lowercase letter, and all following
3298	// characters must be a dash, lowercase letter, or digit, except the
3299	// last character, which cannot be a dash.
3300	Name string `json:"name,omitempty"`
3301
3302	// RawDisk: The parameters of the raw disk image.
3303	RawDisk *ImageRawDisk `json:"rawDisk,omitempty"`
3304
3305	// SelfLink: [Output Only] Server-defined URL for the resource.
3306	SelfLink string `json:"selfLink,omitempty"`
3307
3308	// SourceDisk: URL of the The source disk used to create this image.
3309	// This can be a full or valid partial URL. You must provide either this
3310	// property or the rawDisk.source property but not both to create an
3311	// image. For example, the following are valid values:
3312	// -
3313	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/disk/disk
3314	// - projects/project/zones/zone/disk/disk
3315	// - zones/zone/disks/disk
3316	SourceDisk string `json:"sourceDisk,omitempty"`
3317
3318	// SourceDiskEncryptionKey: Specifies the customer-supplied encryption
3319	// key of the source disk. This key is required if the source disk is
3320	// protected by a customer-supplied encryption key.
3321	//
3322	// If the incorrect key is provided the operation will fail.
3323	SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"`
3324
3325	// SourceDiskId: The ID value of the disk used to create this image.
3326	// This value may be used to determine whether the image was taken from
3327	// the current or a previous instance of a given disk name.
3328	SourceDiskId string `json:"sourceDiskId,omitempty"`
3329
3330	// SourceType: The type of the image used to create this disk. The
3331	// default and only value is RAW
3332	//
3333	// Possible values:
3334	//   "RAW" (default)
3335	SourceType string `json:"sourceType,omitempty"`
3336
3337	// Status: [Output Only] The status of the image. An image can be used
3338	// to create other resources, such as instances, only after the image
3339	// has been successfully created and the status is set to READY.
3340	// Possible values are FAILED, PENDING, or READY.
3341	//
3342	// Possible values:
3343	//   "FAILED"
3344	//   "PENDING"
3345	//   "READY"
3346	Status string `json:"status,omitempty"`
3347
3348	// ServerResponse contains the HTTP response code and headers from the
3349	// server.
3350	googleapi.ServerResponse `json:"-"`
3351
3352	// ForceSendFields is a list of field names (e.g. "ArchiveSizeBytes") to
3353	// unconditionally include in API requests. By default, fields with
3354	// empty values are omitted from API requests. However, any non-pointer,
3355	// non-interface field appearing in ForceSendFields will be sent to the
3356	// server regardless of whether the field is empty or not. This may be
3357	// used to include empty fields in Patch requests.
3358	ForceSendFields []string `json:"-"`
3359}
3360
3361func (s *Image) MarshalJSON() ([]byte, error) {
3362	type noMethod Image
3363	raw := noMethod(*s)
3364	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3365}
3366
3367// ImageRawDisk: The parameters of the raw disk image.
3368type ImageRawDisk struct {
3369	// ContainerType: The format used to encode and transmit the block
3370	// device, which should be TAR. This is just a container and
3371	// transmission format and not a runtime format. Provided by the client
3372	// when the disk image is created.
3373	//
3374	// Possible values:
3375	//   "TAR"
3376	ContainerType string `json:"containerType,omitempty"`
3377
3378	// Sha1Checksum: An optional SHA1 checksum of the disk image before
3379	// unpackaging; provided by the client when the disk image is created.
3380	Sha1Checksum string `json:"sha1Checksum,omitempty"`
3381
3382	// Source: The full Google Cloud Storage URL where the disk image is
3383	// stored. You must provide either this property or the sourceDisk
3384	// property but not both.
3385	Source string `json:"source,omitempty"`
3386
3387	// ForceSendFields is a list of field names (e.g. "ContainerType") to
3388	// unconditionally include in API requests. By default, fields with
3389	// empty values are omitted from API requests. However, any non-pointer,
3390	// non-interface field appearing in ForceSendFields will be sent to the
3391	// server regardless of whether the field is empty or not. This may be
3392	// used to include empty fields in Patch requests.
3393	ForceSendFields []string `json:"-"`
3394}
3395
3396func (s *ImageRawDisk) MarshalJSON() ([]byte, error) {
3397	type noMethod ImageRawDisk
3398	raw := noMethod(*s)
3399	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3400}
3401
3402// ImageList: Contains a list of images.
3403type ImageList struct {
3404	// Id: [Output Only] The unique identifier for the resource. This
3405	// identifier is defined by the server.
3406	Id string `json:"id,omitempty"`
3407
3408	// Items: [Output Only] A list of Image resources.
3409	Items []*Image `json:"items,omitempty"`
3410
3411	// Kind: Type of resource.
3412	Kind string `json:"kind,omitempty"`
3413
3414	// NextPageToken: [Output Only] This token allows you to get the next
3415	// page of results for list requests. If the number of results is larger
3416	// than maxResults, use the nextPageToken as a value for the query
3417	// parameter pageToken in the next list request. Subsequent list
3418	// requests will have their own nextPageToken to continue paging through
3419	// the results.
3420	NextPageToken string `json:"nextPageToken,omitempty"`
3421
3422	// SelfLink: [Output Only] Server-defined URL for this resource.
3423	SelfLink string `json:"selfLink,omitempty"`
3424
3425	// ServerResponse contains the HTTP response code and headers from the
3426	// server.
3427	googleapi.ServerResponse `json:"-"`
3428
3429	// ForceSendFields is a list of field names (e.g. "Id") to
3430	// unconditionally include in API requests. By default, fields with
3431	// empty values are omitted from API requests. However, any non-pointer,
3432	// non-interface field appearing in ForceSendFields will be sent to the
3433	// server regardless of whether the field is empty or not. This may be
3434	// used to include empty fields in Patch requests.
3435	ForceSendFields []string `json:"-"`
3436}
3437
3438func (s *ImageList) MarshalJSON() ([]byte, error) {
3439	type noMethod ImageList
3440	raw := noMethod(*s)
3441	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3442}
3443
3444// Instance: An Instance resource.
3445type Instance struct {
3446	// CanIpForward: Allows this instance to send and receive packets with
3447	// non-matching destination or source IPs. This is required if you plan
3448	// to use this instance to forward routes. For more information, see
3449	// Enabling IP Forwarding.
3450	CanIpForward bool `json:"canIpForward,omitempty"`
3451
3452	// CpuPlatform: [Output Only] The CPU platform used by this instance.
3453	CpuPlatform string `json:"cpuPlatform,omitempty"`
3454
3455	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
3456	// format.
3457	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3458
3459	// Description: An optional description of this resource. Provide this
3460	// property when you create the resource.
3461	Description string `json:"description,omitempty"`
3462
3463	// Disks: Array of disks associated with this instance. Persistent disks
3464	// must be created before you can assign them.
3465	Disks []*AttachedDisk `json:"disks,omitempty"`
3466
3467	// Id: [Output Only] The unique identifier for the resource. This
3468	// identifier is defined by the server.
3469	Id uint64 `json:"id,omitempty,string"`
3470
3471	// Kind: [Output Only] Type of the resource. Always compute#instance for
3472	// instances.
3473	Kind string `json:"kind,omitempty"`
3474
3475	// LabelFingerprint: A fingerprint for this request, which is
3476	// essentially a hash of the metadata's contents and used for optimistic
3477	// locking. The fingerprint is initially generated by Compute Engine and
3478	// changes after every request to modify or update metadata. You must
3479	// always provide an up-to-date fingerprint hash in order to update or
3480	// change metadata.
3481	//
3482	// To see the latest fingerprint, make get() request to the instance.
3483	LabelFingerprint string `json:"labelFingerprint,omitempty"`
3484
3485	// Labels: Labels to apply to this instance. These can be later modified
3486	// by the setLabels method. Each label key/value pair must comply with
3487	// RFC1035. Label values may be empty.
3488	Labels map[string]string `json:"labels,omitempty"`
3489
3490	// MachineType: Full or partial URL of the machine type resource to use
3491	// for this instance, in the format:
3492	// zones/zone/machineTypes/machine-type. This is provided by the client
3493	// when the instance is created. For example, the following is a valid
3494	// partial url to a predefined machine
3495	// type:
3496	//
3497	// zones/us-central1-f/machineTypes/n1-standard-1
3498	//
3499	// To create a custom machine type, provide a URL to a machine type in
3500	// the following format, where CPUS is 1 or an even number up to 32 (2,
3501	// 4, 6, ... 24, etc), and MEMORY is the total memory for this instance.
3502	// Memory must be a multiple of 256 MB and must be supplied in MB (e.g.
3503	// 5 GB of memory is 5120
3504	// MB):
3505	//
3506	// zones/zone/machineTypes/custom-CPUS-MEMORY
3507	//
3508	// For example: zones/us-central1-f/machineTypes/custom-4-5120
3509	//
3510	// For a full list of restrictions, read the Specifications for custom
3511	// machine types.
3512	MachineType string `json:"machineType,omitempty"`
3513
3514	// Metadata: The metadata key/value pairs assigned to this instance.
3515	// This includes custom metadata and predefined keys.
3516	Metadata *Metadata `json:"metadata,omitempty"`
3517
3518	// Name: The name of the resource, provided by the client when initially
3519	// creating the resource. The resource name must be 1-63 characters
3520	// long, and comply with RFC1035. Specifically, the name must be 1-63
3521	// characters long and match the regular expression
3522	// [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a
3523	// lowercase letter, and all following characters must be a dash,
3524	// lowercase letter, or digit, except the last character, which cannot
3525	// be a dash.
3526	Name string `json:"name,omitempty"`
3527
3528	// NetworkInterfaces: An array of configurations for this interface.
3529	// This specifies how this interface is configured to interact with
3530	// other network services, such as connecting to the internet.
3531	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
3532
3533	// Scheduling: Scheduling options for this instance.
3534	Scheduling *Scheduling `json:"scheduling,omitempty"`
3535
3536	// SelfLink: [Output Only] Server-defined URL for this resource.
3537	SelfLink string `json:"selfLink,omitempty"`
3538
3539	// ServiceAccounts: A list of service accounts, with their specified
3540	// scopes, authorized for this instance. Service accounts generate
3541	// access tokens that can be accessed through the metadata server and
3542	// used to authenticate applications on the instance. See Authenticating
3543	// from Google Compute Engine for more information.
3544	ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"`
3545
3546	// Status: [Output Only] The status of the instance. One of the
3547	// following values: PROVISIONING, STAGING, RUNNING, STOPPING, and
3548	// TERMINATED.
3549	//
3550	// Possible values:
3551	//   "PROVISIONING"
3552	//   "RUNNING"
3553	//   "STAGING"
3554	//   "STOPPED"
3555	//   "STOPPING"
3556	//   "SUSPENDED"
3557	//   "SUSPENDING"
3558	//   "TERMINATED"
3559	Status string `json:"status,omitempty"`
3560
3561	// StatusMessage: [Output Only] An optional, human-readable explanation
3562	// of the status.
3563	StatusMessage string `json:"statusMessage,omitempty"`
3564
3565	// Tags: A list of tags to apply to this instance. Tags are used to
3566	// identify valid sources or targets for network firewalls and are
3567	// specified by the client during instance creation. The tags can be
3568	// later modified by the setTags method. Each tag within the list must
3569	// comply with RFC1035.
3570	Tags *Tags `json:"tags,omitempty"`
3571
3572	// Zone: [Output Only] URL of the zone where the instance resides.
3573	Zone string `json:"zone,omitempty"`
3574
3575	// ServerResponse contains the HTTP response code and headers from the
3576	// server.
3577	googleapi.ServerResponse `json:"-"`
3578
3579	// ForceSendFields is a list of field names (e.g. "CanIpForward") to
3580	// unconditionally include in API requests. By default, fields with
3581	// empty values are omitted from API requests. However, any non-pointer,
3582	// non-interface field appearing in ForceSendFields will be sent to the
3583	// server regardless of whether the field is empty or not. This may be
3584	// used to include empty fields in Patch requests.
3585	ForceSendFields []string `json:"-"`
3586}
3587
3588func (s *Instance) MarshalJSON() ([]byte, error) {
3589	type noMethod Instance
3590	raw := noMethod(*s)
3591	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3592}
3593
3594type InstanceAggregatedList struct {
3595	// Id: [Output Only] The unique identifier for the resource. This
3596	// identifier is defined by the server.
3597	Id string `json:"id,omitempty"`
3598
3599	// Items: [Output Only] A map of scoped instance lists.
3600	Items map[string]InstancesScopedList `json:"items,omitempty"`
3601
3602	// Kind: [Output Only] Type of resource. Always
3603	// compute#instanceAggregatedList for aggregated lists of Instance
3604	// resources.
3605	Kind string `json:"kind,omitempty"`
3606
3607	// NextPageToken: [Output Only] This token allows you to get the next
3608	// page of results for list requests. If the number of results is larger
3609	// than maxResults, use the nextPageToken as a value for the query
3610	// parameter pageToken in the next list request. Subsequent list
3611	// requests will have their own nextPageToken to continue paging through
3612	// the results.
3613	NextPageToken string `json:"nextPageToken,omitempty"`
3614
3615	// SelfLink: [Output Only] Server-defined URL for this resource.
3616	SelfLink string `json:"selfLink,omitempty"`
3617
3618	// ServerResponse contains the HTTP response code and headers from the
3619	// server.
3620	googleapi.ServerResponse `json:"-"`
3621
3622	// ForceSendFields is a list of field names (e.g. "Id") to
3623	// unconditionally include in API requests. By default, fields with
3624	// empty values are omitted from API requests. However, any non-pointer,
3625	// non-interface field appearing in ForceSendFields will be sent to the
3626	// server regardless of whether the field is empty or not. This may be
3627	// used to include empty fields in Patch requests.
3628	ForceSendFields []string `json:"-"`
3629}
3630
3631func (s *InstanceAggregatedList) MarshalJSON() ([]byte, error) {
3632	type noMethod InstanceAggregatedList
3633	raw := noMethod(*s)
3634	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3635}
3636
3637type InstanceGroup struct {
3638	// CreationTimestamp: [Output Only] The creation timestamp for this
3639	// instance group in RFC3339 text format.
3640	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3641
3642	// Description: An optional description of this resource. Provide this
3643	// property when you create the resource.
3644	Description string `json:"description,omitempty"`
3645
3646	// Fingerprint: [Output Only] The fingerprint of the named ports. The
3647	// system uses this fingerprint to detect conflicts when multiple users
3648	// change the named ports concurrently.
3649	Fingerprint string `json:"fingerprint,omitempty"`
3650
3651	// Id: [Output Only] A unique identifier for this resource type. The
3652	// server generates this identifier.
3653	Id uint64 `json:"id,omitempty,string"`
3654
3655	// Kind: [Output Only] The resource type, which is always
3656	// compute#instanceGroup for instance groups.
3657	Kind string `json:"kind,omitempty"`
3658
3659	// Name: The name of the instance group. The name must be 1-63
3660	// characters long, and comply with RFC1035.
3661	Name string `json:"name,omitempty"`
3662
3663	// NamedPorts: Assigns a name to a port number. For example: {name:
3664	// "http", port: 80}
3665	//
3666	// This allows the system to reference ports by the assigned name
3667	// instead of a port number. Named ports can also contain multiple
3668	// ports. For example: [{name: "http", port: 80},{name: "http", port:
3669	// 8080}]
3670	//
3671	// Named ports apply to all instances in this instance group.
3672	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
3673
3674	// Network: The URL of the network to which all instances in the
3675	// instance group belong.
3676	Network string `json:"network,omitempty"`
3677
3678	// SelfLink: [Output Only] The URL for this instance group. The server
3679	// generates this URL.
3680	SelfLink string `json:"selfLink,omitempty"`
3681
3682	// Size: [Output Only] The total number of instances in the instance
3683	// group.
3684	Size int64 `json:"size,omitempty"`
3685
3686	// Subnetwork: The URL of the subnetwork to which all instances in the
3687	// instance group belong.
3688	Subnetwork string `json:"subnetwork,omitempty"`
3689
3690	// Zone: [Output Only] The URL of the zone where the instance group is
3691	// located.
3692	Zone string `json:"zone,omitempty"`
3693
3694	// ServerResponse contains the HTTP response code and headers from the
3695	// server.
3696	googleapi.ServerResponse `json:"-"`
3697
3698	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
3699	// to unconditionally include in API requests. By default, fields with
3700	// empty values are omitted from API requests. However, any non-pointer,
3701	// non-interface field appearing in ForceSendFields will be sent to the
3702	// server regardless of whether the field is empty or not. This may be
3703	// used to include empty fields in Patch requests.
3704	ForceSendFields []string `json:"-"`
3705}
3706
3707func (s *InstanceGroup) MarshalJSON() ([]byte, error) {
3708	type noMethod InstanceGroup
3709	raw := noMethod(*s)
3710	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3711}
3712
3713type InstanceGroupAggregatedList struct {
3714	// Id: [Output Only] A unique identifier for this aggregated list of
3715	// instance groups. The server generates this identifier.
3716	Id string `json:"id,omitempty"`
3717
3718	// Items: A map of scoped instance group lists.
3719	Items map[string]InstanceGroupsScopedList `json:"items,omitempty"`
3720
3721	// Kind: [Output Only] The resource type, which is always
3722	// compute#instanceGroupAggregatedList for aggregated lists of instance
3723	// groups.
3724	Kind string `json:"kind,omitempty"`
3725
3726	// NextPageToken: [Output Only] This token allows you to get the next
3727	// page of results for list requests. If the number of results is larger
3728	// than maxResults, use the nextPageToken as a value for the query
3729	// parameter pageToken in the next list request. Subsequent list
3730	// requests will have their own nextPageToken to continue paging through
3731	// the results.
3732	NextPageToken string `json:"nextPageToken,omitempty"`
3733
3734	// SelfLink: [Output Only] The URL for this resource type. The server
3735	// generates this URL.
3736	SelfLink string `json:"selfLink,omitempty"`
3737
3738	// ServerResponse contains the HTTP response code and headers from the
3739	// server.
3740	googleapi.ServerResponse `json:"-"`
3741
3742	// ForceSendFields is a list of field names (e.g. "Id") to
3743	// unconditionally include in API requests. By default, fields with
3744	// empty values are omitted from API requests. However, any non-pointer,
3745	// non-interface field appearing in ForceSendFields will be sent to the
3746	// server regardless of whether the field is empty or not. This may be
3747	// used to include empty fields in Patch requests.
3748	ForceSendFields []string `json:"-"`
3749}
3750
3751func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) {
3752	type noMethod InstanceGroupAggregatedList
3753	raw := noMethod(*s)
3754	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3755}
3756
3757// InstanceGroupList: A list of InstanceGroup resources.
3758type InstanceGroupList struct {
3759	// Id: [Output Only] A unique identifier for this list of instance
3760	// groups. The server generates this identifier.
3761	Id string `json:"id,omitempty"`
3762
3763	// Items: A list of instance groups.
3764	Items []*InstanceGroup `json:"items,omitempty"`
3765
3766	// Kind: [Output Only] The resource type, which is always
3767	// compute#instanceGroupList for instance group lists.
3768	Kind string `json:"kind,omitempty"`
3769
3770	// NextPageToken: [Output Only] This token allows you to get the next
3771	// page of results for list requests. If the number of results is larger
3772	// than maxResults, use the nextPageToken as a value for the query
3773	// parameter pageToken in the next list request. Subsequent list
3774	// requests will have their own nextPageToken to continue paging through
3775	// the results.
3776	NextPageToken string `json:"nextPageToken,omitempty"`
3777
3778	// SelfLink: [Output Only] The URL for this resource type. The server
3779	// generates this URL.
3780	SelfLink string `json:"selfLink,omitempty"`
3781
3782	// ServerResponse contains the HTTP response code and headers from the
3783	// server.
3784	googleapi.ServerResponse `json:"-"`
3785
3786	// ForceSendFields is a list of field names (e.g. "Id") to
3787	// unconditionally include in API requests. By default, fields with
3788	// empty values are omitted from API requests. However, any non-pointer,
3789	// non-interface field appearing in ForceSendFields will be sent to the
3790	// server regardless of whether the field is empty or not. This may be
3791	// used to include empty fields in Patch requests.
3792	ForceSendFields []string `json:"-"`
3793}
3794
3795func (s *InstanceGroupList) MarshalJSON() ([]byte, error) {
3796	type noMethod InstanceGroupList
3797	raw := noMethod(*s)
3798	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3799}
3800
3801type InstanceGroupManager struct {
3802	// AutoHealingPolicies: The autohealing policy for this managed instance
3803	// group. You can specify only one value.
3804	AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"`
3805
3806	// BaseInstanceName: The base instance name to use for instances in this
3807	// group. The value must be 1-58 characters long. Instances are named by
3808	// appending a hyphen and a random four-character string to the base
3809	// instance name. The base instance name must comply with RFC1035.
3810	BaseInstanceName string `json:"baseInstanceName,omitempty"`
3811
3812	// CreationTimestamp: [Output Only] The creation timestamp for this
3813	// managed instance group in RFC3339 text format.
3814	CreationTimestamp string `json:"creationTimestamp,omitempty"`
3815
3816	// CurrentActions: [Output Only] The list of instance actions and the
3817	// number of instances in this managed instance group that are scheduled
3818	// for each of those actions.
3819	CurrentActions *InstanceGroupManagerActionsSummary `json:"currentActions,omitempty"`
3820
3821	// Description: An optional description of this resource. Provide this
3822	// property when you create the resource.
3823	Description string `json:"description,omitempty"`
3824
3825	// Fingerprint: [Output Only] The fingerprint of the target pools
3826	// information. You can use this optional field for optimistic locking
3827	// when you update the target pool entries.
3828	Fingerprint string `json:"fingerprint,omitempty"`
3829
3830	// Id: [Output Only] A unique identifier for this resource type. The
3831	// server generates this identifier.
3832	Id uint64 `json:"id,omitempty,string"`
3833
3834	// InstanceGroup: [Output Only] The URL of the Instance Group resource.
3835	InstanceGroup string `json:"instanceGroup,omitempty"`
3836
3837	// InstanceTemplate: The URL of the instance template that is specified
3838	// for this managed instance group. The group uses this template to
3839	// create all new instances in the managed instance group.
3840	InstanceTemplate string `json:"instanceTemplate,omitempty"`
3841
3842	// Kind: [Output Only] The resource type, which is always
3843	// compute#instanceGroupManager for managed instance groups.
3844	Kind string `json:"kind,omitempty"`
3845
3846	// Name: The name of the managed instance group. The name must be 1-63
3847	// characters long, and comply with RFC1035.
3848	Name string `json:"name,omitempty"`
3849
3850	// NamedPorts: Named ports configured for the Instance Groups
3851	// complementary to this Instance Group Manager.
3852	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
3853
3854	// SelfLink: [Output Only] The URL for this managed instance group. The
3855	// server defines this URL.
3856	SelfLink string `json:"selfLink,omitempty"`
3857
3858	// TargetPools: The URLs for all TargetPool resources to which instances
3859	// in the instanceGroup field are added. The target pools automatically
3860	// apply to all of the instances in the managed instance group.
3861	TargetPools []string `json:"targetPools,omitempty"`
3862
3863	// TargetSize: The target number of running instances for this managed
3864	// instance group. Deleting or abandoning instances reduces this number.
3865	// Resizing the group changes this number.
3866	TargetSize int64 `json:"targetSize,omitempty"`
3867
3868	// Zone: The name of the zone where the managed instance group is
3869	// located.
3870	Zone string `json:"zone,omitempty"`
3871
3872	// ServerResponse contains the HTTP response code and headers from the
3873	// server.
3874	googleapi.ServerResponse `json:"-"`
3875
3876	// ForceSendFields is a list of field names (e.g. "AutoHealingPolicies")
3877	// to unconditionally include in API requests. By default, fields with
3878	// empty values are omitted from API requests. However, any non-pointer,
3879	// non-interface field appearing in ForceSendFields will be sent to the
3880	// server regardless of whether the field is empty or not. This may be
3881	// used to include empty fields in Patch requests.
3882	ForceSendFields []string `json:"-"`
3883}
3884
3885func (s *InstanceGroupManager) MarshalJSON() ([]byte, error) {
3886	type noMethod InstanceGroupManager
3887	raw := noMethod(*s)
3888	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3889}
3890
3891type InstanceGroupManagerActionsSummary struct {
3892	// Abandoning: [Output Only] The total number of instances in the
3893	// managed instance group that are scheduled to be abandoned. Abandoning
3894	// an instance removes it from the managed instance group without
3895	// deleting it.
3896	Abandoning int64 `json:"abandoning,omitempty"`
3897
3898	// Creating: [Output Only] The number of instances in the managed
3899	// instance group that are scheduled to be created or are currently
3900	// being created. If the group fails to create one of these instances,
3901	// it tries again until it creates the instance successfully.
3902	Creating int64 `json:"creating,omitempty"`
3903
3904	// Deleting: [Output Only] The number of instances in the managed
3905	// instance group that are scheduled to be deleted or are currently
3906	// being deleted.
3907	Deleting int64 `json:"deleting,omitempty"`
3908
3909	// None: [Output Only] The number of instances in the managed instance
3910	// group that are running and have no scheduled actions.
3911	None int64 `json:"none,omitempty"`
3912
3913	// Recreating: [Output Only] The number of instances in the managed
3914	// instance group that are scheduled to be recreated or are currently
3915	// being being recreated. Recreating an instance deletes the existing
3916	// root persistent disk and creates a new disk from the image that is
3917	// defined in the instance template.
3918	Recreating int64 `json:"recreating,omitempty"`
3919
3920	// Refreshing: [Output Only] The number of instances in the managed
3921	// instance group that are being reconfigured with properties that do
3922	// not require a restart or a recreate action. For example, setting or
3923	// removing target pools for the instance.
3924	Refreshing int64 `json:"refreshing,omitempty"`
3925
3926	// Restarting: [Output Only] The number of instances in the managed
3927	// instance group that are scheduled to be restarted or are currently
3928	// being restarted.
3929	Restarting int64 `json:"restarting,omitempty"`
3930
3931	// ForceSendFields is a list of field names (e.g. "Abandoning") to
3932	// unconditionally include in API requests. By default, fields with
3933	// empty values are omitted from API requests. However, any non-pointer,
3934	// non-interface field appearing in ForceSendFields will be sent to the
3935	// server regardless of whether the field is empty or not. This may be
3936	// used to include empty fields in Patch requests.
3937	ForceSendFields []string `json:"-"`
3938}
3939
3940func (s *InstanceGroupManagerActionsSummary) MarshalJSON() ([]byte, error) {
3941	type noMethod InstanceGroupManagerActionsSummary
3942	raw := noMethod(*s)
3943	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3944}
3945
3946type InstanceGroupManagerAggregatedList struct {
3947	// Id: [Output Only] A unique identifier for this aggregated list of
3948	// managed instance groups. The server generates this identifier.
3949	Id string `json:"id,omitempty"`
3950
3951	// Items: [Output Only] A map of filtered managed instance group lists.
3952	Items map[string]InstanceGroupManagersScopedList `json:"items,omitempty"`
3953
3954	// Kind: [Output Only] The resource type, which is always
3955	// compute#instanceGroupManagerAggregatedList for an aggregated list of
3956	// managed instance groups.
3957	Kind string `json:"kind,omitempty"`
3958
3959	// NextPageToken: [Output Only] This token allows you to get the next
3960	// page of results for list requests. If the number of results is larger
3961	// than maxResults, use the nextPageToken as a value for the query
3962	// parameter pageToken in the next list request. Subsequent list
3963	// requests will have their own nextPageToken to continue paging through
3964	// the results.
3965	NextPageToken string `json:"nextPageToken,omitempty"`
3966
3967	// SelfLink: [Output Only] The URL for this resource type. The server
3968	// generates this URL.
3969	SelfLink string `json:"selfLink,omitempty"`
3970
3971	// ServerResponse contains the HTTP response code and headers from the
3972	// server.
3973	googleapi.ServerResponse `json:"-"`
3974
3975	// ForceSendFields is a list of field names (e.g. "Id") to
3976	// unconditionally include in API requests. By default, fields with
3977	// empty values are omitted from API requests. However, any non-pointer,
3978	// non-interface field appearing in ForceSendFields will be sent to the
3979	// server regardless of whether the field is empty or not. This may be
3980	// used to include empty fields in Patch requests.
3981	ForceSendFields []string `json:"-"`
3982}
3983
3984func (s *InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) {
3985	type noMethod InstanceGroupManagerAggregatedList
3986	raw := noMethod(*s)
3987	return gensupport.MarshalJSON(raw, s.ForceSendFields)
3988}
3989
3990type InstanceGroupManagerAutoHealingPolicy struct {
3991	// HealthCheck: The URL for the HealthCheck that signals autohealing.
3992	HealthCheck string `json:"healthCheck,omitempty"`
3993
3994	// InitialDelaySec: The number of seconds that the managed instance
3995	// group waits before it applies autohealing policies to new instances
3996	// or recently recreated instances. This initial delay allows instances
3997	// to initialize and run their startup scripts before the instance group
3998	// determines that they are UNHEALTHY. This prevents the managed
3999	// instance group from recreating its instances prematurely.
4000	InitialDelaySec int64 `json:"initialDelaySec,omitempty"`
4001
4002	// ForceSendFields is a list of field names (e.g. "HealthCheck") to
4003	// unconditionally include in API requests. By default, fields with
4004	// empty values are omitted from API requests. However, any non-pointer,
4005	// non-interface field appearing in ForceSendFields will be sent to the
4006	// server regardless of whether the field is empty or not. This may be
4007	// used to include empty fields in Patch requests.
4008	ForceSendFields []string `json:"-"`
4009}
4010
4011func (s *InstanceGroupManagerAutoHealingPolicy) MarshalJSON() ([]byte, error) {
4012	type noMethod InstanceGroupManagerAutoHealingPolicy
4013	raw := noMethod(*s)
4014	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4015}
4016
4017// InstanceGroupManagerList: [Output Only] A list of managed instance
4018// groups.
4019type InstanceGroupManagerList struct {
4020	// Id: [Output Only] A unique identifier for this resource type. The
4021	// server generates this identifier.
4022	Id string `json:"id,omitempty"`
4023
4024	// Items: [Output Only] A list of managed instance groups.
4025	Items []*InstanceGroupManager `json:"items,omitempty"`
4026
4027	// Kind: [Output Only] The resource type, which is always
4028	// compute#instanceGroupManagerList for a list of managed instance
4029	// groups.
4030	Kind string `json:"kind,omitempty"`
4031
4032	// NextPageToken: [Output Only] This token allows you to get the next
4033	// page of results for list requests. If the number of results is larger
4034	// than maxResults, use the nextPageToken as a value for the query
4035	// parameter pageToken in the next list request. Subsequent list
4036	// requests will have their own nextPageToken to continue paging through
4037	// the results.
4038	NextPageToken string `json:"nextPageToken,omitempty"`
4039
4040	// SelfLink: [Output Only] The URL for this resource type. The server
4041	// generates this URL.
4042	SelfLink string `json:"selfLink,omitempty"`
4043
4044	// ServerResponse contains the HTTP response code and headers from the
4045	// server.
4046	googleapi.ServerResponse `json:"-"`
4047
4048	// ForceSendFields is a list of field names (e.g. "Id") to
4049	// unconditionally include in API requests. By default, fields with
4050	// empty values are omitted from API requests. However, any non-pointer,
4051	// non-interface field appearing in ForceSendFields will be sent to the
4052	// server regardless of whether the field is empty or not. This may be
4053	// used to include empty fields in Patch requests.
4054	ForceSendFields []string `json:"-"`
4055}
4056
4057func (s *InstanceGroupManagerList) MarshalJSON() ([]byte, error) {
4058	type noMethod InstanceGroupManagerList
4059	raw := noMethod(*s)
4060	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4061}
4062
4063type InstanceGroupManagersAbandonInstancesRequest struct {
4064	// Instances: The URL for one or more instances to abandon from the
4065	// managed instance group.
4066	Instances []string `json:"instances,omitempty"`
4067
4068	// ForceSendFields is a list of field names (e.g. "Instances") to
4069	// unconditionally include in API requests. By default, fields with
4070	// empty values are omitted from API requests. However, any non-pointer,
4071	// non-interface field appearing in ForceSendFields will be sent to the
4072	// server regardless of whether the field is empty or not. This may be
4073	// used to include empty fields in Patch requests.
4074	ForceSendFields []string `json:"-"`
4075}
4076
4077func (s *InstanceGroupManagersAbandonInstancesRequest) MarshalJSON() ([]byte, error) {
4078	type noMethod InstanceGroupManagersAbandonInstancesRequest
4079	raw := noMethod(*s)
4080	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4081}
4082
4083type InstanceGroupManagersDeleteInstancesRequest struct {
4084	// Instances: The list of instances to delete from this managed instance
4085	// group. Specify one or more instance URLs.
4086	Instances []string `json:"instances,omitempty"`
4087
4088	// ForceSendFields is a list of field names (e.g. "Instances") to
4089	// unconditionally include in API requests. By default, fields with
4090	// empty values are omitted from API requests. However, any non-pointer,
4091	// non-interface field appearing in ForceSendFields will be sent to the
4092	// server regardless of whether the field is empty or not. This may be
4093	// used to include empty fields in Patch requests.
4094	ForceSendFields []string `json:"-"`
4095}
4096
4097func (s *InstanceGroupManagersDeleteInstancesRequest) MarshalJSON() ([]byte, error) {
4098	type noMethod InstanceGroupManagersDeleteInstancesRequest
4099	raw := noMethod(*s)
4100	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4101}
4102
4103type InstanceGroupManagersListManagedInstancesResponse struct {
4104	// ManagedInstances: [Output Only] The list of instances in the managed
4105	// instance group.
4106	ManagedInstances []*ManagedInstance `json:"managedInstances,omitempty"`
4107
4108	// ServerResponse contains the HTTP response code and headers from the
4109	// server.
4110	googleapi.ServerResponse `json:"-"`
4111
4112	// ForceSendFields is a list of field names (e.g. "ManagedInstances") to
4113	// unconditionally include in API requests. By default, fields with
4114	// empty values are omitted from API requests. However, any non-pointer,
4115	// non-interface field appearing in ForceSendFields will be sent to the
4116	// server regardless of whether the field is empty or not. This may be
4117	// used to include empty fields in Patch requests.
4118	ForceSendFields []string `json:"-"`
4119}
4120
4121func (s *InstanceGroupManagersListManagedInstancesResponse) MarshalJSON() ([]byte, error) {
4122	type noMethod InstanceGroupManagersListManagedInstancesResponse
4123	raw := noMethod(*s)
4124	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4125}
4126
4127type InstanceGroupManagersRecreateInstancesRequest struct {
4128	// Instances: The URL for one or more instances to recreate.
4129	Instances []string `json:"instances,omitempty"`
4130
4131	// ForceSendFields is a list of field names (e.g. "Instances") to
4132	// unconditionally include in API requests. By default, fields with
4133	// empty values are omitted from API requests. However, any non-pointer,
4134	// non-interface field appearing in ForceSendFields will be sent to the
4135	// server regardless of whether the field is empty or not. This may be
4136	// used to include empty fields in Patch requests.
4137	ForceSendFields []string `json:"-"`
4138}
4139
4140func (s *InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, error) {
4141	type noMethod InstanceGroupManagersRecreateInstancesRequest
4142	raw := noMethod(*s)
4143	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4144}
4145
4146type InstanceGroupManagersScopedList struct {
4147	// InstanceGroupManagers: [Output Only] The list of managed instance
4148	// groups that are contained in the specified project and zone.
4149	InstanceGroupManagers []*InstanceGroupManager `json:"instanceGroupManagers,omitempty"`
4150
4151	// Warning: [Output Only] The warning that replaces the list of managed
4152	// instance groups when the list is empty.
4153	Warning *InstanceGroupManagersScopedListWarning `json:"warning,omitempty"`
4154
4155	// ForceSendFields is a list of field names (e.g.
4156	// "InstanceGroupManagers") to unconditionally include in API requests.
4157	// By default, fields with empty values are omitted from API requests.
4158	// However, any non-pointer, non-interface field appearing in
4159	// ForceSendFields will be sent to the server regardless of whether the
4160	// field is empty or not. This may be used to include empty fields in
4161	// Patch requests.
4162	ForceSendFields []string `json:"-"`
4163}
4164
4165func (s *InstanceGroupManagersScopedList) MarshalJSON() ([]byte, error) {
4166	type noMethod InstanceGroupManagersScopedList
4167	raw := noMethod(*s)
4168	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4169}
4170
4171// InstanceGroupManagersScopedListWarning: [Output Only] The warning
4172// that replaces the list of managed instance groups when the list is
4173// empty.
4174type InstanceGroupManagersScopedListWarning struct {
4175	// Code: [Output Only] A warning code, if applicable. For example,
4176	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
4177	// the response.
4178	//
4179	// Possible values:
4180	//   "CLEANUP_FAILED"
4181	//   "DEPRECATED_RESOURCE_USED"
4182	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
4183	//   "INJECTED_KERNELS_DEPRECATED"
4184	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
4185	//   "NEXT_HOP_CANNOT_IP_FORWARD"
4186	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
4187	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
4188	//   "NEXT_HOP_NOT_RUNNING"
4189	//   "NOT_CRITICAL_ERROR"
4190	//   "NO_RESULTS_ON_PAGE"
4191	//   "REQUIRED_TOS_AGREEMENT"
4192	//   "RESOURCE_NOT_DELETED"
4193	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
4194	//   "UNREACHABLE"
4195	Code string `json:"code,omitempty"`
4196
4197	// Data: [Output Only] Metadata about this warning in key: value format.
4198	// For example:
4199	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4200	Data []*InstanceGroupManagersScopedListWarningData `json:"data,omitempty"`
4201
4202	// Message: [Output Only] A human-readable description of the warning
4203	// code.
4204	Message string `json:"message,omitempty"`
4205
4206	// ForceSendFields is a list of field names (e.g. "Code") 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
4215func (s *InstanceGroupManagersScopedListWarning) MarshalJSON() ([]byte, error) {
4216	type noMethod InstanceGroupManagersScopedListWarning
4217	raw := noMethod(*s)
4218	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4219}
4220
4221type InstanceGroupManagersScopedListWarningData struct {
4222	// Key: [Output Only] A key that provides more detail on the warning
4223	// being returned. For example, for warnings where there are no results
4224	// in a list request for a particular zone, this key might be scope and
4225	// the key value might be the zone name. Other examples might be a key
4226	// indicating a deprecated resource and a suggested replacement, or a
4227	// warning about invalid network settings (for example, if an instance
4228	// attempts to perform IP forwarding but is not enabled for IP
4229	// forwarding).
4230	Key string `json:"key,omitempty"`
4231
4232	// Value: [Output Only] A warning data value corresponding to the key.
4233	Value string `json:"value,omitempty"`
4234
4235	// ForceSendFields is a list of field names (e.g. "Key") to
4236	// unconditionally include in API requests. By default, fields with
4237	// empty values are omitted from API requests. However, any non-pointer,
4238	// non-interface field appearing in ForceSendFields will be sent to the
4239	// server regardless of whether the field is empty or not. This may be
4240	// used to include empty fields in Patch requests.
4241	ForceSendFields []string `json:"-"`
4242}
4243
4244func (s *InstanceGroupManagersScopedListWarningData) MarshalJSON() ([]byte, error) {
4245	type noMethod InstanceGroupManagersScopedListWarningData
4246	raw := noMethod(*s)
4247	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4248}
4249
4250type InstanceGroupManagersSetAutoHealingRequest struct {
4251	AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"`
4252
4253	// ForceSendFields is a list of field names (e.g. "AutoHealingPolicies")
4254	// to unconditionally include in API requests. By default, fields with
4255	// empty values are omitted from API requests. However, any non-pointer,
4256	// non-interface field appearing in ForceSendFields will be sent to the
4257	// server regardless of whether the field is empty or not. This may be
4258	// used to include empty fields in Patch requests.
4259	ForceSendFields []string `json:"-"`
4260}
4261
4262func (s *InstanceGroupManagersSetAutoHealingRequest) MarshalJSON() ([]byte, error) {
4263	type noMethod InstanceGroupManagersSetAutoHealingRequest
4264	raw := noMethod(*s)
4265	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4266}
4267
4268type InstanceGroupManagersSetInstanceTemplateRequest struct {
4269	// InstanceTemplate: The URL of the instance template that is specified
4270	// for this managed instance group. The group uses this template to
4271	// create all new instances in the managed instance group.
4272	InstanceTemplate string `json:"instanceTemplate,omitempty"`
4273
4274	// ForceSendFields is a list of field names (e.g. "InstanceTemplate") to
4275	// unconditionally include in API requests. By default, fields with
4276	// empty values are omitted from API requests. However, any non-pointer,
4277	// non-interface field appearing in ForceSendFields will be sent to the
4278	// server regardless of whether the field is empty or not. This may be
4279	// used to include empty fields in Patch requests.
4280	ForceSendFields []string `json:"-"`
4281}
4282
4283func (s *InstanceGroupManagersSetInstanceTemplateRequest) MarshalJSON() ([]byte, error) {
4284	type noMethod InstanceGroupManagersSetInstanceTemplateRequest
4285	raw := noMethod(*s)
4286	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4287}
4288
4289type InstanceGroupManagersSetTargetPoolsRequest struct {
4290	// Fingerprint: The fingerprint of the target pools information. Use
4291	// this optional property to prevent conflicts when multiple users
4292	// change the target pools settings concurrently. Obtain the fingerprint
4293	// with the instanceGroupManagers.get method. Then, include the
4294	// fingerprint in your request to ensure that you do not overwrite
4295	// changes that were applied from another concurrent request.
4296	Fingerprint string `json:"fingerprint,omitempty"`
4297
4298	// TargetPools: The list of target pool URLs that instances in this
4299	// managed instance group belong to. The managed instance group applies
4300	// these target pools to all of the instances in the group. Existing
4301	// instances and new instances in the group all receive these target
4302	// pool settings.
4303	TargetPools []string `json:"targetPools,omitempty"`
4304
4305	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
4306	// unconditionally include in API requests. By default, fields with
4307	// empty values are omitted from API requests. However, any non-pointer,
4308	// non-interface field appearing in ForceSendFields will be sent to the
4309	// server regardless of whether the field is empty or not. This may be
4310	// used to include empty fields in Patch requests.
4311	ForceSendFields []string `json:"-"`
4312}
4313
4314func (s *InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error) {
4315	type noMethod InstanceGroupManagersSetTargetPoolsRequest
4316	raw := noMethod(*s)
4317	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4318}
4319
4320type InstanceGroupsAddInstancesRequest struct {
4321	// Instances: The list of instances to add to the instance group.
4322	Instances []*InstanceReference `json:"instances,omitempty"`
4323
4324	// ForceSendFields is a list of field names (e.g. "Instances") to
4325	// unconditionally include in API requests. By default, fields with
4326	// empty values are omitted from API requests. However, any non-pointer,
4327	// non-interface field appearing in ForceSendFields will be sent to the
4328	// server regardless of whether the field is empty or not. This may be
4329	// used to include empty fields in Patch requests.
4330	ForceSendFields []string `json:"-"`
4331}
4332
4333func (s *InstanceGroupsAddInstancesRequest) MarshalJSON() ([]byte, error) {
4334	type noMethod InstanceGroupsAddInstancesRequest
4335	raw := noMethod(*s)
4336	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4337}
4338
4339type InstanceGroupsListInstances struct {
4340	// Id: [Output Only] A unique identifier for this list of instance
4341	// groups. The server generates this identifier.
4342	Id string `json:"id,omitempty"`
4343
4344	// Items: [Output Only] A list of instances and any named ports that are
4345	// assigned to those instances.
4346	Items []*InstanceWithNamedPorts `json:"items,omitempty"`
4347
4348	// Kind: [Output Only] The resource type, which is always
4349	// compute#instanceGroupsListInstances for lists of instance groups.
4350	Kind string `json:"kind,omitempty"`
4351
4352	// NextPageToken: [Output Only] This token allows you to get the next
4353	// page of results for list requests. If the number of results is larger
4354	// than maxResults, use the nextPageToken as a value for the query
4355	// parameter pageToken in the next list request. Subsequent list
4356	// requests will have their own nextPageToken to continue paging through
4357	// the results.
4358	NextPageToken string `json:"nextPageToken,omitempty"`
4359
4360	// SelfLink: [Output Only] The URL for this list of instance groups. The
4361	// server generates this URL.
4362	SelfLink string `json:"selfLink,omitempty"`
4363
4364	// ServerResponse contains the HTTP response code and headers from the
4365	// server.
4366	googleapi.ServerResponse `json:"-"`
4367
4368	// ForceSendFields is a list of field names (e.g. "Id") to
4369	// unconditionally include in API requests. By default, fields with
4370	// empty values are omitted from API requests. However, any non-pointer,
4371	// non-interface field appearing in ForceSendFields will be sent to the
4372	// server regardless of whether the field is empty or not. This may be
4373	// used to include empty fields in Patch requests.
4374	ForceSendFields []string `json:"-"`
4375}
4376
4377func (s *InstanceGroupsListInstances) MarshalJSON() ([]byte, error) {
4378	type noMethod InstanceGroupsListInstances
4379	raw := noMethod(*s)
4380	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4381}
4382
4383type InstanceGroupsListInstancesRequest struct {
4384	// InstanceState: A filter for the state of the instances in the
4385	// instance group. Valid options are ALL or RUNNING. If you do not
4386	// specify this parameter the list includes all instances regardless of
4387	// their state.
4388	//
4389	// Possible values:
4390	//   "ALL"
4391	//   "RUNNING"
4392	InstanceState string `json:"instanceState,omitempty"`
4393
4394	// ForceSendFields is a list of field names (e.g. "InstanceState") to
4395	// unconditionally include in API requests. By default, fields with
4396	// empty values are omitted from API requests. However, any non-pointer,
4397	// non-interface field appearing in ForceSendFields will be sent to the
4398	// server regardless of whether the field is empty or not. This may be
4399	// used to include empty fields in Patch requests.
4400	ForceSendFields []string `json:"-"`
4401}
4402
4403func (s *InstanceGroupsListInstancesRequest) MarshalJSON() ([]byte, error) {
4404	type noMethod InstanceGroupsListInstancesRequest
4405	raw := noMethod(*s)
4406	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4407}
4408
4409type InstanceGroupsRemoveInstancesRequest struct {
4410	// Instances: The list of instances to remove from the instance group.
4411	Instances []*InstanceReference `json:"instances,omitempty"`
4412
4413	// ForceSendFields is a list of field names (e.g. "Instances") to
4414	// unconditionally include in API requests. By default, fields with
4415	// empty values are omitted from API requests. However, any non-pointer,
4416	// non-interface field appearing in ForceSendFields will be sent to the
4417	// server regardless of whether the field is empty or not. This may be
4418	// used to include empty fields in Patch requests.
4419	ForceSendFields []string `json:"-"`
4420}
4421
4422func (s *InstanceGroupsRemoveInstancesRequest) MarshalJSON() ([]byte, error) {
4423	type noMethod InstanceGroupsRemoveInstancesRequest
4424	raw := noMethod(*s)
4425	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4426}
4427
4428type InstanceGroupsScopedList struct {
4429	// InstanceGroups: [Output Only] The list of instance groups that are
4430	// contained in this scope.
4431	InstanceGroups []*InstanceGroup `json:"instanceGroups,omitempty"`
4432
4433	// Warning: [Output Only] An informational warning that replaces the
4434	// list of instance groups when the list is empty.
4435	Warning *InstanceGroupsScopedListWarning `json:"warning,omitempty"`
4436
4437	// ForceSendFields is a list of field names (e.g. "InstanceGroups") to
4438	// unconditionally include in API requests. By default, fields with
4439	// empty values are omitted from API requests. However, any non-pointer,
4440	// non-interface field appearing in ForceSendFields will be sent to the
4441	// server regardless of whether the field is empty or not. This may be
4442	// used to include empty fields in Patch requests.
4443	ForceSendFields []string `json:"-"`
4444}
4445
4446func (s *InstanceGroupsScopedList) MarshalJSON() ([]byte, error) {
4447	type noMethod InstanceGroupsScopedList
4448	raw := noMethod(*s)
4449	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4450}
4451
4452// InstanceGroupsScopedListWarning: [Output Only] An informational
4453// warning that replaces the list of instance groups when the list is
4454// empty.
4455type InstanceGroupsScopedListWarning struct {
4456	// Code: [Output Only] A warning code, if applicable. For example,
4457	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
4458	// the response.
4459	//
4460	// Possible values:
4461	//   "CLEANUP_FAILED"
4462	//   "DEPRECATED_RESOURCE_USED"
4463	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
4464	//   "INJECTED_KERNELS_DEPRECATED"
4465	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
4466	//   "NEXT_HOP_CANNOT_IP_FORWARD"
4467	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
4468	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
4469	//   "NEXT_HOP_NOT_RUNNING"
4470	//   "NOT_CRITICAL_ERROR"
4471	//   "NO_RESULTS_ON_PAGE"
4472	//   "REQUIRED_TOS_AGREEMENT"
4473	//   "RESOURCE_NOT_DELETED"
4474	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
4475	//   "UNREACHABLE"
4476	Code string `json:"code,omitempty"`
4477
4478	// Data: [Output Only] Metadata about this warning in key: value format.
4479	// For example:
4480	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4481	Data []*InstanceGroupsScopedListWarningData `json:"data,omitempty"`
4482
4483	// Message: [Output Only] A human-readable description of the warning
4484	// code.
4485	Message string `json:"message,omitempty"`
4486
4487	// ForceSendFields is a list of field names (e.g. "Code") to
4488	// unconditionally include in API requests. By default, fields with
4489	// empty values are omitted from API requests. However, any non-pointer,
4490	// non-interface field appearing in ForceSendFields will be sent to the
4491	// server regardless of whether the field is empty or not. This may be
4492	// used to include empty fields in Patch requests.
4493	ForceSendFields []string `json:"-"`
4494}
4495
4496func (s *InstanceGroupsScopedListWarning) MarshalJSON() ([]byte, error) {
4497	type noMethod InstanceGroupsScopedListWarning
4498	raw := noMethod(*s)
4499	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4500}
4501
4502type InstanceGroupsScopedListWarningData struct {
4503	// Key: [Output Only] A key that provides more detail on the warning
4504	// being returned. For example, for warnings where there are no results
4505	// in a list request for a particular zone, this key might be scope and
4506	// the key value might be the zone name. Other examples might be a key
4507	// indicating a deprecated resource and a suggested replacement, or a
4508	// warning about invalid network settings (for example, if an instance
4509	// attempts to perform IP forwarding but is not enabled for IP
4510	// forwarding).
4511	Key string `json:"key,omitempty"`
4512
4513	// Value: [Output Only] A warning data value corresponding to the key.
4514	Value string `json:"value,omitempty"`
4515
4516	// ForceSendFields is a list of field names (e.g. "Key") to
4517	// unconditionally include in API requests. By default, fields with
4518	// empty values are omitted from API requests. However, any non-pointer,
4519	// non-interface field appearing in ForceSendFields will be sent to the
4520	// server regardless of whether the field is empty or not. This may be
4521	// used to include empty fields in Patch requests.
4522	ForceSendFields []string `json:"-"`
4523}
4524
4525func (s *InstanceGroupsScopedListWarningData) MarshalJSON() ([]byte, error) {
4526	type noMethod InstanceGroupsScopedListWarningData
4527	raw := noMethod(*s)
4528	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4529}
4530
4531type InstanceGroupsSetNamedPortsRequest struct {
4532	// Fingerprint: The fingerprint of the named ports information for this
4533	// instance group. Use this optional property to prevent conflicts when
4534	// multiple users change the named ports settings concurrently. Obtain
4535	// the fingerprint with the instanceGroups.get method. Then, include the
4536	// fingerprint in your request to ensure that you do not overwrite
4537	// changes that were applied from another concurrent request.
4538	Fingerprint string `json:"fingerprint,omitempty"`
4539
4540	// NamedPorts: The list of named ports to set for this instance group.
4541	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
4542
4543	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
4544	// unconditionally include in API requests. By default, fields with
4545	// empty values are omitted from API requests. However, any non-pointer,
4546	// non-interface field appearing in ForceSendFields will be sent to the
4547	// server regardless of whether the field is empty or not. This may be
4548	// used to include empty fields in Patch requests.
4549	ForceSendFields []string `json:"-"`
4550}
4551
4552func (s *InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) {
4553	type noMethod InstanceGroupsSetNamedPortsRequest
4554	raw := noMethod(*s)
4555	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4556}
4557
4558// InstanceList: Contains a list of instances.
4559type InstanceList struct {
4560	// Id: [Output Only] The unique identifier for the resource. This
4561	// identifier is defined by the server.
4562	Id string `json:"id,omitempty"`
4563
4564	// Items: [Output Only] A list of instances.
4565	Items []*Instance `json:"items,omitempty"`
4566
4567	// Kind: [Output Only] Type of resource. Always compute#instanceList for
4568	// lists of Instance resources.
4569	Kind string `json:"kind,omitempty"`
4570
4571	// NextPageToken: [Output Only] This token allows you to get the next
4572	// page of results for list requests. If the number of results is larger
4573	// than maxResults, use the nextPageToken as a value for the query
4574	// parameter pageToken in the next list request. Subsequent list
4575	// requests will have their own nextPageToken to continue paging through
4576	// the results.
4577	NextPageToken string `json:"nextPageToken,omitempty"`
4578
4579	// SelfLink: [Output Only] Server-defined URL for this resource.
4580	SelfLink string `json:"selfLink,omitempty"`
4581
4582	// ServerResponse contains the HTTP response code and headers from the
4583	// server.
4584	googleapi.ServerResponse `json:"-"`
4585
4586	// ForceSendFields is a list of field names (e.g. "Id") to
4587	// unconditionally include in API requests. By default, fields with
4588	// empty values are omitted from API requests. However, any non-pointer,
4589	// non-interface field appearing in ForceSendFields will be sent to the
4590	// server regardless of whether the field is empty or not. This may be
4591	// used to include empty fields in Patch requests.
4592	ForceSendFields []string `json:"-"`
4593}
4594
4595func (s *InstanceList) MarshalJSON() ([]byte, error) {
4596	type noMethod InstanceList
4597	raw := noMethod(*s)
4598	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4599}
4600
4601type InstanceProperties struct {
4602	// CanIpForward: Enables instances created based on this template to
4603	// send packets with source IP addresses other than their own and
4604	// receive packets with destination IP addresses other than their own.
4605	// If these instances will be used as an IP gateway or it will be set as
4606	// the next-hop in a Route resource, specify true. If unsure, leave this
4607	// set to false. See the canIpForward documentation for more
4608	// information.
4609	CanIpForward bool `json:"canIpForward,omitempty"`
4610
4611	// Description: An optional text description for the instances that are
4612	// created from this instance template.
4613	Description string `json:"description,omitempty"`
4614
4615	// Disks: An array of disks that are associated with the instances that
4616	// are created from this template.
4617	Disks []*AttachedDisk `json:"disks,omitempty"`
4618
4619	// MachineType: The machine type to use for instances that are created
4620	// from this template.
4621	MachineType string `json:"machineType,omitempty"`
4622
4623	// Metadata: The metadata key/value pairs to assign to instances that
4624	// are created from this template. These pairs can consist of custom
4625	// metadata or predefined keys. See Project and instance metadata for
4626	// more information.
4627	Metadata *Metadata `json:"metadata,omitempty"`
4628
4629	// NetworkInterfaces: An array of network access configurations for this
4630	// interface.
4631	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
4632
4633	// Scheduling: Specifies the scheduling options for the instances that
4634	// are created from this template.
4635	Scheduling *Scheduling `json:"scheduling,omitempty"`
4636
4637	// ServiceAccounts: A list of service accounts with specified scopes.
4638	// Access tokens for these service accounts are available to the
4639	// instances that are created from this template. Use metadata queries
4640	// to obtain the access tokens for these instances.
4641	ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"`
4642
4643	// Tags: A list of tags to apply to the instances that are created from
4644	// this template. The tags identify valid sources or targets for network
4645	// firewalls. The setTags method can modify this list of tags. Each tag
4646	// within the list must comply with RFC1035.
4647	Tags *Tags `json:"tags,omitempty"`
4648
4649	// ForceSendFields is a list of field names (e.g. "CanIpForward") to
4650	// unconditionally include in API requests. By default, fields with
4651	// empty values are omitted from API requests. However, any non-pointer,
4652	// non-interface field appearing in ForceSendFields will be sent to the
4653	// server regardless of whether the field is empty or not. This may be
4654	// used to include empty fields in Patch requests.
4655	ForceSendFields []string `json:"-"`
4656}
4657
4658func (s *InstanceProperties) MarshalJSON() ([]byte, error) {
4659	type noMethod InstanceProperties
4660	raw := noMethod(*s)
4661	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4662}
4663
4664type InstanceReference struct {
4665	// Instance: The URL for a specific instance.
4666	Instance string `json:"instance,omitempty"`
4667
4668	// ForceSendFields is a list of field names (e.g. "Instance") to
4669	// unconditionally include in API requests. By default, fields with
4670	// empty values are omitted from API requests. However, any non-pointer,
4671	// non-interface field appearing in ForceSendFields will be sent to the
4672	// server regardless of whether the field is empty or not. This may be
4673	// used to include empty fields in Patch requests.
4674	ForceSendFields []string `json:"-"`
4675}
4676
4677func (s *InstanceReference) MarshalJSON() ([]byte, error) {
4678	type noMethod InstanceReference
4679	raw := noMethod(*s)
4680	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4681}
4682
4683// InstanceTemplate: An Instance Template resource.
4684type InstanceTemplate struct {
4685	// CreationTimestamp: [Output Only] The creation timestamp for this
4686	// instance template in RFC3339 text format.
4687	CreationTimestamp string `json:"creationTimestamp,omitempty"`
4688
4689	// Description: An optional description of this resource. Provide this
4690	// property when you create the resource.
4691	Description string `json:"description,omitempty"`
4692
4693	// Id: [Output Only] A unique identifier for this instance template. The
4694	// server defines this identifier.
4695	Id uint64 `json:"id,omitempty,string"`
4696
4697	// Kind: [Output Only] The resource type, which is always
4698	// compute#instanceTemplate for instance templates.
4699	Kind string `json:"kind,omitempty"`
4700
4701	// Name: Name of the resource; provided by the client when the resource
4702	// is created. The name must be 1-63 characters long, and comply with
4703	// RFC1035. Specifically, the name must be 1-63 characters long and
4704	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
4705	// the first character must be a lowercase letter, and all following
4706	// characters must be a dash, lowercase letter, or digit, except the
4707	// last character, which cannot be a dash.
4708	Name string `json:"name,omitempty"`
4709
4710	// Properties: The instance properties for this instance template.
4711	Properties *InstanceProperties `json:"properties,omitempty"`
4712
4713	// SelfLink: [Output Only] The URL for this instance template. The
4714	// server defines this URL.
4715	SelfLink string `json:"selfLink,omitempty"`
4716
4717	// ServerResponse contains the HTTP response code and headers from the
4718	// server.
4719	googleapi.ServerResponse `json:"-"`
4720
4721	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
4722	// to unconditionally include in API requests. By default, fields with
4723	// empty values are omitted from API requests. However, any non-pointer,
4724	// non-interface field appearing in ForceSendFields will be sent to the
4725	// server regardless of whether the field is empty or not. This may be
4726	// used to include empty fields in Patch requests.
4727	ForceSendFields []string `json:"-"`
4728}
4729
4730func (s *InstanceTemplate) MarshalJSON() ([]byte, error) {
4731	type noMethod InstanceTemplate
4732	raw := noMethod(*s)
4733	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4734}
4735
4736// InstanceTemplateList: A list of instance templates.
4737type InstanceTemplateList struct {
4738	// Id: [Output Only] A unique identifier for this instance template. The
4739	// server defines this identifier.
4740	Id string `json:"id,omitempty"`
4741
4742	// Items: [Output Only] list of InstanceTemplate resources.
4743	Items []*InstanceTemplate `json:"items,omitempty"`
4744
4745	// Kind: [Output Only] The resource type, which is always
4746	// compute#instanceTemplatesListResponse for instance template lists.
4747	Kind string `json:"kind,omitempty"`
4748
4749	// NextPageToken: [Output Only] This token allows you to get the next
4750	// page of results for list requests. If the number of results is larger
4751	// than maxResults, use the nextPageToken as a value for the query
4752	// parameter pageToken in the next list request. Subsequent list
4753	// requests will have their own nextPageToken to continue paging through
4754	// the results.
4755	NextPageToken string `json:"nextPageToken,omitempty"`
4756
4757	// SelfLink: [Output Only] The URL for this instance template list. The
4758	// server defines this URL.
4759	SelfLink string `json:"selfLink,omitempty"`
4760
4761	// ServerResponse contains the HTTP response code and headers from the
4762	// server.
4763	googleapi.ServerResponse `json:"-"`
4764
4765	// ForceSendFields is a list of field names (e.g. "Id") to
4766	// unconditionally include in API requests. By default, fields with
4767	// empty values are omitted from API requests. However, any non-pointer,
4768	// non-interface field appearing in ForceSendFields will be sent to the
4769	// server regardless of whether the field is empty or not. This may be
4770	// used to include empty fields in Patch requests.
4771	ForceSendFields []string `json:"-"`
4772}
4773
4774func (s *InstanceTemplateList) MarshalJSON() ([]byte, error) {
4775	type noMethod InstanceTemplateList
4776	raw := noMethod(*s)
4777	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4778}
4779
4780type InstanceWithNamedPorts struct {
4781	// Instance: [Output Only] The URL of the instance.
4782	Instance string `json:"instance,omitempty"`
4783
4784	// NamedPorts: [Output Only] The named ports that belong to this
4785	// instance group.
4786	NamedPorts []*NamedPort `json:"namedPorts,omitempty"`
4787
4788	// Status: [Output Only] The status of the instance.
4789	//
4790	// Possible values:
4791	//   "PROVISIONING"
4792	//   "RUNNING"
4793	//   "STAGING"
4794	//   "STOPPED"
4795	//   "STOPPING"
4796	//   "SUSPENDED"
4797	//   "SUSPENDING"
4798	//   "TERMINATED"
4799	Status string `json:"status,omitempty"`
4800
4801	// ForceSendFields is a list of field names (e.g. "Instance") to
4802	// unconditionally include in API requests. By default, fields with
4803	// empty values are omitted from API requests. However, any non-pointer,
4804	// non-interface field appearing in ForceSendFields will be sent to the
4805	// server regardless of whether the field is empty or not. This may be
4806	// used to include empty fields in Patch requests.
4807	ForceSendFields []string `json:"-"`
4808}
4809
4810func (s *InstanceWithNamedPorts) MarshalJSON() ([]byte, error) {
4811	type noMethod InstanceWithNamedPorts
4812	raw := noMethod(*s)
4813	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4814}
4815
4816type InstancesScopedList struct {
4817	// Instances: [Output Only] List of instances contained in this scope.
4818	Instances []*Instance `json:"instances,omitempty"`
4819
4820	// Warning: [Output Only] Informational warning which replaces the list
4821	// of instances when the list is empty.
4822	Warning *InstancesScopedListWarning `json:"warning,omitempty"`
4823
4824	// ForceSendFields is a list of field names (e.g. "Instances") to
4825	// unconditionally include in API requests. By default, fields with
4826	// empty values are omitted from API requests. However, any non-pointer,
4827	// non-interface field appearing in ForceSendFields will be sent to the
4828	// server regardless of whether the field is empty or not. This may be
4829	// used to include empty fields in Patch requests.
4830	ForceSendFields []string `json:"-"`
4831}
4832
4833func (s *InstancesScopedList) MarshalJSON() ([]byte, error) {
4834	type noMethod InstancesScopedList
4835	raw := noMethod(*s)
4836	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4837}
4838
4839// InstancesScopedListWarning: [Output Only] Informational warning which
4840// replaces the list of instances when the list is empty.
4841type InstancesScopedListWarning struct {
4842	// Code: [Output Only] A warning code, if applicable. For example,
4843	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
4844	// the response.
4845	//
4846	// Possible values:
4847	//   "CLEANUP_FAILED"
4848	//   "DEPRECATED_RESOURCE_USED"
4849	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
4850	//   "INJECTED_KERNELS_DEPRECATED"
4851	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
4852	//   "NEXT_HOP_CANNOT_IP_FORWARD"
4853	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
4854	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
4855	//   "NEXT_HOP_NOT_RUNNING"
4856	//   "NOT_CRITICAL_ERROR"
4857	//   "NO_RESULTS_ON_PAGE"
4858	//   "REQUIRED_TOS_AGREEMENT"
4859	//   "RESOURCE_NOT_DELETED"
4860	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
4861	//   "UNREACHABLE"
4862	Code string `json:"code,omitempty"`
4863
4864	// Data: [Output Only] Metadata about this warning in key: value format.
4865	// For example:
4866	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
4867	Data []*InstancesScopedListWarningData `json:"data,omitempty"`
4868
4869	// Message: [Output Only] A human-readable description of the warning
4870	// code.
4871	Message string `json:"message,omitempty"`
4872
4873	// ForceSendFields is a list of field names (e.g. "Code") to
4874	// unconditionally include in API requests. By default, fields with
4875	// empty values are omitted from API requests. However, any non-pointer,
4876	// non-interface field appearing in ForceSendFields will be sent to the
4877	// server regardless of whether the field is empty or not. This may be
4878	// used to include empty fields in Patch requests.
4879	ForceSendFields []string `json:"-"`
4880}
4881
4882func (s *InstancesScopedListWarning) MarshalJSON() ([]byte, error) {
4883	type noMethod InstancesScopedListWarning
4884	raw := noMethod(*s)
4885	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4886}
4887
4888type InstancesScopedListWarningData struct {
4889	// Key: [Output Only] A key that provides more detail on the warning
4890	// being returned. For example, for warnings where there are no results
4891	// in a list request for a particular zone, this key might be scope and
4892	// the key value might be the zone name. Other examples might be a key
4893	// indicating a deprecated resource and a suggested replacement, or a
4894	// warning about invalid network settings (for example, if an instance
4895	// attempts to perform IP forwarding but is not enabled for IP
4896	// forwarding).
4897	Key string `json:"key,omitempty"`
4898
4899	// Value: [Output Only] A warning data value corresponding to the key.
4900	Value string `json:"value,omitempty"`
4901
4902	// ForceSendFields is a list of field names (e.g. "Key") to
4903	// unconditionally include in API requests. By default, fields with
4904	// empty values are omitted from API requests. However, any non-pointer,
4905	// non-interface field appearing in ForceSendFields will be sent to the
4906	// server regardless of whether the field is empty or not. This may be
4907	// used to include empty fields in Patch requests.
4908	ForceSendFields []string `json:"-"`
4909}
4910
4911func (s *InstancesScopedListWarningData) MarshalJSON() ([]byte, error) {
4912	type noMethod InstancesScopedListWarningData
4913	raw := noMethod(*s)
4914	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4915}
4916
4917type InstancesSetLabelsRequest struct {
4918	// LabelFingerprint: Fingerprint of the previous set of labels for this
4919	// resource, used to prevent conflicts. Provide the latest fingerprint
4920	// value when making a request to add or change labels.
4921	LabelFingerprint string `json:"labelFingerprint,omitempty"`
4922
4923	// Labels: The new labels for the resource, in the form of key/value
4924	// pairs.
4925	Labels map[string]string `json:"labels,omitempty"`
4926
4927	// ForceSendFields is a list of field names (e.g. "LabelFingerprint") to
4928	// unconditionally include in API requests. By default, fields with
4929	// empty values are omitted from API requests. However, any non-pointer,
4930	// non-interface field appearing in ForceSendFields will be sent to the
4931	// server regardless of whether the field is empty or not. This may be
4932	// used to include empty fields in Patch requests.
4933	ForceSendFields []string `json:"-"`
4934}
4935
4936func (s *InstancesSetLabelsRequest) MarshalJSON() ([]byte, error) {
4937	type noMethod InstancesSetLabelsRequest
4938	raw := noMethod(*s)
4939	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4940}
4941
4942type InstancesSetMachineTypeRequest struct {
4943	// MachineType: Full or partial URL of the machine type resource. See
4944	// Machine Types for a full list of machine types. For example:
4945	// zones/us-central1-f/machineTypes/n1-standard-1
4946	MachineType string `json:"machineType,omitempty"`
4947
4948	// ForceSendFields is a list of field names (e.g. "MachineType") to
4949	// unconditionally include in API requests. By default, fields with
4950	// empty values are omitted from API requests. However, any non-pointer,
4951	// non-interface field appearing in ForceSendFields will be sent to the
4952	// server regardless of whether the field is empty or not. This may be
4953	// used to include empty fields in Patch requests.
4954	ForceSendFields []string `json:"-"`
4955}
4956
4957func (s *InstancesSetMachineTypeRequest) MarshalJSON() ([]byte, error) {
4958	type noMethod InstancesSetMachineTypeRequest
4959	raw := noMethod(*s)
4960	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4961}
4962
4963// License: A license resource.
4964type License struct {
4965	// ChargesUseFee: [Output Only] If true, the customer will be charged
4966	// license fee for running software that contains this license on an
4967	// instance.
4968	ChargesUseFee bool `json:"chargesUseFee,omitempty"`
4969
4970	// Kind: [Output Only] Type of resource. Always compute#license for
4971	// licenses.
4972	Kind string `json:"kind,omitempty"`
4973
4974	// Name: [Output Only] Name of the resource. The name is 1-63 characters
4975	// long and complies with RFC1035.
4976	Name string `json:"name,omitempty"`
4977
4978	// SelfLink: [Output Only] Server-defined URL for the resource.
4979	SelfLink string `json:"selfLink,omitempty"`
4980
4981	// ServerResponse contains the HTTP response code and headers from the
4982	// server.
4983	googleapi.ServerResponse `json:"-"`
4984
4985	// ForceSendFields is a list of field names (e.g. "ChargesUseFee") to
4986	// unconditionally include in API requests. By default, fields with
4987	// empty values are omitted from API requests. However, any non-pointer,
4988	// non-interface field appearing in ForceSendFields will be sent to the
4989	// server regardless of whether the field is empty or not. This may be
4990	// used to include empty fields in Patch requests.
4991	ForceSendFields []string `json:"-"`
4992}
4993
4994func (s *License) MarshalJSON() ([]byte, error) {
4995	type noMethod License
4996	raw := noMethod(*s)
4997	return gensupport.MarshalJSON(raw, s.ForceSendFields)
4998}
4999
5000// MachineType: A Machine Type resource.
5001type MachineType struct {
5002	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
5003	// format.
5004	CreationTimestamp string `json:"creationTimestamp,omitempty"`
5005
5006	// Deprecated: [Output Only] The deprecation status associated with this
5007	// machine type.
5008	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
5009
5010	// Description: [Output Only] An optional textual description of the
5011	// resource.
5012	Description string `json:"description,omitempty"`
5013
5014	// GuestCpus: [Output Only] The number of virtual CPUs that are
5015	// available to the instance.
5016	GuestCpus int64 `json:"guestCpus,omitempty"`
5017
5018	// Id: [Output Only] The unique identifier for the resource. This
5019	// identifier is defined by the server.
5020	Id uint64 `json:"id,omitempty,string"`
5021
5022	// Kind: [Output Only] The type of the resource. Always
5023	// compute#machineType for machine types.
5024	Kind string `json:"kind,omitempty"`
5025
5026	// MaximumPersistentDisks: [Output Only] Maximum persistent disks
5027	// allowed.
5028	MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"`
5029
5030	// MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent
5031	// disks size (GB) allowed.
5032	MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"`
5033
5034	// MemoryMb: [Output Only] The amount of physical memory available to
5035	// the instance, defined in MB.
5036	MemoryMb int64 `json:"memoryMb,omitempty"`
5037
5038	// Name: [Output Only] Name of the resource.
5039	Name string `json:"name,omitempty"`
5040
5041	// SelfLink: [Output Only] Server-defined URL for the resource.
5042	SelfLink string `json:"selfLink,omitempty"`
5043
5044	// Zone: [Output Only] The name of the zone where the machine type
5045	// resides, such as us-central1-a.
5046	Zone string `json:"zone,omitempty"`
5047
5048	// ServerResponse contains the HTTP response code and headers from the
5049	// server.
5050	googleapi.ServerResponse `json:"-"`
5051
5052	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
5053	// to unconditionally include in API requests. By default, fields with
5054	// empty values are omitted from API requests. However, any non-pointer,
5055	// non-interface field appearing in ForceSendFields will be sent to the
5056	// server regardless of whether the field is empty or not. This may be
5057	// used to include empty fields in Patch requests.
5058	ForceSendFields []string `json:"-"`
5059}
5060
5061func (s *MachineType) MarshalJSON() ([]byte, error) {
5062	type noMethod MachineType
5063	raw := noMethod(*s)
5064	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5065}
5066
5067type MachineTypeAggregatedList struct {
5068	// Id: [Output Only] The unique identifier for the resource. This
5069	// identifier is defined by the server.
5070	Id string `json:"id,omitempty"`
5071
5072	// Items: [Output Only] A map of scoped machine type lists.
5073	Items map[string]MachineTypesScopedList `json:"items,omitempty"`
5074
5075	// Kind: [Output Only] Type of resource. Always
5076	// compute#machineTypeAggregatedList for aggregated lists of machine
5077	// types.
5078	Kind string `json:"kind,omitempty"`
5079
5080	// NextPageToken: [Output Only] This token allows you to get the next
5081	// page of results for list requests. If the number of results is larger
5082	// than maxResults, use the nextPageToken as a value for the query
5083	// parameter pageToken in the next list request. Subsequent list
5084	// requests will have their own nextPageToken to continue paging through
5085	// the results.
5086	NextPageToken string `json:"nextPageToken,omitempty"`
5087
5088	// SelfLink: [Output Only] Server-defined URL for this resource.
5089	SelfLink string `json:"selfLink,omitempty"`
5090
5091	// ServerResponse contains the HTTP response code and headers from the
5092	// server.
5093	googleapi.ServerResponse `json:"-"`
5094
5095	// ForceSendFields is a list of field names (e.g. "Id") to
5096	// unconditionally include in API requests. By default, fields with
5097	// empty values are omitted from API requests. However, any non-pointer,
5098	// non-interface field appearing in ForceSendFields will be sent to the
5099	// server regardless of whether the field is empty or not. This may be
5100	// used to include empty fields in Patch requests.
5101	ForceSendFields []string `json:"-"`
5102}
5103
5104func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) {
5105	type noMethod MachineTypeAggregatedList
5106	raw := noMethod(*s)
5107	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5108}
5109
5110// MachineTypeList: Contains a list of machine types.
5111type MachineTypeList struct {
5112	// Id: [Output Only] The unique identifier for the resource. This
5113	// identifier is defined by the server.
5114	Id string `json:"id,omitempty"`
5115
5116	// Items: [Output Only] A list of Machine Type resources.
5117	Items []*MachineType `json:"items,omitempty"`
5118
5119	// Kind: [Output Only] Type of resource. Always compute#machineTypeList
5120	// for lists of machine types.
5121	Kind string `json:"kind,omitempty"`
5122
5123	// NextPageToken: [Output Only] This token allows you to get the next
5124	// page of results for list requests. If the number of results is larger
5125	// than maxResults, use the nextPageToken as a value for the query
5126	// parameter pageToken in the next list request. Subsequent list
5127	// requests will have their own nextPageToken to continue paging through
5128	// the results.
5129	NextPageToken string `json:"nextPageToken,omitempty"`
5130
5131	// SelfLink: [Output Only] Server-defined URL for this resource.
5132	SelfLink string `json:"selfLink,omitempty"`
5133
5134	// ServerResponse contains the HTTP response code and headers from the
5135	// server.
5136	googleapi.ServerResponse `json:"-"`
5137
5138	// ForceSendFields is a list of field names (e.g. "Id") to
5139	// unconditionally include in API requests. By default, fields with
5140	// empty values are omitted from API requests. However, any non-pointer,
5141	// non-interface field appearing in ForceSendFields will be sent to the
5142	// server regardless of whether the field is empty or not. This may be
5143	// used to include empty fields in Patch requests.
5144	ForceSendFields []string `json:"-"`
5145}
5146
5147func (s *MachineTypeList) MarshalJSON() ([]byte, error) {
5148	type noMethod MachineTypeList
5149	raw := noMethod(*s)
5150	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5151}
5152
5153type MachineTypesScopedList struct {
5154	// MachineTypes: [Output Only] List of machine types contained in this
5155	// scope.
5156	MachineTypes []*MachineType `json:"machineTypes,omitempty"`
5157
5158	// Warning: [Output Only] An informational warning that appears when the
5159	// machine types list is empty.
5160	Warning *MachineTypesScopedListWarning `json:"warning,omitempty"`
5161
5162	// ForceSendFields is a list of field names (e.g. "MachineTypes") to
5163	// unconditionally include in API requests. By default, fields with
5164	// empty values are omitted from API requests. However, any non-pointer,
5165	// non-interface field appearing in ForceSendFields will be sent to the
5166	// server regardless of whether the field is empty or not. This may be
5167	// used to include empty fields in Patch requests.
5168	ForceSendFields []string `json:"-"`
5169}
5170
5171func (s *MachineTypesScopedList) MarshalJSON() ([]byte, error) {
5172	type noMethod MachineTypesScopedList
5173	raw := noMethod(*s)
5174	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5175}
5176
5177// MachineTypesScopedListWarning: [Output Only] An informational warning
5178// that appears when the machine types list is empty.
5179type MachineTypesScopedListWarning struct {
5180	// Code: [Output Only] A warning code, if applicable. For example,
5181	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
5182	// the response.
5183	//
5184	// Possible values:
5185	//   "CLEANUP_FAILED"
5186	//   "DEPRECATED_RESOURCE_USED"
5187	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
5188	//   "INJECTED_KERNELS_DEPRECATED"
5189	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
5190	//   "NEXT_HOP_CANNOT_IP_FORWARD"
5191	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
5192	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
5193	//   "NEXT_HOP_NOT_RUNNING"
5194	//   "NOT_CRITICAL_ERROR"
5195	//   "NO_RESULTS_ON_PAGE"
5196	//   "REQUIRED_TOS_AGREEMENT"
5197	//   "RESOURCE_NOT_DELETED"
5198	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
5199	//   "UNREACHABLE"
5200	Code string `json:"code,omitempty"`
5201
5202	// Data: [Output Only] Metadata about this warning in key: value format.
5203	// For example:
5204	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5205	Data []*MachineTypesScopedListWarningData `json:"data,omitempty"`
5206
5207	// Message: [Output Only] A human-readable description of the warning
5208	// code.
5209	Message string `json:"message,omitempty"`
5210
5211	// ForceSendFields is a list of field names (e.g. "Code") to
5212	// unconditionally include in API requests. By default, fields with
5213	// empty values are omitted from API requests. However, any non-pointer,
5214	// non-interface field appearing in ForceSendFields will be sent to the
5215	// server regardless of whether the field is empty or not. This may be
5216	// used to include empty fields in Patch requests.
5217	ForceSendFields []string `json:"-"`
5218}
5219
5220func (s *MachineTypesScopedListWarning) MarshalJSON() ([]byte, error) {
5221	type noMethod MachineTypesScopedListWarning
5222	raw := noMethod(*s)
5223	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5224}
5225
5226type MachineTypesScopedListWarningData struct {
5227	// Key: [Output Only] A key that provides more detail on the warning
5228	// being returned. For example, for warnings where there are no results
5229	// in a list request for a particular zone, this key might be scope and
5230	// the key value might be the zone name. Other examples might be a key
5231	// indicating a deprecated resource and a suggested replacement, or a
5232	// warning about invalid network settings (for example, if an instance
5233	// attempts to perform IP forwarding but is not enabled for IP
5234	// forwarding).
5235	Key string `json:"key,omitempty"`
5236
5237	// Value: [Output Only] A warning data value corresponding to the key.
5238	Value string `json:"value,omitempty"`
5239
5240	// ForceSendFields is a list of field names (e.g. "Key") to
5241	// unconditionally include in API requests. By default, fields with
5242	// empty values are omitted from API requests. However, any non-pointer,
5243	// non-interface field appearing in ForceSendFields will be sent to the
5244	// server regardless of whether the field is empty or not. This may be
5245	// used to include empty fields in Patch requests.
5246	ForceSendFields []string `json:"-"`
5247}
5248
5249func (s *MachineTypesScopedListWarningData) MarshalJSON() ([]byte, error) {
5250	type noMethod MachineTypesScopedListWarningData
5251	raw := noMethod(*s)
5252	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5253}
5254
5255type ManagedInstance struct {
5256	// CurrentAction: [Output Only] The current action that the managed
5257	// instance group has scheduled for the instance. Possible values:
5258	// - NONE The instance is running, and the managed instance group does
5259	// not have any scheduled actions for this instance.
5260	// - CREATING The managed instance group is creating this instance. If
5261	// the group fails to create this instance, it will try again until it
5262	// is successful.
5263	// - CREATING_WITHOUT_RETRIES The managed instance group is attempting
5264	// to create this instance only once. If the group fails to create this
5265	// instance, it does not try again and the group's target_size value is
5266	// decreased.
5267	// - RECREATING The managed instance group is recreating this instance.
5268	//
5269	// - DELETING The managed instance group is permanently deleting this
5270	// instance.
5271	// - ABANDONING The managed instance group is abandoning this instance.
5272	// The instance will be removed from the instance group and from any
5273	// target pools that are associated with this group.
5274	// - RESTARTING The managed instance group is restarting the instance.
5275	//
5276	// - REFRESHING The managed instance group is applying configuration
5277	// changes to the instance without stopping it. For example, the group
5278	// can update the target pool list for an instance without stopping that
5279	// instance.
5280	//
5281	// Possible values:
5282	//   "ABANDONING"
5283	//   "CREATING"
5284	//   "DELETING"
5285	//   "NONE"
5286	//   "RECREATING"
5287	//   "REFRESHING"
5288	//   "RESTARTING"
5289	CurrentAction string `json:"currentAction,omitempty"`
5290
5291	// Id: [Output only] The unique identifier for this resource. This field
5292	// is empty when instance does not exist.
5293	Id uint64 `json:"id,omitempty,string"`
5294
5295	// Instance: [Output Only] The URL of the instance. The URL can exist
5296	// even if the instance has not yet been created.
5297	Instance string `json:"instance,omitempty"`
5298
5299	// InstanceStatus: [Output Only] The status of the instance. This field
5300	// is empty when the instance does not exist.
5301	//
5302	// Possible values:
5303	//   "PROVISIONING"
5304	//   "RUNNING"
5305	//   "STAGING"
5306	//   "STOPPED"
5307	//   "STOPPING"
5308	//   "SUSPENDED"
5309	//   "SUSPENDING"
5310	//   "TERMINATED"
5311	InstanceStatus string `json:"instanceStatus,omitempty"`
5312
5313	// LastAttempt: [Output Only] Information about the last attempt to
5314	// create or delete the instance.
5315	LastAttempt *ManagedInstanceLastAttempt `json:"lastAttempt,omitempty"`
5316
5317	// ForceSendFields is a list of field names (e.g. "CurrentAction") to
5318	// unconditionally include in API requests. By default, fields with
5319	// empty values are omitted from API requests. However, any non-pointer,
5320	// non-interface field appearing in ForceSendFields will be sent to the
5321	// server regardless of whether the field is empty or not. This may be
5322	// used to include empty fields in Patch requests.
5323	ForceSendFields []string `json:"-"`
5324}
5325
5326func (s *ManagedInstance) MarshalJSON() ([]byte, error) {
5327	type noMethod ManagedInstance
5328	raw := noMethod(*s)
5329	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5330}
5331
5332type ManagedInstanceLastAttempt struct {
5333	// Errors: [Output Only] Encountered errors during the last attempt to
5334	// create or delete the instance.
5335	Errors *ManagedInstanceLastAttemptErrors `json:"errors,omitempty"`
5336
5337	// ForceSendFields is a list of field names (e.g. "Errors") to
5338	// unconditionally include in API requests. By default, fields with
5339	// empty values are omitted from API requests. However, any non-pointer,
5340	// non-interface field appearing in ForceSendFields will be sent to the
5341	// server regardless of whether the field is empty or not. This may be
5342	// used to include empty fields in Patch requests.
5343	ForceSendFields []string `json:"-"`
5344}
5345
5346func (s *ManagedInstanceLastAttempt) MarshalJSON() ([]byte, error) {
5347	type noMethod ManagedInstanceLastAttempt
5348	raw := noMethod(*s)
5349	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5350}
5351
5352// ManagedInstanceLastAttemptErrors: [Output Only] Encountered errors
5353// during the last attempt to create or delete the instance.
5354type ManagedInstanceLastAttemptErrors struct {
5355	// Errors: [Output Only] The array of errors encountered while
5356	// processing this operation.
5357	Errors []*ManagedInstanceLastAttemptErrorsErrors `json:"errors,omitempty"`
5358
5359	// ForceSendFields is a list of field names (e.g. "Errors") to
5360	// unconditionally include in API requests. By default, fields with
5361	// empty values are omitted from API requests. However, any non-pointer,
5362	// non-interface field appearing in ForceSendFields will be sent to the
5363	// server regardless of whether the field is empty or not. This may be
5364	// used to include empty fields in Patch requests.
5365	ForceSendFields []string `json:"-"`
5366}
5367
5368func (s *ManagedInstanceLastAttemptErrors) MarshalJSON() ([]byte, error) {
5369	type noMethod ManagedInstanceLastAttemptErrors
5370	raw := noMethod(*s)
5371	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5372}
5373
5374type ManagedInstanceLastAttemptErrorsErrors struct {
5375	// Code: [Output Only] The error type identifier for this error.
5376	Code string `json:"code,omitempty"`
5377
5378	// Location: [Output Only] Indicates the field in the request that
5379	// caused the error. This property is optional.
5380	Location string `json:"location,omitempty"`
5381
5382	// Message: [Output Only] An optional, human-readable error message.
5383	Message string `json:"message,omitempty"`
5384
5385	// ForceSendFields is a list of field names (e.g. "Code") to
5386	// unconditionally include in API requests. By default, fields with
5387	// empty values are omitted from API requests. However, any non-pointer,
5388	// non-interface field appearing in ForceSendFields will be sent to the
5389	// server regardless of whether the field is empty or not. This may be
5390	// used to include empty fields in Patch requests.
5391	ForceSendFields []string `json:"-"`
5392}
5393
5394func (s *ManagedInstanceLastAttemptErrorsErrors) MarshalJSON() ([]byte, error) {
5395	type noMethod ManagedInstanceLastAttemptErrorsErrors
5396	raw := noMethod(*s)
5397	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5398}
5399
5400// Metadata: A metadata key/value entry.
5401type Metadata struct {
5402	// Fingerprint: Specifies a fingerprint for this request, which is
5403	// essentially a hash of the metadata's contents and used for optimistic
5404	// locking. The fingerprint is initially generated by Compute Engine and
5405	// changes after every request to modify or update metadata. You must
5406	// always provide an up-to-date fingerprint hash in order to update or
5407	// change metadata.
5408	Fingerprint string `json:"fingerprint,omitempty"`
5409
5410	// Items: Array of key/value pairs. The total size of all keys and
5411	// values must be less than 512 KB.
5412	Items []*MetadataItems `json:"items,omitempty"`
5413
5414	// Kind: [Output Only] Type of the resource. Always compute#metadata for
5415	// metadata.
5416	Kind string `json:"kind,omitempty"`
5417
5418	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
5419	// unconditionally include in API requests. By default, fields with
5420	// empty values are omitted from API requests. However, any non-pointer,
5421	// non-interface field appearing in ForceSendFields will be sent to the
5422	// server regardless of whether the field is empty or not. This may be
5423	// used to include empty fields in Patch requests.
5424	ForceSendFields []string `json:"-"`
5425}
5426
5427func (s *Metadata) MarshalJSON() ([]byte, error) {
5428	type noMethod Metadata
5429	raw := noMethod(*s)
5430	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5431}
5432
5433type MetadataItems struct {
5434	// Key: Key for the metadata entry. Keys must conform to the following
5435	// regexp: [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is
5436	// reflected as part of a URL in the metadata server. Additionally, to
5437	// avoid ambiguity, keys must not conflict with any other metadata keys
5438	// for the project.
5439	Key string `json:"key,omitempty"`
5440
5441	// Value: Value for the metadata entry. These are free-form strings, and
5442	// only have meaning as interpreted by the image running in the
5443	// instance. The only restriction placed on values is that their size
5444	// must be less than or equal to 32768 bytes.
5445	Value string `json:"value,omitempty"`
5446
5447	// ForceSendFields is a list of field names (e.g. "Key") to
5448	// unconditionally include in API requests. By default, fields with
5449	// empty values are omitted from API requests. However, any non-pointer,
5450	// non-interface field appearing in ForceSendFields will be sent to the
5451	// server regardless of whether the field is empty or not. This may be
5452	// used to include empty fields in Patch requests.
5453	ForceSendFields []string `json:"-"`
5454}
5455
5456func (s *MetadataItems) MarshalJSON() ([]byte, error) {
5457	type noMethod MetadataItems
5458	raw := noMethod(*s)
5459	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5460}
5461
5462// NamedPort: The named port. For example: .
5463type NamedPort struct {
5464	// Name: The name for this named port. The name must be 1-63 characters
5465	// long, and comply with RFC1035.
5466	Name string `json:"name,omitempty"`
5467
5468	// Port: The port number, which can be a value between 1 and 65535.
5469	Port int64 `json:"port,omitempty"`
5470
5471	// ForceSendFields is a list of field names (e.g. "Name") to
5472	// unconditionally include in API requests. By default, fields with
5473	// empty values are omitted from API requests. However, any non-pointer,
5474	// non-interface field appearing in ForceSendFields will be sent to the
5475	// server regardless of whether the field is empty or not. This may be
5476	// used to include empty fields in Patch requests.
5477	ForceSendFields []string `json:"-"`
5478}
5479
5480func (s *NamedPort) MarshalJSON() ([]byte, error) {
5481	type noMethod NamedPort
5482	raw := noMethod(*s)
5483	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5484}
5485
5486// Network: Represents a Network resource. Read Networks and Firewalls
5487// for more information.
5488type Network struct {
5489	// IPv4Range: The range of internal addresses that are legal on this
5490	// network. This range is a CIDR specification, for example:
5491	// 192.168.0.0/16. Provided by the client when the network is created.
5492	IPv4Range string `json:"IPv4Range,omitempty"`
5493
5494	// AutoCreateSubnetworks: When set to true, the network is created in
5495	// "auto subnet mode". When set to false, the network is in "custom
5496	// subnet mode".
5497	//
5498	// In "auto subnet mode", a newly created network is assigned the
5499	// default CIDR of 10.128.0.0/9 and it automatically creates one
5500	// subnetwork per region.
5501	AutoCreateSubnetworks bool `json:"autoCreateSubnetworks,omitempty"`
5502
5503	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
5504	// format.
5505	CreationTimestamp string `json:"creationTimestamp,omitempty"`
5506
5507	// Description: An optional description of this resource. Provide this
5508	// property when you create the resource.
5509	Description string `json:"description,omitempty"`
5510
5511	// GatewayIPv4: A gateway address for default routing to other networks.
5512	// This value is read only and is selected by the Google Compute Engine,
5513	// typically as the first usable address in the IPv4Range.
5514	GatewayIPv4 string `json:"gatewayIPv4,omitempty"`
5515
5516	// Id: [Output Only] The unique identifier for the resource. This
5517	// identifier is defined by the server.
5518	Id uint64 `json:"id,omitempty,string"`
5519
5520	// Kind: [Output Only] Type of the resource. Always compute#network for
5521	// networks.
5522	Kind string `json:"kind,omitempty"`
5523
5524	// Name: Name of the resource. Provided by the client when the resource
5525	// is created. The name must be 1-63 characters long, and comply with
5526	// RFC1035. Specifically, the name must be 1-63 characters long and
5527	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
5528	// the first character must be a lowercase letter, and all following
5529	// characters must be a dash, lowercase letter, or digit, except the
5530	// last character, which cannot be a dash.
5531	Name string `json:"name,omitempty"`
5532
5533	// SelfLink: [Output Only] Server-defined URL for the resource.
5534	SelfLink string `json:"selfLink,omitempty"`
5535
5536	// Subnetworks: [Output Only] Server-defined fully-qualified URLs for
5537	// all subnetworks in this network.
5538	Subnetworks []string `json:"subnetworks,omitempty"`
5539
5540	// ServerResponse contains the HTTP response code and headers from the
5541	// server.
5542	googleapi.ServerResponse `json:"-"`
5543
5544	// ForceSendFields is a list of field names (e.g. "IPv4Range") to
5545	// unconditionally include in API requests. By default, fields with
5546	// empty values are omitted from API requests. However, any non-pointer,
5547	// non-interface field appearing in ForceSendFields will be sent to the
5548	// server regardless of whether the field is empty or not. This may be
5549	// used to include empty fields in Patch requests.
5550	ForceSendFields []string `json:"-"`
5551}
5552
5553func (s *Network) MarshalJSON() ([]byte, error) {
5554	type noMethod Network
5555	raw := noMethod(*s)
5556	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5557}
5558
5559// NetworkInterface: A network interface resource attached to an
5560// instance.
5561type NetworkInterface struct {
5562	// AccessConfigs: An array of configurations for this interface.
5563	// Currently, ONE_TO_ONE_NAT is the only access config supported. If
5564	// there are no accessConfigs specified, then this instance will have no
5565	// external internet access.
5566	AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"`
5567
5568	// Name: [Output Only] The name of the network interface, generated by
5569	// the server. For network devices, these are eth0, eth1, etc.
5570	Name string `json:"name,omitempty"`
5571
5572	// Network: URL of the network resource for this instance. This is
5573	// required for creating an instance but optional when creating a
5574	// firewall rule. If not specified when creating a firewall rule, the
5575	// default network is used:
5576	//
5577	// global/networks/default
5578	//
5579	// If you specify this property, you can specify the network as a full
5580	// or partial URL. For example, the following are all valid URLs:
5581	// -
5582	// https://www.googleapis.com/compute/v1/projects/project/global/networks/network
5583	// - projects/project/global/networks/network
5584	// - global/networks/default
5585	Network string `json:"network,omitempty"`
5586
5587	// NetworkIP: [Output Only] An optional IPV4 internal network address
5588	// assigned to the instance for this network interface.
5589	NetworkIP string `json:"networkIP,omitempty"`
5590
5591	// Subnetwork: The URL of the Subnetwork resource for this instance. If
5592	// the network resource is in legacy mode, do not provide this property.
5593	// If the network is in auto subnet mode, providing the subnetwork is
5594	// optional. If the network is in custom subnet mode, then this field
5595	// should be specified. If you specify this property, you can specify
5596	// the subnetwork as a full or partial URL. For example, the following
5597	// are all valid URLs:
5598	// -
5599	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/subnetworks/subnetwork
5600	// - zones/zone/subnetworks/subnetwork
5601	Subnetwork string `json:"subnetwork,omitempty"`
5602
5603	// ForceSendFields is a list of field names (e.g. "AccessConfigs") to
5604	// unconditionally include in API requests. By default, fields with
5605	// empty values are omitted from API requests. However, any non-pointer,
5606	// non-interface field appearing in ForceSendFields will be sent to the
5607	// server regardless of whether the field is empty or not. This may be
5608	// used to include empty fields in Patch requests.
5609	ForceSendFields []string `json:"-"`
5610}
5611
5612func (s *NetworkInterface) MarshalJSON() ([]byte, error) {
5613	type noMethod NetworkInterface
5614	raw := noMethod(*s)
5615	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5616}
5617
5618// NetworkList: Contains a list of networks.
5619type NetworkList struct {
5620	// Id: [Output Only] The unique identifier for the resource. This
5621	// identifier is defined by the server.
5622	Id string `json:"id,omitempty"`
5623
5624	// Items: [Output Only] A list of Network resources.
5625	Items []*Network `json:"items,omitempty"`
5626
5627	// Kind: [Output Only] Type of resource. Always compute#networkList for
5628	// lists of networks.
5629	Kind string `json:"kind,omitempty"`
5630
5631	// NextPageToken: [Output Only] This token allows you to get the next
5632	// page of results for list requests. If the number of results is larger
5633	// than maxResults, use the nextPageToken as a value for the query
5634	// parameter pageToken in the next list request. Subsequent list
5635	// requests will have their own nextPageToken to continue paging through
5636	// the results.
5637	NextPageToken string `json:"nextPageToken,omitempty"`
5638
5639	// SelfLink: [Output Only] Server-defined URL for this resource .
5640	SelfLink string `json:"selfLink,omitempty"`
5641
5642	// ServerResponse contains the HTTP response code and headers from the
5643	// server.
5644	googleapi.ServerResponse `json:"-"`
5645
5646	// ForceSendFields is a list of field names (e.g. "Id") to
5647	// unconditionally include in API requests. By default, fields with
5648	// empty values are omitted from API requests. However, any non-pointer,
5649	// non-interface field appearing in ForceSendFields will be sent to the
5650	// server regardless of whether the field is empty or not. This may be
5651	// used to include empty fields in Patch requests.
5652	ForceSendFields []string `json:"-"`
5653}
5654
5655func (s *NetworkList) MarshalJSON() ([]byte, error) {
5656	type noMethod NetworkList
5657	raw := noMethod(*s)
5658	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5659}
5660
5661// Operation: An Operation resource, used to manage asynchronous API
5662// requests.
5663type Operation struct {
5664	// ClientOperationId: [Output Only] Reserved for future use.
5665	ClientOperationId string `json:"clientOperationId,omitempty"`
5666
5667	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
5668	// format.
5669	CreationTimestamp string `json:"creationTimestamp,omitempty"`
5670
5671	// Description: [Output Only] A textual description of the operation,
5672	// which is set when the operation is created.
5673	Description string `json:"description,omitempty"`
5674
5675	// EndTime: [Output Only] The time that this operation was completed.
5676	// This value is in RFC3339 text format.
5677	EndTime string `json:"endTime,omitempty"`
5678
5679	// Error: [Output Only] If errors are generated during processing of the
5680	// operation, this field will be populated.
5681	Error *OperationError `json:"error,omitempty"`
5682
5683	// HttpErrorMessage: [Output Only] If the operation fails, this field
5684	// contains the HTTP error message that was returned, such as NOT FOUND.
5685	HttpErrorMessage string `json:"httpErrorMessage,omitempty"`
5686
5687	// HttpErrorStatusCode: [Output Only] If the operation fails, this field
5688	// contains the HTTP error status code that was returned. For example, a
5689	// 404 means the resource was not found.
5690	HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"`
5691
5692	// Id: [Output Only] The unique identifier for the resource. This
5693	// identifier is defined by the server.
5694	Id uint64 `json:"id,omitempty,string"`
5695
5696	// InsertTime: [Output Only] The time that this operation was requested.
5697	// This value is in RFC3339 text format.
5698	InsertTime string `json:"insertTime,omitempty"`
5699
5700	// Kind: [Output Only] Type of the resource. Always compute#operation
5701	// for operation resources.
5702	Kind string `json:"kind,omitempty"`
5703
5704	// Name: [Output Only] Name of the resource.
5705	Name string `json:"name,omitempty"`
5706
5707	// OperationType: [Output Only] The type of operation, such as insert,
5708	// update, or delete, and so on.
5709	OperationType string `json:"operationType,omitempty"`
5710
5711	// Progress: [Output Only] An optional progress indicator that ranges
5712	// from 0 to 100. There is no requirement that this be linear or support
5713	// any granularity of operations. This should not be used to guess when
5714	// the operation will be complete. This number should monotonically
5715	// increase as the operation progresses.
5716	Progress int64 `json:"progress,omitempty"`
5717
5718	// Region: [Output Only] The URL of the region where the operation
5719	// resides. Only available when performing regional operations.
5720	Region string `json:"region,omitempty"`
5721
5722	// SelfLink: [Output Only] Server-defined URL for the resource.
5723	SelfLink string `json:"selfLink,omitempty"`
5724
5725	// StartTime: [Output Only] The time that this operation was started by
5726	// the server. This value is in RFC3339 text format.
5727	StartTime string `json:"startTime,omitempty"`
5728
5729	// Status: [Output Only] The status of the operation, which can be one
5730	// of the following: PENDING, RUNNING, or DONE.
5731	//
5732	// Possible values:
5733	//   "DONE"
5734	//   "PENDING"
5735	//   "RUNNING"
5736	Status string `json:"status,omitempty"`
5737
5738	// StatusMessage: [Output Only] An optional textual description of the
5739	// current status of the operation.
5740	StatusMessage string `json:"statusMessage,omitempty"`
5741
5742	// TargetId: [Output Only] The unique target ID, which identifies a
5743	// specific incarnation of the target resource.
5744	TargetId uint64 `json:"targetId,omitempty,string"`
5745
5746	// TargetLink: [Output Only] The URL of the resource that the operation
5747	// modifies.
5748	TargetLink string `json:"targetLink,omitempty"`
5749
5750	// User: [Output Only] User who requested the operation, for example:
5751	// user@example.com.
5752	User string `json:"user,omitempty"`
5753
5754	// Warnings: [Output Only] If warning messages are generated during
5755	// processing of the operation, this field will be populated.
5756	Warnings []*OperationWarnings `json:"warnings,omitempty"`
5757
5758	// Zone: [Output Only] The URL of the zone where the operation resides.
5759	// Only available when performing per-zone operations.
5760	Zone string `json:"zone,omitempty"`
5761
5762	// ServerResponse contains the HTTP response code and headers from the
5763	// server.
5764	googleapi.ServerResponse `json:"-"`
5765
5766	// ForceSendFields is a list of field names (e.g. "ClientOperationId")
5767	// to unconditionally include in API requests. By default, fields with
5768	// empty values are omitted from API requests. However, any non-pointer,
5769	// non-interface field appearing in ForceSendFields will be sent to the
5770	// server regardless of whether the field is empty or not. This may be
5771	// used to include empty fields in Patch requests.
5772	ForceSendFields []string `json:"-"`
5773}
5774
5775func (s *Operation) MarshalJSON() ([]byte, error) {
5776	type noMethod Operation
5777	raw := noMethod(*s)
5778	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5779}
5780
5781// OperationError: [Output Only] If errors are generated during
5782// processing of the operation, this field will be populated.
5783type OperationError struct {
5784	// Errors: [Output Only] The array of errors encountered while
5785	// processing this operation.
5786	Errors []*OperationErrorErrors `json:"errors,omitempty"`
5787
5788	// ForceSendFields is a list of field names (e.g. "Errors") to
5789	// unconditionally include in API requests. By default, fields with
5790	// empty values are omitted from API requests. However, any non-pointer,
5791	// non-interface field appearing in ForceSendFields will be sent to the
5792	// server regardless of whether the field is empty or not. This may be
5793	// used to include empty fields in Patch requests.
5794	ForceSendFields []string `json:"-"`
5795}
5796
5797func (s *OperationError) MarshalJSON() ([]byte, error) {
5798	type noMethod OperationError
5799	raw := noMethod(*s)
5800	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5801}
5802
5803type OperationErrorErrors struct {
5804	// Code: [Output Only] The error type identifier for this error.
5805	Code string `json:"code,omitempty"`
5806
5807	// Location: [Output Only] Indicates the field in the request that
5808	// caused the error. This property is optional.
5809	Location string `json:"location,omitempty"`
5810
5811	// Message: [Output Only] An optional, human-readable error message.
5812	Message string `json:"message,omitempty"`
5813
5814	// ForceSendFields is a list of field names (e.g. "Code") to
5815	// unconditionally include in API requests. By default, fields with
5816	// empty values are omitted from API requests. However, any non-pointer,
5817	// non-interface field appearing in ForceSendFields will be sent to the
5818	// server regardless of whether the field is empty or not. This may be
5819	// used to include empty fields in Patch requests.
5820	ForceSendFields []string `json:"-"`
5821}
5822
5823func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) {
5824	type noMethod OperationErrorErrors
5825	raw := noMethod(*s)
5826	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5827}
5828
5829type OperationWarnings struct {
5830	// Code: [Output Only] A warning code, if applicable. For example,
5831	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
5832	// the response.
5833	//
5834	// Possible values:
5835	//   "CLEANUP_FAILED"
5836	//   "DEPRECATED_RESOURCE_USED"
5837	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
5838	//   "INJECTED_KERNELS_DEPRECATED"
5839	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
5840	//   "NEXT_HOP_CANNOT_IP_FORWARD"
5841	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
5842	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
5843	//   "NEXT_HOP_NOT_RUNNING"
5844	//   "NOT_CRITICAL_ERROR"
5845	//   "NO_RESULTS_ON_PAGE"
5846	//   "REQUIRED_TOS_AGREEMENT"
5847	//   "RESOURCE_NOT_DELETED"
5848	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
5849	//   "UNREACHABLE"
5850	Code string `json:"code,omitempty"`
5851
5852	// Data: [Output Only] Metadata about this warning in key: value format.
5853	// For example:
5854	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
5855	Data []*OperationWarningsData `json:"data,omitempty"`
5856
5857	// Message: [Output Only] A human-readable description of the warning
5858	// code.
5859	Message string `json:"message,omitempty"`
5860
5861	// ForceSendFields is a list of field names (e.g. "Code") to
5862	// unconditionally include in API requests. By default, fields with
5863	// empty values are omitted from API requests. However, any non-pointer,
5864	// non-interface field appearing in ForceSendFields will be sent to the
5865	// server regardless of whether the field is empty or not. This may be
5866	// used to include empty fields in Patch requests.
5867	ForceSendFields []string `json:"-"`
5868}
5869
5870func (s *OperationWarnings) MarshalJSON() ([]byte, error) {
5871	type noMethod OperationWarnings
5872	raw := noMethod(*s)
5873	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5874}
5875
5876type OperationWarningsData struct {
5877	// Key: [Output Only] A key that provides more detail on the warning
5878	// being returned. For example, for warnings where there are no results
5879	// in a list request for a particular zone, this key might be scope and
5880	// the key value might be the zone name. Other examples might be a key
5881	// indicating a deprecated resource and a suggested replacement, or a
5882	// warning about invalid network settings (for example, if an instance
5883	// attempts to perform IP forwarding but is not enabled for IP
5884	// forwarding).
5885	Key string `json:"key,omitempty"`
5886
5887	// Value: [Output Only] A warning data value corresponding to the key.
5888	Value string `json:"value,omitempty"`
5889
5890	// ForceSendFields is a list of field names (e.g. "Key") to
5891	// unconditionally include in API requests. By default, fields with
5892	// empty values are omitted from API requests. However, any non-pointer,
5893	// non-interface field appearing in ForceSendFields will be sent to the
5894	// server regardless of whether the field is empty or not. This may be
5895	// used to include empty fields in Patch requests.
5896	ForceSendFields []string `json:"-"`
5897}
5898
5899func (s *OperationWarningsData) MarshalJSON() ([]byte, error) {
5900	type noMethod OperationWarningsData
5901	raw := noMethod(*s)
5902	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5903}
5904
5905type OperationAggregatedList struct {
5906	// Id: [Output Only] The unique identifier for the resource. This
5907	// identifier is defined by the server.
5908	Id string `json:"id,omitempty"`
5909
5910	// Items: [Output Only] A map of scoped operation lists.
5911	Items map[string]OperationsScopedList `json:"items,omitempty"`
5912
5913	// Kind: [Output Only] Type of resource. Always
5914	// compute#operationAggregatedList for aggregated lists of operations.
5915	Kind string `json:"kind,omitempty"`
5916
5917	// NextPageToken: [Output Only] This token allows you to get the next
5918	// page of results for list requests. If the number of results is larger
5919	// than maxResults, use the nextPageToken as a value for the query
5920	// parameter pageToken in the next list request. Subsequent list
5921	// requests will have their own nextPageToken to continue paging through
5922	// the results.
5923	NextPageToken string `json:"nextPageToken,omitempty"`
5924
5925	// SelfLink: [Output Only] Server-defined URL for this resource.
5926	SelfLink string `json:"selfLink,omitempty"`
5927
5928	// ServerResponse contains the HTTP response code and headers from the
5929	// server.
5930	googleapi.ServerResponse `json:"-"`
5931
5932	// ForceSendFields is a list of field names (e.g. "Id") to
5933	// unconditionally include in API requests. By default, fields with
5934	// empty values are omitted from API requests. However, any non-pointer,
5935	// non-interface field appearing in ForceSendFields will be sent to the
5936	// server regardless of whether the field is empty or not. This may be
5937	// used to include empty fields in Patch requests.
5938	ForceSendFields []string `json:"-"`
5939}
5940
5941func (s *OperationAggregatedList) MarshalJSON() ([]byte, error) {
5942	type noMethod OperationAggregatedList
5943	raw := noMethod(*s)
5944	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5945}
5946
5947// OperationList: Contains a list of Operation resources.
5948type OperationList struct {
5949	// Id: [Output Only] The unique identifier for the resource. This
5950	// identifier is defined by the server.
5951	Id string `json:"id,omitempty"`
5952
5953	// Items: [Output Only] A list of Operation resources.
5954	Items []*Operation `json:"items,omitempty"`
5955
5956	// Kind: [Output Only] Type of resource. Always compute#operations for
5957	// Operations resource.
5958	Kind string `json:"kind,omitempty"`
5959
5960	// NextPageToken: [Output Only] This token allows you to get the next
5961	// page of results for list requests. If the number of results is larger
5962	// than maxResults, use the nextPageToken as a value for the query
5963	// parameter pageToken in the next list request. Subsequent list
5964	// requests will have their own nextPageToken to continue paging through
5965	// the results.
5966	NextPageToken string `json:"nextPageToken,omitempty"`
5967
5968	// SelfLink: [Output Only] Server-defined URL for this resource.
5969	SelfLink string `json:"selfLink,omitempty"`
5970
5971	// ServerResponse contains the HTTP response code and headers from the
5972	// server.
5973	googleapi.ServerResponse `json:"-"`
5974
5975	// ForceSendFields is a list of field names (e.g. "Id") to
5976	// unconditionally include in API requests. By default, fields with
5977	// empty values are omitted from API requests. However, any non-pointer,
5978	// non-interface field appearing in ForceSendFields will be sent to the
5979	// server regardless of whether the field is empty or not. This may be
5980	// used to include empty fields in Patch requests.
5981	ForceSendFields []string `json:"-"`
5982}
5983
5984func (s *OperationList) MarshalJSON() ([]byte, error) {
5985	type noMethod OperationList
5986	raw := noMethod(*s)
5987	return gensupport.MarshalJSON(raw, s.ForceSendFields)
5988}
5989
5990type OperationsScopedList struct {
5991	// Operations: [Output Only] List of operations contained in this scope.
5992	Operations []*Operation `json:"operations,omitempty"`
5993
5994	// Warning: [Output Only] Informational warning which replaces the list
5995	// of operations when the list is empty.
5996	Warning *OperationsScopedListWarning `json:"warning,omitempty"`
5997
5998	// ForceSendFields is a list of field names (e.g. "Operations") to
5999	// unconditionally include in API requests. By default, fields with
6000	// empty values are omitted from API requests. However, any non-pointer,
6001	// non-interface field appearing in ForceSendFields will be sent to the
6002	// server regardless of whether the field is empty or not. This may be
6003	// used to include empty fields in Patch requests.
6004	ForceSendFields []string `json:"-"`
6005}
6006
6007func (s *OperationsScopedList) MarshalJSON() ([]byte, error) {
6008	type noMethod OperationsScopedList
6009	raw := noMethod(*s)
6010	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6011}
6012
6013// OperationsScopedListWarning: [Output Only] Informational warning
6014// which replaces the list of operations when the list is empty.
6015type OperationsScopedListWarning struct {
6016	// Code: [Output Only] A warning code, if applicable. For example,
6017	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
6018	// the response.
6019	//
6020	// Possible values:
6021	//   "CLEANUP_FAILED"
6022	//   "DEPRECATED_RESOURCE_USED"
6023	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
6024	//   "INJECTED_KERNELS_DEPRECATED"
6025	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
6026	//   "NEXT_HOP_CANNOT_IP_FORWARD"
6027	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
6028	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
6029	//   "NEXT_HOP_NOT_RUNNING"
6030	//   "NOT_CRITICAL_ERROR"
6031	//   "NO_RESULTS_ON_PAGE"
6032	//   "REQUIRED_TOS_AGREEMENT"
6033	//   "RESOURCE_NOT_DELETED"
6034	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
6035	//   "UNREACHABLE"
6036	Code string `json:"code,omitempty"`
6037
6038	// Data: [Output Only] Metadata about this warning in key: value format.
6039	// For example:
6040	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6041	Data []*OperationsScopedListWarningData `json:"data,omitempty"`
6042
6043	// Message: [Output Only] A human-readable description of the warning
6044	// code.
6045	Message string `json:"message,omitempty"`
6046
6047	// ForceSendFields is a list of field names (e.g. "Code") to
6048	// unconditionally include in API requests. By default, fields with
6049	// empty values are omitted from API requests. However, any non-pointer,
6050	// non-interface field appearing in ForceSendFields will be sent to the
6051	// server regardless of whether the field is empty or not. This may be
6052	// used to include empty fields in Patch requests.
6053	ForceSendFields []string `json:"-"`
6054}
6055
6056func (s *OperationsScopedListWarning) MarshalJSON() ([]byte, error) {
6057	type noMethod OperationsScopedListWarning
6058	raw := noMethod(*s)
6059	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6060}
6061
6062type OperationsScopedListWarningData struct {
6063	// Key: [Output Only] A key that provides more detail on the warning
6064	// being returned. For example, for warnings where there are no results
6065	// in a list request for a particular zone, this key might be scope and
6066	// the key value might be the zone name. Other examples might be a key
6067	// indicating a deprecated resource and a suggested replacement, or a
6068	// warning about invalid network settings (for example, if an instance
6069	// attempts to perform IP forwarding but is not enabled for IP
6070	// forwarding).
6071	Key string `json:"key,omitempty"`
6072
6073	// Value: [Output Only] A warning data value corresponding to the key.
6074	Value string `json:"value,omitempty"`
6075
6076	// ForceSendFields is a list of field names (e.g. "Key") to
6077	// unconditionally include in API requests. By default, fields with
6078	// empty values are omitted from API requests. However, any non-pointer,
6079	// non-interface field appearing in ForceSendFields will be sent to the
6080	// server regardless of whether the field is empty or not. This may be
6081	// used to include empty fields in Patch requests.
6082	ForceSendFields []string `json:"-"`
6083}
6084
6085func (s *OperationsScopedListWarningData) MarshalJSON() ([]byte, error) {
6086	type noMethod OperationsScopedListWarningData
6087	raw := noMethod(*s)
6088	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6089}
6090
6091// PathMatcher: A matcher for the path portion of the URL. The
6092// BackendService from the longest-matched rule will serve the URL. If
6093// no rule was matched, the default service will be used.
6094type PathMatcher struct {
6095	// DefaultService: The full or partial URL to the BackendService
6096	// resource. This will be used if none of the pathRules defined by this
6097	// PathMatcher is matched by the URL's path portion. For example, the
6098	// following are all valid URLs to a BackendService resource:
6099	// -
6100	// https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService
6101	// - compute/v1/projects/project/global/backendServices/backendService
6102	//
6103	// - global/backendServices/backendService
6104	DefaultService string `json:"defaultService,omitempty"`
6105
6106	// Description: An optional description of this resource. Provide this
6107	// property when you create the resource.
6108	Description string `json:"description,omitempty"`
6109
6110	// Name: The name to which this PathMatcher is referred by the HostRule.
6111	Name string `json:"name,omitempty"`
6112
6113	// PathRules: The list of path rules.
6114	PathRules []*PathRule `json:"pathRules,omitempty"`
6115
6116	// ForceSendFields is a list of field names (e.g. "DefaultService") to
6117	// unconditionally include in API requests. By default, fields with
6118	// empty values are omitted from API requests. However, any non-pointer,
6119	// non-interface field appearing in ForceSendFields will be sent to the
6120	// server regardless of whether the field is empty or not. This may be
6121	// used to include empty fields in Patch requests.
6122	ForceSendFields []string `json:"-"`
6123}
6124
6125func (s *PathMatcher) MarshalJSON() ([]byte, error) {
6126	type noMethod PathMatcher
6127	raw := noMethod(*s)
6128	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6129}
6130
6131// PathRule: A path-matching rule for a URL. If matched, will use the
6132// specified BackendService to handle the traffic arriving at this URL.
6133type PathRule struct {
6134	// Paths: The list of path patterns to match. Each must start with / and
6135	// the only place a * is allowed is at the end following a /. The string
6136	// fed to the path matcher does not include any text after the first ?
6137	// or #, and those chars are not allowed here.
6138	Paths []string `json:"paths,omitempty"`
6139
6140	// Service: The URL of the BackendService resource if this rule is
6141	// matched.
6142	Service string `json:"service,omitempty"`
6143
6144	// ForceSendFields is a list of field names (e.g. "Paths") to
6145	// unconditionally include in API requests. By default, fields with
6146	// empty values are omitted from API requests. However, any non-pointer,
6147	// non-interface field appearing in ForceSendFields will be sent to the
6148	// server regardless of whether the field is empty or not. This may be
6149	// used to include empty fields in Patch requests.
6150	ForceSendFields []string `json:"-"`
6151}
6152
6153func (s *PathRule) MarshalJSON() ([]byte, error) {
6154	type noMethod PathRule
6155	raw := noMethod(*s)
6156	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6157}
6158
6159// Project: A Project resource. Projects can only be created in the
6160// Google Cloud Platform Console. Unless marked otherwise, values can
6161// only be modified in the console.
6162type Project struct {
6163	// CommonInstanceMetadata: Metadata key/value pairs available to all
6164	// instances contained in this project. See Custom metadata for more
6165	// information.
6166	CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"`
6167
6168	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6169	// format.
6170	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6171
6172	// DefaultServiceAccount: [Output Only] Default service account used by
6173	// VMs running in this project.
6174	DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"`
6175
6176	// Description: An optional textual description of the resource.
6177	Description string `json:"description,omitempty"`
6178
6179	// EnabledFeatures: Restricted features enabled for use on this project.
6180	EnabledFeatures []string `json:"enabledFeatures,omitempty"`
6181
6182	// Id: [Output Only] The unique identifier for the resource. This
6183	// identifier is defined by the server. This is not the project ID, and
6184	// is just a unique ID used by Compute Engine to identify resources.
6185	Id uint64 `json:"id,omitempty,string"`
6186
6187	// Kind: [Output Only] Type of the resource. Always compute#project for
6188	// projects.
6189	Kind string `json:"kind,omitempty"`
6190
6191	// Name: The project ID. For example: my-example-project. Use the
6192	// project ID to make requests to Compute Engine.
6193	Name string `json:"name,omitempty"`
6194
6195	// Quotas: [Output Only] Quotas assigned to this project.
6196	Quotas []*Quota `json:"quotas,omitempty"`
6197
6198	// SelfLink: [Output Only] Server-defined URL for the resource.
6199	SelfLink string `json:"selfLink,omitempty"`
6200
6201	// UsageExportLocation: The naming prefix for daily usage reports and
6202	// the Google Cloud Storage bucket where they are stored.
6203	UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"`
6204
6205	// ServerResponse contains the HTTP response code and headers from the
6206	// server.
6207	googleapi.ServerResponse `json:"-"`
6208
6209	// ForceSendFields is a list of field names (e.g.
6210	// "CommonInstanceMetadata") to unconditionally include in API requests.
6211	// By default, fields with empty values are omitted from API requests.
6212	// However, any non-pointer, non-interface field appearing in
6213	// ForceSendFields will be sent to the server regardless of whether the
6214	// field is empty or not. This may be used to include empty fields in
6215	// Patch requests.
6216	ForceSendFields []string `json:"-"`
6217}
6218
6219func (s *Project) MarshalJSON() ([]byte, error) {
6220	type noMethod Project
6221	raw := noMethod(*s)
6222	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6223}
6224
6225// Quota: A quotas entry.
6226type Quota struct {
6227	// Limit: [Output Only] Quota limit for this metric.
6228	Limit float64 `json:"limit,omitempty"`
6229
6230	// Metric: [Output Only] Name of the quota metric.
6231	//
6232	// Possible values:
6233	//   "AUTOSCALERS"
6234	//   "BACKEND_SERVICES"
6235	//   "CPUS"
6236	//   "DISKS_TOTAL_GB"
6237	//   "FIREWALLS"
6238	//   "FORWARDING_RULES"
6239	//   "HEALTH_CHECKS"
6240	//   "IMAGES"
6241	//   "INSTANCES"
6242	//   "INSTANCE_GROUPS"
6243	//   "INSTANCE_GROUP_MANAGERS"
6244	//   "INSTANCE_TEMPLATES"
6245	//   "IN_USE_ADDRESSES"
6246	//   "LOCAL_SSD_TOTAL_GB"
6247	//   "NETWORKS"
6248	//   "ROUTERS"
6249	//   "ROUTES"
6250	//   "SNAPSHOTS"
6251	//   "SSD_TOTAL_GB"
6252	//   "SSL_CERTIFICATES"
6253	//   "STATIC_ADDRESSES"
6254	//   "SUBNETWORKS"
6255	//   "TARGET_HTTPS_PROXIES"
6256	//   "TARGET_HTTP_PROXIES"
6257	//   "TARGET_INSTANCES"
6258	//   "TARGET_POOLS"
6259	//   "TARGET_VPN_GATEWAYS"
6260	//   "URL_MAPS"
6261	//   "VPN_TUNNELS"
6262	Metric string `json:"metric,omitempty"`
6263
6264	// Usage: [Output Only] Current usage of this metric.
6265	Usage float64 `json:"usage,omitempty"`
6266
6267	// ForceSendFields is a list of field names (e.g. "Limit") to
6268	// unconditionally include in API requests. By default, fields with
6269	// empty values are omitted from API requests. However, any non-pointer,
6270	// non-interface field appearing in ForceSendFields will be sent to the
6271	// server regardless of whether the field is empty or not. This may be
6272	// used to include empty fields in Patch requests.
6273	ForceSendFields []string `json:"-"`
6274}
6275
6276func (s *Quota) MarshalJSON() ([]byte, error) {
6277	type noMethod Quota
6278	raw := noMethod(*s)
6279	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6280}
6281
6282// Region: Region resource.
6283type Region struct {
6284	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6285	// format.
6286	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6287
6288	// Deprecated: [Output Only] The deprecation status associated with this
6289	// region.
6290	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
6291
6292	// Description: [Output Only] Textual description of the resource.
6293	Description string `json:"description,omitempty"`
6294
6295	// Id: [Output Only] The unique identifier for the resource. This
6296	// identifier is defined by the server.
6297	Id uint64 `json:"id,omitempty,string"`
6298
6299	// Kind: [Output Only] Type of the resource. Always compute#region for
6300	// regions.
6301	Kind string `json:"kind,omitempty"`
6302
6303	// Name: [Output Only] Name of the resource.
6304	Name string `json:"name,omitempty"`
6305
6306	// Quotas: [Output Only] Quotas assigned to this region.
6307	Quotas []*Quota `json:"quotas,omitempty"`
6308
6309	// SelfLink: [Output Only] Server-defined URL for the resource.
6310	SelfLink string `json:"selfLink,omitempty"`
6311
6312	// Status: [Output Only] Status of the region, either UP or DOWN.
6313	//
6314	// Possible values:
6315	//   "DOWN"
6316	//   "UP"
6317	Status string `json:"status,omitempty"`
6318
6319	// Zones: [Output Only] A list of zones available in this region, in the
6320	// form of resource URLs.
6321	Zones []string `json:"zones,omitempty"`
6322
6323	// ServerResponse contains the HTTP response code and headers from the
6324	// server.
6325	googleapi.ServerResponse `json:"-"`
6326
6327	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
6328	// to unconditionally include in API requests. By default, fields with
6329	// empty values are omitted from API requests. However, any non-pointer,
6330	// non-interface field appearing in ForceSendFields will be sent to the
6331	// server regardless of whether the field is empty or not. This may be
6332	// used to include empty fields in Patch requests.
6333	ForceSendFields []string `json:"-"`
6334}
6335
6336func (s *Region) MarshalJSON() ([]byte, error) {
6337	type noMethod Region
6338	raw := noMethod(*s)
6339	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6340}
6341
6342// RegionList: Contains a list of region resources.
6343type RegionList struct {
6344	// Id: [Output Only] The unique identifier for the resource. This
6345	// identifier is defined by the server.
6346	Id string `json:"id,omitempty"`
6347
6348	// Items: [Output Only] A list of Region resources.
6349	Items []*Region `json:"items,omitempty"`
6350
6351	// Kind: [Output Only] Type of resource. Always compute#regionList for
6352	// lists of regions.
6353	Kind string `json:"kind,omitempty"`
6354
6355	// NextPageToken: [Output Only] This token allows you to get the next
6356	// page of results for list requests. If the number of results is larger
6357	// than maxResults, use the nextPageToken as a value for the query
6358	// parameter pageToken in the next list request. Subsequent list
6359	// requests will have their own nextPageToken to continue paging through
6360	// the results.
6361	NextPageToken string `json:"nextPageToken,omitempty"`
6362
6363	// SelfLink: [Output Only] Server-defined URL for this resource.
6364	SelfLink string `json:"selfLink,omitempty"`
6365
6366	// ServerResponse contains the HTTP response code and headers from the
6367	// server.
6368	googleapi.ServerResponse `json:"-"`
6369
6370	// ForceSendFields is a list of field names (e.g. "Id") to
6371	// unconditionally include in API requests. By default, fields with
6372	// empty values are omitted from API requests. However, any non-pointer,
6373	// non-interface field appearing in ForceSendFields will be sent to the
6374	// server regardless of whether the field is empty or not. This may be
6375	// used to include empty fields in Patch requests.
6376	ForceSendFields []string `json:"-"`
6377}
6378
6379func (s *RegionList) MarshalJSON() ([]byte, error) {
6380	type noMethod RegionList
6381	raw := noMethod(*s)
6382	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6383}
6384
6385type ResourceGroupReference struct {
6386	// Group: A URI referencing one of the resource views listed in the
6387	// backend service.
6388	Group string `json:"group,omitempty"`
6389
6390	// ForceSendFields is a list of field names (e.g. "Group") to
6391	// unconditionally include in API requests. By default, fields with
6392	// empty values are omitted from API requests. However, any non-pointer,
6393	// non-interface field appearing in ForceSendFields will be sent to the
6394	// server regardless of whether the field is empty or not. This may be
6395	// used to include empty fields in Patch requests.
6396	ForceSendFields []string `json:"-"`
6397}
6398
6399func (s *ResourceGroupReference) MarshalJSON() ([]byte, error) {
6400	type noMethod ResourceGroupReference
6401	raw := noMethod(*s)
6402	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6403}
6404
6405// Route: Represents a Route resource. A route specifies how certain
6406// packets should be handled by the network. Routes are associated with
6407// instances by tags and the set of routes for a particular instance is
6408// called its routing table.
6409//
6410// For each packet leaving a instance, the system searches that
6411// instance's routing table for a single best matching route. Routes
6412// match packets by destination IP address, preferring smaller or more
6413// specific ranges over larger ones. If there is a tie, the system
6414// selects the route with the smallest priority value. If there is still
6415// a tie, it uses the layer three and four packet headers to select just
6416// one of the remaining matching routes. The packet is then forwarded as
6417// specified by the nextHop field of the winning route - either to
6418// another instance destination, a instance gateway or a Google Compute
6419// Engine-operated gateway.
6420//
6421// Packets that do not match any route in the sending instance's routing
6422// table are dropped.
6423type Route struct {
6424	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6425	// format.
6426	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6427
6428	// Description: An optional description of this resource. Provide this
6429	// property when you create the resource.
6430	Description string `json:"description,omitempty"`
6431
6432	// DestRange: The destination range of outgoing packets that this route
6433	// applies to.
6434	DestRange string `json:"destRange,omitempty"`
6435
6436	// Id: [Output Only] The unique identifier for the resource. This
6437	// identifier is defined by the server.
6438	Id uint64 `json:"id,omitempty,string"`
6439
6440	// Kind: [Output Only] Type of this resource. Always compute#routes for
6441	// Route resources.
6442	Kind string `json:"kind,omitempty"`
6443
6444	// Name: Name of the resource. Provided by the client when the resource
6445	// is created. The name must be 1-63 characters long, and comply with
6446	// RFC1035. Specifically, the name must be 1-63 characters long and
6447	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
6448	// the first character must be a lowercase letter, and all following
6449	// characters must be a dash, lowercase letter, or digit, except the
6450	// last character, which cannot be a dash.
6451	Name string `json:"name,omitempty"`
6452
6453	// Network: Fully-qualified URL of the network that this route applies
6454	// to.
6455	Network string `json:"network,omitempty"`
6456
6457	// NextHopGateway: The URL to a gateway that should handle matching
6458	// packets. You can only specify the internet gateway using a full or
6459	// partial valid URL:
6460	// projects/<project-id>/global/gateways/default-internet-gateway
6461	NextHopGateway string `json:"nextHopGateway,omitempty"`
6462
6463	// NextHopInstance: The URL to an instance that should handle matching
6464	// packets. You can specify this as a full or partial URL. For
6465	// example:
6466	// https://www.googleapis.com/compute/v1/projects/project/zones/
6467	// zone/instances/
6468	NextHopInstance string `json:"nextHopInstance,omitempty"`
6469
6470	// NextHopIp: The network IP address of an instance that should handle
6471	// matching packets.
6472	NextHopIp string `json:"nextHopIp,omitempty"`
6473
6474	// NextHopNetwork: The URL of the local network if it should handle
6475	// matching packets.
6476	NextHopNetwork string `json:"nextHopNetwork,omitempty"`
6477
6478	// NextHopVpnTunnel: The URL to a VpnTunnel that should handle matching
6479	// packets.
6480	NextHopVpnTunnel string `json:"nextHopVpnTunnel,omitempty"`
6481
6482	// Priority: The priority of this route. Priority is used to break ties
6483	// in cases where there is more than one matching route of equal prefix
6484	// length. In the case of two routes with equal prefix length, the one
6485	// with the lowest-numbered priority value wins. Default value is 1000.
6486	// Valid range is 0 through 65535.
6487	Priority int64 `json:"priority,omitempty"`
6488
6489	// SelfLink: [Output Only] Server-defined fully-qualified URL for this
6490	// resource.
6491	SelfLink string `json:"selfLink,omitempty"`
6492
6493	// Tags: A list of instance tags to which this route applies.
6494	Tags []string `json:"tags,omitempty"`
6495
6496	// Warnings: [Output Only] If potential misconfigurations are detected
6497	// for this route, this field will be populated with warning messages.
6498	Warnings []*RouteWarnings `json:"warnings,omitempty"`
6499
6500	// ServerResponse contains the HTTP response code and headers from the
6501	// server.
6502	googleapi.ServerResponse `json:"-"`
6503
6504	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
6505	// to unconditionally include in API requests. By default, fields with
6506	// empty values are omitted from API requests. However, any non-pointer,
6507	// non-interface field appearing in ForceSendFields will be sent to the
6508	// server regardless of whether the field is empty or not. This may be
6509	// used to include empty fields in Patch requests.
6510	ForceSendFields []string `json:"-"`
6511}
6512
6513func (s *Route) MarshalJSON() ([]byte, error) {
6514	type noMethod Route
6515	raw := noMethod(*s)
6516	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6517}
6518
6519type RouteWarnings struct {
6520	// Code: [Output Only] A warning code, if applicable. For example,
6521	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
6522	// the response.
6523	//
6524	// Possible values:
6525	//   "CLEANUP_FAILED"
6526	//   "DEPRECATED_RESOURCE_USED"
6527	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
6528	//   "INJECTED_KERNELS_DEPRECATED"
6529	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
6530	//   "NEXT_HOP_CANNOT_IP_FORWARD"
6531	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
6532	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
6533	//   "NEXT_HOP_NOT_RUNNING"
6534	//   "NOT_CRITICAL_ERROR"
6535	//   "NO_RESULTS_ON_PAGE"
6536	//   "REQUIRED_TOS_AGREEMENT"
6537	//   "RESOURCE_NOT_DELETED"
6538	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
6539	//   "UNREACHABLE"
6540	Code string `json:"code,omitempty"`
6541
6542	// Data: [Output Only] Metadata about this warning in key: value format.
6543	// For example:
6544	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
6545	Data []*RouteWarningsData `json:"data,omitempty"`
6546
6547	// Message: [Output Only] A human-readable description of the warning
6548	// code.
6549	Message string `json:"message,omitempty"`
6550
6551	// ForceSendFields is a list of field names (e.g. "Code") to
6552	// unconditionally include in API requests. By default, fields with
6553	// empty values are omitted from API requests. However, any non-pointer,
6554	// non-interface field appearing in ForceSendFields will be sent to the
6555	// server regardless of whether the field is empty or not. This may be
6556	// used to include empty fields in Patch requests.
6557	ForceSendFields []string `json:"-"`
6558}
6559
6560func (s *RouteWarnings) MarshalJSON() ([]byte, error) {
6561	type noMethod RouteWarnings
6562	raw := noMethod(*s)
6563	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6564}
6565
6566type RouteWarningsData struct {
6567	// Key: [Output Only] A key that provides more detail on the warning
6568	// being returned. For example, for warnings where there are no results
6569	// in a list request for a particular zone, this key might be scope and
6570	// the key value might be the zone name. Other examples might be a key
6571	// indicating a deprecated resource and a suggested replacement, or a
6572	// warning about invalid network settings (for example, if an instance
6573	// attempts to perform IP forwarding but is not enabled for IP
6574	// forwarding).
6575	Key string `json:"key,omitempty"`
6576
6577	// Value: [Output Only] A warning data value corresponding to the key.
6578	Value string `json:"value,omitempty"`
6579
6580	// ForceSendFields is a list of field names (e.g. "Key") to
6581	// unconditionally include in API requests. By default, fields with
6582	// empty values are omitted from API requests. However, any non-pointer,
6583	// non-interface field appearing in ForceSendFields will be sent to the
6584	// server regardless of whether the field is empty or not. This may be
6585	// used to include empty fields in Patch requests.
6586	ForceSendFields []string `json:"-"`
6587}
6588
6589func (s *RouteWarningsData) MarshalJSON() ([]byte, error) {
6590	type noMethod RouteWarningsData
6591	raw := noMethod(*s)
6592	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6593}
6594
6595// RouteList: Contains a list of Route resources.
6596type RouteList struct {
6597	// Id: [Output Only] Unique identifier for the resource. Defined by the
6598	// server.
6599	Id string `json:"id,omitempty"`
6600
6601	// Items: [Output Only] A list of Route resources.
6602	Items []*Route `json:"items,omitempty"`
6603
6604	// Kind: Type of resource.
6605	Kind string `json:"kind,omitempty"`
6606
6607	// NextPageToken: [Output Only] This token allows you to get the next
6608	// page of results for list requests. If the number of results is larger
6609	// than maxResults, use the nextPageToken as a value for the query
6610	// parameter pageToken in the next list request. Subsequent list
6611	// requests will have their own nextPageToken to continue paging through
6612	// the results.
6613	NextPageToken string `json:"nextPageToken,omitempty"`
6614
6615	// SelfLink: [Output Only] Server-defined URL for this resource.
6616	SelfLink string `json:"selfLink,omitempty"`
6617
6618	// ServerResponse contains the HTTP response code and headers from the
6619	// server.
6620	googleapi.ServerResponse `json:"-"`
6621
6622	// ForceSendFields is a list of field names (e.g. "Id") to
6623	// unconditionally include in API requests. By default, fields with
6624	// empty values are omitted from API requests. However, any non-pointer,
6625	// non-interface field appearing in ForceSendFields will be sent to the
6626	// server regardless of whether the field is empty or not. This may be
6627	// used to include empty fields in Patch requests.
6628	ForceSendFields []string `json:"-"`
6629}
6630
6631func (s *RouteList) MarshalJSON() ([]byte, error) {
6632	type noMethod RouteList
6633	raw := noMethod(*s)
6634	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6635}
6636
6637// Router: Router resource.
6638type Router struct {
6639	Bgp *RouterBgp `json:"bgp,omitempty"`
6640
6641	BgpPeers []*RouterBgpPeer `json:"bgpPeers,omitempty"`
6642
6643	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
6644	// format.
6645	CreationTimestamp string `json:"creationTimestamp,omitempty"`
6646
6647	// Description: An optional description of this resource. Provide this
6648	// property when you create the resource.
6649	Description string `json:"description,omitempty"`
6650
6651	// Id: [Output Only] The unique identifier for the resource. This
6652	// identifier is defined by the server.
6653	Id uint64 `json:"id,omitempty,string"`
6654
6655	Interfaces []*RouterInterface `json:"interfaces,omitempty"`
6656
6657	// Kind: [Output Only] Type of resource. Always compute#router for
6658	// routers.
6659	Kind string `json:"kind,omitempty"`
6660
6661	// Name: Name of the resource. Provided by the client when the resource
6662	// is created. The name must be 1-63 characters long, and comply with
6663	// RFC1035. Specifically, the name must be 1-63 characters long and
6664	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
6665	// the first character must be a lowercase letter, and all following
6666	// characters must be a dash, lowercase letter, or digit, except the
6667	// last character, which cannot be a dash.
6668	Name string `json:"name,omitempty"`
6669
6670	// Network: URI of the network to which this router belongs.
6671	Network string `json:"network,omitempty"`
6672
6673	// Region: [Output Only] URI of the region where the router resides.
6674	Region string `json:"region,omitempty"`
6675
6676	// SelfLink: [Output Only] Server-defined URL for the resource.
6677	SelfLink string `json:"selfLink,omitempty"`
6678
6679	// ServerResponse contains the HTTP response code and headers from the
6680	// server.
6681	googleapi.ServerResponse `json:"-"`
6682
6683	// ForceSendFields is a list of field names (e.g. "Bgp") to
6684	// unconditionally include in API requests. By default, fields with
6685	// empty values are omitted from API requests. However, any non-pointer,
6686	// non-interface field appearing in ForceSendFields will be sent to the
6687	// server regardless of whether the field is empty or not. This may be
6688	// used to include empty fields in Patch requests.
6689	ForceSendFields []string `json:"-"`
6690}
6691
6692func (s *Router) MarshalJSON() ([]byte, error) {
6693	type noMethod Router
6694	raw := noMethod(*s)
6695	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6696}
6697
6698// RouterAggregatedList: Contains a list of routers.
6699type RouterAggregatedList struct {
6700	// Id: [Output Only] The unique identifier for the resource. This
6701	// identifier is defined by the server.
6702	Id string `json:"id,omitempty"`
6703
6704	// Items: A map of scoped router lists.
6705	Items map[string]RoutersScopedList `json:"items,omitempty"`
6706
6707	// Kind: Type of resource.
6708	Kind string `json:"kind,omitempty"`
6709
6710	// NextPageToken: [Output Only] This token allows you to get the next
6711	// page of results for list requests. If the number of results is larger
6712	// than maxResults, use the nextPageToken as a value for the query
6713	// parameter pageToken in the next list request. Subsequent list
6714	// requests will have their own nextPageToken to continue paging through
6715	// the results.
6716	NextPageToken string `json:"nextPageToken,omitempty"`
6717
6718	// SelfLink: [Output Only] Server-defined URL for this resource.
6719	SelfLink string `json:"selfLink,omitempty"`
6720
6721	// ServerResponse contains the HTTP response code and headers from the
6722	// server.
6723	googleapi.ServerResponse `json:"-"`
6724
6725	// ForceSendFields is a list of field names (e.g. "Id") to
6726	// unconditionally include in API requests. By default, fields with
6727	// empty values are omitted from API requests. However, any non-pointer,
6728	// non-interface field appearing in ForceSendFields will be sent to the
6729	// server regardless of whether the field is empty or not. This may be
6730	// used to include empty fields in Patch requests.
6731	ForceSendFields []string `json:"-"`
6732}
6733
6734func (s *RouterAggregatedList) MarshalJSON() ([]byte, error) {
6735	type noMethod RouterAggregatedList
6736	raw := noMethod(*s)
6737	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6738}
6739
6740type RouterBgp struct {
6741	// Asn: Local BGP Autonomous System Number (ASN). Can be a constant
6742	// public ASN value for Google, or a customer-specified private ASN. In
6743	// either case, the value will be fixed for this router resource. All
6744	// VPN tunnels that link to this router will have the same local ASN.
6745	Asn int64 `json:"asn,omitempty"`
6746
6747	// ForceSendFields is a list of field names (e.g. "Asn") to
6748	// unconditionally include in API requests. By default, fields with
6749	// empty values are omitted from API requests. However, any non-pointer,
6750	// non-interface field appearing in ForceSendFields will be sent to the
6751	// server regardless of whether the field is empty or not. This may be
6752	// used to include empty fields in Patch requests.
6753	ForceSendFields []string `json:"-"`
6754}
6755
6756func (s *RouterBgp) MarshalJSON() ([]byte, error) {
6757	type noMethod RouterBgp
6758	raw := noMethod(*s)
6759	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6760}
6761
6762// RouterBgpPeer: BGP information that needs to be configured into the
6763// routing stack to establish the BGP peering. It must specify peer ASN
6764// and either interface name, IP, or peer IP. Reference:
6765// https://tools.ietf.org/html/rfc4273
6766type RouterBgpPeer struct {
6767	// AdvertisedRoutePriority: The priority of routes advertised to this
6768	// BGP peer. In the case where there is more than one matching route of
6769	// maximum length, the routes with lowest priority value win.
6770	AdvertisedRoutePriority int64 `json:"advertisedRoutePriority,omitempty"`
6771
6772	// InterfaceName: Name of the interface the BGP peer is associated with.
6773	InterfaceName string `json:"interfaceName,omitempty"`
6774
6775	// IpAddress: IP address of the interface inside Google Cloud Platform.
6776	IpAddress string `json:"ipAddress,omitempty"`
6777
6778	// Name: Name of this BGP peer. The name must be 1-63 characters long
6779	// and comply with RFC1035.
6780	Name string `json:"name,omitempty"`
6781
6782	// PeerAsn: Peer BGP Autonomous System Number (ASN). For VPN use case,
6783	// this value can be different for every tunnel.
6784	PeerAsn int64 `json:"peerAsn,omitempty"`
6785
6786	// PeerIpAddress: IP address of the BGP interface outside Google cloud.
6787	PeerIpAddress string `json:"peerIpAddress,omitempty"`
6788
6789	// ForceSendFields is a list of field names (e.g.
6790	// "AdvertisedRoutePriority") to unconditionally include in API
6791	// requests. By default, fields with empty values are omitted from API
6792	// requests. However, any non-pointer, non-interface field appearing in
6793	// ForceSendFields will be sent to the server regardless of whether the
6794	// field is empty or not. This may be used to include empty fields in
6795	// Patch requests.
6796	ForceSendFields []string `json:"-"`
6797}
6798
6799func (s *RouterBgpPeer) MarshalJSON() ([]byte, error) {
6800	type noMethod RouterBgpPeer
6801	raw := noMethod(*s)
6802	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6803}
6804
6805// RouterInterface: Router interfaces. Each interface requires either
6806// one linked resource (e.g. linked_vpn_tunnel) or IP address + range
6807// (specified in ip_range).
6808type RouterInterface struct {
6809	// IpRange: IP address and range of the interface. The value should be a
6810	// CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do NOT
6811	// truncate address, as it represents IP address of interface.
6812	IpRange string `json:"ipRange,omitempty"`
6813
6814	// LinkedVpnTunnel: URI of linked VPN tunnel. It must be in the same
6815	// region as the router. Each interface can have at most one linked
6816	// resource.
6817	LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"`
6818
6819	// Name: Name of this interface entry. The name must be 1-63 characters
6820	// long and comply with RFC1035.
6821	Name string `json:"name,omitempty"`
6822
6823	// ForceSendFields is a list of field names (e.g. "IpRange") to
6824	// unconditionally include in API requests. By default, fields with
6825	// empty values are omitted from API requests. However, any non-pointer,
6826	// non-interface field appearing in ForceSendFields will be sent to the
6827	// server regardless of whether the field is empty or not. This may be
6828	// used to include empty fields in Patch requests.
6829	ForceSendFields []string `json:"-"`
6830}
6831
6832func (s *RouterInterface) MarshalJSON() ([]byte, error) {
6833	type noMethod RouterInterface
6834	raw := noMethod(*s)
6835	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6836}
6837
6838// RouterList: Contains a list of Router resources.
6839type RouterList struct {
6840	// Id: [Output Only] The unique identifier for the resource. This
6841	// identifier is defined by the server.
6842	Id string `json:"id,omitempty"`
6843
6844	// Items: A list of Router resources.
6845	Items []*Router `json:"items,omitempty"`
6846
6847	// Kind: [Output Only] Type of resource. Always compute#router for
6848	// routers.
6849	Kind string `json:"kind,omitempty"`
6850
6851	// NextPageToken: [Output Only] This token allows you to get the next
6852	// page of results for list requests. If the number of results is larger
6853	// than maxResults, use the nextPageToken as a value for the query
6854	// parameter pageToken in the next list request. Subsequent list
6855	// requests will have their own nextPageToken to continue paging through
6856	// the results.
6857	NextPageToken string `json:"nextPageToken,omitempty"`
6858
6859	// SelfLink: [Output Only] Server-defined URL for the resource.
6860	SelfLink string `json:"selfLink,omitempty"`
6861
6862	// ServerResponse contains the HTTP response code and headers from the
6863	// server.
6864	googleapi.ServerResponse `json:"-"`
6865
6866	// ForceSendFields is a list of field names (e.g. "Id") to
6867	// unconditionally include in API requests. By default, fields with
6868	// empty values are omitted from API requests. However, any non-pointer,
6869	// non-interface field appearing in ForceSendFields will be sent to the
6870	// server regardless of whether the field is empty or not. This may be
6871	// used to include empty fields in Patch requests.
6872	ForceSendFields []string `json:"-"`
6873}
6874
6875func (s *RouterList) MarshalJSON() ([]byte, error) {
6876	type noMethod RouterList
6877	raw := noMethod(*s)
6878	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6879}
6880
6881type RouterStatus struct {
6882	// BestRoutes: Best routes for this router.
6883	BestRoutes []*Route `json:"bestRoutes,omitempty"`
6884
6885	BgpPeerStatus []*RouterStatusBgpPeerStatus `json:"bgpPeerStatus,omitempty"`
6886
6887	// Network: URI of the network to which this router belongs.
6888	Network string `json:"network,omitempty"`
6889
6890	// ForceSendFields is a list of field names (e.g. "BestRoutes") to
6891	// unconditionally include in API requests. By default, fields with
6892	// empty values are omitted from API requests. However, any non-pointer,
6893	// non-interface field appearing in ForceSendFields will be sent to the
6894	// server regardless of whether the field is empty or not. This may be
6895	// used to include empty fields in Patch requests.
6896	ForceSendFields []string `json:"-"`
6897}
6898
6899func (s *RouterStatus) MarshalJSON() ([]byte, error) {
6900	type noMethod RouterStatus
6901	raw := noMethod(*s)
6902	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6903}
6904
6905type RouterStatusBgpPeerStatus struct {
6906	// AdvertisedRoutes: Routes that were advertised to the remote BGP peer
6907	AdvertisedRoutes []*Route `json:"advertisedRoutes,omitempty"`
6908
6909	// IpAddress: IP address of the local BGP interface.
6910	IpAddress string `json:"ipAddress,omitempty"`
6911
6912	// LinkedVpnTunnel: URL of the VPN tunnel that this BGP peer controls.
6913	LinkedVpnTunnel string `json:"linkedVpnTunnel,omitempty"`
6914
6915	// Name: Name of this BGP peer. Unique within the routes resource.
6916	Name string `json:"name,omitempty"`
6917
6918	// NumLearnedRoutes: Number of routes learned from the remote BGP Peer.
6919	NumLearnedRoutes int64 `json:"numLearnedRoutes,omitempty"`
6920
6921	// PeerIpAddress: IP address of the remote BGP interface.
6922	PeerIpAddress string `json:"peerIpAddress,omitempty"`
6923
6924	// State: BGP state as specified in RFC1771.
6925	State string `json:"state,omitempty"`
6926
6927	// Status: Status of the BGP peer: {UP, DOWN}
6928	//
6929	// Possible values:
6930	//   "DOWN"
6931	//   "UNKNOWN"
6932	//   "UP"
6933	Status string `json:"status,omitempty"`
6934
6935	// Uptime: Time this session has been up. Format: 14 years, 51 weeks, 6
6936	// days, 23 hours, 59 minutes, 59 seconds
6937	Uptime string `json:"uptime,omitempty"`
6938
6939	// UptimeSeconds: Time this session has been up, in seconds. Format: 145
6940	UptimeSeconds string `json:"uptimeSeconds,omitempty"`
6941
6942	// ForceSendFields is a list of field names (e.g. "AdvertisedRoutes") to
6943	// unconditionally include in API requests. By default, fields with
6944	// empty values are omitted from API requests. However, any non-pointer,
6945	// non-interface field appearing in ForceSendFields will be sent to the
6946	// server regardless of whether the field is empty or not. This may be
6947	// used to include empty fields in Patch requests.
6948	ForceSendFields []string `json:"-"`
6949}
6950
6951func (s *RouterStatusBgpPeerStatus) MarshalJSON() ([]byte, error) {
6952	type noMethod RouterStatusBgpPeerStatus
6953	raw := noMethod(*s)
6954	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6955}
6956
6957type RouterStatusResponse struct {
6958	// Kind: Type of resource.
6959	Kind string `json:"kind,omitempty"`
6960
6961	Result *RouterStatus `json:"result,omitempty"`
6962
6963	// ServerResponse contains the HTTP response code and headers from the
6964	// server.
6965	googleapi.ServerResponse `json:"-"`
6966
6967	// ForceSendFields is a list of field names (e.g. "Kind") to
6968	// unconditionally include in API requests. By default, fields with
6969	// empty values are omitted from API requests. However, any non-pointer,
6970	// non-interface field appearing in ForceSendFields will be sent to the
6971	// server regardless of whether the field is empty or not. This may be
6972	// used to include empty fields in Patch requests.
6973	ForceSendFields []string `json:"-"`
6974}
6975
6976func (s *RouterStatusResponse) MarshalJSON() ([]byte, error) {
6977	type noMethod RouterStatusResponse
6978	raw := noMethod(*s)
6979	return gensupport.MarshalJSON(raw, s.ForceSendFields)
6980}
6981
6982type RoutersScopedList struct {
6983	// Routers: List of routers contained in this scope.
6984	Routers []*Router `json:"routers,omitempty"`
6985
6986	// Warning: Informational warning which replaces the list of routers
6987	// when the list is empty.
6988	Warning *RoutersScopedListWarning `json:"warning,omitempty"`
6989
6990	// ForceSendFields is a list of field names (e.g. "Routers") to
6991	// unconditionally include in API requests. By default, fields with
6992	// empty values are omitted from API requests. However, any non-pointer,
6993	// non-interface field appearing in ForceSendFields will be sent to the
6994	// server regardless of whether the field is empty or not. This may be
6995	// used to include empty fields in Patch requests.
6996	ForceSendFields []string `json:"-"`
6997}
6998
6999func (s *RoutersScopedList) MarshalJSON() ([]byte, error) {
7000	type noMethod RoutersScopedList
7001	raw := noMethod(*s)
7002	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7003}
7004
7005// RoutersScopedListWarning: Informational warning which replaces the
7006// list of routers when the list is empty.
7007type RoutersScopedListWarning struct {
7008	// Code: [Output Only] A warning code, if applicable. For example,
7009	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
7010	// the response.
7011	//
7012	// Possible values:
7013	//   "CLEANUP_FAILED"
7014	//   "DEPRECATED_RESOURCE_USED"
7015	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
7016	//   "INJECTED_KERNELS_DEPRECATED"
7017	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
7018	//   "NEXT_HOP_CANNOT_IP_FORWARD"
7019	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
7020	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
7021	//   "NEXT_HOP_NOT_RUNNING"
7022	//   "NOT_CRITICAL_ERROR"
7023	//   "NO_RESULTS_ON_PAGE"
7024	//   "REQUIRED_TOS_AGREEMENT"
7025	//   "RESOURCE_NOT_DELETED"
7026	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
7027	//   "UNREACHABLE"
7028	Code string `json:"code,omitempty"`
7029
7030	// Data: [Output Only] Metadata about this warning in key: value format.
7031	// For example:
7032	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
7033	Data []*RoutersScopedListWarningData `json:"data,omitempty"`
7034
7035	// Message: [Output Only] A human-readable description of the warning
7036	// code.
7037	Message string `json:"message,omitempty"`
7038
7039	// ForceSendFields is a list of field names (e.g. "Code") to
7040	// unconditionally include in API requests. By default, fields with
7041	// empty values are omitted from API requests. However, any non-pointer,
7042	// non-interface field appearing in ForceSendFields will be sent to the
7043	// server regardless of whether the field is empty or not. This may be
7044	// used to include empty fields in Patch requests.
7045	ForceSendFields []string `json:"-"`
7046}
7047
7048func (s *RoutersScopedListWarning) MarshalJSON() ([]byte, error) {
7049	type noMethod RoutersScopedListWarning
7050	raw := noMethod(*s)
7051	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7052}
7053
7054type RoutersScopedListWarningData struct {
7055	// Key: [Output Only] A key that provides more detail on the warning
7056	// being returned. For example, for warnings where there are no results
7057	// in a list request for a particular zone, this key might be scope and
7058	// the key value might be the zone name. Other examples might be a key
7059	// indicating a deprecated resource and a suggested replacement, or a
7060	// warning about invalid network settings (for example, if an instance
7061	// attempts to perform IP forwarding but is not enabled for IP
7062	// forwarding).
7063	Key string `json:"key,omitempty"`
7064
7065	// Value: [Output Only] A warning data value corresponding to the key.
7066	Value string `json:"value,omitempty"`
7067
7068	// ForceSendFields is a list of field names (e.g. "Key") to
7069	// unconditionally include in API requests. By default, fields with
7070	// empty values are omitted from API requests. However, any non-pointer,
7071	// non-interface field appearing in ForceSendFields will be sent to the
7072	// server regardless of whether the field is empty or not. This may be
7073	// used to include empty fields in Patch requests.
7074	ForceSendFields []string `json:"-"`
7075}
7076
7077func (s *RoutersScopedListWarningData) MarshalJSON() ([]byte, error) {
7078	type noMethod RoutersScopedListWarningData
7079	raw := noMethod(*s)
7080	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7081}
7082
7083// Scheduling: Sets the scheduling options for an Instance.
7084type Scheduling struct {
7085	// AutomaticRestart: Specifies whether the instance should be
7086	// automatically restarted if it is terminated by Compute Engine (not
7087	// terminated by a user). You can only set the automatic restart option
7088	// for standard instances. Preemptible instances cannot be automatically
7089	// restarted.
7090	AutomaticRestart bool `json:"automaticRestart,omitempty"`
7091
7092	// OnHostMaintenance: Defines the maintenance behavior for this
7093	// instance. For standard instances, the default behavior is MIGRATE.
7094	// For preemptible instances, the default and only possible behavior is
7095	// TERMINATE. For more information, see Setting Instance Scheduling
7096	// Options.
7097	//
7098	// Possible values:
7099	//   "MIGRATE"
7100	//   "TERMINATE"
7101	OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
7102
7103	// Preemptible: Whether the instance is preemptible.
7104	Preemptible bool `json:"preemptible,omitempty"`
7105
7106	// ForceSendFields is a list of field names (e.g. "AutomaticRestart") to
7107	// unconditionally include in API requests. By default, fields with
7108	// empty values are omitted from API requests. However, any non-pointer,
7109	// non-interface field appearing in ForceSendFields will be sent to the
7110	// server regardless of whether the field is empty or not. This may be
7111	// used to include empty fields in Patch requests.
7112	ForceSendFields []string `json:"-"`
7113}
7114
7115func (s *Scheduling) MarshalJSON() ([]byte, error) {
7116	type noMethod Scheduling
7117	raw := noMethod(*s)
7118	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7119}
7120
7121// SerialPortOutput: An instance's serial console output.
7122type SerialPortOutput struct {
7123	// Contents: [Output Only] The contents of the console output.
7124	Contents string `json:"contents,omitempty"`
7125
7126	// Kind: [Output Only] Type of the resource. Always
7127	// compute#serialPortOutput for serial port output.
7128	Kind string `json:"kind,omitempty"`
7129
7130	// Next: [Output Only] The position of the next byte of content from the
7131	// serial console output. Use this value in the next request as the
7132	// start parameter.
7133	Next int64 `json:"next,omitempty,string"`
7134
7135	// SelfLink: [Output Only] Server-defined URL for the resource.
7136	SelfLink string `json:"selfLink,omitempty"`
7137
7138	// Start: [Output Only] The starting byte position of the output that
7139	// was returned. This should match the start parameter sent with the
7140	// request. If the serial console output exceeds the size of the buffer,
7141	// older output will be overwritten by newer content and the start
7142	// values will be mismatched.
7143	Start int64 `json:"start,omitempty,string"`
7144
7145	// ServerResponse contains the HTTP response code and headers from the
7146	// server.
7147	googleapi.ServerResponse `json:"-"`
7148
7149	// ForceSendFields is a list of field names (e.g. "Contents") to
7150	// unconditionally include in API requests. By default, fields with
7151	// empty values are omitted from API requests. However, any non-pointer,
7152	// non-interface field appearing in ForceSendFields will be sent to the
7153	// server regardless of whether the field is empty or not. This may be
7154	// used to include empty fields in Patch requests.
7155	ForceSendFields []string `json:"-"`
7156}
7157
7158func (s *SerialPortOutput) MarshalJSON() ([]byte, error) {
7159	type noMethod SerialPortOutput
7160	raw := noMethod(*s)
7161	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7162}
7163
7164// ServiceAccount: A service account.
7165type ServiceAccount struct {
7166	// Email: Email address of the service account.
7167	Email string `json:"email,omitempty"`
7168
7169	// Scopes: The list of scopes to be made available for this service
7170	// account.
7171	Scopes []string `json:"scopes,omitempty"`
7172
7173	// ForceSendFields is a list of field names (e.g. "Email") to
7174	// unconditionally include in API requests. By default, fields with
7175	// empty values are omitted from API requests. However, any non-pointer,
7176	// non-interface field appearing in ForceSendFields will be sent to the
7177	// server regardless of whether the field is empty or not. This may be
7178	// used to include empty fields in Patch requests.
7179	ForceSendFields []string `json:"-"`
7180}
7181
7182func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
7183	type noMethod ServiceAccount
7184	raw := noMethod(*s)
7185	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7186}
7187
7188// Snapshot: A persistent disk snapshot resource.
7189type Snapshot struct {
7190	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7191	// format.
7192	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7193
7194	// Description: An optional description of this resource. Provide this
7195	// property when you create the resource.
7196	Description string `json:"description,omitempty"`
7197
7198	// DiskSizeGb: [Output Only] Size of the snapshot, specified in GB.
7199	DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"`
7200
7201	// Id: [Output Only] The unique identifier for the resource. This
7202	// identifier is defined by the server.
7203	Id uint64 `json:"id,omitempty,string"`
7204
7205	// Kind: [Output Only] Type of the resource. Always compute#snapshot for
7206	// Snapshot resources.
7207	Kind string `json:"kind,omitempty"`
7208
7209	// LabelFingerprint: A fingerprint for the labels being applied to this
7210	// snapshot, which is essentially a hash of the labels set used for
7211	// optimistic locking. The fingerprint is initially generated by Compute
7212	// Engine and changes after every request to modify or update metadata.
7213	// You must always provide an up-to-date fingerprint hash in order to
7214	// update or change labels.
7215	//
7216	// To see the latest fingerprint, make get() request to the snapshot.
7217	LabelFingerprint string `json:"labelFingerprint,omitempty"`
7218
7219	// Labels: Labels to apply to this snapshot. These can be later modified
7220	// by the setLabels method. Each label key & value must comply with
7221	// RFC1035. Label values may be empty.
7222	Labels map[string]string `json:"labels,omitempty"`
7223
7224	// Licenses: [Output Only] A list of public visible licenses that apply
7225	// to this snapshot. This can be because the original image had licenses
7226	// attached (such as a Windows image).
7227	Licenses []string `json:"licenses,omitempty"`
7228
7229	// Name: Name of the resource; provided by the client when the resource
7230	// is created. The name must be 1-63 characters long, and comply with
7231	// RFC1035. Specifically, the name must be 1-63 characters long and
7232	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
7233	// the first character must be a lowercase letter, and all following
7234	// characters must be a dash, lowercase letter, or digit, except the
7235	// last character, which cannot be a dash.
7236	Name string `json:"name,omitempty"`
7237
7238	// SelfLink: [Output Only] Server-defined URL for the resource.
7239	SelfLink string `json:"selfLink,omitempty"`
7240
7241	// SnapshotEncryptionKey: Encrypts the snapshot using a
7242	// customer-supplied encryption key.
7243	//
7244	// If you encrypt a snapshot using a customer-supplied encryption key
7245	// and you want to use the snapshot later, you must provide the same key
7246	// that you used to encrypt the snapshot. For example, you must provide
7247	// the encryption key when you create a disk from the encrypted snapshot
7248	// in a future request. If you provide an incorrect key, or no key, the
7249	// request will fail.
7250	//
7251	// Customer-supplied encryption keys do not protect access to metadata
7252	// of the disk.
7253	//
7254	// If no customer-supplied encryption key is provided at creation, then
7255	// the disk will be encrypted using an automatically generated key and
7256	// you do not need to provide a key to use the snapshot later.
7257	SnapshotEncryptionKey *CustomerEncryptionKey `json:"snapshotEncryptionKey,omitempty"`
7258
7259	// SourceDisk: [Output Only] The source disk used to create this
7260	// snapshot.
7261	SourceDisk string `json:"sourceDisk,omitempty"`
7262
7263	// SourceDiskEncryptionKey: Specifies the customer-supplied encryption
7264	// key of the source disk. This key is required if the source disk is
7265	// protected by a customer-supplied encryption key.
7266	//
7267	// If the incorrect key is provided, the request will fail.
7268	SourceDiskEncryptionKey *CustomerEncryptionKey `json:"sourceDiskEncryptionKey,omitempty"`
7269
7270	// SourceDiskId: [Output Only] The ID value of the disk used to create
7271	// this snapshot. This value may be used to determine whether the
7272	// snapshot was taken from the current or a previous instance of a given
7273	// disk name.
7274	SourceDiskId string `json:"sourceDiskId,omitempty"`
7275
7276	// Status: [Output Only] The status of the snapshot. This can be
7277	// CREATING, DELETING, FAILED, READY, or UPLOADING.
7278	//
7279	// Possible values:
7280	//   "CREATING"
7281	//   "DELETING"
7282	//   "FAILED"
7283	//   "READY"
7284	//   "UPLOADING"
7285	Status string `json:"status,omitempty"`
7286
7287	// StorageBytes: [Output Only] A size of the the storage used by the
7288	// snapshot. As snapshots share storage, this number is expected to
7289	// change with snapshot creation/deletion.
7290	StorageBytes int64 `json:"storageBytes,omitempty,string"`
7291
7292	// StorageBytesStatus: [Output Only] An indicator whether storageBytes
7293	// is in a stable state or it is being adjusted as a result of shared
7294	// storage reallocation. This status can either be UPDATING, meaning the
7295	// size of the snapshot is being updated, or UP_TO_DATE, meaning the
7296	// size of the snapshot is up-to-date.
7297	//
7298	// Possible values:
7299	//   "UPDATING"
7300	//   "UP_TO_DATE"
7301	StorageBytesStatus string `json:"storageBytesStatus,omitempty"`
7302
7303	// ServerResponse contains the HTTP response code and headers from the
7304	// server.
7305	googleapi.ServerResponse `json:"-"`
7306
7307	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
7308	// to unconditionally include in API requests. By default, fields with
7309	// empty values are omitted from API requests. However, any non-pointer,
7310	// non-interface field appearing in ForceSendFields will be sent to the
7311	// server regardless of whether the field is empty or not. This may be
7312	// used to include empty fields in Patch requests.
7313	ForceSendFields []string `json:"-"`
7314}
7315
7316func (s *Snapshot) MarshalJSON() ([]byte, error) {
7317	type noMethod Snapshot
7318	raw := noMethod(*s)
7319	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7320}
7321
7322// SnapshotList: Contains a list of Snapshot resources.
7323type SnapshotList struct {
7324	// Id: [Output Only] The unique identifier for the resource. This
7325	// identifier is defined by the server.
7326	Id string `json:"id,omitempty"`
7327
7328	// Items: [Output Only] A list of Snapshot resources.
7329	Items []*Snapshot `json:"items,omitempty"`
7330
7331	// Kind: Type of resource.
7332	Kind string `json:"kind,omitempty"`
7333
7334	// NextPageToken: [Output Only] This token allows you to get the next
7335	// page of results for list requests. If the number of results is larger
7336	// than maxResults, use the nextPageToken as a value for the query
7337	// parameter pageToken in the next list request. Subsequent list
7338	// requests will have their own nextPageToken to continue paging through
7339	// the results.
7340	NextPageToken string `json:"nextPageToken,omitempty"`
7341
7342	// SelfLink: [Output Only] Server-defined URL for this resource.
7343	SelfLink string `json:"selfLink,omitempty"`
7344
7345	// ServerResponse contains the HTTP response code and headers from the
7346	// server.
7347	googleapi.ServerResponse `json:"-"`
7348
7349	// ForceSendFields is a list of field names (e.g. "Id") to
7350	// unconditionally include in API requests. By default, fields with
7351	// empty values are omitted from API requests. However, any non-pointer,
7352	// non-interface field appearing in ForceSendFields will be sent to the
7353	// server regardless of whether the field is empty or not. This may be
7354	// used to include empty fields in Patch requests.
7355	ForceSendFields []string `json:"-"`
7356}
7357
7358func (s *SnapshotList) MarshalJSON() ([]byte, error) {
7359	type noMethod SnapshotList
7360	raw := noMethod(*s)
7361	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7362}
7363
7364// SslCertificate: An SslCertificate resource. This resource provides a
7365// mechanism to upload an SSL key and certificate to the load balancer
7366// to serve secure connections from the user.
7367type SslCertificate struct {
7368	// Certificate: A local certificate file. The certificate must be in PEM
7369	// format. The certificate chain must be no greater than 5 certs long.
7370	// The chain must include at least one intermediate cert.
7371	Certificate string `json:"certificate,omitempty"`
7372
7373	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7374	// format.
7375	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7376
7377	// Description: An optional description of this resource. Provide this
7378	// property when you create the resource.
7379	Description string `json:"description,omitempty"`
7380
7381	// Id: [Output Only] The unique identifier for the resource. This
7382	// identifier is defined by the server.
7383	Id uint64 `json:"id,omitempty,string"`
7384
7385	// Kind: [Output Only] Type of the resource. Always
7386	// compute#sslCertificate for SSL certificates.
7387	Kind string `json:"kind,omitempty"`
7388
7389	// Name: Name of the resource. Provided by the client when the resource
7390	// is created. The name must be 1-63 characters long, and comply with
7391	// RFC1035. Specifically, the name must be 1-63 characters long and
7392	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
7393	// the first character must be a lowercase letter, and all following
7394	// characters must be a dash, lowercase letter, or digit, except the
7395	// last character, which cannot be a dash.
7396	Name string `json:"name,omitempty"`
7397
7398	// PrivateKey: A write-only private key in PEM format. Only insert RPCs
7399	// will include this field.
7400	PrivateKey string `json:"privateKey,omitempty"`
7401
7402	// SelfLink: [Output only] Server-defined URL for the resource.
7403	SelfLink string `json:"selfLink,omitempty"`
7404
7405	// ServerResponse contains the HTTP response code and headers from the
7406	// server.
7407	googleapi.ServerResponse `json:"-"`
7408
7409	// ForceSendFields is a list of field names (e.g. "Certificate") to
7410	// unconditionally include in API requests. By default, fields with
7411	// empty values are omitted from API requests. However, any non-pointer,
7412	// non-interface field appearing in ForceSendFields will be sent to the
7413	// server regardless of whether the field is empty or not. This may be
7414	// used to include empty fields in Patch requests.
7415	ForceSendFields []string `json:"-"`
7416}
7417
7418func (s *SslCertificate) MarshalJSON() ([]byte, error) {
7419	type noMethod SslCertificate
7420	raw := noMethod(*s)
7421	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7422}
7423
7424// SslCertificateList: Contains a list of SslCertificate resources.
7425type SslCertificateList struct {
7426	// Id: [Output Only] Unique identifier for the resource. Defined by the
7427	// server.
7428	Id string `json:"id,omitempty"`
7429
7430	// Items: A list of SslCertificate resources.
7431	Items []*SslCertificate `json:"items,omitempty"`
7432
7433	// Kind: Type of resource.
7434	Kind string `json:"kind,omitempty"`
7435
7436	// NextPageToken: [Output Only] This token allows you to get the next
7437	// page of results for list requests. If the number of results is larger
7438	// than maxResults, use the nextPageToken as a value for the query
7439	// parameter pageToken in the next list request. Subsequent list
7440	// requests will have their own nextPageToken to continue paging through
7441	// the results.
7442	NextPageToken string `json:"nextPageToken,omitempty"`
7443
7444	// SelfLink: [Output Only] Server-defined URL for this resource.
7445	SelfLink string `json:"selfLink,omitempty"`
7446
7447	// ServerResponse contains the HTTP response code and headers from the
7448	// server.
7449	googleapi.ServerResponse `json:"-"`
7450
7451	// ForceSendFields is a list of field names (e.g. "Id") to
7452	// unconditionally include in API requests. By default, fields with
7453	// empty values are omitted from API requests. However, any non-pointer,
7454	// non-interface field appearing in ForceSendFields will be sent to the
7455	// server regardless of whether the field is empty or not. This may be
7456	// used to include empty fields in Patch requests.
7457	ForceSendFields []string `json:"-"`
7458}
7459
7460func (s *SslCertificateList) MarshalJSON() ([]byte, error) {
7461	type noMethod SslCertificateList
7462	raw := noMethod(*s)
7463	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7464}
7465
7466// Subnetwork: A Subnetwork resource.
7467type Subnetwork struct {
7468	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7469	// format.
7470	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7471
7472	// Description: An optional description of this resource. Provide this
7473	// property when you create the resource.
7474	Description string `json:"description,omitempty"`
7475
7476	// GatewayAddress: [Output Only] The gateway address for default routes
7477	// to reach destination addresses outside this subnetwork.
7478	GatewayAddress string `json:"gatewayAddress,omitempty"`
7479
7480	// Id: [Output Only] The unique identifier for the resource. This
7481	// identifier is defined by the server.
7482	Id uint64 `json:"id,omitempty,string"`
7483
7484	// IpCidrRange: The range of internal addresses that are owned by this
7485	// subnetwork. Provide this property when you create the subnetwork. For
7486	// example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
7487	// non-overlapping within a network.
7488	IpCidrRange string `json:"ipCidrRange,omitempty"`
7489
7490	// Kind: [Output Only] Type of the resource. Always compute#subnetwork
7491	// for Subnetwork resources.
7492	Kind string `json:"kind,omitempty"`
7493
7494	// Name: The name of the resource, provided by the client when initially
7495	// creating the resource. The name must be 1-63 characters long, and
7496	// comply with RFC1035. Specifically, the name must be 1-63 characters
7497	// long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?
7498	// which means the first character must be a lowercase letter, and all
7499	// following characters must be a dash, lowercase letter, or digit,
7500	// except the last character, which cannot be a dash.
7501	Name string `json:"name,omitempty"`
7502
7503	// Network: The URL of the network to which this subnetwork belongs,
7504	// provided by the client when initially creating the subnetwork. Only
7505	// networks that are in the distributed mode can have subnetworks.
7506	Network string `json:"network,omitempty"`
7507
7508	// Region: [Output Only] URL of the region where the Subnetwork resides.
7509	Region string `json:"region,omitempty"`
7510
7511	// SelfLink: [Output Only] Server-defined URL for the resource.
7512	SelfLink string `json:"selfLink,omitempty"`
7513
7514	// ServerResponse contains the HTTP response code and headers from the
7515	// server.
7516	googleapi.ServerResponse `json:"-"`
7517
7518	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
7519	// to unconditionally include in API requests. By default, fields with
7520	// empty values are omitted from API requests. However, any non-pointer,
7521	// non-interface field appearing in ForceSendFields will be sent to the
7522	// server regardless of whether the field is empty or not. This may be
7523	// used to include empty fields in Patch requests.
7524	ForceSendFields []string `json:"-"`
7525}
7526
7527func (s *Subnetwork) MarshalJSON() ([]byte, error) {
7528	type noMethod Subnetwork
7529	raw := noMethod(*s)
7530	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7531}
7532
7533type SubnetworkAggregatedList struct {
7534	// Id: [Output Only] The unique identifier for the resource. This
7535	// identifier is defined by the server.
7536	Id string `json:"id,omitempty"`
7537
7538	// Items: [Output] A map of scoped Subnetwork lists.
7539	Items map[string]SubnetworksScopedList `json:"items,omitempty"`
7540
7541	// Kind: [Output Only] Type of resource. Always
7542	// compute#subnetworkAggregatedList for aggregated lists of subnetworks.
7543	Kind string `json:"kind,omitempty"`
7544
7545	// NextPageToken: [Output Only] This token allows you to get the next
7546	// page of results for list requests. If the number of results is larger
7547	// than maxResults, use the nextPageToken as a value for the query
7548	// parameter pageToken in the next list request. Subsequent list
7549	// requests will have their own nextPageToken to continue paging through
7550	// the results.
7551	NextPageToken string `json:"nextPageToken,omitempty"`
7552
7553	// SelfLink: [Output Only] Server-defined URL for this resource.
7554	SelfLink string `json:"selfLink,omitempty"`
7555
7556	// ServerResponse contains the HTTP response code and headers from the
7557	// server.
7558	googleapi.ServerResponse `json:"-"`
7559
7560	// ForceSendFields is a list of field names (e.g. "Id") to
7561	// unconditionally include in API requests. By default, fields with
7562	// empty values are omitted from API requests. However, any non-pointer,
7563	// non-interface field appearing in ForceSendFields will be sent to the
7564	// server regardless of whether the field is empty or not. This may be
7565	// used to include empty fields in Patch requests.
7566	ForceSendFields []string `json:"-"`
7567}
7568
7569func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) {
7570	type noMethod SubnetworkAggregatedList
7571	raw := noMethod(*s)
7572	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7573}
7574
7575// SubnetworkList: Contains a list of Subnetwork resources.
7576type SubnetworkList struct {
7577	// Id: [Output Only] The unique identifier for the resource. This
7578	// identifier is defined by the server.
7579	Id string `json:"id,omitempty"`
7580
7581	// Items: The Subnetwork resources.
7582	Items []*Subnetwork `json:"items,omitempty"`
7583
7584	// Kind: [Output Only] Type of resource. Always compute#subnetworkList
7585	// for lists of subnetworks.
7586	Kind string `json:"kind,omitempty"`
7587
7588	// NextPageToken: [Output Only] This token allows you to get the next
7589	// page of results for list requests. If the number of results is larger
7590	// than maxResults, use the nextPageToken as a value for the query
7591	// parameter pageToken in the next list request. Subsequent list
7592	// requests will have their own nextPageToken to continue paging through
7593	// the results.
7594	NextPageToken string `json:"nextPageToken,omitempty"`
7595
7596	// SelfLink: [Output Only] Server-defined URL for this resource.
7597	SelfLink string `json:"selfLink,omitempty"`
7598
7599	// ServerResponse contains the HTTP response code and headers from the
7600	// server.
7601	googleapi.ServerResponse `json:"-"`
7602
7603	// ForceSendFields is a list of field names (e.g. "Id") to
7604	// unconditionally include in API requests. By default, fields with
7605	// empty values are omitted from API requests. However, any non-pointer,
7606	// non-interface field appearing in ForceSendFields will be sent to the
7607	// server regardless of whether the field is empty or not. This may be
7608	// used to include empty fields in Patch requests.
7609	ForceSendFields []string `json:"-"`
7610}
7611
7612func (s *SubnetworkList) MarshalJSON() ([]byte, error) {
7613	type noMethod SubnetworkList
7614	raw := noMethod(*s)
7615	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7616}
7617
7618type SubnetworksScopedList struct {
7619	// Subnetworks: List of subnetworks contained in this scope.
7620	Subnetworks []*Subnetwork `json:"subnetworks,omitempty"`
7621
7622	// Warning: An informational warning that appears when the list of
7623	// addresses is empty.
7624	Warning *SubnetworksScopedListWarning `json:"warning,omitempty"`
7625
7626	// ForceSendFields is a list of field names (e.g. "Subnetworks") to
7627	// unconditionally include in API requests. By default, fields with
7628	// empty values are omitted from API requests. However, any non-pointer,
7629	// non-interface field appearing in ForceSendFields will be sent to the
7630	// server regardless of whether the field is empty or not. This may be
7631	// used to include empty fields in Patch requests.
7632	ForceSendFields []string `json:"-"`
7633}
7634
7635func (s *SubnetworksScopedList) MarshalJSON() ([]byte, error) {
7636	type noMethod SubnetworksScopedList
7637	raw := noMethod(*s)
7638	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7639}
7640
7641// SubnetworksScopedListWarning: An informational warning that appears
7642// when the list of addresses is empty.
7643type SubnetworksScopedListWarning struct {
7644	// Code: [Output Only] A warning code, if applicable. For example,
7645	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
7646	// the response.
7647	//
7648	// Possible values:
7649	//   "CLEANUP_FAILED"
7650	//   "DEPRECATED_RESOURCE_USED"
7651	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
7652	//   "INJECTED_KERNELS_DEPRECATED"
7653	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
7654	//   "NEXT_HOP_CANNOT_IP_FORWARD"
7655	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
7656	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
7657	//   "NEXT_HOP_NOT_RUNNING"
7658	//   "NOT_CRITICAL_ERROR"
7659	//   "NO_RESULTS_ON_PAGE"
7660	//   "REQUIRED_TOS_AGREEMENT"
7661	//   "RESOURCE_NOT_DELETED"
7662	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
7663	//   "UNREACHABLE"
7664	Code string `json:"code,omitempty"`
7665
7666	// Data: [Output Only] Metadata about this warning in key: value format.
7667	// For example:
7668	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
7669	Data []*SubnetworksScopedListWarningData `json:"data,omitempty"`
7670
7671	// Message: [Output Only] A human-readable description of the warning
7672	// code.
7673	Message string `json:"message,omitempty"`
7674
7675	// ForceSendFields is a list of field names (e.g. "Code") to
7676	// unconditionally include in API requests. By default, fields with
7677	// empty values are omitted from API requests. However, any non-pointer,
7678	// non-interface field appearing in ForceSendFields will be sent to the
7679	// server regardless of whether the field is empty or not. This may be
7680	// used to include empty fields in Patch requests.
7681	ForceSendFields []string `json:"-"`
7682}
7683
7684func (s *SubnetworksScopedListWarning) MarshalJSON() ([]byte, error) {
7685	type noMethod SubnetworksScopedListWarning
7686	raw := noMethod(*s)
7687	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7688}
7689
7690type SubnetworksScopedListWarningData struct {
7691	// Key: [Output Only] A key that provides more detail on the warning
7692	// being returned. For example, for warnings where there are no results
7693	// in a list request for a particular zone, this key might be scope and
7694	// the key value might be the zone name. Other examples might be a key
7695	// indicating a deprecated resource and a suggested replacement, or a
7696	// warning about invalid network settings (for example, if an instance
7697	// attempts to perform IP forwarding but is not enabled for IP
7698	// forwarding).
7699	Key string `json:"key,omitempty"`
7700
7701	// Value: [Output Only] A warning data value corresponding to the key.
7702	Value string `json:"value,omitempty"`
7703
7704	// ForceSendFields is a list of field names (e.g. "Key") to
7705	// unconditionally include in API requests. By default, fields with
7706	// empty values are omitted from API requests. However, any non-pointer,
7707	// non-interface field appearing in ForceSendFields will be sent to the
7708	// server regardless of whether the field is empty or not. This may be
7709	// used to include empty fields in Patch requests.
7710	ForceSendFields []string `json:"-"`
7711}
7712
7713func (s *SubnetworksScopedListWarningData) MarshalJSON() ([]byte, error) {
7714	type noMethod SubnetworksScopedListWarningData
7715	raw := noMethod(*s)
7716	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7717}
7718
7719// Tags: A set of instance tags.
7720type Tags struct {
7721	// Fingerprint: Specifies a fingerprint for this request, which is
7722	// essentially a hash of the metadata's contents and used for optimistic
7723	// locking. The fingerprint is initially generated by Compute Engine and
7724	// changes after every request to modify or update metadata. You must
7725	// always provide an up-to-date fingerprint hash in order to update or
7726	// change metadata.
7727	//
7728	// To see the latest fingerprint, make get() request to the instance.
7729	Fingerprint string `json:"fingerprint,omitempty"`
7730
7731	// Items: An array of tags. Each tag must be 1-63 characters long, and
7732	// comply with RFC1035.
7733	Items []string `json:"items,omitempty"`
7734
7735	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
7736	// unconditionally include in API requests. By default, fields with
7737	// empty values are omitted from API requests. However, any non-pointer,
7738	// non-interface field appearing in ForceSendFields will be sent to the
7739	// server regardless of whether the field is empty or not. This may be
7740	// used to include empty fields in Patch requests.
7741	ForceSendFields []string `json:"-"`
7742}
7743
7744func (s *Tags) MarshalJSON() ([]byte, error) {
7745	type noMethod Tags
7746	raw := noMethod(*s)
7747	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7748}
7749
7750// TargetHttpProxy: A TargetHttpProxy resource. This resource defines an
7751// HTTP proxy.
7752type TargetHttpProxy struct {
7753	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7754	// format.
7755	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7756
7757	// Description: An optional description of this resource. Provide this
7758	// property when you create the resource.
7759	Description string `json:"description,omitempty"`
7760
7761	// Id: [Output Only] The unique identifier for the resource. This
7762	// identifier is defined by the server.
7763	Id uint64 `json:"id,omitempty,string"`
7764
7765	// Kind: [Output Only] Type of resource. Always compute#targetHttpProxy
7766	// for target HTTP proxies.
7767	Kind string `json:"kind,omitempty"`
7768
7769	// Name: Name of the resource. Provided by the client when the resource
7770	// is created. The name must be 1-63 characters long, and comply with
7771	// RFC1035. Specifically, the name must be 1-63 characters long and
7772	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
7773	// the first character must be a lowercase letter, and all following
7774	// characters must be a dash, lowercase letter, or digit, except the
7775	// last character, which cannot be a dash.
7776	Name string `json:"name,omitempty"`
7777
7778	// SelfLink: [Output Only] Server-defined URL for the resource.
7779	SelfLink string `json:"selfLink,omitempty"`
7780
7781	// UrlMap: URL to the UrlMap resource that defines the mapping from URL
7782	// to the BackendService.
7783	UrlMap string `json:"urlMap,omitempty"`
7784
7785	// ServerResponse contains the HTTP response code and headers from the
7786	// server.
7787	googleapi.ServerResponse `json:"-"`
7788
7789	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
7790	// to unconditionally include in API requests. By default, fields with
7791	// empty values are omitted from API requests. However, any non-pointer,
7792	// non-interface field appearing in ForceSendFields will be sent to the
7793	// server regardless of whether the field is empty or not. This may be
7794	// used to include empty fields in Patch requests.
7795	ForceSendFields []string `json:"-"`
7796}
7797
7798func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) {
7799	type noMethod TargetHttpProxy
7800	raw := noMethod(*s)
7801	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7802}
7803
7804// TargetHttpProxyList: A list of TargetHttpProxy resources.
7805type TargetHttpProxyList struct {
7806	// Id: [Output Only] The unique identifier for the resource. This
7807	// identifier is defined by the server.
7808	Id string `json:"id,omitempty"`
7809
7810	// Items: A list of TargetHttpProxy resources.
7811	Items []*TargetHttpProxy `json:"items,omitempty"`
7812
7813	// Kind: Type of resource. Always compute#targetHttpProxyList for lists
7814	// of target HTTP proxies.
7815	Kind string `json:"kind,omitempty"`
7816
7817	// NextPageToken: [Output Only] This token allows you to get the next
7818	// page of results for list requests. If the number of results is larger
7819	// than maxResults, use the nextPageToken as a value for the query
7820	// parameter pageToken in the next list request. Subsequent list
7821	// requests will have their own nextPageToken to continue paging through
7822	// the results.
7823	NextPageToken string `json:"nextPageToken,omitempty"`
7824
7825	// SelfLink: [Output Only] Server-defined URL for this resource.
7826	SelfLink string `json:"selfLink,omitempty"`
7827
7828	// ServerResponse contains the HTTP response code and headers from the
7829	// server.
7830	googleapi.ServerResponse `json:"-"`
7831
7832	// ForceSendFields is a list of field names (e.g. "Id") to
7833	// unconditionally include in API requests. By default, fields with
7834	// empty values are omitted from API requests. However, any non-pointer,
7835	// non-interface field appearing in ForceSendFields will be sent to the
7836	// server regardless of whether the field is empty or not. This may be
7837	// used to include empty fields in Patch requests.
7838	ForceSendFields []string `json:"-"`
7839}
7840
7841func (s *TargetHttpProxyList) MarshalJSON() ([]byte, error) {
7842	type noMethod TargetHttpProxyList
7843	raw := noMethod(*s)
7844	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7845}
7846
7847type TargetHttpsProxiesSetSslCertificatesRequest struct {
7848	// SslCertificates: New set of SslCertificate resources to associate
7849	// with this TargetHttpsProxy resource. Currently exactly one
7850	// SslCertificate resource must be specified.
7851	SslCertificates []string `json:"sslCertificates,omitempty"`
7852
7853	// ForceSendFields is a list of field names (e.g. "SslCertificates") to
7854	// unconditionally include in API requests. By default, fields with
7855	// empty values are omitted from API requests. However, any non-pointer,
7856	// non-interface field appearing in ForceSendFields will be sent to the
7857	// server regardless of whether the field is empty or not. This may be
7858	// used to include empty fields in Patch requests.
7859	ForceSendFields []string `json:"-"`
7860}
7861
7862func (s *TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, error) {
7863	type noMethod TargetHttpsProxiesSetSslCertificatesRequest
7864	raw := noMethod(*s)
7865	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7866}
7867
7868// TargetHttpsProxy: A TargetHttpsProxy resource. This resource defines
7869// an HTTPS proxy.
7870type TargetHttpsProxy struct {
7871	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7872	// format.
7873	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7874
7875	// Description: An optional description of this resource. Provide this
7876	// property when you create the resource.
7877	Description string `json:"description,omitempty"`
7878
7879	// Id: [Output Only] The unique identifier for the resource. This
7880	// identifier is defined by the server.
7881	Id uint64 `json:"id,omitempty,string"`
7882
7883	// Kind: [Output Only] Type of resource. Always compute#targetHttpsProxy
7884	// for target HTTPS proxies.
7885	Kind string `json:"kind,omitempty"`
7886
7887	// Name: Name of the resource. Provided by the client when the resource
7888	// is created. The name must be 1-63 characters long, and comply with
7889	// RFC1035. Specifically, the name must be 1-63 characters long and
7890	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
7891	// the first character must be a lowercase letter, and all following
7892	// characters must be a dash, lowercase letter, or digit, except the
7893	// last character, which cannot be a dash.
7894	Name string `json:"name,omitempty"`
7895
7896	// SelfLink: [Output Only] Server-defined URL for the resource.
7897	SelfLink string `json:"selfLink,omitempty"`
7898
7899	// SslCertificates: URLs to SslCertificate resources that are used to
7900	// authenticate connections between users and the load balancer.
7901	// Currently, exactly one SSL certificate must be specified.
7902	SslCertificates []string `json:"sslCertificates,omitempty"`
7903
7904	// UrlMap: A fully-qualified or valid partial URL to the UrlMap resource
7905	// that defines the mapping from URL to the BackendService. For example,
7906	// the following are all valid URLs for specifying a URL map:
7907	// -
7908	// https://www.googleapis.compute/v1/projects/project/global/urlMaps/url-map
7909	// - projects/project/global/urlMaps/url-map
7910	// - global/urlMaps/url-map
7911	UrlMap string `json:"urlMap,omitempty"`
7912
7913	// ServerResponse contains the HTTP response code and headers from the
7914	// server.
7915	googleapi.ServerResponse `json:"-"`
7916
7917	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
7918	// to unconditionally include in API requests. By default, fields with
7919	// empty values are omitted from API requests. However, any non-pointer,
7920	// non-interface field appearing in ForceSendFields will be sent to the
7921	// server regardless of whether the field is empty or not. This may be
7922	// used to include empty fields in Patch requests.
7923	ForceSendFields []string `json:"-"`
7924}
7925
7926func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) {
7927	type noMethod TargetHttpsProxy
7928	raw := noMethod(*s)
7929	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7930}
7931
7932// TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources.
7933type TargetHttpsProxyList struct {
7934	// Id: [Output Only] The unique identifier for the resource. This
7935	// identifier is defined by the server.
7936	Id string `json:"id,omitempty"`
7937
7938	// Items: A list of TargetHttpsProxy resources.
7939	Items []*TargetHttpsProxy `json:"items,omitempty"`
7940
7941	// Kind: Type of resource. Always compute#targetHttpsProxyList for lists
7942	// of target HTTPS proxies.
7943	Kind string `json:"kind,omitempty"`
7944
7945	// NextPageToken: [Output Only] This token allows you to get the next
7946	// page of results for list requests. If the number of results is larger
7947	// than maxResults, use the nextPageToken as a value for the query
7948	// parameter pageToken in the next list request. Subsequent list
7949	// requests will have their own nextPageToken to continue paging through
7950	// the results.
7951	NextPageToken string `json:"nextPageToken,omitempty"`
7952
7953	// SelfLink: [Output Only] Server-defined URL for this resource.
7954	SelfLink string `json:"selfLink,omitempty"`
7955
7956	// ServerResponse contains the HTTP response code and headers from the
7957	// server.
7958	googleapi.ServerResponse `json:"-"`
7959
7960	// ForceSendFields is a list of field names (e.g. "Id") to
7961	// unconditionally include in API requests. By default, fields with
7962	// empty values are omitted from API requests. However, any non-pointer,
7963	// non-interface field appearing in ForceSendFields will be sent to the
7964	// server regardless of whether the field is empty or not. This may be
7965	// used to include empty fields in Patch requests.
7966	ForceSendFields []string `json:"-"`
7967}
7968
7969func (s *TargetHttpsProxyList) MarshalJSON() ([]byte, error) {
7970	type noMethod TargetHttpsProxyList
7971	raw := noMethod(*s)
7972	return gensupport.MarshalJSON(raw, s.ForceSendFields)
7973}
7974
7975// TargetInstance: A TargetInstance resource. This resource defines an
7976// endpoint instance that terminates traffic of certain protocols.
7977type TargetInstance struct {
7978	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
7979	// format.
7980	CreationTimestamp string `json:"creationTimestamp,omitempty"`
7981
7982	// Description: An optional description of this resource. Provide this
7983	// property when you create the resource.
7984	Description string `json:"description,omitempty"`
7985
7986	// Id: [Output Only] The unique identifier for the resource. This
7987	// identifier is defined by the server.
7988	Id uint64 `json:"id,omitempty,string"`
7989
7990	// Instance: A URL to the virtual machine instance that handles traffic
7991	// for this target instance. When creating a target instance, you can
7992	// provide the fully-qualified URL or a valid partial URL to the desired
7993	// virtual machine. For example, the following are all valid URLs:
7994	// -
7995	// https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
7996	// - projects/project/zones/zone/instances/instance
7997	// - zones/zone/instances/instance
7998	Instance string `json:"instance,omitempty"`
7999
8000	// Kind: [Output Only] The type of the resource. Always
8001	// compute#targetInstance for target instances.
8002	Kind string `json:"kind,omitempty"`
8003
8004	// Name: Name of the resource. Provided by the client when the resource
8005	// is created. The name must be 1-63 characters long, and comply with
8006	// RFC1035. Specifically, the name must be 1-63 characters long and
8007	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
8008	// the first character must be a lowercase letter, and all following
8009	// characters must be a dash, lowercase letter, or digit, except the
8010	// last character, which cannot be a dash.
8011	Name string `json:"name,omitempty"`
8012
8013	// NatPolicy: NAT option controlling how IPs are NAT'ed to the instance.
8014	// Currently only NO_NAT (default value) is supported.
8015	//
8016	// Possible values:
8017	//   "NO_NAT"
8018	NatPolicy string `json:"natPolicy,omitempty"`
8019
8020	// SelfLink: [Output Only] Server-defined URL for the resource.
8021	SelfLink string `json:"selfLink,omitempty"`
8022
8023	// Zone: [Output Only] URL of the zone where the target instance
8024	// resides.
8025	Zone string `json:"zone,omitempty"`
8026
8027	// ServerResponse contains the HTTP response code and headers from the
8028	// server.
8029	googleapi.ServerResponse `json:"-"`
8030
8031	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
8032	// to unconditionally include in API requests. By default, fields with
8033	// empty values are omitted from API requests. However, any non-pointer,
8034	// non-interface field appearing in ForceSendFields will be sent to the
8035	// server regardless of whether the field is empty or not. This may be
8036	// used to include empty fields in Patch requests.
8037	ForceSendFields []string `json:"-"`
8038}
8039
8040func (s *TargetInstance) MarshalJSON() ([]byte, error) {
8041	type noMethod TargetInstance
8042	raw := noMethod(*s)
8043	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8044}
8045
8046type TargetInstanceAggregatedList struct {
8047	// Id: [Output Only] Unique identifier for the resource; defined by the
8048	// server.
8049	Id string `json:"id,omitempty"`
8050
8051	// Items: A map of scoped target instance lists.
8052	Items map[string]TargetInstancesScopedList `json:"items,omitempty"`
8053
8054	// Kind: Type of resource.
8055	Kind string `json:"kind,omitempty"`
8056
8057	// NextPageToken: [Output Only] This token allows you to get the next
8058	// page of results for list requests. If the number of results is larger
8059	// than maxResults, use the nextPageToken as a value for the query
8060	// parameter pageToken in the next list request. Subsequent list
8061	// requests will have their own nextPageToken to continue paging through
8062	// the results.
8063	NextPageToken string `json:"nextPageToken,omitempty"`
8064
8065	// SelfLink: [Output Only] Server-defined URL for this resource.
8066	SelfLink string `json:"selfLink,omitempty"`
8067
8068	// ServerResponse contains the HTTP response code and headers from the
8069	// server.
8070	googleapi.ServerResponse `json:"-"`
8071
8072	// ForceSendFields is a list of field names (e.g. "Id") to
8073	// unconditionally include in API requests. By default, fields with
8074	// empty values are omitted from API requests. However, any non-pointer,
8075	// non-interface field appearing in ForceSendFields will be sent to the
8076	// server regardless of whether the field is empty or not. This may be
8077	// used to include empty fields in Patch requests.
8078	ForceSendFields []string `json:"-"`
8079}
8080
8081func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) {
8082	type noMethod TargetInstanceAggregatedList
8083	raw := noMethod(*s)
8084	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8085}
8086
8087// TargetInstanceList: Contains a list of TargetInstance resources.
8088type TargetInstanceList struct {
8089	// Id: [Output Only] The unique identifier for the resource. This
8090	// identifier is defined by the server.
8091	Id string `json:"id,omitempty"`
8092
8093	// Items: A list of TargetInstance resources.
8094	Items []*TargetInstance `json:"items,omitempty"`
8095
8096	// Kind: Type of resource.
8097	Kind string `json:"kind,omitempty"`
8098
8099	// NextPageToken: [Output Only] This token allows you to get the next
8100	// page of results for list requests. If the number of results is larger
8101	// than maxResults, use the nextPageToken as a value for the query
8102	// parameter pageToken in the next list request. Subsequent list
8103	// requests will have their own nextPageToken to continue paging through
8104	// the results.
8105	NextPageToken string `json:"nextPageToken,omitempty"`
8106
8107	// SelfLink: [Output Only] Server-defined URL for this resource.
8108	SelfLink string `json:"selfLink,omitempty"`
8109
8110	// ServerResponse contains the HTTP response code and headers from the
8111	// server.
8112	googleapi.ServerResponse `json:"-"`
8113
8114	// ForceSendFields is a list of field names (e.g. "Id") to
8115	// unconditionally include in API requests. By default, fields with
8116	// empty values are omitted from API requests. However, any non-pointer,
8117	// non-interface field appearing in ForceSendFields will be sent to the
8118	// server regardless of whether the field is empty or not. This may be
8119	// used to include empty fields in Patch requests.
8120	ForceSendFields []string `json:"-"`
8121}
8122
8123func (s *TargetInstanceList) MarshalJSON() ([]byte, error) {
8124	type noMethod TargetInstanceList
8125	raw := noMethod(*s)
8126	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8127}
8128
8129type TargetInstancesScopedList struct {
8130	// TargetInstances: List of target instances contained in this scope.
8131	TargetInstances []*TargetInstance `json:"targetInstances,omitempty"`
8132
8133	// Warning: Informational warning which replaces the list of addresses
8134	// when the list is empty.
8135	Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"`
8136
8137	// ForceSendFields is a list of field names (e.g. "TargetInstances") to
8138	// unconditionally include in API requests. By default, fields with
8139	// empty values are omitted from API requests. However, any non-pointer,
8140	// non-interface field appearing in ForceSendFields will be sent to the
8141	// server regardless of whether the field is empty or not. This may be
8142	// used to include empty fields in Patch requests.
8143	ForceSendFields []string `json:"-"`
8144}
8145
8146func (s *TargetInstancesScopedList) MarshalJSON() ([]byte, error) {
8147	type noMethod TargetInstancesScopedList
8148	raw := noMethod(*s)
8149	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8150}
8151
8152// TargetInstancesScopedListWarning: Informational warning which
8153// replaces the list of addresses when the list is empty.
8154type TargetInstancesScopedListWarning struct {
8155	// Code: [Output Only] A warning code, if applicable. For example,
8156	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
8157	// the response.
8158	//
8159	// Possible values:
8160	//   "CLEANUP_FAILED"
8161	//   "DEPRECATED_RESOURCE_USED"
8162	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
8163	//   "INJECTED_KERNELS_DEPRECATED"
8164	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
8165	//   "NEXT_HOP_CANNOT_IP_FORWARD"
8166	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
8167	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
8168	//   "NEXT_HOP_NOT_RUNNING"
8169	//   "NOT_CRITICAL_ERROR"
8170	//   "NO_RESULTS_ON_PAGE"
8171	//   "REQUIRED_TOS_AGREEMENT"
8172	//   "RESOURCE_NOT_DELETED"
8173	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
8174	//   "UNREACHABLE"
8175	Code string `json:"code,omitempty"`
8176
8177	// Data: [Output Only] Metadata about this warning in key: value format.
8178	// For example:
8179	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
8180	Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"`
8181
8182	// Message: [Output Only] A human-readable description of the warning
8183	// code.
8184	Message string `json:"message,omitempty"`
8185
8186	// ForceSendFields is a list of field names (e.g. "Code") to
8187	// unconditionally include in API requests. By default, fields with
8188	// empty values are omitted from API requests. However, any non-pointer,
8189	// non-interface field appearing in ForceSendFields will be sent to the
8190	// server regardless of whether the field is empty or not. This may be
8191	// used to include empty fields in Patch requests.
8192	ForceSendFields []string `json:"-"`
8193}
8194
8195func (s *TargetInstancesScopedListWarning) MarshalJSON() ([]byte, error) {
8196	type noMethod TargetInstancesScopedListWarning
8197	raw := noMethod(*s)
8198	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8199}
8200
8201type TargetInstancesScopedListWarningData struct {
8202	// Key: [Output Only] A key that provides more detail on the warning
8203	// being returned. For example, for warnings where there are no results
8204	// in a list request for a particular zone, this key might be scope and
8205	// the key value might be the zone name. Other examples might be a key
8206	// indicating a deprecated resource and a suggested replacement, or a
8207	// warning about invalid network settings (for example, if an instance
8208	// attempts to perform IP forwarding but is not enabled for IP
8209	// forwarding).
8210	Key string `json:"key,omitempty"`
8211
8212	// Value: [Output Only] A warning data value corresponding to the key.
8213	Value string `json:"value,omitempty"`
8214
8215	// ForceSendFields is a list of field names (e.g. "Key") to
8216	// unconditionally include in API requests. By default, fields with
8217	// empty values are omitted from API requests. However, any non-pointer,
8218	// non-interface field appearing in ForceSendFields will be sent to the
8219	// server regardless of whether the field is empty or not. This may be
8220	// used to include empty fields in Patch requests.
8221	ForceSendFields []string `json:"-"`
8222}
8223
8224func (s *TargetInstancesScopedListWarningData) MarshalJSON() ([]byte, error) {
8225	type noMethod TargetInstancesScopedListWarningData
8226	raw := noMethod(*s)
8227	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8228}
8229
8230// TargetPool: A TargetPool resource. This resource defines a pool of
8231// instances, associated HttpHealthCheck resources, and the fallback
8232// target pool.
8233type TargetPool struct {
8234	// BackupPool: This field is applicable only when the containing target
8235	// pool is serving a forwarding rule as the primary pool, and its
8236	// failoverRatio field is properly set to a value between [0,
8237	// 1].
8238	//
8239	// backupPool and failoverRatio together define the fallback behavior of
8240	// the primary target pool: if the ratio of the healthy instances in the
8241	// primary pool is at or below failoverRatio, traffic arriving at the
8242	// load-balanced IP will be directed to the backup pool.
8243	//
8244	// In case where failoverRatio and backupPool are not set, or all the
8245	// instances in the backup pool are unhealthy, the traffic will be
8246	// directed back to the primary pool in the "force" mode, where traffic
8247	// will be spread to the healthy instances with the best effort, or to
8248	// all instances when no instance is healthy.
8249	BackupPool string `json:"backupPool,omitempty"`
8250
8251	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
8252	// format.
8253	CreationTimestamp string `json:"creationTimestamp,omitempty"`
8254
8255	// Description: An optional description of this resource. Provide this
8256	// property when you create the resource.
8257	Description string `json:"description,omitempty"`
8258
8259	// FailoverRatio: This field is applicable only when the containing
8260	// target pool is serving a forwarding rule as the primary pool (i.e.,
8261	// not as a backup pool to some other target pool). The value of the
8262	// field must be in [0, 1].
8263	//
8264	// If set, backupPool must also be set. They together define the
8265	// fallback behavior of the primary target pool: if the ratio of the
8266	// healthy instances in the primary pool is at or below this number,
8267	// traffic arriving at the load-balanced IP will be directed to the
8268	// backup pool.
8269	//
8270	// In case where failoverRatio is not set or all the instances in the
8271	// backup pool are unhealthy, the traffic will be directed back to the
8272	// primary pool in the "force" mode, where traffic will be spread to the
8273	// healthy instances with the best effort, or to all instances when no
8274	// instance is healthy.
8275	FailoverRatio float64 `json:"failoverRatio,omitempty"`
8276
8277	// HealthChecks: A list of URLs to the HttpHealthCheck resource. A
8278	// member instance in this pool is considered healthy if and only if all
8279	// specified health checks pass. An empty list means all member
8280	// instances will be considered healthy at all times.
8281	HealthChecks []string `json:"healthChecks,omitempty"`
8282
8283	// Id: [Output Only] The unique identifier for the resource. This
8284	// identifier is defined by the server.
8285	Id uint64 `json:"id,omitempty,string"`
8286
8287	// Instances: A list of resource URLs to the virtual machine instances
8288	// serving this pool. They must live in zones contained in the same
8289	// region as this pool.
8290	Instances []string `json:"instances,omitempty"`
8291
8292	// Kind: [Output Only] Type of the resource. Always compute#targetPool
8293	// for target pools.
8294	Kind string `json:"kind,omitempty"`
8295
8296	// Name: Name of the resource. Provided by the client when the resource
8297	// is created. The name must be 1-63 characters long, and comply with
8298	// RFC1035. Specifically, the name must be 1-63 characters long and
8299	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
8300	// the first character must be a lowercase letter, and all following
8301	// characters must be a dash, lowercase letter, or digit, except the
8302	// last character, which cannot be a dash.
8303	Name string `json:"name,omitempty"`
8304
8305	// Region: [Output Only] URL of the region where the target pool
8306	// resides.
8307	Region string `json:"region,omitempty"`
8308
8309	// SelfLink: [Output Only] Server-defined URL for the resource.
8310	SelfLink string `json:"selfLink,omitempty"`
8311
8312	// SessionAffinity: Sesssion affinity option, must be one of the
8313	// following values:
8314	// NONE: Connections from the same client IP may go to any instance in
8315	// the pool.
8316	// CLIENT_IP: Connections from the same client IP will go to the same
8317	// instance in the pool while that instance remains
8318	// healthy.
8319	// CLIENT_IP_PROTO: Connections from the same client IP with the same IP
8320	// protocol will go to the same instance in the pool while that instance
8321	// remains healthy.
8322	//
8323	// Possible values:
8324	//   "CLIENT_IP"
8325	//   "CLIENT_IP_PROTO"
8326	//   "NONE"
8327	SessionAffinity string `json:"sessionAffinity,omitempty"`
8328
8329	// ServerResponse contains the HTTP response code and headers from the
8330	// server.
8331	googleapi.ServerResponse `json:"-"`
8332
8333	// ForceSendFields is a list of field names (e.g. "BackupPool") to
8334	// unconditionally include in API requests. By default, fields with
8335	// empty values are omitted from API requests. However, any non-pointer,
8336	// non-interface field appearing in ForceSendFields will be sent to the
8337	// server regardless of whether the field is empty or not. This may be
8338	// used to include empty fields in Patch requests.
8339	ForceSendFields []string `json:"-"`
8340}
8341
8342func (s *TargetPool) MarshalJSON() ([]byte, error) {
8343	type noMethod TargetPool
8344	raw := noMethod(*s)
8345	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8346}
8347
8348type TargetPoolAggregatedList struct {
8349	// Id: [Output Only] Unique identifier for the resource. Defined by the
8350	// server.
8351	Id string `json:"id,omitempty"`
8352
8353	// Items: [Output Only] A map of scoped target pool lists.
8354	Items map[string]TargetPoolsScopedList `json:"items,omitempty"`
8355
8356	// Kind: [Output Only] Type of resource. Always
8357	// compute#targetPoolAggregatedList for aggregated lists of target
8358	// pools.
8359	Kind string `json:"kind,omitempty"`
8360
8361	// NextPageToken: [Output Only] This token allows you to get the next
8362	// page of results for list requests. If the number of results is larger
8363	// than maxResults, use the nextPageToken as a value for the query
8364	// parameter pageToken in the next list request. Subsequent list
8365	// requests will have their own nextPageToken to continue paging through
8366	// the results.
8367	NextPageToken string `json:"nextPageToken,omitempty"`
8368
8369	// SelfLink: [Output Only] Server-defined URL for this resource.
8370	SelfLink string `json:"selfLink,omitempty"`
8371
8372	// ServerResponse contains the HTTP response code and headers from the
8373	// server.
8374	googleapi.ServerResponse `json:"-"`
8375
8376	// ForceSendFields is a list of field names (e.g. "Id") to
8377	// unconditionally include in API requests. By default, fields with
8378	// empty values are omitted from API requests. However, any non-pointer,
8379	// non-interface field appearing in ForceSendFields will be sent to the
8380	// server regardless of whether the field is empty or not. This may be
8381	// used to include empty fields in Patch requests.
8382	ForceSendFields []string `json:"-"`
8383}
8384
8385func (s *TargetPoolAggregatedList) MarshalJSON() ([]byte, error) {
8386	type noMethod TargetPoolAggregatedList
8387	raw := noMethod(*s)
8388	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8389}
8390
8391type TargetPoolInstanceHealth struct {
8392	HealthStatus []*HealthStatus `json:"healthStatus,omitempty"`
8393
8394	// Kind: [Output Only] Type of resource. Always
8395	// compute#targetPoolInstanceHealth when checking the health of an
8396	// instance.
8397	Kind string `json:"kind,omitempty"`
8398
8399	// ServerResponse contains the HTTP response code and headers from the
8400	// server.
8401	googleapi.ServerResponse `json:"-"`
8402
8403	// ForceSendFields is a list of field names (e.g. "HealthStatus") to
8404	// unconditionally include in API requests. By default, fields with
8405	// empty values are omitted from API requests. However, any non-pointer,
8406	// non-interface field appearing in ForceSendFields will be sent to the
8407	// server regardless of whether the field is empty or not. This may be
8408	// used to include empty fields in Patch requests.
8409	ForceSendFields []string `json:"-"`
8410}
8411
8412func (s *TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) {
8413	type noMethod TargetPoolInstanceHealth
8414	raw := noMethod(*s)
8415	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8416}
8417
8418// TargetPoolList: Contains a list of TargetPool resources.
8419type TargetPoolList struct {
8420	// Id: [Output Only] Unique identifier for the resource. Defined by the
8421	// server.
8422	Id string `json:"id,omitempty"`
8423
8424	// Items: A list of TargetPool resources.
8425	Items []*TargetPool `json:"items,omitempty"`
8426
8427	// Kind: [Output Only] Type of resource. Always compute#targetPoolList
8428	// for lists of target pools.
8429	Kind string `json:"kind,omitempty"`
8430
8431	// NextPageToken: [Output Only] This token allows you to get the next
8432	// page of results for list requests. If the number of results is larger
8433	// than maxResults, use the nextPageToken as a value for the query
8434	// parameter pageToken in the next list request. Subsequent list
8435	// requests will have their own nextPageToken to continue paging through
8436	// the results.
8437	NextPageToken string `json:"nextPageToken,omitempty"`
8438
8439	// SelfLink: [Output Only] Server-defined URL for this resource.
8440	SelfLink string `json:"selfLink,omitempty"`
8441
8442	// ServerResponse contains the HTTP response code and headers from the
8443	// server.
8444	googleapi.ServerResponse `json:"-"`
8445
8446	// ForceSendFields is a list of field names (e.g. "Id") to
8447	// unconditionally include in API requests. By default, fields with
8448	// empty values are omitted from API requests. However, any non-pointer,
8449	// non-interface field appearing in ForceSendFields will be sent to the
8450	// server regardless of whether the field is empty or not. This may be
8451	// used to include empty fields in Patch requests.
8452	ForceSendFields []string `json:"-"`
8453}
8454
8455func (s *TargetPoolList) MarshalJSON() ([]byte, error) {
8456	type noMethod TargetPoolList
8457	raw := noMethod(*s)
8458	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8459}
8460
8461type TargetPoolsAddHealthCheckRequest struct {
8462	// HealthChecks: A list of HttpHealthCheck resources to add to the
8463	// target pool.
8464	HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"`
8465
8466	// ForceSendFields is a list of field names (e.g. "HealthChecks") to
8467	// unconditionally include in API requests. By default, fields with
8468	// empty values are omitted from API requests. However, any non-pointer,
8469	// non-interface field appearing in ForceSendFields will be sent to the
8470	// server regardless of whether the field is empty or not. This may be
8471	// used to include empty fields in Patch requests.
8472	ForceSendFields []string `json:"-"`
8473}
8474
8475func (s *TargetPoolsAddHealthCheckRequest) MarshalJSON() ([]byte, error) {
8476	type noMethod TargetPoolsAddHealthCheckRequest
8477	raw := noMethod(*s)
8478	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8479}
8480
8481type TargetPoolsAddInstanceRequest struct {
8482	// Instances: A full or partial URL to an instance to add to this target
8483	// pool. This can be a full or partial URL. For example, the following
8484	// are valid URLs:
8485	// -
8486	// https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name
8487	// - projects/project-id/zones/zone/instances/instance-name
8488	// - zones/zone/instances/instance-name
8489	Instances []*InstanceReference `json:"instances,omitempty"`
8490
8491	// ForceSendFields is a list of field names (e.g. "Instances") to
8492	// unconditionally include in API requests. By default, fields with
8493	// empty values are omitted from API requests. However, any non-pointer,
8494	// non-interface field appearing in ForceSendFields will be sent to the
8495	// server regardless of whether the field is empty or not. This may be
8496	// used to include empty fields in Patch requests.
8497	ForceSendFields []string `json:"-"`
8498}
8499
8500func (s *TargetPoolsAddInstanceRequest) MarshalJSON() ([]byte, error) {
8501	type noMethod TargetPoolsAddInstanceRequest
8502	raw := noMethod(*s)
8503	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8504}
8505
8506type TargetPoolsRemoveHealthCheckRequest struct {
8507	// HealthChecks: Health check URL to be removed. This can be a full or
8508	// valid partial URL. For example, the following are valid URLs:
8509	// -
8510	// https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check
8511	// - projects/project/global/httpHealthChecks/health-check
8512	// - global/httpHealthChecks/health-check
8513	HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"`
8514
8515	// ForceSendFields is a list of field names (e.g. "HealthChecks") to
8516	// unconditionally include in API requests. By default, fields with
8517	// empty values are omitted from API requests. However, any non-pointer,
8518	// non-interface field appearing in ForceSendFields will be sent to the
8519	// server regardless of whether the field is empty or not. This may be
8520	// used to include empty fields in Patch requests.
8521	ForceSendFields []string `json:"-"`
8522}
8523
8524func (s *TargetPoolsRemoveHealthCheckRequest) MarshalJSON() ([]byte, error) {
8525	type noMethod TargetPoolsRemoveHealthCheckRequest
8526	raw := noMethod(*s)
8527	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8528}
8529
8530type TargetPoolsRemoveInstanceRequest struct {
8531	// Instances: URLs of the instances to be removed from target pool.
8532	Instances []*InstanceReference `json:"instances,omitempty"`
8533
8534	// ForceSendFields is a list of field names (e.g. "Instances") to
8535	// unconditionally include in API requests. By default, fields with
8536	// empty values are omitted from API requests. However, any non-pointer,
8537	// non-interface field appearing in ForceSendFields will be sent to the
8538	// server regardless of whether the field is empty or not. This may be
8539	// used to include empty fields in Patch requests.
8540	ForceSendFields []string `json:"-"`
8541}
8542
8543func (s *TargetPoolsRemoveInstanceRequest) MarshalJSON() ([]byte, error) {
8544	type noMethod TargetPoolsRemoveInstanceRequest
8545	raw := noMethod(*s)
8546	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8547}
8548
8549type TargetPoolsScopedList struct {
8550	// TargetPools: List of target pools contained in this scope.
8551	TargetPools []*TargetPool `json:"targetPools,omitempty"`
8552
8553	// Warning: Informational warning which replaces the list of addresses
8554	// when the list is empty.
8555	Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"`
8556
8557	// ForceSendFields is a list of field names (e.g. "TargetPools") to
8558	// unconditionally include in API requests. By default, fields with
8559	// empty values are omitted from API requests. However, any non-pointer,
8560	// non-interface field appearing in ForceSendFields will be sent to the
8561	// server regardless of whether the field is empty or not. This may be
8562	// used to include empty fields in Patch requests.
8563	ForceSendFields []string `json:"-"`
8564}
8565
8566func (s *TargetPoolsScopedList) MarshalJSON() ([]byte, error) {
8567	type noMethod TargetPoolsScopedList
8568	raw := noMethod(*s)
8569	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8570}
8571
8572// TargetPoolsScopedListWarning: Informational warning which replaces
8573// the list of addresses when the list is empty.
8574type TargetPoolsScopedListWarning struct {
8575	// Code: [Output Only] A warning code, if applicable. For example,
8576	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
8577	// the response.
8578	//
8579	// Possible values:
8580	//   "CLEANUP_FAILED"
8581	//   "DEPRECATED_RESOURCE_USED"
8582	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
8583	//   "INJECTED_KERNELS_DEPRECATED"
8584	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
8585	//   "NEXT_HOP_CANNOT_IP_FORWARD"
8586	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
8587	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
8588	//   "NEXT_HOP_NOT_RUNNING"
8589	//   "NOT_CRITICAL_ERROR"
8590	//   "NO_RESULTS_ON_PAGE"
8591	//   "REQUIRED_TOS_AGREEMENT"
8592	//   "RESOURCE_NOT_DELETED"
8593	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
8594	//   "UNREACHABLE"
8595	Code string `json:"code,omitempty"`
8596
8597	// Data: [Output Only] Metadata about this warning in key: value format.
8598	// For example:
8599	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
8600	Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"`
8601
8602	// Message: [Output Only] A human-readable description of the warning
8603	// code.
8604	Message string `json:"message,omitempty"`
8605
8606	// ForceSendFields is a list of field names (e.g. "Code") to
8607	// unconditionally include in API requests. By default, fields with
8608	// empty values are omitted from API requests. However, any non-pointer,
8609	// non-interface field appearing in ForceSendFields will be sent to the
8610	// server regardless of whether the field is empty or not. This may be
8611	// used to include empty fields in Patch requests.
8612	ForceSendFields []string `json:"-"`
8613}
8614
8615func (s *TargetPoolsScopedListWarning) MarshalJSON() ([]byte, error) {
8616	type noMethod TargetPoolsScopedListWarning
8617	raw := noMethod(*s)
8618	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8619}
8620
8621type TargetPoolsScopedListWarningData struct {
8622	// Key: [Output Only] A key that provides more detail on the warning
8623	// being returned. For example, for warnings where there are no results
8624	// in a list request for a particular zone, this key might be scope and
8625	// the key value might be the zone name. Other examples might be a key
8626	// indicating a deprecated resource and a suggested replacement, or a
8627	// warning about invalid network settings (for example, if an instance
8628	// attempts to perform IP forwarding but is not enabled for IP
8629	// forwarding).
8630	Key string `json:"key,omitempty"`
8631
8632	// Value: [Output Only] A warning data value corresponding to the key.
8633	Value string `json:"value,omitempty"`
8634
8635	// ForceSendFields is a list of field names (e.g. "Key") to
8636	// unconditionally include in API requests. By default, fields with
8637	// empty values are omitted from API requests. However, any non-pointer,
8638	// non-interface field appearing in ForceSendFields will be sent to the
8639	// server regardless of whether the field is empty or not. This may be
8640	// used to include empty fields in Patch requests.
8641	ForceSendFields []string `json:"-"`
8642}
8643
8644func (s *TargetPoolsScopedListWarningData) MarshalJSON() ([]byte, error) {
8645	type noMethod TargetPoolsScopedListWarningData
8646	raw := noMethod(*s)
8647	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8648}
8649
8650type TargetReference struct {
8651	Target string `json:"target,omitempty"`
8652
8653	// ForceSendFields is a list of field names (e.g. "Target") to
8654	// unconditionally include in API requests. By default, fields with
8655	// empty values are omitted from API requests. However, any non-pointer,
8656	// non-interface field appearing in ForceSendFields will be sent to the
8657	// server regardless of whether the field is empty or not. This may be
8658	// used to include empty fields in Patch requests.
8659	ForceSendFields []string `json:"-"`
8660}
8661
8662func (s *TargetReference) MarshalJSON() ([]byte, error) {
8663	type noMethod TargetReference
8664	raw := noMethod(*s)
8665	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8666}
8667
8668// TargetVpnGateway: Represents a Target VPN gateway resource.
8669type TargetVpnGateway struct {
8670	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
8671	// format.
8672	CreationTimestamp string `json:"creationTimestamp,omitempty"`
8673
8674	// Description: An optional description of this resource. Provide this
8675	// property when you create the resource.
8676	Description string `json:"description,omitempty"`
8677
8678	// ForwardingRules: [Output Only] A list of URLs to the ForwardingRule
8679	// resources. ForwardingRules are created using
8680	// compute.forwardingRules.insert and associated to a VPN gateway.
8681	ForwardingRules []string `json:"forwardingRules,omitempty"`
8682
8683	// Id: [Output Only] The unique identifier for the resource. This
8684	// identifier is defined by the server.
8685	Id uint64 `json:"id,omitempty,string"`
8686
8687	// Kind: [Output Only] Type of resource. Always compute#targetVpnGateway
8688	// for target VPN gateways.
8689	Kind string `json:"kind,omitempty"`
8690
8691	// Name: Name of the resource. Provided by the client when the resource
8692	// is created. The name must be 1-63 characters long, and comply with
8693	// RFC1035. Specifically, the name must be 1-63 characters long and
8694	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
8695	// the first character must be a lowercase letter, and all following
8696	// characters must be a dash, lowercase letter, or digit, except the
8697	// last character, which cannot be a dash.
8698	Name string `json:"name,omitempty"`
8699
8700	// Network: URL of the network to which this VPN gateway is attached.
8701	// Provided by the client when the VPN gateway is created.
8702	Network string `json:"network,omitempty"`
8703
8704	// Region: [Output Only] URL of the region where the target VPN gateway
8705	// resides.
8706	Region string `json:"region,omitempty"`
8707
8708	// SelfLink: [Output Only] Server-defined URL for the resource.
8709	SelfLink string `json:"selfLink,omitempty"`
8710
8711	// Status: [Output Only] The status of the VPN gateway.
8712	//
8713	// Possible values:
8714	//   "CREATING"
8715	//   "DELETING"
8716	//   "FAILED"
8717	//   "READY"
8718	Status string `json:"status,omitempty"`
8719
8720	// Tunnels: [Output Only] A list of URLs to VpnTunnel resources.
8721	// VpnTunnels are created using compute.vpntunnels.insert method and
8722	// associated to a VPN gateway.
8723	Tunnels []string `json:"tunnels,omitempty"`
8724
8725	// ServerResponse contains the HTTP response code and headers from the
8726	// server.
8727	googleapi.ServerResponse `json:"-"`
8728
8729	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
8730	// to unconditionally include in API requests. By default, fields with
8731	// empty values are omitted from API requests. However, any non-pointer,
8732	// non-interface field appearing in ForceSendFields will be sent to the
8733	// server regardless of whether the field is empty or not. This may be
8734	// used to include empty fields in Patch requests.
8735	ForceSendFields []string `json:"-"`
8736}
8737
8738func (s *TargetVpnGateway) MarshalJSON() ([]byte, error) {
8739	type noMethod TargetVpnGateway
8740	raw := noMethod(*s)
8741	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8742}
8743
8744type TargetVpnGatewayAggregatedList struct {
8745	// Id: [Output Only] The unique identifier for the resource. This
8746	// identifier is defined by the server.
8747	Id string `json:"id,omitempty"`
8748
8749	// Items: A map of scoped target vpn gateway lists.
8750	Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"`
8751
8752	// Kind: [Output Only] Type of resource. Always compute#targetVpnGateway
8753	// for target VPN gateways.
8754	Kind string `json:"kind,omitempty"`
8755
8756	// NextPageToken: [Output Only] This token allows you to get the next
8757	// page of results for list requests. If the number of results is larger
8758	// than maxResults, use the nextPageToken as a value for the query
8759	// parameter pageToken in the next list request. Subsequent list
8760	// requests will have their own nextPageToken to continue paging through
8761	// the results.
8762	NextPageToken string `json:"nextPageToken,omitempty"`
8763
8764	// SelfLink: [Output Only] Server-defined URL for the resource.
8765	SelfLink string `json:"selfLink,omitempty"`
8766
8767	// ServerResponse contains the HTTP response code and headers from the
8768	// server.
8769	googleapi.ServerResponse `json:"-"`
8770
8771	// ForceSendFields is a list of field names (e.g. "Id") to
8772	// unconditionally include in API requests. By default, fields with
8773	// empty values are omitted from API requests. However, any non-pointer,
8774	// non-interface field appearing in ForceSendFields will be sent to the
8775	// server regardless of whether the field is empty or not. This may be
8776	// used to include empty fields in Patch requests.
8777	ForceSendFields []string `json:"-"`
8778}
8779
8780func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) {
8781	type noMethod TargetVpnGatewayAggregatedList
8782	raw := noMethod(*s)
8783	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8784}
8785
8786// TargetVpnGatewayList: Contains a list of TargetVpnGateway resources.
8787type TargetVpnGatewayList struct {
8788	// Id: [Output Only] The unique identifier for the resource. This
8789	// identifier is defined by the server.
8790	Id string `json:"id,omitempty"`
8791
8792	// Items: [Output Only] A list of TargetVpnGateway resources.
8793	Items []*TargetVpnGateway `json:"items,omitempty"`
8794
8795	// Kind: [Output Only] Type of resource. Always compute#targetVpnGateway
8796	// for target VPN gateways.
8797	Kind string `json:"kind,omitempty"`
8798
8799	// NextPageToken: [Output Only] This token allows you to get the next
8800	// page of results for list requests. If the number of results is larger
8801	// than maxResults, use the nextPageToken as a value for the query
8802	// parameter pageToken in the next list request. Subsequent list
8803	// requests will have their own nextPageToken to continue paging through
8804	// the results.
8805	NextPageToken string `json:"nextPageToken,omitempty"`
8806
8807	// SelfLink: [Output Only] Server-defined URL for the resource.
8808	SelfLink string `json:"selfLink,omitempty"`
8809
8810	// ServerResponse contains the HTTP response code and headers from the
8811	// server.
8812	googleapi.ServerResponse `json:"-"`
8813
8814	// ForceSendFields is a list of field names (e.g. "Id") to
8815	// unconditionally include in API requests. By default, fields with
8816	// empty values are omitted from API requests. However, any non-pointer,
8817	// non-interface field appearing in ForceSendFields will be sent to the
8818	// server regardless of whether the field is empty or not. This may be
8819	// used to include empty fields in Patch requests.
8820	ForceSendFields []string `json:"-"`
8821}
8822
8823func (s *TargetVpnGatewayList) MarshalJSON() ([]byte, error) {
8824	type noMethod TargetVpnGatewayList
8825	raw := noMethod(*s)
8826	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8827}
8828
8829type TargetVpnGatewaysScopedList struct {
8830	// TargetVpnGateways: [Output Only] List of target vpn gateways
8831	// contained in this scope.
8832	TargetVpnGateways []*TargetVpnGateway `json:"targetVpnGateways,omitempty"`
8833
8834	// Warning: [Output Only] Informational warning which replaces the list
8835	// of addresses when the list is empty.
8836	Warning *TargetVpnGatewaysScopedListWarning `json:"warning,omitempty"`
8837
8838	// ForceSendFields is a list of field names (e.g. "TargetVpnGateways")
8839	// to unconditionally include in API requests. By default, fields with
8840	// empty values are omitted from API requests. However, any non-pointer,
8841	// non-interface field appearing in ForceSendFields will be sent to the
8842	// server regardless of whether the field is empty or not. This may be
8843	// used to include empty fields in Patch requests.
8844	ForceSendFields []string `json:"-"`
8845}
8846
8847func (s *TargetVpnGatewaysScopedList) MarshalJSON() ([]byte, error) {
8848	type noMethod TargetVpnGatewaysScopedList
8849	raw := noMethod(*s)
8850	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8851}
8852
8853// TargetVpnGatewaysScopedListWarning: [Output Only] Informational
8854// warning which replaces the list of addresses when the list is empty.
8855type TargetVpnGatewaysScopedListWarning struct {
8856	// Code: [Output Only] A warning code, if applicable. For example,
8857	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
8858	// the response.
8859	//
8860	// Possible values:
8861	//   "CLEANUP_FAILED"
8862	//   "DEPRECATED_RESOURCE_USED"
8863	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
8864	//   "INJECTED_KERNELS_DEPRECATED"
8865	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
8866	//   "NEXT_HOP_CANNOT_IP_FORWARD"
8867	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
8868	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
8869	//   "NEXT_HOP_NOT_RUNNING"
8870	//   "NOT_CRITICAL_ERROR"
8871	//   "NO_RESULTS_ON_PAGE"
8872	//   "REQUIRED_TOS_AGREEMENT"
8873	//   "RESOURCE_NOT_DELETED"
8874	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
8875	//   "UNREACHABLE"
8876	Code string `json:"code,omitempty"`
8877
8878	// Data: [Output Only] Metadata about this warning in key: value format.
8879	// For example:
8880	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
8881	Data []*TargetVpnGatewaysScopedListWarningData `json:"data,omitempty"`
8882
8883	// Message: [Output Only] A human-readable description of the warning
8884	// code.
8885	Message string `json:"message,omitempty"`
8886
8887	// ForceSendFields is a list of field names (e.g. "Code") to
8888	// unconditionally include in API requests. By default, fields with
8889	// empty values are omitted from API requests. However, any non-pointer,
8890	// non-interface field appearing in ForceSendFields will be sent to the
8891	// server regardless of whether the field is empty or not. This may be
8892	// used to include empty fields in Patch requests.
8893	ForceSendFields []string `json:"-"`
8894}
8895
8896func (s *TargetVpnGatewaysScopedListWarning) MarshalJSON() ([]byte, error) {
8897	type noMethod TargetVpnGatewaysScopedListWarning
8898	raw := noMethod(*s)
8899	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8900}
8901
8902type TargetVpnGatewaysScopedListWarningData struct {
8903	// Key: [Output Only] A key that provides more detail on the warning
8904	// being returned. For example, for warnings where there are no results
8905	// in a list request for a particular zone, this key might be scope and
8906	// the key value might be the zone name. Other examples might be a key
8907	// indicating a deprecated resource and a suggested replacement, or a
8908	// warning about invalid network settings (for example, if an instance
8909	// attempts to perform IP forwarding but is not enabled for IP
8910	// forwarding).
8911	Key string `json:"key,omitempty"`
8912
8913	// Value: [Output Only] A warning data value corresponding to the key.
8914	Value string `json:"value,omitempty"`
8915
8916	// ForceSendFields is a list of field names (e.g. "Key") to
8917	// unconditionally include in API requests. By default, fields with
8918	// empty values are omitted from API requests. However, any non-pointer,
8919	// non-interface field appearing in ForceSendFields will be sent to the
8920	// server regardless of whether the field is empty or not. This may be
8921	// used to include empty fields in Patch requests.
8922	ForceSendFields []string `json:"-"`
8923}
8924
8925func (s *TargetVpnGatewaysScopedListWarningData) MarshalJSON() ([]byte, error) {
8926	type noMethod TargetVpnGatewaysScopedListWarningData
8927	raw := noMethod(*s)
8928	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8929}
8930
8931type TestFailure struct {
8932	ActualService string `json:"actualService,omitempty"`
8933
8934	ExpectedService string `json:"expectedService,omitempty"`
8935
8936	Host string `json:"host,omitempty"`
8937
8938	Path string `json:"path,omitempty"`
8939
8940	// ForceSendFields is a list of field names (e.g. "ActualService") to
8941	// unconditionally include in API requests. By default, fields with
8942	// empty values are omitted from API requests. However, any non-pointer,
8943	// non-interface field appearing in ForceSendFields will be sent to the
8944	// server regardless of whether the field is empty or not. This may be
8945	// used to include empty fields in Patch requests.
8946	ForceSendFields []string `json:"-"`
8947}
8948
8949func (s *TestFailure) MarshalJSON() ([]byte, error) {
8950	type noMethod TestFailure
8951	raw := noMethod(*s)
8952	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8953}
8954
8955type TestPermissionsRequest struct {
8956	// Permissions: The set of permissions to check for the 'resource'.
8957	// Permissions with wildcards (such as '*' or 'storage.*') are not
8958	// allowed.
8959	Permissions []string `json:"permissions,omitempty"`
8960
8961	// ForceSendFields is a list of field names (e.g. "Permissions") to
8962	// unconditionally include in API requests. By default, fields with
8963	// empty values are omitted from API requests. However, any non-pointer,
8964	// non-interface field appearing in ForceSendFields will be sent to the
8965	// server regardless of whether the field is empty or not. This may be
8966	// used to include empty fields in Patch requests.
8967	ForceSendFields []string `json:"-"`
8968}
8969
8970func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) {
8971	type noMethod TestPermissionsRequest
8972	raw := noMethod(*s)
8973	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8974}
8975
8976type TestPermissionsResponse struct {
8977	// Permissions: A subset of `TestPermissionsRequest.permissions` that
8978	// the caller is allowed.
8979	Permissions []string `json:"permissions,omitempty"`
8980
8981	// ServerResponse contains the HTTP response code and headers from the
8982	// server.
8983	googleapi.ServerResponse `json:"-"`
8984
8985	// ForceSendFields is a list of field names (e.g. "Permissions") to
8986	// unconditionally include in API requests. By default, fields with
8987	// empty values are omitted from API requests. However, any non-pointer,
8988	// non-interface field appearing in ForceSendFields will be sent to the
8989	// server regardless of whether the field is empty or not. This may be
8990	// used to include empty fields in Patch requests.
8991	ForceSendFields []string `json:"-"`
8992}
8993
8994func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) {
8995	type noMethod TestPermissionsResponse
8996	raw := noMethod(*s)
8997	return gensupport.MarshalJSON(raw, s.ForceSendFields)
8998}
8999
9000// UrlMap: A UrlMap resource. This resource defines the mapping from URL
9001// to the BackendService resource, based on the "longest-match" of the
9002// URL's host and path.
9003type UrlMap struct {
9004	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
9005	// format.
9006	CreationTimestamp string `json:"creationTimestamp,omitempty"`
9007
9008	// DefaultService: The URL of the BackendService resource if none of the
9009	// hostRules match.
9010	DefaultService string `json:"defaultService,omitempty"`
9011
9012	// Description: An optional description of this resource. Provide this
9013	// property when you create the resource.
9014	Description string `json:"description,omitempty"`
9015
9016	// Fingerprint: Fingerprint of this resource. A hash of the contents
9017	// stored in this object. This field is used in optimistic locking. This
9018	// field will be ignored when inserting a UrlMap. An up-to-date
9019	// fingerprint must be provided in order to update the UrlMap.
9020	Fingerprint string `json:"fingerprint,omitempty"`
9021
9022	// HostRules: The list of HostRules to use against the URL.
9023	HostRules []*HostRule `json:"hostRules,omitempty"`
9024
9025	// Id: [Output Only] The unique identifier for the resource. This
9026	// identifier is defined by the server.
9027	Id uint64 `json:"id,omitempty,string"`
9028
9029	// Kind: [Output Only] Type of the resource. Always compute#urlMaps for
9030	// url maps.
9031	Kind string `json:"kind,omitempty"`
9032
9033	// Name: Name of the resource. Provided by the client when the resource
9034	// is created. The name must be 1-63 characters long, and comply with
9035	// RFC1035. Specifically, the name must be 1-63 characters long and
9036	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
9037	// the first character must be a lowercase letter, and all following
9038	// characters must be a dash, lowercase letter, or digit, except the
9039	// last character, which cannot be a dash.
9040	Name string `json:"name,omitempty"`
9041
9042	// PathMatchers: The list of named PathMatchers to use against the URL.
9043	PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"`
9044
9045	// SelfLink: [Output Only] Server-defined URL for the resource.
9046	SelfLink string `json:"selfLink,omitempty"`
9047
9048	// Tests: The list of expected URL mappings. Request to update this
9049	// UrlMap will succeed only all of the test cases pass.
9050	Tests []*UrlMapTest `json:"tests,omitempty"`
9051
9052	// ServerResponse contains the HTTP response code and headers from the
9053	// server.
9054	googleapi.ServerResponse `json:"-"`
9055
9056	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
9057	// to unconditionally include in API requests. By default, fields with
9058	// empty values are omitted from API requests. However, any non-pointer,
9059	// non-interface field appearing in ForceSendFields will be sent to the
9060	// server regardless of whether the field is empty or not. This may be
9061	// used to include empty fields in Patch requests.
9062	ForceSendFields []string `json:"-"`
9063}
9064
9065func (s *UrlMap) MarshalJSON() ([]byte, error) {
9066	type noMethod UrlMap
9067	raw := noMethod(*s)
9068	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9069}
9070
9071// UrlMapList: Contains a list of UrlMap resources.
9072type UrlMapList struct {
9073	// Id: [Output Only] Unique identifier for the resource. Set by the
9074	// server.
9075	Id string `json:"id,omitempty"`
9076
9077	// Items: A list of UrlMap resources.
9078	Items []*UrlMap `json:"items,omitempty"`
9079
9080	// Kind: Type of resource.
9081	Kind string `json:"kind,omitempty"`
9082
9083	// NextPageToken: [Output Only] This token allows you to get the next
9084	// page of results for list requests. If the number of results is larger
9085	// than maxResults, use the nextPageToken as a value for the query
9086	// parameter pageToken in the next list request. Subsequent list
9087	// requests will have their own nextPageToken to continue paging through
9088	// the results.
9089	NextPageToken string `json:"nextPageToken,omitempty"`
9090
9091	// SelfLink: [Output Only] Server-defined URL for this resource.
9092	SelfLink string `json:"selfLink,omitempty"`
9093
9094	// ServerResponse contains the HTTP response code and headers from the
9095	// server.
9096	googleapi.ServerResponse `json:"-"`
9097
9098	// ForceSendFields is a list of field names (e.g. "Id") to
9099	// unconditionally include in API requests. By default, fields with
9100	// empty values are omitted from API requests. However, any non-pointer,
9101	// non-interface field appearing in ForceSendFields will be sent to the
9102	// server regardless of whether the field is empty or not. This may be
9103	// used to include empty fields in Patch requests.
9104	ForceSendFields []string `json:"-"`
9105}
9106
9107func (s *UrlMapList) MarshalJSON() ([]byte, error) {
9108	type noMethod UrlMapList
9109	raw := noMethod(*s)
9110	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9111}
9112
9113type UrlMapReference struct {
9114	UrlMap string `json:"urlMap,omitempty"`
9115
9116	// ForceSendFields is a list of field names (e.g. "UrlMap") to
9117	// unconditionally include in API requests. By default, fields with
9118	// empty values are omitted from API requests. However, any non-pointer,
9119	// non-interface field appearing in ForceSendFields will be sent to the
9120	// server regardless of whether the field is empty or not. This may be
9121	// used to include empty fields in Patch requests.
9122	ForceSendFields []string `json:"-"`
9123}
9124
9125func (s *UrlMapReference) MarshalJSON() ([]byte, error) {
9126	type noMethod UrlMapReference
9127	raw := noMethod(*s)
9128	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9129}
9130
9131// UrlMapTest: Message for the expected URL mappings.
9132type UrlMapTest struct {
9133	// Description: Description of this test case.
9134	Description string `json:"description,omitempty"`
9135
9136	// Host: Host portion of the URL.
9137	Host string `json:"host,omitempty"`
9138
9139	// Path: Path portion of the URL.
9140	Path string `json:"path,omitempty"`
9141
9142	// Service: Expected BackendService resource the given URL should be
9143	// mapped to.
9144	Service string `json:"service,omitempty"`
9145
9146	// ForceSendFields is a list of field names (e.g. "Description") to
9147	// unconditionally include in API requests. By default, fields with
9148	// empty values are omitted from API requests. However, any non-pointer,
9149	// non-interface field appearing in ForceSendFields will be sent to the
9150	// server regardless of whether the field is empty or not. This may be
9151	// used to include empty fields in Patch requests.
9152	ForceSendFields []string `json:"-"`
9153}
9154
9155func (s *UrlMapTest) MarshalJSON() ([]byte, error) {
9156	type noMethod UrlMapTest
9157	raw := noMethod(*s)
9158	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9159}
9160
9161// UrlMapValidationResult: Message representing the validation result
9162// for a UrlMap.
9163type UrlMapValidationResult struct {
9164	LoadErrors []string `json:"loadErrors,omitempty"`
9165
9166	// LoadSucceeded: Whether the given UrlMap can be successfully loaded.
9167	// If false, 'loadErrors' indicates the reasons.
9168	LoadSucceeded bool `json:"loadSucceeded,omitempty"`
9169
9170	TestFailures []*TestFailure `json:"testFailures,omitempty"`
9171
9172	// TestPassed: If successfully loaded, this field indicates whether the
9173	// test passed. If false, 'testFailures's indicate the reason of
9174	// failure.
9175	TestPassed bool `json:"testPassed,omitempty"`
9176
9177	// ForceSendFields is a list of field names (e.g. "LoadErrors") to
9178	// unconditionally include in API requests. By default, fields with
9179	// empty values are omitted from API requests. However, any non-pointer,
9180	// non-interface field appearing in ForceSendFields will be sent to the
9181	// server regardless of whether the field is empty or not. This may be
9182	// used to include empty fields in Patch requests.
9183	ForceSendFields []string `json:"-"`
9184}
9185
9186func (s *UrlMapValidationResult) MarshalJSON() ([]byte, error) {
9187	type noMethod UrlMapValidationResult
9188	raw := noMethod(*s)
9189	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9190}
9191
9192type UrlMapsValidateRequest struct {
9193	// Resource: Content of the UrlMap to be validated.
9194	Resource *UrlMap `json:"resource,omitempty"`
9195
9196	// ForceSendFields is a list of field names (e.g. "Resource") to
9197	// unconditionally include in API requests. By default, fields with
9198	// empty values are omitted from API requests. However, any non-pointer,
9199	// non-interface field appearing in ForceSendFields will be sent to the
9200	// server regardless of whether the field is empty or not. This may be
9201	// used to include empty fields in Patch requests.
9202	ForceSendFields []string `json:"-"`
9203}
9204
9205func (s *UrlMapsValidateRequest) MarshalJSON() ([]byte, error) {
9206	type noMethod UrlMapsValidateRequest
9207	raw := noMethod(*s)
9208	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9209}
9210
9211type UrlMapsValidateResponse struct {
9212	Result *UrlMapValidationResult `json:"result,omitempty"`
9213
9214	// ServerResponse contains the HTTP response code and headers from the
9215	// server.
9216	googleapi.ServerResponse `json:"-"`
9217
9218	// ForceSendFields is a list of field names (e.g. "Result") to
9219	// unconditionally include in API requests. By default, fields with
9220	// empty values are omitted from API requests. However, any non-pointer,
9221	// non-interface field appearing in ForceSendFields will be sent to the
9222	// server regardless of whether the field is empty or not. This may be
9223	// used to include empty fields in Patch requests.
9224	ForceSendFields []string `json:"-"`
9225}
9226
9227func (s *UrlMapsValidateResponse) MarshalJSON() ([]byte, error) {
9228	type noMethod UrlMapsValidateResponse
9229	raw := noMethod(*s)
9230	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9231}
9232
9233// UsageExportLocation: The location in Cloud Storage and naming method
9234// of the daily usage report. Contains bucket_name and report_name
9235// prefix.
9236type UsageExportLocation struct {
9237	// BucketName: The name of an existing bucket in Cloud Storage where the
9238	// usage report object is stored. The Google Service Account is granted
9239	// write access to this bucket. This can either be the bucket name by
9240	// itself, such as example-bucket, or the bucket name with gs:// or
9241	// https://storage.googleapis.com/ in front of it, such as
9242	// gs://example-bucket.
9243	BucketName string `json:"bucketName,omitempty"`
9244
9245	// ReportNamePrefix: An optional prefix for the name of the usage report
9246	// object stored in bucketName. If not supplied, defaults to usage. The
9247	// report is stored as a CSV file named
9248	// report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the
9249	// usage according to Pacific Time. If you supply a prefix, it should
9250	// conform to Cloud Storage object naming conventions.
9251	ReportNamePrefix string `json:"reportNamePrefix,omitempty"`
9252
9253	// ForceSendFields is a list of field names (e.g. "BucketName") to
9254	// unconditionally include in API requests. By default, fields with
9255	// empty values are omitted from API requests. However, any non-pointer,
9256	// non-interface field appearing in ForceSendFields will be sent to the
9257	// server regardless of whether the field is empty or not. This may be
9258	// used to include empty fields in Patch requests.
9259	ForceSendFields []string `json:"-"`
9260}
9261
9262func (s *UsageExportLocation) MarshalJSON() ([]byte, error) {
9263	type noMethod UsageExportLocation
9264	raw := noMethod(*s)
9265	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9266}
9267
9268type VpnTunnel struct {
9269	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
9270	// format.
9271	CreationTimestamp string `json:"creationTimestamp,omitempty"`
9272
9273	// Description: An optional description of this resource. Provide this
9274	// property when you create the resource.
9275	Description string `json:"description,omitempty"`
9276
9277	// DetailedStatus: [Output Only] Detailed status message for the VPN
9278	// tunnel.
9279	DetailedStatus string `json:"detailedStatus,omitempty"`
9280
9281	// Id: [Output Only] The unique identifier for the resource. This
9282	// identifier is defined by the server.
9283	Id uint64 `json:"id,omitempty,string"`
9284
9285	// IkeVersion: IKE protocol version to use when establishing the VPN
9286	// tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2.
9287	// Default version is 2.
9288	IkeVersion int64 `json:"ikeVersion,omitempty"`
9289
9290	// Kind: [Output Only] Type of resource. Always compute#vpnTunnel for
9291	// VPN tunnels.
9292	Kind string `json:"kind,omitempty"`
9293
9294	// LocalTrafficSelector: Local traffic selector to use when establishing
9295	// the VPN tunnel with peer VPN gateway. The value should be a CIDR
9296	// formatted string, for example: 192.168.0.0/16. The ranges should be
9297	// disjoint.
9298	LocalTrafficSelector []string `json:"localTrafficSelector,omitempty"`
9299
9300	// Name: Name of the resource. Provided by the client when the resource
9301	// is created. The name must be 1-63 characters long, and comply with
9302	// RFC1035. Specifically, the name must be 1-63 characters long and
9303	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
9304	// the first character must be a lowercase letter, and all following
9305	// characters must be a dash, lowercase letter, or digit, except the
9306	// last character, which cannot be a dash.
9307	Name string `json:"name,omitempty"`
9308
9309	// PeerIp: IP address of the peer VPN gateway.
9310	PeerIp string `json:"peerIp,omitempty"`
9311
9312	// Region: [Output Only] URL of the region where the VPN tunnel resides.
9313	Region string `json:"region,omitempty"`
9314
9315	// Router: URL of router resource to be used for dynamic routing.
9316	Router string `json:"router,omitempty"`
9317
9318	// SelfLink: [Output Only] Server-defined URL for the resource.
9319	SelfLink string `json:"selfLink,omitempty"`
9320
9321	// SharedSecret: Shared secret used to set the secure session between
9322	// the Cloud VPN gateway and the peer VPN gateway.
9323	SharedSecret string `json:"sharedSecret,omitempty"`
9324
9325	// SharedSecretHash: Hash of the shared secret.
9326	SharedSecretHash string `json:"sharedSecretHash,omitempty"`
9327
9328	// Status: [Output Only] The status of the VPN tunnel.
9329	//
9330	// Possible values:
9331	//   "ALLOCATING_RESOURCES"
9332	//   "AUTHORIZATION_ERROR"
9333	//   "DEPROVISIONING"
9334	//   "ESTABLISHED"
9335	//   "FAILED"
9336	//   "FIRST_HANDSHAKE"
9337	//   "NEGOTIATION_FAILURE"
9338	//   "NETWORK_ERROR"
9339	//   "NO_INCOMING_PACKETS"
9340	//   "PROVISIONING"
9341	//   "REJECTED"
9342	//   "WAITING_FOR_FULL_CONFIG"
9343	Status string `json:"status,omitempty"`
9344
9345	// TargetVpnGateway: URL of the VPN gateway with which this VPN tunnel
9346	// is associated. Provided by the client when the VPN tunnel is created.
9347	TargetVpnGateway string `json:"targetVpnGateway,omitempty"`
9348
9349	// ServerResponse contains the HTTP response code and headers from the
9350	// server.
9351	googleapi.ServerResponse `json:"-"`
9352
9353	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
9354	// to unconditionally include in API requests. By default, fields with
9355	// empty values are omitted from API requests. However, any non-pointer,
9356	// non-interface field appearing in ForceSendFields will be sent to the
9357	// server regardless of whether the field is empty or not. This may be
9358	// used to include empty fields in Patch requests.
9359	ForceSendFields []string `json:"-"`
9360}
9361
9362func (s *VpnTunnel) MarshalJSON() ([]byte, error) {
9363	type noMethod VpnTunnel
9364	raw := noMethod(*s)
9365	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9366}
9367
9368type VpnTunnelAggregatedList struct {
9369	// Id: [Output Only] The unique identifier for the resource. This
9370	// identifier is defined by the server.
9371	Id string `json:"id,omitempty"`
9372
9373	// Items: [Output Only] A map of scoped vpn tunnel lists.
9374	Items map[string]VpnTunnelsScopedList `json:"items,omitempty"`
9375
9376	// Kind: [Output Only] Type of resource. Always compute#vpnTunnel for
9377	// VPN tunnels.
9378	Kind string `json:"kind,omitempty"`
9379
9380	// NextPageToken: [Output Only] This token allows you to get the next
9381	// page of results for list requests. If the number of results is larger
9382	// than maxResults, use the nextPageToken as a value for the query
9383	// parameter pageToken in the next list request. Subsequent list
9384	// requests will have their own nextPageToken to continue paging through
9385	// the results.
9386	NextPageToken string `json:"nextPageToken,omitempty"`
9387
9388	// SelfLink: [Output Only] Server-defined URL for this resource.
9389	SelfLink string `json:"selfLink,omitempty"`
9390
9391	// ServerResponse contains the HTTP response code and headers from the
9392	// server.
9393	googleapi.ServerResponse `json:"-"`
9394
9395	// ForceSendFields is a list of field names (e.g. "Id") to
9396	// unconditionally include in API requests. By default, fields with
9397	// empty values are omitted from API requests. However, any non-pointer,
9398	// non-interface field appearing in ForceSendFields will be sent to the
9399	// server regardless of whether the field is empty or not. This may be
9400	// used to include empty fields in Patch requests.
9401	ForceSendFields []string `json:"-"`
9402}
9403
9404func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) {
9405	type noMethod VpnTunnelAggregatedList
9406	raw := noMethod(*s)
9407	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9408}
9409
9410// VpnTunnelList: Contains a list of VpnTunnel resources.
9411type VpnTunnelList struct {
9412	// Id: [Output Only] The unique identifier for the resource. This
9413	// identifier is defined by the server.
9414	Id string `json:"id,omitempty"`
9415
9416	// Items: [Output Only] A list of VpnTunnel resources.
9417	Items []*VpnTunnel `json:"items,omitempty"`
9418
9419	// Kind: [Output Only] Type of resource. Always compute#vpnTunnel for
9420	// VPN tunnels.
9421	Kind string `json:"kind,omitempty"`
9422
9423	// NextPageToken: [Output Only] This token allows you to get the next
9424	// page of results for list requests. If the number of results is larger
9425	// than maxResults, use the nextPageToken as a value for the query
9426	// parameter pageToken in the next list request. Subsequent list
9427	// requests will have their own nextPageToken to continue paging through
9428	// the results.
9429	NextPageToken string `json:"nextPageToken,omitempty"`
9430
9431	// SelfLink: [Output Only] Server-defined URL for the resource.
9432	SelfLink string `json:"selfLink,omitempty"`
9433
9434	// ServerResponse contains the HTTP response code and headers from the
9435	// server.
9436	googleapi.ServerResponse `json:"-"`
9437
9438	// ForceSendFields is a list of field names (e.g. "Id") to
9439	// unconditionally include in API requests. By default, fields with
9440	// empty values are omitted from API requests. However, any non-pointer,
9441	// non-interface field appearing in ForceSendFields will be sent to the
9442	// server regardless of whether the field is empty or not. This may be
9443	// used to include empty fields in Patch requests.
9444	ForceSendFields []string `json:"-"`
9445}
9446
9447func (s *VpnTunnelList) MarshalJSON() ([]byte, error) {
9448	type noMethod VpnTunnelList
9449	raw := noMethod(*s)
9450	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9451}
9452
9453type VpnTunnelsScopedList struct {
9454	// VpnTunnels: List of vpn tunnels contained in this scope.
9455	VpnTunnels []*VpnTunnel `json:"vpnTunnels,omitempty"`
9456
9457	// Warning: Informational warning which replaces the list of addresses
9458	// when the list is empty.
9459	Warning *VpnTunnelsScopedListWarning `json:"warning,omitempty"`
9460
9461	// ForceSendFields is a list of field names (e.g. "VpnTunnels") to
9462	// unconditionally include in API requests. By default, fields with
9463	// empty values are omitted from API requests. However, any non-pointer,
9464	// non-interface field appearing in ForceSendFields will be sent to the
9465	// server regardless of whether the field is empty or not. This may be
9466	// used to include empty fields in Patch requests.
9467	ForceSendFields []string `json:"-"`
9468}
9469
9470func (s *VpnTunnelsScopedList) MarshalJSON() ([]byte, error) {
9471	type noMethod VpnTunnelsScopedList
9472	raw := noMethod(*s)
9473	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9474}
9475
9476// VpnTunnelsScopedListWarning: Informational warning which replaces the
9477// list of addresses when the list is empty.
9478type VpnTunnelsScopedListWarning struct {
9479	// Code: [Output Only] A warning code, if applicable. For example,
9480	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
9481	// the response.
9482	//
9483	// Possible values:
9484	//   "CLEANUP_FAILED"
9485	//   "DEPRECATED_RESOURCE_USED"
9486	//   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
9487	//   "INJECTED_KERNELS_DEPRECATED"
9488	//   "NEXT_HOP_ADDRESS_NOT_ASSIGNED"
9489	//   "NEXT_HOP_CANNOT_IP_FORWARD"
9490	//   "NEXT_HOP_INSTANCE_NOT_FOUND"
9491	//   "NEXT_HOP_INSTANCE_NOT_ON_NETWORK"
9492	//   "NEXT_HOP_NOT_RUNNING"
9493	//   "NOT_CRITICAL_ERROR"
9494	//   "NO_RESULTS_ON_PAGE"
9495	//   "REQUIRED_TOS_AGREEMENT"
9496	//   "RESOURCE_NOT_DELETED"
9497	//   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
9498	//   "UNREACHABLE"
9499	Code string `json:"code,omitempty"`
9500
9501	// Data: [Output Only] Metadata about this warning in key: value format.
9502	// For example:
9503	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
9504	Data []*VpnTunnelsScopedListWarningData `json:"data,omitempty"`
9505
9506	// Message: [Output Only] A human-readable description of the warning
9507	// code.
9508	Message string `json:"message,omitempty"`
9509
9510	// ForceSendFields is a list of field names (e.g. "Code") to
9511	// unconditionally include in API requests. By default, fields with
9512	// empty values are omitted from API requests. However, any non-pointer,
9513	// non-interface field appearing in ForceSendFields will be sent to the
9514	// server regardless of whether the field is empty or not. This may be
9515	// used to include empty fields in Patch requests.
9516	ForceSendFields []string `json:"-"`
9517}
9518
9519func (s *VpnTunnelsScopedListWarning) MarshalJSON() ([]byte, error) {
9520	type noMethod VpnTunnelsScopedListWarning
9521	raw := noMethod(*s)
9522	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9523}
9524
9525type VpnTunnelsScopedListWarningData struct {
9526	// Key: [Output Only] A key that provides more detail on the warning
9527	// being returned. For example, for warnings where there are no results
9528	// in a list request for a particular zone, this key might be scope and
9529	// the key value might be the zone name. Other examples might be a key
9530	// indicating a deprecated resource and a suggested replacement, or a
9531	// warning about invalid network settings (for example, if an instance
9532	// attempts to perform IP forwarding but is not enabled for IP
9533	// forwarding).
9534	Key string `json:"key,omitempty"`
9535
9536	// Value: [Output Only] A warning data value corresponding to the key.
9537	Value string `json:"value,omitempty"`
9538
9539	// ForceSendFields is a list of field names (e.g. "Key") to
9540	// unconditionally include in API requests. By default, fields with
9541	// empty values are omitted from API requests. However, any non-pointer,
9542	// non-interface field appearing in ForceSendFields will be sent to the
9543	// server regardless of whether the field is empty or not. This may be
9544	// used to include empty fields in Patch requests.
9545	ForceSendFields []string `json:"-"`
9546}
9547
9548func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) {
9549	type noMethod VpnTunnelsScopedListWarningData
9550	raw := noMethod(*s)
9551	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9552}
9553
9554// Zone: A Zone resource.
9555type Zone struct {
9556	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
9557	// format.
9558	CreationTimestamp string `json:"creationTimestamp,omitempty"`
9559
9560	// Deprecated: [Output Only] The deprecation status associated with this
9561	// zone.
9562	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`
9563
9564	// Description: [Output Only] Textual description of the resource.
9565	Description string `json:"description,omitempty"`
9566
9567	// Id: [Output Only] The unique identifier for the resource. This
9568	// identifier is defined by the server.
9569	Id uint64 `json:"id,omitempty,string"`
9570
9571	// Kind: [Output Only] Type of the resource. Always compute#zone for
9572	// zones.
9573	Kind string `json:"kind,omitempty"`
9574
9575	// MaintenanceWindows: [Output Only] Any scheduled maintenance windows
9576	// for this zone. When the zone is in a maintenance window, all
9577	// resources which reside in the zone will be unavailable. For more
9578	// information, see Maintenance Windows
9579	MaintenanceWindows []*ZoneMaintenanceWindows `json:"maintenanceWindows,omitempty"`
9580
9581	// Name: [Output Only] Name of the resource.
9582	Name string `json:"name,omitempty"`
9583
9584	// Region: [Output Only] Full URL reference to the region which hosts
9585	// the zone.
9586	Region string `json:"region,omitempty"`
9587
9588	// SelfLink: [Output Only] Server-defined URL for the resource.
9589	SelfLink string `json:"selfLink,omitempty"`
9590
9591	// Status: [Output Only] Status of the zone, either UP or DOWN.
9592	//
9593	// Possible values:
9594	//   "DOWN"
9595	//   "UP"
9596	Status string `json:"status,omitempty"`
9597
9598	// ServerResponse contains the HTTP response code and headers from the
9599	// server.
9600	googleapi.ServerResponse `json:"-"`
9601
9602	// ForceSendFields is a list of field names (e.g. "CreationTimestamp")
9603	// to unconditionally include in API requests. By default, fields with
9604	// empty values are omitted from API requests. However, any non-pointer,
9605	// non-interface field appearing in ForceSendFields will be sent to the
9606	// server regardless of whether the field is empty or not. This may be
9607	// used to include empty fields in Patch requests.
9608	ForceSendFields []string `json:"-"`
9609}
9610
9611func (s *Zone) MarshalJSON() ([]byte, error) {
9612	type noMethod Zone
9613	raw := noMethod(*s)
9614	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9615}
9616
9617type ZoneMaintenanceWindows struct {
9618	// BeginTime: [Output Only] Starting time of the maintenance window, in
9619	// RFC3339 format.
9620	BeginTime string `json:"beginTime,omitempty"`
9621
9622	// Description: [Output Only] Textual description of the maintenance
9623	// window.
9624	Description string `json:"description,omitempty"`
9625
9626	// EndTime: [Output Only] Ending time of the maintenance window, in
9627	// RFC3339 format.
9628	EndTime string `json:"endTime,omitempty"`
9629
9630	// Name: [Output Only] Name of the maintenance window.
9631	Name string `json:"name,omitempty"`
9632
9633	// ForceSendFields is a list of field names (e.g. "BeginTime") to
9634	// unconditionally include in API requests. By default, fields with
9635	// empty values are omitted from API requests. However, any non-pointer,
9636	// non-interface field appearing in ForceSendFields will be sent to the
9637	// server regardless of whether the field is empty or not. This may be
9638	// used to include empty fields in Patch requests.
9639	ForceSendFields []string `json:"-"`
9640}
9641
9642func (s *ZoneMaintenanceWindows) MarshalJSON() ([]byte, error) {
9643	type noMethod ZoneMaintenanceWindows
9644	raw := noMethod(*s)
9645	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9646}
9647
9648// ZoneList: Contains a list of zone resources.
9649type ZoneList struct {
9650	// Id: [Output Only] Unique identifier for the resource; defined by the
9651	// server.
9652	Id string `json:"id,omitempty"`
9653
9654	// Items: [Output Only] A list of Zone resources.
9655	Items []*Zone `json:"items,omitempty"`
9656
9657	// Kind: Type of resource.
9658	Kind string `json:"kind,omitempty"`
9659
9660	// NextPageToken: [Output Only] This token allows you to get the next
9661	// page of results for list requests. If the number of results is larger
9662	// than maxResults, use the nextPageToken as a value for the query
9663	// parameter pageToken in the next list request. Subsequent list
9664	// requests will have their own nextPageToken to continue paging through
9665	// the results.
9666	NextPageToken string `json:"nextPageToken,omitempty"`
9667
9668	// SelfLink: [Output Only] Server-defined URL for this resource.
9669	SelfLink string `json:"selfLink,omitempty"`
9670
9671	// ServerResponse contains the HTTP response code and headers from the
9672	// server.
9673	googleapi.ServerResponse `json:"-"`
9674
9675	// ForceSendFields is a list of field names (e.g. "Id") to
9676	// unconditionally include in API requests. By default, fields with
9677	// empty values are omitted from API requests. However, any non-pointer,
9678	// non-interface field appearing in ForceSendFields will be sent to the
9679	// server regardless of whether the field is empty or not. This may be
9680	// used to include empty fields in Patch requests.
9681	ForceSendFields []string `json:"-"`
9682}
9683
9684func (s *ZoneList) MarshalJSON() ([]byte, error) {
9685	type noMethod ZoneList
9686	raw := noMethod(*s)
9687	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9688}
9689
9690type ZoneSetLabelsRequest struct {
9691	// LabelFingerprint: Fingerprint of the previous set of labels for this
9692	// resource, used to detect conflicts.
9693	LabelFingerprint string `json:"labelFingerprint,omitempty"`
9694
9695	// Labels: The new labels for the resource.
9696	Labels map[string]string `json:"labels,omitempty"`
9697
9698	// ForceSendFields is a list of field names (e.g. "LabelFingerprint") to
9699	// unconditionally include in API requests. By default, fields with
9700	// empty values are omitted from API requests. However, any non-pointer,
9701	// non-interface field appearing in ForceSendFields will be sent to the
9702	// server regardless of whether the field is empty or not. This may be
9703	// used to include empty fields in Patch requests.
9704	ForceSendFields []string `json:"-"`
9705}
9706
9707func (s *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) {
9708	type noMethod ZoneSetLabelsRequest
9709	raw := noMethod(*s)
9710	return gensupport.MarshalJSON(raw, s.ForceSendFields)
9711}
9712
9713// method id "compute.addresses.aggregatedList":
9714
9715type AddressesAggregatedListCall struct {
9716	s            *Service
9717	project      string
9718	urlParams_   gensupport.URLParams
9719	ifNoneMatch_ string
9720	ctx_         context.Context
9721}
9722
9723// AggregatedList: Retrieves an aggregated list of addresses.
9724// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/aggregatedList
9725func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall {
9726	c := &AddressesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9727	c.project = project
9728	return c
9729}
9730
9731// Filter sets the optional parameter "filter": Sets a filter expression
9732// for filtering listed resources, in the form filter={expression}. Your
9733// {expression} must be in the format: field_name comparison_string
9734// literal_string.
9735//
9736// The field_name is the name of the field you want to compare. Only
9737// atomic field types are supported (string, number, boolean). The
9738// comparison_string must be either eq (equals) or ne (not equals). The
9739// literal_string is the string value to filter to. The literal value
9740// must be valid for the type of field you are filtering by (string,
9741// number, boolean). For string fields, the literal value is interpreted
9742// as a regular expression using RE2 syntax. The literal value must
9743// match the entire field.
9744//
9745// For example, to filter for instances that do not have a name of
9746// example-instance, you would use filter=name ne
9747// example-instance.
9748//
9749// Compute Engine Beta API Only: If you use filtering in the Beta API,
9750// you can also filter on nested fields. For example, you could filter
9751// on instances that have set the scheduling.automaticRestart field to
9752// true. In particular, use filtering on nested fields to take advantage
9753// of instance labels to organize and filter results based on label
9754// values.
9755//
9756// The Beta API also supports filtering on multiple expressions by
9757// providing each separate expression within parentheses. For example,
9758// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
9759// Multiple expressions are treated as AND expressions, meaning that
9760// resources must match all expressions to pass the filters.
9761func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall {
9762	c.urlParams_.Set("filter", filter)
9763	return c
9764}
9765
9766// MaxResults sets the optional parameter "maxResults": The maximum
9767// number of results per page that should be returned. If the number of
9768// available results is larger than maxResults, Compute Engine returns a
9769// nextPageToken that can be used to get the next page of results in
9770// subsequent list requests.
9771func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall {
9772	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
9773	return c
9774}
9775
9776// OrderBy sets the optional parameter "orderBy": Sorts list results by
9777// a certain order. By default, results are returned in alphanumerical
9778// order based on the resource name.
9779//
9780// You can also sort results in descending order based on the creation
9781// timestamp using orderBy="creationTimestamp desc". This sorts results
9782// based on the creationTimestamp field in reverse chronological order
9783// (newest result first). Use this to sort resources like operations so
9784// that the newest operation is returned first.
9785//
9786// Currently, only sorting by name or creationTimestamp desc is
9787// supported.
9788func (c *AddressesAggregatedListCall) OrderBy(orderBy string) *AddressesAggregatedListCall {
9789	c.urlParams_.Set("orderBy", orderBy)
9790	return c
9791}
9792
9793// PageToken sets the optional parameter "pageToken": Specifies a page
9794// token to use. Set pageToken to the nextPageToken returned by a
9795// previous list request to get the next page of results.
9796func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall {
9797	c.urlParams_.Set("pageToken", pageToken)
9798	return c
9799}
9800
9801// Fields allows partial responses to be retrieved. See
9802// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9803// for more information.
9804func (c *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall {
9805	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9806	return c
9807}
9808
9809// IfNoneMatch sets the optional parameter which makes the operation
9810// fail if the object's ETag matches the given value. This is useful for
9811// getting updates only after the object has changed since the last
9812// request. Use googleapi.IsNotModified to check whether the response
9813// error from Do is the result of In-None-Match.
9814func (c *AddressesAggregatedListCall) IfNoneMatch(entityTag string) *AddressesAggregatedListCall {
9815	c.ifNoneMatch_ = entityTag
9816	return c
9817}
9818
9819// Context sets the context to be used in this call's Do method. Any
9820// pending HTTP request will be aborted if the provided context is
9821// canceled.
9822func (c *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall {
9823	c.ctx_ = ctx
9824	return c
9825}
9826
9827func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
9828	var body io.Reader = nil
9829	c.urlParams_.Set("alt", alt)
9830	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/addresses")
9831	urls += "?" + c.urlParams_.Encode()
9832	req, _ := http.NewRequest("GET", urls, body)
9833	googleapi.Expand(req.URL, map[string]string{
9834		"project": c.project,
9835	})
9836	req.Header.Set("User-Agent", c.s.userAgent())
9837	if c.ifNoneMatch_ != "" {
9838		req.Header.Set("If-None-Match", c.ifNoneMatch_)
9839	}
9840	if c.ctx_ != nil {
9841		return ctxhttp.Do(c.ctx_, c.s.client, req)
9842	}
9843	return c.s.client.Do(req)
9844}
9845
9846// Do executes the "compute.addresses.aggregatedList" call.
9847// Exactly one of *AddressAggregatedList or error will be non-nil. Any
9848// non-2xx status code is an error. Response headers are in either
9849// *AddressAggregatedList.ServerResponse.Header or (if a response was
9850// returned at all) in error.(*googleapi.Error).Header. Use
9851// googleapi.IsNotModified to check whether the returned error was
9852// because http.StatusNotModified was returned.
9853func (c *AddressesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AddressAggregatedList, error) {
9854	gensupport.SetOptions(c.urlParams_, opts...)
9855	res, err := c.doRequest("json")
9856	if res != nil && res.StatusCode == http.StatusNotModified {
9857		if res.Body != nil {
9858			res.Body.Close()
9859		}
9860		return nil, &googleapi.Error{
9861			Code:   res.StatusCode,
9862			Header: res.Header,
9863		}
9864	}
9865	if err != nil {
9866		return nil, err
9867	}
9868	defer googleapi.CloseBody(res)
9869	if err := googleapi.CheckResponse(res); err != nil {
9870		return nil, err
9871	}
9872	ret := &AddressAggregatedList{
9873		ServerResponse: googleapi.ServerResponse{
9874			Header:         res.Header,
9875			HTTPStatusCode: res.StatusCode,
9876		},
9877	}
9878	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
9879		return nil, err
9880	}
9881	return ret, nil
9882	// {
9883	//   "description": "Retrieves an aggregated list of addresses.",
9884	//   "httpMethod": "GET",
9885	//   "id": "compute.addresses.aggregatedList",
9886	//   "parameterOrder": [
9887	//     "project"
9888	//   ],
9889	//   "parameters": {
9890	//     "filter": {
9891	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
9892	//       "location": "query",
9893	//       "type": "string"
9894	//     },
9895	//     "maxResults": {
9896	//       "default": "500",
9897	//       "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.",
9898	//       "format": "uint32",
9899	//       "location": "query",
9900	//       "maximum": "500",
9901	//       "minimum": "0",
9902	//       "type": "integer"
9903	//     },
9904	//     "orderBy": {
9905	//       "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.",
9906	//       "location": "query",
9907	//       "type": "string"
9908	//     },
9909	//     "pageToken": {
9910	//       "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.",
9911	//       "location": "query",
9912	//       "type": "string"
9913	//     },
9914	//     "project": {
9915	//       "description": "Project ID for this request.",
9916	//       "location": "path",
9917	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
9918	//       "required": true,
9919	//       "type": "string"
9920	//     }
9921	//   },
9922	//   "path": "{project}/aggregated/addresses",
9923	//   "response": {
9924	//     "$ref": "AddressAggregatedList"
9925	//   },
9926	//   "scopes": [
9927	//     "https://www.googleapis.com/auth/cloud-platform",
9928	//     "https://www.googleapis.com/auth/compute",
9929	//     "https://www.googleapis.com/auth/compute.readonly"
9930	//   ]
9931	// }
9932
9933}
9934
9935// Pages invokes f for each page of results.
9936// A non-nil error returned from f will halt the iteration.
9937// The provided context supersedes any context provided to the Context method.
9938func (c *AddressesAggregatedListCall) Pages(ctx context.Context, f func(*AddressAggregatedList) error) error {
9939	c.ctx_ = ctx
9940	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9941	for {
9942		x, err := c.Do()
9943		if err != nil {
9944			return err
9945		}
9946		if err := f(x); err != nil {
9947			return err
9948		}
9949		if x.NextPageToken == "" {
9950			return nil
9951		}
9952		c.PageToken(x.NextPageToken)
9953	}
9954}
9955
9956// method id "compute.addresses.delete":
9957
9958type AddressesDeleteCall struct {
9959	s          *Service
9960	project    string
9961	region     string
9962	address    string
9963	urlParams_ gensupport.URLParams
9964	ctx_       context.Context
9965}
9966
9967// Delete: Deletes the specified address resource.
9968// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/delete
9969func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall {
9970	c := &AddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9971	c.project = project
9972	c.region = region
9973	c.address = address
9974	return c
9975}
9976
9977// Fields allows partial responses to be retrieved. See
9978// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9979// for more information.
9980func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall {
9981	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9982	return c
9983}
9984
9985// Context sets the context to be used in this call's Do method. Any
9986// pending HTTP request will be aborted if the provided context is
9987// canceled.
9988func (c *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall {
9989	c.ctx_ = ctx
9990	return c
9991}
9992
9993func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
9994	var body io.Reader = nil
9995	c.urlParams_.Set("alt", alt)
9996	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}")
9997	urls += "?" + c.urlParams_.Encode()
9998	req, _ := http.NewRequest("DELETE", urls, body)
9999	googleapi.Expand(req.URL, map[string]string{
10000		"project": c.project,
10001		"region":  c.region,
10002		"address": c.address,
10003	})
10004	req.Header.Set("User-Agent", c.s.userAgent())
10005	if c.ctx_ != nil {
10006		return ctxhttp.Do(c.ctx_, c.s.client, req)
10007	}
10008	return c.s.client.Do(req)
10009}
10010
10011// Do executes the "compute.addresses.delete" call.
10012// Exactly one of *Operation or error will be non-nil. Any non-2xx
10013// status code is an error. Response headers are in either
10014// *Operation.ServerResponse.Header or (if a response was returned at
10015// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10016// to check whether the returned error was because
10017// http.StatusNotModified was returned.
10018func (c *AddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10019	gensupport.SetOptions(c.urlParams_, opts...)
10020	res, err := c.doRequest("json")
10021	if res != nil && res.StatusCode == http.StatusNotModified {
10022		if res.Body != nil {
10023			res.Body.Close()
10024		}
10025		return nil, &googleapi.Error{
10026			Code:   res.StatusCode,
10027			Header: res.Header,
10028		}
10029	}
10030	if err != nil {
10031		return nil, err
10032	}
10033	defer googleapi.CloseBody(res)
10034	if err := googleapi.CheckResponse(res); err != nil {
10035		return nil, err
10036	}
10037	ret := &Operation{
10038		ServerResponse: googleapi.ServerResponse{
10039			Header:         res.Header,
10040			HTTPStatusCode: res.StatusCode,
10041		},
10042	}
10043	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10044		return nil, err
10045	}
10046	return ret, nil
10047	// {
10048	//   "description": "Deletes the specified address resource.",
10049	//   "httpMethod": "DELETE",
10050	//   "id": "compute.addresses.delete",
10051	//   "parameterOrder": [
10052	//     "project",
10053	//     "region",
10054	//     "address"
10055	//   ],
10056	//   "parameters": {
10057	//     "address": {
10058	//       "description": "Name of the address resource to delete.",
10059	//       "location": "path",
10060	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10061	//       "required": true,
10062	//       "type": "string"
10063	//     },
10064	//     "project": {
10065	//       "description": "Project ID for this request.",
10066	//       "location": "path",
10067	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10068	//       "required": true,
10069	//       "type": "string"
10070	//     },
10071	//     "region": {
10072	//       "description": "Name of the region for this request.",
10073	//       "location": "path",
10074	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10075	//       "required": true,
10076	//       "type": "string"
10077	//     }
10078	//   },
10079	//   "path": "{project}/regions/{region}/addresses/{address}",
10080	//   "response": {
10081	//     "$ref": "Operation"
10082	//   },
10083	//   "scopes": [
10084	//     "https://www.googleapis.com/auth/cloud-platform",
10085	//     "https://www.googleapis.com/auth/compute"
10086	//   ]
10087	// }
10088
10089}
10090
10091// method id "compute.addresses.get":
10092
10093type AddressesGetCall struct {
10094	s            *Service
10095	project      string
10096	region       string
10097	address      string
10098	urlParams_   gensupport.URLParams
10099	ifNoneMatch_ string
10100	ctx_         context.Context
10101}
10102
10103// Get: Returns the specified address resource.
10104// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/get
10105func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall {
10106	c := &AddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10107	c.project = project
10108	c.region = region
10109	c.address = address
10110	return c
10111}
10112
10113// Fields allows partial responses to be retrieved. See
10114// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10115// for more information.
10116func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall {
10117	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10118	return c
10119}
10120
10121// IfNoneMatch sets the optional parameter which makes the operation
10122// fail if the object's ETag matches the given value. This is useful for
10123// getting updates only after the object has changed since the last
10124// request. Use googleapi.IsNotModified to check whether the response
10125// error from Do is the result of In-None-Match.
10126func (c *AddressesGetCall) IfNoneMatch(entityTag string) *AddressesGetCall {
10127	c.ifNoneMatch_ = entityTag
10128	return c
10129}
10130
10131// Context sets the context to be used in this call's Do method. Any
10132// pending HTTP request will be aborted if the provided context is
10133// canceled.
10134func (c *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall {
10135	c.ctx_ = ctx
10136	return c
10137}
10138
10139func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) {
10140	var body io.Reader = nil
10141	c.urlParams_.Set("alt", alt)
10142	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}")
10143	urls += "?" + c.urlParams_.Encode()
10144	req, _ := http.NewRequest("GET", urls, body)
10145	googleapi.Expand(req.URL, map[string]string{
10146		"project": c.project,
10147		"region":  c.region,
10148		"address": c.address,
10149	})
10150	req.Header.Set("User-Agent", c.s.userAgent())
10151	if c.ifNoneMatch_ != "" {
10152		req.Header.Set("If-None-Match", c.ifNoneMatch_)
10153	}
10154	if c.ctx_ != nil {
10155		return ctxhttp.Do(c.ctx_, c.s.client, req)
10156	}
10157	return c.s.client.Do(req)
10158}
10159
10160// Do executes the "compute.addresses.get" call.
10161// Exactly one of *Address or error will be non-nil. Any non-2xx status
10162// code is an error. Response headers are in either
10163// *Address.ServerResponse.Header or (if a response was returned at all)
10164// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10165// check whether the returned error was because http.StatusNotModified
10166// was returned.
10167func (c *AddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) {
10168	gensupport.SetOptions(c.urlParams_, opts...)
10169	res, err := c.doRequest("json")
10170	if res != nil && res.StatusCode == http.StatusNotModified {
10171		if res.Body != nil {
10172			res.Body.Close()
10173		}
10174		return nil, &googleapi.Error{
10175			Code:   res.StatusCode,
10176			Header: res.Header,
10177		}
10178	}
10179	if err != nil {
10180		return nil, err
10181	}
10182	defer googleapi.CloseBody(res)
10183	if err := googleapi.CheckResponse(res); err != nil {
10184		return nil, err
10185	}
10186	ret := &Address{
10187		ServerResponse: googleapi.ServerResponse{
10188			Header:         res.Header,
10189			HTTPStatusCode: res.StatusCode,
10190		},
10191	}
10192	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10193		return nil, err
10194	}
10195	return ret, nil
10196	// {
10197	//   "description": "Returns the specified address resource.",
10198	//   "httpMethod": "GET",
10199	//   "id": "compute.addresses.get",
10200	//   "parameterOrder": [
10201	//     "project",
10202	//     "region",
10203	//     "address"
10204	//   ],
10205	//   "parameters": {
10206	//     "address": {
10207	//       "description": "Name of the address resource to return.",
10208	//       "location": "path",
10209	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10210	//       "required": true,
10211	//       "type": "string"
10212	//     },
10213	//     "project": {
10214	//       "description": "Project ID for this request.",
10215	//       "location": "path",
10216	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10217	//       "required": true,
10218	//       "type": "string"
10219	//     },
10220	//     "region": {
10221	//       "description": "Name of the region for this request.",
10222	//       "location": "path",
10223	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10224	//       "required": true,
10225	//       "type": "string"
10226	//     }
10227	//   },
10228	//   "path": "{project}/regions/{region}/addresses/{address}",
10229	//   "response": {
10230	//     "$ref": "Address"
10231	//   },
10232	//   "scopes": [
10233	//     "https://www.googleapis.com/auth/cloud-platform",
10234	//     "https://www.googleapis.com/auth/compute",
10235	//     "https://www.googleapis.com/auth/compute.readonly"
10236	//   ]
10237	// }
10238
10239}
10240
10241// method id "compute.addresses.insert":
10242
10243type AddressesInsertCall struct {
10244	s          *Service
10245	project    string
10246	region     string
10247	address    *Address
10248	urlParams_ gensupport.URLParams
10249	ctx_       context.Context
10250}
10251
10252// Insert: Creates an address resource in the specified project using
10253// the data included in the request.
10254// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/insert
10255func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall {
10256	c := &AddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10257	c.project = project
10258	c.region = region
10259	c.address = address
10260	return c
10261}
10262
10263// Fields allows partial responses to be retrieved. See
10264// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10265// for more information.
10266func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall {
10267	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10268	return c
10269}
10270
10271// Context sets the context to be used in this call's Do method. Any
10272// pending HTTP request will be aborted if the provided context is
10273// canceled.
10274func (c *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall {
10275	c.ctx_ = ctx
10276	return c
10277}
10278
10279func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) {
10280	var body io.Reader = nil
10281	body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
10282	if err != nil {
10283		return nil, err
10284	}
10285	ctype := "application/json"
10286	c.urlParams_.Set("alt", alt)
10287	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses")
10288	urls += "?" + c.urlParams_.Encode()
10289	req, _ := http.NewRequest("POST", urls, body)
10290	googleapi.Expand(req.URL, map[string]string{
10291		"project": c.project,
10292		"region":  c.region,
10293	})
10294	req.Header.Set("Content-Type", ctype)
10295	req.Header.Set("User-Agent", c.s.userAgent())
10296	if c.ctx_ != nil {
10297		return ctxhttp.Do(c.ctx_, c.s.client, req)
10298	}
10299	return c.s.client.Do(req)
10300}
10301
10302// Do executes the "compute.addresses.insert" call.
10303// Exactly one of *Operation or error will be non-nil. Any non-2xx
10304// status code is an error. Response headers are in either
10305// *Operation.ServerResponse.Header or (if a response was returned at
10306// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10307// to check whether the returned error was because
10308// http.StatusNotModified was returned.
10309func (c *AddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10310	gensupport.SetOptions(c.urlParams_, opts...)
10311	res, err := c.doRequest("json")
10312	if res != nil && res.StatusCode == http.StatusNotModified {
10313		if res.Body != nil {
10314			res.Body.Close()
10315		}
10316		return nil, &googleapi.Error{
10317			Code:   res.StatusCode,
10318			Header: res.Header,
10319		}
10320	}
10321	if err != nil {
10322		return nil, err
10323	}
10324	defer googleapi.CloseBody(res)
10325	if err := googleapi.CheckResponse(res); err != nil {
10326		return nil, err
10327	}
10328	ret := &Operation{
10329		ServerResponse: googleapi.ServerResponse{
10330			Header:         res.Header,
10331			HTTPStatusCode: res.StatusCode,
10332		},
10333	}
10334	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10335		return nil, err
10336	}
10337	return ret, nil
10338	// {
10339	//   "description": "Creates an address resource in the specified project using the data included in the request.",
10340	//   "httpMethod": "POST",
10341	//   "id": "compute.addresses.insert",
10342	//   "parameterOrder": [
10343	//     "project",
10344	//     "region"
10345	//   ],
10346	//   "parameters": {
10347	//     "project": {
10348	//       "description": "Project ID for this request.",
10349	//       "location": "path",
10350	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10351	//       "required": true,
10352	//       "type": "string"
10353	//     },
10354	//     "region": {
10355	//       "description": "Name of the region for this request.",
10356	//       "location": "path",
10357	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10358	//       "required": true,
10359	//       "type": "string"
10360	//     }
10361	//   },
10362	//   "path": "{project}/regions/{region}/addresses",
10363	//   "request": {
10364	//     "$ref": "Address"
10365	//   },
10366	//   "response": {
10367	//     "$ref": "Operation"
10368	//   },
10369	//   "scopes": [
10370	//     "https://www.googleapis.com/auth/cloud-platform",
10371	//     "https://www.googleapis.com/auth/compute"
10372	//   ]
10373	// }
10374
10375}
10376
10377// method id "compute.addresses.list":
10378
10379type AddressesListCall struct {
10380	s            *Service
10381	project      string
10382	region       string
10383	urlParams_   gensupport.URLParams
10384	ifNoneMatch_ string
10385	ctx_         context.Context
10386}
10387
10388// List: Retrieves a list of addresses contained within the specified
10389// region.
10390// For details, see https://cloud.google.com/compute/docs/reference/latest/addresses/list
10391func (r *AddressesService) List(project string, region string) *AddressesListCall {
10392	c := &AddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10393	c.project = project
10394	c.region = region
10395	return c
10396}
10397
10398// Filter sets the optional parameter "filter": Sets a filter expression
10399// for filtering listed resources, in the form filter={expression}. Your
10400// {expression} must be in the format: field_name comparison_string
10401// literal_string.
10402//
10403// The field_name is the name of the field you want to compare. Only
10404// atomic field types are supported (string, number, boolean). The
10405// comparison_string must be either eq (equals) or ne (not equals). The
10406// literal_string is the string value to filter to. The literal value
10407// must be valid for the type of field you are filtering by (string,
10408// number, boolean). For string fields, the literal value is interpreted
10409// as a regular expression using RE2 syntax. The literal value must
10410// match the entire field.
10411//
10412// For example, to filter for instances that do not have a name of
10413// example-instance, you would use filter=name ne
10414// example-instance.
10415//
10416// Compute Engine Beta API Only: If you use filtering in the Beta API,
10417// you can also filter on nested fields. For example, you could filter
10418// on instances that have set the scheduling.automaticRestart field to
10419// true. In particular, use filtering on nested fields to take advantage
10420// of instance labels to organize and filter results based on label
10421// values.
10422//
10423// The Beta API also supports filtering on multiple expressions by
10424// providing each separate expression within parentheses. For example,
10425// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
10426// Multiple expressions are treated as AND expressions, meaning that
10427// resources must match all expressions to pass the filters.
10428func (c *AddressesListCall) Filter(filter string) *AddressesListCall {
10429	c.urlParams_.Set("filter", filter)
10430	return c
10431}
10432
10433// MaxResults sets the optional parameter "maxResults": The maximum
10434// number of results per page that should be returned. If the number of
10435// available results is larger than maxResults, Compute Engine returns a
10436// nextPageToken that can be used to get the next page of results in
10437// subsequent list requests.
10438func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall {
10439	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10440	return c
10441}
10442
10443// OrderBy sets the optional parameter "orderBy": Sorts list results by
10444// a certain order. By default, results are returned in alphanumerical
10445// order based on the resource name.
10446//
10447// You can also sort results in descending order based on the creation
10448// timestamp using orderBy="creationTimestamp desc". This sorts results
10449// based on the creationTimestamp field in reverse chronological order
10450// (newest result first). Use this to sort resources like operations so
10451// that the newest operation is returned first.
10452//
10453// Currently, only sorting by name or creationTimestamp desc is
10454// supported.
10455func (c *AddressesListCall) OrderBy(orderBy string) *AddressesListCall {
10456	c.urlParams_.Set("orderBy", orderBy)
10457	return c
10458}
10459
10460// PageToken sets the optional parameter "pageToken": Specifies a page
10461// token to use. Set pageToken to the nextPageToken returned by a
10462// previous list request to get the next page of results.
10463func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall {
10464	c.urlParams_.Set("pageToken", pageToken)
10465	return c
10466}
10467
10468// Fields allows partial responses to be retrieved. See
10469// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10470// for more information.
10471func (c *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall {
10472	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10473	return c
10474}
10475
10476// IfNoneMatch sets the optional parameter which makes the operation
10477// fail if the object's ETag matches the given value. This is useful for
10478// getting updates only after the object has changed since the last
10479// request. Use googleapi.IsNotModified to check whether the response
10480// error from Do is the result of In-None-Match.
10481func (c *AddressesListCall) IfNoneMatch(entityTag string) *AddressesListCall {
10482	c.ifNoneMatch_ = entityTag
10483	return c
10484}
10485
10486// Context sets the context to be used in this call's Do method. Any
10487// pending HTTP request will be aborted if the provided context is
10488// canceled.
10489func (c *AddressesListCall) Context(ctx context.Context) *AddressesListCall {
10490	c.ctx_ = ctx
10491	return c
10492}
10493
10494func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) {
10495	var body io.Reader = nil
10496	c.urlParams_.Set("alt", alt)
10497	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses")
10498	urls += "?" + c.urlParams_.Encode()
10499	req, _ := http.NewRequest("GET", urls, body)
10500	googleapi.Expand(req.URL, map[string]string{
10501		"project": c.project,
10502		"region":  c.region,
10503	})
10504	req.Header.Set("User-Agent", c.s.userAgent())
10505	if c.ifNoneMatch_ != "" {
10506		req.Header.Set("If-None-Match", c.ifNoneMatch_)
10507	}
10508	if c.ctx_ != nil {
10509		return ctxhttp.Do(c.ctx_, c.s.client, req)
10510	}
10511	return c.s.client.Do(req)
10512}
10513
10514// Do executes the "compute.addresses.list" call.
10515// Exactly one of *AddressList or error will be non-nil. Any non-2xx
10516// status code is an error. Response headers are in either
10517// *AddressList.ServerResponse.Header or (if a response was returned at
10518// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10519// to check whether the returned error was because
10520// http.StatusNotModified was returned.
10521func (c *AddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) {
10522	gensupport.SetOptions(c.urlParams_, opts...)
10523	res, err := c.doRequest("json")
10524	if res != nil && res.StatusCode == http.StatusNotModified {
10525		if res.Body != nil {
10526			res.Body.Close()
10527		}
10528		return nil, &googleapi.Error{
10529			Code:   res.StatusCode,
10530			Header: res.Header,
10531		}
10532	}
10533	if err != nil {
10534		return nil, err
10535	}
10536	defer googleapi.CloseBody(res)
10537	if err := googleapi.CheckResponse(res); err != nil {
10538		return nil, err
10539	}
10540	ret := &AddressList{
10541		ServerResponse: googleapi.ServerResponse{
10542			Header:         res.Header,
10543			HTTPStatusCode: res.StatusCode,
10544		},
10545	}
10546	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10547		return nil, err
10548	}
10549	return ret, nil
10550	// {
10551	//   "description": "Retrieves a list of addresses contained within the specified region.",
10552	//   "httpMethod": "GET",
10553	//   "id": "compute.addresses.list",
10554	//   "parameterOrder": [
10555	//     "project",
10556	//     "region"
10557	//   ],
10558	//   "parameters": {
10559	//     "filter": {
10560	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
10561	//       "location": "query",
10562	//       "type": "string"
10563	//     },
10564	//     "maxResults": {
10565	//       "default": "500",
10566	//       "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.",
10567	//       "format": "uint32",
10568	//       "location": "query",
10569	//       "maximum": "500",
10570	//       "minimum": "0",
10571	//       "type": "integer"
10572	//     },
10573	//     "orderBy": {
10574	//       "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.",
10575	//       "location": "query",
10576	//       "type": "string"
10577	//     },
10578	//     "pageToken": {
10579	//       "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.",
10580	//       "location": "query",
10581	//       "type": "string"
10582	//     },
10583	//     "project": {
10584	//       "description": "Project ID for this request.",
10585	//       "location": "path",
10586	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10587	//       "required": true,
10588	//       "type": "string"
10589	//     },
10590	//     "region": {
10591	//       "description": "Name of the region for this request.",
10592	//       "location": "path",
10593	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10594	//       "required": true,
10595	//       "type": "string"
10596	//     }
10597	//   },
10598	//   "path": "{project}/regions/{region}/addresses",
10599	//   "response": {
10600	//     "$ref": "AddressList"
10601	//   },
10602	//   "scopes": [
10603	//     "https://www.googleapis.com/auth/cloud-platform",
10604	//     "https://www.googleapis.com/auth/compute",
10605	//     "https://www.googleapis.com/auth/compute.readonly"
10606	//   ]
10607	// }
10608
10609}
10610
10611// Pages invokes f for each page of results.
10612// A non-nil error returned from f will halt the iteration.
10613// The provided context supersedes any context provided to the Context method.
10614func (c *AddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error {
10615	c.ctx_ = ctx
10616	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10617	for {
10618		x, err := c.Do()
10619		if err != nil {
10620			return err
10621		}
10622		if err := f(x); err != nil {
10623			return err
10624		}
10625		if x.NextPageToken == "" {
10626			return nil
10627		}
10628		c.PageToken(x.NextPageToken)
10629	}
10630}
10631
10632// method id "compute.addresses.testIamPermissions":
10633
10634type AddressesTestIamPermissionsCall struct {
10635	s                      *Service
10636	project                string
10637	region                 string
10638	resource               string
10639	testpermissionsrequest *TestPermissionsRequest
10640	urlParams_             gensupport.URLParams
10641	ctx_                   context.Context
10642}
10643
10644// TestIamPermissions: Returns permissions that a caller has on the
10645// specified resource.
10646func (r *AddressesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *AddressesTestIamPermissionsCall {
10647	c := &AddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10648	c.project = project
10649	c.region = region
10650	c.resource = resource
10651	c.testpermissionsrequest = testpermissionsrequest
10652	return c
10653}
10654
10655// Fields allows partial responses to be retrieved. See
10656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10657// for more information.
10658func (c *AddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *AddressesTestIamPermissionsCall {
10659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10660	return c
10661}
10662
10663// Context sets the context to be used in this call's Do method. Any
10664// pending HTTP request will be aborted if the provided context is
10665// canceled.
10666func (c *AddressesTestIamPermissionsCall) Context(ctx context.Context) *AddressesTestIamPermissionsCall {
10667	c.ctx_ = ctx
10668	return c
10669}
10670
10671func (c *AddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
10672	var body io.Reader = nil
10673	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
10674	if err != nil {
10675		return nil, err
10676	}
10677	ctype := "application/json"
10678	c.urlParams_.Set("alt", alt)
10679	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{resource}/testIamPermissions")
10680	urls += "?" + c.urlParams_.Encode()
10681	req, _ := http.NewRequest("POST", urls, body)
10682	googleapi.Expand(req.URL, map[string]string{
10683		"project":  c.project,
10684		"region":   c.region,
10685		"resource": c.resource,
10686	})
10687	req.Header.Set("Content-Type", ctype)
10688	req.Header.Set("User-Agent", c.s.userAgent())
10689	if c.ctx_ != nil {
10690		return ctxhttp.Do(c.ctx_, c.s.client, req)
10691	}
10692	return c.s.client.Do(req)
10693}
10694
10695// Do executes the "compute.addresses.testIamPermissions" call.
10696// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
10697// non-2xx status code is an error. Response headers are in either
10698// *TestPermissionsResponse.ServerResponse.Header or (if a response was
10699// returned at all) in error.(*googleapi.Error).Header. Use
10700// googleapi.IsNotModified to check whether the returned error was
10701// because http.StatusNotModified was returned.
10702func (c *AddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
10703	gensupport.SetOptions(c.urlParams_, opts...)
10704	res, err := c.doRequest("json")
10705	if res != nil && res.StatusCode == http.StatusNotModified {
10706		if res.Body != nil {
10707			res.Body.Close()
10708		}
10709		return nil, &googleapi.Error{
10710			Code:   res.StatusCode,
10711			Header: res.Header,
10712		}
10713	}
10714	if err != nil {
10715		return nil, err
10716	}
10717	defer googleapi.CloseBody(res)
10718	if err := googleapi.CheckResponse(res); err != nil {
10719		return nil, err
10720	}
10721	ret := &TestPermissionsResponse{
10722		ServerResponse: googleapi.ServerResponse{
10723			Header:         res.Header,
10724			HTTPStatusCode: res.StatusCode,
10725		},
10726	}
10727	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10728		return nil, err
10729	}
10730	return ret, nil
10731	// {
10732	//   "description": "Returns permissions that a caller has on the specified resource.",
10733	//   "httpMethod": "POST",
10734	//   "id": "compute.addresses.testIamPermissions",
10735	//   "parameterOrder": [
10736	//     "project",
10737	//     "region",
10738	//     "resource"
10739	//   ],
10740	//   "parameters": {
10741	//     "project": {
10742	//       "description": "Project ID for this request.",
10743	//       "location": "path",
10744	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10745	//       "required": true,
10746	//       "type": "string"
10747	//     },
10748	//     "region": {
10749	//       "description": "The name of the region for this request.",
10750	//       "location": "path",
10751	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10752	//       "required": true,
10753	//       "type": "string"
10754	//     },
10755	//     "resource": {
10756	//       "description": "Name of the resource for this request.",
10757	//       "location": "path",
10758	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
10759	//       "required": true,
10760	//       "type": "string"
10761	//     }
10762	//   },
10763	//   "path": "{project}/regions/{region}/addresses/{resource}/testIamPermissions",
10764	//   "request": {
10765	//     "$ref": "TestPermissionsRequest"
10766	//   },
10767	//   "response": {
10768	//     "$ref": "TestPermissionsResponse"
10769	//   },
10770	//   "scopes": [
10771	//     "https://www.googleapis.com/auth/cloud-platform",
10772	//     "https://www.googleapis.com/auth/compute",
10773	//     "https://www.googleapis.com/auth/compute.readonly"
10774	//   ]
10775	// }
10776
10777}
10778
10779// method id "compute.autoscalers.aggregatedList":
10780
10781type AutoscalersAggregatedListCall struct {
10782	s            *Service
10783	project      string
10784	urlParams_   gensupport.URLParams
10785	ifNoneMatch_ string
10786	ctx_         context.Context
10787}
10788
10789// AggregatedList: Retrieves an aggregated list of autoscalers.
10790func (r *AutoscalersService) AggregatedList(project string) *AutoscalersAggregatedListCall {
10791	c := &AutoscalersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10792	c.project = project
10793	return c
10794}
10795
10796// Filter sets the optional parameter "filter": Sets a filter expression
10797// for filtering listed resources, in the form filter={expression}. Your
10798// {expression} must be in the format: field_name comparison_string
10799// literal_string.
10800//
10801// The field_name is the name of the field you want to compare. Only
10802// atomic field types are supported (string, number, boolean). The
10803// comparison_string must be either eq (equals) or ne (not equals). The
10804// literal_string is the string value to filter to. The literal value
10805// must be valid for the type of field you are filtering by (string,
10806// number, boolean). For string fields, the literal value is interpreted
10807// as a regular expression using RE2 syntax. The literal value must
10808// match the entire field.
10809//
10810// For example, to filter for instances that do not have a name of
10811// example-instance, you would use filter=name ne
10812// example-instance.
10813//
10814// Compute Engine Beta API Only: If you use filtering in the Beta API,
10815// you can also filter on nested fields. For example, you could filter
10816// on instances that have set the scheduling.automaticRestart field to
10817// true. In particular, use filtering on nested fields to take advantage
10818// of instance labels to organize and filter results based on label
10819// values.
10820//
10821// The Beta API also supports filtering on multiple expressions by
10822// providing each separate expression within parentheses. For example,
10823// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
10824// Multiple expressions are treated as AND expressions, meaning that
10825// resources must match all expressions to pass the filters.
10826func (c *AutoscalersAggregatedListCall) Filter(filter string) *AutoscalersAggregatedListCall {
10827	c.urlParams_.Set("filter", filter)
10828	return c
10829}
10830
10831// MaxResults sets the optional parameter "maxResults": The maximum
10832// number of results per page that should be returned. If the number of
10833// available results is larger than maxResults, Compute Engine returns a
10834// nextPageToken that can be used to get the next page of results in
10835// subsequent list requests.
10836func (c *AutoscalersAggregatedListCall) MaxResults(maxResults int64) *AutoscalersAggregatedListCall {
10837	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10838	return c
10839}
10840
10841// OrderBy sets the optional parameter "orderBy": Sorts list results by
10842// a certain order. By default, results are returned in alphanumerical
10843// order based on the resource name.
10844//
10845// You can also sort results in descending order based on the creation
10846// timestamp using orderBy="creationTimestamp desc". This sorts results
10847// based on the creationTimestamp field in reverse chronological order
10848// (newest result first). Use this to sort resources like operations so
10849// that the newest operation is returned first.
10850//
10851// Currently, only sorting by name or creationTimestamp desc is
10852// supported.
10853func (c *AutoscalersAggregatedListCall) OrderBy(orderBy string) *AutoscalersAggregatedListCall {
10854	c.urlParams_.Set("orderBy", orderBy)
10855	return c
10856}
10857
10858// PageToken sets the optional parameter "pageToken": Specifies a page
10859// token to use. Set pageToken to the nextPageToken returned by a
10860// previous list request to get the next page of results.
10861func (c *AutoscalersAggregatedListCall) PageToken(pageToken string) *AutoscalersAggregatedListCall {
10862	c.urlParams_.Set("pageToken", pageToken)
10863	return c
10864}
10865
10866// Fields allows partial responses to be retrieved. See
10867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10868// for more information.
10869func (c *AutoscalersAggregatedListCall) Fields(s ...googleapi.Field) *AutoscalersAggregatedListCall {
10870	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10871	return c
10872}
10873
10874// IfNoneMatch sets the optional parameter which makes the operation
10875// fail if the object's ETag matches the given value. This is useful for
10876// getting updates only after the object has changed since the last
10877// request. Use googleapi.IsNotModified to check whether the response
10878// error from Do is the result of In-None-Match.
10879func (c *AutoscalersAggregatedListCall) IfNoneMatch(entityTag string) *AutoscalersAggregatedListCall {
10880	c.ifNoneMatch_ = entityTag
10881	return c
10882}
10883
10884// Context sets the context to be used in this call's Do method. Any
10885// pending HTTP request will be aborted if the provided context is
10886// canceled.
10887func (c *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall {
10888	c.ctx_ = ctx
10889	return c
10890}
10891
10892func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
10893	var body io.Reader = nil
10894	c.urlParams_.Set("alt", alt)
10895	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/autoscalers")
10896	urls += "?" + c.urlParams_.Encode()
10897	req, _ := http.NewRequest("GET", urls, body)
10898	googleapi.Expand(req.URL, map[string]string{
10899		"project": c.project,
10900	})
10901	req.Header.Set("User-Agent", c.s.userAgent())
10902	if c.ifNoneMatch_ != "" {
10903		req.Header.Set("If-None-Match", c.ifNoneMatch_)
10904	}
10905	if c.ctx_ != nil {
10906		return ctxhttp.Do(c.ctx_, c.s.client, req)
10907	}
10908	return c.s.client.Do(req)
10909}
10910
10911// Do executes the "compute.autoscalers.aggregatedList" call.
10912// Exactly one of *AutoscalerAggregatedList or error will be non-nil.
10913// Any non-2xx status code is an error. Response headers are in either
10914// *AutoscalerAggregatedList.ServerResponse.Header or (if a response was
10915// returned at all) in error.(*googleapi.Error).Header. Use
10916// googleapi.IsNotModified to check whether the returned error was
10917// because http.StatusNotModified was returned.
10918func (c *AutoscalersAggregatedListCall) Do(opts ...googleapi.CallOption) (*AutoscalerAggregatedList, error) {
10919	gensupport.SetOptions(c.urlParams_, opts...)
10920	res, err := c.doRequest("json")
10921	if res != nil && res.StatusCode == http.StatusNotModified {
10922		if res.Body != nil {
10923			res.Body.Close()
10924		}
10925		return nil, &googleapi.Error{
10926			Code:   res.StatusCode,
10927			Header: res.Header,
10928		}
10929	}
10930	if err != nil {
10931		return nil, err
10932	}
10933	defer googleapi.CloseBody(res)
10934	if err := googleapi.CheckResponse(res); err != nil {
10935		return nil, err
10936	}
10937	ret := &AutoscalerAggregatedList{
10938		ServerResponse: googleapi.ServerResponse{
10939			Header:         res.Header,
10940			HTTPStatusCode: res.StatusCode,
10941		},
10942	}
10943	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
10944		return nil, err
10945	}
10946	return ret, nil
10947	// {
10948	//   "description": "Retrieves an aggregated list of autoscalers.",
10949	//   "httpMethod": "GET",
10950	//   "id": "compute.autoscalers.aggregatedList",
10951	//   "parameterOrder": [
10952	//     "project"
10953	//   ],
10954	//   "parameters": {
10955	//     "filter": {
10956	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
10957	//       "location": "query",
10958	//       "type": "string"
10959	//     },
10960	//     "maxResults": {
10961	//       "default": "500",
10962	//       "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.",
10963	//       "format": "uint32",
10964	//       "location": "query",
10965	//       "maximum": "500",
10966	//       "minimum": "0",
10967	//       "type": "integer"
10968	//     },
10969	//     "orderBy": {
10970	//       "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.",
10971	//       "location": "query",
10972	//       "type": "string"
10973	//     },
10974	//     "pageToken": {
10975	//       "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.",
10976	//       "location": "query",
10977	//       "type": "string"
10978	//     },
10979	//     "project": {
10980	//       "description": "Project ID for this request.",
10981	//       "location": "path",
10982	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
10983	//       "required": true,
10984	//       "type": "string"
10985	//     }
10986	//   },
10987	//   "path": "{project}/aggregated/autoscalers",
10988	//   "response": {
10989	//     "$ref": "AutoscalerAggregatedList"
10990	//   },
10991	//   "scopes": [
10992	//     "https://www.googleapis.com/auth/cloud-platform",
10993	//     "https://www.googleapis.com/auth/compute",
10994	//     "https://www.googleapis.com/auth/compute.readonly"
10995	//   ]
10996	// }
10997
10998}
10999
11000// Pages invokes f for each page of results.
11001// A non-nil error returned from f will halt the iteration.
11002// The provided context supersedes any context provided to the Context method.
11003func (c *AutoscalersAggregatedListCall) Pages(ctx context.Context, f func(*AutoscalerAggregatedList) error) error {
11004	c.ctx_ = ctx
11005	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11006	for {
11007		x, err := c.Do()
11008		if err != nil {
11009			return err
11010		}
11011		if err := f(x); err != nil {
11012			return err
11013		}
11014		if x.NextPageToken == "" {
11015			return nil
11016		}
11017		c.PageToken(x.NextPageToken)
11018	}
11019}
11020
11021// method id "compute.autoscalers.delete":
11022
11023type AutoscalersDeleteCall struct {
11024	s          *Service
11025	project    string
11026	zone       string
11027	autoscaler string
11028	urlParams_ gensupport.URLParams
11029	ctx_       context.Context
11030}
11031
11032// Delete: Deletes the specified autoscaler.
11033func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall {
11034	c := &AutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11035	c.project = project
11036	c.zone = zone
11037	c.autoscaler = autoscaler
11038	return c
11039}
11040
11041// Fields allows partial responses to be retrieved. See
11042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11043// for more information.
11044func (c *AutoscalersDeleteCall) Fields(s ...googleapi.Field) *AutoscalersDeleteCall {
11045	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11046	return c
11047}
11048
11049// Context sets the context to be used in this call's Do method. Any
11050// pending HTTP request will be aborted if the provided context is
11051// canceled.
11052func (c *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall {
11053	c.ctx_ = ctx
11054	return c
11055}
11056
11057func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) {
11058	var body io.Reader = nil
11059	c.urlParams_.Set("alt", alt)
11060	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}")
11061	urls += "?" + c.urlParams_.Encode()
11062	req, _ := http.NewRequest("DELETE", urls, body)
11063	googleapi.Expand(req.URL, map[string]string{
11064		"project":    c.project,
11065		"zone":       c.zone,
11066		"autoscaler": c.autoscaler,
11067	})
11068	req.Header.Set("User-Agent", c.s.userAgent())
11069	if c.ctx_ != nil {
11070		return ctxhttp.Do(c.ctx_, c.s.client, req)
11071	}
11072	return c.s.client.Do(req)
11073}
11074
11075// Do executes the "compute.autoscalers.delete" call.
11076// Exactly one of *Operation or error will be non-nil. Any non-2xx
11077// status code is an error. Response headers are in either
11078// *Operation.ServerResponse.Header or (if a response was returned at
11079// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11080// to check whether the returned error was because
11081// http.StatusNotModified was returned.
11082func (c *AutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11083	gensupport.SetOptions(c.urlParams_, opts...)
11084	res, err := c.doRequest("json")
11085	if res != nil && res.StatusCode == http.StatusNotModified {
11086		if res.Body != nil {
11087			res.Body.Close()
11088		}
11089		return nil, &googleapi.Error{
11090			Code:   res.StatusCode,
11091			Header: res.Header,
11092		}
11093	}
11094	if err != nil {
11095		return nil, err
11096	}
11097	defer googleapi.CloseBody(res)
11098	if err := googleapi.CheckResponse(res); err != nil {
11099		return nil, err
11100	}
11101	ret := &Operation{
11102		ServerResponse: googleapi.ServerResponse{
11103			Header:         res.Header,
11104			HTTPStatusCode: res.StatusCode,
11105		},
11106	}
11107	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11108		return nil, err
11109	}
11110	return ret, nil
11111	// {
11112	//   "description": "Deletes the specified autoscaler.",
11113	//   "httpMethod": "DELETE",
11114	//   "id": "compute.autoscalers.delete",
11115	//   "parameterOrder": [
11116	//     "project",
11117	//     "zone",
11118	//     "autoscaler"
11119	//   ],
11120	//   "parameters": {
11121	//     "autoscaler": {
11122	//       "description": "Name of the autoscaler to delete.",
11123	//       "location": "path",
11124	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11125	//       "required": true,
11126	//       "type": "string"
11127	//     },
11128	//     "project": {
11129	//       "description": "Project ID for this request.",
11130	//       "location": "path",
11131	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11132	//       "required": true,
11133	//       "type": "string"
11134	//     },
11135	//     "zone": {
11136	//       "description": "Name of the zone for this request.",
11137	//       "location": "path",
11138	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11139	//       "required": true,
11140	//       "type": "string"
11141	//     }
11142	//   },
11143	//   "path": "{project}/zones/{zone}/autoscalers/{autoscaler}",
11144	//   "response": {
11145	//     "$ref": "Operation"
11146	//   },
11147	//   "scopes": [
11148	//     "https://www.googleapis.com/auth/cloud-platform",
11149	//     "https://www.googleapis.com/auth/compute"
11150	//   ]
11151	// }
11152
11153}
11154
11155// method id "compute.autoscalers.get":
11156
11157type AutoscalersGetCall struct {
11158	s            *Service
11159	project      string
11160	zone         string
11161	autoscaler   string
11162	urlParams_   gensupport.URLParams
11163	ifNoneMatch_ string
11164	ctx_         context.Context
11165}
11166
11167// Get: Returns the specified autoscaler resource. Get a list of
11168// available autoscalers by making a list() request.
11169func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall {
11170	c := &AutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11171	c.project = project
11172	c.zone = zone
11173	c.autoscaler = autoscaler
11174	return c
11175}
11176
11177// Fields allows partial responses to be retrieved. See
11178// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11179// for more information.
11180func (c *AutoscalersGetCall) Fields(s ...googleapi.Field) *AutoscalersGetCall {
11181	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11182	return c
11183}
11184
11185// IfNoneMatch sets the optional parameter which makes the operation
11186// fail if the object's ETag matches the given value. This is useful for
11187// getting updates only after the object has changed since the last
11188// request. Use googleapi.IsNotModified to check whether the response
11189// error from Do is the result of In-None-Match.
11190func (c *AutoscalersGetCall) IfNoneMatch(entityTag string) *AutoscalersGetCall {
11191	c.ifNoneMatch_ = entityTag
11192	return c
11193}
11194
11195// Context sets the context to be used in this call's Do method. Any
11196// pending HTTP request will be aborted if the provided context is
11197// canceled.
11198func (c *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall {
11199	c.ctx_ = ctx
11200	return c
11201}
11202
11203func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) {
11204	var body io.Reader = nil
11205	c.urlParams_.Set("alt", alt)
11206	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{autoscaler}")
11207	urls += "?" + c.urlParams_.Encode()
11208	req, _ := http.NewRequest("GET", urls, body)
11209	googleapi.Expand(req.URL, map[string]string{
11210		"project":    c.project,
11211		"zone":       c.zone,
11212		"autoscaler": c.autoscaler,
11213	})
11214	req.Header.Set("User-Agent", c.s.userAgent())
11215	if c.ifNoneMatch_ != "" {
11216		req.Header.Set("If-None-Match", c.ifNoneMatch_)
11217	}
11218	if c.ctx_ != nil {
11219		return ctxhttp.Do(c.ctx_, c.s.client, req)
11220	}
11221	return c.s.client.Do(req)
11222}
11223
11224// Do executes the "compute.autoscalers.get" call.
11225// Exactly one of *Autoscaler or error will be non-nil. Any non-2xx
11226// status code is an error. Response headers are in either
11227// *Autoscaler.ServerResponse.Header or (if a response was returned at
11228// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11229// to check whether the returned error was because
11230// http.StatusNotModified was returned.
11231func (c *AutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) {
11232	gensupport.SetOptions(c.urlParams_, opts...)
11233	res, err := c.doRequest("json")
11234	if res != nil && res.StatusCode == http.StatusNotModified {
11235		if res.Body != nil {
11236			res.Body.Close()
11237		}
11238		return nil, &googleapi.Error{
11239			Code:   res.StatusCode,
11240			Header: res.Header,
11241		}
11242	}
11243	if err != nil {
11244		return nil, err
11245	}
11246	defer googleapi.CloseBody(res)
11247	if err := googleapi.CheckResponse(res); err != nil {
11248		return nil, err
11249	}
11250	ret := &Autoscaler{
11251		ServerResponse: googleapi.ServerResponse{
11252			Header:         res.Header,
11253			HTTPStatusCode: res.StatusCode,
11254		},
11255	}
11256	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11257		return nil, err
11258	}
11259	return ret, nil
11260	// {
11261	//   "description": "Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.",
11262	//   "httpMethod": "GET",
11263	//   "id": "compute.autoscalers.get",
11264	//   "parameterOrder": [
11265	//     "project",
11266	//     "zone",
11267	//     "autoscaler"
11268	//   ],
11269	//   "parameters": {
11270	//     "autoscaler": {
11271	//       "description": "Name of the autoscaler to return.",
11272	//       "location": "path",
11273	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11274	//       "required": true,
11275	//       "type": "string"
11276	//     },
11277	//     "project": {
11278	//       "description": "Project ID for this request.",
11279	//       "location": "path",
11280	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11281	//       "required": true,
11282	//       "type": "string"
11283	//     },
11284	//     "zone": {
11285	//       "description": "Name of the zone for this request.",
11286	//       "location": "path",
11287	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11288	//       "required": true,
11289	//       "type": "string"
11290	//     }
11291	//   },
11292	//   "path": "{project}/zones/{zone}/autoscalers/{autoscaler}",
11293	//   "response": {
11294	//     "$ref": "Autoscaler"
11295	//   },
11296	//   "scopes": [
11297	//     "https://www.googleapis.com/auth/cloud-platform",
11298	//     "https://www.googleapis.com/auth/compute",
11299	//     "https://www.googleapis.com/auth/compute.readonly"
11300	//   ]
11301	// }
11302
11303}
11304
11305// method id "compute.autoscalers.insert":
11306
11307type AutoscalersInsertCall struct {
11308	s          *Service
11309	project    string
11310	zone       string
11311	autoscaler *Autoscaler
11312	urlParams_ gensupport.URLParams
11313	ctx_       context.Context
11314}
11315
11316// Insert: Creates an autoscaler in the specified project using the data
11317// included in the request.
11318func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall {
11319	c := &AutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11320	c.project = project
11321	c.zone = zone
11322	c.autoscaler = autoscaler
11323	return c
11324}
11325
11326// Fields allows partial responses to be retrieved. See
11327// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11328// for more information.
11329func (c *AutoscalersInsertCall) Fields(s ...googleapi.Field) *AutoscalersInsertCall {
11330	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11331	return c
11332}
11333
11334// Context sets the context to be used in this call's Do method. Any
11335// pending HTTP request will be aborted if the provided context is
11336// canceled.
11337func (c *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall {
11338	c.ctx_ = ctx
11339	return c
11340}
11341
11342func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) {
11343	var body io.Reader = nil
11344	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
11345	if err != nil {
11346		return nil, err
11347	}
11348	ctype := "application/json"
11349	c.urlParams_.Set("alt", alt)
11350	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
11351	urls += "?" + c.urlParams_.Encode()
11352	req, _ := http.NewRequest("POST", urls, body)
11353	googleapi.Expand(req.URL, map[string]string{
11354		"project": c.project,
11355		"zone":    c.zone,
11356	})
11357	req.Header.Set("Content-Type", ctype)
11358	req.Header.Set("User-Agent", c.s.userAgent())
11359	if c.ctx_ != nil {
11360		return ctxhttp.Do(c.ctx_, c.s.client, req)
11361	}
11362	return c.s.client.Do(req)
11363}
11364
11365// Do executes the "compute.autoscalers.insert" call.
11366// Exactly one of *Operation or error will be non-nil. Any non-2xx
11367// status code is an error. Response headers are in either
11368// *Operation.ServerResponse.Header or (if a response was returned at
11369// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11370// to check whether the returned error was because
11371// http.StatusNotModified was returned.
11372func (c *AutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11373	gensupport.SetOptions(c.urlParams_, opts...)
11374	res, err := c.doRequest("json")
11375	if res != nil && res.StatusCode == http.StatusNotModified {
11376		if res.Body != nil {
11377			res.Body.Close()
11378		}
11379		return nil, &googleapi.Error{
11380			Code:   res.StatusCode,
11381			Header: res.Header,
11382		}
11383	}
11384	if err != nil {
11385		return nil, err
11386	}
11387	defer googleapi.CloseBody(res)
11388	if err := googleapi.CheckResponse(res); err != nil {
11389		return nil, err
11390	}
11391	ret := &Operation{
11392		ServerResponse: googleapi.ServerResponse{
11393			Header:         res.Header,
11394			HTTPStatusCode: res.StatusCode,
11395		},
11396	}
11397	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11398		return nil, err
11399	}
11400	return ret, nil
11401	// {
11402	//   "description": "Creates an autoscaler in the specified project using the data included in the request.",
11403	//   "httpMethod": "POST",
11404	//   "id": "compute.autoscalers.insert",
11405	//   "parameterOrder": [
11406	//     "project",
11407	//     "zone"
11408	//   ],
11409	//   "parameters": {
11410	//     "project": {
11411	//       "description": "Project ID for this request.",
11412	//       "location": "path",
11413	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11414	//       "required": true,
11415	//       "type": "string"
11416	//     },
11417	//     "zone": {
11418	//       "description": "Name of the zone for this request.",
11419	//       "location": "path",
11420	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11421	//       "required": true,
11422	//       "type": "string"
11423	//     }
11424	//   },
11425	//   "path": "{project}/zones/{zone}/autoscalers",
11426	//   "request": {
11427	//     "$ref": "Autoscaler"
11428	//   },
11429	//   "response": {
11430	//     "$ref": "Operation"
11431	//   },
11432	//   "scopes": [
11433	//     "https://www.googleapis.com/auth/cloud-platform",
11434	//     "https://www.googleapis.com/auth/compute"
11435	//   ]
11436	// }
11437
11438}
11439
11440// method id "compute.autoscalers.list":
11441
11442type AutoscalersListCall struct {
11443	s            *Service
11444	project      string
11445	zone         string
11446	urlParams_   gensupport.URLParams
11447	ifNoneMatch_ string
11448	ctx_         context.Context
11449}
11450
11451// List: Retrieves a list of autoscalers contained within the specified
11452// zone.
11453func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall {
11454	c := &AutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11455	c.project = project
11456	c.zone = zone
11457	return c
11458}
11459
11460// Filter sets the optional parameter "filter": Sets a filter expression
11461// for filtering listed resources, in the form filter={expression}. Your
11462// {expression} must be in the format: field_name comparison_string
11463// literal_string.
11464//
11465// The field_name is the name of the field you want to compare. Only
11466// atomic field types are supported (string, number, boolean). The
11467// comparison_string must be either eq (equals) or ne (not equals). The
11468// literal_string is the string value to filter to. The literal value
11469// must be valid for the type of field you are filtering by (string,
11470// number, boolean). For string fields, the literal value is interpreted
11471// as a regular expression using RE2 syntax. The literal value must
11472// match the entire field.
11473//
11474// For example, to filter for instances that do not have a name of
11475// example-instance, you would use filter=name ne
11476// example-instance.
11477//
11478// Compute Engine Beta API Only: If you use filtering in the Beta API,
11479// you can also filter on nested fields. For example, you could filter
11480// on instances that have set the scheduling.automaticRestart field to
11481// true. In particular, use filtering on nested fields to take advantage
11482// of instance labels to organize and filter results based on label
11483// values.
11484//
11485// The Beta API also supports filtering on multiple expressions by
11486// providing each separate expression within parentheses. For example,
11487// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
11488// Multiple expressions are treated as AND expressions, meaning that
11489// resources must match all expressions to pass the filters.
11490func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall {
11491	c.urlParams_.Set("filter", filter)
11492	return c
11493}
11494
11495// MaxResults sets the optional parameter "maxResults": The maximum
11496// number of results per page that should be returned. If the number of
11497// available results is larger than maxResults, Compute Engine returns a
11498// nextPageToken that can be used to get the next page of results in
11499// subsequent list requests.
11500func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall {
11501	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
11502	return c
11503}
11504
11505// OrderBy sets the optional parameter "orderBy": Sorts list results by
11506// a certain order. By default, results are returned in alphanumerical
11507// order based on the resource name.
11508//
11509// You can also sort results in descending order based on the creation
11510// timestamp using orderBy="creationTimestamp desc". This sorts results
11511// based on the creationTimestamp field in reverse chronological order
11512// (newest result first). Use this to sort resources like operations so
11513// that the newest operation is returned first.
11514//
11515// Currently, only sorting by name or creationTimestamp desc is
11516// supported.
11517func (c *AutoscalersListCall) OrderBy(orderBy string) *AutoscalersListCall {
11518	c.urlParams_.Set("orderBy", orderBy)
11519	return c
11520}
11521
11522// PageToken sets the optional parameter "pageToken": Specifies a page
11523// token to use. Set pageToken to the nextPageToken returned by a
11524// previous list request to get the next page of results.
11525func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall {
11526	c.urlParams_.Set("pageToken", pageToken)
11527	return c
11528}
11529
11530// Fields allows partial responses to be retrieved. See
11531// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11532// for more information.
11533func (c *AutoscalersListCall) Fields(s ...googleapi.Field) *AutoscalersListCall {
11534	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11535	return c
11536}
11537
11538// IfNoneMatch sets the optional parameter which makes the operation
11539// fail if the object's ETag matches the given value. This is useful for
11540// getting updates only after the object has changed since the last
11541// request. Use googleapi.IsNotModified to check whether the response
11542// error from Do is the result of In-None-Match.
11543func (c *AutoscalersListCall) IfNoneMatch(entityTag string) *AutoscalersListCall {
11544	c.ifNoneMatch_ = entityTag
11545	return c
11546}
11547
11548// Context sets the context to be used in this call's Do method. Any
11549// pending HTTP request will be aborted if the provided context is
11550// canceled.
11551func (c *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall {
11552	c.ctx_ = ctx
11553	return c
11554}
11555
11556func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) {
11557	var body io.Reader = nil
11558	c.urlParams_.Set("alt", alt)
11559	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
11560	urls += "?" + c.urlParams_.Encode()
11561	req, _ := http.NewRequest("GET", urls, body)
11562	googleapi.Expand(req.URL, map[string]string{
11563		"project": c.project,
11564		"zone":    c.zone,
11565	})
11566	req.Header.Set("User-Agent", c.s.userAgent())
11567	if c.ifNoneMatch_ != "" {
11568		req.Header.Set("If-None-Match", c.ifNoneMatch_)
11569	}
11570	if c.ctx_ != nil {
11571		return ctxhttp.Do(c.ctx_, c.s.client, req)
11572	}
11573	return c.s.client.Do(req)
11574}
11575
11576// Do executes the "compute.autoscalers.list" call.
11577// Exactly one of *AutoscalerList or error will be non-nil. Any non-2xx
11578// status code is an error. Response headers are in either
11579// *AutoscalerList.ServerResponse.Header or (if a response was returned
11580// at all) in error.(*googleapi.Error).Header. Use
11581// googleapi.IsNotModified to check whether the returned error was
11582// because http.StatusNotModified was returned.
11583func (c *AutoscalersListCall) Do(opts ...googleapi.CallOption) (*AutoscalerList, error) {
11584	gensupport.SetOptions(c.urlParams_, opts...)
11585	res, err := c.doRequest("json")
11586	if res != nil && res.StatusCode == http.StatusNotModified {
11587		if res.Body != nil {
11588			res.Body.Close()
11589		}
11590		return nil, &googleapi.Error{
11591			Code:   res.StatusCode,
11592			Header: res.Header,
11593		}
11594	}
11595	if err != nil {
11596		return nil, err
11597	}
11598	defer googleapi.CloseBody(res)
11599	if err := googleapi.CheckResponse(res); err != nil {
11600		return nil, err
11601	}
11602	ret := &AutoscalerList{
11603		ServerResponse: googleapi.ServerResponse{
11604			Header:         res.Header,
11605			HTTPStatusCode: res.StatusCode,
11606		},
11607	}
11608	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11609		return nil, err
11610	}
11611	return ret, nil
11612	// {
11613	//   "description": "Retrieves a list of autoscalers contained within the specified zone.",
11614	//   "httpMethod": "GET",
11615	//   "id": "compute.autoscalers.list",
11616	//   "parameterOrder": [
11617	//     "project",
11618	//     "zone"
11619	//   ],
11620	//   "parameters": {
11621	//     "filter": {
11622	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
11623	//       "location": "query",
11624	//       "type": "string"
11625	//     },
11626	//     "maxResults": {
11627	//       "default": "500",
11628	//       "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.",
11629	//       "format": "uint32",
11630	//       "location": "query",
11631	//       "maximum": "500",
11632	//       "minimum": "0",
11633	//       "type": "integer"
11634	//     },
11635	//     "orderBy": {
11636	//       "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.",
11637	//       "location": "query",
11638	//       "type": "string"
11639	//     },
11640	//     "pageToken": {
11641	//       "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.",
11642	//       "location": "query",
11643	//       "type": "string"
11644	//     },
11645	//     "project": {
11646	//       "description": "Project ID for this request.",
11647	//       "location": "path",
11648	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11649	//       "required": true,
11650	//       "type": "string"
11651	//     },
11652	//     "zone": {
11653	//       "description": "Name of the zone for this request.",
11654	//       "location": "path",
11655	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11656	//       "required": true,
11657	//       "type": "string"
11658	//     }
11659	//   },
11660	//   "path": "{project}/zones/{zone}/autoscalers",
11661	//   "response": {
11662	//     "$ref": "AutoscalerList"
11663	//   },
11664	//   "scopes": [
11665	//     "https://www.googleapis.com/auth/cloud-platform",
11666	//     "https://www.googleapis.com/auth/compute",
11667	//     "https://www.googleapis.com/auth/compute.readonly"
11668	//   ]
11669	// }
11670
11671}
11672
11673// Pages invokes f for each page of results.
11674// A non-nil error returned from f will halt the iteration.
11675// The provided context supersedes any context provided to the Context method.
11676func (c *AutoscalersListCall) Pages(ctx context.Context, f func(*AutoscalerList) error) error {
11677	c.ctx_ = ctx
11678	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11679	for {
11680		x, err := c.Do()
11681		if err != nil {
11682			return err
11683		}
11684		if err := f(x); err != nil {
11685			return err
11686		}
11687		if x.NextPageToken == "" {
11688			return nil
11689		}
11690		c.PageToken(x.NextPageToken)
11691	}
11692}
11693
11694// method id "compute.autoscalers.patch":
11695
11696type AutoscalersPatchCall struct {
11697	s           *Service
11698	project     string
11699	zone        string
11700	autoscaler2 *Autoscaler
11701	urlParams_  gensupport.URLParams
11702	ctx_        context.Context
11703}
11704
11705// Patch: Updates an autoscaler in the specified project using the data
11706// included in the request. This method supports patch semantics.
11707func (r *AutoscalersService) Patch(project string, zone string, autoscaler string, autoscaler2 *Autoscaler) *AutoscalersPatchCall {
11708	c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11709	c.project = project
11710	c.zone = zone
11711	c.urlParams_.Set("autoscaler", autoscaler)
11712	c.autoscaler2 = autoscaler2
11713	return c
11714}
11715
11716// Fields allows partial responses to be retrieved. See
11717// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11718// for more information.
11719func (c *AutoscalersPatchCall) Fields(s ...googleapi.Field) *AutoscalersPatchCall {
11720	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11721	return c
11722}
11723
11724// Context sets the context to be used in this call's Do method. Any
11725// pending HTTP request will be aborted if the provided context is
11726// canceled.
11727func (c *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall {
11728	c.ctx_ = ctx
11729	return c
11730}
11731
11732func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) {
11733	var body io.Reader = nil
11734	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler2)
11735	if err != nil {
11736		return nil, err
11737	}
11738	ctype := "application/json"
11739	c.urlParams_.Set("alt", alt)
11740	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
11741	urls += "?" + c.urlParams_.Encode()
11742	req, _ := http.NewRequest("PATCH", urls, body)
11743	googleapi.Expand(req.URL, map[string]string{
11744		"project": c.project,
11745		"zone":    c.zone,
11746	})
11747	req.Header.Set("Content-Type", ctype)
11748	req.Header.Set("User-Agent", c.s.userAgent())
11749	if c.ctx_ != nil {
11750		return ctxhttp.Do(c.ctx_, c.s.client, req)
11751	}
11752	return c.s.client.Do(req)
11753}
11754
11755// Do executes the "compute.autoscalers.patch" call.
11756// Exactly one of *Operation or error will be non-nil. Any non-2xx
11757// status code is an error. Response headers are in either
11758// *Operation.ServerResponse.Header or (if a response was returned at
11759// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11760// to check whether the returned error was because
11761// http.StatusNotModified was returned.
11762func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11763	gensupport.SetOptions(c.urlParams_, opts...)
11764	res, err := c.doRequest("json")
11765	if res != nil && res.StatusCode == http.StatusNotModified {
11766		if res.Body != nil {
11767			res.Body.Close()
11768		}
11769		return nil, &googleapi.Error{
11770			Code:   res.StatusCode,
11771			Header: res.Header,
11772		}
11773	}
11774	if err != nil {
11775		return nil, err
11776	}
11777	defer googleapi.CloseBody(res)
11778	if err := googleapi.CheckResponse(res); err != nil {
11779		return nil, err
11780	}
11781	ret := &Operation{
11782		ServerResponse: googleapi.ServerResponse{
11783			Header:         res.Header,
11784			HTTPStatusCode: res.StatusCode,
11785		},
11786	}
11787	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11788		return nil, err
11789	}
11790	return ret, nil
11791	// {
11792	//   "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.",
11793	//   "httpMethod": "PATCH",
11794	//   "id": "compute.autoscalers.patch",
11795	//   "parameterOrder": [
11796	//     "project",
11797	//     "zone",
11798	//     "autoscaler"
11799	//   ],
11800	//   "parameters": {
11801	//     "autoscaler": {
11802	//       "description": "Name of the autoscaler to update.",
11803	//       "location": "query",
11804	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11805	//       "required": true,
11806	//       "type": "string"
11807	//     },
11808	//     "project": {
11809	//       "description": "Project ID for this request.",
11810	//       "location": "path",
11811	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11812	//       "required": true,
11813	//       "type": "string"
11814	//     },
11815	//     "zone": {
11816	//       "description": "Name of the zone for this request.",
11817	//       "location": "path",
11818	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11819	//       "required": true,
11820	//       "type": "string"
11821	//     }
11822	//   },
11823	//   "path": "{project}/zones/{zone}/autoscalers",
11824	//   "request": {
11825	//     "$ref": "Autoscaler"
11826	//   },
11827	//   "response": {
11828	//     "$ref": "Operation"
11829	//   },
11830	//   "scopes": [
11831	//     "https://www.googleapis.com/auth/cloud-platform",
11832	//     "https://www.googleapis.com/auth/compute"
11833	//   ]
11834	// }
11835
11836}
11837
11838// method id "compute.autoscalers.testIamPermissions":
11839
11840type AutoscalersTestIamPermissionsCall struct {
11841	s                      *Service
11842	project                string
11843	zone                   string
11844	resource               string
11845	testpermissionsrequest *TestPermissionsRequest
11846	urlParams_             gensupport.URLParams
11847	ctx_                   context.Context
11848}
11849
11850// TestIamPermissions: Returns permissions that a caller has on the
11851// specified resource.
11852func (r *AutoscalersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *AutoscalersTestIamPermissionsCall {
11853	c := &AutoscalersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11854	c.project = project
11855	c.zone = zone
11856	c.resource = resource
11857	c.testpermissionsrequest = testpermissionsrequest
11858	return c
11859}
11860
11861// Fields allows partial responses to be retrieved. See
11862// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11863// for more information.
11864func (c *AutoscalersTestIamPermissionsCall) Fields(s ...googleapi.Field) *AutoscalersTestIamPermissionsCall {
11865	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11866	return c
11867}
11868
11869// Context sets the context to be used in this call's Do method. Any
11870// pending HTTP request will be aborted if the provided context is
11871// canceled.
11872func (c *AutoscalersTestIamPermissionsCall) Context(ctx context.Context) *AutoscalersTestIamPermissionsCall {
11873	c.ctx_ = ctx
11874	return c
11875}
11876
11877func (c *AutoscalersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
11878	var body io.Reader = nil
11879	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
11880	if err != nil {
11881		return nil, err
11882	}
11883	ctype := "application/json"
11884	c.urlParams_.Set("alt", alt)
11885	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions")
11886	urls += "?" + c.urlParams_.Encode()
11887	req, _ := http.NewRequest("POST", urls, body)
11888	googleapi.Expand(req.URL, map[string]string{
11889		"project":  c.project,
11890		"zone":     c.zone,
11891		"resource": c.resource,
11892	})
11893	req.Header.Set("Content-Type", ctype)
11894	req.Header.Set("User-Agent", c.s.userAgent())
11895	if c.ctx_ != nil {
11896		return ctxhttp.Do(c.ctx_, c.s.client, req)
11897	}
11898	return c.s.client.Do(req)
11899}
11900
11901// Do executes the "compute.autoscalers.testIamPermissions" call.
11902// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
11903// non-2xx status code is an error. Response headers are in either
11904// *TestPermissionsResponse.ServerResponse.Header or (if a response was
11905// returned at all) in error.(*googleapi.Error).Header. Use
11906// googleapi.IsNotModified to check whether the returned error was
11907// because http.StatusNotModified was returned.
11908func (c *AutoscalersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
11909	gensupport.SetOptions(c.urlParams_, opts...)
11910	res, err := c.doRequest("json")
11911	if res != nil && res.StatusCode == http.StatusNotModified {
11912		if res.Body != nil {
11913			res.Body.Close()
11914		}
11915		return nil, &googleapi.Error{
11916			Code:   res.StatusCode,
11917			Header: res.Header,
11918		}
11919	}
11920	if err != nil {
11921		return nil, err
11922	}
11923	defer googleapi.CloseBody(res)
11924	if err := googleapi.CheckResponse(res); err != nil {
11925		return nil, err
11926	}
11927	ret := &TestPermissionsResponse{
11928		ServerResponse: googleapi.ServerResponse{
11929			Header:         res.Header,
11930			HTTPStatusCode: res.StatusCode,
11931		},
11932	}
11933	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
11934		return nil, err
11935	}
11936	return ret, nil
11937	// {
11938	//   "description": "Returns permissions that a caller has on the specified resource.",
11939	//   "httpMethod": "POST",
11940	//   "id": "compute.autoscalers.testIamPermissions",
11941	//   "parameterOrder": [
11942	//     "project",
11943	//     "zone",
11944	//     "resource"
11945	//   ],
11946	//   "parameters": {
11947	//     "project": {
11948	//       "description": "Project ID for this request.",
11949	//       "location": "path",
11950	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
11951	//       "required": true,
11952	//       "type": "string"
11953	//     },
11954	//     "resource": {
11955	//       "description": "Name of the resource for this request.",
11956	//       "location": "path",
11957	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11958	//       "required": true,
11959	//       "type": "string"
11960	//     },
11961	//     "zone": {
11962	//       "description": "The name of the zone for this request.",
11963	//       "location": "path",
11964	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
11965	//       "required": true,
11966	//       "type": "string"
11967	//     }
11968	//   },
11969	//   "path": "{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions",
11970	//   "request": {
11971	//     "$ref": "TestPermissionsRequest"
11972	//   },
11973	//   "response": {
11974	//     "$ref": "TestPermissionsResponse"
11975	//   },
11976	//   "scopes": [
11977	//     "https://www.googleapis.com/auth/cloud-platform",
11978	//     "https://www.googleapis.com/auth/compute",
11979	//     "https://www.googleapis.com/auth/compute.readonly"
11980	//   ]
11981	// }
11982
11983}
11984
11985// method id "compute.autoscalers.update":
11986
11987type AutoscalersUpdateCall struct {
11988	s          *Service
11989	project    string
11990	zone       string
11991	autoscaler *Autoscaler
11992	urlParams_ gensupport.URLParams
11993	ctx_       context.Context
11994}
11995
11996// Update: Updates an autoscaler in the specified project using the data
11997// included in the request.
11998func (r *AutoscalersService) Update(project string, zone string, autoscaler *Autoscaler) *AutoscalersUpdateCall {
11999	c := &AutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12000	c.project = project
12001	c.zone = zone
12002	c.autoscaler = autoscaler
12003	return c
12004}
12005
12006// Autoscaler sets the optional parameter "autoscaler": Name of the
12007// autoscaler to update.
12008func (c *AutoscalersUpdateCall) Autoscaler(autoscaler string) *AutoscalersUpdateCall {
12009	c.urlParams_.Set("autoscaler", autoscaler)
12010	return c
12011}
12012
12013// Fields allows partial responses to be retrieved. See
12014// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12015// for more information.
12016func (c *AutoscalersUpdateCall) Fields(s ...googleapi.Field) *AutoscalersUpdateCall {
12017	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12018	return c
12019}
12020
12021// Context sets the context to be used in this call's Do method. Any
12022// pending HTTP request will be aborted if the provided context is
12023// canceled.
12024func (c *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall {
12025	c.ctx_ = ctx
12026	return c
12027}
12028
12029func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) {
12030	var body io.Reader = nil
12031	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
12032	if err != nil {
12033		return nil, err
12034	}
12035	ctype := "application/json"
12036	c.urlParams_.Set("alt", alt)
12037	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/autoscalers")
12038	urls += "?" + c.urlParams_.Encode()
12039	req, _ := http.NewRequest("PUT", urls, body)
12040	googleapi.Expand(req.URL, map[string]string{
12041		"project": c.project,
12042		"zone":    c.zone,
12043	})
12044	req.Header.Set("Content-Type", ctype)
12045	req.Header.Set("User-Agent", c.s.userAgent())
12046	if c.ctx_ != nil {
12047		return ctxhttp.Do(c.ctx_, c.s.client, req)
12048	}
12049	return c.s.client.Do(req)
12050}
12051
12052// Do executes the "compute.autoscalers.update" call.
12053// Exactly one of *Operation or error will be non-nil. Any non-2xx
12054// status code is an error. Response headers are in either
12055// *Operation.ServerResponse.Header or (if a response was returned at
12056// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12057// to check whether the returned error was because
12058// http.StatusNotModified was returned.
12059func (c *AutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12060	gensupport.SetOptions(c.urlParams_, opts...)
12061	res, err := c.doRequest("json")
12062	if res != nil && res.StatusCode == http.StatusNotModified {
12063		if res.Body != nil {
12064			res.Body.Close()
12065		}
12066		return nil, &googleapi.Error{
12067			Code:   res.StatusCode,
12068			Header: res.Header,
12069		}
12070	}
12071	if err != nil {
12072		return nil, err
12073	}
12074	defer googleapi.CloseBody(res)
12075	if err := googleapi.CheckResponse(res); err != nil {
12076		return nil, err
12077	}
12078	ret := &Operation{
12079		ServerResponse: googleapi.ServerResponse{
12080			Header:         res.Header,
12081			HTTPStatusCode: res.StatusCode,
12082		},
12083	}
12084	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12085		return nil, err
12086	}
12087	return ret, nil
12088	// {
12089	//   "description": "Updates an autoscaler in the specified project using the data included in the request.",
12090	//   "httpMethod": "PUT",
12091	//   "id": "compute.autoscalers.update",
12092	//   "parameterOrder": [
12093	//     "project",
12094	//     "zone"
12095	//   ],
12096	//   "parameters": {
12097	//     "autoscaler": {
12098	//       "description": "Name of the autoscaler to update.",
12099	//       "location": "query",
12100	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12101	//       "type": "string"
12102	//     },
12103	//     "project": {
12104	//       "description": "Project ID for this request.",
12105	//       "location": "path",
12106	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12107	//       "required": true,
12108	//       "type": "string"
12109	//     },
12110	//     "zone": {
12111	//       "description": "Name of the zone for this request.",
12112	//       "location": "path",
12113	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12114	//       "required": true,
12115	//       "type": "string"
12116	//     }
12117	//   },
12118	//   "path": "{project}/zones/{zone}/autoscalers",
12119	//   "request": {
12120	//     "$ref": "Autoscaler"
12121	//   },
12122	//   "response": {
12123	//     "$ref": "Operation"
12124	//   },
12125	//   "scopes": [
12126	//     "https://www.googleapis.com/auth/cloud-platform",
12127	//     "https://www.googleapis.com/auth/compute"
12128	//   ]
12129	// }
12130
12131}
12132
12133// method id "compute.backendServices.delete":
12134
12135type BackendServicesDeleteCall struct {
12136	s              *Service
12137	project        string
12138	backendService string
12139	urlParams_     gensupport.URLParams
12140	ctx_           context.Context
12141}
12142
12143// Delete: Deletes the specified BackendService resource.
12144// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/delete
12145func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall {
12146	c := &BackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12147	c.project = project
12148	c.backendService = backendService
12149	return c
12150}
12151
12152// Fields allows partial responses to be retrieved. See
12153// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12154// for more information.
12155func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall {
12156	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12157	return c
12158}
12159
12160// Context sets the context to be used in this call's Do method. Any
12161// pending HTTP request will be aborted if the provided context is
12162// canceled.
12163func (c *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall {
12164	c.ctx_ = ctx
12165	return c
12166}
12167
12168func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
12169	var body io.Reader = nil
12170	c.urlParams_.Set("alt", alt)
12171	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
12172	urls += "?" + c.urlParams_.Encode()
12173	req, _ := http.NewRequest("DELETE", urls, body)
12174	googleapi.Expand(req.URL, map[string]string{
12175		"project":        c.project,
12176		"backendService": c.backendService,
12177	})
12178	req.Header.Set("User-Agent", c.s.userAgent())
12179	if c.ctx_ != nil {
12180		return ctxhttp.Do(c.ctx_, c.s.client, req)
12181	}
12182	return c.s.client.Do(req)
12183}
12184
12185// Do executes the "compute.backendServices.delete" call.
12186// Exactly one of *Operation or error will be non-nil. Any non-2xx
12187// status code is an error. Response headers are in either
12188// *Operation.ServerResponse.Header or (if a response was returned at
12189// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12190// to check whether the returned error was because
12191// http.StatusNotModified was returned.
12192func (c *BackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12193	gensupport.SetOptions(c.urlParams_, opts...)
12194	res, err := c.doRequest("json")
12195	if res != nil && res.StatusCode == http.StatusNotModified {
12196		if res.Body != nil {
12197			res.Body.Close()
12198		}
12199		return nil, &googleapi.Error{
12200			Code:   res.StatusCode,
12201			Header: res.Header,
12202		}
12203	}
12204	if err != nil {
12205		return nil, err
12206	}
12207	defer googleapi.CloseBody(res)
12208	if err := googleapi.CheckResponse(res); err != nil {
12209		return nil, err
12210	}
12211	ret := &Operation{
12212		ServerResponse: googleapi.ServerResponse{
12213			Header:         res.Header,
12214			HTTPStatusCode: res.StatusCode,
12215		},
12216	}
12217	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12218		return nil, err
12219	}
12220	return ret, nil
12221	// {
12222	//   "description": "Deletes the specified BackendService resource.",
12223	//   "httpMethod": "DELETE",
12224	//   "id": "compute.backendServices.delete",
12225	//   "parameterOrder": [
12226	//     "project",
12227	//     "backendService"
12228	//   ],
12229	//   "parameters": {
12230	//     "backendService": {
12231	//       "description": "Name of the BackendService resource to delete.",
12232	//       "location": "path",
12233	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12234	//       "required": true,
12235	//       "type": "string"
12236	//     },
12237	//     "project": {
12238	//       "description": "Project ID for this request.",
12239	//       "location": "path",
12240	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12241	//       "required": true,
12242	//       "type": "string"
12243	//     }
12244	//   },
12245	//   "path": "{project}/global/backendServices/{backendService}",
12246	//   "response": {
12247	//     "$ref": "Operation"
12248	//   },
12249	//   "scopes": [
12250	//     "https://www.googleapis.com/auth/cloud-platform",
12251	//     "https://www.googleapis.com/auth/compute"
12252	//   ]
12253	// }
12254
12255}
12256
12257// method id "compute.backendServices.get":
12258
12259type BackendServicesGetCall struct {
12260	s              *Service
12261	project        string
12262	backendService string
12263	urlParams_     gensupport.URLParams
12264	ifNoneMatch_   string
12265	ctx_           context.Context
12266}
12267
12268// Get: Returns the specified BackendService resource. Get a list of
12269// available backend services by making a list() request.
12270// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/get
12271func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall {
12272	c := &BackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12273	c.project = project
12274	c.backendService = backendService
12275	return c
12276}
12277
12278// Fields allows partial responses to be retrieved. See
12279// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12280// for more information.
12281func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall {
12282	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12283	return c
12284}
12285
12286// IfNoneMatch sets the optional parameter which makes the operation
12287// fail if the object's ETag matches the given value. This is useful for
12288// getting updates only after the object has changed since the last
12289// request. Use googleapi.IsNotModified to check whether the response
12290// error from Do is the result of In-None-Match.
12291func (c *BackendServicesGetCall) IfNoneMatch(entityTag string) *BackendServicesGetCall {
12292	c.ifNoneMatch_ = entityTag
12293	return c
12294}
12295
12296// Context sets the context to be used in this call's Do method. Any
12297// pending HTTP request will be aborted if the provided context is
12298// canceled.
12299func (c *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall {
12300	c.ctx_ = ctx
12301	return c
12302}
12303
12304func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) {
12305	var body io.Reader = nil
12306	c.urlParams_.Set("alt", alt)
12307	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
12308	urls += "?" + c.urlParams_.Encode()
12309	req, _ := http.NewRequest("GET", urls, body)
12310	googleapi.Expand(req.URL, map[string]string{
12311		"project":        c.project,
12312		"backendService": c.backendService,
12313	})
12314	req.Header.Set("User-Agent", c.s.userAgent())
12315	if c.ifNoneMatch_ != "" {
12316		req.Header.Set("If-None-Match", c.ifNoneMatch_)
12317	}
12318	if c.ctx_ != nil {
12319		return ctxhttp.Do(c.ctx_, c.s.client, req)
12320	}
12321	return c.s.client.Do(req)
12322}
12323
12324// Do executes the "compute.backendServices.get" call.
12325// Exactly one of *BackendService or error will be non-nil. Any non-2xx
12326// status code is an error. Response headers are in either
12327// *BackendService.ServerResponse.Header or (if a response was returned
12328// at all) in error.(*googleapi.Error).Header. Use
12329// googleapi.IsNotModified to check whether the returned error was
12330// because http.StatusNotModified was returned.
12331func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) {
12332	gensupport.SetOptions(c.urlParams_, opts...)
12333	res, err := c.doRequest("json")
12334	if res != nil && res.StatusCode == http.StatusNotModified {
12335		if res.Body != nil {
12336			res.Body.Close()
12337		}
12338		return nil, &googleapi.Error{
12339			Code:   res.StatusCode,
12340			Header: res.Header,
12341		}
12342	}
12343	if err != nil {
12344		return nil, err
12345	}
12346	defer googleapi.CloseBody(res)
12347	if err := googleapi.CheckResponse(res); err != nil {
12348		return nil, err
12349	}
12350	ret := &BackendService{
12351		ServerResponse: googleapi.ServerResponse{
12352			Header:         res.Header,
12353			HTTPStatusCode: res.StatusCode,
12354		},
12355	}
12356	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12357		return nil, err
12358	}
12359	return ret, nil
12360	// {
12361	//   "description": "Returns the specified BackendService resource. Get a list of available backend services by making a list() request.",
12362	//   "httpMethod": "GET",
12363	//   "id": "compute.backendServices.get",
12364	//   "parameterOrder": [
12365	//     "project",
12366	//     "backendService"
12367	//   ],
12368	//   "parameters": {
12369	//     "backendService": {
12370	//       "description": "Name of the BackendService resource to return.",
12371	//       "location": "path",
12372	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12373	//       "required": true,
12374	//       "type": "string"
12375	//     },
12376	//     "project": {
12377	//       "description": "Project ID for this request.",
12378	//       "location": "path",
12379	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12380	//       "required": true,
12381	//       "type": "string"
12382	//     }
12383	//   },
12384	//   "path": "{project}/global/backendServices/{backendService}",
12385	//   "response": {
12386	//     "$ref": "BackendService"
12387	//   },
12388	//   "scopes": [
12389	//     "https://www.googleapis.com/auth/cloud-platform",
12390	//     "https://www.googleapis.com/auth/compute",
12391	//     "https://www.googleapis.com/auth/compute.readonly"
12392	//   ]
12393	// }
12394
12395}
12396
12397// method id "compute.backendServices.getHealth":
12398
12399type BackendServicesGetHealthCall struct {
12400	s                      *Service
12401	project                string
12402	backendService         string
12403	resourcegroupreference *ResourceGroupReference
12404	urlParams_             gensupport.URLParams
12405	ctx_                   context.Context
12406}
12407
12408// GetHealth: Gets the most recent health check results for this
12409// BackendService.
12410// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/getHealth
12411func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall {
12412	c := &BackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12413	c.project = project
12414	c.backendService = backendService
12415	c.resourcegroupreference = resourcegroupreference
12416	return c
12417}
12418
12419// Fields allows partial responses to be retrieved. See
12420// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12421// for more information.
12422func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall {
12423	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12424	return c
12425}
12426
12427// Context sets the context to be used in this call's Do method. Any
12428// pending HTTP request will be aborted if the provided context is
12429// canceled.
12430func (c *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall {
12431	c.ctx_ = ctx
12432	return c
12433}
12434
12435func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) {
12436	var body io.Reader = nil
12437	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference)
12438	if err != nil {
12439		return nil, err
12440	}
12441	ctype := "application/json"
12442	c.urlParams_.Set("alt", alt)
12443	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth")
12444	urls += "?" + c.urlParams_.Encode()
12445	req, _ := http.NewRequest("POST", urls, body)
12446	googleapi.Expand(req.URL, map[string]string{
12447		"project":        c.project,
12448		"backendService": c.backendService,
12449	})
12450	req.Header.Set("Content-Type", ctype)
12451	req.Header.Set("User-Agent", c.s.userAgent())
12452	if c.ctx_ != nil {
12453		return ctxhttp.Do(c.ctx_, c.s.client, req)
12454	}
12455	return c.s.client.Do(req)
12456}
12457
12458// Do executes the "compute.backendServices.getHealth" call.
12459// Exactly one of *BackendServiceGroupHealth or error will be non-nil.
12460// Any non-2xx status code is an error. Response headers are in either
12461// *BackendServiceGroupHealth.ServerResponse.Header or (if a response
12462// was returned at all) in error.(*googleapi.Error).Header. Use
12463// googleapi.IsNotModified to check whether the returned error was
12464// because http.StatusNotModified was returned.
12465func (c *BackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) {
12466	gensupport.SetOptions(c.urlParams_, opts...)
12467	res, err := c.doRequest("json")
12468	if res != nil && res.StatusCode == http.StatusNotModified {
12469		if res.Body != nil {
12470			res.Body.Close()
12471		}
12472		return nil, &googleapi.Error{
12473			Code:   res.StatusCode,
12474			Header: res.Header,
12475		}
12476	}
12477	if err != nil {
12478		return nil, err
12479	}
12480	defer googleapi.CloseBody(res)
12481	if err := googleapi.CheckResponse(res); err != nil {
12482		return nil, err
12483	}
12484	ret := &BackendServiceGroupHealth{
12485		ServerResponse: googleapi.ServerResponse{
12486			Header:         res.Header,
12487			HTTPStatusCode: res.StatusCode,
12488		},
12489	}
12490	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12491		return nil, err
12492	}
12493	return ret, nil
12494	// {
12495	//   "description": "Gets the most recent health check results for this BackendService.",
12496	//   "httpMethod": "POST",
12497	//   "id": "compute.backendServices.getHealth",
12498	//   "parameterOrder": [
12499	//     "project",
12500	//     "backendService"
12501	//   ],
12502	//   "parameters": {
12503	//     "backendService": {
12504	//       "description": "Name of the BackendService resource to which the queried instance belongs.",
12505	//       "location": "path",
12506	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
12507	//       "required": true,
12508	//       "type": "string"
12509	//     },
12510	//     "project": {
12511	//       "location": "path",
12512	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12513	//       "required": true,
12514	//       "type": "string"
12515	//     }
12516	//   },
12517	//   "path": "{project}/global/backendServices/{backendService}/getHealth",
12518	//   "request": {
12519	//     "$ref": "ResourceGroupReference"
12520	//   },
12521	//   "response": {
12522	//     "$ref": "BackendServiceGroupHealth"
12523	//   },
12524	//   "scopes": [
12525	//     "https://www.googleapis.com/auth/cloud-platform",
12526	//     "https://www.googleapis.com/auth/compute",
12527	//     "https://www.googleapis.com/auth/compute.readonly"
12528	//   ]
12529	// }
12530
12531}
12532
12533// method id "compute.backendServices.insert":
12534
12535type BackendServicesInsertCall struct {
12536	s              *Service
12537	project        string
12538	backendservice *BackendService
12539	urlParams_     gensupport.URLParams
12540	ctx_           context.Context
12541}
12542
12543// Insert: Creates a BackendService resource in the specified project
12544// using the data included in the request. There are several
12545// restrictions and guidelines to keep in mind when creating a backend
12546// service. Read  Restrictions and Guidelines for more information.
12547// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/insert
12548func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall {
12549	c := &BackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12550	c.project = project
12551	c.backendservice = backendservice
12552	return c
12553}
12554
12555// Fields allows partial responses to be retrieved. See
12556// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12557// for more information.
12558func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall {
12559	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12560	return c
12561}
12562
12563// Context sets the context to be used in this call's Do method. Any
12564// pending HTTP request will be aborted if the provided context is
12565// canceled.
12566func (c *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall {
12567	c.ctx_ = ctx
12568	return c
12569}
12570
12571func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) {
12572	var body io.Reader = nil
12573	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
12574	if err != nil {
12575		return nil, err
12576	}
12577	ctype := "application/json"
12578	c.urlParams_.Set("alt", alt)
12579	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices")
12580	urls += "?" + c.urlParams_.Encode()
12581	req, _ := http.NewRequest("POST", urls, body)
12582	googleapi.Expand(req.URL, map[string]string{
12583		"project": c.project,
12584	})
12585	req.Header.Set("Content-Type", ctype)
12586	req.Header.Set("User-Agent", c.s.userAgent())
12587	if c.ctx_ != nil {
12588		return ctxhttp.Do(c.ctx_, c.s.client, req)
12589	}
12590	return c.s.client.Do(req)
12591}
12592
12593// Do executes the "compute.backendServices.insert" call.
12594// Exactly one of *Operation or error will be non-nil. Any non-2xx
12595// status code is an error. Response headers are in either
12596// *Operation.ServerResponse.Header or (if a response was returned at
12597// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12598// to check whether the returned error was because
12599// http.StatusNotModified was returned.
12600func (c *BackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12601	gensupport.SetOptions(c.urlParams_, opts...)
12602	res, err := c.doRequest("json")
12603	if res != nil && res.StatusCode == http.StatusNotModified {
12604		if res.Body != nil {
12605			res.Body.Close()
12606		}
12607		return nil, &googleapi.Error{
12608			Code:   res.StatusCode,
12609			Header: res.Header,
12610		}
12611	}
12612	if err != nil {
12613		return nil, err
12614	}
12615	defer googleapi.CloseBody(res)
12616	if err := googleapi.CheckResponse(res); err != nil {
12617		return nil, err
12618	}
12619	ret := &Operation{
12620		ServerResponse: googleapi.ServerResponse{
12621			Header:         res.Header,
12622			HTTPStatusCode: res.StatusCode,
12623		},
12624	}
12625	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12626		return nil, err
12627	}
12628	return ret, nil
12629	// {
12630	//   "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.",
12631	//   "httpMethod": "POST",
12632	//   "id": "compute.backendServices.insert",
12633	//   "parameterOrder": [
12634	//     "project"
12635	//   ],
12636	//   "parameters": {
12637	//     "project": {
12638	//       "description": "Project ID for this request.",
12639	//       "location": "path",
12640	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12641	//       "required": true,
12642	//       "type": "string"
12643	//     }
12644	//   },
12645	//   "path": "{project}/global/backendServices",
12646	//   "request": {
12647	//     "$ref": "BackendService"
12648	//   },
12649	//   "response": {
12650	//     "$ref": "Operation"
12651	//   },
12652	//   "scopes": [
12653	//     "https://www.googleapis.com/auth/cloud-platform",
12654	//     "https://www.googleapis.com/auth/compute"
12655	//   ]
12656	// }
12657
12658}
12659
12660// method id "compute.backendServices.list":
12661
12662type BackendServicesListCall struct {
12663	s            *Service
12664	project      string
12665	urlParams_   gensupport.URLParams
12666	ifNoneMatch_ string
12667	ctx_         context.Context
12668}
12669
12670// List: Retrieves the list of BackendService resources available to the
12671// specified project.
12672// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/list
12673func (r *BackendServicesService) List(project string) *BackendServicesListCall {
12674	c := &BackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12675	c.project = project
12676	return c
12677}
12678
12679// Filter sets the optional parameter "filter": Sets a filter expression
12680// for filtering listed resources, in the form filter={expression}. Your
12681// {expression} must be in the format: field_name comparison_string
12682// literal_string.
12683//
12684// The field_name is the name of the field you want to compare. Only
12685// atomic field types are supported (string, number, boolean). The
12686// comparison_string must be either eq (equals) or ne (not equals). The
12687// literal_string is the string value to filter to. The literal value
12688// must be valid for the type of field you are filtering by (string,
12689// number, boolean). For string fields, the literal value is interpreted
12690// as a regular expression using RE2 syntax. The literal value must
12691// match the entire field.
12692//
12693// For example, to filter for instances that do not have a name of
12694// example-instance, you would use filter=name ne
12695// example-instance.
12696//
12697// Compute Engine Beta API Only: If you use filtering in the Beta API,
12698// you can also filter on nested fields. For example, you could filter
12699// on instances that have set the scheduling.automaticRestart field to
12700// true. In particular, use filtering on nested fields to take advantage
12701// of instance labels to organize and filter results based on label
12702// values.
12703//
12704// The Beta API also supports filtering on multiple expressions by
12705// providing each separate expression within parentheses. For example,
12706// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
12707// Multiple expressions are treated as AND expressions, meaning that
12708// resources must match all expressions to pass the filters.
12709func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall {
12710	c.urlParams_.Set("filter", filter)
12711	return c
12712}
12713
12714// MaxResults sets the optional parameter "maxResults": The maximum
12715// number of results per page that should be returned. If the number of
12716// available results is larger than maxResults, Compute Engine returns a
12717// nextPageToken that can be used to get the next page of results in
12718// subsequent list requests.
12719func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall {
12720	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
12721	return c
12722}
12723
12724// OrderBy sets the optional parameter "orderBy": Sorts list results by
12725// a certain order. By default, results are returned in alphanumerical
12726// order based on the resource name.
12727//
12728// You can also sort results in descending order based on the creation
12729// timestamp using orderBy="creationTimestamp desc". This sorts results
12730// based on the creationTimestamp field in reverse chronological order
12731// (newest result first). Use this to sort resources like operations so
12732// that the newest operation is returned first.
12733//
12734// Currently, only sorting by name or creationTimestamp desc is
12735// supported.
12736func (c *BackendServicesListCall) OrderBy(orderBy string) *BackendServicesListCall {
12737	c.urlParams_.Set("orderBy", orderBy)
12738	return c
12739}
12740
12741// PageToken sets the optional parameter "pageToken": Specifies a page
12742// token to use. Set pageToken to the nextPageToken returned by a
12743// previous list request to get the next page of results.
12744func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall {
12745	c.urlParams_.Set("pageToken", pageToken)
12746	return c
12747}
12748
12749// Fields allows partial responses to be retrieved. See
12750// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12751// for more information.
12752func (c *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall {
12753	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12754	return c
12755}
12756
12757// IfNoneMatch sets the optional parameter which makes the operation
12758// fail if the object's ETag matches the given value. This is useful for
12759// getting updates only after the object has changed since the last
12760// request. Use googleapi.IsNotModified to check whether the response
12761// error from Do is the result of In-None-Match.
12762func (c *BackendServicesListCall) IfNoneMatch(entityTag string) *BackendServicesListCall {
12763	c.ifNoneMatch_ = entityTag
12764	return c
12765}
12766
12767// Context sets the context to be used in this call's Do method. Any
12768// pending HTTP request will be aborted if the provided context is
12769// canceled.
12770func (c *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall {
12771	c.ctx_ = ctx
12772	return c
12773}
12774
12775func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) {
12776	var body io.Reader = nil
12777	c.urlParams_.Set("alt", alt)
12778	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices")
12779	urls += "?" + c.urlParams_.Encode()
12780	req, _ := http.NewRequest("GET", urls, body)
12781	googleapi.Expand(req.URL, map[string]string{
12782		"project": c.project,
12783	})
12784	req.Header.Set("User-Agent", c.s.userAgent())
12785	if c.ifNoneMatch_ != "" {
12786		req.Header.Set("If-None-Match", c.ifNoneMatch_)
12787	}
12788	if c.ctx_ != nil {
12789		return ctxhttp.Do(c.ctx_, c.s.client, req)
12790	}
12791	return c.s.client.Do(req)
12792}
12793
12794// Do executes the "compute.backendServices.list" call.
12795// Exactly one of *BackendServiceList or error will be non-nil. Any
12796// non-2xx status code is an error. Response headers are in either
12797// *BackendServiceList.ServerResponse.Header or (if a response was
12798// returned at all) in error.(*googleapi.Error).Header. Use
12799// googleapi.IsNotModified to check whether the returned error was
12800// because http.StatusNotModified was returned.
12801func (c *BackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) {
12802	gensupport.SetOptions(c.urlParams_, opts...)
12803	res, err := c.doRequest("json")
12804	if res != nil && res.StatusCode == http.StatusNotModified {
12805		if res.Body != nil {
12806			res.Body.Close()
12807		}
12808		return nil, &googleapi.Error{
12809			Code:   res.StatusCode,
12810			Header: res.Header,
12811		}
12812	}
12813	if err != nil {
12814		return nil, err
12815	}
12816	defer googleapi.CloseBody(res)
12817	if err := googleapi.CheckResponse(res); err != nil {
12818		return nil, err
12819	}
12820	ret := &BackendServiceList{
12821		ServerResponse: googleapi.ServerResponse{
12822			Header:         res.Header,
12823			HTTPStatusCode: res.StatusCode,
12824		},
12825	}
12826	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
12827		return nil, err
12828	}
12829	return ret, nil
12830	// {
12831	//   "description": "Retrieves the list of BackendService resources available to the specified project.",
12832	//   "httpMethod": "GET",
12833	//   "id": "compute.backendServices.list",
12834	//   "parameterOrder": [
12835	//     "project"
12836	//   ],
12837	//   "parameters": {
12838	//     "filter": {
12839	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
12840	//       "location": "query",
12841	//       "type": "string"
12842	//     },
12843	//     "maxResults": {
12844	//       "default": "500",
12845	//       "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.",
12846	//       "format": "uint32",
12847	//       "location": "query",
12848	//       "maximum": "500",
12849	//       "minimum": "0",
12850	//       "type": "integer"
12851	//     },
12852	//     "orderBy": {
12853	//       "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.",
12854	//       "location": "query",
12855	//       "type": "string"
12856	//     },
12857	//     "pageToken": {
12858	//       "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.",
12859	//       "location": "query",
12860	//       "type": "string"
12861	//     },
12862	//     "project": {
12863	//       "description": "Project ID for this request.",
12864	//       "location": "path",
12865	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
12866	//       "required": true,
12867	//       "type": "string"
12868	//     }
12869	//   },
12870	//   "path": "{project}/global/backendServices",
12871	//   "response": {
12872	//     "$ref": "BackendServiceList"
12873	//   },
12874	//   "scopes": [
12875	//     "https://www.googleapis.com/auth/cloud-platform",
12876	//     "https://www.googleapis.com/auth/compute",
12877	//     "https://www.googleapis.com/auth/compute.readonly"
12878	//   ]
12879	// }
12880
12881}
12882
12883// Pages invokes f for each page of results.
12884// A non-nil error returned from f will halt the iteration.
12885// The provided context supersedes any context provided to the Context method.
12886func (c *BackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error {
12887	c.ctx_ = ctx
12888	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12889	for {
12890		x, err := c.Do()
12891		if err != nil {
12892			return err
12893		}
12894		if err := f(x); err != nil {
12895			return err
12896		}
12897		if x.NextPageToken == "" {
12898			return nil
12899		}
12900		c.PageToken(x.NextPageToken)
12901	}
12902}
12903
12904// method id "compute.backendServices.patch":
12905
12906type BackendServicesPatchCall struct {
12907	s              *Service
12908	project        string
12909	backendService string
12910	backendservice *BackendService
12911	urlParams_     gensupport.URLParams
12912	ctx_           context.Context
12913}
12914
12915// Patch: Updates the entire content of the BackendService resource.
12916// There are several restrictions and guidelines to keep in mind when
12917// updating a backend service. Read  Restrictions and Guidelines for
12918// more information. This method supports patch semantics.
12919// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch
12920func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall {
12921	c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12922	c.project = project
12923	c.backendService = backendService
12924	c.backendservice = backendservice
12925	return c
12926}
12927
12928// Fields allows partial responses to be retrieved. See
12929// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12930// for more information.
12931func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall {
12932	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12933	return c
12934}
12935
12936// Context sets the context to be used in this call's Do method. Any
12937// pending HTTP request will be aborted if the provided context is
12938// canceled.
12939func (c *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall {
12940	c.ctx_ = ctx
12941	return c
12942}
12943
12944func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) {
12945	var body io.Reader = nil
12946	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
12947	if err != nil {
12948		return nil, err
12949	}
12950	ctype := "application/json"
12951	c.urlParams_.Set("alt", alt)
12952	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
12953	urls += "?" + c.urlParams_.Encode()
12954	req, _ := http.NewRequest("PATCH", urls, body)
12955	googleapi.Expand(req.URL, map[string]string{
12956		"project":        c.project,
12957		"backendService": c.backendService,
12958	})
12959	req.Header.Set("Content-Type", ctype)
12960	req.Header.Set("User-Agent", c.s.userAgent())
12961	if c.ctx_ != nil {
12962		return ctxhttp.Do(c.ctx_, c.s.client, req)
12963	}
12964	return c.s.client.Do(req)
12965}
12966
12967// Do executes the "compute.backendServices.patch" call.
12968// Exactly one of *Operation or error will be non-nil. Any non-2xx
12969// status code is an error. Response headers are in either
12970// *Operation.ServerResponse.Header or (if a response was returned at
12971// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12972// to check whether the returned error was because
12973// http.StatusNotModified was returned.
12974func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12975	gensupport.SetOptions(c.urlParams_, opts...)
12976	res, err := c.doRequest("json")
12977	if res != nil && res.StatusCode == http.StatusNotModified {
12978		if res.Body != nil {
12979			res.Body.Close()
12980		}
12981		return nil, &googleapi.Error{
12982			Code:   res.StatusCode,
12983			Header: res.Header,
12984		}
12985	}
12986	if err != nil {
12987		return nil, err
12988	}
12989	defer googleapi.CloseBody(res)
12990	if err := googleapi.CheckResponse(res); err != nil {
12991		return nil, err
12992	}
12993	ret := &Operation{
12994		ServerResponse: googleapi.ServerResponse{
12995			Header:         res.Header,
12996			HTTPStatusCode: res.StatusCode,
12997		},
12998	}
12999	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13000		return nil, err
13001	}
13002	return ret, nil
13003	// {
13004	//   "description": "Updates the entire content of the BackendService resource. There are several restrictions and guidelines to keep in mind when updating a backend service. Read  Restrictions and Guidelines for more information. This method supports patch semantics.",
13005	//   "httpMethod": "PATCH",
13006	//   "id": "compute.backendServices.patch",
13007	//   "parameterOrder": [
13008	//     "project",
13009	//     "backendService"
13010	//   ],
13011	//   "parameters": {
13012	//     "backendService": {
13013	//       "description": "Name of the BackendService resource to update.",
13014	//       "location": "path",
13015	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13016	//       "required": true,
13017	//       "type": "string"
13018	//     },
13019	//     "project": {
13020	//       "description": "Project ID for this request.",
13021	//       "location": "path",
13022	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13023	//       "required": true,
13024	//       "type": "string"
13025	//     }
13026	//   },
13027	//   "path": "{project}/global/backendServices/{backendService}",
13028	//   "request": {
13029	//     "$ref": "BackendService"
13030	//   },
13031	//   "response": {
13032	//     "$ref": "Operation"
13033	//   },
13034	//   "scopes": [
13035	//     "https://www.googleapis.com/auth/cloud-platform",
13036	//     "https://www.googleapis.com/auth/compute"
13037	//   ]
13038	// }
13039
13040}
13041
13042// method id "compute.backendServices.testIamPermissions":
13043
13044type BackendServicesTestIamPermissionsCall struct {
13045	s                      *Service
13046	project                string
13047	resource               string
13048	testpermissionsrequest *TestPermissionsRequest
13049	urlParams_             gensupport.URLParams
13050	ctx_                   context.Context
13051}
13052
13053// TestIamPermissions: Returns permissions that a caller has on the
13054// specified resource.
13055func (r *BackendServicesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *BackendServicesTestIamPermissionsCall {
13056	c := &BackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13057	c.project = project
13058	c.resource = resource
13059	c.testpermissionsrequest = testpermissionsrequest
13060	return c
13061}
13062
13063// Fields allows partial responses to be retrieved. See
13064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13065// for more information.
13066func (c *BackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *BackendServicesTestIamPermissionsCall {
13067	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13068	return c
13069}
13070
13071// Context sets the context to be used in this call's Do method. Any
13072// pending HTTP request will be aborted if the provided context is
13073// canceled.
13074func (c *BackendServicesTestIamPermissionsCall) Context(ctx context.Context) *BackendServicesTestIamPermissionsCall {
13075	c.ctx_ = ctx
13076	return c
13077}
13078
13079func (c *BackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
13080	var body io.Reader = nil
13081	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
13082	if err != nil {
13083		return nil, err
13084	}
13085	ctype := "application/json"
13086	c.urlParams_.Set("alt", alt)
13087	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{resource}/testIamPermissions")
13088	urls += "?" + c.urlParams_.Encode()
13089	req, _ := http.NewRequest("POST", urls, body)
13090	googleapi.Expand(req.URL, map[string]string{
13091		"project":  c.project,
13092		"resource": c.resource,
13093	})
13094	req.Header.Set("Content-Type", ctype)
13095	req.Header.Set("User-Agent", c.s.userAgent())
13096	if c.ctx_ != nil {
13097		return ctxhttp.Do(c.ctx_, c.s.client, req)
13098	}
13099	return c.s.client.Do(req)
13100}
13101
13102// Do executes the "compute.backendServices.testIamPermissions" call.
13103// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
13104// non-2xx status code is an error. Response headers are in either
13105// *TestPermissionsResponse.ServerResponse.Header or (if a response was
13106// returned at all) in error.(*googleapi.Error).Header. Use
13107// googleapi.IsNotModified to check whether the returned error was
13108// because http.StatusNotModified was returned.
13109func (c *BackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
13110	gensupport.SetOptions(c.urlParams_, opts...)
13111	res, err := c.doRequest("json")
13112	if res != nil && res.StatusCode == http.StatusNotModified {
13113		if res.Body != nil {
13114			res.Body.Close()
13115		}
13116		return nil, &googleapi.Error{
13117			Code:   res.StatusCode,
13118			Header: res.Header,
13119		}
13120	}
13121	if err != nil {
13122		return nil, err
13123	}
13124	defer googleapi.CloseBody(res)
13125	if err := googleapi.CheckResponse(res); err != nil {
13126		return nil, err
13127	}
13128	ret := &TestPermissionsResponse{
13129		ServerResponse: googleapi.ServerResponse{
13130			Header:         res.Header,
13131			HTTPStatusCode: res.StatusCode,
13132		},
13133	}
13134	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13135		return nil, err
13136	}
13137	return ret, nil
13138	// {
13139	//   "description": "Returns permissions that a caller has on the specified resource.",
13140	//   "httpMethod": "POST",
13141	//   "id": "compute.backendServices.testIamPermissions",
13142	//   "parameterOrder": [
13143	//     "project",
13144	//     "resource"
13145	//   ],
13146	//   "parameters": {
13147	//     "project": {
13148	//       "description": "Project ID for this request.",
13149	//       "location": "path",
13150	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13151	//       "required": true,
13152	//       "type": "string"
13153	//     },
13154	//     "resource": {
13155	//       "description": "Name of the resource for this request.",
13156	//       "location": "path",
13157	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
13158	//       "required": true,
13159	//       "type": "string"
13160	//     }
13161	//   },
13162	//   "path": "{project}/global/backendServices/{resource}/testIamPermissions",
13163	//   "request": {
13164	//     "$ref": "TestPermissionsRequest"
13165	//   },
13166	//   "response": {
13167	//     "$ref": "TestPermissionsResponse"
13168	//   },
13169	//   "scopes": [
13170	//     "https://www.googleapis.com/auth/cloud-platform",
13171	//     "https://www.googleapis.com/auth/compute",
13172	//     "https://www.googleapis.com/auth/compute.readonly"
13173	//   ]
13174	// }
13175
13176}
13177
13178// method id "compute.backendServices.update":
13179
13180type BackendServicesUpdateCall struct {
13181	s              *Service
13182	project        string
13183	backendService string
13184	backendservice *BackendService
13185	urlParams_     gensupport.URLParams
13186	ctx_           context.Context
13187}
13188
13189// Update: Updates the entire content of the BackendService resource.
13190// There are several restrictions and guidelines to keep in mind when
13191// updating a backend service. Read  Restrictions and Guidelines for
13192// more information.
13193// For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/update
13194func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall {
13195	c := &BackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13196	c.project = project
13197	c.backendService = backendService
13198	c.backendservice = backendservice
13199	return c
13200}
13201
13202// Fields allows partial responses to be retrieved. See
13203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13204// for more information.
13205func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall {
13206	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13207	return c
13208}
13209
13210// Context sets the context to be used in this call's Do method. Any
13211// pending HTTP request will be aborted if the provided context is
13212// canceled.
13213func (c *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall {
13214	c.ctx_ = ctx
13215	return c
13216}
13217
13218func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) {
13219	var body io.Reader = nil
13220	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
13221	if err != nil {
13222		return nil, err
13223	}
13224	ctype := "application/json"
13225	c.urlParams_.Set("alt", alt)
13226	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}")
13227	urls += "?" + c.urlParams_.Encode()
13228	req, _ := http.NewRequest("PUT", urls, body)
13229	googleapi.Expand(req.URL, map[string]string{
13230		"project":        c.project,
13231		"backendService": c.backendService,
13232	})
13233	req.Header.Set("Content-Type", ctype)
13234	req.Header.Set("User-Agent", c.s.userAgent())
13235	if c.ctx_ != nil {
13236		return ctxhttp.Do(c.ctx_, c.s.client, req)
13237	}
13238	return c.s.client.Do(req)
13239}
13240
13241// Do executes the "compute.backendServices.update" call.
13242// Exactly one of *Operation or error will be non-nil. Any non-2xx
13243// status code is an error. Response headers are in either
13244// *Operation.ServerResponse.Header or (if a response was returned at
13245// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13246// to check whether the returned error was because
13247// http.StatusNotModified was returned.
13248func (c *BackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13249	gensupport.SetOptions(c.urlParams_, opts...)
13250	res, err := c.doRequest("json")
13251	if res != nil && res.StatusCode == http.StatusNotModified {
13252		if res.Body != nil {
13253			res.Body.Close()
13254		}
13255		return nil, &googleapi.Error{
13256			Code:   res.StatusCode,
13257			Header: res.Header,
13258		}
13259	}
13260	if err != nil {
13261		return nil, err
13262	}
13263	defer googleapi.CloseBody(res)
13264	if err := googleapi.CheckResponse(res); err != nil {
13265		return nil, err
13266	}
13267	ret := &Operation{
13268		ServerResponse: googleapi.ServerResponse{
13269			Header:         res.Header,
13270			HTTPStatusCode: res.StatusCode,
13271		},
13272	}
13273	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13274		return nil, err
13275	}
13276	return ret, nil
13277	// {
13278	//   "description": "Updates the entire content of the BackendService resource. There are several restrictions and guidelines to keep in mind when updating a backend service. Read  Restrictions and Guidelines for more information.",
13279	//   "httpMethod": "PUT",
13280	//   "id": "compute.backendServices.update",
13281	//   "parameterOrder": [
13282	//     "project",
13283	//     "backendService"
13284	//   ],
13285	//   "parameters": {
13286	//     "backendService": {
13287	//       "description": "Name of the BackendService resource to update.",
13288	//       "location": "path",
13289	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13290	//       "required": true,
13291	//       "type": "string"
13292	//     },
13293	//     "project": {
13294	//       "description": "Project ID for this request.",
13295	//       "location": "path",
13296	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13297	//       "required": true,
13298	//       "type": "string"
13299	//     }
13300	//   },
13301	//   "path": "{project}/global/backendServices/{backendService}",
13302	//   "request": {
13303	//     "$ref": "BackendService"
13304	//   },
13305	//   "response": {
13306	//     "$ref": "Operation"
13307	//   },
13308	//   "scopes": [
13309	//     "https://www.googleapis.com/auth/cloud-platform",
13310	//     "https://www.googleapis.com/auth/compute"
13311	//   ]
13312	// }
13313
13314}
13315
13316// method id "compute.diskTypes.aggregatedList":
13317
13318type DiskTypesAggregatedListCall struct {
13319	s            *Service
13320	project      string
13321	urlParams_   gensupport.URLParams
13322	ifNoneMatch_ string
13323	ctx_         context.Context
13324}
13325
13326// AggregatedList: Retrieves an aggregated list of disk types.
13327// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/aggregatedList
13328func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall {
13329	c := &DiskTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13330	c.project = project
13331	return c
13332}
13333
13334// Filter sets the optional parameter "filter": Sets a filter expression
13335// for filtering listed resources, in the form filter={expression}. Your
13336// {expression} must be in the format: field_name comparison_string
13337// literal_string.
13338//
13339// The field_name is the name of the field you want to compare. Only
13340// atomic field types are supported (string, number, boolean). The
13341// comparison_string must be either eq (equals) or ne (not equals). The
13342// literal_string is the string value to filter to. The literal value
13343// must be valid for the type of field you are filtering by (string,
13344// number, boolean). For string fields, the literal value is interpreted
13345// as a regular expression using RE2 syntax. The literal value must
13346// match the entire field.
13347//
13348// For example, to filter for instances that do not have a name of
13349// example-instance, you would use filter=name ne
13350// example-instance.
13351//
13352// Compute Engine Beta API Only: If you use filtering in the Beta API,
13353// you can also filter on nested fields. For example, you could filter
13354// on instances that have set the scheduling.automaticRestart field to
13355// true. In particular, use filtering on nested fields to take advantage
13356// of instance labels to organize and filter results based on label
13357// values.
13358//
13359// The Beta API also supports filtering on multiple expressions by
13360// providing each separate expression within parentheses. For example,
13361// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
13362// Multiple expressions are treated as AND expressions, meaning that
13363// resources must match all expressions to pass the filters.
13364func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall {
13365	c.urlParams_.Set("filter", filter)
13366	return c
13367}
13368
13369// MaxResults sets the optional parameter "maxResults": The maximum
13370// number of results per page that should be returned. If the number of
13371// available results is larger than maxResults, Compute Engine returns a
13372// nextPageToken that can be used to get the next page of results in
13373// subsequent list requests.
13374func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall {
13375	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13376	return c
13377}
13378
13379// OrderBy sets the optional parameter "orderBy": Sorts list results by
13380// a certain order. By default, results are returned in alphanumerical
13381// order based on the resource name.
13382//
13383// You can also sort results in descending order based on the creation
13384// timestamp using orderBy="creationTimestamp desc". This sorts results
13385// based on the creationTimestamp field in reverse chronological order
13386// (newest result first). Use this to sort resources like operations so
13387// that the newest operation is returned first.
13388//
13389// Currently, only sorting by name or creationTimestamp desc is
13390// supported.
13391func (c *DiskTypesAggregatedListCall) OrderBy(orderBy string) *DiskTypesAggregatedListCall {
13392	c.urlParams_.Set("orderBy", orderBy)
13393	return c
13394}
13395
13396// PageToken sets the optional parameter "pageToken": Specifies a page
13397// token to use. Set pageToken to the nextPageToken returned by a
13398// previous list request to get the next page of results.
13399func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall {
13400	c.urlParams_.Set("pageToken", pageToken)
13401	return c
13402}
13403
13404// Fields allows partial responses to be retrieved. See
13405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13406// for more information.
13407func (c *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall {
13408	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13409	return c
13410}
13411
13412// IfNoneMatch sets the optional parameter which makes the operation
13413// fail if the object's ETag matches the given value. This is useful for
13414// getting updates only after the object has changed since the last
13415// request. Use googleapi.IsNotModified to check whether the response
13416// error from Do is the result of In-None-Match.
13417func (c *DiskTypesAggregatedListCall) IfNoneMatch(entityTag string) *DiskTypesAggregatedListCall {
13418	c.ifNoneMatch_ = entityTag
13419	return c
13420}
13421
13422// Context sets the context to be used in this call's Do method. Any
13423// pending HTTP request will be aborted if the provided context is
13424// canceled.
13425func (c *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall {
13426	c.ctx_ = ctx
13427	return c
13428}
13429
13430func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
13431	var body io.Reader = nil
13432	c.urlParams_.Set("alt", alt)
13433	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/diskTypes")
13434	urls += "?" + c.urlParams_.Encode()
13435	req, _ := http.NewRequest("GET", urls, body)
13436	googleapi.Expand(req.URL, map[string]string{
13437		"project": c.project,
13438	})
13439	req.Header.Set("User-Agent", c.s.userAgent())
13440	if c.ifNoneMatch_ != "" {
13441		req.Header.Set("If-None-Match", c.ifNoneMatch_)
13442	}
13443	if c.ctx_ != nil {
13444		return ctxhttp.Do(c.ctx_, c.s.client, req)
13445	}
13446	return c.s.client.Do(req)
13447}
13448
13449// Do executes the "compute.diskTypes.aggregatedList" call.
13450// Exactly one of *DiskTypeAggregatedList or error will be non-nil. Any
13451// non-2xx status code is an error. Response headers are in either
13452// *DiskTypeAggregatedList.ServerResponse.Header or (if a response was
13453// returned at all) in error.(*googleapi.Error).Header. Use
13454// googleapi.IsNotModified to check whether the returned error was
13455// because http.StatusNotModified was returned.
13456func (c *DiskTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskTypeAggregatedList, error) {
13457	gensupport.SetOptions(c.urlParams_, opts...)
13458	res, err := c.doRequest("json")
13459	if res != nil && res.StatusCode == http.StatusNotModified {
13460		if res.Body != nil {
13461			res.Body.Close()
13462		}
13463		return nil, &googleapi.Error{
13464			Code:   res.StatusCode,
13465			Header: res.Header,
13466		}
13467	}
13468	if err != nil {
13469		return nil, err
13470	}
13471	defer googleapi.CloseBody(res)
13472	if err := googleapi.CheckResponse(res); err != nil {
13473		return nil, err
13474	}
13475	ret := &DiskTypeAggregatedList{
13476		ServerResponse: googleapi.ServerResponse{
13477			Header:         res.Header,
13478			HTTPStatusCode: res.StatusCode,
13479		},
13480	}
13481	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13482		return nil, err
13483	}
13484	return ret, nil
13485	// {
13486	//   "description": "Retrieves an aggregated list of disk types.",
13487	//   "httpMethod": "GET",
13488	//   "id": "compute.diskTypes.aggregatedList",
13489	//   "parameterOrder": [
13490	//     "project"
13491	//   ],
13492	//   "parameters": {
13493	//     "filter": {
13494	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
13495	//       "location": "query",
13496	//       "type": "string"
13497	//     },
13498	//     "maxResults": {
13499	//       "default": "500",
13500	//       "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.",
13501	//       "format": "uint32",
13502	//       "location": "query",
13503	//       "maximum": "500",
13504	//       "minimum": "0",
13505	//       "type": "integer"
13506	//     },
13507	//     "orderBy": {
13508	//       "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.",
13509	//       "location": "query",
13510	//       "type": "string"
13511	//     },
13512	//     "pageToken": {
13513	//       "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.",
13514	//       "location": "query",
13515	//       "type": "string"
13516	//     },
13517	//     "project": {
13518	//       "description": "Project ID for this request.",
13519	//       "location": "path",
13520	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13521	//       "required": true,
13522	//       "type": "string"
13523	//     }
13524	//   },
13525	//   "path": "{project}/aggregated/diskTypes",
13526	//   "response": {
13527	//     "$ref": "DiskTypeAggregatedList"
13528	//   },
13529	//   "scopes": [
13530	//     "https://www.googleapis.com/auth/cloud-platform",
13531	//     "https://www.googleapis.com/auth/compute",
13532	//     "https://www.googleapis.com/auth/compute.readonly"
13533	//   ]
13534	// }
13535
13536}
13537
13538// Pages invokes f for each page of results.
13539// A non-nil error returned from f will halt the iteration.
13540// The provided context supersedes any context provided to the Context method.
13541func (c *DiskTypesAggregatedListCall) Pages(ctx context.Context, f func(*DiskTypeAggregatedList) error) error {
13542	c.ctx_ = ctx
13543	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13544	for {
13545		x, err := c.Do()
13546		if err != nil {
13547			return err
13548		}
13549		if err := f(x); err != nil {
13550			return err
13551		}
13552		if x.NextPageToken == "" {
13553			return nil
13554		}
13555		c.PageToken(x.NextPageToken)
13556	}
13557}
13558
13559// method id "compute.diskTypes.get":
13560
13561type DiskTypesGetCall struct {
13562	s            *Service
13563	project      string
13564	zone         string
13565	diskType     string
13566	urlParams_   gensupport.URLParams
13567	ifNoneMatch_ string
13568	ctx_         context.Context
13569}
13570
13571// Get: Returns the specified disk type. Get a list of available disk
13572// types by making a list() request.
13573// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/get
13574func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall {
13575	c := &DiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13576	c.project = project
13577	c.zone = zone
13578	c.diskType = diskType
13579	return c
13580}
13581
13582// Fields allows partial responses to be retrieved. See
13583// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13584// for more information.
13585func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall {
13586	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13587	return c
13588}
13589
13590// IfNoneMatch sets the optional parameter which makes the operation
13591// fail if the object's ETag matches the given value. This is useful for
13592// getting updates only after the object has changed since the last
13593// request. Use googleapi.IsNotModified to check whether the response
13594// error from Do is the result of In-None-Match.
13595func (c *DiskTypesGetCall) IfNoneMatch(entityTag string) *DiskTypesGetCall {
13596	c.ifNoneMatch_ = entityTag
13597	return c
13598}
13599
13600// Context sets the context to be used in this call's Do method. Any
13601// pending HTTP request will be aborted if the provided context is
13602// canceled.
13603func (c *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall {
13604	c.ctx_ = ctx
13605	return c
13606}
13607
13608func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) {
13609	var body io.Reader = nil
13610	c.urlParams_.Set("alt", alt)
13611	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes/{diskType}")
13612	urls += "?" + c.urlParams_.Encode()
13613	req, _ := http.NewRequest("GET", urls, body)
13614	googleapi.Expand(req.URL, map[string]string{
13615		"project":  c.project,
13616		"zone":     c.zone,
13617		"diskType": c.diskType,
13618	})
13619	req.Header.Set("User-Agent", c.s.userAgent())
13620	if c.ifNoneMatch_ != "" {
13621		req.Header.Set("If-None-Match", c.ifNoneMatch_)
13622	}
13623	if c.ctx_ != nil {
13624		return ctxhttp.Do(c.ctx_, c.s.client, req)
13625	}
13626	return c.s.client.Do(req)
13627}
13628
13629// Do executes the "compute.diskTypes.get" call.
13630// Exactly one of *DiskType or error will be non-nil. Any non-2xx status
13631// code is an error. Response headers are in either
13632// *DiskType.ServerResponse.Header or (if a response was returned at
13633// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13634// to check whether the returned error was because
13635// http.StatusNotModified was returned.
13636func (c *DiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) {
13637	gensupport.SetOptions(c.urlParams_, opts...)
13638	res, err := c.doRequest("json")
13639	if res != nil && res.StatusCode == http.StatusNotModified {
13640		if res.Body != nil {
13641			res.Body.Close()
13642		}
13643		return nil, &googleapi.Error{
13644			Code:   res.StatusCode,
13645			Header: res.Header,
13646		}
13647	}
13648	if err != nil {
13649		return nil, err
13650	}
13651	defer googleapi.CloseBody(res)
13652	if err := googleapi.CheckResponse(res); err != nil {
13653		return nil, err
13654	}
13655	ret := &DiskType{
13656		ServerResponse: googleapi.ServerResponse{
13657			Header:         res.Header,
13658			HTTPStatusCode: res.StatusCode,
13659		},
13660	}
13661	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13662		return nil, err
13663	}
13664	return ret, nil
13665	// {
13666	//   "description": "Returns the specified disk type. Get a list of available disk types by making a list() request.",
13667	//   "httpMethod": "GET",
13668	//   "id": "compute.diskTypes.get",
13669	//   "parameterOrder": [
13670	//     "project",
13671	//     "zone",
13672	//     "diskType"
13673	//   ],
13674	//   "parameters": {
13675	//     "diskType": {
13676	//       "description": "Name of the disk type to return.",
13677	//       "location": "path",
13678	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13679	//       "required": true,
13680	//       "type": "string"
13681	//     },
13682	//     "project": {
13683	//       "description": "Project ID for this request.",
13684	//       "location": "path",
13685	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13686	//       "required": true,
13687	//       "type": "string"
13688	//     },
13689	//     "zone": {
13690	//       "description": "The name of the zone for this request.",
13691	//       "location": "path",
13692	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13693	//       "required": true,
13694	//       "type": "string"
13695	//     }
13696	//   },
13697	//   "path": "{project}/zones/{zone}/diskTypes/{diskType}",
13698	//   "response": {
13699	//     "$ref": "DiskType"
13700	//   },
13701	//   "scopes": [
13702	//     "https://www.googleapis.com/auth/cloud-platform",
13703	//     "https://www.googleapis.com/auth/compute",
13704	//     "https://www.googleapis.com/auth/compute.readonly"
13705	//   ]
13706	// }
13707
13708}
13709
13710// method id "compute.diskTypes.list":
13711
13712type DiskTypesListCall struct {
13713	s            *Service
13714	project      string
13715	zone         string
13716	urlParams_   gensupport.URLParams
13717	ifNoneMatch_ string
13718	ctx_         context.Context
13719}
13720
13721// List: Retrieves a list of disk types available to the specified
13722// project.
13723// For details, see https://cloud.google.com/compute/docs/reference/latest/diskTypes/list
13724func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall {
13725	c := &DiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13726	c.project = project
13727	c.zone = zone
13728	return c
13729}
13730
13731// Filter sets the optional parameter "filter": Sets a filter expression
13732// for filtering listed resources, in the form filter={expression}. Your
13733// {expression} must be in the format: field_name comparison_string
13734// literal_string.
13735//
13736// The field_name is the name of the field you want to compare. Only
13737// atomic field types are supported (string, number, boolean). The
13738// comparison_string must be either eq (equals) or ne (not equals). The
13739// literal_string is the string value to filter to. The literal value
13740// must be valid for the type of field you are filtering by (string,
13741// number, boolean). For string fields, the literal value is interpreted
13742// as a regular expression using RE2 syntax. The literal value must
13743// match the entire field.
13744//
13745// For example, to filter for instances that do not have a name of
13746// example-instance, you would use filter=name ne
13747// example-instance.
13748//
13749// Compute Engine Beta API Only: If you use filtering in the Beta API,
13750// you can also filter on nested fields. For example, you could filter
13751// on instances that have set the scheduling.automaticRestart field to
13752// true. In particular, use filtering on nested fields to take advantage
13753// of instance labels to organize and filter results based on label
13754// values.
13755//
13756// The Beta API also supports filtering on multiple expressions by
13757// providing each separate expression within parentheses. For example,
13758// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
13759// Multiple expressions are treated as AND expressions, meaning that
13760// resources must match all expressions to pass the filters.
13761func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall {
13762	c.urlParams_.Set("filter", filter)
13763	return c
13764}
13765
13766// MaxResults sets the optional parameter "maxResults": The maximum
13767// number of results per page that should be returned. If the number of
13768// available results is larger than maxResults, Compute Engine returns a
13769// nextPageToken that can be used to get the next page of results in
13770// subsequent list requests.
13771func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall {
13772	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
13773	return c
13774}
13775
13776// OrderBy sets the optional parameter "orderBy": Sorts list results by
13777// a certain order. By default, results are returned in alphanumerical
13778// order based on the resource name.
13779//
13780// You can also sort results in descending order based on the creation
13781// timestamp using orderBy="creationTimestamp desc". This sorts results
13782// based on the creationTimestamp field in reverse chronological order
13783// (newest result first). Use this to sort resources like operations so
13784// that the newest operation is returned first.
13785//
13786// Currently, only sorting by name or creationTimestamp desc is
13787// supported.
13788func (c *DiskTypesListCall) OrderBy(orderBy string) *DiskTypesListCall {
13789	c.urlParams_.Set("orderBy", orderBy)
13790	return c
13791}
13792
13793// PageToken sets the optional parameter "pageToken": Specifies a page
13794// token to use. Set pageToken to the nextPageToken returned by a
13795// previous list request to get the next page of results.
13796func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall {
13797	c.urlParams_.Set("pageToken", pageToken)
13798	return c
13799}
13800
13801// Fields allows partial responses to be retrieved. See
13802// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13803// for more information.
13804func (c *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall {
13805	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13806	return c
13807}
13808
13809// IfNoneMatch sets the optional parameter which makes the operation
13810// fail if the object's ETag matches the given value. This is useful for
13811// getting updates only after the object has changed since the last
13812// request. Use googleapi.IsNotModified to check whether the response
13813// error from Do is the result of In-None-Match.
13814func (c *DiskTypesListCall) IfNoneMatch(entityTag string) *DiskTypesListCall {
13815	c.ifNoneMatch_ = entityTag
13816	return c
13817}
13818
13819// Context sets the context to be used in this call's Do method. Any
13820// pending HTTP request will be aborted if the provided context is
13821// canceled.
13822func (c *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall {
13823	c.ctx_ = ctx
13824	return c
13825}
13826
13827func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) {
13828	var body io.Reader = nil
13829	c.urlParams_.Set("alt", alt)
13830	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes")
13831	urls += "?" + c.urlParams_.Encode()
13832	req, _ := http.NewRequest("GET", urls, body)
13833	googleapi.Expand(req.URL, map[string]string{
13834		"project": c.project,
13835		"zone":    c.zone,
13836	})
13837	req.Header.Set("User-Agent", c.s.userAgent())
13838	if c.ifNoneMatch_ != "" {
13839		req.Header.Set("If-None-Match", c.ifNoneMatch_)
13840	}
13841	if c.ctx_ != nil {
13842		return ctxhttp.Do(c.ctx_, c.s.client, req)
13843	}
13844	return c.s.client.Do(req)
13845}
13846
13847// Do executes the "compute.diskTypes.list" call.
13848// Exactly one of *DiskTypeList or error will be non-nil. Any non-2xx
13849// status code is an error. Response headers are in either
13850// *DiskTypeList.ServerResponse.Header or (if a response was returned at
13851// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13852// to check whether the returned error was because
13853// http.StatusNotModified was returned.
13854func (c *DiskTypesListCall) Do(opts ...googleapi.CallOption) (*DiskTypeList, error) {
13855	gensupport.SetOptions(c.urlParams_, opts...)
13856	res, err := c.doRequest("json")
13857	if res != nil && res.StatusCode == http.StatusNotModified {
13858		if res.Body != nil {
13859			res.Body.Close()
13860		}
13861		return nil, &googleapi.Error{
13862			Code:   res.StatusCode,
13863			Header: res.Header,
13864		}
13865	}
13866	if err != nil {
13867		return nil, err
13868	}
13869	defer googleapi.CloseBody(res)
13870	if err := googleapi.CheckResponse(res); err != nil {
13871		return nil, err
13872	}
13873	ret := &DiskTypeList{
13874		ServerResponse: googleapi.ServerResponse{
13875			Header:         res.Header,
13876			HTTPStatusCode: res.StatusCode,
13877		},
13878	}
13879	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
13880		return nil, err
13881	}
13882	return ret, nil
13883	// {
13884	//   "description": "Retrieves a list of disk types available to the specified project.",
13885	//   "httpMethod": "GET",
13886	//   "id": "compute.diskTypes.list",
13887	//   "parameterOrder": [
13888	//     "project",
13889	//     "zone"
13890	//   ],
13891	//   "parameters": {
13892	//     "filter": {
13893	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
13894	//       "location": "query",
13895	//       "type": "string"
13896	//     },
13897	//     "maxResults": {
13898	//       "default": "500",
13899	//       "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.",
13900	//       "format": "uint32",
13901	//       "location": "query",
13902	//       "maximum": "500",
13903	//       "minimum": "0",
13904	//       "type": "integer"
13905	//     },
13906	//     "orderBy": {
13907	//       "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.",
13908	//       "location": "query",
13909	//       "type": "string"
13910	//     },
13911	//     "pageToken": {
13912	//       "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.",
13913	//       "location": "query",
13914	//       "type": "string"
13915	//     },
13916	//     "project": {
13917	//       "description": "Project ID for this request.",
13918	//       "location": "path",
13919	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
13920	//       "required": true,
13921	//       "type": "string"
13922	//     },
13923	//     "zone": {
13924	//       "description": "The name of the zone for this request.",
13925	//       "location": "path",
13926	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
13927	//       "required": true,
13928	//       "type": "string"
13929	//     }
13930	//   },
13931	//   "path": "{project}/zones/{zone}/diskTypes",
13932	//   "response": {
13933	//     "$ref": "DiskTypeList"
13934	//   },
13935	//   "scopes": [
13936	//     "https://www.googleapis.com/auth/cloud-platform",
13937	//     "https://www.googleapis.com/auth/compute",
13938	//     "https://www.googleapis.com/auth/compute.readonly"
13939	//   ]
13940	// }
13941
13942}
13943
13944// Pages invokes f for each page of results.
13945// A non-nil error returned from f will halt the iteration.
13946// The provided context supersedes any context provided to the Context method.
13947func (c *DiskTypesListCall) Pages(ctx context.Context, f func(*DiskTypeList) error) error {
13948	c.ctx_ = ctx
13949	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13950	for {
13951		x, err := c.Do()
13952		if err != nil {
13953			return err
13954		}
13955		if err := f(x); err != nil {
13956			return err
13957		}
13958		if x.NextPageToken == "" {
13959			return nil
13960		}
13961		c.PageToken(x.NextPageToken)
13962	}
13963}
13964
13965// method id "compute.disks.aggregatedList":
13966
13967type DisksAggregatedListCall struct {
13968	s            *Service
13969	project      string
13970	urlParams_   gensupport.URLParams
13971	ifNoneMatch_ string
13972	ctx_         context.Context
13973}
13974
13975// AggregatedList: Retrieves an aggregated list of persistent disks.
13976// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/aggregatedList
13977func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall {
13978	c := &DisksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13979	c.project = project
13980	return c
13981}
13982
13983// Filter sets the optional parameter "filter": Sets a filter expression
13984// for filtering listed resources, in the form filter={expression}. Your
13985// {expression} must be in the format: field_name comparison_string
13986// literal_string.
13987//
13988// The field_name is the name of the field you want to compare. Only
13989// atomic field types are supported (string, number, boolean). The
13990// comparison_string must be either eq (equals) or ne (not equals). The
13991// literal_string is the string value to filter to. The literal value
13992// must be valid for the type of field you are filtering by (string,
13993// number, boolean). For string fields, the literal value is interpreted
13994// as a regular expression using RE2 syntax. The literal value must
13995// match the entire field.
13996//
13997// For example, to filter for instances that do not have a name of
13998// example-instance, you would use filter=name ne
13999// example-instance.
14000//
14001// Compute Engine Beta API Only: If you use filtering in the Beta API,
14002// you can also filter on nested fields. For example, you could filter
14003// on instances that have set the scheduling.automaticRestart field to
14004// true. In particular, use filtering on nested fields to take advantage
14005// of instance labels to organize and filter results based on label
14006// values.
14007//
14008// The Beta API also supports filtering on multiple expressions by
14009// providing each separate expression within parentheses. For example,
14010// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
14011// Multiple expressions are treated as AND expressions, meaning that
14012// resources must match all expressions to pass the filters.
14013func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall {
14014	c.urlParams_.Set("filter", filter)
14015	return c
14016}
14017
14018// MaxResults sets the optional parameter "maxResults": The maximum
14019// number of results per page that should be returned. If the number of
14020// available results is larger than maxResults, Compute Engine returns a
14021// nextPageToken that can be used to get the next page of results in
14022// subsequent list requests.
14023func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall {
14024	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14025	return c
14026}
14027
14028// OrderBy sets the optional parameter "orderBy": Sorts list results by
14029// a certain order. By default, results are returned in alphanumerical
14030// order based on the resource name.
14031//
14032// You can also sort results in descending order based on the creation
14033// timestamp using orderBy="creationTimestamp desc". This sorts results
14034// based on the creationTimestamp field in reverse chronological order
14035// (newest result first). Use this to sort resources like operations so
14036// that the newest operation is returned first.
14037//
14038// Currently, only sorting by name or creationTimestamp desc is
14039// supported.
14040func (c *DisksAggregatedListCall) OrderBy(orderBy string) *DisksAggregatedListCall {
14041	c.urlParams_.Set("orderBy", orderBy)
14042	return c
14043}
14044
14045// PageToken sets the optional parameter "pageToken": Specifies a page
14046// token to use. Set pageToken to the nextPageToken returned by a
14047// previous list request to get the next page of results.
14048func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall {
14049	c.urlParams_.Set("pageToken", pageToken)
14050	return c
14051}
14052
14053// Fields allows partial responses to be retrieved. See
14054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14055// for more information.
14056func (c *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall {
14057	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14058	return c
14059}
14060
14061// IfNoneMatch sets the optional parameter which makes the operation
14062// fail if the object's ETag matches the given value. This is useful for
14063// getting updates only after the object has changed since the last
14064// request. Use googleapi.IsNotModified to check whether the response
14065// error from Do is the result of In-None-Match.
14066func (c *DisksAggregatedListCall) IfNoneMatch(entityTag string) *DisksAggregatedListCall {
14067	c.ifNoneMatch_ = entityTag
14068	return c
14069}
14070
14071// Context sets the context to be used in this call's Do method. Any
14072// pending HTTP request will be aborted if the provided context is
14073// canceled.
14074func (c *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall {
14075	c.ctx_ = ctx
14076	return c
14077}
14078
14079func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) {
14080	var body io.Reader = nil
14081	c.urlParams_.Set("alt", alt)
14082	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/disks")
14083	urls += "?" + c.urlParams_.Encode()
14084	req, _ := http.NewRequest("GET", urls, body)
14085	googleapi.Expand(req.URL, map[string]string{
14086		"project": c.project,
14087	})
14088	req.Header.Set("User-Agent", c.s.userAgent())
14089	if c.ifNoneMatch_ != "" {
14090		req.Header.Set("If-None-Match", c.ifNoneMatch_)
14091	}
14092	if c.ctx_ != nil {
14093		return ctxhttp.Do(c.ctx_, c.s.client, req)
14094	}
14095	return c.s.client.Do(req)
14096}
14097
14098// Do executes the "compute.disks.aggregatedList" call.
14099// Exactly one of *DiskAggregatedList or error will be non-nil. Any
14100// non-2xx status code is an error. Response headers are in either
14101// *DiskAggregatedList.ServerResponse.Header or (if a response was
14102// returned at all) in error.(*googleapi.Error).Header. Use
14103// googleapi.IsNotModified to check whether the returned error was
14104// because http.StatusNotModified was returned.
14105func (c *DisksAggregatedListCall) Do(opts ...googleapi.CallOption) (*DiskAggregatedList, error) {
14106	gensupport.SetOptions(c.urlParams_, opts...)
14107	res, err := c.doRequest("json")
14108	if res != nil && res.StatusCode == http.StatusNotModified {
14109		if res.Body != nil {
14110			res.Body.Close()
14111		}
14112		return nil, &googleapi.Error{
14113			Code:   res.StatusCode,
14114			Header: res.Header,
14115		}
14116	}
14117	if err != nil {
14118		return nil, err
14119	}
14120	defer googleapi.CloseBody(res)
14121	if err := googleapi.CheckResponse(res); err != nil {
14122		return nil, err
14123	}
14124	ret := &DiskAggregatedList{
14125		ServerResponse: googleapi.ServerResponse{
14126			Header:         res.Header,
14127			HTTPStatusCode: res.StatusCode,
14128		},
14129	}
14130	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14131		return nil, err
14132	}
14133	return ret, nil
14134	// {
14135	//   "description": "Retrieves an aggregated list of persistent disks.",
14136	//   "httpMethod": "GET",
14137	//   "id": "compute.disks.aggregatedList",
14138	//   "parameterOrder": [
14139	//     "project"
14140	//   ],
14141	//   "parameters": {
14142	//     "filter": {
14143	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
14144	//       "location": "query",
14145	//       "type": "string"
14146	//     },
14147	//     "maxResults": {
14148	//       "default": "500",
14149	//       "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.",
14150	//       "format": "uint32",
14151	//       "location": "query",
14152	//       "maximum": "500",
14153	//       "minimum": "0",
14154	//       "type": "integer"
14155	//     },
14156	//     "orderBy": {
14157	//       "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.",
14158	//       "location": "query",
14159	//       "type": "string"
14160	//     },
14161	//     "pageToken": {
14162	//       "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.",
14163	//       "location": "query",
14164	//       "type": "string"
14165	//     },
14166	//     "project": {
14167	//       "description": "Project ID for this request.",
14168	//       "location": "path",
14169	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14170	//       "required": true,
14171	//       "type": "string"
14172	//     }
14173	//   },
14174	//   "path": "{project}/aggregated/disks",
14175	//   "response": {
14176	//     "$ref": "DiskAggregatedList"
14177	//   },
14178	//   "scopes": [
14179	//     "https://www.googleapis.com/auth/cloud-platform",
14180	//     "https://www.googleapis.com/auth/compute",
14181	//     "https://www.googleapis.com/auth/compute.readonly"
14182	//   ]
14183	// }
14184
14185}
14186
14187// Pages invokes f for each page of results.
14188// A non-nil error returned from f will halt the iteration.
14189// The provided context supersedes any context provided to the Context method.
14190func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggregatedList) error) error {
14191	c.ctx_ = ctx
14192	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14193	for {
14194		x, err := c.Do()
14195		if err != nil {
14196			return err
14197		}
14198		if err := f(x); err != nil {
14199			return err
14200		}
14201		if x.NextPageToken == "" {
14202			return nil
14203		}
14204		c.PageToken(x.NextPageToken)
14205	}
14206}
14207
14208// method id "compute.disks.createSnapshot":
14209
14210type DisksCreateSnapshotCall struct {
14211	s          *Service
14212	project    string
14213	zone       string
14214	disk       string
14215	snapshot   *Snapshot
14216	urlParams_ gensupport.URLParams
14217	ctx_       context.Context
14218}
14219
14220// CreateSnapshot: Creates a snapshot of a specified persistent disk.
14221// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/createSnapshot
14222func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall {
14223	c := &DisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14224	c.project = project
14225	c.zone = zone
14226	c.disk = disk
14227	c.snapshot = snapshot
14228	return c
14229}
14230
14231// Fields allows partial responses to be retrieved. See
14232// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14233// for more information.
14234func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall {
14235	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14236	return c
14237}
14238
14239// Context sets the context to be used in this call's Do method. Any
14240// pending HTTP request will be aborted if the provided context is
14241// canceled.
14242func (c *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall {
14243	c.ctx_ = ctx
14244	return c
14245}
14246
14247func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) {
14248	var body io.Reader = nil
14249	body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot)
14250	if err != nil {
14251		return nil, err
14252	}
14253	ctype := "application/json"
14254	c.urlParams_.Set("alt", alt)
14255	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot")
14256	urls += "?" + c.urlParams_.Encode()
14257	req, _ := http.NewRequest("POST", urls, body)
14258	googleapi.Expand(req.URL, map[string]string{
14259		"project": c.project,
14260		"zone":    c.zone,
14261		"disk":    c.disk,
14262	})
14263	req.Header.Set("Content-Type", ctype)
14264	req.Header.Set("User-Agent", c.s.userAgent())
14265	if c.ctx_ != nil {
14266		return ctxhttp.Do(c.ctx_, c.s.client, req)
14267	}
14268	return c.s.client.Do(req)
14269}
14270
14271// Do executes the "compute.disks.createSnapshot" call.
14272// Exactly one of *Operation or error will be non-nil. Any non-2xx
14273// status code is an error. Response headers are in either
14274// *Operation.ServerResponse.Header or (if a response was returned at
14275// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14276// to check whether the returned error was because
14277// http.StatusNotModified was returned.
14278func (c *DisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14279	gensupport.SetOptions(c.urlParams_, opts...)
14280	res, err := c.doRequest("json")
14281	if res != nil && res.StatusCode == http.StatusNotModified {
14282		if res.Body != nil {
14283			res.Body.Close()
14284		}
14285		return nil, &googleapi.Error{
14286			Code:   res.StatusCode,
14287			Header: res.Header,
14288		}
14289	}
14290	if err != nil {
14291		return nil, err
14292	}
14293	defer googleapi.CloseBody(res)
14294	if err := googleapi.CheckResponse(res); err != nil {
14295		return nil, err
14296	}
14297	ret := &Operation{
14298		ServerResponse: googleapi.ServerResponse{
14299			Header:         res.Header,
14300			HTTPStatusCode: res.StatusCode,
14301		},
14302	}
14303	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14304		return nil, err
14305	}
14306	return ret, nil
14307	// {
14308	//   "description": "Creates a snapshot of a specified persistent disk.",
14309	//   "httpMethod": "POST",
14310	//   "id": "compute.disks.createSnapshot",
14311	//   "parameterOrder": [
14312	//     "project",
14313	//     "zone",
14314	//     "disk"
14315	//   ],
14316	//   "parameters": {
14317	//     "disk": {
14318	//       "description": "Name of the persistent disk to snapshot.",
14319	//       "location": "path",
14320	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14321	//       "required": true,
14322	//       "type": "string"
14323	//     },
14324	//     "project": {
14325	//       "description": "Project ID for this request.",
14326	//       "location": "path",
14327	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14328	//       "required": true,
14329	//       "type": "string"
14330	//     },
14331	//     "zone": {
14332	//       "description": "The name of the zone for this request.",
14333	//       "location": "path",
14334	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14335	//       "required": true,
14336	//       "type": "string"
14337	//     }
14338	//   },
14339	//   "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot",
14340	//   "request": {
14341	//     "$ref": "Snapshot"
14342	//   },
14343	//   "response": {
14344	//     "$ref": "Operation"
14345	//   },
14346	//   "scopes": [
14347	//     "https://www.googleapis.com/auth/cloud-platform",
14348	//     "https://www.googleapis.com/auth/compute"
14349	//   ]
14350	// }
14351
14352}
14353
14354// method id "compute.disks.delete":
14355
14356type DisksDeleteCall struct {
14357	s          *Service
14358	project    string
14359	zone       string
14360	disk       string
14361	urlParams_ gensupport.URLParams
14362	ctx_       context.Context
14363}
14364
14365// Delete: Deletes the specified persistent disk. Deleting a disk
14366// removes its data permanently and is irreversible. However, deleting a
14367// disk does not delete any snapshots previously made from the disk. You
14368// must separately delete snapshots.
14369// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/delete
14370func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall {
14371	c := &DisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14372	c.project = project
14373	c.zone = zone
14374	c.disk = disk
14375	return c
14376}
14377
14378// Fields allows partial responses to be retrieved. See
14379// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14380// for more information.
14381func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall {
14382	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14383	return c
14384}
14385
14386// Context sets the context to be used in this call's Do method. Any
14387// pending HTTP request will be aborted if the provided context is
14388// canceled.
14389func (c *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall {
14390	c.ctx_ = ctx
14391	return c
14392}
14393
14394func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) {
14395	var body io.Reader = nil
14396	c.urlParams_.Set("alt", alt)
14397	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}")
14398	urls += "?" + c.urlParams_.Encode()
14399	req, _ := http.NewRequest("DELETE", urls, body)
14400	googleapi.Expand(req.URL, map[string]string{
14401		"project": c.project,
14402		"zone":    c.zone,
14403		"disk":    c.disk,
14404	})
14405	req.Header.Set("User-Agent", c.s.userAgent())
14406	if c.ctx_ != nil {
14407		return ctxhttp.Do(c.ctx_, c.s.client, req)
14408	}
14409	return c.s.client.Do(req)
14410}
14411
14412// Do executes the "compute.disks.delete" call.
14413// Exactly one of *Operation or error will be non-nil. Any non-2xx
14414// status code is an error. Response headers are in either
14415// *Operation.ServerResponse.Header or (if a response was returned at
14416// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14417// to check whether the returned error was because
14418// http.StatusNotModified was returned.
14419func (c *DisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14420	gensupport.SetOptions(c.urlParams_, opts...)
14421	res, err := c.doRequest("json")
14422	if res != nil && res.StatusCode == http.StatusNotModified {
14423		if res.Body != nil {
14424			res.Body.Close()
14425		}
14426		return nil, &googleapi.Error{
14427			Code:   res.StatusCode,
14428			Header: res.Header,
14429		}
14430	}
14431	if err != nil {
14432		return nil, err
14433	}
14434	defer googleapi.CloseBody(res)
14435	if err := googleapi.CheckResponse(res); err != nil {
14436		return nil, err
14437	}
14438	ret := &Operation{
14439		ServerResponse: googleapi.ServerResponse{
14440			Header:         res.Header,
14441			HTTPStatusCode: res.StatusCode,
14442		},
14443	}
14444	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14445		return nil, err
14446	}
14447	return ret, nil
14448	// {
14449	//   "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.",
14450	//   "httpMethod": "DELETE",
14451	//   "id": "compute.disks.delete",
14452	//   "parameterOrder": [
14453	//     "project",
14454	//     "zone",
14455	//     "disk"
14456	//   ],
14457	//   "parameters": {
14458	//     "disk": {
14459	//       "description": "Name of the persistent disk to delete.",
14460	//       "location": "path",
14461	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14462	//       "required": true,
14463	//       "type": "string"
14464	//     },
14465	//     "project": {
14466	//       "description": "Project ID for this request.",
14467	//       "location": "path",
14468	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14469	//       "required": true,
14470	//       "type": "string"
14471	//     },
14472	//     "zone": {
14473	//       "description": "The name of the zone for this request.",
14474	//       "location": "path",
14475	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14476	//       "required": true,
14477	//       "type": "string"
14478	//     }
14479	//   },
14480	//   "path": "{project}/zones/{zone}/disks/{disk}",
14481	//   "response": {
14482	//     "$ref": "Operation"
14483	//   },
14484	//   "scopes": [
14485	//     "https://www.googleapis.com/auth/cloud-platform",
14486	//     "https://www.googleapis.com/auth/compute"
14487	//   ]
14488	// }
14489
14490}
14491
14492// method id "compute.disks.get":
14493
14494type DisksGetCall struct {
14495	s            *Service
14496	project      string
14497	zone         string
14498	disk         string
14499	urlParams_   gensupport.URLParams
14500	ifNoneMatch_ string
14501	ctx_         context.Context
14502}
14503
14504// Get: Returns a specified persistent disk. Get a list of available
14505// persistent disks by making a list() request.
14506// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/get
14507func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall {
14508	c := &DisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14509	c.project = project
14510	c.zone = zone
14511	c.disk = disk
14512	return c
14513}
14514
14515// Fields allows partial responses to be retrieved. See
14516// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14517// for more information.
14518func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall {
14519	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14520	return c
14521}
14522
14523// IfNoneMatch sets the optional parameter which makes the operation
14524// fail if the object's ETag matches the given value. This is useful for
14525// getting updates only after the object has changed since the last
14526// request. Use googleapi.IsNotModified to check whether the response
14527// error from Do is the result of In-None-Match.
14528func (c *DisksGetCall) IfNoneMatch(entityTag string) *DisksGetCall {
14529	c.ifNoneMatch_ = entityTag
14530	return c
14531}
14532
14533// Context sets the context to be used in this call's Do method. Any
14534// pending HTTP request will be aborted if the provided context is
14535// canceled.
14536func (c *DisksGetCall) Context(ctx context.Context) *DisksGetCall {
14537	c.ctx_ = ctx
14538	return c
14539}
14540
14541func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) {
14542	var body io.Reader = nil
14543	c.urlParams_.Set("alt", alt)
14544	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}")
14545	urls += "?" + c.urlParams_.Encode()
14546	req, _ := http.NewRequest("GET", urls, body)
14547	googleapi.Expand(req.URL, map[string]string{
14548		"project": c.project,
14549		"zone":    c.zone,
14550		"disk":    c.disk,
14551	})
14552	req.Header.Set("User-Agent", c.s.userAgent())
14553	if c.ifNoneMatch_ != "" {
14554		req.Header.Set("If-None-Match", c.ifNoneMatch_)
14555	}
14556	if c.ctx_ != nil {
14557		return ctxhttp.Do(c.ctx_, c.s.client, req)
14558	}
14559	return c.s.client.Do(req)
14560}
14561
14562// Do executes the "compute.disks.get" call.
14563// Exactly one of *Disk or error will be non-nil. Any non-2xx status
14564// code is an error. Response headers are in either
14565// *Disk.ServerResponse.Header or (if a response was returned at all) in
14566// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14567// whether the returned error was because http.StatusNotModified was
14568// returned.
14569func (c *DisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) {
14570	gensupport.SetOptions(c.urlParams_, opts...)
14571	res, err := c.doRequest("json")
14572	if res != nil && res.StatusCode == http.StatusNotModified {
14573		if res.Body != nil {
14574			res.Body.Close()
14575		}
14576		return nil, &googleapi.Error{
14577			Code:   res.StatusCode,
14578			Header: res.Header,
14579		}
14580	}
14581	if err != nil {
14582		return nil, err
14583	}
14584	defer googleapi.CloseBody(res)
14585	if err := googleapi.CheckResponse(res); err != nil {
14586		return nil, err
14587	}
14588	ret := &Disk{
14589		ServerResponse: googleapi.ServerResponse{
14590			Header:         res.Header,
14591			HTTPStatusCode: res.StatusCode,
14592		},
14593	}
14594	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14595		return nil, err
14596	}
14597	return ret, nil
14598	// {
14599	//   "description": "Returns a specified persistent disk. Get a list of available persistent disks by making a list() request.",
14600	//   "httpMethod": "GET",
14601	//   "id": "compute.disks.get",
14602	//   "parameterOrder": [
14603	//     "project",
14604	//     "zone",
14605	//     "disk"
14606	//   ],
14607	//   "parameters": {
14608	//     "disk": {
14609	//       "description": "Name of the persistent disk to return.",
14610	//       "location": "path",
14611	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14612	//       "required": true,
14613	//       "type": "string"
14614	//     },
14615	//     "project": {
14616	//       "description": "Project ID for this request.",
14617	//       "location": "path",
14618	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14619	//       "required": true,
14620	//       "type": "string"
14621	//     },
14622	//     "zone": {
14623	//       "description": "The name of the zone for this request.",
14624	//       "location": "path",
14625	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14626	//       "required": true,
14627	//       "type": "string"
14628	//     }
14629	//   },
14630	//   "path": "{project}/zones/{zone}/disks/{disk}",
14631	//   "response": {
14632	//     "$ref": "Disk"
14633	//   },
14634	//   "scopes": [
14635	//     "https://www.googleapis.com/auth/cloud-platform",
14636	//     "https://www.googleapis.com/auth/compute",
14637	//     "https://www.googleapis.com/auth/compute.readonly"
14638	//   ]
14639	// }
14640
14641}
14642
14643// method id "compute.disks.insert":
14644
14645type DisksInsertCall struct {
14646	s          *Service
14647	project    string
14648	zone       string
14649	disk       *Disk
14650	urlParams_ gensupport.URLParams
14651	ctx_       context.Context
14652}
14653
14654// Insert: Creates a persistent disk in the specified project using the
14655// data in the request. You can create a disk with a sourceImage, a
14656// sourceSnapshot, or create an empty 200 GB data disk by omitting all
14657// properties. You can also create a disk that is larger than the
14658// default size by specifying the sizeGb property.
14659// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/insert
14660func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall {
14661	c := &DisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14662	c.project = project
14663	c.zone = zone
14664	c.disk = disk
14665	return c
14666}
14667
14668// SourceImage sets the optional parameter "sourceImage": Source image
14669// to restore onto a disk.
14670func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall {
14671	c.urlParams_.Set("sourceImage", sourceImage)
14672	return c
14673}
14674
14675// Fields allows partial responses to be retrieved. See
14676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14677// for more information.
14678func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall {
14679	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14680	return c
14681}
14682
14683// Context sets the context to be used in this call's Do method. Any
14684// pending HTTP request will be aborted if the provided context is
14685// canceled.
14686func (c *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall {
14687	c.ctx_ = ctx
14688	return c
14689}
14690
14691func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) {
14692	var body io.Reader = nil
14693	body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk)
14694	if err != nil {
14695		return nil, err
14696	}
14697	ctype := "application/json"
14698	c.urlParams_.Set("alt", alt)
14699	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks")
14700	urls += "?" + c.urlParams_.Encode()
14701	req, _ := http.NewRequest("POST", urls, body)
14702	googleapi.Expand(req.URL, map[string]string{
14703		"project": c.project,
14704		"zone":    c.zone,
14705	})
14706	req.Header.Set("Content-Type", ctype)
14707	req.Header.Set("User-Agent", c.s.userAgent())
14708	if c.ctx_ != nil {
14709		return ctxhttp.Do(c.ctx_, c.s.client, req)
14710	}
14711	return c.s.client.Do(req)
14712}
14713
14714// Do executes the "compute.disks.insert" call.
14715// Exactly one of *Operation or error will be non-nil. Any non-2xx
14716// status code is an error. Response headers are in either
14717// *Operation.ServerResponse.Header or (if a response was returned at
14718// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14719// to check whether the returned error was because
14720// http.StatusNotModified was returned.
14721func (c *DisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14722	gensupport.SetOptions(c.urlParams_, opts...)
14723	res, err := c.doRequest("json")
14724	if res != nil && res.StatusCode == http.StatusNotModified {
14725		if res.Body != nil {
14726			res.Body.Close()
14727		}
14728		return nil, &googleapi.Error{
14729			Code:   res.StatusCode,
14730			Header: res.Header,
14731		}
14732	}
14733	if err != nil {
14734		return nil, err
14735	}
14736	defer googleapi.CloseBody(res)
14737	if err := googleapi.CheckResponse(res); err != nil {
14738		return nil, err
14739	}
14740	ret := &Operation{
14741		ServerResponse: googleapi.ServerResponse{
14742			Header:         res.Header,
14743			HTTPStatusCode: res.StatusCode,
14744		},
14745	}
14746	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14747		return nil, err
14748	}
14749	return ret, nil
14750	// {
14751	//   "description": "Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 200 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.",
14752	//   "httpMethod": "POST",
14753	//   "id": "compute.disks.insert",
14754	//   "parameterOrder": [
14755	//     "project",
14756	//     "zone"
14757	//   ],
14758	//   "parameters": {
14759	//     "project": {
14760	//       "description": "Project ID for this request.",
14761	//       "location": "path",
14762	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
14763	//       "required": true,
14764	//       "type": "string"
14765	//     },
14766	//     "sourceImage": {
14767	//       "description": "Optional. Source image to restore onto a disk.",
14768	//       "location": "query",
14769	//       "type": "string"
14770	//     },
14771	//     "zone": {
14772	//       "description": "The name of the zone for this request.",
14773	//       "location": "path",
14774	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
14775	//       "required": true,
14776	//       "type": "string"
14777	//     }
14778	//   },
14779	//   "path": "{project}/zones/{zone}/disks",
14780	//   "request": {
14781	//     "$ref": "Disk"
14782	//   },
14783	//   "response": {
14784	//     "$ref": "Operation"
14785	//   },
14786	//   "scopes": [
14787	//     "https://www.googleapis.com/auth/cloud-platform",
14788	//     "https://www.googleapis.com/auth/compute"
14789	//   ]
14790	// }
14791
14792}
14793
14794// method id "compute.disks.list":
14795
14796type DisksListCall struct {
14797	s            *Service
14798	project      string
14799	zone         string
14800	urlParams_   gensupport.URLParams
14801	ifNoneMatch_ string
14802	ctx_         context.Context
14803}
14804
14805// List: Retrieves a list of persistent disks contained within the
14806// specified zone.
14807// For details, see https://cloud.google.com/compute/docs/reference/latest/disks/list
14808func (r *DisksService) List(project string, zone string) *DisksListCall {
14809	c := &DisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14810	c.project = project
14811	c.zone = zone
14812	return c
14813}
14814
14815// Filter sets the optional parameter "filter": Sets a filter expression
14816// for filtering listed resources, in the form filter={expression}. Your
14817// {expression} must be in the format: field_name comparison_string
14818// literal_string.
14819//
14820// The field_name is the name of the field you want to compare. Only
14821// atomic field types are supported (string, number, boolean). The
14822// comparison_string must be either eq (equals) or ne (not equals). The
14823// literal_string is the string value to filter to. The literal value
14824// must be valid for the type of field you are filtering by (string,
14825// number, boolean). For string fields, the literal value is interpreted
14826// as a regular expression using RE2 syntax. The literal value must
14827// match the entire field.
14828//
14829// For example, to filter for instances that do not have a name of
14830// example-instance, you would use filter=name ne
14831// example-instance.
14832//
14833// Compute Engine Beta API Only: If you use filtering in the Beta API,
14834// you can also filter on nested fields. For example, you could filter
14835// on instances that have set the scheduling.automaticRestart field to
14836// true. In particular, use filtering on nested fields to take advantage
14837// of instance labels to organize and filter results based on label
14838// values.
14839//
14840// The Beta API also supports filtering on multiple expressions by
14841// providing each separate expression within parentheses. For example,
14842// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
14843// Multiple expressions are treated as AND expressions, meaning that
14844// resources must match all expressions to pass the filters.
14845func (c *DisksListCall) Filter(filter string) *DisksListCall {
14846	c.urlParams_.Set("filter", filter)
14847	return c
14848}
14849
14850// MaxResults sets the optional parameter "maxResults": The maximum
14851// number of results per page that should be returned. If the number of
14852// available results is larger than maxResults, Compute Engine returns a
14853// nextPageToken that can be used to get the next page of results in
14854// subsequent list requests.
14855func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall {
14856	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
14857	return c
14858}
14859
14860// OrderBy sets the optional parameter "orderBy": Sorts list results by
14861// a certain order. By default, results are returned in alphanumerical
14862// order based on the resource name.
14863//
14864// You can also sort results in descending order based on the creation
14865// timestamp using orderBy="creationTimestamp desc". This sorts results
14866// based on the creationTimestamp field in reverse chronological order
14867// (newest result first). Use this to sort resources like operations so
14868// that the newest operation is returned first.
14869//
14870// Currently, only sorting by name or creationTimestamp desc is
14871// supported.
14872func (c *DisksListCall) OrderBy(orderBy string) *DisksListCall {
14873	c.urlParams_.Set("orderBy", orderBy)
14874	return c
14875}
14876
14877// PageToken sets the optional parameter "pageToken": Specifies a page
14878// token to use. Set pageToken to the nextPageToken returned by a
14879// previous list request to get the next page of results.
14880func (c *DisksListCall) PageToken(pageToken string) *DisksListCall {
14881	c.urlParams_.Set("pageToken", pageToken)
14882	return c
14883}
14884
14885// Fields allows partial responses to be retrieved. See
14886// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14887// for more information.
14888func (c *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall {
14889	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14890	return c
14891}
14892
14893// IfNoneMatch sets the optional parameter which makes the operation
14894// fail if the object's ETag matches the given value. This is useful for
14895// getting updates only after the object has changed since the last
14896// request. Use googleapi.IsNotModified to check whether the response
14897// error from Do is the result of In-None-Match.
14898func (c *DisksListCall) IfNoneMatch(entityTag string) *DisksListCall {
14899	c.ifNoneMatch_ = entityTag
14900	return c
14901}
14902
14903// Context sets the context to be used in this call's Do method. Any
14904// pending HTTP request will be aborted if the provided context is
14905// canceled.
14906func (c *DisksListCall) Context(ctx context.Context) *DisksListCall {
14907	c.ctx_ = ctx
14908	return c
14909}
14910
14911func (c *DisksListCall) doRequest(alt string) (*http.Response, error) {
14912	var body io.Reader = nil
14913	c.urlParams_.Set("alt", alt)
14914	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks")
14915	urls += "?" + c.urlParams_.Encode()
14916	req, _ := http.NewRequest("GET", urls, body)
14917	googleapi.Expand(req.URL, map[string]string{
14918		"project": c.project,
14919		"zone":    c.zone,
14920	})
14921	req.Header.Set("User-Agent", c.s.userAgent())
14922	if c.ifNoneMatch_ != "" {
14923		req.Header.Set("If-None-Match", c.ifNoneMatch_)
14924	}
14925	if c.ctx_ != nil {
14926		return ctxhttp.Do(c.ctx_, c.s.client, req)
14927	}
14928	return c.s.client.Do(req)
14929}
14930
14931// Do executes the "compute.disks.list" call.
14932// Exactly one of *DiskList or error will be non-nil. Any non-2xx status
14933// code is an error. Response headers are in either
14934// *DiskList.ServerResponse.Header or (if a response was returned at
14935// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14936// to check whether the returned error was because
14937// http.StatusNotModified was returned.
14938func (c *DisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) {
14939	gensupport.SetOptions(c.urlParams_, opts...)
14940	res, err := c.doRequest("json")
14941	if res != nil && res.StatusCode == http.StatusNotModified {
14942		if res.Body != nil {
14943			res.Body.Close()
14944		}
14945		return nil, &googleapi.Error{
14946			Code:   res.StatusCode,
14947			Header: res.Header,
14948		}
14949	}
14950	if err != nil {
14951		return nil, err
14952	}
14953	defer googleapi.CloseBody(res)
14954	if err := googleapi.CheckResponse(res); err != nil {
14955		return nil, err
14956	}
14957	ret := &DiskList{
14958		ServerResponse: googleapi.ServerResponse{
14959			Header:         res.Header,
14960			HTTPStatusCode: res.StatusCode,
14961		},
14962	}
14963	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
14964		return nil, err
14965	}
14966	return ret, nil
14967	// {
14968	//   "description": "Retrieves a list of persistent disks contained within the specified zone.",
14969	//   "httpMethod": "GET",
14970	//   "id": "compute.disks.list",
14971	//   "parameterOrder": [
14972	//     "project",
14973	//     "zone"
14974	//   ],
14975	//   "parameters": {
14976	//     "filter": {
14977	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
14978	//       "location": "query",
14979	//       "type": "string"
14980	//     },
14981	//     "maxResults": {
14982	//       "default": "500",
14983	//       "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.",
14984	//       "format": "uint32",
14985	//       "location": "query",
14986	//       "maximum": "500",
14987	//       "minimum": "0",
14988	//       "type": "integer"
14989	//     },
14990	//     "orderBy": {
14991	//       "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.",
14992	//       "location": "query",
14993	//       "type": "string"
14994	//     },
14995	//     "pageToken": {
14996	//       "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.",
14997	//       "location": "query",
14998	//       "type": "string"
14999	//     },
15000	//     "project": {
15001	//       "description": "Project ID for this request.",
15002	//       "location": "path",
15003	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15004	//       "required": true,
15005	//       "type": "string"
15006	//     },
15007	//     "zone": {
15008	//       "description": "The name of the zone for this request.",
15009	//       "location": "path",
15010	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15011	//       "required": true,
15012	//       "type": "string"
15013	//     }
15014	//   },
15015	//   "path": "{project}/zones/{zone}/disks",
15016	//   "response": {
15017	//     "$ref": "DiskList"
15018	//   },
15019	//   "scopes": [
15020	//     "https://www.googleapis.com/auth/cloud-platform",
15021	//     "https://www.googleapis.com/auth/compute",
15022	//     "https://www.googleapis.com/auth/compute.readonly"
15023	//   ]
15024	// }
15025
15026}
15027
15028// Pages invokes f for each page of results.
15029// A non-nil error returned from f will halt the iteration.
15030// The provided context supersedes any context provided to the Context method.
15031func (c *DisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error {
15032	c.ctx_ = ctx
15033	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15034	for {
15035		x, err := c.Do()
15036		if err != nil {
15037			return err
15038		}
15039		if err := f(x); err != nil {
15040			return err
15041		}
15042		if x.NextPageToken == "" {
15043			return nil
15044		}
15045		c.PageToken(x.NextPageToken)
15046	}
15047}
15048
15049// method id "compute.disks.resize":
15050
15051type DisksResizeCall struct {
15052	s                  *Service
15053	project            string
15054	zone               string
15055	disk               string
15056	disksresizerequest *DisksResizeRequest
15057	urlParams_         gensupport.URLParams
15058	ctx_               context.Context
15059}
15060
15061// Resize: Resizes the specified persistent disk.
15062func (r *DisksService) Resize(project string, zone string, disk string, disksresizerequest *DisksResizeRequest) *DisksResizeCall {
15063	c := &DisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15064	c.project = project
15065	c.zone = zone
15066	c.disk = disk
15067	c.disksresizerequest = disksresizerequest
15068	return c
15069}
15070
15071// Fields allows partial responses to be retrieved. See
15072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15073// for more information.
15074func (c *DisksResizeCall) Fields(s ...googleapi.Field) *DisksResizeCall {
15075	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15076	return c
15077}
15078
15079// Context sets the context to be used in this call's Do method. Any
15080// pending HTTP request will be aborted if the provided context is
15081// canceled.
15082func (c *DisksResizeCall) Context(ctx context.Context) *DisksResizeCall {
15083	c.ctx_ = ctx
15084	return c
15085}
15086
15087func (c *DisksResizeCall) doRequest(alt string) (*http.Response, error) {
15088	var body io.Reader = nil
15089	body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksresizerequest)
15090	if err != nil {
15091		return nil, err
15092	}
15093	ctype := "application/json"
15094	c.urlParams_.Set("alt", alt)
15095	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/resize")
15096	urls += "?" + c.urlParams_.Encode()
15097	req, _ := http.NewRequest("POST", urls, body)
15098	googleapi.Expand(req.URL, map[string]string{
15099		"project": c.project,
15100		"zone":    c.zone,
15101		"disk":    c.disk,
15102	})
15103	req.Header.Set("Content-Type", ctype)
15104	req.Header.Set("User-Agent", c.s.userAgent())
15105	if c.ctx_ != nil {
15106		return ctxhttp.Do(c.ctx_, c.s.client, req)
15107	}
15108	return c.s.client.Do(req)
15109}
15110
15111// Do executes the "compute.disks.resize" call.
15112// Exactly one of *Operation or error will be non-nil. Any non-2xx
15113// status code is an error. Response headers are in either
15114// *Operation.ServerResponse.Header or (if a response was returned at
15115// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15116// to check whether the returned error was because
15117// http.StatusNotModified was returned.
15118func (c *DisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15119	gensupport.SetOptions(c.urlParams_, opts...)
15120	res, err := c.doRequest("json")
15121	if res != nil && res.StatusCode == http.StatusNotModified {
15122		if res.Body != nil {
15123			res.Body.Close()
15124		}
15125		return nil, &googleapi.Error{
15126			Code:   res.StatusCode,
15127			Header: res.Header,
15128		}
15129	}
15130	if err != nil {
15131		return nil, err
15132	}
15133	defer googleapi.CloseBody(res)
15134	if err := googleapi.CheckResponse(res); err != nil {
15135		return nil, err
15136	}
15137	ret := &Operation{
15138		ServerResponse: googleapi.ServerResponse{
15139			Header:         res.Header,
15140			HTTPStatusCode: res.StatusCode,
15141		},
15142	}
15143	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15144		return nil, err
15145	}
15146	return ret, nil
15147	// {
15148	//   "description": "Resizes the specified persistent disk.",
15149	//   "httpMethod": "POST",
15150	//   "id": "compute.disks.resize",
15151	//   "parameterOrder": [
15152	//     "project",
15153	//     "zone",
15154	//     "disk"
15155	//   ],
15156	//   "parameters": {
15157	//     "disk": {
15158	//       "description": "The name of the persistent disk.",
15159	//       "location": "path",
15160	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15161	//       "required": true,
15162	//       "type": "string"
15163	//     },
15164	//     "project": {
15165	//       "description": "Project ID for this request.",
15166	//       "location": "path",
15167	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15168	//       "required": true,
15169	//       "type": "string"
15170	//     },
15171	//     "zone": {
15172	//       "description": "The name of the zone for this request.",
15173	//       "location": "path",
15174	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15175	//       "required": true,
15176	//       "type": "string"
15177	//     }
15178	//   },
15179	//   "path": "{project}/zones/{zone}/disks/{disk}/resize",
15180	//   "request": {
15181	//     "$ref": "DisksResizeRequest"
15182	//   },
15183	//   "response": {
15184	//     "$ref": "Operation"
15185	//   },
15186	//   "scopes": [
15187	//     "https://www.googleapis.com/auth/cloud-platform",
15188	//     "https://www.googleapis.com/auth/compute"
15189	//   ]
15190	// }
15191
15192}
15193
15194// method id "compute.disks.setLabels":
15195
15196type DisksSetLabelsCall struct {
15197	s                    *Service
15198	project              string
15199	zone                 string
15200	resource             string
15201	zonesetlabelsrequest *ZoneSetLabelsRequest
15202	urlParams_           gensupport.URLParams
15203	ctx_                 context.Context
15204}
15205
15206// SetLabels: Sets the labels on the target disk.
15207func (r *DisksService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *DisksSetLabelsCall {
15208	c := &DisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15209	c.project = project
15210	c.zone = zone
15211	c.resource = resource
15212	c.zonesetlabelsrequest = zonesetlabelsrequest
15213	return c
15214}
15215
15216// Fields allows partial responses to be retrieved. See
15217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15218// for more information.
15219func (c *DisksSetLabelsCall) Fields(s ...googleapi.Field) *DisksSetLabelsCall {
15220	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15221	return c
15222}
15223
15224// Context sets the context to be used in this call's Do method. Any
15225// pending HTTP request will be aborted if the provided context is
15226// canceled.
15227func (c *DisksSetLabelsCall) Context(ctx context.Context) *DisksSetLabelsCall {
15228	c.ctx_ = ctx
15229	return c
15230}
15231
15232func (c *DisksSetLabelsCall) doRequest(alt string) (*http.Response, error) {
15233	var body io.Reader = nil
15234	body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest)
15235	if err != nil {
15236		return nil, err
15237	}
15238	ctype := "application/json"
15239	c.urlParams_.Set("alt", alt)
15240	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/setLabels")
15241	urls += "?" + c.urlParams_.Encode()
15242	req, _ := http.NewRequest("POST", urls, body)
15243	googleapi.Expand(req.URL, map[string]string{
15244		"project":  c.project,
15245		"zone":     c.zone,
15246		"resource": c.resource,
15247	})
15248	req.Header.Set("Content-Type", ctype)
15249	req.Header.Set("User-Agent", c.s.userAgent())
15250	if c.ctx_ != nil {
15251		return ctxhttp.Do(c.ctx_, c.s.client, req)
15252	}
15253	return c.s.client.Do(req)
15254}
15255
15256// Do executes the "compute.disks.setLabels" call.
15257// Exactly one of *Operation or error will be non-nil. Any non-2xx
15258// status code is an error. Response headers are in either
15259// *Operation.ServerResponse.Header or (if a response was returned at
15260// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15261// to check whether the returned error was because
15262// http.StatusNotModified was returned.
15263func (c *DisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15264	gensupport.SetOptions(c.urlParams_, opts...)
15265	res, err := c.doRequest("json")
15266	if res != nil && res.StatusCode == http.StatusNotModified {
15267		if res.Body != nil {
15268			res.Body.Close()
15269		}
15270		return nil, &googleapi.Error{
15271			Code:   res.StatusCode,
15272			Header: res.Header,
15273		}
15274	}
15275	if err != nil {
15276		return nil, err
15277	}
15278	defer googleapi.CloseBody(res)
15279	if err := googleapi.CheckResponse(res); err != nil {
15280		return nil, err
15281	}
15282	ret := &Operation{
15283		ServerResponse: googleapi.ServerResponse{
15284			Header:         res.Header,
15285			HTTPStatusCode: res.StatusCode,
15286		},
15287	}
15288	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15289		return nil, err
15290	}
15291	return ret, nil
15292	// {
15293	//   "description": "Sets the labels on the target disk.",
15294	//   "httpMethod": "POST",
15295	//   "id": "compute.disks.setLabels",
15296	//   "parameterOrder": [
15297	//     "project",
15298	//     "zone",
15299	//     "resource"
15300	//   ],
15301	//   "parameters": {
15302	//     "project": {
15303	//       "description": "Project ID for this request.",
15304	//       "location": "path",
15305	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15306	//       "required": true,
15307	//       "type": "string"
15308	//     },
15309	//     "resource": {
15310	//       "description": "Name of the resource for this request.",
15311	//       "location": "path",
15312	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15313	//       "required": true,
15314	//       "type": "string"
15315	//     },
15316	//     "zone": {
15317	//       "description": "The name of the zone for this request.",
15318	//       "location": "path",
15319	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15320	//       "required": true,
15321	//       "type": "string"
15322	//     }
15323	//   },
15324	//   "path": "{project}/zones/{zone}/disks/{resource}/setLabels",
15325	//   "request": {
15326	//     "$ref": "ZoneSetLabelsRequest"
15327	//   },
15328	//   "response": {
15329	//     "$ref": "Operation"
15330	//   },
15331	//   "scopes": [
15332	//     "https://www.googleapis.com/auth/cloud-platform",
15333	//     "https://www.googleapis.com/auth/compute"
15334	//   ]
15335	// }
15336
15337}
15338
15339// method id "compute.disks.testIamPermissions":
15340
15341type DisksTestIamPermissionsCall struct {
15342	s                      *Service
15343	project                string
15344	zone                   string
15345	resource               string
15346	testpermissionsrequest *TestPermissionsRequest
15347	urlParams_             gensupport.URLParams
15348	ctx_                   context.Context
15349}
15350
15351// TestIamPermissions: Returns permissions that a caller has on the
15352// specified resource.
15353func (r *DisksService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *DisksTestIamPermissionsCall {
15354	c := &DisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15355	c.project = project
15356	c.zone = zone
15357	c.resource = resource
15358	c.testpermissionsrequest = testpermissionsrequest
15359	return c
15360}
15361
15362// Fields allows partial responses to be retrieved. See
15363// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15364// for more information.
15365func (c *DisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *DisksTestIamPermissionsCall {
15366	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15367	return c
15368}
15369
15370// Context sets the context to be used in this call's Do method. Any
15371// pending HTTP request will be aborted if the provided context is
15372// canceled.
15373func (c *DisksTestIamPermissionsCall) Context(ctx context.Context) *DisksTestIamPermissionsCall {
15374	c.ctx_ = ctx
15375	return c
15376}
15377
15378func (c *DisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
15379	var body io.Reader = nil
15380	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
15381	if err != nil {
15382		return nil, err
15383	}
15384	ctype := "application/json"
15385	c.urlParams_.Set("alt", alt)
15386	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{resource}/testIamPermissions")
15387	urls += "?" + c.urlParams_.Encode()
15388	req, _ := http.NewRequest("POST", urls, body)
15389	googleapi.Expand(req.URL, map[string]string{
15390		"project":  c.project,
15391		"zone":     c.zone,
15392		"resource": c.resource,
15393	})
15394	req.Header.Set("Content-Type", ctype)
15395	req.Header.Set("User-Agent", c.s.userAgent())
15396	if c.ctx_ != nil {
15397		return ctxhttp.Do(c.ctx_, c.s.client, req)
15398	}
15399	return c.s.client.Do(req)
15400}
15401
15402// Do executes the "compute.disks.testIamPermissions" call.
15403// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
15404// non-2xx status code is an error. Response headers are in either
15405// *TestPermissionsResponse.ServerResponse.Header or (if a response was
15406// returned at all) in error.(*googleapi.Error).Header. Use
15407// googleapi.IsNotModified to check whether the returned error was
15408// because http.StatusNotModified was returned.
15409func (c *DisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
15410	gensupport.SetOptions(c.urlParams_, opts...)
15411	res, err := c.doRequest("json")
15412	if res != nil && res.StatusCode == http.StatusNotModified {
15413		if res.Body != nil {
15414			res.Body.Close()
15415		}
15416		return nil, &googleapi.Error{
15417			Code:   res.StatusCode,
15418			Header: res.Header,
15419		}
15420	}
15421	if err != nil {
15422		return nil, err
15423	}
15424	defer googleapi.CloseBody(res)
15425	if err := googleapi.CheckResponse(res); err != nil {
15426		return nil, err
15427	}
15428	ret := &TestPermissionsResponse{
15429		ServerResponse: googleapi.ServerResponse{
15430			Header:         res.Header,
15431			HTTPStatusCode: res.StatusCode,
15432		},
15433	}
15434	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15435		return nil, err
15436	}
15437	return ret, nil
15438	// {
15439	//   "description": "Returns permissions that a caller has on the specified resource.",
15440	//   "httpMethod": "POST",
15441	//   "id": "compute.disks.testIamPermissions",
15442	//   "parameterOrder": [
15443	//     "project",
15444	//     "zone",
15445	//     "resource"
15446	//   ],
15447	//   "parameters": {
15448	//     "project": {
15449	//       "description": "Project ID for this request.",
15450	//       "location": "path",
15451	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15452	//       "required": true,
15453	//       "type": "string"
15454	//     },
15455	//     "resource": {
15456	//       "description": "Name of the resource for this request.",
15457	//       "location": "path",
15458	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15459	//       "required": true,
15460	//       "type": "string"
15461	//     },
15462	//     "zone": {
15463	//       "description": "The name of the zone for this request.",
15464	//       "location": "path",
15465	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15466	//       "required": true,
15467	//       "type": "string"
15468	//     }
15469	//   },
15470	//   "path": "{project}/zones/{zone}/disks/{resource}/testIamPermissions",
15471	//   "request": {
15472	//     "$ref": "TestPermissionsRequest"
15473	//   },
15474	//   "response": {
15475	//     "$ref": "TestPermissionsResponse"
15476	//   },
15477	//   "scopes": [
15478	//     "https://www.googleapis.com/auth/cloud-platform",
15479	//     "https://www.googleapis.com/auth/compute",
15480	//     "https://www.googleapis.com/auth/compute.readonly"
15481	//   ]
15482	// }
15483
15484}
15485
15486// method id "compute.firewalls.delete":
15487
15488type FirewallsDeleteCall struct {
15489	s          *Service
15490	project    string
15491	firewall   string
15492	urlParams_ gensupport.URLParams
15493	ctx_       context.Context
15494}
15495
15496// Delete: Deletes the specified firewall.
15497// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/delete
15498func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall {
15499	c := &FirewallsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15500	c.project = project
15501	c.firewall = firewall
15502	return c
15503}
15504
15505// Fields allows partial responses to be retrieved. See
15506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15507// for more information.
15508func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall {
15509	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15510	return c
15511}
15512
15513// Context sets the context to be used in this call's Do method. Any
15514// pending HTTP request will be aborted if the provided context is
15515// canceled.
15516func (c *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall {
15517	c.ctx_ = ctx
15518	return c
15519}
15520
15521func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) {
15522	var body io.Reader = nil
15523	c.urlParams_.Set("alt", alt)
15524	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
15525	urls += "?" + c.urlParams_.Encode()
15526	req, _ := http.NewRequest("DELETE", urls, body)
15527	googleapi.Expand(req.URL, map[string]string{
15528		"project":  c.project,
15529		"firewall": c.firewall,
15530	})
15531	req.Header.Set("User-Agent", c.s.userAgent())
15532	if c.ctx_ != nil {
15533		return ctxhttp.Do(c.ctx_, c.s.client, req)
15534	}
15535	return c.s.client.Do(req)
15536}
15537
15538// Do executes the "compute.firewalls.delete" call.
15539// Exactly one of *Operation or error will be non-nil. Any non-2xx
15540// status code is an error. Response headers are in either
15541// *Operation.ServerResponse.Header or (if a response was returned at
15542// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15543// to check whether the returned error was because
15544// http.StatusNotModified was returned.
15545func (c *FirewallsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15546	gensupport.SetOptions(c.urlParams_, opts...)
15547	res, err := c.doRequest("json")
15548	if res != nil && res.StatusCode == http.StatusNotModified {
15549		if res.Body != nil {
15550			res.Body.Close()
15551		}
15552		return nil, &googleapi.Error{
15553			Code:   res.StatusCode,
15554			Header: res.Header,
15555		}
15556	}
15557	if err != nil {
15558		return nil, err
15559	}
15560	defer googleapi.CloseBody(res)
15561	if err := googleapi.CheckResponse(res); err != nil {
15562		return nil, err
15563	}
15564	ret := &Operation{
15565		ServerResponse: googleapi.ServerResponse{
15566			Header:         res.Header,
15567			HTTPStatusCode: res.StatusCode,
15568		},
15569	}
15570	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15571		return nil, err
15572	}
15573	return ret, nil
15574	// {
15575	//   "description": "Deletes the specified firewall.",
15576	//   "httpMethod": "DELETE",
15577	//   "id": "compute.firewalls.delete",
15578	//   "parameterOrder": [
15579	//     "project",
15580	//     "firewall"
15581	//   ],
15582	//   "parameters": {
15583	//     "firewall": {
15584	//       "description": "Name of the firewall rule to delete.",
15585	//       "location": "path",
15586	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15587	//       "required": true,
15588	//       "type": "string"
15589	//     },
15590	//     "project": {
15591	//       "description": "Project ID for this request.",
15592	//       "location": "path",
15593	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15594	//       "required": true,
15595	//       "type": "string"
15596	//     }
15597	//   },
15598	//   "path": "{project}/global/firewalls/{firewall}",
15599	//   "response": {
15600	//     "$ref": "Operation"
15601	//   },
15602	//   "scopes": [
15603	//     "https://www.googleapis.com/auth/cloud-platform",
15604	//     "https://www.googleapis.com/auth/compute"
15605	//   ]
15606	// }
15607
15608}
15609
15610// method id "compute.firewalls.get":
15611
15612type FirewallsGetCall struct {
15613	s            *Service
15614	project      string
15615	firewall     string
15616	urlParams_   gensupport.URLParams
15617	ifNoneMatch_ string
15618	ctx_         context.Context
15619}
15620
15621// Get: Returns the specified firewall.
15622// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/get
15623func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall {
15624	c := &FirewallsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15625	c.project = project
15626	c.firewall = firewall
15627	return c
15628}
15629
15630// Fields allows partial responses to be retrieved. See
15631// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15632// for more information.
15633func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall {
15634	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15635	return c
15636}
15637
15638// IfNoneMatch sets the optional parameter which makes the operation
15639// fail if the object's ETag matches the given value. This is useful for
15640// getting updates only after the object has changed since the last
15641// request. Use googleapi.IsNotModified to check whether the response
15642// error from Do is the result of In-None-Match.
15643func (c *FirewallsGetCall) IfNoneMatch(entityTag string) *FirewallsGetCall {
15644	c.ifNoneMatch_ = entityTag
15645	return c
15646}
15647
15648// Context sets the context to be used in this call's Do method. Any
15649// pending HTTP request will be aborted if the provided context is
15650// canceled.
15651func (c *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall {
15652	c.ctx_ = ctx
15653	return c
15654}
15655
15656func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) {
15657	var body io.Reader = nil
15658	c.urlParams_.Set("alt", alt)
15659	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
15660	urls += "?" + c.urlParams_.Encode()
15661	req, _ := http.NewRequest("GET", urls, body)
15662	googleapi.Expand(req.URL, map[string]string{
15663		"project":  c.project,
15664		"firewall": c.firewall,
15665	})
15666	req.Header.Set("User-Agent", c.s.userAgent())
15667	if c.ifNoneMatch_ != "" {
15668		req.Header.Set("If-None-Match", c.ifNoneMatch_)
15669	}
15670	if c.ctx_ != nil {
15671		return ctxhttp.Do(c.ctx_, c.s.client, req)
15672	}
15673	return c.s.client.Do(req)
15674}
15675
15676// Do executes the "compute.firewalls.get" call.
15677// Exactly one of *Firewall or error will be non-nil. Any non-2xx status
15678// code is an error. Response headers are in either
15679// *Firewall.ServerResponse.Header or (if a response was returned at
15680// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15681// to check whether the returned error was because
15682// http.StatusNotModified was returned.
15683func (c *FirewallsGetCall) Do(opts ...googleapi.CallOption) (*Firewall, error) {
15684	gensupport.SetOptions(c.urlParams_, opts...)
15685	res, err := c.doRequest("json")
15686	if res != nil && res.StatusCode == http.StatusNotModified {
15687		if res.Body != nil {
15688			res.Body.Close()
15689		}
15690		return nil, &googleapi.Error{
15691			Code:   res.StatusCode,
15692			Header: res.Header,
15693		}
15694	}
15695	if err != nil {
15696		return nil, err
15697	}
15698	defer googleapi.CloseBody(res)
15699	if err := googleapi.CheckResponse(res); err != nil {
15700		return nil, err
15701	}
15702	ret := &Firewall{
15703		ServerResponse: googleapi.ServerResponse{
15704			Header:         res.Header,
15705			HTTPStatusCode: res.StatusCode,
15706		},
15707	}
15708	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15709		return nil, err
15710	}
15711	return ret, nil
15712	// {
15713	//   "description": "Returns the specified firewall.",
15714	//   "httpMethod": "GET",
15715	//   "id": "compute.firewalls.get",
15716	//   "parameterOrder": [
15717	//     "project",
15718	//     "firewall"
15719	//   ],
15720	//   "parameters": {
15721	//     "firewall": {
15722	//       "description": "Name of the firewall rule to return.",
15723	//       "location": "path",
15724	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
15725	//       "required": true,
15726	//       "type": "string"
15727	//     },
15728	//     "project": {
15729	//       "description": "Project ID for this request.",
15730	//       "location": "path",
15731	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15732	//       "required": true,
15733	//       "type": "string"
15734	//     }
15735	//   },
15736	//   "path": "{project}/global/firewalls/{firewall}",
15737	//   "response": {
15738	//     "$ref": "Firewall"
15739	//   },
15740	//   "scopes": [
15741	//     "https://www.googleapis.com/auth/cloud-platform",
15742	//     "https://www.googleapis.com/auth/compute",
15743	//     "https://www.googleapis.com/auth/compute.readonly"
15744	//   ]
15745	// }
15746
15747}
15748
15749// method id "compute.firewalls.insert":
15750
15751type FirewallsInsertCall struct {
15752	s          *Service
15753	project    string
15754	firewall   *Firewall
15755	urlParams_ gensupport.URLParams
15756	ctx_       context.Context
15757}
15758
15759// Insert: Creates a firewall rule in the specified project using the
15760// data included in the request.
15761// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/insert
15762func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall {
15763	c := &FirewallsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15764	c.project = project
15765	c.firewall = firewall
15766	return c
15767}
15768
15769// Fields allows partial responses to be retrieved. See
15770// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15771// for more information.
15772func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall {
15773	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15774	return c
15775}
15776
15777// Context sets the context to be used in this call's Do method. Any
15778// pending HTTP request will be aborted if the provided context is
15779// canceled.
15780func (c *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall {
15781	c.ctx_ = ctx
15782	return c
15783}
15784
15785func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) {
15786	var body io.Reader = nil
15787	body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall)
15788	if err != nil {
15789		return nil, err
15790	}
15791	ctype := "application/json"
15792	c.urlParams_.Set("alt", alt)
15793	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls")
15794	urls += "?" + c.urlParams_.Encode()
15795	req, _ := http.NewRequest("POST", urls, body)
15796	googleapi.Expand(req.URL, map[string]string{
15797		"project": c.project,
15798	})
15799	req.Header.Set("Content-Type", ctype)
15800	req.Header.Set("User-Agent", c.s.userAgent())
15801	if c.ctx_ != nil {
15802		return ctxhttp.Do(c.ctx_, c.s.client, req)
15803	}
15804	return c.s.client.Do(req)
15805}
15806
15807// Do executes the "compute.firewalls.insert" call.
15808// Exactly one of *Operation or error will be non-nil. Any non-2xx
15809// status code is an error. Response headers are in either
15810// *Operation.ServerResponse.Header or (if a response was returned at
15811// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15812// to check whether the returned error was because
15813// http.StatusNotModified was returned.
15814func (c *FirewallsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15815	gensupport.SetOptions(c.urlParams_, opts...)
15816	res, err := c.doRequest("json")
15817	if res != nil && res.StatusCode == http.StatusNotModified {
15818		if res.Body != nil {
15819			res.Body.Close()
15820		}
15821		return nil, &googleapi.Error{
15822			Code:   res.StatusCode,
15823			Header: res.Header,
15824		}
15825	}
15826	if err != nil {
15827		return nil, err
15828	}
15829	defer googleapi.CloseBody(res)
15830	if err := googleapi.CheckResponse(res); err != nil {
15831		return nil, err
15832	}
15833	ret := &Operation{
15834		ServerResponse: googleapi.ServerResponse{
15835			Header:         res.Header,
15836			HTTPStatusCode: res.StatusCode,
15837		},
15838	}
15839	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
15840		return nil, err
15841	}
15842	return ret, nil
15843	// {
15844	//   "description": "Creates a firewall rule in the specified project using the data included in the request.",
15845	//   "httpMethod": "POST",
15846	//   "id": "compute.firewalls.insert",
15847	//   "parameterOrder": [
15848	//     "project"
15849	//   ],
15850	//   "parameters": {
15851	//     "project": {
15852	//       "description": "Project ID for this request.",
15853	//       "location": "path",
15854	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
15855	//       "required": true,
15856	//       "type": "string"
15857	//     }
15858	//   },
15859	//   "path": "{project}/global/firewalls",
15860	//   "request": {
15861	//     "$ref": "Firewall"
15862	//   },
15863	//   "response": {
15864	//     "$ref": "Operation"
15865	//   },
15866	//   "scopes": [
15867	//     "https://www.googleapis.com/auth/cloud-platform",
15868	//     "https://www.googleapis.com/auth/compute"
15869	//   ]
15870	// }
15871
15872}
15873
15874// method id "compute.firewalls.list":
15875
15876type FirewallsListCall struct {
15877	s            *Service
15878	project      string
15879	urlParams_   gensupport.URLParams
15880	ifNoneMatch_ string
15881	ctx_         context.Context
15882}
15883
15884// List: Retrieves the list of firewall rules available to the specified
15885// project.
15886// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/list
15887func (r *FirewallsService) List(project string) *FirewallsListCall {
15888	c := &FirewallsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15889	c.project = project
15890	return c
15891}
15892
15893// Filter sets the optional parameter "filter": Sets a filter expression
15894// for filtering listed resources, in the form filter={expression}. Your
15895// {expression} must be in the format: field_name comparison_string
15896// literal_string.
15897//
15898// The field_name is the name of the field you want to compare. Only
15899// atomic field types are supported (string, number, boolean). The
15900// comparison_string must be either eq (equals) or ne (not equals). The
15901// literal_string is the string value to filter to. The literal value
15902// must be valid for the type of field you are filtering by (string,
15903// number, boolean). For string fields, the literal value is interpreted
15904// as a regular expression using RE2 syntax. The literal value must
15905// match the entire field.
15906//
15907// For example, to filter for instances that do not have a name of
15908// example-instance, you would use filter=name ne
15909// example-instance.
15910//
15911// Compute Engine Beta API Only: If you use filtering in the Beta API,
15912// you can also filter on nested fields. For example, you could filter
15913// on instances that have set the scheduling.automaticRestart field to
15914// true. In particular, use filtering on nested fields to take advantage
15915// of instance labels to organize and filter results based on label
15916// values.
15917//
15918// The Beta API also supports filtering on multiple expressions by
15919// providing each separate expression within parentheses. For example,
15920// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
15921// Multiple expressions are treated as AND expressions, meaning that
15922// resources must match all expressions to pass the filters.
15923func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall {
15924	c.urlParams_.Set("filter", filter)
15925	return c
15926}
15927
15928// MaxResults sets the optional parameter "maxResults": The maximum
15929// number of results per page that should be returned. If the number of
15930// available results is larger than maxResults, Compute Engine returns a
15931// nextPageToken that can be used to get the next page of results in
15932// subsequent list requests.
15933func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall {
15934	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
15935	return c
15936}
15937
15938// OrderBy sets the optional parameter "orderBy": Sorts list results by
15939// a certain order. By default, results are returned in alphanumerical
15940// order based on the resource name.
15941//
15942// You can also sort results in descending order based on the creation
15943// timestamp using orderBy="creationTimestamp desc". This sorts results
15944// based on the creationTimestamp field in reverse chronological order
15945// (newest result first). Use this to sort resources like operations so
15946// that the newest operation is returned first.
15947//
15948// Currently, only sorting by name or creationTimestamp desc is
15949// supported.
15950func (c *FirewallsListCall) OrderBy(orderBy string) *FirewallsListCall {
15951	c.urlParams_.Set("orderBy", orderBy)
15952	return c
15953}
15954
15955// PageToken sets the optional parameter "pageToken": Specifies a page
15956// token to use. Set pageToken to the nextPageToken returned by a
15957// previous list request to get the next page of results.
15958func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall {
15959	c.urlParams_.Set("pageToken", pageToken)
15960	return c
15961}
15962
15963// Fields allows partial responses to be retrieved. See
15964// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15965// for more information.
15966func (c *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall {
15967	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15968	return c
15969}
15970
15971// IfNoneMatch sets the optional parameter which makes the operation
15972// fail if the object's ETag matches the given value. This is useful for
15973// getting updates only after the object has changed since the last
15974// request. Use googleapi.IsNotModified to check whether the response
15975// error from Do is the result of In-None-Match.
15976func (c *FirewallsListCall) IfNoneMatch(entityTag string) *FirewallsListCall {
15977	c.ifNoneMatch_ = entityTag
15978	return c
15979}
15980
15981// Context sets the context to be used in this call's Do method. Any
15982// pending HTTP request will be aborted if the provided context is
15983// canceled.
15984func (c *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall {
15985	c.ctx_ = ctx
15986	return c
15987}
15988
15989func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) {
15990	var body io.Reader = nil
15991	c.urlParams_.Set("alt", alt)
15992	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls")
15993	urls += "?" + c.urlParams_.Encode()
15994	req, _ := http.NewRequest("GET", urls, body)
15995	googleapi.Expand(req.URL, map[string]string{
15996		"project": c.project,
15997	})
15998	req.Header.Set("User-Agent", c.s.userAgent())
15999	if c.ifNoneMatch_ != "" {
16000		req.Header.Set("If-None-Match", c.ifNoneMatch_)
16001	}
16002	if c.ctx_ != nil {
16003		return ctxhttp.Do(c.ctx_, c.s.client, req)
16004	}
16005	return c.s.client.Do(req)
16006}
16007
16008// Do executes the "compute.firewalls.list" call.
16009// Exactly one of *FirewallList or error will be non-nil. Any non-2xx
16010// status code is an error. Response headers are in either
16011// *FirewallList.ServerResponse.Header or (if a response was returned at
16012// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16013// to check whether the returned error was because
16014// http.StatusNotModified was returned.
16015func (c *FirewallsListCall) Do(opts ...googleapi.CallOption) (*FirewallList, error) {
16016	gensupport.SetOptions(c.urlParams_, opts...)
16017	res, err := c.doRequest("json")
16018	if res != nil && res.StatusCode == http.StatusNotModified {
16019		if res.Body != nil {
16020			res.Body.Close()
16021		}
16022		return nil, &googleapi.Error{
16023			Code:   res.StatusCode,
16024			Header: res.Header,
16025		}
16026	}
16027	if err != nil {
16028		return nil, err
16029	}
16030	defer googleapi.CloseBody(res)
16031	if err := googleapi.CheckResponse(res); err != nil {
16032		return nil, err
16033	}
16034	ret := &FirewallList{
16035		ServerResponse: googleapi.ServerResponse{
16036			Header:         res.Header,
16037			HTTPStatusCode: res.StatusCode,
16038		},
16039	}
16040	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16041		return nil, err
16042	}
16043	return ret, nil
16044	// {
16045	//   "description": "Retrieves the list of firewall rules available to the specified project.",
16046	//   "httpMethod": "GET",
16047	//   "id": "compute.firewalls.list",
16048	//   "parameterOrder": [
16049	//     "project"
16050	//   ],
16051	//   "parameters": {
16052	//     "filter": {
16053	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
16054	//       "location": "query",
16055	//       "type": "string"
16056	//     },
16057	//     "maxResults": {
16058	//       "default": "500",
16059	//       "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.",
16060	//       "format": "uint32",
16061	//       "location": "query",
16062	//       "maximum": "500",
16063	//       "minimum": "0",
16064	//       "type": "integer"
16065	//     },
16066	//     "orderBy": {
16067	//       "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.",
16068	//       "location": "query",
16069	//       "type": "string"
16070	//     },
16071	//     "pageToken": {
16072	//       "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.",
16073	//       "location": "query",
16074	//       "type": "string"
16075	//     },
16076	//     "project": {
16077	//       "description": "Project ID for this request.",
16078	//       "location": "path",
16079	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16080	//       "required": true,
16081	//       "type": "string"
16082	//     }
16083	//   },
16084	//   "path": "{project}/global/firewalls",
16085	//   "response": {
16086	//     "$ref": "FirewallList"
16087	//   },
16088	//   "scopes": [
16089	//     "https://www.googleapis.com/auth/cloud-platform",
16090	//     "https://www.googleapis.com/auth/compute",
16091	//     "https://www.googleapis.com/auth/compute.readonly"
16092	//   ]
16093	// }
16094
16095}
16096
16097// Pages invokes f for each page of results.
16098// A non-nil error returned from f will halt the iteration.
16099// The provided context supersedes any context provided to the Context method.
16100func (c *FirewallsListCall) Pages(ctx context.Context, f func(*FirewallList) error) error {
16101	c.ctx_ = ctx
16102	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16103	for {
16104		x, err := c.Do()
16105		if err != nil {
16106			return err
16107		}
16108		if err := f(x); err != nil {
16109			return err
16110		}
16111		if x.NextPageToken == "" {
16112			return nil
16113		}
16114		c.PageToken(x.NextPageToken)
16115	}
16116}
16117
16118// method id "compute.firewalls.patch":
16119
16120type FirewallsPatchCall struct {
16121	s          *Service
16122	project    string
16123	firewall   string
16124	firewall2  *Firewall
16125	urlParams_ gensupport.URLParams
16126	ctx_       context.Context
16127}
16128
16129// Patch: Updates the specified firewall rule with the data included in
16130// the request. This method supports patch semantics.
16131// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/patch
16132func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall {
16133	c := &FirewallsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16134	c.project = project
16135	c.firewall = firewall
16136	c.firewall2 = firewall2
16137	return c
16138}
16139
16140// Fields allows partial responses to be retrieved. See
16141// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16142// for more information.
16143func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall {
16144	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16145	return c
16146}
16147
16148// Context sets the context to be used in this call's Do method. Any
16149// pending HTTP request will be aborted if the provided context is
16150// canceled.
16151func (c *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall {
16152	c.ctx_ = ctx
16153	return c
16154}
16155
16156func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) {
16157	var body io.Reader = nil
16158	body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
16159	if err != nil {
16160		return nil, err
16161	}
16162	ctype := "application/json"
16163	c.urlParams_.Set("alt", alt)
16164	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
16165	urls += "?" + c.urlParams_.Encode()
16166	req, _ := http.NewRequest("PATCH", urls, body)
16167	googleapi.Expand(req.URL, map[string]string{
16168		"project":  c.project,
16169		"firewall": c.firewall,
16170	})
16171	req.Header.Set("Content-Type", ctype)
16172	req.Header.Set("User-Agent", c.s.userAgent())
16173	if c.ctx_ != nil {
16174		return ctxhttp.Do(c.ctx_, c.s.client, req)
16175	}
16176	return c.s.client.Do(req)
16177}
16178
16179// Do executes the "compute.firewalls.patch" call.
16180// Exactly one of *Operation or error will be non-nil. Any non-2xx
16181// status code is an error. Response headers are in either
16182// *Operation.ServerResponse.Header or (if a response was returned at
16183// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16184// to check whether the returned error was because
16185// http.StatusNotModified was returned.
16186func (c *FirewallsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16187	gensupport.SetOptions(c.urlParams_, opts...)
16188	res, err := c.doRequest("json")
16189	if res != nil && res.StatusCode == http.StatusNotModified {
16190		if res.Body != nil {
16191			res.Body.Close()
16192		}
16193		return nil, &googleapi.Error{
16194			Code:   res.StatusCode,
16195			Header: res.Header,
16196		}
16197	}
16198	if err != nil {
16199		return nil, err
16200	}
16201	defer googleapi.CloseBody(res)
16202	if err := googleapi.CheckResponse(res); err != nil {
16203		return nil, err
16204	}
16205	ret := &Operation{
16206		ServerResponse: googleapi.ServerResponse{
16207			Header:         res.Header,
16208			HTTPStatusCode: res.StatusCode,
16209		},
16210	}
16211	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16212		return nil, err
16213	}
16214	return ret, nil
16215	// {
16216	//   "description": "Updates the specified firewall rule with the data included in the request. This method supports patch semantics.",
16217	//   "httpMethod": "PATCH",
16218	//   "id": "compute.firewalls.patch",
16219	//   "parameterOrder": [
16220	//     "project",
16221	//     "firewall"
16222	//   ],
16223	//   "parameters": {
16224	//     "firewall": {
16225	//       "description": "Name of the firewall rule to update.",
16226	//       "location": "path",
16227	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
16228	//       "required": true,
16229	//       "type": "string"
16230	//     },
16231	//     "project": {
16232	//       "description": "Project ID for this request.",
16233	//       "location": "path",
16234	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16235	//       "required": true,
16236	//       "type": "string"
16237	//     }
16238	//   },
16239	//   "path": "{project}/global/firewalls/{firewall}",
16240	//   "request": {
16241	//     "$ref": "Firewall"
16242	//   },
16243	//   "response": {
16244	//     "$ref": "Operation"
16245	//   },
16246	//   "scopes": [
16247	//     "https://www.googleapis.com/auth/cloud-platform",
16248	//     "https://www.googleapis.com/auth/compute"
16249	//   ]
16250	// }
16251
16252}
16253
16254// method id "compute.firewalls.testIamPermissions":
16255
16256type FirewallsTestIamPermissionsCall struct {
16257	s                      *Service
16258	project                string
16259	resource               string
16260	testpermissionsrequest *TestPermissionsRequest
16261	urlParams_             gensupport.URLParams
16262	ctx_                   context.Context
16263}
16264
16265// TestIamPermissions: Returns permissions that a caller has on the
16266// specified resource.
16267func (r *FirewallsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *FirewallsTestIamPermissionsCall {
16268	c := &FirewallsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16269	c.project = project
16270	c.resource = resource
16271	c.testpermissionsrequest = testpermissionsrequest
16272	return c
16273}
16274
16275// Fields allows partial responses to be retrieved. See
16276// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16277// for more information.
16278func (c *FirewallsTestIamPermissionsCall) Fields(s ...googleapi.Field) *FirewallsTestIamPermissionsCall {
16279	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16280	return c
16281}
16282
16283// Context sets the context to be used in this call's Do method. Any
16284// pending HTTP request will be aborted if the provided context is
16285// canceled.
16286func (c *FirewallsTestIamPermissionsCall) Context(ctx context.Context) *FirewallsTestIamPermissionsCall {
16287	c.ctx_ = ctx
16288	return c
16289}
16290
16291func (c *FirewallsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
16292	var body io.Reader = nil
16293	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
16294	if err != nil {
16295		return nil, err
16296	}
16297	ctype := "application/json"
16298	c.urlParams_.Set("alt", alt)
16299	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{resource}/testIamPermissions")
16300	urls += "?" + c.urlParams_.Encode()
16301	req, _ := http.NewRequest("POST", urls, body)
16302	googleapi.Expand(req.URL, map[string]string{
16303		"project":  c.project,
16304		"resource": c.resource,
16305	})
16306	req.Header.Set("Content-Type", ctype)
16307	req.Header.Set("User-Agent", c.s.userAgent())
16308	if c.ctx_ != nil {
16309		return ctxhttp.Do(c.ctx_, c.s.client, req)
16310	}
16311	return c.s.client.Do(req)
16312}
16313
16314// Do executes the "compute.firewalls.testIamPermissions" call.
16315// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
16316// non-2xx status code is an error. Response headers are in either
16317// *TestPermissionsResponse.ServerResponse.Header or (if a response was
16318// returned at all) in error.(*googleapi.Error).Header. Use
16319// googleapi.IsNotModified to check whether the returned error was
16320// because http.StatusNotModified was returned.
16321func (c *FirewallsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
16322	gensupport.SetOptions(c.urlParams_, opts...)
16323	res, err := c.doRequest("json")
16324	if res != nil && res.StatusCode == http.StatusNotModified {
16325		if res.Body != nil {
16326			res.Body.Close()
16327		}
16328		return nil, &googleapi.Error{
16329			Code:   res.StatusCode,
16330			Header: res.Header,
16331		}
16332	}
16333	if err != nil {
16334		return nil, err
16335	}
16336	defer googleapi.CloseBody(res)
16337	if err := googleapi.CheckResponse(res); err != nil {
16338		return nil, err
16339	}
16340	ret := &TestPermissionsResponse{
16341		ServerResponse: googleapi.ServerResponse{
16342			Header:         res.Header,
16343			HTTPStatusCode: res.StatusCode,
16344		},
16345	}
16346	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16347		return nil, err
16348	}
16349	return ret, nil
16350	// {
16351	//   "description": "Returns permissions that a caller has on the specified resource.",
16352	//   "httpMethod": "POST",
16353	//   "id": "compute.firewalls.testIamPermissions",
16354	//   "parameterOrder": [
16355	//     "project",
16356	//     "resource"
16357	//   ],
16358	//   "parameters": {
16359	//     "project": {
16360	//       "description": "Project ID for this request.",
16361	//       "location": "path",
16362	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16363	//       "required": true,
16364	//       "type": "string"
16365	//     },
16366	//     "resource": {
16367	//       "description": "Name of the resource for this request.",
16368	//       "location": "path",
16369	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
16370	//       "required": true,
16371	//       "type": "string"
16372	//     }
16373	//   },
16374	//   "path": "{project}/global/firewalls/{resource}/testIamPermissions",
16375	//   "request": {
16376	//     "$ref": "TestPermissionsRequest"
16377	//   },
16378	//   "response": {
16379	//     "$ref": "TestPermissionsResponse"
16380	//   },
16381	//   "scopes": [
16382	//     "https://www.googleapis.com/auth/cloud-platform",
16383	//     "https://www.googleapis.com/auth/compute",
16384	//     "https://www.googleapis.com/auth/compute.readonly"
16385	//   ]
16386	// }
16387
16388}
16389
16390// method id "compute.firewalls.update":
16391
16392type FirewallsUpdateCall struct {
16393	s          *Service
16394	project    string
16395	firewall   string
16396	firewall2  *Firewall
16397	urlParams_ gensupport.URLParams
16398	ctx_       context.Context
16399}
16400
16401// Update: Updates the specified firewall rule with the data included in
16402// the request.
16403// For details, see https://cloud.google.com/compute/docs/reference/latest/firewalls/update
16404func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall {
16405	c := &FirewallsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16406	c.project = project
16407	c.firewall = firewall
16408	c.firewall2 = firewall2
16409	return c
16410}
16411
16412// Fields allows partial responses to be retrieved. See
16413// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16414// for more information.
16415func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall {
16416	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16417	return c
16418}
16419
16420// Context sets the context to be used in this call's Do method. Any
16421// pending HTTP request will be aborted if the provided context is
16422// canceled.
16423func (c *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall {
16424	c.ctx_ = ctx
16425	return c
16426}
16427
16428func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) {
16429	var body io.Reader = nil
16430	body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
16431	if err != nil {
16432		return nil, err
16433	}
16434	ctype := "application/json"
16435	c.urlParams_.Set("alt", alt)
16436	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}")
16437	urls += "?" + c.urlParams_.Encode()
16438	req, _ := http.NewRequest("PUT", urls, body)
16439	googleapi.Expand(req.URL, map[string]string{
16440		"project":  c.project,
16441		"firewall": c.firewall,
16442	})
16443	req.Header.Set("Content-Type", ctype)
16444	req.Header.Set("User-Agent", c.s.userAgent())
16445	if c.ctx_ != nil {
16446		return ctxhttp.Do(c.ctx_, c.s.client, req)
16447	}
16448	return c.s.client.Do(req)
16449}
16450
16451// Do executes the "compute.firewalls.update" call.
16452// Exactly one of *Operation or error will be non-nil. Any non-2xx
16453// status code is an error. Response headers are in either
16454// *Operation.ServerResponse.Header or (if a response was returned at
16455// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16456// to check whether the returned error was because
16457// http.StatusNotModified was returned.
16458func (c *FirewallsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16459	gensupport.SetOptions(c.urlParams_, opts...)
16460	res, err := c.doRequest("json")
16461	if res != nil && res.StatusCode == http.StatusNotModified {
16462		if res.Body != nil {
16463			res.Body.Close()
16464		}
16465		return nil, &googleapi.Error{
16466			Code:   res.StatusCode,
16467			Header: res.Header,
16468		}
16469	}
16470	if err != nil {
16471		return nil, err
16472	}
16473	defer googleapi.CloseBody(res)
16474	if err := googleapi.CheckResponse(res); err != nil {
16475		return nil, err
16476	}
16477	ret := &Operation{
16478		ServerResponse: googleapi.ServerResponse{
16479			Header:         res.Header,
16480			HTTPStatusCode: res.StatusCode,
16481		},
16482	}
16483	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16484		return nil, err
16485	}
16486	return ret, nil
16487	// {
16488	//   "description": "Updates the specified firewall rule with the data included in the request.",
16489	//   "httpMethod": "PUT",
16490	//   "id": "compute.firewalls.update",
16491	//   "parameterOrder": [
16492	//     "project",
16493	//     "firewall"
16494	//   ],
16495	//   "parameters": {
16496	//     "firewall": {
16497	//       "description": "Name of the firewall rule to update.",
16498	//       "location": "path",
16499	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
16500	//       "required": true,
16501	//       "type": "string"
16502	//     },
16503	//     "project": {
16504	//       "description": "Project ID for this request.",
16505	//       "location": "path",
16506	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16507	//       "required": true,
16508	//       "type": "string"
16509	//     }
16510	//   },
16511	//   "path": "{project}/global/firewalls/{firewall}",
16512	//   "request": {
16513	//     "$ref": "Firewall"
16514	//   },
16515	//   "response": {
16516	//     "$ref": "Operation"
16517	//   },
16518	//   "scopes": [
16519	//     "https://www.googleapis.com/auth/cloud-platform",
16520	//     "https://www.googleapis.com/auth/compute"
16521	//   ]
16522	// }
16523
16524}
16525
16526// method id "compute.forwardingRules.aggregatedList":
16527
16528type ForwardingRulesAggregatedListCall struct {
16529	s            *Service
16530	project      string
16531	urlParams_   gensupport.URLParams
16532	ifNoneMatch_ string
16533	ctx_         context.Context
16534}
16535
16536// AggregatedList: Retrieves an aggregated list of forwarding rules.
16537// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/aggregatedList
16538func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall {
16539	c := &ForwardingRulesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16540	c.project = project
16541	return c
16542}
16543
16544// Filter sets the optional parameter "filter": Sets a filter expression
16545// for filtering listed resources, in the form filter={expression}. Your
16546// {expression} must be in the format: field_name comparison_string
16547// literal_string.
16548//
16549// The field_name is the name of the field you want to compare. Only
16550// atomic field types are supported (string, number, boolean). The
16551// comparison_string must be either eq (equals) or ne (not equals). The
16552// literal_string is the string value to filter to. The literal value
16553// must be valid for the type of field you are filtering by (string,
16554// number, boolean). For string fields, the literal value is interpreted
16555// as a regular expression using RE2 syntax. The literal value must
16556// match the entire field.
16557//
16558// For example, to filter for instances that do not have a name of
16559// example-instance, you would use filter=name ne
16560// example-instance.
16561//
16562// Compute Engine Beta API Only: If you use filtering in the Beta API,
16563// you can also filter on nested fields. For example, you could filter
16564// on instances that have set the scheduling.automaticRestart field to
16565// true. In particular, use filtering on nested fields to take advantage
16566// of instance labels to organize and filter results based on label
16567// values.
16568//
16569// The Beta API also supports filtering on multiple expressions by
16570// providing each separate expression within parentheses. For example,
16571// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
16572// Multiple expressions are treated as AND expressions, meaning that
16573// resources must match all expressions to pass the filters.
16574func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall {
16575	c.urlParams_.Set("filter", filter)
16576	return c
16577}
16578
16579// MaxResults sets the optional parameter "maxResults": The maximum
16580// number of results per page that should be returned. If the number of
16581// available results is larger than maxResults, Compute Engine returns a
16582// nextPageToken that can be used to get the next page of results in
16583// subsequent list requests.
16584func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall {
16585	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
16586	return c
16587}
16588
16589// OrderBy sets the optional parameter "orderBy": Sorts list results by
16590// a certain order. By default, results are returned in alphanumerical
16591// order based on the resource name.
16592//
16593// You can also sort results in descending order based on the creation
16594// timestamp using orderBy="creationTimestamp desc". This sorts results
16595// based on the creationTimestamp field in reverse chronological order
16596// (newest result first). Use this to sort resources like operations so
16597// that the newest operation is returned first.
16598//
16599// Currently, only sorting by name or creationTimestamp desc is
16600// supported.
16601func (c *ForwardingRulesAggregatedListCall) OrderBy(orderBy string) *ForwardingRulesAggregatedListCall {
16602	c.urlParams_.Set("orderBy", orderBy)
16603	return c
16604}
16605
16606// PageToken sets the optional parameter "pageToken": Specifies a page
16607// token to use. Set pageToken to the nextPageToken returned by a
16608// previous list request to get the next page of results.
16609func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall {
16610	c.urlParams_.Set("pageToken", pageToken)
16611	return c
16612}
16613
16614// Fields allows partial responses to be retrieved. See
16615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16616// for more information.
16617func (c *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall {
16618	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16619	return c
16620}
16621
16622// IfNoneMatch sets the optional parameter which makes the operation
16623// fail if the object's ETag matches the given value. This is useful for
16624// getting updates only after the object has changed since the last
16625// request. Use googleapi.IsNotModified to check whether the response
16626// error from Do is the result of In-None-Match.
16627func (c *ForwardingRulesAggregatedListCall) IfNoneMatch(entityTag string) *ForwardingRulesAggregatedListCall {
16628	c.ifNoneMatch_ = entityTag
16629	return c
16630}
16631
16632// Context sets the context to be used in this call's Do method. Any
16633// pending HTTP request will be aborted if the provided context is
16634// canceled.
16635func (c *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall {
16636	c.ctx_ = ctx
16637	return c
16638}
16639
16640func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
16641	var body io.Reader = nil
16642	c.urlParams_.Set("alt", alt)
16643	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/forwardingRules")
16644	urls += "?" + c.urlParams_.Encode()
16645	req, _ := http.NewRequest("GET", urls, body)
16646	googleapi.Expand(req.URL, map[string]string{
16647		"project": c.project,
16648	})
16649	req.Header.Set("User-Agent", c.s.userAgent())
16650	if c.ifNoneMatch_ != "" {
16651		req.Header.Set("If-None-Match", c.ifNoneMatch_)
16652	}
16653	if c.ctx_ != nil {
16654		return ctxhttp.Do(c.ctx_, c.s.client, req)
16655	}
16656	return c.s.client.Do(req)
16657}
16658
16659// Do executes the "compute.forwardingRules.aggregatedList" call.
16660// Exactly one of *ForwardingRuleAggregatedList or error will be
16661// non-nil. Any non-2xx status code is an error. Response headers are in
16662// either *ForwardingRuleAggregatedList.ServerResponse.Header or (if a
16663// response was returned at all) in error.(*googleapi.Error).Header. Use
16664// googleapi.IsNotModified to check whether the returned error was
16665// because http.StatusNotModified was returned.
16666func (c *ForwardingRulesAggregatedListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleAggregatedList, error) {
16667	gensupport.SetOptions(c.urlParams_, opts...)
16668	res, err := c.doRequest("json")
16669	if res != nil && res.StatusCode == http.StatusNotModified {
16670		if res.Body != nil {
16671			res.Body.Close()
16672		}
16673		return nil, &googleapi.Error{
16674			Code:   res.StatusCode,
16675			Header: res.Header,
16676		}
16677	}
16678	if err != nil {
16679		return nil, err
16680	}
16681	defer googleapi.CloseBody(res)
16682	if err := googleapi.CheckResponse(res); err != nil {
16683		return nil, err
16684	}
16685	ret := &ForwardingRuleAggregatedList{
16686		ServerResponse: googleapi.ServerResponse{
16687			Header:         res.Header,
16688			HTTPStatusCode: res.StatusCode,
16689		},
16690	}
16691	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16692		return nil, err
16693	}
16694	return ret, nil
16695	// {
16696	//   "description": "Retrieves an aggregated list of forwarding rules.",
16697	//   "httpMethod": "GET",
16698	//   "id": "compute.forwardingRules.aggregatedList",
16699	//   "parameterOrder": [
16700	//     "project"
16701	//   ],
16702	//   "parameters": {
16703	//     "filter": {
16704	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
16705	//       "location": "query",
16706	//       "type": "string"
16707	//     },
16708	//     "maxResults": {
16709	//       "default": "500",
16710	//       "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.",
16711	//       "format": "uint32",
16712	//       "location": "query",
16713	//       "maximum": "500",
16714	//       "minimum": "0",
16715	//       "type": "integer"
16716	//     },
16717	//     "orderBy": {
16718	//       "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.",
16719	//       "location": "query",
16720	//       "type": "string"
16721	//     },
16722	//     "pageToken": {
16723	//       "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.",
16724	//       "location": "query",
16725	//       "type": "string"
16726	//     },
16727	//     "project": {
16728	//       "description": "Project ID for this request.",
16729	//       "location": "path",
16730	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16731	//       "required": true,
16732	//       "type": "string"
16733	//     }
16734	//   },
16735	//   "path": "{project}/aggregated/forwardingRules",
16736	//   "response": {
16737	//     "$ref": "ForwardingRuleAggregatedList"
16738	//   },
16739	//   "scopes": [
16740	//     "https://www.googleapis.com/auth/cloud-platform",
16741	//     "https://www.googleapis.com/auth/compute",
16742	//     "https://www.googleapis.com/auth/compute.readonly"
16743	//   ]
16744	// }
16745
16746}
16747
16748// Pages invokes f for each page of results.
16749// A non-nil error returned from f will halt the iteration.
16750// The provided context supersedes any context provided to the Context method.
16751func (c *ForwardingRulesAggregatedListCall) Pages(ctx context.Context, f func(*ForwardingRuleAggregatedList) error) error {
16752	c.ctx_ = ctx
16753	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16754	for {
16755		x, err := c.Do()
16756		if err != nil {
16757			return err
16758		}
16759		if err := f(x); err != nil {
16760			return err
16761		}
16762		if x.NextPageToken == "" {
16763			return nil
16764		}
16765		c.PageToken(x.NextPageToken)
16766	}
16767}
16768
16769// method id "compute.forwardingRules.delete":
16770
16771type ForwardingRulesDeleteCall struct {
16772	s              *Service
16773	project        string
16774	region         string
16775	forwardingRule string
16776	urlParams_     gensupport.URLParams
16777	ctx_           context.Context
16778}
16779
16780// Delete: Deletes the specified ForwardingRule resource.
16781// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/delete
16782func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall {
16783	c := &ForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16784	c.project = project
16785	c.region = region
16786	c.forwardingRule = forwardingRule
16787	return c
16788}
16789
16790// Fields allows partial responses to be retrieved. See
16791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16792// for more information.
16793func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall {
16794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16795	return c
16796}
16797
16798// Context sets the context to be used in this call's Do method. Any
16799// pending HTTP request will be aborted if the provided context is
16800// canceled.
16801func (c *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall {
16802	c.ctx_ = ctx
16803	return c
16804}
16805
16806func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
16807	var body io.Reader = nil
16808	c.urlParams_.Set("alt", alt)
16809	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}")
16810	urls += "?" + c.urlParams_.Encode()
16811	req, _ := http.NewRequest("DELETE", urls, body)
16812	googleapi.Expand(req.URL, map[string]string{
16813		"project":        c.project,
16814		"region":         c.region,
16815		"forwardingRule": c.forwardingRule,
16816	})
16817	req.Header.Set("User-Agent", c.s.userAgent())
16818	if c.ctx_ != nil {
16819		return ctxhttp.Do(c.ctx_, c.s.client, req)
16820	}
16821	return c.s.client.Do(req)
16822}
16823
16824// Do executes the "compute.forwardingRules.delete" call.
16825// Exactly one of *Operation or error will be non-nil. Any non-2xx
16826// status code is an error. Response headers are in either
16827// *Operation.ServerResponse.Header or (if a response was returned at
16828// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16829// to check whether the returned error was because
16830// http.StatusNotModified was returned.
16831func (c *ForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16832	gensupport.SetOptions(c.urlParams_, opts...)
16833	res, err := c.doRequest("json")
16834	if res != nil && res.StatusCode == http.StatusNotModified {
16835		if res.Body != nil {
16836			res.Body.Close()
16837		}
16838		return nil, &googleapi.Error{
16839			Code:   res.StatusCode,
16840			Header: res.Header,
16841		}
16842	}
16843	if err != nil {
16844		return nil, err
16845	}
16846	defer googleapi.CloseBody(res)
16847	if err := googleapi.CheckResponse(res); err != nil {
16848		return nil, err
16849	}
16850	ret := &Operation{
16851		ServerResponse: googleapi.ServerResponse{
16852			Header:         res.Header,
16853			HTTPStatusCode: res.StatusCode,
16854		},
16855	}
16856	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
16857		return nil, err
16858	}
16859	return ret, nil
16860	// {
16861	//   "description": "Deletes the specified ForwardingRule resource.",
16862	//   "httpMethod": "DELETE",
16863	//   "id": "compute.forwardingRules.delete",
16864	//   "parameterOrder": [
16865	//     "project",
16866	//     "region",
16867	//     "forwardingRule"
16868	//   ],
16869	//   "parameters": {
16870	//     "forwardingRule": {
16871	//       "description": "Name of the ForwardingRule resource to delete.",
16872	//       "location": "path",
16873	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
16874	//       "required": true,
16875	//       "type": "string"
16876	//     },
16877	//     "project": {
16878	//       "description": "Project ID for this request.",
16879	//       "location": "path",
16880	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
16881	//       "required": true,
16882	//       "type": "string"
16883	//     },
16884	//     "region": {
16885	//       "description": "Name of the region scoping this request.",
16886	//       "location": "path",
16887	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
16888	//       "required": true,
16889	//       "type": "string"
16890	//     }
16891	//   },
16892	//   "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}",
16893	//   "response": {
16894	//     "$ref": "Operation"
16895	//   },
16896	//   "scopes": [
16897	//     "https://www.googleapis.com/auth/cloud-platform",
16898	//     "https://www.googleapis.com/auth/compute"
16899	//   ]
16900	// }
16901
16902}
16903
16904// method id "compute.forwardingRules.get":
16905
16906type ForwardingRulesGetCall struct {
16907	s              *Service
16908	project        string
16909	region         string
16910	forwardingRule string
16911	urlParams_     gensupport.URLParams
16912	ifNoneMatch_   string
16913	ctx_           context.Context
16914}
16915
16916// Get: Returns the specified ForwardingRule resource.
16917// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/get
16918func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall {
16919	c := &ForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16920	c.project = project
16921	c.region = region
16922	c.forwardingRule = forwardingRule
16923	return c
16924}
16925
16926// Fields allows partial responses to be retrieved. See
16927// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16928// for more information.
16929func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall {
16930	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16931	return c
16932}
16933
16934// IfNoneMatch sets the optional parameter which makes the operation
16935// fail if the object's ETag matches the given value. This is useful for
16936// getting updates only after the object has changed since the last
16937// request. Use googleapi.IsNotModified to check whether the response
16938// error from Do is the result of In-None-Match.
16939func (c *ForwardingRulesGetCall) IfNoneMatch(entityTag string) *ForwardingRulesGetCall {
16940	c.ifNoneMatch_ = entityTag
16941	return c
16942}
16943
16944// Context sets the context to be used in this call's Do method. Any
16945// pending HTTP request will be aborted if the provided context is
16946// canceled.
16947func (c *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall {
16948	c.ctx_ = ctx
16949	return c
16950}
16951
16952func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
16953	var body io.Reader = nil
16954	c.urlParams_.Set("alt", alt)
16955	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}")
16956	urls += "?" + c.urlParams_.Encode()
16957	req, _ := http.NewRequest("GET", urls, body)
16958	googleapi.Expand(req.URL, map[string]string{
16959		"project":        c.project,
16960		"region":         c.region,
16961		"forwardingRule": c.forwardingRule,
16962	})
16963	req.Header.Set("User-Agent", c.s.userAgent())
16964	if c.ifNoneMatch_ != "" {
16965		req.Header.Set("If-None-Match", c.ifNoneMatch_)
16966	}
16967	if c.ctx_ != nil {
16968		return ctxhttp.Do(c.ctx_, c.s.client, req)
16969	}
16970	return c.s.client.Do(req)
16971}
16972
16973// Do executes the "compute.forwardingRules.get" call.
16974// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx
16975// status code is an error. Response headers are in either
16976// *ForwardingRule.ServerResponse.Header or (if a response was returned
16977// at all) in error.(*googleapi.Error).Header. Use
16978// googleapi.IsNotModified to check whether the returned error was
16979// because http.StatusNotModified was returned.
16980func (c *ForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) {
16981	gensupport.SetOptions(c.urlParams_, opts...)
16982	res, err := c.doRequest("json")
16983	if res != nil && res.StatusCode == http.StatusNotModified {
16984		if res.Body != nil {
16985			res.Body.Close()
16986		}
16987		return nil, &googleapi.Error{
16988			Code:   res.StatusCode,
16989			Header: res.Header,
16990		}
16991	}
16992	if err != nil {
16993		return nil, err
16994	}
16995	defer googleapi.CloseBody(res)
16996	if err := googleapi.CheckResponse(res); err != nil {
16997		return nil, err
16998	}
16999	ret := &ForwardingRule{
17000		ServerResponse: googleapi.ServerResponse{
17001			Header:         res.Header,
17002			HTTPStatusCode: res.StatusCode,
17003		},
17004	}
17005	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17006		return nil, err
17007	}
17008	return ret, nil
17009	// {
17010	//   "description": "Returns the specified ForwardingRule resource.",
17011	//   "httpMethod": "GET",
17012	//   "id": "compute.forwardingRules.get",
17013	//   "parameterOrder": [
17014	//     "project",
17015	//     "region",
17016	//     "forwardingRule"
17017	//   ],
17018	//   "parameters": {
17019	//     "forwardingRule": {
17020	//       "description": "Name of the ForwardingRule resource to return.",
17021	//       "location": "path",
17022	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17023	//       "required": true,
17024	//       "type": "string"
17025	//     },
17026	//     "project": {
17027	//       "description": "Project ID for this request.",
17028	//       "location": "path",
17029	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17030	//       "required": true,
17031	//       "type": "string"
17032	//     },
17033	//     "region": {
17034	//       "description": "Name of the region scoping this request.",
17035	//       "location": "path",
17036	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17037	//       "required": true,
17038	//       "type": "string"
17039	//     }
17040	//   },
17041	//   "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}",
17042	//   "response": {
17043	//     "$ref": "ForwardingRule"
17044	//   },
17045	//   "scopes": [
17046	//     "https://www.googleapis.com/auth/cloud-platform",
17047	//     "https://www.googleapis.com/auth/compute",
17048	//     "https://www.googleapis.com/auth/compute.readonly"
17049	//   ]
17050	// }
17051
17052}
17053
17054// method id "compute.forwardingRules.insert":
17055
17056type ForwardingRulesInsertCall struct {
17057	s              *Service
17058	project        string
17059	region         string
17060	forwardingrule *ForwardingRule
17061	urlParams_     gensupport.URLParams
17062	ctx_           context.Context
17063}
17064
17065// Insert: Creates a ForwardingRule resource in the specified project
17066// and region using the data included in the request.
17067// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/insert
17068func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall {
17069	c := &ForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17070	c.project = project
17071	c.region = region
17072	c.forwardingrule = forwardingrule
17073	return c
17074}
17075
17076// Fields allows partial responses to be retrieved. See
17077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17078// for more information.
17079func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall {
17080	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17081	return c
17082}
17083
17084// Context sets the context to be used in this call's Do method. Any
17085// pending HTTP request will be aborted if the provided context is
17086// canceled.
17087func (c *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall {
17088	c.ctx_ = ctx
17089	return c
17090}
17091
17092func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
17093	var body io.Reader = nil
17094	body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
17095	if err != nil {
17096		return nil, err
17097	}
17098	ctype := "application/json"
17099	c.urlParams_.Set("alt", alt)
17100	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules")
17101	urls += "?" + c.urlParams_.Encode()
17102	req, _ := http.NewRequest("POST", urls, body)
17103	googleapi.Expand(req.URL, map[string]string{
17104		"project": c.project,
17105		"region":  c.region,
17106	})
17107	req.Header.Set("Content-Type", ctype)
17108	req.Header.Set("User-Agent", c.s.userAgent())
17109	if c.ctx_ != nil {
17110		return ctxhttp.Do(c.ctx_, c.s.client, req)
17111	}
17112	return c.s.client.Do(req)
17113}
17114
17115// Do executes the "compute.forwardingRules.insert" call.
17116// Exactly one of *Operation or error will be non-nil. Any non-2xx
17117// status code is an error. Response headers are in either
17118// *Operation.ServerResponse.Header or (if a response was returned at
17119// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17120// to check whether the returned error was because
17121// http.StatusNotModified was returned.
17122func (c *ForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17123	gensupport.SetOptions(c.urlParams_, opts...)
17124	res, err := c.doRequest("json")
17125	if res != nil && res.StatusCode == http.StatusNotModified {
17126		if res.Body != nil {
17127			res.Body.Close()
17128		}
17129		return nil, &googleapi.Error{
17130			Code:   res.StatusCode,
17131			Header: res.Header,
17132		}
17133	}
17134	if err != nil {
17135		return nil, err
17136	}
17137	defer googleapi.CloseBody(res)
17138	if err := googleapi.CheckResponse(res); err != nil {
17139		return nil, err
17140	}
17141	ret := &Operation{
17142		ServerResponse: googleapi.ServerResponse{
17143			Header:         res.Header,
17144			HTTPStatusCode: res.StatusCode,
17145		},
17146	}
17147	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17148		return nil, err
17149	}
17150	return ret, nil
17151	// {
17152	//   "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.",
17153	//   "httpMethod": "POST",
17154	//   "id": "compute.forwardingRules.insert",
17155	//   "parameterOrder": [
17156	//     "project",
17157	//     "region"
17158	//   ],
17159	//   "parameters": {
17160	//     "project": {
17161	//       "description": "Project ID for this request.",
17162	//       "location": "path",
17163	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17164	//       "required": true,
17165	//       "type": "string"
17166	//     },
17167	//     "region": {
17168	//       "description": "Name of the region scoping this request.",
17169	//       "location": "path",
17170	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17171	//       "required": true,
17172	//       "type": "string"
17173	//     }
17174	//   },
17175	//   "path": "{project}/regions/{region}/forwardingRules",
17176	//   "request": {
17177	//     "$ref": "ForwardingRule"
17178	//   },
17179	//   "response": {
17180	//     "$ref": "Operation"
17181	//   },
17182	//   "scopes": [
17183	//     "https://www.googleapis.com/auth/cloud-platform",
17184	//     "https://www.googleapis.com/auth/compute"
17185	//   ]
17186	// }
17187
17188}
17189
17190// method id "compute.forwardingRules.list":
17191
17192type ForwardingRulesListCall struct {
17193	s            *Service
17194	project      string
17195	region       string
17196	urlParams_   gensupport.URLParams
17197	ifNoneMatch_ string
17198	ctx_         context.Context
17199}
17200
17201// List: Retrieves a list of ForwardingRule resources available to the
17202// specified project and region.
17203// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/list
17204func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall {
17205	c := &ForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17206	c.project = project
17207	c.region = region
17208	return c
17209}
17210
17211// Filter sets the optional parameter "filter": Sets a filter expression
17212// for filtering listed resources, in the form filter={expression}. Your
17213// {expression} must be in the format: field_name comparison_string
17214// literal_string.
17215//
17216// The field_name is the name of the field you want to compare. Only
17217// atomic field types are supported (string, number, boolean). The
17218// comparison_string must be either eq (equals) or ne (not equals). The
17219// literal_string is the string value to filter to. The literal value
17220// must be valid for the type of field you are filtering by (string,
17221// number, boolean). For string fields, the literal value is interpreted
17222// as a regular expression using RE2 syntax. The literal value must
17223// match the entire field.
17224//
17225// For example, to filter for instances that do not have a name of
17226// example-instance, you would use filter=name ne
17227// example-instance.
17228//
17229// Compute Engine Beta API Only: If you use filtering in the Beta API,
17230// you can also filter on nested fields. For example, you could filter
17231// on instances that have set the scheduling.automaticRestart field to
17232// true. In particular, use filtering on nested fields to take advantage
17233// of instance labels to organize and filter results based on label
17234// values.
17235//
17236// The Beta API also supports filtering on multiple expressions by
17237// providing each separate expression within parentheses. For example,
17238// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
17239// Multiple expressions are treated as AND expressions, meaning that
17240// resources must match all expressions to pass the filters.
17241func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall {
17242	c.urlParams_.Set("filter", filter)
17243	return c
17244}
17245
17246// MaxResults sets the optional parameter "maxResults": The maximum
17247// number of results per page that should be returned. If the number of
17248// available results is larger than maxResults, Compute Engine returns a
17249// nextPageToken that can be used to get the next page of results in
17250// subsequent list requests.
17251func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall {
17252	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
17253	return c
17254}
17255
17256// OrderBy sets the optional parameter "orderBy": Sorts list results by
17257// a certain order. By default, results are returned in alphanumerical
17258// order based on the resource name.
17259//
17260// You can also sort results in descending order based on the creation
17261// timestamp using orderBy="creationTimestamp desc". This sorts results
17262// based on the creationTimestamp field in reverse chronological order
17263// (newest result first). Use this to sort resources like operations so
17264// that the newest operation is returned first.
17265//
17266// Currently, only sorting by name or creationTimestamp desc is
17267// supported.
17268func (c *ForwardingRulesListCall) OrderBy(orderBy string) *ForwardingRulesListCall {
17269	c.urlParams_.Set("orderBy", orderBy)
17270	return c
17271}
17272
17273// PageToken sets the optional parameter "pageToken": Specifies a page
17274// token to use. Set pageToken to the nextPageToken returned by a
17275// previous list request to get the next page of results.
17276func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall {
17277	c.urlParams_.Set("pageToken", pageToken)
17278	return c
17279}
17280
17281// Fields allows partial responses to be retrieved. See
17282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17283// for more information.
17284func (c *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall {
17285	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17286	return c
17287}
17288
17289// IfNoneMatch sets the optional parameter which makes the operation
17290// fail if the object's ETag matches the given value. This is useful for
17291// getting updates only after the object has changed since the last
17292// request. Use googleapi.IsNotModified to check whether the response
17293// error from Do is the result of In-None-Match.
17294func (c *ForwardingRulesListCall) IfNoneMatch(entityTag string) *ForwardingRulesListCall {
17295	c.ifNoneMatch_ = entityTag
17296	return c
17297}
17298
17299// Context sets the context to be used in this call's Do method. Any
17300// pending HTTP request will be aborted if the provided context is
17301// canceled.
17302func (c *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall {
17303	c.ctx_ = ctx
17304	return c
17305}
17306
17307func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
17308	var body io.Reader = nil
17309	c.urlParams_.Set("alt", alt)
17310	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules")
17311	urls += "?" + c.urlParams_.Encode()
17312	req, _ := http.NewRequest("GET", urls, body)
17313	googleapi.Expand(req.URL, map[string]string{
17314		"project": c.project,
17315		"region":  c.region,
17316	})
17317	req.Header.Set("User-Agent", c.s.userAgent())
17318	if c.ifNoneMatch_ != "" {
17319		req.Header.Set("If-None-Match", c.ifNoneMatch_)
17320	}
17321	if c.ctx_ != nil {
17322		return ctxhttp.Do(c.ctx_, c.s.client, req)
17323	}
17324	return c.s.client.Do(req)
17325}
17326
17327// Do executes the "compute.forwardingRules.list" call.
17328// Exactly one of *ForwardingRuleList or error will be non-nil. Any
17329// non-2xx status code is an error. Response headers are in either
17330// *ForwardingRuleList.ServerResponse.Header or (if a response was
17331// returned at all) in error.(*googleapi.Error).Header. Use
17332// googleapi.IsNotModified to check whether the returned error was
17333// because http.StatusNotModified was returned.
17334func (c *ForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) {
17335	gensupport.SetOptions(c.urlParams_, opts...)
17336	res, err := c.doRequest("json")
17337	if res != nil && res.StatusCode == http.StatusNotModified {
17338		if res.Body != nil {
17339			res.Body.Close()
17340		}
17341		return nil, &googleapi.Error{
17342			Code:   res.StatusCode,
17343			Header: res.Header,
17344		}
17345	}
17346	if err != nil {
17347		return nil, err
17348	}
17349	defer googleapi.CloseBody(res)
17350	if err := googleapi.CheckResponse(res); err != nil {
17351		return nil, err
17352	}
17353	ret := &ForwardingRuleList{
17354		ServerResponse: googleapi.ServerResponse{
17355			Header:         res.Header,
17356			HTTPStatusCode: res.StatusCode,
17357		},
17358	}
17359	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17360		return nil, err
17361	}
17362	return ret, nil
17363	// {
17364	//   "description": "Retrieves a list of ForwardingRule resources available to the specified project and region.",
17365	//   "httpMethod": "GET",
17366	//   "id": "compute.forwardingRules.list",
17367	//   "parameterOrder": [
17368	//     "project",
17369	//     "region"
17370	//   ],
17371	//   "parameters": {
17372	//     "filter": {
17373	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
17374	//       "location": "query",
17375	//       "type": "string"
17376	//     },
17377	//     "maxResults": {
17378	//       "default": "500",
17379	//       "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.",
17380	//       "format": "uint32",
17381	//       "location": "query",
17382	//       "maximum": "500",
17383	//       "minimum": "0",
17384	//       "type": "integer"
17385	//     },
17386	//     "orderBy": {
17387	//       "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.",
17388	//       "location": "query",
17389	//       "type": "string"
17390	//     },
17391	//     "pageToken": {
17392	//       "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.",
17393	//       "location": "query",
17394	//       "type": "string"
17395	//     },
17396	//     "project": {
17397	//       "description": "Project ID for this request.",
17398	//       "location": "path",
17399	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17400	//       "required": true,
17401	//       "type": "string"
17402	//     },
17403	//     "region": {
17404	//       "description": "Name of the region scoping this request.",
17405	//       "location": "path",
17406	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17407	//       "required": true,
17408	//       "type": "string"
17409	//     }
17410	//   },
17411	//   "path": "{project}/regions/{region}/forwardingRules",
17412	//   "response": {
17413	//     "$ref": "ForwardingRuleList"
17414	//   },
17415	//   "scopes": [
17416	//     "https://www.googleapis.com/auth/cloud-platform",
17417	//     "https://www.googleapis.com/auth/compute",
17418	//     "https://www.googleapis.com/auth/compute.readonly"
17419	//   ]
17420	// }
17421
17422}
17423
17424// Pages invokes f for each page of results.
17425// A non-nil error returned from f will halt the iteration.
17426// The provided context supersedes any context provided to the Context method.
17427func (c *ForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error {
17428	c.ctx_ = ctx
17429	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17430	for {
17431		x, err := c.Do()
17432		if err != nil {
17433			return err
17434		}
17435		if err := f(x); err != nil {
17436			return err
17437		}
17438		if x.NextPageToken == "" {
17439			return nil
17440		}
17441		c.PageToken(x.NextPageToken)
17442	}
17443}
17444
17445// method id "compute.forwardingRules.setTarget":
17446
17447type ForwardingRulesSetTargetCall struct {
17448	s               *Service
17449	project         string
17450	region          string
17451	forwardingRule  string
17452	targetreference *TargetReference
17453	urlParams_      gensupport.URLParams
17454	ctx_            context.Context
17455}
17456
17457// SetTarget: Changes target URL for forwarding rule. The new target
17458// should be of the same type as the old target.
17459// For details, see https://cloud.google.com/compute/docs/reference/latest/forwardingRules/setTarget
17460func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall {
17461	c := &ForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17462	c.project = project
17463	c.region = region
17464	c.forwardingRule = forwardingRule
17465	c.targetreference = targetreference
17466	return c
17467}
17468
17469// Fields allows partial responses to be retrieved. See
17470// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17471// for more information.
17472func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall {
17473	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17474	return c
17475}
17476
17477// Context sets the context to be used in this call's Do method. Any
17478// pending HTTP request will be aborted if the provided context is
17479// canceled.
17480func (c *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall {
17481	c.ctx_ = ctx
17482	return c
17483}
17484
17485func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
17486	var body io.Reader = nil
17487	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
17488	if err != nil {
17489		return nil, err
17490	}
17491	ctype := "application/json"
17492	c.urlParams_.Set("alt", alt)
17493	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget")
17494	urls += "?" + c.urlParams_.Encode()
17495	req, _ := http.NewRequest("POST", urls, body)
17496	googleapi.Expand(req.URL, map[string]string{
17497		"project":        c.project,
17498		"region":         c.region,
17499		"forwardingRule": c.forwardingRule,
17500	})
17501	req.Header.Set("Content-Type", ctype)
17502	req.Header.Set("User-Agent", c.s.userAgent())
17503	if c.ctx_ != nil {
17504		return ctxhttp.Do(c.ctx_, c.s.client, req)
17505	}
17506	return c.s.client.Do(req)
17507}
17508
17509// Do executes the "compute.forwardingRules.setTarget" call.
17510// Exactly one of *Operation or error will be non-nil. Any non-2xx
17511// status code is an error. Response headers are in either
17512// *Operation.ServerResponse.Header or (if a response was returned at
17513// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17514// to check whether the returned error was because
17515// http.StatusNotModified was returned.
17516func (c *ForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17517	gensupport.SetOptions(c.urlParams_, opts...)
17518	res, err := c.doRequest("json")
17519	if res != nil && res.StatusCode == http.StatusNotModified {
17520		if res.Body != nil {
17521			res.Body.Close()
17522		}
17523		return nil, &googleapi.Error{
17524			Code:   res.StatusCode,
17525			Header: res.Header,
17526		}
17527	}
17528	if err != nil {
17529		return nil, err
17530	}
17531	defer googleapi.CloseBody(res)
17532	if err := googleapi.CheckResponse(res); err != nil {
17533		return nil, err
17534	}
17535	ret := &Operation{
17536		ServerResponse: googleapi.ServerResponse{
17537			Header:         res.Header,
17538			HTTPStatusCode: res.StatusCode,
17539		},
17540	}
17541	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17542		return nil, err
17543	}
17544	return ret, nil
17545	// {
17546	//   "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.",
17547	//   "httpMethod": "POST",
17548	//   "id": "compute.forwardingRules.setTarget",
17549	//   "parameterOrder": [
17550	//     "project",
17551	//     "region",
17552	//     "forwardingRule"
17553	//   ],
17554	//   "parameters": {
17555	//     "forwardingRule": {
17556	//       "description": "Name of the ForwardingRule resource in which target is to be set.",
17557	//       "location": "path",
17558	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17559	//       "required": true,
17560	//       "type": "string"
17561	//     },
17562	//     "project": {
17563	//       "description": "Project ID for this request.",
17564	//       "location": "path",
17565	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17566	//       "required": true,
17567	//       "type": "string"
17568	//     },
17569	//     "region": {
17570	//       "description": "Name of the region scoping this request.",
17571	//       "location": "path",
17572	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17573	//       "required": true,
17574	//       "type": "string"
17575	//     }
17576	//   },
17577	//   "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget",
17578	//   "request": {
17579	//     "$ref": "TargetReference"
17580	//   },
17581	//   "response": {
17582	//     "$ref": "Operation"
17583	//   },
17584	//   "scopes": [
17585	//     "https://www.googleapis.com/auth/cloud-platform",
17586	//     "https://www.googleapis.com/auth/compute"
17587	//   ]
17588	// }
17589
17590}
17591
17592// method id "compute.forwardingRules.testIamPermissions":
17593
17594type ForwardingRulesTestIamPermissionsCall struct {
17595	s                      *Service
17596	project                string
17597	region                 string
17598	resource               string
17599	testpermissionsrequest *TestPermissionsRequest
17600	urlParams_             gensupport.URLParams
17601	ctx_                   context.Context
17602}
17603
17604// TestIamPermissions: Returns permissions that a caller has on the
17605// specified resource.
17606func (r *ForwardingRulesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *ForwardingRulesTestIamPermissionsCall {
17607	c := &ForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17608	c.project = project
17609	c.region = region
17610	c.resource = resource
17611	c.testpermissionsrequest = testpermissionsrequest
17612	return c
17613}
17614
17615// Fields allows partial responses to be retrieved. See
17616// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17617// for more information.
17618func (c *ForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ForwardingRulesTestIamPermissionsCall {
17619	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17620	return c
17621}
17622
17623// Context sets the context to be used in this call's Do method. Any
17624// pending HTTP request will be aborted if the provided context is
17625// canceled.
17626func (c *ForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *ForwardingRulesTestIamPermissionsCall {
17627	c.ctx_ = ctx
17628	return c
17629}
17630
17631func (c *ForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
17632	var body io.Reader = nil
17633	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
17634	if err != nil {
17635		return nil, err
17636	}
17637	ctype := "application/json"
17638	c.urlParams_.Set("alt", alt)
17639	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions")
17640	urls += "?" + c.urlParams_.Encode()
17641	req, _ := http.NewRequest("POST", urls, body)
17642	googleapi.Expand(req.URL, map[string]string{
17643		"project":  c.project,
17644		"region":   c.region,
17645		"resource": c.resource,
17646	})
17647	req.Header.Set("Content-Type", ctype)
17648	req.Header.Set("User-Agent", c.s.userAgent())
17649	if c.ctx_ != nil {
17650		return ctxhttp.Do(c.ctx_, c.s.client, req)
17651	}
17652	return c.s.client.Do(req)
17653}
17654
17655// Do executes the "compute.forwardingRules.testIamPermissions" call.
17656// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
17657// non-2xx status code is an error. Response headers are in either
17658// *TestPermissionsResponse.ServerResponse.Header or (if a response was
17659// returned at all) in error.(*googleapi.Error).Header. Use
17660// googleapi.IsNotModified to check whether the returned error was
17661// because http.StatusNotModified was returned.
17662func (c *ForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
17663	gensupport.SetOptions(c.urlParams_, opts...)
17664	res, err := c.doRequest("json")
17665	if res != nil && res.StatusCode == http.StatusNotModified {
17666		if res.Body != nil {
17667			res.Body.Close()
17668		}
17669		return nil, &googleapi.Error{
17670			Code:   res.StatusCode,
17671			Header: res.Header,
17672		}
17673	}
17674	if err != nil {
17675		return nil, err
17676	}
17677	defer googleapi.CloseBody(res)
17678	if err := googleapi.CheckResponse(res); err != nil {
17679		return nil, err
17680	}
17681	ret := &TestPermissionsResponse{
17682		ServerResponse: googleapi.ServerResponse{
17683			Header:         res.Header,
17684			HTTPStatusCode: res.StatusCode,
17685		},
17686	}
17687	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17688		return nil, err
17689	}
17690	return ret, nil
17691	// {
17692	//   "description": "Returns permissions that a caller has on the specified resource.",
17693	//   "httpMethod": "POST",
17694	//   "id": "compute.forwardingRules.testIamPermissions",
17695	//   "parameterOrder": [
17696	//     "project",
17697	//     "region",
17698	//     "resource"
17699	//   ],
17700	//   "parameters": {
17701	//     "project": {
17702	//       "description": "Project ID for this request.",
17703	//       "location": "path",
17704	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17705	//       "required": true,
17706	//       "type": "string"
17707	//     },
17708	//     "region": {
17709	//       "description": "The name of the region for this request.",
17710	//       "location": "path",
17711	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17712	//       "required": true,
17713	//       "type": "string"
17714	//     },
17715	//     "resource": {
17716	//       "description": "Name of the resource for this request.",
17717	//       "location": "path",
17718	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17719	//       "required": true,
17720	//       "type": "string"
17721	//     }
17722	//   },
17723	//   "path": "{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions",
17724	//   "request": {
17725	//     "$ref": "TestPermissionsRequest"
17726	//   },
17727	//   "response": {
17728	//     "$ref": "TestPermissionsResponse"
17729	//   },
17730	//   "scopes": [
17731	//     "https://www.googleapis.com/auth/cloud-platform",
17732	//     "https://www.googleapis.com/auth/compute",
17733	//     "https://www.googleapis.com/auth/compute.readonly"
17734	//   ]
17735	// }
17736
17737}
17738
17739// method id "compute.globalAddresses.delete":
17740
17741type GlobalAddressesDeleteCall struct {
17742	s          *Service
17743	project    string
17744	address    string
17745	urlParams_ gensupport.URLParams
17746	ctx_       context.Context
17747}
17748
17749// Delete: Deletes the specified address resource.
17750// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/delete
17751func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall {
17752	c := &GlobalAddressesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17753	c.project = project
17754	c.address = address
17755	return c
17756}
17757
17758// Fields allows partial responses to be retrieved. See
17759// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17760// for more information.
17761func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall {
17762	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17763	return c
17764}
17765
17766// Context sets the context to be used in this call's Do method. Any
17767// pending HTTP request will be aborted if the provided context is
17768// canceled.
17769func (c *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall {
17770	c.ctx_ = ctx
17771	return c
17772}
17773
17774func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
17775	var body io.Reader = nil
17776	c.urlParams_.Set("alt", alt)
17777	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}")
17778	urls += "?" + c.urlParams_.Encode()
17779	req, _ := http.NewRequest("DELETE", urls, body)
17780	googleapi.Expand(req.URL, map[string]string{
17781		"project": c.project,
17782		"address": c.address,
17783	})
17784	req.Header.Set("User-Agent", c.s.userAgent())
17785	if c.ctx_ != nil {
17786		return ctxhttp.Do(c.ctx_, c.s.client, req)
17787	}
17788	return c.s.client.Do(req)
17789}
17790
17791// Do executes the "compute.globalAddresses.delete" call.
17792// Exactly one of *Operation or error will be non-nil. Any non-2xx
17793// status code is an error. Response headers are in either
17794// *Operation.ServerResponse.Header or (if a response was returned at
17795// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17796// to check whether the returned error was because
17797// http.StatusNotModified was returned.
17798func (c *GlobalAddressesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17799	gensupport.SetOptions(c.urlParams_, opts...)
17800	res, err := c.doRequest("json")
17801	if res != nil && res.StatusCode == http.StatusNotModified {
17802		if res.Body != nil {
17803			res.Body.Close()
17804		}
17805		return nil, &googleapi.Error{
17806			Code:   res.StatusCode,
17807			Header: res.Header,
17808		}
17809	}
17810	if err != nil {
17811		return nil, err
17812	}
17813	defer googleapi.CloseBody(res)
17814	if err := googleapi.CheckResponse(res); err != nil {
17815		return nil, err
17816	}
17817	ret := &Operation{
17818		ServerResponse: googleapi.ServerResponse{
17819			Header:         res.Header,
17820			HTTPStatusCode: res.StatusCode,
17821		},
17822	}
17823	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17824		return nil, err
17825	}
17826	return ret, nil
17827	// {
17828	//   "description": "Deletes the specified address resource.",
17829	//   "httpMethod": "DELETE",
17830	//   "id": "compute.globalAddresses.delete",
17831	//   "parameterOrder": [
17832	//     "project",
17833	//     "address"
17834	//   ],
17835	//   "parameters": {
17836	//     "address": {
17837	//       "description": "Name of the address resource to delete.",
17838	//       "location": "path",
17839	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17840	//       "required": true,
17841	//       "type": "string"
17842	//     },
17843	//     "project": {
17844	//       "description": "Project ID for this request.",
17845	//       "location": "path",
17846	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17847	//       "required": true,
17848	//       "type": "string"
17849	//     }
17850	//   },
17851	//   "path": "{project}/global/addresses/{address}",
17852	//   "response": {
17853	//     "$ref": "Operation"
17854	//   },
17855	//   "scopes": [
17856	//     "https://www.googleapis.com/auth/cloud-platform",
17857	//     "https://www.googleapis.com/auth/compute"
17858	//   ]
17859	// }
17860
17861}
17862
17863// method id "compute.globalAddresses.get":
17864
17865type GlobalAddressesGetCall struct {
17866	s            *Service
17867	project      string
17868	address      string
17869	urlParams_   gensupport.URLParams
17870	ifNoneMatch_ string
17871	ctx_         context.Context
17872}
17873
17874// Get: Returns the specified address resource. Get a list of available
17875// addresses by making a list() request.
17876// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/get
17877func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall {
17878	c := &GlobalAddressesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17879	c.project = project
17880	c.address = address
17881	return c
17882}
17883
17884// Fields allows partial responses to be retrieved. See
17885// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17886// for more information.
17887func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall {
17888	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17889	return c
17890}
17891
17892// IfNoneMatch sets the optional parameter which makes the operation
17893// fail if the object's ETag matches the given value. This is useful for
17894// getting updates only after the object has changed since the last
17895// request. Use googleapi.IsNotModified to check whether the response
17896// error from Do is the result of In-None-Match.
17897func (c *GlobalAddressesGetCall) IfNoneMatch(entityTag string) *GlobalAddressesGetCall {
17898	c.ifNoneMatch_ = entityTag
17899	return c
17900}
17901
17902// Context sets the context to be used in this call's Do method. Any
17903// pending HTTP request will be aborted if the provided context is
17904// canceled.
17905func (c *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall {
17906	c.ctx_ = ctx
17907	return c
17908}
17909
17910func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) {
17911	var body io.Reader = nil
17912	c.urlParams_.Set("alt", alt)
17913	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}")
17914	urls += "?" + c.urlParams_.Encode()
17915	req, _ := http.NewRequest("GET", urls, body)
17916	googleapi.Expand(req.URL, map[string]string{
17917		"project": c.project,
17918		"address": c.address,
17919	})
17920	req.Header.Set("User-Agent", c.s.userAgent())
17921	if c.ifNoneMatch_ != "" {
17922		req.Header.Set("If-None-Match", c.ifNoneMatch_)
17923	}
17924	if c.ctx_ != nil {
17925		return ctxhttp.Do(c.ctx_, c.s.client, req)
17926	}
17927	return c.s.client.Do(req)
17928}
17929
17930// Do executes the "compute.globalAddresses.get" call.
17931// Exactly one of *Address or error will be non-nil. Any non-2xx status
17932// code is an error. Response headers are in either
17933// *Address.ServerResponse.Header or (if a response was returned at all)
17934// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17935// check whether the returned error was because http.StatusNotModified
17936// was returned.
17937func (c *GlobalAddressesGetCall) Do(opts ...googleapi.CallOption) (*Address, error) {
17938	gensupport.SetOptions(c.urlParams_, opts...)
17939	res, err := c.doRequest("json")
17940	if res != nil && res.StatusCode == http.StatusNotModified {
17941		if res.Body != nil {
17942			res.Body.Close()
17943		}
17944		return nil, &googleapi.Error{
17945			Code:   res.StatusCode,
17946			Header: res.Header,
17947		}
17948	}
17949	if err != nil {
17950		return nil, err
17951	}
17952	defer googleapi.CloseBody(res)
17953	if err := googleapi.CheckResponse(res); err != nil {
17954		return nil, err
17955	}
17956	ret := &Address{
17957		ServerResponse: googleapi.ServerResponse{
17958			Header:         res.Header,
17959			HTTPStatusCode: res.StatusCode,
17960		},
17961	}
17962	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
17963		return nil, err
17964	}
17965	return ret, nil
17966	// {
17967	//   "description": "Returns the specified address resource. Get a list of available addresses by making a list() request.",
17968	//   "httpMethod": "GET",
17969	//   "id": "compute.globalAddresses.get",
17970	//   "parameterOrder": [
17971	//     "project",
17972	//     "address"
17973	//   ],
17974	//   "parameters": {
17975	//     "address": {
17976	//       "description": "Name of the address resource to return.",
17977	//       "location": "path",
17978	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
17979	//       "required": true,
17980	//       "type": "string"
17981	//     },
17982	//     "project": {
17983	//       "description": "Project ID for this request.",
17984	//       "location": "path",
17985	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
17986	//       "required": true,
17987	//       "type": "string"
17988	//     }
17989	//   },
17990	//   "path": "{project}/global/addresses/{address}",
17991	//   "response": {
17992	//     "$ref": "Address"
17993	//   },
17994	//   "scopes": [
17995	//     "https://www.googleapis.com/auth/cloud-platform",
17996	//     "https://www.googleapis.com/auth/compute",
17997	//     "https://www.googleapis.com/auth/compute.readonly"
17998	//   ]
17999	// }
18000
18001}
18002
18003// method id "compute.globalAddresses.insert":
18004
18005type GlobalAddressesInsertCall struct {
18006	s          *Service
18007	project    string
18008	address    *Address
18009	urlParams_ gensupport.URLParams
18010	ctx_       context.Context
18011}
18012
18013// Insert: Creates an address resource in the specified project using
18014// the data included in the request.
18015// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/insert
18016func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall {
18017	c := &GlobalAddressesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18018	c.project = project
18019	c.address = address
18020	return c
18021}
18022
18023// Fields allows partial responses to be retrieved. See
18024// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18025// for more information.
18026func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall {
18027	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18028	return c
18029}
18030
18031// Context sets the context to be used in this call's Do method. Any
18032// pending HTTP request will be aborted if the provided context is
18033// canceled.
18034func (c *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall {
18035	c.ctx_ = ctx
18036	return c
18037}
18038
18039func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) {
18040	var body io.Reader = nil
18041	body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
18042	if err != nil {
18043		return nil, err
18044	}
18045	ctype := "application/json"
18046	c.urlParams_.Set("alt", alt)
18047	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses")
18048	urls += "?" + c.urlParams_.Encode()
18049	req, _ := http.NewRequest("POST", urls, body)
18050	googleapi.Expand(req.URL, map[string]string{
18051		"project": c.project,
18052	})
18053	req.Header.Set("Content-Type", ctype)
18054	req.Header.Set("User-Agent", c.s.userAgent())
18055	if c.ctx_ != nil {
18056		return ctxhttp.Do(c.ctx_, c.s.client, req)
18057	}
18058	return c.s.client.Do(req)
18059}
18060
18061// Do executes the "compute.globalAddresses.insert" call.
18062// Exactly one of *Operation or error will be non-nil. Any non-2xx
18063// status code is an error. Response headers are in either
18064// *Operation.ServerResponse.Header or (if a response was returned at
18065// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18066// to check whether the returned error was because
18067// http.StatusNotModified was returned.
18068func (c *GlobalAddressesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18069	gensupport.SetOptions(c.urlParams_, opts...)
18070	res, err := c.doRequest("json")
18071	if res != nil && res.StatusCode == http.StatusNotModified {
18072		if res.Body != nil {
18073			res.Body.Close()
18074		}
18075		return nil, &googleapi.Error{
18076			Code:   res.StatusCode,
18077			Header: res.Header,
18078		}
18079	}
18080	if err != nil {
18081		return nil, err
18082	}
18083	defer googleapi.CloseBody(res)
18084	if err := googleapi.CheckResponse(res); err != nil {
18085		return nil, err
18086	}
18087	ret := &Operation{
18088		ServerResponse: googleapi.ServerResponse{
18089			Header:         res.Header,
18090			HTTPStatusCode: res.StatusCode,
18091		},
18092	}
18093	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18094		return nil, err
18095	}
18096	return ret, nil
18097	// {
18098	//   "description": "Creates an address resource in the specified project using the data included in the request.",
18099	//   "httpMethod": "POST",
18100	//   "id": "compute.globalAddresses.insert",
18101	//   "parameterOrder": [
18102	//     "project"
18103	//   ],
18104	//   "parameters": {
18105	//     "project": {
18106	//       "description": "Project ID for this request.",
18107	//       "location": "path",
18108	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18109	//       "required": true,
18110	//       "type": "string"
18111	//     }
18112	//   },
18113	//   "path": "{project}/global/addresses",
18114	//   "request": {
18115	//     "$ref": "Address"
18116	//   },
18117	//   "response": {
18118	//     "$ref": "Operation"
18119	//   },
18120	//   "scopes": [
18121	//     "https://www.googleapis.com/auth/cloud-platform",
18122	//     "https://www.googleapis.com/auth/compute"
18123	//   ]
18124	// }
18125
18126}
18127
18128// method id "compute.globalAddresses.list":
18129
18130type GlobalAddressesListCall struct {
18131	s            *Service
18132	project      string
18133	urlParams_   gensupport.URLParams
18134	ifNoneMatch_ string
18135	ctx_         context.Context
18136}
18137
18138// List: Retrieves a list of global addresses.
18139// For details, see https://cloud.google.com/compute/docs/reference/latest/globalAddresses/list
18140func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall {
18141	c := &GlobalAddressesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18142	c.project = project
18143	return c
18144}
18145
18146// Filter sets the optional parameter "filter": Sets a filter expression
18147// for filtering listed resources, in the form filter={expression}. Your
18148// {expression} must be in the format: field_name comparison_string
18149// literal_string.
18150//
18151// The field_name is the name of the field you want to compare. Only
18152// atomic field types are supported (string, number, boolean). The
18153// comparison_string must be either eq (equals) or ne (not equals). The
18154// literal_string is the string value to filter to. The literal value
18155// must be valid for the type of field you are filtering by (string,
18156// number, boolean). For string fields, the literal value is interpreted
18157// as a regular expression using RE2 syntax. The literal value must
18158// match the entire field.
18159//
18160// For example, to filter for instances that do not have a name of
18161// example-instance, you would use filter=name ne
18162// example-instance.
18163//
18164// Compute Engine Beta API Only: If you use filtering in the Beta API,
18165// you can also filter on nested fields. For example, you could filter
18166// on instances that have set the scheduling.automaticRestart field to
18167// true. In particular, use filtering on nested fields to take advantage
18168// of instance labels to organize and filter results based on label
18169// values.
18170//
18171// The Beta API also supports filtering on multiple expressions by
18172// providing each separate expression within parentheses. For example,
18173// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
18174// Multiple expressions are treated as AND expressions, meaning that
18175// resources must match all expressions to pass the filters.
18176func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall {
18177	c.urlParams_.Set("filter", filter)
18178	return c
18179}
18180
18181// MaxResults sets the optional parameter "maxResults": The maximum
18182// number of results per page that should be returned. If the number of
18183// available results is larger than maxResults, Compute Engine returns a
18184// nextPageToken that can be used to get the next page of results in
18185// subsequent list requests.
18186func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall {
18187	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18188	return c
18189}
18190
18191// OrderBy sets the optional parameter "orderBy": Sorts list results by
18192// a certain order. By default, results are returned in alphanumerical
18193// order based on the resource name.
18194//
18195// You can also sort results in descending order based on the creation
18196// timestamp using orderBy="creationTimestamp desc". This sorts results
18197// based on the creationTimestamp field in reverse chronological order
18198// (newest result first). Use this to sort resources like operations so
18199// that the newest operation is returned first.
18200//
18201// Currently, only sorting by name or creationTimestamp desc is
18202// supported.
18203func (c *GlobalAddressesListCall) OrderBy(orderBy string) *GlobalAddressesListCall {
18204	c.urlParams_.Set("orderBy", orderBy)
18205	return c
18206}
18207
18208// PageToken sets the optional parameter "pageToken": Specifies a page
18209// token to use. Set pageToken to the nextPageToken returned by a
18210// previous list request to get the next page of results.
18211func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall {
18212	c.urlParams_.Set("pageToken", pageToken)
18213	return c
18214}
18215
18216// Fields allows partial responses to be retrieved. See
18217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18218// for more information.
18219func (c *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall {
18220	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18221	return c
18222}
18223
18224// IfNoneMatch sets the optional parameter which makes the operation
18225// fail if the object's ETag matches the given value. This is useful for
18226// getting updates only after the object has changed since the last
18227// request. Use googleapi.IsNotModified to check whether the response
18228// error from Do is the result of In-None-Match.
18229func (c *GlobalAddressesListCall) IfNoneMatch(entityTag string) *GlobalAddressesListCall {
18230	c.ifNoneMatch_ = entityTag
18231	return c
18232}
18233
18234// Context sets the context to be used in this call's Do method. Any
18235// pending HTTP request will be aborted if the provided context is
18236// canceled.
18237func (c *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall {
18238	c.ctx_ = ctx
18239	return c
18240}
18241
18242func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) {
18243	var body io.Reader = nil
18244	c.urlParams_.Set("alt", alt)
18245	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses")
18246	urls += "?" + c.urlParams_.Encode()
18247	req, _ := http.NewRequest("GET", urls, body)
18248	googleapi.Expand(req.URL, map[string]string{
18249		"project": c.project,
18250	})
18251	req.Header.Set("User-Agent", c.s.userAgent())
18252	if c.ifNoneMatch_ != "" {
18253		req.Header.Set("If-None-Match", c.ifNoneMatch_)
18254	}
18255	if c.ctx_ != nil {
18256		return ctxhttp.Do(c.ctx_, c.s.client, req)
18257	}
18258	return c.s.client.Do(req)
18259}
18260
18261// Do executes the "compute.globalAddresses.list" call.
18262// Exactly one of *AddressList or error will be non-nil. Any non-2xx
18263// status code is an error. Response headers are in either
18264// *AddressList.ServerResponse.Header or (if a response was returned at
18265// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18266// to check whether the returned error was because
18267// http.StatusNotModified was returned.
18268func (c *GlobalAddressesListCall) Do(opts ...googleapi.CallOption) (*AddressList, error) {
18269	gensupport.SetOptions(c.urlParams_, opts...)
18270	res, err := c.doRequest("json")
18271	if res != nil && res.StatusCode == http.StatusNotModified {
18272		if res.Body != nil {
18273			res.Body.Close()
18274		}
18275		return nil, &googleapi.Error{
18276			Code:   res.StatusCode,
18277			Header: res.Header,
18278		}
18279	}
18280	if err != nil {
18281		return nil, err
18282	}
18283	defer googleapi.CloseBody(res)
18284	if err := googleapi.CheckResponse(res); err != nil {
18285		return nil, err
18286	}
18287	ret := &AddressList{
18288		ServerResponse: googleapi.ServerResponse{
18289			Header:         res.Header,
18290			HTTPStatusCode: res.StatusCode,
18291		},
18292	}
18293	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18294		return nil, err
18295	}
18296	return ret, nil
18297	// {
18298	//   "description": "Retrieves a list of global addresses.",
18299	//   "httpMethod": "GET",
18300	//   "id": "compute.globalAddresses.list",
18301	//   "parameterOrder": [
18302	//     "project"
18303	//   ],
18304	//   "parameters": {
18305	//     "filter": {
18306	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
18307	//       "location": "query",
18308	//       "type": "string"
18309	//     },
18310	//     "maxResults": {
18311	//       "default": "500",
18312	//       "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.",
18313	//       "format": "uint32",
18314	//       "location": "query",
18315	//       "maximum": "500",
18316	//       "minimum": "0",
18317	//       "type": "integer"
18318	//     },
18319	//     "orderBy": {
18320	//       "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.",
18321	//       "location": "query",
18322	//       "type": "string"
18323	//     },
18324	//     "pageToken": {
18325	//       "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.",
18326	//       "location": "query",
18327	//       "type": "string"
18328	//     },
18329	//     "project": {
18330	//       "description": "Project ID for this request.",
18331	//       "location": "path",
18332	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18333	//       "required": true,
18334	//       "type": "string"
18335	//     }
18336	//   },
18337	//   "path": "{project}/global/addresses",
18338	//   "response": {
18339	//     "$ref": "AddressList"
18340	//   },
18341	//   "scopes": [
18342	//     "https://www.googleapis.com/auth/cloud-platform",
18343	//     "https://www.googleapis.com/auth/compute",
18344	//     "https://www.googleapis.com/auth/compute.readonly"
18345	//   ]
18346	// }
18347
18348}
18349
18350// Pages invokes f for each page of results.
18351// A non-nil error returned from f will halt the iteration.
18352// The provided context supersedes any context provided to the Context method.
18353func (c *GlobalAddressesListCall) Pages(ctx context.Context, f func(*AddressList) error) error {
18354	c.ctx_ = ctx
18355	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18356	for {
18357		x, err := c.Do()
18358		if err != nil {
18359			return err
18360		}
18361		if err := f(x); err != nil {
18362			return err
18363		}
18364		if x.NextPageToken == "" {
18365			return nil
18366		}
18367		c.PageToken(x.NextPageToken)
18368	}
18369}
18370
18371// method id "compute.globalAddresses.testIamPermissions":
18372
18373type GlobalAddressesTestIamPermissionsCall struct {
18374	s                      *Service
18375	project                string
18376	resource               string
18377	testpermissionsrequest *TestPermissionsRequest
18378	urlParams_             gensupport.URLParams
18379	ctx_                   context.Context
18380}
18381
18382// TestIamPermissions: Returns permissions that a caller has on the
18383// specified resource.
18384func (r *GlobalAddressesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalAddressesTestIamPermissionsCall {
18385	c := &GlobalAddressesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18386	c.project = project
18387	c.resource = resource
18388	c.testpermissionsrequest = testpermissionsrequest
18389	return c
18390}
18391
18392// Fields allows partial responses to be retrieved. See
18393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18394// for more information.
18395func (c *GlobalAddressesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalAddressesTestIamPermissionsCall {
18396	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18397	return c
18398}
18399
18400// Context sets the context to be used in this call's Do method. Any
18401// pending HTTP request will be aborted if the provided context is
18402// canceled.
18403func (c *GlobalAddressesTestIamPermissionsCall) Context(ctx context.Context) *GlobalAddressesTestIamPermissionsCall {
18404	c.ctx_ = ctx
18405	return c
18406}
18407
18408func (c *GlobalAddressesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
18409	var body io.Reader = nil
18410	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
18411	if err != nil {
18412		return nil, err
18413	}
18414	ctype := "application/json"
18415	c.urlParams_.Set("alt", alt)
18416	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{resource}/testIamPermissions")
18417	urls += "?" + c.urlParams_.Encode()
18418	req, _ := http.NewRequest("POST", urls, body)
18419	googleapi.Expand(req.URL, map[string]string{
18420		"project":  c.project,
18421		"resource": c.resource,
18422	})
18423	req.Header.Set("Content-Type", ctype)
18424	req.Header.Set("User-Agent", c.s.userAgent())
18425	if c.ctx_ != nil {
18426		return ctxhttp.Do(c.ctx_, c.s.client, req)
18427	}
18428	return c.s.client.Do(req)
18429}
18430
18431// Do executes the "compute.globalAddresses.testIamPermissions" call.
18432// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
18433// non-2xx status code is an error. Response headers are in either
18434// *TestPermissionsResponse.ServerResponse.Header or (if a response was
18435// returned at all) in error.(*googleapi.Error).Header. Use
18436// googleapi.IsNotModified to check whether the returned error was
18437// because http.StatusNotModified was returned.
18438func (c *GlobalAddressesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
18439	gensupport.SetOptions(c.urlParams_, opts...)
18440	res, err := c.doRequest("json")
18441	if res != nil && res.StatusCode == http.StatusNotModified {
18442		if res.Body != nil {
18443			res.Body.Close()
18444		}
18445		return nil, &googleapi.Error{
18446			Code:   res.StatusCode,
18447			Header: res.Header,
18448		}
18449	}
18450	if err != nil {
18451		return nil, err
18452	}
18453	defer googleapi.CloseBody(res)
18454	if err := googleapi.CheckResponse(res); err != nil {
18455		return nil, err
18456	}
18457	ret := &TestPermissionsResponse{
18458		ServerResponse: googleapi.ServerResponse{
18459			Header:         res.Header,
18460			HTTPStatusCode: res.StatusCode,
18461		},
18462	}
18463	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18464		return nil, err
18465	}
18466	return ret, nil
18467	// {
18468	//   "description": "Returns permissions that a caller has on the specified resource.",
18469	//   "httpMethod": "POST",
18470	//   "id": "compute.globalAddresses.testIamPermissions",
18471	//   "parameterOrder": [
18472	//     "project",
18473	//     "resource"
18474	//   ],
18475	//   "parameters": {
18476	//     "project": {
18477	//       "description": "Project ID for this request.",
18478	//       "location": "path",
18479	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18480	//       "required": true,
18481	//       "type": "string"
18482	//     },
18483	//     "resource": {
18484	//       "description": "Name of the resource for this request.",
18485	//       "location": "path",
18486	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
18487	//       "required": true,
18488	//       "type": "string"
18489	//     }
18490	//   },
18491	//   "path": "{project}/global/addresses/{resource}/testIamPermissions",
18492	//   "request": {
18493	//     "$ref": "TestPermissionsRequest"
18494	//   },
18495	//   "response": {
18496	//     "$ref": "TestPermissionsResponse"
18497	//   },
18498	//   "scopes": [
18499	//     "https://www.googleapis.com/auth/cloud-platform",
18500	//     "https://www.googleapis.com/auth/compute",
18501	//     "https://www.googleapis.com/auth/compute.readonly"
18502	//   ]
18503	// }
18504
18505}
18506
18507// method id "compute.globalForwardingRules.delete":
18508
18509type GlobalForwardingRulesDeleteCall struct {
18510	s              *Service
18511	project        string
18512	forwardingRule string
18513	urlParams_     gensupport.URLParams
18514	ctx_           context.Context
18515}
18516
18517// Delete: Deletes the specified ForwardingRule resource.
18518// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/delete
18519func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall {
18520	c := &GlobalForwardingRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18521	c.project = project
18522	c.forwardingRule = forwardingRule
18523	return c
18524}
18525
18526// Fields allows partial responses to be retrieved. See
18527// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18528// for more information.
18529func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall {
18530	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18531	return c
18532}
18533
18534// Context sets the context to be used in this call's Do method. Any
18535// pending HTTP request will be aborted if the provided context is
18536// canceled.
18537func (c *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall {
18538	c.ctx_ = ctx
18539	return c
18540}
18541
18542func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
18543	var body io.Reader = nil
18544	c.urlParams_.Set("alt", alt)
18545	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}")
18546	urls += "?" + c.urlParams_.Encode()
18547	req, _ := http.NewRequest("DELETE", urls, body)
18548	googleapi.Expand(req.URL, map[string]string{
18549		"project":        c.project,
18550		"forwardingRule": c.forwardingRule,
18551	})
18552	req.Header.Set("User-Agent", c.s.userAgent())
18553	if c.ctx_ != nil {
18554		return ctxhttp.Do(c.ctx_, c.s.client, req)
18555	}
18556	return c.s.client.Do(req)
18557}
18558
18559// Do executes the "compute.globalForwardingRules.delete" call.
18560// Exactly one of *Operation or error will be non-nil. Any non-2xx
18561// status code is an error. Response headers are in either
18562// *Operation.ServerResponse.Header or (if a response was returned at
18563// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18564// to check whether the returned error was because
18565// http.StatusNotModified was returned.
18566func (c *GlobalForwardingRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18567	gensupport.SetOptions(c.urlParams_, opts...)
18568	res, err := c.doRequest("json")
18569	if res != nil && res.StatusCode == http.StatusNotModified {
18570		if res.Body != nil {
18571			res.Body.Close()
18572		}
18573		return nil, &googleapi.Error{
18574			Code:   res.StatusCode,
18575			Header: res.Header,
18576		}
18577	}
18578	if err != nil {
18579		return nil, err
18580	}
18581	defer googleapi.CloseBody(res)
18582	if err := googleapi.CheckResponse(res); err != nil {
18583		return nil, err
18584	}
18585	ret := &Operation{
18586		ServerResponse: googleapi.ServerResponse{
18587			Header:         res.Header,
18588			HTTPStatusCode: res.StatusCode,
18589		},
18590	}
18591	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18592		return nil, err
18593	}
18594	return ret, nil
18595	// {
18596	//   "description": "Deletes the specified ForwardingRule resource.",
18597	//   "httpMethod": "DELETE",
18598	//   "id": "compute.globalForwardingRules.delete",
18599	//   "parameterOrder": [
18600	//     "project",
18601	//     "forwardingRule"
18602	//   ],
18603	//   "parameters": {
18604	//     "forwardingRule": {
18605	//       "description": "Name of the ForwardingRule resource to delete.",
18606	//       "location": "path",
18607	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18608	//       "required": true,
18609	//       "type": "string"
18610	//     },
18611	//     "project": {
18612	//       "description": "Project ID for this request.",
18613	//       "location": "path",
18614	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18615	//       "required": true,
18616	//       "type": "string"
18617	//     }
18618	//   },
18619	//   "path": "{project}/global/forwardingRules/{forwardingRule}",
18620	//   "response": {
18621	//     "$ref": "Operation"
18622	//   },
18623	//   "scopes": [
18624	//     "https://www.googleapis.com/auth/cloud-platform",
18625	//     "https://www.googleapis.com/auth/compute"
18626	//   ]
18627	// }
18628
18629}
18630
18631// method id "compute.globalForwardingRules.get":
18632
18633type GlobalForwardingRulesGetCall struct {
18634	s              *Service
18635	project        string
18636	forwardingRule string
18637	urlParams_     gensupport.URLParams
18638	ifNoneMatch_   string
18639	ctx_           context.Context
18640}
18641
18642// Get: Returns the specified ForwardingRule resource. Get a list of
18643// available forwarding rules by making a list() request.
18644// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/get
18645func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall {
18646	c := &GlobalForwardingRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18647	c.project = project
18648	c.forwardingRule = forwardingRule
18649	return c
18650}
18651
18652// Fields allows partial responses to be retrieved. See
18653// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18654// for more information.
18655func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall {
18656	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18657	return c
18658}
18659
18660// IfNoneMatch sets the optional parameter which makes the operation
18661// fail if the object's ETag matches the given value. This is useful for
18662// getting updates only after the object has changed since the last
18663// request. Use googleapi.IsNotModified to check whether the response
18664// error from Do is the result of In-None-Match.
18665func (c *GlobalForwardingRulesGetCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesGetCall {
18666	c.ifNoneMatch_ = entityTag
18667	return c
18668}
18669
18670// Context sets the context to be used in this call's Do method. Any
18671// pending HTTP request will be aborted if the provided context is
18672// canceled.
18673func (c *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall {
18674	c.ctx_ = ctx
18675	return c
18676}
18677
18678func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
18679	var body io.Reader = nil
18680	c.urlParams_.Set("alt", alt)
18681	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}")
18682	urls += "?" + c.urlParams_.Encode()
18683	req, _ := http.NewRequest("GET", urls, body)
18684	googleapi.Expand(req.URL, map[string]string{
18685		"project":        c.project,
18686		"forwardingRule": c.forwardingRule,
18687	})
18688	req.Header.Set("User-Agent", c.s.userAgent())
18689	if c.ifNoneMatch_ != "" {
18690		req.Header.Set("If-None-Match", c.ifNoneMatch_)
18691	}
18692	if c.ctx_ != nil {
18693		return ctxhttp.Do(c.ctx_, c.s.client, req)
18694	}
18695	return c.s.client.Do(req)
18696}
18697
18698// Do executes the "compute.globalForwardingRules.get" call.
18699// Exactly one of *ForwardingRule or error will be non-nil. Any non-2xx
18700// status code is an error. Response headers are in either
18701// *ForwardingRule.ServerResponse.Header or (if a response was returned
18702// at all) in error.(*googleapi.Error).Header. Use
18703// googleapi.IsNotModified to check whether the returned error was
18704// because http.StatusNotModified was returned.
18705func (c *GlobalForwardingRulesGetCall) Do(opts ...googleapi.CallOption) (*ForwardingRule, error) {
18706	gensupport.SetOptions(c.urlParams_, opts...)
18707	res, err := c.doRequest("json")
18708	if res != nil && res.StatusCode == http.StatusNotModified {
18709		if res.Body != nil {
18710			res.Body.Close()
18711		}
18712		return nil, &googleapi.Error{
18713			Code:   res.StatusCode,
18714			Header: res.Header,
18715		}
18716	}
18717	if err != nil {
18718		return nil, err
18719	}
18720	defer googleapi.CloseBody(res)
18721	if err := googleapi.CheckResponse(res); err != nil {
18722		return nil, err
18723	}
18724	ret := &ForwardingRule{
18725		ServerResponse: googleapi.ServerResponse{
18726			Header:         res.Header,
18727			HTTPStatusCode: res.StatusCode,
18728		},
18729	}
18730	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18731		return nil, err
18732	}
18733	return ret, nil
18734	// {
18735	//   "description": "Returns the specified ForwardingRule resource. Get a list of available forwarding rules by making a list() request.",
18736	//   "httpMethod": "GET",
18737	//   "id": "compute.globalForwardingRules.get",
18738	//   "parameterOrder": [
18739	//     "project",
18740	//     "forwardingRule"
18741	//   ],
18742	//   "parameters": {
18743	//     "forwardingRule": {
18744	//       "description": "Name of the ForwardingRule resource to return.",
18745	//       "location": "path",
18746	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
18747	//       "required": true,
18748	//       "type": "string"
18749	//     },
18750	//     "project": {
18751	//       "description": "Project ID for this request.",
18752	//       "location": "path",
18753	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18754	//       "required": true,
18755	//       "type": "string"
18756	//     }
18757	//   },
18758	//   "path": "{project}/global/forwardingRules/{forwardingRule}",
18759	//   "response": {
18760	//     "$ref": "ForwardingRule"
18761	//   },
18762	//   "scopes": [
18763	//     "https://www.googleapis.com/auth/cloud-platform",
18764	//     "https://www.googleapis.com/auth/compute",
18765	//     "https://www.googleapis.com/auth/compute.readonly"
18766	//   ]
18767	// }
18768
18769}
18770
18771// method id "compute.globalForwardingRules.insert":
18772
18773type GlobalForwardingRulesInsertCall struct {
18774	s              *Service
18775	project        string
18776	forwardingrule *ForwardingRule
18777	urlParams_     gensupport.URLParams
18778	ctx_           context.Context
18779}
18780
18781// Insert: Creates a ForwardingRule resource in the specified project
18782// and region using the data included in the request.
18783// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/insert
18784func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall {
18785	c := &GlobalForwardingRulesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18786	c.project = project
18787	c.forwardingrule = forwardingrule
18788	return c
18789}
18790
18791// Fields allows partial responses to be retrieved. See
18792// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18793// for more information.
18794func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall {
18795	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18796	return c
18797}
18798
18799// Context sets the context to be used in this call's Do method. Any
18800// pending HTTP request will be aborted if the provided context is
18801// canceled.
18802func (c *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall {
18803	c.ctx_ = ctx
18804	return c
18805}
18806
18807func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
18808	var body io.Reader = nil
18809	body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
18810	if err != nil {
18811		return nil, err
18812	}
18813	ctype := "application/json"
18814	c.urlParams_.Set("alt", alt)
18815	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules")
18816	urls += "?" + c.urlParams_.Encode()
18817	req, _ := http.NewRequest("POST", urls, body)
18818	googleapi.Expand(req.URL, map[string]string{
18819		"project": c.project,
18820	})
18821	req.Header.Set("Content-Type", ctype)
18822	req.Header.Set("User-Agent", c.s.userAgent())
18823	if c.ctx_ != nil {
18824		return ctxhttp.Do(c.ctx_, c.s.client, req)
18825	}
18826	return c.s.client.Do(req)
18827}
18828
18829// Do executes the "compute.globalForwardingRules.insert" call.
18830// Exactly one of *Operation or error will be non-nil. Any non-2xx
18831// status code is an error. Response headers are in either
18832// *Operation.ServerResponse.Header or (if a response was returned at
18833// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18834// to check whether the returned error was because
18835// http.StatusNotModified was returned.
18836func (c *GlobalForwardingRulesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18837	gensupport.SetOptions(c.urlParams_, opts...)
18838	res, err := c.doRequest("json")
18839	if res != nil && res.StatusCode == http.StatusNotModified {
18840		if res.Body != nil {
18841			res.Body.Close()
18842		}
18843		return nil, &googleapi.Error{
18844			Code:   res.StatusCode,
18845			Header: res.Header,
18846		}
18847	}
18848	if err != nil {
18849		return nil, err
18850	}
18851	defer googleapi.CloseBody(res)
18852	if err := googleapi.CheckResponse(res); err != nil {
18853		return nil, err
18854	}
18855	ret := &Operation{
18856		ServerResponse: googleapi.ServerResponse{
18857			Header:         res.Header,
18858			HTTPStatusCode: res.StatusCode,
18859		},
18860	}
18861	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
18862		return nil, err
18863	}
18864	return ret, nil
18865	// {
18866	//   "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.",
18867	//   "httpMethod": "POST",
18868	//   "id": "compute.globalForwardingRules.insert",
18869	//   "parameterOrder": [
18870	//     "project"
18871	//   ],
18872	//   "parameters": {
18873	//     "project": {
18874	//       "description": "Project ID for this request.",
18875	//       "location": "path",
18876	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
18877	//       "required": true,
18878	//       "type": "string"
18879	//     }
18880	//   },
18881	//   "path": "{project}/global/forwardingRules",
18882	//   "request": {
18883	//     "$ref": "ForwardingRule"
18884	//   },
18885	//   "response": {
18886	//     "$ref": "Operation"
18887	//   },
18888	//   "scopes": [
18889	//     "https://www.googleapis.com/auth/cloud-platform",
18890	//     "https://www.googleapis.com/auth/compute"
18891	//   ]
18892	// }
18893
18894}
18895
18896// method id "compute.globalForwardingRules.list":
18897
18898type GlobalForwardingRulesListCall struct {
18899	s            *Service
18900	project      string
18901	urlParams_   gensupport.URLParams
18902	ifNoneMatch_ string
18903	ctx_         context.Context
18904}
18905
18906// List: Retrieves a list of ForwardingRule resources available to the
18907// specified project.
18908// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/list
18909func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall {
18910	c := &GlobalForwardingRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18911	c.project = project
18912	return c
18913}
18914
18915// Filter sets the optional parameter "filter": Sets a filter expression
18916// for filtering listed resources, in the form filter={expression}. Your
18917// {expression} must be in the format: field_name comparison_string
18918// literal_string.
18919//
18920// The field_name is the name of the field you want to compare. Only
18921// atomic field types are supported (string, number, boolean). The
18922// comparison_string must be either eq (equals) or ne (not equals). The
18923// literal_string is the string value to filter to. The literal value
18924// must be valid for the type of field you are filtering by (string,
18925// number, boolean). For string fields, the literal value is interpreted
18926// as a regular expression using RE2 syntax. The literal value must
18927// match the entire field.
18928//
18929// For example, to filter for instances that do not have a name of
18930// example-instance, you would use filter=name ne
18931// example-instance.
18932//
18933// Compute Engine Beta API Only: If you use filtering in the Beta API,
18934// you can also filter on nested fields. For example, you could filter
18935// on instances that have set the scheduling.automaticRestart field to
18936// true. In particular, use filtering on nested fields to take advantage
18937// of instance labels to organize and filter results based on label
18938// values.
18939//
18940// The Beta API also supports filtering on multiple expressions by
18941// providing each separate expression within parentheses. For example,
18942// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
18943// Multiple expressions are treated as AND expressions, meaning that
18944// resources must match all expressions to pass the filters.
18945func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall {
18946	c.urlParams_.Set("filter", filter)
18947	return c
18948}
18949
18950// MaxResults sets the optional parameter "maxResults": The maximum
18951// number of results per page that should be returned. If the number of
18952// available results is larger than maxResults, Compute Engine returns a
18953// nextPageToken that can be used to get the next page of results in
18954// subsequent list requests.
18955func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall {
18956	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
18957	return c
18958}
18959
18960// OrderBy sets the optional parameter "orderBy": Sorts list results by
18961// a certain order. By default, results are returned in alphanumerical
18962// order based on the resource name.
18963//
18964// You can also sort results in descending order based on the creation
18965// timestamp using orderBy="creationTimestamp desc". This sorts results
18966// based on the creationTimestamp field in reverse chronological order
18967// (newest result first). Use this to sort resources like operations so
18968// that the newest operation is returned first.
18969//
18970// Currently, only sorting by name or creationTimestamp desc is
18971// supported.
18972func (c *GlobalForwardingRulesListCall) OrderBy(orderBy string) *GlobalForwardingRulesListCall {
18973	c.urlParams_.Set("orderBy", orderBy)
18974	return c
18975}
18976
18977// PageToken sets the optional parameter "pageToken": Specifies a page
18978// token to use. Set pageToken to the nextPageToken returned by a
18979// previous list request to get the next page of results.
18980func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall {
18981	c.urlParams_.Set("pageToken", pageToken)
18982	return c
18983}
18984
18985// Fields allows partial responses to be retrieved. See
18986// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18987// for more information.
18988func (c *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall {
18989	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18990	return c
18991}
18992
18993// IfNoneMatch sets the optional parameter which makes the operation
18994// fail if the object's ETag matches the given value. This is useful for
18995// getting updates only after the object has changed since the last
18996// request. Use googleapi.IsNotModified to check whether the response
18997// error from Do is the result of In-None-Match.
18998func (c *GlobalForwardingRulesListCall) IfNoneMatch(entityTag string) *GlobalForwardingRulesListCall {
18999	c.ifNoneMatch_ = entityTag
19000	return c
19001}
19002
19003// Context sets the context to be used in this call's Do method. Any
19004// pending HTTP request will be aborted if the provided context is
19005// canceled.
19006func (c *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall {
19007	c.ctx_ = ctx
19008	return c
19009}
19010
19011func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
19012	var body io.Reader = nil
19013	c.urlParams_.Set("alt", alt)
19014	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules")
19015	urls += "?" + c.urlParams_.Encode()
19016	req, _ := http.NewRequest("GET", urls, body)
19017	googleapi.Expand(req.URL, map[string]string{
19018		"project": c.project,
19019	})
19020	req.Header.Set("User-Agent", c.s.userAgent())
19021	if c.ifNoneMatch_ != "" {
19022		req.Header.Set("If-None-Match", c.ifNoneMatch_)
19023	}
19024	if c.ctx_ != nil {
19025		return ctxhttp.Do(c.ctx_, c.s.client, req)
19026	}
19027	return c.s.client.Do(req)
19028}
19029
19030// Do executes the "compute.globalForwardingRules.list" call.
19031// Exactly one of *ForwardingRuleList or error will be non-nil. Any
19032// non-2xx status code is an error. Response headers are in either
19033// *ForwardingRuleList.ServerResponse.Header or (if a response was
19034// returned at all) in error.(*googleapi.Error).Header. Use
19035// googleapi.IsNotModified to check whether the returned error was
19036// because http.StatusNotModified was returned.
19037func (c *GlobalForwardingRulesListCall) Do(opts ...googleapi.CallOption) (*ForwardingRuleList, error) {
19038	gensupport.SetOptions(c.urlParams_, opts...)
19039	res, err := c.doRequest("json")
19040	if res != nil && res.StatusCode == http.StatusNotModified {
19041		if res.Body != nil {
19042			res.Body.Close()
19043		}
19044		return nil, &googleapi.Error{
19045			Code:   res.StatusCode,
19046			Header: res.Header,
19047		}
19048	}
19049	if err != nil {
19050		return nil, err
19051	}
19052	defer googleapi.CloseBody(res)
19053	if err := googleapi.CheckResponse(res); err != nil {
19054		return nil, err
19055	}
19056	ret := &ForwardingRuleList{
19057		ServerResponse: googleapi.ServerResponse{
19058			Header:         res.Header,
19059			HTTPStatusCode: res.StatusCode,
19060		},
19061	}
19062	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19063		return nil, err
19064	}
19065	return ret, nil
19066	// {
19067	//   "description": "Retrieves a list of ForwardingRule resources available to the specified project.",
19068	//   "httpMethod": "GET",
19069	//   "id": "compute.globalForwardingRules.list",
19070	//   "parameterOrder": [
19071	//     "project"
19072	//   ],
19073	//   "parameters": {
19074	//     "filter": {
19075	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
19076	//       "location": "query",
19077	//       "type": "string"
19078	//     },
19079	//     "maxResults": {
19080	//       "default": "500",
19081	//       "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.",
19082	//       "format": "uint32",
19083	//       "location": "query",
19084	//       "maximum": "500",
19085	//       "minimum": "0",
19086	//       "type": "integer"
19087	//     },
19088	//     "orderBy": {
19089	//       "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.",
19090	//       "location": "query",
19091	//       "type": "string"
19092	//     },
19093	//     "pageToken": {
19094	//       "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.",
19095	//       "location": "query",
19096	//       "type": "string"
19097	//     },
19098	//     "project": {
19099	//       "description": "Project ID for this request.",
19100	//       "location": "path",
19101	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19102	//       "required": true,
19103	//       "type": "string"
19104	//     }
19105	//   },
19106	//   "path": "{project}/global/forwardingRules",
19107	//   "response": {
19108	//     "$ref": "ForwardingRuleList"
19109	//   },
19110	//   "scopes": [
19111	//     "https://www.googleapis.com/auth/cloud-platform",
19112	//     "https://www.googleapis.com/auth/compute",
19113	//     "https://www.googleapis.com/auth/compute.readonly"
19114	//   ]
19115	// }
19116
19117}
19118
19119// Pages invokes f for each page of results.
19120// A non-nil error returned from f will halt the iteration.
19121// The provided context supersedes any context provided to the Context method.
19122func (c *GlobalForwardingRulesListCall) Pages(ctx context.Context, f func(*ForwardingRuleList) error) error {
19123	c.ctx_ = ctx
19124	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19125	for {
19126		x, err := c.Do()
19127		if err != nil {
19128			return err
19129		}
19130		if err := f(x); err != nil {
19131			return err
19132		}
19133		if x.NextPageToken == "" {
19134			return nil
19135		}
19136		c.PageToken(x.NextPageToken)
19137	}
19138}
19139
19140// method id "compute.globalForwardingRules.setTarget":
19141
19142type GlobalForwardingRulesSetTargetCall struct {
19143	s               *Service
19144	project         string
19145	forwardingRule  string
19146	targetreference *TargetReference
19147	urlParams_      gensupport.URLParams
19148	ctx_            context.Context
19149}
19150
19151// SetTarget: Changes target URL for forwarding rule. The new target
19152// should be of the same type as the old target.
19153// For details, see https://cloud.google.com/compute/docs/reference/latest/globalForwardingRules/setTarget
19154func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall {
19155	c := &GlobalForwardingRulesSetTargetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19156	c.project = project
19157	c.forwardingRule = forwardingRule
19158	c.targetreference = targetreference
19159	return c
19160}
19161
19162// Fields allows partial responses to be retrieved. See
19163// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19164// for more information.
19165func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall {
19166	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19167	return c
19168}
19169
19170// Context sets the context to be used in this call's Do method. Any
19171// pending HTTP request will be aborted if the provided context is
19172// canceled.
19173func (c *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall {
19174	c.ctx_ = ctx
19175	return c
19176}
19177
19178func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
19179	var body io.Reader = nil
19180	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
19181	if err != nil {
19182		return nil, err
19183	}
19184	ctype := "application/json"
19185	c.urlParams_.Set("alt", alt)
19186	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget")
19187	urls += "?" + c.urlParams_.Encode()
19188	req, _ := http.NewRequest("POST", urls, body)
19189	googleapi.Expand(req.URL, map[string]string{
19190		"project":        c.project,
19191		"forwardingRule": c.forwardingRule,
19192	})
19193	req.Header.Set("Content-Type", ctype)
19194	req.Header.Set("User-Agent", c.s.userAgent())
19195	if c.ctx_ != nil {
19196		return ctxhttp.Do(c.ctx_, c.s.client, req)
19197	}
19198	return c.s.client.Do(req)
19199}
19200
19201// Do executes the "compute.globalForwardingRules.setTarget" call.
19202// Exactly one of *Operation or error will be non-nil. Any non-2xx
19203// status code is an error. Response headers are in either
19204// *Operation.ServerResponse.Header or (if a response was returned at
19205// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19206// to check whether the returned error was because
19207// http.StatusNotModified was returned.
19208func (c *GlobalForwardingRulesSetTargetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19209	gensupport.SetOptions(c.urlParams_, opts...)
19210	res, err := c.doRequest("json")
19211	if res != nil && res.StatusCode == http.StatusNotModified {
19212		if res.Body != nil {
19213			res.Body.Close()
19214		}
19215		return nil, &googleapi.Error{
19216			Code:   res.StatusCode,
19217			Header: res.Header,
19218		}
19219	}
19220	if err != nil {
19221		return nil, err
19222	}
19223	defer googleapi.CloseBody(res)
19224	if err := googleapi.CheckResponse(res); err != nil {
19225		return nil, err
19226	}
19227	ret := &Operation{
19228		ServerResponse: googleapi.ServerResponse{
19229			Header:         res.Header,
19230			HTTPStatusCode: res.StatusCode,
19231		},
19232	}
19233	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19234		return nil, err
19235	}
19236	return ret, nil
19237	// {
19238	//   "description": "Changes target URL for forwarding rule. The new target should be of the same type as the old target.",
19239	//   "httpMethod": "POST",
19240	//   "id": "compute.globalForwardingRules.setTarget",
19241	//   "parameterOrder": [
19242	//     "project",
19243	//     "forwardingRule"
19244	//   ],
19245	//   "parameters": {
19246	//     "forwardingRule": {
19247	//       "description": "Name of the ForwardingRule resource in which target is to be set.",
19248	//       "location": "path",
19249	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19250	//       "required": true,
19251	//       "type": "string"
19252	//     },
19253	//     "project": {
19254	//       "description": "Project ID for this request.",
19255	//       "location": "path",
19256	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19257	//       "required": true,
19258	//       "type": "string"
19259	//     }
19260	//   },
19261	//   "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget",
19262	//   "request": {
19263	//     "$ref": "TargetReference"
19264	//   },
19265	//   "response": {
19266	//     "$ref": "Operation"
19267	//   },
19268	//   "scopes": [
19269	//     "https://www.googleapis.com/auth/cloud-platform",
19270	//     "https://www.googleapis.com/auth/compute"
19271	//   ]
19272	// }
19273
19274}
19275
19276// method id "compute.globalForwardingRules.testIamPermissions":
19277
19278type GlobalForwardingRulesTestIamPermissionsCall struct {
19279	s                      *Service
19280	project                string
19281	resource               string
19282	testpermissionsrequest *TestPermissionsRequest
19283	urlParams_             gensupport.URLParams
19284	ctx_                   context.Context
19285}
19286
19287// TestIamPermissions: Returns permissions that a caller has on the
19288// specified resource.
19289func (r *GlobalForwardingRulesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *GlobalForwardingRulesTestIamPermissionsCall {
19290	c := &GlobalForwardingRulesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19291	c.project = project
19292	c.resource = resource
19293	c.testpermissionsrequest = testpermissionsrequest
19294	return c
19295}
19296
19297// Fields allows partial responses to be retrieved. See
19298// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19299// for more information.
19300func (c *GlobalForwardingRulesTestIamPermissionsCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesTestIamPermissionsCall {
19301	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19302	return c
19303}
19304
19305// Context sets the context to be used in this call's Do method. Any
19306// pending HTTP request will be aborted if the provided context is
19307// canceled.
19308func (c *GlobalForwardingRulesTestIamPermissionsCall) Context(ctx context.Context) *GlobalForwardingRulesTestIamPermissionsCall {
19309	c.ctx_ = ctx
19310	return c
19311}
19312
19313func (c *GlobalForwardingRulesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
19314	var body io.Reader = nil
19315	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
19316	if err != nil {
19317		return nil, err
19318	}
19319	ctype := "application/json"
19320	c.urlParams_.Set("alt", alt)
19321	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{resource}/testIamPermissions")
19322	urls += "?" + c.urlParams_.Encode()
19323	req, _ := http.NewRequest("POST", urls, body)
19324	googleapi.Expand(req.URL, map[string]string{
19325		"project":  c.project,
19326		"resource": c.resource,
19327	})
19328	req.Header.Set("Content-Type", ctype)
19329	req.Header.Set("User-Agent", c.s.userAgent())
19330	if c.ctx_ != nil {
19331		return ctxhttp.Do(c.ctx_, c.s.client, req)
19332	}
19333	return c.s.client.Do(req)
19334}
19335
19336// Do executes the "compute.globalForwardingRules.testIamPermissions" call.
19337// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
19338// non-2xx status code is an error. Response headers are in either
19339// *TestPermissionsResponse.ServerResponse.Header or (if a response was
19340// returned at all) in error.(*googleapi.Error).Header. Use
19341// googleapi.IsNotModified to check whether the returned error was
19342// because http.StatusNotModified was returned.
19343func (c *GlobalForwardingRulesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
19344	gensupport.SetOptions(c.urlParams_, opts...)
19345	res, err := c.doRequest("json")
19346	if res != nil && res.StatusCode == http.StatusNotModified {
19347		if res.Body != nil {
19348			res.Body.Close()
19349		}
19350		return nil, &googleapi.Error{
19351			Code:   res.StatusCode,
19352			Header: res.Header,
19353		}
19354	}
19355	if err != nil {
19356		return nil, err
19357	}
19358	defer googleapi.CloseBody(res)
19359	if err := googleapi.CheckResponse(res); err != nil {
19360		return nil, err
19361	}
19362	ret := &TestPermissionsResponse{
19363		ServerResponse: googleapi.ServerResponse{
19364			Header:         res.Header,
19365			HTTPStatusCode: res.StatusCode,
19366		},
19367	}
19368	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19369		return nil, err
19370	}
19371	return ret, nil
19372	// {
19373	//   "description": "Returns permissions that a caller has on the specified resource.",
19374	//   "httpMethod": "POST",
19375	//   "id": "compute.globalForwardingRules.testIamPermissions",
19376	//   "parameterOrder": [
19377	//     "project",
19378	//     "resource"
19379	//   ],
19380	//   "parameters": {
19381	//     "project": {
19382	//       "description": "Project ID for this request.",
19383	//       "location": "path",
19384	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19385	//       "required": true,
19386	//       "type": "string"
19387	//     },
19388	//     "resource": {
19389	//       "description": "Name of the resource for this request.",
19390	//       "location": "path",
19391	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
19392	//       "required": true,
19393	//       "type": "string"
19394	//     }
19395	//   },
19396	//   "path": "{project}/global/forwardingRules/{resource}/testIamPermissions",
19397	//   "request": {
19398	//     "$ref": "TestPermissionsRequest"
19399	//   },
19400	//   "response": {
19401	//     "$ref": "TestPermissionsResponse"
19402	//   },
19403	//   "scopes": [
19404	//     "https://www.googleapis.com/auth/cloud-platform",
19405	//     "https://www.googleapis.com/auth/compute",
19406	//     "https://www.googleapis.com/auth/compute.readonly"
19407	//   ]
19408	// }
19409
19410}
19411
19412// method id "compute.globalOperations.aggregatedList":
19413
19414type GlobalOperationsAggregatedListCall struct {
19415	s            *Service
19416	project      string
19417	urlParams_   gensupport.URLParams
19418	ifNoneMatch_ string
19419	ctx_         context.Context
19420}
19421
19422// AggregatedList: Retrieves an aggregated list of all operations.
19423// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/aggregatedList
19424func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall {
19425	c := &GlobalOperationsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19426	c.project = project
19427	return c
19428}
19429
19430// Filter sets the optional parameter "filter": Sets a filter expression
19431// for filtering listed resources, in the form filter={expression}. Your
19432// {expression} must be in the format: field_name comparison_string
19433// literal_string.
19434//
19435// The field_name is the name of the field you want to compare. Only
19436// atomic field types are supported (string, number, boolean). The
19437// comparison_string must be either eq (equals) or ne (not equals). The
19438// literal_string is the string value to filter to. The literal value
19439// must be valid for the type of field you are filtering by (string,
19440// number, boolean). For string fields, the literal value is interpreted
19441// as a regular expression using RE2 syntax. The literal value must
19442// match the entire field.
19443//
19444// For example, to filter for instances that do not have a name of
19445// example-instance, you would use filter=name ne
19446// example-instance.
19447//
19448// Compute Engine Beta API Only: If you use filtering in the Beta API,
19449// you can also filter on nested fields. For example, you could filter
19450// on instances that have set the scheduling.automaticRestart field to
19451// true. In particular, use filtering on nested fields to take advantage
19452// of instance labels to organize and filter results based on label
19453// values.
19454//
19455// The Beta API also supports filtering on multiple expressions by
19456// providing each separate expression within parentheses. For example,
19457// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
19458// Multiple expressions are treated as AND expressions, meaning that
19459// resources must match all expressions to pass the filters.
19460func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall {
19461	c.urlParams_.Set("filter", filter)
19462	return c
19463}
19464
19465// MaxResults sets the optional parameter "maxResults": The maximum
19466// number of results per page that should be returned. If the number of
19467// available results is larger than maxResults, Compute Engine returns a
19468// nextPageToken that can be used to get the next page of results in
19469// subsequent list requests.
19470func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall {
19471	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19472	return c
19473}
19474
19475// OrderBy sets the optional parameter "orderBy": Sorts list results by
19476// a certain order. By default, results are returned in alphanumerical
19477// order based on the resource name.
19478//
19479// You can also sort results in descending order based on the creation
19480// timestamp using orderBy="creationTimestamp desc". This sorts results
19481// based on the creationTimestamp field in reverse chronological order
19482// (newest result first). Use this to sort resources like operations so
19483// that the newest operation is returned first.
19484//
19485// Currently, only sorting by name or creationTimestamp desc is
19486// supported.
19487func (c *GlobalOperationsAggregatedListCall) OrderBy(orderBy string) *GlobalOperationsAggregatedListCall {
19488	c.urlParams_.Set("orderBy", orderBy)
19489	return c
19490}
19491
19492// PageToken sets the optional parameter "pageToken": Specifies a page
19493// token to use. Set pageToken to the nextPageToken returned by a
19494// previous list request to get the next page of results.
19495func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall {
19496	c.urlParams_.Set("pageToken", pageToken)
19497	return c
19498}
19499
19500// Fields allows partial responses to be retrieved. See
19501// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19502// for more information.
19503func (c *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall {
19504	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19505	return c
19506}
19507
19508// IfNoneMatch sets the optional parameter which makes the operation
19509// fail if the object's ETag matches the given value. This is useful for
19510// getting updates only after the object has changed since the last
19511// request. Use googleapi.IsNotModified to check whether the response
19512// error from Do is the result of In-None-Match.
19513func (c *GlobalOperationsAggregatedListCall) IfNoneMatch(entityTag string) *GlobalOperationsAggregatedListCall {
19514	c.ifNoneMatch_ = entityTag
19515	return c
19516}
19517
19518// Context sets the context to be used in this call's Do method. Any
19519// pending HTTP request will be aborted if the provided context is
19520// canceled.
19521func (c *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall {
19522	c.ctx_ = ctx
19523	return c
19524}
19525
19526func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
19527	var body io.Reader = nil
19528	c.urlParams_.Set("alt", alt)
19529	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/operations")
19530	urls += "?" + c.urlParams_.Encode()
19531	req, _ := http.NewRequest("GET", urls, body)
19532	googleapi.Expand(req.URL, map[string]string{
19533		"project": c.project,
19534	})
19535	req.Header.Set("User-Agent", c.s.userAgent())
19536	if c.ifNoneMatch_ != "" {
19537		req.Header.Set("If-None-Match", c.ifNoneMatch_)
19538	}
19539	if c.ctx_ != nil {
19540		return ctxhttp.Do(c.ctx_, c.s.client, req)
19541	}
19542	return c.s.client.Do(req)
19543}
19544
19545// Do executes the "compute.globalOperations.aggregatedList" call.
19546// Exactly one of *OperationAggregatedList or error will be non-nil. Any
19547// non-2xx status code is an error. Response headers are in either
19548// *OperationAggregatedList.ServerResponse.Header or (if a response was
19549// returned at all) in error.(*googleapi.Error).Header. Use
19550// googleapi.IsNotModified to check whether the returned error was
19551// because http.StatusNotModified was returned.
19552func (c *GlobalOperationsAggregatedListCall) Do(opts ...googleapi.CallOption) (*OperationAggregatedList, error) {
19553	gensupport.SetOptions(c.urlParams_, opts...)
19554	res, err := c.doRequest("json")
19555	if res != nil && res.StatusCode == http.StatusNotModified {
19556		if res.Body != nil {
19557			res.Body.Close()
19558		}
19559		return nil, &googleapi.Error{
19560			Code:   res.StatusCode,
19561			Header: res.Header,
19562		}
19563	}
19564	if err != nil {
19565		return nil, err
19566	}
19567	defer googleapi.CloseBody(res)
19568	if err := googleapi.CheckResponse(res); err != nil {
19569		return nil, err
19570	}
19571	ret := &OperationAggregatedList{
19572		ServerResponse: googleapi.ServerResponse{
19573			Header:         res.Header,
19574			HTTPStatusCode: res.StatusCode,
19575		},
19576	}
19577	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19578		return nil, err
19579	}
19580	return ret, nil
19581	// {
19582	//   "description": "Retrieves an aggregated list of all operations.",
19583	//   "httpMethod": "GET",
19584	//   "id": "compute.globalOperations.aggregatedList",
19585	//   "parameterOrder": [
19586	//     "project"
19587	//   ],
19588	//   "parameters": {
19589	//     "filter": {
19590	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
19591	//       "location": "query",
19592	//       "type": "string"
19593	//     },
19594	//     "maxResults": {
19595	//       "default": "500",
19596	//       "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.",
19597	//       "format": "uint32",
19598	//       "location": "query",
19599	//       "maximum": "500",
19600	//       "minimum": "0",
19601	//       "type": "integer"
19602	//     },
19603	//     "orderBy": {
19604	//       "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.",
19605	//       "location": "query",
19606	//       "type": "string"
19607	//     },
19608	//     "pageToken": {
19609	//       "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.",
19610	//       "location": "query",
19611	//       "type": "string"
19612	//     },
19613	//     "project": {
19614	//       "description": "Project ID for this request.",
19615	//       "location": "path",
19616	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19617	//       "required": true,
19618	//       "type": "string"
19619	//     }
19620	//   },
19621	//   "path": "{project}/aggregated/operations",
19622	//   "response": {
19623	//     "$ref": "OperationAggregatedList"
19624	//   },
19625	//   "scopes": [
19626	//     "https://www.googleapis.com/auth/cloud-platform",
19627	//     "https://www.googleapis.com/auth/compute",
19628	//     "https://www.googleapis.com/auth/compute.readonly"
19629	//   ]
19630	// }
19631
19632}
19633
19634// Pages invokes f for each page of results.
19635// A non-nil error returned from f will halt the iteration.
19636// The provided context supersedes any context provided to the Context method.
19637func (c *GlobalOperationsAggregatedListCall) Pages(ctx context.Context, f func(*OperationAggregatedList) error) error {
19638	c.ctx_ = ctx
19639	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19640	for {
19641		x, err := c.Do()
19642		if err != nil {
19643			return err
19644		}
19645		if err := f(x); err != nil {
19646			return err
19647		}
19648		if x.NextPageToken == "" {
19649			return nil
19650		}
19651		c.PageToken(x.NextPageToken)
19652	}
19653}
19654
19655// method id "compute.globalOperations.delete":
19656
19657type GlobalOperationsDeleteCall struct {
19658	s          *Service
19659	project    string
19660	operation  string
19661	urlParams_ gensupport.URLParams
19662	ctx_       context.Context
19663}
19664
19665// Delete: Deletes the specified Operations resource.
19666// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/delete
19667func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall {
19668	c := &GlobalOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19669	c.project = project
19670	c.operation = operation
19671	return c
19672}
19673
19674// Fields allows partial responses to be retrieved. See
19675// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19676// for more information.
19677func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall {
19678	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19679	return c
19680}
19681
19682// Context sets the context to be used in this call's Do method. Any
19683// pending HTTP request will be aborted if the provided context is
19684// canceled.
19685func (c *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall {
19686	c.ctx_ = ctx
19687	return c
19688}
19689
19690func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
19691	var body io.Reader = nil
19692	c.urlParams_.Set("alt", alt)
19693	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
19694	urls += "?" + c.urlParams_.Encode()
19695	req, _ := http.NewRequest("DELETE", urls, body)
19696	googleapi.Expand(req.URL, map[string]string{
19697		"project":   c.project,
19698		"operation": c.operation,
19699	})
19700	req.Header.Set("User-Agent", c.s.userAgent())
19701	if c.ctx_ != nil {
19702		return ctxhttp.Do(c.ctx_, c.s.client, req)
19703	}
19704	return c.s.client.Do(req)
19705}
19706
19707// Do executes the "compute.globalOperations.delete" call.
19708func (c *GlobalOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
19709	gensupport.SetOptions(c.urlParams_, opts...)
19710	res, err := c.doRequest("json")
19711	if err != nil {
19712		return err
19713	}
19714	defer googleapi.CloseBody(res)
19715	if err := googleapi.CheckResponse(res); err != nil {
19716		return err
19717	}
19718	return nil
19719	// {
19720	//   "description": "Deletes the specified Operations resource.",
19721	//   "httpMethod": "DELETE",
19722	//   "id": "compute.globalOperations.delete",
19723	//   "parameterOrder": [
19724	//     "project",
19725	//     "operation"
19726	//   ],
19727	//   "parameters": {
19728	//     "operation": {
19729	//       "description": "Name of the Operations resource to delete.",
19730	//       "location": "path",
19731	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19732	//       "required": true,
19733	//       "type": "string"
19734	//     },
19735	//     "project": {
19736	//       "description": "Project ID for this request.",
19737	//       "location": "path",
19738	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19739	//       "required": true,
19740	//       "type": "string"
19741	//     }
19742	//   },
19743	//   "path": "{project}/global/operations/{operation}",
19744	//   "scopes": [
19745	//     "https://www.googleapis.com/auth/cloud-platform",
19746	//     "https://www.googleapis.com/auth/compute"
19747	//   ]
19748	// }
19749
19750}
19751
19752// method id "compute.globalOperations.get":
19753
19754type GlobalOperationsGetCall struct {
19755	s            *Service
19756	project      string
19757	operation    string
19758	urlParams_   gensupport.URLParams
19759	ifNoneMatch_ string
19760	ctx_         context.Context
19761}
19762
19763// Get: Retrieves the specified Operations resource. Get a list of
19764// operations by making a list() request.
19765// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/get
19766func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall {
19767	c := &GlobalOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19768	c.project = project
19769	c.operation = operation
19770	return c
19771}
19772
19773// Fields allows partial responses to be retrieved. See
19774// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19775// for more information.
19776func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall {
19777	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19778	return c
19779}
19780
19781// IfNoneMatch sets the optional parameter which makes the operation
19782// fail if the object's ETag matches the given value. This is useful for
19783// getting updates only after the object has changed since the last
19784// request. Use googleapi.IsNotModified to check whether the response
19785// error from Do is the result of In-None-Match.
19786func (c *GlobalOperationsGetCall) IfNoneMatch(entityTag string) *GlobalOperationsGetCall {
19787	c.ifNoneMatch_ = entityTag
19788	return c
19789}
19790
19791// Context sets the context to be used in this call's Do method. Any
19792// pending HTTP request will be aborted if the provided context is
19793// canceled.
19794func (c *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall {
19795	c.ctx_ = ctx
19796	return c
19797}
19798
19799func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) {
19800	var body io.Reader = nil
19801	c.urlParams_.Set("alt", alt)
19802	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
19803	urls += "?" + c.urlParams_.Encode()
19804	req, _ := http.NewRequest("GET", urls, body)
19805	googleapi.Expand(req.URL, map[string]string{
19806		"project":   c.project,
19807		"operation": c.operation,
19808	})
19809	req.Header.Set("User-Agent", c.s.userAgent())
19810	if c.ifNoneMatch_ != "" {
19811		req.Header.Set("If-None-Match", c.ifNoneMatch_)
19812	}
19813	if c.ctx_ != nil {
19814		return ctxhttp.Do(c.ctx_, c.s.client, req)
19815	}
19816	return c.s.client.Do(req)
19817}
19818
19819// Do executes the "compute.globalOperations.get" call.
19820// Exactly one of *Operation or error will be non-nil. Any non-2xx
19821// status code is an error. Response headers are in either
19822// *Operation.ServerResponse.Header or (if a response was returned at
19823// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19824// to check whether the returned error was because
19825// http.StatusNotModified was returned.
19826func (c *GlobalOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19827	gensupport.SetOptions(c.urlParams_, opts...)
19828	res, err := c.doRequest("json")
19829	if res != nil && res.StatusCode == http.StatusNotModified {
19830		if res.Body != nil {
19831			res.Body.Close()
19832		}
19833		return nil, &googleapi.Error{
19834			Code:   res.StatusCode,
19835			Header: res.Header,
19836		}
19837	}
19838	if err != nil {
19839		return nil, err
19840	}
19841	defer googleapi.CloseBody(res)
19842	if err := googleapi.CheckResponse(res); err != nil {
19843		return nil, err
19844	}
19845	ret := &Operation{
19846		ServerResponse: googleapi.ServerResponse{
19847			Header:         res.Header,
19848			HTTPStatusCode: res.StatusCode,
19849		},
19850	}
19851	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
19852		return nil, err
19853	}
19854	return ret, nil
19855	// {
19856	//   "description": "Retrieves the specified Operations resource. Get a list of operations by making a list() request.",
19857	//   "httpMethod": "GET",
19858	//   "id": "compute.globalOperations.get",
19859	//   "parameterOrder": [
19860	//     "project",
19861	//     "operation"
19862	//   ],
19863	//   "parameters": {
19864	//     "operation": {
19865	//       "description": "Name of the Operations resource to return.",
19866	//       "location": "path",
19867	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
19868	//       "required": true,
19869	//       "type": "string"
19870	//     },
19871	//     "project": {
19872	//       "description": "Project ID for this request.",
19873	//       "location": "path",
19874	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
19875	//       "required": true,
19876	//       "type": "string"
19877	//     }
19878	//   },
19879	//   "path": "{project}/global/operations/{operation}",
19880	//   "response": {
19881	//     "$ref": "Operation"
19882	//   },
19883	//   "scopes": [
19884	//     "https://www.googleapis.com/auth/cloud-platform",
19885	//     "https://www.googleapis.com/auth/compute",
19886	//     "https://www.googleapis.com/auth/compute.readonly"
19887	//   ]
19888	// }
19889
19890}
19891
19892// method id "compute.globalOperations.list":
19893
19894type GlobalOperationsListCall struct {
19895	s            *Service
19896	project      string
19897	urlParams_   gensupport.URLParams
19898	ifNoneMatch_ string
19899	ctx_         context.Context
19900}
19901
19902// List: Retrieves a list of Operation resources contained within the
19903// specified project.
19904// For details, see https://cloud.google.com/compute/docs/reference/latest/globalOperations/list
19905func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall {
19906	c := &GlobalOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19907	c.project = project
19908	return c
19909}
19910
19911// Filter sets the optional parameter "filter": Sets a filter expression
19912// for filtering listed resources, in the form filter={expression}. Your
19913// {expression} must be in the format: field_name comparison_string
19914// literal_string.
19915//
19916// The field_name is the name of the field you want to compare. Only
19917// atomic field types are supported (string, number, boolean). The
19918// comparison_string must be either eq (equals) or ne (not equals). The
19919// literal_string is the string value to filter to. The literal value
19920// must be valid for the type of field you are filtering by (string,
19921// number, boolean). For string fields, the literal value is interpreted
19922// as a regular expression using RE2 syntax. The literal value must
19923// match the entire field.
19924//
19925// For example, to filter for instances that do not have a name of
19926// example-instance, you would use filter=name ne
19927// example-instance.
19928//
19929// Compute Engine Beta API Only: If you use filtering in the Beta API,
19930// you can also filter on nested fields. For example, you could filter
19931// on instances that have set the scheduling.automaticRestart field to
19932// true. In particular, use filtering on nested fields to take advantage
19933// of instance labels to organize and filter results based on label
19934// values.
19935//
19936// The Beta API also supports filtering on multiple expressions by
19937// providing each separate expression within parentheses. For example,
19938// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
19939// Multiple expressions are treated as AND expressions, meaning that
19940// resources must match all expressions to pass the filters.
19941func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall {
19942	c.urlParams_.Set("filter", filter)
19943	return c
19944}
19945
19946// MaxResults sets the optional parameter "maxResults": The maximum
19947// number of results per page that should be returned. If the number of
19948// available results is larger than maxResults, Compute Engine returns a
19949// nextPageToken that can be used to get the next page of results in
19950// subsequent list requests.
19951func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall {
19952	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
19953	return c
19954}
19955
19956// OrderBy sets the optional parameter "orderBy": Sorts list results by
19957// a certain order. By default, results are returned in alphanumerical
19958// order based on the resource name.
19959//
19960// You can also sort results in descending order based on the creation
19961// timestamp using orderBy="creationTimestamp desc". This sorts results
19962// based on the creationTimestamp field in reverse chronological order
19963// (newest result first). Use this to sort resources like operations so
19964// that the newest operation is returned first.
19965//
19966// Currently, only sorting by name or creationTimestamp desc is
19967// supported.
19968func (c *GlobalOperationsListCall) OrderBy(orderBy string) *GlobalOperationsListCall {
19969	c.urlParams_.Set("orderBy", orderBy)
19970	return c
19971}
19972
19973// PageToken sets the optional parameter "pageToken": Specifies a page
19974// token to use. Set pageToken to the nextPageToken returned by a
19975// previous list request to get the next page of results.
19976func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall {
19977	c.urlParams_.Set("pageToken", pageToken)
19978	return c
19979}
19980
19981// Fields allows partial responses to be retrieved. See
19982// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19983// for more information.
19984func (c *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall {
19985	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19986	return c
19987}
19988
19989// IfNoneMatch sets the optional parameter which makes the operation
19990// fail if the object's ETag matches the given value. This is useful for
19991// getting updates only after the object has changed since the last
19992// request. Use googleapi.IsNotModified to check whether the response
19993// error from Do is the result of In-None-Match.
19994func (c *GlobalOperationsListCall) IfNoneMatch(entityTag string) *GlobalOperationsListCall {
19995	c.ifNoneMatch_ = entityTag
19996	return c
19997}
19998
19999// Context sets the context to be used in this call's Do method. Any
20000// pending HTTP request will be aborted if the provided context is
20001// canceled.
20002func (c *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall {
20003	c.ctx_ = ctx
20004	return c
20005}
20006
20007func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) {
20008	var body io.Reader = nil
20009	c.urlParams_.Set("alt", alt)
20010	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations")
20011	urls += "?" + c.urlParams_.Encode()
20012	req, _ := http.NewRequest("GET", urls, body)
20013	googleapi.Expand(req.URL, map[string]string{
20014		"project": c.project,
20015	})
20016	req.Header.Set("User-Agent", c.s.userAgent())
20017	if c.ifNoneMatch_ != "" {
20018		req.Header.Set("If-None-Match", c.ifNoneMatch_)
20019	}
20020	if c.ctx_ != nil {
20021		return ctxhttp.Do(c.ctx_, c.s.client, req)
20022	}
20023	return c.s.client.Do(req)
20024}
20025
20026// Do executes the "compute.globalOperations.list" call.
20027// Exactly one of *OperationList or error will be non-nil. Any non-2xx
20028// status code is an error. Response headers are in either
20029// *OperationList.ServerResponse.Header or (if a response was returned
20030// at all) in error.(*googleapi.Error).Header. Use
20031// googleapi.IsNotModified to check whether the returned error was
20032// because http.StatusNotModified was returned.
20033func (c *GlobalOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) {
20034	gensupport.SetOptions(c.urlParams_, opts...)
20035	res, err := c.doRequest("json")
20036	if res != nil && res.StatusCode == http.StatusNotModified {
20037		if res.Body != nil {
20038			res.Body.Close()
20039		}
20040		return nil, &googleapi.Error{
20041			Code:   res.StatusCode,
20042			Header: res.Header,
20043		}
20044	}
20045	if err != nil {
20046		return nil, err
20047	}
20048	defer googleapi.CloseBody(res)
20049	if err := googleapi.CheckResponse(res); err != nil {
20050		return nil, err
20051	}
20052	ret := &OperationList{
20053		ServerResponse: googleapi.ServerResponse{
20054			Header:         res.Header,
20055			HTTPStatusCode: res.StatusCode,
20056		},
20057	}
20058	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20059		return nil, err
20060	}
20061	return ret, nil
20062	// {
20063	//   "description": "Retrieves a list of Operation resources contained within the specified project.",
20064	//   "httpMethod": "GET",
20065	//   "id": "compute.globalOperations.list",
20066	//   "parameterOrder": [
20067	//     "project"
20068	//   ],
20069	//   "parameters": {
20070	//     "filter": {
20071	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
20072	//       "location": "query",
20073	//       "type": "string"
20074	//     },
20075	//     "maxResults": {
20076	//       "default": "500",
20077	//       "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.",
20078	//       "format": "uint32",
20079	//       "location": "query",
20080	//       "maximum": "500",
20081	//       "minimum": "0",
20082	//       "type": "integer"
20083	//     },
20084	//     "orderBy": {
20085	//       "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.",
20086	//       "location": "query",
20087	//       "type": "string"
20088	//     },
20089	//     "pageToken": {
20090	//       "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.",
20091	//       "location": "query",
20092	//       "type": "string"
20093	//     },
20094	//     "project": {
20095	//       "description": "Project ID for this request.",
20096	//       "location": "path",
20097	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20098	//       "required": true,
20099	//       "type": "string"
20100	//     }
20101	//   },
20102	//   "path": "{project}/global/operations",
20103	//   "response": {
20104	//     "$ref": "OperationList"
20105	//   },
20106	//   "scopes": [
20107	//     "https://www.googleapis.com/auth/cloud-platform",
20108	//     "https://www.googleapis.com/auth/compute",
20109	//     "https://www.googleapis.com/auth/compute.readonly"
20110	//   ]
20111	// }
20112
20113}
20114
20115// Pages invokes f for each page of results.
20116// A non-nil error returned from f will halt the iteration.
20117// The provided context supersedes any context provided to the Context method.
20118func (c *GlobalOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error {
20119	c.ctx_ = ctx
20120	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20121	for {
20122		x, err := c.Do()
20123		if err != nil {
20124			return err
20125		}
20126		if err := f(x); err != nil {
20127			return err
20128		}
20129		if x.NextPageToken == "" {
20130			return nil
20131		}
20132		c.PageToken(x.NextPageToken)
20133	}
20134}
20135
20136// method id "compute.httpHealthChecks.delete":
20137
20138type HttpHealthChecksDeleteCall struct {
20139	s               *Service
20140	project         string
20141	httpHealthCheck string
20142	urlParams_      gensupport.URLParams
20143	ctx_            context.Context
20144}
20145
20146// Delete: Deletes the specified HttpHealthCheck resource.
20147// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/delete
20148func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall {
20149	c := &HttpHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20150	c.project = project
20151	c.httpHealthCheck = httpHealthCheck
20152	return c
20153}
20154
20155// Fields allows partial responses to be retrieved. See
20156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20157// for more information.
20158func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall {
20159	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20160	return c
20161}
20162
20163// Context sets the context to be used in this call's Do method. Any
20164// pending HTTP request will be aborted if the provided context is
20165// canceled.
20166func (c *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall {
20167	c.ctx_ = ctx
20168	return c
20169}
20170
20171func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
20172	var body io.Reader = nil
20173	c.urlParams_.Set("alt", alt)
20174	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
20175	urls += "?" + c.urlParams_.Encode()
20176	req, _ := http.NewRequest("DELETE", urls, body)
20177	googleapi.Expand(req.URL, map[string]string{
20178		"project":         c.project,
20179		"httpHealthCheck": c.httpHealthCheck,
20180	})
20181	req.Header.Set("User-Agent", c.s.userAgent())
20182	if c.ctx_ != nil {
20183		return ctxhttp.Do(c.ctx_, c.s.client, req)
20184	}
20185	return c.s.client.Do(req)
20186}
20187
20188// Do executes the "compute.httpHealthChecks.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 *HttpHealthChecksDeleteCall) 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	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20221		return nil, err
20222	}
20223	return ret, nil
20224	// {
20225	//   "description": "Deletes the specified HttpHealthCheck resource.",
20226	//   "httpMethod": "DELETE",
20227	//   "id": "compute.httpHealthChecks.delete",
20228	//   "parameterOrder": [
20229	//     "project",
20230	//     "httpHealthCheck"
20231	//   ],
20232	//   "parameters": {
20233	//     "httpHealthCheck": {
20234	//       "description": "Name of the HttpHealthCheck resource to delete.",
20235	//       "location": "path",
20236	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
20237	//       "required": true,
20238	//       "type": "string"
20239	//     },
20240	//     "project": {
20241	//       "description": "Project ID for this request.",
20242	//       "location": "path",
20243	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20244	//       "required": true,
20245	//       "type": "string"
20246	//     }
20247	//   },
20248	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
20249	//   "response": {
20250	//     "$ref": "Operation"
20251	//   },
20252	//   "scopes": [
20253	//     "https://www.googleapis.com/auth/cloud-platform",
20254	//     "https://www.googleapis.com/auth/compute"
20255	//   ]
20256	// }
20257
20258}
20259
20260// method id "compute.httpHealthChecks.get":
20261
20262type HttpHealthChecksGetCall struct {
20263	s               *Service
20264	project         string
20265	httpHealthCheck string
20266	urlParams_      gensupport.URLParams
20267	ifNoneMatch_    string
20268	ctx_            context.Context
20269}
20270
20271// Get: Returns the specified HttpHealthCheck resource. Get a list of
20272// available HTTP health checks by making a list() request.
20273// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/get
20274func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall {
20275	c := &HttpHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20276	c.project = project
20277	c.httpHealthCheck = httpHealthCheck
20278	return c
20279}
20280
20281// Fields allows partial responses to be retrieved. See
20282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20283// for more information.
20284func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall {
20285	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20286	return c
20287}
20288
20289// IfNoneMatch sets the optional parameter which makes the operation
20290// fail if the object's ETag matches the given value. This is useful for
20291// getting updates only after the object has changed since the last
20292// request. Use googleapi.IsNotModified to check whether the response
20293// error from Do is the result of In-None-Match.
20294func (c *HttpHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpHealthChecksGetCall {
20295	c.ifNoneMatch_ = entityTag
20296	return c
20297}
20298
20299// Context sets the context to be used in this call's Do method. Any
20300// pending HTTP request will be aborted if the provided context is
20301// canceled.
20302func (c *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall {
20303	c.ctx_ = ctx
20304	return c
20305}
20306
20307func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
20308	var body io.Reader = nil
20309	c.urlParams_.Set("alt", alt)
20310	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
20311	urls += "?" + c.urlParams_.Encode()
20312	req, _ := http.NewRequest("GET", urls, body)
20313	googleapi.Expand(req.URL, map[string]string{
20314		"project":         c.project,
20315		"httpHealthCheck": c.httpHealthCheck,
20316	})
20317	req.Header.Set("User-Agent", c.s.userAgent())
20318	if c.ifNoneMatch_ != "" {
20319		req.Header.Set("If-None-Match", c.ifNoneMatch_)
20320	}
20321	if c.ctx_ != nil {
20322		return ctxhttp.Do(c.ctx_, c.s.client, req)
20323	}
20324	return c.s.client.Do(req)
20325}
20326
20327// Do executes the "compute.httpHealthChecks.get" call.
20328// Exactly one of *HttpHealthCheck or error will be non-nil. Any non-2xx
20329// status code is an error. Response headers are in either
20330// *HttpHealthCheck.ServerResponse.Header or (if a response was returned
20331// at all) in error.(*googleapi.Error).Header. Use
20332// googleapi.IsNotModified to check whether the returned error was
20333// because http.StatusNotModified was returned.
20334func (c *HttpHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheck, error) {
20335	gensupport.SetOptions(c.urlParams_, opts...)
20336	res, err := c.doRequest("json")
20337	if res != nil && res.StatusCode == http.StatusNotModified {
20338		if res.Body != nil {
20339			res.Body.Close()
20340		}
20341		return nil, &googleapi.Error{
20342			Code:   res.StatusCode,
20343			Header: res.Header,
20344		}
20345	}
20346	if err != nil {
20347		return nil, err
20348	}
20349	defer googleapi.CloseBody(res)
20350	if err := googleapi.CheckResponse(res); err != nil {
20351		return nil, err
20352	}
20353	ret := &HttpHealthCheck{
20354		ServerResponse: googleapi.ServerResponse{
20355			Header:         res.Header,
20356			HTTPStatusCode: res.StatusCode,
20357		},
20358	}
20359	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20360		return nil, err
20361	}
20362	return ret, nil
20363	// {
20364	//   "description": "Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request.",
20365	//   "httpMethod": "GET",
20366	//   "id": "compute.httpHealthChecks.get",
20367	//   "parameterOrder": [
20368	//     "project",
20369	//     "httpHealthCheck"
20370	//   ],
20371	//   "parameters": {
20372	//     "httpHealthCheck": {
20373	//       "description": "Name of the HttpHealthCheck resource to return.",
20374	//       "location": "path",
20375	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
20376	//       "required": true,
20377	//       "type": "string"
20378	//     },
20379	//     "project": {
20380	//       "description": "Project ID for this request.",
20381	//       "location": "path",
20382	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20383	//       "required": true,
20384	//       "type": "string"
20385	//     }
20386	//   },
20387	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
20388	//   "response": {
20389	//     "$ref": "HttpHealthCheck"
20390	//   },
20391	//   "scopes": [
20392	//     "https://www.googleapis.com/auth/cloud-platform",
20393	//     "https://www.googleapis.com/auth/compute",
20394	//     "https://www.googleapis.com/auth/compute.readonly"
20395	//   ]
20396	// }
20397
20398}
20399
20400// method id "compute.httpHealthChecks.insert":
20401
20402type HttpHealthChecksInsertCall struct {
20403	s               *Service
20404	project         string
20405	httphealthcheck *HttpHealthCheck
20406	urlParams_      gensupport.URLParams
20407	ctx_            context.Context
20408}
20409
20410// Insert: Creates a HttpHealthCheck resource in the specified project
20411// using the data included in the request.
20412// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/insert
20413func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall {
20414	c := &HttpHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20415	c.project = project
20416	c.httphealthcheck = httphealthcheck
20417	return c
20418}
20419
20420// Fields allows partial responses to be retrieved. See
20421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20422// for more information.
20423func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall {
20424	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20425	return c
20426}
20427
20428// Context sets the context to be used in this call's Do method. Any
20429// pending HTTP request will be aborted if the provided context is
20430// canceled.
20431func (c *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall {
20432	c.ctx_ = ctx
20433	return c
20434}
20435
20436func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
20437	var body io.Reader = nil
20438	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
20439	if err != nil {
20440		return nil, err
20441	}
20442	ctype := "application/json"
20443	c.urlParams_.Set("alt", alt)
20444	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks")
20445	urls += "?" + c.urlParams_.Encode()
20446	req, _ := http.NewRequest("POST", urls, body)
20447	googleapi.Expand(req.URL, map[string]string{
20448		"project": c.project,
20449	})
20450	req.Header.Set("Content-Type", ctype)
20451	req.Header.Set("User-Agent", c.s.userAgent())
20452	if c.ctx_ != nil {
20453		return ctxhttp.Do(c.ctx_, c.s.client, req)
20454	}
20455	return c.s.client.Do(req)
20456}
20457
20458// Do executes the "compute.httpHealthChecks.insert" call.
20459// Exactly one of *Operation or error will be non-nil. Any non-2xx
20460// status code is an error. Response headers are in either
20461// *Operation.ServerResponse.Header or (if a response was returned at
20462// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20463// to check whether the returned error was because
20464// http.StatusNotModified was returned.
20465func (c *HttpHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20466	gensupport.SetOptions(c.urlParams_, opts...)
20467	res, err := c.doRequest("json")
20468	if res != nil && res.StatusCode == http.StatusNotModified {
20469		if res.Body != nil {
20470			res.Body.Close()
20471		}
20472		return nil, &googleapi.Error{
20473			Code:   res.StatusCode,
20474			Header: res.Header,
20475		}
20476	}
20477	if err != nil {
20478		return nil, err
20479	}
20480	defer googleapi.CloseBody(res)
20481	if err := googleapi.CheckResponse(res); err != nil {
20482		return nil, err
20483	}
20484	ret := &Operation{
20485		ServerResponse: googleapi.ServerResponse{
20486			Header:         res.Header,
20487			HTTPStatusCode: res.StatusCode,
20488		},
20489	}
20490	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20491		return nil, err
20492	}
20493	return ret, nil
20494	// {
20495	//   "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.",
20496	//   "httpMethod": "POST",
20497	//   "id": "compute.httpHealthChecks.insert",
20498	//   "parameterOrder": [
20499	//     "project"
20500	//   ],
20501	//   "parameters": {
20502	//     "project": {
20503	//       "description": "Project ID for this request.",
20504	//       "location": "path",
20505	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20506	//       "required": true,
20507	//       "type": "string"
20508	//     }
20509	//   },
20510	//   "path": "{project}/global/httpHealthChecks",
20511	//   "request": {
20512	//     "$ref": "HttpHealthCheck"
20513	//   },
20514	//   "response": {
20515	//     "$ref": "Operation"
20516	//   },
20517	//   "scopes": [
20518	//     "https://www.googleapis.com/auth/cloud-platform",
20519	//     "https://www.googleapis.com/auth/compute"
20520	//   ]
20521	// }
20522
20523}
20524
20525// method id "compute.httpHealthChecks.list":
20526
20527type HttpHealthChecksListCall struct {
20528	s            *Service
20529	project      string
20530	urlParams_   gensupport.URLParams
20531	ifNoneMatch_ string
20532	ctx_         context.Context
20533}
20534
20535// List: Retrieves the list of HttpHealthCheck resources available to
20536// the specified project.
20537// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/list
20538func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall {
20539	c := &HttpHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20540	c.project = project
20541	return c
20542}
20543
20544// Filter sets the optional parameter "filter": Sets a filter expression
20545// for filtering listed resources, in the form filter={expression}. Your
20546// {expression} must be in the format: field_name comparison_string
20547// literal_string.
20548//
20549// The field_name is the name of the field you want to compare. Only
20550// atomic field types are supported (string, number, boolean). The
20551// comparison_string must be either eq (equals) or ne (not equals). The
20552// literal_string is the string value to filter to. The literal value
20553// must be valid for the type of field you are filtering by (string,
20554// number, boolean). For string fields, the literal value is interpreted
20555// as a regular expression using RE2 syntax. The literal value must
20556// match the entire field.
20557//
20558// For example, to filter for instances that do not have a name of
20559// example-instance, you would use filter=name ne
20560// example-instance.
20561//
20562// Compute Engine Beta API Only: If you use filtering in the Beta API,
20563// you can also filter on nested fields. For example, you could filter
20564// on instances that have set the scheduling.automaticRestart field to
20565// true. In particular, use filtering on nested fields to take advantage
20566// of instance labels to organize and filter results based on label
20567// values.
20568//
20569// The Beta API also supports filtering on multiple expressions by
20570// providing each separate expression within parentheses. For example,
20571// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
20572// Multiple expressions are treated as AND expressions, meaning that
20573// resources must match all expressions to pass the filters.
20574func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall {
20575	c.urlParams_.Set("filter", filter)
20576	return c
20577}
20578
20579// MaxResults sets the optional parameter "maxResults": The maximum
20580// number of results per page that should be returned. If the number of
20581// available results is larger than maxResults, Compute Engine returns a
20582// nextPageToken that can be used to get the next page of results in
20583// subsequent list requests.
20584func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall {
20585	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
20586	return c
20587}
20588
20589// OrderBy sets the optional parameter "orderBy": Sorts list results by
20590// a certain order. By default, results are returned in alphanumerical
20591// order based on the resource name.
20592//
20593// You can also sort results in descending order based on the creation
20594// timestamp using orderBy="creationTimestamp desc". This sorts results
20595// based on the creationTimestamp field in reverse chronological order
20596// (newest result first). Use this to sort resources like operations so
20597// that the newest operation is returned first.
20598//
20599// Currently, only sorting by name or creationTimestamp desc is
20600// supported.
20601func (c *HttpHealthChecksListCall) OrderBy(orderBy string) *HttpHealthChecksListCall {
20602	c.urlParams_.Set("orderBy", orderBy)
20603	return c
20604}
20605
20606// PageToken sets the optional parameter "pageToken": Specifies a page
20607// token to use. Set pageToken to the nextPageToken returned by a
20608// previous list request to get the next page of results.
20609func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall {
20610	c.urlParams_.Set("pageToken", pageToken)
20611	return c
20612}
20613
20614// Fields allows partial responses to be retrieved. See
20615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20616// for more information.
20617func (c *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall {
20618	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20619	return c
20620}
20621
20622// IfNoneMatch sets the optional parameter which makes the operation
20623// fail if the object's ETag matches the given value. This is useful for
20624// getting updates only after the object has changed since the last
20625// request. Use googleapi.IsNotModified to check whether the response
20626// error from Do is the result of In-None-Match.
20627func (c *HttpHealthChecksListCall) IfNoneMatch(entityTag string) *HttpHealthChecksListCall {
20628	c.ifNoneMatch_ = entityTag
20629	return c
20630}
20631
20632// Context sets the context to be used in this call's Do method. Any
20633// pending HTTP request will be aborted if the provided context is
20634// canceled.
20635func (c *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall {
20636	c.ctx_ = ctx
20637	return c
20638}
20639
20640func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) {
20641	var body io.Reader = nil
20642	c.urlParams_.Set("alt", alt)
20643	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks")
20644	urls += "?" + c.urlParams_.Encode()
20645	req, _ := http.NewRequest("GET", urls, body)
20646	googleapi.Expand(req.URL, map[string]string{
20647		"project": c.project,
20648	})
20649	req.Header.Set("User-Agent", c.s.userAgent())
20650	if c.ifNoneMatch_ != "" {
20651		req.Header.Set("If-None-Match", c.ifNoneMatch_)
20652	}
20653	if c.ctx_ != nil {
20654		return ctxhttp.Do(c.ctx_, c.s.client, req)
20655	}
20656	return c.s.client.Do(req)
20657}
20658
20659// Do executes the "compute.httpHealthChecks.list" call.
20660// Exactly one of *HttpHealthCheckList or error will be non-nil. Any
20661// non-2xx status code is an error. Response headers are in either
20662// *HttpHealthCheckList.ServerResponse.Header or (if a response was
20663// returned at all) in error.(*googleapi.Error).Header. Use
20664// googleapi.IsNotModified to check whether the returned error was
20665// because http.StatusNotModified was returned.
20666func (c *HttpHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpHealthCheckList, error) {
20667	gensupport.SetOptions(c.urlParams_, opts...)
20668	res, err := c.doRequest("json")
20669	if res != nil && res.StatusCode == http.StatusNotModified {
20670		if res.Body != nil {
20671			res.Body.Close()
20672		}
20673		return nil, &googleapi.Error{
20674			Code:   res.StatusCode,
20675			Header: res.Header,
20676		}
20677	}
20678	if err != nil {
20679		return nil, err
20680	}
20681	defer googleapi.CloseBody(res)
20682	if err := googleapi.CheckResponse(res); err != nil {
20683		return nil, err
20684	}
20685	ret := &HttpHealthCheckList{
20686		ServerResponse: googleapi.ServerResponse{
20687			Header:         res.Header,
20688			HTTPStatusCode: res.StatusCode,
20689		},
20690	}
20691	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20692		return nil, err
20693	}
20694	return ret, nil
20695	// {
20696	//   "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.",
20697	//   "httpMethod": "GET",
20698	//   "id": "compute.httpHealthChecks.list",
20699	//   "parameterOrder": [
20700	//     "project"
20701	//   ],
20702	//   "parameters": {
20703	//     "filter": {
20704	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
20705	//       "location": "query",
20706	//       "type": "string"
20707	//     },
20708	//     "maxResults": {
20709	//       "default": "500",
20710	//       "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.",
20711	//       "format": "uint32",
20712	//       "location": "query",
20713	//       "maximum": "500",
20714	//       "minimum": "0",
20715	//       "type": "integer"
20716	//     },
20717	//     "orderBy": {
20718	//       "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.",
20719	//       "location": "query",
20720	//       "type": "string"
20721	//     },
20722	//     "pageToken": {
20723	//       "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.",
20724	//       "location": "query",
20725	//       "type": "string"
20726	//     },
20727	//     "project": {
20728	//       "description": "Project ID for this request.",
20729	//       "location": "path",
20730	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20731	//       "required": true,
20732	//       "type": "string"
20733	//     }
20734	//   },
20735	//   "path": "{project}/global/httpHealthChecks",
20736	//   "response": {
20737	//     "$ref": "HttpHealthCheckList"
20738	//   },
20739	//   "scopes": [
20740	//     "https://www.googleapis.com/auth/cloud-platform",
20741	//     "https://www.googleapis.com/auth/compute",
20742	//     "https://www.googleapis.com/auth/compute.readonly"
20743	//   ]
20744	// }
20745
20746}
20747
20748// Pages invokes f for each page of results.
20749// A non-nil error returned from f will halt the iteration.
20750// The provided context supersedes any context provided to the Context method.
20751func (c *HttpHealthChecksListCall) Pages(ctx context.Context, f func(*HttpHealthCheckList) error) error {
20752	c.ctx_ = ctx
20753	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
20754	for {
20755		x, err := c.Do()
20756		if err != nil {
20757			return err
20758		}
20759		if err := f(x); err != nil {
20760			return err
20761		}
20762		if x.NextPageToken == "" {
20763			return nil
20764		}
20765		c.PageToken(x.NextPageToken)
20766	}
20767}
20768
20769// method id "compute.httpHealthChecks.patch":
20770
20771type HttpHealthChecksPatchCall struct {
20772	s               *Service
20773	project         string
20774	httpHealthCheck string
20775	httphealthcheck *HttpHealthCheck
20776	urlParams_      gensupport.URLParams
20777	ctx_            context.Context
20778}
20779
20780// Patch: Updates a HttpHealthCheck resource in the specified project
20781// using the data included in the request. This method supports patch
20782// semantics.
20783// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch
20784func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall {
20785	c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20786	c.project = project
20787	c.httpHealthCheck = httpHealthCheck
20788	c.httphealthcheck = httphealthcheck
20789	return c
20790}
20791
20792// Fields allows partial responses to be retrieved. See
20793// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20794// for more information.
20795func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall {
20796	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20797	return c
20798}
20799
20800// Context sets the context to be used in this call's Do method. Any
20801// pending HTTP request will be aborted if the provided context is
20802// canceled.
20803func (c *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall {
20804	c.ctx_ = ctx
20805	return c
20806}
20807
20808func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
20809	var body io.Reader = nil
20810	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
20811	if err != nil {
20812		return nil, err
20813	}
20814	ctype := "application/json"
20815	c.urlParams_.Set("alt", alt)
20816	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
20817	urls += "?" + c.urlParams_.Encode()
20818	req, _ := http.NewRequest("PATCH", urls, body)
20819	googleapi.Expand(req.URL, map[string]string{
20820		"project":         c.project,
20821		"httpHealthCheck": c.httpHealthCheck,
20822	})
20823	req.Header.Set("Content-Type", ctype)
20824	req.Header.Set("User-Agent", c.s.userAgent())
20825	if c.ctx_ != nil {
20826		return ctxhttp.Do(c.ctx_, c.s.client, req)
20827	}
20828	return c.s.client.Do(req)
20829}
20830
20831// Do executes the "compute.httpHealthChecks.patch" call.
20832// Exactly one of *Operation or error will be non-nil. Any non-2xx
20833// status code is an error. Response headers are in either
20834// *Operation.ServerResponse.Header or (if a response was returned at
20835// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
20836// to check whether the returned error was because
20837// http.StatusNotModified was returned.
20838func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
20839	gensupport.SetOptions(c.urlParams_, opts...)
20840	res, err := c.doRequest("json")
20841	if res != nil && res.StatusCode == http.StatusNotModified {
20842		if res.Body != nil {
20843			res.Body.Close()
20844		}
20845		return nil, &googleapi.Error{
20846			Code:   res.StatusCode,
20847			Header: res.Header,
20848		}
20849	}
20850	if err != nil {
20851		return nil, err
20852	}
20853	defer googleapi.CloseBody(res)
20854	if err := googleapi.CheckResponse(res); err != nil {
20855		return nil, err
20856	}
20857	ret := &Operation{
20858		ServerResponse: googleapi.ServerResponse{
20859			Header:         res.Header,
20860			HTTPStatusCode: res.StatusCode,
20861		},
20862	}
20863	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20864		return nil, err
20865	}
20866	return ret, nil
20867	// {
20868	//   "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.",
20869	//   "httpMethod": "PATCH",
20870	//   "id": "compute.httpHealthChecks.patch",
20871	//   "parameterOrder": [
20872	//     "project",
20873	//     "httpHealthCheck"
20874	//   ],
20875	//   "parameters": {
20876	//     "httpHealthCheck": {
20877	//       "description": "Name of the HttpHealthCheck resource to update.",
20878	//       "location": "path",
20879	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
20880	//       "required": true,
20881	//       "type": "string"
20882	//     },
20883	//     "project": {
20884	//       "description": "Project ID for this request.",
20885	//       "location": "path",
20886	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
20887	//       "required": true,
20888	//       "type": "string"
20889	//     }
20890	//   },
20891	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
20892	//   "request": {
20893	//     "$ref": "HttpHealthCheck"
20894	//   },
20895	//   "response": {
20896	//     "$ref": "Operation"
20897	//   },
20898	//   "scopes": [
20899	//     "https://www.googleapis.com/auth/cloud-platform",
20900	//     "https://www.googleapis.com/auth/compute"
20901	//   ]
20902	// }
20903
20904}
20905
20906// method id "compute.httpHealthChecks.testIamPermissions":
20907
20908type HttpHealthChecksTestIamPermissionsCall struct {
20909	s                      *Service
20910	project                string
20911	resource               string
20912	testpermissionsrequest *TestPermissionsRequest
20913	urlParams_             gensupport.URLParams
20914	ctx_                   context.Context
20915}
20916
20917// TestIamPermissions: Returns permissions that a caller has on the
20918// specified resource.
20919func (r *HttpHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpHealthChecksTestIamPermissionsCall {
20920	c := &HttpHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
20921	c.project = project
20922	c.resource = resource
20923	c.testpermissionsrequest = testpermissionsrequest
20924	return c
20925}
20926
20927// Fields allows partial responses to be retrieved. See
20928// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
20929// for more information.
20930func (c *HttpHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpHealthChecksTestIamPermissionsCall {
20931	c.urlParams_.Set("fields", googleapi.CombineFields(s))
20932	return c
20933}
20934
20935// Context sets the context to be used in this call's Do method. Any
20936// pending HTTP request will be aborted if the provided context is
20937// canceled.
20938func (c *HttpHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpHealthChecksTestIamPermissionsCall {
20939	c.ctx_ = ctx
20940	return c
20941}
20942
20943func (c *HttpHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
20944	var body io.Reader = nil
20945	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
20946	if err != nil {
20947		return nil, err
20948	}
20949	ctype := "application/json"
20950	c.urlParams_.Set("alt", alt)
20951	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{resource}/testIamPermissions")
20952	urls += "?" + c.urlParams_.Encode()
20953	req, _ := http.NewRequest("POST", urls, body)
20954	googleapi.Expand(req.URL, map[string]string{
20955		"project":  c.project,
20956		"resource": c.resource,
20957	})
20958	req.Header.Set("Content-Type", ctype)
20959	req.Header.Set("User-Agent", c.s.userAgent())
20960	if c.ctx_ != nil {
20961		return ctxhttp.Do(c.ctx_, c.s.client, req)
20962	}
20963	return c.s.client.Do(req)
20964}
20965
20966// Do executes the "compute.httpHealthChecks.testIamPermissions" call.
20967// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
20968// non-2xx status code is an error. Response headers are in either
20969// *TestPermissionsResponse.ServerResponse.Header or (if a response was
20970// returned at all) in error.(*googleapi.Error).Header. Use
20971// googleapi.IsNotModified to check whether the returned error was
20972// because http.StatusNotModified was returned.
20973func (c *HttpHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
20974	gensupport.SetOptions(c.urlParams_, opts...)
20975	res, err := c.doRequest("json")
20976	if res != nil && res.StatusCode == http.StatusNotModified {
20977		if res.Body != nil {
20978			res.Body.Close()
20979		}
20980		return nil, &googleapi.Error{
20981			Code:   res.StatusCode,
20982			Header: res.Header,
20983		}
20984	}
20985	if err != nil {
20986		return nil, err
20987	}
20988	defer googleapi.CloseBody(res)
20989	if err := googleapi.CheckResponse(res); err != nil {
20990		return nil, err
20991	}
20992	ret := &TestPermissionsResponse{
20993		ServerResponse: googleapi.ServerResponse{
20994			Header:         res.Header,
20995			HTTPStatusCode: res.StatusCode,
20996		},
20997	}
20998	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
20999		return nil, err
21000	}
21001	return ret, nil
21002	// {
21003	//   "description": "Returns permissions that a caller has on the specified resource.",
21004	//   "httpMethod": "POST",
21005	//   "id": "compute.httpHealthChecks.testIamPermissions",
21006	//   "parameterOrder": [
21007	//     "project",
21008	//     "resource"
21009	//   ],
21010	//   "parameters": {
21011	//     "project": {
21012	//       "description": "Project ID for this request.",
21013	//       "location": "path",
21014	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21015	//       "required": true,
21016	//       "type": "string"
21017	//     },
21018	//     "resource": {
21019	//       "description": "Name of the resource for this request.",
21020	//       "location": "path",
21021	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
21022	//       "required": true,
21023	//       "type": "string"
21024	//     }
21025	//   },
21026	//   "path": "{project}/global/httpHealthChecks/{resource}/testIamPermissions",
21027	//   "request": {
21028	//     "$ref": "TestPermissionsRequest"
21029	//   },
21030	//   "response": {
21031	//     "$ref": "TestPermissionsResponse"
21032	//   },
21033	//   "scopes": [
21034	//     "https://www.googleapis.com/auth/cloud-platform",
21035	//     "https://www.googleapis.com/auth/compute",
21036	//     "https://www.googleapis.com/auth/compute.readonly"
21037	//   ]
21038	// }
21039
21040}
21041
21042// method id "compute.httpHealthChecks.update":
21043
21044type HttpHealthChecksUpdateCall struct {
21045	s               *Service
21046	project         string
21047	httpHealthCheck string
21048	httphealthcheck *HttpHealthCheck
21049	urlParams_      gensupport.URLParams
21050	ctx_            context.Context
21051}
21052
21053// Update: Updates a HttpHealthCheck resource in the specified project
21054// using the data included in the request.
21055// For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/update
21056func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall {
21057	c := &HttpHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21058	c.project = project
21059	c.httpHealthCheck = httpHealthCheck
21060	c.httphealthcheck = httphealthcheck
21061	return c
21062}
21063
21064// Fields allows partial responses to be retrieved. See
21065// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21066// for more information.
21067func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall {
21068	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21069	return c
21070}
21071
21072// Context sets the context to be used in this call's Do method. Any
21073// pending HTTP request will be aborted if the provided context is
21074// canceled.
21075func (c *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall {
21076	c.ctx_ = ctx
21077	return c
21078}
21079
21080func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
21081	var body io.Reader = nil
21082	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
21083	if err != nil {
21084		return nil, err
21085	}
21086	ctype := "application/json"
21087	c.urlParams_.Set("alt", alt)
21088	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}")
21089	urls += "?" + c.urlParams_.Encode()
21090	req, _ := http.NewRequest("PUT", urls, body)
21091	googleapi.Expand(req.URL, map[string]string{
21092		"project":         c.project,
21093		"httpHealthCheck": c.httpHealthCheck,
21094	})
21095	req.Header.Set("Content-Type", ctype)
21096	req.Header.Set("User-Agent", c.s.userAgent())
21097	if c.ctx_ != nil {
21098		return ctxhttp.Do(c.ctx_, c.s.client, req)
21099	}
21100	return c.s.client.Do(req)
21101}
21102
21103// Do executes the "compute.httpHealthChecks.update" call.
21104// Exactly one of *Operation or error will be non-nil. Any non-2xx
21105// status code is an error. Response headers are in either
21106// *Operation.ServerResponse.Header or (if a response was returned at
21107// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21108// to check whether the returned error was because
21109// http.StatusNotModified was returned.
21110func (c *HttpHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21111	gensupport.SetOptions(c.urlParams_, opts...)
21112	res, err := c.doRequest("json")
21113	if res != nil && res.StatusCode == http.StatusNotModified {
21114		if res.Body != nil {
21115			res.Body.Close()
21116		}
21117		return nil, &googleapi.Error{
21118			Code:   res.StatusCode,
21119			Header: res.Header,
21120		}
21121	}
21122	if err != nil {
21123		return nil, err
21124	}
21125	defer googleapi.CloseBody(res)
21126	if err := googleapi.CheckResponse(res); err != nil {
21127		return nil, err
21128	}
21129	ret := &Operation{
21130		ServerResponse: googleapi.ServerResponse{
21131			Header:         res.Header,
21132			HTTPStatusCode: res.StatusCode,
21133		},
21134	}
21135	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21136		return nil, err
21137	}
21138	return ret, nil
21139	// {
21140	//   "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.",
21141	//   "httpMethod": "PUT",
21142	//   "id": "compute.httpHealthChecks.update",
21143	//   "parameterOrder": [
21144	//     "project",
21145	//     "httpHealthCheck"
21146	//   ],
21147	//   "parameters": {
21148	//     "httpHealthCheck": {
21149	//       "description": "Name of the HttpHealthCheck resource to update.",
21150	//       "location": "path",
21151	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21152	//       "required": true,
21153	//       "type": "string"
21154	//     },
21155	//     "project": {
21156	//       "description": "Project ID for this request.",
21157	//       "location": "path",
21158	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21159	//       "required": true,
21160	//       "type": "string"
21161	//     }
21162	//   },
21163	//   "path": "{project}/global/httpHealthChecks/{httpHealthCheck}",
21164	//   "request": {
21165	//     "$ref": "HttpHealthCheck"
21166	//   },
21167	//   "response": {
21168	//     "$ref": "Operation"
21169	//   },
21170	//   "scopes": [
21171	//     "https://www.googleapis.com/auth/cloud-platform",
21172	//     "https://www.googleapis.com/auth/compute"
21173	//   ]
21174	// }
21175
21176}
21177
21178// method id "compute.httpsHealthChecks.delete":
21179
21180type HttpsHealthChecksDeleteCall struct {
21181	s                *Service
21182	project          string
21183	httpsHealthCheck string
21184	urlParams_       gensupport.URLParams
21185	ctx_             context.Context
21186}
21187
21188// Delete: Deletes the specified HttpsHealthCheck resource.
21189func (r *HttpsHealthChecksService) Delete(project string, httpsHealthCheck string) *HttpsHealthChecksDeleteCall {
21190	c := &HttpsHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21191	c.project = project
21192	c.httpsHealthCheck = httpsHealthCheck
21193	return c
21194}
21195
21196// Fields allows partial responses to be retrieved. See
21197// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21198// for more information.
21199func (c *HttpsHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpsHealthChecksDeleteCall {
21200	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21201	return c
21202}
21203
21204// Context sets the context to be used in this call's Do method. Any
21205// pending HTTP request will be aborted if the provided context is
21206// canceled.
21207func (c *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall {
21208	c.ctx_ = ctx
21209	return c
21210}
21211
21212func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
21213	var body io.Reader = nil
21214	c.urlParams_.Set("alt", alt)
21215	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
21216	urls += "?" + c.urlParams_.Encode()
21217	req, _ := http.NewRequest("DELETE", urls, body)
21218	googleapi.Expand(req.URL, map[string]string{
21219		"project":          c.project,
21220		"httpsHealthCheck": c.httpsHealthCheck,
21221	})
21222	req.Header.Set("User-Agent", c.s.userAgent())
21223	if c.ctx_ != nil {
21224		return ctxhttp.Do(c.ctx_, c.s.client, req)
21225	}
21226	return c.s.client.Do(req)
21227}
21228
21229// Do executes the "compute.httpsHealthChecks.delete" call.
21230// Exactly one of *Operation or error will be non-nil. Any non-2xx
21231// status code is an error. Response headers are in either
21232// *Operation.ServerResponse.Header or (if a response was returned at
21233// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21234// to check whether the returned error was because
21235// http.StatusNotModified was returned.
21236func (c *HttpsHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21237	gensupport.SetOptions(c.urlParams_, opts...)
21238	res, err := c.doRequest("json")
21239	if res != nil && res.StatusCode == http.StatusNotModified {
21240		if res.Body != nil {
21241			res.Body.Close()
21242		}
21243		return nil, &googleapi.Error{
21244			Code:   res.StatusCode,
21245			Header: res.Header,
21246		}
21247	}
21248	if err != nil {
21249		return nil, err
21250	}
21251	defer googleapi.CloseBody(res)
21252	if err := googleapi.CheckResponse(res); err != nil {
21253		return nil, err
21254	}
21255	ret := &Operation{
21256		ServerResponse: googleapi.ServerResponse{
21257			Header:         res.Header,
21258			HTTPStatusCode: res.StatusCode,
21259		},
21260	}
21261	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21262		return nil, err
21263	}
21264	return ret, nil
21265	// {
21266	//   "description": "Deletes the specified HttpsHealthCheck resource.",
21267	//   "httpMethod": "DELETE",
21268	//   "id": "compute.httpsHealthChecks.delete",
21269	//   "parameterOrder": [
21270	//     "project",
21271	//     "httpsHealthCheck"
21272	//   ],
21273	//   "parameters": {
21274	//     "httpsHealthCheck": {
21275	//       "description": "Name of the HttpsHealthCheck resource to delete.",
21276	//       "location": "path",
21277	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21278	//       "required": true,
21279	//       "type": "string"
21280	//     },
21281	//     "project": {
21282	//       "description": "Project ID for this request.",
21283	//       "location": "path",
21284	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21285	//       "required": true,
21286	//       "type": "string"
21287	//     }
21288	//   },
21289	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
21290	//   "response": {
21291	//     "$ref": "Operation"
21292	//   },
21293	//   "scopes": [
21294	//     "https://www.googleapis.com/auth/cloud-platform",
21295	//     "https://www.googleapis.com/auth/compute"
21296	//   ]
21297	// }
21298
21299}
21300
21301// method id "compute.httpsHealthChecks.get":
21302
21303type HttpsHealthChecksGetCall struct {
21304	s                *Service
21305	project          string
21306	httpsHealthCheck string
21307	urlParams_       gensupport.URLParams
21308	ifNoneMatch_     string
21309	ctx_             context.Context
21310}
21311
21312// Get: Returns the specified HttpsHealthCheck resource. Get a list of
21313// available HTTPS health checks by making a list() request.
21314func (r *HttpsHealthChecksService) Get(project string, httpsHealthCheck string) *HttpsHealthChecksGetCall {
21315	c := &HttpsHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21316	c.project = project
21317	c.httpsHealthCheck = httpsHealthCheck
21318	return c
21319}
21320
21321// Fields allows partial responses to be retrieved. See
21322// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21323// for more information.
21324func (c *HttpsHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpsHealthChecksGetCall {
21325	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21326	return c
21327}
21328
21329// IfNoneMatch sets the optional parameter which makes the operation
21330// fail if the object's ETag matches the given value. This is useful for
21331// getting updates only after the object has changed since the last
21332// request. Use googleapi.IsNotModified to check whether the response
21333// error from Do is the result of In-None-Match.
21334func (c *HttpsHealthChecksGetCall) IfNoneMatch(entityTag string) *HttpsHealthChecksGetCall {
21335	c.ifNoneMatch_ = entityTag
21336	return c
21337}
21338
21339// Context sets the context to be used in this call's Do method. Any
21340// pending HTTP request will be aborted if the provided context is
21341// canceled.
21342func (c *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall {
21343	c.ctx_ = ctx
21344	return c
21345}
21346
21347func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
21348	var body io.Reader = nil
21349	c.urlParams_.Set("alt", alt)
21350	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
21351	urls += "?" + c.urlParams_.Encode()
21352	req, _ := http.NewRequest("GET", urls, body)
21353	googleapi.Expand(req.URL, map[string]string{
21354		"project":          c.project,
21355		"httpsHealthCheck": c.httpsHealthCheck,
21356	})
21357	req.Header.Set("User-Agent", c.s.userAgent())
21358	if c.ifNoneMatch_ != "" {
21359		req.Header.Set("If-None-Match", c.ifNoneMatch_)
21360	}
21361	if c.ctx_ != nil {
21362		return ctxhttp.Do(c.ctx_, c.s.client, req)
21363	}
21364	return c.s.client.Do(req)
21365}
21366
21367// Do executes the "compute.httpsHealthChecks.get" call.
21368// Exactly one of *HttpsHealthCheck or error will be non-nil. Any
21369// non-2xx status code is an error. Response headers are in either
21370// *HttpsHealthCheck.ServerResponse.Header or (if a response was
21371// returned at all) in error.(*googleapi.Error).Header. Use
21372// googleapi.IsNotModified to check whether the returned error was
21373// because http.StatusNotModified was returned.
21374func (c *HttpsHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheck, error) {
21375	gensupport.SetOptions(c.urlParams_, opts...)
21376	res, err := c.doRequest("json")
21377	if res != nil && res.StatusCode == http.StatusNotModified {
21378		if res.Body != nil {
21379			res.Body.Close()
21380		}
21381		return nil, &googleapi.Error{
21382			Code:   res.StatusCode,
21383			Header: res.Header,
21384		}
21385	}
21386	if err != nil {
21387		return nil, err
21388	}
21389	defer googleapi.CloseBody(res)
21390	if err := googleapi.CheckResponse(res); err != nil {
21391		return nil, err
21392	}
21393	ret := &HttpsHealthCheck{
21394		ServerResponse: googleapi.ServerResponse{
21395			Header:         res.Header,
21396			HTTPStatusCode: res.StatusCode,
21397		},
21398	}
21399	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21400		return nil, err
21401	}
21402	return ret, nil
21403	// {
21404	//   "description": "Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request.",
21405	//   "httpMethod": "GET",
21406	//   "id": "compute.httpsHealthChecks.get",
21407	//   "parameterOrder": [
21408	//     "project",
21409	//     "httpsHealthCheck"
21410	//   ],
21411	//   "parameters": {
21412	//     "httpsHealthCheck": {
21413	//       "description": "Name of the HttpsHealthCheck resource to return.",
21414	//       "location": "path",
21415	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21416	//       "required": true,
21417	//       "type": "string"
21418	//     },
21419	//     "project": {
21420	//       "description": "Project ID for this request.",
21421	//       "location": "path",
21422	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21423	//       "required": true,
21424	//       "type": "string"
21425	//     }
21426	//   },
21427	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
21428	//   "response": {
21429	//     "$ref": "HttpsHealthCheck"
21430	//   },
21431	//   "scopes": [
21432	//     "https://www.googleapis.com/auth/cloud-platform",
21433	//     "https://www.googleapis.com/auth/compute",
21434	//     "https://www.googleapis.com/auth/compute.readonly"
21435	//   ]
21436	// }
21437
21438}
21439
21440// method id "compute.httpsHealthChecks.insert":
21441
21442type HttpsHealthChecksInsertCall struct {
21443	s                *Service
21444	project          string
21445	httpshealthcheck *HttpsHealthCheck
21446	urlParams_       gensupport.URLParams
21447	ctx_             context.Context
21448}
21449
21450// Insert: Creates a HttpsHealthCheck resource in the specified project
21451// using the data included in the request.
21452func (r *HttpsHealthChecksService) Insert(project string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksInsertCall {
21453	c := &HttpsHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21454	c.project = project
21455	c.httpshealthcheck = httpshealthcheck
21456	return c
21457}
21458
21459// Fields allows partial responses to be retrieved. See
21460// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21461// for more information.
21462func (c *HttpsHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpsHealthChecksInsertCall {
21463	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21464	return c
21465}
21466
21467// Context sets the context to be used in this call's Do method. Any
21468// pending HTTP request will be aborted if the provided context is
21469// canceled.
21470func (c *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall {
21471	c.ctx_ = ctx
21472	return c
21473}
21474
21475func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
21476	var body io.Reader = nil
21477	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
21478	if err != nil {
21479		return nil, err
21480	}
21481	ctype := "application/json"
21482	c.urlParams_.Set("alt", alt)
21483	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks")
21484	urls += "?" + c.urlParams_.Encode()
21485	req, _ := http.NewRequest("POST", urls, body)
21486	googleapi.Expand(req.URL, map[string]string{
21487		"project": c.project,
21488	})
21489	req.Header.Set("Content-Type", ctype)
21490	req.Header.Set("User-Agent", c.s.userAgent())
21491	if c.ctx_ != nil {
21492		return ctxhttp.Do(c.ctx_, c.s.client, req)
21493	}
21494	return c.s.client.Do(req)
21495}
21496
21497// Do executes the "compute.httpsHealthChecks.insert" call.
21498// Exactly one of *Operation or error will be non-nil. Any non-2xx
21499// status code is an error. Response headers are in either
21500// *Operation.ServerResponse.Header or (if a response was returned at
21501// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21502// to check whether the returned error was because
21503// http.StatusNotModified was returned.
21504func (c *HttpsHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21505	gensupport.SetOptions(c.urlParams_, opts...)
21506	res, err := c.doRequest("json")
21507	if res != nil && res.StatusCode == http.StatusNotModified {
21508		if res.Body != nil {
21509			res.Body.Close()
21510		}
21511		return nil, &googleapi.Error{
21512			Code:   res.StatusCode,
21513			Header: res.Header,
21514		}
21515	}
21516	if err != nil {
21517		return nil, err
21518	}
21519	defer googleapi.CloseBody(res)
21520	if err := googleapi.CheckResponse(res); err != nil {
21521		return nil, err
21522	}
21523	ret := &Operation{
21524		ServerResponse: googleapi.ServerResponse{
21525			Header:         res.Header,
21526			HTTPStatusCode: res.StatusCode,
21527		},
21528	}
21529	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21530		return nil, err
21531	}
21532	return ret, nil
21533	// {
21534	//   "description": "Creates a HttpsHealthCheck resource in the specified project using the data included in the request.",
21535	//   "httpMethod": "POST",
21536	//   "id": "compute.httpsHealthChecks.insert",
21537	//   "parameterOrder": [
21538	//     "project"
21539	//   ],
21540	//   "parameters": {
21541	//     "project": {
21542	//       "description": "Project ID for this request.",
21543	//       "location": "path",
21544	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21545	//       "required": true,
21546	//       "type": "string"
21547	//     }
21548	//   },
21549	//   "path": "{project}/global/httpsHealthChecks",
21550	//   "request": {
21551	//     "$ref": "HttpsHealthCheck"
21552	//   },
21553	//   "response": {
21554	//     "$ref": "Operation"
21555	//   },
21556	//   "scopes": [
21557	//     "https://www.googleapis.com/auth/cloud-platform",
21558	//     "https://www.googleapis.com/auth/compute"
21559	//   ]
21560	// }
21561
21562}
21563
21564// method id "compute.httpsHealthChecks.list":
21565
21566type HttpsHealthChecksListCall struct {
21567	s            *Service
21568	project      string
21569	urlParams_   gensupport.URLParams
21570	ifNoneMatch_ string
21571	ctx_         context.Context
21572}
21573
21574// List: Retrieves the list of HttpsHealthCheck resources available to
21575// the specified project.
21576func (r *HttpsHealthChecksService) List(project string) *HttpsHealthChecksListCall {
21577	c := &HttpsHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21578	c.project = project
21579	return c
21580}
21581
21582// Filter sets the optional parameter "filter": Sets a filter expression
21583// for filtering listed resources, in the form filter={expression}. Your
21584// {expression} must be in the format: field_name comparison_string
21585// literal_string.
21586//
21587// The field_name is the name of the field you want to compare. Only
21588// atomic field types are supported (string, number, boolean). The
21589// comparison_string must be either eq (equals) or ne (not equals). The
21590// literal_string is the string value to filter to. The literal value
21591// must be valid for the type of field you are filtering by (string,
21592// number, boolean). For string fields, the literal value is interpreted
21593// as a regular expression using RE2 syntax. The literal value must
21594// match the entire field.
21595//
21596// For example, to filter for instances that do not have a name of
21597// example-instance, you would use filter=name ne
21598// example-instance.
21599//
21600// Compute Engine Beta API Only: If you use filtering in the Beta API,
21601// you can also filter on nested fields. For example, you could filter
21602// on instances that have set the scheduling.automaticRestart field to
21603// true. In particular, use filtering on nested fields to take advantage
21604// of instance labels to organize and filter results based on label
21605// values.
21606//
21607// The Beta API also supports filtering on multiple expressions by
21608// providing each separate expression within parentheses. For example,
21609// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
21610// Multiple expressions are treated as AND expressions, meaning that
21611// resources must match all expressions to pass the filters.
21612func (c *HttpsHealthChecksListCall) Filter(filter string) *HttpsHealthChecksListCall {
21613	c.urlParams_.Set("filter", filter)
21614	return c
21615}
21616
21617// MaxResults sets the optional parameter "maxResults": The maximum
21618// number of results per page that should be returned. If the number of
21619// available results is larger than maxResults, Compute Engine returns a
21620// nextPageToken that can be used to get the next page of results in
21621// subsequent list requests.
21622func (c *HttpsHealthChecksListCall) MaxResults(maxResults int64) *HttpsHealthChecksListCall {
21623	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
21624	return c
21625}
21626
21627// OrderBy sets the optional parameter "orderBy": Sorts list results by
21628// a certain order. By default, results are returned in alphanumerical
21629// order based on the resource name.
21630//
21631// You can also sort results in descending order based on the creation
21632// timestamp using orderBy="creationTimestamp desc". This sorts results
21633// based on the creationTimestamp field in reverse chronological order
21634// (newest result first). Use this to sort resources like operations so
21635// that the newest operation is returned first.
21636//
21637// Currently, only sorting by name or creationTimestamp desc is
21638// supported.
21639func (c *HttpsHealthChecksListCall) OrderBy(orderBy string) *HttpsHealthChecksListCall {
21640	c.urlParams_.Set("orderBy", orderBy)
21641	return c
21642}
21643
21644// PageToken sets the optional parameter "pageToken": Specifies a page
21645// token to use. Set pageToken to the nextPageToken returned by a
21646// previous list request to get the next page of results.
21647func (c *HttpsHealthChecksListCall) PageToken(pageToken string) *HttpsHealthChecksListCall {
21648	c.urlParams_.Set("pageToken", pageToken)
21649	return c
21650}
21651
21652// Fields allows partial responses to be retrieved. See
21653// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21654// for more information.
21655func (c *HttpsHealthChecksListCall) Fields(s ...googleapi.Field) *HttpsHealthChecksListCall {
21656	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21657	return c
21658}
21659
21660// IfNoneMatch sets the optional parameter which makes the operation
21661// fail if the object's ETag matches the given value. This is useful for
21662// getting updates only after the object has changed since the last
21663// request. Use googleapi.IsNotModified to check whether the response
21664// error from Do is the result of In-None-Match.
21665func (c *HttpsHealthChecksListCall) IfNoneMatch(entityTag string) *HttpsHealthChecksListCall {
21666	c.ifNoneMatch_ = entityTag
21667	return c
21668}
21669
21670// Context sets the context to be used in this call's Do method. Any
21671// pending HTTP request will be aborted if the provided context is
21672// canceled.
21673func (c *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall {
21674	c.ctx_ = ctx
21675	return c
21676}
21677
21678func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) {
21679	var body io.Reader = nil
21680	c.urlParams_.Set("alt", alt)
21681	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks")
21682	urls += "?" + c.urlParams_.Encode()
21683	req, _ := http.NewRequest("GET", urls, body)
21684	googleapi.Expand(req.URL, map[string]string{
21685		"project": c.project,
21686	})
21687	req.Header.Set("User-Agent", c.s.userAgent())
21688	if c.ifNoneMatch_ != "" {
21689		req.Header.Set("If-None-Match", c.ifNoneMatch_)
21690	}
21691	if c.ctx_ != nil {
21692		return ctxhttp.Do(c.ctx_, c.s.client, req)
21693	}
21694	return c.s.client.Do(req)
21695}
21696
21697// Do executes the "compute.httpsHealthChecks.list" call.
21698// Exactly one of *HttpsHealthCheckList or error will be non-nil. Any
21699// non-2xx status code is an error. Response headers are in either
21700// *HttpsHealthCheckList.ServerResponse.Header or (if a response was
21701// returned at all) in error.(*googleapi.Error).Header. Use
21702// googleapi.IsNotModified to check whether the returned error was
21703// because http.StatusNotModified was returned.
21704func (c *HttpsHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HttpsHealthCheckList, error) {
21705	gensupport.SetOptions(c.urlParams_, opts...)
21706	res, err := c.doRequest("json")
21707	if res != nil && res.StatusCode == http.StatusNotModified {
21708		if res.Body != nil {
21709			res.Body.Close()
21710		}
21711		return nil, &googleapi.Error{
21712			Code:   res.StatusCode,
21713			Header: res.Header,
21714		}
21715	}
21716	if err != nil {
21717		return nil, err
21718	}
21719	defer googleapi.CloseBody(res)
21720	if err := googleapi.CheckResponse(res); err != nil {
21721		return nil, err
21722	}
21723	ret := &HttpsHealthCheckList{
21724		ServerResponse: googleapi.ServerResponse{
21725			Header:         res.Header,
21726			HTTPStatusCode: res.StatusCode,
21727		},
21728	}
21729	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21730		return nil, err
21731	}
21732	return ret, nil
21733	// {
21734	//   "description": "Retrieves the list of HttpsHealthCheck resources available to the specified project.",
21735	//   "httpMethod": "GET",
21736	//   "id": "compute.httpsHealthChecks.list",
21737	//   "parameterOrder": [
21738	//     "project"
21739	//   ],
21740	//   "parameters": {
21741	//     "filter": {
21742	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
21743	//       "location": "query",
21744	//       "type": "string"
21745	//     },
21746	//     "maxResults": {
21747	//       "default": "500",
21748	//       "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.",
21749	//       "format": "uint32",
21750	//       "location": "query",
21751	//       "maximum": "500",
21752	//       "minimum": "0",
21753	//       "type": "integer"
21754	//     },
21755	//     "orderBy": {
21756	//       "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.",
21757	//       "location": "query",
21758	//       "type": "string"
21759	//     },
21760	//     "pageToken": {
21761	//       "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.",
21762	//       "location": "query",
21763	//       "type": "string"
21764	//     },
21765	//     "project": {
21766	//       "description": "Project ID for this request.",
21767	//       "location": "path",
21768	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21769	//       "required": true,
21770	//       "type": "string"
21771	//     }
21772	//   },
21773	//   "path": "{project}/global/httpsHealthChecks",
21774	//   "response": {
21775	//     "$ref": "HttpsHealthCheckList"
21776	//   },
21777	//   "scopes": [
21778	//     "https://www.googleapis.com/auth/cloud-platform",
21779	//     "https://www.googleapis.com/auth/compute",
21780	//     "https://www.googleapis.com/auth/compute.readonly"
21781	//   ]
21782	// }
21783
21784}
21785
21786// Pages invokes f for each page of results.
21787// A non-nil error returned from f will halt the iteration.
21788// The provided context supersedes any context provided to the Context method.
21789func (c *HttpsHealthChecksListCall) Pages(ctx context.Context, f func(*HttpsHealthCheckList) error) error {
21790	c.ctx_ = ctx
21791	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
21792	for {
21793		x, err := c.Do()
21794		if err != nil {
21795			return err
21796		}
21797		if err := f(x); err != nil {
21798			return err
21799		}
21800		if x.NextPageToken == "" {
21801			return nil
21802		}
21803		c.PageToken(x.NextPageToken)
21804	}
21805}
21806
21807// method id "compute.httpsHealthChecks.patch":
21808
21809type HttpsHealthChecksPatchCall struct {
21810	s                *Service
21811	project          string
21812	httpsHealthCheck string
21813	httpshealthcheck *HttpsHealthCheck
21814	urlParams_       gensupport.URLParams
21815	ctx_             context.Context
21816}
21817
21818// Patch: Updates a HttpsHealthCheck resource in the specified project
21819// using the data included in the request. This method supports patch
21820// semantics.
21821func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall {
21822	c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21823	c.project = project
21824	c.httpsHealthCheck = httpsHealthCheck
21825	c.httpshealthcheck = httpshealthcheck
21826	return c
21827}
21828
21829// Fields allows partial responses to be retrieved. See
21830// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21831// for more information.
21832func (c *HttpsHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpsHealthChecksPatchCall {
21833	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21834	return c
21835}
21836
21837// Context sets the context to be used in this call's Do method. Any
21838// pending HTTP request will be aborted if the provided context is
21839// canceled.
21840func (c *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall {
21841	c.ctx_ = ctx
21842	return c
21843}
21844
21845func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
21846	var body io.Reader = nil
21847	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
21848	if err != nil {
21849		return nil, err
21850	}
21851	ctype := "application/json"
21852	c.urlParams_.Set("alt", alt)
21853	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
21854	urls += "?" + c.urlParams_.Encode()
21855	req, _ := http.NewRequest("PATCH", urls, body)
21856	googleapi.Expand(req.URL, map[string]string{
21857		"project":          c.project,
21858		"httpsHealthCheck": c.httpsHealthCheck,
21859	})
21860	req.Header.Set("Content-Type", ctype)
21861	req.Header.Set("User-Agent", c.s.userAgent())
21862	if c.ctx_ != nil {
21863		return ctxhttp.Do(c.ctx_, c.s.client, req)
21864	}
21865	return c.s.client.Do(req)
21866}
21867
21868// Do executes the "compute.httpsHealthChecks.patch" call.
21869// Exactly one of *Operation or error will be non-nil. Any non-2xx
21870// status code is an error. Response headers are in either
21871// *Operation.ServerResponse.Header or (if a response was returned at
21872// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
21873// to check whether the returned error was because
21874// http.StatusNotModified was returned.
21875func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
21876	gensupport.SetOptions(c.urlParams_, opts...)
21877	res, err := c.doRequest("json")
21878	if res != nil && res.StatusCode == http.StatusNotModified {
21879		if res.Body != nil {
21880			res.Body.Close()
21881		}
21882		return nil, &googleapi.Error{
21883			Code:   res.StatusCode,
21884			Header: res.Header,
21885		}
21886	}
21887	if err != nil {
21888		return nil, err
21889	}
21890	defer googleapi.CloseBody(res)
21891	if err := googleapi.CheckResponse(res); err != nil {
21892		return nil, err
21893	}
21894	ret := &Operation{
21895		ServerResponse: googleapi.ServerResponse{
21896			Header:         res.Header,
21897			HTTPStatusCode: res.StatusCode,
21898		},
21899	}
21900	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
21901		return nil, err
21902	}
21903	return ret, nil
21904	// {
21905	//   "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.",
21906	//   "httpMethod": "PATCH",
21907	//   "id": "compute.httpsHealthChecks.patch",
21908	//   "parameterOrder": [
21909	//     "project",
21910	//     "httpsHealthCheck"
21911	//   ],
21912	//   "parameters": {
21913	//     "httpsHealthCheck": {
21914	//       "description": "Name of the HttpsHealthCheck resource to update.",
21915	//       "location": "path",
21916	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
21917	//       "required": true,
21918	//       "type": "string"
21919	//     },
21920	//     "project": {
21921	//       "description": "Project ID for this request.",
21922	//       "location": "path",
21923	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
21924	//       "required": true,
21925	//       "type": "string"
21926	//     }
21927	//   },
21928	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
21929	//   "request": {
21930	//     "$ref": "HttpsHealthCheck"
21931	//   },
21932	//   "response": {
21933	//     "$ref": "Operation"
21934	//   },
21935	//   "scopes": [
21936	//     "https://www.googleapis.com/auth/cloud-platform",
21937	//     "https://www.googleapis.com/auth/compute"
21938	//   ]
21939	// }
21940
21941}
21942
21943// method id "compute.httpsHealthChecks.testIamPermissions":
21944
21945type HttpsHealthChecksTestIamPermissionsCall struct {
21946	s                      *Service
21947	project                string
21948	resource               string
21949	testpermissionsrequest *TestPermissionsRequest
21950	urlParams_             gensupport.URLParams
21951	ctx_                   context.Context
21952}
21953
21954// TestIamPermissions: Returns permissions that a caller has on the
21955// specified resource.
21956func (r *HttpsHealthChecksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *HttpsHealthChecksTestIamPermissionsCall {
21957	c := &HttpsHealthChecksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
21958	c.project = project
21959	c.resource = resource
21960	c.testpermissionsrequest = testpermissionsrequest
21961	return c
21962}
21963
21964// Fields allows partial responses to be retrieved. See
21965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
21966// for more information.
21967func (c *HttpsHealthChecksTestIamPermissionsCall) Fields(s ...googleapi.Field) *HttpsHealthChecksTestIamPermissionsCall {
21968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
21969	return c
21970}
21971
21972// Context sets the context to be used in this call's Do method. Any
21973// pending HTTP request will be aborted if the provided context is
21974// canceled.
21975func (c *HttpsHealthChecksTestIamPermissionsCall) Context(ctx context.Context) *HttpsHealthChecksTestIamPermissionsCall {
21976	c.ctx_ = ctx
21977	return c
21978}
21979
21980func (c *HttpsHealthChecksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
21981	var body io.Reader = nil
21982	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
21983	if err != nil {
21984		return nil, err
21985	}
21986	ctype := "application/json"
21987	c.urlParams_.Set("alt", alt)
21988	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{resource}/testIamPermissions")
21989	urls += "?" + c.urlParams_.Encode()
21990	req, _ := http.NewRequest("POST", urls, body)
21991	googleapi.Expand(req.URL, map[string]string{
21992		"project":  c.project,
21993		"resource": c.resource,
21994	})
21995	req.Header.Set("Content-Type", ctype)
21996	req.Header.Set("User-Agent", c.s.userAgent())
21997	if c.ctx_ != nil {
21998		return ctxhttp.Do(c.ctx_, c.s.client, req)
21999	}
22000	return c.s.client.Do(req)
22001}
22002
22003// Do executes the "compute.httpsHealthChecks.testIamPermissions" call.
22004// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
22005// non-2xx status code is an error. Response headers are in either
22006// *TestPermissionsResponse.ServerResponse.Header or (if a response was
22007// returned at all) in error.(*googleapi.Error).Header. Use
22008// googleapi.IsNotModified to check whether the returned error was
22009// because http.StatusNotModified was returned.
22010func (c *HttpsHealthChecksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
22011	gensupport.SetOptions(c.urlParams_, opts...)
22012	res, err := c.doRequest("json")
22013	if res != nil && res.StatusCode == http.StatusNotModified {
22014		if res.Body != nil {
22015			res.Body.Close()
22016		}
22017		return nil, &googleapi.Error{
22018			Code:   res.StatusCode,
22019			Header: res.Header,
22020		}
22021	}
22022	if err != nil {
22023		return nil, err
22024	}
22025	defer googleapi.CloseBody(res)
22026	if err := googleapi.CheckResponse(res); err != nil {
22027		return nil, err
22028	}
22029	ret := &TestPermissionsResponse{
22030		ServerResponse: googleapi.ServerResponse{
22031			Header:         res.Header,
22032			HTTPStatusCode: res.StatusCode,
22033		},
22034	}
22035	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22036		return nil, err
22037	}
22038	return ret, nil
22039	// {
22040	//   "description": "Returns permissions that a caller has on the specified resource.",
22041	//   "httpMethod": "POST",
22042	//   "id": "compute.httpsHealthChecks.testIamPermissions",
22043	//   "parameterOrder": [
22044	//     "project",
22045	//     "resource"
22046	//   ],
22047	//   "parameters": {
22048	//     "project": {
22049	//       "description": "Project ID for this request.",
22050	//       "location": "path",
22051	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22052	//       "required": true,
22053	//       "type": "string"
22054	//     },
22055	//     "resource": {
22056	//       "description": "Name of the resource for this request.",
22057	//       "location": "path",
22058	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
22059	//       "required": true,
22060	//       "type": "string"
22061	//     }
22062	//   },
22063	//   "path": "{project}/global/httpsHealthChecks/{resource}/testIamPermissions",
22064	//   "request": {
22065	//     "$ref": "TestPermissionsRequest"
22066	//   },
22067	//   "response": {
22068	//     "$ref": "TestPermissionsResponse"
22069	//   },
22070	//   "scopes": [
22071	//     "https://www.googleapis.com/auth/cloud-platform",
22072	//     "https://www.googleapis.com/auth/compute",
22073	//     "https://www.googleapis.com/auth/compute.readonly"
22074	//   ]
22075	// }
22076
22077}
22078
22079// method id "compute.httpsHealthChecks.update":
22080
22081type HttpsHealthChecksUpdateCall struct {
22082	s                *Service
22083	project          string
22084	httpsHealthCheck string
22085	httpshealthcheck *HttpsHealthCheck
22086	urlParams_       gensupport.URLParams
22087	ctx_             context.Context
22088}
22089
22090// Update: Updates a HttpsHealthCheck resource in the specified project
22091// using the data included in the request.
22092func (r *HttpsHealthChecksService) Update(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksUpdateCall {
22093	c := &HttpsHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22094	c.project = project
22095	c.httpsHealthCheck = httpsHealthCheck
22096	c.httpshealthcheck = httpshealthcheck
22097	return c
22098}
22099
22100// Fields allows partial responses to be retrieved. See
22101// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22102// for more information.
22103func (c *HttpsHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpsHealthChecksUpdateCall {
22104	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22105	return c
22106}
22107
22108// Context sets the context to be used in this call's Do method. Any
22109// pending HTTP request will be aborted if the provided context is
22110// canceled.
22111func (c *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall {
22112	c.ctx_ = ctx
22113	return c
22114}
22115
22116func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
22117	var body io.Reader = nil
22118	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
22119	if err != nil {
22120		return nil, err
22121	}
22122	ctype := "application/json"
22123	c.urlParams_.Set("alt", alt)
22124	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpsHealthChecks/{httpsHealthCheck}")
22125	urls += "?" + c.urlParams_.Encode()
22126	req, _ := http.NewRequest("PUT", urls, body)
22127	googleapi.Expand(req.URL, map[string]string{
22128		"project":          c.project,
22129		"httpsHealthCheck": c.httpsHealthCheck,
22130	})
22131	req.Header.Set("Content-Type", ctype)
22132	req.Header.Set("User-Agent", c.s.userAgent())
22133	if c.ctx_ != nil {
22134		return ctxhttp.Do(c.ctx_, c.s.client, req)
22135	}
22136	return c.s.client.Do(req)
22137}
22138
22139// Do executes the "compute.httpsHealthChecks.update" call.
22140// Exactly one of *Operation or error will be non-nil. Any non-2xx
22141// status code is an error. Response headers are in either
22142// *Operation.ServerResponse.Header or (if a response was returned at
22143// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22144// to check whether the returned error was because
22145// http.StatusNotModified was returned.
22146func (c *HttpsHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22147	gensupport.SetOptions(c.urlParams_, opts...)
22148	res, err := c.doRequest("json")
22149	if res != nil && res.StatusCode == http.StatusNotModified {
22150		if res.Body != nil {
22151			res.Body.Close()
22152		}
22153		return nil, &googleapi.Error{
22154			Code:   res.StatusCode,
22155			Header: res.Header,
22156		}
22157	}
22158	if err != nil {
22159		return nil, err
22160	}
22161	defer googleapi.CloseBody(res)
22162	if err := googleapi.CheckResponse(res); err != nil {
22163		return nil, err
22164	}
22165	ret := &Operation{
22166		ServerResponse: googleapi.ServerResponse{
22167			Header:         res.Header,
22168			HTTPStatusCode: res.StatusCode,
22169		},
22170	}
22171	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22172		return nil, err
22173	}
22174	return ret, nil
22175	// {
22176	//   "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request.",
22177	//   "httpMethod": "PUT",
22178	//   "id": "compute.httpsHealthChecks.update",
22179	//   "parameterOrder": [
22180	//     "project",
22181	//     "httpsHealthCheck"
22182	//   ],
22183	//   "parameters": {
22184	//     "httpsHealthCheck": {
22185	//       "description": "Name of the HttpsHealthCheck resource to update.",
22186	//       "location": "path",
22187	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
22188	//       "required": true,
22189	//       "type": "string"
22190	//     },
22191	//     "project": {
22192	//       "description": "Project ID for this request.",
22193	//       "location": "path",
22194	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22195	//       "required": true,
22196	//       "type": "string"
22197	//     }
22198	//   },
22199	//   "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}",
22200	//   "request": {
22201	//     "$ref": "HttpsHealthCheck"
22202	//   },
22203	//   "response": {
22204	//     "$ref": "Operation"
22205	//   },
22206	//   "scopes": [
22207	//     "https://www.googleapis.com/auth/cloud-platform",
22208	//     "https://www.googleapis.com/auth/compute"
22209	//   ]
22210	// }
22211
22212}
22213
22214// method id "compute.images.delete":
22215
22216type ImagesDeleteCall struct {
22217	s          *Service
22218	project    string
22219	image      string
22220	urlParams_ gensupport.URLParams
22221	ctx_       context.Context
22222}
22223
22224// Delete: Deletes the specified image.
22225// For details, see https://cloud.google.com/compute/docs/reference/latest/images/delete
22226func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall {
22227	c := &ImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22228	c.project = project
22229	c.image = image
22230	return c
22231}
22232
22233// Fields allows partial responses to be retrieved. See
22234// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22235// for more information.
22236func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall {
22237	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22238	return c
22239}
22240
22241// Context sets the context to be used in this call's Do method. Any
22242// pending HTTP request will be aborted if the provided context is
22243// canceled.
22244func (c *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall {
22245	c.ctx_ = ctx
22246	return c
22247}
22248
22249func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) {
22250	var body io.Reader = nil
22251	c.urlParams_.Set("alt", alt)
22252	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}")
22253	urls += "?" + c.urlParams_.Encode()
22254	req, _ := http.NewRequest("DELETE", urls, body)
22255	googleapi.Expand(req.URL, map[string]string{
22256		"project": c.project,
22257		"image":   c.image,
22258	})
22259	req.Header.Set("User-Agent", c.s.userAgent())
22260	if c.ctx_ != nil {
22261		return ctxhttp.Do(c.ctx_, c.s.client, req)
22262	}
22263	return c.s.client.Do(req)
22264}
22265
22266// Do executes the "compute.images.delete" call.
22267// Exactly one of *Operation or error will be non-nil. Any non-2xx
22268// status code is an error. Response headers are in either
22269// *Operation.ServerResponse.Header or (if a response was returned at
22270// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22271// to check whether the returned error was because
22272// http.StatusNotModified was returned.
22273func (c *ImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22274	gensupport.SetOptions(c.urlParams_, opts...)
22275	res, err := c.doRequest("json")
22276	if res != nil && res.StatusCode == http.StatusNotModified {
22277		if res.Body != nil {
22278			res.Body.Close()
22279		}
22280		return nil, &googleapi.Error{
22281			Code:   res.StatusCode,
22282			Header: res.Header,
22283		}
22284	}
22285	if err != nil {
22286		return nil, err
22287	}
22288	defer googleapi.CloseBody(res)
22289	if err := googleapi.CheckResponse(res); err != nil {
22290		return nil, err
22291	}
22292	ret := &Operation{
22293		ServerResponse: googleapi.ServerResponse{
22294			Header:         res.Header,
22295			HTTPStatusCode: res.StatusCode,
22296		},
22297	}
22298	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22299		return nil, err
22300	}
22301	return ret, nil
22302	// {
22303	//   "description": "Deletes the specified image.",
22304	//   "httpMethod": "DELETE",
22305	//   "id": "compute.images.delete",
22306	//   "parameterOrder": [
22307	//     "project",
22308	//     "image"
22309	//   ],
22310	//   "parameters": {
22311	//     "image": {
22312	//       "description": "Name of the image resource to delete.",
22313	//       "location": "path",
22314	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
22315	//       "required": true,
22316	//       "type": "string"
22317	//     },
22318	//     "project": {
22319	//       "description": "Project ID for this request.",
22320	//       "location": "path",
22321	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22322	//       "required": true,
22323	//       "type": "string"
22324	//     }
22325	//   },
22326	//   "path": "{project}/global/images/{image}",
22327	//   "response": {
22328	//     "$ref": "Operation"
22329	//   },
22330	//   "scopes": [
22331	//     "https://www.googleapis.com/auth/cloud-platform",
22332	//     "https://www.googleapis.com/auth/compute"
22333	//   ]
22334	// }
22335
22336}
22337
22338// method id "compute.images.deprecate":
22339
22340type ImagesDeprecateCall struct {
22341	s                 *Service
22342	project           string
22343	image             string
22344	deprecationstatus *DeprecationStatus
22345	urlParams_        gensupport.URLParams
22346	ctx_              context.Context
22347}
22348
22349// Deprecate: Sets the deprecation status of an image.
22350//
22351// If an empty request body is given, clears the deprecation status
22352// instead.
22353// For details, see https://cloud.google.com/compute/docs/reference/latest/images/deprecate
22354func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall {
22355	c := &ImagesDeprecateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22356	c.project = project
22357	c.image = image
22358	c.deprecationstatus = deprecationstatus
22359	return c
22360}
22361
22362// Fields allows partial responses to be retrieved. See
22363// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22364// for more information.
22365func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall {
22366	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22367	return c
22368}
22369
22370// Context sets the context to be used in this call's Do method. Any
22371// pending HTTP request will be aborted if the provided context is
22372// canceled.
22373func (c *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall {
22374	c.ctx_ = ctx
22375	return c
22376}
22377
22378func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) {
22379	var body io.Reader = nil
22380	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus)
22381	if err != nil {
22382		return nil, err
22383	}
22384	ctype := "application/json"
22385	c.urlParams_.Set("alt", alt)
22386	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate")
22387	urls += "?" + c.urlParams_.Encode()
22388	req, _ := http.NewRequest("POST", urls, body)
22389	googleapi.Expand(req.URL, map[string]string{
22390		"project": c.project,
22391		"image":   c.image,
22392	})
22393	req.Header.Set("Content-Type", ctype)
22394	req.Header.Set("User-Agent", c.s.userAgent())
22395	if c.ctx_ != nil {
22396		return ctxhttp.Do(c.ctx_, c.s.client, req)
22397	}
22398	return c.s.client.Do(req)
22399}
22400
22401// Do executes the "compute.images.deprecate" call.
22402// Exactly one of *Operation or error will be non-nil. Any non-2xx
22403// status code is an error. Response headers are in either
22404// *Operation.ServerResponse.Header or (if a response was returned at
22405// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22406// to check whether the returned error was because
22407// http.StatusNotModified was returned.
22408func (c *ImagesDeprecateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22409	gensupport.SetOptions(c.urlParams_, opts...)
22410	res, err := c.doRequest("json")
22411	if res != nil && res.StatusCode == http.StatusNotModified {
22412		if res.Body != nil {
22413			res.Body.Close()
22414		}
22415		return nil, &googleapi.Error{
22416			Code:   res.StatusCode,
22417			Header: res.Header,
22418		}
22419	}
22420	if err != nil {
22421		return nil, err
22422	}
22423	defer googleapi.CloseBody(res)
22424	if err := googleapi.CheckResponse(res); err != nil {
22425		return nil, err
22426	}
22427	ret := &Operation{
22428		ServerResponse: googleapi.ServerResponse{
22429			Header:         res.Header,
22430			HTTPStatusCode: res.StatusCode,
22431		},
22432	}
22433	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22434		return nil, err
22435	}
22436	return ret, nil
22437	// {
22438	//   "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.",
22439	//   "httpMethod": "POST",
22440	//   "id": "compute.images.deprecate",
22441	//   "parameterOrder": [
22442	//     "project",
22443	//     "image"
22444	//   ],
22445	//   "parameters": {
22446	//     "image": {
22447	//       "description": "Image name.",
22448	//       "location": "path",
22449	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
22450	//       "required": true,
22451	//       "type": "string"
22452	//     },
22453	//     "project": {
22454	//       "description": "Project ID for this request.",
22455	//       "location": "path",
22456	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22457	//       "required": true,
22458	//       "type": "string"
22459	//     }
22460	//   },
22461	//   "path": "{project}/global/images/{image}/deprecate",
22462	//   "request": {
22463	//     "$ref": "DeprecationStatus"
22464	//   },
22465	//   "response": {
22466	//     "$ref": "Operation"
22467	//   },
22468	//   "scopes": [
22469	//     "https://www.googleapis.com/auth/cloud-platform",
22470	//     "https://www.googleapis.com/auth/compute"
22471	//   ]
22472	// }
22473
22474}
22475
22476// method id "compute.images.get":
22477
22478type ImagesGetCall struct {
22479	s            *Service
22480	project      string
22481	image        string
22482	urlParams_   gensupport.URLParams
22483	ifNoneMatch_ string
22484	ctx_         context.Context
22485}
22486
22487// Get: Returns the specified image. Get a list of available images by
22488// making a list() request.
22489// For details, see https://cloud.google.com/compute/docs/reference/latest/images/get
22490func (r *ImagesService) Get(project string, image string) *ImagesGetCall {
22491	c := &ImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22492	c.project = project
22493	c.image = image
22494	return c
22495}
22496
22497// Fields allows partial responses to be retrieved. See
22498// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22499// for more information.
22500func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall {
22501	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22502	return c
22503}
22504
22505// IfNoneMatch sets the optional parameter which makes the operation
22506// fail if the object's ETag matches the given value. This is useful for
22507// getting updates only after the object has changed since the last
22508// request. Use googleapi.IsNotModified to check whether the response
22509// error from Do is the result of In-None-Match.
22510func (c *ImagesGetCall) IfNoneMatch(entityTag string) *ImagesGetCall {
22511	c.ifNoneMatch_ = entityTag
22512	return c
22513}
22514
22515// Context sets the context to be used in this call's Do method. Any
22516// pending HTTP request will be aborted if the provided context is
22517// canceled.
22518func (c *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall {
22519	c.ctx_ = ctx
22520	return c
22521}
22522
22523func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) {
22524	var body io.Reader = nil
22525	c.urlParams_.Set("alt", alt)
22526	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}")
22527	urls += "?" + c.urlParams_.Encode()
22528	req, _ := http.NewRequest("GET", urls, body)
22529	googleapi.Expand(req.URL, map[string]string{
22530		"project": c.project,
22531		"image":   c.image,
22532	})
22533	req.Header.Set("User-Agent", c.s.userAgent())
22534	if c.ifNoneMatch_ != "" {
22535		req.Header.Set("If-None-Match", c.ifNoneMatch_)
22536	}
22537	if c.ctx_ != nil {
22538		return ctxhttp.Do(c.ctx_, c.s.client, req)
22539	}
22540	return c.s.client.Do(req)
22541}
22542
22543// Do executes the "compute.images.get" call.
22544// Exactly one of *Image or error will be non-nil. Any non-2xx status
22545// code is an error. Response headers are in either
22546// *Image.ServerResponse.Header or (if a response was returned at all)
22547// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22548// check whether the returned error was because http.StatusNotModified
22549// was returned.
22550func (c *ImagesGetCall) Do(opts ...googleapi.CallOption) (*Image, error) {
22551	gensupport.SetOptions(c.urlParams_, opts...)
22552	res, err := c.doRequest("json")
22553	if res != nil && res.StatusCode == http.StatusNotModified {
22554		if res.Body != nil {
22555			res.Body.Close()
22556		}
22557		return nil, &googleapi.Error{
22558			Code:   res.StatusCode,
22559			Header: res.Header,
22560		}
22561	}
22562	if err != nil {
22563		return nil, err
22564	}
22565	defer googleapi.CloseBody(res)
22566	if err := googleapi.CheckResponse(res); err != nil {
22567		return nil, err
22568	}
22569	ret := &Image{
22570		ServerResponse: googleapi.ServerResponse{
22571			Header:         res.Header,
22572			HTTPStatusCode: res.StatusCode,
22573		},
22574	}
22575	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22576		return nil, err
22577	}
22578	return ret, nil
22579	// {
22580	//   "description": "Returns the specified image. Get a list of available images by making a list() request.",
22581	//   "httpMethod": "GET",
22582	//   "id": "compute.images.get",
22583	//   "parameterOrder": [
22584	//     "project",
22585	//     "image"
22586	//   ],
22587	//   "parameters": {
22588	//     "image": {
22589	//       "description": "Name of the image resource to return.",
22590	//       "location": "path",
22591	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
22592	//       "required": true,
22593	//       "type": "string"
22594	//     },
22595	//     "project": {
22596	//       "description": "Project ID for this request.",
22597	//       "location": "path",
22598	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22599	//       "required": true,
22600	//       "type": "string"
22601	//     }
22602	//   },
22603	//   "path": "{project}/global/images/{image}",
22604	//   "response": {
22605	//     "$ref": "Image"
22606	//   },
22607	//   "scopes": [
22608	//     "https://www.googleapis.com/auth/cloud-platform",
22609	//     "https://www.googleapis.com/auth/compute",
22610	//     "https://www.googleapis.com/auth/compute.readonly"
22611	//   ]
22612	// }
22613
22614}
22615
22616// method id "compute.images.getFromFamily":
22617
22618type ImagesGetFromFamilyCall struct {
22619	s            *Service
22620	project      string
22621	family       string
22622	urlParams_   gensupport.URLParams
22623	ifNoneMatch_ string
22624	ctx_         context.Context
22625}
22626
22627// GetFromFamily: Returns the latest undeprecated image for an image
22628// family.
22629func (r *ImagesService) GetFromFamily(project string, family string) *ImagesGetFromFamilyCall {
22630	c := &ImagesGetFromFamilyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22631	c.project = project
22632	c.family = family
22633	return c
22634}
22635
22636// Fields allows partial responses to be retrieved. See
22637// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22638// for more information.
22639func (c *ImagesGetFromFamilyCall) Fields(s ...googleapi.Field) *ImagesGetFromFamilyCall {
22640	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22641	return c
22642}
22643
22644// IfNoneMatch sets the optional parameter which makes the operation
22645// fail if the object's ETag matches the given value. This is useful for
22646// getting updates only after the object has changed since the last
22647// request. Use googleapi.IsNotModified to check whether the response
22648// error from Do is the result of In-None-Match.
22649func (c *ImagesGetFromFamilyCall) IfNoneMatch(entityTag string) *ImagesGetFromFamilyCall {
22650	c.ifNoneMatch_ = entityTag
22651	return c
22652}
22653
22654// Context sets the context to be used in this call's Do method. Any
22655// pending HTTP request will be aborted if the provided context is
22656// canceled.
22657func (c *ImagesGetFromFamilyCall) Context(ctx context.Context) *ImagesGetFromFamilyCall {
22658	c.ctx_ = ctx
22659	return c
22660}
22661
22662func (c *ImagesGetFromFamilyCall) doRequest(alt string) (*http.Response, error) {
22663	var body io.Reader = nil
22664	c.urlParams_.Set("alt", alt)
22665	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/family/{family}")
22666	urls += "?" + c.urlParams_.Encode()
22667	req, _ := http.NewRequest("GET", urls, body)
22668	googleapi.Expand(req.URL, map[string]string{
22669		"project": c.project,
22670		"family":  c.family,
22671	})
22672	req.Header.Set("User-Agent", c.s.userAgent())
22673	if c.ifNoneMatch_ != "" {
22674		req.Header.Set("If-None-Match", c.ifNoneMatch_)
22675	}
22676	if c.ctx_ != nil {
22677		return ctxhttp.Do(c.ctx_, c.s.client, req)
22678	}
22679	return c.s.client.Do(req)
22680}
22681
22682// Do executes the "compute.images.getFromFamily" call.
22683// Exactly one of *Image or error will be non-nil. Any non-2xx status
22684// code is an error. Response headers are in either
22685// *Image.ServerResponse.Header or (if a response was returned at all)
22686// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
22687// check whether the returned error was because http.StatusNotModified
22688// was returned.
22689func (c *ImagesGetFromFamilyCall) Do(opts ...googleapi.CallOption) (*Image, error) {
22690	gensupport.SetOptions(c.urlParams_, opts...)
22691	res, err := c.doRequest("json")
22692	if res != nil && res.StatusCode == http.StatusNotModified {
22693		if res.Body != nil {
22694			res.Body.Close()
22695		}
22696		return nil, &googleapi.Error{
22697			Code:   res.StatusCode,
22698			Header: res.Header,
22699		}
22700	}
22701	if err != nil {
22702		return nil, err
22703	}
22704	defer googleapi.CloseBody(res)
22705	if err := googleapi.CheckResponse(res); err != nil {
22706		return nil, err
22707	}
22708	ret := &Image{
22709		ServerResponse: googleapi.ServerResponse{
22710			Header:         res.Header,
22711			HTTPStatusCode: res.StatusCode,
22712		},
22713	}
22714	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22715		return nil, err
22716	}
22717	return ret, nil
22718	// {
22719	//   "description": "Returns the latest undeprecated image for an image family.",
22720	//   "httpMethod": "GET",
22721	//   "id": "compute.images.getFromFamily",
22722	//   "parameterOrder": [
22723	//     "project",
22724	//     "family"
22725	//   ],
22726	//   "parameters": {
22727	//     "family": {
22728	//       "description": "Name of the image resource to return.",
22729	//       "location": "path",
22730	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
22731	//       "required": true,
22732	//       "type": "string"
22733	//     },
22734	//     "project": {
22735	//       "description": "Project ID for this request.",
22736	//       "location": "path",
22737	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22738	//       "required": true,
22739	//       "type": "string"
22740	//     }
22741	//   },
22742	//   "path": "{project}/global/images/family/{family}",
22743	//   "response": {
22744	//     "$ref": "Image"
22745	//   },
22746	//   "scopes": [
22747	//     "https://www.googleapis.com/auth/cloud-platform",
22748	//     "https://www.googleapis.com/auth/compute",
22749	//     "https://www.googleapis.com/auth/compute.readonly"
22750	//   ]
22751	// }
22752
22753}
22754
22755// method id "compute.images.insert":
22756
22757type ImagesInsertCall struct {
22758	s          *Service
22759	project    string
22760	image      *Image
22761	urlParams_ gensupport.URLParams
22762	ctx_       context.Context
22763}
22764
22765// Insert: Creates an image in the specified project using the data
22766// included in the request.
22767// For details, see https://cloud.google.com/compute/docs/reference/latest/images/insert
22768func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall {
22769	c := &ImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22770	c.project = project
22771	c.image = image
22772	return c
22773}
22774
22775// Fields allows partial responses to be retrieved. See
22776// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22777// for more information.
22778func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall {
22779	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22780	return c
22781}
22782
22783// Context sets the context to be used in this call's Do method. Any
22784// pending HTTP request will be aborted if the provided context is
22785// canceled.
22786func (c *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall {
22787	c.ctx_ = ctx
22788	return c
22789}
22790
22791func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) {
22792	var body io.Reader = nil
22793	body, err := googleapi.WithoutDataWrapper.JSONReader(c.image)
22794	if err != nil {
22795		return nil, err
22796	}
22797	ctype := "application/json"
22798	c.urlParams_.Set("alt", alt)
22799	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images")
22800	urls += "?" + c.urlParams_.Encode()
22801	req, _ := http.NewRequest("POST", urls, body)
22802	googleapi.Expand(req.URL, map[string]string{
22803		"project": c.project,
22804	})
22805	req.Header.Set("Content-Type", ctype)
22806	req.Header.Set("User-Agent", c.s.userAgent())
22807	if c.ctx_ != nil {
22808		return ctxhttp.Do(c.ctx_, c.s.client, req)
22809	}
22810	return c.s.client.Do(req)
22811}
22812
22813// Do executes the "compute.images.insert" call.
22814// Exactly one of *Operation or error will be non-nil. Any non-2xx
22815// status code is an error. Response headers are in either
22816// *Operation.ServerResponse.Header or (if a response was returned at
22817// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
22818// to check whether the returned error was because
22819// http.StatusNotModified was returned.
22820func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
22821	gensupport.SetOptions(c.urlParams_, opts...)
22822	res, err := c.doRequest("json")
22823	if res != nil && res.StatusCode == http.StatusNotModified {
22824		if res.Body != nil {
22825			res.Body.Close()
22826		}
22827		return nil, &googleapi.Error{
22828			Code:   res.StatusCode,
22829			Header: res.Header,
22830		}
22831	}
22832	if err != nil {
22833		return nil, err
22834	}
22835	defer googleapi.CloseBody(res)
22836	if err := googleapi.CheckResponse(res); err != nil {
22837		return nil, err
22838	}
22839	ret := &Operation{
22840		ServerResponse: googleapi.ServerResponse{
22841			Header:         res.Header,
22842			HTTPStatusCode: res.StatusCode,
22843		},
22844	}
22845	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
22846		return nil, err
22847	}
22848	return ret, nil
22849	// {
22850	//   "description": "Creates an image in the specified project using the data included in the request.",
22851	//   "httpMethod": "POST",
22852	//   "id": "compute.images.insert",
22853	//   "parameterOrder": [
22854	//     "project"
22855	//   ],
22856	//   "parameters": {
22857	//     "project": {
22858	//       "description": "Project ID for this request.",
22859	//       "location": "path",
22860	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
22861	//       "required": true,
22862	//       "type": "string"
22863	//     }
22864	//   },
22865	//   "path": "{project}/global/images",
22866	//   "request": {
22867	//     "$ref": "Image"
22868	//   },
22869	//   "response": {
22870	//     "$ref": "Operation"
22871	//   },
22872	//   "scopes": [
22873	//     "https://www.googleapis.com/auth/cloud-platform",
22874	//     "https://www.googleapis.com/auth/compute",
22875	//     "https://www.googleapis.com/auth/devstorage.full_control",
22876	//     "https://www.googleapis.com/auth/devstorage.read_only",
22877	//     "https://www.googleapis.com/auth/devstorage.read_write"
22878	//   ]
22879	// }
22880
22881}
22882
22883// method id "compute.images.list":
22884
22885type ImagesListCall struct {
22886	s            *Service
22887	project      string
22888	urlParams_   gensupport.URLParams
22889	ifNoneMatch_ string
22890	ctx_         context.Context
22891}
22892
22893// List: Retrieves the list of private images available to the specified
22894// project. Private images are images you create that belong to your
22895// project. This method does not get any images that belong to other
22896// projects, including publicly-available images, like Debian 7. If you
22897// want to get a list of publicly-available images, use this method to
22898// make a request to the respective image project, such as debian-cloud
22899// or windows-cloud.
22900//
22901// See Accessing images for more information.
22902// For details, see https://cloud.google.com/compute/docs/reference/latest/images/list
22903func (r *ImagesService) List(project string) *ImagesListCall {
22904	c := &ImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
22905	c.project = project
22906	return c
22907}
22908
22909// Filter sets the optional parameter "filter": Sets a filter expression
22910// for filtering listed resources, in the form filter={expression}. Your
22911// {expression} must be in the format: field_name comparison_string
22912// literal_string.
22913//
22914// The field_name is the name of the field you want to compare. Only
22915// atomic field types are supported (string, number, boolean). The
22916// comparison_string must be either eq (equals) or ne (not equals). The
22917// literal_string is the string value to filter to. The literal value
22918// must be valid for the type of field you are filtering by (string,
22919// number, boolean). For string fields, the literal value is interpreted
22920// as a regular expression using RE2 syntax. The literal value must
22921// match the entire field.
22922//
22923// For example, to filter for instances that do not have a name of
22924// example-instance, you would use filter=name ne
22925// example-instance.
22926//
22927// Compute Engine Beta API Only: If you use filtering in the Beta API,
22928// you can also filter on nested fields. For example, you could filter
22929// on instances that have set the scheduling.automaticRestart field to
22930// true. In particular, use filtering on nested fields to take advantage
22931// of instance labels to organize and filter results based on label
22932// values.
22933//
22934// The Beta API also supports filtering on multiple expressions by
22935// providing each separate expression within parentheses. For example,
22936// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
22937// Multiple expressions are treated as AND expressions, meaning that
22938// resources must match all expressions to pass the filters.
22939func (c *ImagesListCall) Filter(filter string) *ImagesListCall {
22940	c.urlParams_.Set("filter", filter)
22941	return c
22942}
22943
22944// MaxResults sets the optional parameter "maxResults": The maximum
22945// number of results per page that should be returned. If the number of
22946// available results is larger than maxResults, Compute Engine returns a
22947// nextPageToken that can be used to get the next page of results in
22948// subsequent list requests.
22949func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall {
22950	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
22951	return c
22952}
22953
22954// OrderBy sets the optional parameter "orderBy": Sorts list results by
22955// a certain order. By default, results are returned in alphanumerical
22956// order based on the resource name.
22957//
22958// You can also sort results in descending order based on the creation
22959// timestamp using orderBy="creationTimestamp desc". This sorts results
22960// based on the creationTimestamp field in reverse chronological order
22961// (newest result first). Use this to sort resources like operations so
22962// that the newest operation is returned first.
22963//
22964// Currently, only sorting by name or creationTimestamp desc is
22965// supported.
22966func (c *ImagesListCall) OrderBy(orderBy string) *ImagesListCall {
22967	c.urlParams_.Set("orderBy", orderBy)
22968	return c
22969}
22970
22971// PageToken sets the optional parameter "pageToken": Specifies a page
22972// token to use. Set pageToken to the nextPageToken returned by a
22973// previous list request to get the next page of results.
22974func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall {
22975	c.urlParams_.Set("pageToken", pageToken)
22976	return c
22977}
22978
22979// Fields allows partial responses to be retrieved. See
22980// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
22981// for more information.
22982func (c *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall {
22983	c.urlParams_.Set("fields", googleapi.CombineFields(s))
22984	return c
22985}
22986
22987// IfNoneMatch sets the optional parameter which makes the operation
22988// fail if the object's ETag matches the given value. This is useful for
22989// getting updates only after the object has changed since the last
22990// request. Use googleapi.IsNotModified to check whether the response
22991// error from Do is the result of In-None-Match.
22992func (c *ImagesListCall) IfNoneMatch(entityTag string) *ImagesListCall {
22993	c.ifNoneMatch_ = entityTag
22994	return c
22995}
22996
22997// Context sets the context to be used in this call's Do method. Any
22998// pending HTTP request will be aborted if the provided context is
22999// canceled.
23000func (c *ImagesListCall) Context(ctx context.Context) *ImagesListCall {
23001	c.ctx_ = ctx
23002	return c
23003}
23004
23005func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) {
23006	var body io.Reader = nil
23007	c.urlParams_.Set("alt", alt)
23008	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images")
23009	urls += "?" + c.urlParams_.Encode()
23010	req, _ := http.NewRequest("GET", urls, body)
23011	googleapi.Expand(req.URL, map[string]string{
23012		"project": c.project,
23013	})
23014	req.Header.Set("User-Agent", c.s.userAgent())
23015	if c.ifNoneMatch_ != "" {
23016		req.Header.Set("If-None-Match", c.ifNoneMatch_)
23017	}
23018	if c.ctx_ != nil {
23019		return ctxhttp.Do(c.ctx_, c.s.client, req)
23020	}
23021	return c.s.client.Do(req)
23022}
23023
23024// Do executes the "compute.images.list" call.
23025// Exactly one of *ImageList or error will be non-nil. Any non-2xx
23026// status code is an error. Response headers are in either
23027// *ImageList.ServerResponse.Header or (if a response was returned at
23028// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23029// to check whether the returned error was because
23030// http.StatusNotModified was returned.
23031func (c *ImagesListCall) Do(opts ...googleapi.CallOption) (*ImageList, error) {
23032	gensupport.SetOptions(c.urlParams_, opts...)
23033	res, err := c.doRequest("json")
23034	if res != nil && res.StatusCode == http.StatusNotModified {
23035		if res.Body != nil {
23036			res.Body.Close()
23037		}
23038		return nil, &googleapi.Error{
23039			Code:   res.StatusCode,
23040			Header: res.Header,
23041		}
23042	}
23043	if err != nil {
23044		return nil, err
23045	}
23046	defer googleapi.CloseBody(res)
23047	if err := googleapi.CheckResponse(res); err != nil {
23048		return nil, err
23049	}
23050	ret := &ImageList{
23051		ServerResponse: googleapi.ServerResponse{
23052			Header:         res.Header,
23053			HTTPStatusCode: res.StatusCode,
23054		},
23055	}
23056	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23057		return nil, err
23058	}
23059	return ret, nil
23060	// {
23061	//   "description": "Retrieves the list of private images available to the specified project. Private images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 7. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.\n\nSee Accessing images for more information.",
23062	//   "httpMethod": "GET",
23063	//   "id": "compute.images.list",
23064	//   "parameterOrder": [
23065	//     "project"
23066	//   ],
23067	//   "parameters": {
23068	//     "filter": {
23069	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
23070	//       "location": "query",
23071	//       "type": "string"
23072	//     },
23073	//     "maxResults": {
23074	//       "default": "500",
23075	//       "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.",
23076	//       "format": "uint32",
23077	//       "location": "query",
23078	//       "maximum": "500",
23079	//       "minimum": "0",
23080	//       "type": "integer"
23081	//     },
23082	//     "orderBy": {
23083	//       "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.",
23084	//       "location": "query",
23085	//       "type": "string"
23086	//     },
23087	//     "pageToken": {
23088	//       "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.",
23089	//       "location": "query",
23090	//       "type": "string"
23091	//     },
23092	//     "project": {
23093	//       "description": "Project ID for this request.",
23094	//       "location": "path",
23095	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23096	//       "required": true,
23097	//       "type": "string"
23098	//     }
23099	//   },
23100	//   "path": "{project}/global/images",
23101	//   "response": {
23102	//     "$ref": "ImageList"
23103	//   },
23104	//   "scopes": [
23105	//     "https://www.googleapis.com/auth/cloud-platform",
23106	//     "https://www.googleapis.com/auth/compute",
23107	//     "https://www.googleapis.com/auth/compute.readonly"
23108	//   ]
23109	// }
23110
23111}
23112
23113// Pages invokes f for each page of results.
23114// A non-nil error returned from f will halt the iteration.
23115// The provided context supersedes any context provided to the Context method.
23116func (c *ImagesListCall) Pages(ctx context.Context, f func(*ImageList) error) error {
23117	c.ctx_ = ctx
23118	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23119	for {
23120		x, err := c.Do()
23121		if err != nil {
23122			return err
23123		}
23124		if err := f(x); err != nil {
23125			return err
23126		}
23127		if x.NextPageToken == "" {
23128			return nil
23129		}
23130		c.PageToken(x.NextPageToken)
23131	}
23132}
23133
23134// method id "compute.images.setLabels":
23135
23136type ImagesSetLabelsCall struct {
23137	s                      *Service
23138	project                string
23139	resource               string
23140	globalsetlabelsrequest *GlobalSetLabelsRequest
23141	urlParams_             gensupport.URLParams
23142	ctx_                   context.Context
23143}
23144
23145// SetLabels: Sets the labels on the target image.
23146func (r *ImagesService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *ImagesSetLabelsCall {
23147	c := &ImagesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23148	c.project = project
23149	c.resource = resource
23150	c.globalsetlabelsrequest = globalsetlabelsrequest
23151	return c
23152}
23153
23154// Fields allows partial responses to be retrieved. See
23155// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23156// for more information.
23157func (c *ImagesSetLabelsCall) Fields(s ...googleapi.Field) *ImagesSetLabelsCall {
23158	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23159	return c
23160}
23161
23162// Context sets the context to be used in this call's Do method. Any
23163// pending HTTP request will be aborted if the provided context is
23164// canceled.
23165func (c *ImagesSetLabelsCall) Context(ctx context.Context) *ImagesSetLabelsCall {
23166	c.ctx_ = ctx
23167	return c
23168}
23169
23170func (c *ImagesSetLabelsCall) doRequest(alt string) (*http.Response, error) {
23171	var body io.Reader = nil
23172	body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest)
23173	if err != nil {
23174		return nil, err
23175	}
23176	ctype := "application/json"
23177	c.urlParams_.Set("alt", alt)
23178	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/setLabels")
23179	urls += "?" + c.urlParams_.Encode()
23180	req, _ := http.NewRequest("POST", urls, body)
23181	googleapi.Expand(req.URL, map[string]string{
23182		"project":  c.project,
23183		"resource": c.resource,
23184	})
23185	req.Header.Set("Content-Type", ctype)
23186	req.Header.Set("User-Agent", c.s.userAgent())
23187	if c.ctx_ != nil {
23188		return ctxhttp.Do(c.ctx_, c.s.client, req)
23189	}
23190	return c.s.client.Do(req)
23191}
23192
23193// Do executes the "compute.images.setLabels" call.
23194// Exactly one of *Operation or error will be non-nil. Any non-2xx
23195// status code is an error. Response headers are in either
23196// *Operation.ServerResponse.Header or (if a response was returned at
23197// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23198// to check whether the returned error was because
23199// http.StatusNotModified was returned.
23200func (c *ImagesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23201	gensupport.SetOptions(c.urlParams_, opts...)
23202	res, err := c.doRequest("json")
23203	if res != nil && res.StatusCode == http.StatusNotModified {
23204		if res.Body != nil {
23205			res.Body.Close()
23206		}
23207		return nil, &googleapi.Error{
23208			Code:   res.StatusCode,
23209			Header: res.Header,
23210		}
23211	}
23212	if err != nil {
23213		return nil, err
23214	}
23215	defer googleapi.CloseBody(res)
23216	if err := googleapi.CheckResponse(res); err != nil {
23217		return nil, err
23218	}
23219	ret := &Operation{
23220		ServerResponse: googleapi.ServerResponse{
23221			Header:         res.Header,
23222			HTTPStatusCode: res.StatusCode,
23223		},
23224	}
23225	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23226		return nil, err
23227	}
23228	return ret, nil
23229	// {
23230	//   "description": "Sets the labels on the target image.",
23231	//   "httpMethod": "POST",
23232	//   "id": "compute.images.setLabels",
23233	//   "parameterOrder": [
23234	//     "project",
23235	//     "resource"
23236	//   ],
23237	//   "parameters": {
23238	//     "project": {
23239	//       "description": "Project ID for this request.",
23240	//       "location": "path",
23241	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23242	//       "required": true,
23243	//       "type": "string"
23244	//     },
23245	//     "resource": {
23246	//       "description": "Name of the resource for this request.",
23247	//       "location": "path",
23248	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
23249	//       "required": true,
23250	//       "type": "string"
23251	//     }
23252	//   },
23253	//   "path": "{project}/global/images/{resource}/setLabels",
23254	//   "request": {
23255	//     "$ref": "GlobalSetLabelsRequest"
23256	//   },
23257	//   "response": {
23258	//     "$ref": "Operation"
23259	//   },
23260	//   "scopes": [
23261	//     "https://www.googleapis.com/auth/cloud-platform",
23262	//     "https://www.googleapis.com/auth/compute"
23263	//   ]
23264	// }
23265
23266}
23267
23268// method id "compute.images.testIamPermissions":
23269
23270type ImagesTestIamPermissionsCall struct {
23271	s                      *Service
23272	project                string
23273	resource               string
23274	testpermissionsrequest *TestPermissionsRequest
23275	urlParams_             gensupport.URLParams
23276	ctx_                   context.Context
23277}
23278
23279// TestIamPermissions: Returns permissions that a caller has on the
23280// specified resource.
23281func (r *ImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *ImagesTestIamPermissionsCall {
23282	c := &ImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23283	c.project = project
23284	c.resource = resource
23285	c.testpermissionsrequest = testpermissionsrequest
23286	return c
23287}
23288
23289// Fields allows partial responses to be retrieved. See
23290// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23291// for more information.
23292func (c *ImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ImagesTestIamPermissionsCall {
23293	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23294	return c
23295}
23296
23297// Context sets the context to be used in this call's Do method. Any
23298// pending HTTP request will be aborted if the provided context is
23299// canceled.
23300func (c *ImagesTestIamPermissionsCall) Context(ctx context.Context) *ImagesTestIamPermissionsCall {
23301	c.ctx_ = ctx
23302	return c
23303}
23304
23305func (c *ImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
23306	var body io.Reader = nil
23307	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
23308	if err != nil {
23309		return nil, err
23310	}
23311	ctype := "application/json"
23312	c.urlParams_.Set("alt", alt)
23313	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{resource}/testIamPermissions")
23314	urls += "?" + c.urlParams_.Encode()
23315	req, _ := http.NewRequest("POST", urls, body)
23316	googleapi.Expand(req.URL, map[string]string{
23317		"project":  c.project,
23318		"resource": c.resource,
23319	})
23320	req.Header.Set("Content-Type", ctype)
23321	req.Header.Set("User-Agent", c.s.userAgent())
23322	if c.ctx_ != nil {
23323		return ctxhttp.Do(c.ctx_, c.s.client, req)
23324	}
23325	return c.s.client.Do(req)
23326}
23327
23328// Do executes the "compute.images.testIamPermissions" call.
23329// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
23330// non-2xx status code is an error. Response headers are in either
23331// *TestPermissionsResponse.ServerResponse.Header or (if a response was
23332// returned at all) in error.(*googleapi.Error).Header. Use
23333// googleapi.IsNotModified to check whether the returned error was
23334// because http.StatusNotModified was returned.
23335func (c *ImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
23336	gensupport.SetOptions(c.urlParams_, opts...)
23337	res, err := c.doRequest("json")
23338	if res != nil && res.StatusCode == http.StatusNotModified {
23339		if res.Body != nil {
23340			res.Body.Close()
23341		}
23342		return nil, &googleapi.Error{
23343			Code:   res.StatusCode,
23344			Header: res.Header,
23345		}
23346	}
23347	if err != nil {
23348		return nil, err
23349	}
23350	defer googleapi.CloseBody(res)
23351	if err := googleapi.CheckResponse(res); err != nil {
23352		return nil, err
23353	}
23354	ret := &TestPermissionsResponse{
23355		ServerResponse: googleapi.ServerResponse{
23356			Header:         res.Header,
23357			HTTPStatusCode: res.StatusCode,
23358		},
23359	}
23360	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23361		return nil, err
23362	}
23363	return ret, nil
23364	// {
23365	//   "description": "Returns permissions that a caller has on the specified resource.",
23366	//   "httpMethod": "POST",
23367	//   "id": "compute.images.testIamPermissions",
23368	//   "parameterOrder": [
23369	//     "project",
23370	//     "resource"
23371	//   ],
23372	//   "parameters": {
23373	//     "project": {
23374	//       "description": "Project ID for this request.",
23375	//       "location": "path",
23376	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23377	//       "required": true,
23378	//       "type": "string"
23379	//     },
23380	//     "resource": {
23381	//       "description": "Name of the resource for this request.",
23382	//       "location": "path",
23383	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
23384	//       "required": true,
23385	//       "type": "string"
23386	//     }
23387	//   },
23388	//   "path": "{project}/global/images/{resource}/testIamPermissions",
23389	//   "request": {
23390	//     "$ref": "TestPermissionsRequest"
23391	//   },
23392	//   "response": {
23393	//     "$ref": "TestPermissionsResponse"
23394	//   },
23395	//   "scopes": [
23396	//     "https://www.googleapis.com/auth/cloud-platform",
23397	//     "https://www.googleapis.com/auth/compute",
23398	//     "https://www.googleapis.com/auth/compute.readonly"
23399	//   ]
23400	// }
23401
23402}
23403
23404// method id "compute.instanceGroupManagers.abandonInstances":
23405
23406type InstanceGroupManagersAbandonInstancesCall struct {
23407	s                                            *Service
23408	project                                      string
23409	zone                                         string
23410	instanceGroupManager                         string
23411	instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest
23412	urlParams_                                   gensupport.URLParams
23413	ctx_                                         context.Context
23414}
23415
23416// AbandonInstances: Schedules a group action to remove the specified
23417// instances from the managed instance group. Abandoning an instance
23418// does not delete the instance, but it does remove the instance from
23419// any target pools that are applied by the managed instance group. This
23420// method reduces the targetSize of the managed instance group by the
23421// number of instances that you abandon. This operation is marked as
23422// DONE when the action is scheduled even if the instances have not yet
23423// been removed from the group. You must separately verify the status of
23424// the abandoning action with the listmanagedinstances method.
23425func (r *InstanceGroupManagersService) AbandonInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest) *InstanceGroupManagersAbandonInstancesCall {
23426	c := &InstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23427	c.project = project
23428	c.zone = zone
23429	c.instanceGroupManager = instanceGroupManager
23430	c.instancegroupmanagersabandoninstancesrequest = instancegroupmanagersabandoninstancesrequest
23431	return c
23432}
23433
23434// Fields allows partial responses to be retrieved. See
23435// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23436// for more information.
23437func (c *InstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAbandonInstancesCall {
23438	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23439	return c
23440}
23441
23442// Context sets the context to be used in this call's Do method. Any
23443// pending HTTP request will be aborted if the provided context is
23444// canceled.
23445func (c *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall {
23446	c.ctx_ = ctx
23447	return c
23448}
23449
23450func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) {
23451	var body io.Reader = nil
23452	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest)
23453	if err != nil {
23454		return nil, err
23455	}
23456	ctype := "application/json"
23457	c.urlParams_.Set("alt", alt)
23458	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances")
23459	urls += "?" + c.urlParams_.Encode()
23460	req, _ := http.NewRequest("POST", urls, body)
23461	googleapi.Expand(req.URL, map[string]string{
23462		"project":              c.project,
23463		"zone":                 c.zone,
23464		"instanceGroupManager": c.instanceGroupManager,
23465	})
23466	req.Header.Set("Content-Type", ctype)
23467	req.Header.Set("User-Agent", c.s.userAgent())
23468	if c.ctx_ != nil {
23469		return ctxhttp.Do(c.ctx_, c.s.client, req)
23470	}
23471	return c.s.client.Do(req)
23472}
23473
23474// Do executes the "compute.instanceGroupManagers.abandonInstances" call.
23475// Exactly one of *Operation or error will be non-nil. Any non-2xx
23476// status code is an error. Response headers are in either
23477// *Operation.ServerResponse.Header or (if a response was returned at
23478// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23479// to check whether the returned error was because
23480// http.StatusNotModified was returned.
23481func (c *InstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23482	gensupport.SetOptions(c.urlParams_, opts...)
23483	res, err := c.doRequest("json")
23484	if res != nil && res.StatusCode == http.StatusNotModified {
23485		if res.Body != nil {
23486			res.Body.Close()
23487		}
23488		return nil, &googleapi.Error{
23489			Code:   res.StatusCode,
23490			Header: res.Header,
23491		}
23492	}
23493	if err != nil {
23494		return nil, err
23495	}
23496	defer googleapi.CloseBody(res)
23497	if err := googleapi.CheckResponse(res); err != nil {
23498		return nil, err
23499	}
23500	ret := &Operation{
23501		ServerResponse: googleapi.ServerResponse{
23502			Header:         res.Header,
23503			HTTPStatusCode: res.StatusCode,
23504		},
23505	}
23506	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23507		return nil, err
23508	}
23509	return ret, nil
23510	// {
23511	//   "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.",
23512	//   "httpMethod": "POST",
23513	//   "id": "compute.instanceGroupManagers.abandonInstances",
23514	//   "parameterOrder": [
23515	//     "project",
23516	//     "zone",
23517	//     "instanceGroupManager"
23518	//   ],
23519	//   "parameters": {
23520	//     "instanceGroupManager": {
23521	//       "description": "The name of the managed instance group.",
23522	//       "location": "path",
23523	//       "required": true,
23524	//       "type": "string"
23525	//     },
23526	//     "project": {
23527	//       "description": "Project ID for this request.",
23528	//       "location": "path",
23529	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23530	//       "required": true,
23531	//       "type": "string"
23532	//     },
23533	//     "zone": {
23534	//       "description": "The name of the zone where the managed instance group is located.",
23535	//       "location": "path",
23536	//       "required": true,
23537	//       "type": "string"
23538	//     }
23539	//   },
23540	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances",
23541	//   "request": {
23542	//     "$ref": "InstanceGroupManagersAbandonInstancesRequest"
23543	//   },
23544	//   "response": {
23545	//     "$ref": "Operation"
23546	//   },
23547	//   "scopes": [
23548	//     "https://www.googleapis.com/auth/cloud-platform",
23549	//     "https://www.googleapis.com/auth/compute"
23550	//   ]
23551	// }
23552
23553}
23554
23555// method id "compute.instanceGroupManagers.aggregatedList":
23556
23557type InstanceGroupManagersAggregatedListCall struct {
23558	s            *Service
23559	project      string
23560	urlParams_   gensupport.URLParams
23561	ifNoneMatch_ string
23562	ctx_         context.Context
23563}
23564
23565// AggregatedList: Retrieves the list of managed instance groups and
23566// groups them by zone.
23567func (r *InstanceGroupManagersService) AggregatedList(project string) *InstanceGroupManagersAggregatedListCall {
23568	c := &InstanceGroupManagersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23569	c.project = project
23570	return c
23571}
23572
23573// Filter sets the optional parameter "filter": Sets a filter expression
23574// for filtering listed resources, in the form filter={expression}. Your
23575// {expression} must be in the format: field_name comparison_string
23576// literal_string.
23577//
23578// The field_name is the name of the field you want to compare. Only
23579// atomic field types are supported (string, number, boolean). The
23580// comparison_string must be either eq (equals) or ne (not equals). The
23581// literal_string is the string value to filter to. The literal value
23582// must be valid for the type of field you are filtering by (string,
23583// number, boolean). For string fields, the literal value is interpreted
23584// as a regular expression using RE2 syntax. The literal value must
23585// match the entire field.
23586//
23587// For example, to filter for instances that do not have a name of
23588// example-instance, you would use filter=name ne
23589// example-instance.
23590//
23591// Compute Engine Beta API Only: If you use filtering in the Beta API,
23592// you can also filter on nested fields. For example, you could filter
23593// on instances that have set the scheduling.automaticRestart field to
23594// true. In particular, use filtering on nested fields to take advantage
23595// of instance labels to organize and filter results based on label
23596// values.
23597//
23598// The Beta API also supports filtering on multiple expressions by
23599// providing each separate expression within parentheses. For example,
23600// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
23601// Multiple expressions are treated as AND expressions, meaning that
23602// resources must match all expressions to pass the filters.
23603func (c *InstanceGroupManagersAggregatedListCall) Filter(filter string) *InstanceGroupManagersAggregatedListCall {
23604	c.urlParams_.Set("filter", filter)
23605	return c
23606}
23607
23608// MaxResults sets the optional parameter "maxResults": The maximum
23609// number of results per page that should be returned. If the number of
23610// available results is larger than maxResults, Compute Engine returns a
23611// nextPageToken that can be used to get the next page of results in
23612// subsequent list requests.
23613func (c *InstanceGroupManagersAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupManagersAggregatedListCall {
23614	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
23615	return c
23616}
23617
23618// OrderBy sets the optional parameter "orderBy": Sorts list results by
23619// a certain order. By default, results are returned in alphanumerical
23620// order based on the resource name.
23621//
23622// You can also sort results in descending order based on the creation
23623// timestamp using orderBy="creationTimestamp desc". This sorts results
23624// based on the creationTimestamp field in reverse chronological order
23625// (newest result first). Use this to sort resources like operations so
23626// that the newest operation is returned first.
23627//
23628// Currently, only sorting by name or creationTimestamp desc is
23629// supported.
23630func (c *InstanceGroupManagersAggregatedListCall) OrderBy(orderBy string) *InstanceGroupManagersAggregatedListCall {
23631	c.urlParams_.Set("orderBy", orderBy)
23632	return c
23633}
23634
23635// PageToken sets the optional parameter "pageToken": Specifies a page
23636// token to use. Set pageToken to the nextPageToken returned by a
23637// previous list request to get the next page of results.
23638func (c *InstanceGroupManagersAggregatedListCall) PageToken(pageToken string) *InstanceGroupManagersAggregatedListCall {
23639	c.urlParams_.Set("pageToken", pageToken)
23640	return c
23641}
23642
23643// Fields allows partial responses to be retrieved. See
23644// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23645// for more information.
23646func (c *InstanceGroupManagersAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersAggregatedListCall {
23647	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23648	return c
23649}
23650
23651// IfNoneMatch sets the optional parameter which makes the operation
23652// fail if the object's ETag matches the given value. This is useful for
23653// getting updates only after the object has changed since the last
23654// request. Use googleapi.IsNotModified to check whether the response
23655// error from Do is the result of In-None-Match.
23656func (c *InstanceGroupManagersAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersAggregatedListCall {
23657	c.ifNoneMatch_ = entityTag
23658	return c
23659}
23660
23661// Context sets the context to be used in this call's Do method. Any
23662// pending HTTP request will be aborted if the provided context is
23663// canceled.
23664func (c *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall {
23665	c.ctx_ = ctx
23666	return c
23667}
23668
23669func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
23670	var body io.Reader = nil
23671	c.urlParams_.Set("alt", alt)
23672	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroupManagers")
23673	urls += "?" + c.urlParams_.Encode()
23674	req, _ := http.NewRequest("GET", urls, body)
23675	googleapi.Expand(req.URL, map[string]string{
23676		"project": c.project,
23677	})
23678	req.Header.Set("User-Agent", c.s.userAgent())
23679	if c.ifNoneMatch_ != "" {
23680		req.Header.Set("If-None-Match", c.ifNoneMatch_)
23681	}
23682	if c.ctx_ != nil {
23683		return ctxhttp.Do(c.ctx_, c.s.client, req)
23684	}
23685	return c.s.client.Do(req)
23686}
23687
23688// Do executes the "compute.instanceGroupManagers.aggregatedList" call.
23689// Exactly one of *InstanceGroupManagerAggregatedList or error will be
23690// non-nil. Any non-2xx status code is an error. Response headers are in
23691// either *InstanceGroupManagerAggregatedList.ServerResponse.Header or
23692// (if a response was returned at all) in
23693// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
23694// whether the returned error was because http.StatusNotModified was
23695// returned.
23696func (c *InstanceGroupManagersAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerAggregatedList, error) {
23697	gensupport.SetOptions(c.urlParams_, opts...)
23698	res, err := c.doRequest("json")
23699	if res != nil && res.StatusCode == http.StatusNotModified {
23700		if res.Body != nil {
23701			res.Body.Close()
23702		}
23703		return nil, &googleapi.Error{
23704			Code:   res.StatusCode,
23705			Header: res.Header,
23706		}
23707	}
23708	if err != nil {
23709		return nil, err
23710	}
23711	defer googleapi.CloseBody(res)
23712	if err := googleapi.CheckResponse(res); err != nil {
23713		return nil, err
23714	}
23715	ret := &InstanceGroupManagerAggregatedList{
23716		ServerResponse: googleapi.ServerResponse{
23717			Header:         res.Header,
23718			HTTPStatusCode: res.StatusCode,
23719		},
23720	}
23721	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23722		return nil, err
23723	}
23724	return ret, nil
23725	// {
23726	//   "description": "Retrieves the list of managed instance groups and groups them by zone.",
23727	//   "httpMethod": "GET",
23728	//   "id": "compute.instanceGroupManagers.aggregatedList",
23729	//   "parameterOrder": [
23730	//     "project"
23731	//   ],
23732	//   "parameters": {
23733	//     "filter": {
23734	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
23735	//       "location": "query",
23736	//       "type": "string"
23737	//     },
23738	//     "maxResults": {
23739	//       "default": "500",
23740	//       "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.",
23741	//       "format": "uint32",
23742	//       "location": "query",
23743	//       "maximum": "500",
23744	//       "minimum": "0",
23745	//       "type": "integer"
23746	//     },
23747	//     "orderBy": {
23748	//       "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.",
23749	//       "location": "query",
23750	//       "type": "string"
23751	//     },
23752	//     "pageToken": {
23753	//       "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.",
23754	//       "location": "query",
23755	//       "type": "string"
23756	//     },
23757	//     "project": {
23758	//       "description": "Project ID for this request.",
23759	//       "location": "path",
23760	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23761	//       "required": true,
23762	//       "type": "string"
23763	//     }
23764	//   },
23765	//   "path": "{project}/aggregated/instanceGroupManagers",
23766	//   "response": {
23767	//     "$ref": "InstanceGroupManagerAggregatedList"
23768	//   },
23769	//   "scopes": [
23770	//     "https://www.googleapis.com/auth/cloud-platform",
23771	//     "https://www.googleapis.com/auth/compute",
23772	//     "https://www.googleapis.com/auth/compute.readonly"
23773	//   ]
23774	// }
23775
23776}
23777
23778// Pages invokes f for each page of results.
23779// A non-nil error returned from f will halt the iteration.
23780// The provided context supersedes any context provided to the Context method.
23781func (c *InstanceGroupManagersAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerAggregatedList) error) error {
23782	c.ctx_ = ctx
23783	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
23784	for {
23785		x, err := c.Do()
23786		if err != nil {
23787			return err
23788		}
23789		if err := f(x); err != nil {
23790			return err
23791		}
23792		if x.NextPageToken == "" {
23793			return nil
23794		}
23795		c.PageToken(x.NextPageToken)
23796	}
23797}
23798
23799// method id "compute.instanceGroupManagers.delete":
23800
23801type InstanceGroupManagersDeleteCall struct {
23802	s                    *Service
23803	project              string
23804	zone                 string
23805	instanceGroupManager string
23806	urlParams_           gensupport.URLParams
23807	ctx_                 context.Context
23808}
23809
23810// Delete: Deletes the specified managed instance group and all of the
23811// instances in that group. Note that the instance group must not belong
23812// to a backend service. Read  Deleting an instance group for more
23813// information.
23814func (r *InstanceGroupManagersService) Delete(project string, zone string, instanceGroupManager string) *InstanceGroupManagersDeleteCall {
23815	c := &InstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23816	c.project = project
23817	c.zone = zone
23818	c.instanceGroupManager = instanceGroupManager
23819	return c
23820}
23821
23822// Fields allows partial responses to be retrieved. See
23823// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23824// for more information.
23825func (c *InstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteCall {
23826	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23827	return c
23828}
23829
23830// Context sets the context to be used in this call's Do method. Any
23831// pending HTTP request will be aborted if the provided context is
23832// canceled.
23833func (c *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall {
23834	c.ctx_ = ctx
23835	return c
23836}
23837
23838func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) {
23839	var body io.Reader = nil
23840	c.urlParams_.Set("alt", alt)
23841	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}")
23842	urls += "?" + c.urlParams_.Encode()
23843	req, _ := http.NewRequest("DELETE", urls, body)
23844	googleapi.Expand(req.URL, map[string]string{
23845		"project":              c.project,
23846		"zone":                 c.zone,
23847		"instanceGroupManager": c.instanceGroupManager,
23848	})
23849	req.Header.Set("User-Agent", c.s.userAgent())
23850	if c.ctx_ != nil {
23851		return ctxhttp.Do(c.ctx_, c.s.client, req)
23852	}
23853	return c.s.client.Do(req)
23854}
23855
23856// Do executes the "compute.instanceGroupManagers.delete" call.
23857// Exactly one of *Operation or error will be non-nil. Any non-2xx
23858// status code is an error. Response headers are in either
23859// *Operation.ServerResponse.Header or (if a response was returned at
23860// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
23861// to check whether the returned error was because
23862// http.StatusNotModified was returned.
23863func (c *InstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
23864	gensupport.SetOptions(c.urlParams_, opts...)
23865	res, err := c.doRequest("json")
23866	if res != nil && res.StatusCode == http.StatusNotModified {
23867		if res.Body != nil {
23868			res.Body.Close()
23869		}
23870		return nil, &googleapi.Error{
23871			Code:   res.StatusCode,
23872			Header: res.Header,
23873		}
23874	}
23875	if err != nil {
23876		return nil, err
23877	}
23878	defer googleapi.CloseBody(res)
23879	if err := googleapi.CheckResponse(res); err != nil {
23880		return nil, err
23881	}
23882	ret := &Operation{
23883		ServerResponse: googleapi.ServerResponse{
23884			Header:         res.Header,
23885			HTTPStatusCode: res.StatusCode,
23886		},
23887	}
23888	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
23889		return nil, err
23890	}
23891	return ret, nil
23892	// {
23893	//   "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.",
23894	//   "httpMethod": "DELETE",
23895	//   "id": "compute.instanceGroupManagers.delete",
23896	//   "parameterOrder": [
23897	//     "project",
23898	//     "zone",
23899	//     "instanceGroupManager"
23900	//   ],
23901	//   "parameters": {
23902	//     "instanceGroupManager": {
23903	//       "description": "The name of the managed instance group to delete.",
23904	//       "location": "path",
23905	//       "required": true,
23906	//       "type": "string"
23907	//     },
23908	//     "project": {
23909	//       "description": "Project ID for this request.",
23910	//       "location": "path",
23911	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
23912	//       "required": true,
23913	//       "type": "string"
23914	//     },
23915	//     "zone": {
23916	//       "description": "The name of the zone where the managed instance group is located.",
23917	//       "location": "path",
23918	//       "required": true,
23919	//       "type": "string"
23920	//     }
23921	//   },
23922	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
23923	//   "response": {
23924	//     "$ref": "Operation"
23925	//   },
23926	//   "scopes": [
23927	//     "https://www.googleapis.com/auth/cloud-platform",
23928	//     "https://www.googleapis.com/auth/compute"
23929	//   ]
23930	// }
23931
23932}
23933
23934// method id "compute.instanceGroupManagers.deleteInstances":
23935
23936type InstanceGroupManagersDeleteInstancesCall struct {
23937	s                                           *Service
23938	project                                     string
23939	zone                                        string
23940	instanceGroupManager                        string
23941	instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest
23942	urlParams_                                  gensupport.URLParams
23943	ctx_                                        context.Context
23944}
23945
23946// DeleteInstances: Schedules a group action to delete the specified
23947// instances in the managed instance group. The instances are also
23948// removed from any target pools of which they were a member. This
23949// method reduces the targetSize of the managed instance group by the
23950// number of instances that you delete. This operation is marked as DONE
23951// when the action is scheduled even if the instances are still being
23952// deleted. You must separately verify the status of the deleting action
23953// with the listmanagedinstances method.
23954func (r *InstanceGroupManagersService) DeleteInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest) *InstanceGroupManagersDeleteInstancesCall {
23955	c := &InstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
23956	c.project = project
23957	c.zone = zone
23958	c.instanceGroupManager = instanceGroupManager
23959	c.instancegroupmanagersdeleteinstancesrequest = instancegroupmanagersdeleteinstancesrequest
23960	return c
23961}
23962
23963// Fields allows partial responses to be retrieved. See
23964// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
23965// for more information.
23966func (c *InstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersDeleteInstancesCall {
23967	c.urlParams_.Set("fields", googleapi.CombineFields(s))
23968	return c
23969}
23970
23971// Context sets the context to be used in this call's Do method. Any
23972// pending HTTP request will be aborted if the provided context is
23973// canceled.
23974func (c *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall {
23975	c.ctx_ = ctx
23976	return c
23977}
23978
23979func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) {
23980	var body io.Reader = nil
23981	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest)
23982	if err != nil {
23983		return nil, err
23984	}
23985	ctype := "application/json"
23986	c.urlParams_.Set("alt", alt)
23987	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances")
23988	urls += "?" + c.urlParams_.Encode()
23989	req, _ := http.NewRequest("POST", urls, body)
23990	googleapi.Expand(req.URL, map[string]string{
23991		"project":              c.project,
23992		"zone":                 c.zone,
23993		"instanceGroupManager": c.instanceGroupManager,
23994	})
23995	req.Header.Set("Content-Type", ctype)
23996	req.Header.Set("User-Agent", c.s.userAgent())
23997	if c.ctx_ != nil {
23998		return ctxhttp.Do(c.ctx_, c.s.client, req)
23999	}
24000	return c.s.client.Do(req)
24001}
24002
24003// Do executes the "compute.instanceGroupManagers.deleteInstances" call.
24004// Exactly one of *Operation or error will be non-nil. Any non-2xx
24005// status code is an error. Response headers are in either
24006// *Operation.ServerResponse.Header or (if a response was returned at
24007// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24008// to check whether the returned error was because
24009// http.StatusNotModified was returned.
24010func (c *InstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24011	gensupport.SetOptions(c.urlParams_, opts...)
24012	res, err := c.doRequest("json")
24013	if res != nil && res.StatusCode == http.StatusNotModified {
24014		if res.Body != nil {
24015			res.Body.Close()
24016		}
24017		return nil, &googleapi.Error{
24018			Code:   res.StatusCode,
24019			Header: res.Header,
24020		}
24021	}
24022	if err != nil {
24023		return nil, err
24024	}
24025	defer googleapi.CloseBody(res)
24026	if err := googleapi.CheckResponse(res); err != nil {
24027		return nil, err
24028	}
24029	ret := &Operation{
24030		ServerResponse: googleapi.ServerResponse{
24031			Header:         res.Header,
24032			HTTPStatusCode: res.StatusCode,
24033		},
24034	}
24035	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24036		return nil, err
24037	}
24038	return ret, nil
24039	// {
24040	//   "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.",
24041	//   "httpMethod": "POST",
24042	//   "id": "compute.instanceGroupManagers.deleteInstances",
24043	//   "parameterOrder": [
24044	//     "project",
24045	//     "zone",
24046	//     "instanceGroupManager"
24047	//   ],
24048	//   "parameters": {
24049	//     "instanceGroupManager": {
24050	//       "description": "The name of the managed instance group.",
24051	//       "location": "path",
24052	//       "required": true,
24053	//       "type": "string"
24054	//     },
24055	//     "project": {
24056	//       "description": "Project ID for this request.",
24057	//       "location": "path",
24058	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24059	//       "required": true,
24060	//       "type": "string"
24061	//     },
24062	//     "zone": {
24063	//       "description": "The name of the zone where the managed instance group is located.",
24064	//       "location": "path",
24065	//       "required": true,
24066	//       "type": "string"
24067	//     }
24068	//   },
24069	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances",
24070	//   "request": {
24071	//     "$ref": "InstanceGroupManagersDeleteInstancesRequest"
24072	//   },
24073	//   "response": {
24074	//     "$ref": "Operation"
24075	//   },
24076	//   "scopes": [
24077	//     "https://www.googleapis.com/auth/cloud-platform",
24078	//     "https://www.googleapis.com/auth/compute"
24079	//   ]
24080	// }
24081
24082}
24083
24084// method id "compute.instanceGroupManagers.get":
24085
24086type InstanceGroupManagersGetCall struct {
24087	s                    *Service
24088	project              string
24089	zone                 string
24090	instanceGroupManager string
24091	urlParams_           gensupport.URLParams
24092	ifNoneMatch_         string
24093	ctx_                 context.Context
24094}
24095
24096// Get: Returns all of the details about the specified managed instance
24097// group. Get a list of available managed instance groups by making a
24098// list() request.
24099func (r *InstanceGroupManagersService) Get(project string, zone string, instanceGroupManager string) *InstanceGroupManagersGetCall {
24100	c := &InstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24101	c.project = project
24102	c.zone = zone
24103	c.instanceGroupManager = instanceGroupManager
24104	return c
24105}
24106
24107// Fields allows partial responses to be retrieved. See
24108// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24109// for more information.
24110func (c *InstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *InstanceGroupManagersGetCall {
24111	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24112	return c
24113}
24114
24115// IfNoneMatch sets the optional parameter which makes the operation
24116// fail if the object's ETag matches the given value. This is useful for
24117// getting updates only after the object has changed since the last
24118// request. Use googleapi.IsNotModified to check whether the response
24119// error from Do is the result of In-None-Match.
24120func (c *InstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *InstanceGroupManagersGetCall {
24121	c.ifNoneMatch_ = entityTag
24122	return c
24123}
24124
24125// Context sets the context to be used in this call's Do method. Any
24126// pending HTTP request will be aborted if the provided context is
24127// canceled.
24128func (c *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall {
24129	c.ctx_ = ctx
24130	return c
24131}
24132
24133func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) {
24134	var body io.Reader = nil
24135	c.urlParams_.Set("alt", alt)
24136	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}")
24137	urls += "?" + c.urlParams_.Encode()
24138	req, _ := http.NewRequest("GET", urls, body)
24139	googleapi.Expand(req.URL, map[string]string{
24140		"project":              c.project,
24141		"zone":                 c.zone,
24142		"instanceGroupManager": c.instanceGroupManager,
24143	})
24144	req.Header.Set("User-Agent", c.s.userAgent())
24145	if c.ifNoneMatch_ != "" {
24146		req.Header.Set("If-None-Match", c.ifNoneMatch_)
24147	}
24148	if c.ctx_ != nil {
24149		return ctxhttp.Do(c.ctx_, c.s.client, req)
24150	}
24151	return c.s.client.Do(req)
24152}
24153
24154// Do executes the "compute.instanceGroupManagers.get" call.
24155// Exactly one of *InstanceGroupManager or error will be non-nil. Any
24156// non-2xx status code is an error. Response headers are in either
24157// *InstanceGroupManager.ServerResponse.Header or (if a response was
24158// returned at all) in error.(*googleapi.Error).Header. Use
24159// googleapi.IsNotModified to check whether the returned error was
24160// because http.StatusNotModified was returned.
24161func (c *InstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) {
24162	gensupport.SetOptions(c.urlParams_, opts...)
24163	res, err := c.doRequest("json")
24164	if res != nil && res.StatusCode == http.StatusNotModified {
24165		if res.Body != nil {
24166			res.Body.Close()
24167		}
24168		return nil, &googleapi.Error{
24169			Code:   res.StatusCode,
24170			Header: res.Header,
24171		}
24172	}
24173	if err != nil {
24174		return nil, err
24175	}
24176	defer googleapi.CloseBody(res)
24177	if err := googleapi.CheckResponse(res); err != nil {
24178		return nil, err
24179	}
24180	ret := &InstanceGroupManager{
24181		ServerResponse: googleapi.ServerResponse{
24182			Header:         res.Header,
24183			HTTPStatusCode: res.StatusCode,
24184		},
24185	}
24186	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24187		return nil, err
24188	}
24189	return ret, nil
24190	// {
24191	//   "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.",
24192	//   "httpMethod": "GET",
24193	//   "id": "compute.instanceGroupManagers.get",
24194	//   "parameterOrder": [
24195	//     "project",
24196	//     "zone",
24197	//     "instanceGroupManager"
24198	//   ],
24199	//   "parameters": {
24200	//     "instanceGroupManager": {
24201	//       "description": "The name of the managed instance group.",
24202	//       "location": "path",
24203	//       "required": true,
24204	//       "type": "string"
24205	//     },
24206	//     "project": {
24207	//       "description": "Project ID for this request.",
24208	//       "location": "path",
24209	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24210	//       "required": true,
24211	//       "type": "string"
24212	//     },
24213	//     "zone": {
24214	//       "description": "The name of the zone where the managed instance group is located.",
24215	//       "location": "path",
24216	//       "required": true,
24217	//       "type": "string"
24218	//     }
24219	//   },
24220	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}",
24221	//   "response": {
24222	//     "$ref": "InstanceGroupManager"
24223	//   },
24224	//   "scopes": [
24225	//     "https://www.googleapis.com/auth/cloud-platform",
24226	//     "https://www.googleapis.com/auth/compute",
24227	//     "https://www.googleapis.com/auth/compute.readonly"
24228	//   ]
24229	// }
24230
24231}
24232
24233// method id "compute.instanceGroupManagers.insert":
24234
24235type InstanceGroupManagersInsertCall struct {
24236	s                    *Service
24237	project              string
24238	zone                 string
24239	instancegroupmanager *InstanceGroupManager
24240	urlParams_           gensupport.URLParams
24241	ctx_                 context.Context
24242}
24243
24244// Insert: Creates a managed instance group using the information that
24245// you specify in the request. After the group is created, it schedules
24246// an action to create instances in the group using the specified
24247// instance template. This operation is marked as DONE when the group is
24248// created even if the instances in the group have not yet been created.
24249// You must separately verify the status of the individual instances
24250// with the listmanagedinstances method.
24251func (r *InstanceGroupManagersService) Insert(project string, zone string, instancegroupmanager *InstanceGroupManager) *InstanceGroupManagersInsertCall {
24252	c := &InstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24253	c.project = project
24254	c.zone = zone
24255	c.instancegroupmanager = instancegroupmanager
24256	return c
24257}
24258
24259// Fields allows partial responses to be retrieved. See
24260// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24261// for more information.
24262func (c *InstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *InstanceGroupManagersInsertCall {
24263	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24264	return c
24265}
24266
24267// Context sets the context to be used in this call's Do method. Any
24268// pending HTTP request will be aborted if the provided context is
24269// canceled.
24270func (c *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall {
24271	c.ctx_ = ctx
24272	return c
24273}
24274
24275func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) {
24276	var body io.Reader = nil
24277	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
24278	if err != nil {
24279		return nil, err
24280	}
24281	ctype := "application/json"
24282	c.urlParams_.Set("alt", alt)
24283	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers")
24284	urls += "?" + c.urlParams_.Encode()
24285	req, _ := http.NewRequest("POST", urls, body)
24286	googleapi.Expand(req.URL, map[string]string{
24287		"project": c.project,
24288		"zone":    c.zone,
24289	})
24290	req.Header.Set("Content-Type", ctype)
24291	req.Header.Set("User-Agent", c.s.userAgent())
24292	if c.ctx_ != nil {
24293		return ctxhttp.Do(c.ctx_, c.s.client, req)
24294	}
24295	return c.s.client.Do(req)
24296}
24297
24298// Do executes the "compute.instanceGroupManagers.insert" call.
24299// Exactly one of *Operation or error will be non-nil. Any non-2xx
24300// status code is an error. Response headers are in either
24301// *Operation.ServerResponse.Header or (if a response was returned at
24302// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24303// to check whether the returned error was because
24304// http.StatusNotModified was returned.
24305func (c *InstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24306	gensupport.SetOptions(c.urlParams_, opts...)
24307	res, err := c.doRequest("json")
24308	if res != nil && res.StatusCode == http.StatusNotModified {
24309		if res.Body != nil {
24310			res.Body.Close()
24311		}
24312		return nil, &googleapi.Error{
24313			Code:   res.StatusCode,
24314			Header: res.Header,
24315		}
24316	}
24317	if err != nil {
24318		return nil, err
24319	}
24320	defer googleapi.CloseBody(res)
24321	if err := googleapi.CheckResponse(res); err != nil {
24322		return nil, err
24323	}
24324	ret := &Operation{
24325		ServerResponse: googleapi.ServerResponse{
24326			Header:         res.Header,
24327			HTTPStatusCode: res.StatusCode,
24328		},
24329	}
24330	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24331		return nil, err
24332	}
24333	return ret, nil
24334	// {
24335	//   "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.",
24336	//   "httpMethod": "POST",
24337	//   "id": "compute.instanceGroupManagers.insert",
24338	//   "parameterOrder": [
24339	//     "project",
24340	//     "zone"
24341	//   ],
24342	//   "parameters": {
24343	//     "project": {
24344	//       "description": "Project ID for this request.",
24345	//       "location": "path",
24346	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24347	//       "required": true,
24348	//       "type": "string"
24349	//     },
24350	//     "zone": {
24351	//       "description": "The name of the zone where you want to create the managed instance group.",
24352	//       "location": "path",
24353	//       "required": true,
24354	//       "type": "string"
24355	//     }
24356	//   },
24357	//   "path": "{project}/zones/{zone}/instanceGroupManagers",
24358	//   "request": {
24359	//     "$ref": "InstanceGroupManager"
24360	//   },
24361	//   "response": {
24362	//     "$ref": "Operation"
24363	//   },
24364	//   "scopes": [
24365	//     "https://www.googleapis.com/auth/cloud-platform",
24366	//     "https://www.googleapis.com/auth/compute"
24367	//   ]
24368	// }
24369
24370}
24371
24372// method id "compute.instanceGroupManagers.list":
24373
24374type InstanceGroupManagersListCall struct {
24375	s            *Service
24376	project      string
24377	zone         string
24378	urlParams_   gensupport.URLParams
24379	ifNoneMatch_ string
24380	ctx_         context.Context
24381}
24382
24383// List: Retrieves a list of managed instance groups that are contained
24384// within the specified project and zone.
24385func (r *InstanceGroupManagersService) List(project string, zone string) *InstanceGroupManagersListCall {
24386	c := &InstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24387	c.project = project
24388	c.zone = zone
24389	return c
24390}
24391
24392// Filter sets the optional parameter "filter": Sets a filter expression
24393// for filtering listed resources, in the form filter={expression}. Your
24394// {expression} must be in the format: field_name comparison_string
24395// literal_string.
24396//
24397// The field_name is the name of the field you want to compare. Only
24398// atomic field types are supported (string, number, boolean). The
24399// comparison_string must be either eq (equals) or ne (not equals). The
24400// literal_string is the string value to filter to. The literal value
24401// must be valid for the type of field you are filtering by (string,
24402// number, boolean). For string fields, the literal value is interpreted
24403// as a regular expression using RE2 syntax. The literal value must
24404// match the entire field.
24405//
24406// For example, to filter for instances that do not have a name of
24407// example-instance, you would use filter=name ne
24408// example-instance.
24409//
24410// Compute Engine Beta API Only: If you use filtering in the Beta API,
24411// you can also filter on nested fields. For example, you could filter
24412// on instances that have set the scheduling.automaticRestart field to
24413// true. In particular, use filtering on nested fields to take advantage
24414// of instance labels to organize and filter results based on label
24415// values.
24416//
24417// The Beta API also supports filtering on multiple expressions by
24418// providing each separate expression within parentheses. For example,
24419// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
24420// Multiple expressions are treated as AND expressions, meaning that
24421// resources must match all expressions to pass the filters.
24422func (c *InstanceGroupManagersListCall) Filter(filter string) *InstanceGroupManagersListCall {
24423	c.urlParams_.Set("filter", filter)
24424	return c
24425}
24426
24427// MaxResults sets the optional parameter "maxResults": The maximum
24428// number of results per page that should be returned. If the number of
24429// available results is larger than maxResults, Compute Engine returns a
24430// nextPageToken that can be used to get the next page of results in
24431// subsequent list requests.
24432func (c *InstanceGroupManagersListCall) MaxResults(maxResults int64) *InstanceGroupManagersListCall {
24433	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
24434	return c
24435}
24436
24437// OrderBy sets the optional parameter "orderBy": Sorts list results by
24438// a certain order. By default, results are returned in alphanumerical
24439// order based on the resource name.
24440//
24441// You can also sort results in descending order based on the creation
24442// timestamp using orderBy="creationTimestamp desc". This sorts results
24443// based on the creationTimestamp field in reverse chronological order
24444// (newest result first). Use this to sort resources like operations so
24445// that the newest operation is returned first.
24446//
24447// Currently, only sorting by name or creationTimestamp desc is
24448// supported.
24449func (c *InstanceGroupManagersListCall) OrderBy(orderBy string) *InstanceGroupManagersListCall {
24450	c.urlParams_.Set("orderBy", orderBy)
24451	return c
24452}
24453
24454// PageToken sets the optional parameter "pageToken": Specifies a page
24455// token to use. Set pageToken to the nextPageToken returned by a
24456// previous list request to get the next page of results.
24457func (c *InstanceGroupManagersListCall) PageToken(pageToken string) *InstanceGroupManagersListCall {
24458	c.urlParams_.Set("pageToken", pageToken)
24459	return c
24460}
24461
24462// Fields allows partial responses to be retrieved. See
24463// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24464// for more information.
24465func (c *InstanceGroupManagersListCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListCall {
24466	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24467	return c
24468}
24469
24470// IfNoneMatch sets the optional parameter which makes the operation
24471// fail if the object's ETag matches the given value. This is useful for
24472// getting updates only after the object has changed since the last
24473// request. Use googleapi.IsNotModified to check whether the response
24474// error from Do is the result of In-None-Match.
24475func (c *InstanceGroupManagersListCall) IfNoneMatch(entityTag string) *InstanceGroupManagersListCall {
24476	c.ifNoneMatch_ = entityTag
24477	return c
24478}
24479
24480// Context sets the context to be used in this call's Do method. Any
24481// pending HTTP request will be aborted if the provided context is
24482// canceled.
24483func (c *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall {
24484	c.ctx_ = ctx
24485	return c
24486}
24487
24488func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) {
24489	var body io.Reader = nil
24490	c.urlParams_.Set("alt", alt)
24491	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers")
24492	urls += "?" + c.urlParams_.Encode()
24493	req, _ := http.NewRequest("GET", urls, body)
24494	googleapi.Expand(req.URL, map[string]string{
24495		"project": c.project,
24496		"zone":    c.zone,
24497	})
24498	req.Header.Set("User-Agent", c.s.userAgent())
24499	if c.ifNoneMatch_ != "" {
24500		req.Header.Set("If-None-Match", c.ifNoneMatch_)
24501	}
24502	if c.ctx_ != nil {
24503		return ctxhttp.Do(c.ctx_, c.s.client, req)
24504	}
24505	return c.s.client.Do(req)
24506}
24507
24508// Do executes the "compute.instanceGroupManagers.list" call.
24509// Exactly one of *InstanceGroupManagerList or error will be non-nil.
24510// Any non-2xx status code is an error. Response headers are in either
24511// *InstanceGroupManagerList.ServerResponse.Header or (if a response was
24512// returned at all) in error.(*googleapi.Error).Header. Use
24513// googleapi.IsNotModified to check whether the returned error was
24514// because http.StatusNotModified was returned.
24515func (c *InstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerList, error) {
24516	gensupport.SetOptions(c.urlParams_, opts...)
24517	res, err := c.doRequest("json")
24518	if res != nil && res.StatusCode == http.StatusNotModified {
24519		if res.Body != nil {
24520			res.Body.Close()
24521		}
24522		return nil, &googleapi.Error{
24523			Code:   res.StatusCode,
24524			Header: res.Header,
24525		}
24526	}
24527	if err != nil {
24528		return nil, err
24529	}
24530	defer googleapi.CloseBody(res)
24531	if err := googleapi.CheckResponse(res); err != nil {
24532		return nil, err
24533	}
24534	ret := &InstanceGroupManagerList{
24535		ServerResponse: googleapi.ServerResponse{
24536			Header:         res.Header,
24537			HTTPStatusCode: res.StatusCode,
24538		},
24539	}
24540	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24541		return nil, err
24542	}
24543	return ret, nil
24544	// {
24545	//   "description": "Retrieves a list of managed instance groups that are contained within the specified project and zone.",
24546	//   "httpMethod": "GET",
24547	//   "id": "compute.instanceGroupManagers.list",
24548	//   "parameterOrder": [
24549	//     "project",
24550	//     "zone"
24551	//   ],
24552	//   "parameters": {
24553	//     "filter": {
24554	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
24555	//       "location": "query",
24556	//       "type": "string"
24557	//     },
24558	//     "maxResults": {
24559	//       "default": "500",
24560	//       "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.",
24561	//       "format": "uint32",
24562	//       "location": "query",
24563	//       "maximum": "500",
24564	//       "minimum": "0",
24565	//       "type": "integer"
24566	//     },
24567	//     "orderBy": {
24568	//       "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.",
24569	//       "location": "query",
24570	//       "type": "string"
24571	//     },
24572	//     "pageToken": {
24573	//       "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.",
24574	//       "location": "query",
24575	//       "type": "string"
24576	//     },
24577	//     "project": {
24578	//       "description": "Project ID for this request.",
24579	//       "location": "path",
24580	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24581	//       "required": true,
24582	//       "type": "string"
24583	//     },
24584	//     "zone": {
24585	//       "description": "The name of the zone where the managed instance group is located.",
24586	//       "location": "path",
24587	//       "required": true,
24588	//       "type": "string"
24589	//     }
24590	//   },
24591	//   "path": "{project}/zones/{zone}/instanceGroupManagers",
24592	//   "response": {
24593	//     "$ref": "InstanceGroupManagerList"
24594	//   },
24595	//   "scopes": [
24596	//     "https://www.googleapis.com/auth/cloud-platform",
24597	//     "https://www.googleapis.com/auth/compute",
24598	//     "https://www.googleapis.com/auth/compute.readonly"
24599	//   ]
24600	// }
24601
24602}
24603
24604// Pages invokes f for each page of results.
24605// A non-nil error returned from f will halt the iteration.
24606// The provided context supersedes any context provided to the Context method.
24607func (c *InstanceGroupManagersListCall) Pages(ctx context.Context, f func(*InstanceGroupManagerList) error) error {
24608	c.ctx_ = ctx
24609	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
24610	for {
24611		x, err := c.Do()
24612		if err != nil {
24613			return err
24614		}
24615		if err := f(x); err != nil {
24616			return err
24617		}
24618		if x.NextPageToken == "" {
24619			return nil
24620		}
24621		c.PageToken(x.NextPageToken)
24622	}
24623}
24624
24625// method id "compute.instanceGroupManagers.listManagedInstances":
24626
24627type InstanceGroupManagersListManagedInstancesCall struct {
24628	s                    *Service
24629	project              string
24630	zone                 string
24631	instanceGroupManager string
24632	urlParams_           gensupport.URLParams
24633	ctx_                 context.Context
24634}
24635
24636// ListManagedInstances: Lists all of the instances in the managed
24637// instance group. Each instance in the list has a currentAction, which
24638// indicates the action that the managed instance group is performing on
24639// the instance. For example, if the group is still creating an
24640// instance, the currentAction is CREATING. If a previous action failed,
24641// the list displays the errors for that failed action.
24642func (r *InstanceGroupManagersService) ListManagedInstances(project string, zone string, instanceGroupManager string) *InstanceGroupManagersListManagedInstancesCall {
24643	c := &InstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24644	c.project = project
24645	c.zone = zone
24646	c.instanceGroupManager = instanceGroupManager
24647	return c
24648}
24649
24650// Fields allows partial responses to be retrieved. See
24651// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24652// for more information.
24653func (c *InstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersListManagedInstancesCall {
24654	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24655	return c
24656}
24657
24658// Context sets the context to be used in this call's Do method. Any
24659// pending HTTP request will be aborted if the provided context is
24660// canceled.
24661func (c *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall {
24662	c.ctx_ = ctx
24663	return c
24664}
24665
24666func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) {
24667	var body io.Reader = nil
24668	c.urlParams_.Set("alt", alt)
24669	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances")
24670	urls += "?" + c.urlParams_.Encode()
24671	req, _ := http.NewRequest("POST", urls, body)
24672	googleapi.Expand(req.URL, map[string]string{
24673		"project":              c.project,
24674		"zone":                 c.zone,
24675		"instanceGroupManager": c.instanceGroupManager,
24676	})
24677	req.Header.Set("User-Agent", c.s.userAgent())
24678	if c.ctx_ != nil {
24679		return ctxhttp.Do(c.ctx_, c.s.client, req)
24680	}
24681	return c.s.client.Do(req)
24682}
24683
24684// Do executes the "compute.instanceGroupManagers.listManagedInstances" call.
24685// Exactly one of *InstanceGroupManagersListManagedInstancesResponse or
24686// error will be non-nil. Any non-2xx status code is an error. Response
24687// headers are in either
24688// *InstanceGroupManagersListManagedInstancesResponse.ServerResponse.Head
24689// er or (if a response was returned at all) in
24690// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
24691// whether the returned error was because http.StatusNotModified was
24692// returned.
24693func (c *InstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagersListManagedInstancesResponse, error) {
24694	gensupport.SetOptions(c.urlParams_, opts...)
24695	res, err := c.doRequest("json")
24696	if res != nil && res.StatusCode == http.StatusNotModified {
24697		if res.Body != nil {
24698			res.Body.Close()
24699		}
24700		return nil, &googleapi.Error{
24701			Code:   res.StatusCode,
24702			Header: res.Header,
24703		}
24704	}
24705	if err != nil {
24706		return nil, err
24707	}
24708	defer googleapi.CloseBody(res)
24709	if err := googleapi.CheckResponse(res); err != nil {
24710		return nil, err
24711	}
24712	ret := &InstanceGroupManagersListManagedInstancesResponse{
24713		ServerResponse: googleapi.ServerResponse{
24714			Header:         res.Header,
24715			HTTPStatusCode: res.StatusCode,
24716		},
24717	}
24718	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24719		return nil, err
24720	}
24721	return ret, nil
24722	// {
24723	//   "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.",
24724	//   "httpMethod": "POST",
24725	//   "id": "compute.instanceGroupManagers.listManagedInstances",
24726	//   "parameterOrder": [
24727	//     "project",
24728	//     "zone",
24729	//     "instanceGroupManager"
24730	//   ],
24731	//   "parameters": {
24732	//     "instanceGroupManager": {
24733	//       "description": "The name of the managed instance group.",
24734	//       "location": "path",
24735	//       "required": true,
24736	//       "type": "string"
24737	//     },
24738	//     "project": {
24739	//       "description": "Project ID for this request.",
24740	//       "location": "path",
24741	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24742	//       "required": true,
24743	//       "type": "string"
24744	//     },
24745	//     "zone": {
24746	//       "description": "The name of the zone where the managed instance group is located.",
24747	//       "location": "path",
24748	//       "required": true,
24749	//       "type": "string"
24750	//     }
24751	//   },
24752	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances",
24753	//   "response": {
24754	//     "$ref": "InstanceGroupManagersListManagedInstancesResponse"
24755	//   },
24756	//   "scopes": [
24757	//     "https://www.googleapis.com/auth/cloud-platform",
24758	//     "https://www.googleapis.com/auth/compute",
24759	//     "https://www.googleapis.com/auth/compute.readonly"
24760	//   ]
24761	// }
24762
24763}
24764
24765// method id "compute.instanceGroupManagers.recreateInstances":
24766
24767type InstanceGroupManagersRecreateInstancesCall struct {
24768	s                                             *Service
24769	project                                       string
24770	zone                                          string
24771	instanceGroupManager                          string
24772	instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest
24773	urlParams_                                    gensupport.URLParams
24774	ctx_                                          context.Context
24775}
24776
24777// RecreateInstances: Schedules a group action to recreate the specified
24778// instances in the managed instance group. The instances are deleted
24779// and recreated using the current instance template for the managed
24780// instance group. This operation is marked as DONE when the action is
24781// scheduled even if the instances have not yet been recreated. You must
24782// separately verify the status of the recreating action with the
24783// listmanagedinstances method.
24784func (r *InstanceGroupManagersService) RecreateInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest) *InstanceGroupManagersRecreateInstancesCall {
24785	c := &InstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24786	c.project = project
24787	c.zone = zone
24788	c.instanceGroupManager = instanceGroupManager
24789	c.instancegroupmanagersrecreateinstancesrequest = instancegroupmanagersrecreateinstancesrequest
24790	return c
24791}
24792
24793// Fields allows partial responses to be retrieved. See
24794// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24795// for more information.
24796func (c *InstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersRecreateInstancesCall {
24797	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24798	return c
24799}
24800
24801// Context sets the context to be used in this call's Do method. Any
24802// pending HTTP request will be aborted if the provided context is
24803// canceled.
24804func (c *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall {
24805	c.ctx_ = ctx
24806	return c
24807}
24808
24809func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) {
24810	var body io.Reader = nil
24811	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest)
24812	if err != nil {
24813		return nil, err
24814	}
24815	ctype := "application/json"
24816	c.urlParams_.Set("alt", alt)
24817	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances")
24818	urls += "?" + c.urlParams_.Encode()
24819	req, _ := http.NewRequest("POST", urls, body)
24820	googleapi.Expand(req.URL, map[string]string{
24821		"project":              c.project,
24822		"zone":                 c.zone,
24823		"instanceGroupManager": c.instanceGroupManager,
24824	})
24825	req.Header.Set("Content-Type", ctype)
24826	req.Header.Set("User-Agent", c.s.userAgent())
24827	if c.ctx_ != nil {
24828		return ctxhttp.Do(c.ctx_, c.s.client, req)
24829	}
24830	return c.s.client.Do(req)
24831}
24832
24833// Do executes the "compute.instanceGroupManagers.recreateInstances" call.
24834// Exactly one of *Operation or error will be non-nil. Any non-2xx
24835// status code is an error. Response headers are in either
24836// *Operation.ServerResponse.Header or (if a response was returned at
24837// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24838// to check whether the returned error was because
24839// http.StatusNotModified was returned.
24840func (c *InstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24841	gensupport.SetOptions(c.urlParams_, opts...)
24842	res, err := c.doRequest("json")
24843	if res != nil && res.StatusCode == http.StatusNotModified {
24844		if res.Body != nil {
24845			res.Body.Close()
24846		}
24847		return nil, &googleapi.Error{
24848			Code:   res.StatusCode,
24849			Header: res.Header,
24850		}
24851	}
24852	if err != nil {
24853		return nil, err
24854	}
24855	defer googleapi.CloseBody(res)
24856	if err := googleapi.CheckResponse(res); err != nil {
24857		return nil, err
24858	}
24859	ret := &Operation{
24860		ServerResponse: googleapi.ServerResponse{
24861			Header:         res.Header,
24862			HTTPStatusCode: res.StatusCode,
24863		},
24864	}
24865	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
24866		return nil, err
24867	}
24868	return ret, nil
24869	// {
24870	//   "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.",
24871	//   "httpMethod": "POST",
24872	//   "id": "compute.instanceGroupManagers.recreateInstances",
24873	//   "parameterOrder": [
24874	//     "project",
24875	//     "zone",
24876	//     "instanceGroupManager"
24877	//   ],
24878	//   "parameters": {
24879	//     "instanceGroupManager": {
24880	//       "description": "The name of the managed instance group.",
24881	//       "location": "path",
24882	//       "required": true,
24883	//       "type": "string"
24884	//     },
24885	//     "project": {
24886	//       "description": "Project ID for this request.",
24887	//       "location": "path",
24888	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
24889	//       "required": true,
24890	//       "type": "string"
24891	//     },
24892	//     "zone": {
24893	//       "description": "The name of the zone where the managed instance group is located.",
24894	//       "location": "path",
24895	//       "required": true,
24896	//       "type": "string"
24897	//     }
24898	//   },
24899	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances",
24900	//   "request": {
24901	//     "$ref": "InstanceGroupManagersRecreateInstancesRequest"
24902	//   },
24903	//   "response": {
24904	//     "$ref": "Operation"
24905	//   },
24906	//   "scopes": [
24907	//     "https://www.googleapis.com/auth/cloud-platform",
24908	//     "https://www.googleapis.com/auth/compute"
24909	//   ]
24910	// }
24911
24912}
24913
24914// method id "compute.instanceGroupManagers.resize":
24915
24916type InstanceGroupManagersResizeCall struct {
24917	s                    *Service
24918	project              string
24919	zone                 string
24920	instanceGroupManager string
24921	urlParams_           gensupport.URLParams
24922	ctx_                 context.Context
24923}
24924
24925// Resize: Resizes the managed instance group. If you increase the size,
24926// the group creates new instances using the current instance template.
24927// If you decrease the size, the group deletes instances. The resize
24928// operation is marked DONE when the resize actions are scheduled even
24929// if the group has not yet added or deleted any instances. You must
24930// separately verify the status of the creating or deleting actions with
24931// the listmanagedinstances method.
24932func (r *InstanceGroupManagersService) Resize(project string, zone string, instanceGroupManager string, size int64) *InstanceGroupManagersResizeCall {
24933	c := &InstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
24934	c.project = project
24935	c.zone = zone
24936	c.instanceGroupManager = instanceGroupManager
24937	c.urlParams_.Set("size", fmt.Sprint(size))
24938	return c
24939}
24940
24941// Fields allows partial responses to be retrieved. See
24942// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
24943// for more information.
24944func (c *InstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResizeCall {
24945	c.urlParams_.Set("fields", googleapi.CombineFields(s))
24946	return c
24947}
24948
24949// Context sets the context to be used in this call's Do method. Any
24950// pending HTTP request will be aborted if the provided context is
24951// canceled.
24952func (c *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall {
24953	c.ctx_ = ctx
24954	return c
24955}
24956
24957func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) {
24958	var body io.Reader = nil
24959	c.urlParams_.Set("alt", alt)
24960	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize")
24961	urls += "?" + c.urlParams_.Encode()
24962	req, _ := http.NewRequest("POST", urls, body)
24963	googleapi.Expand(req.URL, map[string]string{
24964		"project":              c.project,
24965		"zone":                 c.zone,
24966		"instanceGroupManager": c.instanceGroupManager,
24967	})
24968	req.Header.Set("User-Agent", c.s.userAgent())
24969	if c.ctx_ != nil {
24970		return ctxhttp.Do(c.ctx_, c.s.client, req)
24971	}
24972	return c.s.client.Do(req)
24973}
24974
24975// Do executes the "compute.instanceGroupManagers.resize" call.
24976// Exactly one of *Operation or error will be non-nil. Any non-2xx
24977// status code is an error. Response headers are in either
24978// *Operation.ServerResponse.Header or (if a response was returned at
24979// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
24980// to check whether the returned error was because
24981// http.StatusNotModified was returned.
24982func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
24983	gensupport.SetOptions(c.urlParams_, opts...)
24984	res, err := c.doRequest("json")
24985	if res != nil && res.StatusCode == http.StatusNotModified {
24986		if res.Body != nil {
24987			res.Body.Close()
24988		}
24989		return nil, &googleapi.Error{
24990			Code:   res.StatusCode,
24991			Header: res.Header,
24992		}
24993	}
24994	if err != nil {
24995		return nil, err
24996	}
24997	defer googleapi.CloseBody(res)
24998	if err := googleapi.CheckResponse(res); err != nil {
24999		return nil, err
25000	}
25001	ret := &Operation{
25002		ServerResponse: googleapi.ServerResponse{
25003			Header:         res.Header,
25004			HTTPStatusCode: res.StatusCode,
25005		},
25006	}
25007	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25008		return nil, err
25009	}
25010	return ret, nil
25011	// {
25012	//   "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.",
25013	//   "httpMethod": "POST",
25014	//   "id": "compute.instanceGroupManagers.resize",
25015	//   "parameterOrder": [
25016	//     "project",
25017	//     "zone",
25018	//     "instanceGroupManager",
25019	//     "size"
25020	//   ],
25021	//   "parameters": {
25022	//     "instanceGroupManager": {
25023	//       "description": "The name of the managed instance group.",
25024	//       "location": "path",
25025	//       "required": true,
25026	//       "type": "string"
25027	//     },
25028	//     "project": {
25029	//       "description": "Project ID for this request.",
25030	//       "location": "path",
25031	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25032	//       "required": true,
25033	//       "type": "string"
25034	//     },
25035	//     "size": {
25036	//       "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.",
25037	//       "format": "int32",
25038	//       "location": "query",
25039	//       "required": true,
25040	//       "type": "integer"
25041	//     },
25042	//     "zone": {
25043	//       "description": "The name of the zone where the managed instance group is located.",
25044	//       "location": "path",
25045	//       "required": true,
25046	//       "type": "string"
25047	//     }
25048	//   },
25049	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize",
25050	//   "response": {
25051	//     "$ref": "Operation"
25052	//   },
25053	//   "scopes": [
25054	//     "https://www.googleapis.com/auth/cloud-platform",
25055	//     "https://www.googleapis.com/auth/compute"
25056	//   ]
25057	// }
25058
25059}
25060
25061// method id "compute.instanceGroupManagers.setAutoHealingPolicies":
25062
25063type InstanceGroupManagersSetAutoHealingPoliciesCall struct {
25064	s                                          *Service
25065	project                                    string
25066	zone                                       string
25067	instanceGroupManager                       string
25068	instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest
25069	urlParams_                                 gensupport.URLParams
25070	ctx_                                       context.Context
25071}
25072
25073// SetAutoHealingPolicies: Modifies the autohealing policies.
25074func (r *InstanceGroupManagersService) SetAutoHealingPolicies(project string, zone string, instanceGroupManager string, instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest) *InstanceGroupManagersSetAutoHealingPoliciesCall {
25075	c := &InstanceGroupManagersSetAutoHealingPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25076	c.project = project
25077	c.zone = zone
25078	c.instanceGroupManager = instanceGroupManager
25079	c.instancegroupmanagerssetautohealingrequest = instancegroupmanagerssetautohealingrequest
25080	return c
25081}
25082
25083// Fields allows partial responses to be retrieved. See
25084// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25085// for more information.
25086func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetAutoHealingPoliciesCall {
25087	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25088	return c
25089}
25090
25091// Context sets the context to be used in this call's Do method. Any
25092// pending HTTP request will be aborted if the provided context is
25093// canceled.
25094func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *InstanceGroupManagersSetAutoHealingPoliciesCall {
25095	c.ctx_ = ctx
25096	return c
25097}
25098
25099func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) {
25100	var body io.Reader = nil
25101	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetautohealingrequest)
25102	if err != nil {
25103		return nil, err
25104	}
25105	ctype := "application/json"
25106	c.urlParams_.Set("alt", alt)
25107	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies")
25108	urls += "?" + c.urlParams_.Encode()
25109	req, _ := http.NewRequest("POST", urls, body)
25110	googleapi.Expand(req.URL, map[string]string{
25111		"project":              c.project,
25112		"zone":                 c.zone,
25113		"instanceGroupManager": c.instanceGroupManager,
25114	})
25115	req.Header.Set("Content-Type", ctype)
25116	req.Header.Set("User-Agent", c.s.userAgent())
25117	if c.ctx_ != nil {
25118		return ctxhttp.Do(c.ctx_, c.s.client, req)
25119	}
25120	return c.s.client.Do(req)
25121}
25122
25123// Do executes the "compute.instanceGroupManagers.setAutoHealingPolicies" call.
25124// Exactly one of *Operation or error will be non-nil. Any non-2xx
25125// status code is an error. Response headers are in either
25126// *Operation.ServerResponse.Header or (if a response was returned at
25127// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25128// to check whether the returned error was because
25129// http.StatusNotModified was returned.
25130func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25131	gensupport.SetOptions(c.urlParams_, opts...)
25132	res, err := c.doRequest("json")
25133	if res != nil && res.StatusCode == http.StatusNotModified {
25134		if res.Body != nil {
25135			res.Body.Close()
25136		}
25137		return nil, &googleapi.Error{
25138			Code:   res.StatusCode,
25139			Header: res.Header,
25140		}
25141	}
25142	if err != nil {
25143		return nil, err
25144	}
25145	defer googleapi.CloseBody(res)
25146	if err := googleapi.CheckResponse(res); err != nil {
25147		return nil, err
25148	}
25149	ret := &Operation{
25150		ServerResponse: googleapi.ServerResponse{
25151			Header:         res.Header,
25152			HTTPStatusCode: res.StatusCode,
25153		},
25154	}
25155	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25156		return nil, err
25157	}
25158	return ret, nil
25159	// {
25160	//   "description": "Modifies the autohealing policies.",
25161	//   "httpMethod": "POST",
25162	//   "id": "compute.instanceGroupManagers.setAutoHealingPolicies",
25163	//   "parameterOrder": [
25164	//     "project",
25165	//     "zone",
25166	//     "instanceGroupManager"
25167	//   ],
25168	//   "parameters": {
25169	//     "instanceGroupManager": {
25170	//       "description": "The name of the instance group manager.",
25171	//       "location": "path",
25172	//       "required": true,
25173	//       "type": "string"
25174	//     },
25175	//     "project": {
25176	//       "description": "Project ID for this request.",
25177	//       "location": "path",
25178	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25179	//       "required": true,
25180	//       "type": "string"
25181	//     },
25182	//     "zone": {
25183	//       "description": "The name of the zone where the managed instance group is located.",
25184	//       "location": "path",
25185	//       "required": true,
25186	//       "type": "string"
25187	//     }
25188	//   },
25189	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies",
25190	//   "request": {
25191	//     "$ref": "InstanceGroupManagersSetAutoHealingRequest"
25192	//   },
25193	//   "response": {
25194	//     "$ref": "Operation"
25195	//   },
25196	//   "scopes": [
25197	//     "https://www.googleapis.com/auth/cloud-platform",
25198	//     "https://www.googleapis.com/auth/compute"
25199	//   ]
25200	// }
25201
25202}
25203
25204// method id "compute.instanceGroupManagers.setInstanceTemplate":
25205
25206type InstanceGroupManagersSetInstanceTemplateCall struct {
25207	s                                               *Service
25208	project                                         string
25209	zone                                            string
25210	instanceGroupManager                            string
25211	instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest
25212	urlParams_                                      gensupport.URLParams
25213	ctx_                                            context.Context
25214}
25215
25216// SetInstanceTemplate: Specifies the instance template to use when
25217// creating new instances in this group. The templates for existing
25218// instances in the group do not change unless you recreate them.
25219func (r *InstanceGroupManagersService) SetInstanceTemplate(project string, zone string, instanceGroupManager string, instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest) *InstanceGroupManagersSetInstanceTemplateCall {
25220	c := &InstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25221	c.project = project
25222	c.zone = zone
25223	c.instanceGroupManager = instanceGroupManager
25224	c.instancegroupmanagerssetinstancetemplaterequest = instancegroupmanagerssetinstancetemplaterequest
25225	return c
25226}
25227
25228// Fields allows partial responses to be retrieved. See
25229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25230// for more information.
25231func (c *InstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetInstanceTemplateCall {
25232	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25233	return c
25234}
25235
25236// Context sets the context to be used in this call's Do method. Any
25237// pending HTTP request will be aborted if the provided context is
25238// canceled.
25239func (c *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall {
25240	c.ctx_ = ctx
25241	return c
25242}
25243
25244func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) {
25245	var body io.Reader = nil
25246	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest)
25247	if err != nil {
25248		return nil, err
25249	}
25250	ctype := "application/json"
25251	c.urlParams_.Set("alt", alt)
25252	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate")
25253	urls += "?" + c.urlParams_.Encode()
25254	req, _ := http.NewRequest("POST", urls, body)
25255	googleapi.Expand(req.URL, map[string]string{
25256		"project":              c.project,
25257		"zone":                 c.zone,
25258		"instanceGroupManager": c.instanceGroupManager,
25259	})
25260	req.Header.Set("Content-Type", ctype)
25261	req.Header.Set("User-Agent", c.s.userAgent())
25262	if c.ctx_ != nil {
25263		return ctxhttp.Do(c.ctx_, c.s.client, req)
25264	}
25265	return c.s.client.Do(req)
25266}
25267
25268// Do executes the "compute.instanceGroupManagers.setInstanceTemplate" call.
25269// Exactly one of *Operation or error will be non-nil. Any non-2xx
25270// status code is an error. Response headers are in either
25271// *Operation.ServerResponse.Header or (if a response was returned at
25272// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25273// to check whether the returned error was because
25274// http.StatusNotModified was returned.
25275func (c *InstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25276	gensupport.SetOptions(c.urlParams_, opts...)
25277	res, err := c.doRequest("json")
25278	if res != nil && res.StatusCode == http.StatusNotModified {
25279		if res.Body != nil {
25280			res.Body.Close()
25281		}
25282		return nil, &googleapi.Error{
25283			Code:   res.StatusCode,
25284			Header: res.Header,
25285		}
25286	}
25287	if err != nil {
25288		return nil, err
25289	}
25290	defer googleapi.CloseBody(res)
25291	if err := googleapi.CheckResponse(res); err != nil {
25292		return nil, err
25293	}
25294	ret := &Operation{
25295		ServerResponse: googleapi.ServerResponse{
25296			Header:         res.Header,
25297			HTTPStatusCode: res.StatusCode,
25298		},
25299	}
25300	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25301		return nil, err
25302	}
25303	return ret, nil
25304	// {
25305	//   "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.",
25306	//   "httpMethod": "POST",
25307	//   "id": "compute.instanceGroupManagers.setInstanceTemplate",
25308	//   "parameterOrder": [
25309	//     "project",
25310	//     "zone",
25311	//     "instanceGroupManager"
25312	//   ],
25313	//   "parameters": {
25314	//     "instanceGroupManager": {
25315	//       "description": "The name of the managed instance group.",
25316	//       "location": "path",
25317	//       "required": true,
25318	//       "type": "string"
25319	//     },
25320	//     "project": {
25321	//       "description": "Project ID for this request.",
25322	//       "location": "path",
25323	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25324	//       "required": true,
25325	//       "type": "string"
25326	//     },
25327	//     "zone": {
25328	//       "description": "The name of the zone where the managed instance group is located.",
25329	//       "location": "path",
25330	//       "required": true,
25331	//       "type": "string"
25332	//     }
25333	//   },
25334	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate",
25335	//   "request": {
25336	//     "$ref": "InstanceGroupManagersSetInstanceTemplateRequest"
25337	//   },
25338	//   "response": {
25339	//     "$ref": "Operation"
25340	//   },
25341	//   "scopes": [
25342	//     "https://www.googleapis.com/auth/cloud-platform",
25343	//     "https://www.googleapis.com/auth/compute"
25344	//   ]
25345	// }
25346
25347}
25348
25349// method id "compute.instanceGroupManagers.setTargetPools":
25350
25351type InstanceGroupManagersSetTargetPoolsCall struct {
25352	s                                          *Service
25353	project                                    string
25354	zone                                       string
25355	instanceGroupManager                       string
25356	instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest
25357	urlParams_                                 gensupport.URLParams
25358	ctx_                                       context.Context
25359}
25360
25361// SetTargetPools: Modifies the target pools to which all instances in
25362// this managed instance group are assigned. The target pools
25363// automatically apply to all of the instances in the managed instance
25364// group. This operation is marked DONE when you make the request even
25365// if the instances have not yet been added to their target pools. The
25366// change might take some time to apply to all of the instances in the
25367// group depending on the size of the group.
25368func (r *InstanceGroupManagersService) SetTargetPools(project string, zone string, instanceGroupManager string, instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest) *InstanceGroupManagersSetTargetPoolsCall {
25369	c := &InstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25370	c.project = project
25371	c.zone = zone
25372	c.instanceGroupManager = instanceGroupManager
25373	c.instancegroupmanagerssettargetpoolsrequest = instancegroupmanagerssettargetpoolsrequest
25374	return c
25375}
25376
25377// Fields allows partial responses to be retrieved. See
25378// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25379// for more information.
25380func (c *InstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSetTargetPoolsCall {
25381	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25382	return c
25383}
25384
25385// Context sets the context to be used in this call's Do method. Any
25386// pending HTTP request will be aborted if the provided context is
25387// canceled.
25388func (c *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall {
25389	c.ctx_ = ctx
25390	return c
25391}
25392
25393func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) {
25394	var body io.Reader = nil
25395	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest)
25396	if err != nil {
25397		return nil, err
25398	}
25399	ctype := "application/json"
25400	c.urlParams_.Set("alt", alt)
25401	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools")
25402	urls += "?" + c.urlParams_.Encode()
25403	req, _ := http.NewRequest("POST", urls, body)
25404	googleapi.Expand(req.URL, map[string]string{
25405		"project":              c.project,
25406		"zone":                 c.zone,
25407		"instanceGroupManager": c.instanceGroupManager,
25408	})
25409	req.Header.Set("Content-Type", ctype)
25410	req.Header.Set("User-Agent", c.s.userAgent())
25411	if c.ctx_ != nil {
25412		return ctxhttp.Do(c.ctx_, c.s.client, req)
25413	}
25414	return c.s.client.Do(req)
25415}
25416
25417// Do executes the "compute.instanceGroupManagers.setTargetPools" call.
25418// Exactly one of *Operation or error will be non-nil. Any non-2xx
25419// status code is an error. Response headers are in either
25420// *Operation.ServerResponse.Header or (if a response was returned at
25421// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25422// to check whether the returned error was because
25423// http.StatusNotModified was returned.
25424func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25425	gensupport.SetOptions(c.urlParams_, opts...)
25426	res, err := c.doRequest("json")
25427	if res != nil && res.StatusCode == http.StatusNotModified {
25428		if res.Body != nil {
25429			res.Body.Close()
25430		}
25431		return nil, &googleapi.Error{
25432			Code:   res.StatusCode,
25433			Header: res.Header,
25434		}
25435	}
25436	if err != nil {
25437		return nil, err
25438	}
25439	defer googleapi.CloseBody(res)
25440	if err := googleapi.CheckResponse(res); err != nil {
25441		return nil, err
25442	}
25443	ret := &Operation{
25444		ServerResponse: googleapi.ServerResponse{
25445			Header:         res.Header,
25446			HTTPStatusCode: res.StatusCode,
25447		},
25448	}
25449	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25450		return nil, err
25451	}
25452	return ret, nil
25453	// {
25454	//   "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.",
25455	//   "httpMethod": "POST",
25456	//   "id": "compute.instanceGroupManagers.setTargetPools",
25457	//   "parameterOrder": [
25458	//     "project",
25459	//     "zone",
25460	//     "instanceGroupManager"
25461	//   ],
25462	//   "parameters": {
25463	//     "instanceGroupManager": {
25464	//       "description": "The name of the managed instance group.",
25465	//       "location": "path",
25466	//       "required": true,
25467	//       "type": "string"
25468	//     },
25469	//     "project": {
25470	//       "description": "Project ID for this request.",
25471	//       "location": "path",
25472	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25473	//       "required": true,
25474	//       "type": "string"
25475	//     },
25476	//     "zone": {
25477	//       "description": "The name of the zone where the managed instance group is located.",
25478	//       "location": "path",
25479	//       "required": true,
25480	//       "type": "string"
25481	//     }
25482	//   },
25483	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools",
25484	//   "request": {
25485	//     "$ref": "InstanceGroupManagersSetTargetPoolsRequest"
25486	//   },
25487	//   "response": {
25488	//     "$ref": "Operation"
25489	//   },
25490	//   "scopes": [
25491	//     "https://www.googleapis.com/auth/cloud-platform",
25492	//     "https://www.googleapis.com/auth/compute"
25493	//   ]
25494	// }
25495
25496}
25497
25498// method id "compute.instanceGroupManagers.testIamPermissions":
25499
25500type InstanceGroupManagersTestIamPermissionsCall struct {
25501	s                      *Service
25502	project                string
25503	zone                   string
25504	resource               string
25505	testpermissionsrequest *TestPermissionsRequest
25506	urlParams_             gensupport.URLParams
25507	ctx_                   context.Context
25508}
25509
25510// TestIamPermissions: Returns permissions that a caller has on the
25511// specified resource.
25512func (r *InstanceGroupManagersService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupManagersTestIamPermissionsCall {
25513	c := &InstanceGroupManagersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25514	c.project = project
25515	c.zone = zone
25516	c.resource = resource
25517	c.testpermissionsrequest = testpermissionsrequest
25518	return c
25519}
25520
25521// Fields allows partial responses to be retrieved. See
25522// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25523// for more information.
25524func (c *InstanceGroupManagersTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersTestIamPermissionsCall {
25525	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25526	return c
25527}
25528
25529// Context sets the context to be used in this call's Do method. Any
25530// pending HTTP request will be aborted if the provided context is
25531// canceled.
25532func (c *InstanceGroupManagersTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupManagersTestIamPermissionsCall {
25533	c.ctx_ = ctx
25534	return c
25535}
25536
25537func (c *InstanceGroupManagersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
25538	var body io.Reader = nil
25539	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
25540	if err != nil {
25541		return nil, err
25542	}
25543	ctype := "application/json"
25544	c.urlParams_.Set("alt", alt)
25545	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions")
25546	urls += "?" + c.urlParams_.Encode()
25547	req, _ := http.NewRequest("POST", urls, body)
25548	googleapi.Expand(req.URL, map[string]string{
25549		"project":  c.project,
25550		"zone":     c.zone,
25551		"resource": c.resource,
25552	})
25553	req.Header.Set("Content-Type", ctype)
25554	req.Header.Set("User-Agent", c.s.userAgent())
25555	if c.ctx_ != nil {
25556		return ctxhttp.Do(c.ctx_, c.s.client, req)
25557	}
25558	return c.s.client.Do(req)
25559}
25560
25561// Do executes the "compute.instanceGroupManagers.testIamPermissions" call.
25562// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
25563// non-2xx status code is an error. Response headers are in either
25564// *TestPermissionsResponse.ServerResponse.Header or (if a response was
25565// returned at all) in error.(*googleapi.Error).Header. Use
25566// googleapi.IsNotModified to check whether the returned error was
25567// because http.StatusNotModified was returned.
25568func (c *InstanceGroupManagersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
25569	gensupport.SetOptions(c.urlParams_, opts...)
25570	res, err := c.doRequest("json")
25571	if res != nil && res.StatusCode == http.StatusNotModified {
25572		if res.Body != nil {
25573			res.Body.Close()
25574		}
25575		return nil, &googleapi.Error{
25576			Code:   res.StatusCode,
25577			Header: res.Header,
25578		}
25579	}
25580	if err != nil {
25581		return nil, err
25582	}
25583	defer googleapi.CloseBody(res)
25584	if err := googleapi.CheckResponse(res); err != nil {
25585		return nil, err
25586	}
25587	ret := &TestPermissionsResponse{
25588		ServerResponse: googleapi.ServerResponse{
25589			Header:         res.Header,
25590			HTTPStatusCode: res.StatusCode,
25591		},
25592	}
25593	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25594		return nil, err
25595	}
25596	return ret, nil
25597	// {
25598	//   "description": "Returns permissions that a caller has on the specified resource.",
25599	//   "httpMethod": "POST",
25600	//   "id": "compute.instanceGroupManagers.testIamPermissions",
25601	//   "parameterOrder": [
25602	//     "project",
25603	//     "zone",
25604	//     "resource"
25605	//   ],
25606	//   "parameters": {
25607	//     "project": {
25608	//       "description": "Project ID for this request.",
25609	//       "location": "path",
25610	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25611	//       "required": true,
25612	//       "type": "string"
25613	//     },
25614	//     "resource": {
25615	//       "description": "Name of the resource for this request.",
25616	//       "location": "path",
25617	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25618	//       "required": true,
25619	//       "type": "string"
25620	//     },
25621	//     "zone": {
25622	//       "description": "The name of the zone for this request.",
25623	//       "location": "path",
25624	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
25625	//       "required": true,
25626	//       "type": "string"
25627	//     }
25628	//   },
25629	//   "path": "{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions",
25630	//   "request": {
25631	//     "$ref": "TestPermissionsRequest"
25632	//   },
25633	//   "response": {
25634	//     "$ref": "TestPermissionsResponse"
25635	//   },
25636	//   "scopes": [
25637	//     "https://www.googleapis.com/auth/cloud-platform",
25638	//     "https://www.googleapis.com/auth/compute",
25639	//     "https://www.googleapis.com/auth/compute.readonly"
25640	//   ]
25641	// }
25642
25643}
25644
25645// method id "compute.instanceGroups.addInstances":
25646
25647type InstanceGroupsAddInstancesCall struct {
25648	s                                 *Service
25649	project                           string
25650	zone                              string
25651	instanceGroup                     string
25652	instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest
25653	urlParams_                        gensupport.URLParams
25654	ctx_                              context.Context
25655}
25656
25657// AddInstances: Adds a list of instances to the specified instance
25658// group. All of the instances in the instance group must be in the same
25659// network/subnetwork. Read  Adding instances for more information.
25660func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall {
25661	c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25662	c.project = project
25663	c.zone = zone
25664	c.instanceGroup = instanceGroup
25665	c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest
25666	return c
25667}
25668
25669// Fields allows partial responses to be retrieved. See
25670// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25671// for more information.
25672func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall {
25673	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25674	return c
25675}
25676
25677// Context sets the context to be used in this call's Do method. Any
25678// pending HTTP request will be aborted if the provided context is
25679// canceled.
25680func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall {
25681	c.ctx_ = ctx
25682	return c
25683}
25684
25685func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) {
25686	var body io.Reader = nil
25687	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest)
25688	if err != nil {
25689		return nil, err
25690	}
25691	ctype := "application/json"
25692	c.urlParams_.Set("alt", alt)
25693	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances")
25694	urls += "?" + c.urlParams_.Encode()
25695	req, _ := http.NewRequest("POST", urls, body)
25696	googleapi.Expand(req.URL, map[string]string{
25697		"project":       c.project,
25698		"zone":          c.zone,
25699		"instanceGroup": c.instanceGroup,
25700	})
25701	req.Header.Set("Content-Type", ctype)
25702	req.Header.Set("User-Agent", c.s.userAgent())
25703	if c.ctx_ != nil {
25704		return ctxhttp.Do(c.ctx_, c.s.client, req)
25705	}
25706	return c.s.client.Do(req)
25707}
25708
25709// Do executes the "compute.instanceGroups.addInstances" call.
25710// Exactly one of *Operation or error will be non-nil. Any non-2xx
25711// status code is an error. Response headers are in either
25712// *Operation.ServerResponse.Header or (if a response was returned at
25713// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
25714// to check whether the returned error was because
25715// http.StatusNotModified was returned.
25716func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
25717	gensupport.SetOptions(c.urlParams_, opts...)
25718	res, err := c.doRequest("json")
25719	if res != nil && res.StatusCode == http.StatusNotModified {
25720		if res.Body != nil {
25721			res.Body.Close()
25722		}
25723		return nil, &googleapi.Error{
25724			Code:   res.StatusCode,
25725			Header: res.Header,
25726		}
25727	}
25728	if err != nil {
25729		return nil, err
25730	}
25731	defer googleapi.CloseBody(res)
25732	if err := googleapi.CheckResponse(res); err != nil {
25733		return nil, err
25734	}
25735	ret := &Operation{
25736		ServerResponse: googleapi.ServerResponse{
25737			Header:         res.Header,
25738			HTTPStatusCode: res.StatusCode,
25739		},
25740	}
25741	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25742		return nil, err
25743	}
25744	return ret, nil
25745	// {
25746	//   "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.",
25747	//   "httpMethod": "POST",
25748	//   "id": "compute.instanceGroups.addInstances",
25749	//   "parameterOrder": [
25750	//     "project",
25751	//     "zone",
25752	//     "instanceGroup"
25753	//   ],
25754	//   "parameters": {
25755	//     "instanceGroup": {
25756	//       "description": "The name of the instance group where you are adding instances.",
25757	//       "location": "path",
25758	//       "required": true,
25759	//       "type": "string"
25760	//     },
25761	//     "project": {
25762	//       "description": "Project ID for this request.",
25763	//       "location": "path",
25764	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25765	//       "required": true,
25766	//       "type": "string"
25767	//     },
25768	//     "zone": {
25769	//       "description": "The name of the zone where the instance group is located.",
25770	//       "location": "path",
25771	//       "required": true,
25772	//       "type": "string"
25773	//     }
25774	//   },
25775	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances",
25776	//   "request": {
25777	//     "$ref": "InstanceGroupsAddInstancesRequest"
25778	//   },
25779	//   "response": {
25780	//     "$ref": "Operation"
25781	//   },
25782	//   "scopes": [
25783	//     "https://www.googleapis.com/auth/cloud-platform",
25784	//     "https://www.googleapis.com/auth/compute"
25785	//   ]
25786	// }
25787
25788}
25789
25790// method id "compute.instanceGroups.aggregatedList":
25791
25792type InstanceGroupsAggregatedListCall struct {
25793	s            *Service
25794	project      string
25795	urlParams_   gensupport.URLParams
25796	ifNoneMatch_ string
25797	ctx_         context.Context
25798}
25799
25800// AggregatedList: Retrieves the list of instance groups and sorts them
25801// by zone.
25802func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall {
25803	c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
25804	c.project = project
25805	return c
25806}
25807
25808// Filter sets the optional parameter "filter": Sets a filter expression
25809// for filtering listed resources, in the form filter={expression}. Your
25810// {expression} must be in the format: field_name comparison_string
25811// literal_string.
25812//
25813// The field_name is the name of the field you want to compare. Only
25814// atomic field types are supported (string, number, boolean). The
25815// comparison_string must be either eq (equals) or ne (not equals). The
25816// literal_string is the string value to filter to. The literal value
25817// must be valid for the type of field you are filtering by (string,
25818// number, boolean). For string fields, the literal value is interpreted
25819// as a regular expression using RE2 syntax. The literal value must
25820// match the entire field.
25821//
25822// For example, to filter for instances that do not have a name of
25823// example-instance, you would use filter=name ne
25824// example-instance.
25825//
25826// Compute Engine Beta API Only: If you use filtering in the Beta API,
25827// you can also filter on nested fields. For example, you could filter
25828// on instances that have set the scheduling.automaticRestart field to
25829// true. In particular, use filtering on nested fields to take advantage
25830// of instance labels to organize and filter results based on label
25831// values.
25832//
25833// The Beta API also supports filtering on multiple expressions by
25834// providing each separate expression within parentheses. For example,
25835// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
25836// Multiple expressions are treated as AND expressions, meaning that
25837// resources must match all expressions to pass the filters.
25838func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall {
25839	c.urlParams_.Set("filter", filter)
25840	return c
25841}
25842
25843// MaxResults sets the optional parameter "maxResults": The maximum
25844// number of results per page that should be returned. If the number of
25845// available results is larger than maxResults, Compute Engine returns a
25846// nextPageToken that can be used to get the next page of results in
25847// subsequent list requests.
25848func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall {
25849	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
25850	return c
25851}
25852
25853// OrderBy sets the optional parameter "orderBy": Sorts list results by
25854// a certain order. By default, results are returned in alphanumerical
25855// order based on the resource name.
25856//
25857// You can also sort results in descending order based on the creation
25858// timestamp using orderBy="creationTimestamp desc". This sorts results
25859// based on the creationTimestamp field in reverse chronological order
25860// (newest result first). Use this to sort resources like operations so
25861// that the newest operation is returned first.
25862//
25863// Currently, only sorting by name or creationTimestamp desc is
25864// supported.
25865func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall {
25866	c.urlParams_.Set("orderBy", orderBy)
25867	return c
25868}
25869
25870// PageToken sets the optional parameter "pageToken": Specifies a page
25871// token to use. Set pageToken to the nextPageToken returned by a
25872// previous list request to get the next page of results.
25873func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall {
25874	c.urlParams_.Set("pageToken", pageToken)
25875	return c
25876}
25877
25878// Fields allows partial responses to be retrieved. See
25879// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
25880// for more information.
25881func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall {
25882	c.urlParams_.Set("fields", googleapi.CombineFields(s))
25883	return c
25884}
25885
25886// IfNoneMatch sets the optional parameter which makes the operation
25887// fail if the object's ETag matches the given value. This is useful for
25888// getting updates only after the object has changed since the last
25889// request. Use googleapi.IsNotModified to check whether the response
25890// error from Do is the result of In-None-Match.
25891func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall {
25892	c.ifNoneMatch_ = entityTag
25893	return c
25894}
25895
25896// Context sets the context to be used in this call's Do method. Any
25897// pending HTTP request will be aborted if the provided context is
25898// canceled.
25899func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall {
25900	c.ctx_ = ctx
25901	return c
25902}
25903
25904func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
25905	var body io.Reader = nil
25906	c.urlParams_.Set("alt", alt)
25907	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instanceGroups")
25908	urls += "?" + c.urlParams_.Encode()
25909	req, _ := http.NewRequest("GET", urls, body)
25910	googleapi.Expand(req.URL, map[string]string{
25911		"project": c.project,
25912	})
25913	req.Header.Set("User-Agent", c.s.userAgent())
25914	if c.ifNoneMatch_ != "" {
25915		req.Header.Set("If-None-Match", c.ifNoneMatch_)
25916	}
25917	if c.ctx_ != nil {
25918		return ctxhttp.Do(c.ctx_, c.s.client, req)
25919	}
25920	return c.s.client.Do(req)
25921}
25922
25923// Do executes the "compute.instanceGroups.aggregatedList" call.
25924// Exactly one of *InstanceGroupAggregatedList or error will be non-nil.
25925// Any non-2xx status code is an error. Response headers are in either
25926// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response
25927// was returned at all) in error.(*googleapi.Error).Header. Use
25928// googleapi.IsNotModified to check whether the returned error was
25929// because http.StatusNotModified was returned.
25930func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) {
25931	gensupport.SetOptions(c.urlParams_, opts...)
25932	res, err := c.doRequest("json")
25933	if res != nil && res.StatusCode == http.StatusNotModified {
25934		if res.Body != nil {
25935			res.Body.Close()
25936		}
25937		return nil, &googleapi.Error{
25938			Code:   res.StatusCode,
25939			Header: res.Header,
25940		}
25941	}
25942	if err != nil {
25943		return nil, err
25944	}
25945	defer googleapi.CloseBody(res)
25946	if err := googleapi.CheckResponse(res); err != nil {
25947		return nil, err
25948	}
25949	ret := &InstanceGroupAggregatedList{
25950		ServerResponse: googleapi.ServerResponse{
25951			Header:         res.Header,
25952			HTTPStatusCode: res.StatusCode,
25953		},
25954	}
25955	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
25956		return nil, err
25957	}
25958	return ret, nil
25959	// {
25960	//   "description": "Retrieves the list of instance groups and sorts them by zone.",
25961	//   "httpMethod": "GET",
25962	//   "id": "compute.instanceGroups.aggregatedList",
25963	//   "parameterOrder": [
25964	//     "project"
25965	//   ],
25966	//   "parameters": {
25967	//     "filter": {
25968	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
25969	//       "location": "query",
25970	//       "type": "string"
25971	//     },
25972	//     "maxResults": {
25973	//       "default": "500",
25974	//       "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.",
25975	//       "format": "uint32",
25976	//       "location": "query",
25977	//       "maximum": "500",
25978	//       "minimum": "0",
25979	//       "type": "integer"
25980	//     },
25981	//     "orderBy": {
25982	//       "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.",
25983	//       "location": "query",
25984	//       "type": "string"
25985	//     },
25986	//     "pageToken": {
25987	//       "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.",
25988	//       "location": "query",
25989	//       "type": "string"
25990	//     },
25991	//     "project": {
25992	//       "description": "Project ID for this request.",
25993	//       "location": "path",
25994	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
25995	//       "required": true,
25996	//       "type": "string"
25997	//     }
25998	//   },
25999	//   "path": "{project}/aggregated/instanceGroups",
26000	//   "response": {
26001	//     "$ref": "InstanceGroupAggregatedList"
26002	//   },
26003	//   "scopes": [
26004	//     "https://www.googleapis.com/auth/cloud-platform",
26005	//     "https://www.googleapis.com/auth/compute",
26006	//     "https://www.googleapis.com/auth/compute.readonly"
26007	//   ]
26008	// }
26009
26010}
26011
26012// Pages invokes f for each page of results.
26013// A non-nil error returned from f will halt the iteration.
26014// The provided context supersedes any context provided to the Context method.
26015func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error {
26016	c.ctx_ = ctx
26017	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26018	for {
26019		x, err := c.Do()
26020		if err != nil {
26021			return err
26022		}
26023		if err := f(x); err != nil {
26024			return err
26025		}
26026		if x.NextPageToken == "" {
26027			return nil
26028		}
26029		c.PageToken(x.NextPageToken)
26030	}
26031}
26032
26033// method id "compute.instanceGroups.delete":
26034
26035type InstanceGroupsDeleteCall struct {
26036	s             *Service
26037	project       string
26038	zone          string
26039	instanceGroup string
26040	urlParams_    gensupport.URLParams
26041	ctx_          context.Context
26042}
26043
26044// Delete: Deletes the specified instance group. The instances in the
26045// group are not deleted. Note that instance group must not belong to a
26046// backend service. Read  Deleting an instance group for more
26047// information.
26048func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall {
26049	c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26050	c.project = project
26051	c.zone = zone
26052	c.instanceGroup = instanceGroup
26053	return c
26054}
26055
26056// Fields allows partial responses to be retrieved. See
26057// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26058// for more information.
26059func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall {
26060	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26061	return c
26062}
26063
26064// Context sets the context to be used in this call's Do method. Any
26065// pending HTTP request will be aborted if the provided context is
26066// canceled.
26067func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall {
26068	c.ctx_ = ctx
26069	return c
26070}
26071
26072func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
26073	var body io.Reader = nil
26074	c.urlParams_.Set("alt", alt)
26075	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}")
26076	urls += "?" + c.urlParams_.Encode()
26077	req, _ := http.NewRequest("DELETE", urls, body)
26078	googleapi.Expand(req.URL, map[string]string{
26079		"project":       c.project,
26080		"zone":          c.zone,
26081		"instanceGroup": c.instanceGroup,
26082	})
26083	req.Header.Set("User-Agent", c.s.userAgent())
26084	if c.ctx_ != nil {
26085		return ctxhttp.Do(c.ctx_, c.s.client, req)
26086	}
26087	return c.s.client.Do(req)
26088}
26089
26090// Do executes the "compute.instanceGroups.delete" call.
26091// Exactly one of *Operation or error will be non-nil. Any non-2xx
26092// status code is an error. Response headers are in either
26093// *Operation.ServerResponse.Header or (if a response was returned at
26094// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26095// to check whether the returned error was because
26096// http.StatusNotModified was returned.
26097func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26098	gensupport.SetOptions(c.urlParams_, opts...)
26099	res, err := c.doRequest("json")
26100	if res != nil && res.StatusCode == http.StatusNotModified {
26101		if res.Body != nil {
26102			res.Body.Close()
26103		}
26104		return nil, &googleapi.Error{
26105			Code:   res.StatusCode,
26106			Header: res.Header,
26107		}
26108	}
26109	if err != nil {
26110		return nil, err
26111	}
26112	defer googleapi.CloseBody(res)
26113	if err := googleapi.CheckResponse(res); err != nil {
26114		return nil, err
26115	}
26116	ret := &Operation{
26117		ServerResponse: googleapi.ServerResponse{
26118			Header:         res.Header,
26119			HTTPStatusCode: res.StatusCode,
26120		},
26121	}
26122	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26123		return nil, err
26124	}
26125	return ret, nil
26126	// {
26127	//   "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.",
26128	//   "httpMethod": "DELETE",
26129	//   "id": "compute.instanceGroups.delete",
26130	//   "parameterOrder": [
26131	//     "project",
26132	//     "zone",
26133	//     "instanceGroup"
26134	//   ],
26135	//   "parameters": {
26136	//     "instanceGroup": {
26137	//       "description": "The name of the instance group to delete.",
26138	//       "location": "path",
26139	//       "required": true,
26140	//       "type": "string"
26141	//     },
26142	//     "project": {
26143	//       "description": "Project ID for this request.",
26144	//       "location": "path",
26145	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26146	//       "required": true,
26147	//       "type": "string"
26148	//     },
26149	//     "zone": {
26150	//       "description": "The name of the zone where the instance group is located.",
26151	//       "location": "path",
26152	//       "required": true,
26153	//       "type": "string"
26154	//     }
26155	//   },
26156	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}",
26157	//   "response": {
26158	//     "$ref": "Operation"
26159	//   },
26160	//   "scopes": [
26161	//     "https://www.googleapis.com/auth/cloud-platform",
26162	//     "https://www.googleapis.com/auth/compute"
26163	//   ]
26164	// }
26165
26166}
26167
26168// method id "compute.instanceGroups.get":
26169
26170type InstanceGroupsGetCall struct {
26171	s             *Service
26172	project       string
26173	zone          string
26174	instanceGroup string
26175	urlParams_    gensupport.URLParams
26176	ifNoneMatch_  string
26177	ctx_          context.Context
26178}
26179
26180// Get: Returns the specified instance group. Get a list of available
26181// instance groups by making a list() request.
26182func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall {
26183	c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26184	c.project = project
26185	c.zone = zone
26186	c.instanceGroup = instanceGroup
26187	return c
26188}
26189
26190// Fields allows partial responses to be retrieved. See
26191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26192// for more information.
26193func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall {
26194	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26195	return c
26196}
26197
26198// IfNoneMatch sets the optional parameter which makes the operation
26199// fail if the object's ETag matches the given value. This is useful for
26200// getting updates only after the object has changed since the last
26201// request. Use googleapi.IsNotModified to check whether the response
26202// error from Do is the result of In-None-Match.
26203func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall {
26204	c.ifNoneMatch_ = entityTag
26205	return c
26206}
26207
26208// Context sets the context to be used in this call's Do method. Any
26209// pending HTTP request will be aborted if the provided context is
26210// canceled.
26211func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall {
26212	c.ctx_ = ctx
26213	return c
26214}
26215
26216func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) {
26217	var body io.Reader = nil
26218	c.urlParams_.Set("alt", alt)
26219	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}")
26220	urls += "?" + c.urlParams_.Encode()
26221	req, _ := http.NewRequest("GET", urls, body)
26222	googleapi.Expand(req.URL, map[string]string{
26223		"project":       c.project,
26224		"zone":          c.zone,
26225		"instanceGroup": c.instanceGroup,
26226	})
26227	req.Header.Set("User-Agent", c.s.userAgent())
26228	if c.ifNoneMatch_ != "" {
26229		req.Header.Set("If-None-Match", c.ifNoneMatch_)
26230	}
26231	if c.ctx_ != nil {
26232		return ctxhttp.Do(c.ctx_, c.s.client, req)
26233	}
26234	return c.s.client.Do(req)
26235}
26236
26237// Do executes the "compute.instanceGroups.get" call.
26238// Exactly one of *InstanceGroup or error will be non-nil. Any non-2xx
26239// status code is an error. Response headers are in either
26240// *InstanceGroup.ServerResponse.Header or (if a response was returned
26241// at all) in error.(*googleapi.Error).Header. Use
26242// googleapi.IsNotModified to check whether the returned error was
26243// because http.StatusNotModified was returned.
26244func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) {
26245	gensupport.SetOptions(c.urlParams_, opts...)
26246	res, err := c.doRequest("json")
26247	if res != nil && res.StatusCode == http.StatusNotModified {
26248		if res.Body != nil {
26249			res.Body.Close()
26250		}
26251		return nil, &googleapi.Error{
26252			Code:   res.StatusCode,
26253			Header: res.Header,
26254		}
26255	}
26256	if err != nil {
26257		return nil, err
26258	}
26259	defer googleapi.CloseBody(res)
26260	if err := googleapi.CheckResponse(res); err != nil {
26261		return nil, err
26262	}
26263	ret := &InstanceGroup{
26264		ServerResponse: googleapi.ServerResponse{
26265			Header:         res.Header,
26266			HTTPStatusCode: res.StatusCode,
26267		},
26268	}
26269	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26270		return nil, err
26271	}
26272	return ret, nil
26273	// {
26274	//   "description": "Returns the specified instance group. Get a list of available instance groups by making a list() request.",
26275	//   "httpMethod": "GET",
26276	//   "id": "compute.instanceGroups.get",
26277	//   "parameterOrder": [
26278	//     "project",
26279	//     "zone",
26280	//     "instanceGroup"
26281	//   ],
26282	//   "parameters": {
26283	//     "instanceGroup": {
26284	//       "description": "The name of the instance group.",
26285	//       "location": "path",
26286	//       "required": true,
26287	//       "type": "string"
26288	//     },
26289	//     "project": {
26290	//       "description": "Project ID for this request.",
26291	//       "location": "path",
26292	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26293	//       "required": true,
26294	//       "type": "string"
26295	//     },
26296	//     "zone": {
26297	//       "description": "The name of the zone where the instance group is located.",
26298	//       "location": "path",
26299	//       "required": true,
26300	//       "type": "string"
26301	//     }
26302	//   },
26303	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}",
26304	//   "response": {
26305	//     "$ref": "InstanceGroup"
26306	//   },
26307	//   "scopes": [
26308	//     "https://www.googleapis.com/auth/cloud-platform",
26309	//     "https://www.googleapis.com/auth/compute",
26310	//     "https://www.googleapis.com/auth/compute.readonly"
26311	//   ]
26312	// }
26313
26314}
26315
26316// method id "compute.instanceGroups.insert":
26317
26318type InstanceGroupsInsertCall struct {
26319	s             *Service
26320	project       string
26321	zone          string
26322	instancegroup *InstanceGroup
26323	urlParams_    gensupport.URLParams
26324	ctx_          context.Context
26325}
26326
26327// Insert: Creates an instance group in the specified project using the
26328// parameters that are included in the request.
26329func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall {
26330	c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26331	c.project = project
26332	c.zone = zone
26333	c.instancegroup = instancegroup
26334	return c
26335}
26336
26337// Fields allows partial responses to be retrieved. See
26338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26339// for more information.
26340func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall {
26341	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26342	return c
26343}
26344
26345// Context sets the context to be used in this call's Do method. Any
26346// pending HTTP request will be aborted if the provided context is
26347// canceled.
26348func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall {
26349	c.ctx_ = ctx
26350	return c
26351}
26352
26353func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
26354	var body io.Reader = nil
26355	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup)
26356	if err != nil {
26357		return nil, err
26358	}
26359	ctype := "application/json"
26360	c.urlParams_.Set("alt", alt)
26361	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups")
26362	urls += "?" + c.urlParams_.Encode()
26363	req, _ := http.NewRequest("POST", urls, body)
26364	googleapi.Expand(req.URL, map[string]string{
26365		"project": c.project,
26366		"zone":    c.zone,
26367	})
26368	req.Header.Set("Content-Type", ctype)
26369	req.Header.Set("User-Agent", c.s.userAgent())
26370	if c.ctx_ != nil {
26371		return ctxhttp.Do(c.ctx_, c.s.client, req)
26372	}
26373	return c.s.client.Do(req)
26374}
26375
26376// Do executes the "compute.instanceGroups.insert" call.
26377// Exactly one of *Operation or error will be non-nil. Any non-2xx
26378// status code is an error. Response headers are in either
26379// *Operation.ServerResponse.Header or (if a response was returned at
26380// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
26381// to check whether the returned error was because
26382// http.StatusNotModified was returned.
26383func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
26384	gensupport.SetOptions(c.urlParams_, opts...)
26385	res, err := c.doRequest("json")
26386	if res != nil && res.StatusCode == http.StatusNotModified {
26387		if res.Body != nil {
26388			res.Body.Close()
26389		}
26390		return nil, &googleapi.Error{
26391			Code:   res.StatusCode,
26392			Header: res.Header,
26393		}
26394	}
26395	if err != nil {
26396		return nil, err
26397	}
26398	defer googleapi.CloseBody(res)
26399	if err := googleapi.CheckResponse(res); err != nil {
26400		return nil, err
26401	}
26402	ret := &Operation{
26403		ServerResponse: googleapi.ServerResponse{
26404			Header:         res.Header,
26405			HTTPStatusCode: res.StatusCode,
26406		},
26407	}
26408	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26409		return nil, err
26410	}
26411	return ret, nil
26412	// {
26413	//   "description": "Creates an instance group in the specified project using the parameters that are included in the request.",
26414	//   "httpMethod": "POST",
26415	//   "id": "compute.instanceGroups.insert",
26416	//   "parameterOrder": [
26417	//     "project",
26418	//     "zone"
26419	//   ],
26420	//   "parameters": {
26421	//     "project": {
26422	//       "description": "Project ID for this request.",
26423	//       "location": "path",
26424	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26425	//       "required": true,
26426	//       "type": "string"
26427	//     },
26428	//     "zone": {
26429	//       "description": "The name of the zone where you want to create the instance group.",
26430	//       "location": "path",
26431	//       "required": true,
26432	//       "type": "string"
26433	//     }
26434	//   },
26435	//   "path": "{project}/zones/{zone}/instanceGroups",
26436	//   "request": {
26437	//     "$ref": "InstanceGroup"
26438	//   },
26439	//   "response": {
26440	//     "$ref": "Operation"
26441	//   },
26442	//   "scopes": [
26443	//     "https://www.googleapis.com/auth/cloud-platform",
26444	//     "https://www.googleapis.com/auth/compute"
26445	//   ]
26446	// }
26447
26448}
26449
26450// method id "compute.instanceGroups.list":
26451
26452type InstanceGroupsListCall struct {
26453	s            *Service
26454	project      string
26455	zone         string
26456	urlParams_   gensupport.URLParams
26457	ifNoneMatch_ string
26458	ctx_         context.Context
26459}
26460
26461// List: Retrieves the list of instance groups that are located in the
26462// specified project and zone.
26463func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall {
26464	c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26465	c.project = project
26466	c.zone = zone
26467	return c
26468}
26469
26470// Filter sets the optional parameter "filter": Sets a filter expression
26471// for filtering listed resources, in the form filter={expression}. Your
26472// {expression} must be in the format: field_name comparison_string
26473// literal_string.
26474//
26475// The field_name is the name of the field you want to compare. Only
26476// atomic field types are supported (string, number, boolean). The
26477// comparison_string must be either eq (equals) or ne (not equals). The
26478// literal_string is the string value to filter to. The literal value
26479// must be valid for the type of field you are filtering by (string,
26480// number, boolean). For string fields, the literal value is interpreted
26481// as a regular expression using RE2 syntax. The literal value must
26482// match the entire field.
26483//
26484// For example, to filter for instances that do not have a name of
26485// example-instance, you would use filter=name ne
26486// example-instance.
26487//
26488// Compute Engine Beta API Only: If you use filtering in the Beta API,
26489// you can also filter on nested fields. For example, you could filter
26490// on instances that have set the scheduling.automaticRestart field to
26491// true. In particular, use filtering on nested fields to take advantage
26492// of instance labels to organize and filter results based on label
26493// values.
26494//
26495// The Beta API also supports filtering on multiple expressions by
26496// providing each separate expression within parentheses. For example,
26497// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
26498// Multiple expressions are treated as AND expressions, meaning that
26499// resources must match all expressions to pass the filters.
26500func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall {
26501	c.urlParams_.Set("filter", filter)
26502	return c
26503}
26504
26505// MaxResults sets the optional parameter "maxResults": The maximum
26506// number of results per page that should be returned. If the number of
26507// available results is larger than maxResults, Compute Engine returns a
26508// nextPageToken that can be used to get the next page of results in
26509// subsequent list requests.
26510func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall {
26511	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26512	return c
26513}
26514
26515// OrderBy sets the optional parameter "orderBy": Sorts list results by
26516// a certain order. By default, results are returned in alphanumerical
26517// order based on the resource name.
26518//
26519// You can also sort results in descending order based on the creation
26520// timestamp using orderBy="creationTimestamp desc". This sorts results
26521// based on the creationTimestamp field in reverse chronological order
26522// (newest result first). Use this to sort resources like operations so
26523// that the newest operation is returned first.
26524//
26525// Currently, only sorting by name or creationTimestamp desc is
26526// supported.
26527func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall {
26528	c.urlParams_.Set("orderBy", orderBy)
26529	return c
26530}
26531
26532// PageToken sets the optional parameter "pageToken": Specifies a page
26533// token to use. Set pageToken to the nextPageToken returned by a
26534// previous list request to get the next page of results.
26535func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall {
26536	c.urlParams_.Set("pageToken", pageToken)
26537	return c
26538}
26539
26540// Fields allows partial responses to be retrieved. See
26541// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26542// for more information.
26543func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall {
26544	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26545	return c
26546}
26547
26548// IfNoneMatch sets the optional parameter which makes the operation
26549// fail if the object's ETag matches the given value. This is useful for
26550// getting updates only after the object has changed since the last
26551// request. Use googleapi.IsNotModified to check whether the response
26552// error from Do is the result of In-None-Match.
26553func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall {
26554	c.ifNoneMatch_ = entityTag
26555	return c
26556}
26557
26558// Context sets the context to be used in this call's Do method. Any
26559// pending HTTP request will be aborted if the provided context is
26560// canceled.
26561func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall {
26562	c.ctx_ = ctx
26563	return c
26564}
26565
26566func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) {
26567	var body io.Reader = nil
26568	c.urlParams_.Set("alt", alt)
26569	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups")
26570	urls += "?" + c.urlParams_.Encode()
26571	req, _ := http.NewRequest("GET", urls, body)
26572	googleapi.Expand(req.URL, map[string]string{
26573		"project": c.project,
26574		"zone":    c.zone,
26575	})
26576	req.Header.Set("User-Agent", c.s.userAgent())
26577	if c.ifNoneMatch_ != "" {
26578		req.Header.Set("If-None-Match", c.ifNoneMatch_)
26579	}
26580	if c.ctx_ != nil {
26581		return ctxhttp.Do(c.ctx_, c.s.client, req)
26582	}
26583	return c.s.client.Do(req)
26584}
26585
26586// Do executes the "compute.instanceGroups.list" call.
26587// Exactly one of *InstanceGroupList or error will be non-nil. Any
26588// non-2xx status code is an error. Response headers are in either
26589// *InstanceGroupList.ServerResponse.Header or (if a response was
26590// returned at all) in error.(*googleapi.Error).Header. Use
26591// googleapi.IsNotModified to check whether the returned error was
26592// because http.StatusNotModified was returned.
26593func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) {
26594	gensupport.SetOptions(c.urlParams_, opts...)
26595	res, err := c.doRequest("json")
26596	if res != nil && res.StatusCode == http.StatusNotModified {
26597		if res.Body != nil {
26598			res.Body.Close()
26599		}
26600		return nil, &googleapi.Error{
26601			Code:   res.StatusCode,
26602			Header: res.Header,
26603		}
26604	}
26605	if err != nil {
26606		return nil, err
26607	}
26608	defer googleapi.CloseBody(res)
26609	if err := googleapi.CheckResponse(res); err != nil {
26610		return nil, err
26611	}
26612	ret := &InstanceGroupList{
26613		ServerResponse: googleapi.ServerResponse{
26614			Header:         res.Header,
26615			HTTPStatusCode: res.StatusCode,
26616		},
26617	}
26618	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26619		return nil, err
26620	}
26621	return ret, nil
26622	// {
26623	//   "description": "Retrieves the list of instance groups that are located in the specified project and zone.",
26624	//   "httpMethod": "GET",
26625	//   "id": "compute.instanceGroups.list",
26626	//   "parameterOrder": [
26627	//     "project",
26628	//     "zone"
26629	//   ],
26630	//   "parameters": {
26631	//     "filter": {
26632	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
26633	//       "location": "query",
26634	//       "type": "string"
26635	//     },
26636	//     "maxResults": {
26637	//       "default": "500",
26638	//       "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.",
26639	//       "format": "uint32",
26640	//       "location": "query",
26641	//       "maximum": "500",
26642	//       "minimum": "0",
26643	//       "type": "integer"
26644	//     },
26645	//     "orderBy": {
26646	//       "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.",
26647	//       "location": "query",
26648	//       "type": "string"
26649	//     },
26650	//     "pageToken": {
26651	//       "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.",
26652	//       "location": "query",
26653	//       "type": "string"
26654	//     },
26655	//     "project": {
26656	//       "description": "Project ID for this request.",
26657	//       "location": "path",
26658	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26659	//       "required": true,
26660	//       "type": "string"
26661	//     },
26662	//     "zone": {
26663	//       "description": "The name of the zone where the instance group is located.",
26664	//       "location": "path",
26665	//       "required": true,
26666	//       "type": "string"
26667	//     }
26668	//   },
26669	//   "path": "{project}/zones/{zone}/instanceGroups",
26670	//   "response": {
26671	//     "$ref": "InstanceGroupList"
26672	//   },
26673	//   "scopes": [
26674	//     "https://www.googleapis.com/auth/cloud-platform",
26675	//     "https://www.googleapis.com/auth/compute",
26676	//     "https://www.googleapis.com/auth/compute.readonly"
26677	//   ]
26678	// }
26679
26680}
26681
26682// Pages invokes f for each page of results.
26683// A non-nil error returned from f will halt the iteration.
26684// The provided context supersedes any context provided to the Context method.
26685func (c *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error {
26686	c.ctx_ = ctx
26687	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
26688	for {
26689		x, err := c.Do()
26690		if err != nil {
26691			return err
26692		}
26693		if err := f(x); err != nil {
26694			return err
26695		}
26696		if x.NextPageToken == "" {
26697			return nil
26698		}
26699		c.PageToken(x.NextPageToken)
26700	}
26701}
26702
26703// method id "compute.instanceGroups.listInstances":
26704
26705type InstanceGroupsListInstancesCall struct {
26706	s                                  *Service
26707	project                            string
26708	zone                               string
26709	instanceGroup                      string
26710	instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest
26711	urlParams_                         gensupport.URLParams
26712	ctx_                               context.Context
26713}
26714
26715// ListInstances: Lists the instances in the specified instance group.
26716func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall {
26717	c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26718	c.project = project
26719	c.zone = zone
26720	c.instanceGroup = instanceGroup
26721	c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest
26722	return c
26723}
26724
26725// Filter sets the optional parameter "filter": Sets a filter expression
26726// for filtering listed resources, in the form filter={expression}. Your
26727// {expression} must be in the format: field_name comparison_string
26728// literal_string.
26729//
26730// The field_name is the name of the field you want to compare. Only
26731// atomic field types are supported (string, number, boolean). The
26732// comparison_string must be either eq (equals) or ne (not equals). The
26733// literal_string is the string value to filter to. The literal value
26734// must be valid for the type of field you are filtering by (string,
26735// number, boolean). For string fields, the literal value is interpreted
26736// as a regular expression using RE2 syntax. The literal value must
26737// match the entire field.
26738//
26739// For example, to filter for instances that do not have a name of
26740// example-instance, you would use filter=name ne
26741// example-instance.
26742//
26743// Compute Engine Beta API Only: If you use filtering in the Beta API,
26744// you can also filter on nested fields. For example, you could filter
26745// on instances that have set the scheduling.automaticRestart field to
26746// true. In particular, use filtering on nested fields to take advantage
26747// of instance labels to organize and filter results based on label
26748// values.
26749//
26750// The Beta API also supports filtering on multiple expressions by
26751// providing each separate expression within parentheses. For example,
26752// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
26753// Multiple expressions are treated as AND expressions, meaning that
26754// resources must match all expressions to pass the filters.
26755func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall {
26756	c.urlParams_.Set("filter", filter)
26757	return c
26758}
26759
26760// MaxResults sets the optional parameter "maxResults": The maximum
26761// number of results per page that should be returned. If the number of
26762// available results is larger than maxResults, Compute Engine returns a
26763// nextPageToken that can be used to get the next page of results in
26764// subsequent list requests.
26765func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall {
26766	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
26767	return c
26768}
26769
26770// OrderBy sets the optional parameter "orderBy": Sorts list results by
26771// a certain order. By default, results are returned in alphanumerical
26772// order based on the resource name.
26773//
26774// You can also sort results in descending order based on the creation
26775// timestamp using orderBy="creationTimestamp desc". This sorts results
26776// based on the creationTimestamp field in reverse chronological order
26777// (newest result first). Use this to sort resources like operations so
26778// that the newest operation is returned first.
26779//
26780// Currently, only sorting by name or creationTimestamp desc is
26781// supported.
26782func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall {
26783	c.urlParams_.Set("orderBy", orderBy)
26784	return c
26785}
26786
26787// PageToken sets the optional parameter "pageToken": Specifies a page
26788// token to use. Set pageToken to the nextPageToken returned by a
26789// previous list request to get the next page of results.
26790func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall {
26791	c.urlParams_.Set("pageToken", pageToken)
26792	return c
26793}
26794
26795// Fields allows partial responses to be retrieved. See
26796// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26797// for more information.
26798func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall {
26799	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26800	return c
26801}
26802
26803// Context sets the context to be used in this call's Do method. Any
26804// pending HTTP request will be aborted if the provided context is
26805// canceled.
26806func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall {
26807	c.ctx_ = ctx
26808	return c
26809}
26810
26811func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) {
26812	var body io.Reader = nil
26813	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest)
26814	if err != nil {
26815		return nil, err
26816	}
26817	ctype := "application/json"
26818	c.urlParams_.Set("alt", alt)
26819	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances")
26820	urls += "?" + c.urlParams_.Encode()
26821	req, _ := http.NewRequest("POST", urls, body)
26822	googleapi.Expand(req.URL, map[string]string{
26823		"project":       c.project,
26824		"zone":          c.zone,
26825		"instanceGroup": c.instanceGroup,
26826	})
26827	req.Header.Set("Content-Type", ctype)
26828	req.Header.Set("User-Agent", c.s.userAgent())
26829	if c.ctx_ != nil {
26830		return ctxhttp.Do(c.ctx_, c.s.client, req)
26831	}
26832	return c.s.client.Do(req)
26833}
26834
26835// Do executes the "compute.instanceGroups.listInstances" call.
26836// Exactly one of *InstanceGroupsListInstances or error will be non-nil.
26837// Any non-2xx status code is an error. Response headers are in either
26838// *InstanceGroupsListInstances.ServerResponse.Header or (if a response
26839// was returned at all) in error.(*googleapi.Error).Header. Use
26840// googleapi.IsNotModified to check whether the returned error was
26841// because http.StatusNotModified was returned.
26842func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) {
26843	gensupport.SetOptions(c.urlParams_, opts...)
26844	res, err := c.doRequest("json")
26845	if res != nil && res.StatusCode == http.StatusNotModified {
26846		if res.Body != nil {
26847			res.Body.Close()
26848		}
26849		return nil, &googleapi.Error{
26850			Code:   res.StatusCode,
26851			Header: res.Header,
26852		}
26853	}
26854	if err != nil {
26855		return nil, err
26856	}
26857	defer googleapi.CloseBody(res)
26858	if err := googleapi.CheckResponse(res); err != nil {
26859		return nil, err
26860	}
26861	ret := &InstanceGroupsListInstances{
26862		ServerResponse: googleapi.ServerResponse{
26863			Header:         res.Header,
26864			HTTPStatusCode: res.StatusCode,
26865		},
26866	}
26867	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
26868		return nil, err
26869	}
26870	return ret, nil
26871	// {
26872	//   "description": "Lists the instances in the specified instance group.",
26873	//   "httpMethod": "POST",
26874	//   "id": "compute.instanceGroups.listInstances",
26875	//   "parameterOrder": [
26876	//     "project",
26877	//     "zone",
26878	//     "instanceGroup"
26879	//   ],
26880	//   "parameters": {
26881	//     "filter": {
26882	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
26883	//       "location": "query",
26884	//       "type": "string"
26885	//     },
26886	//     "instanceGroup": {
26887	//       "description": "The name of the instance group from which you want to generate a list of included instances.",
26888	//       "location": "path",
26889	//       "required": true,
26890	//       "type": "string"
26891	//     },
26892	//     "maxResults": {
26893	//       "default": "500",
26894	//       "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.",
26895	//       "format": "uint32",
26896	//       "location": "query",
26897	//       "maximum": "500",
26898	//       "minimum": "0",
26899	//       "type": "integer"
26900	//     },
26901	//     "orderBy": {
26902	//       "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.",
26903	//       "location": "query",
26904	//       "type": "string"
26905	//     },
26906	//     "pageToken": {
26907	//       "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.",
26908	//       "location": "query",
26909	//       "type": "string"
26910	//     },
26911	//     "project": {
26912	//       "description": "Project ID for this request.",
26913	//       "location": "path",
26914	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
26915	//       "required": true,
26916	//       "type": "string"
26917	//     },
26918	//     "zone": {
26919	//       "description": "The name of the zone where the instance group is located.",
26920	//       "location": "path",
26921	//       "required": true,
26922	//       "type": "string"
26923	//     }
26924	//   },
26925	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances",
26926	//   "request": {
26927	//     "$ref": "InstanceGroupsListInstancesRequest"
26928	//   },
26929	//   "response": {
26930	//     "$ref": "InstanceGroupsListInstances"
26931	//   },
26932	//   "scopes": [
26933	//     "https://www.googleapis.com/auth/cloud-platform",
26934	//     "https://www.googleapis.com/auth/compute",
26935	//     "https://www.googleapis.com/auth/compute.readonly"
26936	//   ]
26937	// }
26938
26939}
26940
26941// method id "compute.instanceGroups.removeInstances":
26942
26943type InstanceGroupsRemoveInstancesCall struct {
26944	s                                    *Service
26945	project                              string
26946	zone                                 string
26947	instanceGroup                        string
26948	instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest
26949	urlParams_                           gensupport.URLParams
26950	ctx_                                 context.Context
26951}
26952
26953// RemoveInstances: Removes one or more instances from the specified
26954// instance group, but does not delete those instances.
26955func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall {
26956	c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
26957	c.project = project
26958	c.zone = zone
26959	c.instanceGroup = instanceGroup
26960	c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest
26961	return c
26962}
26963
26964// Fields allows partial responses to be retrieved. See
26965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
26966// for more information.
26967func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall {
26968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
26969	return c
26970}
26971
26972// Context sets the context to be used in this call's Do method. Any
26973// pending HTTP request will be aborted if the provided context is
26974// canceled.
26975func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall {
26976	c.ctx_ = ctx
26977	return c
26978}
26979
26980func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) {
26981	var body io.Reader = nil
26982	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest)
26983	if err != nil {
26984		return nil, err
26985	}
26986	ctype := "application/json"
26987	c.urlParams_.Set("alt", alt)
26988	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances")
26989	urls += "?" + c.urlParams_.Encode()
26990	req, _ := http.NewRequest("POST", urls, body)
26991	googleapi.Expand(req.URL, map[string]string{
26992		"project":       c.project,
26993		"zone":          c.zone,
26994		"instanceGroup": c.instanceGroup,
26995	})
26996	req.Header.Set("Content-Type", ctype)
26997	req.Header.Set("User-Agent", c.s.userAgent())
26998	if c.ctx_ != nil {
26999		return ctxhttp.Do(c.ctx_, c.s.client, req)
27000	}
27001	return c.s.client.Do(req)
27002}
27003
27004// Do executes the "compute.instanceGroups.removeInstances" call.
27005// Exactly one of *Operation or error will be non-nil. Any non-2xx
27006// status code is an error. Response headers are in either
27007// *Operation.ServerResponse.Header or (if a response was returned at
27008// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27009// to check whether the returned error was because
27010// http.StatusNotModified was returned.
27011func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27012	gensupport.SetOptions(c.urlParams_, opts...)
27013	res, err := c.doRequest("json")
27014	if res != nil && res.StatusCode == http.StatusNotModified {
27015		if res.Body != nil {
27016			res.Body.Close()
27017		}
27018		return nil, &googleapi.Error{
27019			Code:   res.StatusCode,
27020			Header: res.Header,
27021		}
27022	}
27023	if err != nil {
27024		return nil, err
27025	}
27026	defer googleapi.CloseBody(res)
27027	if err := googleapi.CheckResponse(res); err != nil {
27028		return nil, err
27029	}
27030	ret := &Operation{
27031		ServerResponse: googleapi.ServerResponse{
27032			Header:         res.Header,
27033			HTTPStatusCode: res.StatusCode,
27034		},
27035	}
27036	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27037		return nil, err
27038	}
27039	return ret, nil
27040	// {
27041	//   "description": "Removes one or more instances from the specified instance group, but does not delete those instances.",
27042	//   "httpMethod": "POST",
27043	//   "id": "compute.instanceGroups.removeInstances",
27044	//   "parameterOrder": [
27045	//     "project",
27046	//     "zone",
27047	//     "instanceGroup"
27048	//   ],
27049	//   "parameters": {
27050	//     "instanceGroup": {
27051	//       "description": "The name of the instance group where the specified instances will be removed.",
27052	//       "location": "path",
27053	//       "required": true,
27054	//       "type": "string"
27055	//     },
27056	//     "project": {
27057	//       "description": "Project ID for this request.",
27058	//       "location": "path",
27059	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27060	//       "required": true,
27061	//       "type": "string"
27062	//     },
27063	//     "zone": {
27064	//       "description": "The name of the zone where the instance group is located.",
27065	//       "location": "path",
27066	//       "required": true,
27067	//       "type": "string"
27068	//     }
27069	//   },
27070	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances",
27071	//   "request": {
27072	//     "$ref": "InstanceGroupsRemoveInstancesRequest"
27073	//   },
27074	//   "response": {
27075	//     "$ref": "Operation"
27076	//   },
27077	//   "scopes": [
27078	//     "https://www.googleapis.com/auth/cloud-platform",
27079	//     "https://www.googleapis.com/auth/compute"
27080	//   ]
27081	// }
27082
27083}
27084
27085// method id "compute.instanceGroups.setNamedPorts":
27086
27087type InstanceGroupsSetNamedPortsCall struct {
27088	s                                  *Service
27089	project                            string
27090	zone                               string
27091	instanceGroup                      string
27092	instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest
27093	urlParams_                         gensupport.URLParams
27094	ctx_                               context.Context
27095}
27096
27097// SetNamedPorts: Sets the named ports for the specified instance group.
27098func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall {
27099	c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27100	c.project = project
27101	c.zone = zone
27102	c.instanceGroup = instanceGroup
27103	c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest
27104	return c
27105}
27106
27107// Fields allows partial responses to be retrieved. See
27108// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27109// for more information.
27110func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall {
27111	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27112	return c
27113}
27114
27115// Context sets the context to be used in this call's Do method. Any
27116// pending HTTP request will be aborted if the provided context is
27117// canceled.
27118func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall {
27119	c.ctx_ = ctx
27120	return c
27121}
27122
27123func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) {
27124	var body io.Reader = nil
27125	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest)
27126	if err != nil {
27127		return nil, err
27128	}
27129	ctype := "application/json"
27130	c.urlParams_.Set("alt", alt)
27131	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts")
27132	urls += "?" + c.urlParams_.Encode()
27133	req, _ := http.NewRequest("POST", urls, body)
27134	googleapi.Expand(req.URL, map[string]string{
27135		"project":       c.project,
27136		"zone":          c.zone,
27137		"instanceGroup": c.instanceGroup,
27138	})
27139	req.Header.Set("Content-Type", ctype)
27140	req.Header.Set("User-Agent", c.s.userAgent())
27141	if c.ctx_ != nil {
27142		return ctxhttp.Do(c.ctx_, c.s.client, req)
27143	}
27144	return c.s.client.Do(req)
27145}
27146
27147// Do executes the "compute.instanceGroups.setNamedPorts" call.
27148// Exactly one of *Operation or error will be non-nil. Any non-2xx
27149// status code is an error. Response headers are in either
27150// *Operation.ServerResponse.Header or (if a response was returned at
27151// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27152// to check whether the returned error was because
27153// http.StatusNotModified was returned.
27154func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27155	gensupport.SetOptions(c.urlParams_, opts...)
27156	res, err := c.doRequest("json")
27157	if res != nil && res.StatusCode == http.StatusNotModified {
27158		if res.Body != nil {
27159			res.Body.Close()
27160		}
27161		return nil, &googleapi.Error{
27162			Code:   res.StatusCode,
27163			Header: res.Header,
27164		}
27165	}
27166	if err != nil {
27167		return nil, err
27168	}
27169	defer googleapi.CloseBody(res)
27170	if err := googleapi.CheckResponse(res); err != nil {
27171		return nil, err
27172	}
27173	ret := &Operation{
27174		ServerResponse: googleapi.ServerResponse{
27175			Header:         res.Header,
27176			HTTPStatusCode: res.StatusCode,
27177		},
27178	}
27179	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27180		return nil, err
27181	}
27182	return ret, nil
27183	// {
27184	//   "description": "Sets the named ports for the specified instance group.",
27185	//   "httpMethod": "POST",
27186	//   "id": "compute.instanceGroups.setNamedPorts",
27187	//   "parameterOrder": [
27188	//     "project",
27189	//     "zone",
27190	//     "instanceGroup"
27191	//   ],
27192	//   "parameters": {
27193	//     "instanceGroup": {
27194	//       "description": "The name of the instance group where the named ports are updated.",
27195	//       "location": "path",
27196	//       "required": true,
27197	//       "type": "string"
27198	//     },
27199	//     "project": {
27200	//       "description": "Project ID for this request.",
27201	//       "location": "path",
27202	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27203	//       "required": true,
27204	//       "type": "string"
27205	//     },
27206	//     "zone": {
27207	//       "description": "The name of the zone where the instance group is located.",
27208	//       "location": "path",
27209	//       "required": true,
27210	//       "type": "string"
27211	//     }
27212	//   },
27213	//   "path": "{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts",
27214	//   "request": {
27215	//     "$ref": "InstanceGroupsSetNamedPortsRequest"
27216	//   },
27217	//   "response": {
27218	//     "$ref": "Operation"
27219	//   },
27220	//   "scopes": [
27221	//     "https://www.googleapis.com/auth/cloud-platform",
27222	//     "https://www.googleapis.com/auth/compute"
27223	//   ]
27224	// }
27225
27226}
27227
27228// method id "compute.instanceGroups.testIamPermissions":
27229
27230type InstanceGroupsTestIamPermissionsCall struct {
27231	s                      *Service
27232	project                string
27233	zone                   string
27234	resource               string
27235	testpermissionsrequest *TestPermissionsRequest
27236	urlParams_             gensupport.URLParams
27237	ctx_                   context.Context
27238}
27239
27240// TestIamPermissions: Returns permissions that a caller has on the
27241// specified resource.
27242func (r *InstanceGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceGroupsTestIamPermissionsCall {
27243	c := &InstanceGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27244	c.project = project
27245	c.zone = zone
27246	c.resource = resource
27247	c.testpermissionsrequest = testpermissionsrequest
27248	return c
27249}
27250
27251// Fields allows partial responses to be retrieved. See
27252// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27253// for more information.
27254func (c *InstanceGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceGroupsTestIamPermissionsCall {
27255	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27256	return c
27257}
27258
27259// Context sets the context to be used in this call's Do method. Any
27260// pending HTTP request will be aborted if the provided context is
27261// canceled.
27262func (c *InstanceGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstanceGroupsTestIamPermissionsCall {
27263	c.ctx_ = ctx
27264	return c
27265}
27266
27267func (c *InstanceGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
27268	var body io.Reader = nil
27269	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
27270	if err != nil {
27271		return nil, err
27272	}
27273	ctype := "application/json"
27274	c.urlParams_.Set("alt", alt)
27275	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions")
27276	urls += "?" + c.urlParams_.Encode()
27277	req, _ := http.NewRequest("POST", urls, body)
27278	googleapi.Expand(req.URL, map[string]string{
27279		"project":  c.project,
27280		"zone":     c.zone,
27281		"resource": c.resource,
27282	})
27283	req.Header.Set("Content-Type", ctype)
27284	req.Header.Set("User-Agent", c.s.userAgent())
27285	if c.ctx_ != nil {
27286		return ctxhttp.Do(c.ctx_, c.s.client, req)
27287	}
27288	return c.s.client.Do(req)
27289}
27290
27291// Do executes the "compute.instanceGroups.testIamPermissions" call.
27292// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
27293// non-2xx status code is an error. Response headers are in either
27294// *TestPermissionsResponse.ServerResponse.Header or (if a response was
27295// returned at all) in error.(*googleapi.Error).Header. Use
27296// googleapi.IsNotModified to check whether the returned error was
27297// because http.StatusNotModified was returned.
27298func (c *InstanceGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
27299	gensupport.SetOptions(c.urlParams_, opts...)
27300	res, err := c.doRequest("json")
27301	if res != nil && res.StatusCode == http.StatusNotModified {
27302		if res.Body != nil {
27303			res.Body.Close()
27304		}
27305		return nil, &googleapi.Error{
27306			Code:   res.StatusCode,
27307			Header: res.Header,
27308		}
27309	}
27310	if err != nil {
27311		return nil, err
27312	}
27313	defer googleapi.CloseBody(res)
27314	if err := googleapi.CheckResponse(res); err != nil {
27315		return nil, err
27316	}
27317	ret := &TestPermissionsResponse{
27318		ServerResponse: googleapi.ServerResponse{
27319			Header:         res.Header,
27320			HTTPStatusCode: res.StatusCode,
27321		},
27322	}
27323	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27324		return nil, err
27325	}
27326	return ret, nil
27327	// {
27328	//   "description": "Returns permissions that a caller has on the specified resource.",
27329	//   "httpMethod": "POST",
27330	//   "id": "compute.instanceGroups.testIamPermissions",
27331	//   "parameterOrder": [
27332	//     "project",
27333	//     "zone",
27334	//     "resource"
27335	//   ],
27336	//   "parameters": {
27337	//     "project": {
27338	//       "description": "Project ID for this request.",
27339	//       "location": "path",
27340	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27341	//       "required": true,
27342	//       "type": "string"
27343	//     },
27344	//     "resource": {
27345	//       "description": "Name of the resource for this request.",
27346	//       "location": "path",
27347	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27348	//       "required": true,
27349	//       "type": "string"
27350	//     },
27351	//     "zone": {
27352	//       "description": "The name of the zone for this request.",
27353	//       "location": "path",
27354	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27355	//       "required": true,
27356	//       "type": "string"
27357	//     }
27358	//   },
27359	//   "path": "{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions",
27360	//   "request": {
27361	//     "$ref": "TestPermissionsRequest"
27362	//   },
27363	//   "response": {
27364	//     "$ref": "TestPermissionsResponse"
27365	//   },
27366	//   "scopes": [
27367	//     "https://www.googleapis.com/auth/cloud-platform",
27368	//     "https://www.googleapis.com/auth/compute",
27369	//     "https://www.googleapis.com/auth/compute.readonly"
27370	//   ]
27371	// }
27372
27373}
27374
27375// method id "compute.instanceTemplates.delete":
27376
27377type InstanceTemplatesDeleteCall struct {
27378	s                *Service
27379	project          string
27380	instanceTemplate string
27381	urlParams_       gensupport.URLParams
27382	ctx_             context.Context
27383}
27384
27385// Delete: Deletes the specified instance template. If you delete an
27386// instance template that is being referenced from another instance
27387// group, the instance group will not be able to create or recreate
27388// virtual machine instances. Deleting an instance template is permanent
27389// and cannot be undone.
27390// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/delete
27391func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall {
27392	c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27393	c.project = project
27394	c.instanceTemplate = instanceTemplate
27395	return c
27396}
27397
27398// Fields allows partial responses to be retrieved. See
27399// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27400// for more information.
27401func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall {
27402	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27403	return c
27404}
27405
27406// Context sets the context to be used in this call's Do method. Any
27407// pending HTTP request will be aborted if the provided context is
27408// canceled.
27409func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall {
27410	c.ctx_ = ctx
27411	return c
27412}
27413
27414func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
27415	var body io.Reader = nil
27416	c.urlParams_.Set("alt", alt)
27417	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}")
27418	urls += "?" + c.urlParams_.Encode()
27419	req, _ := http.NewRequest("DELETE", urls, body)
27420	googleapi.Expand(req.URL, map[string]string{
27421		"project":          c.project,
27422		"instanceTemplate": c.instanceTemplate,
27423	})
27424	req.Header.Set("User-Agent", c.s.userAgent())
27425	if c.ctx_ != nil {
27426		return ctxhttp.Do(c.ctx_, c.s.client, req)
27427	}
27428	return c.s.client.Do(req)
27429}
27430
27431// Do executes the "compute.instanceTemplates.delete" call.
27432// Exactly one of *Operation or error will be non-nil. Any non-2xx
27433// status code is an error. Response headers are in either
27434// *Operation.ServerResponse.Header or (if a response was returned at
27435// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27436// to check whether the returned error was because
27437// http.StatusNotModified was returned.
27438func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27439	gensupport.SetOptions(c.urlParams_, opts...)
27440	res, err := c.doRequest("json")
27441	if res != nil && res.StatusCode == http.StatusNotModified {
27442		if res.Body != nil {
27443			res.Body.Close()
27444		}
27445		return nil, &googleapi.Error{
27446			Code:   res.StatusCode,
27447			Header: res.Header,
27448		}
27449	}
27450	if err != nil {
27451		return nil, err
27452	}
27453	defer googleapi.CloseBody(res)
27454	if err := googleapi.CheckResponse(res); err != nil {
27455		return nil, err
27456	}
27457	ret := &Operation{
27458		ServerResponse: googleapi.ServerResponse{
27459			Header:         res.Header,
27460			HTTPStatusCode: res.StatusCode,
27461		},
27462	}
27463	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27464		return nil, err
27465	}
27466	return ret, nil
27467	// {
27468	//   "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.",
27469	//   "httpMethod": "DELETE",
27470	//   "id": "compute.instanceTemplates.delete",
27471	//   "parameterOrder": [
27472	//     "project",
27473	//     "instanceTemplate"
27474	//   ],
27475	//   "parameters": {
27476	//     "instanceTemplate": {
27477	//       "description": "The name of the instance template to delete.",
27478	//       "location": "path",
27479	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27480	//       "required": true,
27481	//       "type": "string"
27482	//     },
27483	//     "project": {
27484	//       "description": "Project ID for this request.",
27485	//       "location": "path",
27486	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27487	//       "required": true,
27488	//       "type": "string"
27489	//     }
27490	//   },
27491	//   "path": "{project}/global/instanceTemplates/{instanceTemplate}",
27492	//   "response": {
27493	//     "$ref": "Operation"
27494	//   },
27495	//   "scopes": [
27496	//     "https://www.googleapis.com/auth/cloud-platform",
27497	//     "https://www.googleapis.com/auth/compute"
27498	//   ]
27499	// }
27500
27501}
27502
27503// method id "compute.instanceTemplates.get":
27504
27505type InstanceTemplatesGetCall struct {
27506	s                *Service
27507	project          string
27508	instanceTemplate string
27509	urlParams_       gensupport.URLParams
27510	ifNoneMatch_     string
27511	ctx_             context.Context
27512}
27513
27514// Get: Returns the specified instance template. Get a list of available
27515// instance templates by making a list() request.
27516// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/get
27517func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall {
27518	c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27519	c.project = project
27520	c.instanceTemplate = instanceTemplate
27521	return c
27522}
27523
27524// Fields allows partial responses to be retrieved. See
27525// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27526// for more information.
27527func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall {
27528	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27529	return c
27530}
27531
27532// IfNoneMatch sets the optional parameter which makes the operation
27533// fail if the object's ETag matches the given value. This is useful for
27534// getting updates only after the object has changed since the last
27535// request. Use googleapi.IsNotModified to check whether the response
27536// error from Do is the result of In-None-Match.
27537func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall {
27538	c.ifNoneMatch_ = entityTag
27539	return c
27540}
27541
27542// Context sets the context to be used in this call's Do method. Any
27543// pending HTTP request will be aborted if the provided context is
27544// canceled.
27545func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall {
27546	c.ctx_ = ctx
27547	return c
27548}
27549
27550func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
27551	var body io.Reader = nil
27552	c.urlParams_.Set("alt", alt)
27553	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}")
27554	urls += "?" + c.urlParams_.Encode()
27555	req, _ := http.NewRequest("GET", urls, body)
27556	googleapi.Expand(req.URL, map[string]string{
27557		"project":          c.project,
27558		"instanceTemplate": c.instanceTemplate,
27559	})
27560	req.Header.Set("User-Agent", c.s.userAgent())
27561	if c.ifNoneMatch_ != "" {
27562		req.Header.Set("If-None-Match", c.ifNoneMatch_)
27563	}
27564	if c.ctx_ != nil {
27565		return ctxhttp.Do(c.ctx_, c.s.client, req)
27566	}
27567	return c.s.client.Do(req)
27568}
27569
27570// Do executes the "compute.instanceTemplates.get" call.
27571// Exactly one of *InstanceTemplate or error will be non-nil. Any
27572// non-2xx status code is an error. Response headers are in either
27573// *InstanceTemplate.ServerResponse.Header or (if a response was
27574// returned at all) in error.(*googleapi.Error).Header. Use
27575// googleapi.IsNotModified to check whether the returned error was
27576// because http.StatusNotModified was returned.
27577func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) {
27578	gensupport.SetOptions(c.urlParams_, opts...)
27579	res, err := c.doRequest("json")
27580	if res != nil && res.StatusCode == http.StatusNotModified {
27581		if res.Body != nil {
27582			res.Body.Close()
27583		}
27584		return nil, &googleapi.Error{
27585			Code:   res.StatusCode,
27586			Header: res.Header,
27587		}
27588	}
27589	if err != nil {
27590		return nil, err
27591	}
27592	defer googleapi.CloseBody(res)
27593	if err := googleapi.CheckResponse(res); err != nil {
27594		return nil, err
27595	}
27596	ret := &InstanceTemplate{
27597		ServerResponse: googleapi.ServerResponse{
27598			Header:         res.Header,
27599			HTTPStatusCode: res.StatusCode,
27600		},
27601	}
27602	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27603		return nil, err
27604	}
27605	return ret, nil
27606	// {
27607	//   "description": "Returns the specified instance template. Get a list of available instance templates by making a list() request.",
27608	//   "httpMethod": "GET",
27609	//   "id": "compute.instanceTemplates.get",
27610	//   "parameterOrder": [
27611	//     "project",
27612	//     "instanceTemplate"
27613	//   ],
27614	//   "parameters": {
27615	//     "instanceTemplate": {
27616	//       "description": "The name of the instance template.",
27617	//       "location": "path",
27618	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
27619	//       "required": true,
27620	//       "type": "string"
27621	//     },
27622	//     "project": {
27623	//       "description": "Project ID for this request.",
27624	//       "location": "path",
27625	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27626	//       "required": true,
27627	//       "type": "string"
27628	//     }
27629	//   },
27630	//   "path": "{project}/global/instanceTemplates/{instanceTemplate}",
27631	//   "response": {
27632	//     "$ref": "InstanceTemplate"
27633	//   },
27634	//   "scopes": [
27635	//     "https://www.googleapis.com/auth/cloud-platform",
27636	//     "https://www.googleapis.com/auth/compute",
27637	//     "https://www.googleapis.com/auth/compute.readonly"
27638	//   ]
27639	// }
27640
27641}
27642
27643// method id "compute.instanceTemplates.insert":
27644
27645type InstanceTemplatesInsertCall struct {
27646	s                *Service
27647	project          string
27648	instancetemplate *InstanceTemplate
27649	urlParams_       gensupport.URLParams
27650	ctx_             context.Context
27651}
27652
27653// Insert: Creates an instance template in the specified project using
27654// the data that is included in the request. If you are creating a new
27655// template to update an existing instance group, your new instance
27656// template must use the same network or, if applicable, the same
27657// subnetwork as the original template.
27658// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/insert
27659func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall {
27660	c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27661	c.project = project
27662	c.instancetemplate = instancetemplate
27663	return c
27664}
27665
27666// Fields allows partial responses to be retrieved. See
27667// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27668// for more information.
27669func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall {
27670	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27671	return c
27672}
27673
27674// Context sets the context to be used in this call's Do method. Any
27675// pending HTTP request will be aborted if the provided context is
27676// canceled.
27677func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall {
27678	c.ctx_ = ctx
27679	return c
27680}
27681
27682func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
27683	var body io.Reader = nil
27684	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate)
27685	if err != nil {
27686		return nil, err
27687	}
27688	ctype := "application/json"
27689	c.urlParams_.Set("alt", alt)
27690	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates")
27691	urls += "?" + c.urlParams_.Encode()
27692	req, _ := http.NewRequest("POST", urls, body)
27693	googleapi.Expand(req.URL, map[string]string{
27694		"project": c.project,
27695	})
27696	req.Header.Set("Content-Type", ctype)
27697	req.Header.Set("User-Agent", c.s.userAgent())
27698	if c.ctx_ != nil {
27699		return ctxhttp.Do(c.ctx_, c.s.client, req)
27700	}
27701	return c.s.client.Do(req)
27702}
27703
27704// Do executes the "compute.instanceTemplates.insert" call.
27705// Exactly one of *Operation or error will be non-nil. Any non-2xx
27706// status code is an error. Response headers are in either
27707// *Operation.ServerResponse.Header or (if a response was returned at
27708// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
27709// to check whether the returned error was because
27710// http.StatusNotModified was returned.
27711func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
27712	gensupport.SetOptions(c.urlParams_, opts...)
27713	res, err := c.doRequest("json")
27714	if res != nil && res.StatusCode == http.StatusNotModified {
27715		if res.Body != nil {
27716			res.Body.Close()
27717		}
27718		return nil, &googleapi.Error{
27719			Code:   res.StatusCode,
27720			Header: res.Header,
27721		}
27722	}
27723	if err != nil {
27724		return nil, err
27725	}
27726	defer googleapi.CloseBody(res)
27727	if err := googleapi.CheckResponse(res); err != nil {
27728		return nil, err
27729	}
27730	ret := &Operation{
27731		ServerResponse: googleapi.ServerResponse{
27732			Header:         res.Header,
27733			HTTPStatusCode: res.StatusCode,
27734		},
27735	}
27736	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27737		return nil, err
27738	}
27739	return ret, nil
27740	// {
27741	//   "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.",
27742	//   "httpMethod": "POST",
27743	//   "id": "compute.instanceTemplates.insert",
27744	//   "parameterOrder": [
27745	//     "project"
27746	//   ],
27747	//   "parameters": {
27748	//     "project": {
27749	//       "description": "Project ID for this request.",
27750	//       "location": "path",
27751	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27752	//       "required": true,
27753	//       "type": "string"
27754	//     }
27755	//   },
27756	//   "path": "{project}/global/instanceTemplates",
27757	//   "request": {
27758	//     "$ref": "InstanceTemplate"
27759	//   },
27760	//   "response": {
27761	//     "$ref": "Operation"
27762	//   },
27763	//   "scopes": [
27764	//     "https://www.googleapis.com/auth/cloud-platform",
27765	//     "https://www.googleapis.com/auth/compute"
27766	//   ]
27767	// }
27768
27769}
27770
27771// method id "compute.instanceTemplates.list":
27772
27773type InstanceTemplatesListCall struct {
27774	s            *Service
27775	project      string
27776	urlParams_   gensupport.URLParams
27777	ifNoneMatch_ string
27778	ctx_         context.Context
27779}
27780
27781// List: Retrieves a list of instance templates that are contained
27782// within the specified project and zone.
27783// For details, see https://cloud.google.com/compute/docs/reference/latest/instanceTemplates/list
27784func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall {
27785	c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
27786	c.project = project
27787	return c
27788}
27789
27790// Filter sets the optional parameter "filter": Sets a filter expression
27791// for filtering listed resources, in the form filter={expression}. Your
27792// {expression} must be in the format: field_name comparison_string
27793// literal_string.
27794//
27795// The field_name is the name of the field you want to compare. Only
27796// atomic field types are supported (string, number, boolean). The
27797// comparison_string must be either eq (equals) or ne (not equals). The
27798// literal_string is the string value to filter to. The literal value
27799// must be valid for the type of field you are filtering by (string,
27800// number, boolean). For string fields, the literal value is interpreted
27801// as a regular expression using RE2 syntax. The literal value must
27802// match the entire field.
27803//
27804// For example, to filter for instances that do not have a name of
27805// example-instance, you would use filter=name ne
27806// example-instance.
27807//
27808// Compute Engine Beta API Only: If you use filtering in the Beta API,
27809// you can also filter on nested fields. For example, you could filter
27810// on instances that have set the scheduling.automaticRestart field to
27811// true. In particular, use filtering on nested fields to take advantage
27812// of instance labels to organize and filter results based on label
27813// values.
27814//
27815// The Beta API also supports filtering on multiple expressions by
27816// providing each separate expression within parentheses. For example,
27817// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
27818// Multiple expressions are treated as AND expressions, meaning that
27819// resources must match all expressions to pass the filters.
27820func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall {
27821	c.urlParams_.Set("filter", filter)
27822	return c
27823}
27824
27825// MaxResults sets the optional parameter "maxResults": The maximum
27826// number of results per page that should be returned. If the number of
27827// available results is larger than maxResults, Compute Engine returns a
27828// nextPageToken that can be used to get the next page of results in
27829// subsequent list requests.
27830func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall {
27831	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
27832	return c
27833}
27834
27835// OrderBy sets the optional parameter "orderBy": Sorts list results by
27836// a certain order. By default, results are returned in alphanumerical
27837// order based on the resource name.
27838//
27839// You can also sort results in descending order based on the creation
27840// timestamp using orderBy="creationTimestamp desc". This sorts results
27841// based on the creationTimestamp field in reverse chronological order
27842// (newest result first). Use this to sort resources like operations so
27843// that the newest operation is returned first.
27844//
27845// Currently, only sorting by name or creationTimestamp desc is
27846// supported.
27847func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall {
27848	c.urlParams_.Set("orderBy", orderBy)
27849	return c
27850}
27851
27852// PageToken sets the optional parameter "pageToken": Specifies a page
27853// token to use. Set pageToken to the nextPageToken returned by a
27854// previous list request to get the next page of results.
27855func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall {
27856	c.urlParams_.Set("pageToken", pageToken)
27857	return c
27858}
27859
27860// Fields allows partial responses to be retrieved. See
27861// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
27862// for more information.
27863func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall {
27864	c.urlParams_.Set("fields", googleapi.CombineFields(s))
27865	return c
27866}
27867
27868// IfNoneMatch sets the optional parameter which makes the operation
27869// fail if the object's ETag matches the given value. This is useful for
27870// getting updates only after the object has changed since the last
27871// request. Use googleapi.IsNotModified to check whether the response
27872// error from Do is the result of In-None-Match.
27873func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall {
27874	c.ifNoneMatch_ = entityTag
27875	return c
27876}
27877
27878// Context sets the context to be used in this call's Do method. Any
27879// pending HTTP request will be aborted if the provided context is
27880// canceled.
27881func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall {
27882	c.ctx_ = ctx
27883	return c
27884}
27885
27886func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) {
27887	var body io.Reader = nil
27888	c.urlParams_.Set("alt", alt)
27889	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates")
27890	urls += "?" + c.urlParams_.Encode()
27891	req, _ := http.NewRequest("GET", urls, body)
27892	googleapi.Expand(req.URL, map[string]string{
27893		"project": c.project,
27894	})
27895	req.Header.Set("User-Agent", c.s.userAgent())
27896	if c.ifNoneMatch_ != "" {
27897		req.Header.Set("If-None-Match", c.ifNoneMatch_)
27898	}
27899	if c.ctx_ != nil {
27900		return ctxhttp.Do(c.ctx_, c.s.client, req)
27901	}
27902	return c.s.client.Do(req)
27903}
27904
27905// Do executes the "compute.instanceTemplates.list" call.
27906// Exactly one of *InstanceTemplateList or error will be non-nil. Any
27907// non-2xx status code is an error. Response headers are in either
27908// *InstanceTemplateList.ServerResponse.Header or (if a response was
27909// returned at all) in error.(*googleapi.Error).Header. Use
27910// googleapi.IsNotModified to check whether the returned error was
27911// because http.StatusNotModified was returned.
27912func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) {
27913	gensupport.SetOptions(c.urlParams_, opts...)
27914	res, err := c.doRequest("json")
27915	if res != nil && res.StatusCode == http.StatusNotModified {
27916		if res.Body != nil {
27917			res.Body.Close()
27918		}
27919		return nil, &googleapi.Error{
27920			Code:   res.StatusCode,
27921			Header: res.Header,
27922		}
27923	}
27924	if err != nil {
27925		return nil, err
27926	}
27927	defer googleapi.CloseBody(res)
27928	if err := googleapi.CheckResponse(res); err != nil {
27929		return nil, err
27930	}
27931	ret := &InstanceTemplateList{
27932		ServerResponse: googleapi.ServerResponse{
27933			Header:         res.Header,
27934			HTTPStatusCode: res.StatusCode,
27935		},
27936	}
27937	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
27938		return nil, err
27939	}
27940	return ret, nil
27941	// {
27942	//   "description": "Retrieves a list of instance templates that are contained within the specified project and zone.",
27943	//   "httpMethod": "GET",
27944	//   "id": "compute.instanceTemplates.list",
27945	//   "parameterOrder": [
27946	//     "project"
27947	//   ],
27948	//   "parameters": {
27949	//     "filter": {
27950	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
27951	//       "location": "query",
27952	//       "type": "string"
27953	//     },
27954	//     "maxResults": {
27955	//       "default": "500",
27956	//       "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.",
27957	//       "format": "uint32",
27958	//       "location": "query",
27959	//       "maximum": "500",
27960	//       "minimum": "0",
27961	//       "type": "integer"
27962	//     },
27963	//     "orderBy": {
27964	//       "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.",
27965	//       "location": "query",
27966	//       "type": "string"
27967	//     },
27968	//     "pageToken": {
27969	//       "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.",
27970	//       "location": "query",
27971	//       "type": "string"
27972	//     },
27973	//     "project": {
27974	//       "description": "Project ID for this request.",
27975	//       "location": "path",
27976	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
27977	//       "required": true,
27978	//       "type": "string"
27979	//     }
27980	//   },
27981	//   "path": "{project}/global/instanceTemplates",
27982	//   "response": {
27983	//     "$ref": "InstanceTemplateList"
27984	//   },
27985	//   "scopes": [
27986	//     "https://www.googleapis.com/auth/cloud-platform",
27987	//     "https://www.googleapis.com/auth/compute",
27988	//     "https://www.googleapis.com/auth/compute.readonly"
27989	//   ]
27990	// }
27991
27992}
27993
27994// Pages invokes f for each page of results.
27995// A non-nil error returned from f will halt the iteration.
27996// The provided context supersedes any context provided to the Context method.
27997func (c *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error {
27998	c.ctx_ = ctx
27999	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28000	for {
28001		x, err := c.Do()
28002		if err != nil {
28003			return err
28004		}
28005		if err := f(x); err != nil {
28006			return err
28007		}
28008		if x.NextPageToken == "" {
28009			return nil
28010		}
28011		c.PageToken(x.NextPageToken)
28012	}
28013}
28014
28015// method id "compute.instanceTemplates.testIamPermissions":
28016
28017type InstanceTemplatesTestIamPermissionsCall struct {
28018	s                      *Service
28019	project                string
28020	resource               string
28021	testpermissionsrequest *TestPermissionsRequest
28022	urlParams_             gensupport.URLParams
28023	ctx_                   context.Context
28024}
28025
28026// TestIamPermissions: Returns permissions that a caller has on the
28027// specified resource.
28028func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall {
28029	c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28030	c.project = project
28031	c.resource = resource
28032	c.testpermissionsrequest = testpermissionsrequest
28033	return c
28034}
28035
28036// Fields allows partial responses to be retrieved. See
28037// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28038// for more information.
28039func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall {
28040	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28041	return c
28042}
28043
28044// Context sets the context to be used in this call's Do method. Any
28045// pending HTTP request will be aborted if the provided context is
28046// canceled.
28047func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall {
28048	c.ctx_ = ctx
28049	return c
28050}
28051
28052func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
28053	var body io.Reader = nil
28054	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
28055	if err != nil {
28056		return nil, err
28057	}
28058	ctype := "application/json"
28059	c.urlParams_.Set("alt", alt)
28060	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{resource}/testIamPermissions")
28061	urls += "?" + c.urlParams_.Encode()
28062	req, _ := http.NewRequest("POST", urls, body)
28063	googleapi.Expand(req.URL, map[string]string{
28064		"project":  c.project,
28065		"resource": c.resource,
28066	})
28067	req.Header.Set("Content-Type", ctype)
28068	req.Header.Set("User-Agent", c.s.userAgent())
28069	if c.ctx_ != nil {
28070		return ctxhttp.Do(c.ctx_, c.s.client, req)
28071	}
28072	return c.s.client.Do(req)
28073}
28074
28075// Do executes the "compute.instanceTemplates.testIamPermissions" call.
28076// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
28077// non-2xx status code is an error. Response headers are in either
28078// *TestPermissionsResponse.ServerResponse.Header or (if a response was
28079// returned at all) in error.(*googleapi.Error).Header. Use
28080// googleapi.IsNotModified to check whether the returned error was
28081// because http.StatusNotModified was returned.
28082func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
28083	gensupport.SetOptions(c.urlParams_, opts...)
28084	res, err := c.doRequest("json")
28085	if res != nil && res.StatusCode == http.StatusNotModified {
28086		if res.Body != nil {
28087			res.Body.Close()
28088		}
28089		return nil, &googleapi.Error{
28090			Code:   res.StatusCode,
28091			Header: res.Header,
28092		}
28093	}
28094	if err != nil {
28095		return nil, err
28096	}
28097	defer googleapi.CloseBody(res)
28098	if err := googleapi.CheckResponse(res); err != nil {
28099		return nil, err
28100	}
28101	ret := &TestPermissionsResponse{
28102		ServerResponse: googleapi.ServerResponse{
28103			Header:         res.Header,
28104			HTTPStatusCode: res.StatusCode,
28105		},
28106	}
28107	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28108		return nil, err
28109	}
28110	return ret, nil
28111	// {
28112	//   "description": "Returns permissions that a caller has on the specified resource.",
28113	//   "httpMethod": "POST",
28114	//   "id": "compute.instanceTemplates.testIamPermissions",
28115	//   "parameterOrder": [
28116	//     "project",
28117	//     "resource"
28118	//   ],
28119	//   "parameters": {
28120	//     "project": {
28121	//       "description": "Project ID for this request.",
28122	//       "location": "path",
28123	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28124	//       "required": true,
28125	//       "type": "string"
28126	//     },
28127	//     "resource": {
28128	//       "description": "Name of the resource for this request.",
28129	//       "location": "path",
28130	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
28131	//       "required": true,
28132	//       "type": "string"
28133	//     }
28134	//   },
28135	//   "path": "{project}/global/instanceTemplates/{resource}/testIamPermissions",
28136	//   "request": {
28137	//     "$ref": "TestPermissionsRequest"
28138	//   },
28139	//   "response": {
28140	//     "$ref": "TestPermissionsResponse"
28141	//   },
28142	//   "scopes": [
28143	//     "https://www.googleapis.com/auth/cloud-platform",
28144	//     "https://www.googleapis.com/auth/compute",
28145	//     "https://www.googleapis.com/auth/compute.readonly"
28146	//   ]
28147	// }
28148
28149}
28150
28151// method id "compute.instances.addAccessConfig":
28152
28153type InstancesAddAccessConfigCall struct {
28154	s            *Service
28155	project      string
28156	zone         string
28157	instance     string
28158	accessconfig *AccessConfig
28159	urlParams_   gensupport.URLParams
28160	ctx_         context.Context
28161}
28162
28163// AddAccessConfig: Adds an access config to an instance's network
28164// interface.
28165// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/addAccessConfig
28166func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall {
28167	c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28168	c.project = project
28169	c.zone = zone
28170	c.instance = instance
28171	c.urlParams_.Set("networkInterface", networkInterface)
28172	c.accessconfig = accessconfig
28173	return c
28174}
28175
28176// Fields allows partial responses to be retrieved. See
28177// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28178// for more information.
28179func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall {
28180	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28181	return c
28182}
28183
28184// Context sets the context to be used in this call's Do method. Any
28185// pending HTTP request will be aborted if the provided context is
28186// canceled.
28187func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall {
28188	c.ctx_ = ctx
28189	return c
28190}
28191
28192func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) {
28193	var body io.Reader = nil
28194	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig)
28195	if err != nil {
28196		return nil, err
28197	}
28198	ctype := "application/json"
28199	c.urlParams_.Set("alt", alt)
28200	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig")
28201	urls += "?" + c.urlParams_.Encode()
28202	req, _ := http.NewRequest("POST", urls, body)
28203	googleapi.Expand(req.URL, map[string]string{
28204		"project":  c.project,
28205		"zone":     c.zone,
28206		"instance": c.instance,
28207	})
28208	req.Header.Set("Content-Type", ctype)
28209	req.Header.Set("User-Agent", c.s.userAgent())
28210	if c.ctx_ != nil {
28211		return ctxhttp.Do(c.ctx_, c.s.client, req)
28212	}
28213	return c.s.client.Do(req)
28214}
28215
28216// Do executes the "compute.instances.addAccessConfig" call.
28217// Exactly one of *Operation or error will be non-nil. Any non-2xx
28218// status code is an error. Response headers are in either
28219// *Operation.ServerResponse.Header or (if a response was returned at
28220// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28221// to check whether the returned error was because
28222// http.StatusNotModified was returned.
28223func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28224	gensupport.SetOptions(c.urlParams_, opts...)
28225	res, err := c.doRequest("json")
28226	if res != nil && res.StatusCode == http.StatusNotModified {
28227		if res.Body != nil {
28228			res.Body.Close()
28229		}
28230		return nil, &googleapi.Error{
28231			Code:   res.StatusCode,
28232			Header: res.Header,
28233		}
28234	}
28235	if err != nil {
28236		return nil, err
28237	}
28238	defer googleapi.CloseBody(res)
28239	if err := googleapi.CheckResponse(res); err != nil {
28240		return nil, err
28241	}
28242	ret := &Operation{
28243		ServerResponse: googleapi.ServerResponse{
28244			Header:         res.Header,
28245			HTTPStatusCode: res.StatusCode,
28246		},
28247	}
28248	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28249		return nil, err
28250	}
28251	return ret, nil
28252	// {
28253	//   "description": "Adds an access config to an instance's network interface.",
28254	//   "httpMethod": "POST",
28255	//   "id": "compute.instances.addAccessConfig",
28256	//   "parameterOrder": [
28257	//     "project",
28258	//     "zone",
28259	//     "instance",
28260	//     "networkInterface"
28261	//   ],
28262	//   "parameters": {
28263	//     "instance": {
28264	//       "description": "The instance name for this request.",
28265	//       "location": "path",
28266	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28267	//       "required": true,
28268	//       "type": "string"
28269	//     },
28270	//     "networkInterface": {
28271	//       "description": "The name of the network interface to add to this instance.",
28272	//       "location": "query",
28273	//       "required": true,
28274	//       "type": "string"
28275	//     },
28276	//     "project": {
28277	//       "description": "Project ID for this request.",
28278	//       "location": "path",
28279	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28280	//       "required": true,
28281	//       "type": "string"
28282	//     },
28283	//     "zone": {
28284	//       "description": "The name of the zone for this request.",
28285	//       "location": "path",
28286	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28287	//       "required": true,
28288	//       "type": "string"
28289	//     }
28290	//   },
28291	//   "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig",
28292	//   "request": {
28293	//     "$ref": "AccessConfig"
28294	//   },
28295	//   "response": {
28296	//     "$ref": "Operation"
28297	//   },
28298	//   "scopes": [
28299	//     "https://www.googleapis.com/auth/cloud-platform",
28300	//     "https://www.googleapis.com/auth/compute"
28301	//   ]
28302	// }
28303
28304}
28305
28306// method id "compute.instances.aggregatedList":
28307
28308type InstancesAggregatedListCall struct {
28309	s            *Service
28310	project      string
28311	urlParams_   gensupport.URLParams
28312	ifNoneMatch_ string
28313	ctx_         context.Context
28314}
28315
28316// AggregatedList: Retrieves aggregated list of instances.
28317// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/aggregatedList
28318func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall {
28319	c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28320	c.project = project
28321	return c
28322}
28323
28324// Filter sets the optional parameter "filter": Sets a filter expression
28325// for filtering listed resources, in the form filter={expression}. Your
28326// {expression} must be in the format: field_name comparison_string
28327// literal_string.
28328//
28329// The field_name is the name of the field you want to compare. Only
28330// atomic field types are supported (string, number, boolean). The
28331// comparison_string must be either eq (equals) or ne (not equals). The
28332// literal_string is the string value to filter to. The literal value
28333// must be valid for the type of field you are filtering by (string,
28334// number, boolean). For string fields, the literal value is interpreted
28335// as a regular expression using RE2 syntax. The literal value must
28336// match the entire field.
28337//
28338// For example, to filter for instances that do not have a name of
28339// example-instance, you would use filter=name ne
28340// example-instance.
28341//
28342// Compute Engine Beta API Only: If you use filtering in the Beta API,
28343// you can also filter on nested fields. For example, you could filter
28344// on instances that have set the scheduling.automaticRestart field to
28345// true. In particular, use filtering on nested fields to take advantage
28346// of instance labels to organize and filter results based on label
28347// values.
28348//
28349// The Beta API also supports filtering on multiple expressions by
28350// providing each separate expression within parentheses. For example,
28351// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
28352// Multiple expressions are treated as AND expressions, meaning that
28353// resources must match all expressions to pass the filters.
28354func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall {
28355	c.urlParams_.Set("filter", filter)
28356	return c
28357}
28358
28359// MaxResults sets the optional parameter "maxResults": The maximum
28360// number of results per page that should be returned. If the number of
28361// available results is larger than maxResults, Compute Engine returns a
28362// nextPageToken that can be used to get the next page of results in
28363// subsequent list requests.
28364func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall {
28365	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
28366	return c
28367}
28368
28369// OrderBy sets the optional parameter "orderBy": Sorts list results by
28370// a certain order. By default, results are returned in alphanumerical
28371// order based on the resource name.
28372//
28373// You can also sort results in descending order based on the creation
28374// timestamp using orderBy="creationTimestamp desc". This sorts results
28375// based on the creationTimestamp field in reverse chronological order
28376// (newest result first). Use this to sort resources like operations so
28377// that the newest operation is returned first.
28378//
28379// Currently, only sorting by name or creationTimestamp desc is
28380// supported.
28381func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall {
28382	c.urlParams_.Set("orderBy", orderBy)
28383	return c
28384}
28385
28386// PageToken sets the optional parameter "pageToken": Specifies a page
28387// token to use. Set pageToken to the nextPageToken returned by a
28388// previous list request to get the next page of results.
28389func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall {
28390	c.urlParams_.Set("pageToken", pageToken)
28391	return c
28392}
28393
28394// Fields allows partial responses to be retrieved. See
28395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28396// for more information.
28397func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall {
28398	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28399	return c
28400}
28401
28402// IfNoneMatch sets the optional parameter which makes the operation
28403// fail if the object's ETag matches the given value. This is useful for
28404// getting updates only after the object has changed since the last
28405// request. Use googleapi.IsNotModified to check whether the response
28406// error from Do is the result of In-None-Match.
28407func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall {
28408	c.ifNoneMatch_ = entityTag
28409	return c
28410}
28411
28412// Context sets the context to be used in this call's Do method. Any
28413// pending HTTP request will be aborted if the provided context is
28414// canceled.
28415func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall {
28416	c.ctx_ = ctx
28417	return c
28418}
28419
28420func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
28421	var body io.Reader = nil
28422	c.urlParams_.Set("alt", alt)
28423	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instances")
28424	urls += "?" + c.urlParams_.Encode()
28425	req, _ := http.NewRequest("GET", urls, body)
28426	googleapi.Expand(req.URL, map[string]string{
28427		"project": c.project,
28428	})
28429	req.Header.Set("User-Agent", c.s.userAgent())
28430	if c.ifNoneMatch_ != "" {
28431		req.Header.Set("If-None-Match", c.ifNoneMatch_)
28432	}
28433	if c.ctx_ != nil {
28434		return ctxhttp.Do(c.ctx_, c.s.client, req)
28435	}
28436	return c.s.client.Do(req)
28437}
28438
28439// Do executes the "compute.instances.aggregatedList" call.
28440// Exactly one of *InstanceAggregatedList or error will be non-nil. Any
28441// non-2xx status code is an error. Response headers are in either
28442// *InstanceAggregatedList.ServerResponse.Header or (if a response was
28443// returned at all) in error.(*googleapi.Error).Header. Use
28444// googleapi.IsNotModified to check whether the returned error was
28445// because http.StatusNotModified was returned.
28446func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) {
28447	gensupport.SetOptions(c.urlParams_, opts...)
28448	res, err := c.doRequest("json")
28449	if res != nil && res.StatusCode == http.StatusNotModified {
28450		if res.Body != nil {
28451			res.Body.Close()
28452		}
28453		return nil, &googleapi.Error{
28454			Code:   res.StatusCode,
28455			Header: res.Header,
28456		}
28457	}
28458	if err != nil {
28459		return nil, err
28460	}
28461	defer googleapi.CloseBody(res)
28462	if err := googleapi.CheckResponse(res); err != nil {
28463		return nil, err
28464	}
28465	ret := &InstanceAggregatedList{
28466		ServerResponse: googleapi.ServerResponse{
28467			Header:         res.Header,
28468			HTTPStatusCode: res.StatusCode,
28469		},
28470	}
28471	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28472		return nil, err
28473	}
28474	return ret, nil
28475	// {
28476	//   "description": "Retrieves aggregated list of instances.",
28477	//   "httpMethod": "GET",
28478	//   "id": "compute.instances.aggregatedList",
28479	//   "parameterOrder": [
28480	//     "project"
28481	//   ],
28482	//   "parameters": {
28483	//     "filter": {
28484	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
28485	//       "location": "query",
28486	//       "type": "string"
28487	//     },
28488	//     "maxResults": {
28489	//       "default": "500",
28490	//       "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.",
28491	//       "format": "uint32",
28492	//       "location": "query",
28493	//       "maximum": "500",
28494	//       "minimum": "0",
28495	//       "type": "integer"
28496	//     },
28497	//     "orderBy": {
28498	//       "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.",
28499	//       "location": "query",
28500	//       "type": "string"
28501	//     },
28502	//     "pageToken": {
28503	//       "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.",
28504	//       "location": "query",
28505	//       "type": "string"
28506	//     },
28507	//     "project": {
28508	//       "description": "Project ID for this request.",
28509	//       "location": "path",
28510	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28511	//       "required": true,
28512	//       "type": "string"
28513	//     }
28514	//   },
28515	//   "path": "{project}/aggregated/instances",
28516	//   "response": {
28517	//     "$ref": "InstanceAggregatedList"
28518	//   },
28519	//   "scopes": [
28520	//     "https://www.googleapis.com/auth/cloud-platform",
28521	//     "https://www.googleapis.com/auth/compute",
28522	//     "https://www.googleapis.com/auth/compute.readonly"
28523	//   ]
28524	// }
28525
28526}
28527
28528// Pages invokes f for each page of results.
28529// A non-nil error returned from f will halt the iteration.
28530// The provided context supersedes any context provided to the Context method.
28531func (c *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error {
28532	c.ctx_ = ctx
28533	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
28534	for {
28535		x, err := c.Do()
28536		if err != nil {
28537			return err
28538		}
28539		if err := f(x); err != nil {
28540			return err
28541		}
28542		if x.NextPageToken == "" {
28543			return nil
28544		}
28545		c.PageToken(x.NextPageToken)
28546	}
28547}
28548
28549// method id "compute.instances.attachDisk":
28550
28551type InstancesAttachDiskCall struct {
28552	s            *Service
28553	project      string
28554	zone         string
28555	instance     string
28556	attacheddisk *AttachedDisk
28557	urlParams_   gensupport.URLParams
28558	ctx_         context.Context
28559}
28560
28561// AttachDisk: Attaches a Disk resource to an instance.
28562// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/attachDisk
28563func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall {
28564	c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28565	c.project = project
28566	c.zone = zone
28567	c.instance = instance
28568	c.attacheddisk = attacheddisk
28569	return c
28570}
28571
28572// Fields allows partial responses to be retrieved. See
28573// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28574// for more information.
28575func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall {
28576	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28577	return c
28578}
28579
28580// Context sets the context to be used in this call's Do method. Any
28581// pending HTTP request will be aborted if the provided context is
28582// canceled.
28583func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall {
28584	c.ctx_ = ctx
28585	return c
28586}
28587
28588func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) {
28589	var body io.Reader = nil
28590	body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk)
28591	if err != nil {
28592		return nil, err
28593	}
28594	ctype := "application/json"
28595	c.urlParams_.Set("alt", alt)
28596	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk")
28597	urls += "?" + c.urlParams_.Encode()
28598	req, _ := http.NewRequest("POST", urls, body)
28599	googleapi.Expand(req.URL, map[string]string{
28600		"project":  c.project,
28601		"zone":     c.zone,
28602		"instance": c.instance,
28603	})
28604	req.Header.Set("Content-Type", ctype)
28605	req.Header.Set("User-Agent", c.s.userAgent())
28606	if c.ctx_ != nil {
28607		return ctxhttp.Do(c.ctx_, c.s.client, req)
28608	}
28609	return c.s.client.Do(req)
28610}
28611
28612// Do executes the "compute.instances.attachDisk" call.
28613// Exactly one of *Operation or error will be non-nil. Any non-2xx
28614// status code is an error. Response headers are in either
28615// *Operation.ServerResponse.Header or (if a response was returned at
28616// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28617// to check whether the returned error was because
28618// http.StatusNotModified was returned.
28619func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28620	gensupport.SetOptions(c.urlParams_, opts...)
28621	res, err := c.doRequest("json")
28622	if res != nil && res.StatusCode == http.StatusNotModified {
28623		if res.Body != nil {
28624			res.Body.Close()
28625		}
28626		return nil, &googleapi.Error{
28627			Code:   res.StatusCode,
28628			Header: res.Header,
28629		}
28630	}
28631	if err != nil {
28632		return nil, err
28633	}
28634	defer googleapi.CloseBody(res)
28635	if err := googleapi.CheckResponse(res); err != nil {
28636		return nil, err
28637	}
28638	ret := &Operation{
28639		ServerResponse: googleapi.ServerResponse{
28640			Header:         res.Header,
28641			HTTPStatusCode: res.StatusCode,
28642		},
28643	}
28644	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28645		return nil, err
28646	}
28647	return ret, nil
28648	// {
28649	//   "description": "Attaches a Disk resource to an instance.",
28650	//   "httpMethod": "POST",
28651	//   "id": "compute.instances.attachDisk",
28652	//   "parameterOrder": [
28653	//     "project",
28654	//     "zone",
28655	//     "instance"
28656	//   ],
28657	//   "parameters": {
28658	//     "instance": {
28659	//       "description": "The instance name for this request.",
28660	//       "location": "path",
28661	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28662	//       "required": true,
28663	//       "type": "string"
28664	//     },
28665	//     "project": {
28666	//       "description": "Project ID for this request.",
28667	//       "location": "path",
28668	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28669	//       "required": true,
28670	//       "type": "string"
28671	//     },
28672	//     "zone": {
28673	//       "description": "The name of the zone for this request.",
28674	//       "location": "path",
28675	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28676	//       "required": true,
28677	//       "type": "string"
28678	//     }
28679	//   },
28680	//   "path": "{project}/zones/{zone}/instances/{instance}/attachDisk",
28681	//   "request": {
28682	//     "$ref": "AttachedDisk"
28683	//   },
28684	//   "response": {
28685	//     "$ref": "Operation"
28686	//   },
28687	//   "scopes": [
28688	//     "https://www.googleapis.com/auth/cloud-platform",
28689	//     "https://www.googleapis.com/auth/compute"
28690	//   ]
28691	// }
28692
28693}
28694
28695// method id "compute.instances.delete":
28696
28697type InstancesDeleteCall struct {
28698	s          *Service
28699	project    string
28700	zone       string
28701	instance   string
28702	urlParams_ gensupport.URLParams
28703	ctx_       context.Context
28704}
28705
28706// Delete: Deletes the specified Instance resource. For more
28707// information, see Stopping or Deleting an Instance.
28708// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/delete
28709func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall {
28710	c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28711	c.project = project
28712	c.zone = zone
28713	c.instance = instance
28714	return c
28715}
28716
28717// Fields allows partial responses to be retrieved. See
28718// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28719// for more information.
28720func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall {
28721	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28722	return c
28723}
28724
28725// Context sets the context to be used in this call's Do method. Any
28726// pending HTTP request will be aborted if the provided context is
28727// canceled.
28728func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
28729	c.ctx_ = ctx
28730	return c
28731}
28732
28733func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
28734	var body io.Reader = nil
28735	c.urlParams_.Set("alt", alt)
28736	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}")
28737	urls += "?" + c.urlParams_.Encode()
28738	req, _ := http.NewRequest("DELETE", urls, body)
28739	googleapi.Expand(req.URL, map[string]string{
28740		"project":  c.project,
28741		"zone":     c.zone,
28742		"instance": c.instance,
28743	})
28744	req.Header.Set("User-Agent", c.s.userAgent())
28745	if c.ctx_ != nil {
28746		return ctxhttp.Do(c.ctx_, c.s.client, req)
28747	}
28748	return c.s.client.Do(req)
28749}
28750
28751// Do executes the "compute.instances.delete" call.
28752// Exactly one of *Operation or error will be non-nil. Any non-2xx
28753// status code is an error. Response headers are in either
28754// *Operation.ServerResponse.Header or (if a response was returned at
28755// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28756// to check whether the returned error was because
28757// http.StatusNotModified was returned.
28758func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28759	gensupport.SetOptions(c.urlParams_, opts...)
28760	res, err := c.doRequest("json")
28761	if res != nil && res.StatusCode == http.StatusNotModified {
28762		if res.Body != nil {
28763			res.Body.Close()
28764		}
28765		return nil, &googleapi.Error{
28766			Code:   res.StatusCode,
28767			Header: res.Header,
28768		}
28769	}
28770	if err != nil {
28771		return nil, err
28772	}
28773	defer googleapi.CloseBody(res)
28774	if err := googleapi.CheckResponse(res); err != nil {
28775		return nil, err
28776	}
28777	ret := &Operation{
28778		ServerResponse: googleapi.ServerResponse{
28779			Header:         res.Header,
28780			HTTPStatusCode: res.StatusCode,
28781		},
28782	}
28783	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28784		return nil, err
28785	}
28786	return ret, nil
28787	// {
28788	//   "description": "Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.",
28789	//   "httpMethod": "DELETE",
28790	//   "id": "compute.instances.delete",
28791	//   "parameterOrder": [
28792	//     "project",
28793	//     "zone",
28794	//     "instance"
28795	//   ],
28796	//   "parameters": {
28797	//     "instance": {
28798	//       "description": "Name of the instance resource to delete.",
28799	//       "location": "path",
28800	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28801	//       "required": true,
28802	//       "type": "string"
28803	//     },
28804	//     "project": {
28805	//       "description": "Project ID for this request.",
28806	//       "location": "path",
28807	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28808	//       "required": true,
28809	//       "type": "string"
28810	//     },
28811	//     "zone": {
28812	//       "description": "The name of the zone for this request.",
28813	//       "location": "path",
28814	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28815	//       "required": true,
28816	//       "type": "string"
28817	//     }
28818	//   },
28819	//   "path": "{project}/zones/{zone}/instances/{instance}",
28820	//   "response": {
28821	//     "$ref": "Operation"
28822	//   },
28823	//   "scopes": [
28824	//     "https://www.googleapis.com/auth/cloud-platform",
28825	//     "https://www.googleapis.com/auth/compute"
28826	//   ]
28827	// }
28828
28829}
28830
28831// method id "compute.instances.deleteAccessConfig":
28832
28833type InstancesDeleteAccessConfigCall struct {
28834	s          *Service
28835	project    string
28836	zone       string
28837	instance   string
28838	urlParams_ gensupport.URLParams
28839	ctx_       context.Context
28840}
28841
28842// DeleteAccessConfig: Deletes an access config from an instance's
28843// network interface.
28844// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/deleteAccessConfig
28845func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall {
28846	c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28847	c.project = project
28848	c.zone = zone
28849	c.instance = instance
28850	c.urlParams_.Set("accessConfig", accessConfig)
28851	c.urlParams_.Set("networkInterface", networkInterface)
28852	return c
28853}
28854
28855// Fields allows partial responses to be retrieved. See
28856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
28857// for more information.
28858func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall {
28859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
28860	return c
28861}
28862
28863// Context sets the context to be used in this call's Do method. Any
28864// pending HTTP request will be aborted if the provided context is
28865// canceled.
28866func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall {
28867	c.ctx_ = ctx
28868	return c
28869}
28870
28871func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) {
28872	var body io.Reader = nil
28873	c.urlParams_.Set("alt", alt)
28874	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig")
28875	urls += "?" + c.urlParams_.Encode()
28876	req, _ := http.NewRequest("POST", urls, body)
28877	googleapi.Expand(req.URL, map[string]string{
28878		"project":  c.project,
28879		"zone":     c.zone,
28880		"instance": c.instance,
28881	})
28882	req.Header.Set("User-Agent", c.s.userAgent())
28883	if c.ctx_ != nil {
28884		return ctxhttp.Do(c.ctx_, c.s.client, req)
28885	}
28886	return c.s.client.Do(req)
28887}
28888
28889// Do executes the "compute.instances.deleteAccessConfig" call.
28890// Exactly one of *Operation or error will be non-nil. Any non-2xx
28891// status code is an error. Response headers are in either
28892// *Operation.ServerResponse.Header or (if a response was returned at
28893// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
28894// to check whether the returned error was because
28895// http.StatusNotModified was returned.
28896func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
28897	gensupport.SetOptions(c.urlParams_, opts...)
28898	res, err := c.doRequest("json")
28899	if res != nil && res.StatusCode == http.StatusNotModified {
28900		if res.Body != nil {
28901			res.Body.Close()
28902		}
28903		return nil, &googleapi.Error{
28904			Code:   res.StatusCode,
28905			Header: res.Header,
28906		}
28907	}
28908	if err != nil {
28909		return nil, err
28910	}
28911	defer googleapi.CloseBody(res)
28912	if err := googleapi.CheckResponse(res); err != nil {
28913		return nil, err
28914	}
28915	ret := &Operation{
28916		ServerResponse: googleapi.ServerResponse{
28917			Header:         res.Header,
28918			HTTPStatusCode: res.StatusCode,
28919		},
28920	}
28921	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
28922		return nil, err
28923	}
28924	return ret, nil
28925	// {
28926	//   "description": "Deletes an access config from an instance's network interface.",
28927	//   "httpMethod": "POST",
28928	//   "id": "compute.instances.deleteAccessConfig",
28929	//   "parameterOrder": [
28930	//     "project",
28931	//     "zone",
28932	//     "instance",
28933	//     "accessConfig",
28934	//     "networkInterface"
28935	//   ],
28936	//   "parameters": {
28937	//     "accessConfig": {
28938	//       "description": "The name of the access config to delete.",
28939	//       "location": "query",
28940	//       "required": true,
28941	//       "type": "string"
28942	//     },
28943	//     "instance": {
28944	//       "description": "The instance name for this request.",
28945	//       "location": "path",
28946	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28947	//       "required": true,
28948	//       "type": "string"
28949	//     },
28950	//     "networkInterface": {
28951	//       "description": "The name of the network interface.",
28952	//       "location": "query",
28953	//       "required": true,
28954	//       "type": "string"
28955	//     },
28956	//     "project": {
28957	//       "description": "Project ID for this request.",
28958	//       "location": "path",
28959	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
28960	//       "required": true,
28961	//       "type": "string"
28962	//     },
28963	//     "zone": {
28964	//       "description": "The name of the zone for this request.",
28965	//       "location": "path",
28966	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
28967	//       "required": true,
28968	//       "type": "string"
28969	//     }
28970	//   },
28971	//   "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig",
28972	//   "response": {
28973	//     "$ref": "Operation"
28974	//   },
28975	//   "scopes": [
28976	//     "https://www.googleapis.com/auth/cloud-platform",
28977	//     "https://www.googleapis.com/auth/compute"
28978	//   ]
28979	// }
28980
28981}
28982
28983// method id "compute.instances.detachDisk":
28984
28985type InstancesDetachDiskCall struct {
28986	s          *Service
28987	project    string
28988	zone       string
28989	instance   string
28990	urlParams_ gensupport.URLParams
28991	ctx_       context.Context
28992}
28993
28994// DetachDisk: Detaches a disk from an instance.
28995// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/detachDisk
28996func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall {
28997	c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)}
28998	c.project = project
28999	c.zone = zone
29000	c.instance = instance
29001	c.urlParams_.Set("deviceName", deviceName)
29002	return c
29003}
29004
29005// Fields allows partial responses to be retrieved. See
29006// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29007// for more information.
29008func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall {
29009	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29010	return c
29011}
29012
29013// Context sets the context to be used in this call's Do method. Any
29014// pending HTTP request will be aborted if the provided context is
29015// canceled.
29016func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall {
29017	c.ctx_ = ctx
29018	return c
29019}
29020
29021func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) {
29022	var body io.Reader = nil
29023	c.urlParams_.Set("alt", alt)
29024	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/detachDisk")
29025	urls += "?" + c.urlParams_.Encode()
29026	req, _ := http.NewRequest("POST", urls, body)
29027	googleapi.Expand(req.URL, map[string]string{
29028		"project":  c.project,
29029		"zone":     c.zone,
29030		"instance": c.instance,
29031	})
29032	req.Header.Set("User-Agent", c.s.userAgent())
29033	if c.ctx_ != nil {
29034		return ctxhttp.Do(c.ctx_, c.s.client, req)
29035	}
29036	return c.s.client.Do(req)
29037}
29038
29039// Do executes the "compute.instances.detachDisk" call.
29040// Exactly one of *Operation or error will be non-nil. Any non-2xx
29041// status code is an error. Response headers are in either
29042// *Operation.ServerResponse.Header or (if a response was returned at
29043// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29044// to check whether the returned error was because
29045// http.StatusNotModified was returned.
29046func (c *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29047	gensupport.SetOptions(c.urlParams_, opts...)
29048	res, err := c.doRequest("json")
29049	if res != nil && res.StatusCode == http.StatusNotModified {
29050		if res.Body != nil {
29051			res.Body.Close()
29052		}
29053		return nil, &googleapi.Error{
29054			Code:   res.StatusCode,
29055			Header: res.Header,
29056		}
29057	}
29058	if err != nil {
29059		return nil, err
29060	}
29061	defer googleapi.CloseBody(res)
29062	if err := googleapi.CheckResponse(res); err != nil {
29063		return nil, err
29064	}
29065	ret := &Operation{
29066		ServerResponse: googleapi.ServerResponse{
29067			Header:         res.Header,
29068			HTTPStatusCode: res.StatusCode,
29069		},
29070	}
29071	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29072		return nil, err
29073	}
29074	return ret, nil
29075	// {
29076	//   "description": "Detaches a disk from an instance.",
29077	//   "httpMethod": "POST",
29078	//   "id": "compute.instances.detachDisk",
29079	//   "parameterOrder": [
29080	//     "project",
29081	//     "zone",
29082	//     "instance",
29083	//     "deviceName"
29084	//   ],
29085	//   "parameters": {
29086	//     "deviceName": {
29087	//       "description": "Disk device name to detach.",
29088	//       "location": "query",
29089	//       "pattern": "\\w[\\w.-]{0,254}",
29090	//       "required": true,
29091	//       "type": "string"
29092	//     },
29093	//     "instance": {
29094	//       "description": "Instance name.",
29095	//       "location": "path",
29096	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29097	//       "required": true,
29098	//       "type": "string"
29099	//     },
29100	//     "project": {
29101	//       "description": "Project ID for this request.",
29102	//       "location": "path",
29103	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29104	//       "required": true,
29105	//       "type": "string"
29106	//     },
29107	//     "zone": {
29108	//       "description": "The name of the zone for this request.",
29109	//       "location": "path",
29110	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29111	//       "required": true,
29112	//       "type": "string"
29113	//     }
29114	//   },
29115	//   "path": "{project}/zones/{zone}/instances/{instance}/detachDisk",
29116	//   "response": {
29117	//     "$ref": "Operation"
29118	//   },
29119	//   "scopes": [
29120	//     "https://www.googleapis.com/auth/cloud-platform",
29121	//     "https://www.googleapis.com/auth/compute"
29122	//   ]
29123	// }
29124
29125}
29126
29127// method id "compute.instances.get":
29128
29129type InstancesGetCall struct {
29130	s            *Service
29131	project      string
29132	zone         string
29133	instance     string
29134	urlParams_   gensupport.URLParams
29135	ifNoneMatch_ string
29136	ctx_         context.Context
29137}
29138
29139// Get: Returns the specified Instance resource. Get a list of available
29140// instances by making a list() request.
29141// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/get
29142func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall {
29143	c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29144	c.project = project
29145	c.zone = zone
29146	c.instance = instance
29147	return c
29148}
29149
29150// Fields allows partial responses to be retrieved. See
29151// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29152// for more information.
29153func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall {
29154	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29155	return c
29156}
29157
29158// IfNoneMatch sets the optional parameter which makes the operation
29159// fail if the object's ETag matches the given value. This is useful for
29160// getting updates only after the object has changed since the last
29161// request. Use googleapi.IsNotModified to check whether the response
29162// error from Do is the result of In-None-Match.
29163func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall {
29164	c.ifNoneMatch_ = entityTag
29165	return c
29166}
29167
29168// Context sets the context to be used in this call's Do method. Any
29169// pending HTTP request will be aborted if the provided context is
29170// canceled.
29171func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
29172	c.ctx_ = ctx
29173	return c
29174}
29175
29176func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
29177	var body io.Reader = nil
29178	c.urlParams_.Set("alt", alt)
29179	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}")
29180	urls += "?" + c.urlParams_.Encode()
29181	req, _ := http.NewRequest("GET", urls, body)
29182	googleapi.Expand(req.URL, map[string]string{
29183		"project":  c.project,
29184		"zone":     c.zone,
29185		"instance": c.instance,
29186	})
29187	req.Header.Set("User-Agent", c.s.userAgent())
29188	if c.ifNoneMatch_ != "" {
29189		req.Header.Set("If-None-Match", c.ifNoneMatch_)
29190	}
29191	if c.ctx_ != nil {
29192		return ctxhttp.Do(c.ctx_, c.s.client, req)
29193	}
29194	return c.s.client.Do(req)
29195}
29196
29197// Do executes the "compute.instances.get" call.
29198// Exactly one of *Instance or error will be non-nil. Any non-2xx status
29199// code is an error. Response headers are in either
29200// *Instance.ServerResponse.Header or (if a response was returned at
29201// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29202// to check whether the returned error was because
29203// http.StatusNotModified was returned.
29204func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
29205	gensupport.SetOptions(c.urlParams_, opts...)
29206	res, err := c.doRequest("json")
29207	if res != nil && res.StatusCode == http.StatusNotModified {
29208		if res.Body != nil {
29209			res.Body.Close()
29210		}
29211		return nil, &googleapi.Error{
29212			Code:   res.StatusCode,
29213			Header: res.Header,
29214		}
29215	}
29216	if err != nil {
29217		return nil, err
29218	}
29219	defer googleapi.CloseBody(res)
29220	if err := googleapi.CheckResponse(res); err != nil {
29221		return nil, err
29222	}
29223	ret := &Instance{
29224		ServerResponse: googleapi.ServerResponse{
29225			Header:         res.Header,
29226			HTTPStatusCode: res.StatusCode,
29227		},
29228	}
29229	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29230		return nil, err
29231	}
29232	return ret, nil
29233	// {
29234	//   "description": "Returns the specified Instance resource. Get a list of available instances by making a list() request.",
29235	//   "httpMethod": "GET",
29236	//   "id": "compute.instances.get",
29237	//   "parameterOrder": [
29238	//     "project",
29239	//     "zone",
29240	//     "instance"
29241	//   ],
29242	//   "parameters": {
29243	//     "instance": {
29244	//       "description": "Name of the instance resource to return.",
29245	//       "location": "path",
29246	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29247	//       "required": true,
29248	//       "type": "string"
29249	//     },
29250	//     "project": {
29251	//       "description": "Project ID for this request.",
29252	//       "location": "path",
29253	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29254	//       "required": true,
29255	//       "type": "string"
29256	//     },
29257	//     "zone": {
29258	//       "description": "The name of the zone for this request.",
29259	//       "location": "path",
29260	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29261	//       "required": true,
29262	//       "type": "string"
29263	//     }
29264	//   },
29265	//   "path": "{project}/zones/{zone}/instances/{instance}",
29266	//   "response": {
29267	//     "$ref": "Instance"
29268	//   },
29269	//   "scopes": [
29270	//     "https://www.googleapis.com/auth/cloud-platform",
29271	//     "https://www.googleapis.com/auth/compute",
29272	//     "https://www.googleapis.com/auth/compute.readonly"
29273	//   ]
29274	// }
29275
29276}
29277
29278// method id "compute.instances.getSerialPortOutput":
29279
29280type InstancesGetSerialPortOutputCall struct {
29281	s            *Service
29282	project      string
29283	zone         string
29284	instance     string
29285	urlParams_   gensupport.URLParams
29286	ifNoneMatch_ string
29287	ctx_         context.Context
29288}
29289
29290// GetSerialPortOutput: Returns the specified instance's serial port
29291// output.
29292// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput
29293func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall {
29294	c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29295	c.project = project
29296	c.zone = zone
29297	c.instance = instance
29298	return c
29299}
29300
29301// Port sets the optional parameter "port": Specifies which COM or
29302// serial port to retrieve data from.
29303func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall {
29304	c.urlParams_.Set("port", fmt.Sprint(port))
29305	return c
29306}
29307
29308// Start sets the optional parameter "start": For the initial request,
29309// leave this field unspecified. For subsequent calls, this field should
29310// be set to the next value that was returned in the previous call.
29311func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall {
29312	c.urlParams_.Set("start", fmt.Sprint(start))
29313	return c
29314}
29315
29316// Fields allows partial responses to be retrieved. See
29317// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29318// for more information.
29319func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall {
29320	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29321	return c
29322}
29323
29324// IfNoneMatch sets the optional parameter which makes the operation
29325// fail if the object's ETag matches the given value. This is useful for
29326// getting updates only after the object has changed since the last
29327// request. Use googleapi.IsNotModified to check whether the response
29328// error from Do is the result of In-None-Match.
29329func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall {
29330	c.ifNoneMatch_ = entityTag
29331	return c
29332}
29333
29334// Context sets the context to be used in this call's Do method. Any
29335// pending HTTP request will be aborted if the provided context is
29336// canceled.
29337func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall {
29338	c.ctx_ = ctx
29339	return c
29340}
29341
29342func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) {
29343	var body io.Reader = nil
29344	c.urlParams_.Set("alt", alt)
29345	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/serialPort")
29346	urls += "?" + c.urlParams_.Encode()
29347	req, _ := http.NewRequest("GET", urls, body)
29348	googleapi.Expand(req.URL, map[string]string{
29349		"project":  c.project,
29350		"zone":     c.zone,
29351		"instance": c.instance,
29352	})
29353	req.Header.Set("User-Agent", c.s.userAgent())
29354	if c.ifNoneMatch_ != "" {
29355		req.Header.Set("If-None-Match", c.ifNoneMatch_)
29356	}
29357	if c.ctx_ != nil {
29358		return ctxhttp.Do(c.ctx_, c.s.client, req)
29359	}
29360	return c.s.client.Do(req)
29361}
29362
29363// Do executes the "compute.instances.getSerialPortOutput" call.
29364// Exactly one of *SerialPortOutput or error will be non-nil. Any
29365// non-2xx status code is an error. Response headers are in either
29366// *SerialPortOutput.ServerResponse.Header or (if a response was
29367// returned at all) in error.(*googleapi.Error).Header. Use
29368// googleapi.IsNotModified to check whether the returned error was
29369// because http.StatusNotModified was returned.
29370func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) {
29371	gensupport.SetOptions(c.urlParams_, opts...)
29372	res, err := c.doRequest("json")
29373	if res != nil && res.StatusCode == http.StatusNotModified {
29374		if res.Body != nil {
29375			res.Body.Close()
29376		}
29377		return nil, &googleapi.Error{
29378			Code:   res.StatusCode,
29379			Header: res.Header,
29380		}
29381	}
29382	if err != nil {
29383		return nil, err
29384	}
29385	defer googleapi.CloseBody(res)
29386	if err := googleapi.CheckResponse(res); err != nil {
29387		return nil, err
29388	}
29389	ret := &SerialPortOutput{
29390		ServerResponse: googleapi.ServerResponse{
29391			Header:         res.Header,
29392			HTTPStatusCode: res.StatusCode,
29393		},
29394	}
29395	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29396		return nil, err
29397	}
29398	return ret, nil
29399	// {
29400	//   "description": "Returns the specified instance's serial port output.",
29401	//   "httpMethod": "GET",
29402	//   "id": "compute.instances.getSerialPortOutput",
29403	//   "parameterOrder": [
29404	//     "project",
29405	//     "zone",
29406	//     "instance"
29407	//   ],
29408	//   "parameters": {
29409	//     "instance": {
29410	//       "description": "Name of the instance scoping this request.",
29411	//       "location": "path",
29412	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29413	//       "required": true,
29414	//       "type": "string"
29415	//     },
29416	//     "port": {
29417	//       "default": "1",
29418	//       "description": "Specifies which COM or serial port to retrieve data from.",
29419	//       "format": "int32",
29420	//       "location": "query",
29421	//       "maximum": "4",
29422	//       "minimum": "1",
29423	//       "type": "integer"
29424	//     },
29425	//     "project": {
29426	//       "description": "Project ID for this request.",
29427	//       "location": "path",
29428	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29429	//       "required": true,
29430	//       "type": "string"
29431	//     },
29432	//     "start": {
29433	//       "description": "For the initial request, leave this field unspecified. For subsequent calls, this field should be set to the next value that was returned in the previous call.",
29434	//       "format": "int64",
29435	//       "location": "query",
29436	//       "type": "string"
29437	//     },
29438	//     "zone": {
29439	//       "description": "The name of the zone for this request.",
29440	//       "location": "path",
29441	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29442	//       "required": true,
29443	//       "type": "string"
29444	//     }
29445	//   },
29446	//   "path": "{project}/zones/{zone}/instances/{instance}/serialPort",
29447	//   "response": {
29448	//     "$ref": "SerialPortOutput"
29449	//   },
29450	//   "scopes": [
29451	//     "https://www.googleapis.com/auth/cloud-platform",
29452	//     "https://www.googleapis.com/auth/compute",
29453	//     "https://www.googleapis.com/auth/compute.readonly"
29454	//   ]
29455	// }
29456
29457}
29458
29459// method id "compute.instances.insert":
29460
29461type InstancesInsertCall struct {
29462	s          *Service
29463	project    string
29464	zone       string
29465	instance   *Instance
29466	urlParams_ gensupport.URLParams
29467	ctx_       context.Context
29468}
29469
29470// Insert: Creates an instance resource in the specified project using
29471// the data included in the request.
29472// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/insert
29473func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall {
29474	c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29475	c.project = project
29476	c.zone = zone
29477	c.instance = instance
29478	return c
29479}
29480
29481// Fields allows partial responses to be retrieved. See
29482// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29483// for more information.
29484func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall {
29485	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29486	return c
29487}
29488
29489// Context sets the context to be used in this call's Do method. Any
29490// pending HTTP request will be aborted if the provided context is
29491// canceled.
29492func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
29493	c.ctx_ = ctx
29494	return c
29495}
29496
29497func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
29498	var body io.Reader = nil
29499	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
29500	if err != nil {
29501		return nil, err
29502	}
29503	ctype := "application/json"
29504	c.urlParams_.Set("alt", alt)
29505	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances")
29506	urls += "?" + c.urlParams_.Encode()
29507	req, _ := http.NewRequest("POST", urls, body)
29508	googleapi.Expand(req.URL, map[string]string{
29509		"project": c.project,
29510		"zone":    c.zone,
29511	})
29512	req.Header.Set("Content-Type", ctype)
29513	req.Header.Set("User-Agent", c.s.userAgent())
29514	if c.ctx_ != nil {
29515		return ctxhttp.Do(c.ctx_, c.s.client, req)
29516	}
29517	return c.s.client.Do(req)
29518}
29519
29520// Do executes the "compute.instances.insert" call.
29521// Exactly one of *Operation or error will be non-nil. Any non-2xx
29522// status code is an error. Response headers are in either
29523// *Operation.ServerResponse.Header or (if a response was returned at
29524// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29525// to check whether the returned error was because
29526// http.StatusNotModified was returned.
29527func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29528	gensupport.SetOptions(c.urlParams_, opts...)
29529	res, err := c.doRequest("json")
29530	if res != nil && res.StatusCode == http.StatusNotModified {
29531		if res.Body != nil {
29532			res.Body.Close()
29533		}
29534		return nil, &googleapi.Error{
29535			Code:   res.StatusCode,
29536			Header: res.Header,
29537		}
29538	}
29539	if err != nil {
29540		return nil, err
29541	}
29542	defer googleapi.CloseBody(res)
29543	if err := googleapi.CheckResponse(res); err != nil {
29544		return nil, err
29545	}
29546	ret := &Operation{
29547		ServerResponse: googleapi.ServerResponse{
29548			Header:         res.Header,
29549			HTTPStatusCode: res.StatusCode,
29550		},
29551	}
29552	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29553		return nil, err
29554	}
29555	return ret, nil
29556	// {
29557	//   "description": "Creates an instance resource in the specified project using the data included in the request.",
29558	//   "httpMethod": "POST",
29559	//   "id": "compute.instances.insert",
29560	//   "parameterOrder": [
29561	//     "project",
29562	//     "zone"
29563	//   ],
29564	//   "parameters": {
29565	//     "project": {
29566	//       "description": "Project ID for this request.",
29567	//       "location": "path",
29568	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29569	//       "required": true,
29570	//       "type": "string"
29571	//     },
29572	//     "zone": {
29573	//       "description": "The name of the zone for this request.",
29574	//       "location": "path",
29575	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29576	//       "required": true,
29577	//       "type": "string"
29578	//     }
29579	//   },
29580	//   "path": "{project}/zones/{zone}/instances",
29581	//   "request": {
29582	//     "$ref": "Instance"
29583	//   },
29584	//   "response": {
29585	//     "$ref": "Operation"
29586	//   },
29587	//   "scopes": [
29588	//     "https://www.googleapis.com/auth/cloud-platform",
29589	//     "https://www.googleapis.com/auth/compute"
29590	//   ]
29591	// }
29592
29593}
29594
29595// method id "compute.instances.list":
29596
29597type InstancesListCall struct {
29598	s            *Service
29599	project      string
29600	zone         string
29601	urlParams_   gensupport.URLParams
29602	ifNoneMatch_ string
29603	ctx_         context.Context
29604}
29605
29606// List: Retrieves the list of instances contained within the specified
29607// zone.
29608// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/list
29609func (r *InstancesService) List(project string, zone string) *InstancesListCall {
29610	c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29611	c.project = project
29612	c.zone = zone
29613	return c
29614}
29615
29616// Filter sets the optional parameter "filter": Sets a filter expression
29617// for filtering listed resources, in the form filter={expression}. Your
29618// {expression} must be in the format: field_name comparison_string
29619// literal_string.
29620//
29621// The field_name is the name of the field you want to compare. Only
29622// atomic field types are supported (string, number, boolean). The
29623// comparison_string must be either eq (equals) or ne (not equals). The
29624// literal_string is the string value to filter to. The literal value
29625// must be valid for the type of field you are filtering by (string,
29626// number, boolean). For string fields, the literal value is interpreted
29627// as a regular expression using RE2 syntax. The literal value must
29628// match the entire field.
29629//
29630// For example, to filter for instances that do not have a name of
29631// example-instance, you would use filter=name ne
29632// example-instance.
29633//
29634// Compute Engine Beta API Only: If you use filtering in the Beta API,
29635// you can also filter on nested fields. For example, you could filter
29636// on instances that have set the scheduling.automaticRestart field to
29637// true. In particular, use filtering on nested fields to take advantage
29638// of instance labels to organize and filter results based on label
29639// values.
29640//
29641// The Beta API also supports filtering on multiple expressions by
29642// providing each separate expression within parentheses. For example,
29643// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
29644// Multiple expressions are treated as AND expressions, meaning that
29645// resources must match all expressions to pass the filters.
29646func (c *InstancesListCall) Filter(filter string) *InstancesListCall {
29647	c.urlParams_.Set("filter", filter)
29648	return c
29649}
29650
29651// MaxResults sets the optional parameter "maxResults": The maximum
29652// number of results per page that should be returned. If the number of
29653// available results is larger than maxResults, Compute Engine returns a
29654// nextPageToken that can be used to get the next page of results in
29655// subsequent list requests.
29656func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall {
29657	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
29658	return c
29659}
29660
29661// OrderBy sets the optional parameter "orderBy": Sorts list results by
29662// a certain order. By default, results are returned in alphanumerical
29663// order based on the resource name.
29664//
29665// You can also sort results in descending order based on the creation
29666// timestamp using orderBy="creationTimestamp desc". This sorts results
29667// based on the creationTimestamp field in reverse chronological order
29668// (newest result first). Use this to sort resources like operations so
29669// that the newest operation is returned first.
29670//
29671// Currently, only sorting by name or creationTimestamp desc is
29672// supported.
29673func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall {
29674	c.urlParams_.Set("orderBy", orderBy)
29675	return c
29676}
29677
29678// PageToken sets the optional parameter "pageToken": Specifies a page
29679// token to use. Set pageToken to the nextPageToken returned by a
29680// previous list request to get the next page of results.
29681func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall {
29682	c.urlParams_.Set("pageToken", pageToken)
29683	return c
29684}
29685
29686// Fields allows partial responses to be retrieved. See
29687// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29688// for more information.
29689func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall {
29690	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29691	return c
29692}
29693
29694// IfNoneMatch sets the optional parameter which makes the operation
29695// fail if the object's ETag matches the given value. This is useful for
29696// getting updates only after the object has changed since the last
29697// request. Use googleapi.IsNotModified to check whether the response
29698// error from Do is the result of In-None-Match.
29699func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall {
29700	c.ifNoneMatch_ = entityTag
29701	return c
29702}
29703
29704// Context sets the context to be used in this call's Do method. Any
29705// pending HTTP request will be aborted if the provided context is
29706// canceled.
29707func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
29708	c.ctx_ = ctx
29709	return c
29710}
29711
29712func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
29713	var body io.Reader = nil
29714	c.urlParams_.Set("alt", alt)
29715	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances")
29716	urls += "?" + c.urlParams_.Encode()
29717	req, _ := http.NewRequest("GET", urls, body)
29718	googleapi.Expand(req.URL, map[string]string{
29719		"project": c.project,
29720		"zone":    c.zone,
29721	})
29722	req.Header.Set("User-Agent", c.s.userAgent())
29723	if c.ifNoneMatch_ != "" {
29724		req.Header.Set("If-None-Match", c.ifNoneMatch_)
29725	}
29726	if c.ctx_ != nil {
29727		return ctxhttp.Do(c.ctx_, c.s.client, req)
29728	}
29729	return c.s.client.Do(req)
29730}
29731
29732// Do executes the "compute.instances.list" call.
29733// Exactly one of *InstanceList or error will be non-nil. Any non-2xx
29734// status code is an error. Response headers are in either
29735// *InstanceList.ServerResponse.Header or (if a response was returned at
29736// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29737// to check whether the returned error was because
29738// http.StatusNotModified was returned.
29739func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, error) {
29740	gensupport.SetOptions(c.urlParams_, opts...)
29741	res, err := c.doRequest("json")
29742	if res != nil && res.StatusCode == http.StatusNotModified {
29743		if res.Body != nil {
29744			res.Body.Close()
29745		}
29746		return nil, &googleapi.Error{
29747			Code:   res.StatusCode,
29748			Header: res.Header,
29749		}
29750	}
29751	if err != nil {
29752		return nil, err
29753	}
29754	defer googleapi.CloseBody(res)
29755	if err := googleapi.CheckResponse(res); err != nil {
29756		return nil, err
29757	}
29758	ret := &InstanceList{
29759		ServerResponse: googleapi.ServerResponse{
29760			Header:         res.Header,
29761			HTTPStatusCode: res.StatusCode,
29762		},
29763	}
29764	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29765		return nil, err
29766	}
29767	return ret, nil
29768	// {
29769	//   "description": "Retrieves the list of instances contained within the specified zone.",
29770	//   "httpMethod": "GET",
29771	//   "id": "compute.instances.list",
29772	//   "parameterOrder": [
29773	//     "project",
29774	//     "zone"
29775	//   ],
29776	//   "parameters": {
29777	//     "filter": {
29778	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
29779	//       "location": "query",
29780	//       "type": "string"
29781	//     },
29782	//     "maxResults": {
29783	//       "default": "500",
29784	//       "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.",
29785	//       "format": "uint32",
29786	//       "location": "query",
29787	//       "maximum": "500",
29788	//       "minimum": "0",
29789	//       "type": "integer"
29790	//     },
29791	//     "orderBy": {
29792	//       "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.",
29793	//       "location": "query",
29794	//       "type": "string"
29795	//     },
29796	//     "pageToken": {
29797	//       "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.",
29798	//       "location": "query",
29799	//       "type": "string"
29800	//     },
29801	//     "project": {
29802	//       "description": "Project ID for this request.",
29803	//       "location": "path",
29804	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29805	//       "required": true,
29806	//       "type": "string"
29807	//     },
29808	//     "zone": {
29809	//       "description": "The name of the zone for this request.",
29810	//       "location": "path",
29811	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29812	//       "required": true,
29813	//       "type": "string"
29814	//     }
29815	//   },
29816	//   "path": "{project}/zones/{zone}/instances",
29817	//   "response": {
29818	//     "$ref": "InstanceList"
29819	//   },
29820	//   "scopes": [
29821	//     "https://www.googleapis.com/auth/cloud-platform",
29822	//     "https://www.googleapis.com/auth/compute",
29823	//     "https://www.googleapis.com/auth/compute.readonly"
29824	//   ]
29825	// }
29826
29827}
29828
29829// Pages invokes f for each page of results.
29830// A non-nil error returned from f will halt the iteration.
29831// The provided context supersedes any context provided to the Context method.
29832func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error {
29833	c.ctx_ = ctx
29834	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
29835	for {
29836		x, err := c.Do()
29837		if err != nil {
29838			return err
29839		}
29840		if err := f(x); err != nil {
29841			return err
29842		}
29843		if x.NextPageToken == "" {
29844			return nil
29845		}
29846		c.PageToken(x.NextPageToken)
29847	}
29848}
29849
29850// method id "compute.instances.reset":
29851
29852type InstancesResetCall struct {
29853	s          *Service
29854	project    string
29855	zone       string
29856	instance   string
29857	urlParams_ gensupport.URLParams
29858	ctx_       context.Context
29859}
29860
29861// Reset: Performs a hard reset on the instance.
29862// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/reset
29863func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall {
29864	c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
29865	c.project = project
29866	c.zone = zone
29867	c.instance = instance
29868	return c
29869}
29870
29871// Fields allows partial responses to be retrieved. See
29872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
29873// for more information.
29874func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall {
29875	c.urlParams_.Set("fields", googleapi.CombineFields(s))
29876	return c
29877}
29878
29879// Context sets the context to be used in this call's Do method. Any
29880// pending HTTP request will be aborted if the provided context is
29881// canceled.
29882func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall {
29883	c.ctx_ = ctx
29884	return c
29885}
29886
29887func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) {
29888	var body io.Reader = nil
29889	c.urlParams_.Set("alt", alt)
29890	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/reset")
29891	urls += "?" + c.urlParams_.Encode()
29892	req, _ := http.NewRequest("POST", urls, body)
29893	googleapi.Expand(req.URL, map[string]string{
29894		"project":  c.project,
29895		"zone":     c.zone,
29896		"instance": c.instance,
29897	})
29898	req.Header.Set("User-Agent", c.s.userAgent())
29899	if c.ctx_ != nil {
29900		return ctxhttp.Do(c.ctx_, c.s.client, req)
29901	}
29902	return c.s.client.Do(req)
29903}
29904
29905// Do executes the "compute.instances.reset" call.
29906// Exactly one of *Operation or error will be non-nil. Any non-2xx
29907// status code is an error. Response headers are in either
29908// *Operation.ServerResponse.Header or (if a response was returned at
29909// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
29910// to check whether the returned error was because
29911// http.StatusNotModified was returned.
29912func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
29913	gensupport.SetOptions(c.urlParams_, opts...)
29914	res, err := c.doRequest("json")
29915	if res != nil && res.StatusCode == http.StatusNotModified {
29916		if res.Body != nil {
29917			res.Body.Close()
29918		}
29919		return nil, &googleapi.Error{
29920			Code:   res.StatusCode,
29921			Header: res.Header,
29922		}
29923	}
29924	if err != nil {
29925		return nil, err
29926	}
29927	defer googleapi.CloseBody(res)
29928	if err := googleapi.CheckResponse(res); err != nil {
29929		return nil, err
29930	}
29931	ret := &Operation{
29932		ServerResponse: googleapi.ServerResponse{
29933			Header:         res.Header,
29934			HTTPStatusCode: res.StatusCode,
29935		},
29936	}
29937	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
29938		return nil, err
29939	}
29940	return ret, nil
29941	// {
29942	//   "description": "Performs a hard reset on the instance.",
29943	//   "httpMethod": "POST",
29944	//   "id": "compute.instances.reset",
29945	//   "parameterOrder": [
29946	//     "project",
29947	//     "zone",
29948	//     "instance"
29949	//   ],
29950	//   "parameters": {
29951	//     "instance": {
29952	//       "description": "Name of the instance scoping this request.",
29953	//       "location": "path",
29954	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29955	//       "required": true,
29956	//       "type": "string"
29957	//     },
29958	//     "project": {
29959	//       "description": "Project ID for this request.",
29960	//       "location": "path",
29961	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
29962	//       "required": true,
29963	//       "type": "string"
29964	//     },
29965	//     "zone": {
29966	//       "description": "The name of the zone for this request.",
29967	//       "location": "path",
29968	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
29969	//       "required": true,
29970	//       "type": "string"
29971	//     }
29972	//   },
29973	//   "path": "{project}/zones/{zone}/instances/{instance}/reset",
29974	//   "response": {
29975	//     "$ref": "Operation"
29976	//   },
29977	//   "scopes": [
29978	//     "https://www.googleapis.com/auth/cloud-platform",
29979	//     "https://www.googleapis.com/auth/compute"
29980	//   ]
29981	// }
29982
29983}
29984
29985// method id "compute.instances.setDiskAutoDelete":
29986
29987type InstancesSetDiskAutoDeleteCall struct {
29988	s          *Service
29989	project    string
29990	zone       string
29991	instance   string
29992	urlParams_ gensupport.URLParams
29993	ctx_       context.Context
29994}
29995
29996// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to
29997// an instance.
29998// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setDiskAutoDelete
29999func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall {
30000	c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30001	c.project = project
30002	c.zone = zone
30003	c.instance = instance
30004	c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete))
30005	c.urlParams_.Set("deviceName", deviceName)
30006	return c
30007}
30008
30009// Fields allows partial responses to be retrieved. See
30010// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30011// for more information.
30012func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall {
30013	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30014	return c
30015}
30016
30017// Context sets the context to be used in this call's Do method. Any
30018// pending HTTP request will be aborted if the provided context is
30019// canceled.
30020func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall {
30021	c.ctx_ = ctx
30022	return c
30023}
30024
30025func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) {
30026	var body io.Reader = nil
30027	c.urlParams_.Set("alt", alt)
30028	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete")
30029	urls += "?" + c.urlParams_.Encode()
30030	req, _ := http.NewRequest("POST", urls, body)
30031	googleapi.Expand(req.URL, map[string]string{
30032		"project":  c.project,
30033		"zone":     c.zone,
30034		"instance": c.instance,
30035	})
30036	req.Header.Set("User-Agent", c.s.userAgent())
30037	if c.ctx_ != nil {
30038		return ctxhttp.Do(c.ctx_, c.s.client, req)
30039	}
30040	return c.s.client.Do(req)
30041}
30042
30043// Do executes the "compute.instances.setDiskAutoDelete" call.
30044// Exactly one of *Operation or error will be non-nil. Any non-2xx
30045// status code is an error. Response headers are in either
30046// *Operation.ServerResponse.Header or (if a response was returned at
30047// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30048// to check whether the returned error was because
30049// http.StatusNotModified was returned.
30050func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30051	gensupport.SetOptions(c.urlParams_, opts...)
30052	res, err := c.doRequest("json")
30053	if res != nil && res.StatusCode == http.StatusNotModified {
30054		if res.Body != nil {
30055			res.Body.Close()
30056		}
30057		return nil, &googleapi.Error{
30058			Code:   res.StatusCode,
30059			Header: res.Header,
30060		}
30061	}
30062	if err != nil {
30063		return nil, err
30064	}
30065	defer googleapi.CloseBody(res)
30066	if err := googleapi.CheckResponse(res); err != nil {
30067		return nil, err
30068	}
30069	ret := &Operation{
30070		ServerResponse: googleapi.ServerResponse{
30071			Header:         res.Header,
30072			HTTPStatusCode: res.StatusCode,
30073		},
30074	}
30075	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30076		return nil, err
30077	}
30078	return ret, nil
30079	// {
30080	//   "description": "Sets the auto-delete flag for a disk attached to an instance.",
30081	//   "httpMethod": "POST",
30082	//   "id": "compute.instances.setDiskAutoDelete",
30083	//   "parameterOrder": [
30084	//     "project",
30085	//     "zone",
30086	//     "instance",
30087	//     "autoDelete",
30088	//     "deviceName"
30089	//   ],
30090	//   "parameters": {
30091	//     "autoDelete": {
30092	//       "description": "Whether to auto-delete the disk when the instance is deleted.",
30093	//       "location": "query",
30094	//       "required": true,
30095	//       "type": "boolean"
30096	//     },
30097	//     "deviceName": {
30098	//       "description": "The device name of the disk to modify.",
30099	//       "location": "query",
30100	//       "pattern": "\\w[\\w.-]{0,254}",
30101	//       "required": true,
30102	//       "type": "string"
30103	//     },
30104	//     "instance": {
30105	//       "description": "The instance name.",
30106	//       "location": "path",
30107	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30108	//       "required": true,
30109	//       "type": "string"
30110	//     },
30111	//     "project": {
30112	//       "description": "Project ID for this request.",
30113	//       "location": "path",
30114	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30115	//       "required": true,
30116	//       "type": "string"
30117	//     },
30118	//     "zone": {
30119	//       "description": "The name of the zone for this request.",
30120	//       "location": "path",
30121	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30122	//       "required": true,
30123	//       "type": "string"
30124	//     }
30125	//   },
30126	//   "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete",
30127	//   "response": {
30128	//     "$ref": "Operation"
30129	//   },
30130	//   "scopes": [
30131	//     "https://www.googleapis.com/auth/cloud-platform",
30132	//     "https://www.googleapis.com/auth/compute"
30133	//   ]
30134	// }
30135
30136}
30137
30138// method id "compute.instances.setLabels":
30139
30140type InstancesSetLabelsCall struct {
30141	s                         *Service
30142	project                   string
30143	zone                      string
30144	instance                  string
30145	instancessetlabelsrequest *InstancesSetLabelsRequest
30146	urlParams_                gensupport.URLParams
30147	ctx_                      context.Context
30148}
30149
30150// SetLabels: Sets labels for the specified instance to the data
30151// included in the request.
30152func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall {
30153	c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30154	c.project = project
30155	c.zone = zone
30156	c.instance = instance
30157	c.instancessetlabelsrequest = instancessetlabelsrequest
30158	return c
30159}
30160
30161// Fields allows partial responses to be retrieved. See
30162// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30163// for more information.
30164func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall {
30165	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30166	return c
30167}
30168
30169// Context sets the context to be used in this call's Do method. Any
30170// pending HTTP request will be aborted if the provided context is
30171// canceled.
30172func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall {
30173	c.ctx_ = ctx
30174	return c
30175}
30176
30177func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) {
30178	var body io.Reader = nil
30179	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetlabelsrequest)
30180	if err != nil {
30181		return nil, err
30182	}
30183	ctype := "application/json"
30184	c.urlParams_.Set("alt", alt)
30185	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setLabels")
30186	urls += "?" + c.urlParams_.Encode()
30187	req, _ := http.NewRequest("POST", urls, body)
30188	googleapi.Expand(req.URL, map[string]string{
30189		"project":  c.project,
30190		"zone":     c.zone,
30191		"instance": c.instance,
30192	})
30193	req.Header.Set("Content-Type", ctype)
30194	req.Header.Set("User-Agent", c.s.userAgent())
30195	if c.ctx_ != nil {
30196		return ctxhttp.Do(c.ctx_, c.s.client, req)
30197	}
30198	return c.s.client.Do(req)
30199}
30200
30201// Do executes the "compute.instances.setLabels" call.
30202// Exactly one of *Operation or error will be non-nil. Any non-2xx
30203// status code is an error. Response headers are in either
30204// *Operation.ServerResponse.Header or (if a response was returned at
30205// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30206// to check whether the returned error was because
30207// http.StatusNotModified was returned.
30208func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30209	gensupport.SetOptions(c.urlParams_, opts...)
30210	res, err := c.doRequest("json")
30211	if res != nil && res.StatusCode == http.StatusNotModified {
30212		if res.Body != nil {
30213			res.Body.Close()
30214		}
30215		return nil, &googleapi.Error{
30216			Code:   res.StatusCode,
30217			Header: res.Header,
30218		}
30219	}
30220	if err != nil {
30221		return nil, err
30222	}
30223	defer googleapi.CloseBody(res)
30224	if err := googleapi.CheckResponse(res); err != nil {
30225		return nil, err
30226	}
30227	ret := &Operation{
30228		ServerResponse: googleapi.ServerResponse{
30229			Header:         res.Header,
30230			HTTPStatusCode: res.StatusCode,
30231		},
30232	}
30233	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30234		return nil, err
30235	}
30236	return ret, nil
30237	// {
30238	//   "description": "Sets labels for the specified instance to the data included in the request.",
30239	//   "httpMethod": "POST",
30240	//   "id": "compute.instances.setLabels",
30241	//   "parameterOrder": [
30242	//     "project",
30243	//     "zone",
30244	//     "instance"
30245	//   ],
30246	//   "parameters": {
30247	//     "instance": {
30248	//       "description": "Name of the instance scoping this request.",
30249	//       "location": "path",
30250	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30251	//       "required": true,
30252	//       "type": "string"
30253	//     },
30254	//     "project": {
30255	//       "description": "Project ID for this request.",
30256	//       "location": "path",
30257	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30258	//       "required": true,
30259	//       "type": "string"
30260	//     },
30261	//     "zone": {
30262	//       "description": "The name of the zone for this request.",
30263	//       "location": "path",
30264	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30265	//       "required": true,
30266	//       "type": "string"
30267	//     }
30268	//   },
30269	//   "path": "{project}/zones/{zone}/instances/{instance}/setLabels",
30270	//   "request": {
30271	//     "$ref": "InstancesSetLabelsRequest"
30272	//   },
30273	//   "response": {
30274	//     "$ref": "Operation"
30275	//   },
30276	//   "scopes": [
30277	//     "https://www.googleapis.com/auth/cloud-platform",
30278	//     "https://www.googleapis.com/auth/compute"
30279	//   ]
30280	// }
30281
30282}
30283
30284// method id "compute.instances.setMachineType":
30285
30286type InstancesSetMachineTypeCall struct {
30287	s                              *Service
30288	project                        string
30289	zone                           string
30290	instance                       string
30291	instancessetmachinetyperequest *InstancesSetMachineTypeRequest
30292	urlParams_                     gensupport.URLParams
30293	ctx_                           context.Context
30294}
30295
30296// SetMachineType: Changes the machine type for a stopped instance to
30297// the machine type specified in the request.
30298func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall {
30299	c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30300	c.project = project
30301	c.zone = zone
30302	c.instance = instance
30303	c.instancessetmachinetyperequest = instancessetmachinetyperequest
30304	return c
30305}
30306
30307// Fields allows partial responses to be retrieved. See
30308// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30309// for more information.
30310func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall {
30311	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30312	return c
30313}
30314
30315// Context sets the context to be used in this call's Do method. Any
30316// pending HTTP request will be aborted if the provided context is
30317// canceled.
30318func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall {
30319	c.ctx_ = ctx
30320	return c
30321}
30322
30323func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) {
30324	var body io.Reader = nil
30325	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest)
30326	if err != nil {
30327		return nil, err
30328	}
30329	ctype := "application/json"
30330	c.urlParams_.Set("alt", alt)
30331	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineType")
30332	urls += "?" + c.urlParams_.Encode()
30333	req, _ := http.NewRequest("POST", urls, body)
30334	googleapi.Expand(req.URL, map[string]string{
30335		"project":  c.project,
30336		"zone":     c.zone,
30337		"instance": c.instance,
30338	})
30339	req.Header.Set("Content-Type", ctype)
30340	req.Header.Set("User-Agent", c.s.userAgent())
30341	if c.ctx_ != nil {
30342		return ctxhttp.Do(c.ctx_, c.s.client, req)
30343	}
30344	return c.s.client.Do(req)
30345}
30346
30347// Do executes the "compute.instances.setMachineType" call.
30348// Exactly one of *Operation or error will be non-nil. Any non-2xx
30349// status code is an error. Response headers are in either
30350// *Operation.ServerResponse.Header or (if a response was returned at
30351// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30352// to check whether the returned error was because
30353// http.StatusNotModified was returned.
30354func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30355	gensupport.SetOptions(c.urlParams_, opts...)
30356	res, err := c.doRequest("json")
30357	if res != nil && res.StatusCode == http.StatusNotModified {
30358		if res.Body != nil {
30359			res.Body.Close()
30360		}
30361		return nil, &googleapi.Error{
30362			Code:   res.StatusCode,
30363			Header: res.Header,
30364		}
30365	}
30366	if err != nil {
30367		return nil, err
30368	}
30369	defer googleapi.CloseBody(res)
30370	if err := googleapi.CheckResponse(res); err != nil {
30371		return nil, err
30372	}
30373	ret := &Operation{
30374		ServerResponse: googleapi.ServerResponse{
30375			Header:         res.Header,
30376			HTTPStatusCode: res.StatusCode,
30377		},
30378	}
30379	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30380		return nil, err
30381	}
30382	return ret, nil
30383	// {
30384	//   "description": "Changes the machine type for a stopped instance to the machine type specified in the request.",
30385	//   "httpMethod": "POST",
30386	//   "id": "compute.instances.setMachineType",
30387	//   "parameterOrder": [
30388	//     "project",
30389	//     "zone",
30390	//     "instance"
30391	//   ],
30392	//   "parameters": {
30393	//     "instance": {
30394	//       "description": "Name of the instance scoping this request.",
30395	//       "location": "path",
30396	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30397	//       "required": true,
30398	//       "type": "string"
30399	//     },
30400	//     "project": {
30401	//       "description": "Project ID for this request.",
30402	//       "location": "path",
30403	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30404	//       "required": true,
30405	//       "type": "string"
30406	//     },
30407	//     "zone": {
30408	//       "description": "The name of the zone for this request.",
30409	//       "location": "path",
30410	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30411	//       "required": true,
30412	//       "type": "string"
30413	//     }
30414	//   },
30415	//   "path": "{project}/zones/{zone}/instances/{instance}/setMachineType",
30416	//   "request": {
30417	//     "$ref": "InstancesSetMachineTypeRequest"
30418	//   },
30419	//   "response": {
30420	//     "$ref": "Operation"
30421	//   },
30422	//   "scopes": [
30423	//     "https://www.googleapis.com/auth/cloud-platform",
30424	//     "https://www.googleapis.com/auth/compute"
30425	//   ]
30426	// }
30427
30428}
30429
30430// method id "compute.instances.setMetadata":
30431
30432type InstancesSetMetadataCall struct {
30433	s          *Service
30434	project    string
30435	zone       string
30436	instance   string
30437	metadata   *Metadata
30438	urlParams_ gensupport.URLParams
30439	ctx_       context.Context
30440}
30441
30442// SetMetadata: Sets metadata for the specified instance to the data
30443// included in the request.
30444// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setMetadata
30445func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall {
30446	c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30447	c.project = project
30448	c.zone = zone
30449	c.instance = instance
30450	c.metadata = metadata
30451	return c
30452}
30453
30454// Fields allows partial responses to be retrieved. See
30455// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30456// for more information.
30457func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall {
30458	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30459	return c
30460}
30461
30462// Context sets the context to be used in this call's Do method. Any
30463// pending HTTP request will be aborted if the provided context is
30464// canceled.
30465func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall {
30466	c.ctx_ = ctx
30467	return c
30468}
30469
30470func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) {
30471	var body io.Reader = nil
30472	body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
30473	if err != nil {
30474		return nil, err
30475	}
30476	ctype := "application/json"
30477	c.urlParams_.Set("alt", alt)
30478	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata")
30479	urls += "?" + c.urlParams_.Encode()
30480	req, _ := http.NewRequest("POST", urls, body)
30481	googleapi.Expand(req.URL, map[string]string{
30482		"project":  c.project,
30483		"zone":     c.zone,
30484		"instance": c.instance,
30485	})
30486	req.Header.Set("Content-Type", ctype)
30487	req.Header.Set("User-Agent", c.s.userAgent())
30488	if c.ctx_ != nil {
30489		return ctxhttp.Do(c.ctx_, c.s.client, req)
30490	}
30491	return c.s.client.Do(req)
30492}
30493
30494// Do executes the "compute.instances.setMetadata" call.
30495// Exactly one of *Operation or error will be non-nil. Any non-2xx
30496// status code is an error. Response headers are in either
30497// *Operation.ServerResponse.Header or (if a response was returned at
30498// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30499// to check whether the returned error was because
30500// http.StatusNotModified was returned.
30501func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30502	gensupport.SetOptions(c.urlParams_, opts...)
30503	res, err := c.doRequest("json")
30504	if res != nil && res.StatusCode == http.StatusNotModified {
30505		if res.Body != nil {
30506			res.Body.Close()
30507		}
30508		return nil, &googleapi.Error{
30509			Code:   res.StatusCode,
30510			Header: res.Header,
30511		}
30512	}
30513	if err != nil {
30514		return nil, err
30515	}
30516	defer googleapi.CloseBody(res)
30517	if err := googleapi.CheckResponse(res); err != nil {
30518		return nil, err
30519	}
30520	ret := &Operation{
30521		ServerResponse: googleapi.ServerResponse{
30522			Header:         res.Header,
30523			HTTPStatusCode: res.StatusCode,
30524		},
30525	}
30526	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30527		return nil, err
30528	}
30529	return ret, nil
30530	// {
30531	//   "description": "Sets metadata for the specified instance to the data included in the request.",
30532	//   "httpMethod": "POST",
30533	//   "id": "compute.instances.setMetadata",
30534	//   "parameterOrder": [
30535	//     "project",
30536	//     "zone",
30537	//     "instance"
30538	//   ],
30539	//   "parameters": {
30540	//     "instance": {
30541	//       "description": "Name of the instance scoping this request.",
30542	//       "location": "path",
30543	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30544	//       "required": true,
30545	//       "type": "string"
30546	//     },
30547	//     "project": {
30548	//       "description": "Project ID for this request.",
30549	//       "location": "path",
30550	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30551	//       "required": true,
30552	//       "type": "string"
30553	//     },
30554	//     "zone": {
30555	//       "description": "The name of the zone for this request.",
30556	//       "location": "path",
30557	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30558	//       "required": true,
30559	//       "type": "string"
30560	//     }
30561	//   },
30562	//   "path": "{project}/zones/{zone}/instances/{instance}/setMetadata",
30563	//   "request": {
30564	//     "$ref": "Metadata"
30565	//   },
30566	//   "response": {
30567	//     "$ref": "Operation"
30568	//   },
30569	//   "scopes": [
30570	//     "https://www.googleapis.com/auth/cloud-platform",
30571	//     "https://www.googleapis.com/auth/compute"
30572	//   ]
30573	// }
30574
30575}
30576
30577// method id "compute.instances.setScheduling":
30578
30579type InstancesSetSchedulingCall struct {
30580	s          *Service
30581	project    string
30582	zone       string
30583	instance   string
30584	scheduling *Scheduling
30585	urlParams_ gensupport.URLParams
30586	ctx_       context.Context
30587}
30588
30589// SetScheduling: Sets an instance's scheduling options.
30590// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setScheduling
30591func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall {
30592	c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30593	c.project = project
30594	c.zone = zone
30595	c.instance = instance
30596	c.scheduling = scheduling
30597	return c
30598}
30599
30600// Fields allows partial responses to be retrieved. See
30601// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30602// for more information.
30603func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall {
30604	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30605	return c
30606}
30607
30608// Context sets the context to be used in this call's Do method. Any
30609// pending HTTP request will be aborted if the provided context is
30610// canceled.
30611func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall {
30612	c.ctx_ = ctx
30613	return c
30614}
30615
30616func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) {
30617	var body io.Reader = nil
30618	body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling)
30619	if err != nil {
30620		return nil, err
30621	}
30622	ctype := "application/json"
30623	c.urlParams_.Set("alt", alt)
30624	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setScheduling")
30625	urls += "?" + c.urlParams_.Encode()
30626	req, _ := http.NewRequest("POST", urls, body)
30627	googleapi.Expand(req.URL, map[string]string{
30628		"project":  c.project,
30629		"zone":     c.zone,
30630		"instance": c.instance,
30631	})
30632	req.Header.Set("Content-Type", ctype)
30633	req.Header.Set("User-Agent", c.s.userAgent())
30634	if c.ctx_ != nil {
30635		return ctxhttp.Do(c.ctx_, c.s.client, req)
30636	}
30637	return c.s.client.Do(req)
30638}
30639
30640// Do executes the "compute.instances.setScheduling" call.
30641// Exactly one of *Operation or error will be non-nil. Any non-2xx
30642// status code is an error. Response headers are in either
30643// *Operation.ServerResponse.Header or (if a response was returned at
30644// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30645// to check whether the returned error was because
30646// http.StatusNotModified was returned.
30647func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30648	gensupport.SetOptions(c.urlParams_, opts...)
30649	res, err := c.doRequest("json")
30650	if res != nil && res.StatusCode == http.StatusNotModified {
30651		if res.Body != nil {
30652			res.Body.Close()
30653		}
30654		return nil, &googleapi.Error{
30655			Code:   res.StatusCode,
30656			Header: res.Header,
30657		}
30658	}
30659	if err != nil {
30660		return nil, err
30661	}
30662	defer googleapi.CloseBody(res)
30663	if err := googleapi.CheckResponse(res); err != nil {
30664		return nil, err
30665	}
30666	ret := &Operation{
30667		ServerResponse: googleapi.ServerResponse{
30668			Header:         res.Header,
30669			HTTPStatusCode: res.StatusCode,
30670		},
30671	}
30672	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30673		return nil, err
30674	}
30675	return ret, nil
30676	// {
30677	//   "description": "Sets an instance's scheduling options.",
30678	//   "httpMethod": "POST",
30679	//   "id": "compute.instances.setScheduling",
30680	//   "parameterOrder": [
30681	//     "project",
30682	//     "zone",
30683	//     "instance"
30684	//   ],
30685	//   "parameters": {
30686	//     "instance": {
30687	//       "description": "Instance name.",
30688	//       "location": "path",
30689	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30690	//       "required": true,
30691	//       "type": "string"
30692	//     },
30693	//     "project": {
30694	//       "description": "Project ID for this request.",
30695	//       "location": "path",
30696	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30697	//       "required": true,
30698	//       "type": "string"
30699	//     },
30700	//     "zone": {
30701	//       "description": "The name of the zone for this request.",
30702	//       "location": "path",
30703	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30704	//       "required": true,
30705	//       "type": "string"
30706	//     }
30707	//   },
30708	//   "path": "{project}/zones/{zone}/instances/{instance}/setScheduling",
30709	//   "request": {
30710	//     "$ref": "Scheduling"
30711	//   },
30712	//   "response": {
30713	//     "$ref": "Operation"
30714	//   },
30715	//   "scopes": [
30716	//     "https://www.googleapis.com/auth/cloud-platform",
30717	//     "https://www.googleapis.com/auth/compute"
30718	//   ]
30719	// }
30720
30721}
30722
30723// method id "compute.instances.setTags":
30724
30725type InstancesSetTagsCall struct {
30726	s          *Service
30727	project    string
30728	zone       string
30729	instance   string
30730	tags       *Tags
30731	urlParams_ gensupport.URLParams
30732	ctx_       context.Context
30733}
30734
30735// SetTags: Sets tags for the specified instance to the data included in
30736// the request.
30737// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/setTags
30738func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall {
30739	c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30740	c.project = project
30741	c.zone = zone
30742	c.instance = instance
30743	c.tags = tags
30744	return c
30745}
30746
30747// Fields allows partial responses to be retrieved. See
30748// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30749// for more information.
30750func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall {
30751	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30752	return c
30753}
30754
30755// Context sets the context to be used in this call's Do method. Any
30756// pending HTTP request will be aborted if the provided context is
30757// canceled.
30758func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall {
30759	c.ctx_ = ctx
30760	return c
30761}
30762
30763func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) {
30764	var body io.Reader = nil
30765	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags)
30766	if err != nil {
30767		return nil, err
30768	}
30769	ctype := "application/json"
30770	c.urlParams_.Set("alt", alt)
30771	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags")
30772	urls += "?" + c.urlParams_.Encode()
30773	req, _ := http.NewRequest("POST", urls, body)
30774	googleapi.Expand(req.URL, map[string]string{
30775		"project":  c.project,
30776		"zone":     c.zone,
30777		"instance": c.instance,
30778	})
30779	req.Header.Set("Content-Type", ctype)
30780	req.Header.Set("User-Agent", c.s.userAgent())
30781	if c.ctx_ != nil {
30782		return ctxhttp.Do(c.ctx_, c.s.client, req)
30783	}
30784	return c.s.client.Do(req)
30785}
30786
30787// Do executes the "compute.instances.setTags" call.
30788// Exactly one of *Operation or error will be non-nil. Any non-2xx
30789// status code is an error. Response headers are in either
30790// *Operation.ServerResponse.Header or (if a response was returned at
30791// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30792// to check whether the returned error was because
30793// http.StatusNotModified was returned.
30794func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30795	gensupport.SetOptions(c.urlParams_, opts...)
30796	res, err := c.doRequest("json")
30797	if res != nil && res.StatusCode == http.StatusNotModified {
30798		if res.Body != nil {
30799			res.Body.Close()
30800		}
30801		return nil, &googleapi.Error{
30802			Code:   res.StatusCode,
30803			Header: res.Header,
30804		}
30805	}
30806	if err != nil {
30807		return nil, err
30808	}
30809	defer googleapi.CloseBody(res)
30810	if err := googleapi.CheckResponse(res); err != nil {
30811		return nil, err
30812	}
30813	ret := &Operation{
30814		ServerResponse: googleapi.ServerResponse{
30815			Header:         res.Header,
30816			HTTPStatusCode: res.StatusCode,
30817		},
30818	}
30819	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30820		return nil, err
30821	}
30822	return ret, nil
30823	// {
30824	//   "description": "Sets tags for the specified instance to the data included in the request.",
30825	//   "httpMethod": "POST",
30826	//   "id": "compute.instances.setTags",
30827	//   "parameterOrder": [
30828	//     "project",
30829	//     "zone",
30830	//     "instance"
30831	//   ],
30832	//   "parameters": {
30833	//     "instance": {
30834	//       "description": "Name of the instance scoping this request.",
30835	//       "location": "path",
30836	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30837	//       "required": true,
30838	//       "type": "string"
30839	//     },
30840	//     "project": {
30841	//       "description": "Project ID for this request.",
30842	//       "location": "path",
30843	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30844	//       "required": true,
30845	//       "type": "string"
30846	//     },
30847	//     "zone": {
30848	//       "description": "The name of the zone for this request.",
30849	//       "location": "path",
30850	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30851	//       "required": true,
30852	//       "type": "string"
30853	//     }
30854	//   },
30855	//   "path": "{project}/zones/{zone}/instances/{instance}/setTags",
30856	//   "request": {
30857	//     "$ref": "Tags"
30858	//   },
30859	//   "response": {
30860	//     "$ref": "Operation"
30861	//   },
30862	//   "scopes": [
30863	//     "https://www.googleapis.com/auth/cloud-platform",
30864	//     "https://www.googleapis.com/auth/compute"
30865	//   ]
30866	// }
30867
30868}
30869
30870// method id "compute.instances.start":
30871
30872type InstancesStartCall struct {
30873	s          *Service
30874	project    string
30875	zone       string
30876	instance   string
30877	urlParams_ gensupport.URLParams
30878	ctx_       context.Context
30879}
30880
30881// Start: Starts an instance that was stopped using the using the
30882// instances().stop method. For more information, see Restart an
30883// instance.
30884// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/start
30885func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall {
30886	c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
30887	c.project = project
30888	c.zone = zone
30889	c.instance = instance
30890	return c
30891}
30892
30893// Fields allows partial responses to be retrieved. See
30894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
30895// for more information.
30896func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall {
30897	c.urlParams_.Set("fields", googleapi.CombineFields(s))
30898	return c
30899}
30900
30901// Context sets the context to be used in this call's Do method. Any
30902// pending HTTP request will be aborted if the provided context is
30903// canceled.
30904func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall {
30905	c.ctx_ = ctx
30906	return c
30907}
30908
30909func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) {
30910	var body io.Reader = nil
30911	c.urlParams_.Set("alt", alt)
30912	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/start")
30913	urls += "?" + c.urlParams_.Encode()
30914	req, _ := http.NewRequest("POST", urls, body)
30915	googleapi.Expand(req.URL, map[string]string{
30916		"project":  c.project,
30917		"zone":     c.zone,
30918		"instance": c.instance,
30919	})
30920	req.Header.Set("User-Agent", c.s.userAgent())
30921	if c.ctx_ != nil {
30922		return ctxhttp.Do(c.ctx_, c.s.client, req)
30923	}
30924	return c.s.client.Do(req)
30925}
30926
30927// Do executes the "compute.instances.start" call.
30928// Exactly one of *Operation or error will be non-nil. Any non-2xx
30929// status code is an error. Response headers are in either
30930// *Operation.ServerResponse.Header or (if a response was returned at
30931// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
30932// to check whether the returned error was because
30933// http.StatusNotModified was returned.
30934func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
30935	gensupport.SetOptions(c.urlParams_, opts...)
30936	res, err := c.doRequest("json")
30937	if res != nil && res.StatusCode == http.StatusNotModified {
30938		if res.Body != nil {
30939			res.Body.Close()
30940		}
30941		return nil, &googleapi.Error{
30942			Code:   res.StatusCode,
30943			Header: res.Header,
30944		}
30945	}
30946	if err != nil {
30947		return nil, err
30948	}
30949	defer googleapi.CloseBody(res)
30950	if err := googleapi.CheckResponse(res); err != nil {
30951		return nil, err
30952	}
30953	ret := &Operation{
30954		ServerResponse: googleapi.ServerResponse{
30955			Header:         res.Header,
30956			HTTPStatusCode: res.StatusCode,
30957		},
30958	}
30959	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
30960		return nil, err
30961	}
30962	return ret, nil
30963	// {
30964	//   "description": "Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.",
30965	//   "httpMethod": "POST",
30966	//   "id": "compute.instances.start",
30967	//   "parameterOrder": [
30968	//     "project",
30969	//     "zone",
30970	//     "instance"
30971	//   ],
30972	//   "parameters": {
30973	//     "instance": {
30974	//       "description": "Name of the instance resource to start.",
30975	//       "location": "path",
30976	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30977	//       "required": true,
30978	//       "type": "string"
30979	//     },
30980	//     "project": {
30981	//       "description": "Project ID for this request.",
30982	//       "location": "path",
30983	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
30984	//       "required": true,
30985	//       "type": "string"
30986	//     },
30987	//     "zone": {
30988	//       "description": "The name of the zone for this request.",
30989	//       "location": "path",
30990	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
30991	//       "required": true,
30992	//       "type": "string"
30993	//     }
30994	//   },
30995	//   "path": "{project}/zones/{zone}/instances/{instance}/start",
30996	//   "response": {
30997	//     "$ref": "Operation"
30998	//   },
30999	//   "scopes": [
31000	//     "https://www.googleapis.com/auth/cloud-platform",
31001	//     "https://www.googleapis.com/auth/compute"
31002	//   ]
31003	// }
31004
31005}
31006
31007// method id "compute.instances.stop":
31008
31009type InstancesStopCall struct {
31010	s          *Service
31011	project    string
31012	zone       string
31013	instance   string
31014	urlParams_ gensupport.URLParams
31015	ctx_       context.Context
31016}
31017
31018// Stop: Stops a running instance, shutting it down cleanly, and allows
31019// you to restart the instance at a later time. Stopped instances do not
31020// incur per-minute, virtual machine usage charges while they are
31021// stopped, but any resources that the virtual machine is using, such as
31022// persistent disks and static IP addresses, will continue to be charged
31023// until they are deleted. For more information, see Stopping an
31024// instance.
31025// For details, see https://cloud.google.com/compute/docs/reference/latest/instances/stop
31026func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall {
31027	c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31028	c.project = project
31029	c.zone = zone
31030	c.instance = instance
31031	return c
31032}
31033
31034// Fields allows partial responses to be retrieved. See
31035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31036// for more information.
31037func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall {
31038	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31039	return c
31040}
31041
31042// Context sets the context to be used in this call's Do method. Any
31043// pending HTTP request will be aborted if the provided context is
31044// canceled.
31045func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall {
31046	c.ctx_ = ctx
31047	return c
31048}
31049
31050func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) {
31051	var body io.Reader = nil
31052	c.urlParams_.Set("alt", alt)
31053	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/stop")
31054	urls += "?" + c.urlParams_.Encode()
31055	req, _ := http.NewRequest("POST", urls, body)
31056	googleapi.Expand(req.URL, map[string]string{
31057		"project":  c.project,
31058		"zone":     c.zone,
31059		"instance": c.instance,
31060	})
31061	req.Header.Set("User-Agent", c.s.userAgent())
31062	if c.ctx_ != nil {
31063		return ctxhttp.Do(c.ctx_, c.s.client, req)
31064	}
31065	return c.s.client.Do(req)
31066}
31067
31068// Do executes the "compute.instances.stop" call.
31069// Exactly one of *Operation or error will be non-nil. Any non-2xx
31070// status code is an error. Response headers are in either
31071// *Operation.ServerResponse.Header or (if a response was returned at
31072// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31073// to check whether the returned error was because
31074// http.StatusNotModified was returned.
31075func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
31076	gensupport.SetOptions(c.urlParams_, opts...)
31077	res, err := c.doRequest("json")
31078	if res != nil && res.StatusCode == http.StatusNotModified {
31079		if res.Body != nil {
31080			res.Body.Close()
31081		}
31082		return nil, &googleapi.Error{
31083			Code:   res.StatusCode,
31084			Header: res.Header,
31085		}
31086	}
31087	if err != nil {
31088		return nil, err
31089	}
31090	defer googleapi.CloseBody(res)
31091	if err := googleapi.CheckResponse(res); err != nil {
31092		return nil, err
31093	}
31094	ret := &Operation{
31095		ServerResponse: googleapi.ServerResponse{
31096			Header:         res.Header,
31097			HTTPStatusCode: res.StatusCode,
31098		},
31099	}
31100	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31101		return nil, err
31102	}
31103	return ret, nil
31104	// {
31105	//   "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.",
31106	//   "httpMethod": "POST",
31107	//   "id": "compute.instances.stop",
31108	//   "parameterOrder": [
31109	//     "project",
31110	//     "zone",
31111	//     "instance"
31112	//   ],
31113	//   "parameters": {
31114	//     "instance": {
31115	//       "description": "Name of the instance resource to stop.",
31116	//       "location": "path",
31117	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31118	//       "required": true,
31119	//       "type": "string"
31120	//     },
31121	//     "project": {
31122	//       "description": "Project ID for this request.",
31123	//       "location": "path",
31124	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31125	//       "required": true,
31126	//       "type": "string"
31127	//     },
31128	//     "zone": {
31129	//       "description": "The name of the zone for this request.",
31130	//       "location": "path",
31131	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31132	//       "required": true,
31133	//       "type": "string"
31134	//     }
31135	//   },
31136	//   "path": "{project}/zones/{zone}/instances/{instance}/stop",
31137	//   "response": {
31138	//     "$ref": "Operation"
31139	//   },
31140	//   "scopes": [
31141	//     "https://www.googleapis.com/auth/cloud-platform",
31142	//     "https://www.googleapis.com/auth/compute"
31143	//   ]
31144	// }
31145
31146}
31147
31148// method id "compute.instances.testIamPermissions":
31149
31150type InstancesTestIamPermissionsCall struct {
31151	s                      *Service
31152	project                string
31153	zone                   string
31154	resource               string
31155	testpermissionsrequest *TestPermissionsRequest
31156	urlParams_             gensupport.URLParams
31157	ctx_                   context.Context
31158}
31159
31160// TestIamPermissions: Returns permissions that a caller has on the
31161// specified resource.
31162func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall {
31163	c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31164	c.project = project
31165	c.zone = zone
31166	c.resource = resource
31167	c.testpermissionsrequest = testpermissionsrequest
31168	return c
31169}
31170
31171// Fields allows partial responses to be retrieved. See
31172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31173// for more information.
31174func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall {
31175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31176	return c
31177}
31178
31179// Context sets the context to be used in this call's Do method. Any
31180// pending HTTP request will be aborted if the provided context is
31181// canceled.
31182func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall {
31183	c.ctx_ = ctx
31184	return c
31185}
31186
31187func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
31188	var body io.Reader = nil
31189	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
31190	if err != nil {
31191		return nil, err
31192	}
31193	ctype := "application/json"
31194	c.urlParams_.Set("alt", alt)
31195	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{resource}/testIamPermissions")
31196	urls += "?" + c.urlParams_.Encode()
31197	req, _ := http.NewRequest("POST", urls, body)
31198	googleapi.Expand(req.URL, map[string]string{
31199		"project":  c.project,
31200		"zone":     c.zone,
31201		"resource": c.resource,
31202	})
31203	req.Header.Set("Content-Type", ctype)
31204	req.Header.Set("User-Agent", c.s.userAgent())
31205	if c.ctx_ != nil {
31206		return ctxhttp.Do(c.ctx_, c.s.client, req)
31207	}
31208	return c.s.client.Do(req)
31209}
31210
31211// Do executes the "compute.instances.testIamPermissions" call.
31212// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
31213// non-2xx status code is an error. Response headers are in either
31214// *TestPermissionsResponse.ServerResponse.Header or (if a response was
31215// returned at all) in error.(*googleapi.Error).Header. Use
31216// googleapi.IsNotModified to check whether the returned error was
31217// because http.StatusNotModified was returned.
31218func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
31219	gensupport.SetOptions(c.urlParams_, opts...)
31220	res, err := c.doRequest("json")
31221	if res != nil && res.StatusCode == http.StatusNotModified {
31222		if res.Body != nil {
31223			res.Body.Close()
31224		}
31225		return nil, &googleapi.Error{
31226			Code:   res.StatusCode,
31227			Header: res.Header,
31228		}
31229	}
31230	if err != nil {
31231		return nil, err
31232	}
31233	defer googleapi.CloseBody(res)
31234	if err := googleapi.CheckResponse(res); err != nil {
31235		return nil, err
31236	}
31237	ret := &TestPermissionsResponse{
31238		ServerResponse: googleapi.ServerResponse{
31239			Header:         res.Header,
31240			HTTPStatusCode: res.StatusCode,
31241		},
31242	}
31243	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31244		return nil, err
31245	}
31246	return ret, nil
31247	// {
31248	//   "description": "Returns permissions that a caller has on the specified resource.",
31249	//   "httpMethod": "POST",
31250	//   "id": "compute.instances.testIamPermissions",
31251	//   "parameterOrder": [
31252	//     "project",
31253	//     "zone",
31254	//     "resource"
31255	//   ],
31256	//   "parameters": {
31257	//     "project": {
31258	//       "description": "Project ID for this request.",
31259	//       "location": "path",
31260	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31261	//       "required": true,
31262	//       "type": "string"
31263	//     },
31264	//     "resource": {
31265	//       "description": "Name of the resource for this request.",
31266	//       "location": "path",
31267	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31268	//       "required": true,
31269	//       "type": "string"
31270	//     },
31271	//     "zone": {
31272	//       "description": "The name of the zone for this request.",
31273	//       "location": "path",
31274	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31275	//       "required": true,
31276	//       "type": "string"
31277	//     }
31278	//   },
31279	//   "path": "{project}/zones/{zone}/instances/{resource}/testIamPermissions",
31280	//   "request": {
31281	//     "$ref": "TestPermissionsRequest"
31282	//   },
31283	//   "response": {
31284	//     "$ref": "TestPermissionsResponse"
31285	//   },
31286	//   "scopes": [
31287	//     "https://www.googleapis.com/auth/cloud-platform",
31288	//     "https://www.googleapis.com/auth/compute",
31289	//     "https://www.googleapis.com/auth/compute.readonly"
31290	//   ]
31291	// }
31292
31293}
31294
31295// method id "compute.licenses.get":
31296
31297type LicensesGetCall struct {
31298	s            *Service
31299	project      string
31300	license      string
31301	urlParams_   gensupport.URLParams
31302	ifNoneMatch_ string
31303	ctx_         context.Context
31304}
31305
31306// Get: Returns the specified License resource. Get a list of available
31307// licenses by making a list() request.
31308// For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get
31309func (r *LicensesService) Get(project string, license string) *LicensesGetCall {
31310	c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31311	c.project = project
31312	c.license = license
31313	return c
31314}
31315
31316// Fields allows partial responses to be retrieved. See
31317// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31318// for more information.
31319func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall {
31320	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31321	return c
31322}
31323
31324// IfNoneMatch sets the optional parameter which makes the operation
31325// fail if the object's ETag matches the given value. This is useful for
31326// getting updates only after the object has changed since the last
31327// request. Use googleapi.IsNotModified to check whether the response
31328// error from Do is the result of In-None-Match.
31329func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall {
31330	c.ifNoneMatch_ = entityTag
31331	return c
31332}
31333
31334// Context sets the context to be used in this call's Do method. Any
31335// pending HTTP request will be aborted if the provided context is
31336// canceled.
31337func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall {
31338	c.ctx_ = ctx
31339	return c
31340}
31341
31342func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) {
31343	var body io.Reader = nil
31344	c.urlParams_.Set("alt", alt)
31345	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{license}")
31346	urls += "?" + c.urlParams_.Encode()
31347	req, _ := http.NewRequest("GET", urls, body)
31348	googleapi.Expand(req.URL, map[string]string{
31349		"project": c.project,
31350		"license": c.license,
31351	})
31352	req.Header.Set("User-Agent", c.s.userAgent())
31353	if c.ifNoneMatch_ != "" {
31354		req.Header.Set("If-None-Match", c.ifNoneMatch_)
31355	}
31356	if c.ctx_ != nil {
31357		return ctxhttp.Do(c.ctx_, c.s.client, req)
31358	}
31359	return c.s.client.Do(req)
31360}
31361
31362// Do executes the "compute.licenses.get" call.
31363// Exactly one of *License or error will be non-nil. Any non-2xx status
31364// code is an error. Response headers are in either
31365// *License.ServerResponse.Header or (if a response was returned at all)
31366// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
31367// check whether the returned error was because http.StatusNotModified
31368// was returned.
31369func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) {
31370	gensupport.SetOptions(c.urlParams_, opts...)
31371	res, err := c.doRequest("json")
31372	if res != nil && res.StatusCode == http.StatusNotModified {
31373		if res.Body != nil {
31374			res.Body.Close()
31375		}
31376		return nil, &googleapi.Error{
31377			Code:   res.StatusCode,
31378			Header: res.Header,
31379		}
31380	}
31381	if err != nil {
31382		return nil, err
31383	}
31384	defer googleapi.CloseBody(res)
31385	if err := googleapi.CheckResponse(res); err != nil {
31386		return nil, err
31387	}
31388	ret := &License{
31389		ServerResponse: googleapi.ServerResponse{
31390			Header:         res.Header,
31391			HTTPStatusCode: res.StatusCode,
31392		},
31393	}
31394	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31395		return nil, err
31396	}
31397	return ret, nil
31398	// {
31399	//   "description": "Returns the specified License resource. Get a list of available licenses by making a list() request.",
31400	//   "httpMethod": "GET",
31401	//   "id": "compute.licenses.get",
31402	//   "parameterOrder": [
31403	//     "project",
31404	//     "license"
31405	//   ],
31406	//   "parameters": {
31407	//     "license": {
31408	//       "description": "Name of the License resource to return.",
31409	//       "location": "path",
31410	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31411	//       "required": true,
31412	//       "type": "string"
31413	//     },
31414	//     "project": {
31415	//       "description": "Project ID for this request.",
31416	//       "location": "path",
31417	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31418	//       "required": true,
31419	//       "type": "string"
31420	//     }
31421	//   },
31422	//   "path": "{project}/global/licenses/{license}",
31423	//   "response": {
31424	//     "$ref": "License"
31425	//   },
31426	//   "scopes": [
31427	//     "https://www.googleapis.com/auth/cloud-platform",
31428	//     "https://www.googleapis.com/auth/compute",
31429	//     "https://www.googleapis.com/auth/compute.readonly"
31430	//   ]
31431	// }
31432
31433}
31434
31435// method id "compute.machineTypes.aggregatedList":
31436
31437type MachineTypesAggregatedListCall struct {
31438	s            *Service
31439	project      string
31440	urlParams_   gensupport.URLParams
31441	ifNoneMatch_ string
31442	ctx_         context.Context
31443}
31444
31445// AggregatedList: Retrieves an aggregated list of machine types.
31446// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/aggregatedList
31447func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall {
31448	c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31449	c.project = project
31450	return c
31451}
31452
31453// Filter sets the optional parameter "filter": Sets a filter expression
31454// for filtering listed resources, in the form filter={expression}. Your
31455// {expression} must be in the format: field_name comparison_string
31456// literal_string.
31457//
31458// The field_name is the name of the field you want to compare. Only
31459// atomic field types are supported (string, number, boolean). The
31460// comparison_string must be either eq (equals) or ne (not equals). The
31461// literal_string is the string value to filter to. The literal value
31462// must be valid for the type of field you are filtering by (string,
31463// number, boolean). For string fields, the literal value is interpreted
31464// as a regular expression using RE2 syntax. The literal value must
31465// match the entire field.
31466//
31467// For example, to filter for instances that do not have a name of
31468// example-instance, you would use filter=name ne
31469// example-instance.
31470//
31471// Compute Engine Beta API Only: If you use filtering in the Beta API,
31472// you can also filter on nested fields. For example, you could filter
31473// on instances that have set the scheduling.automaticRestart field to
31474// true. In particular, use filtering on nested fields to take advantage
31475// of instance labels to organize and filter results based on label
31476// values.
31477//
31478// The Beta API also supports filtering on multiple expressions by
31479// providing each separate expression within parentheses. For example,
31480// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
31481// Multiple expressions are treated as AND expressions, meaning that
31482// resources must match all expressions to pass the filters.
31483func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall {
31484	c.urlParams_.Set("filter", filter)
31485	return c
31486}
31487
31488// MaxResults sets the optional parameter "maxResults": The maximum
31489// number of results per page that should be returned. If the number of
31490// available results is larger than maxResults, Compute Engine returns a
31491// nextPageToken that can be used to get the next page of results in
31492// subsequent list requests.
31493func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall {
31494	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31495	return c
31496}
31497
31498// OrderBy sets the optional parameter "orderBy": Sorts list results by
31499// a certain order. By default, results are returned in alphanumerical
31500// order based on the resource name.
31501//
31502// You can also sort results in descending order based on the creation
31503// timestamp using orderBy="creationTimestamp desc". This sorts results
31504// based on the creationTimestamp field in reverse chronological order
31505// (newest result first). Use this to sort resources like operations so
31506// that the newest operation is returned first.
31507//
31508// Currently, only sorting by name or creationTimestamp desc is
31509// supported.
31510func (c *MachineTypesAggregatedListCall) OrderBy(orderBy string) *MachineTypesAggregatedListCall {
31511	c.urlParams_.Set("orderBy", orderBy)
31512	return c
31513}
31514
31515// PageToken sets the optional parameter "pageToken": Specifies a page
31516// token to use. Set pageToken to the nextPageToken returned by a
31517// previous list request to get the next page of results.
31518func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall {
31519	c.urlParams_.Set("pageToken", pageToken)
31520	return c
31521}
31522
31523// Fields allows partial responses to be retrieved. See
31524// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31525// for more information.
31526func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall {
31527	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31528	return c
31529}
31530
31531// IfNoneMatch sets the optional parameter which makes the operation
31532// fail if the object's ETag matches the given value. This is useful for
31533// getting updates only after the object has changed since the last
31534// request. Use googleapi.IsNotModified to check whether the response
31535// error from Do is the result of In-None-Match.
31536func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall {
31537	c.ifNoneMatch_ = entityTag
31538	return c
31539}
31540
31541// Context sets the context to be used in this call's Do method. Any
31542// pending HTTP request will be aborted if the provided context is
31543// canceled.
31544func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall {
31545	c.ctx_ = ctx
31546	return c
31547}
31548
31549func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
31550	var body io.Reader = nil
31551	c.urlParams_.Set("alt", alt)
31552	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/machineTypes")
31553	urls += "?" + c.urlParams_.Encode()
31554	req, _ := http.NewRequest("GET", urls, body)
31555	googleapi.Expand(req.URL, map[string]string{
31556		"project": c.project,
31557	})
31558	req.Header.Set("User-Agent", c.s.userAgent())
31559	if c.ifNoneMatch_ != "" {
31560		req.Header.Set("If-None-Match", c.ifNoneMatch_)
31561	}
31562	if c.ctx_ != nil {
31563		return ctxhttp.Do(c.ctx_, c.s.client, req)
31564	}
31565	return c.s.client.Do(req)
31566}
31567
31568// Do executes the "compute.machineTypes.aggregatedList" call.
31569// Exactly one of *MachineTypeAggregatedList or error will be non-nil.
31570// Any non-2xx status code is an error. Response headers are in either
31571// *MachineTypeAggregatedList.ServerResponse.Header or (if a response
31572// was returned at all) in error.(*googleapi.Error).Header. Use
31573// googleapi.IsNotModified to check whether the returned error was
31574// because http.StatusNotModified was returned.
31575func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, error) {
31576	gensupport.SetOptions(c.urlParams_, opts...)
31577	res, err := c.doRequest("json")
31578	if res != nil && res.StatusCode == http.StatusNotModified {
31579		if res.Body != nil {
31580			res.Body.Close()
31581		}
31582		return nil, &googleapi.Error{
31583			Code:   res.StatusCode,
31584			Header: res.Header,
31585		}
31586	}
31587	if err != nil {
31588		return nil, err
31589	}
31590	defer googleapi.CloseBody(res)
31591	if err := googleapi.CheckResponse(res); err != nil {
31592		return nil, err
31593	}
31594	ret := &MachineTypeAggregatedList{
31595		ServerResponse: googleapi.ServerResponse{
31596			Header:         res.Header,
31597			HTTPStatusCode: res.StatusCode,
31598		},
31599	}
31600	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31601		return nil, err
31602	}
31603	return ret, nil
31604	// {
31605	//   "description": "Retrieves an aggregated list of machine types.",
31606	//   "httpMethod": "GET",
31607	//   "id": "compute.machineTypes.aggregatedList",
31608	//   "parameterOrder": [
31609	//     "project"
31610	//   ],
31611	//   "parameters": {
31612	//     "filter": {
31613	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
31614	//       "location": "query",
31615	//       "type": "string"
31616	//     },
31617	//     "maxResults": {
31618	//       "default": "500",
31619	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests.",
31620	//       "format": "uint32",
31621	//       "location": "query",
31622	//       "maximum": "500",
31623	//       "minimum": "0",
31624	//       "type": "integer"
31625	//     },
31626	//     "orderBy": {
31627	//       "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.",
31628	//       "location": "query",
31629	//       "type": "string"
31630	//     },
31631	//     "pageToken": {
31632	//       "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.",
31633	//       "location": "query",
31634	//       "type": "string"
31635	//     },
31636	//     "project": {
31637	//       "description": "Project ID for this request.",
31638	//       "location": "path",
31639	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31640	//       "required": true,
31641	//       "type": "string"
31642	//     }
31643	//   },
31644	//   "path": "{project}/aggregated/machineTypes",
31645	//   "response": {
31646	//     "$ref": "MachineTypeAggregatedList"
31647	//   },
31648	//   "scopes": [
31649	//     "https://www.googleapis.com/auth/cloud-platform",
31650	//     "https://www.googleapis.com/auth/compute",
31651	//     "https://www.googleapis.com/auth/compute.readonly"
31652	//   ]
31653	// }
31654
31655}
31656
31657// Pages invokes f for each page of results.
31658// A non-nil error returned from f will halt the iteration.
31659// The provided context supersedes any context provided to the Context method.
31660func (c *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error {
31661	c.ctx_ = ctx
31662	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
31663	for {
31664		x, err := c.Do()
31665		if err != nil {
31666			return err
31667		}
31668		if err := f(x); err != nil {
31669			return err
31670		}
31671		if x.NextPageToken == "" {
31672			return nil
31673		}
31674		c.PageToken(x.NextPageToken)
31675	}
31676}
31677
31678// method id "compute.machineTypes.get":
31679
31680type MachineTypesGetCall struct {
31681	s            *Service
31682	project      string
31683	zone         string
31684	machineType  string
31685	urlParams_   gensupport.URLParams
31686	ifNoneMatch_ string
31687	ctx_         context.Context
31688}
31689
31690// Get: Returns the specified machine type. Get a list of available
31691// machine types by making a list() request.
31692// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/get
31693func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall {
31694	c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31695	c.project = project
31696	c.zone = zone
31697	c.machineType = machineType
31698	return c
31699}
31700
31701// Fields allows partial responses to be retrieved. See
31702// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31703// for more information.
31704func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall {
31705	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31706	return c
31707}
31708
31709// IfNoneMatch sets the optional parameter which makes the operation
31710// fail if the object's ETag matches the given value. This is useful for
31711// getting updates only after the object has changed since the last
31712// request. Use googleapi.IsNotModified to check whether the response
31713// error from Do is the result of In-None-Match.
31714func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall {
31715	c.ifNoneMatch_ = entityTag
31716	return c
31717}
31718
31719// Context sets the context to be used in this call's Do method. Any
31720// pending HTTP request will be aborted if the provided context is
31721// canceled.
31722func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall {
31723	c.ctx_ = ctx
31724	return c
31725}
31726
31727func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) {
31728	var body io.Reader = nil
31729	c.urlParams_.Set("alt", alt)
31730	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes/{machineType}")
31731	urls += "?" + c.urlParams_.Encode()
31732	req, _ := http.NewRequest("GET", urls, body)
31733	googleapi.Expand(req.URL, map[string]string{
31734		"project":     c.project,
31735		"zone":        c.zone,
31736		"machineType": c.machineType,
31737	})
31738	req.Header.Set("User-Agent", c.s.userAgent())
31739	if c.ifNoneMatch_ != "" {
31740		req.Header.Set("If-None-Match", c.ifNoneMatch_)
31741	}
31742	if c.ctx_ != nil {
31743		return ctxhttp.Do(c.ctx_, c.s.client, req)
31744	}
31745	return c.s.client.Do(req)
31746}
31747
31748// Do executes the "compute.machineTypes.get" call.
31749// Exactly one of *MachineType or error will be non-nil. Any non-2xx
31750// status code is an error. Response headers are in either
31751// *MachineType.ServerResponse.Header or (if a response was returned at
31752// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
31753// to check whether the returned error was because
31754// http.StatusNotModified was returned.
31755func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, error) {
31756	gensupport.SetOptions(c.urlParams_, opts...)
31757	res, err := c.doRequest("json")
31758	if res != nil && res.StatusCode == http.StatusNotModified {
31759		if res.Body != nil {
31760			res.Body.Close()
31761		}
31762		return nil, &googleapi.Error{
31763			Code:   res.StatusCode,
31764			Header: res.Header,
31765		}
31766	}
31767	if err != nil {
31768		return nil, err
31769	}
31770	defer googleapi.CloseBody(res)
31771	if err := googleapi.CheckResponse(res); err != nil {
31772		return nil, err
31773	}
31774	ret := &MachineType{
31775		ServerResponse: googleapi.ServerResponse{
31776			Header:         res.Header,
31777			HTTPStatusCode: res.StatusCode,
31778		},
31779	}
31780	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31781		return nil, err
31782	}
31783	return ret, nil
31784	// {
31785	//   "description": "Returns the specified machine type. Get a list of available machine types by making a list() request.",
31786	//   "httpMethod": "GET",
31787	//   "id": "compute.machineTypes.get",
31788	//   "parameterOrder": [
31789	//     "project",
31790	//     "zone",
31791	//     "machineType"
31792	//   ],
31793	//   "parameters": {
31794	//     "machineType": {
31795	//       "description": "Name of the machine type to return.",
31796	//       "location": "path",
31797	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31798	//       "required": true,
31799	//       "type": "string"
31800	//     },
31801	//     "project": {
31802	//       "description": "Project ID for this request.",
31803	//       "location": "path",
31804	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
31805	//       "required": true,
31806	//       "type": "string"
31807	//     },
31808	//     "zone": {
31809	//       "description": "The name of the zone for this request.",
31810	//       "location": "path",
31811	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
31812	//       "required": true,
31813	//       "type": "string"
31814	//     }
31815	//   },
31816	//   "path": "{project}/zones/{zone}/machineTypes/{machineType}",
31817	//   "response": {
31818	//     "$ref": "MachineType"
31819	//   },
31820	//   "scopes": [
31821	//     "https://www.googleapis.com/auth/cloud-platform",
31822	//     "https://www.googleapis.com/auth/compute",
31823	//     "https://www.googleapis.com/auth/compute.readonly"
31824	//   ]
31825	// }
31826
31827}
31828
31829// method id "compute.machineTypes.list":
31830
31831type MachineTypesListCall struct {
31832	s            *Service
31833	project      string
31834	zone         string
31835	urlParams_   gensupport.URLParams
31836	ifNoneMatch_ string
31837	ctx_         context.Context
31838}
31839
31840// List: Retrieves a list of machine types available to the specified
31841// project.
31842// For details, see https://cloud.google.com/compute/docs/reference/latest/machineTypes/list
31843func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall {
31844	c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
31845	c.project = project
31846	c.zone = zone
31847	return c
31848}
31849
31850// Filter sets the optional parameter "filter": Sets a filter expression
31851// for filtering listed resources, in the form filter={expression}. Your
31852// {expression} must be in the format: field_name comparison_string
31853// literal_string.
31854//
31855// The field_name is the name of the field you want to compare. Only
31856// atomic field types are supported (string, number, boolean). The
31857// comparison_string must be either eq (equals) or ne (not equals). The
31858// literal_string is the string value to filter to. The literal value
31859// must be valid for the type of field you are filtering by (string,
31860// number, boolean). For string fields, the literal value is interpreted
31861// as a regular expression using RE2 syntax. The literal value must
31862// match the entire field.
31863//
31864// For example, to filter for instances that do not have a name of
31865// example-instance, you would use filter=name ne
31866// example-instance.
31867//
31868// Compute Engine Beta API Only: If you use filtering in the Beta API,
31869// you can also filter on nested fields. For example, you could filter
31870// on instances that have set the scheduling.automaticRestart field to
31871// true. In particular, use filtering on nested fields to take advantage
31872// of instance labels to organize and filter results based on label
31873// values.
31874//
31875// The Beta API also supports filtering on multiple expressions by
31876// providing each separate expression within parentheses. For example,
31877// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
31878// Multiple expressions are treated as AND expressions, meaning that
31879// resources must match all expressions to pass the filters.
31880func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall {
31881	c.urlParams_.Set("filter", filter)
31882	return c
31883}
31884
31885// MaxResults sets the optional parameter "maxResults": The maximum
31886// number of results per page that should be returned. If the number of
31887// available results is larger than maxResults, Compute Engine returns a
31888// nextPageToken that can be used to get the next page of results in
31889// subsequent list requests.
31890func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall {
31891	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
31892	return c
31893}
31894
31895// OrderBy sets the optional parameter "orderBy": Sorts list results by
31896// a certain order. By default, results are returned in alphanumerical
31897// order based on the resource name.
31898//
31899// You can also sort results in descending order based on the creation
31900// timestamp using orderBy="creationTimestamp desc". This sorts results
31901// based on the creationTimestamp field in reverse chronological order
31902// (newest result first). Use this to sort resources like operations so
31903// that the newest operation is returned first.
31904//
31905// Currently, only sorting by name or creationTimestamp desc is
31906// supported.
31907func (c *MachineTypesListCall) OrderBy(orderBy string) *MachineTypesListCall {
31908	c.urlParams_.Set("orderBy", orderBy)
31909	return c
31910}
31911
31912// PageToken sets the optional parameter "pageToken": Specifies a page
31913// token to use. Set pageToken to the nextPageToken returned by a
31914// previous list request to get the next page of results.
31915func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall {
31916	c.urlParams_.Set("pageToken", pageToken)
31917	return c
31918}
31919
31920// Fields allows partial responses to be retrieved. See
31921// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
31922// for more information.
31923func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall {
31924	c.urlParams_.Set("fields", googleapi.CombineFields(s))
31925	return c
31926}
31927
31928// IfNoneMatch sets the optional parameter which makes the operation
31929// fail if the object's ETag matches the given value. This is useful for
31930// getting updates only after the object has changed since the last
31931// request. Use googleapi.IsNotModified to check whether the response
31932// error from Do is the result of In-None-Match.
31933func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall {
31934	c.ifNoneMatch_ = entityTag
31935	return c
31936}
31937
31938// Context sets the context to be used in this call's Do method. Any
31939// pending HTTP request will be aborted if the provided context is
31940// canceled.
31941func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall {
31942	c.ctx_ = ctx
31943	return c
31944}
31945
31946func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) {
31947	var body io.Reader = nil
31948	c.urlParams_.Set("alt", alt)
31949	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes")
31950	urls += "?" + c.urlParams_.Encode()
31951	req, _ := http.NewRequest("GET", urls, body)
31952	googleapi.Expand(req.URL, map[string]string{
31953		"project": c.project,
31954		"zone":    c.zone,
31955	})
31956	req.Header.Set("User-Agent", c.s.userAgent())
31957	if c.ifNoneMatch_ != "" {
31958		req.Header.Set("If-None-Match", c.ifNoneMatch_)
31959	}
31960	if c.ctx_ != nil {
31961		return ctxhttp.Do(c.ctx_, c.s.client, req)
31962	}
31963	return c.s.client.Do(req)
31964}
31965
31966// Do executes the "compute.machineTypes.list" call.
31967// Exactly one of *MachineTypeList or error will be non-nil. Any non-2xx
31968// status code is an error. Response headers are in either
31969// *MachineTypeList.ServerResponse.Header or (if a response was returned
31970// at all) in error.(*googleapi.Error).Header. Use
31971// googleapi.IsNotModified to check whether the returned error was
31972// because http.StatusNotModified was returned.
31973func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, error) {
31974	gensupport.SetOptions(c.urlParams_, opts...)
31975	res, err := c.doRequest("json")
31976	if res != nil && res.StatusCode == http.StatusNotModified {
31977		if res.Body != nil {
31978			res.Body.Close()
31979		}
31980		return nil, &googleapi.Error{
31981			Code:   res.StatusCode,
31982			Header: res.Header,
31983		}
31984	}
31985	if err != nil {
31986		return nil, err
31987	}
31988	defer googleapi.CloseBody(res)
31989	if err := googleapi.CheckResponse(res); err != nil {
31990		return nil, err
31991	}
31992	ret := &MachineTypeList{
31993		ServerResponse: googleapi.ServerResponse{
31994			Header:         res.Header,
31995			HTTPStatusCode: res.StatusCode,
31996		},
31997	}
31998	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
31999		return nil, err
32000	}
32001	return ret, nil
32002	// {
32003	//   "description": "Retrieves a list of machine types available to the specified project.",
32004	//   "httpMethod": "GET",
32005	//   "id": "compute.machineTypes.list",
32006	//   "parameterOrder": [
32007	//     "project",
32008	//     "zone"
32009	//   ],
32010	//   "parameters": {
32011	//     "filter": {
32012	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
32013	//       "location": "query",
32014	//       "type": "string"
32015	//     },
32016	//     "maxResults": {
32017	//       "default": "500",
32018	//       "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.",
32019	//       "format": "uint32",
32020	//       "location": "query",
32021	//       "maximum": "500",
32022	//       "minimum": "0",
32023	//       "type": "integer"
32024	//     },
32025	//     "orderBy": {
32026	//       "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.",
32027	//       "location": "query",
32028	//       "type": "string"
32029	//     },
32030	//     "pageToken": {
32031	//       "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.",
32032	//       "location": "query",
32033	//       "type": "string"
32034	//     },
32035	//     "project": {
32036	//       "description": "Project ID for this request.",
32037	//       "location": "path",
32038	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32039	//       "required": true,
32040	//       "type": "string"
32041	//     },
32042	//     "zone": {
32043	//       "description": "The name of the zone for this request.",
32044	//       "location": "path",
32045	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32046	//       "required": true,
32047	//       "type": "string"
32048	//     }
32049	//   },
32050	//   "path": "{project}/zones/{zone}/machineTypes",
32051	//   "response": {
32052	//     "$ref": "MachineTypeList"
32053	//   },
32054	//   "scopes": [
32055	//     "https://www.googleapis.com/auth/cloud-platform",
32056	//     "https://www.googleapis.com/auth/compute",
32057	//     "https://www.googleapis.com/auth/compute.readonly"
32058	//   ]
32059	// }
32060
32061}
32062
32063// Pages invokes f for each page of results.
32064// A non-nil error returned from f will halt the iteration.
32065// The provided context supersedes any context provided to the Context method.
32066func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error {
32067	c.ctx_ = ctx
32068	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32069	for {
32070		x, err := c.Do()
32071		if err != nil {
32072			return err
32073		}
32074		if err := f(x); err != nil {
32075			return err
32076		}
32077		if x.NextPageToken == "" {
32078			return nil
32079		}
32080		c.PageToken(x.NextPageToken)
32081	}
32082}
32083
32084// method id "compute.networks.delete":
32085
32086type NetworksDeleteCall struct {
32087	s          *Service
32088	project    string
32089	network    string
32090	urlParams_ gensupport.URLParams
32091	ctx_       context.Context
32092}
32093
32094// Delete: Deletes the specified network.
32095// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/delete
32096func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall {
32097	c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32098	c.project = project
32099	c.network = network
32100	return c
32101}
32102
32103// Fields allows partial responses to be retrieved. See
32104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32105// for more information.
32106func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall {
32107	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32108	return c
32109}
32110
32111// Context sets the context to be used in this call's Do method. Any
32112// pending HTTP request will be aborted if the provided context is
32113// canceled.
32114func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall {
32115	c.ctx_ = ctx
32116	return c
32117}
32118
32119func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) {
32120	var body io.Reader = nil
32121	c.urlParams_.Set("alt", alt)
32122	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}")
32123	urls += "?" + c.urlParams_.Encode()
32124	req, _ := http.NewRequest("DELETE", urls, body)
32125	googleapi.Expand(req.URL, map[string]string{
32126		"project": c.project,
32127		"network": c.network,
32128	})
32129	req.Header.Set("User-Agent", c.s.userAgent())
32130	if c.ctx_ != nil {
32131		return ctxhttp.Do(c.ctx_, c.s.client, req)
32132	}
32133	return c.s.client.Do(req)
32134}
32135
32136// Do executes the "compute.networks.delete" call.
32137// Exactly one of *Operation or error will be non-nil. Any non-2xx
32138// status code is an error. Response headers are in either
32139// *Operation.ServerResponse.Header or (if a response was returned at
32140// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32141// to check whether the returned error was because
32142// http.StatusNotModified was returned.
32143func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
32144	gensupport.SetOptions(c.urlParams_, opts...)
32145	res, err := c.doRequest("json")
32146	if res != nil && res.StatusCode == http.StatusNotModified {
32147		if res.Body != nil {
32148			res.Body.Close()
32149		}
32150		return nil, &googleapi.Error{
32151			Code:   res.StatusCode,
32152			Header: res.Header,
32153		}
32154	}
32155	if err != nil {
32156		return nil, err
32157	}
32158	defer googleapi.CloseBody(res)
32159	if err := googleapi.CheckResponse(res); err != nil {
32160		return nil, err
32161	}
32162	ret := &Operation{
32163		ServerResponse: googleapi.ServerResponse{
32164			Header:         res.Header,
32165			HTTPStatusCode: res.StatusCode,
32166		},
32167	}
32168	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32169		return nil, err
32170	}
32171	return ret, nil
32172	// {
32173	//   "description": "Deletes the specified network.",
32174	//   "httpMethod": "DELETE",
32175	//   "id": "compute.networks.delete",
32176	//   "parameterOrder": [
32177	//     "project",
32178	//     "network"
32179	//   ],
32180	//   "parameters": {
32181	//     "network": {
32182	//       "description": "Name of the network to delete.",
32183	//       "location": "path",
32184	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32185	//       "required": true,
32186	//       "type": "string"
32187	//     },
32188	//     "project": {
32189	//       "description": "Project ID for this request.",
32190	//       "location": "path",
32191	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32192	//       "required": true,
32193	//       "type": "string"
32194	//     }
32195	//   },
32196	//   "path": "{project}/global/networks/{network}",
32197	//   "response": {
32198	//     "$ref": "Operation"
32199	//   },
32200	//   "scopes": [
32201	//     "https://www.googleapis.com/auth/cloud-platform",
32202	//     "https://www.googleapis.com/auth/compute"
32203	//   ]
32204	// }
32205
32206}
32207
32208// method id "compute.networks.get":
32209
32210type NetworksGetCall struct {
32211	s            *Service
32212	project      string
32213	network      string
32214	urlParams_   gensupport.URLParams
32215	ifNoneMatch_ string
32216	ctx_         context.Context
32217}
32218
32219// Get: Returns the specified network. Get a list of available networks
32220// by making a list() request.
32221// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/get
32222func (r *NetworksService) Get(project string, network string) *NetworksGetCall {
32223	c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32224	c.project = project
32225	c.network = network
32226	return c
32227}
32228
32229// Fields allows partial responses to be retrieved. See
32230// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32231// for more information.
32232func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall {
32233	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32234	return c
32235}
32236
32237// IfNoneMatch sets the optional parameter which makes the operation
32238// fail if the object's ETag matches the given value. This is useful for
32239// getting updates only after the object has changed since the last
32240// request. Use googleapi.IsNotModified to check whether the response
32241// error from Do is the result of In-None-Match.
32242func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall {
32243	c.ifNoneMatch_ = entityTag
32244	return c
32245}
32246
32247// Context sets the context to be used in this call's Do method. Any
32248// pending HTTP request will be aborted if the provided context is
32249// canceled.
32250func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall {
32251	c.ctx_ = ctx
32252	return c
32253}
32254
32255func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) {
32256	var body io.Reader = nil
32257	c.urlParams_.Set("alt", alt)
32258	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}")
32259	urls += "?" + c.urlParams_.Encode()
32260	req, _ := http.NewRequest("GET", urls, body)
32261	googleapi.Expand(req.URL, map[string]string{
32262		"project": c.project,
32263		"network": c.network,
32264	})
32265	req.Header.Set("User-Agent", c.s.userAgent())
32266	if c.ifNoneMatch_ != "" {
32267		req.Header.Set("If-None-Match", c.ifNoneMatch_)
32268	}
32269	if c.ctx_ != nil {
32270		return ctxhttp.Do(c.ctx_, c.s.client, req)
32271	}
32272	return c.s.client.Do(req)
32273}
32274
32275// Do executes the "compute.networks.get" call.
32276// Exactly one of *Network or error will be non-nil. Any non-2xx status
32277// code is an error. Response headers are in either
32278// *Network.ServerResponse.Header or (if a response was returned at all)
32279// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
32280// check whether the returned error was because http.StatusNotModified
32281// was returned.
32282func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) {
32283	gensupport.SetOptions(c.urlParams_, opts...)
32284	res, err := c.doRequest("json")
32285	if res != nil && res.StatusCode == http.StatusNotModified {
32286		if res.Body != nil {
32287			res.Body.Close()
32288		}
32289		return nil, &googleapi.Error{
32290			Code:   res.StatusCode,
32291			Header: res.Header,
32292		}
32293	}
32294	if err != nil {
32295		return nil, err
32296	}
32297	defer googleapi.CloseBody(res)
32298	if err := googleapi.CheckResponse(res); err != nil {
32299		return nil, err
32300	}
32301	ret := &Network{
32302		ServerResponse: googleapi.ServerResponse{
32303			Header:         res.Header,
32304			HTTPStatusCode: res.StatusCode,
32305		},
32306	}
32307	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32308		return nil, err
32309	}
32310	return ret, nil
32311	// {
32312	//   "description": "Returns the specified network. Get a list of available networks by making a list() request.",
32313	//   "httpMethod": "GET",
32314	//   "id": "compute.networks.get",
32315	//   "parameterOrder": [
32316	//     "project",
32317	//     "network"
32318	//   ],
32319	//   "parameters": {
32320	//     "network": {
32321	//       "description": "Name of the network to return.",
32322	//       "location": "path",
32323	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
32324	//       "required": true,
32325	//       "type": "string"
32326	//     },
32327	//     "project": {
32328	//       "description": "Project ID for this request.",
32329	//       "location": "path",
32330	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32331	//       "required": true,
32332	//       "type": "string"
32333	//     }
32334	//   },
32335	//   "path": "{project}/global/networks/{network}",
32336	//   "response": {
32337	//     "$ref": "Network"
32338	//   },
32339	//   "scopes": [
32340	//     "https://www.googleapis.com/auth/cloud-platform",
32341	//     "https://www.googleapis.com/auth/compute",
32342	//     "https://www.googleapis.com/auth/compute.readonly"
32343	//   ]
32344	// }
32345
32346}
32347
32348// method id "compute.networks.insert":
32349
32350type NetworksInsertCall struct {
32351	s          *Service
32352	project    string
32353	network    *Network
32354	urlParams_ gensupport.URLParams
32355	ctx_       context.Context
32356}
32357
32358// Insert: Creates a network in the specified project using the data
32359// included in the request.
32360// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/insert
32361func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall {
32362	c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32363	c.project = project
32364	c.network = network
32365	return c
32366}
32367
32368// Fields allows partial responses to be retrieved. See
32369// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32370// for more information.
32371func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall {
32372	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32373	return c
32374}
32375
32376// Context sets the context to be used in this call's Do method. Any
32377// pending HTTP request will be aborted if the provided context is
32378// canceled.
32379func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall {
32380	c.ctx_ = ctx
32381	return c
32382}
32383
32384func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) {
32385	var body io.Reader = nil
32386	body, err := googleapi.WithoutDataWrapper.JSONReader(c.network)
32387	if err != nil {
32388		return nil, err
32389	}
32390	ctype := "application/json"
32391	c.urlParams_.Set("alt", alt)
32392	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks")
32393	urls += "?" + c.urlParams_.Encode()
32394	req, _ := http.NewRequest("POST", urls, body)
32395	googleapi.Expand(req.URL, map[string]string{
32396		"project": c.project,
32397	})
32398	req.Header.Set("Content-Type", ctype)
32399	req.Header.Set("User-Agent", c.s.userAgent())
32400	if c.ctx_ != nil {
32401		return ctxhttp.Do(c.ctx_, c.s.client, req)
32402	}
32403	return c.s.client.Do(req)
32404}
32405
32406// Do executes the "compute.networks.insert" call.
32407// Exactly one of *Operation or error will be non-nil. Any non-2xx
32408// status code is an error. Response headers are in either
32409// *Operation.ServerResponse.Header or (if a response was returned at
32410// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32411// to check whether the returned error was because
32412// http.StatusNotModified was returned.
32413func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
32414	gensupport.SetOptions(c.urlParams_, opts...)
32415	res, err := c.doRequest("json")
32416	if res != nil && res.StatusCode == http.StatusNotModified {
32417		if res.Body != nil {
32418			res.Body.Close()
32419		}
32420		return nil, &googleapi.Error{
32421			Code:   res.StatusCode,
32422			Header: res.Header,
32423		}
32424	}
32425	if err != nil {
32426		return nil, err
32427	}
32428	defer googleapi.CloseBody(res)
32429	if err := googleapi.CheckResponse(res); err != nil {
32430		return nil, err
32431	}
32432	ret := &Operation{
32433		ServerResponse: googleapi.ServerResponse{
32434			Header:         res.Header,
32435			HTTPStatusCode: res.StatusCode,
32436		},
32437	}
32438	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32439		return nil, err
32440	}
32441	return ret, nil
32442	// {
32443	//   "description": "Creates a network in the specified project using the data included in the request.",
32444	//   "httpMethod": "POST",
32445	//   "id": "compute.networks.insert",
32446	//   "parameterOrder": [
32447	//     "project"
32448	//   ],
32449	//   "parameters": {
32450	//     "project": {
32451	//       "description": "Project ID for this request.",
32452	//       "location": "path",
32453	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32454	//       "required": true,
32455	//       "type": "string"
32456	//     }
32457	//   },
32458	//   "path": "{project}/global/networks",
32459	//   "request": {
32460	//     "$ref": "Network"
32461	//   },
32462	//   "response": {
32463	//     "$ref": "Operation"
32464	//   },
32465	//   "scopes": [
32466	//     "https://www.googleapis.com/auth/cloud-platform",
32467	//     "https://www.googleapis.com/auth/compute"
32468	//   ]
32469	// }
32470
32471}
32472
32473// method id "compute.networks.list":
32474
32475type NetworksListCall struct {
32476	s            *Service
32477	project      string
32478	urlParams_   gensupport.URLParams
32479	ifNoneMatch_ string
32480	ctx_         context.Context
32481}
32482
32483// List: Retrieves the list of networks available to the specified
32484// project.
32485// For details, see https://cloud.google.com/compute/docs/reference/latest/networks/list
32486func (r *NetworksService) List(project string) *NetworksListCall {
32487	c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32488	c.project = project
32489	return c
32490}
32491
32492// Filter sets the optional parameter "filter": Sets a filter expression
32493// for filtering listed resources, in the form filter={expression}. Your
32494// {expression} must be in the format: field_name comparison_string
32495// literal_string.
32496//
32497// The field_name is the name of the field you want to compare. Only
32498// atomic field types are supported (string, number, boolean). The
32499// comparison_string must be either eq (equals) or ne (not equals). The
32500// literal_string is the string value to filter to. The literal value
32501// must be valid for the type of field you are filtering by (string,
32502// number, boolean). For string fields, the literal value is interpreted
32503// as a regular expression using RE2 syntax. The literal value must
32504// match the entire field.
32505//
32506// For example, to filter for instances that do not have a name of
32507// example-instance, you would use filter=name ne
32508// example-instance.
32509//
32510// Compute Engine Beta API Only: If you use filtering in the Beta API,
32511// you can also filter on nested fields. For example, you could filter
32512// on instances that have set the scheduling.automaticRestart field to
32513// true. In particular, use filtering on nested fields to take advantage
32514// of instance labels to organize and filter results based on label
32515// values.
32516//
32517// The Beta API also supports filtering on multiple expressions by
32518// providing each separate expression within parentheses. For example,
32519// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
32520// Multiple expressions are treated as AND expressions, meaning that
32521// resources must match all expressions to pass the filters.
32522func (c *NetworksListCall) Filter(filter string) *NetworksListCall {
32523	c.urlParams_.Set("filter", filter)
32524	return c
32525}
32526
32527// MaxResults sets the optional parameter "maxResults": The maximum
32528// number of results per page that should be returned. If the number of
32529// available results is larger than maxResults, Compute Engine returns a
32530// nextPageToken that can be used to get the next page of results in
32531// subsequent list requests.
32532func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall {
32533	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
32534	return c
32535}
32536
32537// OrderBy sets the optional parameter "orderBy": Sorts list results by
32538// a certain order. By default, results are returned in alphanumerical
32539// order based on the resource name.
32540//
32541// You can also sort results in descending order based on the creation
32542// timestamp using orderBy="creationTimestamp desc". This sorts results
32543// based on the creationTimestamp field in reverse chronological order
32544// (newest result first). Use this to sort resources like operations so
32545// that the newest operation is returned first.
32546//
32547// Currently, only sorting by name or creationTimestamp desc is
32548// supported.
32549func (c *NetworksListCall) OrderBy(orderBy string) *NetworksListCall {
32550	c.urlParams_.Set("orderBy", orderBy)
32551	return c
32552}
32553
32554// PageToken sets the optional parameter "pageToken": Specifies a page
32555// token to use. Set pageToken to the nextPageToken returned by a
32556// previous list request to get the next page of results.
32557func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall {
32558	c.urlParams_.Set("pageToken", pageToken)
32559	return c
32560}
32561
32562// Fields allows partial responses to be retrieved. See
32563// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32564// for more information.
32565func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall {
32566	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32567	return c
32568}
32569
32570// IfNoneMatch sets the optional parameter which makes the operation
32571// fail if the object's ETag matches the given value. This is useful for
32572// getting updates only after the object has changed since the last
32573// request. Use googleapi.IsNotModified to check whether the response
32574// error from Do is the result of In-None-Match.
32575func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall {
32576	c.ifNoneMatch_ = entityTag
32577	return c
32578}
32579
32580// Context sets the context to be used in this call's Do method. Any
32581// pending HTTP request will be aborted if the provided context is
32582// canceled.
32583func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall {
32584	c.ctx_ = ctx
32585	return c
32586}
32587
32588func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) {
32589	var body io.Reader = nil
32590	c.urlParams_.Set("alt", alt)
32591	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks")
32592	urls += "?" + c.urlParams_.Encode()
32593	req, _ := http.NewRequest("GET", urls, body)
32594	googleapi.Expand(req.URL, map[string]string{
32595		"project": c.project,
32596	})
32597	req.Header.Set("User-Agent", c.s.userAgent())
32598	if c.ifNoneMatch_ != "" {
32599		req.Header.Set("If-None-Match", c.ifNoneMatch_)
32600	}
32601	if c.ctx_ != nil {
32602		return ctxhttp.Do(c.ctx_, c.s.client, req)
32603	}
32604	return c.s.client.Do(req)
32605}
32606
32607// Do executes the "compute.networks.list" call.
32608// Exactly one of *NetworkList or error will be non-nil. Any non-2xx
32609// status code is an error. Response headers are in either
32610// *NetworkList.ServerResponse.Header or (if a response was returned at
32611// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
32612// to check whether the returned error was because
32613// http.StatusNotModified was returned.
32614func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error) {
32615	gensupport.SetOptions(c.urlParams_, opts...)
32616	res, err := c.doRequest("json")
32617	if res != nil && res.StatusCode == http.StatusNotModified {
32618		if res.Body != nil {
32619			res.Body.Close()
32620		}
32621		return nil, &googleapi.Error{
32622			Code:   res.StatusCode,
32623			Header: res.Header,
32624		}
32625	}
32626	if err != nil {
32627		return nil, err
32628	}
32629	defer googleapi.CloseBody(res)
32630	if err := googleapi.CheckResponse(res); err != nil {
32631		return nil, err
32632	}
32633	ret := &NetworkList{
32634		ServerResponse: googleapi.ServerResponse{
32635			Header:         res.Header,
32636			HTTPStatusCode: res.StatusCode,
32637		},
32638	}
32639	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32640		return nil, err
32641	}
32642	return ret, nil
32643	// {
32644	//   "description": "Retrieves the list of networks available to the specified project.",
32645	//   "httpMethod": "GET",
32646	//   "id": "compute.networks.list",
32647	//   "parameterOrder": [
32648	//     "project"
32649	//   ],
32650	//   "parameters": {
32651	//     "filter": {
32652	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
32653	//       "location": "query",
32654	//       "type": "string"
32655	//     },
32656	//     "maxResults": {
32657	//       "default": "500",
32658	//       "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.",
32659	//       "format": "uint32",
32660	//       "location": "query",
32661	//       "maximum": "500",
32662	//       "minimum": "0",
32663	//       "type": "integer"
32664	//     },
32665	//     "orderBy": {
32666	//       "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.",
32667	//       "location": "query",
32668	//       "type": "string"
32669	//     },
32670	//     "pageToken": {
32671	//       "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.",
32672	//       "location": "query",
32673	//       "type": "string"
32674	//     },
32675	//     "project": {
32676	//       "description": "Project ID for this request.",
32677	//       "location": "path",
32678	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32679	//       "required": true,
32680	//       "type": "string"
32681	//     }
32682	//   },
32683	//   "path": "{project}/global/networks",
32684	//   "response": {
32685	//     "$ref": "NetworkList"
32686	//   },
32687	//   "scopes": [
32688	//     "https://www.googleapis.com/auth/cloud-platform",
32689	//     "https://www.googleapis.com/auth/compute",
32690	//     "https://www.googleapis.com/auth/compute.readonly"
32691	//   ]
32692	// }
32693
32694}
32695
32696// Pages invokes f for each page of results.
32697// A non-nil error returned from f will halt the iteration.
32698// The provided context supersedes any context provided to the Context method.
32699func (c *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error {
32700	c.ctx_ = ctx
32701	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
32702	for {
32703		x, err := c.Do()
32704		if err != nil {
32705			return err
32706		}
32707		if err := f(x); err != nil {
32708			return err
32709		}
32710		if x.NextPageToken == "" {
32711			return nil
32712		}
32713		c.PageToken(x.NextPageToken)
32714	}
32715}
32716
32717// method id "compute.networks.testIamPermissions":
32718
32719type NetworksTestIamPermissionsCall struct {
32720	s                      *Service
32721	project                string
32722	resource               string
32723	testpermissionsrequest *TestPermissionsRequest
32724	urlParams_             gensupport.URLParams
32725	ctx_                   context.Context
32726}
32727
32728// TestIamPermissions: Returns permissions that a caller has on the
32729// specified resource.
32730func (r *NetworksService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworksTestIamPermissionsCall {
32731	c := &NetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32732	c.project = project
32733	c.resource = resource
32734	c.testpermissionsrequest = testpermissionsrequest
32735	return c
32736}
32737
32738// Fields allows partial responses to be retrieved. See
32739// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32740// for more information.
32741func (c *NetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworksTestIamPermissionsCall {
32742	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32743	return c
32744}
32745
32746// Context sets the context to be used in this call's Do method. Any
32747// pending HTTP request will be aborted if the provided context is
32748// canceled.
32749func (c *NetworksTestIamPermissionsCall) Context(ctx context.Context) *NetworksTestIamPermissionsCall {
32750	c.ctx_ = ctx
32751	return c
32752}
32753
32754func (c *NetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
32755	var body io.Reader = nil
32756	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
32757	if err != nil {
32758		return nil, err
32759	}
32760	ctype := "application/json"
32761	c.urlParams_.Set("alt", alt)
32762	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{resource}/testIamPermissions")
32763	urls += "?" + c.urlParams_.Encode()
32764	req, _ := http.NewRequest("POST", urls, body)
32765	googleapi.Expand(req.URL, map[string]string{
32766		"project":  c.project,
32767		"resource": c.resource,
32768	})
32769	req.Header.Set("Content-Type", ctype)
32770	req.Header.Set("User-Agent", c.s.userAgent())
32771	if c.ctx_ != nil {
32772		return ctxhttp.Do(c.ctx_, c.s.client, req)
32773	}
32774	return c.s.client.Do(req)
32775}
32776
32777// Do executes the "compute.networks.testIamPermissions" call.
32778// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
32779// non-2xx status code is an error. Response headers are in either
32780// *TestPermissionsResponse.ServerResponse.Header or (if a response was
32781// returned at all) in error.(*googleapi.Error).Header. Use
32782// googleapi.IsNotModified to check whether the returned error was
32783// because http.StatusNotModified was returned.
32784func (c *NetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
32785	gensupport.SetOptions(c.urlParams_, opts...)
32786	res, err := c.doRequest("json")
32787	if res != nil && res.StatusCode == http.StatusNotModified {
32788		if res.Body != nil {
32789			res.Body.Close()
32790		}
32791		return nil, &googleapi.Error{
32792			Code:   res.StatusCode,
32793			Header: res.Header,
32794		}
32795	}
32796	if err != nil {
32797		return nil, err
32798	}
32799	defer googleapi.CloseBody(res)
32800	if err := googleapi.CheckResponse(res); err != nil {
32801		return nil, err
32802	}
32803	ret := &TestPermissionsResponse{
32804		ServerResponse: googleapi.ServerResponse{
32805			Header:         res.Header,
32806			HTTPStatusCode: res.StatusCode,
32807		},
32808	}
32809	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32810		return nil, err
32811	}
32812	return ret, nil
32813	// {
32814	//   "description": "Returns permissions that a caller has on the specified resource.",
32815	//   "httpMethod": "POST",
32816	//   "id": "compute.networks.testIamPermissions",
32817	//   "parameterOrder": [
32818	//     "project",
32819	//     "resource"
32820	//   ],
32821	//   "parameters": {
32822	//     "project": {
32823	//       "description": "Project ID for this request.",
32824	//       "location": "path",
32825	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32826	//       "required": true,
32827	//       "type": "string"
32828	//     },
32829	//     "resource": {
32830	//       "description": "Name of the resource for this request.",
32831	//       "location": "path",
32832	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
32833	//       "required": true,
32834	//       "type": "string"
32835	//     }
32836	//   },
32837	//   "path": "{project}/global/networks/{resource}/testIamPermissions",
32838	//   "request": {
32839	//     "$ref": "TestPermissionsRequest"
32840	//   },
32841	//   "response": {
32842	//     "$ref": "TestPermissionsResponse"
32843	//   },
32844	//   "scopes": [
32845	//     "https://www.googleapis.com/auth/cloud-platform",
32846	//     "https://www.googleapis.com/auth/compute",
32847	//     "https://www.googleapis.com/auth/compute.readonly"
32848	//   ]
32849	// }
32850
32851}
32852
32853// method id "compute.projects.get":
32854
32855type ProjectsGetCall struct {
32856	s            *Service
32857	project      string
32858	urlParams_   gensupport.URLParams
32859	ifNoneMatch_ string
32860	ctx_         context.Context
32861}
32862
32863// Get: Returns the specified Project resource.
32864// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/get
32865func (r *ProjectsService) Get(project string) *ProjectsGetCall {
32866	c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32867	c.project = project
32868	return c
32869}
32870
32871// Fields allows partial responses to be retrieved. See
32872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
32873// for more information.
32874func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall {
32875	c.urlParams_.Set("fields", googleapi.CombineFields(s))
32876	return c
32877}
32878
32879// IfNoneMatch sets the optional parameter which makes the operation
32880// fail if the object's ETag matches the given value. This is useful for
32881// getting updates only after the object has changed since the last
32882// request. Use googleapi.IsNotModified to check whether the response
32883// error from Do is the result of In-None-Match.
32884func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall {
32885	c.ifNoneMatch_ = entityTag
32886	return c
32887}
32888
32889// Context sets the context to be used in this call's Do method. Any
32890// pending HTTP request will be aborted if the provided context is
32891// canceled.
32892func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
32893	c.ctx_ = ctx
32894	return c
32895}
32896
32897func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
32898	var body io.Reader = nil
32899	c.urlParams_.Set("alt", alt)
32900	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}")
32901	urls += "?" + c.urlParams_.Encode()
32902	req, _ := http.NewRequest("GET", urls, body)
32903	googleapi.Expand(req.URL, map[string]string{
32904		"project": c.project,
32905	})
32906	req.Header.Set("User-Agent", c.s.userAgent())
32907	if c.ifNoneMatch_ != "" {
32908		req.Header.Set("If-None-Match", c.ifNoneMatch_)
32909	}
32910	if c.ctx_ != nil {
32911		return ctxhttp.Do(c.ctx_, c.s.client, req)
32912	}
32913	return c.s.client.Do(req)
32914}
32915
32916// Do executes the "compute.projects.get" call.
32917// Exactly one of *Project or error will be non-nil. Any non-2xx status
32918// code is an error. Response headers are in either
32919// *Project.ServerResponse.Header or (if a response was returned at all)
32920// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
32921// check whether the returned error was because http.StatusNotModified
32922// was returned.
32923func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) {
32924	gensupport.SetOptions(c.urlParams_, opts...)
32925	res, err := c.doRequest("json")
32926	if res != nil && res.StatusCode == http.StatusNotModified {
32927		if res.Body != nil {
32928			res.Body.Close()
32929		}
32930		return nil, &googleapi.Error{
32931			Code:   res.StatusCode,
32932			Header: res.Header,
32933		}
32934	}
32935	if err != nil {
32936		return nil, err
32937	}
32938	defer googleapi.CloseBody(res)
32939	if err := googleapi.CheckResponse(res); err != nil {
32940		return nil, err
32941	}
32942	ret := &Project{
32943		ServerResponse: googleapi.ServerResponse{
32944			Header:         res.Header,
32945			HTTPStatusCode: res.StatusCode,
32946		},
32947	}
32948	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
32949		return nil, err
32950	}
32951	return ret, nil
32952	// {
32953	//   "description": "Returns the specified Project resource.",
32954	//   "httpMethod": "GET",
32955	//   "id": "compute.projects.get",
32956	//   "parameterOrder": [
32957	//     "project"
32958	//   ],
32959	//   "parameters": {
32960	//     "project": {
32961	//       "description": "Project ID for this request.",
32962	//       "location": "path",
32963	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
32964	//       "required": true,
32965	//       "type": "string"
32966	//     }
32967	//   },
32968	//   "path": "{project}",
32969	//   "response": {
32970	//     "$ref": "Project"
32971	//   },
32972	//   "scopes": [
32973	//     "https://www.googleapis.com/auth/cloud-platform",
32974	//     "https://www.googleapis.com/auth/compute",
32975	//     "https://www.googleapis.com/auth/compute.readonly"
32976	//   ]
32977	// }
32978
32979}
32980
32981// method id "compute.projects.setCommonInstanceMetadata":
32982
32983type ProjectsSetCommonInstanceMetadataCall struct {
32984	s          *Service
32985	project    string
32986	metadata   *Metadata
32987	urlParams_ gensupport.URLParams
32988	ctx_       context.Context
32989}
32990
32991// SetCommonInstanceMetadata: Sets metadata common to all instances
32992// within the specified project using the data included in the request.
32993// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setCommonInstanceMetadata
32994func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall {
32995	c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
32996	c.project = project
32997	c.metadata = metadata
32998	return c
32999}
33000
33001// Fields allows partial responses to be retrieved. See
33002// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33003// for more information.
33004func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall {
33005	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33006	return c
33007}
33008
33009// Context sets the context to be used in this call's Do method. Any
33010// pending HTTP request will be aborted if the provided context is
33011// canceled.
33012func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall {
33013	c.ctx_ = ctx
33014	return c
33015}
33016
33017func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) {
33018	var body io.Reader = nil
33019	body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
33020	if err != nil {
33021		return nil, err
33022	}
33023	ctype := "application/json"
33024	c.urlParams_.Set("alt", alt)
33025	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata")
33026	urls += "?" + c.urlParams_.Encode()
33027	req, _ := http.NewRequest("POST", urls, body)
33028	googleapi.Expand(req.URL, map[string]string{
33029		"project": c.project,
33030	})
33031	req.Header.Set("Content-Type", ctype)
33032	req.Header.Set("User-Agent", c.s.userAgent())
33033	if c.ctx_ != nil {
33034		return ctxhttp.Do(c.ctx_, c.s.client, req)
33035	}
33036	return c.s.client.Do(req)
33037}
33038
33039// Do executes the "compute.projects.setCommonInstanceMetadata" call.
33040// Exactly one of *Operation or error will be non-nil. Any non-2xx
33041// status code is an error. Response headers are in either
33042// *Operation.ServerResponse.Header or (if a response was returned at
33043// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33044// to check whether the returned error was because
33045// http.StatusNotModified was returned.
33046func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33047	gensupport.SetOptions(c.urlParams_, opts...)
33048	res, err := c.doRequest("json")
33049	if res != nil && res.StatusCode == http.StatusNotModified {
33050		if res.Body != nil {
33051			res.Body.Close()
33052		}
33053		return nil, &googleapi.Error{
33054			Code:   res.StatusCode,
33055			Header: res.Header,
33056		}
33057	}
33058	if err != nil {
33059		return nil, err
33060	}
33061	defer googleapi.CloseBody(res)
33062	if err := googleapi.CheckResponse(res); err != nil {
33063		return nil, err
33064	}
33065	ret := &Operation{
33066		ServerResponse: googleapi.ServerResponse{
33067			Header:         res.Header,
33068			HTTPStatusCode: res.StatusCode,
33069		},
33070	}
33071	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33072		return nil, err
33073	}
33074	return ret, nil
33075	// {
33076	//   "description": "Sets metadata common to all instances within the specified project using the data included in the request.",
33077	//   "httpMethod": "POST",
33078	//   "id": "compute.projects.setCommonInstanceMetadata",
33079	//   "parameterOrder": [
33080	//     "project"
33081	//   ],
33082	//   "parameters": {
33083	//     "project": {
33084	//       "description": "Project ID for this request.",
33085	//       "location": "path",
33086	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33087	//       "required": true,
33088	//       "type": "string"
33089	//     }
33090	//   },
33091	//   "path": "{project}/setCommonInstanceMetadata",
33092	//   "request": {
33093	//     "$ref": "Metadata"
33094	//   },
33095	//   "response": {
33096	//     "$ref": "Operation"
33097	//   },
33098	//   "scopes": [
33099	//     "https://www.googleapis.com/auth/cloud-platform",
33100	//     "https://www.googleapis.com/auth/compute"
33101	//   ]
33102	// }
33103
33104}
33105
33106// method id "compute.projects.setUsageExportBucket":
33107
33108type ProjectsSetUsageExportBucketCall struct {
33109	s                   *Service
33110	project             string
33111	usageexportlocation *UsageExportLocation
33112	urlParams_          gensupport.URLParams
33113	ctx_                context.Context
33114}
33115
33116// SetUsageExportBucket: Enables the usage export feature and sets the
33117// usage export bucket where reports are stored. If you provide an empty
33118// request body using this method, the usage export feature will be
33119// disabled.
33120// For details, see https://cloud.google.com/compute/docs/reference/latest/projects/setUsageExportBucket
33121func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall {
33122	c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33123	c.project = project
33124	c.usageexportlocation = usageexportlocation
33125	return c
33126}
33127
33128// Fields allows partial responses to be retrieved. See
33129// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33130// for more information.
33131func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall {
33132	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33133	return c
33134}
33135
33136// Context sets the context to be used in this call's Do method. Any
33137// pending HTTP request will be aborted if the provided context is
33138// canceled.
33139func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall {
33140	c.ctx_ = ctx
33141	return c
33142}
33143
33144func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) {
33145	var body io.Reader = nil
33146	body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation)
33147	if err != nil {
33148		return nil, err
33149	}
33150	ctype := "application/json"
33151	c.urlParams_.Set("alt", alt)
33152	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket")
33153	urls += "?" + c.urlParams_.Encode()
33154	req, _ := http.NewRequest("POST", urls, body)
33155	googleapi.Expand(req.URL, map[string]string{
33156		"project": c.project,
33157	})
33158	req.Header.Set("Content-Type", ctype)
33159	req.Header.Set("User-Agent", c.s.userAgent())
33160	if c.ctx_ != nil {
33161		return ctxhttp.Do(c.ctx_, c.s.client, req)
33162	}
33163	return c.s.client.Do(req)
33164}
33165
33166// Do executes the "compute.projects.setUsageExportBucket" call.
33167// Exactly one of *Operation or error will be non-nil. Any non-2xx
33168// status code is an error. Response headers are in either
33169// *Operation.ServerResponse.Header or (if a response was returned at
33170// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33171// to check whether the returned error was because
33172// http.StatusNotModified was returned.
33173func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33174	gensupport.SetOptions(c.urlParams_, opts...)
33175	res, err := c.doRequest("json")
33176	if res != nil && res.StatusCode == http.StatusNotModified {
33177		if res.Body != nil {
33178			res.Body.Close()
33179		}
33180		return nil, &googleapi.Error{
33181			Code:   res.StatusCode,
33182			Header: res.Header,
33183		}
33184	}
33185	if err != nil {
33186		return nil, err
33187	}
33188	defer googleapi.CloseBody(res)
33189	if err := googleapi.CheckResponse(res); err != nil {
33190		return nil, err
33191	}
33192	ret := &Operation{
33193		ServerResponse: googleapi.ServerResponse{
33194			Header:         res.Header,
33195			HTTPStatusCode: res.StatusCode,
33196		},
33197	}
33198	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33199		return nil, err
33200	}
33201	return ret, nil
33202	// {
33203	//   "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.",
33204	//   "httpMethod": "POST",
33205	//   "id": "compute.projects.setUsageExportBucket",
33206	//   "parameterOrder": [
33207	//     "project"
33208	//   ],
33209	//   "parameters": {
33210	//     "project": {
33211	//       "description": "Project ID for this request.",
33212	//       "location": "path",
33213	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33214	//       "required": true,
33215	//       "type": "string"
33216	//     }
33217	//   },
33218	//   "path": "{project}/setUsageExportBucket",
33219	//   "request": {
33220	//     "$ref": "UsageExportLocation"
33221	//   },
33222	//   "response": {
33223	//     "$ref": "Operation"
33224	//   },
33225	//   "scopes": [
33226	//     "https://www.googleapis.com/auth/cloud-platform",
33227	//     "https://www.googleapis.com/auth/compute",
33228	//     "https://www.googleapis.com/auth/devstorage.full_control",
33229	//     "https://www.googleapis.com/auth/devstorage.read_only",
33230	//     "https://www.googleapis.com/auth/devstorage.read_write"
33231	//   ]
33232	// }
33233
33234}
33235
33236// method id "compute.regionOperations.delete":
33237
33238type RegionOperationsDeleteCall struct {
33239	s          *Service
33240	project    string
33241	region     string
33242	operation  string
33243	urlParams_ gensupport.URLParams
33244	ctx_       context.Context
33245}
33246
33247// Delete: Deletes the specified region-specific Operations resource.
33248// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/delete
33249func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall {
33250	c := &RegionOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33251	c.project = project
33252	c.region = region
33253	c.operation = operation
33254	return c
33255}
33256
33257// Fields allows partial responses to be retrieved. See
33258// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33259// for more information.
33260func (c *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall {
33261	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33262	return c
33263}
33264
33265// Context sets the context to be used in this call's Do method. Any
33266// pending HTTP request will be aborted if the provided context is
33267// canceled.
33268func (c *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall {
33269	c.ctx_ = ctx
33270	return c
33271}
33272
33273func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
33274	var body io.Reader = nil
33275	c.urlParams_.Set("alt", alt)
33276	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}")
33277	urls += "?" + c.urlParams_.Encode()
33278	req, _ := http.NewRequest("DELETE", urls, body)
33279	googleapi.Expand(req.URL, map[string]string{
33280		"project":   c.project,
33281		"region":    c.region,
33282		"operation": c.operation,
33283	})
33284	req.Header.Set("User-Agent", c.s.userAgent())
33285	if c.ctx_ != nil {
33286		return ctxhttp.Do(c.ctx_, c.s.client, req)
33287	}
33288	return c.s.client.Do(req)
33289}
33290
33291// Do executes the "compute.regionOperations.delete" call.
33292func (c *RegionOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
33293	gensupport.SetOptions(c.urlParams_, opts...)
33294	res, err := c.doRequest("json")
33295	if err != nil {
33296		return err
33297	}
33298	defer googleapi.CloseBody(res)
33299	if err := googleapi.CheckResponse(res); err != nil {
33300		return err
33301	}
33302	return nil
33303	// {
33304	//   "description": "Deletes the specified region-specific Operations resource.",
33305	//   "httpMethod": "DELETE",
33306	//   "id": "compute.regionOperations.delete",
33307	//   "parameterOrder": [
33308	//     "project",
33309	//     "region",
33310	//     "operation"
33311	//   ],
33312	//   "parameters": {
33313	//     "operation": {
33314	//       "description": "Name of the Operations resource to delete.",
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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33324	//       "required": true,
33325	//       "type": "string"
33326	//     },
33327	//     "region": {
33328	//       "description": "Name of the region for this request.",
33329	//       "location": "path",
33330	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33331	//       "required": true,
33332	//       "type": "string"
33333	//     }
33334	//   },
33335	//   "path": "{project}/regions/{region}/operations/{operation}",
33336	//   "scopes": [
33337	//     "https://www.googleapis.com/auth/cloud-platform",
33338	//     "https://www.googleapis.com/auth/compute"
33339	//   ]
33340	// }
33341
33342}
33343
33344// method id "compute.regionOperations.get":
33345
33346type RegionOperationsGetCall struct {
33347	s            *Service
33348	project      string
33349	region       string
33350	operation    string
33351	urlParams_   gensupport.URLParams
33352	ifNoneMatch_ string
33353	ctx_         context.Context
33354}
33355
33356// Get: Retrieves the specified region-specific Operations resource.
33357// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/get
33358func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall {
33359	c := &RegionOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33360	c.project = project
33361	c.region = region
33362	c.operation = operation
33363	return c
33364}
33365
33366// Fields allows partial responses to be retrieved. See
33367// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33368// for more information.
33369func (c *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall {
33370	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33371	return c
33372}
33373
33374// IfNoneMatch sets the optional parameter which makes the operation
33375// fail if the object's ETag matches the given value. This is useful for
33376// getting updates only after the object has changed since the last
33377// request. Use googleapi.IsNotModified to check whether the response
33378// error from Do is the result of In-None-Match.
33379func (c *RegionOperationsGetCall) IfNoneMatch(entityTag string) *RegionOperationsGetCall {
33380	c.ifNoneMatch_ = entityTag
33381	return c
33382}
33383
33384// Context sets the context to be used in this call's Do method. Any
33385// pending HTTP request will be aborted if the provided context is
33386// canceled.
33387func (c *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall {
33388	c.ctx_ = ctx
33389	return c
33390}
33391
33392func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) {
33393	var body io.Reader = nil
33394	c.urlParams_.Set("alt", alt)
33395	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}")
33396	urls += "?" + c.urlParams_.Encode()
33397	req, _ := http.NewRequest("GET", urls, body)
33398	googleapi.Expand(req.URL, map[string]string{
33399		"project":   c.project,
33400		"region":    c.region,
33401		"operation": c.operation,
33402	})
33403	req.Header.Set("User-Agent", c.s.userAgent())
33404	if c.ifNoneMatch_ != "" {
33405		req.Header.Set("If-None-Match", c.ifNoneMatch_)
33406	}
33407	if c.ctx_ != nil {
33408		return ctxhttp.Do(c.ctx_, c.s.client, req)
33409	}
33410	return c.s.client.Do(req)
33411}
33412
33413// Do executes the "compute.regionOperations.get" call.
33414// Exactly one of *Operation or error will be non-nil. Any non-2xx
33415// status code is an error. Response headers are in either
33416// *Operation.ServerResponse.Header or (if a response was returned at
33417// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
33418// to check whether the returned error was because
33419// http.StatusNotModified was returned.
33420func (c *RegionOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
33421	gensupport.SetOptions(c.urlParams_, opts...)
33422	res, err := c.doRequest("json")
33423	if res != nil && res.StatusCode == http.StatusNotModified {
33424		if res.Body != nil {
33425			res.Body.Close()
33426		}
33427		return nil, &googleapi.Error{
33428			Code:   res.StatusCode,
33429			Header: res.Header,
33430		}
33431	}
33432	if err != nil {
33433		return nil, err
33434	}
33435	defer googleapi.CloseBody(res)
33436	if err := googleapi.CheckResponse(res); err != nil {
33437		return nil, err
33438	}
33439	ret := &Operation{
33440		ServerResponse: googleapi.ServerResponse{
33441			Header:         res.Header,
33442			HTTPStatusCode: res.StatusCode,
33443		},
33444	}
33445	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33446		return nil, err
33447	}
33448	return ret, nil
33449	// {
33450	//   "description": "Retrieves the specified region-specific Operations resource.",
33451	//   "httpMethod": "GET",
33452	//   "id": "compute.regionOperations.get",
33453	//   "parameterOrder": [
33454	//     "project",
33455	//     "region",
33456	//     "operation"
33457	//   ],
33458	//   "parameters": {
33459	//     "operation": {
33460	//       "description": "Name of the Operations resource to return.",
33461	//       "location": "path",
33462	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33463	//       "required": true,
33464	//       "type": "string"
33465	//     },
33466	//     "project": {
33467	//       "description": "Project ID for this request.",
33468	//       "location": "path",
33469	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33470	//       "required": true,
33471	//       "type": "string"
33472	//     },
33473	//     "region": {
33474	//       "description": "Name of the region for this request.",
33475	//       "location": "path",
33476	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33477	//       "required": true,
33478	//       "type": "string"
33479	//     }
33480	//   },
33481	//   "path": "{project}/regions/{region}/operations/{operation}",
33482	//   "response": {
33483	//     "$ref": "Operation"
33484	//   },
33485	//   "scopes": [
33486	//     "https://www.googleapis.com/auth/cloud-platform",
33487	//     "https://www.googleapis.com/auth/compute",
33488	//     "https://www.googleapis.com/auth/compute.readonly"
33489	//   ]
33490	// }
33491
33492}
33493
33494// method id "compute.regionOperations.list":
33495
33496type RegionOperationsListCall struct {
33497	s            *Service
33498	project      string
33499	region       string
33500	urlParams_   gensupport.URLParams
33501	ifNoneMatch_ string
33502	ctx_         context.Context
33503}
33504
33505// List: Retrieves a list of Operation resources contained within the
33506// specified region.
33507// For details, see https://cloud.google.com/compute/docs/reference/latest/regionOperations/list
33508func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall {
33509	c := &RegionOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33510	c.project = project
33511	c.region = region
33512	return c
33513}
33514
33515// Filter sets the optional parameter "filter": Sets a filter expression
33516// for filtering listed resources, in the form filter={expression}. Your
33517// {expression} must be in the format: field_name comparison_string
33518// literal_string.
33519//
33520// The field_name is the name of the field you want to compare. Only
33521// atomic field types are supported (string, number, boolean). The
33522// comparison_string must be either eq (equals) or ne (not equals). The
33523// literal_string is the string value to filter to. The literal value
33524// must be valid for the type of field you are filtering by (string,
33525// number, boolean). For string fields, the literal value is interpreted
33526// as a regular expression using RE2 syntax. The literal value must
33527// match the entire field.
33528//
33529// For example, to filter for instances that do not have a name of
33530// example-instance, you would use filter=name ne
33531// example-instance.
33532//
33533// Compute Engine Beta API Only: If you use filtering in the Beta API,
33534// you can also filter on nested fields. For example, you could filter
33535// on instances that have set the scheduling.automaticRestart field to
33536// true. In particular, use filtering on nested fields to take advantage
33537// of instance labels to organize and filter results based on label
33538// values.
33539//
33540// The Beta API also supports filtering on multiple expressions by
33541// providing each separate expression within parentheses. For example,
33542// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
33543// Multiple expressions are treated as AND expressions, meaning that
33544// resources must match all expressions to pass the filters.
33545func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall {
33546	c.urlParams_.Set("filter", filter)
33547	return c
33548}
33549
33550// MaxResults sets the optional parameter "maxResults": The maximum
33551// number of results per page that should be returned. If the number of
33552// available results is larger than maxResults, Compute Engine returns a
33553// nextPageToken that can be used to get the next page of results in
33554// subsequent list requests.
33555func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall {
33556	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33557	return c
33558}
33559
33560// OrderBy sets the optional parameter "orderBy": Sorts list results by
33561// a certain order. By default, results are returned in alphanumerical
33562// order based on the resource name.
33563//
33564// You can also sort results in descending order based on the creation
33565// timestamp using orderBy="creationTimestamp desc". This sorts results
33566// based on the creationTimestamp field in reverse chronological order
33567// (newest result first). Use this to sort resources like operations so
33568// that the newest operation is returned first.
33569//
33570// Currently, only sorting by name or creationTimestamp desc is
33571// supported.
33572func (c *RegionOperationsListCall) OrderBy(orderBy string) *RegionOperationsListCall {
33573	c.urlParams_.Set("orderBy", orderBy)
33574	return c
33575}
33576
33577// PageToken sets the optional parameter "pageToken": Specifies a page
33578// token to use. Set pageToken to the nextPageToken returned by a
33579// previous list request to get the next page of results.
33580func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperationsListCall {
33581	c.urlParams_.Set("pageToken", pageToken)
33582	return c
33583}
33584
33585// Fields allows partial responses to be retrieved. See
33586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33587// for more information.
33588func (c *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall {
33589	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33590	return c
33591}
33592
33593// IfNoneMatch sets the optional parameter which makes the operation
33594// fail if the object's ETag matches the given value. This is useful for
33595// getting updates only after the object has changed since the last
33596// request. Use googleapi.IsNotModified to check whether the response
33597// error from Do is the result of In-None-Match.
33598func (c *RegionOperationsListCall) IfNoneMatch(entityTag string) *RegionOperationsListCall {
33599	c.ifNoneMatch_ = entityTag
33600	return c
33601}
33602
33603// Context sets the context to be used in this call's Do method. Any
33604// pending HTTP request will be aborted if the provided context is
33605// canceled.
33606func (c *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall {
33607	c.ctx_ = ctx
33608	return c
33609}
33610
33611func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) {
33612	var body io.Reader = nil
33613	c.urlParams_.Set("alt", alt)
33614	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations")
33615	urls += "?" + c.urlParams_.Encode()
33616	req, _ := http.NewRequest("GET", urls, body)
33617	googleapi.Expand(req.URL, map[string]string{
33618		"project": c.project,
33619		"region":  c.region,
33620	})
33621	req.Header.Set("User-Agent", c.s.userAgent())
33622	if c.ifNoneMatch_ != "" {
33623		req.Header.Set("If-None-Match", c.ifNoneMatch_)
33624	}
33625	if c.ctx_ != nil {
33626		return ctxhttp.Do(c.ctx_, c.s.client, req)
33627	}
33628	return c.s.client.Do(req)
33629}
33630
33631// Do executes the "compute.regionOperations.list" call.
33632// Exactly one of *OperationList or error will be non-nil. Any non-2xx
33633// status code is an error. Response headers are in either
33634// *OperationList.ServerResponse.Header or (if a response was returned
33635// at all) in error.(*googleapi.Error).Header. Use
33636// googleapi.IsNotModified to check whether the returned error was
33637// because http.StatusNotModified was returned.
33638func (c *RegionOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) {
33639	gensupport.SetOptions(c.urlParams_, opts...)
33640	res, err := c.doRequest("json")
33641	if res != nil && res.StatusCode == http.StatusNotModified {
33642		if res.Body != nil {
33643			res.Body.Close()
33644		}
33645		return nil, &googleapi.Error{
33646			Code:   res.StatusCode,
33647			Header: res.Header,
33648		}
33649	}
33650	if err != nil {
33651		return nil, err
33652	}
33653	defer googleapi.CloseBody(res)
33654	if err := googleapi.CheckResponse(res); err != nil {
33655		return nil, err
33656	}
33657	ret := &OperationList{
33658		ServerResponse: googleapi.ServerResponse{
33659			Header:         res.Header,
33660			HTTPStatusCode: res.StatusCode,
33661		},
33662	}
33663	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33664		return nil, err
33665	}
33666	return ret, nil
33667	// {
33668	//   "description": "Retrieves a list of Operation resources contained within the specified region.",
33669	//   "httpMethod": "GET",
33670	//   "id": "compute.regionOperations.list",
33671	//   "parameterOrder": [
33672	//     "project",
33673	//     "region"
33674	//   ],
33675	//   "parameters": {
33676	//     "filter": {
33677	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
33678	//       "location": "query",
33679	//       "type": "string"
33680	//     },
33681	//     "maxResults": {
33682	//       "default": "500",
33683	//       "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.",
33684	//       "format": "uint32",
33685	//       "location": "query",
33686	//       "maximum": "500",
33687	//       "minimum": "0",
33688	//       "type": "integer"
33689	//     },
33690	//     "orderBy": {
33691	//       "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.",
33692	//       "location": "query",
33693	//       "type": "string"
33694	//     },
33695	//     "pageToken": {
33696	//       "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.",
33697	//       "location": "query",
33698	//       "type": "string"
33699	//     },
33700	//     "project": {
33701	//       "description": "Project ID for this request.",
33702	//       "location": "path",
33703	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33704	//       "required": true,
33705	//       "type": "string"
33706	//     },
33707	//     "region": {
33708	//       "description": "Name of the region for this request.",
33709	//       "location": "path",
33710	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33711	//       "required": true,
33712	//       "type": "string"
33713	//     }
33714	//   },
33715	//   "path": "{project}/regions/{region}/operations",
33716	//   "response": {
33717	//     "$ref": "OperationList"
33718	//   },
33719	//   "scopes": [
33720	//     "https://www.googleapis.com/auth/cloud-platform",
33721	//     "https://www.googleapis.com/auth/compute",
33722	//     "https://www.googleapis.com/auth/compute.readonly"
33723	//   ]
33724	// }
33725
33726}
33727
33728// Pages invokes f for each page of results.
33729// A non-nil error returned from f will halt the iteration.
33730// The provided context supersedes any context provided to the Context method.
33731func (c *RegionOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error {
33732	c.ctx_ = ctx
33733	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
33734	for {
33735		x, err := c.Do()
33736		if err != nil {
33737			return err
33738		}
33739		if err := f(x); err != nil {
33740			return err
33741		}
33742		if x.NextPageToken == "" {
33743			return nil
33744		}
33745		c.PageToken(x.NextPageToken)
33746	}
33747}
33748
33749// method id "compute.regions.get":
33750
33751type RegionsGetCall struct {
33752	s            *Service
33753	project      string
33754	region       string
33755	urlParams_   gensupport.URLParams
33756	ifNoneMatch_ string
33757	ctx_         context.Context
33758}
33759
33760// Get: Returns the specified Region resource. Get a list of available
33761// regions by making a list() request.
33762// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/get
33763func (r *RegionsService) Get(project string, region string) *RegionsGetCall {
33764	c := &RegionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33765	c.project = project
33766	c.region = region
33767	return c
33768}
33769
33770// Fields allows partial responses to be retrieved. See
33771// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33772// for more information.
33773func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall {
33774	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33775	return c
33776}
33777
33778// IfNoneMatch sets the optional parameter which makes the operation
33779// fail if the object's ETag matches the given value. This is useful for
33780// getting updates only after the object has changed since the last
33781// request. Use googleapi.IsNotModified to check whether the response
33782// error from Do is the result of In-None-Match.
33783func (c *RegionsGetCall) IfNoneMatch(entityTag string) *RegionsGetCall {
33784	c.ifNoneMatch_ = entityTag
33785	return c
33786}
33787
33788// Context sets the context to be used in this call's Do method. Any
33789// pending HTTP request will be aborted if the provided context is
33790// canceled.
33791func (c *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall {
33792	c.ctx_ = ctx
33793	return c
33794}
33795
33796func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) {
33797	var body io.Reader = nil
33798	c.urlParams_.Set("alt", alt)
33799	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}")
33800	urls += "?" + c.urlParams_.Encode()
33801	req, _ := http.NewRequest("GET", urls, body)
33802	googleapi.Expand(req.URL, map[string]string{
33803		"project": c.project,
33804		"region":  c.region,
33805	})
33806	req.Header.Set("User-Agent", c.s.userAgent())
33807	if c.ifNoneMatch_ != "" {
33808		req.Header.Set("If-None-Match", c.ifNoneMatch_)
33809	}
33810	if c.ctx_ != nil {
33811		return ctxhttp.Do(c.ctx_, c.s.client, req)
33812	}
33813	return c.s.client.Do(req)
33814}
33815
33816// Do executes the "compute.regions.get" call.
33817// Exactly one of *Region or error will be non-nil. Any non-2xx status
33818// code is an error. Response headers are in either
33819// *Region.ServerResponse.Header or (if a response was returned at all)
33820// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
33821// check whether the returned error was because http.StatusNotModified
33822// was returned.
33823func (c *RegionsGetCall) Do(opts ...googleapi.CallOption) (*Region, error) {
33824	gensupport.SetOptions(c.urlParams_, opts...)
33825	res, err := c.doRequest("json")
33826	if res != nil && res.StatusCode == http.StatusNotModified {
33827		if res.Body != nil {
33828			res.Body.Close()
33829		}
33830		return nil, &googleapi.Error{
33831			Code:   res.StatusCode,
33832			Header: res.Header,
33833		}
33834	}
33835	if err != nil {
33836		return nil, err
33837	}
33838	defer googleapi.CloseBody(res)
33839	if err := googleapi.CheckResponse(res); err != nil {
33840		return nil, err
33841	}
33842	ret := &Region{
33843		ServerResponse: googleapi.ServerResponse{
33844			Header:         res.Header,
33845			HTTPStatusCode: res.StatusCode,
33846		},
33847	}
33848	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
33849		return nil, err
33850	}
33851	return ret, nil
33852	// {
33853	//   "description": "Returns the specified Region resource. Get a list of available regions by making a list() request.",
33854	//   "httpMethod": "GET",
33855	//   "id": "compute.regions.get",
33856	//   "parameterOrder": [
33857	//     "project",
33858	//     "region"
33859	//   ],
33860	//   "parameters": {
33861	//     "project": {
33862	//       "description": "Project ID for this request.",
33863	//       "location": "path",
33864	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
33865	//       "required": true,
33866	//       "type": "string"
33867	//     },
33868	//     "region": {
33869	//       "description": "Name of the region resource to return.",
33870	//       "location": "path",
33871	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
33872	//       "required": true,
33873	//       "type": "string"
33874	//     }
33875	//   },
33876	//   "path": "{project}/regions/{region}",
33877	//   "response": {
33878	//     "$ref": "Region"
33879	//   },
33880	//   "scopes": [
33881	//     "https://www.googleapis.com/auth/cloud-platform",
33882	//     "https://www.googleapis.com/auth/compute",
33883	//     "https://www.googleapis.com/auth/compute.readonly"
33884	//   ]
33885	// }
33886
33887}
33888
33889// method id "compute.regions.list":
33890
33891type RegionsListCall struct {
33892	s            *Service
33893	project      string
33894	urlParams_   gensupport.URLParams
33895	ifNoneMatch_ string
33896	ctx_         context.Context
33897}
33898
33899// List: Retrieves the list of region resources available to the
33900// specified project.
33901// For details, see https://cloud.google.com/compute/docs/reference/latest/regions/list
33902func (r *RegionsService) List(project string) *RegionsListCall {
33903	c := &RegionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
33904	c.project = project
33905	return c
33906}
33907
33908// Filter sets the optional parameter "filter": Sets a filter expression
33909// for filtering listed resources, in the form filter={expression}. Your
33910// {expression} must be in the format: field_name comparison_string
33911// literal_string.
33912//
33913// The field_name is the name of the field you want to compare. Only
33914// atomic field types are supported (string, number, boolean). The
33915// comparison_string must be either eq (equals) or ne (not equals). The
33916// literal_string is the string value to filter to. The literal value
33917// must be valid for the type of field you are filtering by (string,
33918// number, boolean). For string fields, the literal value is interpreted
33919// as a regular expression using RE2 syntax. The literal value must
33920// match the entire field.
33921//
33922// For example, to filter for instances that do not have a name of
33923// example-instance, you would use filter=name ne
33924// example-instance.
33925//
33926// Compute Engine Beta API Only: If you use filtering in the Beta API,
33927// you can also filter on nested fields. For example, you could filter
33928// on instances that have set the scheduling.automaticRestart field to
33929// true. In particular, use filtering on nested fields to take advantage
33930// of instance labels to organize and filter results based on label
33931// values.
33932//
33933// The Beta API also supports filtering on multiple expressions by
33934// providing each separate expression within parentheses. For example,
33935// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
33936// Multiple expressions are treated as AND expressions, meaning that
33937// resources must match all expressions to pass the filters.
33938func (c *RegionsListCall) Filter(filter string) *RegionsListCall {
33939	c.urlParams_.Set("filter", filter)
33940	return c
33941}
33942
33943// MaxResults sets the optional parameter "maxResults": The maximum
33944// number of results per page that should be returned. If the number of
33945// available results is larger than maxResults, Compute Engine returns a
33946// nextPageToken that can be used to get the next page of results in
33947// subsequent list requests.
33948func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall {
33949	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
33950	return c
33951}
33952
33953// OrderBy sets the optional parameter "orderBy": Sorts list results by
33954// a certain order. By default, results are returned in alphanumerical
33955// order based on the resource name.
33956//
33957// You can also sort results in descending order based on the creation
33958// timestamp using orderBy="creationTimestamp desc". This sorts results
33959// based on the creationTimestamp field in reverse chronological order
33960// (newest result first). Use this to sort resources like operations so
33961// that the newest operation is returned first.
33962//
33963// Currently, only sorting by name or creationTimestamp desc is
33964// supported.
33965func (c *RegionsListCall) OrderBy(orderBy string) *RegionsListCall {
33966	c.urlParams_.Set("orderBy", orderBy)
33967	return c
33968}
33969
33970// PageToken sets the optional parameter "pageToken": Specifies a page
33971// token to use. Set pageToken to the nextPageToken returned by a
33972// previous list request to get the next page of results.
33973func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall {
33974	c.urlParams_.Set("pageToken", pageToken)
33975	return c
33976}
33977
33978// Fields allows partial responses to be retrieved. See
33979// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
33980// for more information.
33981func (c *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall {
33982	c.urlParams_.Set("fields", googleapi.CombineFields(s))
33983	return c
33984}
33985
33986// IfNoneMatch sets the optional parameter which makes the operation
33987// fail if the object's ETag matches the given value. This is useful for
33988// getting updates only after the object has changed since the last
33989// request. Use googleapi.IsNotModified to check whether the response
33990// error from Do is the result of In-None-Match.
33991func (c *RegionsListCall) IfNoneMatch(entityTag string) *RegionsListCall {
33992	c.ifNoneMatch_ = entityTag
33993	return c
33994}
33995
33996// Context sets the context to be used in this call's Do method. Any
33997// pending HTTP request will be aborted if the provided context is
33998// canceled.
33999func (c *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
34000	c.ctx_ = ctx
34001	return c
34002}
34003
34004func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
34005	var body io.Reader = nil
34006	c.urlParams_.Set("alt", alt)
34007	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions")
34008	urls += "?" + c.urlParams_.Encode()
34009	req, _ := http.NewRequest("GET", urls, body)
34010	googleapi.Expand(req.URL, map[string]string{
34011		"project": c.project,
34012	})
34013	req.Header.Set("User-Agent", c.s.userAgent())
34014	if c.ifNoneMatch_ != "" {
34015		req.Header.Set("If-None-Match", c.ifNoneMatch_)
34016	}
34017	if c.ctx_ != nil {
34018		return ctxhttp.Do(c.ctx_, c.s.client, req)
34019	}
34020	return c.s.client.Do(req)
34021}
34022
34023// Do executes the "compute.regions.list" call.
34024// Exactly one of *RegionList or error will be non-nil. Any non-2xx
34025// status code is an error. Response headers are in either
34026// *RegionList.ServerResponse.Header or (if a response was returned at
34027// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34028// to check whether the returned error was because
34029// http.StatusNotModified was returned.
34030func (c *RegionsListCall) Do(opts ...googleapi.CallOption) (*RegionList, error) {
34031	gensupport.SetOptions(c.urlParams_, opts...)
34032	res, err := c.doRequest("json")
34033	if res != nil && res.StatusCode == http.StatusNotModified {
34034		if res.Body != nil {
34035			res.Body.Close()
34036		}
34037		return nil, &googleapi.Error{
34038			Code:   res.StatusCode,
34039			Header: res.Header,
34040		}
34041	}
34042	if err != nil {
34043		return nil, err
34044	}
34045	defer googleapi.CloseBody(res)
34046	if err := googleapi.CheckResponse(res); err != nil {
34047		return nil, err
34048	}
34049	ret := &RegionList{
34050		ServerResponse: googleapi.ServerResponse{
34051			Header:         res.Header,
34052			HTTPStatusCode: res.StatusCode,
34053		},
34054	}
34055	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34056		return nil, err
34057	}
34058	return ret, nil
34059	// {
34060	//   "description": "Retrieves the list of region resources available to the specified project.",
34061	//   "httpMethod": "GET",
34062	//   "id": "compute.regions.list",
34063	//   "parameterOrder": [
34064	//     "project"
34065	//   ],
34066	//   "parameters": {
34067	//     "filter": {
34068	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
34069	//       "location": "query",
34070	//       "type": "string"
34071	//     },
34072	//     "maxResults": {
34073	//       "default": "500",
34074	//       "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.",
34075	//       "format": "uint32",
34076	//       "location": "query",
34077	//       "maximum": "500",
34078	//       "minimum": "0",
34079	//       "type": "integer"
34080	//     },
34081	//     "orderBy": {
34082	//       "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.",
34083	//       "location": "query",
34084	//       "type": "string"
34085	//     },
34086	//     "pageToken": {
34087	//       "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.",
34088	//       "location": "query",
34089	//       "type": "string"
34090	//     },
34091	//     "project": {
34092	//       "description": "Project ID for this request.",
34093	//       "location": "path",
34094	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34095	//       "required": true,
34096	//       "type": "string"
34097	//     }
34098	//   },
34099	//   "path": "{project}/regions",
34100	//   "response": {
34101	//     "$ref": "RegionList"
34102	//   },
34103	//   "scopes": [
34104	//     "https://www.googleapis.com/auth/cloud-platform",
34105	//     "https://www.googleapis.com/auth/compute",
34106	//     "https://www.googleapis.com/auth/compute.readonly"
34107	//   ]
34108	// }
34109
34110}
34111
34112// Pages invokes f for each page of results.
34113// A non-nil error returned from f will halt the iteration.
34114// The provided context supersedes any context provided to the Context method.
34115func (c *RegionsListCall) Pages(ctx context.Context, f func(*RegionList) error) error {
34116	c.ctx_ = ctx
34117	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
34118	for {
34119		x, err := c.Do()
34120		if err != nil {
34121			return err
34122		}
34123		if err := f(x); err != nil {
34124			return err
34125		}
34126		if x.NextPageToken == "" {
34127			return nil
34128		}
34129		c.PageToken(x.NextPageToken)
34130	}
34131}
34132
34133// method id "compute.routers.aggregatedList":
34134
34135type RoutersAggregatedListCall struct {
34136	s            *Service
34137	project      string
34138	urlParams_   gensupport.URLParams
34139	ifNoneMatch_ string
34140	ctx_         context.Context
34141}
34142
34143// AggregatedList: Retrieves an aggregated list of routers.
34144func (r *RoutersService) AggregatedList(project string) *RoutersAggregatedListCall {
34145	c := &RoutersAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34146	c.project = project
34147	return c
34148}
34149
34150// Filter sets the optional parameter "filter": Sets a filter expression
34151// for filtering listed resources, in the form filter={expression}. Your
34152// {expression} must be in the format: field_name comparison_string
34153// literal_string.
34154//
34155// The field_name is the name of the field you want to compare. Only
34156// atomic field types are supported (string, number, boolean). The
34157// comparison_string must be either eq (equals) or ne (not equals). The
34158// literal_string is the string value to filter to. The literal value
34159// must be valid for the type of field you are filtering by (string,
34160// number, boolean). For string fields, the literal value is interpreted
34161// as a regular expression using RE2 syntax. The literal value must
34162// match the entire field.
34163//
34164// For example, to filter for instances that do not have a name of
34165// example-instance, you would use filter=name ne
34166// example-instance.
34167//
34168// Compute Engine Beta API Only: If you use filtering in the Beta API,
34169// you can also filter on nested fields. For example, you could filter
34170// on instances that have set the scheduling.automaticRestart field to
34171// true. In particular, use filtering on nested fields to take advantage
34172// of instance labels to organize and filter results based on label
34173// values.
34174//
34175// The Beta API also supports filtering on multiple expressions by
34176// providing each separate expression within parentheses. For example,
34177// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
34178// Multiple expressions are treated as AND expressions, meaning that
34179// resources must match all expressions to pass the filters.
34180func (c *RoutersAggregatedListCall) Filter(filter string) *RoutersAggregatedListCall {
34181	c.urlParams_.Set("filter", filter)
34182	return c
34183}
34184
34185// MaxResults sets the optional parameter "maxResults": The maximum
34186// number of results per page that should be returned. If the number of
34187// available results is larger than maxResults, Compute Engine returns a
34188// nextPageToken that can be used to get the next page of results in
34189// subsequent list requests.
34190func (c *RoutersAggregatedListCall) MaxResults(maxResults int64) *RoutersAggregatedListCall {
34191	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
34192	return c
34193}
34194
34195// OrderBy sets the optional parameter "orderBy": Sorts list results by
34196// a certain order. By default, results are returned in alphanumerical
34197// order based on the resource name.
34198//
34199// You can also sort results in descending order based on the creation
34200// timestamp using orderBy="creationTimestamp desc". This sorts results
34201// based on the creationTimestamp field in reverse chronological order
34202// (newest result first). Use this to sort resources like operations so
34203// that the newest operation is returned first.
34204//
34205// Currently, only sorting by name or creationTimestamp desc is
34206// supported.
34207func (c *RoutersAggregatedListCall) OrderBy(orderBy string) *RoutersAggregatedListCall {
34208	c.urlParams_.Set("orderBy", orderBy)
34209	return c
34210}
34211
34212// PageToken sets the optional parameter "pageToken": Specifies a page
34213// token to use. Set pageToken to the nextPageToken returned by a
34214// previous list request to get the next page of results.
34215func (c *RoutersAggregatedListCall) PageToken(pageToken string) *RoutersAggregatedListCall {
34216	c.urlParams_.Set("pageToken", pageToken)
34217	return c
34218}
34219
34220// Fields allows partial responses to be retrieved. See
34221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34222// for more information.
34223func (c *RoutersAggregatedListCall) Fields(s ...googleapi.Field) *RoutersAggregatedListCall {
34224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34225	return c
34226}
34227
34228// IfNoneMatch sets the optional parameter which makes the operation
34229// fail if the object's ETag matches the given value. This is useful for
34230// getting updates only after the object has changed since the last
34231// request. Use googleapi.IsNotModified to check whether the response
34232// error from Do is the result of In-None-Match.
34233func (c *RoutersAggregatedListCall) IfNoneMatch(entityTag string) *RoutersAggregatedListCall {
34234	c.ifNoneMatch_ = entityTag
34235	return c
34236}
34237
34238// Context sets the context to be used in this call's Do method. Any
34239// pending HTTP request will be aborted if the provided context is
34240// canceled.
34241func (c *RoutersAggregatedListCall) Context(ctx context.Context) *RoutersAggregatedListCall {
34242	c.ctx_ = ctx
34243	return c
34244}
34245
34246func (c *RoutersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
34247	var body io.Reader = nil
34248	c.urlParams_.Set("alt", alt)
34249	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/routers")
34250	urls += "?" + c.urlParams_.Encode()
34251	req, _ := http.NewRequest("GET", urls, body)
34252	googleapi.Expand(req.URL, map[string]string{
34253		"project": c.project,
34254	})
34255	req.Header.Set("User-Agent", c.s.userAgent())
34256	if c.ifNoneMatch_ != "" {
34257		req.Header.Set("If-None-Match", c.ifNoneMatch_)
34258	}
34259	if c.ctx_ != nil {
34260		return ctxhttp.Do(c.ctx_, c.s.client, req)
34261	}
34262	return c.s.client.Do(req)
34263}
34264
34265// Do executes the "compute.routers.aggregatedList" call.
34266// Exactly one of *RouterAggregatedList or error will be non-nil. Any
34267// non-2xx status code is an error. Response headers are in either
34268// *RouterAggregatedList.ServerResponse.Header or (if a response was
34269// returned at all) in error.(*googleapi.Error).Header. Use
34270// googleapi.IsNotModified to check whether the returned error was
34271// because http.StatusNotModified was returned.
34272func (c *RoutersAggregatedListCall) Do(opts ...googleapi.CallOption) (*RouterAggregatedList, error) {
34273	gensupport.SetOptions(c.urlParams_, opts...)
34274	res, err := c.doRequest("json")
34275	if res != nil && res.StatusCode == http.StatusNotModified {
34276		if res.Body != nil {
34277			res.Body.Close()
34278		}
34279		return nil, &googleapi.Error{
34280			Code:   res.StatusCode,
34281			Header: res.Header,
34282		}
34283	}
34284	if err != nil {
34285		return nil, err
34286	}
34287	defer googleapi.CloseBody(res)
34288	if err := googleapi.CheckResponse(res); err != nil {
34289		return nil, err
34290	}
34291	ret := &RouterAggregatedList{
34292		ServerResponse: googleapi.ServerResponse{
34293			Header:         res.Header,
34294			HTTPStatusCode: res.StatusCode,
34295		},
34296	}
34297	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34298		return nil, err
34299	}
34300	return ret, nil
34301	// {
34302	//   "description": "Retrieves an aggregated list of routers.",
34303	//   "httpMethod": "GET",
34304	//   "id": "compute.routers.aggregatedList",
34305	//   "parameterOrder": [
34306	//     "project"
34307	//   ],
34308	//   "parameters": {
34309	//     "filter": {
34310	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
34311	//       "location": "query",
34312	//       "type": "string"
34313	//     },
34314	//     "maxResults": {
34315	//       "default": "500",
34316	//       "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.",
34317	//       "format": "uint32",
34318	//       "location": "query",
34319	//       "maximum": "500",
34320	//       "minimum": "0",
34321	//       "type": "integer"
34322	//     },
34323	//     "orderBy": {
34324	//       "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.",
34325	//       "location": "query",
34326	//       "type": "string"
34327	//     },
34328	//     "pageToken": {
34329	//       "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.",
34330	//       "location": "query",
34331	//       "type": "string"
34332	//     },
34333	//     "project": {
34334	//       "description": "Project ID for this request.",
34335	//       "location": "path",
34336	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34337	//       "required": true,
34338	//       "type": "string"
34339	//     }
34340	//   },
34341	//   "path": "{project}/aggregated/routers",
34342	//   "response": {
34343	//     "$ref": "RouterAggregatedList"
34344	//   },
34345	//   "scopes": [
34346	//     "https://www.googleapis.com/auth/cloud-platform",
34347	//     "https://www.googleapis.com/auth/compute",
34348	//     "https://www.googleapis.com/auth/compute.readonly"
34349	//   ]
34350	// }
34351
34352}
34353
34354// Pages invokes f for each page of results.
34355// A non-nil error returned from f will halt the iteration.
34356// The provided context supersedes any context provided to the Context method.
34357func (c *RoutersAggregatedListCall) Pages(ctx context.Context, f func(*RouterAggregatedList) error) error {
34358	c.ctx_ = ctx
34359	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
34360	for {
34361		x, err := c.Do()
34362		if err != nil {
34363			return err
34364		}
34365		if err := f(x); err != nil {
34366			return err
34367		}
34368		if x.NextPageToken == "" {
34369			return nil
34370		}
34371		c.PageToken(x.NextPageToken)
34372	}
34373}
34374
34375// method id "compute.routers.delete":
34376
34377type RoutersDeleteCall struct {
34378	s          *Service
34379	project    string
34380	region     string
34381	router     string
34382	urlParams_ gensupport.URLParams
34383	ctx_       context.Context
34384}
34385
34386// Delete: Deletes the specified Router resource.
34387func (r *RoutersService) Delete(project string, region string, router string) *RoutersDeleteCall {
34388	c := &RoutersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34389	c.project = project
34390	c.region = region
34391	c.router = router
34392	return c
34393}
34394
34395// Fields allows partial responses to be retrieved. See
34396// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34397// for more information.
34398func (c *RoutersDeleteCall) Fields(s ...googleapi.Field) *RoutersDeleteCall {
34399	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34400	return c
34401}
34402
34403// Context sets the context to be used in this call's Do method. Any
34404// pending HTTP request will be aborted if the provided context is
34405// canceled.
34406func (c *RoutersDeleteCall) Context(ctx context.Context) *RoutersDeleteCall {
34407	c.ctx_ = ctx
34408	return c
34409}
34410
34411func (c *RoutersDeleteCall) doRequest(alt string) (*http.Response, error) {
34412	var body io.Reader = nil
34413	c.urlParams_.Set("alt", alt)
34414	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}")
34415	urls += "?" + c.urlParams_.Encode()
34416	req, _ := http.NewRequest("DELETE", urls, body)
34417	googleapi.Expand(req.URL, map[string]string{
34418		"project": c.project,
34419		"region":  c.region,
34420		"router":  c.router,
34421	})
34422	req.Header.Set("User-Agent", c.s.userAgent())
34423	if c.ctx_ != nil {
34424		return ctxhttp.Do(c.ctx_, c.s.client, req)
34425	}
34426	return c.s.client.Do(req)
34427}
34428
34429// Do executes the "compute.routers.delete" call.
34430// Exactly one of *Operation or error will be non-nil. Any non-2xx
34431// status code is an error. Response headers are in either
34432// *Operation.ServerResponse.Header or (if a response was returned at
34433// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34434// to check whether the returned error was because
34435// http.StatusNotModified was returned.
34436func (c *RoutersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
34437	gensupport.SetOptions(c.urlParams_, opts...)
34438	res, err := c.doRequest("json")
34439	if res != nil && res.StatusCode == http.StatusNotModified {
34440		if res.Body != nil {
34441			res.Body.Close()
34442		}
34443		return nil, &googleapi.Error{
34444			Code:   res.StatusCode,
34445			Header: res.Header,
34446		}
34447	}
34448	if err != nil {
34449		return nil, err
34450	}
34451	defer googleapi.CloseBody(res)
34452	if err := googleapi.CheckResponse(res); err != nil {
34453		return nil, err
34454	}
34455	ret := &Operation{
34456		ServerResponse: googleapi.ServerResponse{
34457			Header:         res.Header,
34458			HTTPStatusCode: res.StatusCode,
34459		},
34460	}
34461	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34462		return nil, err
34463	}
34464	return ret, nil
34465	// {
34466	//   "description": "Deletes the specified Router resource.",
34467	//   "httpMethod": "DELETE",
34468	//   "id": "compute.routers.delete",
34469	//   "parameterOrder": [
34470	//     "project",
34471	//     "region",
34472	//     "router"
34473	//   ],
34474	//   "parameters": {
34475	//     "project": {
34476	//       "description": "Project ID for this request.",
34477	//       "location": "path",
34478	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34479	//       "required": true,
34480	//       "type": "string"
34481	//     },
34482	//     "region": {
34483	//       "description": "Name of the region for this request.",
34484	//       "location": "path",
34485	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34486	//       "required": true,
34487	//       "type": "string"
34488	//     },
34489	//     "router": {
34490	//       "description": "Name of the Router resource to delete.",
34491	//       "location": "path",
34492	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34493	//       "required": true,
34494	//       "type": "string"
34495	//     }
34496	//   },
34497	//   "path": "{project}/regions/{region}/routers/{router}",
34498	//   "response": {
34499	//     "$ref": "Operation"
34500	//   },
34501	//   "scopes": [
34502	//     "https://www.googleapis.com/auth/cloud-platform",
34503	//     "https://www.googleapis.com/auth/compute"
34504	//   ]
34505	// }
34506
34507}
34508
34509// method id "compute.routers.get":
34510
34511type RoutersGetCall struct {
34512	s            *Service
34513	project      string
34514	region       string
34515	router       string
34516	urlParams_   gensupport.URLParams
34517	ifNoneMatch_ string
34518	ctx_         context.Context
34519}
34520
34521// Get: Returns the specified Router resource. Get a list of available
34522// routers by making a list() request.
34523func (r *RoutersService) Get(project string, region string, router string) *RoutersGetCall {
34524	c := &RoutersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34525	c.project = project
34526	c.region = region
34527	c.router = router
34528	return c
34529}
34530
34531// Fields allows partial responses to be retrieved. See
34532// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34533// for more information.
34534func (c *RoutersGetCall) Fields(s ...googleapi.Field) *RoutersGetCall {
34535	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34536	return c
34537}
34538
34539// IfNoneMatch sets the optional parameter which makes the operation
34540// fail if the object's ETag matches the given value. This is useful for
34541// getting updates only after the object has changed since the last
34542// request. Use googleapi.IsNotModified to check whether the response
34543// error from Do is the result of In-None-Match.
34544func (c *RoutersGetCall) IfNoneMatch(entityTag string) *RoutersGetCall {
34545	c.ifNoneMatch_ = entityTag
34546	return c
34547}
34548
34549// Context sets the context to be used in this call's Do method. Any
34550// pending HTTP request will be aborted if the provided context is
34551// canceled.
34552func (c *RoutersGetCall) Context(ctx context.Context) *RoutersGetCall {
34553	c.ctx_ = ctx
34554	return c
34555}
34556
34557func (c *RoutersGetCall) doRequest(alt string) (*http.Response, error) {
34558	var body io.Reader = nil
34559	c.urlParams_.Set("alt", alt)
34560	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}")
34561	urls += "?" + c.urlParams_.Encode()
34562	req, _ := http.NewRequest("GET", urls, body)
34563	googleapi.Expand(req.URL, map[string]string{
34564		"project": c.project,
34565		"region":  c.region,
34566		"router":  c.router,
34567	})
34568	req.Header.Set("User-Agent", c.s.userAgent())
34569	if c.ifNoneMatch_ != "" {
34570		req.Header.Set("If-None-Match", c.ifNoneMatch_)
34571	}
34572	if c.ctx_ != nil {
34573		return ctxhttp.Do(c.ctx_, c.s.client, req)
34574	}
34575	return c.s.client.Do(req)
34576}
34577
34578// Do executes the "compute.routers.get" call.
34579// Exactly one of *Router or error will be non-nil. Any non-2xx status
34580// code is an error. Response headers are in either
34581// *Router.ServerResponse.Header or (if a response was returned at all)
34582// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
34583// check whether the returned error was because http.StatusNotModified
34584// was returned.
34585func (c *RoutersGetCall) Do(opts ...googleapi.CallOption) (*Router, error) {
34586	gensupport.SetOptions(c.urlParams_, opts...)
34587	res, err := c.doRequest("json")
34588	if res != nil && res.StatusCode == http.StatusNotModified {
34589		if res.Body != nil {
34590			res.Body.Close()
34591		}
34592		return nil, &googleapi.Error{
34593			Code:   res.StatusCode,
34594			Header: res.Header,
34595		}
34596	}
34597	if err != nil {
34598		return nil, err
34599	}
34600	defer googleapi.CloseBody(res)
34601	if err := googleapi.CheckResponse(res); err != nil {
34602		return nil, err
34603	}
34604	ret := &Router{
34605		ServerResponse: googleapi.ServerResponse{
34606			Header:         res.Header,
34607			HTTPStatusCode: res.StatusCode,
34608		},
34609	}
34610	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34611		return nil, err
34612	}
34613	return ret, nil
34614	// {
34615	//   "description": "Returns the specified Router resource. Get a list of available routers by making a list() request.",
34616	//   "httpMethod": "GET",
34617	//   "id": "compute.routers.get",
34618	//   "parameterOrder": [
34619	//     "project",
34620	//     "region",
34621	//     "router"
34622	//   ],
34623	//   "parameters": {
34624	//     "project": {
34625	//       "description": "Project ID for this request.",
34626	//       "location": "path",
34627	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34628	//       "required": true,
34629	//       "type": "string"
34630	//     },
34631	//     "region": {
34632	//       "description": "Name of the region for this request.",
34633	//       "location": "path",
34634	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34635	//       "required": true,
34636	//       "type": "string"
34637	//     },
34638	//     "router": {
34639	//       "description": "Name of the Router resource to return.",
34640	//       "location": "path",
34641	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34642	//       "required": true,
34643	//       "type": "string"
34644	//     }
34645	//   },
34646	//   "path": "{project}/regions/{region}/routers/{router}",
34647	//   "response": {
34648	//     "$ref": "Router"
34649	//   },
34650	//   "scopes": [
34651	//     "https://www.googleapis.com/auth/cloud-platform",
34652	//     "https://www.googleapis.com/auth/compute",
34653	//     "https://www.googleapis.com/auth/compute.readonly"
34654	//   ]
34655	// }
34656
34657}
34658
34659// method id "compute.routers.getRouterStatus":
34660
34661type RoutersGetRouterStatusCall struct {
34662	s            *Service
34663	project      string
34664	region       string
34665	router       string
34666	urlParams_   gensupport.URLParams
34667	ifNoneMatch_ string
34668	ctx_         context.Context
34669}
34670
34671// GetRouterStatus: Retrieves runtime information of the specified
34672// router.
34673func (r *RoutersService) GetRouterStatus(project string, region string, router string) *RoutersGetRouterStatusCall {
34674	c := &RoutersGetRouterStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34675	c.project = project
34676	c.region = region
34677	c.router = router
34678	return c
34679}
34680
34681// Fields allows partial responses to be retrieved. See
34682// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34683// for more information.
34684func (c *RoutersGetRouterStatusCall) Fields(s ...googleapi.Field) *RoutersGetRouterStatusCall {
34685	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34686	return c
34687}
34688
34689// IfNoneMatch sets the optional parameter which makes the operation
34690// fail if the object's ETag matches the given value. This is useful for
34691// getting updates only after the object has changed since the last
34692// request. Use googleapi.IsNotModified to check whether the response
34693// error from Do is the result of In-None-Match.
34694func (c *RoutersGetRouterStatusCall) IfNoneMatch(entityTag string) *RoutersGetRouterStatusCall {
34695	c.ifNoneMatch_ = entityTag
34696	return c
34697}
34698
34699// Context sets the context to be used in this call's Do method. Any
34700// pending HTTP request will be aborted if the provided context is
34701// canceled.
34702func (c *RoutersGetRouterStatusCall) Context(ctx context.Context) *RoutersGetRouterStatusCall {
34703	c.ctx_ = ctx
34704	return c
34705}
34706
34707func (c *RoutersGetRouterStatusCall) doRequest(alt string) (*http.Response, error) {
34708	var body io.Reader = nil
34709	c.urlParams_.Set("alt", alt)
34710	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}/getRouterStatus")
34711	urls += "?" + c.urlParams_.Encode()
34712	req, _ := http.NewRequest("GET", urls, body)
34713	googleapi.Expand(req.URL, map[string]string{
34714		"project": c.project,
34715		"region":  c.region,
34716		"router":  c.router,
34717	})
34718	req.Header.Set("User-Agent", c.s.userAgent())
34719	if c.ifNoneMatch_ != "" {
34720		req.Header.Set("If-None-Match", c.ifNoneMatch_)
34721	}
34722	if c.ctx_ != nil {
34723		return ctxhttp.Do(c.ctx_, c.s.client, req)
34724	}
34725	return c.s.client.Do(req)
34726}
34727
34728// Do executes the "compute.routers.getRouterStatus" call.
34729// Exactly one of *RouterStatusResponse or error will be non-nil. Any
34730// non-2xx status code is an error. Response headers are in either
34731// *RouterStatusResponse.ServerResponse.Header or (if a response was
34732// returned at all) in error.(*googleapi.Error).Header. Use
34733// googleapi.IsNotModified to check whether the returned error was
34734// because http.StatusNotModified was returned.
34735func (c *RoutersGetRouterStatusCall) Do(opts ...googleapi.CallOption) (*RouterStatusResponse, error) {
34736	gensupport.SetOptions(c.urlParams_, opts...)
34737	res, err := c.doRequest("json")
34738	if res != nil && res.StatusCode == http.StatusNotModified {
34739		if res.Body != nil {
34740			res.Body.Close()
34741		}
34742		return nil, &googleapi.Error{
34743			Code:   res.StatusCode,
34744			Header: res.Header,
34745		}
34746	}
34747	if err != nil {
34748		return nil, err
34749	}
34750	defer googleapi.CloseBody(res)
34751	if err := googleapi.CheckResponse(res); err != nil {
34752		return nil, err
34753	}
34754	ret := &RouterStatusResponse{
34755		ServerResponse: googleapi.ServerResponse{
34756			Header:         res.Header,
34757			HTTPStatusCode: res.StatusCode,
34758		},
34759	}
34760	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34761		return nil, err
34762	}
34763	return ret, nil
34764	// {
34765	//   "description": "Retrieves runtime information of the specified router.",
34766	//   "httpMethod": "GET",
34767	//   "id": "compute.routers.getRouterStatus",
34768	//   "parameterOrder": [
34769	//     "project",
34770	//     "region",
34771	//     "router"
34772	//   ],
34773	//   "parameters": {
34774	//     "project": {
34775	//       "description": "Project ID for this request.",
34776	//       "location": "path",
34777	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34778	//       "required": true,
34779	//       "type": "string"
34780	//     },
34781	//     "region": {
34782	//       "description": "Name of the region for this request.",
34783	//       "location": "path",
34784	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34785	//       "required": true,
34786	//       "type": "string"
34787	//     },
34788	//     "router": {
34789	//       "description": "Name of the Router resource to query.",
34790	//       "location": "path",
34791	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34792	//       "required": true,
34793	//       "type": "string"
34794	//     }
34795	//   },
34796	//   "path": "{project}/regions/{region}/routers/{router}/getRouterStatus",
34797	//   "response": {
34798	//     "$ref": "RouterStatusResponse"
34799	//   },
34800	//   "scopes": [
34801	//     "https://www.googleapis.com/auth/cloud-platform",
34802	//     "https://www.googleapis.com/auth/compute",
34803	//     "https://www.googleapis.com/auth/compute.readonly"
34804	//   ]
34805	// }
34806
34807}
34808
34809// method id "compute.routers.insert":
34810
34811type RoutersInsertCall struct {
34812	s          *Service
34813	project    string
34814	region     string
34815	router     *Router
34816	urlParams_ gensupport.URLParams
34817	ctx_       context.Context
34818}
34819
34820// Insert: Creates a Router resource in the specified project and region
34821// using the data included in the request.
34822func (r *RoutersService) Insert(project string, region string, router *Router) *RoutersInsertCall {
34823	c := &RoutersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34824	c.project = project
34825	c.region = region
34826	c.router = router
34827	return c
34828}
34829
34830// Fields allows partial responses to be retrieved. See
34831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
34832// for more information.
34833func (c *RoutersInsertCall) Fields(s ...googleapi.Field) *RoutersInsertCall {
34834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
34835	return c
34836}
34837
34838// Context sets the context to be used in this call's Do method. Any
34839// pending HTTP request will be aborted if the provided context is
34840// canceled.
34841func (c *RoutersInsertCall) Context(ctx context.Context) *RoutersInsertCall {
34842	c.ctx_ = ctx
34843	return c
34844}
34845
34846func (c *RoutersInsertCall) doRequest(alt string) (*http.Response, error) {
34847	var body io.Reader = nil
34848	body, err := googleapi.WithoutDataWrapper.JSONReader(c.router)
34849	if err != nil {
34850		return nil, err
34851	}
34852	ctype := "application/json"
34853	c.urlParams_.Set("alt", alt)
34854	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers")
34855	urls += "?" + c.urlParams_.Encode()
34856	req, _ := http.NewRequest("POST", urls, body)
34857	googleapi.Expand(req.URL, map[string]string{
34858		"project": c.project,
34859		"region":  c.region,
34860	})
34861	req.Header.Set("Content-Type", ctype)
34862	req.Header.Set("User-Agent", c.s.userAgent())
34863	if c.ctx_ != nil {
34864		return ctxhttp.Do(c.ctx_, c.s.client, req)
34865	}
34866	return c.s.client.Do(req)
34867}
34868
34869// Do executes the "compute.routers.insert" call.
34870// Exactly one of *Operation or error will be non-nil. Any non-2xx
34871// status code is an error. Response headers are in either
34872// *Operation.ServerResponse.Header or (if a response was returned at
34873// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
34874// to check whether the returned error was because
34875// http.StatusNotModified was returned.
34876func (c *RoutersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
34877	gensupport.SetOptions(c.urlParams_, opts...)
34878	res, err := c.doRequest("json")
34879	if res != nil && res.StatusCode == http.StatusNotModified {
34880		if res.Body != nil {
34881			res.Body.Close()
34882		}
34883		return nil, &googleapi.Error{
34884			Code:   res.StatusCode,
34885			Header: res.Header,
34886		}
34887	}
34888	if err != nil {
34889		return nil, err
34890	}
34891	defer googleapi.CloseBody(res)
34892	if err := googleapi.CheckResponse(res); err != nil {
34893		return nil, err
34894	}
34895	ret := &Operation{
34896		ServerResponse: googleapi.ServerResponse{
34897			Header:         res.Header,
34898			HTTPStatusCode: res.StatusCode,
34899		},
34900	}
34901	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
34902		return nil, err
34903	}
34904	return ret, nil
34905	// {
34906	//   "description": "Creates a Router resource in the specified project and region using the data included in the request.",
34907	//   "httpMethod": "POST",
34908	//   "id": "compute.routers.insert",
34909	//   "parameterOrder": [
34910	//     "project",
34911	//     "region"
34912	//   ],
34913	//   "parameters": {
34914	//     "project": {
34915	//       "description": "Project ID for this request.",
34916	//       "location": "path",
34917	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
34918	//       "required": true,
34919	//       "type": "string"
34920	//     },
34921	//     "region": {
34922	//       "description": "Name of the region for this request.",
34923	//       "location": "path",
34924	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
34925	//       "required": true,
34926	//       "type": "string"
34927	//     }
34928	//   },
34929	//   "path": "{project}/regions/{region}/routers",
34930	//   "request": {
34931	//     "$ref": "Router"
34932	//   },
34933	//   "response": {
34934	//     "$ref": "Operation"
34935	//   },
34936	//   "scopes": [
34937	//     "https://www.googleapis.com/auth/cloud-platform",
34938	//     "https://www.googleapis.com/auth/compute"
34939	//   ]
34940	// }
34941
34942}
34943
34944// method id "compute.routers.list":
34945
34946type RoutersListCall struct {
34947	s            *Service
34948	project      string
34949	region       string
34950	urlParams_   gensupport.URLParams
34951	ifNoneMatch_ string
34952	ctx_         context.Context
34953}
34954
34955// List: Retrieves a list of Router resources available to the specified
34956// project.
34957func (r *RoutersService) List(project string, region string) *RoutersListCall {
34958	c := &RoutersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
34959	c.project = project
34960	c.region = region
34961	return c
34962}
34963
34964// Filter sets the optional parameter "filter": Sets a filter expression
34965// for filtering listed resources, in the form filter={expression}. Your
34966// {expression} must be in the format: field_name comparison_string
34967// literal_string.
34968//
34969// The field_name is the name of the field you want to compare. Only
34970// atomic field types are supported (string, number, boolean). The
34971// comparison_string must be either eq (equals) or ne (not equals). The
34972// literal_string is the string value to filter to. The literal value
34973// must be valid for the type of field you are filtering by (string,
34974// number, boolean). For string fields, the literal value is interpreted
34975// as a regular expression using RE2 syntax. The literal value must
34976// match the entire field.
34977//
34978// For example, to filter for instances that do not have a name of
34979// example-instance, you would use filter=name ne
34980// example-instance.
34981//
34982// Compute Engine Beta API Only: If you use filtering in the Beta API,
34983// you can also filter on nested fields. For example, you could filter
34984// on instances that have set the scheduling.automaticRestart field to
34985// true. In particular, use filtering on nested fields to take advantage
34986// of instance labels to organize and filter results based on label
34987// values.
34988//
34989// The Beta API also supports filtering on multiple expressions by
34990// providing each separate expression within parentheses. For example,
34991// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
34992// Multiple expressions are treated as AND expressions, meaning that
34993// resources must match all expressions to pass the filters.
34994func (c *RoutersListCall) Filter(filter string) *RoutersListCall {
34995	c.urlParams_.Set("filter", filter)
34996	return c
34997}
34998
34999// MaxResults sets the optional parameter "maxResults": The maximum
35000// number of results per page that should be returned. If the number of
35001// available results is larger than maxResults, Compute Engine returns a
35002// nextPageToken that can be used to get the next page of results in
35003// subsequent list requests.
35004func (c *RoutersListCall) MaxResults(maxResults int64) *RoutersListCall {
35005	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
35006	return c
35007}
35008
35009// OrderBy sets the optional parameter "orderBy": Sorts list results by
35010// a certain order. By default, results are returned in alphanumerical
35011// order based on the resource name.
35012//
35013// You can also sort results in descending order based on the creation
35014// timestamp using orderBy="creationTimestamp desc". This sorts results
35015// based on the creationTimestamp field in reverse chronological order
35016// (newest result first). Use this to sort resources like operations so
35017// that the newest operation is returned first.
35018//
35019// Currently, only sorting by name or creationTimestamp desc is
35020// supported.
35021func (c *RoutersListCall) OrderBy(orderBy string) *RoutersListCall {
35022	c.urlParams_.Set("orderBy", orderBy)
35023	return c
35024}
35025
35026// PageToken sets the optional parameter "pageToken": Specifies a page
35027// token to use. Set pageToken to the nextPageToken returned by a
35028// previous list request to get the next page of results.
35029func (c *RoutersListCall) PageToken(pageToken string) *RoutersListCall {
35030	c.urlParams_.Set("pageToken", pageToken)
35031	return c
35032}
35033
35034// Fields allows partial responses to be retrieved. See
35035// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35036// for more information.
35037func (c *RoutersListCall) Fields(s ...googleapi.Field) *RoutersListCall {
35038	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35039	return c
35040}
35041
35042// IfNoneMatch sets the optional parameter which makes the operation
35043// fail if the object's ETag matches the given value. This is useful for
35044// getting updates only after the object has changed since the last
35045// request. Use googleapi.IsNotModified to check whether the response
35046// error from Do is the result of In-None-Match.
35047func (c *RoutersListCall) IfNoneMatch(entityTag string) *RoutersListCall {
35048	c.ifNoneMatch_ = entityTag
35049	return c
35050}
35051
35052// Context sets the context to be used in this call's Do method. Any
35053// pending HTTP request will be aborted if the provided context is
35054// canceled.
35055func (c *RoutersListCall) Context(ctx context.Context) *RoutersListCall {
35056	c.ctx_ = ctx
35057	return c
35058}
35059
35060func (c *RoutersListCall) doRequest(alt string) (*http.Response, error) {
35061	var body io.Reader = nil
35062	c.urlParams_.Set("alt", alt)
35063	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers")
35064	urls += "?" + c.urlParams_.Encode()
35065	req, _ := http.NewRequest("GET", urls, body)
35066	googleapi.Expand(req.URL, map[string]string{
35067		"project": c.project,
35068		"region":  c.region,
35069	})
35070	req.Header.Set("User-Agent", c.s.userAgent())
35071	if c.ifNoneMatch_ != "" {
35072		req.Header.Set("If-None-Match", c.ifNoneMatch_)
35073	}
35074	if c.ctx_ != nil {
35075		return ctxhttp.Do(c.ctx_, c.s.client, req)
35076	}
35077	return c.s.client.Do(req)
35078}
35079
35080// Do executes the "compute.routers.list" call.
35081// Exactly one of *RouterList or error will be non-nil. Any non-2xx
35082// status code is an error. Response headers are in either
35083// *RouterList.ServerResponse.Header or (if a response was returned at
35084// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35085// to check whether the returned error was because
35086// http.StatusNotModified was returned.
35087func (c *RoutersListCall) Do(opts ...googleapi.CallOption) (*RouterList, error) {
35088	gensupport.SetOptions(c.urlParams_, opts...)
35089	res, err := c.doRequest("json")
35090	if res != nil && res.StatusCode == http.StatusNotModified {
35091		if res.Body != nil {
35092			res.Body.Close()
35093		}
35094		return nil, &googleapi.Error{
35095			Code:   res.StatusCode,
35096			Header: res.Header,
35097		}
35098	}
35099	if err != nil {
35100		return nil, err
35101	}
35102	defer googleapi.CloseBody(res)
35103	if err := googleapi.CheckResponse(res); err != nil {
35104		return nil, err
35105	}
35106	ret := &RouterList{
35107		ServerResponse: googleapi.ServerResponse{
35108			Header:         res.Header,
35109			HTTPStatusCode: res.StatusCode,
35110		},
35111	}
35112	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35113		return nil, err
35114	}
35115	return ret, nil
35116	// {
35117	//   "description": "Retrieves a list of Router resources available to the specified project.",
35118	//   "httpMethod": "GET",
35119	//   "id": "compute.routers.list",
35120	//   "parameterOrder": [
35121	//     "project",
35122	//     "region"
35123	//   ],
35124	//   "parameters": {
35125	//     "filter": {
35126	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
35127	//       "location": "query",
35128	//       "type": "string"
35129	//     },
35130	//     "maxResults": {
35131	//       "default": "500",
35132	//       "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.",
35133	//       "format": "uint32",
35134	//       "location": "query",
35135	//       "maximum": "500",
35136	//       "minimum": "0",
35137	//       "type": "integer"
35138	//     },
35139	//     "orderBy": {
35140	//       "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.",
35141	//       "location": "query",
35142	//       "type": "string"
35143	//     },
35144	//     "pageToken": {
35145	//       "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.",
35146	//       "location": "query",
35147	//       "type": "string"
35148	//     },
35149	//     "project": {
35150	//       "description": "Project ID for this request.",
35151	//       "location": "path",
35152	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35153	//       "required": true,
35154	//       "type": "string"
35155	//     },
35156	//     "region": {
35157	//       "description": "Name of the region for this request.",
35158	//       "location": "path",
35159	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35160	//       "required": true,
35161	//       "type": "string"
35162	//     }
35163	//   },
35164	//   "path": "{project}/regions/{region}/routers",
35165	//   "response": {
35166	//     "$ref": "RouterList"
35167	//   },
35168	//   "scopes": [
35169	//     "https://www.googleapis.com/auth/cloud-platform",
35170	//     "https://www.googleapis.com/auth/compute",
35171	//     "https://www.googleapis.com/auth/compute.readonly"
35172	//   ]
35173	// }
35174
35175}
35176
35177// Pages invokes f for each page of results.
35178// A non-nil error returned from f will halt the iteration.
35179// The provided context supersedes any context provided to the Context method.
35180func (c *RoutersListCall) Pages(ctx context.Context, f func(*RouterList) error) error {
35181	c.ctx_ = ctx
35182	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
35183	for {
35184		x, err := c.Do()
35185		if err != nil {
35186			return err
35187		}
35188		if err := f(x); err != nil {
35189			return err
35190		}
35191		if x.NextPageToken == "" {
35192			return nil
35193		}
35194		c.PageToken(x.NextPageToken)
35195	}
35196}
35197
35198// method id "compute.routers.patch":
35199
35200type RoutersPatchCall struct {
35201	s          *Service
35202	project    string
35203	region     string
35204	router     string
35205	router2    *Router
35206	urlParams_ gensupport.URLParams
35207	ctx_       context.Context
35208}
35209
35210// Patch: Updates the entire content of the Router resource. This method
35211// supports patch semantics.
35212func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall {
35213	c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35214	c.project = project
35215	c.region = region
35216	c.router = router
35217	c.router2 = router2
35218	return c
35219}
35220
35221// Fields allows partial responses to be retrieved. See
35222// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35223// for more information.
35224func (c *RoutersPatchCall) Fields(s ...googleapi.Field) *RoutersPatchCall {
35225	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35226	return c
35227}
35228
35229// Context sets the context to be used in this call's Do method. Any
35230// pending HTTP request will be aborted if the provided context is
35231// canceled.
35232func (c *RoutersPatchCall) Context(ctx context.Context) *RoutersPatchCall {
35233	c.ctx_ = ctx
35234	return c
35235}
35236
35237func (c *RoutersPatchCall) doRequest(alt string) (*http.Response, error) {
35238	var body io.Reader = nil
35239	body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2)
35240	if err != nil {
35241		return nil, err
35242	}
35243	ctype := "application/json"
35244	c.urlParams_.Set("alt", alt)
35245	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}")
35246	urls += "?" + c.urlParams_.Encode()
35247	req, _ := http.NewRequest("PATCH", urls, body)
35248	googleapi.Expand(req.URL, map[string]string{
35249		"project": c.project,
35250		"region":  c.region,
35251		"router":  c.router,
35252	})
35253	req.Header.Set("Content-Type", ctype)
35254	req.Header.Set("User-Agent", c.s.userAgent())
35255	if c.ctx_ != nil {
35256		return ctxhttp.Do(c.ctx_, c.s.client, req)
35257	}
35258	return c.s.client.Do(req)
35259}
35260
35261// Do executes the "compute.routers.patch" call.
35262// Exactly one of *Operation or error will be non-nil. Any non-2xx
35263// status code is an error. Response headers are in either
35264// *Operation.ServerResponse.Header or (if a response was returned at
35265// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35266// to check whether the returned error was because
35267// http.StatusNotModified was returned.
35268func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35269	gensupport.SetOptions(c.urlParams_, opts...)
35270	res, err := c.doRequest("json")
35271	if res != nil && res.StatusCode == http.StatusNotModified {
35272		if res.Body != nil {
35273			res.Body.Close()
35274		}
35275		return nil, &googleapi.Error{
35276			Code:   res.StatusCode,
35277			Header: res.Header,
35278		}
35279	}
35280	if err != nil {
35281		return nil, err
35282	}
35283	defer googleapi.CloseBody(res)
35284	if err := googleapi.CheckResponse(res); err != nil {
35285		return nil, err
35286	}
35287	ret := &Operation{
35288		ServerResponse: googleapi.ServerResponse{
35289			Header:         res.Header,
35290			HTTPStatusCode: res.StatusCode,
35291		},
35292	}
35293	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35294		return nil, err
35295	}
35296	return ret, nil
35297	// {
35298	//   "description": "Updates the entire content of the Router resource. This method supports patch semantics.",
35299	//   "httpMethod": "PATCH",
35300	//   "id": "compute.routers.patch",
35301	//   "parameterOrder": [
35302	//     "project",
35303	//     "region",
35304	//     "router"
35305	//   ],
35306	//   "parameters": {
35307	//     "project": {
35308	//       "description": "Project ID for this request.",
35309	//       "location": "path",
35310	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35311	//       "required": true,
35312	//       "type": "string"
35313	//     },
35314	//     "region": {
35315	//       "description": "Name of the region for this request.",
35316	//       "location": "path",
35317	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35318	//       "required": true,
35319	//       "type": "string"
35320	//     },
35321	//     "router": {
35322	//       "description": "Name of the Router resource to update.",
35323	//       "location": "path",
35324	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35325	//       "required": true,
35326	//       "type": "string"
35327	//     }
35328	//   },
35329	//   "path": "{project}/regions/{region}/routers/{router}",
35330	//   "request": {
35331	//     "$ref": "Router"
35332	//   },
35333	//   "response": {
35334	//     "$ref": "Operation"
35335	//   },
35336	//   "scopes": [
35337	//     "https://www.googleapis.com/auth/cloud-platform",
35338	//     "https://www.googleapis.com/auth/compute"
35339	//   ]
35340	// }
35341
35342}
35343
35344// method id "compute.routers.testIamPermissions":
35345
35346type RoutersTestIamPermissionsCall struct {
35347	s                      *Service
35348	project                string
35349	region                 string
35350	resource               string
35351	testpermissionsrequest *TestPermissionsRequest
35352	urlParams_             gensupport.URLParams
35353	ctx_                   context.Context
35354}
35355
35356// TestIamPermissions: Returns permissions that a caller has on the
35357// specified resource.
35358func (r *RoutersService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutersTestIamPermissionsCall {
35359	c := &RoutersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35360	c.project = project
35361	c.region = region
35362	c.resource = resource
35363	c.testpermissionsrequest = testpermissionsrequest
35364	return c
35365}
35366
35367// Fields allows partial responses to be retrieved. See
35368// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35369// for more information.
35370func (c *RoutersTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutersTestIamPermissionsCall {
35371	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35372	return c
35373}
35374
35375// Context sets the context to be used in this call's Do method. Any
35376// pending HTTP request will be aborted if the provided context is
35377// canceled.
35378func (c *RoutersTestIamPermissionsCall) Context(ctx context.Context) *RoutersTestIamPermissionsCall {
35379	c.ctx_ = ctx
35380	return c
35381}
35382
35383func (c *RoutersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
35384	var body io.Reader = nil
35385	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
35386	if err != nil {
35387		return nil, err
35388	}
35389	ctype := "application/json"
35390	c.urlParams_.Set("alt", alt)
35391	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{resource}/testIamPermissions")
35392	urls += "?" + c.urlParams_.Encode()
35393	req, _ := http.NewRequest("POST", urls, body)
35394	googleapi.Expand(req.URL, map[string]string{
35395		"project":  c.project,
35396		"region":   c.region,
35397		"resource": c.resource,
35398	})
35399	req.Header.Set("Content-Type", ctype)
35400	req.Header.Set("User-Agent", c.s.userAgent())
35401	if c.ctx_ != nil {
35402		return ctxhttp.Do(c.ctx_, c.s.client, req)
35403	}
35404	return c.s.client.Do(req)
35405}
35406
35407// Do executes the "compute.routers.testIamPermissions" call.
35408// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
35409// non-2xx status code is an error. Response headers are in either
35410// *TestPermissionsResponse.ServerResponse.Header or (if a response was
35411// returned at all) in error.(*googleapi.Error).Header. Use
35412// googleapi.IsNotModified to check whether the returned error was
35413// because http.StatusNotModified was returned.
35414func (c *RoutersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
35415	gensupport.SetOptions(c.urlParams_, opts...)
35416	res, err := c.doRequest("json")
35417	if res != nil && res.StatusCode == http.StatusNotModified {
35418		if res.Body != nil {
35419			res.Body.Close()
35420		}
35421		return nil, &googleapi.Error{
35422			Code:   res.StatusCode,
35423			Header: res.Header,
35424		}
35425	}
35426	if err != nil {
35427		return nil, err
35428	}
35429	defer googleapi.CloseBody(res)
35430	if err := googleapi.CheckResponse(res); err != nil {
35431		return nil, err
35432	}
35433	ret := &TestPermissionsResponse{
35434		ServerResponse: googleapi.ServerResponse{
35435			Header:         res.Header,
35436			HTTPStatusCode: res.StatusCode,
35437		},
35438	}
35439	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35440		return nil, err
35441	}
35442	return ret, nil
35443	// {
35444	//   "description": "Returns permissions that a caller has on the specified resource.",
35445	//   "httpMethod": "POST",
35446	//   "id": "compute.routers.testIamPermissions",
35447	//   "parameterOrder": [
35448	//     "project",
35449	//     "region",
35450	//     "resource"
35451	//   ],
35452	//   "parameters": {
35453	//     "project": {
35454	//       "description": "Project ID for this request.",
35455	//       "location": "path",
35456	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35457	//       "required": true,
35458	//       "type": "string"
35459	//     },
35460	//     "region": {
35461	//       "description": "The name of the region for this request.",
35462	//       "location": "path",
35463	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35464	//       "required": true,
35465	//       "type": "string"
35466	//     },
35467	//     "resource": {
35468	//       "description": "Name of the resource for this request.",
35469	//       "location": "path",
35470	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35471	//       "required": true,
35472	//       "type": "string"
35473	//     }
35474	//   },
35475	//   "path": "{project}/regions/{region}/routers/{resource}/testIamPermissions",
35476	//   "request": {
35477	//     "$ref": "TestPermissionsRequest"
35478	//   },
35479	//   "response": {
35480	//     "$ref": "TestPermissionsResponse"
35481	//   },
35482	//   "scopes": [
35483	//     "https://www.googleapis.com/auth/cloud-platform",
35484	//     "https://www.googleapis.com/auth/compute",
35485	//     "https://www.googleapis.com/auth/compute.readonly"
35486	//   ]
35487	// }
35488
35489}
35490
35491// method id "compute.routers.update":
35492
35493type RoutersUpdateCall struct {
35494	s          *Service
35495	project    string
35496	region     string
35497	router     string
35498	router2    *Router
35499	urlParams_ gensupport.URLParams
35500	ctx_       context.Context
35501}
35502
35503// Update: Updates the entire content of the Router resource.
35504func (r *RoutersService) Update(project string, region string, router string, router2 *Router) *RoutersUpdateCall {
35505	c := &RoutersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35506	c.project = project
35507	c.region = region
35508	c.router = router
35509	c.router2 = router2
35510	return c
35511}
35512
35513// Fields allows partial responses to be retrieved. See
35514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35515// for more information.
35516func (c *RoutersUpdateCall) Fields(s ...googleapi.Field) *RoutersUpdateCall {
35517	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35518	return c
35519}
35520
35521// Context sets the context to be used in this call's Do method. Any
35522// pending HTTP request will be aborted if the provided context is
35523// canceled.
35524func (c *RoutersUpdateCall) Context(ctx context.Context) *RoutersUpdateCall {
35525	c.ctx_ = ctx
35526	return c
35527}
35528
35529func (c *RoutersUpdateCall) doRequest(alt string) (*http.Response, error) {
35530	var body io.Reader = nil
35531	body, err := googleapi.WithoutDataWrapper.JSONReader(c.router2)
35532	if err != nil {
35533		return nil, err
35534	}
35535	ctype := "application/json"
35536	c.urlParams_.Set("alt", alt)
35537	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/routers/{router}")
35538	urls += "?" + c.urlParams_.Encode()
35539	req, _ := http.NewRequest("PUT", urls, body)
35540	googleapi.Expand(req.URL, map[string]string{
35541		"project": c.project,
35542		"region":  c.region,
35543		"router":  c.router,
35544	})
35545	req.Header.Set("Content-Type", ctype)
35546	req.Header.Set("User-Agent", c.s.userAgent())
35547	if c.ctx_ != nil {
35548		return ctxhttp.Do(c.ctx_, c.s.client, req)
35549	}
35550	return c.s.client.Do(req)
35551}
35552
35553// Do executes the "compute.routers.update" call.
35554// Exactly one of *Operation or error will be non-nil. Any non-2xx
35555// status code is an error. Response headers are in either
35556// *Operation.ServerResponse.Header or (if a response was returned at
35557// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35558// to check whether the returned error was because
35559// http.StatusNotModified was returned.
35560func (c *RoutersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35561	gensupport.SetOptions(c.urlParams_, opts...)
35562	res, err := c.doRequest("json")
35563	if res != nil && res.StatusCode == http.StatusNotModified {
35564		if res.Body != nil {
35565			res.Body.Close()
35566		}
35567		return nil, &googleapi.Error{
35568			Code:   res.StatusCode,
35569			Header: res.Header,
35570		}
35571	}
35572	if err != nil {
35573		return nil, err
35574	}
35575	defer googleapi.CloseBody(res)
35576	if err := googleapi.CheckResponse(res); err != nil {
35577		return nil, err
35578	}
35579	ret := &Operation{
35580		ServerResponse: googleapi.ServerResponse{
35581			Header:         res.Header,
35582			HTTPStatusCode: res.StatusCode,
35583		},
35584	}
35585	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35586		return nil, err
35587	}
35588	return ret, nil
35589	// {
35590	//   "description": "Updates the entire content of the Router resource.",
35591	//   "httpMethod": "PUT",
35592	//   "id": "compute.routers.update",
35593	//   "parameterOrder": [
35594	//     "project",
35595	//     "region",
35596	//     "router"
35597	//   ],
35598	//   "parameters": {
35599	//     "project": {
35600	//       "description": "Project ID for this request.",
35601	//       "location": "path",
35602	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35603	//       "required": true,
35604	//       "type": "string"
35605	//     },
35606	//     "region": {
35607	//       "description": "Name of the region for this request.",
35608	//       "location": "path",
35609	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35610	//       "required": true,
35611	//       "type": "string"
35612	//     },
35613	//     "router": {
35614	//       "description": "Name of the Router resource to update.",
35615	//       "location": "path",
35616	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35617	//       "required": true,
35618	//       "type": "string"
35619	//     }
35620	//   },
35621	//   "path": "{project}/regions/{region}/routers/{router}",
35622	//   "request": {
35623	//     "$ref": "Router"
35624	//   },
35625	//   "response": {
35626	//     "$ref": "Operation"
35627	//   },
35628	//   "scopes": [
35629	//     "https://www.googleapis.com/auth/cloud-platform",
35630	//     "https://www.googleapis.com/auth/compute"
35631	//   ]
35632	// }
35633
35634}
35635
35636// method id "compute.routes.delete":
35637
35638type RoutesDeleteCall struct {
35639	s          *Service
35640	project    string
35641	route      string
35642	urlParams_ gensupport.URLParams
35643	ctx_       context.Context
35644}
35645
35646// Delete: Deletes the specified Route resource.
35647// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/delete
35648func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall {
35649	c := &RoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35650	c.project = project
35651	c.route = route
35652	return c
35653}
35654
35655// Fields allows partial responses to be retrieved. See
35656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35657// for more information.
35658func (c *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall {
35659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35660	return c
35661}
35662
35663// Context sets the context to be used in this call's Do method. Any
35664// pending HTTP request will be aborted if the provided context is
35665// canceled.
35666func (c *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall {
35667	c.ctx_ = ctx
35668	return c
35669}
35670
35671func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
35672	var body io.Reader = nil
35673	c.urlParams_.Set("alt", alt)
35674	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}")
35675	urls += "?" + c.urlParams_.Encode()
35676	req, _ := http.NewRequest("DELETE", urls, body)
35677	googleapi.Expand(req.URL, map[string]string{
35678		"project": c.project,
35679		"route":   c.route,
35680	})
35681	req.Header.Set("User-Agent", c.s.userAgent())
35682	if c.ctx_ != nil {
35683		return ctxhttp.Do(c.ctx_, c.s.client, req)
35684	}
35685	return c.s.client.Do(req)
35686}
35687
35688// Do executes the "compute.routes.delete" call.
35689// Exactly one of *Operation or error will be non-nil. Any non-2xx
35690// status code is an error. Response headers are in either
35691// *Operation.ServerResponse.Header or (if a response was returned at
35692// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35693// to check whether the returned error was because
35694// http.StatusNotModified was returned.
35695func (c *RoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35696	gensupport.SetOptions(c.urlParams_, opts...)
35697	res, err := c.doRequest("json")
35698	if res != nil && res.StatusCode == http.StatusNotModified {
35699		if res.Body != nil {
35700			res.Body.Close()
35701		}
35702		return nil, &googleapi.Error{
35703			Code:   res.StatusCode,
35704			Header: res.Header,
35705		}
35706	}
35707	if err != nil {
35708		return nil, err
35709	}
35710	defer googleapi.CloseBody(res)
35711	if err := googleapi.CheckResponse(res); err != nil {
35712		return nil, err
35713	}
35714	ret := &Operation{
35715		ServerResponse: googleapi.ServerResponse{
35716			Header:         res.Header,
35717			HTTPStatusCode: res.StatusCode,
35718		},
35719	}
35720	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35721		return nil, err
35722	}
35723	return ret, nil
35724	// {
35725	//   "description": "Deletes the specified Route resource.",
35726	//   "httpMethod": "DELETE",
35727	//   "id": "compute.routes.delete",
35728	//   "parameterOrder": [
35729	//     "project",
35730	//     "route"
35731	//   ],
35732	//   "parameters": {
35733	//     "project": {
35734	//       "description": "Project ID for this request.",
35735	//       "location": "path",
35736	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35737	//       "required": true,
35738	//       "type": "string"
35739	//     },
35740	//     "route": {
35741	//       "description": "Name of the Route resource to delete.",
35742	//       "location": "path",
35743	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35744	//       "required": true,
35745	//       "type": "string"
35746	//     }
35747	//   },
35748	//   "path": "{project}/global/routes/{route}",
35749	//   "response": {
35750	//     "$ref": "Operation"
35751	//   },
35752	//   "scopes": [
35753	//     "https://www.googleapis.com/auth/cloud-platform",
35754	//     "https://www.googleapis.com/auth/compute"
35755	//   ]
35756	// }
35757
35758}
35759
35760// method id "compute.routes.get":
35761
35762type RoutesGetCall struct {
35763	s            *Service
35764	project      string
35765	route        string
35766	urlParams_   gensupport.URLParams
35767	ifNoneMatch_ string
35768	ctx_         context.Context
35769}
35770
35771// Get: Returns the specified Route resource. Get a list of available
35772// routes by making a list() request.
35773// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/get
35774func (r *RoutesService) Get(project string, route string) *RoutesGetCall {
35775	c := &RoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35776	c.project = project
35777	c.route = route
35778	return c
35779}
35780
35781// Fields allows partial responses to be retrieved. See
35782// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35783// for more information.
35784func (c *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall {
35785	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35786	return c
35787}
35788
35789// IfNoneMatch sets the optional parameter which makes the operation
35790// fail if the object's ETag matches the given value. This is useful for
35791// getting updates only after the object has changed since the last
35792// request. Use googleapi.IsNotModified to check whether the response
35793// error from Do is the result of In-None-Match.
35794func (c *RoutesGetCall) IfNoneMatch(entityTag string) *RoutesGetCall {
35795	c.ifNoneMatch_ = entityTag
35796	return c
35797}
35798
35799// Context sets the context to be used in this call's Do method. Any
35800// pending HTTP request will be aborted if the provided context is
35801// canceled.
35802func (c *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall {
35803	c.ctx_ = ctx
35804	return c
35805}
35806
35807func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) {
35808	var body io.Reader = nil
35809	c.urlParams_.Set("alt", alt)
35810	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}")
35811	urls += "?" + c.urlParams_.Encode()
35812	req, _ := http.NewRequest("GET", urls, body)
35813	googleapi.Expand(req.URL, map[string]string{
35814		"project": c.project,
35815		"route":   c.route,
35816	})
35817	req.Header.Set("User-Agent", c.s.userAgent())
35818	if c.ifNoneMatch_ != "" {
35819		req.Header.Set("If-None-Match", c.ifNoneMatch_)
35820	}
35821	if c.ctx_ != nil {
35822		return ctxhttp.Do(c.ctx_, c.s.client, req)
35823	}
35824	return c.s.client.Do(req)
35825}
35826
35827// Do executes the "compute.routes.get" call.
35828// Exactly one of *Route or error will be non-nil. Any non-2xx status
35829// code is an error. Response headers are in either
35830// *Route.ServerResponse.Header or (if a response was returned at all)
35831// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
35832// check whether the returned error was because http.StatusNotModified
35833// was returned.
35834func (c *RoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) {
35835	gensupport.SetOptions(c.urlParams_, opts...)
35836	res, err := c.doRequest("json")
35837	if res != nil && res.StatusCode == http.StatusNotModified {
35838		if res.Body != nil {
35839			res.Body.Close()
35840		}
35841		return nil, &googleapi.Error{
35842			Code:   res.StatusCode,
35843			Header: res.Header,
35844		}
35845	}
35846	if err != nil {
35847		return nil, err
35848	}
35849	defer googleapi.CloseBody(res)
35850	if err := googleapi.CheckResponse(res); err != nil {
35851		return nil, err
35852	}
35853	ret := &Route{
35854		ServerResponse: googleapi.ServerResponse{
35855			Header:         res.Header,
35856			HTTPStatusCode: res.StatusCode,
35857		},
35858	}
35859	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35860		return nil, err
35861	}
35862	return ret, nil
35863	// {
35864	//   "description": "Returns the specified Route resource. Get a list of available routes by making a list() request.",
35865	//   "httpMethod": "GET",
35866	//   "id": "compute.routes.get",
35867	//   "parameterOrder": [
35868	//     "project",
35869	//     "route"
35870	//   ],
35871	//   "parameters": {
35872	//     "project": {
35873	//       "description": "Project ID for this request.",
35874	//       "location": "path",
35875	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
35876	//       "required": true,
35877	//       "type": "string"
35878	//     },
35879	//     "route": {
35880	//       "description": "Name of the Route resource to return.",
35881	//       "location": "path",
35882	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
35883	//       "required": true,
35884	//       "type": "string"
35885	//     }
35886	//   },
35887	//   "path": "{project}/global/routes/{route}",
35888	//   "response": {
35889	//     "$ref": "Route"
35890	//   },
35891	//   "scopes": [
35892	//     "https://www.googleapis.com/auth/cloud-platform",
35893	//     "https://www.googleapis.com/auth/compute",
35894	//     "https://www.googleapis.com/auth/compute.readonly"
35895	//   ]
35896	// }
35897
35898}
35899
35900// method id "compute.routes.insert":
35901
35902type RoutesInsertCall struct {
35903	s          *Service
35904	project    string
35905	route      *Route
35906	urlParams_ gensupport.URLParams
35907	ctx_       context.Context
35908}
35909
35910// Insert: Creates a Route resource in the specified project using the
35911// data included in the request.
35912// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/insert
35913func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall {
35914	c := &RoutesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
35915	c.project = project
35916	c.route = route
35917	return c
35918}
35919
35920// Fields allows partial responses to be retrieved. See
35921// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
35922// for more information.
35923func (c *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall {
35924	c.urlParams_.Set("fields", googleapi.CombineFields(s))
35925	return c
35926}
35927
35928// Context sets the context to be used in this call's Do method. Any
35929// pending HTTP request will be aborted if the provided context is
35930// canceled.
35931func (c *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall {
35932	c.ctx_ = ctx
35933	return c
35934}
35935
35936func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) {
35937	var body io.Reader = nil
35938	body, err := googleapi.WithoutDataWrapper.JSONReader(c.route)
35939	if err != nil {
35940		return nil, err
35941	}
35942	ctype := "application/json"
35943	c.urlParams_.Set("alt", alt)
35944	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes")
35945	urls += "?" + c.urlParams_.Encode()
35946	req, _ := http.NewRequest("POST", urls, body)
35947	googleapi.Expand(req.URL, map[string]string{
35948		"project": c.project,
35949	})
35950	req.Header.Set("Content-Type", ctype)
35951	req.Header.Set("User-Agent", c.s.userAgent())
35952	if c.ctx_ != nil {
35953		return ctxhttp.Do(c.ctx_, c.s.client, req)
35954	}
35955	return c.s.client.Do(req)
35956}
35957
35958// Do executes the "compute.routes.insert" call.
35959// Exactly one of *Operation or error will be non-nil. Any non-2xx
35960// status code is an error. Response headers are in either
35961// *Operation.ServerResponse.Header or (if a response was returned at
35962// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
35963// to check whether the returned error was because
35964// http.StatusNotModified was returned.
35965func (c *RoutesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
35966	gensupport.SetOptions(c.urlParams_, opts...)
35967	res, err := c.doRequest("json")
35968	if res != nil && res.StatusCode == http.StatusNotModified {
35969		if res.Body != nil {
35970			res.Body.Close()
35971		}
35972		return nil, &googleapi.Error{
35973			Code:   res.StatusCode,
35974			Header: res.Header,
35975		}
35976	}
35977	if err != nil {
35978		return nil, err
35979	}
35980	defer googleapi.CloseBody(res)
35981	if err := googleapi.CheckResponse(res); err != nil {
35982		return nil, err
35983	}
35984	ret := &Operation{
35985		ServerResponse: googleapi.ServerResponse{
35986			Header:         res.Header,
35987			HTTPStatusCode: res.StatusCode,
35988		},
35989	}
35990	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
35991		return nil, err
35992	}
35993	return ret, nil
35994	// {
35995	//   "description": "Creates a Route resource in the specified project using the data included in the request.",
35996	//   "httpMethod": "POST",
35997	//   "id": "compute.routes.insert",
35998	//   "parameterOrder": [
35999	//     "project"
36000	//   ],
36001	//   "parameters": {
36002	//     "project": {
36003	//       "description": "Project ID for this request.",
36004	//       "location": "path",
36005	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36006	//       "required": true,
36007	//       "type": "string"
36008	//     }
36009	//   },
36010	//   "path": "{project}/global/routes",
36011	//   "request": {
36012	//     "$ref": "Route"
36013	//   },
36014	//   "response": {
36015	//     "$ref": "Operation"
36016	//   },
36017	//   "scopes": [
36018	//     "https://www.googleapis.com/auth/cloud-platform",
36019	//     "https://www.googleapis.com/auth/compute"
36020	//   ]
36021	// }
36022
36023}
36024
36025// method id "compute.routes.list":
36026
36027type RoutesListCall struct {
36028	s            *Service
36029	project      string
36030	urlParams_   gensupport.URLParams
36031	ifNoneMatch_ string
36032	ctx_         context.Context
36033}
36034
36035// List: Retrieves the list of Route resources available to the
36036// specified project.
36037// For details, see https://cloud.google.com/compute/docs/reference/latest/routes/list
36038func (r *RoutesService) List(project string) *RoutesListCall {
36039	c := &RoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36040	c.project = project
36041	return c
36042}
36043
36044// Filter sets the optional parameter "filter": Sets a filter expression
36045// for filtering listed resources, in the form filter={expression}. Your
36046// {expression} must be in the format: field_name comparison_string
36047// literal_string.
36048//
36049// The field_name is the name of the field you want to compare. Only
36050// atomic field types are supported (string, number, boolean). The
36051// comparison_string must be either eq (equals) or ne (not equals). The
36052// literal_string is the string value to filter to. The literal value
36053// must be valid for the type of field you are filtering by (string,
36054// number, boolean). For string fields, the literal value is interpreted
36055// as a regular expression using RE2 syntax. The literal value must
36056// match the entire field.
36057//
36058// For example, to filter for instances that do not have a name of
36059// example-instance, you would use filter=name ne
36060// example-instance.
36061//
36062// Compute Engine Beta API Only: If you use filtering in the Beta API,
36063// you can also filter on nested fields. For example, you could filter
36064// on instances that have set the scheduling.automaticRestart field to
36065// true. In particular, use filtering on nested fields to take advantage
36066// of instance labels to organize and filter results based on label
36067// values.
36068//
36069// The Beta API also supports filtering on multiple expressions by
36070// providing each separate expression within parentheses. For example,
36071// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
36072// Multiple expressions are treated as AND expressions, meaning that
36073// resources must match all expressions to pass the filters.
36074func (c *RoutesListCall) Filter(filter string) *RoutesListCall {
36075	c.urlParams_.Set("filter", filter)
36076	return c
36077}
36078
36079// MaxResults sets the optional parameter "maxResults": The maximum
36080// number of results per page that should be returned. If the number of
36081// available results is larger than maxResults, Compute Engine returns a
36082// nextPageToken that can be used to get the next page of results in
36083// subsequent list requests.
36084func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall {
36085	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36086	return c
36087}
36088
36089// OrderBy sets the optional parameter "orderBy": Sorts list results by
36090// a certain order. By default, results are returned in alphanumerical
36091// order based on the resource name.
36092//
36093// You can also sort results in descending order based on the creation
36094// timestamp using orderBy="creationTimestamp desc". This sorts results
36095// based on the creationTimestamp field in reverse chronological order
36096// (newest result first). Use this to sort resources like operations so
36097// that the newest operation is returned first.
36098//
36099// Currently, only sorting by name or creationTimestamp desc is
36100// supported.
36101func (c *RoutesListCall) OrderBy(orderBy string) *RoutesListCall {
36102	c.urlParams_.Set("orderBy", orderBy)
36103	return c
36104}
36105
36106// PageToken sets the optional parameter "pageToken": Specifies a page
36107// token to use. Set pageToken to the nextPageToken returned by a
36108// previous list request to get the next page of results.
36109func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall {
36110	c.urlParams_.Set("pageToken", pageToken)
36111	return c
36112}
36113
36114// Fields allows partial responses to be retrieved. See
36115// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36116// for more information.
36117func (c *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall {
36118	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36119	return c
36120}
36121
36122// IfNoneMatch sets the optional parameter which makes the operation
36123// fail if the object's ETag matches the given value. This is useful for
36124// getting updates only after the object has changed since the last
36125// request. Use googleapi.IsNotModified to check whether the response
36126// error from Do is the result of In-None-Match.
36127func (c *RoutesListCall) IfNoneMatch(entityTag string) *RoutesListCall {
36128	c.ifNoneMatch_ = entityTag
36129	return c
36130}
36131
36132// Context sets the context to be used in this call's Do method. Any
36133// pending HTTP request will be aborted if the provided context is
36134// canceled.
36135func (c *RoutesListCall) Context(ctx context.Context) *RoutesListCall {
36136	c.ctx_ = ctx
36137	return c
36138}
36139
36140func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) {
36141	var body io.Reader = nil
36142	c.urlParams_.Set("alt", alt)
36143	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes")
36144	urls += "?" + c.urlParams_.Encode()
36145	req, _ := http.NewRequest("GET", urls, body)
36146	googleapi.Expand(req.URL, map[string]string{
36147		"project": c.project,
36148	})
36149	req.Header.Set("User-Agent", c.s.userAgent())
36150	if c.ifNoneMatch_ != "" {
36151		req.Header.Set("If-None-Match", c.ifNoneMatch_)
36152	}
36153	if c.ctx_ != nil {
36154		return ctxhttp.Do(c.ctx_, c.s.client, req)
36155	}
36156	return c.s.client.Do(req)
36157}
36158
36159// Do executes the "compute.routes.list" call.
36160// Exactly one of *RouteList or error will be non-nil. Any non-2xx
36161// status code is an error. Response headers are in either
36162// *RouteList.ServerResponse.Header or (if a response was returned at
36163// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36164// to check whether the returned error was because
36165// http.StatusNotModified was returned.
36166func (c *RoutesListCall) Do(opts ...googleapi.CallOption) (*RouteList, error) {
36167	gensupport.SetOptions(c.urlParams_, opts...)
36168	res, err := c.doRequest("json")
36169	if res != nil && res.StatusCode == http.StatusNotModified {
36170		if res.Body != nil {
36171			res.Body.Close()
36172		}
36173		return nil, &googleapi.Error{
36174			Code:   res.StatusCode,
36175			Header: res.Header,
36176		}
36177	}
36178	if err != nil {
36179		return nil, err
36180	}
36181	defer googleapi.CloseBody(res)
36182	if err := googleapi.CheckResponse(res); err != nil {
36183		return nil, err
36184	}
36185	ret := &RouteList{
36186		ServerResponse: googleapi.ServerResponse{
36187			Header:         res.Header,
36188			HTTPStatusCode: res.StatusCode,
36189		},
36190	}
36191	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36192		return nil, err
36193	}
36194	return ret, nil
36195	// {
36196	//   "description": "Retrieves the list of Route resources available to the specified project.",
36197	//   "httpMethod": "GET",
36198	//   "id": "compute.routes.list",
36199	//   "parameterOrder": [
36200	//     "project"
36201	//   ],
36202	//   "parameters": {
36203	//     "filter": {
36204	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
36205	//       "location": "query",
36206	//       "type": "string"
36207	//     },
36208	//     "maxResults": {
36209	//       "default": "500",
36210	//       "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.",
36211	//       "format": "uint32",
36212	//       "location": "query",
36213	//       "maximum": "500",
36214	//       "minimum": "0",
36215	//       "type": "integer"
36216	//     },
36217	//     "orderBy": {
36218	//       "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.",
36219	//       "location": "query",
36220	//       "type": "string"
36221	//     },
36222	//     "pageToken": {
36223	//       "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.",
36224	//       "location": "query",
36225	//       "type": "string"
36226	//     },
36227	//     "project": {
36228	//       "description": "Project ID for this request.",
36229	//       "location": "path",
36230	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36231	//       "required": true,
36232	//       "type": "string"
36233	//     }
36234	//   },
36235	//   "path": "{project}/global/routes",
36236	//   "response": {
36237	//     "$ref": "RouteList"
36238	//   },
36239	//   "scopes": [
36240	//     "https://www.googleapis.com/auth/cloud-platform",
36241	//     "https://www.googleapis.com/auth/compute",
36242	//     "https://www.googleapis.com/auth/compute.readonly"
36243	//   ]
36244	// }
36245
36246}
36247
36248// Pages invokes f for each page of results.
36249// A non-nil error returned from f will halt the iteration.
36250// The provided context supersedes any context provided to the Context method.
36251func (c *RoutesListCall) Pages(ctx context.Context, f func(*RouteList) error) error {
36252	c.ctx_ = ctx
36253	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
36254	for {
36255		x, err := c.Do()
36256		if err != nil {
36257			return err
36258		}
36259		if err := f(x); err != nil {
36260			return err
36261		}
36262		if x.NextPageToken == "" {
36263			return nil
36264		}
36265		c.PageToken(x.NextPageToken)
36266	}
36267}
36268
36269// method id "compute.routes.testIamPermissions":
36270
36271type RoutesTestIamPermissionsCall struct {
36272	s                      *Service
36273	project                string
36274	resource               string
36275	testpermissionsrequest *TestPermissionsRequest
36276	urlParams_             gensupport.URLParams
36277	ctx_                   context.Context
36278}
36279
36280// TestIamPermissions: Returns permissions that a caller has on the
36281// specified resource.
36282func (r *RoutesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *RoutesTestIamPermissionsCall {
36283	c := &RoutesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36284	c.project = project
36285	c.resource = resource
36286	c.testpermissionsrequest = testpermissionsrequest
36287	return c
36288}
36289
36290// Fields allows partial responses to be retrieved. See
36291// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36292// for more information.
36293func (c *RoutesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RoutesTestIamPermissionsCall {
36294	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36295	return c
36296}
36297
36298// Context sets the context to be used in this call's Do method. Any
36299// pending HTTP request will be aborted if the provided context is
36300// canceled.
36301func (c *RoutesTestIamPermissionsCall) Context(ctx context.Context) *RoutesTestIamPermissionsCall {
36302	c.ctx_ = ctx
36303	return c
36304}
36305
36306func (c *RoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
36307	var body io.Reader = nil
36308	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
36309	if err != nil {
36310		return nil, err
36311	}
36312	ctype := "application/json"
36313	c.urlParams_.Set("alt", alt)
36314	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{resource}/testIamPermissions")
36315	urls += "?" + c.urlParams_.Encode()
36316	req, _ := http.NewRequest("POST", urls, body)
36317	googleapi.Expand(req.URL, map[string]string{
36318		"project":  c.project,
36319		"resource": c.resource,
36320	})
36321	req.Header.Set("Content-Type", ctype)
36322	req.Header.Set("User-Agent", c.s.userAgent())
36323	if c.ctx_ != nil {
36324		return ctxhttp.Do(c.ctx_, c.s.client, req)
36325	}
36326	return c.s.client.Do(req)
36327}
36328
36329// Do executes the "compute.routes.testIamPermissions" call.
36330// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
36331// non-2xx status code is an error. Response headers are in either
36332// *TestPermissionsResponse.ServerResponse.Header or (if a response was
36333// returned at all) in error.(*googleapi.Error).Header. Use
36334// googleapi.IsNotModified to check whether the returned error was
36335// because http.StatusNotModified was returned.
36336func (c *RoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
36337	gensupport.SetOptions(c.urlParams_, opts...)
36338	res, err := c.doRequest("json")
36339	if res != nil && res.StatusCode == http.StatusNotModified {
36340		if res.Body != nil {
36341			res.Body.Close()
36342		}
36343		return nil, &googleapi.Error{
36344			Code:   res.StatusCode,
36345			Header: res.Header,
36346		}
36347	}
36348	if err != nil {
36349		return nil, err
36350	}
36351	defer googleapi.CloseBody(res)
36352	if err := googleapi.CheckResponse(res); err != nil {
36353		return nil, err
36354	}
36355	ret := &TestPermissionsResponse{
36356		ServerResponse: googleapi.ServerResponse{
36357			Header:         res.Header,
36358			HTTPStatusCode: res.StatusCode,
36359		},
36360	}
36361	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36362		return nil, err
36363	}
36364	return ret, nil
36365	// {
36366	//   "description": "Returns permissions that a caller has on the specified resource.",
36367	//   "httpMethod": "POST",
36368	//   "id": "compute.routes.testIamPermissions",
36369	//   "parameterOrder": [
36370	//     "project",
36371	//     "resource"
36372	//   ],
36373	//   "parameters": {
36374	//     "project": {
36375	//       "description": "Project ID for this request.",
36376	//       "location": "path",
36377	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36378	//       "required": true,
36379	//       "type": "string"
36380	//     },
36381	//     "resource": {
36382	//       "description": "Name of the resource for this request.",
36383	//       "location": "path",
36384	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
36385	//       "required": true,
36386	//       "type": "string"
36387	//     }
36388	//   },
36389	//   "path": "{project}/global/routes/{resource}/testIamPermissions",
36390	//   "request": {
36391	//     "$ref": "TestPermissionsRequest"
36392	//   },
36393	//   "response": {
36394	//     "$ref": "TestPermissionsResponse"
36395	//   },
36396	//   "scopes": [
36397	//     "https://www.googleapis.com/auth/cloud-platform",
36398	//     "https://www.googleapis.com/auth/compute",
36399	//     "https://www.googleapis.com/auth/compute.readonly"
36400	//   ]
36401	// }
36402
36403}
36404
36405// method id "compute.snapshots.delete":
36406
36407type SnapshotsDeleteCall struct {
36408	s          *Service
36409	project    string
36410	snapshot   string
36411	urlParams_ gensupport.URLParams
36412	ctx_       context.Context
36413}
36414
36415// Delete: Deletes the specified Snapshot resource. Keep in mind that
36416// deleting a single snapshot might not necessarily delete all the data
36417// on that snapshot. If any data on the snapshot that is marked for
36418// deletion is needed for subsequent snapshots, the data will be moved
36419// to the next corresponding snapshot.
36420//
36421// For more information, see Deleting snaphots.
36422// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/delete
36423func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall {
36424	c := &SnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36425	c.project = project
36426	c.snapshot = snapshot
36427	return c
36428}
36429
36430// Fields allows partial responses to be retrieved. See
36431// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36432// for more information.
36433func (c *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall {
36434	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36435	return c
36436}
36437
36438// Context sets the context to be used in this call's Do method. Any
36439// pending HTTP request will be aborted if the provided context is
36440// canceled.
36441func (c *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall {
36442	c.ctx_ = ctx
36443	return c
36444}
36445
36446func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) {
36447	var body io.Reader = nil
36448	c.urlParams_.Set("alt", alt)
36449	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}")
36450	urls += "?" + c.urlParams_.Encode()
36451	req, _ := http.NewRequest("DELETE", urls, body)
36452	googleapi.Expand(req.URL, map[string]string{
36453		"project":  c.project,
36454		"snapshot": c.snapshot,
36455	})
36456	req.Header.Set("User-Agent", c.s.userAgent())
36457	if c.ctx_ != nil {
36458		return ctxhttp.Do(c.ctx_, c.s.client, req)
36459	}
36460	return c.s.client.Do(req)
36461}
36462
36463// Do executes the "compute.snapshots.delete" call.
36464// Exactly one of *Operation or error will be non-nil. Any non-2xx
36465// status code is an error. Response headers are in either
36466// *Operation.ServerResponse.Header or (if a response was returned at
36467// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36468// to check whether the returned error was because
36469// http.StatusNotModified was returned.
36470func (c *SnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36471	gensupport.SetOptions(c.urlParams_, opts...)
36472	res, err := c.doRequest("json")
36473	if res != nil && res.StatusCode == http.StatusNotModified {
36474		if res.Body != nil {
36475			res.Body.Close()
36476		}
36477		return nil, &googleapi.Error{
36478			Code:   res.StatusCode,
36479			Header: res.Header,
36480		}
36481	}
36482	if err != nil {
36483		return nil, err
36484	}
36485	defer googleapi.CloseBody(res)
36486	if err := googleapi.CheckResponse(res); err != nil {
36487		return nil, err
36488	}
36489	ret := &Operation{
36490		ServerResponse: googleapi.ServerResponse{
36491			Header:         res.Header,
36492			HTTPStatusCode: res.StatusCode,
36493		},
36494	}
36495	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36496		return nil, err
36497	}
36498	return ret, nil
36499	// {
36500	//   "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.",
36501	//   "httpMethod": "DELETE",
36502	//   "id": "compute.snapshots.delete",
36503	//   "parameterOrder": [
36504	//     "project",
36505	//     "snapshot"
36506	//   ],
36507	//   "parameters": {
36508	//     "project": {
36509	//       "description": "Project ID for this request.",
36510	//       "location": "path",
36511	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36512	//       "required": true,
36513	//       "type": "string"
36514	//     },
36515	//     "snapshot": {
36516	//       "description": "Name of the Snapshot resource to delete.",
36517	//       "location": "path",
36518	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36519	//       "required": true,
36520	//       "type": "string"
36521	//     }
36522	//   },
36523	//   "path": "{project}/global/snapshots/{snapshot}",
36524	//   "response": {
36525	//     "$ref": "Operation"
36526	//   },
36527	//   "scopes": [
36528	//     "https://www.googleapis.com/auth/cloud-platform",
36529	//     "https://www.googleapis.com/auth/compute"
36530	//   ]
36531	// }
36532
36533}
36534
36535// method id "compute.snapshots.get":
36536
36537type SnapshotsGetCall struct {
36538	s            *Service
36539	project      string
36540	snapshot     string
36541	urlParams_   gensupport.URLParams
36542	ifNoneMatch_ string
36543	ctx_         context.Context
36544}
36545
36546// Get: Returns the specified Snapshot resource. Get a list of available
36547// snapshots by making a list() request.
36548// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/get
36549func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall {
36550	c := &SnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36551	c.project = project
36552	c.snapshot = snapshot
36553	return c
36554}
36555
36556// Fields allows partial responses to be retrieved. See
36557// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36558// for more information.
36559func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall {
36560	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36561	return c
36562}
36563
36564// IfNoneMatch sets the optional parameter which makes the operation
36565// fail if the object's ETag matches the given value. This is useful for
36566// getting updates only after the object has changed since the last
36567// request. Use googleapi.IsNotModified to check whether the response
36568// error from Do is the result of In-None-Match.
36569func (c *SnapshotsGetCall) IfNoneMatch(entityTag string) *SnapshotsGetCall {
36570	c.ifNoneMatch_ = entityTag
36571	return c
36572}
36573
36574// Context sets the context to be used in this call's Do method. Any
36575// pending HTTP request will be aborted if the provided context is
36576// canceled.
36577func (c *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall {
36578	c.ctx_ = ctx
36579	return c
36580}
36581
36582func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
36583	var body io.Reader = nil
36584	c.urlParams_.Set("alt", alt)
36585	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}")
36586	urls += "?" + c.urlParams_.Encode()
36587	req, _ := http.NewRequest("GET", urls, body)
36588	googleapi.Expand(req.URL, map[string]string{
36589		"project":  c.project,
36590		"snapshot": c.snapshot,
36591	})
36592	req.Header.Set("User-Agent", c.s.userAgent())
36593	if c.ifNoneMatch_ != "" {
36594		req.Header.Set("If-None-Match", c.ifNoneMatch_)
36595	}
36596	if c.ctx_ != nil {
36597		return ctxhttp.Do(c.ctx_, c.s.client, req)
36598	}
36599	return c.s.client.Do(req)
36600}
36601
36602// Do executes the "compute.snapshots.get" call.
36603// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status
36604// code is an error. Response headers are in either
36605// *Snapshot.ServerResponse.Header or (if a response was returned at
36606// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36607// to check whether the returned error was because
36608// http.StatusNotModified was returned.
36609func (c *SnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, error) {
36610	gensupport.SetOptions(c.urlParams_, opts...)
36611	res, err := c.doRequest("json")
36612	if res != nil && res.StatusCode == http.StatusNotModified {
36613		if res.Body != nil {
36614			res.Body.Close()
36615		}
36616		return nil, &googleapi.Error{
36617			Code:   res.StatusCode,
36618			Header: res.Header,
36619		}
36620	}
36621	if err != nil {
36622		return nil, err
36623	}
36624	defer googleapi.CloseBody(res)
36625	if err := googleapi.CheckResponse(res); err != nil {
36626		return nil, err
36627	}
36628	ret := &Snapshot{
36629		ServerResponse: googleapi.ServerResponse{
36630			Header:         res.Header,
36631			HTTPStatusCode: res.StatusCode,
36632		},
36633	}
36634	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36635		return nil, err
36636	}
36637	return ret, nil
36638	// {
36639	//   "description": "Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request.",
36640	//   "httpMethod": "GET",
36641	//   "id": "compute.snapshots.get",
36642	//   "parameterOrder": [
36643	//     "project",
36644	//     "snapshot"
36645	//   ],
36646	//   "parameters": {
36647	//     "project": {
36648	//       "description": "Project ID for this request.",
36649	//       "location": "path",
36650	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36651	//       "required": true,
36652	//       "type": "string"
36653	//     },
36654	//     "snapshot": {
36655	//       "description": "Name of the Snapshot resource to return.",
36656	//       "location": "path",
36657	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
36658	//       "required": true,
36659	//       "type": "string"
36660	//     }
36661	//   },
36662	//   "path": "{project}/global/snapshots/{snapshot}",
36663	//   "response": {
36664	//     "$ref": "Snapshot"
36665	//   },
36666	//   "scopes": [
36667	//     "https://www.googleapis.com/auth/cloud-platform",
36668	//     "https://www.googleapis.com/auth/compute",
36669	//     "https://www.googleapis.com/auth/compute.readonly"
36670	//   ]
36671	// }
36672
36673}
36674
36675// method id "compute.snapshots.list":
36676
36677type SnapshotsListCall struct {
36678	s            *Service
36679	project      string
36680	urlParams_   gensupport.URLParams
36681	ifNoneMatch_ string
36682	ctx_         context.Context
36683}
36684
36685// List: Retrieves the list of Snapshot resources contained within the
36686// specified project.
36687// For details, see https://cloud.google.com/compute/docs/reference/latest/snapshots/list
36688func (r *SnapshotsService) List(project string) *SnapshotsListCall {
36689	c := &SnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36690	c.project = project
36691	return c
36692}
36693
36694// Filter sets the optional parameter "filter": Sets a filter expression
36695// for filtering listed resources, in the form filter={expression}. Your
36696// {expression} must be in the format: field_name comparison_string
36697// literal_string.
36698//
36699// The field_name is the name of the field you want to compare. Only
36700// atomic field types are supported (string, number, boolean). The
36701// comparison_string must be either eq (equals) or ne (not equals). The
36702// literal_string is the string value to filter to. The literal value
36703// must be valid for the type of field you are filtering by (string,
36704// number, boolean). For string fields, the literal value is interpreted
36705// as a regular expression using RE2 syntax. The literal value must
36706// match the entire field.
36707//
36708// For example, to filter for instances that do not have a name of
36709// example-instance, you would use filter=name ne
36710// example-instance.
36711//
36712// Compute Engine Beta API Only: If you use filtering in the Beta API,
36713// you can also filter on nested fields. For example, you could filter
36714// on instances that have set the scheduling.automaticRestart field to
36715// true. In particular, use filtering on nested fields to take advantage
36716// of instance labels to organize and filter results based on label
36717// values.
36718//
36719// The Beta API also supports filtering on multiple expressions by
36720// providing each separate expression within parentheses. For example,
36721// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
36722// Multiple expressions are treated as AND expressions, meaning that
36723// resources must match all expressions to pass the filters.
36724func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall {
36725	c.urlParams_.Set("filter", filter)
36726	return c
36727}
36728
36729// MaxResults sets the optional parameter "maxResults": The maximum
36730// number of results per page that should be returned. If the number of
36731// available results is larger than maxResults, Compute Engine returns a
36732// nextPageToken that can be used to get the next page of results in
36733// subsequent list requests.
36734func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall {
36735	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
36736	return c
36737}
36738
36739// OrderBy sets the optional parameter "orderBy": Sorts list results by
36740// a certain order. By default, results are returned in alphanumerical
36741// order based on the resource name.
36742//
36743// You can also sort results in descending order based on the creation
36744// timestamp using orderBy="creationTimestamp desc". This sorts results
36745// based on the creationTimestamp field in reverse chronological order
36746// (newest result first). Use this to sort resources like operations so
36747// that the newest operation is returned first.
36748//
36749// Currently, only sorting by name or creationTimestamp desc is
36750// supported.
36751func (c *SnapshotsListCall) OrderBy(orderBy string) *SnapshotsListCall {
36752	c.urlParams_.Set("orderBy", orderBy)
36753	return c
36754}
36755
36756// PageToken sets the optional parameter "pageToken": Specifies a page
36757// token to use. Set pageToken to the nextPageToken returned by a
36758// previous list request to get the next page of results.
36759func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall {
36760	c.urlParams_.Set("pageToken", pageToken)
36761	return c
36762}
36763
36764// Fields allows partial responses to be retrieved. See
36765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36766// for more information.
36767func (c *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall {
36768	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36769	return c
36770}
36771
36772// IfNoneMatch sets the optional parameter which makes the operation
36773// fail if the object's ETag matches the given value. This is useful for
36774// getting updates only after the object has changed since the last
36775// request. Use googleapi.IsNotModified to check whether the response
36776// error from Do is the result of In-None-Match.
36777func (c *SnapshotsListCall) IfNoneMatch(entityTag string) *SnapshotsListCall {
36778	c.ifNoneMatch_ = entityTag
36779	return c
36780}
36781
36782// Context sets the context to be used in this call's Do method. Any
36783// pending HTTP request will be aborted if the provided context is
36784// canceled.
36785func (c *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall {
36786	c.ctx_ = ctx
36787	return c
36788}
36789
36790func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) {
36791	var body io.Reader = nil
36792	c.urlParams_.Set("alt", alt)
36793	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots")
36794	urls += "?" + c.urlParams_.Encode()
36795	req, _ := http.NewRequest("GET", urls, body)
36796	googleapi.Expand(req.URL, map[string]string{
36797		"project": c.project,
36798	})
36799	req.Header.Set("User-Agent", c.s.userAgent())
36800	if c.ifNoneMatch_ != "" {
36801		req.Header.Set("If-None-Match", c.ifNoneMatch_)
36802	}
36803	if c.ctx_ != nil {
36804		return ctxhttp.Do(c.ctx_, c.s.client, req)
36805	}
36806	return c.s.client.Do(req)
36807}
36808
36809// Do executes the "compute.snapshots.list" call.
36810// Exactly one of *SnapshotList or error will be non-nil. Any non-2xx
36811// status code is an error. Response headers are in either
36812// *SnapshotList.ServerResponse.Header or (if a response was returned at
36813// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36814// to check whether the returned error was because
36815// http.StatusNotModified was returned.
36816func (c *SnapshotsListCall) Do(opts ...googleapi.CallOption) (*SnapshotList, error) {
36817	gensupport.SetOptions(c.urlParams_, opts...)
36818	res, err := c.doRequest("json")
36819	if res != nil && res.StatusCode == http.StatusNotModified {
36820		if res.Body != nil {
36821			res.Body.Close()
36822		}
36823		return nil, &googleapi.Error{
36824			Code:   res.StatusCode,
36825			Header: res.Header,
36826		}
36827	}
36828	if err != nil {
36829		return nil, err
36830	}
36831	defer googleapi.CloseBody(res)
36832	if err := googleapi.CheckResponse(res); err != nil {
36833		return nil, err
36834	}
36835	ret := &SnapshotList{
36836		ServerResponse: googleapi.ServerResponse{
36837			Header:         res.Header,
36838			HTTPStatusCode: res.StatusCode,
36839		},
36840	}
36841	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
36842		return nil, err
36843	}
36844	return ret, nil
36845	// {
36846	//   "description": "Retrieves the list of Snapshot resources contained within the specified project.",
36847	//   "httpMethod": "GET",
36848	//   "id": "compute.snapshots.list",
36849	//   "parameterOrder": [
36850	//     "project"
36851	//   ],
36852	//   "parameters": {
36853	//     "filter": {
36854	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
36855	//       "location": "query",
36856	//       "type": "string"
36857	//     },
36858	//     "maxResults": {
36859	//       "default": "500",
36860	//       "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.",
36861	//       "format": "uint32",
36862	//       "location": "query",
36863	//       "maximum": "500",
36864	//       "minimum": "0",
36865	//       "type": "integer"
36866	//     },
36867	//     "orderBy": {
36868	//       "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.",
36869	//       "location": "query",
36870	//       "type": "string"
36871	//     },
36872	//     "pageToken": {
36873	//       "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.",
36874	//       "location": "query",
36875	//       "type": "string"
36876	//     },
36877	//     "project": {
36878	//       "description": "Project ID for this request.",
36879	//       "location": "path",
36880	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
36881	//       "required": true,
36882	//       "type": "string"
36883	//     }
36884	//   },
36885	//   "path": "{project}/global/snapshots",
36886	//   "response": {
36887	//     "$ref": "SnapshotList"
36888	//   },
36889	//   "scopes": [
36890	//     "https://www.googleapis.com/auth/cloud-platform",
36891	//     "https://www.googleapis.com/auth/compute",
36892	//     "https://www.googleapis.com/auth/compute.readonly"
36893	//   ]
36894	// }
36895
36896}
36897
36898// Pages invokes f for each page of results.
36899// A non-nil error returned from f will halt the iteration.
36900// The provided context supersedes any context provided to the Context method.
36901func (c *SnapshotsListCall) Pages(ctx context.Context, f func(*SnapshotList) error) error {
36902	c.ctx_ = ctx
36903	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
36904	for {
36905		x, err := c.Do()
36906		if err != nil {
36907			return err
36908		}
36909		if err := f(x); err != nil {
36910			return err
36911		}
36912		if x.NextPageToken == "" {
36913			return nil
36914		}
36915		c.PageToken(x.NextPageToken)
36916	}
36917}
36918
36919// method id "compute.snapshots.setLabels":
36920
36921type SnapshotsSetLabelsCall struct {
36922	s                      *Service
36923	project                string
36924	resource               string
36925	globalsetlabelsrequest *GlobalSetLabelsRequest
36926	urlParams_             gensupport.URLParams
36927	ctx_                   context.Context
36928}
36929
36930// SetLabels: Sets the labels on the target snapshot.
36931func (r *SnapshotsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *SnapshotsSetLabelsCall {
36932	c := &SnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
36933	c.project = project
36934	c.resource = resource
36935	c.globalsetlabelsrequest = globalsetlabelsrequest
36936	return c
36937}
36938
36939// Fields allows partial responses to be retrieved. See
36940// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
36941// for more information.
36942func (c *SnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *SnapshotsSetLabelsCall {
36943	c.urlParams_.Set("fields", googleapi.CombineFields(s))
36944	return c
36945}
36946
36947// Context sets the context to be used in this call's Do method. Any
36948// pending HTTP request will be aborted if the provided context is
36949// canceled.
36950func (c *SnapshotsSetLabelsCall) Context(ctx context.Context) *SnapshotsSetLabelsCall {
36951	c.ctx_ = ctx
36952	return c
36953}
36954
36955func (c *SnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) {
36956	var body io.Reader = nil
36957	body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest)
36958	if err != nil {
36959		return nil, err
36960	}
36961	ctype := "application/json"
36962	c.urlParams_.Set("alt", alt)
36963	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/setLabels")
36964	urls += "?" + c.urlParams_.Encode()
36965	req, _ := http.NewRequest("POST", urls, body)
36966	googleapi.Expand(req.URL, map[string]string{
36967		"project":  c.project,
36968		"resource": c.resource,
36969	})
36970	req.Header.Set("Content-Type", ctype)
36971	req.Header.Set("User-Agent", c.s.userAgent())
36972	if c.ctx_ != nil {
36973		return ctxhttp.Do(c.ctx_, c.s.client, req)
36974	}
36975	return c.s.client.Do(req)
36976}
36977
36978// Do executes the "compute.snapshots.setLabels" call.
36979// Exactly one of *Operation or error will be non-nil. Any non-2xx
36980// status code is an error. Response headers are in either
36981// *Operation.ServerResponse.Header or (if a response was returned at
36982// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
36983// to check whether the returned error was because
36984// http.StatusNotModified was returned.
36985func (c *SnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
36986	gensupport.SetOptions(c.urlParams_, opts...)
36987	res, err := c.doRequest("json")
36988	if res != nil && res.StatusCode == http.StatusNotModified {
36989		if res.Body != nil {
36990			res.Body.Close()
36991		}
36992		return nil, &googleapi.Error{
36993			Code:   res.StatusCode,
36994			Header: res.Header,
36995		}
36996	}
36997	if err != nil {
36998		return nil, err
36999	}
37000	defer googleapi.CloseBody(res)
37001	if err := googleapi.CheckResponse(res); err != nil {
37002		return nil, err
37003	}
37004	ret := &Operation{
37005		ServerResponse: googleapi.ServerResponse{
37006			Header:         res.Header,
37007			HTTPStatusCode: res.StatusCode,
37008		},
37009	}
37010	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37011		return nil, err
37012	}
37013	return ret, nil
37014	// {
37015	//   "description": "Sets the labels on the target snapshot.",
37016	//   "httpMethod": "POST",
37017	//   "id": "compute.snapshots.setLabels",
37018	//   "parameterOrder": [
37019	//     "project",
37020	//     "resource"
37021	//   ],
37022	//   "parameters": {
37023	//     "project": {
37024	//       "description": "Project ID for this request.",
37025	//       "location": "path",
37026	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37027	//       "required": true,
37028	//       "type": "string"
37029	//     },
37030	//     "resource": {
37031	//       "description": "Name of the resource for this request.",
37032	//       "location": "path",
37033	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
37034	//       "required": true,
37035	//       "type": "string"
37036	//     }
37037	//   },
37038	//   "path": "{project}/global/snapshots/{resource}/setLabels",
37039	//   "request": {
37040	//     "$ref": "GlobalSetLabelsRequest"
37041	//   },
37042	//   "response": {
37043	//     "$ref": "Operation"
37044	//   },
37045	//   "scopes": [
37046	//     "https://www.googleapis.com/auth/cloud-platform",
37047	//     "https://www.googleapis.com/auth/compute"
37048	//   ]
37049	// }
37050
37051}
37052
37053// method id "compute.snapshots.testIamPermissions":
37054
37055type SnapshotsTestIamPermissionsCall struct {
37056	s                      *Service
37057	project                string
37058	resource               string
37059	testpermissionsrequest *TestPermissionsRequest
37060	urlParams_             gensupport.URLParams
37061	ctx_                   context.Context
37062}
37063
37064// TestIamPermissions: Returns permissions that a caller has on the
37065// specified resource.
37066func (r *SnapshotsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SnapshotsTestIamPermissionsCall {
37067	c := &SnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37068	c.project = project
37069	c.resource = resource
37070	c.testpermissionsrequest = testpermissionsrequest
37071	return c
37072}
37073
37074// Fields allows partial responses to be retrieved. See
37075// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37076// for more information.
37077func (c *SnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *SnapshotsTestIamPermissionsCall {
37078	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37079	return c
37080}
37081
37082// Context sets the context to be used in this call's Do method. Any
37083// pending HTTP request will be aborted if the provided context is
37084// canceled.
37085func (c *SnapshotsTestIamPermissionsCall) Context(ctx context.Context) *SnapshotsTestIamPermissionsCall {
37086	c.ctx_ = ctx
37087	return c
37088}
37089
37090func (c *SnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
37091	var body io.Reader = nil
37092	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
37093	if err != nil {
37094		return nil, err
37095	}
37096	ctype := "application/json"
37097	c.urlParams_.Set("alt", alt)
37098	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{resource}/testIamPermissions")
37099	urls += "?" + c.urlParams_.Encode()
37100	req, _ := http.NewRequest("POST", urls, body)
37101	googleapi.Expand(req.URL, map[string]string{
37102		"project":  c.project,
37103		"resource": c.resource,
37104	})
37105	req.Header.Set("Content-Type", ctype)
37106	req.Header.Set("User-Agent", c.s.userAgent())
37107	if c.ctx_ != nil {
37108		return ctxhttp.Do(c.ctx_, c.s.client, req)
37109	}
37110	return c.s.client.Do(req)
37111}
37112
37113// Do executes the "compute.snapshots.testIamPermissions" call.
37114// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
37115// non-2xx status code is an error. Response headers are in either
37116// *TestPermissionsResponse.ServerResponse.Header or (if a response was
37117// returned at all) in error.(*googleapi.Error).Header. Use
37118// googleapi.IsNotModified to check whether the returned error was
37119// because http.StatusNotModified was returned.
37120func (c *SnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
37121	gensupport.SetOptions(c.urlParams_, opts...)
37122	res, err := c.doRequest("json")
37123	if res != nil && res.StatusCode == http.StatusNotModified {
37124		if res.Body != nil {
37125			res.Body.Close()
37126		}
37127		return nil, &googleapi.Error{
37128			Code:   res.StatusCode,
37129			Header: res.Header,
37130		}
37131	}
37132	if err != nil {
37133		return nil, err
37134	}
37135	defer googleapi.CloseBody(res)
37136	if err := googleapi.CheckResponse(res); err != nil {
37137		return nil, err
37138	}
37139	ret := &TestPermissionsResponse{
37140		ServerResponse: googleapi.ServerResponse{
37141			Header:         res.Header,
37142			HTTPStatusCode: res.StatusCode,
37143		},
37144	}
37145	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37146		return nil, err
37147	}
37148	return ret, nil
37149	// {
37150	//   "description": "Returns permissions that a caller has on the specified resource.",
37151	//   "httpMethod": "POST",
37152	//   "id": "compute.snapshots.testIamPermissions",
37153	//   "parameterOrder": [
37154	//     "project",
37155	//     "resource"
37156	//   ],
37157	//   "parameters": {
37158	//     "project": {
37159	//       "description": "Project ID for this request.",
37160	//       "location": "path",
37161	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37162	//       "required": true,
37163	//       "type": "string"
37164	//     },
37165	//     "resource": {
37166	//       "description": "Name of the resource for this request.",
37167	//       "location": "path",
37168	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
37169	//       "required": true,
37170	//       "type": "string"
37171	//     }
37172	//   },
37173	//   "path": "{project}/global/snapshots/{resource}/testIamPermissions",
37174	//   "request": {
37175	//     "$ref": "TestPermissionsRequest"
37176	//   },
37177	//   "response": {
37178	//     "$ref": "TestPermissionsResponse"
37179	//   },
37180	//   "scopes": [
37181	//     "https://www.googleapis.com/auth/cloud-platform",
37182	//     "https://www.googleapis.com/auth/compute",
37183	//     "https://www.googleapis.com/auth/compute.readonly"
37184	//   ]
37185	// }
37186
37187}
37188
37189// method id "compute.sslCertificates.delete":
37190
37191type SslCertificatesDeleteCall struct {
37192	s              *Service
37193	project        string
37194	sslCertificate string
37195	urlParams_     gensupport.URLParams
37196	ctx_           context.Context
37197}
37198
37199// Delete: Deletes the specified SslCertificate resource.
37200func (r *SslCertificatesService) Delete(project string, sslCertificate string) *SslCertificatesDeleteCall {
37201	c := &SslCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37202	c.project = project
37203	c.sslCertificate = sslCertificate
37204	return c
37205}
37206
37207// Fields allows partial responses to be retrieved. See
37208// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37209// for more information.
37210func (c *SslCertificatesDeleteCall) Fields(s ...googleapi.Field) *SslCertificatesDeleteCall {
37211	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37212	return c
37213}
37214
37215// Context sets the context to be used in this call's Do method. Any
37216// pending HTTP request will be aborted if the provided context is
37217// canceled.
37218func (c *SslCertificatesDeleteCall) Context(ctx context.Context) *SslCertificatesDeleteCall {
37219	c.ctx_ = ctx
37220	return c
37221}
37222
37223func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
37224	var body io.Reader = nil
37225	c.urlParams_.Set("alt", alt)
37226	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}")
37227	urls += "?" + c.urlParams_.Encode()
37228	req, _ := http.NewRequest("DELETE", urls, body)
37229	googleapi.Expand(req.URL, map[string]string{
37230		"project":        c.project,
37231		"sslCertificate": c.sslCertificate,
37232	})
37233	req.Header.Set("User-Agent", c.s.userAgent())
37234	if c.ctx_ != nil {
37235		return ctxhttp.Do(c.ctx_, c.s.client, req)
37236	}
37237	return c.s.client.Do(req)
37238}
37239
37240// Do executes the "compute.sslCertificates.delete" call.
37241// Exactly one of *Operation or error will be non-nil. Any non-2xx
37242// status code is an error. Response headers are in either
37243// *Operation.ServerResponse.Header or (if a response was returned at
37244// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
37245// to check whether the returned error was because
37246// http.StatusNotModified was returned.
37247func (c *SslCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
37248	gensupport.SetOptions(c.urlParams_, opts...)
37249	res, err := c.doRequest("json")
37250	if res != nil && res.StatusCode == http.StatusNotModified {
37251		if res.Body != nil {
37252			res.Body.Close()
37253		}
37254		return nil, &googleapi.Error{
37255			Code:   res.StatusCode,
37256			Header: res.Header,
37257		}
37258	}
37259	if err != nil {
37260		return nil, err
37261	}
37262	defer googleapi.CloseBody(res)
37263	if err := googleapi.CheckResponse(res); err != nil {
37264		return nil, err
37265	}
37266	ret := &Operation{
37267		ServerResponse: googleapi.ServerResponse{
37268			Header:         res.Header,
37269			HTTPStatusCode: res.StatusCode,
37270		},
37271	}
37272	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37273		return nil, err
37274	}
37275	return ret, nil
37276	// {
37277	//   "description": "Deletes the specified SslCertificate resource.",
37278	//   "httpMethod": "DELETE",
37279	//   "id": "compute.sslCertificates.delete",
37280	//   "parameterOrder": [
37281	//     "project",
37282	//     "sslCertificate"
37283	//   ],
37284	//   "parameters": {
37285	//     "project": {
37286	//       "description": "Project ID for this request.",
37287	//       "location": "path",
37288	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37289	//       "required": true,
37290	//       "type": "string"
37291	//     },
37292	//     "sslCertificate": {
37293	//       "description": "Name of the SslCertificate resource to delete.",
37294	//       "location": "path",
37295	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
37296	//       "required": true,
37297	//       "type": "string"
37298	//     }
37299	//   },
37300	//   "path": "{project}/global/sslCertificates/{sslCertificate}",
37301	//   "response": {
37302	//     "$ref": "Operation"
37303	//   },
37304	//   "scopes": [
37305	//     "https://www.googleapis.com/auth/cloud-platform",
37306	//     "https://www.googleapis.com/auth/compute"
37307	//   ]
37308	// }
37309
37310}
37311
37312// method id "compute.sslCertificates.get":
37313
37314type SslCertificatesGetCall struct {
37315	s              *Service
37316	project        string
37317	sslCertificate string
37318	urlParams_     gensupport.URLParams
37319	ifNoneMatch_   string
37320	ctx_           context.Context
37321}
37322
37323// Get: Returns the specified SslCertificate resource. Get a list of
37324// available SSL certificates by making a list() request.
37325func (r *SslCertificatesService) Get(project string, sslCertificate string) *SslCertificatesGetCall {
37326	c := &SslCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37327	c.project = project
37328	c.sslCertificate = sslCertificate
37329	return c
37330}
37331
37332// Fields allows partial responses to be retrieved. See
37333// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37334// for more information.
37335func (c *SslCertificatesGetCall) Fields(s ...googleapi.Field) *SslCertificatesGetCall {
37336	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37337	return c
37338}
37339
37340// IfNoneMatch sets the optional parameter which makes the operation
37341// fail if the object's ETag matches the given value. This is useful for
37342// getting updates only after the object has changed since the last
37343// request. Use googleapi.IsNotModified to check whether the response
37344// error from Do is the result of In-None-Match.
37345func (c *SslCertificatesGetCall) IfNoneMatch(entityTag string) *SslCertificatesGetCall {
37346	c.ifNoneMatch_ = entityTag
37347	return c
37348}
37349
37350// Context sets the context to be used in this call's Do method. Any
37351// pending HTTP request will be aborted if the provided context is
37352// canceled.
37353func (c *SslCertificatesGetCall) Context(ctx context.Context) *SslCertificatesGetCall {
37354	c.ctx_ = ctx
37355	return c
37356}
37357
37358func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
37359	var body io.Reader = nil
37360	c.urlParams_.Set("alt", alt)
37361	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{sslCertificate}")
37362	urls += "?" + c.urlParams_.Encode()
37363	req, _ := http.NewRequest("GET", urls, body)
37364	googleapi.Expand(req.URL, map[string]string{
37365		"project":        c.project,
37366		"sslCertificate": c.sslCertificate,
37367	})
37368	req.Header.Set("User-Agent", c.s.userAgent())
37369	if c.ifNoneMatch_ != "" {
37370		req.Header.Set("If-None-Match", c.ifNoneMatch_)
37371	}
37372	if c.ctx_ != nil {
37373		return ctxhttp.Do(c.ctx_, c.s.client, req)
37374	}
37375	return c.s.client.Do(req)
37376}
37377
37378// Do executes the "compute.sslCertificates.get" call.
37379// Exactly one of *SslCertificate or error will be non-nil. Any non-2xx
37380// status code is an error. Response headers are in either
37381// *SslCertificate.ServerResponse.Header or (if a response was returned
37382// at all) in error.(*googleapi.Error).Header. Use
37383// googleapi.IsNotModified to check whether the returned error was
37384// because http.StatusNotModified was returned.
37385func (c *SslCertificatesGetCall) Do(opts ...googleapi.CallOption) (*SslCertificate, error) {
37386	gensupport.SetOptions(c.urlParams_, opts...)
37387	res, err := c.doRequest("json")
37388	if res != nil && res.StatusCode == http.StatusNotModified {
37389		if res.Body != nil {
37390			res.Body.Close()
37391		}
37392		return nil, &googleapi.Error{
37393			Code:   res.StatusCode,
37394			Header: res.Header,
37395		}
37396	}
37397	if err != nil {
37398		return nil, err
37399	}
37400	defer googleapi.CloseBody(res)
37401	if err := googleapi.CheckResponse(res); err != nil {
37402		return nil, err
37403	}
37404	ret := &SslCertificate{
37405		ServerResponse: googleapi.ServerResponse{
37406			Header:         res.Header,
37407			HTTPStatusCode: res.StatusCode,
37408		},
37409	}
37410	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37411		return nil, err
37412	}
37413	return ret, nil
37414	// {
37415	//   "description": "Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request.",
37416	//   "httpMethod": "GET",
37417	//   "id": "compute.sslCertificates.get",
37418	//   "parameterOrder": [
37419	//     "project",
37420	//     "sslCertificate"
37421	//   ],
37422	//   "parameters": {
37423	//     "project": {
37424	//       "description": "Project ID for this request.",
37425	//       "location": "path",
37426	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37427	//       "required": true,
37428	//       "type": "string"
37429	//     },
37430	//     "sslCertificate": {
37431	//       "description": "Name of the SslCertificate resource to return.",
37432	//       "location": "path",
37433	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
37434	//       "required": true,
37435	//       "type": "string"
37436	//     }
37437	//   },
37438	//   "path": "{project}/global/sslCertificates/{sslCertificate}",
37439	//   "response": {
37440	//     "$ref": "SslCertificate"
37441	//   },
37442	//   "scopes": [
37443	//     "https://www.googleapis.com/auth/cloud-platform",
37444	//     "https://www.googleapis.com/auth/compute",
37445	//     "https://www.googleapis.com/auth/compute.readonly"
37446	//   ]
37447	// }
37448
37449}
37450
37451// method id "compute.sslCertificates.insert":
37452
37453type SslCertificatesInsertCall struct {
37454	s              *Service
37455	project        string
37456	sslcertificate *SslCertificate
37457	urlParams_     gensupport.URLParams
37458	ctx_           context.Context
37459}
37460
37461// Insert: Creates a SslCertificate resource in the specified project
37462// using the data included in the request.
37463func (r *SslCertificatesService) Insert(project string, sslcertificate *SslCertificate) *SslCertificatesInsertCall {
37464	c := &SslCertificatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37465	c.project = project
37466	c.sslcertificate = sslcertificate
37467	return c
37468}
37469
37470// Fields allows partial responses to be retrieved. See
37471// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37472// for more information.
37473func (c *SslCertificatesInsertCall) Fields(s ...googleapi.Field) *SslCertificatesInsertCall {
37474	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37475	return c
37476}
37477
37478// Context sets the context to be used in this call's Do method. Any
37479// pending HTTP request will be aborted if the provided context is
37480// canceled.
37481func (c *SslCertificatesInsertCall) Context(ctx context.Context) *SslCertificatesInsertCall {
37482	c.ctx_ = ctx
37483	return c
37484}
37485
37486func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) {
37487	var body io.Reader = nil
37488	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertificate)
37489	if err != nil {
37490		return nil, err
37491	}
37492	ctype := "application/json"
37493	c.urlParams_.Set("alt", alt)
37494	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates")
37495	urls += "?" + c.urlParams_.Encode()
37496	req, _ := http.NewRequest("POST", urls, body)
37497	googleapi.Expand(req.URL, map[string]string{
37498		"project": c.project,
37499	})
37500	req.Header.Set("Content-Type", ctype)
37501	req.Header.Set("User-Agent", c.s.userAgent())
37502	if c.ctx_ != nil {
37503		return ctxhttp.Do(c.ctx_, c.s.client, req)
37504	}
37505	return c.s.client.Do(req)
37506}
37507
37508// Do executes the "compute.sslCertificates.insert" call.
37509// Exactly one of *Operation or error will be non-nil. Any non-2xx
37510// status code is an error. Response headers are in either
37511// *Operation.ServerResponse.Header or (if a response was returned at
37512// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
37513// to check whether the returned error was because
37514// http.StatusNotModified was returned.
37515func (c *SslCertificatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
37516	gensupport.SetOptions(c.urlParams_, opts...)
37517	res, err := c.doRequest("json")
37518	if res != nil && res.StatusCode == http.StatusNotModified {
37519		if res.Body != nil {
37520			res.Body.Close()
37521		}
37522		return nil, &googleapi.Error{
37523			Code:   res.StatusCode,
37524			Header: res.Header,
37525		}
37526	}
37527	if err != nil {
37528		return nil, err
37529	}
37530	defer googleapi.CloseBody(res)
37531	if err := googleapi.CheckResponse(res); err != nil {
37532		return nil, err
37533	}
37534	ret := &Operation{
37535		ServerResponse: googleapi.ServerResponse{
37536			Header:         res.Header,
37537			HTTPStatusCode: res.StatusCode,
37538		},
37539	}
37540	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37541		return nil, err
37542	}
37543	return ret, nil
37544	// {
37545	//   "description": "Creates a SslCertificate resource in the specified project using the data included in the request.",
37546	//   "httpMethod": "POST",
37547	//   "id": "compute.sslCertificates.insert",
37548	//   "parameterOrder": [
37549	//     "project"
37550	//   ],
37551	//   "parameters": {
37552	//     "project": {
37553	//       "description": "Project ID for this request.",
37554	//       "location": "path",
37555	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37556	//       "required": true,
37557	//       "type": "string"
37558	//     }
37559	//   },
37560	//   "path": "{project}/global/sslCertificates",
37561	//   "request": {
37562	//     "$ref": "SslCertificate"
37563	//   },
37564	//   "response": {
37565	//     "$ref": "Operation"
37566	//   },
37567	//   "scopes": [
37568	//     "https://www.googleapis.com/auth/cloud-platform",
37569	//     "https://www.googleapis.com/auth/compute"
37570	//   ]
37571	// }
37572
37573}
37574
37575// method id "compute.sslCertificates.list":
37576
37577type SslCertificatesListCall struct {
37578	s            *Service
37579	project      string
37580	urlParams_   gensupport.URLParams
37581	ifNoneMatch_ string
37582	ctx_         context.Context
37583}
37584
37585// List: Retrieves the list of SslCertificate resources available to the
37586// specified project.
37587func (r *SslCertificatesService) List(project string) *SslCertificatesListCall {
37588	c := &SslCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37589	c.project = project
37590	return c
37591}
37592
37593// Filter sets the optional parameter "filter": Sets a filter expression
37594// for filtering listed resources, in the form filter={expression}. Your
37595// {expression} must be in the format: field_name comparison_string
37596// literal_string.
37597//
37598// The field_name is the name of the field you want to compare. Only
37599// atomic field types are supported (string, number, boolean). The
37600// comparison_string must be either eq (equals) or ne (not equals). The
37601// literal_string is the string value to filter to. The literal value
37602// must be valid for the type of field you are filtering by (string,
37603// number, boolean). For string fields, the literal value is interpreted
37604// as a regular expression using RE2 syntax. The literal value must
37605// match the entire field.
37606//
37607// For example, to filter for instances that do not have a name of
37608// example-instance, you would use filter=name ne
37609// example-instance.
37610//
37611// Compute Engine Beta API Only: If you use filtering in the Beta API,
37612// you can also filter on nested fields. For example, you could filter
37613// on instances that have set the scheduling.automaticRestart field to
37614// true. In particular, use filtering on nested fields to take advantage
37615// of instance labels to organize and filter results based on label
37616// values.
37617//
37618// The Beta API also supports filtering on multiple expressions by
37619// providing each separate expression within parentheses. For example,
37620// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
37621// Multiple expressions are treated as AND expressions, meaning that
37622// resources must match all expressions to pass the filters.
37623func (c *SslCertificatesListCall) Filter(filter string) *SslCertificatesListCall {
37624	c.urlParams_.Set("filter", filter)
37625	return c
37626}
37627
37628// MaxResults sets the optional parameter "maxResults": The maximum
37629// number of results per page that should be returned. If the number of
37630// available results is larger than maxResults, Compute Engine returns a
37631// nextPageToken that can be used to get the next page of results in
37632// subsequent list requests.
37633func (c *SslCertificatesListCall) MaxResults(maxResults int64) *SslCertificatesListCall {
37634	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
37635	return c
37636}
37637
37638// OrderBy sets the optional parameter "orderBy": Sorts list results by
37639// a certain order. By default, results are returned in alphanumerical
37640// order based on the resource name.
37641//
37642// You can also sort results in descending order based on the creation
37643// timestamp using orderBy="creationTimestamp desc". This sorts results
37644// based on the creationTimestamp field in reverse chronological order
37645// (newest result first). Use this to sort resources like operations so
37646// that the newest operation is returned first.
37647//
37648// Currently, only sorting by name or creationTimestamp desc is
37649// supported.
37650func (c *SslCertificatesListCall) OrderBy(orderBy string) *SslCertificatesListCall {
37651	c.urlParams_.Set("orderBy", orderBy)
37652	return c
37653}
37654
37655// PageToken sets the optional parameter "pageToken": Specifies a page
37656// token to use. Set pageToken to the nextPageToken returned by a
37657// previous list request to get the next page of results.
37658func (c *SslCertificatesListCall) PageToken(pageToken string) *SslCertificatesListCall {
37659	c.urlParams_.Set("pageToken", pageToken)
37660	return c
37661}
37662
37663// Fields allows partial responses to be retrieved. See
37664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37665// for more information.
37666func (c *SslCertificatesListCall) Fields(s ...googleapi.Field) *SslCertificatesListCall {
37667	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37668	return c
37669}
37670
37671// IfNoneMatch sets the optional parameter which makes the operation
37672// fail if the object's ETag matches the given value. This is useful for
37673// getting updates only after the object has changed since the last
37674// request. Use googleapi.IsNotModified to check whether the response
37675// error from Do is the result of In-None-Match.
37676func (c *SslCertificatesListCall) IfNoneMatch(entityTag string) *SslCertificatesListCall {
37677	c.ifNoneMatch_ = entityTag
37678	return c
37679}
37680
37681// Context sets the context to be used in this call's Do method. Any
37682// pending HTTP request will be aborted if the provided context is
37683// canceled.
37684func (c *SslCertificatesListCall) Context(ctx context.Context) *SslCertificatesListCall {
37685	c.ctx_ = ctx
37686	return c
37687}
37688
37689func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) {
37690	var body io.Reader = nil
37691	c.urlParams_.Set("alt", alt)
37692	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates")
37693	urls += "?" + c.urlParams_.Encode()
37694	req, _ := http.NewRequest("GET", urls, body)
37695	googleapi.Expand(req.URL, map[string]string{
37696		"project": c.project,
37697	})
37698	req.Header.Set("User-Agent", c.s.userAgent())
37699	if c.ifNoneMatch_ != "" {
37700		req.Header.Set("If-None-Match", c.ifNoneMatch_)
37701	}
37702	if c.ctx_ != nil {
37703		return ctxhttp.Do(c.ctx_, c.s.client, req)
37704	}
37705	return c.s.client.Do(req)
37706}
37707
37708// Do executes the "compute.sslCertificates.list" call.
37709// Exactly one of *SslCertificateList or error will be non-nil. Any
37710// non-2xx status code is an error. Response headers are in either
37711// *SslCertificateList.ServerResponse.Header or (if a response was
37712// returned at all) in error.(*googleapi.Error).Header. Use
37713// googleapi.IsNotModified to check whether the returned error was
37714// because http.StatusNotModified was returned.
37715func (c *SslCertificatesListCall) Do(opts ...googleapi.CallOption) (*SslCertificateList, error) {
37716	gensupport.SetOptions(c.urlParams_, opts...)
37717	res, err := c.doRequest("json")
37718	if res != nil && res.StatusCode == http.StatusNotModified {
37719		if res.Body != nil {
37720			res.Body.Close()
37721		}
37722		return nil, &googleapi.Error{
37723			Code:   res.StatusCode,
37724			Header: res.Header,
37725		}
37726	}
37727	if err != nil {
37728		return nil, err
37729	}
37730	defer googleapi.CloseBody(res)
37731	if err := googleapi.CheckResponse(res); err != nil {
37732		return nil, err
37733	}
37734	ret := &SslCertificateList{
37735		ServerResponse: googleapi.ServerResponse{
37736			Header:         res.Header,
37737			HTTPStatusCode: res.StatusCode,
37738		},
37739	}
37740	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37741		return nil, err
37742	}
37743	return ret, nil
37744	// {
37745	//   "description": "Retrieves the list of SslCertificate resources available to the specified project.",
37746	//   "httpMethod": "GET",
37747	//   "id": "compute.sslCertificates.list",
37748	//   "parameterOrder": [
37749	//     "project"
37750	//   ],
37751	//   "parameters": {
37752	//     "filter": {
37753	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
37754	//       "location": "query",
37755	//       "type": "string"
37756	//     },
37757	//     "maxResults": {
37758	//       "default": "500",
37759	//       "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.",
37760	//       "format": "uint32",
37761	//       "location": "query",
37762	//       "maximum": "500",
37763	//       "minimum": "0",
37764	//       "type": "integer"
37765	//     },
37766	//     "orderBy": {
37767	//       "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.",
37768	//       "location": "query",
37769	//       "type": "string"
37770	//     },
37771	//     "pageToken": {
37772	//       "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.",
37773	//       "location": "query",
37774	//       "type": "string"
37775	//     },
37776	//     "project": {
37777	//       "description": "Project ID for this request.",
37778	//       "location": "path",
37779	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37780	//       "required": true,
37781	//       "type": "string"
37782	//     }
37783	//   },
37784	//   "path": "{project}/global/sslCertificates",
37785	//   "response": {
37786	//     "$ref": "SslCertificateList"
37787	//   },
37788	//   "scopes": [
37789	//     "https://www.googleapis.com/auth/cloud-platform",
37790	//     "https://www.googleapis.com/auth/compute",
37791	//     "https://www.googleapis.com/auth/compute.readonly"
37792	//   ]
37793	// }
37794
37795}
37796
37797// Pages invokes f for each page of results.
37798// A non-nil error returned from f will halt the iteration.
37799// The provided context supersedes any context provided to the Context method.
37800func (c *SslCertificatesListCall) Pages(ctx context.Context, f func(*SslCertificateList) error) error {
37801	c.ctx_ = ctx
37802	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
37803	for {
37804		x, err := c.Do()
37805		if err != nil {
37806			return err
37807		}
37808		if err := f(x); err != nil {
37809			return err
37810		}
37811		if x.NextPageToken == "" {
37812			return nil
37813		}
37814		c.PageToken(x.NextPageToken)
37815	}
37816}
37817
37818// method id "compute.sslCertificates.testIamPermissions":
37819
37820type SslCertificatesTestIamPermissionsCall struct {
37821	s                      *Service
37822	project                string
37823	resource               string
37824	testpermissionsrequest *TestPermissionsRequest
37825	urlParams_             gensupport.URLParams
37826	ctx_                   context.Context
37827}
37828
37829// TestIamPermissions: Returns permissions that a caller has on the
37830// specified resource.
37831func (r *SslCertificatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *SslCertificatesTestIamPermissionsCall {
37832	c := &SslCertificatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37833	c.project = project
37834	c.resource = resource
37835	c.testpermissionsrequest = testpermissionsrequest
37836	return c
37837}
37838
37839// Fields allows partial responses to be retrieved. See
37840// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
37841// for more information.
37842func (c *SslCertificatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *SslCertificatesTestIamPermissionsCall {
37843	c.urlParams_.Set("fields", googleapi.CombineFields(s))
37844	return c
37845}
37846
37847// Context sets the context to be used in this call's Do method. Any
37848// pending HTTP request will be aborted if the provided context is
37849// canceled.
37850func (c *SslCertificatesTestIamPermissionsCall) Context(ctx context.Context) *SslCertificatesTestIamPermissionsCall {
37851	c.ctx_ = ctx
37852	return c
37853}
37854
37855func (c *SslCertificatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
37856	var body io.Reader = nil
37857	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
37858	if err != nil {
37859		return nil, err
37860	}
37861	ctype := "application/json"
37862	c.urlParams_.Set("alt", alt)
37863	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/sslCertificates/{resource}/testIamPermissions")
37864	urls += "?" + c.urlParams_.Encode()
37865	req, _ := http.NewRequest("POST", urls, body)
37866	googleapi.Expand(req.URL, map[string]string{
37867		"project":  c.project,
37868		"resource": c.resource,
37869	})
37870	req.Header.Set("Content-Type", ctype)
37871	req.Header.Set("User-Agent", c.s.userAgent())
37872	if c.ctx_ != nil {
37873		return ctxhttp.Do(c.ctx_, c.s.client, req)
37874	}
37875	return c.s.client.Do(req)
37876}
37877
37878// Do executes the "compute.sslCertificates.testIamPermissions" call.
37879// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
37880// non-2xx status code is an error. Response headers are in either
37881// *TestPermissionsResponse.ServerResponse.Header or (if a response was
37882// returned at all) in error.(*googleapi.Error).Header. Use
37883// googleapi.IsNotModified to check whether the returned error was
37884// because http.StatusNotModified was returned.
37885func (c *SslCertificatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
37886	gensupport.SetOptions(c.urlParams_, opts...)
37887	res, err := c.doRequest("json")
37888	if res != nil && res.StatusCode == http.StatusNotModified {
37889		if res.Body != nil {
37890			res.Body.Close()
37891		}
37892		return nil, &googleapi.Error{
37893			Code:   res.StatusCode,
37894			Header: res.Header,
37895		}
37896	}
37897	if err != nil {
37898		return nil, err
37899	}
37900	defer googleapi.CloseBody(res)
37901	if err := googleapi.CheckResponse(res); err != nil {
37902		return nil, err
37903	}
37904	ret := &TestPermissionsResponse{
37905		ServerResponse: googleapi.ServerResponse{
37906			Header:         res.Header,
37907			HTTPStatusCode: res.StatusCode,
37908		},
37909	}
37910	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
37911		return nil, err
37912	}
37913	return ret, nil
37914	// {
37915	//   "description": "Returns permissions that a caller has on the specified resource.",
37916	//   "httpMethod": "POST",
37917	//   "id": "compute.sslCertificates.testIamPermissions",
37918	//   "parameterOrder": [
37919	//     "project",
37920	//     "resource"
37921	//   ],
37922	//   "parameters": {
37923	//     "project": {
37924	//       "description": "Project ID for this request.",
37925	//       "location": "path",
37926	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
37927	//       "required": true,
37928	//       "type": "string"
37929	//     },
37930	//     "resource": {
37931	//       "description": "Name of the resource for this request.",
37932	//       "location": "path",
37933	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
37934	//       "required": true,
37935	//       "type": "string"
37936	//     }
37937	//   },
37938	//   "path": "{project}/global/sslCertificates/{resource}/testIamPermissions",
37939	//   "request": {
37940	//     "$ref": "TestPermissionsRequest"
37941	//   },
37942	//   "response": {
37943	//     "$ref": "TestPermissionsResponse"
37944	//   },
37945	//   "scopes": [
37946	//     "https://www.googleapis.com/auth/cloud-platform",
37947	//     "https://www.googleapis.com/auth/compute",
37948	//     "https://www.googleapis.com/auth/compute.readonly"
37949	//   ]
37950	// }
37951
37952}
37953
37954// method id "compute.subnetworks.aggregatedList":
37955
37956type SubnetworksAggregatedListCall struct {
37957	s            *Service
37958	project      string
37959	urlParams_   gensupport.URLParams
37960	ifNoneMatch_ string
37961	ctx_         context.Context
37962}
37963
37964// AggregatedList: Retrieves an aggregated list of subnetworks.
37965func (r *SubnetworksService) AggregatedList(project string) *SubnetworksAggregatedListCall {
37966	c := &SubnetworksAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
37967	c.project = project
37968	return c
37969}
37970
37971// Filter sets the optional parameter "filter": Sets a filter expression
37972// for filtering listed resources, in the form filter={expression}. Your
37973// {expression} must be in the format: field_name comparison_string
37974// literal_string.
37975//
37976// The field_name is the name of the field you want to compare. Only
37977// atomic field types are supported (string, number, boolean). The
37978// comparison_string must be either eq (equals) or ne (not equals). The
37979// literal_string is the string value to filter to. The literal value
37980// must be valid for the type of field you are filtering by (string,
37981// number, boolean). For string fields, the literal value is interpreted
37982// as a regular expression using RE2 syntax. The literal value must
37983// match the entire field.
37984//
37985// For example, to filter for instances that do not have a name of
37986// example-instance, you would use filter=name ne
37987// example-instance.
37988//
37989// Compute Engine Beta API Only: If you use filtering in the Beta API,
37990// you can also filter on nested fields. For example, you could filter
37991// on instances that have set the scheduling.automaticRestart field to
37992// true. In particular, use filtering on nested fields to take advantage
37993// of instance labels to organize and filter results based on label
37994// values.
37995//
37996// The Beta API also supports filtering on multiple expressions by
37997// providing each separate expression within parentheses. For example,
37998// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
37999// Multiple expressions are treated as AND expressions, meaning that
38000// resources must match all expressions to pass the filters.
38001func (c *SubnetworksAggregatedListCall) Filter(filter string) *SubnetworksAggregatedListCall {
38002	c.urlParams_.Set("filter", filter)
38003	return c
38004}
38005
38006// MaxResults sets the optional parameter "maxResults": The maximum
38007// number of results per page that should be returned. If the number of
38008// available results is larger than maxResults, Compute Engine returns a
38009// nextPageToken that can be used to get the next page of results in
38010// subsequent list requests.
38011func (c *SubnetworksAggregatedListCall) MaxResults(maxResults int64) *SubnetworksAggregatedListCall {
38012	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38013	return c
38014}
38015
38016// OrderBy sets the optional parameter "orderBy": Sorts list results by
38017// a certain order. By default, results are returned in alphanumerical
38018// order based on the resource name.
38019//
38020// You can also sort results in descending order based on the creation
38021// timestamp using orderBy="creationTimestamp desc". This sorts results
38022// based on the creationTimestamp field in reverse chronological order
38023// (newest result first). Use this to sort resources like operations so
38024// that the newest operation is returned first.
38025//
38026// Currently, only sorting by name or creationTimestamp desc is
38027// supported.
38028func (c *SubnetworksAggregatedListCall) OrderBy(orderBy string) *SubnetworksAggregatedListCall {
38029	c.urlParams_.Set("orderBy", orderBy)
38030	return c
38031}
38032
38033// PageToken sets the optional parameter "pageToken": Specifies a page
38034// token to use. Set pageToken to the nextPageToken returned by a
38035// previous list request to get the next page of results.
38036func (c *SubnetworksAggregatedListCall) PageToken(pageToken string) *SubnetworksAggregatedListCall {
38037	c.urlParams_.Set("pageToken", pageToken)
38038	return c
38039}
38040
38041// Fields allows partial responses to be retrieved. See
38042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38043// for more information.
38044func (c *SubnetworksAggregatedListCall) Fields(s ...googleapi.Field) *SubnetworksAggregatedListCall {
38045	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38046	return c
38047}
38048
38049// IfNoneMatch sets the optional parameter which makes the operation
38050// fail if the object's ETag matches the given value. This is useful for
38051// getting updates only after the object has changed since the last
38052// request. Use googleapi.IsNotModified to check whether the response
38053// error from Do is the result of In-None-Match.
38054func (c *SubnetworksAggregatedListCall) IfNoneMatch(entityTag string) *SubnetworksAggregatedListCall {
38055	c.ifNoneMatch_ = entityTag
38056	return c
38057}
38058
38059// Context sets the context to be used in this call's Do method. Any
38060// pending HTTP request will be aborted if the provided context is
38061// canceled.
38062func (c *SubnetworksAggregatedListCall) Context(ctx context.Context) *SubnetworksAggregatedListCall {
38063	c.ctx_ = ctx
38064	return c
38065}
38066
38067func (c *SubnetworksAggregatedListCall) doRequest(alt string) (*http.Response, error) {
38068	var body io.Reader = nil
38069	c.urlParams_.Set("alt", alt)
38070	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/subnetworks")
38071	urls += "?" + c.urlParams_.Encode()
38072	req, _ := http.NewRequest("GET", urls, body)
38073	googleapi.Expand(req.URL, map[string]string{
38074		"project": c.project,
38075	})
38076	req.Header.Set("User-Agent", c.s.userAgent())
38077	if c.ifNoneMatch_ != "" {
38078		req.Header.Set("If-None-Match", c.ifNoneMatch_)
38079	}
38080	if c.ctx_ != nil {
38081		return ctxhttp.Do(c.ctx_, c.s.client, req)
38082	}
38083	return c.s.client.Do(req)
38084}
38085
38086// Do executes the "compute.subnetworks.aggregatedList" call.
38087// Exactly one of *SubnetworkAggregatedList or error will be non-nil.
38088// Any non-2xx status code is an error. Response headers are in either
38089// *SubnetworkAggregatedList.ServerResponse.Header or (if a response was
38090// returned at all) in error.(*googleapi.Error).Header. Use
38091// googleapi.IsNotModified to check whether the returned error was
38092// because http.StatusNotModified was returned.
38093func (c *SubnetworksAggregatedListCall) Do(opts ...googleapi.CallOption) (*SubnetworkAggregatedList, error) {
38094	gensupport.SetOptions(c.urlParams_, opts...)
38095	res, err := c.doRequest("json")
38096	if res != nil && res.StatusCode == http.StatusNotModified {
38097		if res.Body != nil {
38098			res.Body.Close()
38099		}
38100		return nil, &googleapi.Error{
38101			Code:   res.StatusCode,
38102			Header: res.Header,
38103		}
38104	}
38105	if err != nil {
38106		return nil, err
38107	}
38108	defer googleapi.CloseBody(res)
38109	if err := googleapi.CheckResponse(res); err != nil {
38110		return nil, err
38111	}
38112	ret := &SubnetworkAggregatedList{
38113		ServerResponse: googleapi.ServerResponse{
38114			Header:         res.Header,
38115			HTTPStatusCode: res.StatusCode,
38116		},
38117	}
38118	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38119		return nil, err
38120	}
38121	return ret, nil
38122	// {
38123	//   "description": "Retrieves an aggregated list of subnetworks.",
38124	//   "httpMethod": "GET",
38125	//   "id": "compute.subnetworks.aggregatedList",
38126	//   "parameterOrder": [
38127	//     "project"
38128	//   ],
38129	//   "parameters": {
38130	//     "filter": {
38131	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
38132	//       "location": "query",
38133	//       "type": "string"
38134	//     },
38135	//     "maxResults": {
38136	//       "default": "500",
38137	//       "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.",
38138	//       "format": "uint32",
38139	//       "location": "query",
38140	//       "maximum": "500",
38141	//       "minimum": "0",
38142	//       "type": "integer"
38143	//     },
38144	//     "orderBy": {
38145	//       "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.",
38146	//       "location": "query",
38147	//       "type": "string"
38148	//     },
38149	//     "pageToken": {
38150	//       "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.",
38151	//       "location": "query",
38152	//       "type": "string"
38153	//     },
38154	//     "project": {
38155	//       "description": "Project ID for this request.",
38156	//       "location": "path",
38157	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38158	//       "required": true,
38159	//       "type": "string"
38160	//     }
38161	//   },
38162	//   "path": "{project}/aggregated/subnetworks",
38163	//   "response": {
38164	//     "$ref": "SubnetworkAggregatedList"
38165	//   },
38166	//   "scopes": [
38167	//     "https://www.googleapis.com/auth/cloud-platform",
38168	//     "https://www.googleapis.com/auth/compute",
38169	//     "https://www.googleapis.com/auth/compute.readonly"
38170	//   ]
38171	// }
38172
38173}
38174
38175// Pages invokes f for each page of results.
38176// A non-nil error returned from f will halt the iteration.
38177// The provided context supersedes any context provided to the Context method.
38178func (c *SubnetworksAggregatedListCall) Pages(ctx context.Context, f func(*SubnetworkAggregatedList) error) error {
38179	c.ctx_ = ctx
38180	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38181	for {
38182		x, err := c.Do()
38183		if err != nil {
38184			return err
38185		}
38186		if err := f(x); err != nil {
38187			return err
38188		}
38189		if x.NextPageToken == "" {
38190			return nil
38191		}
38192		c.PageToken(x.NextPageToken)
38193	}
38194}
38195
38196// method id "compute.subnetworks.delete":
38197
38198type SubnetworksDeleteCall struct {
38199	s          *Service
38200	project    string
38201	region     string
38202	subnetwork string
38203	urlParams_ gensupport.URLParams
38204	ctx_       context.Context
38205}
38206
38207// Delete: Deletes the specified subnetwork.
38208func (r *SubnetworksService) Delete(project string, region string, subnetwork string) *SubnetworksDeleteCall {
38209	c := &SubnetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38210	c.project = project
38211	c.region = region
38212	c.subnetwork = subnetwork
38213	return c
38214}
38215
38216// Fields allows partial responses to be retrieved. See
38217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38218// for more information.
38219func (c *SubnetworksDeleteCall) Fields(s ...googleapi.Field) *SubnetworksDeleteCall {
38220	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38221	return c
38222}
38223
38224// Context sets the context to be used in this call's Do method. Any
38225// pending HTTP request will be aborted if the provided context is
38226// canceled.
38227func (c *SubnetworksDeleteCall) Context(ctx context.Context) *SubnetworksDeleteCall {
38228	c.ctx_ = ctx
38229	return c
38230}
38231
38232func (c *SubnetworksDeleteCall) doRequest(alt string) (*http.Response, error) {
38233	var body io.Reader = nil
38234	c.urlParams_.Set("alt", alt)
38235	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}")
38236	urls += "?" + c.urlParams_.Encode()
38237	req, _ := http.NewRequest("DELETE", urls, body)
38238	googleapi.Expand(req.URL, map[string]string{
38239		"project":    c.project,
38240		"region":     c.region,
38241		"subnetwork": c.subnetwork,
38242	})
38243	req.Header.Set("User-Agent", c.s.userAgent())
38244	if c.ctx_ != nil {
38245		return ctxhttp.Do(c.ctx_, c.s.client, req)
38246	}
38247	return c.s.client.Do(req)
38248}
38249
38250// Do executes the "compute.subnetworks.delete" call.
38251// Exactly one of *Operation or error will be non-nil. Any non-2xx
38252// status code is an error. Response headers are in either
38253// *Operation.ServerResponse.Header or (if a response was returned at
38254// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38255// to check whether the returned error was because
38256// http.StatusNotModified was returned.
38257func (c *SubnetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
38258	gensupport.SetOptions(c.urlParams_, opts...)
38259	res, err := c.doRequest("json")
38260	if res != nil && res.StatusCode == http.StatusNotModified {
38261		if res.Body != nil {
38262			res.Body.Close()
38263		}
38264		return nil, &googleapi.Error{
38265			Code:   res.StatusCode,
38266			Header: res.Header,
38267		}
38268	}
38269	if err != nil {
38270		return nil, err
38271	}
38272	defer googleapi.CloseBody(res)
38273	if err := googleapi.CheckResponse(res); err != nil {
38274		return nil, err
38275	}
38276	ret := &Operation{
38277		ServerResponse: googleapi.ServerResponse{
38278			Header:         res.Header,
38279			HTTPStatusCode: res.StatusCode,
38280		},
38281	}
38282	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38283		return nil, err
38284	}
38285	return ret, nil
38286	// {
38287	//   "description": "Deletes the specified subnetwork.",
38288	//   "httpMethod": "DELETE",
38289	//   "id": "compute.subnetworks.delete",
38290	//   "parameterOrder": [
38291	//     "project",
38292	//     "region",
38293	//     "subnetwork"
38294	//   ],
38295	//   "parameters": {
38296	//     "project": {
38297	//       "description": "Project ID for this request.",
38298	//       "location": "path",
38299	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38300	//       "required": true,
38301	//       "type": "string"
38302	//     },
38303	//     "region": {
38304	//       "description": "Name of the region scoping this request.",
38305	//       "location": "path",
38306	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38307	//       "required": true,
38308	//       "type": "string"
38309	//     },
38310	//     "subnetwork": {
38311	//       "description": "Name of the Subnetwork resource to delete.",
38312	//       "location": "path",
38313	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38314	//       "required": true,
38315	//       "type": "string"
38316	//     }
38317	//   },
38318	//   "path": "{project}/regions/{region}/subnetworks/{subnetwork}",
38319	//   "response": {
38320	//     "$ref": "Operation"
38321	//   },
38322	//   "scopes": [
38323	//     "https://www.googleapis.com/auth/cloud-platform",
38324	//     "https://www.googleapis.com/auth/compute"
38325	//   ]
38326	// }
38327
38328}
38329
38330// method id "compute.subnetworks.get":
38331
38332type SubnetworksGetCall struct {
38333	s            *Service
38334	project      string
38335	region       string
38336	subnetwork   string
38337	urlParams_   gensupport.URLParams
38338	ifNoneMatch_ string
38339	ctx_         context.Context
38340}
38341
38342// Get: Returns the specified subnetwork. Get a list of available
38343// subnetworks by making a list() request.
38344func (r *SubnetworksService) Get(project string, region string, subnetwork string) *SubnetworksGetCall {
38345	c := &SubnetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38346	c.project = project
38347	c.region = region
38348	c.subnetwork = subnetwork
38349	return c
38350}
38351
38352// Fields allows partial responses to be retrieved. See
38353// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38354// for more information.
38355func (c *SubnetworksGetCall) Fields(s ...googleapi.Field) *SubnetworksGetCall {
38356	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38357	return c
38358}
38359
38360// IfNoneMatch sets the optional parameter which makes the operation
38361// fail if the object's ETag matches the given value. This is useful for
38362// getting updates only after the object has changed since the last
38363// request. Use googleapi.IsNotModified to check whether the response
38364// error from Do is the result of In-None-Match.
38365func (c *SubnetworksGetCall) IfNoneMatch(entityTag string) *SubnetworksGetCall {
38366	c.ifNoneMatch_ = entityTag
38367	return c
38368}
38369
38370// Context sets the context to be used in this call's Do method. Any
38371// pending HTTP request will be aborted if the provided context is
38372// canceled.
38373func (c *SubnetworksGetCall) Context(ctx context.Context) *SubnetworksGetCall {
38374	c.ctx_ = ctx
38375	return c
38376}
38377
38378func (c *SubnetworksGetCall) doRequest(alt string) (*http.Response, error) {
38379	var body io.Reader = nil
38380	c.urlParams_.Set("alt", alt)
38381	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}")
38382	urls += "?" + c.urlParams_.Encode()
38383	req, _ := http.NewRequest("GET", urls, body)
38384	googleapi.Expand(req.URL, map[string]string{
38385		"project":    c.project,
38386		"region":     c.region,
38387		"subnetwork": c.subnetwork,
38388	})
38389	req.Header.Set("User-Agent", c.s.userAgent())
38390	if c.ifNoneMatch_ != "" {
38391		req.Header.Set("If-None-Match", c.ifNoneMatch_)
38392	}
38393	if c.ctx_ != nil {
38394		return ctxhttp.Do(c.ctx_, c.s.client, req)
38395	}
38396	return c.s.client.Do(req)
38397}
38398
38399// Do executes the "compute.subnetworks.get" call.
38400// Exactly one of *Subnetwork or error will be non-nil. Any non-2xx
38401// status code is an error. Response headers are in either
38402// *Subnetwork.ServerResponse.Header or (if a response was returned at
38403// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38404// to check whether the returned error was because
38405// http.StatusNotModified was returned.
38406func (c *SubnetworksGetCall) Do(opts ...googleapi.CallOption) (*Subnetwork, error) {
38407	gensupport.SetOptions(c.urlParams_, opts...)
38408	res, err := c.doRequest("json")
38409	if res != nil && res.StatusCode == http.StatusNotModified {
38410		if res.Body != nil {
38411			res.Body.Close()
38412		}
38413		return nil, &googleapi.Error{
38414			Code:   res.StatusCode,
38415			Header: res.Header,
38416		}
38417	}
38418	if err != nil {
38419		return nil, err
38420	}
38421	defer googleapi.CloseBody(res)
38422	if err := googleapi.CheckResponse(res); err != nil {
38423		return nil, err
38424	}
38425	ret := &Subnetwork{
38426		ServerResponse: googleapi.ServerResponse{
38427			Header:         res.Header,
38428			HTTPStatusCode: res.StatusCode,
38429		},
38430	}
38431	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38432		return nil, err
38433	}
38434	return ret, nil
38435	// {
38436	//   "description": "Returns the specified subnetwork. Get a list of available subnetworks by making a list() request.",
38437	//   "httpMethod": "GET",
38438	//   "id": "compute.subnetworks.get",
38439	//   "parameterOrder": [
38440	//     "project",
38441	//     "region",
38442	//     "subnetwork"
38443	//   ],
38444	//   "parameters": {
38445	//     "project": {
38446	//       "description": "Project ID for this request.",
38447	//       "location": "path",
38448	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38449	//       "required": true,
38450	//       "type": "string"
38451	//     },
38452	//     "region": {
38453	//       "description": "Name of the region scoping this request.",
38454	//       "location": "path",
38455	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38456	//       "required": true,
38457	//       "type": "string"
38458	//     },
38459	//     "subnetwork": {
38460	//       "description": "Name of the Subnetwork resource to return.",
38461	//       "location": "path",
38462	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38463	//       "required": true,
38464	//       "type": "string"
38465	//     }
38466	//   },
38467	//   "path": "{project}/regions/{region}/subnetworks/{subnetwork}",
38468	//   "response": {
38469	//     "$ref": "Subnetwork"
38470	//   },
38471	//   "scopes": [
38472	//     "https://www.googleapis.com/auth/cloud-platform",
38473	//     "https://www.googleapis.com/auth/compute",
38474	//     "https://www.googleapis.com/auth/compute.readonly"
38475	//   ]
38476	// }
38477
38478}
38479
38480// method id "compute.subnetworks.insert":
38481
38482type SubnetworksInsertCall struct {
38483	s          *Service
38484	project    string
38485	region     string
38486	subnetwork *Subnetwork
38487	urlParams_ gensupport.URLParams
38488	ctx_       context.Context
38489}
38490
38491// Insert: Creates a subnetwork in the specified project using the data
38492// included in the request.
38493func (r *SubnetworksService) Insert(project string, region string, subnetwork *Subnetwork) *SubnetworksInsertCall {
38494	c := &SubnetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38495	c.project = project
38496	c.region = region
38497	c.subnetwork = subnetwork
38498	return c
38499}
38500
38501// Fields allows partial responses to be retrieved. See
38502// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38503// for more information.
38504func (c *SubnetworksInsertCall) Fields(s ...googleapi.Field) *SubnetworksInsertCall {
38505	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38506	return c
38507}
38508
38509// Context sets the context to be used in this call's Do method. Any
38510// pending HTTP request will be aborted if the provided context is
38511// canceled.
38512func (c *SubnetworksInsertCall) Context(ctx context.Context) *SubnetworksInsertCall {
38513	c.ctx_ = ctx
38514	return c
38515}
38516
38517func (c *SubnetworksInsertCall) doRequest(alt string) (*http.Response, error) {
38518	var body io.Reader = nil
38519	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork)
38520	if err != nil {
38521		return nil, err
38522	}
38523	ctype := "application/json"
38524	c.urlParams_.Set("alt", alt)
38525	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks")
38526	urls += "?" + c.urlParams_.Encode()
38527	req, _ := http.NewRequest("POST", urls, body)
38528	googleapi.Expand(req.URL, map[string]string{
38529		"project": c.project,
38530		"region":  c.region,
38531	})
38532	req.Header.Set("Content-Type", ctype)
38533	req.Header.Set("User-Agent", c.s.userAgent())
38534	if c.ctx_ != nil {
38535		return ctxhttp.Do(c.ctx_, c.s.client, req)
38536	}
38537	return c.s.client.Do(req)
38538}
38539
38540// Do executes the "compute.subnetworks.insert" call.
38541// Exactly one of *Operation or error will be non-nil. Any non-2xx
38542// status code is an error. Response headers are in either
38543// *Operation.ServerResponse.Header or (if a response was returned at
38544// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
38545// to check whether the returned error was because
38546// http.StatusNotModified was returned.
38547func (c *SubnetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
38548	gensupport.SetOptions(c.urlParams_, opts...)
38549	res, err := c.doRequest("json")
38550	if res != nil && res.StatusCode == http.StatusNotModified {
38551		if res.Body != nil {
38552			res.Body.Close()
38553		}
38554		return nil, &googleapi.Error{
38555			Code:   res.StatusCode,
38556			Header: res.Header,
38557		}
38558	}
38559	if err != nil {
38560		return nil, err
38561	}
38562	defer googleapi.CloseBody(res)
38563	if err := googleapi.CheckResponse(res); err != nil {
38564		return nil, err
38565	}
38566	ret := &Operation{
38567		ServerResponse: googleapi.ServerResponse{
38568			Header:         res.Header,
38569			HTTPStatusCode: res.StatusCode,
38570		},
38571	}
38572	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38573		return nil, err
38574	}
38575	return ret, nil
38576	// {
38577	//   "description": "Creates a subnetwork in the specified project using the data included in the request.",
38578	//   "httpMethod": "POST",
38579	//   "id": "compute.subnetworks.insert",
38580	//   "parameterOrder": [
38581	//     "project",
38582	//     "region"
38583	//   ],
38584	//   "parameters": {
38585	//     "project": {
38586	//       "description": "Project ID for this request.",
38587	//       "location": "path",
38588	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38589	//       "required": true,
38590	//       "type": "string"
38591	//     },
38592	//     "region": {
38593	//       "description": "Name of the region scoping this request.",
38594	//       "location": "path",
38595	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38596	//       "required": true,
38597	//       "type": "string"
38598	//     }
38599	//   },
38600	//   "path": "{project}/regions/{region}/subnetworks",
38601	//   "request": {
38602	//     "$ref": "Subnetwork"
38603	//   },
38604	//   "response": {
38605	//     "$ref": "Operation"
38606	//   },
38607	//   "scopes": [
38608	//     "https://www.googleapis.com/auth/cloud-platform",
38609	//     "https://www.googleapis.com/auth/compute"
38610	//   ]
38611	// }
38612
38613}
38614
38615// method id "compute.subnetworks.list":
38616
38617type SubnetworksListCall struct {
38618	s            *Service
38619	project      string
38620	region       string
38621	urlParams_   gensupport.URLParams
38622	ifNoneMatch_ string
38623	ctx_         context.Context
38624}
38625
38626// List: Retrieves a list of subnetworks available to the specified
38627// project.
38628func (r *SubnetworksService) List(project string, region string) *SubnetworksListCall {
38629	c := &SubnetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38630	c.project = project
38631	c.region = region
38632	return c
38633}
38634
38635// Filter sets the optional parameter "filter": Sets a filter expression
38636// for filtering listed resources, in the form filter={expression}. Your
38637// {expression} must be in the format: field_name comparison_string
38638// literal_string.
38639//
38640// The field_name is the name of the field you want to compare. Only
38641// atomic field types are supported (string, number, boolean). The
38642// comparison_string must be either eq (equals) or ne (not equals). The
38643// literal_string is the string value to filter to. The literal value
38644// must be valid for the type of field you are filtering by (string,
38645// number, boolean). For string fields, the literal value is interpreted
38646// as a regular expression using RE2 syntax. The literal value must
38647// match the entire field.
38648//
38649// For example, to filter for instances that do not have a name of
38650// example-instance, you would use filter=name ne
38651// example-instance.
38652//
38653// Compute Engine Beta API Only: If you use filtering in the Beta API,
38654// you can also filter on nested fields. For example, you could filter
38655// on instances that have set the scheduling.automaticRestart field to
38656// true. In particular, use filtering on nested fields to take advantage
38657// of instance labels to organize and filter results based on label
38658// values.
38659//
38660// The Beta API also supports filtering on multiple expressions by
38661// providing each separate expression within parentheses. For example,
38662// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
38663// Multiple expressions are treated as AND expressions, meaning that
38664// resources must match all expressions to pass the filters.
38665func (c *SubnetworksListCall) Filter(filter string) *SubnetworksListCall {
38666	c.urlParams_.Set("filter", filter)
38667	return c
38668}
38669
38670// MaxResults sets the optional parameter "maxResults": The maximum
38671// number of results per page that should be returned. If the number of
38672// available results is larger than maxResults, Compute Engine returns a
38673// nextPageToken that can be used to get the next page of results in
38674// subsequent list requests.
38675func (c *SubnetworksListCall) MaxResults(maxResults int64) *SubnetworksListCall {
38676	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
38677	return c
38678}
38679
38680// OrderBy sets the optional parameter "orderBy": Sorts list results by
38681// a certain order. By default, results are returned in alphanumerical
38682// order based on the resource name.
38683//
38684// You can also sort results in descending order based on the creation
38685// timestamp using orderBy="creationTimestamp desc". This sorts results
38686// based on the creationTimestamp field in reverse chronological order
38687// (newest result first). Use this to sort resources like operations so
38688// that the newest operation is returned first.
38689//
38690// Currently, only sorting by name or creationTimestamp desc is
38691// supported.
38692func (c *SubnetworksListCall) OrderBy(orderBy string) *SubnetworksListCall {
38693	c.urlParams_.Set("orderBy", orderBy)
38694	return c
38695}
38696
38697// PageToken sets the optional parameter "pageToken": Specifies a page
38698// token to use. Set pageToken to the nextPageToken returned by a
38699// previous list request to get the next page of results.
38700func (c *SubnetworksListCall) PageToken(pageToken string) *SubnetworksListCall {
38701	c.urlParams_.Set("pageToken", pageToken)
38702	return c
38703}
38704
38705// Fields allows partial responses to be retrieved. See
38706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38707// for more information.
38708func (c *SubnetworksListCall) Fields(s ...googleapi.Field) *SubnetworksListCall {
38709	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38710	return c
38711}
38712
38713// IfNoneMatch sets the optional parameter which makes the operation
38714// fail if the object's ETag matches the given value. This is useful for
38715// getting updates only after the object has changed since the last
38716// request. Use googleapi.IsNotModified to check whether the response
38717// error from Do is the result of In-None-Match.
38718func (c *SubnetworksListCall) IfNoneMatch(entityTag string) *SubnetworksListCall {
38719	c.ifNoneMatch_ = entityTag
38720	return c
38721}
38722
38723// Context sets the context to be used in this call's Do method. Any
38724// pending HTTP request will be aborted if the provided context is
38725// canceled.
38726func (c *SubnetworksListCall) Context(ctx context.Context) *SubnetworksListCall {
38727	c.ctx_ = ctx
38728	return c
38729}
38730
38731func (c *SubnetworksListCall) doRequest(alt string) (*http.Response, error) {
38732	var body io.Reader = nil
38733	c.urlParams_.Set("alt", alt)
38734	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks")
38735	urls += "?" + c.urlParams_.Encode()
38736	req, _ := http.NewRequest("GET", urls, body)
38737	googleapi.Expand(req.URL, map[string]string{
38738		"project": c.project,
38739		"region":  c.region,
38740	})
38741	req.Header.Set("User-Agent", c.s.userAgent())
38742	if c.ifNoneMatch_ != "" {
38743		req.Header.Set("If-None-Match", c.ifNoneMatch_)
38744	}
38745	if c.ctx_ != nil {
38746		return ctxhttp.Do(c.ctx_, c.s.client, req)
38747	}
38748	return c.s.client.Do(req)
38749}
38750
38751// Do executes the "compute.subnetworks.list" call.
38752// Exactly one of *SubnetworkList or error will be non-nil. Any non-2xx
38753// status code is an error. Response headers are in either
38754// *SubnetworkList.ServerResponse.Header or (if a response was returned
38755// at all) in error.(*googleapi.Error).Header. Use
38756// googleapi.IsNotModified to check whether the returned error was
38757// because http.StatusNotModified was returned.
38758func (c *SubnetworksListCall) Do(opts ...googleapi.CallOption) (*SubnetworkList, error) {
38759	gensupport.SetOptions(c.urlParams_, opts...)
38760	res, err := c.doRequest("json")
38761	if res != nil && res.StatusCode == http.StatusNotModified {
38762		if res.Body != nil {
38763			res.Body.Close()
38764		}
38765		return nil, &googleapi.Error{
38766			Code:   res.StatusCode,
38767			Header: res.Header,
38768		}
38769	}
38770	if err != nil {
38771		return nil, err
38772	}
38773	defer googleapi.CloseBody(res)
38774	if err := googleapi.CheckResponse(res); err != nil {
38775		return nil, err
38776	}
38777	ret := &SubnetworkList{
38778		ServerResponse: googleapi.ServerResponse{
38779			Header:         res.Header,
38780			HTTPStatusCode: res.StatusCode,
38781		},
38782	}
38783	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38784		return nil, err
38785	}
38786	return ret, nil
38787	// {
38788	//   "description": "Retrieves a list of subnetworks available to the specified project.",
38789	//   "httpMethod": "GET",
38790	//   "id": "compute.subnetworks.list",
38791	//   "parameterOrder": [
38792	//     "project",
38793	//     "region"
38794	//   ],
38795	//   "parameters": {
38796	//     "filter": {
38797	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
38798	//       "location": "query",
38799	//       "type": "string"
38800	//     },
38801	//     "maxResults": {
38802	//       "default": "500",
38803	//       "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.",
38804	//       "format": "uint32",
38805	//       "location": "query",
38806	//       "maximum": "500",
38807	//       "minimum": "0",
38808	//       "type": "integer"
38809	//     },
38810	//     "orderBy": {
38811	//       "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.",
38812	//       "location": "query",
38813	//       "type": "string"
38814	//     },
38815	//     "pageToken": {
38816	//       "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.",
38817	//       "location": "query",
38818	//       "type": "string"
38819	//     },
38820	//     "project": {
38821	//       "description": "Project ID for this request.",
38822	//       "location": "path",
38823	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38824	//       "required": true,
38825	//       "type": "string"
38826	//     },
38827	//     "region": {
38828	//       "description": "Name of the region scoping this request.",
38829	//       "location": "path",
38830	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38831	//       "required": true,
38832	//       "type": "string"
38833	//     }
38834	//   },
38835	//   "path": "{project}/regions/{region}/subnetworks",
38836	//   "response": {
38837	//     "$ref": "SubnetworkList"
38838	//   },
38839	//   "scopes": [
38840	//     "https://www.googleapis.com/auth/cloud-platform",
38841	//     "https://www.googleapis.com/auth/compute",
38842	//     "https://www.googleapis.com/auth/compute.readonly"
38843	//   ]
38844	// }
38845
38846}
38847
38848// Pages invokes f for each page of results.
38849// A non-nil error returned from f will halt the iteration.
38850// The provided context supersedes any context provided to the Context method.
38851func (c *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList) error) error {
38852	c.ctx_ = ctx
38853	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
38854	for {
38855		x, err := c.Do()
38856		if err != nil {
38857			return err
38858		}
38859		if err := f(x); err != nil {
38860			return err
38861		}
38862		if x.NextPageToken == "" {
38863			return nil
38864		}
38865		c.PageToken(x.NextPageToken)
38866	}
38867}
38868
38869// method id "compute.subnetworks.testIamPermissions":
38870
38871type SubnetworksTestIamPermissionsCall struct {
38872	s                      *Service
38873	project                string
38874	region                 string
38875	resource               string
38876	testpermissionsrequest *TestPermissionsRequest
38877	urlParams_             gensupport.URLParams
38878	ctx_                   context.Context
38879}
38880
38881// TestIamPermissions: Returns permissions that a caller has on the
38882// specified resource.
38883func (r *SubnetworksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *SubnetworksTestIamPermissionsCall {
38884	c := &SubnetworksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
38885	c.project = project
38886	c.region = region
38887	c.resource = resource
38888	c.testpermissionsrequest = testpermissionsrequest
38889	return c
38890}
38891
38892// Fields allows partial responses to be retrieved. See
38893// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
38894// for more information.
38895func (c *SubnetworksTestIamPermissionsCall) Fields(s ...googleapi.Field) *SubnetworksTestIamPermissionsCall {
38896	c.urlParams_.Set("fields", googleapi.CombineFields(s))
38897	return c
38898}
38899
38900// Context sets the context to be used in this call's Do method. Any
38901// pending HTTP request will be aborted if the provided context is
38902// canceled.
38903func (c *SubnetworksTestIamPermissionsCall) Context(ctx context.Context) *SubnetworksTestIamPermissionsCall {
38904	c.ctx_ = ctx
38905	return c
38906}
38907
38908func (c *SubnetworksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
38909	var body io.Reader = nil
38910	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
38911	if err != nil {
38912		return nil, err
38913	}
38914	ctype := "application/json"
38915	c.urlParams_.Set("alt", alt)
38916	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions")
38917	urls += "?" + c.urlParams_.Encode()
38918	req, _ := http.NewRequest("POST", urls, body)
38919	googleapi.Expand(req.URL, map[string]string{
38920		"project":  c.project,
38921		"region":   c.region,
38922		"resource": c.resource,
38923	})
38924	req.Header.Set("Content-Type", ctype)
38925	req.Header.Set("User-Agent", c.s.userAgent())
38926	if c.ctx_ != nil {
38927		return ctxhttp.Do(c.ctx_, c.s.client, req)
38928	}
38929	return c.s.client.Do(req)
38930}
38931
38932// Do executes the "compute.subnetworks.testIamPermissions" call.
38933// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
38934// non-2xx status code is an error. Response headers are in either
38935// *TestPermissionsResponse.ServerResponse.Header or (if a response was
38936// returned at all) in error.(*googleapi.Error).Header. Use
38937// googleapi.IsNotModified to check whether the returned error was
38938// because http.StatusNotModified was returned.
38939func (c *SubnetworksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
38940	gensupport.SetOptions(c.urlParams_, opts...)
38941	res, err := c.doRequest("json")
38942	if res != nil && res.StatusCode == http.StatusNotModified {
38943		if res.Body != nil {
38944			res.Body.Close()
38945		}
38946		return nil, &googleapi.Error{
38947			Code:   res.StatusCode,
38948			Header: res.Header,
38949		}
38950	}
38951	if err != nil {
38952		return nil, err
38953	}
38954	defer googleapi.CloseBody(res)
38955	if err := googleapi.CheckResponse(res); err != nil {
38956		return nil, err
38957	}
38958	ret := &TestPermissionsResponse{
38959		ServerResponse: googleapi.ServerResponse{
38960			Header:         res.Header,
38961			HTTPStatusCode: res.StatusCode,
38962		},
38963	}
38964	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
38965		return nil, err
38966	}
38967	return ret, nil
38968	// {
38969	//   "description": "Returns permissions that a caller has on the specified resource.",
38970	//   "httpMethod": "POST",
38971	//   "id": "compute.subnetworks.testIamPermissions",
38972	//   "parameterOrder": [
38973	//     "project",
38974	//     "region",
38975	//     "resource"
38976	//   ],
38977	//   "parameters": {
38978	//     "project": {
38979	//       "description": "Project ID for this request.",
38980	//       "location": "path",
38981	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
38982	//       "required": true,
38983	//       "type": "string"
38984	//     },
38985	//     "region": {
38986	//       "description": "The name of the region for this request.",
38987	//       "location": "path",
38988	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38989	//       "required": true,
38990	//       "type": "string"
38991	//     },
38992	//     "resource": {
38993	//       "description": "Name of the resource for this request.",
38994	//       "location": "path",
38995	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
38996	//       "required": true,
38997	//       "type": "string"
38998	//     }
38999	//   },
39000	//   "path": "{project}/regions/{region}/subnetworks/{resource}/testIamPermissions",
39001	//   "request": {
39002	//     "$ref": "TestPermissionsRequest"
39003	//   },
39004	//   "response": {
39005	//     "$ref": "TestPermissionsResponse"
39006	//   },
39007	//   "scopes": [
39008	//     "https://www.googleapis.com/auth/cloud-platform",
39009	//     "https://www.googleapis.com/auth/compute",
39010	//     "https://www.googleapis.com/auth/compute.readonly"
39011	//   ]
39012	// }
39013
39014}
39015
39016// method id "compute.targetHttpProxies.delete":
39017
39018type TargetHttpProxiesDeleteCall struct {
39019	s               *Service
39020	project         string
39021	targetHttpProxy string
39022	urlParams_      gensupport.URLParams
39023	ctx_            context.Context
39024}
39025
39026// Delete: Deletes the specified TargetHttpProxy resource.
39027// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/delete
39028func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall {
39029	c := &TargetHttpProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39030	c.project = project
39031	c.targetHttpProxy = targetHttpProxy
39032	return c
39033}
39034
39035// Fields allows partial responses to be retrieved. See
39036// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39037// for more information.
39038func (c *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall {
39039	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39040	return c
39041}
39042
39043// Context sets the context to be used in this call's Do method. Any
39044// pending HTTP request will be aborted if the provided context is
39045// canceled.
39046func (c *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall {
39047	c.ctx_ = ctx
39048	return c
39049}
39050
39051func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
39052	var body io.Reader = nil
39053	c.urlParams_.Set("alt", alt)
39054	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}")
39055	urls += "?" + c.urlParams_.Encode()
39056	req, _ := http.NewRequest("DELETE", urls, body)
39057	googleapi.Expand(req.URL, map[string]string{
39058		"project":         c.project,
39059		"targetHttpProxy": c.targetHttpProxy,
39060	})
39061	req.Header.Set("User-Agent", c.s.userAgent())
39062	if c.ctx_ != nil {
39063		return ctxhttp.Do(c.ctx_, c.s.client, req)
39064	}
39065	return c.s.client.Do(req)
39066}
39067
39068// Do executes the "compute.targetHttpProxies.delete" call.
39069// Exactly one of *Operation or error will be non-nil. Any non-2xx
39070// status code is an error. Response headers are in either
39071// *Operation.ServerResponse.Header or (if a response was returned at
39072// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39073// to check whether the returned error was because
39074// http.StatusNotModified was returned.
39075func (c *TargetHttpProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39076	gensupport.SetOptions(c.urlParams_, opts...)
39077	res, err := c.doRequest("json")
39078	if res != nil && res.StatusCode == http.StatusNotModified {
39079		if res.Body != nil {
39080			res.Body.Close()
39081		}
39082		return nil, &googleapi.Error{
39083			Code:   res.StatusCode,
39084			Header: res.Header,
39085		}
39086	}
39087	if err != nil {
39088		return nil, err
39089	}
39090	defer googleapi.CloseBody(res)
39091	if err := googleapi.CheckResponse(res); err != nil {
39092		return nil, err
39093	}
39094	ret := &Operation{
39095		ServerResponse: googleapi.ServerResponse{
39096			Header:         res.Header,
39097			HTTPStatusCode: res.StatusCode,
39098		},
39099	}
39100	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39101		return nil, err
39102	}
39103	return ret, nil
39104	// {
39105	//   "description": "Deletes the specified TargetHttpProxy resource.",
39106	//   "httpMethod": "DELETE",
39107	//   "id": "compute.targetHttpProxies.delete",
39108	//   "parameterOrder": [
39109	//     "project",
39110	//     "targetHttpProxy"
39111	//   ],
39112	//   "parameters": {
39113	//     "project": {
39114	//       "description": "Project ID for this request.",
39115	//       "location": "path",
39116	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39117	//       "required": true,
39118	//       "type": "string"
39119	//     },
39120	//     "targetHttpProxy": {
39121	//       "description": "Name of the TargetHttpProxy resource to delete.",
39122	//       "location": "path",
39123	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39124	//       "required": true,
39125	//       "type": "string"
39126	//     }
39127	//   },
39128	//   "path": "{project}/global/targetHttpProxies/{targetHttpProxy}",
39129	//   "response": {
39130	//     "$ref": "Operation"
39131	//   },
39132	//   "scopes": [
39133	//     "https://www.googleapis.com/auth/cloud-platform",
39134	//     "https://www.googleapis.com/auth/compute"
39135	//   ]
39136	// }
39137
39138}
39139
39140// method id "compute.targetHttpProxies.get":
39141
39142type TargetHttpProxiesGetCall struct {
39143	s               *Service
39144	project         string
39145	targetHttpProxy string
39146	urlParams_      gensupport.URLParams
39147	ifNoneMatch_    string
39148	ctx_            context.Context
39149}
39150
39151// Get: Returns the specified TargetHttpProxy resource. Get a list of
39152// available target HTTP proxies by making a list() request.
39153// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/get
39154func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall {
39155	c := &TargetHttpProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39156	c.project = project
39157	c.targetHttpProxy = targetHttpProxy
39158	return c
39159}
39160
39161// Fields allows partial responses to be retrieved. See
39162// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39163// for more information.
39164func (c *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall {
39165	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39166	return c
39167}
39168
39169// IfNoneMatch sets the optional parameter which makes the operation
39170// fail if the object's ETag matches the given value. This is useful for
39171// getting updates only after the object has changed since the last
39172// request. Use googleapi.IsNotModified to check whether the response
39173// error from Do is the result of In-None-Match.
39174func (c *TargetHttpProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpProxiesGetCall {
39175	c.ifNoneMatch_ = entityTag
39176	return c
39177}
39178
39179// Context sets the context to be used in this call's Do method. Any
39180// pending HTTP request will be aborted if the provided context is
39181// canceled.
39182func (c *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall {
39183	c.ctx_ = ctx
39184	return c
39185}
39186
39187func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) {
39188	var body io.Reader = nil
39189	c.urlParams_.Set("alt", alt)
39190	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}")
39191	urls += "?" + c.urlParams_.Encode()
39192	req, _ := http.NewRequest("GET", urls, body)
39193	googleapi.Expand(req.URL, map[string]string{
39194		"project":         c.project,
39195		"targetHttpProxy": c.targetHttpProxy,
39196	})
39197	req.Header.Set("User-Agent", c.s.userAgent())
39198	if c.ifNoneMatch_ != "" {
39199		req.Header.Set("If-None-Match", c.ifNoneMatch_)
39200	}
39201	if c.ctx_ != nil {
39202		return ctxhttp.Do(c.ctx_, c.s.client, req)
39203	}
39204	return c.s.client.Do(req)
39205}
39206
39207// Do executes the "compute.targetHttpProxies.get" call.
39208// Exactly one of *TargetHttpProxy or error will be non-nil. Any non-2xx
39209// status code is an error. Response headers are in either
39210// *TargetHttpProxy.ServerResponse.Header or (if a response was returned
39211// at all) in error.(*googleapi.Error).Header. Use
39212// googleapi.IsNotModified to check whether the returned error was
39213// because http.StatusNotModified was returned.
39214func (c *TargetHttpProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxy, error) {
39215	gensupport.SetOptions(c.urlParams_, opts...)
39216	res, err := c.doRequest("json")
39217	if res != nil && res.StatusCode == http.StatusNotModified {
39218		if res.Body != nil {
39219			res.Body.Close()
39220		}
39221		return nil, &googleapi.Error{
39222			Code:   res.StatusCode,
39223			Header: res.Header,
39224		}
39225	}
39226	if err != nil {
39227		return nil, err
39228	}
39229	defer googleapi.CloseBody(res)
39230	if err := googleapi.CheckResponse(res); err != nil {
39231		return nil, err
39232	}
39233	ret := &TargetHttpProxy{
39234		ServerResponse: googleapi.ServerResponse{
39235			Header:         res.Header,
39236			HTTPStatusCode: res.StatusCode,
39237		},
39238	}
39239	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39240		return nil, err
39241	}
39242	return ret, nil
39243	// {
39244	//   "description": "Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request.",
39245	//   "httpMethod": "GET",
39246	//   "id": "compute.targetHttpProxies.get",
39247	//   "parameterOrder": [
39248	//     "project",
39249	//     "targetHttpProxy"
39250	//   ],
39251	//   "parameters": {
39252	//     "project": {
39253	//       "description": "Project ID for this request.",
39254	//       "location": "path",
39255	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39256	//       "required": true,
39257	//       "type": "string"
39258	//     },
39259	//     "targetHttpProxy": {
39260	//       "description": "Name of the TargetHttpProxy resource to return.",
39261	//       "location": "path",
39262	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39263	//       "required": true,
39264	//       "type": "string"
39265	//     }
39266	//   },
39267	//   "path": "{project}/global/targetHttpProxies/{targetHttpProxy}",
39268	//   "response": {
39269	//     "$ref": "TargetHttpProxy"
39270	//   },
39271	//   "scopes": [
39272	//     "https://www.googleapis.com/auth/cloud-platform",
39273	//     "https://www.googleapis.com/auth/compute",
39274	//     "https://www.googleapis.com/auth/compute.readonly"
39275	//   ]
39276	// }
39277
39278}
39279
39280// method id "compute.targetHttpProxies.insert":
39281
39282type TargetHttpProxiesInsertCall struct {
39283	s               *Service
39284	project         string
39285	targethttpproxy *TargetHttpProxy
39286	urlParams_      gensupport.URLParams
39287	ctx_            context.Context
39288}
39289
39290// Insert: Creates a TargetHttpProxy resource in the specified project
39291// using the data included in the request.
39292// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/insert
39293func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall {
39294	c := &TargetHttpProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39295	c.project = project
39296	c.targethttpproxy = targethttpproxy
39297	return c
39298}
39299
39300// Fields allows partial responses to be retrieved. See
39301// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39302// for more information.
39303func (c *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall {
39304	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39305	return c
39306}
39307
39308// Context sets the context to be used in this call's Do method. Any
39309// pending HTTP request will be aborted if the provided context is
39310// canceled.
39311func (c *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall {
39312	c.ctx_ = ctx
39313	return c
39314}
39315
39316func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
39317	var body io.Reader = nil
39318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy)
39319	if err != nil {
39320		return nil, err
39321	}
39322	ctype := "application/json"
39323	c.urlParams_.Set("alt", alt)
39324	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies")
39325	urls += "?" + c.urlParams_.Encode()
39326	req, _ := http.NewRequest("POST", urls, body)
39327	googleapi.Expand(req.URL, map[string]string{
39328		"project": c.project,
39329	})
39330	req.Header.Set("Content-Type", ctype)
39331	req.Header.Set("User-Agent", c.s.userAgent())
39332	if c.ctx_ != nil {
39333		return ctxhttp.Do(c.ctx_, c.s.client, req)
39334	}
39335	return c.s.client.Do(req)
39336}
39337
39338// Do executes the "compute.targetHttpProxies.insert" call.
39339// Exactly one of *Operation or error will be non-nil. Any non-2xx
39340// status code is an error. Response headers are in either
39341// *Operation.ServerResponse.Header or (if a response was returned at
39342// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39343// to check whether the returned error was because
39344// http.StatusNotModified was returned.
39345func (c *TargetHttpProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39346	gensupport.SetOptions(c.urlParams_, opts...)
39347	res, err := c.doRequest("json")
39348	if res != nil && res.StatusCode == http.StatusNotModified {
39349		if res.Body != nil {
39350			res.Body.Close()
39351		}
39352		return nil, &googleapi.Error{
39353			Code:   res.StatusCode,
39354			Header: res.Header,
39355		}
39356	}
39357	if err != nil {
39358		return nil, err
39359	}
39360	defer googleapi.CloseBody(res)
39361	if err := googleapi.CheckResponse(res); err != nil {
39362		return nil, err
39363	}
39364	ret := &Operation{
39365		ServerResponse: googleapi.ServerResponse{
39366			Header:         res.Header,
39367			HTTPStatusCode: res.StatusCode,
39368		},
39369	}
39370	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39371		return nil, err
39372	}
39373	return ret, nil
39374	// {
39375	//   "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.",
39376	//   "httpMethod": "POST",
39377	//   "id": "compute.targetHttpProxies.insert",
39378	//   "parameterOrder": [
39379	//     "project"
39380	//   ],
39381	//   "parameters": {
39382	//     "project": {
39383	//       "description": "Project ID for this request.",
39384	//       "location": "path",
39385	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39386	//       "required": true,
39387	//       "type": "string"
39388	//     }
39389	//   },
39390	//   "path": "{project}/global/targetHttpProxies",
39391	//   "request": {
39392	//     "$ref": "TargetHttpProxy"
39393	//   },
39394	//   "response": {
39395	//     "$ref": "Operation"
39396	//   },
39397	//   "scopes": [
39398	//     "https://www.googleapis.com/auth/cloud-platform",
39399	//     "https://www.googleapis.com/auth/compute"
39400	//   ]
39401	// }
39402
39403}
39404
39405// method id "compute.targetHttpProxies.list":
39406
39407type TargetHttpProxiesListCall struct {
39408	s            *Service
39409	project      string
39410	urlParams_   gensupport.URLParams
39411	ifNoneMatch_ string
39412	ctx_         context.Context
39413}
39414
39415// List: Retrieves the list of TargetHttpProxy resources available to
39416// the specified project.
39417// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/list
39418func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall {
39419	c := &TargetHttpProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39420	c.project = project
39421	return c
39422}
39423
39424// Filter sets the optional parameter "filter": Sets a filter expression
39425// for filtering listed resources, in the form filter={expression}. Your
39426// {expression} must be in the format: field_name comparison_string
39427// literal_string.
39428//
39429// The field_name is the name of the field you want to compare. Only
39430// atomic field types are supported (string, number, boolean). The
39431// comparison_string must be either eq (equals) or ne (not equals). The
39432// literal_string is the string value to filter to. The literal value
39433// must be valid for the type of field you are filtering by (string,
39434// number, boolean). For string fields, the literal value is interpreted
39435// as a regular expression using RE2 syntax. The literal value must
39436// match the entire field.
39437//
39438// For example, to filter for instances that do not have a name of
39439// example-instance, you would use filter=name ne
39440// example-instance.
39441//
39442// Compute Engine Beta API Only: If you use filtering in the Beta API,
39443// you can also filter on nested fields. For example, you could filter
39444// on instances that have set the scheduling.automaticRestart field to
39445// true. In particular, use filtering on nested fields to take advantage
39446// of instance labels to organize and filter results based on label
39447// values.
39448//
39449// The Beta API also supports filtering on multiple expressions by
39450// providing each separate expression within parentheses. For example,
39451// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
39452// Multiple expressions are treated as AND expressions, meaning that
39453// resources must match all expressions to pass the filters.
39454func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall {
39455	c.urlParams_.Set("filter", filter)
39456	return c
39457}
39458
39459// MaxResults sets the optional parameter "maxResults": The maximum
39460// number of results per page that should be returned. If the number of
39461// available results is larger than maxResults, Compute Engine returns a
39462// nextPageToken that can be used to get the next page of results in
39463// subsequent list requests.
39464func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall {
39465	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
39466	return c
39467}
39468
39469// OrderBy sets the optional parameter "orderBy": Sorts list results by
39470// a certain order. By default, results are returned in alphanumerical
39471// order based on the resource name.
39472//
39473// You can also sort results in descending order based on the creation
39474// timestamp using orderBy="creationTimestamp desc". This sorts results
39475// based on the creationTimestamp field in reverse chronological order
39476// (newest result first). Use this to sort resources like operations so
39477// that the newest operation is returned first.
39478//
39479// Currently, only sorting by name or creationTimestamp desc is
39480// supported.
39481func (c *TargetHttpProxiesListCall) OrderBy(orderBy string) *TargetHttpProxiesListCall {
39482	c.urlParams_.Set("orderBy", orderBy)
39483	return c
39484}
39485
39486// PageToken sets the optional parameter "pageToken": Specifies a page
39487// token to use. Set pageToken to the nextPageToken returned by a
39488// previous list request to get the next page of results.
39489func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxiesListCall {
39490	c.urlParams_.Set("pageToken", pageToken)
39491	return c
39492}
39493
39494// Fields allows partial responses to be retrieved. See
39495// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39496// for more information.
39497func (c *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall {
39498	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39499	return c
39500}
39501
39502// IfNoneMatch sets the optional parameter which makes the operation
39503// fail if the object's ETag matches the given value. This is useful for
39504// getting updates only after the object has changed since the last
39505// request. Use googleapi.IsNotModified to check whether the response
39506// error from Do is the result of In-None-Match.
39507func (c *TargetHttpProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpProxiesListCall {
39508	c.ifNoneMatch_ = entityTag
39509	return c
39510}
39511
39512// Context sets the context to be used in this call's Do method. Any
39513// pending HTTP request will be aborted if the provided context is
39514// canceled.
39515func (c *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall {
39516	c.ctx_ = ctx
39517	return c
39518}
39519
39520func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) {
39521	var body io.Reader = nil
39522	c.urlParams_.Set("alt", alt)
39523	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies")
39524	urls += "?" + c.urlParams_.Encode()
39525	req, _ := http.NewRequest("GET", urls, body)
39526	googleapi.Expand(req.URL, map[string]string{
39527		"project": c.project,
39528	})
39529	req.Header.Set("User-Agent", c.s.userAgent())
39530	if c.ifNoneMatch_ != "" {
39531		req.Header.Set("If-None-Match", c.ifNoneMatch_)
39532	}
39533	if c.ctx_ != nil {
39534		return ctxhttp.Do(c.ctx_, c.s.client, req)
39535	}
39536	return c.s.client.Do(req)
39537}
39538
39539// Do executes the "compute.targetHttpProxies.list" call.
39540// Exactly one of *TargetHttpProxyList or error will be non-nil. Any
39541// non-2xx status code is an error. Response headers are in either
39542// *TargetHttpProxyList.ServerResponse.Header or (if a response was
39543// returned at all) in error.(*googleapi.Error).Header. Use
39544// googleapi.IsNotModified to check whether the returned error was
39545// because http.StatusNotModified was returned.
39546func (c *TargetHttpProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpProxyList, error) {
39547	gensupport.SetOptions(c.urlParams_, opts...)
39548	res, err := c.doRequest("json")
39549	if res != nil && res.StatusCode == http.StatusNotModified {
39550		if res.Body != nil {
39551			res.Body.Close()
39552		}
39553		return nil, &googleapi.Error{
39554			Code:   res.StatusCode,
39555			Header: res.Header,
39556		}
39557	}
39558	if err != nil {
39559		return nil, err
39560	}
39561	defer googleapi.CloseBody(res)
39562	if err := googleapi.CheckResponse(res); err != nil {
39563		return nil, err
39564	}
39565	ret := &TargetHttpProxyList{
39566		ServerResponse: googleapi.ServerResponse{
39567			Header:         res.Header,
39568			HTTPStatusCode: res.StatusCode,
39569		},
39570	}
39571	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39572		return nil, err
39573	}
39574	return ret, nil
39575	// {
39576	//   "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.",
39577	//   "httpMethod": "GET",
39578	//   "id": "compute.targetHttpProxies.list",
39579	//   "parameterOrder": [
39580	//     "project"
39581	//   ],
39582	//   "parameters": {
39583	//     "filter": {
39584	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
39585	//       "location": "query",
39586	//       "type": "string"
39587	//     },
39588	//     "maxResults": {
39589	//       "default": "500",
39590	//       "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.",
39591	//       "format": "uint32",
39592	//       "location": "query",
39593	//       "maximum": "500",
39594	//       "minimum": "0",
39595	//       "type": "integer"
39596	//     },
39597	//     "orderBy": {
39598	//       "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.",
39599	//       "location": "query",
39600	//       "type": "string"
39601	//     },
39602	//     "pageToken": {
39603	//       "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.",
39604	//       "location": "query",
39605	//       "type": "string"
39606	//     },
39607	//     "project": {
39608	//       "description": "Project ID for this request.",
39609	//       "location": "path",
39610	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39611	//       "required": true,
39612	//       "type": "string"
39613	//     }
39614	//   },
39615	//   "path": "{project}/global/targetHttpProxies",
39616	//   "response": {
39617	//     "$ref": "TargetHttpProxyList"
39618	//   },
39619	//   "scopes": [
39620	//     "https://www.googleapis.com/auth/cloud-platform",
39621	//     "https://www.googleapis.com/auth/compute",
39622	//     "https://www.googleapis.com/auth/compute.readonly"
39623	//   ]
39624	// }
39625
39626}
39627
39628// Pages invokes f for each page of results.
39629// A non-nil error returned from f will halt the iteration.
39630// The provided context supersedes any context provided to the Context method.
39631func (c *TargetHttpProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpProxyList) error) error {
39632	c.ctx_ = ctx
39633	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
39634	for {
39635		x, err := c.Do()
39636		if err != nil {
39637			return err
39638		}
39639		if err := f(x); err != nil {
39640			return err
39641		}
39642		if x.NextPageToken == "" {
39643			return nil
39644		}
39645		c.PageToken(x.NextPageToken)
39646	}
39647}
39648
39649// method id "compute.targetHttpProxies.setUrlMap":
39650
39651type TargetHttpProxiesSetUrlMapCall struct {
39652	s               *Service
39653	project         string
39654	targetHttpProxy string
39655	urlmapreference *UrlMapReference
39656	urlParams_      gensupport.URLParams
39657	ctx_            context.Context
39658}
39659
39660// SetUrlMap: Changes the URL map for TargetHttpProxy.
39661// For details, see https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies/setUrlMap
39662func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall {
39663	c := &TargetHttpProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39664	c.project = project
39665	c.targetHttpProxy = targetHttpProxy
39666	c.urlmapreference = urlmapreference
39667	return c
39668}
39669
39670// Fields allows partial responses to be retrieved. See
39671// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39672// for more information.
39673func (c *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall {
39674	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39675	return c
39676}
39677
39678// Context sets the context to be used in this call's Do method. Any
39679// pending HTTP request will be aborted if the provided context is
39680// canceled.
39681func (c *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall {
39682	c.ctx_ = ctx
39683	return c
39684}
39685
39686func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
39687	var body io.Reader = nil
39688	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
39689	if err != nil {
39690		return nil, err
39691	}
39692	ctype := "application/json"
39693	c.urlParams_.Set("alt", alt)
39694	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap")
39695	urls += "?" + c.urlParams_.Encode()
39696	req, _ := http.NewRequest("POST", urls, body)
39697	googleapi.Expand(req.URL, map[string]string{
39698		"project":         c.project,
39699		"targetHttpProxy": c.targetHttpProxy,
39700	})
39701	req.Header.Set("Content-Type", ctype)
39702	req.Header.Set("User-Agent", c.s.userAgent())
39703	if c.ctx_ != nil {
39704		return ctxhttp.Do(c.ctx_, c.s.client, req)
39705	}
39706	return c.s.client.Do(req)
39707}
39708
39709// Do executes the "compute.targetHttpProxies.setUrlMap" call.
39710// Exactly one of *Operation or error will be non-nil. Any non-2xx
39711// status code is an error. Response headers are in either
39712// *Operation.ServerResponse.Header or (if a response was returned at
39713// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39714// to check whether the returned error was because
39715// http.StatusNotModified was returned.
39716func (c *TargetHttpProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39717	gensupport.SetOptions(c.urlParams_, opts...)
39718	res, err := c.doRequest("json")
39719	if res != nil && res.StatusCode == http.StatusNotModified {
39720		if res.Body != nil {
39721			res.Body.Close()
39722		}
39723		return nil, &googleapi.Error{
39724			Code:   res.StatusCode,
39725			Header: res.Header,
39726		}
39727	}
39728	if err != nil {
39729		return nil, err
39730	}
39731	defer googleapi.CloseBody(res)
39732	if err := googleapi.CheckResponse(res); err != nil {
39733		return nil, err
39734	}
39735	ret := &Operation{
39736		ServerResponse: googleapi.ServerResponse{
39737			Header:         res.Header,
39738			HTTPStatusCode: res.StatusCode,
39739		},
39740	}
39741	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39742		return nil, err
39743	}
39744	return ret, nil
39745	// {
39746	//   "description": "Changes the URL map for TargetHttpProxy.",
39747	//   "httpMethod": "POST",
39748	//   "id": "compute.targetHttpProxies.setUrlMap",
39749	//   "parameterOrder": [
39750	//     "project",
39751	//     "targetHttpProxy"
39752	//   ],
39753	//   "parameters": {
39754	//     "project": {
39755	//       "description": "Project ID for this request.",
39756	//       "location": "path",
39757	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39758	//       "required": true,
39759	//       "type": "string"
39760	//     },
39761	//     "targetHttpProxy": {
39762	//       "description": "Name of the TargetHttpProxy to set a URL map for.",
39763	//       "location": "path",
39764	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
39765	//       "required": true,
39766	//       "type": "string"
39767	//     }
39768	//   },
39769	//   "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap",
39770	//   "request": {
39771	//     "$ref": "UrlMapReference"
39772	//   },
39773	//   "response": {
39774	//     "$ref": "Operation"
39775	//   },
39776	//   "scopes": [
39777	//     "https://www.googleapis.com/auth/cloud-platform",
39778	//     "https://www.googleapis.com/auth/compute"
39779	//   ]
39780	// }
39781
39782}
39783
39784// method id "compute.targetHttpProxies.testIamPermissions":
39785
39786type TargetHttpProxiesTestIamPermissionsCall struct {
39787	s                      *Service
39788	project                string
39789	resource               string
39790	testpermissionsrequest *TestPermissionsRequest
39791	urlParams_             gensupport.URLParams
39792	ctx_                   context.Context
39793}
39794
39795// TestIamPermissions: Returns permissions that a caller has on the
39796// specified resource.
39797func (r *TargetHttpProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpProxiesTestIamPermissionsCall {
39798	c := &TargetHttpProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39799	c.project = project
39800	c.resource = resource
39801	c.testpermissionsrequest = testpermissionsrequest
39802	return c
39803}
39804
39805// Fields allows partial responses to be retrieved. See
39806// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39807// for more information.
39808func (c *TargetHttpProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpProxiesTestIamPermissionsCall {
39809	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39810	return c
39811}
39812
39813// Context sets the context to be used in this call's Do method. Any
39814// pending HTTP request will be aborted if the provided context is
39815// canceled.
39816func (c *TargetHttpProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpProxiesTestIamPermissionsCall {
39817	c.ctx_ = ctx
39818	return c
39819}
39820
39821func (c *TargetHttpProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
39822	var body io.Reader = nil
39823	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
39824	if err != nil {
39825		return nil, err
39826	}
39827	ctype := "application/json"
39828	c.urlParams_.Set("alt", alt)
39829	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{resource}/testIamPermissions")
39830	urls += "?" + c.urlParams_.Encode()
39831	req, _ := http.NewRequest("POST", urls, body)
39832	googleapi.Expand(req.URL, map[string]string{
39833		"project":  c.project,
39834		"resource": c.resource,
39835	})
39836	req.Header.Set("Content-Type", ctype)
39837	req.Header.Set("User-Agent", c.s.userAgent())
39838	if c.ctx_ != nil {
39839		return ctxhttp.Do(c.ctx_, c.s.client, req)
39840	}
39841	return c.s.client.Do(req)
39842}
39843
39844// Do executes the "compute.targetHttpProxies.testIamPermissions" call.
39845// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
39846// non-2xx status code is an error. Response headers are in either
39847// *TestPermissionsResponse.ServerResponse.Header or (if a response was
39848// returned at all) in error.(*googleapi.Error).Header. Use
39849// googleapi.IsNotModified to check whether the returned error was
39850// because http.StatusNotModified was returned.
39851func (c *TargetHttpProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
39852	gensupport.SetOptions(c.urlParams_, opts...)
39853	res, err := c.doRequest("json")
39854	if res != nil && res.StatusCode == http.StatusNotModified {
39855		if res.Body != nil {
39856			res.Body.Close()
39857		}
39858		return nil, &googleapi.Error{
39859			Code:   res.StatusCode,
39860			Header: res.Header,
39861		}
39862	}
39863	if err != nil {
39864		return nil, err
39865	}
39866	defer googleapi.CloseBody(res)
39867	if err := googleapi.CheckResponse(res); err != nil {
39868		return nil, err
39869	}
39870	ret := &TestPermissionsResponse{
39871		ServerResponse: googleapi.ServerResponse{
39872			Header:         res.Header,
39873			HTTPStatusCode: res.StatusCode,
39874		},
39875	}
39876	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
39877		return nil, err
39878	}
39879	return ret, nil
39880	// {
39881	//   "description": "Returns permissions that a caller has on the specified resource.",
39882	//   "httpMethod": "POST",
39883	//   "id": "compute.targetHttpProxies.testIamPermissions",
39884	//   "parameterOrder": [
39885	//     "project",
39886	//     "resource"
39887	//   ],
39888	//   "parameters": {
39889	//     "project": {
39890	//       "description": "Project ID for this request.",
39891	//       "location": "path",
39892	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
39893	//       "required": true,
39894	//       "type": "string"
39895	//     },
39896	//     "resource": {
39897	//       "description": "Name of the resource for this request.",
39898	//       "location": "path",
39899	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
39900	//       "required": true,
39901	//       "type": "string"
39902	//     }
39903	//   },
39904	//   "path": "{project}/global/targetHttpProxies/{resource}/testIamPermissions",
39905	//   "request": {
39906	//     "$ref": "TestPermissionsRequest"
39907	//   },
39908	//   "response": {
39909	//     "$ref": "TestPermissionsResponse"
39910	//   },
39911	//   "scopes": [
39912	//     "https://www.googleapis.com/auth/cloud-platform",
39913	//     "https://www.googleapis.com/auth/compute",
39914	//     "https://www.googleapis.com/auth/compute.readonly"
39915	//   ]
39916	// }
39917
39918}
39919
39920// method id "compute.targetHttpsProxies.delete":
39921
39922type TargetHttpsProxiesDeleteCall struct {
39923	s                *Service
39924	project          string
39925	targetHttpsProxy string
39926	urlParams_       gensupport.URLParams
39927	ctx_             context.Context
39928}
39929
39930// Delete: Deletes the specified TargetHttpsProxy resource.
39931func (r *TargetHttpsProxiesService) Delete(project string, targetHttpsProxy string) *TargetHttpsProxiesDeleteCall {
39932	c := &TargetHttpsProxiesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
39933	c.project = project
39934	c.targetHttpsProxy = targetHttpsProxy
39935	return c
39936}
39937
39938// Fields allows partial responses to be retrieved. See
39939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
39940// for more information.
39941func (c *TargetHttpsProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesDeleteCall {
39942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
39943	return c
39944}
39945
39946// Context sets the context to be used in this call's Do method. Any
39947// pending HTTP request will be aborted if the provided context is
39948// canceled.
39949func (c *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttpsProxiesDeleteCall {
39950	c.ctx_ = ctx
39951	return c
39952}
39953
39954func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
39955	var body io.Reader = nil
39956	c.urlParams_.Set("alt", alt)
39957	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}")
39958	urls += "?" + c.urlParams_.Encode()
39959	req, _ := http.NewRequest("DELETE", urls, body)
39960	googleapi.Expand(req.URL, map[string]string{
39961		"project":          c.project,
39962		"targetHttpsProxy": c.targetHttpsProxy,
39963	})
39964	req.Header.Set("User-Agent", c.s.userAgent())
39965	if c.ctx_ != nil {
39966		return ctxhttp.Do(c.ctx_, c.s.client, req)
39967	}
39968	return c.s.client.Do(req)
39969}
39970
39971// Do executes the "compute.targetHttpsProxies.delete" call.
39972// Exactly one of *Operation or error will be non-nil. Any non-2xx
39973// status code is an error. Response headers are in either
39974// *Operation.ServerResponse.Header or (if a response was returned at
39975// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
39976// to check whether the returned error was because
39977// http.StatusNotModified was returned.
39978func (c *TargetHttpsProxiesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
39979	gensupport.SetOptions(c.urlParams_, opts...)
39980	res, err := c.doRequest("json")
39981	if res != nil && res.StatusCode == http.StatusNotModified {
39982		if res.Body != nil {
39983			res.Body.Close()
39984		}
39985		return nil, &googleapi.Error{
39986			Code:   res.StatusCode,
39987			Header: res.Header,
39988		}
39989	}
39990	if err != nil {
39991		return nil, err
39992	}
39993	defer googleapi.CloseBody(res)
39994	if err := googleapi.CheckResponse(res); err != nil {
39995		return nil, err
39996	}
39997	ret := &Operation{
39998		ServerResponse: googleapi.ServerResponse{
39999			Header:         res.Header,
40000			HTTPStatusCode: res.StatusCode,
40001		},
40002	}
40003	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
40004		return nil, err
40005	}
40006	return ret, nil
40007	// {
40008	//   "description": "Deletes the specified TargetHttpsProxy resource.",
40009	//   "httpMethod": "DELETE",
40010	//   "id": "compute.targetHttpsProxies.delete",
40011	//   "parameterOrder": [
40012	//     "project",
40013	//     "targetHttpsProxy"
40014	//   ],
40015	//   "parameters": {
40016	//     "project": {
40017	//       "description": "Project ID for this request.",
40018	//       "location": "path",
40019	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40020	//       "required": true,
40021	//       "type": "string"
40022	//     },
40023	//     "targetHttpsProxy": {
40024	//       "description": "Name of the TargetHttpsProxy resource to delete.",
40025	//       "location": "path",
40026	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
40027	//       "required": true,
40028	//       "type": "string"
40029	//     }
40030	//   },
40031	//   "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}",
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.targetHttpsProxies.get":
40044
40045type TargetHttpsProxiesGetCall struct {
40046	s                *Service
40047	project          string
40048	targetHttpsProxy string
40049	urlParams_       gensupport.URLParams
40050	ifNoneMatch_     string
40051	ctx_             context.Context
40052}
40053
40054// Get: Returns the specified TargetHttpsProxy resource. Get a list of
40055// available target HTTPS proxies by making a list() request.
40056func (r *TargetHttpsProxiesService) Get(project string, targetHttpsProxy string) *TargetHttpsProxiesGetCall {
40057	c := &TargetHttpsProxiesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40058	c.project = project
40059	c.targetHttpsProxy = targetHttpsProxy
40060	return c
40061}
40062
40063// Fields allows partial responses to be retrieved. See
40064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40065// for more information.
40066func (c *TargetHttpsProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesGetCall {
40067	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40068	return c
40069}
40070
40071// IfNoneMatch sets the optional parameter which makes the operation
40072// fail if the object's ETag matches the given value. This is useful for
40073// getting updates only after the object has changed since the last
40074// request. Use googleapi.IsNotModified to check whether the response
40075// error from Do is the result of In-None-Match.
40076func (c *TargetHttpsProxiesGetCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesGetCall {
40077	c.ifNoneMatch_ = entityTag
40078	return c
40079}
40080
40081// Context sets the context to be used in this call's Do method. Any
40082// pending HTTP request will be aborted if the provided context is
40083// canceled.
40084func (c *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsProxiesGetCall {
40085	c.ctx_ = ctx
40086	return c
40087}
40088
40089func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) {
40090	var body io.Reader = nil
40091	c.urlParams_.Set("alt", alt)
40092	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{targetHttpsProxy}")
40093	urls += "?" + c.urlParams_.Encode()
40094	req, _ := http.NewRequest("GET", urls, body)
40095	googleapi.Expand(req.URL, map[string]string{
40096		"project":          c.project,
40097		"targetHttpsProxy": c.targetHttpsProxy,
40098	})
40099	req.Header.Set("User-Agent", c.s.userAgent())
40100	if c.ifNoneMatch_ != "" {
40101		req.Header.Set("If-None-Match", c.ifNoneMatch_)
40102	}
40103	if c.ctx_ != nil {
40104		return ctxhttp.Do(c.ctx_, c.s.client, req)
40105	}
40106	return c.s.client.Do(req)
40107}
40108
40109// Do executes the "compute.targetHttpsProxies.get" call.
40110// Exactly one of *TargetHttpsProxy or error will be non-nil. Any
40111// non-2xx status code is an error. Response headers are in either
40112// *TargetHttpsProxy.ServerResponse.Header or (if a response was
40113// returned at all) in error.(*googleapi.Error).Header. Use
40114// googleapi.IsNotModified to check whether the returned error was
40115// because http.StatusNotModified was returned.
40116func (c *TargetHttpsProxiesGetCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxy, error) {
40117	gensupport.SetOptions(c.urlParams_, opts...)
40118	res, err := c.doRequest("json")
40119	if res != nil && res.StatusCode == http.StatusNotModified {
40120		if res.Body != nil {
40121			res.Body.Close()
40122		}
40123		return nil, &googleapi.Error{
40124			Code:   res.StatusCode,
40125			Header: res.Header,
40126		}
40127	}
40128	if err != nil {
40129		return nil, err
40130	}
40131	defer googleapi.CloseBody(res)
40132	if err := googleapi.CheckResponse(res); err != nil {
40133		return nil, err
40134	}
40135	ret := &TargetHttpsProxy{
40136		ServerResponse: googleapi.ServerResponse{
40137			Header:         res.Header,
40138			HTTPStatusCode: res.StatusCode,
40139		},
40140	}
40141	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
40142		return nil, err
40143	}
40144	return ret, nil
40145	// {
40146	//   "description": "Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request.",
40147	//   "httpMethod": "GET",
40148	//   "id": "compute.targetHttpsProxies.get",
40149	//   "parameterOrder": [
40150	//     "project",
40151	//     "targetHttpsProxy"
40152	//   ],
40153	//   "parameters": {
40154	//     "project": {
40155	//       "description": "Project ID for this request.",
40156	//       "location": "path",
40157	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40158	//       "required": true,
40159	//       "type": "string"
40160	//     },
40161	//     "targetHttpsProxy": {
40162	//       "description": "Name of the TargetHttpsProxy resource to return.",
40163	//       "location": "path",
40164	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
40165	//       "required": true,
40166	//       "type": "string"
40167	//     }
40168	//   },
40169	//   "path": "{project}/global/targetHttpsProxies/{targetHttpsProxy}",
40170	//   "response": {
40171	//     "$ref": "TargetHttpsProxy"
40172	//   },
40173	//   "scopes": [
40174	//     "https://www.googleapis.com/auth/cloud-platform",
40175	//     "https://www.googleapis.com/auth/compute",
40176	//     "https://www.googleapis.com/auth/compute.readonly"
40177	//   ]
40178	// }
40179
40180}
40181
40182// method id "compute.targetHttpsProxies.insert":
40183
40184type TargetHttpsProxiesInsertCall struct {
40185	s                *Service
40186	project          string
40187	targethttpsproxy *TargetHttpsProxy
40188	urlParams_       gensupport.URLParams
40189	ctx_             context.Context
40190}
40191
40192// Insert: Creates a TargetHttpsProxy resource in the specified project
40193// using the data included in the request.
40194func (r *TargetHttpsProxiesService) Insert(project string, targethttpsproxy *TargetHttpsProxy) *TargetHttpsProxiesInsertCall {
40195	c := &TargetHttpsProxiesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40196	c.project = project
40197	c.targethttpsproxy = targethttpsproxy
40198	return c
40199}
40200
40201// Fields allows partial responses to be retrieved. See
40202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40203// for more information.
40204func (c *TargetHttpsProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesInsertCall {
40205	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40206	return c
40207}
40208
40209// Context sets the context to be used in this call's Do method. Any
40210// pending HTTP request will be aborted if the provided context is
40211// canceled.
40212func (c *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttpsProxiesInsertCall {
40213	c.ctx_ = ctx
40214	return c
40215}
40216
40217func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
40218	var body io.Reader = nil
40219	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxy)
40220	if err != nil {
40221		return nil, err
40222	}
40223	ctype := "application/json"
40224	c.urlParams_.Set("alt", alt)
40225	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies")
40226	urls += "?" + c.urlParams_.Encode()
40227	req, _ := http.NewRequest("POST", urls, body)
40228	googleapi.Expand(req.URL, map[string]string{
40229		"project": c.project,
40230	})
40231	req.Header.Set("Content-Type", ctype)
40232	req.Header.Set("User-Agent", c.s.userAgent())
40233	if c.ctx_ != nil {
40234		return ctxhttp.Do(c.ctx_, c.s.client, req)
40235	}
40236	return c.s.client.Do(req)
40237}
40238
40239// Do executes the "compute.targetHttpsProxies.insert" call.
40240// Exactly one of *Operation or error will be non-nil. Any non-2xx
40241// status code is an error. Response headers are in either
40242// *Operation.ServerResponse.Header or (if a response was returned at
40243// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40244// to check whether the returned error was because
40245// http.StatusNotModified was returned.
40246func (c *TargetHttpsProxiesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
40247	gensupport.SetOptions(c.urlParams_, opts...)
40248	res, err := c.doRequest("json")
40249	if res != nil && res.StatusCode == http.StatusNotModified {
40250		if res.Body != nil {
40251			res.Body.Close()
40252		}
40253		return nil, &googleapi.Error{
40254			Code:   res.StatusCode,
40255			Header: res.Header,
40256		}
40257	}
40258	if err != nil {
40259		return nil, err
40260	}
40261	defer googleapi.CloseBody(res)
40262	if err := googleapi.CheckResponse(res); err != nil {
40263		return nil, err
40264	}
40265	ret := &Operation{
40266		ServerResponse: googleapi.ServerResponse{
40267			Header:         res.Header,
40268			HTTPStatusCode: res.StatusCode,
40269		},
40270	}
40271	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
40272		return nil, err
40273	}
40274	return ret, nil
40275	// {
40276	//   "description": "Creates a TargetHttpsProxy resource in the specified project using the data included in the request.",
40277	//   "httpMethod": "POST",
40278	//   "id": "compute.targetHttpsProxies.insert",
40279	//   "parameterOrder": [
40280	//     "project"
40281	//   ],
40282	//   "parameters": {
40283	//     "project": {
40284	//       "description": "Project ID for this request.",
40285	//       "location": "path",
40286	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40287	//       "required": true,
40288	//       "type": "string"
40289	//     }
40290	//   },
40291	//   "path": "{project}/global/targetHttpsProxies",
40292	//   "request": {
40293	//     "$ref": "TargetHttpsProxy"
40294	//   },
40295	//   "response": {
40296	//     "$ref": "Operation"
40297	//   },
40298	//   "scopes": [
40299	//     "https://www.googleapis.com/auth/cloud-platform",
40300	//     "https://www.googleapis.com/auth/compute"
40301	//   ]
40302	// }
40303
40304}
40305
40306// method id "compute.targetHttpsProxies.list":
40307
40308type TargetHttpsProxiesListCall struct {
40309	s            *Service
40310	project      string
40311	urlParams_   gensupport.URLParams
40312	ifNoneMatch_ string
40313	ctx_         context.Context
40314}
40315
40316// List: Retrieves the list of TargetHttpsProxy resources available to
40317// the specified project.
40318func (r *TargetHttpsProxiesService) List(project string) *TargetHttpsProxiesListCall {
40319	c := &TargetHttpsProxiesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40320	c.project = project
40321	return c
40322}
40323
40324// Filter sets the optional parameter "filter": Sets a filter expression
40325// for filtering listed resources, in the form filter={expression}. Your
40326// {expression} must be in the format: field_name comparison_string
40327// literal_string.
40328//
40329// The field_name is the name of the field you want to compare. Only
40330// atomic field types are supported (string, number, boolean). The
40331// comparison_string must be either eq (equals) or ne (not equals). The
40332// literal_string is the string value to filter to. The literal value
40333// must be valid for the type of field you are filtering by (string,
40334// number, boolean). For string fields, the literal value is interpreted
40335// as a regular expression using RE2 syntax. The literal value must
40336// match the entire field.
40337//
40338// For example, to filter for instances that do not have a name of
40339// example-instance, you would use filter=name ne
40340// example-instance.
40341//
40342// Compute Engine Beta API Only: If you use filtering in the Beta API,
40343// you can also filter on nested fields. For example, you could filter
40344// on instances that have set the scheduling.automaticRestart field to
40345// true. In particular, use filtering on nested fields to take advantage
40346// of instance labels to organize and filter results based on label
40347// values.
40348//
40349// The Beta API also supports filtering on multiple expressions by
40350// providing each separate expression within parentheses. For example,
40351// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
40352// Multiple expressions are treated as AND expressions, meaning that
40353// resources must match all expressions to pass the filters.
40354func (c *TargetHttpsProxiesListCall) Filter(filter string) *TargetHttpsProxiesListCall {
40355	c.urlParams_.Set("filter", filter)
40356	return c
40357}
40358
40359// MaxResults sets the optional parameter "maxResults": The maximum
40360// number of results per page that should be returned. If the number of
40361// available results is larger than maxResults, Compute Engine returns a
40362// nextPageToken that can be used to get the next page of results in
40363// subsequent list requests.
40364func (c *TargetHttpsProxiesListCall) MaxResults(maxResults int64) *TargetHttpsProxiesListCall {
40365	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
40366	return c
40367}
40368
40369// OrderBy sets the optional parameter "orderBy": Sorts list results by
40370// a certain order. By default, results are returned in alphanumerical
40371// order based on the resource name.
40372//
40373// You can also sort results in descending order based on the creation
40374// timestamp using orderBy="creationTimestamp desc". This sorts results
40375// based on the creationTimestamp field in reverse chronological order
40376// (newest result first). Use this to sort resources like operations so
40377// that the newest operation is returned first.
40378//
40379// Currently, only sorting by name or creationTimestamp desc is
40380// supported.
40381func (c *TargetHttpsProxiesListCall) OrderBy(orderBy string) *TargetHttpsProxiesListCall {
40382	c.urlParams_.Set("orderBy", orderBy)
40383	return c
40384}
40385
40386// PageToken sets the optional parameter "pageToken": Specifies a page
40387// token to use. Set pageToken to the nextPageToken returned by a
40388// previous list request to get the next page of results.
40389func (c *TargetHttpsProxiesListCall) PageToken(pageToken string) *TargetHttpsProxiesListCall {
40390	c.urlParams_.Set("pageToken", pageToken)
40391	return c
40392}
40393
40394// Fields allows partial responses to be retrieved. See
40395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40396// for more information.
40397func (c *TargetHttpsProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesListCall {
40398	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40399	return c
40400}
40401
40402// IfNoneMatch sets the optional parameter which makes the operation
40403// fail if the object's ETag matches the given value. This is useful for
40404// getting updates only after the object has changed since the last
40405// request. Use googleapi.IsNotModified to check whether the response
40406// error from Do is the result of In-None-Match.
40407func (c *TargetHttpsProxiesListCall) IfNoneMatch(entityTag string) *TargetHttpsProxiesListCall {
40408	c.ifNoneMatch_ = entityTag
40409	return c
40410}
40411
40412// Context sets the context to be used in this call's Do method. Any
40413// pending HTTP request will be aborted if the provided context is
40414// canceled.
40415func (c *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsProxiesListCall {
40416	c.ctx_ = ctx
40417	return c
40418}
40419
40420func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) {
40421	var body io.Reader = nil
40422	c.urlParams_.Set("alt", alt)
40423	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies")
40424	urls += "?" + c.urlParams_.Encode()
40425	req, _ := http.NewRequest("GET", urls, body)
40426	googleapi.Expand(req.URL, map[string]string{
40427		"project": c.project,
40428	})
40429	req.Header.Set("User-Agent", c.s.userAgent())
40430	if c.ifNoneMatch_ != "" {
40431		req.Header.Set("If-None-Match", c.ifNoneMatch_)
40432	}
40433	if c.ctx_ != nil {
40434		return ctxhttp.Do(c.ctx_, c.s.client, req)
40435	}
40436	return c.s.client.Do(req)
40437}
40438
40439// Do executes the "compute.targetHttpsProxies.list" call.
40440// Exactly one of *TargetHttpsProxyList or error will be non-nil. Any
40441// non-2xx status code is an error. Response headers are in either
40442// *TargetHttpsProxyList.ServerResponse.Header or (if a response was
40443// returned at all) in error.(*googleapi.Error).Header. Use
40444// googleapi.IsNotModified to check whether the returned error was
40445// because http.StatusNotModified was returned.
40446func (c *TargetHttpsProxiesListCall) Do(opts ...googleapi.CallOption) (*TargetHttpsProxyList, error) {
40447	gensupport.SetOptions(c.urlParams_, opts...)
40448	res, err := c.doRequest("json")
40449	if res != nil && res.StatusCode == http.StatusNotModified {
40450		if res.Body != nil {
40451			res.Body.Close()
40452		}
40453		return nil, &googleapi.Error{
40454			Code:   res.StatusCode,
40455			Header: res.Header,
40456		}
40457	}
40458	if err != nil {
40459		return nil, err
40460	}
40461	defer googleapi.CloseBody(res)
40462	if err := googleapi.CheckResponse(res); err != nil {
40463		return nil, err
40464	}
40465	ret := &TargetHttpsProxyList{
40466		ServerResponse: googleapi.ServerResponse{
40467			Header:         res.Header,
40468			HTTPStatusCode: res.StatusCode,
40469		},
40470	}
40471	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
40472		return nil, err
40473	}
40474	return ret, nil
40475	// {
40476	//   "description": "Retrieves the list of TargetHttpsProxy resources available to the specified project.",
40477	//   "httpMethod": "GET",
40478	//   "id": "compute.targetHttpsProxies.list",
40479	//   "parameterOrder": [
40480	//     "project"
40481	//   ],
40482	//   "parameters": {
40483	//     "filter": {
40484	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
40485	//       "location": "query",
40486	//       "type": "string"
40487	//     },
40488	//     "maxResults": {
40489	//       "default": "500",
40490	//       "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.",
40491	//       "format": "uint32",
40492	//       "location": "query",
40493	//       "maximum": "500",
40494	//       "minimum": "0",
40495	//       "type": "integer"
40496	//     },
40497	//     "orderBy": {
40498	//       "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.",
40499	//       "location": "query",
40500	//       "type": "string"
40501	//     },
40502	//     "pageToken": {
40503	//       "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.",
40504	//       "location": "query",
40505	//       "type": "string"
40506	//     },
40507	//     "project": {
40508	//       "description": "Project ID for this request.",
40509	//       "location": "path",
40510	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40511	//       "required": true,
40512	//       "type": "string"
40513	//     }
40514	//   },
40515	//   "path": "{project}/global/targetHttpsProxies",
40516	//   "response": {
40517	//     "$ref": "TargetHttpsProxyList"
40518	//   },
40519	//   "scopes": [
40520	//     "https://www.googleapis.com/auth/cloud-platform",
40521	//     "https://www.googleapis.com/auth/compute",
40522	//     "https://www.googleapis.com/auth/compute.readonly"
40523	//   ]
40524	// }
40525
40526}
40527
40528// Pages invokes f for each page of results.
40529// A non-nil error returned from f will halt the iteration.
40530// The provided context supersedes any context provided to the Context method.
40531func (c *TargetHttpsProxiesListCall) Pages(ctx context.Context, f func(*TargetHttpsProxyList) error) error {
40532	c.ctx_ = ctx
40533	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
40534	for {
40535		x, err := c.Do()
40536		if err != nil {
40537			return err
40538		}
40539		if err := f(x); err != nil {
40540			return err
40541		}
40542		if x.NextPageToken == "" {
40543			return nil
40544		}
40545		c.PageToken(x.NextPageToken)
40546	}
40547}
40548
40549// method id "compute.targetHttpsProxies.setSslCertificates":
40550
40551type TargetHttpsProxiesSetSslCertificatesCall struct {
40552	s                                           *Service
40553	project                                     string
40554	targetHttpsProxy                            string
40555	targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest
40556	urlParams_                                  gensupport.URLParams
40557	ctx_                                        context.Context
40558}
40559
40560// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy.
40561func (r *TargetHttpsProxiesService) SetSslCertificates(project string, targetHttpsProxy string, targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest) *TargetHttpsProxiesSetSslCertificatesCall {
40562	c := &TargetHttpsProxiesSetSslCertificatesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40563	c.project = project
40564	c.targetHttpsProxy = targetHttpsProxy
40565	c.targethttpsproxiessetsslcertificatesrequest = targethttpsproxiessetsslcertificatesrequest
40566	return c
40567}
40568
40569// Fields allows partial responses to be retrieved. See
40570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40571// for more information.
40572func (c *TargetHttpsProxiesSetSslCertificatesCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetSslCertificatesCall {
40573	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40574	return c
40575}
40576
40577// Context sets the context to be used in this call's Do method. Any
40578// pending HTTP request will be aborted if the provided context is
40579// canceled.
40580func (c *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslCertificatesCall {
40581	c.ctx_ = ctx
40582	return c
40583}
40584
40585func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) {
40586	var body io.Reader = nil
40587	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxiessetsslcertificatesrequest)
40588	if err != nil {
40589		return nil, err
40590	}
40591	ctype := "application/json"
40592	c.urlParams_.Set("alt", alt)
40593	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates")
40594	urls += "?" + c.urlParams_.Encode()
40595	req, _ := http.NewRequest("POST", urls, body)
40596	googleapi.Expand(req.URL, map[string]string{
40597		"project":          c.project,
40598		"targetHttpsProxy": c.targetHttpsProxy,
40599	})
40600	req.Header.Set("Content-Type", ctype)
40601	req.Header.Set("User-Agent", c.s.userAgent())
40602	if c.ctx_ != nil {
40603		return ctxhttp.Do(c.ctx_, c.s.client, req)
40604	}
40605	return c.s.client.Do(req)
40606}
40607
40608// Do executes the "compute.targetHttpsProxies.setSslCertificates" call.
40609// Exactly one of *Operation or error will be non-nil. Any non-2xx
40610// status code is an error. Response headers are in either
40611// *Operation.ServerResponse.Header or (if a response was returned at
40612// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40613// to check whether the returned error was because
40614// http.StatusNotModified was returned.
40615func (c *TargetHttpsProxiesSetSslCertificatesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
40616	gensupport.SetOptions(c.urlParams_, opts...)
40617	res, err := c.doRequest("json")
40618	if res != nil && res.StatusCode == http.StatusNotModified {
40619		if res.Body != nil {
40620			res.Body.Close()
40621		}
40622		return nil, &googleapi.Error{
40623			Code:   res.StatusCode,
40624			Header: res.Header,
40625		}
40626	}
40627	if err != nil {
40628		return nil, err
40629	}
40630	defer googleapi.CloseBody(res)
40631	if err := googleapi.CheckResponse(res); err != nil {
40632		return nil, err
40633	}
40634	ret := &Operation{
40635		ServerResponse: googleapi.ServerResponse{
40636			Header:         res.Header,
40637			HTTPStatusCode: res.StatusCode,
40638		},
40639	}
40640	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
40641		return nil, err
40642	}
40643	return ret, nil
40644	// {
40645	//   "description": "Replaces SslCertificates for TargetHttpsProxy.",
40646	//   "httpMethod": "POST",
40647	//   "id": "compute.targetHttpsProxies.setSslCertificates",
40648	//   "parameterOrder": [
40649	//     "project",
40650	//     "targetHttpsProxy"
40651	//   ],
40652	//   "parameters": {
40653	//     "project": {
40654	//       "description": "Project ID for this request.",
40655	//       "location": "path",
40656	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40657	//       "required": true,
40658	//       "type": "string"
40659	//     },
40660	//     "targetHttpsProxy": {
40661	//       "description": "Name of the TargetHttpsProxy resource to set an SslCertificates resource for.",
40662	//       "location": "path",
40663	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
40664	//       "required": true,
40665	//       "type": "string"
40666	//     }
40667	//   },
40668	//   "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates",
40669	//   "request": {
40670	//     "$ref": "TargetHttpsProxiesSetSslCertificatesRequest"
40671	//   },
40672	//   "response": {
40673	//     "$ref": "Operation"
40674	//   },
40675	//   "scopes": [
40676	//     "https://www.googleapis.com/auth/cloud-platform",
40677	//     "https://www.googleapis.com/auth/compute"
40678	//   ]
40679	// }
40680
40681}
40682
40683// method id "compute.targetHttpsProxies.setUrlMap":
40684
40685type TargetHttpsProxiesSetUrlMapCall struct {
40686	s                *Service
40687	project          string
40688	targetHttpsProxy string
40689	urlmapreference  *UrlMapReference
40690	urlParams_       gensupport.URLParams
40691	ctx_             context.Context
40692}
40693
40694// SetUrlMap: Changes the URL map for TargetHttpsProxy.
40695func (r *TargetHttpsProxiesService) SetUrlMap(project string, targetHttpsProxy string, urlmapreference *UrlMapReference) *TargetHttpsProxiesSetUrlMapCall {
40696	c := &TargetHttpsProxiesSetUrlMapCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40697	c.project = project
40698	c.targetHttpsProxy = targetHttpsProxy
40699	c.urlmapreference = urlmapreference
40700	return c
40701}
40702
40703// Fields allows partial responses to be retrieved. See
40704// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40705// for more information.
40706func (c *TargetHttpsProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesSetUrlMapCall {
40707	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40708	return c
40709}
40710
40711// Context sets the context to be used in this call's Do method. Any
40712// pending HTTP request will be aborted if the provided context is
40713// canceled.
40714func (c *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetUrlMapCall {
40715	c.ctx_ = ctx
40716	return c
40717}
40718
40719func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
40720	var body io.Reader = nil
40721	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
40722	if err != nil {
40723		return nil, err
40724	}
40725	ctype := "application/json"
40726	c.urlParams_.Set("alt", alt)
40727	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap")
40728	urls += "?" + c.urlParams_.Encode()
40729	req, _ := http.NewRequest("POST", urls, body)
40730	googleapi.Expand(req.URL, map[string]string{
40731		"project":          c.project,
40732		"targetHttpsProxy": c.targetHttpsProxy,
40733	})
40734	req.Header.Set("Content-Type", ctype)
40735	req.Header.Set("User-Agent", c.s.userAgent())
40736	if c.ctx_ != nil {
40737		return ctxhttp.Do(c.ctx_, c.s.client, req)
40738	}
40739	return c.s.client.Do(req)
40740}
40741
40742// Do executes the "compute.targetHttpsProxies.setUrlMap" call.
40743// Exactly one of *Operation or error will be non-nil. Any non-2xx
40744// status code is an error. Response headers are in either
40745// *Operation.ServerResponse.Header or (if a response was returned at
40746// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
40747// to check whether the returned error was because
40748// http.StatusNotModified was returned.
40749func (c *TargetHttpsProxiesSetUrlMapCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
40750	gensupport.SetOptions(c.urlParams_, opts...)
40751	res, err := c.doRequest("json")
40752	if res != nil && res.StatusCode == http.StatusNotModified {
40753		if res.Body != nil {
40754			res.Body.Close()
40755		}
40756		return nil, &googleapi.Error{
40757			Code:   res.StatusCode,
40758			Header: res.Header,
40759		}
40760	}
40761	if err != nil {
40762		return nil, err
40763	}
40764	defer googleapi.CloseBody(res)
40765	if err := googleapi.CheckResponse(res); err != nil {
40766		return nil, err
40767	}
40768	ret := &Operation{
40769		ServerResponse: googleapi.ServerResponse{
40770			Header:         res.Header,
40771			HTTPStatusCode: res.StatusCode,
40772		},
40773	}
40774	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
40775		return nil, err
40776	}
40777	return ret, nil
40778	// {
40779	//   "description": "Changes the URL map for TargetHttpsProxy.",
40780	//   "httpMethod": "POST",
40781	//   "id": "compute.targetHttpsProxies.setUrlMap",
40782	//   "parameterOrder": [
40783	//     "project",
40784	//     "targetHttpsProxy"
40785	//   ],
40786	//   "parameters": {
40787	//     "project": {
40788	//       "description": "Project ID for this request.",
40789	//       "location": "path",
40790	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40791	//       "required": true,
40792	//       "type": "string"
40793	//     },
40794	//     "targetHttpsProxy": {
40795	//       "description": "Name of the TargetHttpsProxy resource whose URL map is to be set.",
40796	//       "location": "path",
40797	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
40798	//       "required": true,
40799	//       "type": "string"
40800	//     }
40801	//   },
40802	//   "path": "{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap",
40803	//   "request": {
40804	//     "$ref": "UrlMapReference"
40805	//   },
40806	//   "response": {
40807	//     "$ref": "Operation"
40808	//   },
40809	//   "scopes": [
40810	//     "https://www.googleapis.com/auth/cloud-platform",
40811	//     "https://www.googleapis.com/auth/compute"
40812	//   ]
40813	// }
40814
40815}
40816
40817// method id "compute.targetHttpsProxies.testIamPermissions":
40818
40819type TargetHttpsProxiesTestIamPermissionsCall struct {
40820	s                      *Service
40821	project                string
40822	resource               string
40823	testpermissionsrequest *TestPermissionsRequest
40824	urlParams_             gensupport.URLParams
40825	ctx_                   context.Context
40826}
40827
40828// TestIamPermissions: Returns permissions that a caller has on the
40829// specified resource.
40830func (r *TargetHttpsProxiesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetHttpsProxiesTestIamPermissionsCall {
40831	c := &TargetHttpsProxiesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40832	c.project = project
40833	c.resource = resource
40834	c.testpermissionsrequest = testpermissionsrequest
40835	return c
40836}
40837
40838// Fields allows partial responses to be retrieved. See
40839// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
40840// for more information.
40841func (c *TargetHttpsProxiesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetHttpsProxiesTestIamPermissionsCall {
40842	c.urlParams_.Set("fields", googleapi.CombineFields(s))
40843	return c
40844}
40845
40846// Context sets the context to be used in this call's Do method. Any
40847// pending HTTP request will be aborted if the provided context is
40848// canceled.
40849func (c *TargetHttpsProxiesTestIamPermissionsCall) Context(ctx context.Context) *TargetHttpsProxiesTestIamPermissionsCall {
40850	c.ctx_ = ctx
40851	return c
40852}
40853
40854func (c *TargetHttpsProxiesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
40855	var body io.Reader = nil
40856	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
40857	if err != nil {
40858		return nil, err
40859	}
40860	ctype := "application/json"
40861	c.urlParams_.Set("alt", alt)
40862	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpsProxies/{resource}/testIamPermissions")
40863	urls += "?" + c.urlParams_.Encode()
40864	req, _ := http.NewRequest("POST", urls, body)
40865	googleapi.Expand(req.URL, map[string]string{
40866		"project":  c.project,
40867		"resource": c.resource,
40868	})
40869	req.Header.Set("Content-Type", ctype)
40870	req.Header.Set("User-Agent", c.s.userAgent())
40871	if c.ctx_ != nil {
40872		return ctxhttp.Do(c.ctx_, c.s.client, req)
40873	}
40874	return c.s.client.Do(req)
40875}
40876
40877// Do executes the "compute.targetHttpsProxies.testIamPermissions" call.
40878// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
40879// non-2xx status code is an error. Response headers are in either
40880// *TestPermissionsResponse.ServerResponse.Header or (if a response was
40881// returned at all) in error.(*googleapi.Error).Header. Use
40882// googleapi.IsNotModified to check whether the returned error was
40883// because http.StatusNotModified was returned.
40884func (c *TargetHttpsProxiesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
40885	gensupport.SetOptions(c.urlParams_, opts...)
40886	res, err := c.doRequest("json")
40887	if res != nil && res.StatusCode == http.StatusNotModified {
40888		if res.Body != nil {
40889			res.Body.Close()
40890		}
40891		return nil, &googleapi.Error{
40892			Code:   res.StatusCode,
40893			Header: res.Header,
40894		}
40895	}
40896	if err != nil {
40897		return nil, err
40898	}
40899	defer googleapi.CloseBody(res)
40900	if err := googleapi.CheckResponse(res); err != nil {
40901		return nil, err
40902	}
40903	ret := &TestPermissionsResponse{
40904		ServerResponse: googleapi.ServerResponse{
40905			Header:         res.Header,
40906			HTTPStatusCode: res.StatusCode,
40907		},
40908	}
40909	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
40910		return nil, err
40911	}
40912	return ret, nil
40913	// {
40914	//   "description": "Returns permissions that a caller has on the specified resource.",
40915	//   "httpMethod": "POST",
40916	//   "id": "compute.targetHttpsProxies.testIamPermissions",
40917	//   "parameterOrder": [
40918	//     "project",
40919	//     "resource"
40920	//   ],
40921	//   "parameters": {
40922	//     "project": {
40923	//       "description": "Project ID for this request.",
40924	//       "location": "path",
40925	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
40926	//       "required": true,
40927	//       "type": "string"
40928	//     },
40929	//     "resource": {
40930	//       "description": "Name of the resource for this request.",
40931	//       "location": "path",
40932	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
40933	//       "required": true,
40934	//       "type": "string"
40935	//     }
40936	//   },
40937	//   "path": "{project}/global/targetHttpsProxies/{resource}/testIamPermissions",
40938	//   "request": {
40939	//     "$ref": "TestPermissionsRequest"
40940	//   },
40941	//   "response": {
40942	//     "$ref": "TestPermissionsResponse"
40943	//   },
40944	//   "scopes": [
40945	//     "https://www.googleapis.com/auth/cloud-platform",
40946	//     "https://www.googleapis.com/auth/compute",
40947	//     "https://www.googleapis.com/auth/compute.readonly"
40948	//   ]
40949	// }
40950
40951}
40952
40953// method id "compute.targetInstances.aggregatedList":
40954
40955type TargetInstancesAggregatedListCall struct {
40956	s            *Service
40957	project      string
40958	urlParams_   gensupport.URLParams
40959	ifNoneMatch_ string
40960	ctx_         context.Context
40961}
40962
40963// AggregatedList: Retrieves an aggregated list of target instances.
40964// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/aggregatedList
40965func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall {
40966	c := &TargetInstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
40967	c.project = project
40968	return c
40969}
40970
40971// Filter sets the optional parameter "filter": Sets a filter expression
40972// for filtering listed resources, in the form filter={expression}. Your
40973// {expression} must be in the format: field_name comparison_string
40974// literal_string.
40975//
40976// The field_name is the name of the field you want to compare. Only
40977// atomic field types are supported (string, number, boolean). The
40978// comparison_string must be either eq (equals) or ne (not equals). The
40979// literal_string is the string value to filter to. The literal value
40980// must be valid for the type of field you are filtering by (string,
40981// number, boolean). For string fields, the literal value is interpreted
40982// as a regular expression using RE2 syntax. The literal value must
40983// match the entire field.
40984//
40985// For example, to filter for instances that do not have a name of
40986// example-instance, you would use filter=name ne
40987// example-instance.
40988//
40989// Compute Engine Beta API Only: If you use filtering in the Beta API,
40990// you can also filter on nested fields. For example, you could filter
40991// on instances that have set the scheduling.automaticRestart field to
40992// true. In particular, use filtering on nested fields to take advantage
40993// of instance labels to organize and filter results based on label
40994// values.
40995//
40996// The Beta API also supports filtering on multiple expressions by
40997// providing each separate expression within parentheses. For example,
40998// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
40999// Multiple expressions are treated as AND expressions, meaning that
41000// resources must match all expressions to pass the filters.
41001func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall {
41002	c.urlParams_.Set("filter", filter)
41003	return c
41004}
41005
41006// MaxResults sets the optional parameter "maxResults": The maximum
41007// number of results per page that should be returned. If the number of
41008// available results is larger than maxResults, Compute Engine returns a
41009// nextPageToken that can be used to get the next page of results in
41010// subsequent list requests.
41011func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall {
41012	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41013	return c
41014}
41015
41016// OrderBy sets the optional parameter "orderBy": Sorts list results by
41017// a certain order. By default, results are returned in alphanumerical
41018// order based on the resource name.
41019//
41020// You can also sort results in descending order based on the creation
41021// timestamp using orderBy="creationTimestamp desc". This sorts results
41022// based on the creationTimestamp field in reverse chronological order
41023// (newest result first). Use this to sort resources like operations so
41024// that the newest operation is returned first.
41025//
41026// Currently, only sorting by name or creationTimestamp desc is
41027// supported.
41028func (c *TargetInstancesAggregatedListCall) OrderBy(orderBy string) *TargetInstancesAggregatedListCall {
41029	c.urlParams_.Set("orderBy", orderBy)
41030	return c
41031}
41032
41033// PageToken sets the optional parameter "pageToken": Specifies a page
41034// token to use. Set pageToken to the nextPageToken returned by a
41035// previous list request to get the next page of results.
41036func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetInstancesAggregatedListCall {
41037	c.urlParams_.Set("pageToken", pageToken)
41038	return c
41039}
41040
41041// Fields allows partial responses to be retrieved. See
41042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41043// for more information.
41044func (c *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall {
41045	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41046	return c
41047}
41048
41049// IfNoneMatch sets the optional parameter which makes the operation
41050// fail if the object's ETag matches the given value. This is useful for
41051// getting updates only after the object has changed since the last
41052// request. Use googleapi.IsNotModified to check whether the response
41053// error from Do is the result of In-None-Match.
41054func (c *TargetInstancesAggregatedListCall) IfNoneMatch(entityTag string) *TargetInstancesAggregatedListCall {
41055	c.ifNoneMatch_ = entityTag
41056	return c
41057}
41058
41059// Context sets the context to be used in this call's Do method. Any
41060// pending HTTP request will be aborted if the provided context is
41061// canceled.
41062func (c *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall {
41063	c.ctx_ = ctx
41064	return c
41065}
41066
41067func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
41068	var body io.Reader = nil
41069	c.urlParams_.Set("alt", alt)
41070	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetInstances")
41071	urls += "?" + c.urlParams_.Encode()
41072	req, _ := http.NewRequest("GET", urls, body)
41073	googleapi.Expand(req.URL, map[string]string{
41074		"project": c.project,
41075	})
41076	req.Header.Set("User-Agent", c.s.userAgent())
41077	if c.ifNoneMatch_ != "" {
41078		req.Header.Set("If-None-Match", c.ifNoneMatch_)
41079	}
41080	if c.ctx_ != nil {
41081		return ctxhttp.Do(c.ctx_, c.s.client, req)
41082	}
41083	return c.s.client.Do(req)
41084}
41085
41086// Do executes the "compute.targetInstances.aggregatedList" call.
41087// Exactly one of *TargetInstanceAggregatedList or error will be
41088// non-nil. Any non-2xx status code is an error. Response headers are in
41089// either *TargetInstanceAggregatedList.ServerResponse.Header or (if a
41090// response was returned at all) in error.(*googleapi.Error).Header. Use
41091// googleapi.IsNotModified to check whether the returned error was
41092// because http.StatusNotModified was returned.
41093func (c *TargetInstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceAggregatedList, error) {
41094	gensupport.SetOptions(c.urlParams_, opts...)
41095	res, err := c.doRequest("json")
41096	if res != nil && res.StatusCode == http.StatusNotModified {
41097		if res.Body != nil {
41098			res.Body.Close()
41099		}
41100		return nil, &googleapi.Error{
41101			Code:   res.StatusCode,
41102			Header: res.Header,
41103		}
41104	}
41105	if err != nil {
41106		return nil, err
41107	}
41108	defer googleapi.CloseBody(res)
41109	if err := googleapi.CheckResponse(res); err != nil {
41110		return nil, err
41111	}
41112	ret := &TargetInstanceAggregatedList{
41113		ServerResponse: googleapi.ServerResponse{
41114			Header:         res.Header,
41115			HTTPStatusCode: res.StatusCode,
41116		},
41117	}
41118	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
41119		return nil, err
41120	}
41121	return ret, nil
41122	// {
41123	//   "description": "Retrieves an aggregated list of target instances.",
41124	//   "httpMethod": "GET",
41125	//   "id": "compute.targetInstances.aggregatedList",
41126	//   "parameterOrder": [
41127	//     "project"
41128	//   ],
41129	//   "parameters": {
41130	//     "filter": {
41131	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
41132	//       "location": "query",
41133	//       "type": "string"
41134	//     },
41135	//     "maxResults": {
41136	//       "default": "500",
41137	//       "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.",
41138	//       "format": "uint32",
41139	//       "location": "query",
41140	//       "maximum": "500",
41141	//       "minimum": "0",
41142	//       "type": "integer"
41143	//     },
41144	//     "orderBy": {
41145	//       "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.",
41146	//       "location": "query",
41147	//       "type": "string"
41148	//     },
41149	//     "pageToken": {
41150	//       "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.",
41151	//       "location": "query",
41152	//       "type": "string"
41153	//     },
41154	//     "project": {
41155	//       "description": "Project ID for this request.",
41156	//       "location": "path",
41157	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41158	//       "required": true,
41159	//       "type": "string"
41160	//     }
41161	//   },
41162	//   "path": "{project}/aggregated/targetInstances",
41163	//   "response": {
41164	//     "$ref": "TargetInstanceAggregatedList"
41165	//   },
41166	//   "scopes": [
41167	//     "https://www.googleapis.com/auth/cloud-platform",
41168	//     "https://www.googleapis.com/auth/compute",
41169	//     "https://www.googleapis.com/auth/compute.readonly"
41170	//   ]
41171	// }
41172
41173}
41174
41175// Pages invokes f for each page of results.
41176// A non-nil error returned from f will halt the iteration.
41177// The provided context supersedes any context provided to the Context method.
41178func (c *TargetInstancesAggregatedListCall) Pages(ctx context.Context, f func(*TargetInstanceAggregatedList) error) error {
41179	c.ctx_ = ctx
41180	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
41181	for {
41182		x, err := c.Do()
41183		if err != nil {
41184			return err
41185		}
41186		if err := f(x); err != nil {
41187			return err
41188		}
41189		if x.NextPageToken == "" {
41190			return nil
41191		}
41192		c.PageToken(x.NextPageToken)
41193	}
41194}
41195
41196// method id "compute.targetInstances.delete":
41197
41198type TargetInstancesDeleteCall struct {
41199	s              *Service
41200	project        string
41201	zone           string
41202	targetInstance string
41203	urlParams_     gensupport.URLParams
41204	ctx_           context.Context
41205}
41206
41207// Delete: Deletes the specified TargetInstance resource.
41208// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/delete
41209func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall {
41210	c := &TargetInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41211	c.project = project
41212	c.zone = zone
41213	c.targetInstance = targetInstance
41214	return c
41215}
41216
41217// Fields allows partial responses to be retrieved. See
41218// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41219// for more information.
41220func (c *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall {
41221	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41222	return c
41223}
41224
41225// Context sets the context to be used in this call's Do method. Any
41226// pending HTTP request will be aborted if the provided context is
41227// canceled.
41228func (c *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall {
41229	c.ctx_ = ctx
41230	return c
41231}
41232
41233func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
41234	var body io.Reader = nil
41235	c.urlParams_.Set("alt", alt)
41236	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}")
41237	urls += "?" + c.urlParams_.Encode()
41238	req, _ := http.NewRequest("DELETE", urls, body)
41239	googleapi.Expand(req.URL, map[string]string{
41240		"project":        c.project,
41241		"zone":           c.zone,
41242		"targetInstance": c.targetInstance,
41243	})
41244	req.Header.Set("User-Agent", c.s.userAgent())
41245	if c.ctx_ != nil {
41246		return ctxhttp.Do(c.ctx_, c.s.client, req)
41247	}
41248	return c.s.client.Do(req)
41249}
41250
41251// Do executes the "compute.targetInstances.delete" call.
41252// Exactly one of *Operation or error will be non-nil. Any non-2xx
41253// status code is an error. Response headers are in either
41254// *Operation.ServerResponse.Header or (if a response was returned at
41255// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41256// to check whether the returned error was because
41257// http.StatusNotModified was returned.
41258func (c *TargetInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
41259	gensupport.SetOptions(c.urlParams_, opts...)
41260	res, err := c.doRequest("json")
41261	if res != nil && res.StatusCode == http.StatusNotModified {
41262		if res.Body != nil {
41263			res.Body.Close()
41264		}
41265		return nil, &googleapi.Error{
41266			Code:   res.StatusCode,
41267			Header: res.Header,
41268		}
41269	}
41270	if err != nil {
41271		return nil, err
41272	}
41273	defer googleapi.CloseBody(res)
41274	if err := googleapi.CheckResponse(res); err != nil {
41275		return nil, err
41276	}
41277	ret := &Operation{
41278		ServerResponse: googleapi.ServerResponse{
41279			Header:         res.Header,
41280			HTTPStatusCode: res.StatusCode,
41281		},
41282	}
41283	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
41284		return nil, err
41285	}
41286	return ret, nil
41287	// {
41288	//   "description": "Deletes the specified TargetInstance resource.",
41289	//   "httpMethod": "DELETE",
41290	//   "id": "compute.targetInstances.delete",
41291	//   "parameterOrder": [
41292	//     "project",
41293	//     "zone",
41294	//     "targetInstance"
41295	//   ],
41296	//   "parameters": {
41297	//     "project": {
41298	//       "description": "Project ID for this request.",
41299	//       "location": "path",
41300	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41301	//       "required": true,
41302	//       "type": "string"
41303	//     },
41304	//     "targetInstance": {
41305	//       "description": "Name of the TargetInstance resource to delete.",
41306	//       "location": "path",
41307	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
41308	//       "required": true,
41309	//       "type": "string"
41310	//     },
41311	//     "zone": {
41312	//       "description": "Name of the zone scoping this request.",
41313	//       "location": "path",
41314	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
41315	//       "required": true,
41316	//       "type": "string"
41317	//     }
41318	//   },
41319	//   "path": "{project}/zones/{zone}/targetInstances/{targetInstance}",
41320	//   "response": {
41321	//     "$ref": "Operation"
41322	//   },
41323	//   "scopes": [
41324	//     "https://www.googleapis.com/auth/cloud-platform",
41325	//     "https://www.googleapis.com/auth/compute"
41326	//   ]
41327	// }
41328
41329}
41330
41331// method id "compute.targetInstances.get":
41332
41333type TargetInstancesGetCall struct {
41334	s              *Service
41335	project        string
41336	zone           string
41337	targetInstance string
41338	urlParams_     gensupport.URLParams
41339	ifNoneMatch_   string
41340	ctx_           context.Context
41341}
41342
41343// Get: Returns the specified TargetInstance resource. Get a list of
41344// available target instances by making a list() request.
41345// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/get
41346func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall {
41347	c := &TargetInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41348	c.project = project
41349	c.zone = zone
41350	c.targetInstance = targetInstance
41351	return c
41352}
41353
41354// Fields allows partial responses to be retrieved. See
41355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41356// for more information.
41357func (c *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall {
41358	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41359	return c
41360}
41361
41362// IfNoneMatch sets the optional parameter which makes the operation
41363// fail if the object's ETag matches the given value. This is useful for
41364// getting updates only after the object has changed since the last
41365// request. Use googleapi.IsNotModified to check whether the response
41366// error from Do is the result of In-None-Match.
41367func (c *TargetInstancesGetCall) IfNoneMatch(entityTag string) *TargetInstancesGetCall {
41368	c.ifNoneMatch_ = entityTag
41369	return c
41370}
41371
41372// Context sets the context to be used in this call's Do method. Any
41373// pending HTTP request will be aborted if the provided context is
41374// canceled.
41375func (c *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall {
41376	c.ctx_ = ctx
41377	return c
41378}
41379
41380func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) {
41381	var body io.Reader = nil
41382	c.urlParams_.Set("alt", alt)
41383	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}")
41384	urls += "?" + c.urlParams_.Encode()
41385	req, _ := http.NewRequest("GET", urls, body)
41386	googleapi.Expand(req.URL, map[string]string{
41387		"project":        c.project,
41388		"zone":           c.zone,
41389		"targetInstance": c.targetInstance,
41390	})
41391	req.Header.Set("User-Agent", c.s.userAgent())
41392	if c.ifNoneMatch_ != "" {
41393		req.Header.Set("If-None-Match", c.ifNoneMatch_)
41394	}
41395	if c.ctx_ != nil {
41396		return ctxhttp.Do(c.ctx_, c.s.client, req)
41397	}
41398	return c.s.client.Do(req)
41399}
41400
41401// Do executes the "compute.targetInstances.get" call.
41402// Exactly one of *TargetInstance or error will be non-nil. Any non-2xx
41403// status code is an error. Response headers are in either
41404// *TargetInstance.ServerResponse.Header or (if a response was returned
41405// at all) in error.(*googleapi.Error).Header. Use
41406// googleapi.IsNotModified to check whether the returned error was
41407// because http.StatusNotModified was returned.
41408func (c *TargetInstancesGetCall) Do(opts ...googleapi.CallOption) (*TargetInstance, error) {
41409	gensupport.SetOptions(c.urlParams_, opts...)
41410	res, err := c.doRequest("json")
41411	if res != nil && res.StatusCode == http.StatusNotModified {
41412		if res.Body != nil {
41413			res.Body.Close()
41414		}
41415		return nil, &googleapi.Error{
41416			Code:   res.StatusCode,
41417			Header: res.Header,
41418		}
41419	}
41420	if err != nil {
41421		return nil, err
41422	}
41423	defer googleapi.CloseBody(res)
41424	if err := googleapi.CheckResponse(res); err != nil {
41425		return nil, err
41426	}
41427	ret := &TargetInstance{
41428		ServerResponse: googleapi.ServerResponse{
41429			Header:         res.Header,
41430			HTTPStatusCode: res.StatusCode,
41431		},
41432	}
41433	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
41434		return nil, err
41435	}
41436	return ret, nil
41437	// {
41438	//   "description": "Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request.",
41439	//   "httpMethod": "GET",
41440	//   "id": "compute.targetInstances.get",
41441	//   "parameterOrder": [
41442	//     "project",
41443	//     "zone",
41444	//     "targetInstance"
41445	//   ],
41446	//   "parameters": {
41447	//     "project": {
41448	//       "description": "Project ID for this request.",
41449	//       "location": "path",
41450	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41451	//       "required": true,
41452	//       "type": "string"
41453	//     },
41454	//     "targetInstance": {
41455	//       "description": "Name of the TargetInstance resource to return.",
41456	//       "location": "path",
41457	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
41458	//       "required": true,
41459	//       "type": "string"
41460	//     },
41461	//     "zone": {
41462	//       "description": "Name of the zone scoping this request.",
41463	//       "location": "path",
41464	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
41465	//       "required": true,
41466	//       "type": "string"
41467	//     }
41468	//   },
41469	//   "path": "{project}/zones/{zone}/targetInstances/{targetInstance}",
41470	//   "response": {
41471	//     "$ref": "TargetInstance"
41472	//   },
41473	//   "scopes": [
41474	//     "https://www.googleapis.com/auth/cloud-platform",
41475	//     "https://www.googleapis.com/auth/compute",
41476	//     "https://www.googleapis.com/auth/compute.readonly"
41477	//   ]
41478	// }
41479
41480}
41481
41482// method id "compute.targetInstances.insert":
41483
41484type TargetInstancesInsertCall struct {
41485	s              *Service
41486	project        string
41487	zone           string
41488	targetinstance *TargetInstance
41489	urlParams_     gensupport.URLParams
41490	ctx_           context.Context
41491}
41492
41493// Insert: Creates a TargetInstance resource in the specified project
41494// and zone using the data included in the request.
41495// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/insert
41496func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall {
41497	c := &TargetInstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41498	c.project = project
41499	c.zone = zone
41500	c.targetinstance = targetinstance
41501	return c
41502}
41503
41504// Fields allows partial responses to be retrieved. See
41505// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41506// for more information.
41507func (c *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall {
41508	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41509	return c
41510}
41511
41512// Context sets the context to be used in this call's Do method. Any
41513// pending HTTP request will be aborted if the provided context is
41514// canceled.
41515func (c *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall {
41516	c.ctx_ = ctx
41517	return c
41518}
41519
41520func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) {
41521	var body io.Reader = nil
41522	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance)
41523	if err != nil {
41524		return nil, err
41525	}
41526	ctype := "application/json"
41527	c.urlParams_.Set("alt", alt)
41528	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances")
41529	urls += "?" + c.urlParams_.Encode()
41530	req, _ := http.NewRequest("POST", urls, body)
41531	googleapi.Expand(req.URL, map[string]string{
41532		"project": c.project,
41533		"zone":    c.zone,
41534	})
41535	req.Header.Set("Content-Type", ctype)
41536	req.Header.Set("User-Agent", c.s.userAgent())
41537	if c.ctx_ != nil {
41538		return ctxhttp.Do(c.ctx_, c.s.client, req)
41539	}
41540	return c.s.client.Do(req)
41541}
41542
41543// Do executes the "compute.targetInstances.insert" call.
41544// Exactly one of *Operation or error will be non-nil. Any non-2xx
41545// status code is an error. Response headers are in either
41546// *Operation.ServerResponse.Header or (if a response was returned at
41547// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
41548// to check whether the returned error was because
41549// http.StatusNotModified was returned.
41550func (c *TargetInstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
41551	gensupport.SetOptions(c.urlParams_, opts...)
41552	res, err := c.doRequest("json")
41553	if res != nil && res.StatusCode == http.StatusNotModified {
41554		if res.Body != nil {
41555			res.Body.Close()
41556		}
41557		return nil, &googleapi.Error{
41558			Code:   res.StatusCode,
41559			Header: res.Header,
41560		}
41561	}
41562	if err != nil {
41563		return nil, err
41564	}
41565	defer googleapi.CloseBody(res)
41566	if err := googleapi.CheckResponse(res); err != nil {
41567		return nil, err
41568	}
41569	ret := &Operation{
41570		ServerResponse: googleapi.ServerResponse{
41571			Header:         res.Header,
41572			HTTPStatusCode: res.StatusCode,
41573		},
41574	}
41575	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
41576		return nil, err
41577	}
41578	return ret, nil
41579	// {
41580	//   "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.",
41581	//   "httpMethod": "POST",
41582	//   "id": "compute.targetInstances.insert",
41583	//   "parameterOrder": [
41584	//     "project",
41585	//     "zone"
41586	//   ],
41587	//   "parameters": {
41588	//     "project": {
41589	//       "description": "Project ID for this request.",
41590	//       "location": "path",
41591	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41592	//       "required": true,
41593	//       "type": "string"
41594	//     },
41595	//     "zone": {
41596	//       "description": "Name of the zone scoping this request.",
41597	//       "location": "path",
41598	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
41599	//       "required": true,
41600	//       "type": "string"
41601	//     }
41602	//   },
41603	//   "path": "{project}/zones/{zone}/targetInstances",
41604	//   "request": {
41605	//     "$ref": "TargetInstance"
41606	//   },
41607	//   "response": {
41608	//     "$ref": "Operation"
41609	//   },
41610	//   "scopes": [
41611	//     "https://www.googleapis.com/auth/cloud-platform",
41612	//     "https://www.googleapis.com/auth/compute"
41613	//   ]
41614	// }
41615
41616}
41617
41618// method id "compute.targetInstances.list":
41619
41620type TargetInstancesListCall struct {
41621	s            *Service
41622	project      string
41623	zone         string
41624	urlParams_   gensupport.URLParams
41625	ifNoneMatch_ string
41626	ctx_         context.Context
41627}
41628
41629// List: Retrieves a list of TargetInstance resources available to the
41630// specified project and zone.
41631// For details, see https://cloud.google.com/compute/docs/reference/latest/targetInstances/list
41632func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall {
41633	c := &TargetInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41634	c.project = project
41635	c.zone = zone
41636	return c
41637}
41638
41639// Filter sets the optional parameter "filter": Sets a filter expression
41640// for filtering listed resources, in the form filter={expression}. Your
41641// {expression} must be in the format: field_name comparison_string
41642// literal_string.
41643//
41644// The field_name is the name of the field you want to compare. Only
41645// atomic field types are supported (string, number, boolean). The
41646// comparison_string must be either eq (equals) or ne (not equals). The
41647// literal_string is the string value to filter to. The literal value
41648// must be valid for the type of field you are filtering by (string,
41649// number, boolean). For string fields, the literal value is interpreted
41650// as a regular expression using RE2 syntax. The literal value must
41651// match the entire field.
41652//
41653// For example, to filter for instances that do not have a name of
41654// example-instance, you would use filter=name ne
41655// example-instance.
41656//
41657// Compute Engine Beta API Only: If you use filtering in the Beta API,
41658// you can also filter on nested fields. For example, you could filter
41659// on instances that have set the scheduling.automaticRestart field to
41660// true. In particular, use filtering on nested fields to take advantage
41661// of instance labels to organize and filter results based on label
41662// values.
41663//
41664// The Beta API also supports filtering on multiple expressions by
41665// providing each separate expression within parentheses. For example,
41666// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
41667// Multiple expressions are treated as AND expressions, meaning that
41668// resources must match all expressions to pass the filters.
41669func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall {
41670	c.urlParams_.Set("filter", filter)
41671	return c
41672}
41673
41674// MaxResults sets the optional parameter "maxResults": The maximum
41675// number of results per page that should be returned. If the number of
41676// available results is larger than maxResults, Compute Engine returns a
41677// nextPageToken that can be used to get the next page of results in
41678// subsequent list requests.
41679func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall {
41680	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
41681	return c
41682}
41683
41684// OrderBy sets the optional parameter "orderBy": Sorts list results by
41685// a certain order. By default, results are returned in alphanumerical
41686// order based on the resource name.
41687//
41688// You can also sort results in descending order based on the creation
41689// timestamp using orderBy="creationTimestamp desc". This sorts results
41690// based on the creationTimestamp field in reverse chronological order
41691// (newest result first). Use this to sort resources like operations so
41692// that the newest operation is returned first.
41693//
41694// Currently, only sorting by name or creationTimestamp desc is
41695// supported.
41696func (c *TargetInstancesListCall) OrderBy(orderBy string) *TargetInstancesListCall {
41697	c.urlParams_.Set("orderBy", orderBy)
41698	return c
41699}
41700
41701// PageToken sets the optional parameter "pageToken": Specifies a page
41702// token to use. Set pageToken to the nextPageToken returned by a
41703// previous list request to get the next page of results.
41704func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesListCall {
41705	c.urlParams_.Set("pageToken", pageToken)
41706	return c
41707}
41708
41709// Fields allows partial responses to be retrieved. See
41710// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41711// for more information.
41712func (c *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall {
41713	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41714	return c
41715}
41716
41717// IfNoneMatch sets the optional parameter which makes the operation
41718// fail if the object's ETag matches the given value. This is useful for
41719// getting updates only after the object has changed since the last
41720// request. Use googleapi.IsNotModified to check whether the response
41721// error from Do is the result of In-None-Match.
41722func (c *TargetInstancesListCall) IfNoneMatch(entityTag string) *TargetInstancesListCall {
41723	c.ifNoneMatch_ = entityTag
41724	return c
41725}
41726
41727// Context sets the context to be used in this call's Do method. Any
41728// pending HTTP request will be aborted if the provided context is
41729// canceled.
41730func (c *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall {
41731	c.ctx_ = ctx
41732	return c
41733}
41734
41735func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) {
41736	var body io.Reader = nil
41737	c.urlParams_.Set("alt", alt)
41738	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances")
41739	urls += "?" + c.urlParams_.Encode()
41740	req, _ := http.NewRequest("GET", urls, body)
41741	googleapi.Expand(req.URL, map[string]string{
41742		"project": c.project,
41743		"zone":    c.zone,
41744	})
41745	req.Header.Set("User-Agent", c.s.userAgent())
41746	if c.ifNoneMatch_ != "" {
41747		req.Header.Set("If-None-Match", c.ifNoneMatch_)
41748	}
41749	if c.ctx_ != nil {
41750		return ctxhttp.Do(c.ctx_, c.s.client, req)
41751	}
41752	return c.s.client.Do(req)
41753}
41754
41755// Do executes the "compute.targetInstances.list" call.
41756// Exactly one of *TargetInstanceList or error will be non-nil. Any
41757// non-2xx status code is an error. Response headers are in either
41758// *TargetInstanceList.ServerResponse.Header or (if a response was
41759// returned at all) in error.(*googleapi.Error).Header. Use
41760// googleapi.IsNotModified to check whether the returned error was
41761// because http.StatusNotModified was returned.
41762func (c *TargetInstancesListCall) Do(opts ...googleapi.CallOption) (*TargetInstanceList, error) {
41763	gensupport.SetOptions(c.urlParams_, opts...)
41764	res, err := c.doRequest("json")
41765	if res != nil && res.StatusCode == http.StatusNotModified {
41766		if res.Body != nil {
41767			res.Body.Close()
41768		}
41769		return nil, &googleapi.Error{
41770			Code:   res.StatusCode,
41771			Header: res.Header,
41772		}
41773	}
41774	if err != nil {
41775		return nil, err
41776	}
41777	defer googleapi.CloseBody(res)
41778	if err := googleapi.CheckResponse(res); err != nil {
41779		return nil, err
41780	}
41781	ret := &TargetInstanceList{
41782		ServerResponse: googleapi.ServerResponse{
41783			Header:         res.Header,
41784			HTTPStatusCode: res.StatusCode,
41785		},
41786	}
41787	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
41788		return nil, err
41789	}
41790	return ret, nil
41791	// {
41792	//   "description": "Retrieves a list of TargetInstance resources available to the specified project and zone.",
41793	//   "httpMethod": "GET",
41794	//   "id": "compute.targetInstances.list",
41795	//   "parameterOrder": [
41796	//     "project",
41797	//     "zone"
41798	//   ],
41799	//   "parameters": {
41800	//     "filter": {
41801	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
41802	//       "location": "query",
41803	//       "type": "string"
41804	//     },
41805	//     "maxResults": {
41806	//       "default": "500",
41807	//       "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.",
41808	//       "format": "uint32",
41809	//       "location": "query",
41810	//       "maximum": "500",
41811	//       "minimum": "0",
41812	//       "type": "integer"
41813	//     },
41814	//     "orderBy": {
41815	//       "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.",
41816	//       "location": "query",
41817	//       "type": "string"
41818	//     },
41819	//     "pageToken": {
41820	//       "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.",
41821	//       "location": "query",
41822	//       "type": "string"
41823	//     },
41824	//     "project": {
41825	//       "description": "Project ID for this request.",
41826	//       "location": "path",
41827	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41828	//       "required": true,
41829	//       "type": "string"
41830	//     },
41831	//     "zone": {
41832	//       "description": "Name of the zone scoping this request.",
41833	//       "location": "path",
41834	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
41835	//       "required": true,
41836	//       "type": "string"
41837	//     }
41838	//   },
41839	//   "path": "{project}/zones/{zone}/targetInstances",
41840	//   "response": {
41841	//     "$ref": "TargetInstanceList"
41842	//   },
41843	//   "scopes": [
41844	//     "https://www.googleapis.com/auth/cloud-platform",
41845	//     "https://www.googleapis.com/auth/compute",
41846	//     "https://www.googleapis.com/auth/compute.readonly"
41847	//   ]
41848	// }
41849
41850}
41851
41852// Pages invokes f for each page of results.
41853// A non-nil error returned from f will halt the iteration.
41854// The provided context supersedes any context provided to the Context method.
41855func (c *TargetInstancesListCall) Pages(ctx context.Context, f func(*TargetInstanceList) error) error {
41856	c.ctx_ = ctx
41857	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
41858	for {
41859		x, err := c.Do()
41860		if err != nil {
41861			return err
41862		}
41863		if err := f(x); err != nil {
41864			return err
41865		}
41866		if x.NextPageToken == "" {
41867			return nil
41868		}
41869		c.PageToken(x.NextPageToken)
41870	}
41871}
41872
41873// method id "compute.targetInstances.testIamPermissions":
41874
41875type TargetInstancesTestIamPermissionsCall struct {
41876	s                      *Service
41877	project                string
41878	zone                   string
41879	resource               string
41880	testpermissionsrequest *TestPermissionsRequest
41881	urlParams_             gensupport.URLParams
41882	ctx_                   context.Context
41883}
41884
41885// TestIamPermissions: Returns permissions that a caller has on the
41886// specified resource.
41887func (r *TargetInstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetInstancesTestIamPermissionsCall {
41888	c := &TargetInstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
41889	c.project = project
41890	c.zone = zone
41891	c.resource = resource
41892	c.testpermissionsrequest = testpermissionsrequest
41893	return c
41894}
41895
41896// Fields allows partial responses to be retrieved. See
41897// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
41898// for more information.
41899func (c *TargetInstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetInstancesTestIamPermissionsCall {
41900	c.urlParams_.Set("fields", googleapi.CombineFields(s))
41901	return c
41902}
41903
41904// Context sets the context to be used in this call's Do method. Any
41905// pending HTTP request will be aborted if the provided context is
41906// canceled.
41907func (c *TargetInstancesTestIamPermissionsCall) Context(ctx context.Context) *TargetInstancesTestIamPermissionsCall {
41908	c.ctx_ = ctx
41909	return c
41910}
41911
41912func (c *TargetInstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
41913	var body io.Reader = nil
41914	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
41915	if err != nil {
41916		return nil, err
41917	}
41918	ctype := "application/json"
41919	c.urlParams_.Set("alt", alt)
41920	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions")
41921	urls += "?" + c.urlParams_.Encode()
41922	req, _ := http.NewRequest("POST", urls, body)
41923	googleapi.Expand(req.URL, map[string]string{
41924		"project":  c.project,
41925		"zone":     c.zone,
41926		"resource": c.resource,
41927	})
41928	req.Header.Set("Content-Type", ctype)
41929	req.Header.Set("User-Agent", c.s.userAgent())
41930	if c.ctx_ != nil {
41931		return ctxhttp.Do(c.ctx_, c.s.client, req)
41932	}
41933	return c.s.client.Do(req)
41934}
41935
41936// Do executes the "compute.targetInstances.testIamPermissions" call.
41937// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
41938// non-2xx status code is an error. Response headers are in either
41939// *TestPermissionsResponse.ServerResponse.Header or (if a response was
41940// returned at all) in error.(*googleapi.Error).Header. Use
41941// googleapi.IsNotModified to check whether the returned error was
41942// because http.StatusNotModified was returned.
41943func (c *TargetInstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
41944	gensupport.SetOptions(c.urlParams_, opts...)
41945	res, err := c.doRequest("json")
41946	if res != nil && res.StatusCode == http.StatusNotModified {
41947		if res.Body != nil {
41948			res.Body.Close()
41949		}
41950		return nil, &googleapi.Error{
41951			Code:   res.StatusCode,
41952			Header: res.Header,
41953		}
41954	}
41955	if err != nil {
41956		return nil, err
41957	}
41958	defer googleapi.CloseBody(res)
41959	if err := googleapi.CheckResponse(res); err != nil {
41960		return nil, err
41961	}
41962	ret := &TestPermissionsResponse{
41963		ServerResponse: googleapi.ServerResponse{
41964			Header:         res.Header,
41965			HTTPStatusCode: res.StatusCode,
41966		},
41967	}
41968	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
41969		return nil, err
41970	}
41971	return ret, nil
41972	// {
41973	//   "description": "Returns permissions that a caller has on the specified resource.",
41974	//   "httpMethod": "POST",
41975	//   "id": "compute.targetInstances.testIamPermissions",
41976	//   "parameterOrder": [
41977	//     "project",
41978	//     "zone",
41979	//     "resource"
41980	//   ],
41981	//   "parameters": {
41982	//     "project": {
41983	//       "description": "Project ID for this request.",
41984	//       "location": "path",
41985	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
41986	//       "required": true,
41987	//       "type": "string"
41988	//     },
41989	//     "resource": {
41990	//       "description": "Name of the resource for this request.",
41991	//       "location": "path",
41992	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
41993	//       "required": true,
41994	//       "type": "string"
41995	//     },
41996	//     "zone": {
41997	//       "description": "The name of the zone for this request.",
41998	//       "location": "path",
41999	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42000	//       "required": true,
42001	//       "type": "string"
42002	//     }
42003	//   },
42004	//   "path": "{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions",
42005	//   "request": {
42006	//     "$ref": "TestPermissionsRequest"
42007	//   },
42008	//   "response": {
42009	//     "$ref": "TestPermissionsResponse"
42010	//   },
42011	//   "scopes": [
42012	//     "https://www.googleapis.com/auth/cloud-platform",
42013	//     "https://www.googleapis.com/auth/compute",
42014	//     "https://www.googleapis.com/auth/compute.readonly"
42015	//   ]
42016	// }
42017
42018}
42019
42020// method id "compute.targetPools.addHealthCheck":
42021
42022type TargetPoolsAddHealthCheckCall struct {
42023	s                                *Service
42024	project                          string
42025	region                           string
42026	targetPool                       string
42027	targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest
42028	urlParams_                       gensupport.URLParams
42029	ctx_                             context.Context
42030}
42031
42032// AddHealthCheck: Adds health check URLs to a target pool.
42033// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addHealthCheck
42034func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall {
42035	c := &TargetPoolsAddHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42036	c.project = project
42037	c.region = region
42038	c.targetPool = targetPool
42039	c.targetpoolsaddhealthcheckrequest = targetpoolsaddhealthcheckrequest
42040	return c
42041}
42042
42043// Fields allows partial responses to be retrieved. See
42044// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42045// for more information.
42046func (c *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall {
42047	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42048	return c
42049}
42050
42051// Context sets the context to be used in this call's Do method. Any
42052// pending HTTP request will be aborted if the provided context is
42053// canceled.
42054func (c *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall {
42055	c.ctx_ = ctx
42056	return c
42057}
42058
42059func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) {
42060	var body io.Reader = nil
42061	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest)
42062	if err != nil {
42063		return nil, err
42064	}
42065	ctype := "application/json"
42066	c.urlParams_.Set("alt", alt)
42067	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck")
42068	urls += "?" + c.urlParams_.Encode()
42069	req, _ := http.NewRequest("POST", urls, body)
42070	googleapi.Expand(req.URL, map[string]string{
42071		"project":    c.project,
42072		"region":     c.region,
42073		"targetPool": c.targetPool,
42074	})
42075	req.Header.Set("Content-Type", ctype)
42076	req.Header.Set("User-Agent", c.s.userAgent())
42077	if c.ctx_ != nil {
42078		return ctxhttp.Do(c.ctx_, c.s.client, req)
42079	}
42080	return c.s.client.Do(req)
42081}
42082
42083// Do executes the "compute.targetPools.addHealthCheck" call.
42084// Exactly one of *Operation or error will be non-nil. Any non-2xx
42085// status code is an error. Response headers are in either
42086// *Operation.ServerResponse.Header or (if a response was returned at
42087// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42088// to check whether the returned error was because
42089// http.StatusNotModified was returned.
42090func (c *TargetPoolsAddHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
42091	gensupport.SetOptions(c.urlParams_, opts...)
42092	res, err := c.doRequest("json")
42093	if res != nil && res.StatusCode == http.StatusNotModified {
42094		if res.Body != nil {
42095			res.Body.Close()
42096		}
42097		return nil, &googleapi.Error{
42098			Code:   res.StatusCode,
42099			Header: res.Header,
42100		}
42101	}
42102	if err != nil {
42103		return nil, err
42104	}
42105	defer googleapi.CloseBody(res)
42106	if err := googleapi.CheckResponse(res); err != nil {
42107		return nil, err
42108	}
42109	ret := &Operation{
42110		ServerResponse: googleapi.ServerResponse{
42111			Header:         res.Header,
42112			HTTPStatusCode: res.StatusCode,
42113		},
42114	}
42115	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
42116		return nil, err
42117	}
42118	return ret, nil
42119	// {
42120	//   "description": "Adds health check URLs to a target pool.",
42121	//   "httpMethod": "POST",
42122	//   "id": "compute.targetPools.addHealthCheck",
42123	//   "parameterOrder": [
42124	//     "project",
42125	//     "region",
42126	//     "targetPool"
42127	//   ],
42128	//   "parameters": {
42129	//     "project": {
42130	//       "description": "Project ID for this request.",
42131	//       "location": "path",
42132	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42133	//       "required": true,
42134	//       "type": "string"
42135	//     },
42136	//     "region": {
42137	//       "description": "Name of the region scoping this request.",
42138	//       "location": "path",
42139	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42140	//       "required": true,
42141	//       "type": "string"
42142	//     },
42143	//     "targetPool": {
42144	//       "description": "Name of the target pool to add a health check to.",
42145	//       "location": "path",
42146	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42147	//       "required": true,
42148	//       "type": "string"
42149	//     }
42150	//   },
42151	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck",
42152	//   "request": {
42153	//     "$ref": "TargetPoolsAddHealthCheckRequest"
42154	//   },
42155	//   "response": {
42156	//     "$ref": "Operation"
42157	//   },
42158	//   "scopes": [
42159	//     "https://www.googleapis.com/auth/cloud-platform",
42160	//     "https://www.googleapis.com/auth/compute"
42161	//   ]
42162	// }
42163
42164}
42165
42166// method id "compute.targetPools.addInstance":
42167
42168type TargetPoolsAddInstanceCall struct {
42169	s                             *Service
42170	project                       string
42171	region                        string
42172	targetPool                    string
42173	targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest
42174	urlParams_                    gensupport.URLParams
42175	ctx_                          context.Context
42176}
42177
42178// AddInstance: Adds an instance to a target pool.
42179// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/addInstance
42180func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall {
42181	c := &TargetPoolsAddInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42182	c.project = project
42183	c.region = region
42184	c.targetPool = targetPool
42185	c.targetpoolsaddinstancerequest = targetpoolsaddinstancerequest
42186	return c
42187}
42188
42189// Fields allows partial responses to be retrieved. See
42190// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42191// for more information.
42192func (c *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall {
42193	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42194	return c
42195}
42196
42197// Context sets the context to be used in this call's Do method. Any
42198// pending HTTP request will be aborted if the provided context is
42199// canceled.
42200func (c *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall {
42201	c.ctx_ = ctx
42202	return c
42203}
42204
42205func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) {
42206	var body io.Reader = nil
42207	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest)
42208	if err != nil {
42209		return nil, err
42210	}
42211	ctype := "application/json"
42212	c.urlParams_.Set("alt", alt)
42213	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addInstance")
42214	urls += "?" + c.urlParams_.Encode()
42215	req, _ := http.NewRequest("POST", urls, body)
42216	googleapi.Expand(req.URL, map[string]string{
42217		"project":    c.project,
42218		"region":     c.region,
42219		"targetPool": c.targetPool,
42220	})
42221	req.Header.Set("Content-Type", ctype)
42222	req.Header.Set("User-Agent", c.s.userAgent())
42223	if c.ctx_ != nil {
42224		return ctxhttp.Do(c.ctx_, c.s.client, req)
42225	}
42226	return c.s.client.Do(req)
42227}
42228
42229// Do executes the "compute.targetPools.addInstance" call.
42230// Exactly one of *Operation or error will be non-nil. Any non-2xx
42231// status code is an error. Response headers are in either
42232// *Operation.ServerResponse.Header or (if a response was returned at
42233// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42234// to check whether the returned error was because
42235// http.StatusNotModified was returned.
42236func (c *TargetPoolsAddInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
42237	gensupport.SetOptions(c.urlParams_, opts...)
42238	res, err := c.doRequest("json")
42239	if res != nil && res.StatusCode == http.StatusNotModified {
42240		if res.Body != nil {
42241			res.Body.Close()
42242		}
42243		return nil, &googleapi.Error{
42244			Code:   res.StatusCode,
42245			Header: res.Header,
42246		}
42247	}
42248	if err != nil {
42249		return nil, err
42250	}
42251	defer googleapi.CloseBody(res)
42252	if err := googleapi.CheckResponse(res); err != nil {
42253		return nil, err
42254	}
42255	ret := &Operation{
42256		ServerResponse: googleapi.ServerResponse{
42257			Header:         res.Header,
42258			HTTPStatusCode: res.StatusCode,
42259		},
42260	}
42261	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
42262		return nil, err
42263	}
42264	return ret, nil
42265	// {
42266	//   "description": "Adds an instance to a target pool.",
42267	//   "httpMethod": "POST",
42268	//   "id": "compute.targetPools.addInstance",
42269	//   "parameterOrder": [
42270	//     "project",
42271	//     "region",
42272	//     "targetPool"
42273	//   ],
42274	//   "parameters": {
42275	//     "project": {
42276	//       "description": "Project ID for this request.",
42277	//       "location": "path",
42278	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42279	//       "required": true,
42280	//       "type": "string"
42281	//     },
42282	//     "region": {
42283	//       "description": "Name of the region scoping this request.",
42284	//       "location": "path",
42285	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42286	//       "required": true,
42287	//       "type": "string"
42288	//     },
42289	//     "targetPool": {
42290	//       "description": "Name of the TargetPool resource to add instances to.",
42291	//       "location": "path",
42292	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42293	//       "required": true,
42294	//       "type": "string"
42295	//     }
42296	//   },
42297	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance",
42298	//   "request": {
42299	//     "$ref": "TargetPoolsAddInstanceRequest"
42300	//   },
42301	//   "response": {
42302	//     "$ref": "Operation"
42303	//   },
42304	//   "scopes": [
42305	//     "https://www.googleapis.com/auth/cloud-platform",
42306	//     "https://www.googleapis.com/auth/compute"
42307	//   ]
42308	// }
42309
42310}
42311
42312// method id "compute.targetPools.aggregatedList":
42313
42314type TargetPoolsAggregatedListCall struct {
42315	s            *Service
42316	project      string
42317	urlParams_   gensupport.URLParams
42318	ifNoneMatch_ string
42319	ctx_         context.Context
42320}
42321
42322// AggregatedList: Retrieves an aggregated list of target pools.
42323// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/aggregatedList
42324func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall {
42325	c := &TargetPoolsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42326	c.project = project
42327	return c
42328}
42329
42330// Filter sets the optional parameter "filter": Sets a filter expression
42331// for filtering listed resources, in the form filter={expression}. Your
42332// {expression} must be in the format: field_name comparison_string
42333// literal_string.
42334//
42335// The field_name is the name of the field you want to compare. Only
42336// atomic field types are supported (string, number, boolean). The
42337// comparison_string must be either eq (equals) or ne (not equals). The
42338// literal_string is the string value to filter to. The literal value
42339// must be valid for the type of field you are filtering by (string,
42340// number, boolean). For string fields, the literal value is interpreted
42341// as a regular expression using RE2 syntax. The literal value must
42342// match the entire field.
42343//
42344// For example, to filter for instances that do not have a name of
42345// example-instance, you would use filter=name ne
42346// example-instance.
42347//
42348// Compute Engine Beta API Only: If you use filtering in the Beta API,
42349// you can also filter on nested fields. For example, you could filter
42350// on instances that have set the scheduling.automaticRestart field to
42351// true. In particular, use filtering on nested fields to take advantage
42352// of instance labels to organize and filter results based on label
42353// values.
42354//
42355// The Beta API also supports filtering on multiple expressions by
42356// providing each separate expression within parentheses. For example,
42357// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
42358// Multiple expressions are treated as AND expressions, meaning that
42359// resources must match all expressions to pass the filters.
42360func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall {
42361	c.urlParams_.Set("filter", filter)
42362	return c
42363}
42364
42365// MaxResults sets the optional parameter "maxResults": The maximum
42366// number of results per page that should be returned. If the number of
42367// available results is larger than maxResults, Compute Engine returns a
42368// nextPageToken that can be used to get the next page of results in
42369// subsequent list requests.
42370func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall {
42371	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
42372	return c
42373}
42374
42375// OrderBy sets the optional parameter "orderBy": Sorts list results by
42376// a certain order. By default, results are returned in alphanumerical
42377// order based on the resource name.
42378//
42379// You can also sort results in descending order based on the creation
42380// timestamp using orderBy="creationTimestamp desc". This sorts results
42381// based on the creationTimestamp field in reverse chronological order
42382// (newest result first). Use this to sort resources like operations so
42383// that the newest operation is returned first.
42384//
42385// Currently, only sorting by name or creationTimestamp desc is
42386// supported.
42387func (c *TargetPoolsAggregatedListCall) OrderBy(orderBy string) *TargetPoolsAggregatedListCall {
42388	c.urlParams_.Set("orderBy", orderBy)
42389	return c
42390}
42391
42392// PageToken sets the optional parameter "pageToken": Specifies a page
42393// token to use. Set pageToken to the nextPageToken returned by a
42394// previous list request to get the next page of results.
42395func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPoolsAggregatedListCall {
42396	c.urlParams_.Set("pageToken", pageToken)
42397	return c
42398}
42399
42400// Fields allows partial responses to be retrieved. See
42401// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42402// for more information.
42403func (c *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall {
42404	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42405	return c
42406}
42407
42408// IfNoneMatch sets the optional parameter which makes the operation
42409// fail if the object's ETag matches the given value. This is useful for
42410// getting updates only after the object has changed since the last
42411// request. Use googleapi.IsNotModified to check whether the response
42412// error from Do is the result of In-None-Match.
42413func (c *TargetPoolsAggregatedListCall) IfNoneMatch(entityTag string) *TargetPoolsAggregatedListCall {
42414	c.ifNoneMatch_ = entityTag
42415	return c
42416}
42417
42418// Context sets the context to be used in this call's Do method. Any
42419// pending HTTP request will be aborted if the provided context is
42420// canceled.
42421func (c *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall {
42422	c.ctx_ = ctx
42423	return c
42424}
42425
42426func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
42427	var body io.Reader = nil
42428	c.urlParams_.Set("alt", alt)
42429	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetPools")
42430	urls += "?" + c.urlParams_.Encode()
42431	req, _ := http.NewRequest("GET", urls, body)
42432	googleapi.Expand(req.URL, map[string]string{
42433		"project": c.project,
42434	})
42435	req.Header.Set("User-Agent", c.s.userAgent())
42436	if c.ifNoneMatch_ != "" {
42437		req.Header.Set("If-None-Match", c.ifNoneMatch_)
42438	}
42439	if c.ctx_ != nil {
42440		return ctxhttp.Do(c.ctx_, c.s.client, req)
42441	}
42442	return c.s.client.Do(req)
42443}
42444
42445// Do executes the "compute.targetPools.aggregatedList" call.
42446// Exactly one of *TargetPoolAggregatedList or error will be non-nil.
42447// Any non-2xx status code is an error. Response headers are in either
42448// *TargetPoolAggregatedList.ServerResponse.Header or (if a response was
42449// returned at all) in error.(*googleapi.Error).Header. Use
42450// googleapi.IsNotModified to check whether the returned error was
42451// because http.StatusNotModified was returned.
42452func (c *TargetPoolsAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetPoolAggregatedList, error) {
42453	gensupport.SetOptions(c.urlParams_, opts...)
42454	res, err := c.doRequest("json")
42455	if res != nil && res.StatusCode == http.StatusNotModified {
42456		if res.Body != nil {
42457			res.Body.Close()
42458		}
42459		return nil, &googleapi.Error{
42460			Code:   res.StatusCode,
42461			Header: res.Header,
42462		}
42463	}
42464	if err != nil {
42465		return nil, err
42466	}
42467	defer googleapi.CloseBody(res)
42468	if err := googleapi.CheckResponse(res); err != nil {
42469		return nil, err
42470	}
42471	ret := &TargetPoolAggregatedList{
42472		ServerResponse: googleapi.ServerResponse{
42473			Header:         res.Header,
42474			HTTPStatusCode: res.StatusCode,
42475		},
42476	}
42477	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
42478		return nil, err
42479	}
42480	return ret, nil
42481	// {
42482	//   "description": "Retrieves an aggregated list of target pools.",
42483	//   "httpMethod": "GET",
42484	//   "id": "compute.targetPools.aggregatedList",
42485	//   "parameterOrder": [
42486	//     "project"
42487	//   ],
42488	//   "parameters": {
42489	//     "filter": {
42490	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
42491	//       "location": "query",
42492	//       "type": "string"
42493	//     },
42494	//     "maxResults": {
42495	//       "default": "500",
42496	//       "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.",
42497	//       "format": "uint32",
42498	//       "location": "query",
42499	//       "maximum": "500",
42500	//       "minimum": "0",
42501	//       "type": "integer"
42502	//     },
42503	//     "orderBy": {
42504	//       "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.",
42505	//       "location": "query",
42506	//       "type": "string"
42507	//     },
42508	//     "pageToken": {
42509	//       "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.",
42510	//       "location": "query",
42511	//       "type": "string"
42512	//     },
42513	//     "project": {
42514	//       "description": "Project ID for this request.",
42515	//       "location": "path",
42516	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42517	//       "required": true,
42518	//       "type": "string"
42519	//     }
42520	//   },
42521	//   "path": "{project}/aggregated/targetPools",
42522	//   "response": {
42523	//     "$ref": "TargetPoolAggregatedList"
42524	//   },
42525	//   "scopes": [
42526	//     "https://www.googleapis.com/auth/cloud-platform",
42527	//     "https://www.googleapis.com/auth/compute",
42528	//     "https://www.googleapis.com/auth/compute.readonly"
42529	//   ]
42530	// }
42531
42532}
42533
42534// Pages invokes f for each page of results.
42535// A non-nil error returned from f will halt the iteration.
42536// The provided context supersedes any context provided to the Context method.
42537func (c *TargetPoolsAggregatedListCall) Pages(ctx context.Context, f func(*TargetPoolAggregatedList) error) error {
42538	c.ctx_ = ctx
42539	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
42540	for {
42541		x, err := c.Do()
42542		if err != nil {
42543			return err
42544		}
42545		if err := f(x); err != nil {
42546			return err
42547		}
42548		if x.NextPageToken == "" {
42549			return nil
42550		}
42551		c.PageToken(x.NextPageToken)
42552	}
42553}
42554
42555// method id "compute.targetPools.delete":
42556
42557type TargetPoolsDeleteCall struct {
42558	s          *Service
42559	project    string
42560	region     string
42561	targetPool string
42562	urlParams_ gensupport.URLParams
42563	ctx_       context.Context
42564}
42565
42566// Delete: Deletes the specified target pool.
42567// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/delete
42568func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall {
42569	c := &TargetPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42570	c.project = project
42571	c.region = region
42572	c.targetPool = targetPool
42573	return c
42574}
42575
42576// Fields allows partial responses to be retrieved. See
42577// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42578// for more information.
42579func (c *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall {
42580	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42581	return c
42582}
42583
42584// Context sets the context to be used in this call's Do method. Any
42585// pending HTTP request will be aborted if the provided context is
42586// canceled.
42587func (c *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall {
42588	c.ctx_ = ctx
42589	return c
42590}
42591
42592func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
42593	var body io.Reader = nil
42594	c.urlParams_.Set("alt", alt)
42595	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}")
42596	urls += "?" + c.urlParams_.Encode()
42597	req, _ := http.NewRequest("DELETE", urls, body)
42598	googleapi.Expand(req.URL, map[string]string{
42599		"project":    c.project,
42600		"region":     c.region,
42601		"targetPool": c.targetPool,
42602	})
42603	req.Header.Set("User-Agent", c.s.userAgent())
42604	if c.ctx_ != nil {
42605		return ctxhttp.Do(c.ctx_, c.s.client, req)
42606	}
42607	return c.s.client.Do(req)
42608}
42609
42610// Do executes the "compute.targetPools.delete" call.
42611// Exactly one of *Operation or error will be non-nil. Any non-2xx
42612// status code is an error. Response headers are in either
42613// *Operation.ServerResponse.Header or (if a response was returned at
42614// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42615// to check whether the returned error was because
42616// http.StatusNotModified was returned.
42617func (c *TargetPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
42618	gensupport.SetOptions(c.urlParams_, opts...)
42619	res, err := c.doRequest("json")
42620	if res != nil && res.StatusCode == http.StatusNotModified {
42621		if res.Body != nil {
42622			res.Body.Close()
42623		}
42624		return nil, &googleapi.Error{
42625			Code:   res.StatusCode,
42626			Header: res.Header,
42627		}
42628	}
42629	if err != nil {
42630		return nil, err
42631	}
42632	defer googleapi.CloseBody(res)
42633	if err := googleapi.CheckResponse(res); err != nil {
42634		return nil, err
42635	}
42636	ret := &Operation{
42637		ServerResponse: googleapi.ServerResponse{
42638			Header:         res.Header,
42639			HTTPStatusCode: res.StatusCode,
42640		},
42641	}
42642	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
42643		return nil, err
42644	}
42645	return ret, nil
42646	// {
42647	//   "description": "Deletes the specified target pool.",
42648	//   "httpMethod": "DELETE",
42649	//   "id": "compute.targetPools.delete",
42650	//   "parameterOrder": [
42651	//     "project",
42652	//     "region",
42653	//     "targetPool"
42654	//   ],
42655	//   "parameters": {
42656	//     "project": {
42657	//       "description": "Project ID for this request.",
42658	//       "location": "path",
42659	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42660	//       "required": true,
42661	//       "type": "string"
42662	//     },
42663	//     "region": {
42664	//       "description": "Name of the region scoping this request.",
42665	//       "location": "path",
42666	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42667	//       "required": true,
42668	//       "type": "string"
42669	//     },
42670	//     "targetPool": {
42671	//       "description": "Name of the TargetPool resource to delete.",
42672	//       "location": "path",
42673	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42674	//       "required": true,
42675	//       "type": "string"
42676	//     }
42677	//   },
42678	//   "path": "{project}/regions/{region}/targetPools/{targetPool}",
42679	//   "response": {
42680	//     "$ref": "Operation"
42681	//   },
42682	//   "scopes": [
42683	//     "https://www.googleapis.com/auth/cloud-platform",
42684	//     "https://www.googleapis.com/auth/compute"
42685	//   ]
42686	// }
42687
42688}
42689
42690// method id "compute.targetPools.get":
42691
42692type TargetPoolsGetCall struct {
42693	s            *Service
42694	project      string
42695	region       string
42696	targetPool   string
42697	urlParams_   gensupport.URLParams
42698	ifNoneMatch_ string
42699	ctx_         context.Context
42700}
42701
42702// Get: Returns the specified target pool. Get a list of available
42703// target pools by making a list() request.
42704// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/get
42705func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall {
42706	c := &TargetPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42707	c.project = project
42708	c.region = region
42709	c.targetPool = targetPool
42710	return c
42711}
42712
42713// Fields allows partial responses to be retrieved. See
42714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42715// for more information.
42716func (c *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall {
42717	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42718	return c
42719}
42720
42721// IfNoneMatch sets the optional parameter which makes the operation
42722// fail if the object's ETag matches the given value. This is useful for
42723// getting updates only after the object has changed since the last
42724// request. Use googleapi.IsNotModified to check whether the response
42725// error from Do is the result of In-None-Match.
42726func (c *TargetPoolsGetCall) IfNoneMatch(entityTag string) *TargetPoolsGetCall {
42727	c.ifNoneMatch_ = entityTag
42728	return c
42729}
42730
42731// Context sets the context to be used in this call's Do method. Any
42732// pending HTTP request will be aborted if the provided context is
42733// canceled.
42734func (c *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall {
42735	c.ctx_ = ctx
42736	return c
42737}
42738
42739func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) {
42740	var body io.Reader = nil
42741	c.urlParams_.Set("alt", alt)
42742	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}")
42743	urls += "?" + c.urlParams_.Encode()
42744	req, _ := http.NewRequest("GET", urls, body)
42745	googleapi.Expand(req.URL, map[string]string{
42746		"project":    c.project,
42747		"region":     c.region,
42748		"targetPool": c.targetPool,
42749	})
42750	req.Header.Set("User-Agent", c.s.userAgent())
42751	if c.ifNoneMatch_ != "" {
42752		req.Header.Set("If-None-Match", c.ifNoneMatch_)
42753	}
42754	if c.ctx_ != nil {
42755		return ctxhttp.Do(c.ctx_, c.s.client, req)
42756	}
42757	return c.s.client.Do(req)
42758}
42759
42760// Do executes the "compute.targetPools.get" call.
42761// Exactly one of *TargetPool or error will be non-nil. Any non-2xx
42762// status code is an error. Response headers are in either
42763// *TargetPool.ServerResponse.Header or (if a response was returned at
42764// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
42765// to check whether the returned error was because
42766// http.StatusNotModified was returned.
42767func (c *TargetPoolsGetCall) Do(opts ...googleapi.CallOption) (*TargetPool, error) {
42768	gensupport.SetOptions(c.urlParams_, opts...)
42769	res, err := c.doRequest("json")
42770	if res != nil && res.StatusCode == http.StatusNotModified {
42771		if res.Body != nil {
42772			res.Body.Close()
42773		}
42774		return nil, &googleapi.Error{
42775			Code:   res.StatusCode,
42776			Header: res.Header,
42777		}
42778	}
42779	if err != nil {
42780		return nil, err
42781	}
42782	defer googleapi.CloseBody(res)
42783	if err := googleapi.CheckResponse(res); err != nil {
42784		return nil, err
42785	}
42786	ret := &TargetPool{
42787		ServerResponse: googleapi.ServerResponse{
42788			Header:         res.Header,
42789			HTTPStatusCode: res.StatusCode,
42790		},
42791	}
42792	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
42793		return nil, err
42794	}
42795	return ret, nil
42796	// {
42797	//   "description": "Returns the specified target pool. Get a list of available target pools by making a list() request.",
42798	//   "httpMethod": "GET",
42799	//   "id": "compute.targetPools.get",
42800	//   "parameterOrder": [
42801	//     "project",
42802	//     "region",
42803	//     "targetPool"
42804	//   ],
42805	//   "parameters": {
42806	//     "project": {
42807	//       "description": "Project ID for this request.",
42808	//       "location": "path",
42809	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42810	//       "required": true,
42811	//       "type": "string"
42812	//     },
42813	//     "region": {
42814	//       "description": "Name of the region scoping this request.",
42815	//       "location": "path",
42816	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42817	//       "required": true,
42818	//       "type": "string"
42819	//     },
42820	//     "targetPool": {
42821	//       "description": "Name of the TargetPool resource to return.",
42822	//       "location": "path",
42823	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42824	//       "required": true,
42825	//       "type": "string"
42826	//     }
42827	//   },
42828	//   "path": "{project}/regions/{region}/targetPools/{targetPool}",
42829	//   "response": {
42830	//     "$ref": "TargetPool"
42831	//   },
42832	//   "scopes": [
42833	//     "https://www.googleapis.com/auth/cloud-platform",
42834	//     "https://www.googleapis.com/auth/compute",
42835	//     "https://www.googleapis.com/auth/compute.readonly"
42836	//   ]
42837	// }
42838
42839}
42840
42841// method id "compute.targetPools.getHealth":
42842
42843type TargetPoolsGetHealthCall struct {
42844	s                 *Service
42845	project           string
42846	region            string
42847	targetPool        string
42848	instancereference *InstanceReference
42849	urlParams_        gensupport.URLParams
42850	ctx_              context.Context
42851}
42852
42853// GetHealth: Gets the most recent health check results for each IP for
42854// the instance that is referenced by the given target pool.
42855// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/getHealth
42856func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall {
42857	c := &TargetPoolsGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)}
42858	c.project = project
42859	c.region = region
42860	c.targetPool = targetPool
42861	c.instancereference = instancereference
42862	return c
42863}
42864
42865// Fields allows partial responses to be retrieved. See
42866// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
42867// for more information.
42868func (c *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall {
42869	c.urlParams_.Set("fields", googleapi.CombineFields(s))
42870	return c
42871}
42872
42873// Context sets the context to be used in this call's Do method. Any
42874// pending HTTP request will be aborted if the provided context is
42875// canceled.
42876func (c *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall {
42877	c.ctx_ = ctx
42878	return c
42879}
42880
42881func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) {
42882	var body io.Reader = nil
42883	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference)
42884	if err != nil {
42885		return nil, err
42886	}
42887	ctype := "application/json"
42888	c.urlParams_.Set("alt", alt)
42889	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth")
42890	urls += "?" + c.urlParams_.Encode()
42891	req, _ := http.NewRequest("POST", urls, body)
42892	googleapi.Expand(req.URL, map[string]string{
42893		"project":    c.project,
42894		"region":     c.region,
42895		"targetPool": c.targetPool,
42896	})
42897	req.Header.Set("Content-Type", ctype)
42898	req.Header.Set("User-Agent", c.s.userAgent())
42899	if c.ctx_ != nil {
42900		return ctxhttp.Do(c.ctx_, c.s.client, req)
42901	}
42902	return c.s.client.Do(req)
42903}
42904
42905// Do executes the "compute.targetPools.getHealth" call.
42906// Exactly one of *TargetPoolInstanceHealth or error will be non-nil.
42907// Any non-2xx status code is an error. Response headers are in either
42908// *TargetPoolInstanceHealth.ServerResponse.Header or (if a response was
42909// returned at all) in error.(*googleapi.Error).Header. Use
42910// googleapi.IsNotModified to check whether the returned error was
42911// because http.StatusNotModified was returned.
42912func (c *TargetPoolsGetHealthCall) Do(opts ...googleapi.CallOption) (*TargetPoolInstanceHealth, error) {
42913	gensupport.SetOptions(c.urlParams_, opts...)
42914	res, err := c.doRequest("json")
42915	if res != nil && res.StatusCode == http.StatusNotModified {
42916		if res.Body != nil {
42917			res.Body.Close()
42918		}
42919		return nil, &googleapi.Error{
42920			Code:   res.StatusCode,
42921			Header: res.Header,
42922		}
42923	}
42924	if err != nil {
42925		return nil, err
42926	}
42927	defer googleapi.CloseBody(res)
42928	if err := googleapi.CheckResponse(res); err != nil {
42929		return nil, err
42930	}
42931	ret := &TargetPoolInstanceHealth{
42932		ServerResponse: googleapi.ServerResponse{
42933			Header:         res.Header,
42934			HTTPStatusCode: res.StatusCode,
42935		},
42936	}
42937	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
42938		return nil, err
42939	}
42940	return ret, nil
42941	// {
42942	//   "description": "Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.",
42943	//   "httpMethod": "POST",
42944	//   "id": "compute.targetPools.getHealth",
42945	//   "parameterOrder": [
42946	//     "project",
42947	//     "region",
42948	//     "targetPool"
42949	//   ],
42950	//   "parameters": {
42951	//     "project": {
42952	//       "description": "Project ID for this request.",
42953	//       "location": "path",
42954	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
42955	//       "required": true,
42956	//       "type": "string"
42957	//     },
42958	//     "region": {
42959	//       "description": "Name of the region scoping this request.",
42960	//       "location": "path",
42961	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42962	//       "required": true,
42963	//       "type": "string"
42964	//     },
42965	//     "targetPool": {
42966	//       "description": "Name of the TargetPool resource to which the queried instance belongs.",
42967	//       "location": "path",
42968	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
42969	//       "required": true,
42970	//       "type": "string"
42971	//     }
42972	//   },
42973	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth",
42974	//   "request": {
42975	//     "$ref": "InstanceReference"
42976	//   },
42977	//   "response": {
42978	//     "$ref": "TargetPoolInstanceHealth"
42979	//   },
42980	//   "scopes": [
42981	//     "https://www.googleapis.com/auth/cloud-platform",
42982	//     "https://www.googleapis.com/auth/compute",
42983	//     "https://www.googleapis.com/auth/compute.readonly"
42984	//   ]
42985	// }
42986
42987}
42988
42989// method id "compute.targetPools.insert":
42990
42991type TargetPoolsInsertCall struct {
42992	s          *Service
42993	project    string
42994	region     string
42995	targetpool *TargetPool
42996	urlParams_ gensupport.URLParams
42997	ctx_       context.Context
42998}
42999
43000// Insert: Creates a target pool in the specified project and region
43001// using the data included in the request.
43002// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/insert
43003func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall {
43004	c := &TargetPoolsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43005	c.project = project
43006	c.region = region
43007	c.targetpool = targetpool
43008	return c
43009}
43010
43011// Fields allows partial responses to be retrieved. See
43012// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43013// for more information.
43014func (c *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall {
43015	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43016	return c
43017}
43018
43019// Context sets the context to be used in this call's Do method. Any
43020// pending HTTP request will be aborted if the provided context is
43021// canceled.
43022func (c *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall {
43023	c.ctx_ = ctx
43024	return c
43025}
43026
43027func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) {
43028	var body io.Reader = nil
43029	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool)
43030	if err != nil {
43031		return nil, err
43032	}
43033	ctype := "application/json"
43034	c.urlParams_.Set("alt", alt)
43035	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools")
43036	urls += "?" + c.urlParams_.Encode()
43037	req, _ := http.NewRequest("POST", urls, body)
43038	googleapi.Expand(req.URL, map[string]string{
43039		"project": c.project,
43040		"region":  c.region,
43041	})
43042	req.Header.Set("Content-Type", ctype)
43043	req.Header.Set("User-Agent", c.s.userAgent())
43044	if c.ctx_ != nil {
43045		return ctxhttp.Do(c.ctx_, c.s.client, req)
43046	}
43047	return c.s.client.Do(req)
43048}
43049
43050// Do executes the "compute.targetPools.insert" call.
43051// Exactly one of *Operation or error will be non-nil. Any non-2xx
43052// status code is an error. Response headers are in either
43053// *Operation.ServerResponse.Header or (if a response was returned at
43054// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43055// to check whether the returned error was because
43056// http.StatusNotModified was returned.
43057func (c *TargetPoolsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
43058	gensupport.SetOptions(c.urlParams_, opts...)
43059	res, err := c.doRequest("json")
43060	if res != nil && res.StatusCode == http.StatusNotModified {
43061		if res.Body != nil {
43062			res.Body.Close()
43063		}
43064		return nil, &googleapi.Error{
43065			Code:   res.StatusCode,
43066			Header: res.Header,
43067		}
43068	}
43069	if err != nil {
43070		return nil, err
43071	}
43072	defer googleapi.CloseBody(res)
43073	if err := googleapi.CheckResponse(res); err != nil {
43074		return nil, err
43075	}
43076	ret := &Operation{
43077		ServerResponse: googleapi.ServerResponse{
43078			Header:         res.Header,
43079			HTTPStatusCode: res.StatusCode,
43080		},
43081	}
43082	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
43083		return nil, err
43084	}
43085	return ret, nil
43086	// {
43087	//   "description": "Creates a target pool in the specified project and region using the data included in the request.",
43088	//   "httpMethod": "POST",
43089	//   "id": "compute.targetPools.insert",
43090	//   "parameterOrder": [
43091	//     "project",
43092	//     "region"
43093	//   ],
43094	//   "parameters": {
43095	//     "project": {
43096	//       "description": "Project ID for this request.",
43097	//       "location": "path",
43098	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43099	//       "required": true,
43100	//       "type": "string"
43101	//     },
43102	//     "region": {
43103	//       "description": "Name of the region scoping this request.",
43104	//       "location": "path",
43105	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43106	//       "required": true,
43107	//       "type": "string"
43108	//     }
43109	//   },
43110	//   "path": "{project}/regions/{region}/targetPools",
43111	//   "request": {
43112	//     "$ref": "TargetPool"
43113	//   },
43114	//   "response": {
43115	//     "$ref": "Operation"
43116	//   },
43117	//   "scopes": [
43118	//     "https://www.googleapis.com/auth/cloud-platform",
43119	//     "https://www.googleapis.com/auth/compute"
43120	//   ]
43121	// }
43122
43123}
43124
43125// method id "compute.targetPools.list":
43126
43127type TargetPoolsListCall struct {
43128	s            *Service
43129	project      string
43130	region       string
43131	urlParams_   gensupport.URLParams
43132	ifNoneMatch_ string
43133	ctx_         context.Context
43134}
43135
43136// List: Retrieves a list of target pools available to the specified
43137// project and region.
43138// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/list
43139func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall {
43140	c := &TargetPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43141	c.project = project
43142	c.region = region
43143	return c
43144}
43145
43146// Filter sets the optional parameter "filter": Sets a filter expression
43147// for filtering listed resources, in the form filter={expression}. Your
43148// {expression} must be in the format: field_name comparison_string
43149// literal_string.
43150//
43151// The field_name is the name of the field you want to compare. Only
43152// atomic field types are supported (string, number, boolean). The
43153// comparison_string must be either eq (equals) or ne (not equals). The
43154// literal_string is the string value to filter to. The literal value
43155// must be valid for the type of field you are filtering by (string,
43156// number, boolean). For string fields, the literal value is interpreted
43157// as a regular expression using RE2 syntax. The literal value must
43158// match the entire field.
43159//
43160// For example, to filter for instances that do not have a name of
43161// example-instance, you would use filter=name ne
43162// example-instance.
43163//
43164// Compute Engine Beta API Only: If you use filtering in the Beta API,
43165// you can also filter on nested fields. For example, you could filter
43166// on instances that have set the scheduling.automaticRestart field to
43167// true. In particular, use filtering on nested fields to take advantage
43168// of instance labels to organize and filter results based on label
43169// values.
43170//
43171// The Beta API also supports filtering on multiple expressions by
43172// providing each separate expression within parentheses. For example,
43173// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
43174// Multiple expressions are treated as AND expressions, meaning that
43175// resources must match all expressions to pass the filters.
43176func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall {
43177	c.urlParams_.Set("filter", filter)
43178	return c
43179}
43180
43181// MaxResults sets the optional parameter "maxResults": The maximum
43182// number of results per page that should be returned. If the number of
43183// available results is larger than maxResults, Compute Engine returns a
43184// nextPageToken that can be used to get the next page of results in
43185// subsequent list requests.
43186func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall {
43187	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
43188	return c
43189}
43190
43191// OrderBy sets the optional parameter "orderBy": Sorts list results by
43192// a certain order. By default, results are returned in alphanumerical
43193// order based on the resource name.
43194//
43195// You can also sort results in descending order based on the creation
43196// timestamp using orderBy="creationTimestamp desc". This sorts results
43197// based on the creationTimestamp field in reverse chronological order
43198// (newest result first). Use this to sort resources like operations so
43199// that the newest operation is returned first.
43200//
43201// Currently, only sorting by name or creationTimestamp desc is
43202// supported.
43203func (c *TargetPoolsListCall) OrderBy(orderBy string) *TargetPoolsListCall {
43204	c.urlParams_.Set("orderBy", orderBy)
43205	return c
43206}
43207
43208// PageToken sets the optional parameter "pageToken": Specifies a page
43209// token to use. Set pageToken to the nextPageToken returned by a
43210// previous list request to get the next page of results.
43211func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall {
43212	c.urlParams_.Set("pageToken", pageToken)
43213	return c
43214}
43215
43216// Fields allows partial responses to be retrieved. See
43217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43218// for more information.
43219func (c *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall {
43220	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43221	return c
43222}
43223
43224// IfNoneMatch sets the optional parameter which makes the operation
43225// fail if the object's ETag matches the given value. This is useful for
43226// getting updates only after the object has changed since the last
43227// request. Use googleapi.IsNotModified to check whether the response
43228// error from Do is the result of In-None-Match.
43229func (c *TargetPoolsListCall) IfNoneMatch(entityTag string) *TargetPoolsListCall {
43230	c.ifNoneMatch_ = entityTag
43231	return c
43232}
43233
43234// Context sets the context to be used in this call's Do method. Any
43235// pending HTTP request will be aborted if the provided context is
43236// canceled.
43237func (c *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall {
43238	c.ctx_ = ctx
43239	return c
43240}
43241
43242func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) {
43243	var body io.Reader = nil
43244	c.urlParams_.Set("alt", alt)
43245	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools")
43246	urls += "?" + c.urlParams_.Encode()
43247	req, _ := http.NewRequest("GET", urls, body)
43248	googleapi.Expand(req.URL, map[string]string{
43249		"project": c.project,
43250		"region":  c.region,
43251	})
43252	req.Header.Set("User-Agent", c.s.userAgent())
43253	if c.ifNoneMatch_ != "" {
43254		req.Header.Set("If-None-Match", c.ifNoneMatch_)
43255	}
43256	if c.ctx_ != nil {
43257		return ctxhttp.Do(c.ctx_, c.s.client, req)
43258	}
43259	return c.s.client.Do(req)
43260}
43261
43262// Do executes the "compute.targetPools.list" call.
43263// Exactly one of *TargetPoolList or error will be non-nil. Any non-2xx
43264// status code is an error. Response headers are in either
43265// *TargetPoolList.ServerResponse.Header or (if a response was returned
43266// at all) in error.(*googleapi.Error).Header. Use
43267// googleapi.IsNotModified to check whether the returned error was
43268// because http.StatusNotModified was returned.
43269func (c *TargetPoolsListCall) Do(opts ...googleapi.CallOption) (*TargetPoolList, error) {
43270	gensupport.SetOptions(c.urlParams_, opts...)
43271	res, err := c.doRequest("json")
43272	if res != nil && res.StatusCode == http.StatusNotModified {
43273		if res.Body != nil {
43274			res.Body.Close()
43275		}
43276		return nil, &googleapi.Error{
43277			Code:   res.StatusCode,
43278			Header: res.Header,
43279		}
43280	}
43281	if err != nil {
43282		return nil, err
43283	}
43284	defer googleapi.CloseBody(res)
43285	if err := googleapi.CheckResponse(res); err != nil {
43286		return nil, err
43287	}
43288	ret := &TargetPoolList{
43289		ServerResponse: googleapi.ServerResponse{
43290			Header:         res.Header,
43291			HTTPStatusCode: res.StatusCode,
43292		},
43293	}
43294	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
43295		return nil, err
43296	}
43297	return ret, nil
43298	// {
43299	//   "description": "Retrieves a list of target pools available to the specified project and region.",
43300	//   "httpMethod": "GET",
43301	//   "id": "compute.targetPools.list",
43302	//   "parameterOrder": [
43303	//     "project",
43304	//     "region"
43305	//   ],
43306	//   "parameters": {
43307	//     "filter": {
43308	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
43309	//       "location": "query",
43310	//       "type": "string"
43311	//     },
43312	//     "maxResults": {
43313	//       "default": "500",
43314	//       "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.",
43315	//       "format": "uint32",
43316	//       "location": "query",
43317	//       "maximum": "500",
43318	//       "minimum": "0",
43319	//       "type": "integer"
43320	//     },
43321	//     "orderBy": {
43322	//       "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.",
43323	//       "location": "query",
43324	//       "type": "string"
43325	//     },
43326	//     "pageToken": {
43327	//       "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.",
43328	//       "location": "query",
43329	//       "type": "string"
43330	//     },
43331	//     "project": {
43332	//       "description": "Project ID for this request.",
43333	//       "location": "path",
43334	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43335	//       "required": true,
43336	//       "type": "string"
43337	//     },
43338	//     "region": {
43339	//       "description": "Name of the region scoping this request.",
43340	//       "location": "path",
43341	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43342	//       "required": true,
43343	//       "type": "string"
43344	//     }
43345	//   },
43346	//   "path": "{project}/regions/{region}/targetPools",
43347	//   "response": {
43348	//     "$ref": "TargetPoolList"
43349	//   },
43350	//   "scopes": [
43351	//     "https://www.googleapis.com/auth/cloud-platform",
43352	//     "https://www.googleapis.com/auth/compute",
43353	//     "https://www.googleapis.com/auth/compute.readonly"
43354	//   ]
43355	// }
43356
43357}
43358
43359// Pages invokes f for each page of results.
43360// A non-nil error returned from f will halt the iteration.
43361// The provided context supersedes any context provided to the Context method.
43362func (c *TargetPoolsListCall) Pages(ctx context.Context, f func(*TargetPoolList) error) error {
43363	c.ctx_ = ctx
43364	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
43365	for {
43366		x, err := c.Do()
43367		if err != nil {
43368			return err
43369		}
43370		if err := f(x); err != nil {
43371			return err
43372		}
43373		if x.NextPageToken == "" {
43374			return nil
43375		}
43376		c.PageToken(x.NextPageToken)
43377	}
43378}
43379
43380// method id "compute.targetPools.removeHealthCheck":
43381
43382type TargetPoolsRemoveHealthCheckCall struct {
43383	s                                   *Service
43384	project                             string
43385	region                              string
43386	targetPool                          string
43387	targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest
43388	urlParams_                          gensupport.URLParams
43389	ctx_                                context.Context
43390}
43391
43392// RemoveHealthCheck: Removes health check URL from a target pool.
43393// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeHealthCheck
43394func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall {
43395	c := &TargetPoolsRemoveHealthCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43396	c.project = project
43397	c.region = region
43398	c.targetPool = targetPool
43399	c.targetpoolsremovehealthcheckrequest = targetpoolsremovehealthcheckrequest
43400	return c
43401}
43402
43403// Fields allows partial responses to be retrieved. See
43404// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43405// for more information.
43406func (c *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall {
43407	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43408	return c
43409}
43410
43411// Context sets the context to be used in this call's Do method. Any
43412// pending HTTP request will be aborted if the provided context is
43413// canceled.
43414func (c *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall {
43415	c.ctx_ = ctx
43416	return c
43417}
43418
43419func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) {
43420	var body io.Reader = nil
43421	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest)
43422	if err != nil {
43423		return nil, err
43424	}
43425	ctype := "application/json"
43426	c.urlParams_.Set("alt", alt)
43427	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck")
43428	urls += "?" + c.urlParams_.Encode()
43429	req, _ := http.NewRequest("POST", urls, body)
43430	googleapi.Expand(req.URL, map[string]string{
43431		"project":    c.project,
43432		"region":     c.region,
43433		"targetPool": c.targetPool,
43434	})
43435	req.Header.Set("Content-Type", ctype)
43436	req.Header.Set("User-Agent", c.s.userAgent())
43437	if c.ctx_ != nil {
43438		return ctxhttp.Do(c.ctx_, c.s.client, req)
43439	}
43440	return c.s.client.Do(req)
43441}
43442
43443// Do executes the "compute.targetPools.removeHealthCheck" call.
43444// Exactly one of *Operation or error will be non-nil. Any non-2xx
43445// status code is an error. Response headers are in either
43446// *Operation.ServerResponse.Header or (if a response was returned at
43447// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43448// to check whether the returned error was because
43449// http.StatusNotModified was returned.
43450func (c *TargetPoolsRemoveHealthCheckCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
43451	gensupport.SetOptions(c.urlParams_, opts...)
43452	res, err := c.doRequest("json")
43453	if res != nil && res.StatusCode == http.StatusNotModified {
43454		if res.Body != nil {
43455			res.Body.Close()
43456		}
43457		return nil, &googleapi.Error{
43458			Code:   res.StatusCode,
43459			Header: res.Header,
43460		}
43461	}
43462	if err != nil {
43463		return nil, err
43464	}
43465	defer googleapi.CloseBody(res)
43466	if err := googleapi.CheckResponse(res); err != nil {
43467		return nil, err
43468	}
43469	ret := &Operation{
43470		ServerResponse: googleapi.ServerResponse{
43471			Header:         res.Header,
43472			HTTPStatusCode: res.StatusCode,
43473		},
43474	}
43475	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
43476		return nil, err
43477	}
43478	return ret, nil
43479	// {
43480	//   "description": "Removes health check URL from a target pool.",
43481	//   "httpMethod": "POST",
43482	//   "id": "compute.targetPools.removeHealthCheck",
43483	//   "parameterOrder": [
43484	//     "project",
43485	//     "region",
43486	//     "targetPool"
43487	//   ],
43488	//   "parameters": {
43489	//     "project": {
43490	//       "description": "Project ID for this request.",
43491	//       "location": "path",
43492	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43493	//       "required": true,
43494	//       "type": "string"
43495	//     },
43496	//     "region": {
43497	//       "description": "Name of the region for this request.",
43498	//       "location": "path",
43499	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43500	//       "required": true,
43501	//       "type": "string"
43502	//     },
43503	//     "targetPool": {
43504	//       "description": "Name of the target pool to remove health checks from.",
43505	//       "location": "path",
43506	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43507	//       "required": true,
43508	//       "type": "string"
43509	//     }
43510	//   },
43511	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck",
43512	//   "request": {
43513	//     "$ref": "TargetPoolsRemoveHealthCheckRequest"
43514	//   },
43515	//   "response": {
43516	//     "$ref": "Operation"
43517	//   },
43518	//   "scopes": [
43519	//     "https://www.googleapis.com/auth/cloud-platform",
43520	//     "https://www.googleapis.com/auth/compute"
43521	//   ]
43522	// }
43523
43524}
43525
43526// method id "compute.targetPools.removeInstance":
43527
43528type TargetPoolsRemoveInstanceCall struct {
43529	s                                *Service
43530	project                          string
43531	region                           string
43532	targetPool                       string
43533	targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest
43534	urlParams_                       gensupport.URLParams
43535	ctx_                             context.Context
43536}
43537
43538// RemoveInstance: Removes instance URL from a target pool.
43539// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/removeInstance
43540func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall {
43541	c := &TargetPoolsRemoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43542	c.project = project
43543	c.region = region
43544	c.targetPool = targetPool
43545	c.targetpoolsremoveinstancerequest = targetpoolsremoveinstancerequest
43546	return c
43547}
43548
43549// Fields allows partial responses to be retrieved. See
43550// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43551// for more information.
43552func (c *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall {
43553	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43554	return c
43555}
43556
43557// Context sets the context to be used in this call's Do method. Any
43558// pending HTTP request will be aborted if the provided context is
43559// canceled.
43560func (c *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall {
43561	c.ctx_ = ctx
43562	return c
43563}
43564
43565func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) {
43566	var body io.Reader = nil
43567	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest)
43568	if err != nil {
43569		return nil, err
43570	}
43571	ctype := "application/json"
43572	c.urlParams_.Set("alt", alt)
43573	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance")
43574	urls += "?" + c.urlParams_.Encode()
43575	req, _ := http.NewRequest("POST", urls, body)
43576	googleapi.Expand(req.URL, map[string]string{
43577		"project":    c.project,
43578		"region":     c.region,
43579		"targetPool": c.targetPool,
43580	})
43581	req.Header.Set("Content-Type", ctype)
43582	req.Header.Set("User-Agent", c.s.userAgent())
43583	if c.ctx_ != nil {
43584		return ctxhttp.Do(c.ctx_, c.s.client, req)
43585	}
43586	return c.s.client.Do(req)
43587}
43588
43589// Do executes the "compute.targetPools.removeInstance" call.
43590// Exactly one of *Operation or error will be non-nil. Any non-2xx
43591// status code is an error. Response headers are in either
43592// *Operation.ServerResponse.Header or (if a response was returned at
43593// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43594// to check whether the returned error was because
43595// http.StatusNotModified was returned.
43596func (c *TargetPoolsRemoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
43597	gensupport.SetOptions(c.urlParams_, opts...)
43598	res, err := c.doRequest("json")
43599	if res != nil && res.StatusCode == http.StatusNotModified {
43600		if res.Body != nil {
43601			res.Body.Close()
43602		}
43603		return nil, &googleapi.Error{
43604			Code:   res.StatusCode,
43605			Header: res.Header,
43606		}
43607	}
43608	if err != nil {
43609		return nil, err
43610	}
43611	defer googleapi.CloseBody(res)
43612	if err := googleapi.CheckResponse(res); err != nil {
43613		return nil, err
43614	}
43615	ret := &Operation{
43616		ServerResponse: googleapi.ServerResponse{
43617			Header:         res.Header,
43618			HTTPStatusCode: res.StatusCode,
43619		},
43620	}
43621	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
43622		return nil, err
43623	}
43624	return ret, nil
43625	// {
43626	//   "description": "Removes instance URL from a target pool.",
43627	//   "httpMethod": "POST",
43628	//   "id": "compute.targetPools.removeInstance",
43629	//   "parameterOrder": [
43630	//     "project",
43631	//     "region",
43632	//     "targetPool"
43633	//   ],
43634	//   "parameters": {
43635	//     "project": {
43636	//       "description": "Project ID for this request.",
43637	//       "location": "path",
43638	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43639	//       "required": true,
43640	//       "type": "string"
43641	//     },
43642	//     "region": {
43643	//       "description": "Name of the region scoping this request.",
43644	//       "location": "path",
43645	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43646	//       "required": true,
43647	//       "type": "string"
43648	//     },
43649	//     "targetPool": {
43650	//       "description": "Name of the TargetPool resource to remove instances from.",
43651	//       "location": "path",
43652	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43653	//       "required": true,
43654	//       "type": "string"
43655	//     }
43656	//   },
43657	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance",
43658	//   "request": {
43659	//     "$ref": "TargetPoolsRemoveInstanceRequest"
43660	//   },
43661	//   "response": {
43662	//     "$ref": "Operation"
43663	//   },
43664	//   "scopes": [
43665	//     "https://www.googleapis.com/auth/cloud-platform",
43666	//     "https://www.googleapis.com/auth/compute"
43667	//   ]
43668	// }
43669
43670}
43671
43672// method id "compute.targetPools.setBackup":
43673
43674type TargetPoolsSetBackupCall struct {
43675	s               *Service
43676	project         string
43677	region          string
43678	targetPool      string
43679	targetreference *TargetReference
43680	urlParams_      gensupport.URLParams
43681	ctx_            context.Context
43682}
43683
43684// SetBackup: Changes a backup target pool's configurations.
43685// For details, see https://cloud.google.com/compute/docs/reference/latest/targetPools/setBackup
43686func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall {
43687	c := &TargetPoolsSetBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43688	c.project = project
43689	c.region = region
43690	c.targetPool = targetPool
43691	c.targetreference = targetreference
43692	return c
43693}
43694
43695// FailoverRatio sets the optional parameter "failoverRatio": New
43696// failoverRatio value for the target pool.
43697func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall {
43698	c.urlParams_.Set("failoverRatio", fmt.Sprint(failoverRatio))
43699	return c
43700}
43701
43702// Fields allows partial responses to be retrieved. See
43703// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43704// for more information.
43705func (c *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall {
43706	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43707	return c
43708}
43709
43710// Context sets the context to be used in this call's Do method. Any
43711// pending HTTP request will be aborted if the provided context is
43712// canceled.
43713func (c *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall {
43714	c.ctx_ = ctx
43715	return c
43716}
43717
43718func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) {
43719	var body io.Reader = nil
43720	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
43721	if err != nil {
43722		return nil, err
43723	}
43724	ctype := "application/json"
43725	c.urlParams_.Set("alt", alt)
43726	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup")
43727	urls += "?" + c.urlParams_.Encode()
43728	req, _ := http.NewRequest("POST", urls, body)
43729	googleapi.Expand(req.URL, map[string]string{
43730		"project":    c.project,
43731		"region":     c.region,
43732		"targetPool": c.targetPool,
43733	})
43734	req.Header.Set("Content-Type", ctype)
43735	req.Header.Set("User-Agent", c.s.userAgent())
43736	if c.ctx_ != nil {
43737		return ctxhttp.Do(c.ctx_, c.s.client, req)
43738	}
43739	return c.s.client.Do(req)
43740}
43741
43742// Do executes the "compute.targetPools.setBackup" call.
43743// Exactly one of *Operation or error will be non-nil. Any non-2xx
43744// status code is an error. Response headers are in either
43745// *Operation.ServerResponse.Header or (if a response was returned at
43746// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
43747// to check whether the returned error was because
43748// http.StatusNotModified was returned.
43749func (c *TargetPoolsSetBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
43750	gensupport.SetOptions(c.urlParams_, opts...)
43751	res, err := c.doRequest("json")
43752	if res != nil && res.StatusCode == http.StatusNotModified {
43753		if res.Body != nil {
43754			res.Body.Close()
43755		}
43756		return nil, &googleapi.Error{
43757			Code:   res.StatusCode,
43758			Header: res.Header,
43759		}
43760	}
43761	if err != nil {
43762		return nil, err
43763	}
43764	defer googleapi.CloseBody(res)
43765	if err := googleapi.CheckResponse(res); err != nil {
43766		return nil, err
43767	}
43768	ret := &Operation{
43769		ServerResponse: googleapi.ServerResponse{
43770			Header:         res.Header,
43771			HTTPStatusCode: res.StatusCode,
43772		},
43773	}
43774	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
43775		return nil, err
43776	}
43777	return ret, nil
43778	// {
43779	//   "description": "Changes a backup target pool's configurations.",
43780	//   "httpMethod": "POST",
43781	//   "id": "compute.targetPools.setBackup",
43782	//   "parameterOrder": [
43783	//     "project",
43784	//     "region",
43785	//     "targetPool"
43786	//   ],
43787	//   "parameters": {
43788	//     "failoverRatio": {
43789	//       "description": "New failoverRatio value for the target pool.",
43790	//       "format": "float",
43791	//       "location": "query",
43792	//       "type": "number"
43793	//     },
43794	//     "project": {
43795	//       "description": "Project ID for this request.",
43796	//       "location": "path",
43797	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43798	//       "required": true,
43799	//       "type": "string"
43800	//     },
43801	//     "region": {
43802	//       "description": "Name of the region scoping this request.",
43803	//       "location": "path",
43804	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43805	//       "required": true,
43806	//       "type": "string"
43807	//     },
43808	//     "targetPool": {
43809	//       "description": "Name of the TargetPool resource to set a backup pool for.",
43810	//       "location": "path",
43811	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43812	//       "required": true,
43813	//       "type": "string"
43814	//     }
43815	//   },
43816	//   "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup",
43817	//   "request": {
43818	//     "$ref": "TargetReference"
43819	//   },
43820	//   "response": {
43821	//     "$ref": "Operation"
43822	//   },
43823	//   "scopes": [
43824	//     "https://www.googleapis.com/auth/cloud-platform",
43825	//     "https://www.googleapis.com/auth/compute"
43826	//   ]
43827	// }
43828
43829}
43830
43831// method id "compute.targetPools.testIamPermissions":
43832
43833type TargetPoolsTestIamPermissionsCall struct {
43834	s                      *Service
43835	project                string
43836	region                 string
43837	resource               string
43838	testpermissionsrequest *TestPermissionsRequest
43839	urlParams_             gensupport.URLParams
43840	ctx_                   context.Context
43841}
43842
43843// TestIamPermissions: Returns permissions that a caller has on the
43844// specified resource.
43845func (r *TargetPoolsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetPoolsTestIamPermissionsCall {
43846	c := &TargetPoolsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43847	c.project = project
43848	c.region = region
43849	c.resource = resource
43850	c.testpermissionsrequest = testpermissionsrequest
43851	return c
43852}
43853
43854// Fields allows partial responses to be retrieved. See
43855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
43856// for more information.
43857func (c *TargetPoolsTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetPoolsTestIamPermissionsCall {
43858	c.urlParams_.Set("fields", googleapi.CombineFields(s))
43859	return c
43860}
43861
43862// Context sets the context to be used in this call's Do method. Any
43863// pending HTTP request will be aborted if the provided context is
43864// canceled.
43865func (c *TargetPoolsTestIamPermissionsCall) Context(ctx context.Context) *TargetPoolsTestIamPermissionsCall {
43866	c.ctx_ = ctx
43867	return c
43868}
43869
43870func (c *TargetPoolsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
43871	var body io.Reader = nil
43872	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
43873	if err != nil {
43874		return nil, err
43875	}
43876	ctype := "application/json"
43877	c.urlParams_.Set("alt", alt)
43878	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{resource}/testIamPermissions")
43879	urls += "?" + c.urlParams_.Encode()
43880	req, _ := http.NewRequest("POST", urls, body)
43881	googleapi.Expand(req.URL, map[string]string{
43882		"project":  c.project,
43883		"region":   c.region,
43884		"resource": c.resource,
43885	})
43886	req.Header.Set("Content-Type", ctype)
43887	req.Header.Set("User-Agent", c.s.userAgent())
43888	if c.ctx_ != nil {
43889		return ctxhttp.Do(c.ctx_, c.s.client, req)
43890	}
43891	return c.s.client.Do(req)
43892}
43893
43894// Do executes the "compute.targetPools.testIamPermissions" call.
43895// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
43896// non-2xx status code is an error. Response headers are in either
43897// *TestPermissionsResponse.ServerResponse.Header or (if a response was
43898// returned at all) in error.(*googleapi.Error).Header. Use
43899// googleapi.IsNotModified to check whether the returned error was
43900// because http.StatusNotModified was returned.
43901func (c *TargetPoolsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
43902	gensupport.SetOptions(c.urlParams_, opts...)
43903	res, err := c.doRequest("json")
43904	if res != nil && res.StatusCode == http.StatusNotModified {
43905		if res.Body != nil {
43906			res.Body.Close()
43907		}
43908		return nil, &googleapi.Error{
43909			Code:   res.StatusCode,
43910			Header: res.Header,
43911		}
43912	}
43913	if err != nil {
43914		return nil, err
43915	}
43916	defer googleapi.CloseBody(res)
43917	if err := googleapi.CheckResponse(res); err != nil {
43918		return nil, err
43919	}
43920	ret := &TestPermissionsResponse{
43921		ServerResponse: googleapi.ServerResponse{
43922			Header:         res.Header,
43923			HTTPStatusCode: res.StatusCode,
43924		},
43925	}
43926	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
43927		return nil, err
43928	}
43929	return ret, nil
43930	// {
43931	//   "description": "Returns permissions that a caller has on the specified resource.",
43932	//   "httpMethod": "POST",
43933	//   "id": "compute.targetPools.testIamPermissions",
43934	//   "parameterOrder": [
43935	//     "project",
43936	//     "region",
43937	//     "resource"
43938	//   ],
43939	//   "parameters": {
43940	//     "project": {
43941	//       "description": "Project ID for this request.",
43942	//       "location": "path",
43943	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
43944	//       "required": true,
43945	//       "type": "string"
43946	//     },
43947	//     "region": {
43948	//       "description": "The name of the region for this request.",
43949	//       "location": "path",
43950	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43951	//       "required": true,
43952	//       "type": "string"
43953	//     },
43954	//     "resource": {
43955	//       "description": "Name of the resource for this request.",
43956	//       "location": "path",
43957	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
43958	//       "required": true,
43959	//       "type": "string"
43960	//     }
43961	//   },
43962	//   "path": "{project}/regions/{region}/targetPools/{resource}/testIamPermissions",
43963	//   "request": {
43964	//     "$ref": "TestPermissionsRequest"
43965	//   },
43966	//   "response": {
43967	//     "$ref": "TestPermissionsResponse"
43968	//   },
43969	//   "scopes": [
43970	//     "https://www.googleapis.com/auth/cloud-platform",
43971	//     "https://www.googleapis.com/auth/compute",
43972	//     "https://www.googleapis.com/auth/compute.readonly"
43973	//   ]
43974	// }
43975
43976}
43977
43978// method id "compute.targetVpnGateways.aggregatedList":
43979
43980type TargetVpnGatewaysAggregatedListCall struct {
43981	s            *Service
43982	project      string
43983	urlParams_   gensupport.URLParams
43984	ifNoneMatch_ string
43985	ctx_         context.Context
43986}
43987
43988// AggregatedList: Retrieves an aggregated list of target VPN gateways.
43989func (r *TargetVpnGatewaysService) AggregatedList(project string) *TargetVpnGatewaysAggregatedListCall {
43990	c := &TargetVpnGatewaysAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
43991	c.project = project
43992	return c
43993}
43994
43995// Filter sets the optional parameter "filter": Sets a filter expression
43996// for filtering listed resources, in the form filter={expression}. Your
43997// {expression} must be in the format: field_name comparison_string
43998// literal_string.
43999//
44000// The field_name is the name of the field you want to compare. Only
44001// atomic field types are supported (string, number, boolean). The
44002// comparison_string must be either eq (equals) or ne (not equals). The
44003// literal_string is the string value to filter to. The literal value
44004// must be valid for the type of field you are filtering by (string,
44005// number, boolean). For string fields, the literal value is interpreted
44006// as a regular expression using RE2 syntax. The literal value must
44007// match the entire field.
44008//
44009// For example, to filter for instances that do not have a name of
44010// example-instance, you would use filter=name ne
44011// example-instance.
44012//
44013// Compute Engine Beta API Only: If you use filtering in the Beta API,
44014// you can also filter on nested fields. For example, you could filter
44015// on instances that have set the scheduling.automaticRestart field to
44016// true. In particular, use filtering on nested fields to take advantage
44017// of instance labels to organize and filter results based on label
44018// values.
44019//
44020// The Beta API also supports filtering on multiple expressions by
44021// providing each separate expression within parentheses. For example,
44022// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
44023// Multiple expressions are treated as AND expressions, meaning that
44024// resources must match all expressions to pass the filters.
44025func (c *TargetVpnGatewaysAggregatedListCall) Filter(filter string) *TargetVpnGatewaysAggregatedListCall {
44026	c.urlParams_.Set("filter", filter)
44027	return c
44028}
44029
44030// MaxResults sets the optional parameter "maxResults": The maximum
44031// number of results per page that should be returned. If the number of
44032// available results is larger than maxResults, Compute Engine returns a
44033// nextPageToken that can be used to get the next page of results in
44034// subsequent list requests.
44035func (c *TargetVpnGatewaysAggregatedListCall) MaxResults(maxResults int64) *TargetVpnGatewaysAggregatedListCall {
44036	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
44037	return c
44038}
44039
44040// OrderBy sets the optional parameter "orderBy": Sorts list results by
44041// a certain order. By default, results are returned in alphanumerical
44042// order based on the resource name.
44043//
44044// You can also sort results in descending order based on the creation
44045// timestamp using orderBy="creationTimestamp desc". This sorts results
44046// based on the creationTimestamp field in reverse chronological order
44047// (newest result first). Use this to sort resources like operations so
44048// that the newest operation is returned first.
44049//
44050// Currently, only sorting by name or creationTimestamp desc is
44051// supported.
44052func (c *TargetVpnGatewaysAggregatedListCall) OrderBy(orderBy string) *TargetVpnGatewaysAggregatedListCall {
44053	c.urlParams_.Set("orderBy", orderBy)
44054	return c
44055}
44056
44057// PageToken sets the optional parameter "pageToken": Specifies a page
44058// token to use. Set pageToken to the nextPageToken returned by a
44059// previous list request to get the next page of results.
44060func (c *TargetVpnGatewaysAggregatedListCall) PageToken(pageToken string) *TargetVpnGatewaysAggregatedListCall {
44061	c.urlParams_.Set("pageToken", pageToken)
44062	return c
44063}
44064
44065// Fields allows partial responses to be retrieved. See
44066// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44067// for more information.
44068func (c *TargetVpnGatewaysAggregatedListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysAggregatedListCall {
44069	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44070	return c
44071}
44072
44073// IfNoneMatch sets the optional parameter which makes the operation
44074// fail if the object's ETag matches the given value. This is useful for
44075// getting updates only after the object has changed since the last
44076// request. Use googleapi.IsNotModified to check whether the response
44077// error from Do is the result of In-None-Match.
44078func (c *TargetVpnGatewaysAggregatedListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysAggregatedListCall {
44079	c.ifNoneMatch_ = entityTag
44080	return c
44081}
44082
44083// Context sets the context to be used in this call's Do method. Any
44084// pending HTTP request will be aborted if the provided context is
44085// canceled.
44086func (c *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall {
44087	c.ctx_ = ctx
44088	return c
44089}
44090
44091func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) {
44092	var body io.Reader = nil
44093	c.urlParams_.Set("alt", alt)
44094	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetVpnGateways")
44095	urls += "?" + c.urlParams_.Encode()
44096	req, _ := http.NewRequest("GET", urls, body)
44097	googleapi.Expand(req.URL, map[string]string{
44098		"project": c.project,
44099	})
44100	req.Header.Set("User-Agent", c.s.userAgent())
44101	if c.ifNoneMatch_ != "" {
44102		req.Header.Set("If-None-Match", c.ifNoneMatch_)
44103	}
44104	if c.ctx_ != nil {
44105		return ctxhttp.Do(c.ctx_, c.s.client, req)
44106	}
44107	return c.s.client.Do(req)
44108}
44109
44110// Do executes the "compute.targetVpnGateways.aggregatedList" call.
44111// Exactly one of *TargetVpnGatewayAggregatedList or error will be
44112// non-nil. Any non-2xx status code is an error. Response headers are in
44113// either *TargetVpnGatewayAggregatedList.ServerResponse.Header or (if a
44114// response was returned at all) in error.(*googleapi.Error).Header. Use
44115// googleapi.IsNotModified to check whether the returned error was
44116// because http.StatusNotModified was returned.
44117func (c *TargetVpnGatewaysAggregatedListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayAggregatedList, error) {
44118	gensupport.SetOptions(c.urlParams_, opts...)
44119	res, err := c.doRequest("json")
44120	if res != nil && res.StatusCode == http.StatusNotModified {
44121		if res.Body != nil {
44122			res.Body.Close()
44123		}
44124		return nil, &googleapi.Error{
44125			Code:   res.StatusCode,
44126			Header: res.Header,
44127		}
44128	}
44129	if err != nil {
44130		return nil, err
44131	}
44132	defer googleapi.CloseBody(res)
44133	if err := googleapi.CheckResponse(res); err != nil {
44134		return nil, err
44135	}
44136	ret := &TargetVpnGatewayAggregatedList{
44137		ServerResponse: googleapi.ServerResponse{
44138			Header:         res.Header,
44139			HTTPStatusCode: res.StatusCode,
44140		},
44141	}
44142	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
44143		return nil, err
44144	}
44145	return ret, nil
44146	// {
44147	//   "description": "Retrieves an aggregated list of target VPN gateways.",
44148	//   "httpMethod": "GET",
44149	//   "id": "compute.targetVpnGateways.aggregatedList",
44150	//   "parameterOrder": [
44151	//     "project"
44152	//   ],
44153	//   "parameters": {
44154	//     "filter": {
44155	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
44156	//       "location": "query",
44157	//       "type": "string"
44158	//     },
44159	//     "maxResults": {
44160	//       "default": "500",
44161	//       "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.",
44162	//       "format": "uint32",
44163	//       "location": "query",
44164	//       "maximum": "500",
44165	//       "minimum": "0",
44166	//       "type": "integer"
44167	//     },
44168	//     "orderBy": {
44169	//       "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.",
44170	//       "location": "query",
44171	//       "type": "string"
44172	//     },
44173	//     "pageToken": {
44174	//       "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.",
44175	//       "location": "query",
44176	//       "type": "string"
44177	//     },
44178	//     "project": {
44179	//       "description": "Project ID for this request.",
44180	//       "location": "path",
44181	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44182	//       "required": true,
44183	//       "type": "string"
44184	//     }
44185	//   },
44186	//   "path": "{project}/aggregated/targetVpnGateways",
44187	//   "response": {
44188	//     "$ref": "TargetVpnGatewayAggregatedList"
44189	//   },
44190	//   "scopes": [
44191	//     "https://www.googleapis.com/auth/cloud-platform",
44192	//     "https://www.googleapis.com/auth/compute",
44193	//     "https://www.googleapis.com/auth/compute.readonly"
44194	//   ]
44195	// }
44196
44197}
44198
44199// Pages invokes f for each page of results.
44200// A non-nil error returned from f will halt the iteration.
44201// The provided context supersedes any context provided to the Context method.
44202func (c *TargetVpnGatewaysAggregatedListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayAggregatedList) error) error {
44203	c.ctx_ = ctx
44204	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44205	for {
44206		x, err := c.Do()
44207		if err != nil {
44208			return err
44209		}
44210		if err := f(x); err != nil {
44211			return err
44212		}
44213		if x.NextPageToken == "" {
44214			return nil
44215		}
44216		c.PageToken(x.NextPageToken)
44217	}
44218}
44219
44220// method id "compute.targetVpnGateways.delete":
44221
44222type TargetVpnGatewaysDeleteCall struct {
44223	s                *Service
44224	project          string
44225	region           string
44226	targetVpnGateway string
44227	urlParams_       gensupport.URLParams
44228	ctx_             context.Context
44229}
44230
44231// Delete: Deletes the specified target VPN gateway.
44232func (r *TargetVpnGatewaysService) Delete(project string, region string, targetVpnGateway string) *TargetVpnGatewaysDeleteCall {
44233	c := &TargetVpnGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44234	c.project = project
44235	c.region = region
44236	c.targetVpnGateway = targetVpnGateway
44237	return c
44238}
44239
44240// Fields allows partial responses to be retrieved. See
44241// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44242// for more information.
44243func (c *TargetVpnGatewaysDeleteCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysDeleteCall {
44244	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44245	return c
44246}
44247
44248// Context sets the context to be used in this call's Do method. Any
44249// pending HTTP request will be aborted if the provided context is
44250// canceled.
44251func (c *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall {
44252	c.ctx_ = ctx
44253	return c
44254}
44255
44256func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
44257	var body io.Reader = nil
44258	c.urlParams_.Set("alt", alt)
44259	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}")
44260	urls += "?" + c.urlParams_.Encode()
44261	req, _ := http.NewRequest("DELETE", urls, body)
44262	googleapi.Expand(req.URL, map[string]string{
44263		"project":          c.project,
44264		"region":           c.region,
44265		"targetVpnGateway": c.targetVpnGateway,
44266	})
44267	req.Header.Set("User-Agent", c.s.userAgent())
44268	if c.ctx_ != nil {
44269		return ctxhttp.Do(c.ctx_, c.s.client, req)
44270	}
44271	return c.s.client.Do(req)
44272}
44273
44274// Do executes the "compute.targetVpnGateways.delete" call.
44275// Exactly one of *Operation or error will be non-nil. Any non-2xx
44276// status code is an error. Response headers are in either
44277// *Operation.ServerResponse.Header or (if a response was returned at
44278// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44279// to check whether the returned error was because
44280// http.StatusNotModified was returned.
44281func (c *TargetVpnGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
44282	gensupport.SetOptions(c.urlParams_, opts...)
44283	res, err := c.doRequest("json")
44284	if res != nil && res.StatusCode == http.StatusNotModified {
44285		if res.Body != nil {
44286			res.Body.Close()
44287		}
44288		return nil, &googleapi.Error{
44289			Code:   res.StatusCode,
44290			Header: res.Header,
44291		}
44292	}
44293	if err != nil {
44294		return nil, err
44295	}
44296	defer googleapi.CloseBody(res)
44297	if err := googleapi.CheckResponse(res); err != nil {
44298		return nil, err
44299	}
44300	ret := &Operation{
44301		ServerResponse: googleapi.ServerResponse{
44302			Header:         res.Header,
44303			HTTPStatusCode: res.StatusCode,
44304		},
44305	}
44306	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
44307		return nil, err
44308	}
44309	return ret, nil
44310	// {
44311	//   "description": "Deletes the specified target VPN gateway.",
44312	//   "httpMethod": "DELETE",
44313	//   "id": "compute.targetVpnGateways.delete",
44314	//   "parameterOrder": [
44315	//     "project",
44316	//     "region",
44317	//     "targetVpnGateway"
44318	//   ],
44319	//   "parameters": {
44320	//     "project": {
44321	//       "description": "Project ID for this request.",
44322	//       "location": "path",
44323	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44324	//       "required": true,
44325	//       "type": "string"
44326	//     },
44327	//     "region": {
44328	//       "description": "Name of the region for this request.",
44329	//       "location": "path",
44330	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44331	//       "required": true,
44332	//       "type": "string"
44333	//     },
44334	//     "targetVpnGateway": {
44335	//       "description": "Name of the target VPN gateway to delete.",
44336	//       "location": "path",
44337	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44338	//       "required": true,
44339	//       "type": "string"
44340	//     }
44341	//   },
44342	//   "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}",
44343	//   "response": {
44344	//     "$ref": "Operation"
44345	//   },
44346	//   "scopes": [
44347	//     "https://www.googleapis.com/auth/cloud-platform",
44348	//     "https://www.googleapis.com/auth/compute"
44349	//   ]
44350	// }
44351
44352}
44353
44354// method id "compute.targetVpnGateways.get":
44355
44356type TargetVpnGatewaysGetCall struct {
44357	s                *Service
44358	project          string
44359	region           string
44360	targetVpnGateway string
44361	urlParams_       gensupport.URLParams
44362	ifNoneMatch_     string
44363	ctx_             context.Context
44364}
44365
44366// Get: Returns the specified target VPN gateway. Get a list of
44367// available target VPN gateways by making a list() request.
44368func (r *TargetVpnGatewaysService) Get(project string, region string, targetVpnGateway string) *TargetVpnGatewaysGetCall {
44369	c := &TargetVpnGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44370	c.project = project
44371	c.region = region
44372	c.targetVpnGateway = targetVpnGateway
44373	return c
44374}
44375
44376// Fields allows partial responses to be retrieved. See
44377// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44378// for more information.
44379func (c *TargetVpnGatewaysGetCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysGetCall {
44380	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44381	return c
44382}
44383
44384// IfNoneMatch sets the optional parameter which makes the operation
44385// fail if the object's ETag matches the given value. This is useful for
44386// getting updates only after the object has changed since the last
44387// request. Use googleapi.IsNotModified to check whether the response
44388// error from Do is the result of In-None-Match.
44389func (c *TargetVpnGatewaysGetCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysGetCall {
44390	c.ifNoneMatch_ = entityTag
44391	return c
44392}
44393
44394// Context sets the context to be used in this call's Do method. Any
44395// pending HTTP request will be aborted if the provided context is
44396// canceled.
44397func (c *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall {
44398	c.ctx_ = ctx
44399	return c
44400}
44401
44402func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
44403	var body io.Reader = nil
44404	c.urlParams_.Set("alt", alt)
44405	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}")
44406	urls += "?" + c.urlParams_.Encode()
44407	req, _ := http.NewRequest("GET", urls, body)
44408	googleapi.Expand(req.URL, map[string]string{
44409		"project":          c.project,
44410		"region":           c.region,
44411		"targetVpnGateway": c.targetVpnGateway,
44412	})
44413	req.Header.Set("User-Agent", c.s.userAgent())
44414	if c.ifNoneMatch_ != "" {
44415		req.Header.Set("If-None-Match", c.ifNoneMatch_)
44416	}
44417	if c.ctx_ != nil {
44418		return ctxhttp.Do(c.ctx_, c.s.client, req)
44419	}
44420	return c.s.client.Do(req)
44421}
44422
44423// Do executes the "compute.targetVpnGateways.get" call.
44424// Exactly one of *TargetVpnGateway or error will be non-nil. Any
44425// non-2xx status code is an error. Response headers are in either
44426// *TargetVpnGateway.ServerResponse.Header or (if a response was
44427// returned at all) in error.(*googleapi.Error).Header. Use
44428// googleapi.IsNotModified to check whether the returned error was
44429// because http.StatusNotModified was returned.
44430func (c *TargetVpnGatewaysGetCall) Do(opts ...googleapi.CallOption) (*TargetVpnGateway, error) {
44431	gensupport.SetOptions(c.urlParams_, opts...)
44432	res, err := c.doRequest("json")
44433	if res != nil && res.StatusCode == http.StatusNotModified {
44434		if res.Body != nil {
44435			res.Body.Close()
44436		}
44437		return nil, &googleapi.Error{
44438			Code:   res.StatusCode,
44439			Header: res.Header,
44440		}
44441	}
44442	if err != nil {
44443		return nil, err
44444	}
44445	defer googleapi.CloseBody(res)
44446	if err := googleapi.CheckResponse(res); err != nil {
44447		return nil, err
44448	}
44449	ret := &TargetVpnGateway{
44450		ServerResponse: googleapi.ServerResponse{
44451			Header:         res.Header,
44452			HTTPStatusCode: res.StatusCode,
44453		},
44454	}
44455	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
44456		return nil, err
44457	}
44458	return ret, nil
44459	// {
44460	//   "description": "Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request.",
44461	//   "httpMethod": "GET",
44462	//   "id": "compute.targetVpnGateways.get",
44463	//   "parameterOrder": [
44464	//     "project",
44465	//     "region",
44466	//     "targetVpnGateway"
44467	//   ],
44468	//   "parameters": {
44469	//     "project": {
44470	//       "description": "Project ID for this request.",
44471	//       "location": "path",
44472	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44473	//       "required": true,
44474	//       "type": "string"
44475	//     },
44476	//     "region": {
44477	//       "description": "Name of the region for this request.",
44478	//       "location": "path",
44479	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44480	//       "required": true,
44481	//       "type": "string"
44482	//     },
44483	//     "targetVpnGateway": {
44484	//       "description": "Name of the target VPN gateway to return.",
44485	//       "location": "path",
44486	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44487	//       "required": true,
44488	//       "type": "string"
44489	//     }
44490	//   },
44491	//   "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}",
44492	//   "response": {
44493	//     "$ref": "TargetVpnGateway"
44494	//   },
44495	//   "scopes": [
44496	//     "https://www.googleapis.com/auth/cloud-platform",
44497	//     "https://www.googleapis.com/auth/compute",
44498	//     "https://www.googleapis.com/auth/compute.readonly"
44499	//   ]
44500	// }
44501
44502}
44503
44504// method id "compute.targetVpnGateways.insert":
44505
44506type TargetVpnGatewaysInsertCall struct {
44507	s                *Service
44508	project          string
44509	region           string
44510	targetvpngateway *TargetVpnGateway
44511	urlParams_       gensupport.URLParams
44512	ctx_             context.Context
44513}
44514
44515// Insert: Creates a target VPN gateway in the specified project and
44516// region using the data included in the request.
44517func (r *TargetVpnGatewaysService) Insert(project string, region string, targetvpngateway *TargetVpnGateway) *TargetVpnGatewaysInsertCall {
44518	c := &TargetVpnGatewaysInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44519	c.project = project
44520	c.region = region
44521	c.targetvpngateway = targetvpngateway
44522	return c
44523}
44524
44525// Fields allows partial responses to be retrieved. See
44526// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44527// for more information.
44528func (c *TargetVpnGatewaysInsertCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysInsertCall {
44529	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44530	return c
44531}
44532
44533// Context sets the context to be used in this call's Do method. Any
44534// pending HTTP request will be aborted if the provided context is
44535// canceled.
44536func (c *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall {
44537	c.ctx_ = ctx
44538	return c
44539}
44540
44541func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) {
44542	var body io.Reader = nil
44543	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetvpngateway)
44544	if err != nil {
44545		return nil, err
44546	}
44547	ctype := "application/json"
44548	c.urlParams_.Set("alt", alt)
44549	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways")
44550	urls += "?" + c.urlParams_.Encode()
44551	req, _ := http.NewRequest("POST", urls, body)
44552	googleapi.Expand(req.URL, map[string]string{
44553		"project": c.project,
44554		"region":  c.region,
44555	})
44556	req.Header.Set("Content-Type", ctype)
44557	req.Header.Set("User-Agent", c.s.userAgent())
44558	if c.ctx_ != nil {
44559		return ctxhttp.Do(c.ctx_, c.s.client, req)
44560	}
44561	return c.s.client.Do(req)
44562}
44563
44564// Do executes the "compute.targetVpnGateways.insert" call.
44565// Exactly one of *Operation or error will be non-nil. Any non-2xx
44566// status code is an error. Response headers are in either
44567// *Operation.ServerResponse.Header or (if a response was returned at
44568// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
44569// to check whether the returned error was because
44570// http.StatusNotModified was returned.
44571func (c *TargetVpnGatewaysInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
44572	gensupport.SetOptions(c.urlParams_, opts...)
44573	res, err := c.doRequest("json")
44574	if res != nil && res.StatusCode == http.StatusNotModified {
44575		if res.Body != nil {
44576			res.Body.Close()
44577		}
44578		return nil, &googleapi.Error{
44579			Code:   res.StatusCode,
44580			Header: res.Header,
44581		}
44582	}
44583	if err != nil {
44584		return nil, err
44585	}
44586	defer googleapi.CloseBody(res)
44587	if err := googleapi.CheckResponse(res); err != nil {
44588		return nil, err
44589	}
44590	ret := &Operation{
44591		ServerResponse: googleapi.ServerResponse{
44592			Header:         res.Header,
44593			HTTPStatusCode: res.StatusCode,
44594		},
44595	}
44596	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
44597		return nil, err
44598	}
44599	return ret, nil
44600	// {
44601	//   "description": "Creates a target VPN gateway in the specified project and region using the data included in the request.",
44602	//   "httpMethod": "POST",
44603	//   "id": "compute.targetVpnGateways.insert",
44604	//   "parameterOrder": [
44605	//     "project",
44606	//     "region"
44607	//   ],
44608	//   "parameters": {
44609	//     "project": {
44610	//       "description": "Project ID for this request.",
44611	//       "location": "path",
44612	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44613	//       "required": true,
44614	//       "type": "string"
44615	//     },
44616	//     "region": {
44617	//       "description": "Name of the region for this request.",
44618	//       "location": "path",
44619	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44620	//       "required": true,
44621	//       "type": "string"
44622	//     }
44623	//   },
44624	//   "path": "{project}/regions/{region}/targetVpnGateways",
44625	//   "request": {
44626	//     "$ref": "TargetVpnGateway"
44627	//   },
44628	//   "response": {
44629	//     "$ref": "Operation"
44630	//   },
44631	//   "scopes": [
44632	//     "https://www.googleapis.com/auth/cloud-platform",
44633	//     "https://www.googleapis.com/auth/compute"
44634	//   ]
44635	// }
44636
44637}
44638
44639// method id "compute.targetVpnGateways.list":
44640
44641type TargetVpnGatewaysListCall struct {
44642	s            *Service
44643	project      string
44644	region       string
44645	urlParams_   gensupport.URLParams
44646	ifNoneMatch_ string
44647	ctx_         context.Context
44648}
44649
44650// List: Retrieves a list of target VPN gateways available to the
44651// specified project and region.
44652func (r *TargetVpnGatewaysService) List(project string, region string) *TargetVpnGatewaysListCall {
44653	c := &TargetVpnGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44654	c.project = project
44655	c.region = region
44656	return c
44657}
44658
44659// Filter sets the optional parameter "filter": Sets a filter expression
44660// for filtering listed resources, in the form filter={expression}. Your
44661// {expression} must be in the format: field_name comparison_string
44662// literal_string.
44663//
44664// The field_name is the name of the field you want to compare. Only
44665// atomic field types are supported (string, number, boolean). The
44666// comparison_string must be either eq (equals) or ne (not equals). The
44667// literal_string is the string value to filter to. The literal value
44668// must be valid for the type of field you are filtering by (string,
44669// number, boolean). For string fields, the literal value is interpreted
44670// as a regular expression using RE2 syntax. The literal value must
44671// match the entire field.
44672//
44673// For example, to filter for instances that do not have a name of
44674// example-instance, you would use filter=name ne
44675// example-instance.
44676//
44677// Compute Engine Beta API Only: If you use filtering in the Beta API,
44678// you can also filter on nested fields. For example, you could filter
44679// on instances that have set the scheduling.automaticRestart field to
44680// true. In particular, use filtering on nested fields to take advantage
44681// of instance labels to organize and filter results based on label
44682// values.
44683//
44684// The Beta API also supports filtering on multiple expressions by
44685// providing each separate expression within parentheses. For example,
44686// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
44687// Multiple expressions are treated as AND expressions, meaning that
44688// resources must match all expressions to pass the filters.
44689func (c *TargetVpnGatewaysListCall) Filter(filter string) *TargetVpnGatewaysListCall {
44690	c.urlParams_.Set("filter", filter)
44691	return c
44692}
44693
44694// MaxResults sets the optional parameter "maxResults": The maximum
44695// number of results per page that should be returned. If the number of
44696// available results is larger than maxResults, Compute Engine returns a
44697// nextPageToken that can be used to get the next page of results in
44698// subsequent list requests.
44699func (c *TargetVpnGatewaysListCall) MaxResults(maxResults int64) *TargetVpnGatewaysListCall {
44700	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
44701	return c
44702}
44703
44704// OrderBy sets the optional parameter "orderBy": Sorts list results by
44705// a certain order. By default, results are returned in alphanumerical
44706// order based on the resource name.
44707//
44708// You can also sort results in descending order based on the creation
44709// timestamp using orderBy="creationTimestamp desc". This sorts results
44710// based on the creationTimestamp field in reverse chronological order
44711// (newest result first). Use this to sort resources like operations so
44712// that the newest operation is returned first.
44713//
44714// Currently, only sorting by name or creationTimestamp desc is
44715// supported.
44716func (c *TargetVpnGatewaysListCall) OrderBy(orderBy string) *TargetVpnGatewaysListCall {
44717	c.urlParams_.Set("orderBy", orderBy)
44718	return c
44719}
44720
44721// PageToken sets the optional parameter "pageToken": Specifies a page
44722// token to use. Set pageToken to the nextPageToken returned by a
44723// previous list request to get the next page of results.
44724func (c *TargetVpnGatewaysListCall) PageToken(pageToken string) *TargetVpnGatewaysListCall {
44725	c.urlParams_.Set("pageToken", pageToken)
44726	return c
44727}
44728
44729// Fields allows partial responses to be retrieved. See
44730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44731// for more information.
44732func (c *TargetVpnGatewaysListCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysListCall {
44733	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44734	return c
44735}
44736
44737// IfNoneMatch sets the optional parameter which makes the operation
44738// fail if the object's ETag matches the given value. This is useful for
44739// getting updates only after the object has changed since the last
44740// request. Use googleapi.IsNotModified to check whether the response
44741// error from Do is the result of In-None-Match.
44742func (c *TargetVpnGatewaysListCall) IfNoneMatch(entityTag string) *TargetVpnGatewaysListCall {
44743	c.ifNoneMatch_ = entityTag
44744	return c
44745}
44746
44747// Context sets the context to be used in this call's Do method. Any
44748// pending HTTP request will be aborted if the provided context is
44749// canceled.
44750func (c *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall {
44751	c.ctx_ = ctx
44752	return c
44753}
44754
44755func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) {
44756	var body io.Reader = nil
44757	c.urlParams_.Set("alt", alt)
44758	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways")
44759	urls += "?" + c.urlParams_.Encode()
44760	req, _ := http.NewRequest("GET", urls, body)
44761	googleapi.Expand(req.URL, map[string]string{
44762		"project": c.project,
44763		"region":  c.region,
44764	})
44765	req.Header.Set("User-Agent", c.s.userAgent())
44766	if c.ifNoneMatch_ != "" {
44767		req.Header.Set("If-None-Match", c.ifNoneMatch_)
44768	}
44769	if c.ctx_ != nil {
44770		return ctxhttp.Do(c.ctx_, c.s.client, req)
44771	}
44772	return c.s.client.Do(req)
44773}
44774
44775// Do executes the "compute.targetVpnGateways.list" call.
44776// Exactly one of *TargetVpnGatewayList or error will be non-nil. Any
44777// non-2xx status code is an error. Response headers are in either
44778// *TargetVpnGatewayList.ServerResponse.Header or (if a response was
44779// returned at all) in error.(*googleapi.Error).Header. Use
44780// googleapi.IsNotModified to check whether the returned error was
44781// because http.StatusNotModified was returned.
44782func (c *TargetVpnGatewaysListCall) Do(opts ...googleapi.CallOption) (*TargetVpnGatewayList, error) {
44783	gensupport.SetOptions(c.urlParams_, opts...)
44784	res, err := c.doRequest("json")
44785	if res != nil && res.StatusCode == http.StatusNotModified {
44786		if res.Body != nil {
44787			res.Body.Close()
44788		}
44789		return nil, &googleapi.Error{
44790			Code:   res.StatusCode,
44791			Header: res.Header,
44792		}
44793	}
44794	if err != nil {
44795		return nil, err
44796	}
44797	defer googleapi.CloseBody(res)
44798	if err := googleapi.CheckResponse(res); err != nil {
44799		return nil, err
44800	}
44801	ret := &TargetVpnGatewayList{
44802		ServerResponse: googleapi.ServerResponse{
44803			Header:         res.Header,
44804			HTTPStatusCode: res.StatusCode,
44805		},
44806	}
44807	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
44808		return nil, err
44809	}
44810	return ret, nil
44811	// {
44812	//   "description": "Retrieves a list of target VPN gateways available to the specified project and region.",
44813	//   "httpMethod": "GET",
44814	//   "id": "compute.targetVpnGateways.list",
44815	//   "parameterOrder": [
44816	//     "project",
44817	//     "region"
44818	//   ],
44819	//   "parameters": {
44820	//     "filter": {
44821	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
44822	//       "location": "query",
44823	//       "type": "string"
44824	//     },
44825	//     "maxResults": {
44826	//       "default": "500",
44827	//       "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.",
44828	//       "format": "uint32",
44829	//       "location": "query",
44830	//       "maximum": "500",
44831	//       "minimum": "0",
44832	//       "type": "integer"
44833	//     },
44834	//     "orderBy": {
44835	//       "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.",
44836	//       "location": "query",
44837	//       "type": "string"
44838	//     },
44839	//     "pageToken": {
44840	//       "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.",
44841	//       "location": "query",
44842	//       "type": "string"
44843	//     },
44844	//     "project": {
44845	//       "description": "Project ID for this request.",
44846	//       "location": "path",
44847	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
44848	//       "required": true,
44849	//       "type": "string"
44850	//     },
44851	//     "region": {
44852	//       "description": "Name of the region for this request.",
44853	//       "location": "path",
44854	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
44855	//       "required": true,
44856	//       "type": "string"
44857	//     }
44858	//   },
44859	//   "path": "{project}/regions/{region}/targetVpnGateways",
44860	//   "response": {
44861	//     "$ref": "TargetVpnGatewayList"
44862	//   },
44863	//   "scopes": [
44864	//     "https://www.googleapis.com/auth/cloud-platform",
44865	//     "https://www.googleapis.com/auth/compute",
44866	//     "https://www.googleapis.com/auth/compute.readonly"
44867	//   ]
44868	// }
44869
44870}
44871
44872// Pages invokes f for each page of results.
44873// A non-nil error returned from f will halt the iteration.
44874// The provided context supersedes any context provided to the Context method.
44875func (c *TargetVpnGatewaysListCall) Pages(ctx context.Context, f func(*TargetVpnGatewayList) error) error {
44876	c.ctx_ = ctx
44877	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
44878	for {
44879		x, err := c.Do()
44880		if err != nil {
44881			return err
44882		}
44883		if err := f(x); err != nil {
44884			return err
44885		}
44886		if x.NextPageToken == "" {
44887			return nil
44888		}
44889		c.PageToken(x.NextPageToken)
44890	}
44891}
44892
44893// method id "compute.targetVpnGateways.testIamPermissions":
44894
44895type TargetVpnGatewaysTestIamPermissionsCall struct {
44896	s                      *Service
44897	project                string
44898	region                 string
44899	resource               string
44900	testpermissionsrequest *TestPermissionsRequest
44901	urlParams_             gensupport.URLParams
44902	ctx_                   context.Context
44903}
44904
44905// TestIamPermissions: Returns permissions that a caller has on the
44906// specified resource.
44907func (r *TargetVpnGatewaysService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *TargetVpnGatewaysTestIamPermissionsCall {
44908	c := &TargetVpnGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
44909	c.project = project
44910	c.region = region
44911	c.resource = resource
44912	c.testpermissionsrequest = testpermissionsrequest
44913	return c
44914}
44915
44916// Fields allows partial responses to be retrieved. See
44917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
44918// for more information.
44919func (c *TargetVpnGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *TargetVpnGatewaysTestIamPermissionsCall {
44920	c.urlParams_.Set("fields", googleapi.CombineFields(s))
44921	return c
44922}
44923
44924// Context sets the context to be used in this call's Do method. Any
44925// pending HTTP request will be aborted if the provided context is
44926// canceled.
44927func (c *TargetVpnGatewaysTestIamPermissionsCall) Context(ctx context.Context) *TargetVpnGatewaysTestIamPermissionsCall {
44928	c.ctx_ = ctx
44929	return c
44930}
44931
44932func (c *TargetVpnGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
44933	var body io.Reader = nil
44934	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
44935	if err != nil {
44936		return nil, err
44937	}
44938	ctype := "application/json"
44939	c.urlParams_.Set("alt", alt)
44940	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions")
44941	urls += "?" + c.urlParams_.Encode()
44942	req, _ := http.NewRequest("POST", urls, body)
44943	googleapi.Expand(req.URL, map[string]string{
44944		"project":  c.project,
44945		"region":   c.region,
44946		"resource": c.resource,
44947	})
44948	req.Header.Set("Content-Type", ctype)
44949	req.Header.Set("User-Agent", c.s.userAgent())
44950	if c.ctx_ != nil {
44951		return ctxhttp.Do(c.ctx_, c.s.client, req)
44952	}
44953	return c.s.client.Do(req)
44954}
44955
44956// Do executes the "compute.targetVpnGateways.testIamPermissions" call.
44957// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
44958// non-2xx status code is an error. Response headers are in either
44959// *TestPermissionsResponse.ServerResponse.Header or (if a response was
44960// returned at all) in error.(*googleapi.Error).Header. Use
44961// googleapi.IsNotModified to check whether the returned error was
44962// because http.StatusNotModified was returned.
44963func (c *TargetVpnGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
44964	gensupport.SetOptions(c.urlParams_, opts...)
44965	res, err := c.doRequest("json")
44966	if res != nil && res.StatusCode == http.StatusNotModified {
44967		if res.Body != nil {
44968			res.Body.Close()
44969		}
44970		return nil, &googleapi.Error{
44971			Code:   res.StatusCode,
44972			Header: res.Header,
44973		}
44974	}
44975	if err != nil {
44976		return nil, err
44977	}
44978	defer googleapi.CloseBody(res)
44979	if err := googleapi.CheckResponse(res); err != nil {
44980		return nil, err
44981	}
44982	ret := &TestPermissionsResponse{
44983		ServerResponse: googleapi.ServerResponse{
44984			Header:         res.Header,
44985			HTTPStatusCode: res.StatusCode,
44986		},
44987	}
44988	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
44989		return nil, err
44990	}
44991	return ret, nil
44992	// {
44993	//   "description": "Returns permissions that a caller has on the specified resource.",
44994	//   "httpMethod": "POST",
44995	//   "id": "compute.targetVpnGateways.testIamPermissions",
44996	//   "parameterOrder": [
44997	//     "project",
44998	//     "region",
44999	//     "resource"
45000	//   ],
45001	//   "parameters": {
45002	//     "project": {
45003	//       "description": "Project ID for this request.",
45004	//       "location": "path",
45005	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45006	//       "required": true,
45007	//       "type": "string"
45008	//     },
45009	//     "region": {
45010	//       "description": "The name of the region for this request.",
45011	//       "location": "path",
45012	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45013	//       "required": true,
45014	//       "type": "string"
45015	//     },
45016	//     "resource": {
45017	//       "description": "Name of the resource for this request.",
45018	//       "location": "path",
45019	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45020	//       "required": true,
45021	//       "type": "string"
45022	//     }
45023	//   },
45024	//   "path": "{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions",
45025	//   "request": {
45026	//     "$ref": "TestPermissionsRequest"
45027	//   },
45028	//   "response": {
45029	//     "$ref": "TestPermissionsResponse"
45030	//   },
45031	//   "scopes": [
45032	//     "https://www.googleapis.com/auth/cloud-platform",
45033	//     "https://www.googleapis.com/auth/compute",
45034	//     "https://www.googleapis.com/auth/compute.readonly"
45035	//   ]
45036	// }
45037
45038}
45039
45040// method id "compute.urlMaps.delete":
45041
45042type UrlMapsDeleteCall struct {
45043	s          *Service
45044	project    string
45045	urlMap     string
45046	urlParams_ gensupport.URLParams
45047	ctx_       context.Context
45048}
45049
45050// Delete: Deletes the specified UrlMap resource.
45051// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/delete
45052func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall {
45053	c := &UrlMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45054	c.project = project
45055	c.urlMap = urlMap
45056	return c
45057}
45058
45059// Fields allows partial responses to be retrieved. See
45060// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45061// for more information.
45062func (c *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall {
45063	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45064	return c
45065}
45066
45067// Context sets the context to be used in this call's Do method. Any
45068// pending HTTP request will be aborted if the provided context is
45069// canceled.
45070func (c *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall {
45071	c.ctx_ = ctx
45072	return c
45073}
45074
45075func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) {
45076	var body io.Reader = nil
45077	c.urlParams_.Set("alt", alt)
45078	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
45079	urls += "?" + c.urlParams_.Encode()
45080	req, _ := http.NewRequest("DELETE", urls, body)
45081	googleapi.Expand(req.URL, map[string]string{
45082		"project": c.project,
45083		"urlMap":  c.urlMap,
45084	})
45085	req.Header.Set("User-Agent", c.s.userAgent())
45086	if c.ctx_ != nil {
45087		return ctxhttp.Do(c.ctx_, c.s.client, req)
45088	}
45089	return c.s.client.Do(req)
45090}
45091
45092// Do executes the "compute.urlMaps.delete" call.
45093// Exactly one of *Operation or error will be non-nil. Any non-2xx
45094// status code is an error. Response headers are in either
45095// *Operation.ServerResponse.Header or (if a response was returned at
45096// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45097// to check whether the returned error was because
45098// http.StatusNotModified was returned.
45099func (c *UrlMapsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
45100	gensupport.SetOptions(c.urlParams_, opts...)
45101	res, err := c.doRequest("json")
45102	if res != nil && res.StatusCode == http.StatusNotModified {
45103		if res.Body != nil {
45104			res.Body.Close()
45105		}
45106		return nil, &googleapi.Error{
45107			Code:   res.StatusCode,
45108			Header: res.Header,
45109		}
45110	}
45111	if err != nil {
45112		return nil, err
45113	}
45114	defer googleapi.CloseBody(res)
45115	if err := googleapi.CheckResponse(res); err != nil {
45116		return nil, err
45117	}
45118	ret := &Operation{
45119		ServerResponse: googleapi.ServerResponse{
45120			Header:         res.Header,
45121			HTTPStatusCode: res.StatusCode,
45122		},
45123	}
45124	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
45125		return nil, err
45126	}
45127	return ret, nil
45128	// {
45129	//   "description": "Deletes the specified UrlMap resource.",
45130	//   "httpMethod": "DELETE",
45131	//   "id": "compute.urlMaps.delete",
45132	//   "parameterOrder": [
45133	//     "project",
45134	//     "urlMap"
45135	//   ],
45136	//   "parameters": {
45137	//     "project": {
45138	//       "description": "Project ID for this request.",
45139	//       "location": "path",
45140	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45141	//       "required": true,
45142	//       "type": "string"
45143	//     },
45144	//     "urlMap": {
45145	//       "description": "Name of the UrlMap resource to delete.",
45146	//       "location": "path",
45147	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45148	//       "required": true,
45149	//       "type": "string"
45150	//     }
45151	//   },
45152	//   "path": "{project}/global/urlMaps/{urlMap}",
45153	//   "response": {
45154	//     "$ref": "Operation"
45155	//   },
45156	//   "scopes": [
45157	//     "https://www.googleapis.com/auth/cloud-platform",
45158	//     "https://www.googleapis.com/auth/compute"
45159	//   ]
45160	// }
45161
45162}
45163
45164// method id "compute.urlMaps.get":
45165
45166type UrlMapsGetCall struct {
45167	s            *Service
45168	project      string
45169	urlMap       string
45170	urlParams_   gensupport.URLParams
45171	ifNoneMatch_ string
45172	ctx_         context.Context
45173}
45174
45175// Get: Returns the specified UrlMap resource. Get a list of available
45176// URL maps by making a list() request.
45177// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/get
45178func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall {
45179	c := &UrlMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45180	c.project = project
45181	c.urlMap = urlMap
45182	return c
45183}
45184
45185// Fields allows partial responses to be retrieved. See
45186// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45187// for more information.
45188func (c *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall {
45189	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45190	return c
45191}
45192
45193// IfNoneMatch sets the optional parameter which makes the operation
45194// fail if the object's ETag matches the given value. This is useful for
45195// getting updates only after the object has changed since the last
45196// request. Use googleapi.IsNotModified to check whether the response
45197// error from Do is the result of In-None-Match.
45198func (c *UrlMapsGetCall) IfNoneMatch(entityTag string) *UrlMapsGetCall {
45199	c.ifNoneMatch_ = entityTag
45200	return c
45201}
45202
45203// Context sets the context to be used in this call's Do method. Any
45204// pending HTTP request will be aborted if the provided context is
45205// canceled.
45206func (c *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall {
45207	c.ctx_ = ctx
45208	return c
45209}
45210
45211func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) {
45212	var body io.Reader = nil
45213	c.urlParams_.Set("alt", alt)
45214	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
45215	urls += "?" + c.urlParams_.Encode()
45216	req, _ := http.NewRequest("GET", urls, body)
45217	googleapi.Expand(req.URL, map[string]string{
45218		"project": c.project,
45219		"urlMap":  c.urlMap,
45220	})
45221	req.Header.Set("User-Agent", c.s.userAgent())
45222	if c.ifNoneMatch_ != "" {
45223		req.Header.Set("If-None-Match", c.ifNoneMatch_)
45224	}
45225	if c.ctx_ != nil {
45226		return ctxhttp.Do(c.ctx_, c.s.client, req)
45227	}
45228	return c.s.client.Do(req)
45229}
45230
45231// Do executes the "compute.urlMaps.get" call.
45232// Exactly one of *UrlMap or error will be non-nil. Any non-2xx status
45233// code is an error. Response headers are in either
45234// *UrlMap.ServerResponse.Header or (if a response was returned at all)
45235// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
45236// check whether the returned error was because http.StatusNotModified
45237// was returned.
45238func (c *UrlMapsGetCall) Do(opts ...googleapi.CallOption) (*UrlMap, error) {
45239	gensupport.SetOptions(c.urlParams_, opts...)
45240	res, err := c.doRequest("json")
45241	if res != nil && res.StatusCode == http.StatusNotModified {
45242		if res.Body != nil {
45243			res.Body.Close()
45244		}
45245		return nil, &googleapi.Error{
45246			Code:   res.StatusCode,
45247			Header: res.Header,
45248		}
45249	}
45250	if err != nil {
45251		return nil, err
45252	}
45253	defer googleapi.CloseBody(res)
45254	if err := googleapi.CheckResponse(res); err != nil {
45255		return nil, err
45256	}
45257	ret := &UrlMap{
45258		ServerResponse: googleapi.ServerResponse{
45259			Header:         res.Header,
45260			HTTPStatusCode: res.StatusCode,
45261		},
45262	}
45263	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
45264		return nil, err
45265	}
45266	return ret, nil
45267	// {
45268	//   "description": "Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request.",
45269	//   "httpMethod": "GET",
45270	//   "id": "compute.urlMaps.get",
45271	//   "parameterOrder": [
45272	//     "project",
45273	//     "urlMap"
45274	//   ],
45275	//   "parameters": {
45276	//     "project": {
45277	//       "description": "Project ID for this request.",
45278	//       "location": "path",
45279	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45280	//       "required": true,
45281	//       "type": "string"
45282	//     },
45283	//     "urlMap": {
45284	//       "description": "Name of the UrlMap resource to return.",
45285	//       "location": "path",
45286	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45287	//       "required": true,
45288	//       "type": "string"
45289	//     }
45290	//   },
45291	//   "path": "{project}/global/urlMaps/{urlMap}",
45292	//   "response": {
45293	//     "$ref": "UrlMap"
45294	//   },
45295	//   "scopes": [
45296	//     "https://www.googleapis.com/auth/cloud-platform",
45297	//     "https://www.googleapis.com/auth/compute",
45298	//     "https://www.googleapis.com/auth/compute.readonly"
45299	//   ]
45300	// }
45301
45302}
45303
45304// method id "compute.urlMaps.insert":
45305
45306type UrlMapsInsertCall struct {
45307	s          *Service
45308	project    string
45309	urlmap     *UrlMap
45310	urlParams_ gensupport.URLParams
45311	ctx_       context.Context
45312}
45313
45314// Insert: Creates a UrlMap resource in the specified project using the
45315// data included in the request.
45316// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/insert
45317func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall {
45318	c := &UrlMapsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45319	c.project = project
45320	c.urlmap = urlmap
45321	return c
45322}
45323
45324// Fields allows partial responses to be retrieved. See
45325// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45326// for more information.
45327func (c *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall {
45328	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45329	return c
45330}
45331
45332// Context sets the context to be used in this call's Do method. Any
45333// pending HTTP request will be aborted if the provided context is
45334// canceled.
45335func (c *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall {
45336	c.ctx_ = ctx
45337	return c
45338}
45339
45340func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) {
45341	var body io.Reader = nil
45342	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
45343	if err != nil {
45344		return nil, err
45345	}
45346	ctype := "application/json"
45347	c.urlParams_.Set("alt", alt)
45348	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps")
45349	urls += "?" + c.urlParams_.Encode()
45350	req, _ := http.NewRequest("POST", urls, body)
45351	googleapi.Expand(req.URL, map[string]string{
45352		"project": c.project,
45353	})
45354	req.Header.Set("Content-Type", ctype)
45355	req.Header.Set("User-Agent", c.s.userAgent())
45356	if c.ctx_ != nil {
45357		return ctxhttp.Do(c.ctx_, c.s.client, req)
45358	}
45359	return c.s.client.Do(req)
45360}
45361
45362// Do executes the "compute.urlMaps.insert" call.
45363// Exactly one of *Operation or error will be non-nil. Any non-2xx
45364// status code is an error. Response headers are in either
45365// *Operation.ServerResponse.Header or (if a response was returned at
45366// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45367// to check whether the returned error was because
45368// http.StatusNotModified was returned.
45369func (c *UrlMapsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
45370	gensupport.SetOptions(c.urlParams_, opts...)
45371	res, err := c.doRequest("json")
45372	if res != nil && res.StatusCode == http.StatusNotModified {
45373		if res.Body != nil {
45374			res.Body.Close()
45375		}
45376		return nil, &googleapi.Error{
45377			Code:   res.StatusCode,
45378			Header: res.Header,
45379		}
45380	}
45381	if err != nil {
45382		return nil, err
45383	}
45384	defer googleapi.CloseBody(res)
45385	if err := googleapi.CheckResponse(res); err != nil {
45386		return nil, err
45387	}
45388	ret := &Operation{
45389		ServerResponse: googleapi.ServerResponse{
45390			Header:         res.Header,
45391			HTTPStatusCode: res.StatusCode,
45392		},
45393	}
45394	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
45395		return nil, err
45396	}
45397	return ret, nil
45398	// {
45399	//   "description": "Creates a UrlMap resource in the specified project using the data included in the request.",
45400	//   "httpMethod": "POST",
45401	//   "id": "compute.urlMaps.insert",
45402	//   "parameterOrder": [
45403	//     "project"
45404	//   ],
45405	//   "parameters": {
45406	//     "project": {
45407	//       "description": "Project ID for this request.",
45408	//       "location": "path",
45409	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45410	//       "required": true,
45411	//       "type": "string"
45412	//     }
45413	//   },
45414	//   "path": "{project}/global/urlMaps",
45415	//   "request": {
45416	//     "$ref": "UrlMap"
45417	//   },
45418	//   "response": {
45419	//     "$ref": "Operation"
45420	//   },
45421	//   "scopes": [
45422	//     "https://www.googleapis.com/auth/cloud-platform",
45423	//     "https://www.googleapis.com/auth/compute"
45424	//   ]
45425	// }
45426
45427}
45428
45429// method id "compute.urlMaps.invalidateCache":
45430
45431type UrlMapsInvalidateCacheCall struct {
45432	s                     *Service
45433	project               string
45434	urlMap                string
45435	cacheinvalidationrule *CacheInvalidationRule
45436	urlParams_            gensupport.URLParams
45437	ctx_                  context.Context
45438}
45439
45440// InvalidateCache: Initiates a cache invalidation operation,
45441// invalidating the specified path, scoped to the specified UrlMap.
45442func (r *UrlMapsService) InvalidateCache(project string, urlMap string, cacheinvalidationrule *CacheInvalidationRule) *UrlMapsInvalidateCacheCall {
45443	c := &UrlMapsInvalidateCacheCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45444	c.project = project
45445	c.urlMap = urlMap
45446	c.cacheinvalidationrule = cacheinvalidationrule
45447	return c
45448}
45449
45450// Fields allows partial responses to be retrieved. See
45451// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45452// for more information.
45453func (c *UrlMapsInvalidateCacheCall) Fields(s ...googleapi.Field) *UrlMapsInvalidateCacheCall {
45454	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45455	return c
45456}
45457
45458// Context sets the context to be used in this call's Do method. Any
45459// pending HTTP request will be aborted if the provided context is
45460// canceled.
45461func (c *UrlMapsInvalidateCacheCall) Context(ctx context.Context) *UrlMapsInvalidateCacheCall {
45462	c.ctx_ = ctx
45463	return c
45464}
45465
45466func (c *UrlMapsInvalidateCacheCall) doRequest(alt string) (*http.Response, error) {
45467	var body io.Reader = nil
45468	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cacheinvalidationrule)
45469	if err != nil {
45470		return nil, err
45471	}
45472	ctype := "application/json"
45473	c.urlParams_.Set("alt", alt)
45474	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/invalidateCache")
45475	urls += "?" + c.urlParams_.Encode()
45476	req, _ := http.NewRequest("POST", urls, body)
45477	googleapi.Expand(req.URL, map[string]string{
45478		"project": c.project,
45479		"urlMap":  c.urlMap,
45480	})
45481	req.Header.Set("Content-Type", ctype)
45482	req.Header.Set("User-Agent", c.s.userAgent())
45483	if c.ctx_ != nil {
45484		return ctxhttp.Do(c.ctx_, c.s.client, req)
45485	}
45486	return c.s.client.Do(req)
45487}
45488
45489// Do executes the "compute.urlMaps.invalidateCache" call.
45490// Exactly one of *Operation or error will be non-nil. Any non-2xx
45491// status code is an error. Response headers are in either
45492// *Operation.ServerResponse.Header or (if a response was returned at
45493// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45494// to check whether the returned error was because
45495// http.StatusNotModified was returned.
45496func (c *UrlMapsInvalidateCacheCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
45497	gensupport.SetOptions(c.urlParams_, opts...)
45498	res, err := c.doRequest("json")
45499	if res != nil && res.StatusCode == http.StatusNotModified {
45500		if res.Body != nil {
45501			res.Body.Close()
45502		}
45503		return nil, &googleapi.Error{
45504			Code:   res.StatusCode,
45505			Header: res.Header,
45506		}
45507	}
45508	if err != nil {
45509		return nil, err
45510	}
45511	defer googleapi.CloseBody(res)
45512	if err := googleapi.CheckResponse(res); err != nil {
45513		return nil, err
45514	}
45515	ret := &Operation{
45516		ServerResponse: googleapi.ServerResponse{
45517			Header:         res.Header,
45518			HTTPStatusCode: res.StatusCode,
45519		},
45520	}
45521	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
45522		return nil, err
45523	}
45524	return ret, nil
45525	// {
45526	//   "description": "Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap.",
45527	//   "httpMethod": "POST",
45528	//   "id": "compute.urlMaps.invalidateCache",
45529	//   "parameterOrder": [
45530	//     "project",
45531	//     "urlMap"
45532	//   ],
45533	//   "parameters": {
45534	//     "project": {
45535	//       "description": "Project ID for this request.",
45536	//       "location": "path",
45537	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45538	//       "required": true,
45539	//       "type": "string"
45540	//     },
45541	//     "urlMap": {
45542	//       "description": "Name of the UrlMap scoping this request.",
45543	//       "location": "path",
45544	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45545	//       "required": true,
45546	//       "type": "string"
45547	//     }
45548	//   },
45549	//   "path": "{project}/global/urlMaps/{urlMap}/invalidateCache",
45550	//   "request": {
45551	//     "$ref": "CacheInvalidationRule"
45552	//   },
45553	//   "response": {
45554	//     "$ref": "Operation"
45555	//   },
45556	//   "scopes": [
45557	//     "https://www.googleapis.com/auth/cloud-platform",
45558	//     "https://www.googleapis.com/auth/compute"
45559	//   ]
45560	// }
45561
45562}
45563
45564// method id "compute.urlMaps.list":
45565
45566type UrlMapsListCall struct {
45567	s            *Service
45568	project      string
45569	urlParams_   gensupport.URLParams
45570	ifNoneMatch_ string
45571	ctx_         context.Context
45572}
45573
45574// List: Retrieves the list of UrlMap resources available to the
45575// specified project.
45576// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/list
45577func (r *UrlMapsService) List(project string) *UrlMapsListCall {
45578	c := &UrlMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45579	c.project = project
45580	return c
45581}
45582
45583// Filter sets the optional parameter "filter": Sets a filter expression
45584// for filtering listed resources, in the form filter={expression}. Your
45585// {expression} must be in the format: field_name comparison_string
45586// literal_string.
45587//
45588// The field_name is the name of the field you want to compare. Only
45589// atomic field types are supported (string, number, boolean). The
45590// comparison_string must be either eq (equals) or ne (not equals). The
45591// literal_string is the string value to filter to. The literal value
45592// must be valid for the type of field you are filtering by (string,
45593// number, boolean). For string fields, the literal value is interpreted
45594// as a regular expression using RE2 syntax. The literal value must
45595// match the entire field.
45596//
45597// For example, to filter for instances that do not have a name of
45598// example-instance, you would use filter=name ne
45599// example-instance.
45600//
45601// Compute Engine Beta API Only: If you use filtering in the Beta API,
45602// you can also filter on nested fields. For example, you could filter
45603// on instances that have set the scheduling.automaticRestart field to
45604// true. In particular, use filtering on nested fields to take advantage
45605// of instance labels to organize and filter results based on label
45606// values.
45607//
45608// The Beta API also supports filtering on multiple expressions by
45609// providing each separate expression within parentheses. For example,
45610// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
45611// Multiple expressions are treated as AND expressions, meaning that
45612// resources must match all expressions to pass the filters.
45613func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall {
45614	c.urlParams_.Set("filter", filter)
45615	return c
45616}
45617
45618// MaxResults sets the optional parameter "maxResults": The maximum
45619// number of results per page that should be returned. If the number of
45620// available results is larger than maxResults, Compute Engine returns a
45621// nextPageToken that can be used to get the next page of results in
45622// subsequent list requests.
45623func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall {
45624	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
45625	return c
45626}
45627
45628// OrderBy sets the optional parameter "orderBy": Sorts list results by
45629// a certain order. By default, results are returned in alphanumerical
45630// order based on the resource name.
45631//
45632// You can also sort results in descending order based on the creation
45633// timestamp using orderBy="creationTimestamp desc". This sorts results
45634// based on the creationTimestamp field in reverse chronological order
45635// (newest result first). Use this to sort resources like operations so
45636// that the newest operation is returned first.
45637//
45638// Currently, only sorting by name or creationTimestamp desc is
45639// supported.
45640func (c *UrlMapsListCall) OrderBy(orderBy string) *UrlMapsListCall {
45641	c.urlParams_.Set("orderBy", orderBy)
45642	return c
45643}
45644
45645// PageToken sets the optional parameter "pageToken": Specifies a page
45646// token to use. Set pageToken to the nextPageToken returned by a
45647// previous list request to get the next page of results.
45648func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall {
45649	c.urlParams_.Set("pageToken", pageToken)
45650	return c
45651}
45652
45653// Fields allows partial responses to be retrieved. See
45654// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45655// for more information.
45656func (c *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall {
45657	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45658	return c
45659}
45660
45661// IfNoneMatch sets the optional parameter which makes the operation
45662// fail if the object's ETag matches the given value. This is useful for
45663// getting updates only after the object has changed since the last
45664// request. Use googleapi.IsNotModified to check whether the response
45665// error from Do is the result of In-None-Match.
45666func (c *UrlMapsListCall) IfNoneMatch(entityTag string) *UrlMapsListCall {
45667	c.ifNoneMatch_ = entityTag
45668	return c
45669}
45670
45671// Context sets the context to be used in this call's Do method. Any
45672// pending HTTP request will be aborted if the provided context is
45673// canceled.
45674func (c *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall {
45675	c.ctx_ = ctx
45676	return c
45677}
45678
45679func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) {
45680	var body io.Reader = nil
45681	c.urlParams_.Set("alt", alt)
45682	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps")
45683	urls += "?" + c.urlParams_.Encode()
45684	req, _ := http.NewRequest("GET", urls, body)
45685	googleapi.Expand(req.URL, map[string]string{
45686		"project": c.project,
45687	})
45688	req.Header.Set("User-Agent", c.s.userAgent())
45689	if c.ifNoneMatch_ != "" {
45690		req.Header.Set("If-None-Match", c.ifNoneMatch_)
45691	}
45692	if c.ctx_ != nil {
45693		return ctxhttp.Do(c.ctx_, c.s.client, req)
45694	}
45695	return c.s.client.Do(req)
45696}
45697
45698// Do executes the "compute.urlMaps.list" call.
45699// Exactly one of *UrlMapList or error will be non-nil. Any non-2xx
45700// status code is an error. Response headers are in either
45701// *UrlMapList.ServerResponse.Header or (if a response was returned at
45702// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45703// to check whether the returned error was because
45704// http.StatusNotModified was returned.
45705func (c *UrlMapsListCall) Do(opts ...googleapi.CallOption) (*UrlMapList, error) {
45706	gensupport.SetOptions(c.urlParams_, opts...)
45707	res, err := c.doRequest("json")
45708	if res != nil && res.StatusCode == http.StatusNotModified {
45709		if res.Body != nil {
45710			res.Body.Close()
45711		}
45712		return nil, &googleapi.Error{
45713			Code:   res.StatusCode,
45714			Header: res.Header,
45715		}
45716	}
45717	if err != nil {
45718		return nil, err
45719	}
45720	defer googleapi.CloseBody(res)
45721	if err := googleapi.CheckResponse(res); err != nil {
45722		return nil, err
45723	}
45724	ret := &UrlMapList{
45725		ServerResponse: googleapi.ServerResponse{
45726			Header:         res.Header,
45727			HTTPStatusCode: res.StatusCode,
45728		},
45729	}
45730	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
45731		return nil, err
45732	}
45733	return ret, nil
45734	// {
45735	//   "description": "Retrieves the list of UrlMap resources available to the specified project.",
45736	//   "httpMethod": "GET",
45737	//   "id": "compute.urlMaps.list",
45738	//   "parameterOrder": [
45739	//     "project"
45740	//   ],
45741	//   "parameters": {
45742	//     "filter": {
45743	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
45744	//       "location": "query",
45745	//       "type": "string"
45746	//     },
45747	//     "maxResults": {
45748	//       "default": "500",
45749	//       "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.",
45750	//       "format": "uint32",
45751	//       "location": "query",
45752	//       "maximum": "500",
45753	//       "minimum": "0",
45754	//       "type": "integer"
45755	//     },
45756	//     "orderBy": {
45757	//       "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.",
45758	//       "location": "query",
45759	//       "type": "string"
45760	//     },
45761	//     "pageToken": {
45762	//       "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.",
45763	//       "location": "query",
45764	//       "type": "string"
45765	//     },
45766	//     "project": {
45767	//       "description": "Project ID for this request.",
45768	//       "location": "path",
45769	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45770	//       "required": true,
45771	//       "type": "string"
45772	//     }
45773	//   },
45774	//   "path": "{project}/global/urlMaps",
45775	//   "response": {
45776	//     "$ref": "UrlMapList"
45777	//   },
45778	//   "scopes": [
45779	//     "https://www.googleapis.com/auth/cloud-platform",
45780	//     "https://www.googleapis.com/auth/compute",
45781	//     "https://www.googleapis.com/auth/compute.readonly"
45782	//   ]
45783	// }
45784
45785}
45786
45787// Pages invokes f for each page of results.
45788// A non-nil error returned from f will halt the iteration.
45789// The provided context supersedes any context provided to the Context method.
45790func (c *UrlMapsListCall) Pages(ctx context.Context, f func(*UrlMapList) error) error {
45791	c.ctx_ = ctx
45792	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
45793	for {
45794		x, err := c.Do()
45795		if err != nil {
45796			return err
45797		}
45798		if err := f(x); err != nil {
45799			return err
45800		}
45801		if x.NextPageToken == "" {
45802			return nil
45803		}
45804		c.PageToken(x.NextPageToken)
45805	}
45806}
45807
45808// method id "compute.urlMaps.patch":
45809
45810type UrlMapsPatchCall struct {
45811	s          *Service
45812	project    string
45813	urlMap     string
45814	urlmap     *UrlMap
45815	urlParams_ gensupport.URLParams
45816	ctx_       context.Context
45817}
45818
45819// Patch: Updates the entire content of the UrlMap resource. This method
45820// supports patch semantics.
45821// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch
45822func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall {
45823	c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45824	c.project = project
45825	c.urlMap = urlMap
45826	c.urlmap = urlmap
45827	return c
45828}
45829
45830// Fields allows partial responses to be retrieved. See
45831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45832// for more information.
45833func (c *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall {
45834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45835	return c
45836}
45837
45838// Context sets the context to be used in this call's Do method. Any
45839// pending HTTP request will be aborted if the provided context is
45840// canceled.
45841func (c *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall {
45842	c.ctx_ = ctx
45843	return c
45844}
45845
45846func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) {
45847	var body io.Reader = nil
45848	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
45849	if err != nil {
45850		return nil, err
45851	}
45852	ctype := "application/json"
45853	c.urlParams_.Set("alt", alt)
45854	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
45855	urls += "?" + c.urlParams_.Encode()
45856	req, _ := http.NewRequest("PATCH", urls, body)
45857	googleapi.Expand(req.URL, map[string]string{
45858		"project": c.project,
45859		"urlMap":  c.urlMap,
45860	})
45861	req.Header.Set("Content-Type", ctype)
45862	req.Header.Set("User-Agent", c.s.userAgent())
45863	if c.ctx_ != nil {
45864		return ctxhttp.Do(c.ctx_, c.s.client, req)
45865	}
45866	return c.s.client.Do(req)
45867}
45868
45869// Do executes the "compute.urlMaps.patch" call.
45870// Exactly one of *Operation or error will be non-nil. Any non-2xx
45871// status code is an error. Response headers are in either
45872// *Operation.ServerResponse.Header or (if a response was returned at
45873// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
45874// to check whether the returned error was because
45875// http.StatusNotModified was returned.
45876func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
45877	gensupport.SetOptions(c.urlParams_, opts...)
45878	res, err := c.doRequest("json")
45879	if res != nil && res.StatusCode == http.StatusNotModified {
45880		if res.Body != nil {
45881			res.Body.Close()
45882		}
45883		return nil, &googleapi.Error{
45884			Code:   res.StatusCode,
45885			Header: res.Header,
45886		}
45887	}
45888	if err != nil {
45889		return nil, err
45890	}
45891	defer googleapi.CloseBody(res)
45892	if err := googleapi.CheckResponse(res); err != nil {
45893		return nil, err
45894	}
45895	ret := &Operation{
45896		ServerResponse: googleapi.ServerResponse{
45897			Header:         res.Header,
45898			HTTPStatusCode: res.StatusCode,
45899		},
45900	}
45901	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
45902		return nil, err
45903	}
45904	return ret, nil
45905	// {
45906	//   "description": "Updates the entire content of the UrlMap resource. This method supports patch semantics.",
45907	//   "httpMethod": "PATCH",
45908	//   "id": "compute.urlMaps.patch",
45909	//   "parameterOrder": [
45910	//     "project",
45911	//     "urlMap"
45912	//   ],
45913	//   "parameters": {
45914	//     "project": {
45915	//       "description": "Project ID for this request.",
45916	//       "location": "path",
45917	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
45918	//       "required": true,
45919	//       "type": "string"
45920	//     },
45921	//     "urlMap": {
45922	//       "description": "Name of the UrlMap resource to update.",
45923	//       "location": "path",
45924	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
45925	//       "required": true,
45926	//       "type": "string"
45927	//     }
45928	//   },
45929	//   "path": "{project}/global/urlMaps/{urlMap}",
45930	//   "request": {
45931	//     "$ref": "UrlMap"
45932	//   },
45933	//   "response": {
45934	//     "$ref": "Operation"
45935	//   },
45936	//   "scopes": [
45937	//     "https://www.googleapis.com/auth/cloud-platform",
45938	//     "https://www.googleapis.com/auth/compute"
45939	//   ]
45940	// }
45941
45942}
45943
45944// method id "compute.urlMaps.testIamPermissions":
45945
45946type UrlMapsTestIamPermissionsCall struct {
45947	s                      *Service
45948	project                string
45949	resource               string
45950	testpermissionsrequest *TestPermissionsRequest
45951	urlParams_             gensupport.URLParams
45952	ctx_                   context.Context
45953}
45954
45955// TestIamPermissions: Returns permissions that a caller has on the
45956// specified resource.
45957func (r *UrlMapsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *UrlMapsTestIamPermissionsCall {
45958	c := &UrlMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
45959	c.project = project
45960	c.resource = resource
45961	c.testpermissionsrequest = testpermissionsrequest
45962	return c
45963}
45964
45965// Fields allows partial responses to be retrieved. See
45966// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
45967// for more information.
45968func (c *UrlMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *UrlMapsTestIamPermissionsCall {
45969	c.urlParams_.Set("fields", googleapi.CombineFields(s))
45970	return c
45971}
45972
45973// Context sets the context to be used in this call's Do method. Any
45974// pending HTTP request will be aborted if the provided context is
45975// canceled.
45976func (c *UrlMapsTestIamPermissionsCall) Context(ctx context.Context) *UrlMapsTestIamPermissionsCall {
45977	c.ctx_ = ctx
45978	return c
45979}
45980
45981func (c *UrlMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
45982	var body io.Reader = nil
45983	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
45984	if err != nil {
45985		return nil, err
45986	}
45987	ctype := "application/json"
45988	c.urlParams_.Set("alt", alt)
45989	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{resource}/testIamPermissions")
45990	urls += "?" + c.urlParams_.Encode()
45991	req, _ := http.NewRequest("POST", urls, body)
45992	googleapi.Expand(req.URL, map[string]string{
45993		"project":  c.project,
45994		"resource": c.resource,
45995	})
45996	req.Header.Set("Content-Type", ctype)
45997	req.Header.Set("User-Agent", c.s.userAgent())
45998	if c.ctx_ != nil {
45999		return ctxhttp.Do(c.ctx_, c.s.client, req)
46000	}
46001	return c.s.client.Do(req)
46002}
46003
46004// Do executes the "compute.urlMaps.testIamPermissions" call.
46005// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
46006// non-2xx status code is an error. Response headers are in either
46007// *TestPermissionsResponse.ServerResponse.Header or (if a response was
46008// returned at all) in error.(*googleapi.Error).Header. Use
46009// googleapi.IsNotModified to check whether the returned error was
46010// because http.StatusNotModified was returned.
46011func (c *UrlMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
46012	gensupport.SetOptions(c.urlParams_, opts...)
46013	res, err := c.doRequest("json")
46014	if res != nil && res.StatusCode == http.StatusNotModified {
46015		if res.Body != nil {
46016			res.Body.Close()
46017		}
46018		return nil, &googleapi.Error{
46019			Code:   res.StatusCode,
46020			Header: res.Header,
46021		}
46022	}
46023	if err != nil {
46024		return nil, err
46025	}
46026	defer googleapi.CloseBody(res)
46027	if err := googleapi.CheckResponse(res); err != nil {
46028		return nil, err
46029	}
46030	ret := &TestPermissionsResponse{
46031		ServerResponse: googleapi.ServerResponse{
46032			Header:         res.Header,
46033			HTTPStatusCode: res.StatusCode,
46034		},
46035	}
46036	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
46037		return nil, err
46038	}
46039	return ret, nil
46040	// {
46041	//   "description": "Returns permissions that a caller has on the specified resource.",
46042	//   "httpMethod": "POST",
46043	//   "id": "compute.urlMaps.testIamPermissions",
46044	//   "parameterOrder": [
46045	//     "project",
46046	//     "resource"
46047	//   ],
46048	//   "parameters": {
46049	//     "project": {
46050	//       "description": "Project ID for this request.",
46051	//       "location": "path",
46052	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46053	//       "required": true,
46054	//       "type": "string"
46055	//     },
46056	//     "resource": {
46057	//       "description": "Name of the resource for this request.",
46058	//       "location": "path",
46059	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?",
46060	//       "required": true,
46061	//       "type": "string"
46062	//     }
46063	//   },
46064	//   "path": "{project}/global/urlMaps/{resource}/testIamPermissions",
46065	//   "request": {
46066	//     "$ref": "TestPermissionsRequest"
46067	//   },
46068	//   "response": {
46069	//     "$ref": "TestPermissionsResponse"
46070	//   },
46071	//   "scopes": [
46072	//     "https://www.googleapis.com/auth/cloud-platform",
46073	//     "https://www.googleapis.com/auth/compute",
46074	//     "https://www.googleapis.com/auth/compute.readonly"
46075	//   ]
46076	// }
46077
46078}
46079
46080// method id "compute.urlMaps.update":
46081
46082type UrlMapsUpdateCall struct {
46083	s          *Service
46084	project    string
46085	urlMap     string
46086	urlmap     *UrlMap
46087	urlParams_ gensupport.URLParams
46088	ctx_       context.Context
46089}
46090
46091// Update: Updates the entire content of the UrlMap resource.
46092// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/update
46093func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall {
46094	c := &UrlMapsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46095	c.project = project
46096	c.urlMap = urlMap
46097	c.urlmap = urlmap
46098	return c
46099}
46100
46101// Fields allows partial responses to be retrieved. See
46102// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46103// for more information.
46104func (c *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall {
46105	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46106	return c
46107}
46108
46109// Context sets the context to be used in this call's Do method. Any
46110// pending HTTP request will be aborted if the provided context is
46111// canceled.
46112func (c *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall {
46113	c.ctx_ = ctx
46114	return c
46115}
46116
46117func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) {
46118	var body io.Reader = nil
46119	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
46120	if err != nil {
46121		return nil, err
46122	}
46123	ctype := "application/json"
46124	c.urlParams_.Set("alt", alt)
46125	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}")
46126	urls += "?" + c.urlParams_.Encode()
46127	req, _ := http.NewRequest("PUT", urls, body)
46128	googleapi.Expand(req.URL, map[string]string{
46129		"project": c.project,
46130		"urlMap":  c.urlMap,
46131	})
46132	req.Header.Set("Content-Type", ctype)
46133	req.Header.Set("User-Agent", c.s.userAgent())
46134	if c.ctx_ != nil {
46135		return ctxhttp.Do(c.ctx_, c.s.client, req)
46136	}
46137	return c.s.client.Do(req)
46138}
46139
46140// Do executes the "compute.urlMaps.update" call.
46141// Exactly one of *Operation or error will be non-nil. Any non-2xx
46142// status code is an error. Response headers are in either
46143// *Operation.ServerResponse.Header or (if a response was returned at
46144// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46145// to check whether the returned error was because
46146// http.StatusNotModified was returned.
46147func (c *UrlMapsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
46148	gensupport.SetOptions(c.urlParams_, opts...)
46149	res, err := c.doRequest("json")
46150	if res != nil && res.StatusCode == http.StatusNotModified {
46151		if res.Body != nil {
46152			res.Body.Close()
46153		}
46154		return nil, &googleapi.Error{
46155			Code:   res.StatusCode,
46156			Header: res.Header,
46157		}
46158	}
46159	if err != nil {
46160		return nil, err
46161	}
46162	defer googleapi.CloseBody(res)
46163	if err := googleapi.CheckResponse(res); err != nil {
46164		return nil, err
46165	}
46166	ret := &Operation{
46167		ServerResponse: googleapi.ServerResponse{
46168			Header:         res.Header,
46169			HTTPStatusCode: res.StatusCode,
46170		},
46171	}
46172	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
46173		return nil, err
46174	}
46175	return ret, nil
46176	// {
46177	//   "description": "Updates the entire content of the UrlMap resource.",
46178	//   "httpMethod": "PUT",
46179	//   "id": "compute.urlMaps.update",
46180	//   "parameterOrder": [
46181	//     "project",
46182	//     "urlMap"
46183	//   ],
46184	//   "parameters": {
46185	//     "project": {
46186	//       "description": "Project ID for this request.",
46187	//       "location": "path",
46188	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46189	//       "required": true,
46190	//       "type": "string"
46191	//     },
46192	//     "urlMap": {
46193	//       "description": "Name of the UrlMap resource to update.",
46194	//       "location": "path",
46195	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46196	//       "required": true,
46197	//       "type": "string"
46198	//     }
46199	//   },
46200	//   "path": "{project}/global/urlMaps/{urlMap}",
46201	//   "request": {
46202	//     "$ref": "UrlMap"
46203	//   },
46204	//   "response": {
46205	//     "$ref": "Operation"
46206	//   },
46207	//   "scopes": [
46208	//     "https://www.googleapis.com/auth/cloud-platform",
46209	//     "https://www.googleapis.com/auth/compute"
46210	//   ]
46211	// }
46212
46213}
46214
46215// method id "compute.urlMaps.validate":
46216
46217type UrlMapsValidateCall struct {
46218	s                      *Service
46219	project                string
46220	urlMap                 string
46221	urlmapsvalidaterequest *UrlMapsValidateRequest
46222	urlParams_             gensupport.URLParams
46223	ctx_                   context.Context
46224}
46225
46226// Validate: Runs static validation for the UrlMap. In particular, the
46227// tests of the provided UrlMap will be run. Calling this method does
46228// NOT create the UrlMap.
46229// For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/validate
46230func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall {
46231	c := &UrlMapsValidateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46232	c.project = project
46233	c.urlMap = urlMap
46234	c.urlmapsvalidaterequest = urlmapsvalidaterequest
46235	return c
46236}
46237
46238// Fields allows partial responses to be retrieved. See
46239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46240// for more information.
46241func (c *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall {
46242	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46243	return c
46244}
46245
46246// Context sets the context to be used in this call's Do method. Any
46247// pending HTTP request will be aborted if the provided context is
46248// canceled.
46249func (c *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall {
46250	c.ctx_ = ctx
46251	return c
46252}
46253
46254func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) {
46255	var body io.Reader = nil
46256	body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest)
46257	if err != nil {
46258		return nil, err
46259	}
46260	ctype := "application/json"
46261	c.urlParams_.Set("alt", alt)
46262	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate")
46263	urls += "?" + c.urlParams_.Encode()
46264	req, _ := http.NewRequest("POST", urls, body)
46265	googleapi.Expand(req.URL, map[string]string{
46266		"project": c.project,
46267		"urlMap":  c.urlMap,
46268	})
46269	req.Header.Set("Content-Type", ctype)
46270	req.Header.Set("User-Agent", c.s.userAgent())
46271	if c.ctx_ != nil {
46272		return ctxhttp.Do(c.ctx_, c.s.client, req)
46273	}
46274	return c.s.client.Do(req)
46275}
46276
46277// Do executes the "compute.urlMaps.validate" call.
46278// Exactly one of *UrlMapsValidateResponse or error will be non-nil. Any
46279// non-2xx status code is an error. Response headers are in either
46280// *UrlMapsValidateResponse.ServerResponse.Header or (if a response was
46281// returned at all) in error.(*googleapi.Error).Header. Use
46282// googleapi.IsNotModified to check whether the returned error was
46283// because http.StatusNotModified was returned.
46284func (c *UrlMapsValidateCall) Do(opts ...googleapi.CallOption) (*UrlMapsValidateResponse, error) {
46285	gensupport.SetOptions(c.urlParams_, opts...)
46286	res, err := c.doRequest("json")
46287	if res != nil && res.StatusCode == http.StatusNotModified {
46288		if res.Body != nil {
46289			res.Body.Close()
46290		}
46291		return nil, &googleapi.Error{
46292			Code:   res.StatusCode,
46293			Header: res.Header,
46294		}
46295	}
46296	if err != nil {
46297		return nil, err
46298	}
46299	defer googleapi.CloseBody(res)
46300	if err := googleapi.CheckResponse(res); err != nil {
46301		return nil, err
46302	}
46303	ret := &UrlMapsValidateResponse{
46304		ServerResponse: googleapi.ServerResponse{
46305			Header:         res.Header,
46306			HTTPStatusCode: res.StatusCode,
46307		},
46308	}
46309	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
46310		return nil, err
46311	}
46312	return ret, nil
46313	// {
46314	//   "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.",
46315	//   "httpMethod": "POST",
46316	//   "id": "compute.urlMaps.validate",
46317	//   "parameterOrder": [
46318	//     "project",
46319	//     "urlMap"
46320	//   ],
46321	//   "parameters": {
46322	//     "project": {
46323	//       "description": "Project ID for this request.",
46324	//       "location": "path",
46325	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46326	//       "required": true,
46327	//       "type": "string"
46328	//     },
46329	//     "urlMap": {
46330	//       "description": "Name of the UrlMap resource to be validated as.",
46331	//       "location": "path",
46332	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46333	//       "required": true,
46334	//       "type": "string"
46335	//     }
46336	//   },
46337	//   "path": "{project}/global/urlMaps/{urlMap}/validate",
46338	//   "request": {
46339	//     "$ref": "UrlMapsValidateRequest"
46340	//   },
46341	//   "response": {
46342	//     "$ref": "UrlMapsValidateResponse"
46343	//   },
46344	//   "scopes": [
46345	//     "https://www.googleapis.com/auth/cloud-platform",
46346	//     "https://www.googleapis.com/auth/compute"
46347	//   ]
46348	// }
46349
46350}
46351
46352// method id "compute.vpnTunnels.aggregatedList":
46353
46354type VpnTunnelsAggregatedListCall struct {
46355	s            *Service
46356	project      string
46357	urlParams_   gensupport.URLParams
46358	ifNoneMatch_ string
46359	ctx_         context.Context
46360}
46361
46362// AggregatedList: Retrieves an aggregated list of VPN tunnels.
46363func (r *VpnTunnelsService) AggregatedList(project string) *VpnTunnelsAggregatedListCall {
46364	c := &VpnTunnelsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46365	c.project = project
46366	return c
46367}
46368
46369// Filter sets the optional parameter "filter": Sets a filter expression
46370// for filtering listed resources, in the form filter={expression}. Your
46371// {expression} must be in the format: field_name comparison_string
46372// literal_string.
46373//
46374// The field_name is the name of the field you want to compare. Only
46375// atomic field types are supported (string, number, boolean). The
46376// comparison_string must be either eq (equals) or ne (not equals). The
46377// literal_string is the string value to filter to. The literal value
46378// must be valid for the type of field you are filtering by (string,
46379// number, boolean). For string fields, the literal value is interpreted
46380// as a regular expression using RE2 syntax. The literal value must
46381// match the entire field.
46382//
46383// For example, to filter for instances that do not have a name of
46384// example-instance, you would use filter=name ne
46385// example-instance.
46386//
46387// Compute Engine Beta API Only: If you use filtering in the Beta API,
46388// you can also filter on nested fields. For example, you could filter
46389// on instances that have set the scheduling.automaticRestart field to
46390// true. In particular, use filtering on nested fields to take advantage
46391// of instance labels to organize and filter results based on label
46392// values.
46393//
46394// The Beta API also supports filtering on multiple expressions by
46395// providing each separate expression within parentheses. For example,
46396// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
46397// Multiple expressions are treated as AND expressions, meaning that
46398// resources must match all expressions to pass the filters.
46399func (c *VpnTunnelsAggregatedListCall) Filter(filter string) *VpnTunnelsAggregatedListCall {
46400	c.urlParams_.Set("filter", filter)
46401	return c
46402}
46403
46404// MaxResults sets the optional parameter "maxResults": The maximum
46405// number of results per page that should be returned. If the number of
46406// available results is larger than maxResults, Compute Engine returns a
46407// nextPageToken that can be used to get the next page of results in
46408// subsequent list requests.
46409func (c *VpnTunnelsAggregatedListCall) MaxResults(maxResults int64) *VpnTunnelsAggregatedListCall {
46410	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
46411	return c
46412}
46413
46414// OrderBy sets the optional parameter "orderBy": Sorts list results by
46415// a certain order. By default, results are returned in alphanumerical
46416// order based on the resource name.
46417//
46418// You can also sort results in descending order based on the creation
46419// timestamp using orderBy="creationTimestamp desc". This sorts results
46420// based on the creationTimestamp field in reverse chronological order
46421// (newest result first). Use this to sort resources like operations so
46422// that the newest operation is returned first.
46423//
46424// Currently, only sorting by name or creationTimestamp desc is
46425// supported.
46426func (c *VpnTunnelsAggregatedListCall) OrderBy(orderBy string) *VpnTunnelsAggregatedListCall {
46427	c.urlParams_.Set("orderBy", orderBy)
46428	return c
46429}
46430
46431// PageToken sets the optional parameter "pageToken": Specifies a page
46432// token to use. Set pageToken to the nextPageToken returned by a
46433// previous list request to get the next page of results.
46434func (c *VpnTunnelsAggregatedListCall) PageToken(pageToken string) *VpnTunnelsAggregatedListCall {
46435	c.urlParams_.Set("pageToken", pageToken)
46436	return c
46437}
46438
46439// Fields allows partial responses to be retrieved. See
46440// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46441// for more information.
46442func (c *VpnTunnelsAggregatedListCall) Fields(s ...googleapi.Field) *VpnTunnelsAggregatedListCall {
46443	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46444	return c
46445}
46446
46447// IfNoneMatch sets the optional parameter which makes the operation
46448// fail if the object's ETag matches the given value. This is useful for
46449// getting updates only after the object has changed since the last
46450// request. Use googleapi.IsNotModified to check whether the response
46451// error from Do is the result of In-None-Match.
46452func (c *VpnTunnelsAggregatedListCall) IfNoneMatch(entityTag string) *VpnTunnelsAggregatedListCall {
46453	c.ifNoneMatch_ = entityTag
46454	return c
46455}
46456
46457// Context sets the context to be used in this call's Do method. Any
46458// pending HTTP request will be aborted if the provided context is
46459// canceled.
46460func (c *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall {
46461	c.ctx_ = ctx
46462	return c
46463}
46464
46465func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
46466	var body io.Reader = nil
46467	c.urlParams_.Set("alt", alt)
46468	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/vpnTunnels")
46469	urls += "?" + c.urlParams_.Encode()
46470	req, _ := http.NewRequest("GET", urls, body)
46471	googleapi.Expand(req.URL, map[string]string{
46472		"project": c.project,
46473	})
46474	req.Header.Set("User-Agent", c.s.userAgent())
46475	if c.ifNoneMatch_ != "" {
46476		req.Header.Set("If-None-Match", c.ifNoneMatch_)
46477	}
46478	if c.ctx_ != nil {
46479		return ctxhttp.Do(c.ctx_, c.s.client, req)
46480	}
46481	return c.s.client.Do(req)
46482}
46483
46484// Do executes the "compute.vpnTunnels.aggregatedList" call.
46485// Exactly one of *VpnTunnelAggregatedList or error will be non-nil. Any
46486// non-2xx status code is an error. Response headers are in either
46487// *VpnTunnelAggregatedList.ServerResponse.Header or (if a response was
46488// returned at all) in error.(*googleapi.Error).Header. Use
46489// googleapi.IsNotModified to check whether the returned error was
46490// because http.StatusNotModified was returned.
46491func (c *VpnTunnelsAggregatedListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelAggregatedList, error) {
46492	gensupport.SetOptions(c.urlParams_, opts...)
46493	res, err := c.doRequest("json")
46494	if res != nil && res.StatusCode == http.StatusNotModified {
46495		if res.Body != nil {
46496			res.Body.Close()
46497		}
46498		return nil, &googleapi.Error{
46499			Code:   res.StatusCode,
46500			Header: res.Header,
46501		}
46502	}
46503	if err != nil {
46504		return nil, err
46505	}
46506	defer googleapi.CloseBody(res)
46507	if err := googleapi.CheckResponse(res); err != nil {
46508		return nil, err
46509	}
46510	ret := &VpnTunnelAggregatedList{
46511		ServerResponse: googleapi.ServerResponse{
46512			Header:         res.Header,
46513			HTTPStatusCode: res.StatusCode,
46514		},
46515	}
46516	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
46517		return nil, err
46518	}
46519	return ret, nil
46520	// {
46521	//   "description": "Retrieves an aggregated list of VPN tunnels.",
46522	//   "httpMethod": "GET",
46523	//   "id": "compute.vpnTunnels.aggregatedList",
46524	//   "parameterOrder": [
46525	//     "project"
46526	//   ],
46527	//   "parameters": {
46528	//     "filter": {
46529	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
46530	//       "location": "query",
46531	//       "type": "string"
46532	//     },
46533	//     "maxResults": {
46534	//       "default": "500",
46535	//       "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.",
46536	//       "format": "uint32",
46537	//       "location": "query",
46538	//       "maximum": "500",
46539	//       "minimum": "0",
46540	//       "type": "integer"
46541	//     },
46542	//     "orderBy": {
46543	//       "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.",
46544	//       "location": "query",
46545	//       "type": "string"
46546	//     },
46547	//     "pageToken": {
46548	//       "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.",
46549	//       "location": "query",
46550	//       "type": "string"
46551	//     },
46552	//     "project": {
46553	//       "description": "Project ID for this request.",
46554	//       "location": "path",
46555	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46556	//       "required": true,
46557	//       "type": "string"
46558	//     }
46559	//   },
46560	//   "path": "{project}/aggregated/vpnTunnels",
46561	//   "response": {
46562	//     "$ref": "VpnTunnelAggregatedList"
46563	//   },
46564	//   "scopes": [
46565	//     "https://www.googleapis.com/auth/cloud-platform",
46566	//     "https://www.googleapis.com/auth/compute",
46567	//     "https://www.googleapis.com/auth/compute.readonly"
46568	//   ]
46569	// }
46570
46571}
46572
46573// Pages invokes f for each page of results.
46574// A non-nil error returned from f will halt the iteration.
46575// The provided context supersedes any context provided to the Context method.
46576func (c *VpnTunnelsAggregatedListCall) Pages(ctx context.Context, f func(*VpnTunnelAggregatedList) error) error {
46577	c.ctx_ = ctx
46578	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
46579	for {
46580		x, err := c.Do()
46581		if err != nil {
46582			return err
46583		}
46584		if err := f(x); err != nil {
46585			return err
46586		}
46587		if x.NextPageToken == "" {
46588			return nil
46589		}
46590		c.PageToken(x.NextPageToken)
46591	}
46592}
46593
46594// method id "compute.vpnTunnels.delete":
46595
46596type VpnTunnelsDeleteCall struct {
46597	s          *Service
46598	project    string
46599	region     string
46600	vpnTunnel  string
46601	urlParams_ gensupport.URLParams
46602	ctx_       context.Context
46603}
46604
46605// Delete: Deletes the specified VpnTunnel resource.
46606func (r *VpnTunnelsService) Delete(project string, region string, vpnTunnel string) *VpnTunnelsDeleteCall {
46607	c := &VpnTunnelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46608	c.project = project
46609	c.region = region
46610	c.vpnTunnel = vpnTunnel
46611	return c
46612}
46613
46614// Fields allows partial responses to be retrieved. See
46615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46616// for more information.
46617func (c *VpnTunnelsDeleteCall) Fields(s ...googleapi.Field) *VpnTunnelsDeleteCall {
46618	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46619	return c
46620}
46621
46622// Context sets the context to be used in this call's Do method. Any
46623// pending HTTP request will be aborted if the provided context is
46624// canceled.
46625func (c *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall {
46626	c.ctx_ = ctx
46627	return c
46628}
46629
46630func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) {
46631	var body io.Reader = nil
46632	c.urlParams_.Set("alt", alt)
46633	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}")
46634	urls += "?" + c.urlParams_.Encode()
46635	req, _ := http.NewRequest("DELETE", urls, body)
46636	googleapi.Expand(req.URL, map[string]string{
46637		"project":   c.project,
46638		"region":    c.region,
46639		"vpnTunnel": c.vpnTunnel,
46640	})
46641	req.Header.Set("User-Agent", c.s.userAgent())
46642	if c.ctx_ != nil {
46643		return ctxhttp.Do(c.ctx_, c.s.client, req)
46644	}
46645	return c.s.client.Do(req)
46646}
46647
46648// Do executes the "compute.vpnTunnels.delete" call.
46649// Exactly one of *Operation or error will be non-nil. Any non-2xx
46650// status code is an error. Response headers are in either
46651// *Operation.ServerResponse.Header or (if a response was returned at
46652// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46653// to check whether the returned error was because
46654// http.StatusNotModified was returned.
46655func (c *VpnTunnelsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
46656	gensupport.SetOptions(c.urlParams_, opts...)
46657	res, err := c.doRequest("json")
46658	if res != nil && res.StatusCode == http.StatusNotModified {
46659		if res.Body != nil {
46660			res.Body.Close()
46661		}
46662		return nil, &googleapi.Error{
46663			Code:   res.StatusCode,
46664			Header: res.Header,
46665		}
46666	}
46667	if err != nil {
46668		return nil, err
46669	}
46670	defer googleapi.CloseBody(res)
46671	if err := googleapi.CheckResponse(res); err != nil {
46672		return nil, err
46673	}
46674	ret := &Operation{
46675		ServerResponse: googleapi.ServerResponse{
46676			Header:         res.Header,
46677			HTTPStatusCode: res.StatusCode,
46678		},
46679	}
46680	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
46681		return nil, err
46682	}
46683	return ret, nil
46684	// {
46685	//   "description": "Deletes the specified VpnTunnel resource.",
46686	//   "httpMethod": "DELETE",
46687	//   "id": "compute.vpnTunnels.delete",
46688	//   "parameterOrder": [
46689	//     "project",
46690	//     "region",
46691	//     "vpnTunnel"
46692	//   ],
46693	//   "parameters": {
46694	//     "project": {
46695	//       "description": "Project ID for this request.",
46696	//       "location": "path",
46697	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46698	//       "required": true,
46699	//       "type": "string"
46700	//     },
46701	//     "region": {
46702	//       "description": "Name of the region for this request.",
46703	//       "location": "path",
46704	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46705	//       "required": true,
46706	//       "type": "string"
46707	//     },
46708	//     "vpnTunnel": {
46709	//       "description": "Name of the VpnTunnel resource to delete.",
46710	//       "location": "path",
46711	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46712	//       "required": true,
46713	//       "type": "string"
46714	//     }
46715	//   },
46716	//   "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}",
46717	//   "response": {
46718	//     "$ref": "Operation"
46719	//   },
46720	//   "scopes": [
46721	//     "https://www.googleapis.com/auth/cloud-platform",
46722	//     "https://www.googleapis.com/auth/compute"
46723	//   ]
46724	// }
46725
46726}
46727
46728// method id "compute.vpnTunnels.get":
46729
46730type VpnTunnelsGetCall struct {
46731	s            *Service
46732	project      string
46733	region       string
46734	vpnTunnel    string
46735	urlParams_   gensupport.URLParams
46736	ifNoneMatch_ string
46737	ctx_         context.Context
46738}
46739
46740// Get: Returns the specified VpnTunnel resource. Get a list of
46741// available VPN tunnels by making a list() request.
46742func (r *VpnTunnelsService) Get(project string, region string, vpnTunnel string) *VpnTunnelsGetCall {
46743	c := &VpnTunnelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46744	c.project = project
46745	c.region = region
46746	c.vpnTunnel = vpnTunnel
46747	return c
46748}
46749
46750// Fields allows partial responses to be retrieved. See
46751// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46752// for more information.
46753func (c *VpnTunnelsGetCall) Fields(s ...googleapi.Field) *VpnTunnelsGetCall {
46754	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46755	return c
46756}
46757
46758// IfNoneMatch sets the optional parameter which makes the operation
46759// fail if the object's ETag matches the given value. This is useful for
46760// getting updates only after the object has changed since the last
46761// request. Use googleapi.IsNotModified to check whether the response
46762// error from Do is the result of In-None-Match.
46763func (c *VpnTunnelsGetCall) IfNoneMatch(entityTag string) *VpnTunnelsGetCall {
46764	c.ifNoneMatch_ = entityTag
46765	return c
46766}
46767
46768// Context sets the context to be used in this call's Do method. Any
46769// pending HTTP request will be aborted if the provided context is
46770// canceled.
46771func (c *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall {
46772	c.ctx_ = ctx
46773	return c
46774}
46775
46776func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) {
46777	var body io.Reader = nil
46778	c.urlParams_.Set("alt", alt)
46779	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{vpnTunnel}")
46780	urls += "?" + c.urlParams_.Encode()
46781	req, _ := http.NewRequest("GET", urls, body)
46782	googleapi.Expand(req.URL, map[string]string{
46783		"project":   c.project,
46784		"region":    c.region,
46785		"vpnTunnel": c.vpnTunnel,
46786	})
46787	req.Header.Set("User-Agent", c.s.userAgent())
46788	if c.ifNoneMatch_ != "" {
46789		req.Header.Set("If-None-Match", c.ifNoneMatch_)
46790	}
46791	if c.ctx_ != nil {
46792		return ctxhttp.Do(c.ctx_, c.s.client, req)
46793	}
46794	return c.s.client.Do(req)
46795}
46796
46797// Do executes the "compute.vpnTunnels.get" call.
46798// Exactly one of *VpnTunnel or error will be non-nil. Any non-2xx
46799// status code is an error. Response headers are in either
46800// *VpnTunnel.ServerResponse.Header or (if a response was returned at
46801// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46802// to check whether the returned error was because
46803// http.StatusNotModified was returned.
46804func (c *VpnTunnelsGetCall) Do(opts ...googleapi.CallOption) (*VpnTunnel, error) {
46805	gensupport.SetOptions(c.urlParams_, opts...)
46806	res, err := c.doRequest("json")
46807	if res != nil && res.StatusCode == http.StatusNotModified {
46808		if res.Body != nil {
46809			res.Body.Close()
46810		}
46811		return nil, &googleapi.Error{
46812			Code:   res.StatusCode,
46813			Header: res.Header,
46814		}
46815	}
46816	if err != nil {
46817		return nil, err
46818	}
46819	defer googleapi.CloseBody(res)
46820	if err := googleapi.CheckResponse(res); err != nil {
46821		return nil, err
46822	}
46823	ret := &VpnTunnel{
46824		ServerResponse: googleapi.ServerResponse{
46825			Header:         res.Header,
46826			HTTPStatusCode: res.StatusCode,
46827		},
46828	}
46829	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
46830		return nil, err
46831	}
46832	return ret, nil
46833	// {
46834	//   "description": "Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request.",
46835	//   "httpMethod": "GET",
46836	//   "id": "compute.vpnTunnels.get",
46837	//   "parameterOrder": [
46838	//     "project",
46839	//     "region",
46840	//     "vpnTunnel"
46841	//   ],
46842	//   "parameters": {
46843	//     "project": {
46844	//       "description": "Project ID for this request.",
46845	//       "location": "path",
46846	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46847	//       "required": true,
46848	//       "type": "string"
46849	//     },
46850	//     "region": {
46851	//       "description": "Name of the region for this request.",
46852	//       "location": "path",
46853	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46854	//       "required": true,
46855	//       "type": "string"
46856	//     },
46857	//     "vpnTunnel": {
46858	//       "description": "Name of the VpnTunnel resource to return.",
46859	//       "location": "path",
46860	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46861	//       "required": true,
46862	//       "type": "string"
46863	//     }
46864	//   },
46865	//   "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}",
46866	//   "response": {
46867	//     "$ref": "VpnTunnel"
46868	//   },
46869	//   "scopes": [
46870	//     "https://www.googleapis.com/auth/cloud-platform",
46871	//     "https://www.googleapis.com/auth/compute",
46872	//     "https://www.googleapis.com/auth/compute.readonly"
46873	//   ]
46874	// }
46875
46876}
46877
46878// method id "compute.vpnTunnels.insert":
46879
46880type VpnTunnelsInsertCall struct {
46881	s          *Service
46882	project    string
46883	region     string
46884	vpntunnel  *VpnTunnel
46885	urlParams_ gensupport.URLParams
46886	ctx_       context.Context
46887}
46888
46889// Insert: Creates a VpnTunnel resource in the specified project and
46890// region using the data included in the request.
46891func (r *VpnTunnelsService) Insert(project string, region string, vpntunnel *VpnTunnel) *VpnTunnelsInsertCall {
46892	c := &VpnTunnelsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
46893	c.project = project
46894	c.region = region
46895	c.vpntunnel = vpntunnel
46896	return c
46897}
46898
46899// Fields allows partial responses to be retrieved. See
46900// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
46901// for more information.
46902func (c *VpnTunnelsInsertCall) Fields(s ...googleapi.Field) *VpnTunnelsInsertCall {
46903	c.urlParams_.Set("fields", googleapi.CombineFields(s))
46904	return c
46905}
46906
46907// Context sets the context to be used in this call's Do method. Any
46908// pending HTTP request will be aborted if the provided context is
46909// canceled.
46910func (c *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall {
46911	c.ctx_ = ctx
46912	return c
46913}
46914
46915func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) {
46916	var body io.Reader = nil
46917	body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpntunnel)
46918	if err != nil {
46919		return nil, err
46920	}
46921	ctype := "application/json"
46922	c.urlParams_.Set("alt", alt)
46923	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels")
46924	urls += "?" + c.urlParams_.Encode()
46925	req, _ := http.NewRequest("POST", urls, body)
46926	googleapi.Expand(req.URL, map[string]string{
46927		"project": c.project,
46928		"region":  c.region,
46929	})
46930	req.Header.Set("Content-Type", ctype)
46931	req.Header.Set("User-Agent", c.s.userAgent())
46932	if c.ctx_ != nil {
46933		return ctxhttp.Do(c.ctx_, c.s.client, req)
46934	}
46935	return c.s.client.Do(req)
46936}
46937
46938// Do executes the "compute.vpnTunnels.insert" call.
46939// Exactly one of *Operation or error will be non-nil. Any non-2xx
46940// status code is an error. Response headers are in either
46941// *Operation.ServerResponse.Header or (if a response was returned at
46942// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
46943// to check whether the returned error was because
46944// http.StatusNotModified was returned.
46945func (c *VpnTunnelsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
46946	gensupport.SetOptions(c.urlParams_, opts...)
46947	res, err := c.doRequest("json")
46948	if res != nil && res.StatusCode == http.StatusNotModified {
46949		if res.Body != nil {
46950			res.Body.Close()
46951		}
46952		return nil, &googleapi.Error{
46953			Code:   res.StatusCode,
46954			Header: res.Header,
46955		}
46956	}
46957	if err != nil {
46958		return nil, err
46959	}
46960	defer googleapi.CloseBody(res)
46961	if err := googleapi.CheckResponse(res); err != nil {
46962		return nil, err
46963	}
46964	ret := &Operation{
46965		ServerResponse: googleapi.ServerResponse{
46966			Header:         res.Header,
46967			HTTPStatusCode: res.StatusCode,
46968		},
46969	}
46970	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
46971		return nil, err
46972	}
46973	return ret, nil
46974	// {
46975	//   "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.",
46976	//   "httpMethod": "POST",
46977	//   "id": "compute.vpnTunnels.insert",
46978	//   "parameterOrder": [
46979	//     "project",
46980	//     "region"
46981	//   ],
46982	//   "parameters": {
46983	//     "project": {
46984	//       "description": "Project ID for this request.",
46985	//       "location": "path",
46986	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
46987	//       "required": true,
46988	//       "type": "string"
46989	//     },
46990	//     "region": {
46991	//       "description": "Name of the region for this request.",
46992	//       "location": "path",
46993	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
46994	//       "required": true,
46995	//       "type": "string"
46996	//     }
46997	//   },
46998	//   "path": "{project}/regions/{region}/vpnTunnels",
46999	//   "request": {
47000	//     "$ref": "VpnTunnel"
47001	//   },
47002	//   "response": {
47003	//     "$ref": "Operation"
47004	//   },
47005	//   "scopes": [
47006	//     "https://www.googleapis.com/auth/cloud-platform",
47007	//     "https://www.googleapis.com/auth/compute"
47008	//   ]
47009	// }
47010
47011}
47012
47013// method id "compute.vpnTunnels.list":
47014
47015type VpnTunnelsListCall struct {
47016	s            *Service
47017	project      string
47018	region       string
47019	urlParams_   gensupport.URLParams
47020	ifNoneMatch_ string
47021	ctx_         context.Context
47022}
47023
47024// List: Retrieves a list of VpnTunnel resources contained in the
47025// specified project and region.
47026func (r *VpnTunnelsService) List(project string, region string) *VpnTunnelsListCall {
47027	c := &VpnTunnelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47028	c.project = project
47029	c.region = region
47030	return c
47031}
47032
47033// Filter sets the optional parameter "filter": Sets a filter expression
47034// for filtering listed resources, in the form filter={expression}. Your
47035// {expression} must be in the format: field_name comparison_string
47036// literal_string.
47037//
47038// The field_name is the name of the field you want to compare. Only
47039// atomic field types are supported (string, number, boolean). The
47040// comparison_string must be either eq (equals) or ne (not equals). The
47041// literal_string is the string value to filter to. The literal value
47042// must be valid for the type of field you are filtering by (string,
47043// number, boolean). For string fields, the literal value is interpreted
47044// as a regular expression using RE2 syntax. The literal value must
47045// match the entire field.
47046//
47047// For example, to filter for instances that do not have a name of
47048// example-instance, you would use filter=name ne
47049// example-instance.
47050//
47051// Compute Engine Beta API Only: If you use filtering in the Beta API,
47052// you can also filter on nested fields. For example, you could filter
47053// on instances that have set the scheduling.automaticRestart field to
47054// true. In particular, use filtering on nested fields to take advantage
47055// of instance labels to organize and filter results based on label
47056// values.
47057//
47058// The Beta API also supports filtering on multiple expressions by
47059// providing each separate expression within parentheses. For example,
47060// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
47061// Multiple expressions are treated as AND expressions, meaning that
47062// resources must match all expressions to pass the filters.
47063func (c *VpnTunnelsListCall) Filter(filter string) *VpnTunnelsListCall {
47064	c.urlParams_.Set("filter", filter)
47065	return c
47066}
47067
47068// MaxResults sets the optional parameter "maxResults": The maximum
47069// number of results per page that should be returned. If the number of
47070// available results is larger than maxResults, Compute Engine returns a
47071// nextPageToken that can be used to get the next page of results in
47072// subsequent list requests.
47073func (c *VpnTunnelsListCall) MaxResults(maxResults int64) *VpnTunnelsListCall {
47074	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47075	return c
47076}
47077
47078// OrderBy sets the optional parameter "orderBy": Sorts list results by
47079// a certain order. By default, results are returned in alphanumerical
47080// order based on the resource name.
47081//
47082// You can also sort results in descending order based on the creation
47083// timestamp using orderBy="creationTimestamp desc". This sorts results
47084// based on the creationTimestamp field in reverse chronological order
47085// (newest result first). Use this to sort resources like operations so
47086// that the newest operation is returned first.
47087//
47088// Currently, only sorting by name or creationTimestamp desc is
47089// supported.
47090func (c *VpnTunnelsListCall) OrderBy(orderBy string) *VpnTunnelsListCall {
47091	c.urlParams_.Set("orderBy", orderBy)
47092	return c
47093}
47094
47095// PageToken sets the optional parameter "pageToken": Specifies a page
47096// token to use. Set pageToken to the nextPageToken returned by a
47097// previous list request to get the next page of results.
47098func (c *VpnTunnelsListCall) PageToken(pageToken string) *VpnTunnelsListCall {
47099	c.urlParams_.Set("pageToken", pageToken)
47100	return c
47101}
47102
47103// Fields allows partial responses to be retrieved. See
47104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47105// for more information.
47106func (c *VpnTunnelsListCall) Fields(s ...googleapi.Field) *VpnTunnelsListCall {
47107	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47108	return c
47109}
47110
47111// IfNoneMatch sets the optional parameter which makes the operation
47112// fail if the object's ETag matches the given value. This is useful for
47113// getting updates only after the object has changed since the last
47114// request. Use googleapi.IsNotModified to check whether the response
47115// error from Do is the result of In-None-Match.
47116func (c *VpnTunnelsListCall) IfNoneMatch(entityTag string) *VpnTunnelsListCall {
47117	c.ifNoneMatch_ = entityTag
47118	return c
47119}
47120
47121// Context sets the context to be used in this call's Do method. Any
47122// pending HTTP request will be aborted if the provided context is
47123// canceled.
47124func (c *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall {
47125	c.ctx_ = ctx
47126	return c
47127}
47128
47129func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) {
47130	var body io.Reader = nil
47131	c.urlParams_.Set("alt", alt)
47132	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels")
47133	urls += "?" + c.urlParams_.Encode()
47134	req, _ := http.NewRequest("GET", urls, body)
47135	googleapi.Expand(req.URL, map[string]string{
47136		"project": c.project,
47137		"region":  c.region,
47138	})
47139	req.Header.Set("User-Agent", c.s.userAgent())
47140	if c.ifNoneMatch_ != "" {
47141		req.Header.Set("If-None-Match", c.ifNoneMatch_)
47142	}
47143	if c.ctx_ != nil {
47144		return ctxhttp.Do(c.ctx_, c.s.client, req)
47145	}
47146	return c.s.client.Do(req)
47147}
47148
47149// Do executes the "compute.vpnTunnels.list" call.
47150// Exactly one of *VpnTunnelList or error will be non-nil. Any non-2xx
47151// status code is an error. Response headers are in either
47152// *VpnTunnelList.ServerResponse.Header or (if a response was returned
47153// at all) in error.(*googleapi.Error).Header. Use
47154// googleapi.IsNotModified to check whether the returned error was
47155// because http.StatusNotModified was returned.
47156func (c *VpnTunnelsListCall) Do(opts ...googleapi.CallOption) (*VpnTunnelList, error) {
47157	gensupport.SetOptions(c.urlParams_, opts...)
47158	res, err := c.doRequest("json")
47159	if res != nil && res.StatusCode == http.StatusNotModified {
47160		if res.Body != nil {
47161			res.Body.Close()
47162		}
47163		return nil, &googleapi.Error{
47164			Code:   res.StatusCode,
47165			Header: res.Header,
47166		}
47167	}
47168	if err != nil {
47169		return nil, err
47170	}
47171	defer googleapi.CloseBody(res)
47172	if err := googleapi.CheckResponse(res); err != nil {
47173		return nil, err
47174	}
47175	ret := &VpnTunnelList{
47176		ServerResponse: googleapi.ServerResponse{
47177			Header:         res.Header,
47178			HTTPStatusCode: res.StatusCode,
47179		},
47180	}
47181	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
47182		return nil, err
47183	}
47184	return ret, nil
47185	// {
47186	//   "description": "Retrieves a list of VpnTunnel resources contained in the specified project and region.",
47187	//   "httpMethod": "GET",
47188	//   "id": "compute.vpnTunnels.list",
47189	//   "parameterOrder": [
47190	//     "project",
47191	//     "region"
47192	//   ],
47193	//   "parameters": {
47194	//     "filter": {
47195	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
47196	//       "location": "query",
47197	//       "type": "string"
47198	//     },
47199	//     "maxResults": {
47200	//       "default": "500",
47201	//       "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.",
47202	//       "format": "uint32",
47203	//       "location": "query",
47204	//       "maximum": "500",
47205	//       "minimum": "0",
47206	//       "type": "integer"
47207	//     },
47208	//     "orderBy": {
47209	//       "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.",
47210	//       "location": "query",
47211	//       "type": "string"
47212	//     },
47213	//     "pageToken": {
47214	//       "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.",
47215	//       "location": "query",
47216	//       "type": "string"
47217	//     },
47218	//     "project": {
47219	//       "description": "Project ID for this request.",
47220	//       "location": "path",
47221	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47222	//       "required": true,
47223	//       "type": "string"
47224	//     },
47225	//     "region": {
47226	//       "description": "Name of the region for this request.",
47227	//       "location": "path",
47228	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47229	//       "required": true,
47230	//       "type": "string"
47231	//     }
47232	//   },
47233	//   "path": "{project}/regions/{region}/vpnTunnels",
47234	//   "response": {
47235	//     "$ref": "VpnTunnelList"
47236	//   },
47237	//   "scopes": [
47238	//     "https://www.googleapis.com/auth/cloud-platform",
47239	//     "https://www.googleapis.com/auth/compute",
47240	//     "https://www.googleapis.com/auth/compute.readonly"
47241	//   ]
47242	// }
47243
47244}
47245
47246// Pages invokes f for each page of results.
47247// A non-nil error returned from f will halt the iteration.
47248// The provided context supersedes any context provided to the Context method.
47249func (c *VpnTunnelsListCall) Pages(ctx context.Context, f func(*VpnTunnelList) error) error {
47250	c.ctx_ = ctx
47251	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47252	for {
47253		x, err := c.Do()
47254		if err != nil {
47255			return err
47256		}
47257		if err := f(x); err != nil {
47258			return err
47259		}
47260		if x.NextPageToken == "" {
47261			return nil
47262		}
47263		c.PageToken(x.NextPageToken)
47264	}
47265}
47266
47267// method id "compute.vpnTunnels.testIamPermissions":
47268
47269type VpnTunnelsTestIamPermissionsCall struct {
47270	s                      *Service
47271	project                string
47272	region                 string
47273	resource               string
47274	testpermissionsrequest *TestPermissionsRequest
47275	urlParams_             gensupport.URLParams
47276	ctx_                   context.Context
47277}
47278
47279// TestIamPermissions: Returns permissions that a caller has on the
47280// specified resource.
47281func (r *VpnTunnelsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *VpnTunnelsTestIamPermissionsCall {
47282	c := &VpnTunnelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47283	c.project = project
47284	c.region = region
47285	c.resource = resource
47286	c.testpermissionsrequest = testpermissionsrequest
47287	return c
47288}
47289
47290// Fields allows partial responses to be retrieved. See
47291// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47292// for more information.
47293func (c *VpnTunnelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *VpnTunnelsTestIamPermissionsCall {
47294	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47295	return c
47296}
47297
47298// Context sets the context to be used in this call's Do method. Any
47299// pending HTTP request will be aborted if the provided context is
47300// canceled.
47301func (c *VpnTunnelsTestIamPermissionsCall) Context(ctx context.Context) *VpnTunnelsTestIamPermissionsCall {
47302	c.ctx_ = ctx
47303	return c
47304}
47305
47306func (c *VpnTunnelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
47307	var body io.Reader = nil
47308	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
47309	if err != nil {
47310		return nil, err
47311	}
47312	ctype := "application/json"
47313	c.urlParams_.Set("alt", alt)
47314	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions")
47315	urls += "?" + c.urlParams_.Encode()
47316	req, _ := http.NewRequest("POST", urls, body)
47317	googleapi.Expand(req.URL, map[string]string{
47318		"project":  c.project,
47319		"region":   c.region,
47320		"resource": c.resource,
47321	})
47322	req.Header.Set("Content-Type", ctype)
47323	req.Header.Set("User-Agent", c.s.userAgent())
47324	if c.ctx_ != nil {
47325		return ctxhttp.Do(c.ctx_, c.s.client, req)
47326	}
47327	return c.s.client.Do(req)
47328}
47329
47330// Do executes the "compute.vpnTunnels.testIamPermissions" call.
47331// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
47332// non-2xx status code is an error. Response headers are in either
47333// *TestPermissionsResponse.ServerResponse.Header or (if a response was
47334// returned at all) in error.(*googleapi.Error).Header. Use
47335// googleapi.IsNotModified to check whether the returned error was
47336// because http.StatusNotModified was returned.
47337func (c *VpnTunnelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
47338	gensupport.SetOptions(c.urlParams_, opts...)
47339	res, err := c.doRequest("json")
47340	if res != nil && res.StatusCode == http.StatusNotModified {
47341		if res.Body != nil {
47342			res.Body.Close()
47343		}
47344		return nil, &googleapi.Error{
47345			Code:   res.StatusCode,
47346			Header: res.Header,
47347		}
47348	}
47349	if err != nil {
47350		return nil, err
47351	}
47352	defer googleapi.CloseBody(res)
47353	if err := googleapi.CheckResponse(res); err != nil {
47354		return nil, err
47355	}
47356	ret := &TestPermissionsResponse{
47357		ServerResponse: googleapi.ServerResponse{
47358			Header:         res.Header,
47359			HTTPStatusCode: res.StatusCode,
47360		},
47361	}
47362	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
47363		return nil, err
47364	}
47365	return ret, nil
47366	// {
47367	//   "description": "Returns permissions that a caller has on the specified resource.",
47368	//   "httpMethod": "POST",
47369	//   "id": "compute.vpnTunnels.testIamPermissions",
47370	//   "parameterOrder": [
47371	//     "project",
47372	//     "region",
47373	//     "resource"
47374	//   ],
47375	//   "parameters": {
47376	//     "project": {
47377	//       "description": "Project ID for this request.",
47378	//       "location": "path",
47379	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47380	//       "required": true,
47381	//       "type": "string"
47382	//     },
47383	//     "region": {
47384	//       "description": "The name of the region for this request.",
47385	//       "location": "path",
47386	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47387	//       "required": true,
47388	//       "type": "string"
47389	//     },
47390	//     "resource": {
47391	//       "description": "Name of the resource for this request.",
47392	//       "location": "path",
47393	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47394	//       "required": true,
47395	//       "type": "string"
47396	//     }
47397	//   },
47398	//   "path": "{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions",
47399	//   "request": {
47400	//     "$ref": "TestPermissionsRequest"
47401	//   },
47402	//   "response": {
47403	//     "$ref": "TestPermissionsResponse"
47404	//   },
47405	//   "scopes": [
47406	//     "https://www.googleapis.com/auth/cloud-platform",
47407	//     "https://www.googleapis.com/auth/compute",
47408	//     "https://www.googleapis.com/auth/compute.readonly"
47409	//   ]
47410	// }
47411
47412}
47413
47414// method id "compute.zoneOperations.delete":
47415
47416type ZoneOperationsDeleteCall struct {
47417	s          *Service
47418	project    string
47419	zone       string
47420	operation  string
47421	urlParams_ gensupport.URLParams
47422	ctx_       context.Context
47423}
47424
47425// Delete: Deletes the specified zone-specific Operations resource.
47426// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/delete
47427func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall {
47428	c := &ZoneOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47429	c.project = project
47430	c.zone = zone
47431	c.operation = operation
47432	return c
47433}
47434
47435// Fields allows partial responses to be retrieved. See
47436// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47437// for more information.
47438func (c *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall {
47439	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47440	return c
47441}
47442
47443// Context sets the context to be used in this call's Do method. Any
47444// pending HTTP request will be aborted if the provided context is
47445// canceled.
47446func (c *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall {
47447	c.ctx_ = ctx
47448	return c
47449}
47450
47451func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
47452	var body io.Reader = nil
47453	c.urlParams_.Set("alt", alt)
47454	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}")
47455	urls += "?" + c.urlParams_.Encode()
47456	req, _ := http.NewRequest("DELETE", urls, body)
47457	googleapi.Expand(req.URL, map[string]string{
47458		"project":   c.project,
47459		"zone":      c.zone,
47460		"operation": c.operation,
47461	})
47462	req.Header.Set("User-Agent", c.s.userAgent())
47463	if c.ctx_ != nil {
47464		return ctxhttp.Do(c.ctx_, c.s.client, req)
47465	}
47466	return c.s.client.Do(req)
47467}
47468
47469// Do executes the "compute.zoneOperations.delete" call.
47470func (c *ZoneOperationsDeleteCall) Do(opts ...googleapi.CallOption) error {
47471	gensupport.SetOptions(c.urlParams_, opts...)
47472	res, err := c.doRequest("json")
47473	if err != nil {
47474		return err
47475	}
47476	defer googleapi.CloseBody(res)
47477	if err := googleapi.CheckResponse(res); err != nil {
47478		return err
47479	}
47480	return nil
47481	// {
47482	//   "description": "Deletes the specified zone-specific Operations resource.",
47483	//   "httpMethod": "DELETE",
47484	//   "id": "compute.zoneOperations.delete",
47485	//   "parameterOrder": [
47486	//     "project",
47487	//     "zone",
47488	//     "operation"
47489	//   ],
47490	//   "parameters": {
47491	//     "operation": {
47492	//       "description": "Name of the Operations resource to delete.",
47493	//       "location": "path",
47494	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47495	//       "required": true,
47496	//       "type": "string"
47497	//     },
47498	//     "project": {
47499	//       "description": "Project ID for this request.",
47500	//       "location": "path",
47501	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47502	//       "required": true,
47503	//       "type": "string"
47504	//     },
47505	//     "zone": {
47506	//       "description": "Name of the zone for this request.",
47507	//       "location": "path",
47508	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47509	//       "required": true,
47510	//       "type": "string"
47511	//     }
47512	//   },
47513	//   "path": "{project}/zones/{zone}/operations/{operation}",
47514	//   "scopes": [
47515	//     "https://www.googleapis.com/auth/cloud-platform",
47516	//     "https://www.googleapis.com/auth/compute"
47517	//   ]
47518	// }
47519
47520}
47521
47522// method id "compute.zoneOperations.get":
47523
47524type ZoneOperationsGetCall struct {
47525	s            *Service
47526	project      string
47527	zone         string
47528	operation    string
47529	urlParams_   gensupport.URLParams
47530	ifNoneMatch_ string
47531	ctx_         context.Context
47532}
47533
47534// Get: Retrieves the specified zone-specific Operations resource.
47535// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/get
47536func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall {
47537	c := &ZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47538	c.project = project
47539	c.zone = zone
47540	c.operation = operation
47541	return c
47542}
47543
47544// Fields allows partial responses to be retrieved. See
47545// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47546// for more information.
47547func (c *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall {
47548	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47549	return c
47550}
47551
47552// IfNoneMatch sets the optional parameter which makes the operation
47553// fail if the object's ETag matches the given value. This is useful for
47554// getting updates only after the object has changed since the last
47555// request. Use googleapi.IsNotModified to check whether the response
47556// error from Do is the result of In-None-Match.
47557func (c *ZoneOperationsGetCall) IfNoneMatch(entityTag string) *ZoneOperationsGetCall {
47558	c.ifNoneMatch_ = entityTag
47559	return c
47560}
47561
47562// Context sets the context to be used in this call's Do method. Any
47563// pending HTTP request will be aborted if the provided context is
47564// canceled.
47565func (c *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall {
47566	c.ctx_ = ctx
47567	return c
47568}
47569
47570func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
47571	var body io.Reader = nil
47572	c.urlParams_.Set("alt", alt)
47573	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}")
47574	urls += "?" + c.urlParams_.Encode()
47575	req, _ := http.NewRequest("GET", urls, body)
47576	googleapi.Expand(req.URL, map[string]string{
47577		"project":   c.project,
47578		"zone":      c.zone,
47579		"operation": c.operation,
47580	})
47581	req.Header.Set("User-Agent", c.s.userAgent())
47582	if c.ifNoneMatch_ != "" {
47583		req.Header.Set("If-None-Match", c.ifNoneMatch_)
47584	}
47585	if c.ctx_ != nil {
47586		return ctxhttp.Do(c.ctx_, c.s.client, req)
47587	}
47588	return c.s.client.Do(req)
47589}
47590
47591// Do executes the "compute.zoneOperations.get" call.
47592// Exactly one of *Operation or error will be non-nil. Any non-2xx
47593// status code is an error. Response headers are in either
47594// *Operation.ServerResponse.Header or (if a response was returned at
47595// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
47596// to check whether the returned error was because
47597// http.StatusNotModified was returned.
47598func (c *ZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
47599	gensupport.SetOptions(c.urlParams_, opts...)
47600	res, err := c.doRequest("json")
47601	if res != nil && res.StatusCode == http.StatusNotModified {
47602		if res.Body != nil {
47603			res.Body.Close()
47604		}
47605		return nil, &googleapi.Error{
47606			Code:   res.StatusCode,
47607			Header: res.Header,
47608		}
47609	}
47610	if err != nil {
47611		return nil, err
47612	}
47613	defer googleapi.CloseBody(res)
47614	if err := googleapi.CheckResponse(res); err != nil {
47615		return nil, err
47616	}
47617	ret := &Operation{
47618		ServerResponse: googleapi.ServerResponse{
47619			Header:         res.Header,
47620			HTTPStatusCode: res.StatusCode,
47621		},
47622	}
47623	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
47624		return nil, err
47625	}
47626	return ret, nil
47627	// {
47628	//   "description": "Retrieves the specified zone-specific Operations resource.",
47629	//   "httpMethod": "GET",
47630	//   "id": "compute.zoneOperations.get",
47631	//   "parameterOrder": [
47632	//     "project",
47633	//     "zone",
47634	//     "operation"
47635	//   ],
47636	//   "parameters": {
47637	//     "operation": {
47638	//       "description": "Name of the Operations resource to return.",
47639	//       "location": "path",
47640	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47641	//       "required": true,
47642	//       "type": "string"
47643	//     },
47644	//     "project": {
47645	//       "description": "Project ID for this request.",
47646	//       "location": "path",
47647	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47648	//       "required": true,
47649	//       "type": "string"
47650	//     },
47651	//     "zone": {
47652	//       "description": "Name of the zone for this request.",
47653	//       "location": "path",
47654	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47655	//       "required": true,
47656	//       "type": "string"
47657	//     }
47658	//   },
47659	//   "path": "{project}/zones/{zone}/operations/{operation}",
47660	//   "response": {
47661	//     "$ref": "Operation"
47662	//   },
47663	//   "scopes": [
47664	//     "https://www.googleapis.com/auth/cloud-platform",
47665	//     "https://www.googleapis.com/auth/compute",
47666	//     "https://www.googleapis.com/auth/compute.readonly"
47667	//   ]
47668	// }
47669
47670}
47671
47672// method id "compute.zoneOperations.list":
47673
47674type ZoneOperationsListCall struct {
47675	s            *Service
47676	project      string
47677	zone         string
47678	urlParams_   gensupport.URLParams
47679	ifNoneMatch_ string
47680	ctx_         context.Context
47681}
47682
47683// List: Retrieves a list of Operation resources contained within the
47684// specified zone.
47685// For details, see https://cloud.google.com/compute/docs/reference/latest/zoneOperations/list
47686func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall {
47687	c := &ZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47688	c.project = project
47689	c.zone = zone
47690	return c
47691}
47692
47693// Filter sets the optional parameter "filter": Sets a filter expression
47694// for filtering listed resources, in the form filter={expression}. Your
47695// {expression} must be in the format: field_name comparison_string
47696// literal_string.
47697//
47698// The field_name is the name of the field you want to compare. Only
47699// atomic field types are supported (string, number, boolean). The
47700// comparison_string must be either eq (equals) or ne (not equals). The
47701// literal_string is the string value to filter to. The literal value
47702// must be valid for the type of field you are filtering by (string,
47703// number, boolean). For string fields, the literal value is interpreted
47704// as a regular expression using RE2 syntax. The literal value must
47705// match the entire field.
47706//
47707// For example, to filter for instances that do not have a name of
47708// example-instance, you would use filter=name ne
47709// example-instance.
47710//
47711// Compute Engine Beta API Only: If you use filtering in the Beta API,
47712// you can also filter on nested fields. For example, you could filter
47713// on instances that have set the scheduling.automaticRestart field to
47714// true. In particular, use filtering on nested fields to take advantage
47715// of instance labels to organize and filter results based on label
47716// values.
47717//
47718// The Beta API also supports filtering on multiple expressions by
47719// providing each separate expression within parentheses. For example,
47720// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
47721// Multiple expressions are treated as AND expressions, meaning that
47722// resources must match all expressions to pass the filters.
47723func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall {
47724	c.urlParams_.Set("filter", filter)
47725	return c
47726}
47727
47728// MaxResults sets the optional parameter "maxResults": The maximum
47729// number of results per page that should be returned. If the number of
47730// available results is larger than maxResults, Compute Engine returns a
47731// nextPageToken that can be used to get the next page of results in
47732// subsequent list requests.
47733func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall {
47734	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
47735	return c
47736}
47737
47738// OrderBy sets the optional parameter "orderBy": Sorts list results by
47739// a certain order. By default, results are returned in alphanumerical
47740// order based on the resource name.
47741//
47742// You can also sort results in descending order based on the creation
47743// timestamp using orderBy="creationTimestamp desc". This sorts results
47744// based on the creationTimestamp field in reverse chronological order
47745// (newest result first). Use this to sort resources like operations so
47746// that the newest operation is returned first.
47747//
47748// Currently, only sorting by name or creationTimestamp desc is
47749// supported.
47750func (c *ZoneOperationsListCall) OrderBy(orderBy string) *ZoneOperationsListCall {
47751	c.urlParams_.Set("orderBy", orderBy)
47752	return c
47753}
47754
47755// PageToken sets the optional parameter "pageToken": Specifies a page
47756// token to use. Set pageToken to the nextPageToken returned by a
47757// previous list request to get the next page of results.
47758func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall {
47759	c.urlParams_.Set("pageToken", pageToken)
47760	return c
47761}
47762
47763// Fields allows partial responses to be retrieved. See
47764// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47765// for more information.
47766func (c *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall {
47767	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47768	return c
47769}
47770
47771// IfNoneMatch sets the optional parameter which makes the operation
47772// fail if the object's ETag matches the given value. This is useful for
47773// getting updates only after the object has changed since the last
47774// request. Use googleapi.IsNotModified to check whether the response
47775// error from Do is the result of In-None-Match.
47776func (c *ZoneOperationsListCall) IfNoneMatch(entityTag string) *ZoneOperationsListCall {
47777	c.ifNoneMatch_ = entityTag
47778	return c
47779}
47780
47781// Context sets the context to be used in this call's Do method. Any
47782// pending HTTP request will be aborted if the provided context is
47783// canceled.
47784func (c *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall {
47785	c.ctx_ = ctx
47786	return c
47787}
47788
47789func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
47790	var body io.Reader = nil
47791	c.urlParams_.Set("alt", alt)
47792	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations")
47793	urls += "?" + c.urlParams_.Encode()
47794	req, _ := http.NewRequest("GET", urls, body)
47795	googleapi.Expand(req.URL, map[string]string{
47796		"project": c.project,
47797		"zone":    c.zone,
47798	})
47799	req.Header.Set("User-Agent", c.s.userAgent())
47800	if c.ifNoneMatch_ != "" {
47801		req.Header.Set("If-None-Match", c.ifNoneMatch_)
47802	}
47803	if c.ctx_ != nil {
47804		return ctxhttp.Do(c.ctx_, c.s.client, req)
47805	}
47806	return c.s.client.Do(req)
47807}
47808
47809// Do executes the "compute.zoneOperations.list" call.
47810// Exactly one of *OperationList or error will be non-nil. Any non-2xx
47811// status code is an error. Response headers are in either
47812// *OperationList.ServerResponse.Header or (if a response was returned
47813// at all) in error.(*googleapi.Error).Header. Use
47814// googleapi.IsNotModified to check whether the returned error was
47815// because http.StatusNotModified was returned.
47816func (c *ZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*OperationList, error) {
47817	gensupport.SetOptions(c.urlParams_, opts...)
47818	res, err := c.doRequest("json")
47819	if res != nil && res.StatusCode == http.StatusNotModified {
47820		if res.Body != nil {
47821			res.Body.Close()
47822		}
47823		return nil, &googleapi.Error{
47824			Code:   res.StatusCode,
47825			Header: res.Header,
47826		}
47827	}
47828	if err != nil {
47829		return nil, err
47830	}
47831	defer googleapi.CloseBody(res)
47832	if err := googleapi.CheckResponse(res); err != nil {
47833		return nil, err
47834	}
47835	ret := &OperationList{
47836		ServerResponse: googleapi.ServerResponse{
47837			Header:         res.Header,
47838			HTTPStatusCode: res.StatusCode,
47839		},
47840	}
47841	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
47842		return nil, err
47843	}
47844	return ret, nil
47845	// {
47846	//   "description": "Retrieves a list of Operation resources contained within the specified zone.",
47847	//   "httpMethod": "GET",
47848	//   "id": "compute.zoneOperations.list",
47849	//   "parameterOrder": [
47850	//     "project",
47851	//     "zone"
47852	//   ],
47853	//   "parameters": {
47854	//     "filter": {
47855	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
47856	//       "location": "query",
47857	//       "type": "string"
47858	//     },
47859	//     "maxResults": {
47860	//       "default": "500",
47861	//       "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.",
47862	//       "format": "uint32",
47863	//       "location": "query",
47864	//       "maximum": "500",
47865	//       "minimum": "0",
47866	//       "type": "integer"
47867	//     },
47868	//     "orderBy": {
47869	//       "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.",
47870	//       "location": "query",
47871	//       "type": "string"
47872	//     },
47873	//     "pageToken": {
47874	//       "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.",
47875	//       "location": "query",
47876	//       "type": "string"
47877	//     },
47878	//     "project": {
47879	//       "description": "Project ID for this request.",
47880	//       "location": "path",
47881	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
47882	//       "required": true,
47883	//       "type": "string"
47884	//     },
47885	//     "zone": {
47886	//       "description": "Name of the zone for request.",
47887	//       "location": "path",
47888	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
47889	//       "required": true,
47890	//       "type": "string"
47891	//     }
47892	//   },
47893	//   "path": "{project}/zones/{zone}/operations",
47894	//   "response": {
47895	//     "$ref": "OperationList"
47896	//   },
47897	//   "scopes": [
47898	//     "https://www.googleapis.com/auth/cloud-platform",
47899	//     "https://www.googleapis.com/auth/compute",
47900	//     "https://www.googleapis.com/auth/compute.readonly"
47901	//   ]
47902	// }
47903
47904}
47905
47906// Pages invokes f for each page of results.
47907// A non-nil error returned from f will halt the iteration.
47908// The provided context supersedes any context provided to the Context method.
47909func (c *ZoneOperationsListCall) Pages(ctx context.Context, f func(*OperationList) error) error {
47910	c.ctx_ = ctx
47911	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
47912	for {
47913		x, err := c.Do()
47914		if err != nil {
47915			return err
47916		}
47917		if err := f(x); err != nil {
47918			return err
47919		}
47920		if x.NextPageToken == "" {
47921			return nil
47922		}
47923		c.PageToken(x.NextPageToken)
47924	}
47925}
47926
47927// method id "compute.zones.get":
47928
47929type ZonesGetCall struct {
47930	s            *Service
47931	project      string
47932	zone         string
47933	urlParams_   gensupport.URLParams
47934	ifNoneMatch_ string
47935	ctx_         context.Context
47936}
47937
47938// Get: Returns the specified Zone resource. Get a list of available
47939// zones by making a list() request.
47940// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/get
47941func (r *ZonesService) Get(project string, zone string) *ZonesGetCall {
47942	c := &ZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
47943	c.project = project
47944	c.zone = zone
47945	return c
47946}
47947
47948// Fields allows partial responses to be retrieved. See
47949// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
47950// for more information.
47951func (c *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall {
47952	c.urlParams_.Set("fields", googleapi.CombineFields(s))
47953	return c
47954}
47955
47956// IfNoneMatch sets the optional parameter which makes the operation
47957// fail if the object's ETag matches the given value. This is useful for
47958// getting updates only after the object has changed since the last
47959// request. Use googleapi.IsNotModified to check whether the response
47960// error from Do is the result of In-None-Match.
47961func (c *ZonesGetCall) IfNoneMatch(entityTag string) *ZonesGetCall {
47962	c.ifNoneMatch_ = entityTag
47963	return c
47964}
47965
47966// Context sets the context to be used in this call's Do method. Any
47967// pending HTTP request will be aborted if the provided context is
47968// canceled.
47969func (c *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall {
47970	c.ctx_ = ctx
47971	return c
47972}
47973
47974func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) {
47975	var body io.Reader = nil
47976	c.urlParams_.Set("alt", alt)
47977	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}")
47978	urls += "?" + c.urlParams_.Encode()
47979	req, _ := http.NewRequest("GET", urls, body)
47980	googleapi.Expand(req.URL, map[string]string{
47981		"project": c.project,
47982		"zone":    c.zone,
47983	})
47984	req.Header.Set("User-Agent", c.s.userAgent())
47985	if c.ifNoneMatch_ != "" {
47986		req.Header.Set("If-None-Match", c.ifNoneMatch_)
47987	}
47988	if c.ctx_ != nil {
47989		return ctxhttp.Do(c.ctx_, c.s.client, req)
47990	}
47991	return c.s.client.Do(req)
47992}
47993
47994// Do executes the "compute.zones.get" call.
47995// Exactly one of *Zone or error will be non-nil. Any non-2xx status
47996// code is an error. Response headers are in either
47997// *Zone.ServerResponse.Header or (if a response was returned at all) in
47998// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
47999// whether the returned error was because http.StatusNotModified was
48000// returned.
48001func (c *ZonesGetCall) Do(opts ...googleapi.CallOption) (*Zone, error) {
48002	gensupport.SetOptions(c.urlParams_, opts...)
48003	res, err := c.doRequest("json")
48004	if res != nil && res.StatusCode == http.StatusNotModified {
48005		if res.Body != nil {
48006			res.Body.Close()
48007		}
48008		return nil, &googleapi.Error{
48009			Code:   res.StatusCode,
48010			Header: res.Header,
48011		}
48012	}
48013	if err != nil {
48014		return nil, err
48015	}
48016	defer googleapi.CloseBody(res)
48017	if err := googleapi.CheckResponse(res); err != nil {
48018		return nil, err
48019	}
48020	ret := &Zone{
48021		ServerResponse: googleapi.ServerResponse{
48022			Header:         res.Header,
48023			HTTPStatusCode: res.StatusCode,
48024		},
48025	}
48026	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
48027		return nil, err
48028	}
48029	return ret, nil
48030	// {
48031	//   "description": "Returns the specified Zone resource. Get a list of available zones by making a list() request.",
48032	//   "httpMethod": "GET",
48033	//   "id": "compute.zones.get",
48034	//   "parameterOrder": [
48035	//     "project",
48036	//     "zone"
48037	//   ],
48038	//   "parameters": {
48039	//     "project": {
48040	//       "description": "Project ID for this request.",
48041	//       "location": "path",
48042	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
48043	//       "required": true,
48044	//       "type": "string"
48045	//     },
48046	//     "zone": {
48047	//       "description": "Name of the zone resource to return.",
48048	//       "location": "path",
48049	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
48050	//       "required": true,
48051	//       "type": "string"
48052	//     }
48053	//   },
48054	//   "path": "{project}/zones/{zone}",
48055	//   "response": {
48056	//     "$ref": "Zone"
48057	//   },
48058	//   "scopes": [
48059	//     "https://www.googleapis.com/auth/cloud-platform",
48060	//     "https://www.googleapis.com/auth/compute",
48061	//     "https://www.googleapis.com/auth/compute.readonly"
48062	//   ]
48063	// }
48064
48065}
48066
48067// method id "compute.zones.list":
48068
48069type ZonesListCall struct {
48070	s            *Service
48071	project      string
48072	urlParams_   gensupport.URLParams
48073	ifNoneMatch_ string
48074	ctx_         context.Context
48075}
48076
48077// List: Retrieves the list of Zone resources available to the specified
48078// project.
48079// For details, see https://cloud.google.com/compute/docs/reference/latest/zones/list
48080func (r *ZonesService) List(project string) *ZonesListCall {
48081	c := &ZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
48082	c.project = project
48083	return c
48084}
48085
48086// Filter sets the optional parameter "filter": Sets a filter expression
48087// for filtering listed resources, in the form filter={expression}. Your
48088// {expression} must be in the format: field_name comparison_string
48089// literal_string.
48090//
48091// The field_name is the name of the field you want to compare. Only
48092// atomic field types are supported (string, number, boolean). The
48093// comparison_string must be either eq (equals) or ne (not equals). The
48094// literal_string is the string value to filter to. The literal value
48095// must be valid for the type of field you are filtering by (string,
48096// number, boolean). For string fields, the literal value is interpreted
48097// as a regular expression using RE2 syntax. The literal value must
48098// match the entire field.
48099//
48100// For example, to filter for instances that do not have a name of
48101// example-instance, you would use filter=name ne
48102// example-instance.
48103//
48104// Compute Engine Beta API Only: If you use filtering in the Beta API,
48105// you can also filter on nested fields. For example, you could filter
48106// on instances that have set the scheduling.automaticRestart field to
48107// true. In particular, use filtering on nested fields to take advantage
48108// of instance labels to organize and filter results based on label
48109// values.
48110//
48111// The Beta API also supports filtering on multiple expressions by
48112// providing each separate expression within parentheses. For example,
48113// (scheduling.automaticRestart eq true) (zone eq us-central1-f).
48114// Multiple expressions are treated as AND expressions, meaning that
48115// resources must match all expressions to pass the filters.
48116func (c *ZonesListCall) Filter(filter string) *ZonesListCall {
48117	c.urlParams_.Set("filter", filter)
48118	return c
48119}
48120
48121// MaxResults sets the optional parameter "maxResults": The maximum
48122// number of results per page that should be returned. If the number of
48123// available results is larger than maxResults, Compute Engine returns a
48124// nextPageToken that can be used to get the next page of results in
48125// subsequent list requests.
48126func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall {
48127	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
48128	return c
48129}
48130
48131// OrderBy sets the optional parameter "orderBy": Sorts list results by
48132// a certain order. By default, results are returned in alphanumerical
48133// order based on the resource name.
48134//
48135// You can also sort results in descending order based on the creation
48136// timestamp using orderBy="creationTimestamp desc". This sorts results
48137// based on the creationTimestamp field in reverse chronological order
48138// (newest result first). Use this to sort resources like operations so
48139// that the newest operation is returned first.
48140//
48141// Currently, only sorting by name or creationTimestamp desc is
48142// supported.
48143func (c *ZonesListCall) OrderBy(orderBy string) *ZonesListCall {
48144	c.urlParams_.Set("orderBy", orderBy)
48145	return c
48146}
48147
48148// PageToken sets the optional parameter "pageToken": Specifies a page
48149// token to use. Set pageToken to the nextPageToken returned by a
48150// previous list request to get the next page of results.
48151func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall {
48152	c.urlParams_.Set("pageToken", pageToken)
48153	return c
48154}
48155
48156// Fields allows partial responses to be retrieved. See
48157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
48158// for more information.
48159func (c *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall {
48160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
48161	return c
48162}
48163
48164// IfNoneMatch sets the optional parameter which makes the operation
48165// fail if the object's ETag matches the given value. This is useful for
48166// getting updates only after the object has changed since the last
48167// request. Use googleapi.IsNotModified to check whether the response
48168// error from Do is the result of In-None-Match.
48169func (c *ZonesListCall) IfNoneMatch(entityTag string) *ZonesListCall {
48170	c.ifNoneMatch_ = entityTag
48171	return c
48172}
48173
48174// Context sets the context to be used in this call's Do method. Any
48175// pending HTTP request will be aborted if the provided context is
48176// canceled.
48177func (c *ZonesListCall) Context(ctx context.Context) *ZonesListCall {
48178	c.ctx_ = ctx
48179	return c
48180}
48181
48182func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) {
48183	var body io.Reader = nil
48184	c.urlParams_.Set("alt", alt)
48185	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones")
48186	urls += "?" + c.urlParams_.Encode()
48187	req, _ := http.NewRequest("GET", urls, body)
48188	googleapi.Expand(req.URL, map[string]string{
48189		"project": c.project,
48190	})
48191	req.Header.Set("User-Agent", c.s.userAgent())
48192	if c.ifNoneMatch_ != "" {
48193		req.Header.Set("If-None-Match", c.ifNoneMatch_)
48194	}
48195	if c.ctx_ != nil {
48196		return ctxhttp.Do(c.ctx_, c.s.client, req)
48197	}
48198	return c.s.client.Do(req)
48199}
48200
48201// Do executes the "compute.zones.list" call.
48202// Exactly one of *ZoneList or error will be non-nil. Any non-2xx status
48203// code is an error. Response headers are in either
48204// *ZoneList.ServerResponse.Header or (if a response was returned at
48205// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
48206// to check whether the returned error was because
48207// http.StatusNotModified was returned.
48208func (c *ZonesListCall) Do(opts ...googleapi.CallOption) (*ZoneList, error) {
48209	gensupport.SetOptions(c.urlParams_, opts...)
48210	res, err := c.doRequest("json")
48211	if res != nil && res.StatusCode == http.StatusNotModified {
48212		if res.Body != nil {
48213			res.Body.Close()
48214		}
48215		return nil, &googleapi.Error{
48216			Code:   res.StatusCode,
48217			Header: res.Header,
48218		}
48219	}
48220	if err != nil {
48221		return nil, err
48222	}
48223	defer googleapi.CloseBody(res)
48224	if err := googleapi.CheckResponse(res); err != nil {
48225		return nil, err
48226	}
48227	ret := &ZoneList{
48228		ServerResponse: googleapi.ServerResponse{
48229			Header:         res.Header,
48230			HTTPStatusCode: res.StatusCode,
48231		},
48232	}
48233	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
48234		return nil, err
48235	}
48236	return ret, nil
48237	// {
48238	//   "description": "Retrieves the list of Zone resources available to the specified project.",
48239	//   "httpMethod": "GET",
48240	//   "id": "compute.zones.list",
48241	//   "parameterOrder": [
48242	//     "project"
48243	//   ],
48244	//   "parameters": {
48245	//     "filter": {
48246	//       "description": "Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.\n\nCompute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values.\n\nThe Beta API also supports filtering on multiple expressions by providing each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.",
48247	//       "location": "query",
48248	//       "type": "string"
48249	//     },
48250	//     "maxResults": {
48251	//       "default": "500",
48252	//       "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.",
48253	//       "format": "uint32",
48254	//       "location": "query",
48255	//       "maximum": "500",
48256	//       "minimum": "0",
48257	//       "type": "integer"
48258	//     },
48259	//     "orderBy": {
48260	//       "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.",
48261	//       "location": "query",
48262	//       "type": "string"
48263	//     },
48264	//     "pageToken": {
48265	//       "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.",
48266	//       "location": "query",
48267	//       "type": "string"
48268	//     },
48269	//     "project": {
48270	//       "description": "Project ID for this request.",
48271	//       "location": "path",
48272	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
48273	//       "required": true,
48274	//       "type": "string"
48275	//     }
48276	//   },
48277	//   "path": "{project}/zones",
48278	//   "response": {
48279	//     "$ref": "ZoneList"
48280	//   },
48281	//   "scopes": [
48282	//     "https://www.googleapis.com/auth/cloud-platform",
48283	//     "https://www.googleapis.com/auth/compute",
48284	//     "https://www.googleapis.com/auth/compute.readonly"
48285	//   ]
48286	// }
48287
48288}
48289
48290// Pages invokes f for each page of results.
48291// A non-nil error returned from f will halt the iteration.
48292// The provided context supersedes any context provided to the Context method.
48293func (c *ZonesListCall) Pages(ctx context.Context, f func(*ZoneList) error) error {
48294	c.ctx_ = ctx
48295	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
48296	for {
48297		x, err := c.Do()
48298		if err != nil {
48299			return err
48300		}
48301		if err := f(x); err != nil {
48302			return err
48303		}
48304		if x.NextPageToken == "" {
48305			return nil
48306		}
48307		c.PageToken(x.NextPageToken)
48308	}
48309}
48310