1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package deploymentmanager provides access to the Google Cloud Deployment Manager API.
8//
9// For product documentation, see: https://cloud.google.com/deployment-manager/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/deploymentmanager/v2"
16//   ...
17//   ctx := context.Background()
18//   deploymentmanagerService, err := deploymentmanager.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithScopes(deploymentmanager.NdevCloudmanReadonlyScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   deploymentmanagerService, err := deploymentmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package deploymentmanager // import "google.golang.org/api/deploymentmanager/v2"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	gensupport "google.golang.org/api/gensupport"
57	googleapi "google.golang.org/api/googleapi"
58	option "google.golang.org/api/option"
59	htransport "google.golang.org/api/transport/http"
60)
61
62// Always reference these packages, just in case the auto-generated code
63// below doesn't.
64var _ = bytes.NewBuffer
65var _ = strconv.Itoa
66var _ = fmt.Sprintf
67var _ = json.NewDecoder
68var _ = io.Copy
69var _ = url.Parse
70var _ = gensupport.MarshalJSON
71var _ = googleapi.Version
72var _ = errors.New
73var _ = strings.Replace
74var _ = context.Canceled
75
76const apiId = "deploymentmanager:v2"
77const apiName = "deploymentmanager"
78const apiVersion = "v2"
79const basePath = "https://www.googleapis.com/deploymentmanager/v2/projects/"
80
81// OAuth2 scopes used by this API.
82const (
83	// View and manage your data across Google Cloud Platform services
84	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
85
86	// View your data across Google Cloud Platform services
87	CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
88
89	// View and manage your Google Cloud Platform management resources and
90	// deployment status information
91	NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudman"
92
93	// View your Google Cloud Platform management resources and deployment
94	// status information
95	NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev.cloudman.readonly"
96)
97
98// NewService creates a new Service.
99func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
100	scopesOption := option.WithScopes(
101		"https://www.googleapis.com/auth/cloud-platform",
102		"https://www.googleapis.com/auth/cloud-platform.read-only",
103		"https://www.googleapis.com/auth/ndev.cloudman",
104		"https://www.googleapis.com/auth/ndev.cloudman.readonly",
105	)
106	// NOTE: prepend, so we don't override user-specified scopes.
107	opts = append([]option.ClientOption{scopesOption}, opts...)
108	client, endpoint, err := htransport.NewClient(ctx, opts...)
109	if err != nil {
110		return nil, err
111	}
112	s, err := New(client)
113	if err != nil {
114		return nil, err
115	}
116	if endpoint != "" {
117		s.BasePath = endpoint
118	}
119	return s, nil
120}
121
122// New creates a new Service. It uses the provided http.Client for requests.
123//
124// Deprecated: please use NewService instead.
125// To provide a custom HTTP client, use option.WithHTTPClient.
126// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
127func New(client *http.Client) (*Service, error) {
128	if client == nil {
129		return nil, errors.New("client is nil")
130	}
131	s := &Service{client: client, BasePath: basePath}
132	s.Deployments = NewDeploymentsService(s)
133	s.Manifests = NewManifestsService(s)
134	s.Operations = NewOperationsService(s)
135	s.Resources = NewResourcesService(s)
136	s.Types = NewTypesService(s)
137	return s, nil
138}
139
140type Service struct {
141	client    *http.Client
142	BasePath  string // API endpoint base URL
143	UserAgent string // optional additional User-Agent fragment
144
145	Deployments *DeploymentsService
146
147	Manifests *ManifestsService
148
149	Operations *OperationsService
150
151	Resources *ResourcesService
152
153	Types *TypesService
154}
155
156func (s *Service) userAgent() string {
157	if s.UserAgent == "" {
158		return googleapi.UserAgent
159	}
160	return googleapi.UserAgent + " " + s.UserAgent
161}
162
163func NewDeploymentsService(s *Service) *DeploymentsService {
164	rs := &DeploymentsService{s: s}
165	return rs
166}
167
168type DeploymentsService struct {
169	s *Service
170}
171
172func NewManifestsService(s *Service) *ManifestsService {
173	rs := &ManifestsService{s: s}
174	return rs
175}
176
177type ManifestsService struct {
178	s *Service
179}
180
181func NewOperationsService(s *Service) *OperationsService {
182	rs := &OperationsService{s: s}
183	return rs
184}
185
186type OperationsService struct {
187	s *Service
188}
189
190func NewResourcesService(s *Service) *ResourcesService {
191	rs := &ResourcesService{s: s}
192	return rs
193}
194
195type ResourcesService struct {
196	s *Service
197}
198
199func NewTypesService(s *Service) *TypesService {
200	rs := &TypesService{s: s}
201	return rs
202}
203
204type TypesService struct {
205	s *Service
206}
207
208// AuditConfig: Specifies the audit configuration for a service. The
209// configuration determines which permission types are logged, and what
210// identities, if any, are exempted from logging. An AuditConfig must
211// have one or more AuditLogConfigs.
212//
213// If there are AuditConfigs for both `allServices` and a specific
214// service, the union of the two AuditConfigs is used for that service:
215// the log_types specified in each AuditConfig are enabled, and the
216// exempted_members in each AuditLogConfig are exempted.
217//
218// Example Policy with multiple AuditConfigs:
219//
220// { "audit_configs": [ { "service": "allServices" "audit_log_configs":
221// [ { "log_type": "DATA_READ", "exempted_members": [
222// "user:foo@gmail.com" ] }, { "log_type": "DATA_WRITE", }, {
223// "log_type": "ADMIN_READ", } ] }, { "service":
224// "fooservice.googleapis.com" "audit_log_configs": [ { "log_type":
225// "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [
226// "user:bar@gmail.com" ] } ] } ] }
227//
228// For fooservice, this policy enables DATA_READ, DATA_WRITE and
229// ADMIN_READ logging. It also exempts foo@gmail.com from DATA_READ
230// logging, and bar@gmail.com from DATA_WRITE logging.
231type AuditConfig struct {
232	// AuditLogConfigs: The configuration for logging of each type of
233	// permission.
234	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
235
236	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
237
238	// Service: Specifies a service that will be enabled for audit logging.
239	// For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
240	// `allServices` is a special value that covers all services.
241	Service string `json:"service,omitempty"`
242
243	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
244	// unconditionally include in API requests. By default, fields with
245	// empty values are omitted from API requests. However, any non-pointer,
246	// non-interface field appearing in ForceSendFields will be sent to the
247	// server regardless of whether the field is empty or not. This may be
248	// used to include empty fields in Patch requests.
249	ForceSendFields []string `json:"-"`
250
251	// NullFields is a list of field names (e.g. "AuditLogConfigs") to
252	// include in API requests with the JSON null value. By default, fields
253	// with empty values are omitted from API requests. However, any field
254	// with an empty value appearing in NullFields will be sent to the
255	// server as null. It is an error if a field in this list has a
256	// non-empty value. This may be used to include null fields in Patch
257	// requests.
258	NullFields []string `json:"-"`
259}
260
261func (s *AuditConfig) MarshalJSON() ([]byte, error) {
262	type NoMethod AuditConfig
263	raw := NoMethod(*s)
264	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
265}
266
267// AuditLogConfig: Provides the configuration for logging a type of
268// permissions. Example:
269//
270// { "audit_log_configs": [ { "log_type": "DATA_READ",
271// "exempted_members": [ "user:foo@gmail.com" ] }, { "log_type":
272// "DATA_WRITE", } ] }
273//
274// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
275// foo@gmail.com from DATA_READ logging.
276type AuditLogConfig struct {
277	// ExemptedMembers: Specifies the identities that do not cause logging
278	// for this type of permission. Follows the same format of
279	// [Binding.members][].
280	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
281
282	// LogType: The log type that this config enables.
283	LogType string `json:"logType,omitempty"`
284
285	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
286	// unconditionally include in API requests. By default, fields with
287	// empty values are omitted from API requests. However, any non-pointer,
288	// non-interface field appearing in ForceSendFields will be sent to the
289	// server regardless of whether the field is empty or not. This may be
290	// used to include empty fields in Patch requests.
291	ForceSendFields []string `json:"-"`
292
293	// NullFields is a list of field names (e.g. "ExemptedMembers") to
294	// include in API requests with the JSON null value. By default, fields
295	// with empty values are omitted from API requests. However, any field
296	// with an empty value appearing in NullFields will be sent to the
297	// server as null. It is an error if a field in this list has a
298	// non-empty value. This may be used to include null fields in Patch
299	// requests.
300	NullFields []string `json:"-"`
301}
302
303func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
304	type NoMethod AuditLogConfig
305	raw := NoMethod(*s)
306	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
307}
308
309// AuthorizationLoggingOptions: Authorization-related information used
310// by Cloud Audit Logging.
311type AuthorizationLoggingOptions struct {
312	// PermissionType: The type of the permission that was checked.
313	PermissionType string `json:"permissionType,omitempty"`
314
315	// ForceSendFields is a list of field names (e.g. "PermissionType") to
316	// unconditionally include in API requests. By default, fields with
317	// empty values are omitted from API requests. However, any non-pointer,
318	// non-interface field appearing in ForceSendFields will be sent to the
319	// server regardless of whether the field is empty or not. This may be
320	// used to include empty fields in Patch requests.
321	ForceSendFields []string `json:"-"`
322
323	// NullFields is a list of field names (e.g. "PermissionType") to
324	// include in API requests with the JSON null value. By default, fields
325	// with empty values are omitted from API requests. However, any field
326	// with an empty value appearing in NullFields will be sent to the
327	// server as null. It is an error if a field in this list has a
328	// non-empty value. This may be used to include null fields in Patch
329	// requests.
330	NullFields []string `json:"-"`
331}
332
333func (s *AuthorizationLoggingOptions) MarshalJSON() ([]byte, error) {
334	type NoMethod AuthorizationLoggingOptions
335	raw := NoMethod(*s)
336	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
337}
338
339// Binding: Associates `members` with a `role`.
340type Binding struct {
341	// Condition: Unimplemented. The condition that is associated with this
342	// binding. NOTE: an unsatisfied condition will not allow user access
343	// via current binding. Different bindings, including their conditions,
344	// are examined independently.
345	Condition *Expr `json:"condition,omitempty"`
346
347	// Members: Specifies the identities requesting access for a Cloud
348	// Platform resource. `members` can have the following values:
349	//
350	// * `allUsers`: A special identifier that represents anyone who is on
351	// the internet; with or without a Google account.
352	//
353	// * `allAuthenticatedUsers`: A special identifier that represents
354	// anyone who is authenticated with a Google account or a service
355	// account.
356	//
357	// * `user:{emailid}`: An email address that represents a specific
358	// Google account. For example, `alice@gmail.com` .
359	//
360	//
361	//
362	// * `serviceAccount:{emailid}`: An email address that represents a
363	// service account. For example,
364	// `my-other-app@appspot.gserviceaccount.com`.
365	//
366	// * `group:{emailid}`: An email address that represents a Google group.
367	// For example, `admins@example.com`.
368	//
369	//
370	//
371	// * `domain:{domain}`: A Google Apps domain name that represents all
372	// the users of that domain. For example, `google.com` or `example.com`.
373	Members []string `json:"members,omitempty"`
374
375	// Role: Role that is assigned to `members`. For example,
376	// `roles/viewer`, `roles/editor`, or `roles/owner`.
377	Role string `json:"role,omitempty"`
378
379	// ForceSendFields is a list of field names (e.g. "Condition") to
380	// unconditionally include in API requests. By default, fields with
381	// empty values are omitted from API requests. However, any non-pointer,
382	// non-interface field appearing in ForceSendFields will be sent to the
383	// server regardless of whether the field is empty or not. This may be
384	// used to include empty fields in Patch requests.
385	ForceSendFields []string `json:"-"`
386
387	// NullFields is a list of field names (e.g. "Condition") to include in
388	// API requests with the JSON null value. By default, fields with empty
389	// values are omitted from API requests. However, any field with an
390	// empty value appearing in NullFields will be sent to the server as
391	// null. It is an error if a field in this list has a non-empty value.
392	// This may be used to include null fields in Patch requests.
393	NullFields []string `json:"-"`
394}
395
396func (s *Binding) MarshalJSON() ([]byte, error) {
397	type NoMethod Binding
398	raw := NoMethod(*s)
399	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
400}
401
402// Condition: A condition to be met.
403type Condition struct {
404	// Iam: Trusted attributes supplied by the IAM system.
405	Iam string `json:"iam,omitempty"`
406
407	// Op: An operator to apply the subject with.
408	Op string `json:"op,omitempty"`
409
410	// Svc: Trusted attributes discharged by the service.
411	Svc string `json:"svc,omitempty"`
412
413	// Sys: Trusted attributes supplied by any service that owns resources
414	// and uses the IAM system for access control.
415	Sys string `json:"sys,omitempty"`
416
417	// Value: DEPRECATED. Use 'values' instead.
418	Value string `json:"value,omitempty"`
419
420	// Values: The objects of the condition. This is mutually exclusive with
421	// 'value'.
422	Values []string `json:"values,omitempty"`
423
424	// ForceSendFields is a list of field names (e.g. "Iam") to
425	// unconditionally include in API requests. By default, fields with
426	// empty values are omitted from API requests. However, any non-pointer,
427	// non-interface field appearing in ForceSendFields will be sent to the
428	// server regardless of whether the field is empty or not. This may be
429	// used to include empty fields in Patch requests.
430	ForceSendFields []string `json:"-"`
431
432	// NullFields is a list of field names (e.g. "Iam") to include in API
433	// requests with the JSON null value. By default, fields with empty
434	// values are omitted from API requests. However, any field with an
435	// empty value appearing in NullFields will be sent to the server as
436	// null. It is an error if a field in this list has a non-empty value.
437	// This may be used to include null fields in Patch requests.
438	NullFields []string `json:"-"`
439}
440
441func (s *Condition) MarshalJSON() ([]byte, error) {
442	type NoMethod Condition
443	raw := NoMethod(*s)
444	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
445}
446
447type ConfigFile struct {
448	// Content: The contents of the file.
449	Content string `json:"content,omitempty"`
450
451	// ForceSendFields is a list of field names (e.g. "Content") to
452	// unconditionally include in API requests. By default, fields with
453	// empty values are omitted from API requests. However, any non-pointer,
454	// non-interface field appearing in ForceSendFields will be sent to the
455	// server regardless of whether the field is empty or not. This may be
456	// used to include empty fields in Patch requests.
457	ForceSendFields []string `json:"-"`
458
459	// NullFields is a list of field names (e.g. "Content") to include in
460	// API requests with the JSON null value. By default, fields with empty
461	// values are omitted from API requests. However, any field with an
462	// empty value appearing in NullFields will be sent to the server as
463	// null. It is an error if a field in this list has a non-empty value.
464	// This may be used to include null fields in Patch requests.
465	NullFields []string `json:"-"`
466}
467
468func (s *ConfigFile) MarshalJSON() ([]byte, error) {
469	type NoMethod ConfigFile
470	raw := NoMethod(*s)
471	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
472}
473
474type Deployment struct {
475	// Description: An optional user-provided description of the deployment.
476	Description string `json:"description,omitempty"`
477
478	// Fingerprint: Provides a fingerprint to use in requests to modify a
479	// deployment, such as update(), stop(), and cancelPreview() requests. A
480	// fingerprint is a randomly generated value that must be provided with
481	// update(), stop(), and cancelPreview() requests to perform optimistic
482	// locking. This ensures optimistic concurrency so that only one request
483	// happens at a time.
484	//
485	// The fingerprint is initially generated by Deployment Manager and
486	// changes after every request to modify data. To get the latest
487	// fingerprint value, perform a get() request to a deployment.
488	Fingerprint string `json:"fingerprint,omitempty"`
489
490	Id uint64 `json:"id,omitempty,string"`
491
492	// InsertTime: Output only. Creation timestamp in RFC3339 text format.
493	InsertTime string `json:"insertTime,omitempty"`
494
495	// Labels: Map of labels; provided by the client when the resource is
496	// created or updated. Specifically: Label keys must be between 1 and 63
497	// characters long and must conform to the following regular expression:
498	// [a-z]([-a-z0-9]*[a-z0-9])? Label values must be between 0 and 63
499	// characters long and must conform to the regular expression
500	// ([a-z]([-a-z0-9]*[a-z0-9])?)?
501	Labels []*DeploymentLabelEntry `json:"labels,omitempty"`
502
503	// Manifest: Output only. URL of the manifest representing the last
504	// manifest that was successfully deployed.
505	Manifest string `json:"manifest,omitempty"`
506
507	// Name: Name of the resource; provided by the client when the resource
508	// is created. The name must be 1-63 characters long, and comply with
509	// RFC1035. Specifically, the name must be 1-63 characters long and
510	// match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means
511	// the first character must be a lowercase letter, and all following
512	// characters must be a dash, lowercase letter, or digit, except the
513	// last character, which cannot be a dash.
514	Name string `json:"name,omitempty"`
515
516	// Operation: Output only. The Operation that most recently ran, or is
517	// currently running, on this deployment.
518	Operation *Operation `json:"operation,omitempty"`
519
520	// SelfLink: Output only. Server defined URL for the resource.
521	SelfLink string `json:"selfLink,omitempty"`
522
523	// Target: [Input Only] The parameters that define your deployment,
524	// including the deployment configuration and relevant templates.
525	Target *TargetConfiguration `json:"target,omitempty"`
526
527	// Update: Output only. If Deployment Manager is currently updating or
528	// previewing an update to this deployment, the updated configuration
529	// appears here.
530	Update *DeploymentUpdate `json:"update,omitempty"`
531
532	// UpdateTime: Output only. Update timestamp in RFC3339 text format.
533	UpdateTime string `json:"updateTime,omitempty"`
534
535	// ServerResponse contains the HTTP response code and headers from the
536	// server.
537	googleapi.ServerResponse `json:"-"`
538
539	// ForceSendFields is a list of field names (e.g. "Description") to
540	// unconditionally include in API requests. By default, fields with
541	// empty values are omitted from API requests. However, any non-pointer,
542	// non-interface field appearing in ForceSendFields will be sent to the
543	// server regardless of whether the field is empty or not. This may be
544	// used to include empty fields in Patch requests.
545	ForceSendFields []string `json:"-"`
546
547	// NullFields is a list of field names (e.g. "Description") to include
548	// in API requests with the JSON null value. By default, fields with
549	// empty values are omitted from API requests. However, any field with
550	// an empty value appearing in NullFields will be sent to the server as
551	// null. It is an error if a field in this list has a non-empty value.
552	// This may be used to include null fields in Patch requests.
553	NullFields []string `json:"-"`
554}
555
556func (s *Deployment) MarshalJSON() ([]byte, error) {
557	type NoMethod Deployment
558	raw := NoMethod(*s)
559	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
560}
561
562type DeploymentLabelEntry struct {
563	Key string `json:"key,omitempty"`
564
565	Value string `json:"value,omitempty"`
566
567	// ForceSendFields is a list of field names (e.g. "Key") to
568	// unconditionally include in API requests. By default, fields with
569	// empty values are omitted from API requests. However, any non-pointer,
570	// non-interface field appearing in ForceSendFields will be sent to the
571	// server regardless of whether the field is empty or not. This may be
572	// used to include empty fields in Patch requests.
573	ForceSendFields []string `json:"-"`
574
575	// NullFields is a list of field names (e.g. "Key") to include in API
576	// requests with the JSON null value. By default, fields with empty
577	// values are omitted from API requests. However, any field with an
578	// empty value appearing in NullFields will be sent to the server as
579	// null. It is an error if a field in this list has a non-empty value.
580	// This may be used to include null fields in Patch requests.
581	NullFields []string `json:"-"`
582}
583
584func (s *DeploymentLabelEntry) MarshalJSON() ([]byte, error) {
585	type NoMethod DeploymentLabelEntry
586	raw := NoMethod(*s)
587	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
588}
589
590type DeploymentUpdate struct {
591	// Description: Output only. An optional user-provided description of
592	// the deployment after the current update has been applied.
593	Description string `json:"description,omitempty"`
594
595	// Labels: Output only. Map of labels; provided by the client when the
596	// resource is created or updated. Specifically: Label keys must be
597	// between 1 and 63 characters long and must conform to the following
598	// regular expression: [a-z]([-a-z0-9]*[a-z0-9])? Label values must be
599	// between 0 and 63 characters long and must conform to the regular
600	// expression ([a-z]([-a-z0-9]*[a-z0-9])?)?
601	Labels []*DeploymentUpdateLabelEntry `json:"labels,omitempty"`
602
603	// Manifest: Output only. URL of the manifest representing the update
604	// configuration of this deployment.
605	Manifest string `json:"manifest,omitempty"`
606
607	// ForceSendFields is a list of field names (e.g. "Description") to
608	// unconditionally include in API requests. By default, fields with
609	// empty values are omitted from API requests. However, any non-pointer,
610	// non-interface field appearing in ForceSendFields will be sent to the
611	// server regardless of whether the field is empty or not. This may be
612	// used to include empty fields in Patch requests.
613	ForceSendFields []string `json:"-"`
614
615	// NullFields is a list of field names (e.g. "Description") to include
616	// in API requests with the JSON null value. By default, fields with
617	// empty values are omitted from API requests. However, any field with
618	// an empty value appearing in NullFields will be sent to the server as
619	// null. It is an error if a field in this list has a non-empty value.
620	// This may be used to include null fields in Patch requests.
621	NullFields []string `json:"-"`
622}
623
624func (s *DeploymentUpdate) MarshalJSON() ([]byte, error) {
625	type NoMethod DeploymentUpdate
626	raw := NoMethod(*s)
627	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
628}
629
630type DeploymentUpdateLabelEntry struct {
631	Key string `json:"key,omitempty"`
632
633	Value string `json:"value,omitempty"`
634
635	// ForceSendFields is a list of field names (e.g. "Key") to
636	// unconditionally include in API requests. By default, fields with
637	// empty values are omitted from API requests. However, any non-pointer,
638	// non-interface field appearing in ForceSendFields will be sent to the
639	// server regardless of whether the field is empty or not. This may be
640	// used to include empty fields in Patch requests.
641	ForceSendFields []string `json:"-"`
642
643	// NullFields is a list of field names (e.g. "Key") to include in API
644	// requests with the JSON null value. By default, fields with empty
645	// values are omitted from API requests. However, any field with an
646	// empty value appearing in NullFields will be sent to the server as
647	// null. It is an error if a field in this list has a non-empty value.
648	// This may be used to include null fields in Patch requests.
649	NullFields []string `json:"-"`
650}
651
652func (s *DeploymentUpdateLabelEntry) MarshalJSON() ([]byte, error) {
653	type NoMethod DeploymentUpdateLabelEntry
654	raw := NoMethod(*s)
655	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
656}
657
658type DeploymentsCancelPreviewRequest struct {
659	// Fingerprint: Specifies a fingerprint for cancelPreview() requests. A
660	// fingerprint is a randomly generated value that must be provided in
661	// cancelPreview() requests to perform optimistic locking. This ensures
662	// optimistic concurrency so that the deployment does not have
663	// conflicting requests (e.g. if someone attempts to make a new update
664	// request while another user attempts to cancel a preview, this would
665	// prevent one of the requests).
666	//
667	// The fingerprint is initially generated by Deployment Manager and
668	// changes after every request to modify a deployment. To get the latest
669	// fingerprint value, perform a get() request on the deployment.
670	Fingerprint string `json:"fingerprint,omitempty"`
671
672	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
673	// unconditionally include in API requests. By default, fields with
674	// empty values are omitted from API requests. However, any non-pointer,
675	// non-interface field appearing in ForceSendFields will be sent to the
676	// server regardless of whether the field is empty or not. This may be
677	// used to include empty fields in Patch requests.
678	ForceSendFields []string `json:"-"`
679
680	// NullFields is a list of field names (e.g. "Fingerprint") to include
681	// in API requests with the JSON null value. By default, fields with
682	// empty values are omitted from API requests. However, any field with
683	// an empty value appearing in NullFields will be sent to the server as
684	// null. It is an error if a field in this list has a non-empty value.
685	// This may be used to include null fields in Patch requests.
686	NullFields []string `json:"-"`
687}
688
689func (s *DeploymentsCancelPreviewRequest) MarshalJSON() ([]byte, error) {
690	type NoMethod DeploymentsCancelPreviewRequest
691	raw := NoMethod(*s)
692	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
693}
694
695// DeploymentsListResponse: A response containing a partial list of
696// deployments and a page token used to build the next request if the
697// request has been truncated.
698type DeploymentsListResponse struct {
699	// Deployments: Output only. The deployments contained in this response.
700	Deployments []*Deployment `json:"deployments,omitempty"`
701
702	// NextPageToken: Output only. A token used to continue a truncated list
703	// request.
704	NextPageToken string `json:"nextPageToken,omitempty"`
705
706	// ServerResponse contains the HTTP response code and headers from the
707	// server.
708	googleapi.ServerResponse `json:"-"`
709
710	// ForceSendFields is a list of field names (e.g. "Deployments") to
711	// unconditionally include in API requests. By default, fields with
712	// empty values are omitted from API requests. However, any non-pointer,
713	// non-interface field appearing in ForceSendFields will be sent to the
714	// server regardless of whether the field is empty or not. This may be
715	// used to include empty fields in Patch requests.
716	ForceSendFields []string `json:"-"`
717
718	// NullFields is a list of field names (e.g. "Deployments") to include
719	// in API requests with the JSON null value. By default, fields with
720	// empty values are omitted from API requests. However, any field with
721	// an empty value appearing in NullFields will be sent to the server as
722	// null. It is an error if a field in this list has a non-empty value.
723	// This may be used to include null fields in Patch requests.
724	NullFields []string `json:"-"`
725}
726
727func (s *DeploymentsListResponse) MarshalJSON() ([]byte, error) {
728	type NoMethod DeploymentsListResponse
729	raw := NoMethod(*s)
730	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
731}
732
733type DeploymentsStopRequest struct {
734	// Fingerprint: Specifies a fingerprint for stop() requests. A
735	// fingerprint is a randomly generated value that must be provided in
736	// stop() requests to perform optimistic locking. This ensures
737	// optimistic concurrency so that the deployment does not have
738	// conflicting requests (e.g. if someone attempts to make a new update
739	// request while another user attempts to stop an ongoing update
740	// request, this would prevent a collision).
741	//
742	// The fingerprint is initially generated by Deployment Manager and
743	// changes after every request to modify a deployment. To get the latest
744	// fingerprint value, perform a get() request on the deployment.
745	Fingerprint string `json:"fingerprint,omitempty"`
746
747	// ForceSendFields is a list of field names (e.g. "Fingerprint") to
748	// unconditionally include in API requests. By default, fields with
749	// empty values are omitted from API requests. However, any non-pointer,
750	// non-interface field appearing in ForceSendFields will be sent to the
751	// server regardless of whether the field is empty or not. This may be
752	// used to include empty fields in Patch requests.
753	ForceSendFields []string `json:"-"`
754
755	// NullFields is a list of field names (e.g. "Fingerprint") to include
756	// in API requests with the JSON null value. By default, fields with
757	// empty values are omitted from API requests. However, any field with
758	// an empty value appearing in NullFields will be sent to the server as
759	// null. It is an error if a field in this list has a non-empty value.
760	// This may be used to include null fields in Patch requests.
761	NullFields []string `json:"-"`
762}
763
764func (s *DeploymentsStopRequest) MarshalJSON() ([]byte, error) {
765	type NoMethod DeploymentsStopRequest
766	raw := NoMethod(*s)
767	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
768}
769
770// Expr: Represents an expression text. Example:
771//
772// title: "User account presence" description: "Determines whether the
773// request has a user account" expression: "size(request.user) > 0"
774type Expr struct {
775	// Description: An optional description of the expression. This is a
776	// longer text which describes the expression, e.g. when hovered over it
777	// in a UI.
778	Description string `json:"description,omitempty"`
779
780	// Expression: Textual representation of an expression in Common
781	// Expression Language syntax.
782	//
783	// The application context of the containing message determines which
784	// well-known feature set of CEL is supported.
785	Expression string `json:"expression,omitempty"`
786
787	// Location: An optional string indicating the location of the
788	// expression for error reporting, e.g. a file name and a position in
789	// the file.
790	Location string `json:"location,omitempty"`
791
792	// Title: An optional title for the expression, i.e. a short string
793	// describing its purpose. This can be used e.g. in UIs which allow to
794	// enter the expression.
795	Title string `json:"title,omitempty"`
796
797	// ForceSendFields is a list of field names (e.g. "Description") to
798	// unconditionally include in API requests. By default, fields with
799	// empty values are omitted from API requests. However, any non-pointer,
800	// non-interface field appearing in ForceSendFields will be sent to the
801	// server regardless of whether the field is empty or not. This may be
802	// used to include empty fields in Patch requests.
803	ForceSendFields []string `json:"-"`
804
805	// NullFields is a list of field names (e.g. "Description") to include
806	// in API requests with the JSON null value. By default, fields with
807	// empty values are omitted from API requests. However, any field with
808	// an empty value appearing in NullFields will be sent to the server as
809	// null. It is an error if a field in this list has a non-empty value.
810	// This may be used to include null fields in Patch requests.
811	NullFields []string `json:"-"`
812}
813
814func (s *Expr) MarshalJSON() ([]byte, error) {
815	type NoMethod Expr
816	raw := NoMethod(*s)
817	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
818}
819
820type GlobalSetPolicyRequest struct {
821	// Bindings: Flatten Policy to create a backward compatible wire-format.
822	// Deprecated. Use 'policy' to specify bindings.
823	Bindings []*Binding `json:"bindings,omitempty"`
824
825	// Etag: Flatten Policy to create a backward compatible wire-format.
826	// Deprecated. Use 'policy' to specify the etag.
827	Etag string `json:"etag,omitempty"`
828
829	// Policy: REQUIRED: The complete policy to be applied to the
830	// 'resource'. The size of the policy is limited to a few 10s of KB. An
831	// empty policy is in general a valid policy but certain services (like
832	// Projects) might reject them.
833	Policy *Policy `json:"policy,omitempty"`
834
835	// ForceSendFields is a list of field names (e.g. "Bindings") to
836	// unconditionally include in API requests. By default, fields with
837	// empty values are omitted from API requests. However, any non-pointer,
838	// non-interface field appearing in ForceSendFields will be sent to the
839	// server regardless of whether the field is empty or not. This may be
840	// used to include empty fields in Patch requests.
841	ForceSendFields []string `json:"-"`
842
843	// NullFields is a list of field names (e.g. "Bindings") to include in
844	// API requests with the JSON null value. By default, fields with empty
845	// values are omitted from API requests. However, any field with an
846	// empty value appearing in NullFields will be sent to the server as
847	// null. It is an error if a field in this list has a non-empty value.
848	// This may be used to include null fields in Patch requests.
849	NullFields []string `json:"-"`
850}
851
852func (s *GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) {
853	type NoMethod GlobalSetPolicyRequest
854	raw := NoMethod(*s)
855	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
856}
857
858type ImportFile struct {
859	// Content: The contents of the file.
860	Content string `json:"content,omitempty"`
861
862	// Name: The name of the file.
863	Name string `json:"name,omitempty"`
864
865	// ForceSendFields is a list of field names (e.g. "Content") to
866	// unconditionally include in API requests. By default, fields with
867	// empty values are omitted from API requests. However, any non-pointer,
868	// non-interface field appearing in ForceSendFields will be sent to the
869	// server regardless of whether the field is empty or not. This may be
870	// used to include empty fields in Patch requests.
871	ForceSendFields []string `json:"-"`
872
873	// NullFields is a list of field names (e.g. "Content") to include in
874	// API requests with the JSON null value. By default, fields with empty
875	// values are omitted from API requests. However, any field with an
876	// empty value appearing in NullFields will be sent to the server as
877	// null. It is an error if a field in this list has a non-empty value.
878	// This may be used to include null fields in Patch requests.
879	NullFields []string `json:"-"`
880}
881
882func (s *ImportFile) MarshalJSON() ([]byte, error) {
883	type NoMethod ImportFile
884	raw := NoMethod(*s)
885	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
886}
887
888// LogConfig: Specifies what kind of log the caller must write
889type LogConfig struct {
890	// CloudAudit: Cloud audit options.
891	CloudAudit *LogConfigCloudAuditOptions `json:"cloudAudit,omitempty"`
892
893	// Counter: Counter options.
894	Counter *LogConfigCounterOptions `json:"counter,omitempty"`
895
896	// DataAccess: Data access options.
897	DataAccess *LogConfigDataAccessOptions `json:"dataAccess,omitempty"`
898
899	// ForceSendFields is a list of field names (e.g. "CloudAudit") to
900	// unconditionally include in API requests. By default, fields with
901	// empty values are omitted from API requests. However, any non-pointer,
902	// non-interface field appearing in ForceSendFields will be sent to the
903	// server regardless of whether the field is empty or not. This may be
904	// used to include empty fields in Patch requests.
905	ForceSendFields []string `json:"-"`
906
907	// NullFields is a list of field names (e.g. "CloudAudit") to include in
908	// API requests with the JSON null value. By default, fields with empty
909	// values are omitted from API requests. However, any field with an
910	// empty value appearing in NullFields will be sent to the server as
911	// null. It is an error if a field in this list has a non-empty value.
912	// This may be used to include null fields in Patch requests.
913	NullFields []string `json:"-"`
914}
915
916func (s *LogConfig) MarshalJSON() ([]byte, error) {
917	type NoMethod LogConfig
918	raw := NoMethod(*s)
919	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
920}
921
922// LogConfigCloudAuditOptions: Write a Cloud Audit log
923type LogConfigCloudAuditOptions struct {
924	// AuthorizationLoggingOptions: Information used by the Cloud Audit
925	// Logging pipeline.
926	AuthorizationLoggingOptions *AuthorizationLoggingOptions `json:"authorizationLoggingOptions,omitempty"`
927
928	// LogName: The log_name to populate in the Cloud Audit Record.
929	LogName string `json:"logName,omitempty"`
930
931	// ForceSendFields is a list of field names (e.g.
932	// "AuthorizationLoggingOptions") to unconditionally include in API
933	// requests. By default, fields with empty values are omitted from API
934	// requests. However, any non-pointer, non-interface field appearing in
935	// ForceSendFields will be sent to the server regardless of whether the
936	// field is empty or not. This may be used to include empty fields in
937	// Patch requests.
938	ForceSendFields []string `json:"-"`
939
940	// NullFields is a list of field names (e.g.
941	// "AuthorizationLoggingOptions") to include in API requests with the
942	// JSON null value. By default, fields with empty values are omitted
943	// from API requests. However, any field with an empty value appearing
944	// in NullFields will be sent to the server as null. It is an error if a
945	// field in this list has a non-empty value. This may be used to include
946	// null fields in Patch requests.
947	NullFields []string `json:"-"`
948}
949
950func (s *LogConfigCloudAuditOptions) MarshalJSON() ([]byte, error) {
951	type NoMethod LogConfigCloudAuditOptions
952	raw := NoMethod(*s)
953	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
954}
955
956// LogConfigCounterOptions: Increment a streamz counter with the
957// specified metric and field names.
958//
959// Metric names should start with a '/', generally be lowercase-only,
960// and end in "_count". Field names should not contain an initial slash.
961// The actual exported metric names will have "/iam/policy"
962// prepended.
963//
964// Field names correspond to IAM request parameters and field values are
965// their respective values.
966//
967// Supported field names: - "authority", which is "[token]" if
968// IAMContext.token is present, otherwise the value of
969// IAMContext.authority_selector if present, and otherwise a
970// representation of IAMContext.principal; or - "iam_principal", a
971// representation of IAMContext.principal even if a token or authority
972// selector is present; or - "" (empty string), resulting in a counter
973// with no fields.
974//
975// Examples: counter { metric: "/debug_access_count" field:
976// "iam_principal" } ==> increment counter
977// /iam/policy/backend_debug_access_count {iam_principal=[value of
978// IAMContext.principal]}
979//
980// At this time we do not support multiple field names (though this may
981// be supported in the future).
982type LogConfigCounterOptions struct {
983	// Field: The field value to attribute.
984	Field string `json:"field,omitempty"`
985
986	// Metric: The metric to update.
987	Metric string `json:"metric,omitempty"`
988
989	// ForceSendFields is a list of field names (e.g. "Field") to
990	// unconditionally include in API requests. By default, fields with
991	// empty values are omitted from API requests. However, any non-pointer,
992	// non-interface field appearing in ForceSendFields will be sent to the
993	// server regardless of whether the field is empty or not. This may be
994	// used to include empty fields in Patch requests.
995	ForceSendFields []string `json:"-"`
996
997	// NullFields is a list of field names (e.g. "Field") to include in API
998	// requests with the JSON null value. By default, fields with empty
999	// values are omitted from API requests. However, any field with an
1000	// empty value appearing in NullFields will be sent to the server as
1001	// null. It is an error if a field in this list has a non-empty value.
1002	// This may be used to include null fields in Patch requests.
1003	NullFields []string `json:"-"`
1004}
1005
1006func (s *LogConfigCounterOptions) MarshalJSON() ([]byte, error) {
1007	type NoMethod LogConfigCounterOptions
1008	raw := NoMethod(*s)
1009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1010}
1011
1012// LogConfigDataAccessOptions: Write a Data Access (Gin) log
1013type LogConfigDataAccessOptions struct {
1014	// LogMode: Whether Gin logging should happen in a fail-closed manner at
1015	// the caller. This is relevant only in the LocalIAM implementation, for
1016	// now.
1017	//
1018	// NOTE: Logging to Gin in a fail-closed manner is currently unsupported
1019	// while work is being done to satisfy the requirements of go/345.
1020	// Currently, setting LOG_FAIL_CLOSED mode will have no effect, but
1021	// still exists because there is active work being done to support it
1022	// (b/115874152).
1023	LogMode string `json:"logMode,omitempty"`
1024
1025	// ForceSendFields is a list of field names (e.g. "LogMode") to
1026	// unconditionally include in API requests. By default, fields with
1027	// empty values are omitted from API requests. However, any non-pointer,
1028	// non-interface field appearing in ForceSendFields will be sent to the
1029	// server regardless of whether the field is empty or not. This may be
1030	// used to include empty fields in Patch requests.
1031	ForceSendFields []string `json:"-"`
1032
1033	// NullFields is a list of field names (e.g. "LogMode") to include in
1034	// API requests with the JSON null value. By default, fields with empty
1035	// values are omitted from API requests. However, any field with an
1036	// empty value appearing in NullFields will be sent to the server as
1037	// null. It is an error if a field in this list has a non-empty value.
1038	// This may be used to include null fields in Patch requests.
1039	NullFields []string `json:"-"`
1040}
1041
1042func (s *LogConfigDataAccessOptions) MarshalJSON() ([]byte, error) {
1043	type NoMethod LogConfigDataAccessOptions
1044	raw := NoMethod(*s)
1045	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1046}
1047
1048type Manifest struct {
1049	// Config: Output only. The YAML configuration for this manifest.
1050	Config *ConfigFile `json:"config,omitempty"`
1051
1052	// ExpandedConfig: Output only. The fully-expanded configuration file,
1053	// including any templates and references.
1054	ExpandedConfig string `json:"expandedConfig,omitempty"`
1055
1056	Id uint64 `json:"id,omitempty,string"`
1057
1058	// Imports: Output only. The imported files for this manifest.
1059	Imports []*ImportFile `json:"imports,omitempty"`
1060
1061	// InsertTime: Output only. Creation timestamp in RFC3339 text format.
1062	InsertTime string `json:"insertTime,omitempty"`
1063
1064	// Layout: Output only. The YAML layout for this manifest.
1065	Layout string `json:"layout,omitempty"`
1066
1067	// Name: Output only.
1068	//
1069	// The name of the manifest.
1070	Name string `json:"name,omitempty"`
1071
1072	// SelfLink: Output only. Self link for the manifest.
1073	SelfLink string `json:"selfLink,omitempty"`
1074
1075	// ServerResponse contains the HTTP response code and headers from the
1076	// server.
1077	googleapi.ServerResponse `json:"-"`
1078
1079	// ForceSendFields is a list of field names (e.g. "Config") to
1080	// unconditionally include in API requests. By default, fields with
1081	// empty values are omitted from API requests. However, any non-pointer,
1082	// non-interface field appearing in ForceSendFields will be sent to the
1083	// server regardless of whether the field is empty or not. This may be
1084	// used to include empty fields in Patch requests.
1085	ForceSendFields []string `json:"-"`
1086
1087	// NullFields is a list of field names (e.g. "Config") to include in API
1088	// requests with the JSON null value. By default, fields with empty
1089	// values are omitted from API requests. However, any field with an
1090	// empty value appearing in NullFields will be sent to the server as
1091	// null. It is an error if a field in this list has a non-empty value.
1092	// This may be used to include null fields in Patch requests.
1093	NullFields []string `json:"-"`
1094}
1095
1096func (s *Manifest) MarshalJSON() ([]byte, error) {
1097	type NoMethod Manifest
1098	raw := NoMethod(*s)
1099	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1100}
1101
1102// ManifestsListResponse: A response containing a partial list of
1103// manifests and a page token used to build the next request if the
1104// request has been truncated.
1105type ManifestsListResponse struct {
1106	// Manifests: Output only. Manifests contained in this list response.
1107	Manifests []*Manifest `json:"manifests,omitempty"`
1108
1109	// NextPageToken: Output only. A token used to continue a truncated list
1110	// request.
1111	NextPageToken string `json:"nextPageToken,omitempty"`
1112
1113	// ServerResponse contains the HTTP response code and headers from the
1114	// server.
1115	googleapi.ServerResponse `json:"-"`
1116
1117	// ForceSendFields is a list of field names (e.g. "Manifests") to
1118	// unconditionally include in API requests. By default, fields with
1119	// empty values are omitted from API requests. However, any non-pointer,
1120	// non-interface field appearing in ForceSendFields will be sent to the
1121	// server regardless of whether the field is empty or not. This may be
1122	// used to include empty fields in Patch requests.
1123	ForceSendFields []string `json:"-"`
1124
1125	// NullFields is a list of field names (e.g. "Manifests") to include in
1126	// API requests with the JSON null value. By default, fields with empty
1127	// values are omitted from API requests. However, any field with an
1128	// empty value appearing in NullFields will be sent to the server as
1129	// null. It is an error if a field in this list has a non-empty value.
1130	// This may be used to include null fields in Patch requests.
1131	NullFields []string `json:"-"`
1132}
1133
1134func (s *ManifestsListResponse) MarshalJSON() ([]byte, error) {
1135	type NoMethod ManifestsListResponse
1136	raw := NoMethod(*s)
1137	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1138}
1139
1140// Operation: An Operation resource, used to manage asynchronous API
1141// requests. (== resource_for v1.globalOperations ==) (== resource_for
1142// beta.globalOperations ==) (== resource_for v1.regionOperations ==)
1143// (== resource_for beta.regionOperations ==) (== resource_for
1144// v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1145type Operation struct {
1146	// ClientOperationId: [Output Only] The value of `requestId` if you
1147	// provided it in the request. Not present otherwise.
1148	ClientOperationId string `json:"clientOperationId,omitempty"`
1149
1150	// CreationTimestamp: [Deprecated] This field is deprecated.
1151	CreationTimestamp string `json:"creationTimestamp,omitempty"`
1152
1153	// Description: [Output Only] A textual description of the operation,
1154	// which is set when the operation is created.
1155	Description string `json:"description,omitempty"`
1156
1157	// EndTime: [Output Only] The time that this operation was completed.
1158	// This value is in RFC3339 text format.
1159	EndTime string `json:"endTime,omitempty"`
1160
1161	// Error: [Output Only] If errors are generated during processing of the
1162	// operation, this field will be populated.
1163	Error *OperationError `json:"error,omitempty"`
1164
1165	// HttpErrorMessage: [Output Only] If the operation fails, this field
1166	// contains the HTTP error message that was returned, such as NOT FOUND.
1167	HttpErrorMessage string `json:"httpErrorMessage,omitempty"`
1168
1169	// HttpErrorStatusCode: [Output Only] If the operation fails, this field
1170	// contains the HTTP error status code that was returned. For example, a
1171	// 404 means the resource was not found.
1172	HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"`
1173
1174	// Id: [Output Only] The unique identifier for the resource. This
1175	// identifier is defined by the server.
1176	Id uint64 `json:"id,omitempty,string"`
1177
1178	// InsertTime: [Output Only] The time that this operation was requested.
1179	// This value is in RFC3339 text format.
1180	InsertTime string `json:"insertTime,omitempty"`
1181
1182	// Kind: [Output Only] Type of the resource. Always compute#operation
1183	// for Operation resources.
1184	Kind string `json:"kind,omitempty"`
1185
1186	// Name: [Output Only] Name of the resource.
1187	Name string `json:"name,omitempty"`
1188
1189	// OperationType: [Output Only] The type of operation, such as insert,
1190	// update, or delete, and so on.
1191	OperationType string `json:"operationType,omitempty"`
1192
1193	// Progress: [Output Only] An optional progress indicator that ranges
1194	// from 0 to 100. There is no requirement that this be linear or support
1195	// any granularity of operations. This should not be used to guess when
1196	// the operation will be complete. This number should monotonically
1197	// increase as the operation progresses.
1198	Progress int64 `json:"progress,omitempty"`
1199
1200	// Region: [Output Only] The URL of the region where the operation
1201	// resides. Only available when performing regional operations. You must
1202	// specify this field as part of the HTTP request URL. It is not
1203	// settable as a field in the request body.
1204	Region string `json:"region,omitempty"`
1205
1206	// SelfLink: [Output Only] Server-defined URL for the resource.
1207	SelfLink string `json:"selfLink,omitempty"`
1208
1209	// StartTime: [Output Only] The time that this operation was started by
1210	// the server. This value is in RFC3339 text format.
1211	StartTime string `json:"startTime,omitempty"`
1212
1213	// Status: [Output Only] The status of the operation, which can be one
1214	// of the following: PENDING, RUNNING, or DONE.
1215	Status string `json:"status,omitempty"`
1216
1217	// StatusMessage: [Output Only] An optional textual description of the
1218	// current status of the operation.
1219	StatusMessage string `json:"statusMessage,omitempty"`
1220
1221	// TargetId: [Output Only] The unique target ID, which identifies a
1222	// specific incarnation of the target resource.
1223	TargetId uint64 `json:"targetId,omitempty,string"`
1224
1225	// TargetLink: [Output Only] The URL of the resource that the operation
1226	// modifies. For operations related to creating a snapshot, this points
1227	// to the persistent disk that the snapshot was created from.
1228	TargetLink string `json:"targetLink,omitempty"`
1229
1230	// User: [Output Only] User who requested the operation, for example:
1231	// user@example.com.
1232	User string `json:"user,omitempty"`
1233
1234	// Warnings: [Output Only] If warning messages are generated during
1235	// processing of the operation, this field will be populated.
1236	Warnings []*OperationWarnings `json:"warnings,omitempty"`
1237
1238	// Zone: [Output Only] The URL of the zone where the operation resides.
1239	// Only available when performing per-zone operations. You must specify
1240	// this field as part of the HTTP request URL. It is not settable as a
1241	// field in the request body.
1242	Zone string `json:"zone,omitempty"`
1243
1244	// ServerResponse contains the HTTP response code and headers from the
1245	// server.
1246	googleapi.ServerResponse `json:"-"`
1247
1248	// ForceSendFields is a list of field names (e.g. "ClientOperationId")
1249	// to unconditionally include in API requests. By default, fields with
1250	// empty values are omitted from API requests. However, any non-pointer,
1251	// non-interface field appearing in ForceSendFields will be sent to the
1252	// server regardless of whether the field is empty or not. This may be
1253	// used to include empty fields in Patch requests.
1254	ForceSendFields []string `json:"-"`
1255
1256	// NullFields is a list of field names (e.g. "ClientOperationId") to
1257	// include in API requests with the JSON null value. By default, fields
1258	// with empty values are omitted from API requests. However, any field
1259	// with an empty value appearing in NullFields will be sent to the
1260	// server as null. It is an error if a field in this list has a
1261	// non-empty value. This may be used to include null fields in Patch
1262	// requests.
1263	NullFields []string `json:"-"`
1264}
1265
1266func (s *Operation) MarshalJSON() ([]byte, error) {
1267	type NoMethod Operation
1268	raw := NoMethod(*s)
1269	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1270}
1271
1272// OperationError: [Output Only] If errors are generated during
1273// processing of the operation, this field will be populated.
1274type OperationError struct {
1275	// Errors: [Output Only] The array of errors encountered while
1276	// processing this operation.
1277	Errors []*OperationErrorErrors `json:"errors,omitempty"`
1278
1279	// ForceSendFields is a list of field names (e.g. "Errors") to
1280	// unconditionally include in API requests. By default, fields with
1281	// empty values are omitted from API requests. However, any non-pointer,
1282	// non-interface field appearing in ForceSendFields will be sent to the
1283	// server regardless of whether the field is empty or not. This may be
1284	// used to include empty fields in Patch requests.
1285	ForceSendFields []string `json:"-"`
1286
1287	// NullFields is a list of field names (e.g. "Errors") to include in API
1288	// requests with the JSON null value. By default, fields with empty
1289	// values are omitted from API requests. However, any field with an
1290	// empty value appearing in NullFields will be sent to the server as
1291	// null. It is an error if a field in this list has a non-empty value.
1292	// This may be used to include null fields in Patch requests.
1293	NullFields []string `json:"-"`
1294}
1295
1296func (s *OperationError) MarshalJSON() ([]byte, error) {
1297	type NoMethod OperationError
1298	raw := NoMethod(*s)
1299	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1300}
1301
1302type OperationErrorErrors struct {
1303	// Code: [Output Only] The error type identifier for this error.
1304	Code string `json:"code,omitempty"`
1305
1306	// Location: [Output Only] Indicates the field in the request that
1307	// caused the error. This property is optional.
1308	Location string `json:"location,omitempty"`
1309
1310	// Message: [Output Only] An optional, human-readable error message.
1311	Message string `json:"message,omitempty"`
1312
1313	// ForceSendFields is a list of field names (e.g. "Code") to
1314	// unconditionally include in API requests. By default, fields with
1315	// empty values are omitted from API requests. However, any non-pointer,
1316	// non-interface field appearing in ForceSendFields will be sent to the
1317	// server regardless of whether the field is empty or not. This may be
1318	// used to include empty fields in Patch requests.
1319	ForceSendFields []string `json:"-"`
1320
1321	// NullFields is a list of field names (e.g. "Code") to include in API
1322	// requests with the JSON null value. By default, fields with empty
1323	// values are omitted from API requests. However, any field with an
1324	// empty value appearing in NullFields will be sent to the server as
1325	// null. It is an error if a field in this list has a non-empty value.
1326	// This may be used to include null fields in Patch requests.
1327	NullFields []string `json:"-"`
1328}
1329
1330func (s *OperationErrorErrors) MarshalJSON() ([]byte, error) {
1331	type NoMethod OperationErrorErrors
1332	raw := NoMethod(*s)
1333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1334}
1335
1336type OperationWarnings struct {
1337	// Code: [Output Only] A warning code, if applicable. For example,
1338	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
1339	// the response.
1340	Code string `json:"code,omitempty"`
1341
1342	// Data: [Output Only] Metadata about this warning in key: value format.
1343	// For example:
1344	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1345	Data []*OperationWarningsData `json:"data,omitempty"`
1346
1347	// Message: [Output Only] A human-readable description of the warning
1348	// code.
1349	Message string `json:"message,omitempty"`
1350
1351	// ForceSendFields is a list of field names (e.g. "Code") to
1352	// unconditionally include in API requests. By default, fields with
1353	// empty values are omitted from API requests. However, any non-pointer,
1354	// non-interface field appearing in ForceSendFields will be sent to the
1355	// server regardless of whether the field is empty or not. This may be
1356	// used to include empty fields in Patch requests.
1357	ForceSendFields []string `json:"-"`
1358
1359	// NullFields is a list of field names (e.g. "Code") to include in API
1360	// requests with the JSON null value. By default, fields with empty
1361	// values are omitted from API requests. However, any field with an
1362	// empty value appearing in NullFields will be sent to the server as
1363	// null. It is an error if a field in this list has a non-empty value.
1364	// This may be used to include null fields in Patch requests.
1365	NullFields []string `json:"-"`
1366}
1367
1368func (s *OperationWarnings) MarshalJSON() ([]byte, error) {
1369	type NoMethod OperationWarnings
1370	raw := NoMethod(*s)
1371	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1372}
1373
1374type OperationWarningsData struct {
1375	// Key: [Output Only] A key that provides more detail on the warning
1376	// being returned. For example, for warnings where there are no results
1377	// in a list request for a particular zone, this key might be scope and
1378	// the key value might be the zone name. Other examples might be a key
1379	// indicating a deprecated resource and a suggested replacement, or a
1380	// warning about invalid network settings (for example, if an instance
1381	// attempts to perform IP forwarding but is not enabled for IP
1382	// forwarding).
1383	Key string `json:"key,omitempty"`
1384
1385	// Value: [Output Only] A warning data value corresponding to the key.
1386	Value string `json:"value,omitempty"`
1387
1388	// ForceSendFields is a list of field names (e.g. "Key") to
1389	// unconditionally include in API requests. By default, fields with
1390	// empty values are omitted from API requests. However, any non-pointer,
1391	// non-interface field appearing in ForceSendFields will be sent to the
1392	// server regardless of whether the field is empty or not. This may be
1393	// used to include empty fields in Patch requests.
1394	ForceSendFields []string `json:"-"`
1395
1396	// NullFields is a list of field names (e.g. "Key") to include in API
1397	// requests with the JSON null value. By default, fields with empty
1398	// values are omitted from API requests. However, any field with an
1399	// empty value appearing in NullFields will be sent to the server as
1400	// null. It is an error if a field in this list has a non-empty value.
1401	// This may be used to include null fields in Patch requests.
1402	NullFields []string `json:"-"`
1403}
1404
1405func (s *OperationWarningsData) MarshalJSON() ([]byte, error) {
1406	type NoMethod OperationWarningsData
1407	raw := NoMethod(*s)
1408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1409}
1410
1411// OperationsListResponse: A response containing a partial list of
1412// operations and a page token used to build the next request if the
1413// request has been truncated.
1414type OperationsListResponse struct {
1415	// NextPageToken: Output only. A token used to continue a truncated list
1416	// request.
1417	NextPageToken string `json:"nextPageToken,omitempty"`
1418
1419	// Operations: Output only. Operations contained in this list response.
1420	Operations []*Operation `json:"operations,omitempty"`
1421
1422	// ServerResponse contains the HTTP response code and headers from the
1423	// server.
1424	googleapi.ServerResponse `json:"-"`
1425
1426	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1427	// unconditionally include in API requests. By default, fields with
1428	// empty values are omitted from API requests. However, any non-pointer,
1429	// non-interface field appearing in ForceSendFields will be sent to the
1430	// server regardless of whether the field is empty or not. This may be
1431	// used to include empty fields in Patch requests.
1432	ForceSendFields []string `json:"-"`
1433
1434	// NullFields is a list of field names (e.g. "NextPageToken") to include
1435	// in API requests with the JSON null value. By default, fields with
1436	// empty values are omitted from API requests. However, any field with
1437	// an empty value appearing in NullFields will be sent to the server as
1438	// null. It is an error if a field in this list has a non-empty value.
1439	// This may be used to include null fields in Patch requests.
1440	NullFields []string `json:"-"`
1441}
1442
1443func (s *OperationsListResponse) MarshalJSON() ([]byte, error) {
1444	type NoMethod OperationsListResponse
1445	raw := NoMethod(*s)
1446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1447}
1448
1449// Policy: Defines an Identity and Access Management (IAM) policy. It is
1450// used to specify access control policies for Cloud Platform
1451// resources.
1452//
1453//
1454//
1455// A `Policy` consists of a list of `bindings`. A `binding` binds a list
1456// of `members` to a `role`, where the members can be user accounts,
1457// Google groups, Google domains, and service accounts. A `role` is a
1458// named list of permissions defined by IAM.
1459//
1460// **JSON Example**
1461//
1462// { "bindings": [ { "role": "roles/owner", "members": [
1463// "user:mike@example.com", "group:admins@example.com",
1464// "domain:google.com",
1465// "serviceAccount:my-other-app@appspot.gserviceaccount.com" ] }, {
1466// "role": "roles/viewer", "members": ["user:sean@example.com"] } ]
1467// }
1468//
1469// **YAML Example**
1470//
1471// bindings: - members: - user:mike@example.com -
1472// group:admins@example.com - domain:google.com -
1473// serviceAccount:my-other-app@appspot.gserviceaccount.com role:
1474// roles/owner - members: - user:sean@example.com role:
1475// roles/viewer
1476//
1477//
1478//
1479// For a description of IAM and its features, see the [IAM developer's
1480// guide](https://cloud.google.com/iam/docs).
1481type Policy struct {
1482	// AuditConfigs: Specifies cloud audit logging configuration for this
1483	// policy.
1484	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
1485
1486	// Bindings: Associates a list of `members` to a `role`. `bindings` with
1487	// no members will result in an error.
1488	Bindings []*Binding `json:"bindings,omitempty"`
1489
1490	// Etag: `etag` is used for optimistic concurrency control as a way to
1491	// help prevent simultaneous updates of a policy from overwriting each
1492	// other. It is strongly suggested that systems make use of the `etag`
1493	// in the read-modify-write cycle to perform policy updates in order to
1494	// avoid race conditions: An `etag` is returned in the response to
1495	// `getIamPolicy`, and systems are expected to put that etag in the
1496	// request to `setIamPolicy` to ensure that their change will be applied
1497	// to the same version of the policy.
1498	//
1499	// If no `etag` is provided in the call to `setIamPolicy`, then the
1500	// existing policy is overwritten blindly.
1501	Etag string `json:"etag,omitempty"`
1502
1503	IamOwned bool `json:"iamOwned,omitempty"`
1504
1505	// Rules: If more than one rule is specified, the rules are applied in
1506	// the following manner: - All matching LOG rules are always applied. -
1507	// If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging
1508	// will be applied if one or more matching rule requires logging. -
1509	// Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is
1510	// granted. Logging will be applied if one or more matching rule
1511	// requires logging. - Otherwise, if no rule applies, permission is
1512	// denied.
1513	Rules []*Rule `json:"rules,omitempty"`
1514
1515	// Version: Deprecated.
1516	Version int64 `json:"version,omitempty"`
1517
1518	// ServerResponse contains the HTTP response code and headers from the
1519	// server.
1520	googleapi.ServerResponse `json:"-"`
1521
1522	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
1523	// unconditionally include in API requests. By default, fields with
1524	// empty values are omitted from API requests. However, any non-pointer,
1525	// non-interface field appearing in ForceSendFields will be sent to the
1526	// server regardless of whether the field is empty or not. This may be
1527	// used to include empty fields in Patch requests.
1528	ForceSendFields []string `json:"-"`
1529
1530	// NullFields is a list of field names (e.g. "AuditConfigs") to include
1531	// in API requests with the JSON null value. By default, fields with
1532	// empty values are omitted from API requests. However, any field with
1533	// an empty value appearing in NullFields will be sent to the server as
1534	// null. It is an error if a field in this list has a non-empty value.
1535	// This may be used to include null fields in Patch requests.
1536	NullFields []string `json:"-"`
1537}
1538
1539func (s *Policy) MarshalJSON() ([]byte, error) {
1540	type NoMethod Policy
1541	raw := NoMethod(*s)
1542	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1543}
1544
1545type Resource struct {
1546	// AccessControl: The Access Control Policy set on this resource.
1547	AccessControl *ResourceAccessControl `json:"accessControl,omitempty"`
1548
1549	// FinalProperties: Output only. The evaluated properties of the
1550	// resource with references expanded. Returned as serialized YAML.
1551	FinalProperties string `json:"finalProperties,omitempty"`
1552
1553	Id uint64 `json:"id,omitempty,string"`
1554
1555	// InsertTime: Output only. Creation timestamp in RFC3339 text format.
1556	InsertTime string `json:"insertTime,omitempty"`
1557
1558	// Manifest: Output only. URL of the manifest representing the current
1559	// configuration of this resource.
1560	Manifest string `json:"manifest,omitempty"`
1561
1562	// Name: Output only. The name of the resource as it appears in the YAML
1563	// config.
1564	Name string `json:"name,omitempty"`
1565
1566	// Properties: Output only. The current properties of the resource
1567	// before any references have been filled in. Returned as serialized
1568	// YAML.
1569	Properties string `json:"properties,omitempty"`
1570
1571	// Type: Output only. The type of the resource, for example
1572	// compute.v1.instance, or cloudfunctions.v1beta1.function.
1573	Type string `json:"type,omitempty"`
1574
1575	// Update: Output only. If Deployment Manager is currently updating or
1576	// previewing an update to this resource, the updated configuration
1577	// appears here.
1578	Update *ResourceUpdate `json:"update,omitempty"`
1579
1580	// UpdateTime: Output only. Update timestamp in RFC3339 text format.
1581	UpdateTime string `json:"updateTime,omitempty"`
1582
1583	// Url: Output only. The URL of the actual resource.
1584	Url string `json:"url,omitempty"`
1585
1586	// Warnings: Output only. If warning messages are generated during
1587	// processing of this resource, this field will be populated.
1588	Warnings []*ResourceWarnings `json:"warnings,omitempty"`
1589
1590	// ServerResponse contains the HTTP response code and headers from the
1591	// server.
1592	googleapi.ServerResponse `json:"-"`
1593
1594	// ForceSendFields is a list of field names (e.g. "AccessControl") to
1595	// unconditionally include in API requests. By default, fields with
1596	// empty values are omitted from API requests. However, any non-pointer,
1597	// non-interface field appearing in ForceSendFields will be sent to the
1598	// server regardless of whether the field is empty or not. This may be
1599	// used to include empty fields in Patch requests.
1600	ForceSendFields []string `json:"-"`
1601
1602	// NullFields is a list of field names (e.g. "AccessControl") to include
1603	// in API requests with the JSON null value. By default, fields with
1604	// empty values are omitted from API requests. However, any field with
1605	// an empty value appearing in NullFields will be sent to the server as
1606	// null. It is an error if a field in this list has a non-empty value.
1607	// This may be used to include null fields in Patch requests.
1608	NullFields []string `json:"-"`
1609}
1610
1611func (s *Resource) MarshalJSON() ([]byte, error) {
1612	type NoMethod Resource
1613	raw := NoMethod(*s)
1614	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1615}
1616
1617type ResourceWarnings struct {
1618	// Code: [Output Only] A warning code, if applicable. For example,
1619	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
1620	// the response.
1621	Code string `json:"code,omitempty"`
1622
1623	// Data: [Output Only] Metadata about this warning in key: value format.
1624	// For example:
1625	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1626	Data []*ResourceWarningsData `json:"data,omitempty"`
1627
1628	// Message: [Output Only] A human-readable description of the warning
1629	// code.
1630	Message string `json:"message,omitempty"`
1631
1632	// ForceSendFields is a list of field names (e.g. "Code") to
1633	// unconditionally include in API requests. By default, fields with
1634	// empty values are omitted from API requests. However, any non-pointer,
1635	// non-interface field appearing in ForceSendFields will be sent to the
1636	// server regardless of whether the field is empty or not. This may be
1637	// used to include empty fields in Patch requests.
1638	ForceSendFields []string `json:"-"`
1639
1640	// NullFields is a list of field names (e.g. "Code") to include in API
1641	// requests with the JSON null value. By default, fields with empty
1642	// values are omitted from API requests. However, any field with an
1643	// empty value appearing in NullFields will be sent to the server as
1644	// null. It is an error if a field in this list has a non-empty value.
1645	// This may be used to include null fields in Patch requests.
1646	NullFields []string `json:"-"`
1647}
1648
1649func (s *ResourceWarnings) MarshalJSON() ([]byte, error) {
1650	type NoMethod ResourceWarnings
1651	raw := NoMethod(*s)
1652	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1653}
1654
1655type ResourceWarningsData struct {
1656	// Key: [Output Only] A key that provides more detail on the warning
1657	// being returned. For example, for warnings where there are no results
1658	// in a list request for a particular zone, this key might be scope and
1659	// the key value might be the zone name. Other examples might be a key
1660	// indicating a deprecated resource and a suggested replacement, or a
1661	// warning about invalid network settings (for example, if an instance
1662	// attempts to perform IP forwarding but is not enabled for IP
1663	// forwarding).
1664	Key string `json:"key,omitempty"`
1665
1666	// Value: [Output Only] A warning data value corresponding to the key.
1667	Value string `json:"value,omitempty"`
1668
1669	// ForceSendFields is a list of field names (e.g. "Key") to
1670	// unconditionally include in API requests. By default, fields with
1671	// empty values are omitted from API requests. However, any non-pointer,
1672	// non-interface field appearing in ForceSendFields will be sent to the
1673	// server regardless of whether the field is empty or not. This may be
1674	// used to include empty fields in Patch requests.
1675	ForceSendFields []string `json:"-"`
1676
1677	// NullFields is a list of field names (e.g. "Key") to include in API
1678	// requests with the JSON null value. By default, fields with empty
1679	// values are omitted from API requests. However, any field with an
1680	// empty value appearing in NullFields will be sent to the server as
1681	// null. It is an error if a field in this list has a non-empty value.
1682	// This may be used to include null fields in Patch requests.
1683	NullFields []string `json:"-"`
1684}
1685
1686func (s *ResourceWarningsData) MarshalJSON() ([]byte, error) {
1687	type NoMethod ResourceWarningsData
1688	raw := NoMethod(*s)
1689	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1690}
1691
1692// ResourceAccessControl: The access controls set on the resource.
1693type ResourceAccessControl struct {
1694	// GcpIamPolicy: The GCP IAM Policy to set on the resource.
1695	GcpIamPolicy string `json:"gcpIamPolicy,omitempty"`
1696
1697	// ForceSendFields is a list of field names (e.g. "GcpIamPolicy") to
1698	// unconditionally include in API requests. By default, fields with
1699	// empty values are omitted from API requests. However, any non-pointer,
1700	// non-interface field appearing in ForceSendFields will be sent to the
1701	// server regardless of whether the field is empty or not. This may be
1702	// used to include empty fields in Patch requests.
1703	ForceSendFields []string `json:"-"`
1704
1705	// NullFields is a list of field names (e.g. "GcpIamPolicy") to include
1706	// in API requests with the JSON null value. By default, fields with
1707	// empty values are omitted from API requests. However, any field with
1708	// an empty value appearing in NullFields will be sent to the server as
1709	// null. It is an error if a field in this list has a non-empty value.
1710	// This may be used to include null fields in Patch requests.
1711	NullFields []string `json:"-"`
1712}
1713
1714func (s *ResourceAccessControl) MarshalJSON() ([]byte, error) {
1715	type NoMethod ResourceAccessControl
1716	raw := NoMethod(*s)
1717	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1718}
1719
1720type ResourceUpdate struct {
1721	// AccessControl: The Access Control Policy to set on this resource
1722	// after updating the resource itself.
1723	AccessControl *ResourceAccessControl `json:"accessControl,omitempty"`
1724
1725	// Error: Output only. If errors are generated during update of the
1726	// resource, this field will be populated.
1727	Error *ResourceUpdateError `json:"error,omitempty"`
1728
1729	// FinalProperties: Output only. The expanded properties of the resource
1730	// with reference values expanded. Returned as serialized YAML.
1731	FinalProperties string `json:"finalProperties,omitempty"`
1732
1733	// Intent: Output only. The intent of the resource: PREVIEW, UPDATE, or
1734	// CANCEL.
1735	Intent string `json:"intent,omitempty"`
1736
1737	// Manifest: Output only. URL of the manifest representing the update
1738	// configuration of this resource.
1739	Manifest string `json:"manifest,omitempty"`
1740
1741	// Properties: Output only. The set of updated properties for this
1742	// resource, before references are expanded. Returned as serialized
1743	// YAML.
1744	Properties string `json:"properties,omitempty"`
1745
1746	// State: Output only. The state of the resource.
1747	State string `json:"state,omitempty"`
1748
1749	// Warnings: Output only. If warning messages are generated during
1750	// processing of this resource, this field will be populated.
1751	Warnings []*ResourceUpdateWarnings `json:"warnings,omitempty"`
1752
1753	// ForceSendFields is a list of field names (e.g. "AccessControl") to
1754	// unconditionally include in API requests. By default, fields with
1755	// empty values are omitted from API requests. However, any non-pointer,
1756	// non-interface field appearing in ForceSendFields will be sent to the
1757	// server regardless of whether the field is empty or not. This may be
1758	// used to include empty fields in Patch requests.
1759	ForceSendFields []string `json:"-"`
1760
1761	// NullFields is a list of field names (e.g. "AccessControl") to include
1762	// in API requests with the JSON null value. By default, fields with
1763	// empty values are omitted from API requests. However, any field with
1764	// an empty value appearing in NullFields will be sent to the server as
1765	// null. It is an error if a field in this list has a non-empty value.
1766	// This may be used to include null fields in Patch requests.
1767	NullFields []string `json:"-"`
1768}
1769
1770func (s *ResourceUpdate) MarshalJSON() ([]byte, error) {
1771	type NoMethod ResourceUpdate
1772	raw := NoMethod(*s)
1773	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1774}
1775
1776// ResourceUpdateError: Output only. If errors are generated during
1777// update of the resource, this field will be populated.
1778type ResourceUpdateError struct {
1779	// Errors: [Output Only] The array of errors encountered while
1780	// processing this operation.
1781	Errors []*ResourceUpdateErrorErrors `json:"errors,omitempty"`
1782
1783	// ForceSendFields is a list of field names (e.g. "Errors") to
1784	// unconditionally include in API requests. By default, fields with
1785	// empty values are omitted from API requests. However, any non-pointer,
1786	// non-interface field appearing in ForceSendFields will be sent to the
1787	// server regardless of whether the field is empty or not. This may be
1788	// used to include empty fields in Patch requests.
1789	ForceSendFields []string `json:"-"`
1790
1791	// NullFields is a list of field names (e.g. "Errors") to include in API
1792	// requests with the JSON null value. By default, fields with empty
1793	// values are omitted from API requests. However, any field with an
1794	// empty value appearing in NullFields will be sent to the server as
1795	// null. It is an error if a field in this list has a non-empty value.
1796	// This may be used to include null fields in Patch requests.
1797	NullFields []string `json:"-"`
1798}
1799
1800func (s *ResourceUpdateError) MarshalJSON() ([]byte, error) {
1801	type NoMethod ResourceUpdateError
1802	raw := NoMethod(*s)
1803	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1804}
1805
1806type ResourceUpdateErrorErrors struct {
1807	// Code: [Output Only] The error type identifier for this error.
1808	Code string `json:"code,omitempty"`
1809
1810	// Location: [Output Only] Indicates the field in the request that
1811	// caused the error. This property is optional.
1812	Location string `json:"location,omitempty"`
1813
1814	// Message: [Output Only] An optional, human-readable error message.
1815	Message string `json:"message,omitempty"`
1816
1817	// ForceSendFields is a list of field names (e.g. "Code") to
1818	// unconditionally include in API requests. By default, fields with
1819	// empty values are omitted from API requests. However, any non-pointer,
1820	// non-interface field appearing in ForceSendFields will be sent to the
1821	// server regardless of whether the field is empty or not. This may be
1822	// used to include empty fields in Patch requests.
1823	ForceSendFields []string `json:"-"`
1824
1825	// NullFields is a list of field names (e.g. "Code") to include in API
1826	// requests with the JSON null value. By default, fields with empty
1827	// values are omitted from API requests. However, any field with an
1828	// empty value appearing in NullFields will be sent to the server as
1829	// null. It is an error if a field in this list has a non-empty value.
1830	// This may be used to include null fields in Patch requests.
1831	NullFields []string `json:"-"`
1832}
1833
1834func (s *ResourceUpdateErrorErrors) MarshalJSON() ([]byte, error) {
1835	type NoMethod ResourceUpdateErrorErrors
1836	raw := NoMethod(*s)
1837	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1838}
1839
1840type ResourceUpdateWarnings struct {
1841	// Code: [Output Only] A warning code, if applicable. For example,
1842	// Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in
1843	// the response.
1844	Code string `json:"code,omitempty"`
1845
1846	// Data: [Output Only] Metadata about this warning in key: value format.
1847	// For example:
1848	// "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1849	Data []*ResourceUpdateWarningsData `json:"data,omitempty"`
1850
1851	// Message: [Output Only] A human-readable description of the warning
1852	// code.
1853	Message string `json:"message,omitempty"`
1854
1855	// ForceSendFields is a list of field names (e.g. "Code") to
1856	// unconditionally include in API requests. By default, fields with
1857	// empty values are omitted from API requests. However, any non-pointer,
1858	// non-interface field appearing in ForceSendFields will be sent to the
1859	// server regardless of whether the field is empty or not. This may be
1860	// used to include empty fields in Patch requests.
1861	ForceSendFields []string `json:"-"`
1862
1863	// NullFields is a list of field names (e.g. "Code") to include in API
1864	// requests with the JSON null value. By default, fields with empty
1865	// values are omitted from API requests. However, any field with an
1866	// empty value appearing in NullFields will be sent to the server as
1867	// null. It is an error if a field in this list has a non-empty value.
1868	// This may be used to include null fields in Patch requests.
1869	NullFields []string `json:"-"`
1870}
1871
1872func (s *ResourceUpdateWarnings) MarshalJSON() ([]byte, error) {
1873	type NoMethod ResourceUpdateWarnings
1874	raw := NoMethod(*s)
1875	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1876}
1877
1878type ResourceUpdateWarningsData struct {
1879	// Key: [Output Only] A key that provides more detail on the warning
1880	// being returned. For example, for warnings where there are no results
1881	// in a list request for a particular zone, this key might be scope and
1882	// the key value might be the zone name. Other examples might be a key
1883	// indicating a deprecated resource and a suggested replacement, or a
1884	// warning about invalid network settings (for example, if an instance
1885	// attempts to perform IP forwarding but is not enabled for IP
1886	// forwarding).
1887	Key string `json:"key,omitempty"`
1888
1889	// Value: [Output Only] A warning data value corresponding to the key.
1890	Value string `json:"value,omitempty"`
1891
1892	// ForceSendFields is a list of field names (e.g. "Key") to
1893	// unconditionally include in API requests. By default, fields with
1894	// empty values are omitted from API requests. However, any non-pointer,
1895	// non-interface field appearing in ForceSendFields will be sent to the
1896	// server regardless of whether the field is empty or not. This may be
1897	// used to include empty fields in Patch requests.
1898	ForceSendFields []string `json:"-"`
1899
1900	// NullFields is a list of field names (e.g. "Key") to include in API
1901	// requests with the JSON null value. By default, fields with empty
1902	// values are omitted from API requests. However, any field with an
1903	// empty value appearing in NullFields will be sent to the server as
1904	// null. It is an error if a field in this list has a non-empty value.
1905	// This may be used to include null fields in Patch requests.
1906	NullFields []string `json:"-"`
1907}
1908
1909func (s *ResourceUpdateWarningsData) MarshalJSON() ([]byte, error) {
1910	type NoMethod ResourceUpdateWarningsData
1911	raw := NoMethod(*s)
1912	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1913}
1914
1915// ResourcesListResponse: A response containing a partial list of
1916// resources and a page token used to build the next request if the
1917// request has been truncated.
1918type ResourcesListResponse struct {
1919	// NextPageToken: A token used to continue a truncated list request.
1920	NextPageToken string `json:"nextPageToken,omitempty"`
1921
1922	// Resources: Resources contained in this list response.
1923	Resources []*Resource `json:"resources,omitempty"`
1924
1925	// ServerResponse contains the HTTP response code and headers from the
1926	// server.
1927	googleapi.ServerResponse `json:"-"`
1928
1929	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1930	// unconditionally include in API requests. By default, fields with
1931	// empty values are omitted from API requests. However, any non-pointer,
1932	// non-interface field appearing in ForceSendFields will be sent to the
1933	// server regardless of whether the field is empty or not. This may be
1934	// used to include empty fields in Patch requests.
1935	ForceSendFields []string `json:"-"`
1936
1937	// NullFields is a list of field names (e.g. "NextPageToken") to include
1938	// in API requests with the JSON null value. By default, fields with
1939	// empty values are omitted from API requests. However, any field with
1940	// an empty value appearing in NullFields will be sent to the server as
1941	// null. It is an error if a field in this list has a non-empty value.
1942	// This may be used to include null fields in Patch requests.
1943	NullFields []string `json:"-"`
1944}
1945
1946func (s *ResourcesListResponse) MarshalJSON() ([]byte, error) {
1947	type NoMethod ResourcesListResponse
1948	raw := NoMethod(*s)
1949	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1950}
1951
1952// Rule: A rule to be applied in a Policy.
1953type Rule struct {
1954	// Action: Required
1955	Action string `json:"action,omitempty"`
1956
1957	// Conditions: Additional restrictions that must be met. All conditions
1958	// must pass for the rule to match.
1959	Conditions []*Condition `json:"conditions,omitempty"`
1960
1961	// Description: Human-readable description of the rule.
1962	Description string `json:"description,omitempty"`
1963
1964	// Ins: If one or more 'in' clauses are specified, the rule matches if
1965	// the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries.
1966	Ins []string `json:"ins,omitempty"`
1967
1968	// LogConfigs: The config returned to callers of
1969	// tech.iam.IAM.CheckPolicy for any entries that match the LOG action.
1970	LogConfigs []*LogConfig `json:"logConfigs,omitempty"`
1971
1972	// NotIns: If one or more 'not_in' clauses are specified, the rule
1973	// matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the
1974	// entries.
1975	NotIns []string `json:"notIns,omitempty"`
1976
1977	// Permissions: A permission is a string of form '..' (e.g.,
1978	// 'storage.buckets.list'). A value of '*' matches all permissions, and
1979	// a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.
1980	Permissions []string `json:"permissions,omitempty"`
1981
1982	// ForceSendFields is a list of field names (e.g. "Action") to
1983	// unconditionally include in API requests. By default, fields with
1984	// empty values are omitted from API requests. However, any non-pointer,
1985	// non-interface field appearing in ForceSendFields will be sent to the
1986	// server regardless of whether the field is empty or not. This may be
1987	// used to include empty fields in Patch requests.
1988	ForceSendFields []string `json:"-"`
1989
1990	// NullFields is a list of field names (e.g. "Action") to include in API
1991	// requests with the JSON null value. By default, fields with empty
1992	// values are omitted from API requests. However, any field with an
1993	// empty value appearing in NullFields will be sent to the server as
1994	// null. It is an error if a field in this list has a non-empty value.
1995	// This may be used to include null fields in Patch requests.
1996	NullFields []string `json:"-"`
1997}
1998
1999func (s *Rule) MarshalJSON() ([]byte, error) {
2000	type NoMethod Rule
2001	raw := NoMethod(*s)
2002	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2003}
2004
2005type TargetConfiguration struct {
2006	// Config: The configuration to use for this deployment.
2007	Config *ConfigFile `json:"config,omitempty"`
2008
2009	// Imports: Specifies any files to import for this configuration. This
2010	// can be used to import templates or other files. For example, you
2011	// might import a text file in order to use the file in a template.
2012	Imports []*ImportFile `json:"imports,omitempty"`
2013
2014	// ForceSendFields is a list of field names (e.g. "Config") to
2015	// unconditionally include in API requests. By default, fields with
2016	// empty values are omitted from API requests. However, any non-pointer,
2017	// non-interface field appearing in ForceSendFields will be sent to the
2018	// server regardless of whether the field is empty or not. This may be
2019	// used to include empty fields in Patch requests.
2020	ForceSendFields []string `json:"-"`
2021
2022	// NullFields is a list of field names (e.g. "Config") to include in API
2023	// requests with the JSON null value. By default, fields with empty
2024	// values are omitted from API requests. However, any field with an
2025	// empty value appearing in NullFields will be sent to the server as
2026	// null. It is an error if a field in this list has a non-empty value.
2027	// This may be used to include null fields in Patch requests.
2028	NullFields []string `json:"-"`
2029}
2030
2031func (s *TargetConfiguration) MarshalJSON() ([]byte, error) {
2032	type NoMethod TargetConfiguration
2033	raw := NoMethod(*s)
2034	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2035}
2036
2037type TestPermissionsRequest struct {
2038	// Permissions: The set of permissions to check for the 'resource'.
2039	// Permissions with wildcards (such as '*' or 'storage.*') are not
2040	// allowed.
2041	Permissions []string `json:"permissions,omitempty"`
2042
2043	// ForceSendFields is a list of field names (e.g. "Permissions") to
2044	// unconditionally include in API requests. By default, fields with
2045	// empty values are omitted from API requests. However, any non-pointer,
2046	// non-interface field appearing in ForceSendFields will be sent to the
2047	// server regardless of whether the field is empty or not. This may be
2048	// used to include empty fields in Patch requests.
2049	ForceSendFields []string `json:"-"`
2050
2051	// NullFields is a list of field names (e.g. "Permissions") to include
2052	// in API requests with the JSON null value. By default, fields with
2053	// empty values are omitted from API requests. However, any field with
2054	// an empty value appearing in NullFields will be sent to the server as
2055	// null. It is an error if a field in this list has a non-empty value.
2056	// This may be used to include null fields in Patch requests.
2057	NullFields []string `json:"-"`
2058}
2059
2060func (s *TestPermissionsRequest) MarshalJSON() ([]byte, error) {
2061	type NoMethod TestPermissionsRequest
2062	raw := NoMethod(*s)
2063	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2064}
2065
2066type TestPermissionsResponse struct {
2067	// Permissions: A subset of `TestPermissionsRequest.permissions` that
2068	// the caller is allowed.
2069	Permissions []string `json:"permissions,omitempty"`
2070
2071	// ServerResponse contains the HTTP response code and headers from the
2072	// server.
2073	googleapi.ServerResponse `json:"-"`
2074
2075	// ForceSendFields is a list of field names (e.g. "Permissions") to
2076	// unconditionally include in API requests. By default, fields with
2077	// empty values are omitted from API requests. However, any non-pointer,
2078	// non-interface field appearing in ForceSendFields will be sent to the
2079	// server regardless of whether the field is empty or not. This may be
2080	// used to include empty fields in Patch requests.
2081	ForceSendFields []string `json:"-"`
2082
2083	// NullFields is a list of field names (e.g. "Permissions") to include
2084	// in API requests with the JSON null value. By default, fields with
2085	// empty values are omitted from API requests. However, any field with
2086	// an empty value appearing in NullFields will be sent to the server as
2087	// null. It is an error if a field in this list has a non-empty value.
2088	// This may be used to include null fields in Patch requests.
2089	NullFields []string `json:"-"`
2090}
2091
2092func (s *TestPermissionsResponse) MarshalJSON() ([]byte, error) {
2093	type NoMethod TestPermissionsResponse
2094	raw := NoMethod(*s)
2095	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2096}
2097
2098// Type: A resource type supported by Deployment Manager.
2099type Type struct {
2100	Id uint64 `json:"id,omitempty,string"`
2101
2102	// InsertTime: Output only. Creation timestamp in RFC3339 text format.
2103	InsertTime string `json:"insertTime,omitempty"`
2104
2105	// Name: Name of the type.
2106	Name string `json:"name,omitempty"`
2107
2108	// Operation: Output only. The Operation that most recently ran, or is
2109	// currently running, on this type.
2110	Operation *Operation `json:"operation,omitempty"`
2111
2112	// SelfLink: Output only. Server defined URL for the resource.
2113	SelfLink string `json:"selfLink,omitempty"`
2114
2115	// ForceSendFields is a list of field names (e.g. "Id") to
2116	// unconditionally include in API requests. By default, fields with
2117	// empty values are omitted from API requests. However, any non-pointer,
2118	// non-interface field appearing in ForceSendFields will be sent to the
2119	// server regardless of whether the field is empty or not. This may be
2120	// used to include empty fields in Patch requests.
2121	ForceSendFields []string `json:"-"`
2122
2123	// NullFields is a list of field names (e.g. "Id") to include in API
2124	// requests with the JSON null value. By default, fields with empty
2125	// values are omitted from API requests. However, any field with an
2126	// empty value appearing in NullFields will be sent to the server as
2127	// null. It is an error if a field in this list has a non-empty value.
2128	// This may be used to include null fields in Patch requests.
2129	NullFields []string `json:"-"`
2130}
2131
2132func (s *Type) MarshalJSON() ([]byte, error) {
2133	type NoMethod Type
2134	raw := NoMethod(*s)
2135	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2136}
2137
2138// TypesListResponse: A response that returns all Types supported by
2139// Deployment Manager
2140type TypesListResponse struct {
2141	// NextPageToken: A token used to continue a truncated list request.
2142	NextPageToken string `json:"nextPageToken,omitempty"`
2143
2144	// Types: Output only. A list of resource types supported by Deployment
2145	// Manager.
2146	Types []*Type `json:"types,omitempty"`
2147
2148	// ServerResponse contains the HTTP response code and headers from the
2149	// server.
2150	googleapi.ServerResponse `json:"-"`
2151
2152	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2153	// unconditionally include in API requests. By default, fields with
2154	// empty values are omitted from API requests. However, any non-pointer,
2155	// non-interface field appearing in ForceSendFields will be sent to the
2156	// server regardless of whether the field is empty or not. This may be
2157	// used to include empty fields in Patch requests.
2158	ForceSendFields []string `json:"-"`
2159
2160	// NullFields is a list of field names (e.g. "NextPageToken") to include
2161	// in API requests with the JSON null value. By default, fields with
2162	// empty values are omitted from API requests. However, any field with
2163	// an empty value appearing in NullFields will be sent to the server as
2164	// null. It is an error if a field in this list has a non-empty value.
2165	// This may be used to include null fields in Patch requests.
2166	NullFields []string `json:"-"`
2167}
2168
2169func (s *TypesListResponse) MarshalJSON() ([]byte, error) {
2170	type NoMethod TypesListResponse
2171	raw := NoMethod(*s)
2172	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2173}
2174
2175// method id "deploymentmanager.deployments.cancelPreview":
2176
2177type DeploymentsCancelPreviewCall struct {
2178	s                               *Service
2179	project                         string
2180	deployment                      string
2181	deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest
2182	urlParams_                      gensupport.URLParams
2183	ctx_                            context.Context
2184	header_                         http.Header
2185}
2186
2187// CancelPreview: Cancels and removes the preview currently associated
2188// with the deployment.
2189func (r *DeploymentsService) CancelPreview(project string, deployment string, deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest) *DeploymentsCancelPreviewCall {
2190	c := &DeploymentsCancelPreviewCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2191	c.project = project
2192	c.deployment = deployment
2193	c.deploymentscancelpreviewrequest = deploymentscancelpreviewrequest
2194	return c
2195}
2196
2197// Fields allows partial responses to be retrieved. See
2198// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2199// for more information.
2200func (c *DeploymentsCancelPreviewCall) Fields(s ...googleapi.Field) *DeploymentsCancelPreviewCall {
2201	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2202	return c
2203}
2204
2205// Context sets the context to be used in this call's Do method. Any
2206// pending HTTP request will be aborted if the provided context is
2207// canceled.
2208func (c *DeploymentsCancelPreviewCall) Context(ctx context.Context) *DeploymentsCancelPreviewCall {
2209	c.ctx_ = ctx
2210	return c
2211}
2212
2213// Header returns an http.Header that can be modified by the caller to
2214// add HTTP headers to the request.
2215func (c *DeploymentsCancelPreviewCall) Header() http.Header {
2216	if c.header_ == nil {
2217		c.header_ = make(http.Header)
2218	}
2219	return c.header_
2220}
2221
2222func (c *DeploymentsCancelPreviewCall) doRequest(alt string) (*http.Response, error) {
2223	reqHeaders := make(http.Header)
2224	for k, v := range c.header_ {
2225		reqHeaders[k] = v
2226	}
2227	reqHeaders.Set("User-Agent", c.s.userAgent())
2228	var body io.Reader = nil
2229	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentscancelpreviewrequest)
2230	if err != nil {
2231		return nil, err
2232	}
2233	reqHeaders.Set("Content-Type", "application/json")
2234	c.urlParams_.Set("alt", alt)
2235	c.urlParams_.Set("prettyPrint", "false")
2236	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/cancelPreview")
2237	urls += "?" + c.urlParams_.Encode()
2238	req, err := http.NewRequest("POST", urls, body)
2239	if err != nil {
2240		return nil, err
2241	}
2242	req.Header = reqHeaders
2243	googleapi.Expand(req.URL, map[string]string{
2244		"project":    c.project,
2245		"deployment": c.deployment,
2246	})
2247	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2248}
2249
2250// Do executes the "deploymentmanager.deployments.cancelPreview" call.
2251// Exactly one of *Operation or error will be non-nil. Any non-2xx
2252// status code is an error. Response headers are in either
2253// *Operation.ServerResponse.Header or (if a response was returned at
2254// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2255// to check whether the returned error was because
2256// http.StatusNotModified was returned.
2257func (c *DeploymentsCancelPreviewCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2258	gensupport.SetOptions(c.urlParams_, opts...)
2259	res, err := c.doRequest("json")
2260	if res != nil && res.StatusCode == http.StatusNotModified {
2261		if res.Body != nil {
2262			res.Body.Close()
2263		}
2264		return nil, &googleapi.Error{
2265			Code:   res.StatusCode,
2266			Header: res.Header,
2267		}
2268	}
2269	if err != nil {
2270		return nil, err
2271	}
2272	defer googleapi.CloseBody(res)
2273	if err := googleapi.CheckResponse(res); err != nil {
2274		return nil, err
2275	}
2276	ret := &Operation{
2277		ServerResponse: googleapi.ServerResponse{
2278			Header:         res.Header,
2279			HTTPStatusCode: res.StatusCode,
2280		},
2281	}
2282	target := &ret
2283	if err := gensupport.DecodeResponse(target, res); err != nil {
2284		return nil, err
2285	}
2286	return ret, nil
2287	// {
2288	//   "description": "Cancels and removes the preview currently associated with the deployment.",
2289	//   "httpMethod": "POST",
2290	//   "id": "deploymentmanager.deployments.cancelPreview",
2291	//   "parameterOrder": [
2292	//     "project",
2293	//     "deployment"
2294	//   ],
2295	//   "parameters": {
2296	//     "deployment": {
2297	//       "description": "The name of the deployment for this request.",
2298	//       "location": "path",
2299	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
2300	//       "required": true,
2301	//       "type": "string"
2302	//     },
2303	//     "project": {
2304	//       "description": "The project ID for this request.",
2305	//       "location": "path",
2306	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
2307	//       "required": true,
2308	//       "type": "string"
2309	//     }
2310	//   },
2311	//   "path": "{project}/global/deployments/{deployment}/cancelPreview",
2312	//   "request": {
2313	//     "$ref": "DeploymentsCancelPreviewRequest"
2314	//   },
2315	//   "response": {
2316	//     "$ref": "Operation"
2317	//   },
2318	//   "scopes": [
2319	//     "https://www.googleapis.com/auth/cloud-platform",
2320	//     "https://www.googleapis.com/auth/ndev.cloudman"
2321	//   ]
2322	// }
2323
2324}
2325
2326// method id "deploymentmanager.deployments.delete":
2327
2328type DeploymentsDeleteCall struct {
2329	s          *Service
2330	project    string
2331	deployment string
2332	urlParams_ gensupport.URLParams
2333	ctx_       context.Context
2334	header_    http.Header
2335}
2336
2337// Delete: Deletes a deployment and all of the resources in the
2338// deployment.
2339func (r *DeploymentsService) Delete(project string, deployment string) *DeploymentsDeleteCall {
2340	c := &DeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2341	c.project = project
2342	c.deployment = deployment
2343	return c
2344}
2345
2346// DeletePolicy sets the optional parameter "deletePolicy": Sets the
2347// policy to use for deleting resources.
2348//
2349// Possible values:
2350//   "ABANDON"
2351//   "DELETE" (default)
2352func (c *DeploymentsDeleteCall) DeletePolicy(deletePolicy string) *DeploymentsDeleteCall {
2353	c.urlParams_.Set("deletePolicy", deletePolicy)
2354	return c
2355}
2356
2357// Fields allows partial responses to be retrieved. See
2358// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2359// for more information.
2360func (c *DeploymentsDeleteCall) Fields(s ...googleapi.Field) *DeploymentsDeleteCall {
2361	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2362	return c
2363}
2364
2365// Context sets the context to be used in this call's Do method. Any
2366// pending HTTP request will be aborted if the provided context is
2367// canceled.
2368func (c *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall {
2369	c.ctx_ = ctx
2370	return c
2371}
2372
2373// Header returns an http.Header that can be modified by the caller to
2374// add HTTP headers to the request.
2375func (c *DeploymentsDeleteCall) Header() http.Header {
2376	if c.header_ == nil {
2377		c.header_ = make(http.Header)
2378	}
2379	return c.header_
2380}
2381
2382func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
2383	reqHeaders := make(http.Header)
2384	for k, v := range c.header_ {
2385		reqHeaders[k] = v
2386	}
2387	reqHeaders.Set("User-Agent", c.s.userAgent())
2388	var body io.Reader = nil
2389	c.urlParams_.Set("alt", alt)
2390	c.urlParams_.Set("prettyPrint", "false")
2391	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
2392	urls += "?" + c.urlParams_.Encode()
2393	req, err := http.NewRequest("DELETE", urls, body)
2394	if err != nil {
2395		return nil, err
2396	}
2397	req.Header = reqHeaders
2398	googleapi.Expand(req.URL, map[string]string{
2399		"project":    c.project,
2400		"deployment": c.deployment,
2401	})
2402	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2403}
2404
2405// Do executes the "deploymentmanager.deployments.delete" call.
2406// Exactly one of *Operation or error will be non-nil. Any non-2xx
2407// status code is an error. Response headers are in either
2408// *Operation.ServerResponse.Header or (if a response was returned at
2409// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2410// to check whether the returned error was because
2411// http.StatusNotModified was returned.
2412func (c *DeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2413	gensupport.SetOptions(c.urlParams_, opts...)
2414	res, err := c.doRequest("json")
2415	if res != nil && res.StatusCode == http.StatusNotModified {
2416		if res.Body != nil {
2417			res.Body.Close()
2418		}
2419		return nil, &googleapi.Error{
2420			Code:   res.StatusCode,
2421			Header: res.Header,
2422		}
2423	}
2424	if err != nil {
2425		return nil, err
2426	}
2427	defer googleapi.CloseBody(res)
2428	if err := googleapi.CheckResponse(res); err != nil {
2429		return nil, err
2430	}
2431	ret := &Operation{
2432		ServerResponse: googleapi.ServerResponse{
2433			Header:         res.Header,
2434			HTTPStatusCode: res.StatusCode,
2435		},
2436	}
2437	target := &ret
2438	if err := gensupport.DecodeResponse(target, res); err != nil {
2439		return nil, err
2440	}
2441	return ret, nil
2442	// {
2443	//   "description": "Deletes a deployment and all of the resources in the deployment.",
2444	//   "httpMethod": "DELETE",
2445	//   "id": "deploymentmanager.deployments.delete",
2446	//   "parameterOrder": [
2447	//     "project",
2448	//     "deployment"
2449	//   ],
2450	//   "parameters": {
2451	//     "deletePolicy": {
2452	//       "default": "DELETE",
2453	//       "description": "Sets the policy to use for deleting resources.",
2454	//       "enum": [
2455	//         "ABANDON",
2456	//         "DELETE"
2457	//       ],
2458	//       "enumDescriptions": [
2459	//         "",
2460	//         ""
2461	//       ],
2462	//       "location": "query",
2463	//       "type": "string"
2464	//     },
2465	//     "deployment": {
2466	//       "description": "The name of the deployment for this request.",
2467	//       "location": "path",
2468	//       "required": true,
2469	//       "type": "string"
2470	//     },
2471	//     "project": {
2472	//       "description": "The project ID for this request.",
2473	//       "location": "path",
2474	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
2475	//       "required": true,
2476	//       "type": "string"
2477	//     }
2478	//   },
2479	//   "path": "{project}/global/deployments/{deployment}",
2480	//   "response": {
2481	//     "$ref": "Operation"
2482	//   },
2483	//   "scopes": [
2484	//     "https://www.googleapis.com/auth/cloud-platform",
2485	//     "https://www.googleapis.com/auth/ndev.cloudman"
2486	//   ]
2487	// }
2488
2489}
2490
2491// method id "deploymentmanager.deployments.get":
2492
2493type DeploymentsGetCall struct {
2494	s            *Service
2495	project      string
2496	deployment   string
2497	urlParams_   gensupport.URLParams
2498	ifNoneMatch_ string
2499	ctx_         context.Context
2500	header_      http.Header
2501}
2502
2503// Get: Gets information about a specific deployment.
2504func (r *DeploymentsService) Get(project string, deployment string) *DeploymentsGetCall {
2505	c := &DeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2506	c.project = project
2507	c.deployment = deployment
2508	return c
2509}
2510
2511// Fields allows partial responses to be retrieved. See
2512// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2513// for more information.
2514func (c *DeploymentsGetCall) Fields(s ...googleapi.Field) *DeploymentsGetCall {
2515	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2516	return c
2517}
2518
2519// IfNoneMatch sets the optional parameter which makes the operation
2520// fail if the object's ETag matches the given value. This is useful for
2521// getting updates only after the object has changed since the last
2522// request. Use googleapi.IsNotModified to check whether the response
2523// error from Do is the result of In-None-Match.
2524func (c *DeploymentsGetCall) IfNoneMatch(entityTag string) *DeploymentsGetCall {
2525	c.ifNoneMatch_ = entityTag
2526	return c
2527}
2528
2529// Context sets the context to be used in this call's Do method. Any
2530// pending HTTP request will be aborted if the provided context is
2531// canceled.
2532func (c *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
2533	c.ctx_ = ctx
2534	return c
2535}
2536
2537// Header returns an http.Header that can be modified by the caller to
2538// add HTTP headers to the request.
2539func (c *DeploymentsGetCall) Header() http.Header {
2540	if c.header_ == nil {
2541		c.header_ = make(http.Header)
2542	}
2543	return c.header_
2544}
2545
2546func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
2547	reqHeaders := make(http.Header)
2548	for k, v := range c.header_ {
2549		reqHeaders[k] = v
2550	}
2551	reqHeaders.Set("User-Agent", c.s.userAgent())
2552	if c.ifNoneMatch_ != "" {
2553		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2554	}
2555	var body io.Reader = nil
2556	c.urlParams_.Set("alt", alt)
2557	c.urlParams_.Set("prettyPrint", "false")
2558	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
2559	urls += "?" + c.urlParams_.Encode()
2560	req, err := http.NewRequest("GET", urls, body)
2561	if err != nil {
2562		return nil, err
2563	}
2564	req.Header = reqHeaders
2565	googleapi.Expand(req.URL, map[string]string{
2566		"project":    c.project,
2567		"deployment": c.deployment,
2568	})
2569	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2570}
2571
2572// Do executes the "deploymentmanager.deployments.get" call.
2573// Exactly one of *Deployment or error will be non-nil. Any non-2xx
2574// status code is an error. Response headers are in either
2575// *Deployment.ServerResponse.Header or (if a response was returned at
2576// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2577// to check whether the returned error was because
2578// http.StatusNotModified was returned.
2579func (c *DeploymentsGetCall) Do(opts ...googleapi.CallOption) (*Deployment, error) {
2580	gensupport.SetOptions(c.urlParams_, opts...)
2581	res, err := c.doRequest("json")
2582	if res != nil && res.StatusCode == http.StatusNotModified {
2583		if res.Body != nil {
2584			res.Body.Close()
2585		}
2586		return nil, &googleapi.Error{
2587			Code:   res.StatusCode,
2588			Header: res.Header,
2589		}
2590	}
2591	if err != nil {
2592		return nil, err
2593	}
2594	defer googleapi.CloseBody(res)
2595	if err := googleapi.CheckResponse(res); err != nil {
2596		return nil, err
2597	}
2598	ret := &Deployment{
2599		ServerResponse: googleapi.ServerResponse{
2600			Header:         res.Header,
2601			HTTPStatusCode: res.StatusCode,
2602		},
2603	}
2604	target := &ret
2605	if err := gensupport.DecodeResponse(target, res); err != nil {
2606		return nil, err
2607	}
2608	return ret, nil
2609	// {
2610	//   "description": "Gets information about a specific deployment.",
2611	//   "httpMethod": "GET",
2612	//   "id": "deploymentmanager.deployments.get",
2613	//   "parameterOrder": [
2614	//     "project",
2615	//     "deployment"
2616	//   ],
2617	//   "parameters": {
2618	//     "deployment": {
2619	//       "description": "The name of the deployment for this request.",
2620	//       "location": "path",
2621	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
2622	//       "required": true,
2623	//       "type": "string"
2624	//     },
2625	//     "project": {
2626	//       "description": "The project ID for this request.",
2627	//       "location": "path",
2628	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
2629	//       "required": true,
2630	//       "type": "string"
2631	//     }
2632	//   },
2633	//   "path": "{project}/global/deployments/{deployment}",
2634	//   "response": {
2635	//     "$ref": "Deployment"
2636	//   },
2637	//   "scopes": [
2638	//     "https://www.googleapis.com/auth/cloud-platform",
2639	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
2640	//     "https://www.googleapis.com/auth/ndev.cloudman",
2641	//     "https://www.googleapis.com/auth/ndev.cloudman.readonly"
2642	//   ]
2643	// }
2644
2645}
2646
2647// method id "deploymentmanager.deployments.getIamPolicy":
2648
2649type DeploymentsGetIamPolicyCall struct {
2650	s            *Service
2651	project      string
2652	resource     string
2653	urlParams_   gensupport.URLParams
2654	ifNoneMatch_ string
2655	ctx_         context.Context
2656	header_      http.Header
2657}
2658
2659// GetIamPolicy: Gets the access control policy for a resource. May be
2660// empty if no such policy or resource exists.
2661func (r *DeploymentsService) GetIamPolicy(project string, resource string) *DeploymentsGetIamPolicyCall {
2662	c := &DeploymentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2663	c.project = project
2664	c.resource = resource
2665	return c
2666}
2667
2668// Fields allows partial responses to be retrieved. See
2669// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2670// for more information.
2671func (c *DeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsGetIamPolicyCall {
2672	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2673	return c
2674}
2675
2676// IfNoneMatch sets the optional parameter which makes the operation
2677// fail if the object's ETag matches the given value. This is useful for
2678// getting updates only after the object has changed since the last
2679// request. Use googleapi.IsNotModified to check whether the response
2680// error from Do is the result of In-None-Match.
2681func (c *DeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *DeploymentsGetIamPolicyCall {
2682	c.ifNoneMatch_ = entityTag
2683	return c
2684}
2685
2686// Context sets the context to be used in this call's Do method. Any
2687// pending HTTP request will be aborted if the provided context is
2688// canceled.
2689func (c *DeploymentsGetIamPolicyCall) Context(ctx context.Context) *DeploymentsGetIamPolicyCall {
2690	c.ctx_ = ctx
2691	return c
2692}
2693
2694// Header returns an http.Header that can be modified by the caller to
2695// add HTTP headers to the request.
2696func (c *DeploymentsGetIamPolicyCall) Header() http.Header {
2697	if c.header_ == nil {
2698		c.header_ = make(http.Header)
2699	}
2700	return c.header_
2701}
2702
2703func (c *DeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
2704	reqHeaders := make(http.Header)
2705	for k, v := range c.header_ {
2706		reqHeaders[k] = v
2707	}
2708	reqHeaders.Set("User-Agent", c.s.userAgent())
2709	if c.ifNoneMatch_ != "" {
2710		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2711	}
2712	var body io.Reader = nil
2713	c.urlParams_.Set("alt", alt)
2714	c.urlParams_.Set("prettyPrint", "false")
2715	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/getIamPolicy")
2716	urls += "?" + c.urlParams_.Encode()
2717	req, err := http.NewRequest("GET", urls, body)
2718	if err != nil {
2719		return nil, err
2720	}
2721	req.Header = reqHeaders
2722	googleapi.Expand(req.URL, map[string]string{
2723		"project":  c.project,
2724		"resource": c.resource,
2725	})
2726	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2727}
2728
2729// Do executes the "deploymentmanager.deployments.getIamPolicy" call.
2730// Exactly one of *Policy or error will be non-nil. Any non-2xx status
2731// code is an error. Response headers are in either
2732// *Policy.ServerResponse.Header or (if a response was returned at all)
2733// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2734// check whether the returned error was because http.StatusNotModified
2735// was returned.
2736func (c *DeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
2737	gensupport.SetOptions(c.urlParams_, opts...)
2738	res, err := c.doRequest("json")
2739	if res != nil && res.StatusCode == http.StatusNotModified {
2740		if res.Body != nil {
2741			res.Body.Close()
2742		}
2743		return nil, &googleapi.Error{
2744			Code:   res.StatusCode,
2745			Header: res.Header,
2746		}
2747	}
2748	if err != nil {
2749		return nil, err
2750	}
2751	defer googleapi.CloseBody(res)
2752	if err := googleapi.CheckResponse(res); err != nil {
2753		return nil, err
2754	}
2755	ret := &Policy{
2756		ServerResponse: googleapi.ServerResponse{
2757			Header:         res.Header,
2758			HTTPStatusCode: res.StatusCode,
2759		},
2760	}
2761	target := &ret
2762	if err := gensupport.DecodeResponse(target, res); err != nil {
2763		return nil, err
2764	}
2765	return ret, nil
2766	// {
2767	//   "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.",
2768	//   "httpMethod": "GET",
2769	//   "id": "deploymentmanager.deployments.getIamPolicy",
2770	//   "parameterOrder": [
2771	//     "project",
2772	//     "resource"
2773	//   ],
2774	//   "parameters": {
2775	//     "project": {
2776	//       "description": "Project ID for this request.",
2777	//       "location": "path",
2778	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
2779	//       "required": true,
2780	//       "type": "string"
2781	//     },
2782	//     "resource": {
2783	//       "description": "Name or id of the resource for this request.",
2784	//       "location": "path",
2785	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
2786	//       "required": true,
2787	//       "type": "string"
2788	//     }
2789	//   },
2790	//   "path": "{project}/global/deployments/{resource}/getIamPolicy",
2791	//   "response": {
2792	//     "$ref": "Policy"
2793	//   },
2794	//   "scopes": [
2795	//     "https://www.googleapis.com/auth/cloud-platform",
2796	//     "https://www.googleapis.com/auth/ndev.cloudman"
2797	//   ]
2798	// }
2799
2800}
2801
2802// method id "deploymentmanager.deployments.insert":
2803
2804type DeploymentsInsertCall struct {
2805	s          *Service
2806	project    string
2807	deployment *Deployment
2808	urlParams_ gensupport.URLParams
2809	ctx_       context.Context
2810	header_    http.Header
2811}
2812
2813// Insert: Creates a deployment and all of the resources described by
2814// the deployment manifest.
2815func (r *DeploymentsService) Insert(project string, deployment *Deployment) *DeploymentsInsertCall {
2816	c := &DeploymentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2817	c.project = project
2818	c.deployment = deployment
2819	return c
2820}
2821
2822// CreatePolicy sets the optional parameter "createPolicy": Sets the
2823// policy to use for creating new resources.
2824//
2825// Possible values:
2826//   "ACQUIRE"
2827//   "CREATE_OR_ACQUIRE" (default)
2828func (c *DeploymentsInsertCall) CreatePolicy(createPolicy string) *DeploymentsInsertCall {
2829	c.urlParams_.Set("createPolicy", createPolicy)
2830	return c
2831}
2832
2833// Preview sets the optional parameter "preview": If set to true,
2834// creates a deployment and creates "shell" resources but does not
2835// actually instantiate these resources. This allows you to preview what
2836// your deployment looks like. After previewing a deployment, you can
2837// deploy your resources by making a request with the update() method or
2838// you can use the cancelPreview() method to cancel the preview
2839// altogether. Note that the deployment will still exist after you
2840// cancel the preview and you must separately delete this deployment if
2841// you want to remove it.
2842func (c *DeploymentsInsertCall) Preview(preview bool) *DeploymentsInsertCall {
2843	c.urlParams_.Set("preview", fmt.Sprint(preview))
2844	return c
2845}
2846
2847// Fields allows partial responses to be retrieved. See
2848// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2849// for more information.
2850func (c *DeploymentsInsertCall) Fields(s ...googleapi.Field) *DeploymentsInsertCall {
2851	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2852	return c
2853}
2854
2855// Context sets the context to be used in this call's Do method. Any
2856// pending HTTP request will be aborted if the provided context is
2857// canceled.
2858func (c *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall {
2859	c.ctx_ = ctx
2860	return c
2861}
2862
2863// Header returns an http.Header that can be modified by the caller to
2864// add HTTP headers to the request.
2865func (c *DeploymentsInsertCall) Header() http.Header {
2866	if c.header_ == nil {
2867		c.header_ = make(http.Header)
2868	}
2869	return c.header_
2870}
2871
2872func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) {
2873	reqHeaders := make(http.Header)
2874	for k, v := range c.header_ {
2875		reqHeaders[k] = v
2876	}
2877	reqHeaders.Set("User-Agent", c.s.userAgent())
2878	var body io.Reader = nil
2879	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
2880	if err != nil {
2881		return nil, err
2882	}
2883	reqHeaders.Set("Content-Type", "application/json")
2884	c.urlParams_.Set("alt", alt)
2885	c.urlParams_.Set("prettyPrint", "false")
2886	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments")
2887	urls += "?" + c.urlParams_.Encode()
2888	req, err := http.NewRequest("POST", urls, body)
2889	if err != nil {
2890		return nil, err
2891	}
2892	req.Header = reqHeaders
2893	googleapi.Expand(req.URL, map[string]string{
2894		"project": c.project,
2895	})
2896	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2897}
2898
2899// Do executes the "deploymentmanager.deployments.insert" call.
2900// Exactly one of *Operation or error will be non-nil. Any non-2xx
2901// status code is an error. Response headers are in either
2902// *Operation.ServerResponse.Header or (if a response was returned at
2903// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2904// to check whether the returned error was because
2905// http.StatusNotModified was returned.
2906func (c *DeploymentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2907	gensupport.SetOptions(c.urlParams_, opts...)
2908	res, err := c.doRequest("json")
2909	if res != nil && res.StatusCode == http.StatusNotModified {
2910		if res.Body != nil {
2911			res.Body.Close()
2912		}
2913		return nil, &googleapi.Error{
2914			Code:   res.StatusCode,
2915			Header: res.Header,
2916		}
2917	}
2918	if err != nil {
2919		return nil, err
2920	}
2921	defer googleapi.CloseBody(res)
2922	if err := googleapi.CheckResponse(res); err != nil {
2923		return nil, err
2924	}
2925	ret := &Operation{
2926		ServerResponse: googleapi.ServerResponse{
2927			Header:         res.Header,
2928			HTTPStatusCode: res.StatusCode,
2929		},
2930	}
2931	target := &ret
2932	if err := gensupport.DecodeResponse(target, res); err != nil {
2933		return nil, err
2934	}
2935	return ret, nil
2936	// {
2937	//   "description": "Creates a deployment and all of the resources described by the deployment manifest.",
2938	//   "httpMethod": "POST",
2939	//   "id": "deploymentmanager.deployments.insert",
2940	//   "parameterOrder": [
2941	//     "project"
2942	//   ],
2943	//   "parameters": {
2944	//     "createPolicy": {
2945	//       "default": "CREATE_OR_ACQUIRE",
2946	//       "description": "Sets the policy to use for creating new resources.",
2947	//       "enum": [
2948	//         "ACQUIRE",
2949	//         "CREATE_OR_ACQUIRE"
2950	//       ],
2951	//       "enumDescriptions": [
2952	//         "",
2953	//         ""
2954	//       ],
2955	//       "location": "query",
2956	//       "type": "string"
2957	//     },
2958	//     "preview": {
2959	//       "description": "If set to true, creates a deployment and creates \"shell\" resources but does not actually instantiate these resources. This allows you to preview what your deployment looks like. After previewing a deployment, you can deploy your resources by making a request with the update() method or you can use the cancelPreview() method to cancel the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.",
2960	//       "location": "query",
2961	//       "type": "boolean"
2962	//     },
2963	//     "project": {
2964	//       "description": "The project ID for this request.",
2965	//       "location": "path",
2966	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
2967	//       "required": true,
2968	//       "type": "string"
2969	//     }
2970	//   },
2971	//   "path": "{project}/global/deployments",
2972	//   "request": {
2973	//     "$ref": "Deployment"
2974	//   },
2975	//   "response": {
2976	//     "$ref": "Operation"
2977	//   },
2978	//   "scopes": [
2979	//     "https://www.googleapis.com/auth/cloud-platform",
2980	//     "https://www.googleapis.com/auth/ndev.cloudman"
2981	//   ]
2982	// }
2983
2984}
2985
2986// method id "deploymentmanager.deployments.list":
2987
2988type DeploymentsListCall struct {
2989	s            *Service
2990	project      string
2991	urlParams_   gensupport.URLParams
2992	ifNoneMatch_ string
2993	ctx_         context.Context
2994	header_      http.Header
2995}
2996
2997// List: Lists all deployments for a given project.
2998func (r *DeploymentsService) List(project string) *DeploymentsListCall {
2999	c := &DeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3000	c.project = project
3001	return c
3002}
3003
3004// Filter sets the optional parameter "filter": A filter expression that
3005// filters resources listed in the response. The expression must specify
3006// the field name, a comparison operator, and the value that you want to
3007// use for filtering. The value must be a string, a number, or a
3008// boolean. The comparison operator must be either =, !=, >, or <.
3009//
3010// For example, if you are filtering Compute Engine instances, you can
3011// exclude instances named example-instance by specifying name !=
3012// example-instance.
3013//
3014// You can also filter nested fields. For example, you could specify
3015// scheduling.automaticRestart = false to include instances only if they
3016// are not scheduled for automatic restarts. You can use filtering on
3017// nested fields to filter based on resource labels.
3018//
3019// To filter on multiple expressions, provide each separate expression
3020// within parentheses. For example, (scheduling.automaticRestart = true)
3021// (cpuPlatform = "Intel Skylake"). By default, each expression is an
3022// AND expression. However, you can include AND and OR expressions
3023// explicitly. For example, (cpuPlatform = "Intel Skylake") OR
3024// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
3025// true).
3026func (c *DeploymentsListCall) Filter(filter string) *DeploymentsListCall {
3027	c.urlParams_.Set("filter", filter)
3028	return c
3029}
3030
3031// MaxResults sets the optional parameter "maxResults": The maximum
3032// number of results per page that should be returned. If the number of
3033// available results is larger than maxResults, Compute Engine returns a
3034// nextPageToken that can be used to get the next page of results in
3035// subsequent list requests. Acceptable values are 0 to 500, inclusive.
3036// (Default: 500)
3037func (c *DeploymentsListCall) MaxResults(maxResults int64) *DeploymentsListCall {
3038	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
3039	return c
3040}
3041
3042// OrderBy sets the optional parameter "orderBy": Sorts list results by
3043// a certain order. By default, results are returned in alphanumerical
3044// order based on the resource name.
3045//
3046// You can also sort results in descending order based on the creation
3047// timestamp using orderBy="creationTimestamp desc". This sorts results
3048// based on the creationTimestamp field in reverse chronological order
3049// (newest result first). Use this to sort resources like operations so
3050// that the newest operation is returned first.
3051//
3052// Currently, only sorting by name or creationTimestamp desc is
3053// supported.
3054func (c *DeploymentsListCall) OrderBy(orderBy string) *DeploymentsListCall {
3055	c.urlParams_.Set("orderBy", orderBy)
3056	return c
3057}
3058
3059// PageToken sets the optional parameter "pageToken": Specifies a page
3060// token to use. Set pageToken to the nextPageToken returned by a
3061// previous list request to get the next page of results.
3062func (c *DeploymentsListCall) PageToken(pageToken string) *DeploymentsListCall {
3063	c.urlParams_.Set("pageToken", pageToken)
3064	return c
3065}
3066
3067// Fields allows partial responses to be retrieved. See
3068// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3069// for more information.
3070func (c *DeploymentsListCall) Fields(s ...googleapi.Field) *DeploymentsListCall {
3071	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3072	return c
3073}
3074
3075// IfNoneMatch sets the optional parameter which makes the operation
3076// fail if the object's ETag matches the given value. This is useful for
3077// getting updates only after the object has changed since the last
3078// request. Use googleapi.IsNotModified to check whether the response
3079// error from Do is the result of In-None-Match.
3080func (c *DeploymentsListCall) IfNoneMatch(entityTag string) *DeploymentsListCall {
3081	c.ifNoneMatch_ = entityTag
3082	return c
3083}
3084
3085// Context sets the context to be used in this call's Do method. Any
3086// pending HTTP request will be aborted if the provided context is
3087// canceled.
3088func (c *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall {
3089	c.ctx_ = ctx
3090	return c
3091}
3092
3093// Header returns an http.Header that can be modified by the caller to
3094// add HTTP headers to the request.
3095func (c *DeploymentsListCall) Header() http.Header {
3096	if c.header_ == nil {
3097		c.header_ = make(http.Header)
3098	}
3099	return c.header_
3100}
3101
3102func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) {
3103	reqHeaders := make(http.Header)
3104	for k, v := range c.header_ {
3105		reqHeaders[k] = v
3106	}
3107	reqHeaders.Set("User-Agent", c.s.userAgent())
3108	if c.ifNoneMatch_ != "" {
3109		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3110	}
3111	var body io.Reader = nil
3112	c.urlParams_.Set("alt", alt)
3113	c.urlParams_.Set("prettyPrint", "false")
3114	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments")
3115	urls += "?" + c.urlParams_.Encode()
3116	req, err := http.NewRequest("GET", urls, body)
3117	if err != nil {
3118		return nil, err
3119	}
3120	req.Header = reqHeaders
3121	googleapi.Expand(req.URL, map[string]string{
3122		"project": c.project,
3123	})
3124	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3125}
3126
3127// Do executes the "deploymentmanager.deployments.list" call.
3128// Exactly one of *DeploymentsListResponse or error will be non-nil. Any
3129// non-2xx status code is an error. Response headers are in either
3130// *DeploymentsListResponse.ServerResponse.Header or (if a response was
3131// returned at all) in error.(*googleapi.Error).Header. Use
3132// googleapi.IsNotModified to check whether the returned error was
3133// because http.StatusNotModified was returned.
3134func (c *DeploymentsListCall) Do(opts ...googleapi.CallOption) (*DeploymentsListResponse, error) {
3135	gensupport.SetOptions(c.urlParams_, opts...)
3136	res, err := c.doRequest("json")
3137	if res != nil && res.StatusCode == http.StatusNotModified {
3138		if res.Body != nil {
3139			res.Body.Close()
3140		}
3141		return nil, &googleapi.Error{
3142			Code:   res.StatusCode,
3143			Header: res.Header,
3144		}
3145	}
3146	if err != nil {
3147		return nil, err
3148	}
3149	defer googleapi.CloseBody(res)
3150	if err := googleapi.CheckResponse(res); err != nil {
3151		return nil, err
3152	}
3153	ret := &DeploymentsListResponse{
3154		ServerResponse: googleapi.ServerResponse{
3155			Header:         res.Header,
3156			HTTPStatusCode: res.StatusCode,
3157		},
3158	}
3159	target := &ret
3160	if err := gensupport.DecodeResponse(target, res); err != nil {
3161		return nil, err
3162	}
3163	return ret, nil
3164	// {
3165	//   "description": "Lists all deployments for a given project.",
3166	//   "httpMethod": "GET",
3167	//   "id": "deploymentmanager.deployments.list",
3168	//   "parameterOrder": [
3169	//     "project"
3170	//   ],
3171	//   "parameters": {
3172	//     "filter": {
3173	//       "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
3174	//       "location": "query",
3175	//       "type": "string"
3176	//     },
3177	//     "maxResults": {
3178	//       "default": "500",
3179	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
3180	//       "format": "uint32",
3181	//       "location": "query",
3182	//       "minimum": "0",
3183	//       "type": "integer"
3184	//     },
3185	//     "orderBy": {
3186	//       "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.",
3187	//       "location": "query",
3188	//       "type": "string"
3189	//     },
3190	//     "pageToken": {
3191	//       "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.",
3192	//       "location": "query",
3193	//       "type": "string"
3194	//     },
3195	//     "project": {
3196	//       "description": "The project ID for this request.",
3197	//       "location": "path",
3198	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
3199	//       "required": true,
3200	//       "type": "string"
3201	//     }
3202	//   },
3203	//   "path": "{project}/global/deployments",
3204	//   "response": {
3205	//     "$ref": "DeploymentsListResponse"
3206	//   },
3207	//   "scopes": [
3208	//     "https://www.googleapis.com/auth/cloud-platform",
3209	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
3210	//     "https://www.googleapis.com/auth/ndev.cloudman",
3211	//     "https://www.googleapis.com/auth/ndev.cloudman.readonly"
3212	//   ]
3213	// }
3214
3215}
3216
3217// Pages invokes f for each page of results.
3218// A non-nil error returned from f will halt the iteration.
3219// The provided context supersedes any context provided to the Context method.
3220func (c *DeploymentsListCall) Pages(ctx context.Context, f func(*DeploymentsListResponse) error) error {
3221	c.ctx_ = ctx
3222	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3223	for {
3224		x, err := c.Do()
3225		if err != nil {
3226			return err
3227		}
3228		if err := f(x); err != nil {
3229			return err
3230		}
3231		if x.NextPageToken == "" {
3232			return nil
3233		}
3234		c.PageToken(x.NextPageToken)
3235	}
3236}
3237
3238// method id "deploymentmanager.deployments.patch":
3239
3240type DeploymentsPatchCall struct {
3241	s           *Service
3242	project     string
3243	deployment  string
3244	deployment2 *Deployment
3245	urlParams_  gensupport.URLParams
3246	ctx_        context.Context
3247	header_     http.Header
3248}
3249
3250// Patch: Updates a deployment and all of the resources described by the
3251// deployment manifest. This method supports patch semantics.
3252func (r *DeploymentsService) Patch(project string, deployment string, deployment2 *Deployment) *DeploymentsPatchCall {
3253	c := &DeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3254	c.project = project
3255	c.deployment = deployment
3256	c.deployment2 = deployment2
3257	return c
3258}
3259
3260// CreatePolicy sets the optional parameter "createPolicy": Sets the
3261// policy to use for creating new resources.
3262//
3263// Possible values:
3264//   "ACQUIRE"
3265//   "CREATE_OR_ACQUIRE" (default)
3266func (c *DeploymentsPatchCall) CreatePolicy(createPolicy string) *DeploymentsPatchCall {
3267	c.urlParams_.Set("createPolicy", createPolicy)
3268	return c
3269}
3270
3271// DeletePolicy sets the optional parameter "deletePolicy": Sets the
3272// policy to use for deleting resources.
3273//
3274// Possible values:
3275//   "ABANDON"
3276//   "DELETE" (default)
3277func (c *DeploymentsPatchCall) DeletePolicy(deletePolicy string) *DeploymentsPatchCall {
3278	c.urlParams_.Set("deletePolicy", deletePolicy)
3279	return c
3280}
3281
3282// Preview sets the optional parameter "preview": If set to true,
3283// updates the deployment and creates and updates the "shell" resources
3284// but does not actually alter or instantiate these resources. This
3285// allows you to preview what your deployment will look like. You can
3286// use this intent to preview how an update would affect your
3287// deployment. You must provide a target.config with a configuration if
3288// this is set to true. After previewing a deployment, you can deploy
3289// your resources by making a request with the update() or you can
3290// cancelPreview() to remove the preview altogether. Note that the
3291// deployment will still exist after you cancel the preview and you must
3292// separately delete this deployment if you want to remove it.
3293func (c *DeploymentsPatchCall) Preview(preview bool) *DeploymentsPatchCall {
3294	c.urlParams_.Set("preview", fmt.Sprint(preview))
3295	return c
3296}
3297
3298// Fields allows partial responses to be retrieved. See
3299// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3300// for more information.
3301func (c *DeploymentsPatchCall) Fields(s ...googleapi.Field) *DeploymentsPatchCall {
3302	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3303	return c
3304}
3305
3306// Context sets the context to be used in this call's Do method. Any
3307// pending HTTP request will be aborted if the provided context is
3308// canceled.
3309func (c *DeploymentsPatchCall) Context(ctx context.Context) *DeploymentsPatchCall {
3310	c.ctx_ = ctx
3311	return c
3312}
3313
3314// Header returns an http.Header that can be modified by the caller to
3315// add HTTP headers to the request.
3316func (c *DeploymentsPatchCall) Header() http.Header {
3317	if c.header_ == nil {
3318		c.header_ = make(http.Header)
3319	}
3320	return c.header_
3321}
3322
3323func (c *DeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
3324	reqHeaders := make(http.Header)
3325	for k, v := range c.header_ {
3326		reqHeaders[k] = v
3327	}
3328	reqHeaders.Set("User-Agent", c.s.userAgent())
3329	var body io.Reader = nil
3330	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
3331	if err != nil {
3332		return nil, err
3333	}
3334	reqHeaders.Set("Content-Type", "application/json")
3335	c.urlParams_.Set("alt", alt)
3336	c.urlParams_.Set("prettyPrint", "false")
3337	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
3338	urls += "?" + c.urlParams_.Encode()
3339	req, err := http.NewRequest("PATCH", urls, body)
3340	if err != nil {
3341		return nil, err
3342	}
3343	req.Header = reqHeaders
3344	googleapi.Expand(req.URL, map[string]string{
3345		"project":    c.project,
3346		"deployment": c.deployment,
3347	})
3348	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3349}
3350
3351// Do executes the "deploymentmanager.deployments.patch" call.
3352// Exactly one of *Operation or error will be non-nil. Any non-2xx
3353// status code is an error. Response headers are in either
3354// *Operation.ServerResponse.Header or (if a response was returned at
3355// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3356// to check whether the returned error was because
3357// http.StatusNotModified was returned.
3358func (c *DeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3359	gensupport.SetOptions(c.urlParams_, opts...)
3360	res, err := c.doRequest("json")
3361	if res != nil && res.StatusCode == http.StatusNotModified {
3362		if res.Body != nil {
3363			res.Body.Close()
3364		}
3365		return nil, &googleapi.Error{
3366			Code:   res.StatusCode,
3367			Header: res.Header,
3368		}
3369	}
3370	if err != nil {
3371		return nil, err
3372	}
3373	defer googleapi.CloseBody(res)
3374	if err := googleapi.CheckResponse(res); err != nil {
3375		return nil, err
3376	}
3377	ret := &Operation{
3378		ServerResponse: googleapi.ServerResponse{
3379			Header:         res.Header,
3380			HTTPStatusCode: res.StatusCode,
3381		},
3382	}
3383	target := &ret
3384	if err := gensupport.DecodeResponse(target, res); err != nil {
3385		return nil, err
3386	}
3387	return ret, nil
3388	// {
3389	//   "description": "Updates a deployment and all of the resources described by the deployment manifest. This method supports patch semantics.",
3390	//   "httpMethod": "PATCH",
3391	//   "id": "deploymentmanager.deployments.patch",
3392	//   "parameterOrder": [
3393	//     "project",
3394	//     "deployment"
3395	//   ],
3396	//   "parameters": {
3397	//     "createPolicy": {
3398	//       "default": "CREATE_OR_ACQUIRE",
3399	//       "description": "Sets the policy to use for creating new resources.",
3400	//       "enum": [
3401	//         "ACQUIRE",
3402	//         "CREATE_OR_ACQUIRE"
3403	//       ],
3404	//       "enumDescriptions": [
3405	//         "",
3406	//         ""
3407	//       ],
3408	//       "location": "query",
3409	//       "type": "string"
3410	//     },
3411	//     "deletePolicy": {
3412	//       "default": "DELETE",
3413	//       "description": "Sets the policy to use for deleting resources.",
3414	//       "enum": [
3415	//         "ABANDON",
3416	//         "DELETE"
3417	//       ],
3418	//       "enumDescriptions": [
3419	//         "",
3420	//         ""
3421	//       ],
3422	//       "location": "query",
3423	//       "type": "string"
3424	//     },
3425	//     "deployment": {
3426	//       "description": "The name of the deployment for this request.",
3427	//       "location": "path",
3428	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
3429	//       "required": true,
3430	//       "type": "string"
3431	//     },
3432	//     "preview": {
3433	//       "default": "false",
3434	//       "description": "If set to true, updates the deployment and creates and updates the \"shell\" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.",
3435	//       "location": "query",
3436	//       "type": "boolean"
3437	//     },
3438	//     "project": {
3439	//       "description": "The project ID for this request.",
3440	//       "location": "path",
3441	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
3442	//       "required": true,
3443	//       "type": "string"
3444	//     }
3445	//   },
3446	//   "path": "{project}/global/deployments/{deployment}",
3447	//   "request": {
3448	//     "$ref": "Deployment"
3449	//   },
3450	//   "response": {
3451	//     "$ref": "Operation"
3452	//   },
3453	//   "scopes": [
3454	//     "https://www.googleapis.com/auth/cloud-platform",
3455	//     "https://www.googleapis.com/auth/ndev.cloudman"
3456	//   ]
3457	// }
3458
3459}
3460
3461// method id "deploymentmanager.deployments.setIamPolicy":
3462
3463type DeploymentsSetIamPolicyCall struct {
3464	s                      *Service
3465	project                string
3466	resource               string
3467	globalsetpolicyrequest *GlobalSetPolicyRequest
3468	urlParams_             gensupport.URLParams
3469	ctx_                   context.Context
3470	header_                http.Header
3471}
3472
3473// SetIamPolicy: Sets the access control policy on the specified
3474// resource. Replaces any existing policy.
3475func (r *DeploymentsService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *DeploymentsSetIamPolicyCall {
3476	c := &DeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3477	c.project = project
3478	c.resource = resource
3479	c.globalsetpolicyrequest = globalsetpolicyrequest
3480	return c
3481}
3482
3483// Fields allows partial responses to be retrieved. See
3484// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3485// for more information.
3486func (c *DeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *DeploymentsSetIamPolicyCall {
3487	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3488	return c
3489}
3490
3491// Context sets the context to be used in this call's Do method. Any
3492// pending HTTP request will be aborted if the provided context is
3493// canceled.
3494func (c *DeploymentsSetIamPolicyCall) Context(ctx context.Context) *DeploymentsSetIamPolicyCall {
3495	c.ctx_ = ctx
3496	return c
3497}
3498
3499// Header returns an http.Header that can be modified by the caller to
3500// add HTTP headers to the request.
3501func (c *DeploymentsSetIamPolicyCall) Header() http.Header {
3502	if c.header_ == nil {
3503		c.header_ = make(http.Header)
3504	}
3505	return c.header_
3506}
3507
3508func (c *DeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3509	reqHeaders := make(http.Header)
3510	for k, v := range c.header_ {
3511		reqHeaders[k] = v
3512	}
3513	reqHeaders.Set("User-Agent", c.s.userAgent())
3514	var body io.Reader = nil
3515	body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest)
3516	if err != nil {
3517		return nil, err
3518	}
3519	reqHeaders.Set("Content-Type", "application/json")
3520	c.urlParams_.Set("alt", alt)
3521	c.urlParams_.Set("prettyPrint", "false")
3522	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/setIamPolicy")
3523	urls += "?" + c.urlParams_.Encode()
3524	req, err := http.NewRequest("POST", urls, body)
3525	if err != nil {
3526		return nil, err
3527	}
3528	req.Header = reqHeaders
3529	googleapi.Expand(req.URL, map[string]string{
3530		"project":  c.project,
3531		"resource": c.resource,
3532	})
3533	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3534}
3535
3536// Do executes the "deploymentmanager.deployments.setIamPolicy" call.
3537// Exactly one of *Policy or error will be non-nil. Any non-2xx status
3538// code is an error. Response headers are in either
3539// *Policy.ServerResponse.Header or (if a response was returned at all)
3540// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3541// check whether the returned error was because http.StatusNotModified
3542// was returned.
3543func (c *DeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3544	gensupport.SetOptions(c.urlParams_, opts...)
3545	res, err := c.doRequest("json")
3546	if res != nil && res.StatusCode == http.StatusNotModified {
3547		if res.Body != nil {
3548			res.Body.Close()
3549		}
3550		return nil, &googleapi.Error{
3551			Code:   res.StatusCode,
3552			Header: res.Header,
3553		}
3554	}
3555	if err != nil {
3556		return nil, err
3557	}
3558	defer googleapi.CloseBody(res)
3559	if err := googleapi.CheckResponse(res); err != nil {
3560		return nil, err
3561	}
3562	ret := &Policy{
3563		ServerResponse: googleapi.ServerResponse{
3564			Header:         res.Header,
3565			HTTPStatusCode: res.StatusCode,
3566		},
3567	}
3568	target := &ret
3569	if err := gensupport.DecodeResponse(target, res); err != nil {
3570		return nil, err
3571	}
3572	return ret, nil
3573	// {
3574	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.",
3575	//   "httpMethod": "POST",
3576	//   "id": "deploymentmanager.deployments.setIamPolicy",
3577	//   "parameterOrder": [
3578	//     "project",
3579	//     "resource"
3580	//   ],
3581	//   "parameters": {
3582	//     "project": {
3583	//       "description": "Project ID for this request.",
3584	//       "location": "path",
3585	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
3586	//       "required": true,
3587	//       "type": "string"
3588	//     },
3589	//     "resource": {
3590	//       "description": "Name or id of the resource for this request.",
3591	//       "location": "path",
3592	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
3593	//       "required": true,
3594	//       "type": "string"
3595	//     }
3596	//   },
3597	//   "path": "{project}/global/deployments/{resource}/setIamPolicy",
3598	//   "request": {
3599	//     "$ref": "GlobalSetPolicyRequest"
3600	//   },
3601	//   "response": {
3602	//     "$ref": "Policy"
3603	//   },
3604	//   "scopes": [
3605	//     "https://www.googleapis.com/auth/cloud-platform",
3606	//     "https://www.googleapis.com/auth/ndev.cloudman"
3607	//   ]
3608	// }
3609
3610}
3611
3612// method id "deploymentmanager.deployments.stop":
3613
3614type DeploymentsStopCall struct {
3615	s                      *Service
3616	project                string
3617	deployment             string
3618	deploymentsstoprequest *DeploymentsStopRequest
3619	urlParams_             gensupport.URLParams
3620	ctx_                   context.Context
3621	header_                http.Header
3622}
3623
3624// Stop: Stops an ongoing operation. This does not roll back any work
3625// that has already been completed, but prevents any new work from being
3626// started.
3627func (r *DeploymentsService) Stop(project string, deployment string, deploymentsstoprequest *DeploymentsStopRequest) *DeploymentsStopCall {
3628	c := &DeploymentsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3629	c.project = project
3630	c.deployment = deployment
3631	c.deploymentsstoprequest = deploymentsstoprequest
3632	return c
3633}
3634
3635// Fields allows partial responses to be retrieved. See
3636// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3637// for more information.
3638func (c *DeploymentsStopCall) Fields(s ...googleapi.Field) *DeploymentsStopCall {
3639	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3640	return c
3641}
3642
3643// Context sets the context to be used in this call's Do method. Any
3644// pending HTTP request will be aborted if the provided context is
3645// canceled.
3646func (c *DeploymentsStopCall) Context(ctx context.Context) *DeploymentsStopCall {
3647	c.ctx_ = ctx
3648	return c
3649}
3650
3651// Header returns an http.Header that can be modified by the caller to
3652// add HTTP headers to the request.
3653func (c *DeploymentsStopCall) Header() http.Header {
3654	if c.header_ == nil {
3655		c.header_ = make(http.Header)
3656	}
3657	return c.header_
3658}
3659
3660func (c *DeploymentsStopCall) doRequest(alt string) (*http.Response, error) {
3661	reqHeaders := make(http.Header)
3662	for k, v := range c.header_ {
3663		reqHeaders[k] = v
3664	}
3665	reqHeaders.Set("User-Agent", c.s.userAgent())
3666	var body io.Reader = nil
3667	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentsstoprequest)
3668	if err != nil {
3669		return nil, err
3670	}
3671	reqHeaders.Set("Content-Type", "application/json")
3672	c.urlParams_.Set("alt", alt)
3673	c.urlParams_.Set("prettyPrint", "false")
3674	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/stop")
3675	urls += "?" + c.urlParams_.Encode()
3676	req, err := http.NewRequest("POST", urls, body)
3677	if err != nil {
3678		return nil, err
3679	}
3680	req.Header = reqHeaders
3681	googleapi.Expand(req.URL, map[string]string{
3682		"project":    c.project,
3683		"deployment": c.deployment,
3684	})
3685	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3686}
3687
3688// Do executes the "deploymentmanager.deployments.stop" call.
3689// Exactly one of *Operation or error will be non-nil. Any non-2xx
3690// status code is an error. Response headers are in either
3691// *Operation.ServerResponse.Header or (if a response was returned at
3692// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3693// to check whether the returned error was because
3694// http.StatusNotModified was returned.
3695func (c *DeploymentsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3696	gensupport.SetOptions(c.urlParams_, opts...)
3697	res, err := c.doRequest("json")
3698	if res != nil && res.StatusCode == http.StatusNotModified {
3699		if res.Body != nil {
3700			res.Body.Close()
3701		}
3702		return nil, &googleapi.Error{
3703			Code:   res.StatusCode,
3704			Header: res.Header,
3705		}
3706	}
3707	if err != nil {
3708		return nil, err
3709	}
3710	defer googleapi.CloseBody(res)
3711	if err := googleapi.CheckResponse(res); err != nil {
3712		return nil, err
3713	}
3714	ret := &Operation{
3715		ServerResponse: googleapi.ServerResponse{
3716			Header:         res.Header,
3717			HTTPStatusCode: res.StatusCode,
3718		},
3719	}
3720	target := &ret
3721	if err := gensupport.DecodeResponse(target, res); err != nil {
3722		return nil, err
3723	}
3724	return ret, nil
3725	// {
3726	//   "description": "Stops an ongoing operation. This does not roll back any work that has already been completed, but prevents any new work from being started.",
3727	//   "httpMethod": "POST",
3728	//   "id": "deploymentmanager.deployments.stop",
3729	//   "parameterOrder": [
3730	//     "project",
3731	//     "deployment"
3732	//   ],
3733	//   "parameters": {
3734	//     "deployment": {
3735	//       "description": "The name of the deployment for this request.",
3736	//       "location": "path",
3737	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
3738	//       "required": true,
3739	//       "type": "string"
3740	//     },
3741	//     "project": {
3742	//       "description": "The project ID for this request.",
3743	//       "location": "path",
3744	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
3745	//       "required": true,
3746	//       "type": "string"
3747	//     }
3748	//   },
3749	//   "path": "{project}/global/deployments/{deployment}/stop",
3750	//   "request": {
3751	//     "$ref": "DeploymentsStopRequest"
3752	//   },
3753	//   "response": {
3754	//     "$ref": "Operation"
3755	//   },
3756	//   "scopes": [
3757	//     "https://www.googleapis.com/auth/cloud-platform",
3758	//     "https://www.googleapis.com/auth/ndev.cloudman"
3759	//   ]
3760	// }
3761
3762}
3763
3764// method id "deploymentmanager.deployments.testIamPermissions":
3765
3766type DeploymentsTestIamPermissionsCall struct {
3767	s                      *Service
3768	project                string
3769	resource               string
3770	testpermissionsrequest *TestPermissionsRequest
3771	urlParams_             gensupport.URLParams
3772	ctx_                   context.Context
3773	header_                http.Header
3774}
3775
3776// TestIamPermissions: Returns permissions that a caller has on the
3777// specified resource.
3778func (r *DeploymentsService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *DeploymentsTestIamPermissionsCall {
3779	c := &DeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3780	c.project = project
3781	c.resource = resource
3782	c.testpermissionsrequest = testpermissionsrequest
3783	return c
3784}
3785
3786// Fields allows partial responses to be retrieved. See
3787// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3788// for more information.
3789func (c *DeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *DeploymentsTestIamPermissionsCall {
3790	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3791	return c
3792}
3793
3794// Context sets the context to be used in this call's Do method. Any
3795// pending HTTP request will be aborted if the provided context is
3796// canceled.
3797func (c *DeploymentsTestIamPermissionsCall) Context(ctx context.Context) *DeploymentsTestIamPermissionsCall {
3798	c.ctx_ = ctx
3799	return c
3800}
3801
3802// Header returns an http.Header that can be modified by the caller to
3803// add HTTP headers to the request.
3804func (c *DeploymentsTestIamPermissionsCall) Header() http.Header {
3805	if c.header_ == nil {
3806		c.header_ = make(http.Header)
3807	}
3808	return c.header_
3809}
3810
3811func (c *DeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
3812	reqHeaders := make(http.Header)
3813	for k, v := range c.header_ {
3814		reqHeaders[k] = v
3815	}
3816	reqHeaders.Set("User-Agent", c.s.userAgent())
3817	var body io.Reader = nil
3818	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
3819	if err != nil {
3820		return nil, err
3821	}
3822	reqHeaders.Set("Content-Type", "application/json")
3823	c.urlParams_.Set("alt", alt)
3824	c.urlParams_.Set("prettyPrint", "false")
3825	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{resource}/testIamPermissions")
3826	urls += "?" + c.urlParams_.Encode()
3827	req, err := http.NewRequest("POST", urls, body)
3828	if err != nil {
3829		return nil, err
3830	}
3831	req.Header = reqHeaders
3832	googleapi.Expand(req.URL, map[string]string{
3833		"project":  c.project,
3834		"resource": c.resource,
3835	})
3836	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3837}
3838
3839// Do executes the "deploymentmanager.deployments.testIamPermissions" call.
3840// Exactly one of *TestPermissionsResponse or error will be non-nil. Any
3841// non-2xx status code is an error. Response headers are in either
3842// *TestPermissionsResponse.ServerResponse.Header or (if a response was
3843// returned at all) in error.(*googleapi.Error).Header. Use
3844// googleapi.IsNotModified to check whether the returned error was
3845// because http.StatusNotModified was returned.
3846func (c *DeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) {
3847	gensupport.SetOptions(c.urlParams_, opts...)
3848	res, err := c.doRequest("json")
3849	if res != nil && res.StatusCode == http.StatusNotModified {
3850		if res.Body != nil {
3851			res.Body.Close()
3852		}
3853		return nil, &googleapi.Error{
3854			Code:   res.StatusCode,
3855			Header: res.Header,
3856		}
3857	}
3858	if err != nil {
3859		return nil, err
3860	}
3861	defer googleapi.CloseBody(res)
3862	if err := googleapi.CheckResponse(res); err != nil {
3863		return nil, err
3864	}
3865	ret := &TestPermissionsResponse{
3866		ServerResponse: googleapi.ServerResponse{
3867			Header:         res.Header,
3868			HTTPStatusCode: res.StatusCode,
3869		},
3870	}
3871	target := &ret
3872	if err := gensupport.DecodeResponse(target, res); err != nil {
3873		return nil, err
3874	}
3875	return ret, nil
3876	// {
3877	//   "description": "Returns permissions that a caller has on the specified resource.",
3878	//   "httpMethod": "POST",
3879	//   "id": "deploymentmanager.deployments.testIamPermissions",
3880	//   "parameterOrder": [
3881	//     "project",
3882	//     "resource"
3883	//   ],
3884	//   "parameters": {
3885	//     "project": {
3886	//       "description": "Project ID for this request.",
3887	//       "location": "path",
3888	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))",
3889	//       "required": true,
3890	//       "type": "string"
3891	//     },
3892	//     "resource": {
3893	//       "description": "Name or id of the resource for this request.",
3894	//       "location": "path",
3895	//       "pattern": "[a-z](?:[-a-z0-9_]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}",
3896	//       "required": true,
3897	//       "type": "string"
3898	//     }
3899	//   },
3900	//   "path": "{project}/global/deployments/{resource}/testIamPermissions",
3901	//   "request": {
3902	//     "$ref": "TestPermissionsRequest"
3903	//   },
3904	//   "response": {
3905	//     "$ref": "TestPermissionsResponse"
3906	//   },
3907	//   "scopes": [
3908	//     "https://www.googleapis.com/auth/cloud-platform",
3909	//     "https://www.googleapis.com/auth/ndev.cloudman"
3910	//   ]
3911	// }
3912
3913}
3914
3915// method id "deploymentmanager.deployments.update":
3916
3917type DeploymentsUpdateCall struct {
3918	s           *Service
3919	project     string
3920	deployment  string
3921	deployment2 *Deployment
3922	urlParams_  gensupport.URLParams
3923	ctx_        context.Context
3924	header_     http.Header
3925}
3926
3927// Update: Updates a deployment and all of the resources described by
3928// the deployment manifest.
3929func (r *DeploymentsService) Update(project string, deployment string, deployment2 *Deployment) *DeploymentsUpdateCall {
3930	c := &DeploymentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3931	c.project = project
3932	c.deployment = deployment
3933	c.deployment2 = deployment2
3934	return c
3935}
3936
3937// CreatePolicy sets the optional parameter "createPolicy": Sets the
3938// policy to use for creating new resources.
3939//
3940// Possible values:
3941//   "ACQUIRE"
3942//   "CREATE_OR_ACQUIRE" (default)
3943func (c *DeploymentsUpdateCall) CreatePolicy(createPolicy string) *DeploymentsUpdateCall {
3944	c.urlParams_.Set("createPolicy", createPolicy)
3945	return c
3946}
3947
3948// DeletePolicy sets the optional parameter "deletePolicy": Sets the
3949// policy to use for deleting resources.
3950//
3951// Possible values:
3952//   "ABANDON"
3953//   "DELETE" (default)
3954func (c *DeploymentsUpdateCall) DeletePolicy(deletePolicy string) *DeploymentsUpdateCall {
3955	c.urlParams_.Set("deletePolicy", deletePolicy)
3956	return c
3957}
3958
3959// Preview sets the optional parameter "preview": If set to true,
3960// updates the deployment and creates and updates the "shell" resources
3961// but does not actually alter or instantiate these resources. This
3962// allows you to preview what your deployment will look like. You can
3963// use this intent to preview how an update would affect your
3964// deployment. You must provide a target.config with a configuration if
3965// this is set to true. After previewing a deployment, you can deploy
3966// your resources by making a request with the update() or you can
3967// cancelPreview() to remove the preview altogether. Note that the
3968// deployment will still exist after you cancel the preview and you must
3969// separately delete this deployment if you want to remove it.
3970func (c *DeploymentsUpdateCall) Preview(preview bool) *DeploymentsUpdateCall {
3971	c.urlParams_.Set("preview", fmt.Sprint(preview))
3972	return c
3973}
3974
3975// Fields allows partial responses to be retrieved. See
3976// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3977// for more information.
3978func (c *DeploymentsUpdateCall) Fields(s ...googleapi.Field) *DeploymentsUpdateCall {
3979	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3980	return c
3981}
3982
3983// Context sets the context to be used in this call's Do method. Any
3984// pending HTTP request will be aborted if the provided context is
3985// canceled.
3986func (c *DeploymentsUpdateCall) Context(ctx context.Context) *DeploymentsUpdateCall {
3987	c.ctx_ = ctx
3988	return c
3989}
3990
3991// Header returns an http.Header that can be modified by the caller to
3992// add HTTP headers to the request.
3993func (c *DeploymentsUpdateCall) Header() http.Header {
3994	if c.header_ == nil {
3995		c.header_ = make(http.Header)
3996	}
3997	return c.header_
3998}
3999
4000func (c *DeploymentsUpdateCall) doRequest(alt string) (*http.Response, error) {
4001	reqHeaders := make(http.Header)
4002	for k, v := range c.header_ {
4003		reqHeaders[k] = v
4004	}
4005	reqHeaders.Set("User-Agent", c.s.userAgent())
4006	var body io.Reader = nil
4007	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
4008	if err != nil {
4009		return nil, err
4010	}
4011	reqHeaders.Set("Content-Type", "application/json")
4012	c.urlParams_.Set("alt", alt)
4013	c.urlParams_.Set("prettyPrint", "false")
4014	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}")
4015	urls += "?" + c.urlParams_.Encode()
4016	req, err := http.NewRequest("PUT", urls, body)
4017	if err != nil {
4018		return nil, err
4019	}
4020	req.Header = reqHeaders
4021	googleapi.Expand(req.URL, map[string]string{
4022		"project":    c.project,
4023		"deployment": c.deployment,
4024	})
4025	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4026}
4027
4028// Do executes the "deploymentmanager.deployments.update" call.
4029// Exactly one of *Operation or error will be non-nil. Any non-2xx
4030// status code is an error. Response headers are in either
4031// *Operation.ServerResponse.Header or (if a response was returned at
4032// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4033// to check whether the returned error was because
4034// http.StatusNotModified was returned.
4035func (c *DeploymentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4036	gensupport.SetOptions(c.urlParams_, opts...)
4037	res, err := c.doRequest("json")
4038	if res != nil && res.StatusCode == http.StatusNotModified {
4039		if res.Body != nil {
4040			res.Body.Close()
4041		}
4042		return nil, &googleapi.Error{
4043			Code:   res.StatusCode,
4044			Header: res.Header,
4045		}
4046	}
4047	if err != nil {
4048		return nil, err
4049	}
4050	defer googleapi.CloseBody(res)
4051	if err := googleapi.CheckResponse(res); err != nil {
4052		return nil, err
4053	}
4054	ret := &Operation{
4055		ServerResponse: googleapi.ServerResponse{
4056			Header:         res.Header,
4057			HTTPStatusCode: res.StatusCode,
4058		},
4059	}
4060	target := &ret
4061	if err := gensupport.DecodeResponse(target, res); err != nil {
4062		return nil, err
4063	}
4064	return ret, nil
4065	// {
4066	//   "description": "Updates a deployment and all of the resources described by the deployment manifest.",
4067	//   "httpMethod": "PUT",
4068	//   "id": "deploymentmanager.deployments.update",
4069	//   "parameterOrder": [
4070	//     "project",
4071	//     "deployment"
4072	//   ],
4073	//   "parameters": {
4074	//     "createPolicy": {
4075	//       "default": "CREATE_OR_ACQUIRE",
4076	//       "description": "Sets the policy to use for creating new resources.",
4077	//       "enum": [
4078	//         "ACQUIRE",
4079	//         "CREATE_OR_ACQUIRE"
4080	//       ],
4081	//       "enumDescriptions": [
4082	//         "",
4083	//         ""
4084	//       ],
4085	//       "location": "query",
4086	//       "type": "string"
4087	//     },
4088	//     "deletePolicy": {
4089	//       "default": "DELETE",
4090	//       "description": "Sets the policy to use for deleting resources.",
4091	//       "enum": [
4092	//         "ABANDON",
4093	//         "DELETE"
4094	//       ],
4095	//       "enumDescriptions": [
4096	//         "",
4097	//         ""
4098	//       ],
4099	//       "location": "query",
4100	//       "type": "string"
4101	//     },
4102	//     "deployment": {
4103	//       "description": "The name of the deployment for this request.",
4104	//       "location": "path",
4105	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
4106	//       "required": true,
4107	//       "type": "string"
4108	//     },
4109	//     "preview": {
4110	//       "default": "false",
4111	//       "description": "If set to true, updates the deployment and creates and updates the \"shell\" resources but does not actually alter or instantiate these resources. This allows you to preview what your deployment will look like. You can use this intent to preview how an update would affect your deployment. You must provide a target.config with a configuration if this is set to true. After previewing a deployment, you can deploy your resources by making a request with the update() or you can cancelPreview() to remove the preview altogether. Note that the deployment will still exist after you cancel the preview and you must separately delete this deployment if you want to remove it.",
4112	//       "location": "query",
4113	//       "type": "boolean"
4114	//     },
4115	//     "project": {
4116	//       "description": "The project ID for this request.",
4117	//       "location": "path",
4118	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
4119	//       "required": true,
4120	//       "type": "string"
4121	//     }
4122	//   },
4123	//   "path": "{project}/global/deployments/{deployment}",
4124	//   "request": {
4125	//     "$ref": "Deployment"
4126	//   },
4127	//   "response": {
4128	//     "$ref": "Operation"
4129	//   },
4130	//   "scopes": [
4131	//     "https://www.googleapis.com/auth/cloud-platform",
4132	//     "https://www.googleapis.com/auth/ndev.cloudman"
4133	//   ]
4134	// }
4135
4136}
4137
4138// method id "deploymentmanager.manifests.get":
4139
4140type ManifestsGetCall struct {
4141	s            *Service
4142	project      string
4143	deployment   string
4144	manifest     string
4145	urlParams_   gensupport.URLParams
4146	ifNoneMatch_ string
4147	ctx_         context.Context
4148	header_      http.Header
4149}
4150
4151// Get: Gets information about a specific manifest.
4152func (r *ManifestsService) Get(project string, deployment string, manifest string) *ManifestsGetCall {
4153	c := &ManifestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4154	c.project = project
4155	c.deployment = deployment
4156	c.manifest = manifest
4157	return c
4158}
4159
4160// Fields allows partial responses to be retrieved. See
4161// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4162// for more information.
4163func (c *ManifestsGetCall) Fields(s ...googleapi.Field) *ManifestsGetCall {
4164	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4165	return c
4166}
4167
4168// IfNoneMatch sets the optional parameter which makes the operation
4169// fail if the object's ETag matches the given value. This is useful for
4170// getting updates only after the object has changed since the last
4171// request. Use googleapi.IsNotModified to check whether the response
4172// error from Do is the result of In-None-Match.
4173func (c *ManifestsGetCall) IfNoneMatch(entityTag string) *ManifestsGetCall {
4174	c.ifNoneMatch_ = entityTag
4175	return c
4176}
4177
4178// Context sets the context to be used in this call's Do method. Any
4179// pending HTTP request will be aborted if the provided context is
4180// canceled.
4181func (c *ManifestsGetCall) Context(ctx context.Context) *ManifestsGetCall {
4182	c.ctx_ = ctx
4183	return c
4184}
4185
4186// Header returns an http.Header that can be modified by the caller to
4187// add HTTP headers to the request.
4188func (c *ManifestsGetCall) Header() http.Header {
4189	if c.header_ == nil {
4190		c.header_ = make(http.Header)
4191	}
4192	return c.header_
4193}
4194
4195func (c *ManifestsGetCall) doRequest(alt string) (*http.Response, error) {
4196	reqHeaders := make(http.Header)
4197	for k, v := range c.header_ {
4198		reqHeaders[k] = v
4199	}
4200	reqHeaders.Set("User-Agent", c.s.userAgent())
4201	if c.ifNoneMatch_ != "" {
4202		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4203	}
4204	var body io.Reader = nil
4205	c.urlParams_.Set("alt", alt)
4206	c.urlParams_.Set("prettyPrint", "false")
4207	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests/{manifest}")
4208	urls += "?" + c.urlParams_.Encode()
4209	req, err := http.NewRequest("GET", urls, body)
4210	if err != nil {
4211		return nil, err
4212	}
4213	req.Header = reqHeaders
4214	googleapi.Expand(req.URL, map[string]string{
4215		"project":    c.project,
4216		"deployment": c.deployment,
4217		"manifest":   c.manifest,
4218	})
4219	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4220}
4221
4222// Do executes the "deploymentmanager.manifests.get" call.
4223// Exactly one of *Manifest or error will be non-nil. Any non-2xx status
4224// code is an error. Response headers are in either
4225// *Manifest.ServerResponse.Header or (if a response was returned at
4226// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4227// to check whether the returned error was because
4228// http.StatusNotModified was returned.
4229func (c *ManifestsGetCall) Do(opts ...googleapi.CallOption) (*Manifest, error) {
4230	gensupport.SetOptions(c.urlParams_, opts...)
4231	res, err := c.doRequest("json")
4232	if res != nil && res.StatusCode == http.StatusNotModified {
4233		if res.Body != nil {
4234			res.Body.Close()
4235		}
4236		return nil, &googleapi.Error{
4237			Code:   res.StatusCode,
4238			Header: res.Header,
4239		}
4240	}
4241	if err != nil {
4242		return nil, err
4243	}
4244	defer googleapi.CloseBody(res)
4245	if err := googleapi.CheckResponse(res); err != nil {
4246		return nil, err
4247	}
4248	ret := &Manifest{
4249		ServerResponse: googleapi.ServerResponse{
4250			Header:         res.Header,
4251			HTTPStatusCode: res.StatusCode,
4252		},
4253	}
4254	target := &ret
4255	if err := gensupport.DecodeResponse(target, res); err != nil {
4256		return nil, err
4257	}
4258	return ret, nil
4259	// {
4260	//   "description": "Gets information about a specific manifest.",
4261	//   "httpMethod": "GET",
4262	//   "id": "deploymentmanager.manifests.get",
4263	//   "parameterOrder": [
4264	//     "project",
4265	//     "deployment",
4266	//     "manifest"
4267	//   ],
4268	//   "parameters": {
4269	//     "deployment": {
4270	//       "description": "The name of the deployment for this request.",
4271	//       "location": "path",
4272	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
4273	//       "required": true,
4274	//       "type": "string"
4275	//     },
4276	//     "manifest": {
4277	//       "description": "The name of the manifest for this request.",
4278	//       "location": "path",
4279	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
4280	//       "required": true,
4281	//       "type": "string"
4282	//     },
4283	//     "project": {
4284	//       "description": "The project ID for this request.",
4285	//       "location": "path",
4286	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
4287	//       "required": true,
4288	//       "type": "string"
4289	//     }
4290	//   },
4291	//   "path": "{project}/global/deployments/{deployment}/manifests/{manifest}",
4292	//   "response": {
4293	//     "$ref": "Manifest"
4294	//   },
4295	//   "scopes": [
4296	//     "https://www.googleapis.com/auth/cloud-platform",
4297	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4298	//     "https://www.googleapis.com/auth/ndev.cloudman",
4299	//     "https://www.googleapis.com/auth/ndev.cloudman.readonly"
4300	//   ]
4301	// }
4302
4303}
4304
4305// method id "deploymentmanager.manifests.list":
4306
4307type ManifestsListCall struct {
4308	s            *Service
4309	project      string
4310	deployment   string
4311	urlParams_   gensupport.URLParams
4312	ifNoneMatch_ string
4313	ctx_         context.Context
4314	header_      http.Header
4315}
4316
4317// List: Lists all manifests for a given deployment.
4318func (r *ManifestsService) List(project string, deployment string) *ManifestsListCall {
4319	c := &ManifestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4320	c.project = project
4321	c.deployment = deployment
4322	return c
4323}
4324
4325// Filter sets the optional parameter "filter": A filter expression that
4326// filters resources listed in the response. The expression must specify
4327// the field name, a comparison operator, and the value that you want to
4328// use for filtering. The value must be a string, a number, or a
4329// boolean. The comparison operator must be either =, !=, >, or <.
4330//
4331// For example, if you are filtering Compute Engine instances, you can
4332// exclude instances named example-instance by specifying name !=
4333// example-instance.
4334//
4335// You can also filter nested fields. For example, you could specify
4336// scheduling.automaticRestart = false to include instances only if they
4337// are not scheduled for automatic restarts. You can use filtering on
4338// nested fields to filter based on resource labels.
4339//
4340// To filter on multiple expressions, provide each separate expression
4341// within parentheses. For example, (scheduling.automaticRestart = true)
4342// (cpuPlatform = "Intel Skylake"). By default, each expression is an
4343// AND expression. However, you can include AND and OR expressions
4344// explicitly. For example, (cpuPlatform = "Intel Skylake") OR
4345// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
4346// true).
4347func (c *ManifestsListCall) Filter(filter string) *ManifestsListCall {
4348	c.urlParams_.Set("filter", filter)
4349	return c
4350}
4351
4352// MaxResults sets the optional parameter "maxResults": The maximum
4353// number of results per page that should be returned. If the number of
4354// available results is larger than maxResults, Compute Engine returns a
4355// nextPageToken that can be used to get the next page of results in
4356// subsequent list requests. Acceptable values are 0 to 500, inclusive.
4357// (Default: 500)
4358func (c *ManifestsListCall) MaxResults(maxResults int64) *ManifestsListCall {
4359	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4360	return c
4361}
4362
4363// OrderBy sets the optional parameter "orderBy": Sorts list results by
4364// a certain order. By default, results are returned in alphanumerical
4365// order based on the resource name.
4366//
4367// You can also sort results in descending order based on the creation
4368// timestamp using orderBy="creationTimestamp desc". This sorts results
4369// based on the creationTimestamp field in reverse chronological order
4370// (newest result first). Use this to sort resources like operations so
4371// that the newest operation is returned first.
4372//
4373// Currently, only sorting by name or creationTimestamp desc is
4374// supported.
4375func (c *ManifestsListCall) OrderBy(orderBy string) *ManifestsListCall {
4376	c.urlParams_.Set("orderBy", orderBy)
4377	return c
4378}
4379
4380// PageToken sets the optional parameter "pageToken": Specifies a page
4381// token to use. Set pageToken to the nextPageToken returned by a
4382// previous list request to get the next page of results.
4383func (c *ManifestsListCall) PageToken(pageToken string) *ManifestsListCall {
4384	c.urlParams_.Set("pageToken", pageToken)
4385	return c
4386}
4387
4388// Fields allows partial responses to be retrieved. See
4389// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4390// for more information.
4391func (c *ManifestsListCall) Fields(s ...googleapi.Field) *ManifestsListCall {
4392	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4393	return c
4394}
4395
4396// IfNoneMatch sets the optional parameter which makes the operation
4397// fail if the object's ETag matches the given value. This is useful for
4398// getting updates only after the object has changed since the last
4399// request. Use googleapi.IsNotModified to check whether the response
4400// error from Do is the result of In-None-Match.
4401func (c *ManifestsListCall) IfNoneMatch(entityTag string) *ManifestsListCall {
4402	c.ifNoneMatch_ = entityTag
4403	return c
4404}
4405
4406// Context sets the context to be used in this call's Do method. Any
4407// pending HTTP request will be aborted if the provided context is
4408// canceled.
4409func (c *ManifestsListCall) Context(ctx context.Context) *ManifestsListCall {
4410	c.ctx_ = ctx
4411	return c
4412}
4413
4414// Header returns an http.Header that can be modified by the caller to
4415// add HTTP headers to the request.
4416func (c *ManifestsListCall) Header() http.Header {
4417	if c.header_ == nil {
4418		c.header_ = make(http.Header)
4419	}
4420	return c.header_
4421}
4422
4423func (c *ManifestsListCall) doRequest(alt string) (*http.Response, error) {
4424	reqHeaders := make(http.Header)
4425	for k, v := range c.header_ {
4426		reqHeaders[k] = v
4427	}
4428	reqHeaders.Set("User-Agent", c.s.userAgent())
4429	if c.ifNoneMatch_ != "" {
4430		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4431	}
4432	var body io.Reader = nil
4433	c.urlParams_.Set("alt", alt)
4434	c.urlParams_.Set("prettyPrint", "false")
4435	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/manifests")
4436	urls += "?" + c.urlParams_.Encode()
4437	req, err := http.NewRequest("GET", urls, body)
4438	if err != nil {
4439		return nil, err
4440	}
4441	req.Header = reqHeaders
4442	googleapi.Expand(req.URL, map[string]string{
4443		"project":    c.project,
4444		"deployment": c.deployment,
4445	})
4446	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4447}
4448
4449// Do executes the "deploymentmanager.manifests.list" call.
4450// Exactly one of *ManifestsListResponse or error will be non-nil. Any
4451// non-2xx status code is an error. Response headers are in either
4452// *ManifestsListResponse.ServerResponse.Header or (if a response was
4453// returned at all) in error.(*googleapi.Error).Header. Use
4454// googleapi.IsNotModified to check whether the returned error was
4455// because http.StatusNotModified was returned.
4456func (c *ManifestsListCall) Do(opts ...googleapi.CallOption) (*ManifestsListResponse, error) {
4457	gensupport.SetOptions(c.urlParams_, opts...)
4458	res, err := c.doRequest("json")
4459	if res != nil && res.StatusCode == http.StatusNotModified {
4460		if res.Body != nil {
4461			res.Body.Close()
4462		}
4463		return nil, &googleapi.Error{
4464			Code:   res.StatusCode,
4465			Header: res.Header,
4466		}
4467	}
4468	if err != nil {
4469		return nil, err
4470	}
4471	defer googleapi.CloseBody(res)
4472	if err := googleapi.CheckResponse(res); err != nil {
4473		return nil, err
4474	}
4475	ret := &ManifestsListResponse{
4476		ServerResponse: googleapi.ServerResponse{
4477			Header:         res.Header,
4478			HTTPStatusCode: res.StatusCode,
4479		},
4480	}
4481	target := &ret
4482	if err := gensupport.DecodeResponse(target, res); err != nil {
4483		return nil, err
4484	}
4485	return ret, nil
4486	// {
4487	//   "description": "Lists all manifests for a given deployment.",
4488	//   "httpMethod": "GET",
4489	//   "id": "deploymentmanager.manifests.list",
4490	//   "parameterOrder": [
4491	//     "project",
4492	//     "deployment"
4493	//   ],
4494	//   "parameters": {
4495	//     "deployment": {
4496	//       "description": "The name of the deployment for this request.",
4497	//       "location": "path",
4498	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
4499	//       "required": true,
4500	//       "type": "string"
4501	//     },
4502	//     "filter": {
4503	//       "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
4504	//       "location": "query",
4505	//       "type": "string"
4506	//     },
4507	//     "maxResults": {
4508	//       "default": "500",
4509	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
4510	//       "format": "uint32",
4511	//       "location": "query",
4512	//       "minimum": "0",
4513	//       "type": "integer"
4514	//     },
4515	//     "orderBy": {
4516	//       "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.",
4517	//       "location": "query",
4518	//       "type": "string"
4519	//     },
4520	//     "pageToken": {
4521	//       "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.",
4522	//       "location": "query",
4523	//       "type": "string"
4524	//     },
4525	//     "project": {
4526	//       "description": "The project ID for this request.",
4527	//       "location": "path",
4528	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
4529	//       "required": true,
4530	//       "type": "string"
4531	//     }
4532	//   },
4533	//   "path": "{project}/global/deployments/{deployment}/manifests",
4534	//   "response": {
4535	//     "$ref": "ManifestsListResponse"
4536	//   },
4537	//   "scopes": [
4538	//     "https://www.googleapis.com/auth/cloud-platform",
4539	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4540	//     "https://www.googleapis.com/auth/ndev.cloudman",
4541	//     "https://www.googleapis.com/auth/ndev.cloudman.readonly"
4542	//   ]
4543	// }
4544
4545}
4546
4547// Pages invokes f for each page of results.
4548// A non-nil error returned from f will halt the iteration.
4549// The provided context supersedes any context provided to the Context method.
4550func (c *ManifestsListCall) Pages(ctx context.Context, f func(*ManifestsListResponse) error) error {
4551	c.ctx_ = ctx
4552	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4553	for {
4554		x, err := c.Do()
4555		if err != nil {
4556			return err
4557		}
4558		if err := f(x); err != nil {
4559			return err
4560		}
4561		if x.NextPageToken == "" {
4562			return nil
4563		}
4564		c.PageToken(x.NextPageToken)
4565	}
4566}
4567
4568// method id "deploymentmanager.operations.get":
4569
4570type OperationsGetCall struct {
4571	s            *Service
4572	project      string
4573	operation    string
4574	urlParams_   gensupport.URLParams
4575	ifNoneMatch_ string
4576	ctx_         context.Context
4577	header_      http.Header
4578}
4579
4580// Get: Gets information about a specific operation.
4581func (r *OperationsService) Get(project string, operation string) *OperationsGetCall {
4582	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4583	c.project = project
4584	c.operation = operation
4585	return c
4586}
4587
4588// Fields allows partial responses to be retrieved. See
4589// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4590// for more information.
4591func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
4592	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4593	return c
4594}
4595
4596// IfNoneMatch sets the optional parameter which makes the operation
4597// fail if the object's ETag matches the given value. This is useful for
4598// getting updates only after the object has changed since the last
4599// request. Use googleapi.IsNotModified to check whether the response
4600// error from Do is the result of In-None-Match.
4601func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
4602	c.ifNoneMatch_ = entityTag
4603	return c
4604}
4605
4606// Context sets the context to be used in this call's Do method. Any
4607// pending HTTP request will be aborted if the provided context is
4608// canceled.
4609func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
4610	c.ctx_ = ctx
4611	return c
4612}
4613
4614// Header returns an http.Header that can be modified by the caller to
4615// add HTTP headers to the request.
4616func (c *OperationsGetCall) Header() http.Header {
4617	if c.header_ == nil {
4618		c.header_ = make(http.Header)
4619	}
4620	return c.header_
4621}
4622
4623func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
4624	reqHeaders := make(http.Header)
4625	for k, v := range c.header_ {
4626		reqHeaders[k] = v
4627	}
4628	reqHeaders.Set("User-Agent", c.s.userAgent())
4629	if c.ifNoneMatch_ != "" {
4630		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4631	}
4632	var body io.Reader = nil
4633	c.urlParams_.Set("alt", alt)
4634	c.urlParams_.Set("prettyPrint", "false")
4635	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}")
4636	urls += "?" + c.urlParams_.Encode()
4637	req, err := http.NewRequest("GET", urls, body)
4638	if err != nil {
4639		return nil, err
4640	}
4641	req.Header = reqHeaders
4642	googleapi.Expand(req.URL, map[string]string{
4643		"project":   c.project,
4644		"operation": c.operation,
4645	})
4646	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4647}
4648
4649// Do executes the "deploymentmanager.operations.get" call.
4650// Exactly one of *Operation or error will be non-nil. Any non-2xx
4651// status code is an error. Response headers are in either
4652// *Operation.ServerResponse.Header or (if a response was returned at
4653// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4654// to check whether the returned error was because
4655// http.StatusNotModified was returned.
4656func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4657	gensupport.SetOptions(c.urlParams_, opts...)
4658	res, err := c.doRequest("json")
4659	if res != nil && res.StatusCode == http.StatusNotModified {
4660		if res.Body != nil {
4661			res.Body.Close()
4662		}
4663		return nil, &googleapi.Error{
4664			Code:   res.StatusCode,
4665			Header: res.Header,
4666		}
4667	}
4668	if err != nil {
4669		return nil, err
4670	}
4671	defer googleapi.CloseBody(res)
4672	if err := googleapi.CheckResponse(res); err != nil {
4673		return nil, err
4674	}
4675	ret := &Operation{
4676		ServerResponse: googleapi.ServerResponse{
4677			Header:         res.Header,
4678			HTTPStatusCode: res.StatusCode,
4679		},
4680	}
4681	target := &ret
4682	if err := gensupport.DecodeResponse(target, res); err != nil {
4683		return nil, err
4684	}
4685	return ret, nil
4686	// {
4687	//   "description": "Gets information about a specific operation.",
4688	//   "httpMethod": "GET",
4689	//   "id": "deploymentmanager.operations.get",
4690	//   "parameterOrder": [
4691	//     "project",
4692	//     "operation"
4693	//   ],
4694	//   "parameters": {
4695	//     "operation": {
4696	//       "description": "The name of the operation for this request.",
4697	//       "location": "path",
4698	//       "required": true,
4699	//       "type": "string"
4700	//     },
4701	//     "project": {
4702	//       "description": "The project ID for this request.",
4703	//       "location": "path",
4704	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
4705	//       "required": true,
4706	//       "type": "string"
4707	//     }
4708	//   },
4709	//   "path": "{project}/global/operations/{operation}",
4710	//   "response": {
4711	//     "$ref": "Operation"
4712	//   },
4713	//   "scopes": [
4714	//     "https://www.googleapis.com/auth/cloud-platform",
4715	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4716	//     "https://www.googleapis.com/auth/ndev.cloudman",
4717	//     "https://www.googleapis.com/auth/ndev.cloudman.readonly"
4718	//   ]
4719	// }
4720
4721}
4722
4723// method id "deploymentmanager.operations.list":
4724
4725type OperationsListCall struct {
4726	s            *Service
4727	project      string
4728	urlParams_   gensupport.URLParams
4729	ifNoneMatch_ string
4730	ctx_         context.Context
4731	header_      http.Header
4732}
4733
4734// List: Lists all operations for a project.
4735func (r *OperationsService) List(project string) *OperationsListCall {
4736	c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4737	c.project = project
4738	return c
4739}
4740
4741// Filter sets the optional parameter "filter": A filter expression that
4742// filters resources listed in the response. The expression must specify
4743// the field name, a comparison operator, and the value that you want to
4744// use for filtering. The value must be a string, a number, or a
4745// boolean. The comparison operator must be either =, !=, >, or <.
4746//
4747// For example, if you are filtering Compute Engine instances, you can
4748// exclude instances named example-instance by specifying name !=
4749// example-instance.
4750//
4751// You can also filter nested fields. For example, you could specify
4752// scheduling.automaticRestart = false to include instances only if they
4753// are not scheduled for automatic restarts. You can use filtering on
4754// nested fields to filter based on resource labels.
4755//
4756// To filter on multiple expressions, provide each separate expression
4757// within parentheses. For example, (scheduling.automaticRestart = true)
4758// (cpuPlatform = "Intel Skylake"). By default, each expression is an
4759// AND expression. However, you can include AND and OR expressions
4760// explicitly. For example, (cpuPlatform = "Intel Skylake") OR
4761// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
4762// true).
4763func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
4764	c.urlParams_.Set("filter", filter)
4765	return c
4766}
4767
4768// MaxResults sets the optional parameter "maxResults": The maximum
4769// number of results per page that should be returned. If the number of
4770// available results is larger than maxResults, Compute Engine returns a
4771// nextPageToken that can be used to get the next page of results in
4772// subsequent list requests. Acceptable values are 0 to 500, inclusive.
4773// (Default: 500)
4774func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall {
4775	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
4776	return c
4777}
4778
4779// OrderBy sets the optional parameter "orderBy": Sorts list results by
4780// a certain order. By default, results are returned in alphanumerical
4781// order based on the resource name.
4782//
4783// You can also sort results in descending order based on the creation
4784// timestamp using orderBy="creationTimestamp desc". This sorts results
4785// based on the creationTimestamp field in reverse chronological order
4786// (newest result first). Use this to sort resources like operations so
4787// that the newest operation is returned first.
4788//
4789// Currently, only sorting by name or creationTimestamp desc is
4790// supported.
4791func (c *OperationsListCall) OrderBy(orderBy string) *OperationsListCall {
4792	c.urlParams_.Set("orderBy", orderBy)
4793	return c
4794}
4795
4796// PageToken sets the optional parameter "pageToken": Specifies a page
4797// token to use. Set pageToken to the nextPageToken returned by a
4798// previous list request to get the next page of results.
4799func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
4800	c.urlParams_.Set("pageToken", pageToken)
4801	return c
4802}
4803
4804// Fields allows partial responses to be retrieved. See
4805// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4806// for more information.
4807func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
4808	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4809	return c
4810}
4811
4812// IfNoneMatch sets the optional parameter which makes the operation
4813// fail if the object's ETag matches the given value. This is useful for
4814// getting updates only after the object has changed since the last
4815// request. Use googleapi.IsNotModified to check whether the response
4816// error from Do is the result of In-None-Match.
4817func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
4818	c.ifNoneMatch_ = entityTag
4819	return c
4820}
4821
4822// Context sets the context to be used in this call's Do method. Any
4823// pending HTTP request will be aborted if the provided context is
4824// canceled.
4825func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
4826	c.ctx_ = ctx
4827	return c
4828}
4829
4830// Header returns an http.Header that can be modified by the caller to
4831// add HTTP headers to the request.
4832func (c *OperationsListCall) Header() http.Header {
4833	if c.header_ == nil {
4834		c.header_ = make(http.Header)
4835	}
4836	return c.header_
4837}
4838
4839func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
4840	reqHeaders := make(http.Header)
4841	for k, v := range c.header_ {
4842		reqHeaders[k] = v
4843	}
4844	reqHeaders.Set("User-Agent", c.s.userAgent())
4845	if c.ifNoneMatch_ != "" {
4846		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4847	}
4848	var body io.Reader = nil
4849	c.urlParams_.Set("alt", alt)
4850	c.urlParams_.Set("prettyPrint", "false")
4851	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations")
4852	urls += "?" + c.urlParams_.Encode()
4853	req, err := http.NewRequest("GET", urls, body)
4854	if err != nil {
4855		return nil, err
4856	}
4857	req.Header = reqHeaders
4858	googleapi.Expand(req.URL, map[string]string{
4859		"project": c.project,
4860	})
4861	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4862}
4863
4864// Do executes the "deploymentmanager.operations.list" call.
4865// Exactly one of *OperationsListResponse or error will be non-nil. Any
4866// non-2xx status code is an error. Response headers are in either
4867// *OperationsListResponse.ServerResponse.Header or (if a response was
4868// returned at all) in error.(*googleapi.Error).Header. Use
4869// googleapi.IsNotModified to check whether the returned error was
4870// because http.StatusNotModified was returned.
4871func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) {
4872	gensupport.SetOptions(c.urlParams_, opts...)
4873	res, err := c.doRequest("json")
4874	if res != nil && res.StatusCode == http.StatusNotModified {
4875		if res.Body != nil {
4876			res.Body.Close()
4877		}
4878		return nil, &googleapi.Error{
4879			Code:   res.StatusCode,
4880			Header: res.Header,
4881		}
4882	}
4883	if err != nil {
4884		return nil, err
4885	}
4886	defer googleapi.CloseBody(res)
4887	if err := googleapi.CheckResponse(res); err != nil {
4888		return nil, err
4889	}
4890	ret := &OperationsListResponse{
4891		ServerResponse: googleapi.ServerResponse{
4892			Header:         res.Header,
4893			HTTPStatusCode: res.StatusCode,
4894		},
4895	}
4896	target := &ret
4897	if err := gensupport.DecodeResponse(target, res); err != nil {
4898		return nil, err
4899	}
4900	return ret, nil
4901	// {
4902	//   "description": "Lists all operations for a project.",
4903	//   "httpMethod": "GET",
4904	//   "id": "deploymentmanager.operations.list",
4905	//   "parameterOrder": [
4906	//     "project"
4907	//   ],
4908	//   "parameters": {
4909	//     "filter": {
4910	//       "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
4911	//       "location": "query",
4912	//       "type": "string"
4913	//     },
4914	//     "maxResults": {
4915	//       "default": "500",
4916	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
4917	//       "format": "uint32",
4918	//       "location": "query",
4919	//       "minimum": "0",
4920	//       "type": "integer"
4921	//     },
4922	//     "orderBy": {
4923	//       "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.",
4924	//       "location": "query",
4925	//       "type": "string"
4926	//     },
4927	//     "pageToken": {
4928	//       "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.",
4929	//       "location": "query",
4930	//       "type": "string"
4931	//     },
4932	//     "project": {
4933	//       "description": "The project ID for this request.",
4934	//       "location": "path",
4935	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
4936	//       "required": true,
4937	//       "type": "string"
4938	//     }
4939	//   },
4940	//   "path": "{project}/global/operations",
4941	//   "response": {
4942	//     "$ref": "OperationsListResponse"
4943	//   },
4944	//   "scopes": [
4945	//     "https://www.googleapis.com/auth/cloud-platform",
4946	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
4947	//     "https://www.googleapis.com/auth/ndev.cloudman",
4948	//     "https://www.googleapis.com/auth/ndev.cloudman.readonly"
4949	//   ]
4950	// }
4951
4952}
4953
4954// Pages invokes f for each page of results.
4955// A non-nil error returned from f will halt the iteration.
4956// The provided context supersedes any context provided to the Context method.
4957func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error {
4958	c.ctx_ = ctx
4959	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4960	for {
4961		x, err := c.Do()
4962		if err != nil {
4963			return err
4964		}
4965		if err := f(x); err != nil {
4966			return err
4967		}
4968		if x.NextPageToken == "" {
4969			return nil
4970		}
4971		c.PageToken(x.NextPageToken)
4972	}
4973}
4974
4975// method id "deploymentmanager.resources.get":
4976
4977type ResourcesGetCall struct {
4978	s            *Service
4979	project      string
4980	deployment   string
4981	resource     string
4982	urlParams_   gensupport.URLParams
4983	ifNoneMatch_ string
4984	ctx_         context.Context
4985	header_      http.Header
4986}
4987
4988// Get: Gets information about a single resource.
4989func (r *ResourcesService) Get(project string, deployment string, resource string) *ResourcesGetCall {
4990	c := &ResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4991	c.project = project
4992	c.deployment = deployment
4993	c.resource = resource
4994	return c
4995}
4996
4997// Fields allows partial responses to be retrieved. See
4998// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4999// for more information.
5000func (c *ResourcesGetCall) Fields(s ...googleapi.Field) *ResourcesGetCall {
5001	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5002	return c
5003}
5004
5005// IfNoneMatch sets the optional parameter which makes the operation
5006// fail if the object's ETag matches the given value. This is useful for
5007// getting updates only after the object has changed since the last
5008// request. Use googleapi.IsNotModified to check whether the response
5009// error from Do is the result of In-None-Match.
5010func (c *ResourcesGetCall) IfNoneMatch(entityTag string) *ResourcesGetCall {
5011	c.ifNoneMatch_ = entityTag
5012	return c
5013}
5014
5015// Context sets the context to be used in this call's Do method. Any
5016// pending HTTP request will be aborted if the provided context is
5017// canceled.
5018func (c *ResourcesGetCall) Context(ctx context.Context) *ResourcesGetCall {
5019	c.ctx_ = ctx
5020	return c
5021}
5022
5023// Header returns an http.Header that can be modified by the caller to
5024// add HTTP headers to the request.
5025func (c *ResourcesGetCall) Header() http.Header {
5026	if c.header_ == nil {
5027		c.header_ = make(http.Header)
5028	}
5029	return c.header_
5030}
5031
5032func (c *ResourcesGetCall) doRequest(alt string) (*http.Response, error) {
5033	reqHeaders := make(http.Header)
5034	for k, v := range c.header_ {
5035		reqHeaders[k] = v
5036	}
5037	reqHeaders.Set("User-Agent", c.s.userAgent())
5038	if c.ifNoneMatch_ != "" {
5039		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5040	}
5041	var body io.Reader = nil
5042	c.urlParams_.Set("alt", alt)
5043	c.urlParams_.Set("prettyPrint", "false")
5044	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources/{resource}")
5045	urls += "?" + c.urlParams_.Encode()
5046	req, err := http.NewRequest("GET", urls, body)
5047	if err != nil {
5048		return nil, err
5049	}
5050	req.Header = reqHeaders
5051	googleapi.Expand(req.URL, map[string]string{
5052		"project":    c.project,
5053		"deployment": c.deployment,
5054		"resource":   c.resource,
5055	})
5056	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5057}
5058
5059// Do executes the "deploymentmanager.resources.get" call.
5060// Exactly one of *Resource or error will be non-nil. Any non-2xx status
5061// code is an error. Response headers are in either
5062// *Resource.ServerResponse.Header or (if a response was returned at
5063// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5064// to check whether the returned error was because
5065// http.StatusNotModified was returned.
5066func (c *ResourcesGetCall) Do(opts ...googleapi.CallOption) (*Resource, error) {
5067	gensupport.SetOptions(c.urlParams_, opts...)
5068	res, err := c.doRequest("json")
5069	if res != nil && res.StatusCode == http.StatusNotModified {
5070		if res.Body != nil {
5071			res.Body.Close()
5072		}
5073		return nil, &googleapi.Error{
5074			Code:   res.StatusCode,
5075			Header: res.Header,
5076		}
5077	}
5078	if err != nil {
5079		return nil, err
5080	}
5081	defer googleapi.CloseBody(res)
5082	if err := googleapi.CheckResponse(res); err != nil {
5083		return nil, err
5084	}
5085	ret := &Resource{
5086		ServerResponse: googleapi.ServerResponse{
5087			Header:         res.Header,
5088			HTTPStatusCode: res.StatusCode,
5089		},
5090	}
5091	target := &ret
5092	if err := gensupport.DecodeResponse(target, res); err != nil {
5093		return nil, err
5094	}
5095	return ret, nil
5096	// {
5097	//   "description": "Gets information about a single resource.",
5098	//   "httpMethod": "GET",
5099	//   "id": "deploymentmanager.resources.get",
5100	//   "parameterOrder": [
5101	//     "project",
5102	//     "deployment",
5103	//     "resource"
5104	//   ],
5105	//   "parameters": {
5106	//     "deployment": {
5107	//       "description": "The name of the deployment for this request.",
5108	//       "location": "path",
5109	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
5110	//       "required": true,
5111	//       "type": "string"
5112	//     },
5113	//     "project": {
5114	//       "description": "The project ID for this request.",
5115	//       "location": "path",
5116	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
5117	//       "required": true,
5118	//       "type": "string"
5119	//     },
5120	//     "resource": {
5121	//       "description": "The name of the resource for this request.",
5122	//       "location": "path",
5123	//       "required": true,
5124	//       "type": "string"
5125	//     }
5126	//   },
5127	//   "path": "{project}/global/deployments/{deployment}/resources/{resource}",
5128	//   "response": {
5129	//     "$ref": "Resource"
5130	//   },
5131	//   "scopes": [
5132	//     "https://www.googleapis.com/auth/cloud-platform",
5133	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
5134	//     "https://www.googleapis.com/auth/ndev.cloudman",
5135	//     "https://www.googleapis.com/auth/ndev.cloudman.readonly"
5136	//   ]
5137	// }
5138
5139}
5140
5141// method id "deploymentmanager.resources.list":
5142
5143type ResourcesListCall struct {
5144	s            *Service
5145	project      string
5146	deployment   string
5147	urlParams_   gensupport.URLParams
5148	ifNoneMatch_ string
5149	ctx_         context.Context
5150	header_      http.Header
5151}
5152
5153// List: Lists all resources in a given deployment.
5154func (r *ResourcesService) List(project string, deployment string) *ResourcesListCall {
5155	c := &ResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5156	c.project = project
5157	c.deployment = deployment
5158	return c
5159}
5160
5161// Filter sets the optional parameter "filter": A filter expression that
5162// filters resources listed in the response. The expression must specify
5163// the field name, a comparison operator, and the value that you want to
5164// use for filtering. The value must be a string, a number, or a
5165// boolean. The comparison operator must be either =, !=, >, or <.
5166//
5167// For example, if you are filtering Compute Engine instances, you can
5168// exclude instances named example-instance by specifying name !=
5169// example-instance.
5170//
5171// You can also filter nested fields. For example, you could specify
5172// scheduling.automaticRestart = false to include instances only if they
5173// are not scheduled for automatic restarts. You can use filtering on
5174// nested fields to filter based on resource labels.
5175//
5176// To filter on multiple expressions, provide each separate expression
5177// within parentheses. For example, (scheduling.automaticRestart = true)
5178// (cpuPlatform = "Intel Skylake"). By default, each expression is an
5179// AND expression. However, you can include AND and OR expressions
5180// explicitly. For example, (cpuPlatform = "Intel Skylake") OR
5181// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
5182// true).
5183func (c *ResourcesListCall) Filter(filter string) *ResourcesListCall {
5184	c.urlParams_.Set("filter", filter)
5185	return c
5186}
5187
5188// MaxResults sets the optional parameter "maxResults": The maximum
5189// number of results per page that should be returned. If the number of
5190// available results is larger than maxResults, Compute Engine returns a
5191// nextPageToken that can be used to get the next page of results in
5192// subsequent list requests. Acceptable values are 0 to 500, inclusive.
5193// (Default: 500)
5194func (c *ResourcesListCall) MaxResults(maxResults int64) *ResourcesListCall {
5195	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5196	return c
5197}
5198
5199// OrderBy sets the optional parameter "orderBy": Sorts list results by
5200// a certain order. By default, results are returned in alphanumerical
5201// order based on the resource name.
5202//
5203// You can also sort results in descending order based on the creation
5204// timestamp using orderBy="creationTimestamp desc". This sorts results
5205// based on the creationTimestamp field in reverse chronological order
5206// (newest result first). Use this to sort resources like operations so
5207// that the newest operation is returned first.
5208//
5209// Currently, only sorting by name or creationTimestamp desc is
5210// supported.
5211func (c *ResourcesListCall) OrderBy(orderBy string) *ResourcesListCall {
5212	c.urlParams_.Set("orderBy", orderBy)
5213	return c
5214}
5215
5216// PageToken sets the optional parameter "pageToken": Specifies a page
5217// token to use. Set pageToken to the nextPageToken returned by a
5218// previous list request to get the next page of results.
5219func (c *ResourcesListCall) PageToken(pageToken string) *ResourcesListCall {
5220	c.urlParams_.Set("pageToken", pageToken)
5221	return c
5222}
5223
5224// Fields allows partial responses to be retrieved. See
5225// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5226// for more information.
5227func (c *ResourcesListCall) Fields(s ...googleapi.Field) *ResourcesListCall {
5228	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5229	return c
5230}
5231
5232// IfNoneMatch sets the optional parameter which makes the operation
5233// fail if the object's ETag matches the given value. This is useful for
5234// getting updates only after the object has changed since the last
5235// request. Use googleapi.IsNotModified to check whether the response
5236// error from Do is the result of In-None-Match.
5237func (c *ResourcesListCall) IfNoneMatch(entityTag string) *ResourcesListCall {
5238	c.ifNoneMatch_ = entityTag
5239	return c
5240}
5241
5242// Context sets the context to be used in this call's Do method. Any
5243// pending HTTP request will be aborted if the provided context is
5244// canceled.
5245func (c *ResourcesListCall) Context(ctx context.Context) *ResourcesListCall {
5246	c.ctx_ = ctx
5247	return c
5248}
5249
5250// Header returns an http.Header that can be modified by the caller to
5251// add HTTP headers to the request.
5252func (c *ResourcesListCall) Header() http.Header {
5253	if c.header_ == nil {
5254		c.header_ = make(http.Header)
5255	}
5256	return c.header_
5257}
5258
5259func (c *ResourcesListCall) doRequest(alt string) (*http.Response, error) {
5260	reqHeaders := make(http.Header)
5261	for k, v := range c.header_ {
5262		reqHeaders[k] = v
5263	}
5264	reqHeaders.Set("User-Agent", c.s.userAgent())
5265	if c.ifNoneMatch_ != "" {
5266		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5267	}
5268	var body io.Reader = nil
5269	c.urlParams_.Set("alt", alt)
5270	c.urlParams_.Set("prettyPrint", "false")
5271	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/deployments/{deployment}/resources")
5272	urls += "?" + c.urlParams_.Encode()
5273	req, err := http.NewRequest("GET", urls, body)
5274	if err != nil {
5275		return nil, err
5276	}
5277	req.Header = reqHeaders
5278	googleapi.Expand(req.URL, map[string]string{
5279		"project":    c.project,
5280		"deployment": c.deployment,
5281	})
5282	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5283}
5284
5285// Do executes the "deploymentmanager.resources.list" call.
5286// Exactly one of *ResourcesListResponse or error will be non-nil. Any
5287// non-2xx status code is an error. Response headers are in either
5288// *ResourcesListResponse.ServerResponse.Header or (if a response was
5289// returned at all) in error.(*googleapi.Error).Header. Use
5290// googleapi.IsNotModified to check whether the returned error was
5291// because http.StatusNotModified was returned.
5292func (c *ResourcesListCall) Do(opts ...googleapi.CallOption) (*ResourcesListResponse, error) {
5293	gensupport.SetOptions(c.urlParams_, opts...)
5294	res, err := c.doRequest("json")
5295	if res != nil && res.StatusCode == http.StatusNotModified {
5296		if res.Body != nil {
5297			res.Body.Close()
5298		}
5299		return nil, &googleapi.Error{
5300			Code:   res.StatusCode,
5301			Header: res.Header,
5302		}
5303	}
5304	if err != nil {
5305		return nil, err
5306	}
5307	defer googleapi.CloseBody(res)
5308	if err := googleapi.CheckResponse(res); err != nil {
5309		return nil, err
5310	}
5311	ret := &ResourcesListResponse{
5312		ServerResponse: googleapi.ServerResponse{
5313			Header:         res.Header,
5314			HTTPStatusCode: res.StatusCode,
5315		},
5316	}
5317	target := &ret
5318	if err := gensupport.DecodeResponse(target, res); err != nil {
5319		return nil, err
5320	}
5321	return ret, nil
5322	// {
5323	//   "description": "Lists all resources in a given deployment.",
5324	//   "httpMethod": "GET",
5325	//   "id": "deploymentmanager.resources.list",
5326	//   "parameterOrder": [
5327	//     "project",
5328	//     "deployment"
5329	//   ],
5330	//   "parameters": {
5331	//     "deployment": {
5332	//       "description": "The name of the deployment for this request.",
5333	//       "location": "path",
5334	//       "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?",
5335	//       "required": true,
5336	//       "type": "string"
5337	//     },
5338	//     "filter": {
5339	//       "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
5340	//       "location": "query",
5341	//       "type": "string"
5342	//     },
5343	//     "maxResults": {
5344	//       "default": "500",
5345	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
5346	//       "format": "uint32",
5347	//       "location": "query",
5348	//       "minimum": "0",
5349	//       "type": "integer"
5350	//     },
5351	//     "orderBy": {
5352	//       "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.",
5353	//       "location": "query",
5354	//       "type": "string"
5355	//     },
5356	//     "pageToken": {
5357	//       "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.",
5358	//       "location": "query",
5359	//       "type": "string"
5360	//     },
5361	//     "project": {
5362	//       "description": "The project ID for this request.",
5363	//       "location": "path",
5364	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
5365	//       "required": true,
5366	//       "type": "string"
5367	//     }
5368	//   },
5369	//   "path": "{project}/global/deployments/{deployment}/resources",
5370	//   "response": {
5371	//     "$ref": "ResourcesListResponse"
5372	//   },
5373	//   "scopes": [
5374	//     "https://www.googleapis.com/auth/cloud-platform",
5375	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
5376	//     "https://www.googleapis.com/auth/ndev.cloudman",
5377	//     "https://www.googleapis.com/auth/ndev.cloudman.readonly"
5378	//   ]
5379	// }
5380
5381}
5382
5383// Pages invokes f for each page of results.
5384// A non-nil error returned from f will halt the iteration.
5385// The provided context supersedes any context provided to the Context method.
5386func (c *ResourcesListCall) Pages(ctx context.Context, f func(*ResourcesListResponse) error) error {
5387	c.ctx_ = ctx
5388	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5389	for {
5390		x, err := c.Do()
5391		if err != nil {
5392			return err
5393		}
5394		if err := f(x); err != nil {
5395			return err
5396		}
5397		if x.NextPageToken == "" {
5398			return nil
5399		}
5400		c.PageToken(x.NextPageToken)
5401	}
5402}
5403
5404// method id "deploymentmanager.types.list":
5405
5406type TypesListCall struct {
5407	s            *Service
5408	project      string
5409	urlParams_   gensupport.URLParams
5410	ifNoneMatch_ string
5411	ctx_         context.Context
5412	header_      http.Header
5413}
5414
5415// List: Lists all resource types for Deployment Manager.
5416func (r *TypesService) List(project string) *TypesListCall {
5417	c := &TypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5418	c.project = project
5419	return c
5420}
5421
5422// Filter sets the optional parameter "filter": A filter expression that
5423// filters resources listed in the response. The expression must specify
5424// the field name, a comparison operator, and the value that you want to
5425// use for filtering. The value must be a string, a number, or a
5426// boolean. The comparison operator must be either =, !=, >, or <.
5427//
5428// For example, if you are filtering Compute Engine instances, you can
5429// exclude instances named example-instance by specifying name !=
5430// example-instance.
5431//
5432// You can also filter nested fields. For example, you could specify
5433// scheduling.automaticRestart = false to include instances only if they
5434// are not scheduled for automatic restarts. You can use filtering on
5435// nested fields to filter based on resource labels.
5436//
5437// To filter on multiple expressions, provide each separate expression
5438// within parentheses. For example, (scheduling.automaticRestart = true)
5439// (cpuPlatform = "Intel Skylake"). By default, each expression is an
5440// AND expression. However, you can include AND and OR expressions
5441// explicitly. For example, (cpuPlatform = "Intel Skylake") OR
5442// (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart =
5443// true).
5444func (c *TypesListCall) Filter(filter string) *TypesListCall {
5445	c.urlParams_.Set("filter", filter)
5446	return c
5447}
5448
5449// MaxResults sets the optional parameter "maxResults": The maximum
5450// number of results per page that should be returned. If the number of
5451// available results is larger than maxResults, Compute Engine returns a
5452// nextPageToken that can be used to get the next page of results in
5453// subsequent list requests. Acceptable values are 0 to 500, inclusive.
5454// (Default: 500)
5455func (c *TypesListCall) MaxResults(maxResults int64) *TypesListCall {
5456	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5457	return c
5458}
5459
5460// OrderBy sets the optional parameter "orderBy": Sorts list results by
5461// a certain order. By default, results are returned in alphanumerical
5462// order based on the resource name.
5463//
5464// You can also sort results in descending order based on the creation
5465// timestamp using orderBy="creationTimestamp desc". This sorts results
5466// based on the creationTimestamp field in reverse chronological order
5467// (newest result first). Use this to sort resources like operations so
5468// that the newest operation is returned first.
5469//
5470// Currently, only sorting by name or creationTimestamp desc is
5471// supported.
5472func (c *TypesListCall) OrderBy(orderBy string) *TypesListCall {
5473	c.urlParams_.Set("orderBy", orderBy)
5474	return c
5475}
5476
5477// PageToken sets the optional parameter "pageToken": Specifies a page
5478// token to use. Set pageToken to the nextPageToken returned by a
5479// previous list request to get the next page of results.
5480func (c *TypesListCall) PageToken(pageToken string) *TypesListCall {
5481	c.urlParams_.Set("pageToken", pageToken)
5482	return c
5483}
5484
5485// Fields allows partial responses to be retrieved. See
5486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5487// for more information.
5488func (c *TypesListCall) Fields(s ...googleapi.Field) *TypesListCall {
5489	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5490	return c
5491}
5492
5493// IfNoneMatch sets the optional parameter which makes the operation
5494// fail if the object's ETag matches the given value. This is useful for
5495// getting updates only after the object has changed since the last
5496// request. Use googleapi.IsNotModified to check whether the response
5497// error from Do is the result of In-None-Match.
5498func (c *TypesListCall) IfNoneMatch(entityTag string) *TypesListCall {
5499	c.ifNoneMatch_ = entityTag
5500	return c
5501}
5502
5503// Context sets the context to be used in this call's Do method. Any
5504// pending HTTP request will be aborted if the provided context is
5505// canceled.
5506func (c *TypesListCall) Context(ctx context.Context) *TypesListCall {
5507	c.ctx_ = ctx
5508	return c
5509}
5510
5511// Header returns an http.Header that can be modified by the caller to
5512// add HTTP headers to the request.
5513func (c *TypesListCall) Header() http.Header {
5514	if c.header_ == nil {
5515		c.header_ = make(http.Header)
5516	}
5517	return c.header_
5518}
5519
5520func (c *TypesListCall) doRequest(alt string) (*http.Response, error) {
5521	reqHeaders := make(http.Header)
5522	for k, v := range c.header_ {
5523		reqHeaders[k] = v
5524	}
5525	reqHeaders.Set("User-Agent", c.s.userAgent())
5526	if c.ifNoneMatch_ != "" {
5527		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5528	}
5529	var body io.Reader = nil
5530	c.urlParams_.Set("alt", alt)
5531	c.urlParams_.Set("prettyPrint", "false")
5532	urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/types")
5533	urls += "?" + c.urlParams_.Encode()
5534	req, err := http.NewRequest("GET", urls, body)
5535	if err != nil {
5536		return nil, err
5537	}
5538	req.Header = reqHeaders
5539	googleapi.Expand(req.URL, map[string]string{
5540		"project": c.project,
5541	})
5542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5543}
5544
5545// Do executes the "deploymentmanager.types.list" call.
5546// Exactly one of *TypesListResponse or error will be non-nil. Any
5547// non-2xx status code is an error. Response headers are in either
5548// *TypesListResponse.ServerResponse.Header or (if a response was
5549// returned at all) in error.(*googleapi.Error).Header. Use
5550// googleapi.IsNotModified to check whether the returned error was
5551// because http.StatusNotModified was returned.
5552func (c *TypesListCall) Do(opts ...googleapi.CallOption) (*TypesListResponse, error) {
5553	gensupport.SetOptions(c.urlParams_, opts...)
5554	res, err := c.doRequest("json")
5555	if res != nil && res.StatusCode == http.StatusNotModified {
5556		if res.Body != nil {
5557			res.Body.Close()
5558		}
5559		return nil, &googleapi.Error{
5560			Code:   res.StatusCode,
5561			Header: res.Header,
5562		}
5563	}
5564	if err != nil {
5565		return nil, err
5566	}
5567	defer googleapi.CloseBody(res)
5568	if err := googleapi.CheckResponse(res); err != nil {
5569		return nil, err
5570	}
5571	ret := &TypesListResponse{
5572		ServerResponse: googleapi.ServerResponse{
5573			Header:         res.Header,
5574			HTTPStatusCode: res.StatusCode,
5575		},
5576	}
5577	target := &ret
5578	if err := gensupport.DecodeResponse(target, res); err != nil {
5579		return nil, err
5580	}
5581	return ret, nil
5582	// {
5583	//   "description": "Lists all resource types for Deployment Manager.",
5584	//   "httpMethod": "GET",
5585	//   "id": "deploymentmanager.types.list",
5586	//   "parameterOrder": [
5587	//     "project"
5588	//   ],
5589	//   "parameters": {
5590	//     "filter": {
5591	//       "description": "A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, \u003e, or \u003c.\n\nFor example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.\n\nYou can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true).",
5592	//       "location": "query",
5593	//       "type": "string"
5594	//     },
5595	//     "maxResults": {
5596	//       "default": "500",
5597	//       "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)",
5598	//       "format": "uint32",
5599	//       "location": "query",
5600	//       "minimum": "0",
5601	//       "type": "integer"
5602	//     },
5603	//     "orderBy": {
5604	//       "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.",
5605	//       "location": "query",
5606	//       "type": "string"
5607	//     },
5608	//     "pageToken": {
5609	//       "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.",
5610	//       "location": "query",
5611	//       "type": "string"
5612	//     },
5613	//     "project": {
5614	//       "description": "The project ID for this request.",
5615	//       "location": "path",
5616	//       "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))",
5617	//       "required": true,
5618	//       "type": "string"
5619	//     }
5620	//   },
5621	//   "path": "{project}/global/types",
5622	//   "response": {
5623	//     "$ref": "TypesListResponse"
5624	//   },
5625	//   "scopes": [
5626	//     "https://www.googleapis.com/auth/cloud-platform",
5627	//     "https://www.googleapis.com/auth/cloud-platform.read-only",
5628	//     "https://www.googleapis.com/auth/ndev.cloudman",
5629	//     "https://www.googleapis.com/auth/ndev.cloudman.readonly"
5630	//   ]
5631	// }
5632
5633}
5634
5635// Pages invokes f for each page of results.
5636// A non-nil error returned from f will halt the iteration.
5637// The provided context supersedes any context provided to the Context method.
5638func (c *TypesListCall) Pages(ctx context.Context, f func(*TypesListResponse) error) error {
5639	c.ctx_ = ctx
5640	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5641	for {
5642		x, err := c.Do()
5643		if err != nil {
5644			return err
5645		}
5646		if err := f(x); err != nil {
5647			return err
5648		}
5649		if x.NextPageToken == "" {
5650			return nil
5651		}
5652		c.PageToken(x.NextPageToken)
5653	}
5654}
5655