1// Copyright YEAR 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 appengine provides access to the Google App Engine Admin API.
8//
9// For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/appengine/v1"
16//   ...
17//   ctx := context.Background()
18//   appengineService, err := appengine.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   appengineService, err := appengine.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   appengineService, err := appengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package appengine // import "google.golang.org/api/appengine/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	gensupport "google.golang.org/api/gensupport"
53	googleapi "google.golang.org/api/googleapi"
54	option "google.golang.org/api/option"
55	htransport "google.golang.org/api/transport/http"
56)
57
58// Always reference these packages, just in case the auto-generated code
59// below doesn't.
60var _ = bytes.NewBuffer
61var _ = strconv.Itoa
62var _ = fmt.Sprintf
63var _ = json.NewDecoder
64var _ = io.Copy
65var _ = url.Parse
66var _ = gensupport.MarshalJSON
67var _ = googleapi.Version
68var _ = errors.New
69var _ = strings.Replace
70var _ = context.Canceled
71
72const apiId = "appengine:v1"
73const apiName = "appengine"
74const apiVersion = "v1"
75const basePath = "https://appengine.googleapis.com/"
76
77// OAuth2 scopes used by this API.
78const (
79	// View and manage your data across Google Cloud Platform services
80	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
81)
82
83// NewService creates a new APIService.
84func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) {
85	scopesOption := option.WithScopes(
86		"https://www.googleapis.com/auth/cloud-platform",
87	)
88	// NOTE: prepend, so we don't override user-specified scopes.
89	opts = append([]option.ClientOption{scopesOption}, opts...)
90	client, endpoint, err := htransport.NewClient(ctx, opts...)
91	if err != nil {
92		return nil, err
93	}
94	s, err := New(client)
95	if err != nil {
96		return nil, err
97	}
98	if endpoint != "" {
99		s.BasePath = endpoint
100	}
101	return s, nil
102}
103
104// New creates a new APIService. It uses the provided http.Client for requests.
105//
106// Deprecated: please use NewService instead.
107// To provide a custom HTTP client, use option.WithHTTPClient.
108// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
109func New(client *http.Client) (*APIService, error) {
110	if client == nil {
111		return nil, errors.New("client is nil")
112	}
113	s := &APIService{client: client, BasePath: basePath}
114	s.Apps = NewAppsService(s)
115	return s, nil
116}
117
118type APIService struct {
119	client    *http.Client
120	BasePath  string // API endpoint base URL
121	UserAgent string // optional additional User-Agent fragment
122
123	Apps *AppsService
124}
125
126func (s *APIService) userAgent() string {
127	if s.UserAgent == "" {
128		return googleapi.UserAgent
129	}
130	return googleapi.UserAgent + " " + s.UserAgent
131}
132
133func NewAppsService(s *APIService) *AppsService {
134	rs := &AppsService{s: s}
135	rs.Locations = NewAppsLocationsService(s)
136	rs.Operations = NewAppsOperationsService(s)
137	rs.Services = NewAppsServicesService(s)
138	return rs
139}
140
141type AppsService struct {
142	s *APIService
143
144	Locations *AppsLocationsService
145
146	Operations *AppsOperationsService
147
148	Services *AppsServicesService
149}
150
151func NewAppsLocationsService(s *APIService) *AppsLocationsService {
152	rs := &AppsLocationsService{s: s}
153	return rs
154}
155
156type AppsLocationsService struct {
157	s *APIService
158}
159
160func NewAppsOperationsService(s *APIService) *AppsOperationsService {
161	rs := &AppsOperationsService{s: s}
162	return rs
163}
164
165type AppsOperationsService struct {
166	s *APIService
167}
168
169func NewAppsServicesService(s *APIService) *AppsServicesService {
170	rs := &AppsServicesService{s: s}
171	rs.Versions = NewAppsServicesVersionsService(s)
172	return rs
173}
174
175type AppsServicesService struct {
176	s *APIService
177
178	Versions *AppsServicesVersionsService
179}
180
181func NewAppsServicesVersionsService(s *APIService) *AppsServicesVersionsService {
182	rs := &AppsServicesVersionsService{s: s}
183	rs.Instances = NewAppsServicesVersionsInstancesService(s)
184	return rs
185}
186
187type AppsServicesVersionsService struct {
188	s *APIService
189
190	Instances *AppsServicesVersionsInstancesService
191}
192
193func NewAppsServicesVersionsInstancesService(s *APIService) *AppsServicesVersionsInstancesService {
194	rs := &AppsServicesVersionsInstancesService{s: s}
195	return rs
196}
197
198type AppsServicesVersionsInstancesService struct {
199	s *APIService
200}
201
202// ApiConfigHandler: [Google Cloud
203// Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/)
204// configuration for API handlers.
205type ApiConfigHandler struct {
206	// AuthFailAction: Action to take when users access resources that
207	// require authentication. Defaults to `redirect`.
208	//
209	// Possible values:
210	//   "AUTH_FAIL_ACTION_UNSPECIFIED"
211	//   "AUTH_FAIL_ACTION_REDIRECT"
212	//   "AUTH_FAIL_ACTION_UNAUTHORIZED"
213	AuthFailAction string `json:"authFailAction,omitempty"`
214
215	// Login: Level of login required to access this resource. Defaults to
216	// `optional`.
217	//
218	// Possible values:
219	//   "LOGIN_UNSPECIFIED"
220	//   "LOGIN_OPTIONAL"
221	//   "LOGIN_ADMIN"
222	//   "LOGIN_REQUIRED"
223	Login string `json:"login,omitempty"`
224
225	// Script: Path to the script from the application root directory.
226	Script string `json:"script,omitempty"`
227
228	// SecurityLevel: Security (HTTPS) enforcement for this URL.
229	//
230	// Possible values:
231	//   "SECURE_UNSPECIFIED"
232	//   "SECURE_DEFAULT"
233	//   "SECURE_NEVER"
234	//   "SECURE_OPTIONAL"
235	//   "SECURE_ALWAYS"
236	SecurityLevel string `json:"securityLevel,omitempty"`
237
238	// Url: URL to serve the endpoint at.
239	Url string `json:"url,omitempty"`
240
241	// ForceSendFields is a list of field names (e.g. "AuthFailAction") to
242	// unconditionally include in API requests. By default, fields with
243	// empty values are omitted from API requests. However, any non-pointer,
244	// non-interface field appearing in ForceSendFields will be sent to the
245	// server regardless of whether the field is empty or not. This may be
246	// used to include empty fields in Patch requests.
247	ForceSendFields []string `json:"-"`
248
249	// NullFields is a list of field names (e.g. "AuthFailAction") to
250	// include in API requests with the JSON null value. By default, fields
251	// with empty values are omitted from API requests. However, any field
252	// with an empty value appearing in NullFields will be sent to the
253	// server as null. It is an error if a field in this list has a
254	// non-empty value. This may be used to include null fields in Patch
255	// requests.
256	NullFields []string `json:"-"`
257}
258
259func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) {
260	type NoMethod ApiConfigHandler
261	raw := NoMethod(*s)
262	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
263}
264
265// ApiEndpointHandler: Uses Google Cloud Endpoints to handle requests.
266type ApiEndpointHandler struct {
267	// ScriptPath: Path to the script from the application root directory.
268	ScriptPath string `json:"scriptPath,omitempty"`
269
270	// ForceSendFields is a list of field names (e.g. "ScriptPath") to
271	// unconditionally include in API requests. By default, fields with
272	// empty values are omitted from API requests. However, any non-pointer,
273	// non-interface field appearing in ForceSendFields will be sent to the
274	// server regardless of whether the field is empty or not. This may be
275	// used to include empty fields in Patch requests.
276	ForceSendFields []string `json:"-"`
277
278	// NullFields is a list of field names (e.g. "ScriptPath") to include in
279	// API requests with the JSON null value. By default, fields with empty
280	// values are omitted from API requests. However, any field with an
281	// empty value appearing in NullFields will be sent to the server as
282	// null. It is an error if a field in this list has a non-empty value.
283	// This may be used to include null fields in Patch requests.
284	NullFields []string `json:"-"`
285}
286
287func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) {
288	type NoMethod ApiEndpointHandler
289	raw := NoMethod(*s)
290	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
291}
292
293// Application: An Application resource contains the top-level
294// configuration of an App Engine application.
295type Application struct {
296	// AuthDomain: Google Apps authentication domain that controls which
297	// users can access this application. Defaults to open access for any
298	// Google Account.
299	AuthDomain string `json:"authDomain,omitempty"`
300
301	// CodeBucket: Google Cloud Storage bucket that can be used for storing
302	// files associated with this application. This bucket is associated
303	// with the application and can be used by the gcloud deployment
304	// commands. @OutputOnly
305	CodeBucket string `json:"codeBucket,omitempty"`
306
307	// DefaultBucket: Google Cloud Storage bucket that can be used by this
308	// application to store content. @OutputOnly
309	DefaultBucket string `json:"defaultBucket,omitempty"`
310
311	// DefaultCookieExpiration: Cookie expiration policy for this
312	// application. @OutputOnly
313	DefaultCookieExpiration string `json:"defaultCookieExpiration,omitempty"`
314
315	// DefaultHostname: Hostname used to reach this application, as resolved
316	// by App Engine. @OutputOnly
317	DefaultHostname string `json:"defaultHostname,omitempty"`
318
319	// DispatchRules: HTTP path dispatch rules for requests to the
320	// application that do not explicitly target a service or version. Rules
321	// are order-dependent. @OutputOnly
322	DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"`
323
324	// Id: Identifier of the Application resource. This identifier is
325	// equivalent to the project ID of the Google Cloud Platform project
326	// where you want to deploy your application. Example: `myapp`.
327	Id string `json:"id,omitempty"`
328
329	// LocationId: Location from which this application will be run.
330	// Application instances will run out of data centers in the chosen
331	// location, which is also where all of the application's end user
332	// content is stored. Defaults to `us-central`. Options are:
333	// `us-central` - Central US `europe-west` - Western Europe `us-east1` -
334	// Eastern US
335	LocationId string `json:"locationId,omitempty"`
336
337	// Name: Full path to the Application resource in the API. Example:
338	// `apps/myapp`. @OutputOnly
339	Name string `json:"name,omitempty"`
340
341	// ServerResponse contains the HTTP response code and headers from the
342	// server.
343	googleapi.ServerResponse `json:"-"`
344
345	// ForceSendFields is a list of field names (e.g. "AuthDomain") to
346	// unconditionally include in API requests. By default, fields with
347	// empty values are omitted from API requests. However, any non-pointer,
348	// non-interface field appearing in ForceSendFields will be sent to the
349	// server regardless of whether the field is empty or not. This may be
350	// used to include empty fields in Patch requests.
351	ForceSendFields []string `json:"-"`
352
353	// NullFields is a list of field names (e.g. "AuthDomain") to include in
354	// API requests with the JSON null value. By default, fields with empty
355	// values are omitted from API requests. However, any field with an
356	// empty value appearing in NullFields will be sent to the server as
357	// null. It is an error if a field in this list has a non-empty value.
358	// This may be used to include null fields in Patch requests.
359	NullFields []string `json:"-"`
360}
361
362func (s *Application) MarshalJSON() ([]byte, error) {
363	type NoMethod Application
364	raw := NoMethod(*s)
365	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
366}
367
368// AutomaticScaling: Automatic scaling is based on request rate,
369// response latencies, and other application metrics.
370type AutomaticScaling struct {
371	// CoolDownPeriod: Amount of time that the
372	// [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
373	// should wait between changes to the number of virtual machines. Only
374	// applicable for VM runtimes.
375	CoolDownPeriod string `json:"coolDownPeriod,omitempty"`
376
377	// CpuUtilization: Target scaling by CPU usage.
378	CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"`
379
380	// DiskUtilization: Target scaling by disk usage.
381	DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"`
382
383	// MaxConcurrentRequests: Number of concurrent requests an automatic
384	// scaling instance can accept before the scheduler spawns a new
385	// instance. Defaults to a runtime-specific value.
386	MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"`
387
388	// MaxIdleInstances: Maximum number of idle instances that should be
389	// maintained for this version.
390	MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"`
391
392	// MaxPendingLatency: Maximum amount of time that a request should wait
393	// in the pending queue before starting a new instance to handle it.
394	MaxPendingLatency string `json:"maxPendingLatency,omitempty"`
395
396	// MaxTotalInstances: Maximum number of instances that should be started
397	// to handle requests.
398	MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"`
399
400	// MinIdleInstances: Minimum number of idle instances that should be
401	// maintained for this version. Only applicable for the default version
402	// of a service.
403	MinIdleInstances int64 `json:"minIdleInstances,omitempty"`
404
405	// MinPendingLatency: Minimum amount of time a request should wait in
406	// the pending queue before starting a new instance to handle it.
407	MinPendingLatency string `json:"minPendingLatency,omitempty"`
408
409	// MinTotalInstances: Minimum number of instances that should be
410	// maintained for this version.
411	MinTotalInstances int64 `json:"minTotalInstances,omitempty"`
412
413	// NetworkUtilization: Target scaling by network usage.
414	NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"`
415
416	// RequestUtilization: Target scaling by request utilization.
417	RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"`
418
419	// ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to
420	// unconditionally include in API requests. By default, fields with
421	// empty values are omitted from API requests. However, any non-pointer,
422	// non-interface field appearing in ForceSendFields will be sent to the
423	// server regardless of whether the field is empty or not. This may be
424	// used to include empty fields in Patch requests.
425	ForceSendFields []string `json:"-"`
426
427	// NullFields is a list of field names (e.g. "CoolDownPeriod") to
428	// include in API requests with the JSON null value. By default, fields
429	// with empty values are omitted from API requests. However, any field
430	// with an empty value appearing in NullFields will be sent to the
431	// server as null. It is an error if a field in this list has a
432	// non-empty value. This may be used to include null fields in Patch
433	// requests.
434	NullFields []string `json:"-"`
435}
436
437func (s *AutomaticScaling) MarshalJSON() ([]byte, error) {
438	type NoMethod AutomaticScaling
439	raw := NoMethod(*s)
440	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
441}
442
443// BasicScaling: A service with basic scaling will create an instance
444// when the application receives a request. The instance will be turned
445// down when the app becomes idle. Basic scaling is ideal for work that
446// is intermittent or driven by user activity.
447type BasicScaling struct {
448	// IdleTimeout: Duration of time after the last request that an instance
449	// must wait before the instance is shut down.
450	IdleTimeout string `json:"idleTimeout,omitempty"`
451
452	// MaxInstances: Maximum number of instances to create for this version.
453	MaxInstances int64 `json:"maxInstances,omitempty"`
454
455	// ForceSendFields is a list of field names (e.g. "IdleTimeout") to
456	// unconditionally include in API requests. By default, fields with
457	// empty values are omitted from API requests. However, any non-pointer,
458	// non-interface field appearing in ForceSendFields will be sent to the
459	// server regardless of whether the field is empty or not. This may be
460	// used to include empty fields in Patch requests.
461	ForceSendFields []string `json:"-"`
462
463	// NullFields is a list of field names (e.g. "IdleTimeout") to include
464	// in API requests with the JSON null value. By default, fields with
465	// empty values are omitted from API requests. However, any field with
466	// an empty value appearing in NullFields will be sent to the server as
467	// null. It is an error if a field in this list has a non-empty value.
468	// This may be used to include null fields in Patch requests.
469	NullFields []string `json:"-"`
470}
471
472func (s *BasicScaling) MarshalJSON() ([]byte, error) {
473	type NoMethod BasicScaling
474	raw := NoMethod(*s)
475	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
476}
477
478// ContainerInfo: Docker image that is used to start a VM container for
479// the version you deploy.
480type ContainerInfo struct {
481	// Image: URI to the hosted container image in a Docker repository. The
482	// URI must be fully qualified and include a tag or digest. Examples:
483	// "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
484	Image string `json:"image,omitempty"`
485
486	// ForceSendFields is a list of field names (e.g. "Image") to
487	// unconditionally include in API requests. By default, fields with
488	// empty values are omitted from API requests. However, any non-pointer,
489	// non-interface field appearing in ForceSendFields will be sent to the
490	// server regardless of whether the field is empty or not. This may be
491	// used to include empty fields in Patch requests.
492	ForceSendFields []string `json:"-"`
493
494	// NullFields is a list of field names (e.g. "Image") to include in API
495	// requests with the JSON null value. By default, fields with empty
496	// values are omitted from API requests. However, any field with an
497	// empty value appearing in NullFields will be sent to the server as
498	// null. It is an error if a field in this list has a non-empty value.
499	// This may be used to include null fields in Patch requests.
500	NullFields []string `json:"-"`
501}
502
503func (s *ContainerInfo) MarshalJSON() ([]byte, error) {
504	type NoMethod ContainerInfo
505	raw := NoMethod(*s)
506	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
507}
508
509// CpuUtilization: Target scaling by CPU usage.
510type CpuUtilization struct {
511	// AggregationWindowLength: Period of time over which CPU utilization is
512	// calculated.
513	AggregationWindowLength string `json:"aggregationWindowLength,omitempty"`
514
515	// TargetUtilization: Target CPU utilization ratio to maintain when
516	// scaling. Must be between 0 and 1.
517	TargetUtilization float64 `json:"targetUtilization,omitempty"`
518
519	// ForceSendFields is a list of field names (e.g.
520	// "AggregationWindowLength") to unconditionally include in API
521	// requests. By default, fields with empty values are omitted from API
522	// requests. However, any non-pointer, non-interface field appearing in
523	// ForceSendFields will be sent to the server regardless of whether the
524	// field is empty or not. This may be used to include empty fields in
525	// Patch requests.
526	ForceSendFields []string `json:"-"`
527
528	// NullFields is a list of field names (e.g. "AggregationWindowLength")
529	// to include in API requests with the JSON null value. By default,
530	// fields with empty values are omitted from API requests. However, any
531	// field with an empty value appearing in NullFields will be sent to the
532	// server as null. It is an error if a field in this list has a
533	// non-empty value. This may be used to include null fields in Patch
534	// requests.
535	NullFields []string `json:"-"`
536}
537
538func (s *CpuUtilization) MarshalJSON() ([]byte, error) {
539	type NoMethod CpuUtilization
540	raw := NoMethod(*s)
541	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
542}
543
544func (s *CpuUtilization) UnmarshalJSON(data []byte) error {
545	type NoMethod CpuUtilization
546	var s1 struct {
547		TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"`
548		*NoMethod
549	}
550	s1.NoMethod = (*NoMethod)(s)
551	if err := json.Unmarshal(data, &s1); err != nil {
552		return err
553	}
554	s.TargetUtilization = float64(s1.TargetUtilization)
555	return nil
556}
557
558// DebugInstanceRequest: Request message for `Instances.DebugInstance`.
559type DebugInstanceRequest struct {
560}
561
562// Deployment: Code and application artifacts used to deploy a version
563// to App Engine.
564type Deployment struct {
565	// Container: A Docker image that App Engine uses to run the version.
566	// Only applicable for instances in App Engine flexible environment.
567	Container *ContainerInfo `json:"container,omitempty"`
568
569	// Files: Manifest of the files stored in Google Cloud Storage that are
570	// included as part of this version. All files must be readable using
571	// the credentials supplied with this call.
572	Files map[string]FileInfo `json:"files,omitempty"`
573
574	// Zip: The zip file for this deployment, if this is a zip deployment.
575	Zip *ZipInfo `json:"zip,omitempty"`
576
577	// ForceSendFields is a list of field names (e.g. "Container") to
578	// unconditionally include in API requests. By default, fields with
579	// empty values are omitted from API requests. However, any non-pointer,
580	// non-interface field appearing in ForceSendFields will be sent to the
581	// server regardless of whether the field is empty or not. This may be
582	// used to include empty fields in Patch requests.
583	ForceSendFields []string `json:"-"`
584
585	// NullFields is a list of field names (e.g. "Container") to include in
586	// API requests with the JSON null value. By default, fields with empty
587	// values are omitted from API requests. However, any field with an
588	// empty value appearing in NullFields will be sent to the server as
589	// null. It is an error if a field in this list has a non-empty value.
590	// This may be used to include null fields in Patch requests.
591	NullFields []string `json:"-"`
592}
593
594func (s *Deployment) MarshalJSON() ([]byte, error) {
595	type NoMethod Deployment
596	raw := NoMethod(*s)
597	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
598}
599
600// DiskUtilization: Target scaling by disk usage. Only applicable for VM
601// runtimes.
602type DiskUtilization struct {
603	// TargetReadBytesPerSecond: Target bytes read per second.
604	TargetReadBytesPerSecond int64 `json:"targetReadBytesPerSecond,omitempty"`
605
606	// TargetReadOpsPerSecond: Target ops read per seconds.
607	TargetReadOpsPerSecond int64 `json:"targetReadOpsPerSecond,omitempty"`
608
609	// TargetWriteBytesPerSecond: Target bytes written per second.
610	TargetWriteBytesPerSecond int64 `json:"targetWriteBytesPerSecond,omitempty"`
611
612	// TargetWriteOpsPerSecond: Target ops written per second.
613	TargetWriteOpsPerSecond int64 `json:"targetWriteOpsPerSecond,omitempty"`
614
615	// ForceSendFields is a list of field names (e.g.
616	// "TargetReadBytesPerSecond") to unconditionally include in API
617	// requests. By default, fields with empty values are omitted from API
618	// requests. However, any non-pointer, non-interface field appearing in
619	// ForceSendFields will be sent to the server regardless of whether the
620	// field is empty or not. This may be used to include empty fields in
621	// Patch requests.
622	ForceSendFields []string `json:"-"`
623
624	// NullFields is a list of field names (e.g. "TargetReadBytesPerSecond")
625	// to include in API requests with the JSON null value. By default,
626	// fields with empty values are omitted from API requests. However, any
627	// field with an empty value appearing in NullFields will be sent to the
628	// server as null. It is an error if a field in this list has a
629	// non-empty value. This may be used to include null fields in Patch
630	// requests.
631	NullFields []string `json:"-"`
632}
633
634func (s *DiskUtilization) MarshalJSON() ([]byte, error) {
635	type NoMethod DiskUtilization
636	raw := NoMethod(*s)
637	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
638}
639
640// ErrorHandler: Custom static error page to be served when an error
641// occurs.
642type ErrorHandler struct {
643	// ErrorCode: Error condition this handler applies to.
644	//
645	// Possible values:
646	//   "ERROR_CODE_UNSPECIFIED"
647	//   "ERROR_CODE_DEFAULT"
648	//   "ERROR_CODE_OVER_QUOTA"
649	//   "ERROR_CODE_DOS_API_DENIAL"
650	//   "ERROR_CODE_TIMEOUT"
651	ErrorCode string `json:"errorCode,omitempty"`
652
653	// MimeType: MIME type of file. Defaults to `text/html`.
654	MimeType string `json:"mimeType,omitempty"`
655
656	// StaticFile: Static file content to be served for this error.
657	StaticFile string `json:"staticFile,omitempty"`
658
659	// ForceSendFields is a list of field names (e.g. "ErrorCode") to
660	// unconditionally include in API requests. By default, fields with
661	// empty values are omitted from API requests. However, any non-pointer,
662	// non-interface field appearing in ForceSendFields will be sent to the
663	// server regardless of whether the field is empty or not. This may be
664	// used to include empty fields in Patch requests.
665	ForceSendFields []string `json:"-"`
666
667	// NullFields is a list of field names (e.g. "ErrorCode") to include in
668	// API requests with the JSON null value. By default, fields with empty
669	// values are omitted from API requests. However, any field with an
670	// empty value appearing in NullFields will be sent to the server as
671	// null. It is an error if a field in this list has a non-empty value.
672	// This may be used to include null fields in Patch requests.
673	NullFields []string `json:"-"`
674}
675
676func (s *ErrorHandler) MarshalJSON() ([]byte, error) {
677	type NoMethod ErrorHandler
678	raw := NoMethod(*s)
679	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
680}
681
682// FileInfo: Single source file that is part of the version to be
683// deployed. Each source file that is deployed must be specified
684// separately.
685type FileInfo struct {
686	// MimeType: The MIME type of the file. Defaults to the value from
687	// Google Cloud Storage.
688	MimeType string `json:"mimeType,omitempty"`
689
690	// Sha1Sum: The SHA1 hash of the file, in hex.
691	Sha1Sum string `json:"sha1Sum,omitempty"`
692
693	// SourceUrl: URL source to use to fetch this file. Must be a URL to a
694	// resource in Google Cloud Storage in the form
695	// 'http(s)://storage.googleapis.com/\/\'.
696	SourceUrl string `json:"sourceUrl,omitempty"`
697
698	// ForceSendFields is a list of field names (e.g. "MimeType") to
699	// unconditionally include in API requests. By default, fields with
700	// empty values are omitted from API requests. However, any non-pointer,
701	// non-interface field appearing in ForceSendFields will be sent to the
702	// server regardless of whether the field is empty or not. This may be
703	// used to include empty fields in Patch requests.
704	ForceSendFields []string `json:"-"`
705
706	// NullFields is a list of field names (e.g. "MimeType") to include in
707	// API requests with the JSON null value. By default, fields with empty
708	// values are omitted from API requests. However, any field with an
709	// empty value appearing in NullFields will be sent to the server as
710	// null. It is an error if a field in this list has a non-empty value.
711	// This may be used to include null fields in Patch requests.
712	NullFields []string `json:"-"`
713}
714
715func (s *FileInfo) MarshalJSON() ([]byte, error) {
716	type NoMethod FileInfo
717	raw := NoMethod(*s)
718	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
719}
720
721// HealthCheck: Health checking configuration for VM instances.
722// Unhealthy instances are killed and replaced with new instances. Only
723// applicable for instances in App Engine flexible environment.
724type HealthCheck struct {
725	// CheckInterval: Interval between health checks.
726	CheckInterval string `json:"checkInterval,omitempty"`
727
728	// DisableHealthCheck: Whether to explicitly disable health checks for
729	// this instance.
730	DisableHealthCheck bool `json:"disableHealthCheck,omitempty"`
731
732	// HealthyThreshold: Number of consecutive successful health checks
733	// required before receiving traffic.
734	HealthyThreshold int64 `json:"healthyThreshold,omitempty"`
735
736	// Host: Host header to send when performing an HTTP health check.
737	// Example: "myapp.appspot.com"
738	Host string `json:"host,omitempty"`
739
740	// RestartThreshold: Number of consecutive failed health checks required
741	// before an instance is restarted.
742	RestartThreshold int64 `json:"restartThreshold,omitempty"`
743
744	// Timeout: Time before the health check is considered failed.
745	Timeout string `json:"timeout,omitempty"`
746
747	// UnhealthyThreshold: Number of consecutive failed health checks
748	// required before removing traffic.
749	UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"`
750
751	// ForceSendFields is a list of field names (e.g. "CheckInterval") to
752	// unconditionally include in API requests. By default, fields with
753	// empty values are omitted from API requests. However, any non-pointer,
754	// non-interface field appearing in ForceSendFields will be sent to the
755	// server regardless of whether the field is empty or not. This may be
756	// used to include empty fields in Patch requests.
757	ForceSendFields []string `json:"-"`
758
759	// NullFields is a list of field names (e.g. "CheckInterval") to include
760	// in API requests with the JSON null value. By default, fields with
761	// empty values are omitted from API requests. However, any field with
762	// an empty value appearing in NullFields will be sent to the server as
763	// null. It is an error if a field in this list has a non-empty value.
764	// This may be used to include null fields in Patch requests.
765	NullFields []string `json:"-"`
766}
767
768func (s *HealthCheck) MarshalJSON() ([]byte, error) {
769	type NoMethod HealthCheck
770	raw := NoMethod(*s)
771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
772}
773
774// Instance: An Instance resource is the computing unit that App Engine
775// uses to automatically scale an application.
776type Instance struct {
777	// AppEngineRelease: App Engine release this instance is running on.
778	// @OutputOnly
779	AppEngineRelease string `json:"appEngineRelease,omitempty"`
780
781	// Availability: Availability of the instance. @OutputOnly
782	//
783	// Possible values:
784	//   "UNSPECIFIED"
785	//   "RESIDENT"
786	//   "DYNAMIC"
787	Availability string `json:"availability,omitempty"`
788
789	// AverageLatency: Average latency (ms) over the last minute.
790	// @OutputOnly
791	AverageLatency int64 `json:"averageLatency,omitempty"`
792
793	// Errors: Number of errors since this instance was started. @OutputOnly
794	Errors int64 `json:"errors,omitempty"`
795
796	// Id: Relative name of the instance within the version. Example:
797	// `instance-1`. @OutputOnly
798	Id string `json:"id,omitempty"`
799
800	// MemoryUsage: Total memory in use (bytes). @OutputOnly
801	MemoryUsage int64 `json:"memoryUsage,omitempty,string"`
802
803	// Name: Full path to the Instance resource in the API. Example:
804	// `apps/myapp/services/default/versions/v1/instances/instance-1`.
805	// @OutputOnly
806	Name string `json:"name,omitempty"`
807
808	// Qps: Average queries per second (QPS) over the last minute.
809	// @OutputOnly
810	Qps float64 `json:"qps,omitempty"`
811
812	// Requests: Number of requests since this instance was started.
813	// @OutputOnly
814	Requests int64 `json:"requests,omitempty"`
815
816	// StartTime: Time that this instance was started. @OutputOnly
817	StartTime string `json:"startTime,omitempty"`
818
819	// VmDebugEnabled: Whether this instance is in debug mode. Only
820	// applicable for instances in App Engine flexible environment.
821	// @OutputOnly
822	VmDebugEnabled bool `json:"vmDebugEnabled,omitempty"`
823
824	// VmId: Virtual machine ID of this instance. Only applicable for
825	// instances in App Engine flexible environment. @OutputOnly
826	VmId string `json:"vmId,omitempty"`
827
828	// VmName: Name of the virtual machine where this instance lives. Only
829	// applicable for instances in App Engine flexible environment.
830	// @OutputOnly
831	VmName string `json:"vmName,omitempty"`
832
833	// VmStatus: Status of the virtual machine where this instance lives.
834	// Only applicable for instances in App Engine flexible environment.
835	// @OutputOnly
836	VmStatus string `json:"vmStatus,omitempty"`
837
838	// VmZoneName: Zone where the virtual machine is located. Only
839	// applicable for instances in App Engine flexible environment.
840	// @OutputOnly
841	VmZoneName string `json:"vmZoneName,omitempty"`
842
843	// ServerResponse contains the HTTP response code and headers from the
844	// server.
845	googleapi.ServerResponse `json:"-"`
846
847	// ForceSendFields is a list of field names (e.g. "AppEngineRelease") to
848	// unconditionally include in API requests. By default, fields with
849	// empty values are omitted from API requests. However, any non-pointer,
850	// non-interface field appearing in ForceSendFields will be sent to the
851	// server regardless of whether the field is empty or not. This may be
852	// used to include empty fields in Patch requests.
853	ForceSendFields []string `json:"-"`
854
855	// NullFields is a list of field names (e.g. "AppEngineRelease") to
856	// include in API requests with the JSON null value. By default, fields
857	// with empty values are omitted from API requests. However, any field
858	// with an empty value appearing in NullFields will be sent to the
859	// server as null. It is an error if a field in this list has a
860	// non-empty value. This may be used to include null fields in Patch
861	// requests.
862	NullFields []string `json:"-"`
863}
864
865func (s *Instance) MarshalJSON() ([]byte, error) {
866	type NoMethod Instance
867	raw := NoMethod(*s)
868	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
869}
870
871func (s *Instance) UnmarshalJSON(data []byte) error {
872	type NoMethod Instance
873	var s1 struct {
874		Qps gensupport.JSONFloat64 `json:"qps"`
875		*NoMethod
876	}
877	s1.NoMethod = (*NoMethod)(s)
878	if err := json.Unmarshal(data, &s1); err != nil {
879		return err
880	}
881	s.Qps = float64(s1.Qps)
882	return nil
883}
884
885// Library: Third-party Python runtime library that is required by the
886// application.
887type Library struct {
888	// Name: Name of the library. Example: "django".
889	Name string `json:"name,omitempty"`
890
891	// Version: Version of the library to select, or "latest".
892	Version string `json:"version,omitempty"`
893
894	// ForceSendFields is a list of field names (e.g. "Name") to
895	// unconditionally include in API requests. By default, fields with
896	// empty values are omitted from API requests. However, any non-pointer,
897	// non-interface field appearing in ForceSendFields will be sent to the
898	// server regardless of whether the field is empty or not. This may be
899	// used to include empty fields in Patch requests.
900	ForceSendFields []string `json:"-"`
901
902	// NullFields is a list of field names (e.g. "Name") to include in API
903	// requests with the JSON null value. By default, fields with empty
904	// values are omitted from API requests. However, any field with an
905	// empty value appearing in NullFields will be sent to the server as
906	// null. It is an error if a field in this list has a non-empty value.
907	// This may be used to include null fields in Patch requests.
908	NullFields []string `json:"-"`
909}
910
911func (s *Library) MarshalJSON() ([]byte, error) {
912	type NoMethod Library
913	raw := NoMethod(*s)
914	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
915}
916
917// ListInstancesResponse: Response message for
918// `Instances.ListInstances`.
919type ListInstancesResponse struct {
920	// Instances: The instances belonging to the requested version.
921	Instances []*Instance `json:"instances,omitempty"`
922
923	// NextPageToken: Continuation token for fetching the next page of
924	// results.
925	NextPageToken string `json:"nextPageToken,omitempty"`
926
927	// ServerResponse contains the HTTP response code and headers from the
928	// server.
929	googleapi.ServerResponse `json:"-"`
930
931	// ForceSendFields is a list of field names (e.g. "Instances") to
932	// unconditionally include in API requests. By default, fields with
933	// empty values are omitted from API requests. However, any non-pointer,
934	// non-interface field appearing in ForceSendFields will be sent to the
935	// server regardless of whether the field is empty or not. This may be
936	// used to include empty fields in Patch requests.
937	ForceSendFields []string `json:"-"`
938
939	// NullFields is a list of field names (e.g. "Instances") to include in
940	// API requests with the JSON null value. By default, fields with empty
941	// values are omitted from API requests. However, any field with an
942	// empty value appearing in NullFields will be sent to the server as
943	// null. It is an error if a field in this list has a non-empty value.
944	// This may be used to include null fields in Patch requests.
945	NullFields []string `json:"-"`
946}
947
948func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) {
949	type NoMethod ListInstancesResponse
950	raw := NoMethod(*s)
951	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
952}
953
954// ListLocationsResponse: The response message for
955// LocationService.ListLocations.
956type ListLocationsResponse struct {
957	// Locations: A list of locations that matches the specified filter in
958	// the request.
959	Locations []*Location `json:"locations,omitempty"`
960
961	// NextPageToken: The standard List next-page token.
962	NextPageToken string `json:"nextPageToken,omitempty"`
963
964	// ServerResponse contains the HTTP response code and headers from the
965	// server.
966	googleapi.ServerResponse `json:"-"`
967
968	// ForceSendFields is a list of field names (e.g. "Locations") to
969	// unconditionally include in API requests. By default, fields with
970	// empty values are omitted from API requests. However, any non-pointer,
971	// non-interface field appearing in ForceSendFields will be sent to the
972	// server regardless of whether the field is empty or not. This may be
973	// used to include empty fields in Patch requests.
974	ForceSendFields []string `json:"-"`
975
976	// NullFields is a list of field names (e.g. "Locations") to include in
977	// API requests with the JSON null value. By default, fields with empty
978	// values are omitted from API requests. However, any field with an
979	// empty value appearing in NullFields will be sent to the server as
980	// null. It is an error if a field in this list has a non-empty value.
981	// This may be used to include null fields in Patch requests.
982	NullFields []string `json:"-"`
983}
984
985func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
986	type NoMethod ListLocationsResponse
987	raw := NoMethod(*s)
988	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
989}
990
991// ListOperationsResponse: The response message for
992// Operations.ListOperations.
993type ListOperationsResponse struct {
994	// NextPageToken: The standard List next-page token.
995	NextPageToken string `json:"nextPageToken,omitempty"`
996
997	// Operations: A list of operations that matches the specified filter in
998	// the request.
999	Operations []*Operation `json:"operations,omitempty"`
1000
1001	// ServerResponse contains the HTTP response code and headers from the
1002	// server.
1003	googleapi.ServerResponse `json:"-"`
1004
1005	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1006	// unconditionally include in API requests. By default, fields with
1007	// empty values are omitted from API requests. However, any non-pointer,
1008	// non-interface field appearing in ForceSendFields will be sent to the
1009	// server regardless of whether the field is empty or not. This may be
1010	// used to include empty fields in Patch requests.
1011	ForceSendFields []string `json:"-"`
1012
1013	// NullFields is a list of field names (e.g. "NextPageToken") to include
1014	// in API requests with the JSON null value. By default, fields with
1015	// empty values are omitted from API requests. However, any field with
1016	// an empty value appearing in NullFields will be sent to the server as
1017	// null. It is an error if a field in this list has a non-empty value.
1018	// This may be used to include null fields in Patch requests.
1019	NullFields []string `json:"-"`
1020}
1021
1022func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
1023	type NoMethod ListOperationsResponse
1024	raw := NoMethod(*s)
1025	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1026}
1027
1028// ListServicesResponse: Response message for `Services.ListServices`.
1029type ListServicesResponse struct {
1030	// NextPageToken: Continuation token for fetching the next page of
1031	// results.
1032	NextPageToken string `json:"nextPageToken,omitempty"`
1033
1034	// Services: The services belonging to the requested application.
1035	Services []*Service `json:"services,omitempty"`
1036
1037	// ServerResponse contains the HTTP response code and headers from the
1038	// server.
1039	googleapi.ServerResponse `json:"-"`
1040
1041	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1042	// unconditionally include in API requests. By default, fields with
1043	// empty values are omitted from API requests. However, any non-pointer,
1044	// non-interface field appearing in ForceSendFields will be sent to the
1045	// server regardless of whether the field is empty or not. This may be
1046	// used to include empty fields in Patch requests.
1047	ForceSendFields []string `json:"-"`
1048
1049	// NullFields is a list of field names (e.g. "NextPageToken") to include
1050	// in API requests with the JSON null value. By default, fields with
1051	// empty values are omitted from API requests. However, any field with
1052	// an empty value appearing in NullFields will be sent to the server as
1053	// null. It is an error if a field in this list has a non-empty value.
1054	// This may be used to include null fields in Patch requests.
1055	NullFields []string `json:"-"`
1056}
1057
1058func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
1059	type NoMethod ListServicesResponse
1060	raw := NoMethod(*s)
1061	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1062}
1063
1064// ListVersionsResponse: Response message for `Versions.ListVersions`.
1065type ListVersionsResponse struct {
1066	// NextPageToken: Continuation token for fetching the next page of
1067	// results.
1068	NextPageToken string `json:"nextPageToken,omitempty"`
1069
1070	// Versions: The versions belonging to the requested service.
1071	Versions []*Version `json:"versions,omitempty"`
1072
1073	// ServerResponse contains the HTTP response code and headers from the
1074	// server.
1075	googleapi.ServerResponse `json:"-"`
1076
1077	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1078	// unconditionally include in API requests. By default, fields with
1079	// empty values are omitted from API requests. However, any non-pointer,
1080	// non-interface field appearing in ForceSendFields will be sent to the
1081	// server regardless of whether the field is empty or not. This may be
1082	// used to include empty fields in Patch requests.
1083	ForceSendFields []string `json:"-"`
1084
1085	// NullFields is a list of field names (e.g. "NextPageToken") to include
1086	// in API requests with the JSON null value. By default, fields with
1087	// empty values are omitted from API requests. However, any field with
1088	// an empty value appearing in NullFields will be sent to the server as
1089	// null. It is an error if a field in this list has a non-empty value.
1090	// This may be used to include null fields in Patch requests.
1091	NullFields []string `json:"-"`
1092}
1093
1094func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) {
1095	type NoMethod ListVersionsResponse
1096	raw := NoMethod(*s)
1097	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1098}
1099
1100// Location: A resource that represents Google Cloud Platform location.
1101type Location struct {
1102	// Labels: Cross-service attributes for the location. For example
1103	// {"cloud.googleapis.com/region": "us-east1"}
1104	Labels map[string]string `json:"labels,omitempty"`
1105
1106	// LocationId: The cononical id for this location. For example:
1107	// "us-east1".
1108	LocationId string `json:"locationId,omitempty"`
1109
1110	// Metadata: Service-specific metadata. For example the available
1111	// capacity at the given location.
1112	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1113
1114	// Name: Resource name for the location, which may vary between
1115	// implementations. For example:
1116	// "projects/example-project/locations/us-east1"
1117	Name string `json:"name,omitempty"`
1118
1119	// ServerResponse contains the HTTP response code and headers from the
1120	// server.
1121	googleapi.ServerResponse `json:"-"`
1122
1123	// ForceSendFields is a list of field names (e.g. "Labels") to
1124	// unconditionally include in API requests. By default, fields with
1125	// empty values are omitted from API requests. However, any non-pointer,
1126	// non-interface field appearing in ForceSendFields will be sent to the
1127	// server regardless of whether the field is empty or not. This may be
1128	// used to include empty fields in Patch requests.
1129	ForceSendFields []string `json:"-"`
1130
1131	// NullFields is a list of field names (e.g. "Labels") to include in API
1132	// requests with the JSON null value. By default, fields with empty
1133	// values are omitted from API requests. However, any field with an
1134	// empty value appearing in NullFields will be sent to the server as
1135	// null. It is an error if a field in this list has a non-empty value.
1136	// This may be used to include null fields in Patch requests.
1137	NullFields []string `json:"-"`
1138}
1139
1140func (s *Location) MarshalJSON() ([]byte, error) {
1141	type NoMethod Location
1142	raw := NoMethod(*s)
1143	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1144}
1145
1146// LocationMetadata: Metadata for the given
1147// google.cloud.location.Location.
1148type LocationMetadata struct {
1149	// FlexibleEnvironmentAvailable: App Engine Flexible Environment is
1150	// available in the given location. @OutputOnly
1151	FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"`
1152
1153	// StandardEnvironmentAvailable: App Engine Standard Environment is
1154	// available in the given location. @OutputOnly
1155	StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"`
1156
1157	// ForceSendFields is a list of field names (e.g.
1158	// "FlexibleEnvironmentAvailable") to unconditionally include in API
1159	// requests. By default, fields with empty values are omitted from API
1160	// requests. However, any non-pointer, non-interface field appearing in
1161	// ForceSendFields will be sent to the server regardless of whether the
1162	// field is empty or not. This may be used to include empty fields in
1163	// Patch requests.
1164	ForceSendFields []string `json:"-"`
1165
1166	// NullFields is a list of field names (e.g.
1167	// "FlexibleEnvironmentAvailable") to include in API requests with the
1168	// JSON null value. By default, fields with empty values are omitted
1169	// from API requests. However, any field with an empty value appearing
1170	// in NullFields will be sent to the server as null. It is an error if a
1171	// field in this list has a non-empty value. This may be used to include
1172	// null fields in Patch requests.
1173	NullFields []string `json:"-"`
1174}
1175
1176func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
1177	type NoMethod LocationMetadata
1178	raw := NoMethod(*s)
1179	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1180}
1181
1182// ManualScaling: A service with manual scaling runs continuously,
1183// allowing you to perform complex initialization and rely on the state
1184// of its memory over time.
1185type ManualScaling struct {
1186	// Instances: Number of instances to assign to the service at the start.
1187	// This number can later be altered by using the [Modules
1188	// API](https://cloud.google.com/appengine/docs/python/modules/functions)
1189	//  `set_num_instances()` function.
1190	Instances int64 `json:"instances,omitempty"`
1191
1192	// ForceSendFields is a list of field names (e.g. "Instances") to
1193	// unconditionally include in API requests. By default, fields with
1194	// empty values are omitted from API requests. However, any non-pointer,
1195	// non-interface field appearing in ForceSendFields will be sent to the
1196	// server regardless of whether the field is empty or not. This may be
1197	// used to include empty fields in Patch requests.
1198	ForceSendFields []string `json:"-"`
1199
1200	// NullFields is a list of field names (e.g. "Instances") to include in
1201	// API requests with the JSON null value. By default, fields with empty
1202	// values are omitted from API requests. However, any field with an
1203	// empty value appearing in NullFields will be sent to the server as
1204	// null. It is an error if a field in this list has a non-empty value.
1205	// This may be used to include null fields in Patch requests.
1206	NullFields []string `json:"-"`
1207}
1208
1209func (s *ManualScaling) MarshalJSON() ([]byte, error) {
1210	type NoMethod ManualScaling
1211	raw := NoMethod(*s)
1212	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1213}
1214
1215// Network: Extra network settings. Only applicable for VM runtimes.
1216type Network struct {
1217	// ForwardedPorts: List of ports, or port pairs, to forward from the
1218	// virtual machine to the application container.
1219	ForwardedPorts []string `json:"forwardedPorts,omitempty"`
1220
1221	// InstanceTag: Tag to apply to the VM instance during creation.
1222	InstanceTag string `json:"instanceTag,omitempty"`
1223
1224	// Name: Google Cloud Platform network where the virtual machines are
1225	// created. Specify the short name, not the resource path. Defaults to
1226	// `default`.
1227	Name string `json:"name,omitempty"`
1228
1229	// ForceSendFields is a list of field names (e.g. "ForwardedPorts") to
1230	// unconditionally include in API requests. By default, fields with
1231	// empty values are omitted from API requests. However, any non-pointer,
1232	// non-interface field appearing in ForceSendFields will be sent to the
1233	// server regardless of whether the field is empty or not. This may be
1234	// used to include empty fields in Patch requests.
1235	ForceSendFields []string `json:"-"`
1236
1237	// NullFields is a list of field names (e.g. "ForwardedPorts") to
1238	// include in API requests with the JSON null value. By default, fields
1239	// with empty values are omitted from API requests. However, any field
1240	// with an empty value appearing in NullFields will be sent to the
1241	// server as null. It is an error if a field in this list has a
1242	// non-empty value. This may be used to include null fields in Patch
1243	// requests.
1244	NullFields []string `json:"-"`
1245}
1246
1247func (s *Network) MarshalJSON() ([]byte, error) {
1248	type NoMethod Network
1249	raw := NoMethod(*s)
1250	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1251}
1252
1253// NetworkUtilization: Target scaling by network usage. Only applicable
1254// for VM runtimes.
1255type NetworkUtilization struct {
1256	// TargetReceivedBytesPerSecond: Target bytes received per second.
1257	TargetReceivedBytesPerSecond int64 `json:"targetReceivedBytesPerSecond,omitempty"`
1258
1259	// TargetReceivedPacketsPerSecond: Target packets received per second.
1260	TargetReceivedPacketsPerSecond int64 `json:"targetReceivedPacketsPerSecond,omitempty"`
1261
1262	// TargetSentBytesPerSecond: Target bytes sent per second.
1263	TargetSentBytesPerSecond int64 `json:"targetSentBytesPerSecond,omitempty"`
1264
1265	// TargetSentPacketsPerSecond: Target packets sent per second.
1266	TargetSentPacketsPerSecond int64 `json:"targetSentPacketsPerSecond,omitempty"`
1267
1268	// ForceSendFields is a list of field names (e.g.
1269	// "TargetReceivedBytesPerSecond") to unconditionally include in API
1270	// requests. By default, fields with empty values are omitted from API
1271	// requests. However, any non-pointer, non-interface field appearing in
1272	// ForceSendFields will be sent to the server regardless of whether the
1273	// field is empty or not. This may be used to include empty fields in
1274	// Patch requests.
1275	ForceSendFields []string `json:"-"`
1276
1277	// NullFields is a list of field names (e.g.
1278	// "TargetReceivedBytesPerSecond") to include in API requests with the
1279	// JSON null value. By default, fields with empty values are omitted
1280	// from API requests. However, any field with an empty value appearing
1281	// in NullFields will be sent to the server as null. It is an error if a
1282	// field in this list has a non-empty value. This may be used to include
1283	// null fields in Patch requests.
1284	NullFields []string `json:"-"`
1285}
1286
1287func (s *NetworkUtilization) MarshalJSON() ([]byte, error) {
1288	type NoMethod NetworkUtilization
1289	raw := NoMethod(*s)
1290	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1291}
1292
1293// Operation: This resource represents a long-running operation that is
1294// the result of a network API call.
1295type Operation struct {
1296	// Done: If the value is `false`, it means the operation is still in
1297	// progress. If true, the operation is completed, and either `error` or
1298	// `response` is available.
1299	Done bool `json:"done,omitempty"`
1300
1301	// Error: The error result of the operation in case of failure.
1302	Error *Status `json:"error,omitempty"`
1303
1304	// Metadata: Service-specific metadata associated with the operation. It
1305	// typically contains progress information and common metadata such as
1306	// create time. Some services might not provide such metadata. Any
1307	// method that returns a long-running operation should document the
1308	// metadata type, if any.
1309	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1310
1311	// Name: The server-assigned name, which is only unique within the same
1312	// service that originally returns it. If you use the default HTTP
1313	// mapping, the `name` should have the format of
1314	// `operations/some/unique/name`.
1315	Name string `json:"name,omitempty"`
1316
1317	// Response: The normal response of the operation in case of success. If
1318	// the original method returns no data on success, such as `Delete`, the
1319	// response is `google.protobuf.Empty`. If the original method is
1320	// standard `Get`/`Create`/`Update`, the response should be the
1321	// resource. For other methods, the response should have the type
1322	// `XxxResponse`, where `Xxx` is the original method name. For example,
1323	// if the original method name is `TakeSnapshot()`, the inferred
1324	// response type is `TakeSnapshotResponse`.
1325	Response googleapi.RawMessage `json:"response,omitempty"`
1326
1327	// ServerResponse contains the HTTP response code and headers from the
1328	// server.
1329	googleapi.ServerResponse `json:"-"`
1330
1331	// ForceSendFields is a list of field names (e.g. "Done") to
1332	// unconditionally include in API requests. By default, fields with
1333	// empty values are omitted from API requests. However, any non-pointer,
1334	// non-interface field appearing in ForceSendFields will be sent to the
1335	// server regardless of whether the field is empty or not. This may be
1336	// used to include empty fields in Patch requests.
1337	ForceSendFields []string `json:"-"`
1338
1339	// NullFields is a list of field names (e.g. "Done") to include in API
1340	// requests with the JSON null value. By default, fields with empty
1341	// values are omitted from API requests. However, any field with an
1342	// empty value appearing in NullFields will be sent to the server as
1343	// null. It is an error if a field in this list has a non-empty value.
1344	// This may be used to include null fields in Patch requests.
1345	NullFields []string `json:"-"`
1346}
1347
1348func (s *Operation) MarshalJSON() ([]byte, error) {
1349	type NoMethod Operation
1350	raw := NoMethod(*s)
1351	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1352}
1353
1354// OperationMetadata: Metadata for the given
1355// google.longrunning.Operation.
1356type OperationMetadata struct {
1357	// EndTime: Timestamp that this operation completed. @OutputOnly
1358	EndTime string `json:"endTime,omitempty"`
1359
1360	// InsertTime: Timestamp that this operation was created. @OutputOnly
1361	InsertTime string `json:"insertTime,omitempty"`
1362
1363	// Method: API method that initiated this operation. Example:
1364	// `google.appengine.v1beta4.Version.CreateVersion`. @OutputOnly
1365	Method string `json:"method,omitempty"`
1366
1367	// OperationType: Type of this operation. Deprecated, use method field
1368	// instead. Example: "create_version". @OutputOnly
1369	OperationType string `json:"operationType,omitempty"`
1370
1371	// Target: Name of the resource that this operation is acting on.
1372	// Example: `apps/myapp/modules/default`. @OutputOnly
1373	Target string `json:"target,omitempty"`
1374
1375	// User: User who requested this operation. @OutputOnly
1376	User string `json:"user,omitempty"`
1377
1378	// ForceSendFields is a list of field names (e.g. "EndTime") to
1379	// unconditionally include in API requests. By default, fields with
1380	// empty values are omitted from API requests. However, any non-pointer,
1381	// non-interface field appearing in ForceSendFields will be sent to the
1382	// server regardless of whether the field is empty or not. This may be
1383	// used to include empty fields in Patch requests.
1384	ForceSendFields []string `json:"-"`
1385
1386	// NullFields is a list of field names (e.g. "EndTime") to include in
1387	// API requests with the JSON null value. By default, fields with empty
1388	// values are omitted from API requests. However, any field with an
1389	// empty value appearing in NullFields will be sent to the server as
1390	// null. It is an error if a field in this list has a non-empty value.
1391	// This may be used to include null fields in Patch requests.
1392	NullFields []string `json:"-"`
1393}
1394
1395func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1396	type NoMethod OperationMetadata
1397	raw := NoMethod(*s)
1398	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1399}
1400
1401// OperationMetadataV1: Metadata for the given
1402// google.longrunning.Operation.
1403type OperationMetadataV1 struct {
1404	// EndTime: Time that this operation completed. @OutputOnly
1405	EndTime string `json:"endTime,omitempty"`
1406
1407	// InsertTime: Time that this operation was created. @OutputOnly
1408	InsertTime string `json:"insertTime,omitempty"`
1409
1410	// Method: API method that initiated this operation. Example:
1411	// `google.appengine.v1.Versions.CreateVersion`. @OutputOnly
1412	Method string `json:"method,omitempty"`
1413
1414	// Target: Name of the resource that this operation is acting on.
1415	// Example: `apps/myapp/services/default`. @OutputOnly
1416	Target string `json:"target,omitempty"`
1417
1418	// User: User who requested this operation. @OutputOnly
1419	User string `json:"user,omitempty"`
1420
1421	// ForceSendFields is a list of field names (e.g. "EndTime") to
1422	// unconditionally include in API requests. By default, fields with
1423	// empty values are omitted from API requests. However, any non-pointer,
1424	// non-interface field appearing in ForceSendFields will be sent to the
1425	// server regardless of whether the field is empty or not. This may be
1426	// used to include empty fields in Patch requests.
1427	ForceSendFields []string `json:"-"`
1428
1429	// NullFields is a list of field names (e.g. "EndTime") to include in
1430	// API requests with the JSON null value. By default, fields with empty
1431	// values are omitted from API requests. However, any field with an
1432	// empty value appearing in NullFields will be sent to the server as
1433	// null. It is an error if a field in this list has a non-empty value.
1434	// This may be used to include null fields in Patch requests.
1435	NullFields []string `json:"-"`
1436}
1437
1438func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) {
1439	type NoMethod OperationMetadataV1
1440	raw := NoMethod(*s)
1441	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1442}
1443
1444// OperationMetadataV1Beta5: Metadata for the given
1445// google.longrunning.Operation.
1446type OperationMetadataV1Beta5 struct {
1447	// EndTime: Timestamp that this operation completed. @OutputOnly
1448	EndTime string `json:"endTime,omitempty"`
1449
1450	// InsertTime: Timestamp that this operation was created. @OutputOnly
1451	InsertTime string `json:"insertTime,omitempty"`
1452
1453	// Method: API method name that initiated this operation. Example:
1454	// `google.appengine.v1beta5.Version.CreateVersion`. @OutputOnly
1455	Method string `json:"method,omitempty"`
1456
1457	// Target: Name of the resource that this operation is acting on.
1458	// Example: `apps/myapp/services/default`. @OutputOnly
1459	Target string `json:"target,omitempty"`
1460
1461	// User: User who requested this operation. @OutputOnly
1462	User string `json:"user,omitempty"`
1463
1464	// ForceSendFields is a list of field names (e.g. "EndTime") to
1465	// unconditionally include in API requests. By default, fields with
1466	// empty values are omitted from API requests. However, any non-pointer,
1467	// non-interface field appearing in ForceSendFields will be sent to the
1468	// server regardless of whether the field is empty or not. This may be
1469	// used to include empty fields in Patch requests.
1470	ForceSendFields []string `json:"-"`
1471
1472	// NullFields is a list of field names (e.g. "EndTime") to include in
1473	// API requests with the JSON null value. By default, fields with empty
1474	// values are omitted from API requests. However, any field with an
1475	// empty value appearing in NullFields will be sent to the server as
1476	// null. It is an error if a field in this list has a non-empty value.
1477	// This may be used to include null fields in Patch requests.
1478	NullFields []string `json:"-"`
1479}
1480
1481func (s *OperationMetadataV1Beta5) MarshalJSON() ([]byte, error) {
1482	type NoMethod OperationMetadataV1Beta5
1483	raw := NoMethod(*s)
1484	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1485}
1486
1487// RepairApplicationRequest: Request message for
1488// 'Applications.RepairApplication'.
1489type RepairApplicationRequest struct {
1490}
1491
1492// RequestUtilization: Target scaling by request utilization. Only
1493// applicable for VM runtimes.
1494type RequestUtilization struct {
1495	// TargetConcurrentRequests: Target number of concurrent requests.
1496	TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"`
1497
1498	// TargetRequestCountPerSecond: Target requests per second.
1499	TargetRequestCountPerSecond int64 `json:"targetRequestCountPerSecond,omitempty"`
1500
1501	// ForceSendFields is a list of field names (e.g.
1502	// "TargetConcurrentRequests") to unconditionally include in API
1503	// requests. By default, fields with empty values are omitted from API
1504	// requests. However, any non-pointer, non-interface field appearing in
1505	// ForceSendFields will be sent to the server regardless of whether the
1506	// field is empty or not. This may be used to include empty fields in
1507	// Patch requests.
1508	ForceSendFields []string `json:"-"`
1509
1510	// NullFields is a list of field names (e.g. "TargetConcurrentRequests")
1511	// to include in API requests with the JSON null value. By default,
1512	// fields with empty values are omitted from API requests. However, any
1513	// field with an empty value appearing in NullFields will be sent to the
1514	// server as null. It is an error if a field in this list has a
1515	// non-empty value. This may be used to include null fields in Patch
1516	// requests.
1517	NullFields []string `json:"-"`
1518}
1519
1520func (s *RequestUtilization) MarshalJSON() ([]byte, error) {
1521	type NoMethod RequestUtilization
1522	raw := NoMethod(*s)
1523	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1524}
1525
1526// Resources: Machine resources for a version.
1527type Resources struct {
1528	// Cpu: Number of CPU cores needed.
1529	Cpu float64 `json:"cpu,omitempty"`
1530
1531	// DiskGb: Disk size (GB) needed.
1532	DiskGb float64 `json:"diskGb,omitempty"`
1533
1534	// MemoryGb: Memory (GB) needed.
1535	MemoryGb float64 `json:"memoryGb,omitempty"`
1536
1537	// ForceSendFields is a list of field names (e.g. "Cpu") to
1538	// unconditionally include in API requests. By default, fields with
1539	// empty values are omitted from API requests. However, any non-pointer,
1540	// non-interface field appearing in ForceSendFields will be sent to the
1541	// server regardless of whether the field is empty or not. This may be
1542	// used to include empty fields in Patch requests.
1543	ForceSendFields []string `json:"-"`
1544
1545	// NullFields is a list of field names (e.g. "Cpu") to include in API
1546	// requests with the JSON null value. By default, fields with empty
1547	// values are omitted from API requests. However, any field with an
1548	// empty value appearing in NullFields will be sent to the server as
1549	// null. It is an error if a field in this list has a non-empty value.
1550	// This may be used to include null fields in Patch requests.
1551	NullFields []string `json:"-"`
1552}
1553
1554func (s *Resources) MarshalJSON() ([]byte, error) {
1555	type NoMethod Resources
1556	raw := NoMethod(*s)
1557	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1558}
1559
1560func (s *Resources) UnmarshalJSON(data []byte) error {
1561	type NoMethod Resources
1562	var s1 struct {
1563		Cpu      gensupport.JSONFloat64 `json:"cpu"`
1564		DiskGb   gensupport.JSONFloat64 `json:"diskGb"`
1565		MemoryGb gensupport.JSONFloat64 `json:"memoryGb"`
1566		*NoMethod
1567	}
1568	s1.NoMethod = (*NoMethod)(s)
1569	if err := json.Unmarshal(data, &s1); err != nil {
1570		return err
1571	}
1572	s.Cpu = float64(s1.Cpu)
1573	s.DiskGb = float64(s1.DiskGb)
1574	s.MemoryGb = float64(s1.MemoryGb)
1575	return nil
1576}
1577
1578// ScriptHandler: Executes a script to handle the request that matches
1579// the URL pattern.
1580type ScriptHandler struct {
1581	// ScriptPath: Path to the script from the application root directory.
1582	ScriptPath string `json:"scriptPath,omitempty"`
1583
1584	// ForceSendFields is a list of field names (e.g. "ScriptPath") to
1585	// unconditionally include in API requests. By default, fields with
1586	// empty values are omitted from API requests. However, any non-pointer,
1587	// non-interface field appearing in ForceSendFields will be sent to the
1588	// server regardless of whether the field is empty or not. This may be
1589	// used to include empty fields in Patch requests.
1590	ForceSendFields []string `json:"-"`
1591
1592	// NullFields is a list of field names (e.g. "ScriptPath") to include in
1593	// API requests with the JSON null value. By default, fields with empty
1594	// values are omitted from API requests. However, any field with an
1595	// empty value appearing in NullFields will be sent to the server as
1596	// null. It is an error if a field in this list has a non-empty value.
1597	// This may be used to include null fields in Patch requests.
1598	NullFields []string `json:"-"`
1599}
1600
1601func (s *ScriptHandler) MarshalJSON() ([]byte, error) {
1602	type NoMethod ScriptHandler
1603	raw := NoMethod(*s)
1604	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1605}
1606
1607// Service: A Service resource is a logical component of an application
1608// that can share state and communicate in a secure fashion with other
1609// services. For example, an application that handles customer requests
1610// might include separate services to handle tasks such as backend data
1611// analysis or API requests from mobile devices. Each service has a
1612// collection of versions that define a specific set of code used to
1613// implement the functionality of that service.
1614type Service struct {
1615	// Id: Relative name of the service within the application. Example:
1616	// `default`. @OutputOnly
1617	Id string `json:"id,omitempty"`
1618
1619	// Name: Full path to the Service resource in the API. Example:
1620	// `apps/myapp/services/default`. @OutputOnly
1621	Name string `json:"name,omitempty"`
1622
1623	// Split: Mapping that defines fractional HTTP traffic diversion to
1624	// different versions within the service.
1625	Split *TrafficSplit `json:"split,omitempty"`
1626
1627	// ServerResponse contains the HTTP response code and headers from the
1628	// server.
1629	googleapi.ServerResponse `json:"-"`
1630
1631	// ForceSendFields is a list of field names (e.g. "Id") to
1632	// unconditionally include in API requests. By default, fields with
1633	// empty values are omitted from API requests. However, any non-pointer,
1634	// non-interface field appearing in ForceSendFields will be sent to the
1635	// server regardless of whether the field is empty or not. This may be
1636	// used to include empty fields in Patch requests.
1637	ForceSendFields []string `json:"-"`
1638
1639	// NullFields is a list of field names (e.g. "Id") to include in API
1640	// requests with the JSON null value. By default, fields with empty
1641	// values are omitted from API requests. However, any field with an
1642	// empty value appearing in NullFields will be sent to the server as
1643	// null. It is an error if a field in this list has a non-empty value.
1644	// This may be used to include null fields in Patch requests.
1645	NullFields []string `json:"-"`
1646}
1647
1648func (s *Service) MarshalJSON() ([]byte, error) {
1649	type NoMethod Service
1650	raw := NoMethod(*s)
1651	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1652}
1653
1654// StaticFilesHandler: Files served directly to the user for a given
1655// URL, such as images, CSS stylesheets, or JavaScript source files.
1656// Static file handlers describe which files in the application
1657// directory are static files, and which URLs serve them.
1658type StaticFilesHandler struct {
1659	// ApplicationReadable: Whether files should also be uploaded as code
1660	// data. By default, files declared in static file handlers are uploaded
1661	// as static data and are only served to end users; they cannot be read
1662	// by the application. If enabled, uploads are charged against both your
1663	// code and static data storage resource quotas.
1664	ApplicationReadable bool `json:"applicationReadable,omitempty"`
1665
1666	// Expiration: Time a static file served by this handler should be
1667	// cached by web proxies and browsers.
1668	Expiration string `json:"expiration,omitempty"`
1669
1670	// HttpHeaders: HTTP headers to use for all responses from these URLs.
1671	HttpHeaders map[string]string `json:"httpHeaders,omitempty"`
1672
1673	// MimeType: MIME type used to serve all files served by this handler.
1674	// Defaults to file-specific MIME types, which are derived from each
1675	// file's filename extension.
1676	MimeType string `json:"mimeType,omitempty"`
1677
1678	// Path: Path to the static files matched by the URL pattern, from the
1679	// application root directory. The path can refer to text matched in
1680	// groupings in the URL pattern.
1681	Path string `json:"path,omitempty"`
1682
1683	// RequireMatchingFile: Whether this handler should match the request if
1684	// the file referenced by the handler does not exist.
1685	RequireMatchingFile bool `json:"requireMatchingFile,omitempty"`
1686
1687	// UploadPathRegex: Regular expression that matches the file paths for
1688	// all files that should be referenced by this handler.
1689	UploadPathRegex string `json:"uploadPathRegex,omitempty"`
1690
1691	// ForceSendFields is a list of field names (e.g. "ApplicationReadable")
1692	// to unconditionally include in API requests. By default, fields with
1693	// empty values are omitted from API requests. However, any non-pointer,
1694	// non-interface field appearing in ForceSendFields will be sent to the
1695	// server regardless of whether the field is empty or not. This may be
1696	// used to include empty fields in Patch requests.
1697	ForceSendFields []string `json:"-"`
1698
1699	// NullFields is a list of field names (e.g. "ApplicationReadable") to
1700	// include in API requests with the JSON null value. By default, fields
1701	// with empty values are omitted from API requests. However, any field
1702	// with an empty value appearing in NullFields will be sent to the
1703	// server as null. It is an error if a field in this list has a
1704	// non-empty value. This may be used to include null fields in Patch
1705	// requests.
1706	NullFields []string `json:"-"`
1707}
1708
1709func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) {
1710	type NoMethod StaticFilesHandler
1711	raw := NoMethod(*s)
1712	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1713}
1714
1715// Status: The `Status` type defines a logical error model that is
1716// suitable for different programming environments, including REST APIs
1717// and RPC APIs. It is used by [gRPC](https://github.com/grpc). The
1718// error model is designed to be: - Simple to use and understand for
1719// most users - Flexible enough to meet unexpected needs # Overview The
1720// `Status` message contains three pieces of data: error code, error
1721// message, and error details. The error code should be an enum value of
1722// google.rpc.Code, but it may accept additional error codes if needed.
1723// The error message should be a developer-facing English message that
1724// helps developers *understand* and *resolve* the error. If a localized
1725// user-facing error message is needed, put the localized message in the
1726// error details or localize it in the client. The optional error
1727// details may contain arbitrary information about the error. There is a
1728// predefined set of error detail types in the package `google.rpc`
1729// which can be used for common error conditions. # Language mapping The
1730// `Status` message is the logical representation of the error model,
1731// but it is not necessarily the actual wire format. When the `Status`
1732// message is exposed in different client libraries and different wire
1733// protocols, it can be mapped differently. For example, it will likely
1734// be mapped to some exceptions in Java, but more likely mapped to some
1735// error codes in C. # Other uses The error model and the `Status`
1736// message can be used in a variety of environments, either with or
1737// without APIs, to provide a consistent developer experience across
1738// different environments. Example uses of this error model include: -
1739// Partial errors. If a service needs to return partial errors to the
1740// client, it may embed the `Status` in the normal response to indicate
1741// the partial errors. - Workflow errors. A typical workflow has
1742// multiple steps. Each step may have a `Status` message for error
1743// reporting purpose. - Batch operations. If a client uses batch request
1744// and batch response, the `Status` message should be used directly
1745// inside batch response, one for each error sub-response. -
1746// Asynchronous operations. If an API call embeds asynchronous operation
1747// results in its response, the status of those operations should be
1748// represented directly using the `Status` message. - Logging. If some
1749// API errors are stored in logs, the message `Status` could be used
1750// directly after any stripping needed for security/privacy reasons.
1751type Status struct {
1752	// Code: The status code, which should be an enum value of
1753	// google.rpc.Code.
1754	Code int64 `json:"code,omitempty"`
1755
1756	// Details: A list of messages that carry the error details. There will
1757	// be a common set of message types for APIs to use.
1758	Details []googleapi.RawMessage `json:"details,omitempty"`
1759
1760	// Message: A developer-facing error message, which should be in
1761	// English. Any user-facing error message should be localized and sent
1762	// in the google.rpc.Status.details field, or localized by the client.
1763	Message string `json:"message,omitempty"`
1764
1765	// ForceSendFields is a list of field names (e.g. "Code") to
1766	// unconditionally include in API requests. By default, fields with
1767	// empty values are omitted from API requests. However, any non-pointer,
1768	// non-interface field appearing in ForceSendFields will be sent to the
1769	// server regardless of whether the field is empty or not. This may be
1770	// used to include empty fields in Patch requests.
1771	ForceSendFields []string `json:"-"`
1772
1773	// NullFields is a list of field names (e.g. "Code") to include in API
1774	// requests with the JSON null value. By default, fields with empty
1775	// values are omitted from API requests. However, any field with an
1776	// empty value appearing in NullFields will be sent to the server as
1777	// null. It is an error if a field in this list has a non-empty value.
1778	// This may be used to include null fields in Patch requests.
1779	NullFields []string `json:"-"`
1780}
1781
1782func (s *Status) MarshalJSON() ([]byte, error) {
1783	type NoMethod Status
1784	raw := NoMethod(*s)
1785	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1786}
1787
1788// TrafficSplit: Traffic routing configuration for versions within a
1789// single service. Traffic splits define how traffic directed to the
1790// service is assigned to versions.
1791type TrafficSplit struct {
1792	// Allocations: Mapping from version IDs within the service to
1793	// fractional (0.000, 1] allocations of traffic for that version. Each
1794	// version can be specified only once, but some versions in the service
1795	// may not have any traffic allocation. Services that have traffic
1796	// allocated cannot be deleted until either the service is deleted or
1797	// their traffic allocation is removed. Allocations must sum to 1. Up to
1798	// two decimal place precision is supported for IP-based splits and up
1799	// to three decimal places is supported for cookie-based splits.
1800	Allocations map[string]float64 `json:"allocations,omitempty"`
1801
1802	// ShardBy: Mechanism used to determine which version a request is sent
1803	// to. The traffic selection algorithm will be stable for either type
1804	// until allocations are changed.
1805	//
1806	// Possible values:
1807	//   "UNSPECIFIED"
1808	//   "COOKIE"
1809	//   "IP"
1810	ShardBy string `json:"shardBy,omitempty"`
1811
1812	// ForceSendFields is a list of field names (e.g. "Allocations") to
1813	// unconditionally include in API requests. By default, fields with
1814	// empty values are omitted from API requests. However, any non-pointer,
1815	// non-interface field appearing in ForceSendFields will be sent to the
1816	// server regardless of whether the field is empty or not. This may be
1817	// used to include empty fields in Patch requests.
1818	ForceSendFields []string `json:"-"`
1819
1820	// NullFields is a list of field names (e.g. "Allocations") to include
1821	// in API requests with the JSON null value. By default, fields with
1822	// empty values are omitted from API requests. However, any field with
1823	// an empty value appearing in NullFields will be sent to the server as
1824	// null. It is an error if a field in this list has a non-empty value.
1825	// This may be used to include null fields in Patch requests.
1826	NullFields []string `json:"-"`
1827}
1828
1829func (s *TrafficSplit) MarshalJSON() ([]byte, error) {
1830	type NoMethod TrafficSplit
1831	raw := NoMethod(*s)
1832	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1833}
1834
1835// UrlDispatchRule: Rules to match an HTTP request and dispatch that
1836// request to a service.
1837type UrlDispatchRule struct {
1838	// Domain: Domain name to match against. The wildcard "*" is supported
1839	// if specified before a period: "*.". Defaults to matching all
1840	// domains: "*".
1841	Domain string `json:"domain,omitempty"`
1842
1843	// Path: Pathname within the host. Must start with a "/". A single
1844	// "*" can be included at the end of the path. The sum of the lengths
1845	// of the domain and path may not exceed 100 characters.
1846	Path string `json:"path,omitempty"`
1847
1848	// Service: Resource ID of a service in this application that should
1849	// serve the matched request. The service must already exist. Example:
1850	// `default`.
1851	Service string `json:"service,omitempty"`
1852
1853	// ForceSendFields is a list of field names (e.g. "Domain") to
1854	// unconditionally include in API requests. By default, fields with
1855	// empty values are omitted from API requests. However, any non-pointer,
1856	// non-interface field appearing in ForceSendFields will be sent to the
1857	// server regardless of whether the field is empty or not. This may be
1858	// used to include empty fields in Patch requests.
1859	ForceSendFields []string `json:"-"`
1860
1861	// NullFields is a list of field names (e.g. "Domain") to include in API
1862	// requests with the JSON null value. By default, fields with empty
1863	// values are omitted from API requests. However, any field with an
1864	// empty value appearing in NullFields will be sent to the server as
1865	// null. It is an error if a field in this list has a non-empty value.
1866	// This may be used to include null fields in Patch requests.
1867	NullFields []string `json:"-"`
1868}
1869
1870func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) {
1871	type NoMethod UrlDispatchRule
1872	raw := NoMethod(*s)
1873	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1874}
1875
1876// UrlMap: URL pattern and description of how the URL should be handled.
1877// App Engine can handle URLs by executing application code or by
1878// serving static files uploaded with the version, such as images, CSS,
1879// or JavaScript.
1880type UrlMap struct {
1881	// ApiEndpoint: Uses API Endpoints to handle requests.
1882	ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"`
1883
1884	// AuthFailAction: Action to take when users access resources that
1885	// require authentication. Defaults to `redirect`.
1886	//
1887	// Possible values:
1888	//   "AUTH_FAIL_ACTION_UNSPECIFIED"
1889	//   "AUTH_FAIL_ACTION_REDIRECT"
1890	//   "AUTH_FAIL_ACTION_UNAUTHORIZED"
1891	AuthFailAction string `json:"authFailAction,omitempty"`
1892
1893	// Login: Level of login required to access this resource.
1894	//
1895	// Possible values:
1896	//   "LOGIN_UNSPECIFIED"
1897	//   "LOGIN_OPTIONAL"
1898	//   "LOGIN_ADMIN"
1899	//   "LOGIN_REQUIRED"
1900	Login string `json:"login,omitempty"`
1901
1902	// RedirectHttpResponseCode: `30x` code to use when performing redirects
1903	// for the `secure` field. Defaults to `302`.
1904	//
1905	// Possible values:
1906	//   "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED"
1907	//   "REDIRECT_HTTP_RESPONSE_CODE_301"
1908	//   "REDIRECT_HTTP_RESPONSE_CODE_302"
1909	//   "REDIRECT_HTTP_RESPONSE_CODE_303"
1910	//   "REDIRECT_HTTP_RESPONSE_CODE_307"
1911	RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"`
1912
1913	// Script: Executes a script to handle the request that matches this URL
1914	// pattern.
1915	Script *ScriptHandler `json:"script,omitempty"`
1916
1917	// SecurityLevel: Security (HTTPS) enforcement for this URL.
1918	//
1919	// Possible values:
1920	//   "SECURE_UNSPECIFIED"
1921	//   "SECURE_DEFAULT"
1922	//   "SECURE_NEVER"
1923	//   "SECURE_OPTIONAL"
1924	//   "SECURE_ALWAYS"
1925	SecurityLevel string `json:"securityLevel,omitempty"`
1926
1927	// StaticFiles: Returns the contents of a file, such as an image, as the
1928	// response.
1929	StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"`
1930
1931	// UrlRegex: URL prefix. Uses regular expression syntax, which means
1932	// regexp special characters must be escaped, but should not contain
1933	// groupings. All URLs that begin with this prefix are handled by this
1934	// handler, using the portion of the URL after the prefix as part of the
1935	// file path.
1936	UrlRegex string `json:"urlRegex,omitempty"`
1937
1938	// ForceSendFields is a list of field names (e.g. "ApiEndpoint") to
1939	// unconditionally include in API requests. By default, fields with
1940	// empty values are omitted from API requests. However, any non-pointer,
1941	// non-interface field appearing in ForceSendFields will be sent to the
1942	// server regardless of whether the field is empty or not. This may be
1943	// used to include empty fields in Patch requests.
1944	ForceSendFields []string `json:"-"`
1945
1946	// NullFields is a list of field names (e.g. "ApiEndpoint") to include
1947	// in API requests with the JSON null value. By default, fields with
1948	// empty values are omitted from API requests. However, any field with
1949	// an empty value appearing in NullFields will be sent to the server as
1950	// null. It is an error if a field in this list has a non-empty value.
1951	// This may be used to include null fields in Patch requests.
1952	NullFields []string `json:"-"`
1953}
1954
1955func (s *UrlMap) MarshalJSON() ([]byte, error) {
1956	type NoMethod UrlMap
1957	raw := NoMethod(*s)
1958	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1959}
1960
1961// Version: A Version resource is a specific set of source code and
1962// configuration files that are deployed into a service.
1963type Version struct {
1964	// ApiConfig: Serving configuration for [Google Cloud
1965	// Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
1966	//  Only returned in `GET` requests if `view=FULL` is set.
1967	ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"`
1968
1969	// AutomaticScaling: Automatic scaling is based on request rate,
1970	// response latencies, and other application metrics.
1971	AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"`
1972
1973	// BasicScaling: A service with basic scaling will create an instance
1974	// when the application receives a request. The instance will be turned
1975	// down when the app becomes idle. Basic scaling is ideal for work that
1976	// is intermittent or driven by user activity.
1977	BasicScaling *BasicScaling `json:"basicScaling,omitempty"`
1978
1979	// BetaSettings: Metadata settings that are supplied to this version to
1980	// enable beta runtime features.
1981	BetaSettings map[string]string `json:"betaSettings,omitempty"`
1982
1983	// CreateTime: Time that this version was created. @OutputOnly
1984	CreateTime string `json:"createTime,omitempty"`
1985
1986	// CreatedBy: Email address of the user who created this version.
1987	// @OutputOnly
1988	CreatedBy string `json:"createdBy,omitempty"`
1989
1990	// DefaultExpiration: Duration that static files should be cached by web
1991	// proxies and browsers. Only applicable if the corresponding
1992	// [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api
1993	// /reference/rest/v1/apps.services.versions#staticfileshandler) does
1994	// not specify its own expiration time. Only returned in `GET` requests
1995	// if `view=FULL` is set.
1996	DefaultExpiration string `json:"defaultExpiration,omitempty"`
1997
1998	// Deployment: Code and application artifacts that make up this version.
1999	// Only returned in `GET` requests if `view=FULL` is set.
2000	Deployment *Deployment `json:"deployment,omitempty"`
2001
2002	// DiskUsageBytes: Total size in bytes of all the files that are
2003	// included in this version and curerntly hosted on the App Engine disk.
2004	// @OutputOnly
2005	DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"`
2006
2007	// Env: App Engine execution environment for this version. Defaults to
2008	// `standard`.
2009	Env string `json:"env,omitempty"`
2010
2011	// EnvVariables: Environment variables available to the application.
2012	// Only returned in `GET` requests if `view=FULL` is set.
2013	EnvVariables map[string]string `json:"envVariables,omitempty"`
2014
2015	// ErrorHandlers: Custom static error pages. Limited to 10KB per page.
2016	// Only returned in `GET` requests if `view=FULL` is set.
2017	ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"`
2018
2019	// Handlers: An ordered list of URL-matching patterns that should be
2020	// applied to incoming requests. The first matching URL handles the
2021	// request and other request handlers are not attempted. Only returned
2022	// in `GET` requests if `view=FULL` is set.
2023	Handlers []*UrlMap `json:"handlers,omitempty"`
2024
2025	// HealthCheck: Configures health checking for VM instances. Unhealthy
2026	// instances are stopped and replaced with new instances. Only
2027	// applicable for VM runtimes. Only returned in `GET` requests if
2028	// `view=FULL` is set.
2029	HealthCheck *HealthCheck `json:"healthCheck,omitempty"`
2030
2031	// Id: Relative name of the version within the service. Example: `v1`.
2032	// Version names can contain only lowercase letters, numbers, or
2033	// hyphens. Reserved names: "default", "latest", and any name with the
2034	// prefix "ah-".
2035	Id string `json:"id,omitempty"`
2036
2037	// InboundServices: Before an application can receive email or XMPP
2038	// messages, the application must be configured to enable the service.
2039	//
2040	// Possible values:
2041	//   "INBOUND_SERVICE_UNSPECIFIED" - Not specified.
2042	//   "INBOUND_SERVICE_MAIL" - Allows an application to receive mail.
2043	//   "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive
2044	// email-bound notifications.
2045	//   "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive
2046	// error stanzas.
2047	//   "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive
2048	// instant messages.
2049	//   "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive
2050	// user subscription POSTs.
2051	//   "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive
2052	// a user's chat presence.
2053	//   "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for
2054	// notifications when a client connects or disconnects from a channel.
2055	//   "INBOUND_SERVICE_WARMUP" - Enables warmup requests.
2056	InboundServices []string `json:"inboundServices,omitempty"`
2057
2058	// InstanceClass: Instance class that is used to run this version. Valid
2059	// values are: * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G` *
2060	// ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
2061	// Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
2062	// BasicScaling.
2063	InstanceClass string `json:"instanceClass,omitempty"`
2064
2065	// Libraries: Configuration for third-party Python runtime libraries
2066	// that are required by the application. Only returned in `GET` requests
2067	// if `view=FULL` is set.
2068	Libraries []*Library `json:"libraries,omitempty"`
2069
2070	// ManualScaling: A service with manual scaling runs continuously,
2071	// allowing you to perform complex initialization and rely on the state
2072	// of its memory over time.
2073	ManualScaling *ManualScaling `json:"manualScaling,omitempty"`
2074
2075	// Name: Full path to the Version resource in the API. Example:
2076	// `apps/myapp/services/default/versions/v1`. @OutputOnly
2077	Name string `json:"name,omitempty"`
2078
2079	// Network: Extra network settings. Only applicable for VM runtimes.
2080	Network *Network `json:"network,omitempty"`
2081
2082	// NobuildFilesRegex: Files that match this pattern will not be built
2083	// into this version. Only applicable for Go runtimes. Only returned in
2084	// `GET` requests if `view=FULL` is set.
2085	NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"`
2086
2087	// Resources: Machine resources for this version. Only applicable for VM
2088	// runtimes.
2089	Resources *Resources `json:"resources,omitempty"`
2090
2091	// Runtime: Desired runtime. Example: `python27`.
2092	Runtime string `json:"runtime,omitempty"`
2093
2094	// ServingStatus: Current serving status of this version. Only the
2095	// versions with a `SERVING` status create instances and can be billed.
2096	// `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to
2097	// `SERVING`.
2098	//
2099	// Possible values:
2100	//   "SERVING_STATUS_UNSPECIFIED"
2101	//   "SERVING"
2102	//   "STOPPED"
2103	ServingStatus string `json:"servingStatus,omitempty"`
2104
2105	// Threadsafe: Whether multiple requests can be dispatched to this
2106	// version at once.
2107	Threadsafe bool `json:"threadsafe,omitempty"`
2108
2109	// VersionUrl: Serving URL for this version. Example:
2110	// "https://myversion-dot-myservice-dot-myapp.appspot.com" @OutputOnly
2111	VersionUrl string `json:"versionUrl,omitempty"`
2112
2113	// Vm: Whether to deploy this version in a container on a virtual
2114	// machine.
2115	Vm bool `json:"vm,omitempty"`
2116
2117	// ServerResponse contains the HTTP response code and headers from the
2118	// server.
2119	googleapi.ServerResponse `json:"-"`
2120
2121	// ForceSendFields is a list of field names (e.g. "ApiConfig") to
2122	// unconditionally include in API requests. By default, fields with
2123	// empty values are omitted from API requests. However, any non-pointer,
2124	// non-interface field appearing in ForceSendFields will be sent to the
2125	// server regardless of whether the field is empty or not. This may be
2126	// used to include empty fields in Patch requests.
2127	ForceSendFields []string `json:"-"`
2128
2129	// NullFields is a list of field names (e.g. "ApiConfig") to include in
2130	// API requests with the JSON null value. By default, fields with empty
2131	// values are omitted from API requests. However, any field with an
2132	// empty value appearing in NullFields will be sent to the server as
2133	// null. It is an error if a field in this list has a non-empty value.
2134	// This may be used to include null fields in Patch requests.
2135	NullFields []string `json:"-"`
2136}
2137
2138func (s *Version) MarshalJSON() ([]byte, error) {
2139	type NoMethod Version
2140	raw := NoMethod(*s)
2141	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2142}
2143
2144type ZipInfo struct {
2145	// FilesCount: An estimate of the number of files in a zip for a zip
2146	// deployment. If set, must be greater than or equal to the actual
2147	// number of files. Used for optimizing performance; if not provided,
2148	// deployment may be slow.
2149	FilesCount int64 `json:"filesCount,omitempty"`
2150
2151	// SourceUrl: URL of the zip file to deploy from. Must be a URL to a
2152	// resource in Google Cloud Storage in the form
2153	// 'http(s)://storage.googleapis.com/\/\'.
2154	SourceUrl string `json:"sourceUrl,omitempty"`
2155
2156	// ForceSendFields is a list of field names (e.g. "FilesCount") to
2157	// unconditionally include in API requests. By default, fields with
2158	// empty values are omitted from API requests. However, any non-pointer,
2159	// non-interface field appearing in ForceSendFields will be sent to the
2160	// server regardless of whether the field is empty or not. This may be
2161	// used to include empty fields in Patch requests.
2162	ForceSendFields []string `json:"-"`
2163
2164	// NullFields is a list of field names (e.g. "FilesCount") to include in
2165	// API requests with the JSON null value. By default, fields with empty
2166	// values are omitted from API requests. However, any field with an
2167	// empty value appearing in NullFields will be sent to the server as
2168	// null. It is an error if a field in this list has a non-empty value.
2169	// This may be used to include null fields in Patch requests.
2170	NullFields []string `json:"-"`
2171}
2172
2173func (s *ZipInfo) MarshalJSON() ([]byte, error) {
2174	type NoMethod ZipInfo
2175	raw := NoMethod(*s)
2176	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2177}
2178
2179// method id "appengine.apps.get":
2180
2181type AppsGetCall struct {
2182	s            *APIService
2183	appsId       string
2184	urlParams_   gensupport.URLParams
2185	ifNoneMatch_ string
2186	ctx_         context.Context
2187	header_      http.Header
2188}
2189
2190// Get: Gets information about an application.
2191func (r *AppsService) Get(appsId string) *AppsGetCall {
2192	c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2193	c.appsId = appsId
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 *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall {
2201	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2202	return c
2203}
2204
2205// IfNoneMatch sets the optional parameter which makes the operation
2206// fail if the object's ETag matches the given value. This is useful for
2207// getting updates only after the object has changed since the last
2208// request. Use googleapi.IsNotModified to check whether the response
2209// error from Do is the result of In-None-Match.
2210func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall {
2211	c.ifNoneMatch_ = entityTag
2212	return c
2213}
2214
2215// Context sets the context to be used in this call's Do method. Any
2216// pending HTTP request will be aborted if the provided context is
2217// canceled.
2218func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
2219	c.ctx_ = ctx
2220	return c
2221}
2222
2223// Header returns an http.Header that can be modified by the caller to
2224// add HTTP headers to the request.
2225func (c *AppsGetCall) Header() http.Header {
2226	if c.header_ == nil {
2227		c.header_ = make(http.Header)
2228	}
2229	return c.header_
2230}
2231
2232func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
2233	reqHeaders := make(http.Header)
2234	for k, v := range c.header_ {
2235		reqHeaders[k] = v
2236	}
2237	reqHeaders.Set("User-Agent", c.s.userAgent())
2238	if c.ifNoneMatch_ != "" {
2239		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2240	}
2241	var body io.Reader = nil
2242	c.urlParams_.Set("alt", alt)
2243	c.urlParams_.Set("prettyPrint", "false")
2244	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}")
2245	urls += "?" + c.urlParams_.Encode()
2246	req, err := http.NewRequest("GET", urls, body)
2247	if err != nil {
2248		return nil, err
2249	}
2250	req.Header = reqHeaders
2251	googleapi.Expand(req.URL, map[string]string{
2252		"appsId": c.appsId,
2253	})
2254	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2255}
2256
2257// Do executes the "appengine.apps.get" call.
2258// Exactly one of *Application or error will be non-nil. Any non-2xx
2259// status code is an error. Response headers are in either
2260// *Application.ServerResponse.Header or (if a response was returned at
2261// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2262// to check whether the returned error was because
2263// http.StatusNotModified was returned.
2264func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) {
2265	gensupport.SetOptions(c.urlParams_, opts...)
2266	res, err := c.doRequest("json")
2267	if res != nil && res.StatusCode == http.StatusNotModified {
2268		if res.Body != nil {
2269			res.Body.Close()
2270		}
2271		return nil, &googleapi.Error{
2272			Code:   res.StatusCode,
2273			Header: res.Header,
2274		}
2275	}
2276	if err != nil {
2277		return nil, err
2278	}
2279	defer googleapi.CloseBody(res)
2280	if err := googleapi.CheckResponse(res); err != nil {
2281		return nil, err
2282	}
2283	ret := &Application{
2284		ServerResponse: googleapi.ServerResponse{
2285			Header:         res.Header,
2286			HTTPStatusCode: res.StatusCode,
2287		},
2288	}
2289	target := &ret
2290	if err := gensupport.DecodeResponse(target, res); err != nil {
2291		return nil, err
2292	}
2293	return ret, nil
2294	// {
2295	//   "description": "Gets information about an application.",
2296	//   "httpMethod": "GET",
2297	//   "id": "appengine.apps.get",
2298	//   "parameterOrder": [
2299	//     "appsId"
2300	//   ],
2301	//   "parameters": {
2302	//     "appsId": {
2303	//       "description": "Part of `name`. Name of the Application resource to get. Example: `apps/myapp`.",
2304	//       "location": "path",
2305	//       "required": true,
2306	//       "type": "string"
2307	//     }
2308	//   },
2309	//   "path": "v1/apps/{appsId}",
2310	//   "response": {
2311	//     "$ref": "Application"
2312	//   },
2313	//   "scopes": [
2314	//     "https://www.googleapis.com/auth/cloud-platform"
2315	//   ]
2316	// }
2317
2318}
2319
2320// method id "appengine.apps.repair":
2321
2322type AppsRepairCall struct {
2323	s                        *APIService
2324	appsId                   string
2325	repairapplicationrequest *RepairApplicationRequest
2326	urlParams_               gensupport.URLParams
2327	ctx_                     context.Context
2328	header_                  http.Header
2329}
2330
2331// Repair: Recreates the required App Engine features for the
2332// application in your project, for example a Cloud Storage bucket or
2333// App Engine service account. Use this method if you receive an error
2334// message about a missing feature, for example "*Error retrieving the
2335// App Engine service account*".
2336func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall {
2337	c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2338	c.appsId = appsId
2339	c.repairapplicationrequest = repairapplicationrequest
2340	return c
2341}
2342
2343// Fields allows partial responses to be retrieved. See
2344// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2345// for more information.
2346func (c *AppsRepairCall) Fields(s ...googleapi.Field) *AppsRepairCall {
2347	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2348	return c
2349}
2350
2351// Context sets the context to be used in this call's Do method. Any
2352// pending HTTP request will be aborted if the provided context is
2353// canceled.
2354func (c *AppsRepairCall) Context(ctx context.Context) *AppsRepairCall {
2355	c.ctx_ = ctx
2356	return c
2357}
2358
2359// Header returns an http.Header that can be modified by the caller to
2360// add HTTP headers to the request.
2361func (c *AppsRepairCall) Header() http.Header {
2362	if c.header_ == nil {
2363		c.header_ = make(http.Header)
2364	}
2365	return c.header_
2366}
2367
2368func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) {
2369	reqHeaders := make(http.Header)
2370	for k, v := range c.header_ {
2371		reqHeaders[k] = v
2372	}
2373	reqHeaders.Set("User-Agent", c.s.userAgent())
2374	var body io.Reader = nil
2375	body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairapplicationrequest)
2376	if err != nil {
2377		return nil, err
2378	}
2379	reqHeaders.Set("Content-Type", "application/json")
2380	c.urlParams_.Set("alt", alt)
2381	c.urlParams_.Set("prettyPrint", "false")
2382	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}:repair")
2383	urls += "?" + c.urlParams_.Encode()
2384	req, err := http.NewRequest("POST", urls, body)
2385	if err != nil {
2386		return nil, err
2387	}
2388	req.Header = reqHeaders
2389	googleapi.Expand(req.URL, map[string]string{
2390		"appsId": c.appsId,
2391	})
2392	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2393}
2394
2395// Do executes the "appengine.apps.repair" call.
2396// Exactly one of *Operation or error will be non-nil. Any non-2xx
2397// status code is an error. Response headers are in either
2398// *Operation.ServerResponse.Header or (if a response was returned at
2399// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2400// to check whether the returned error was because
2401// http.StatusNotModified was returned.
2402func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2403	gensupport.SetOptions(c.urlParams_, opts...)
2404	res, err := c.doRequest("json")
2405	if res != nil && res.StatusCode == http.StatusNotModified {
2406		if res.Body != nil {
2407			res.Body.Close()
2408		}
2409		return nil, &googleapi.Error{
2410			Code:   res.StatusCode,
2411			Header: res.Header,
2412		}
2413	}
2414	if err != nil {
2415		return nil, err
2416	}
2417	defer googleapi.CloseBody(res)
2418	if err := googleapi.CheckResponse(res); err != nil {
2419		return nil, err
2420	}
2421	ret := &Operation{
2422		ServerResponse: googleapi.ServerResponse{
2423			Header:         res.Header,
2424			HTTPStatusCode: res.StatusCode,
2425		},
2426	}
2427	target := &ret
2428	if err := gensupport.DecodeResponse(target, res); err != nil {
2429		return nil, err
2430	}
2431	return ret, nil
2432	// {
2433	//   "description": "Recreates the required App Engine features for the application in your project, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example \"*Error retrieving the App Engine service account*\".",
2434	//   "httpMethod": "POST",
2435	//   "id": "appengine.apps.repair",
2436	//   "parameterOrder": [
2437	//     "appsId"
2438	//   ],
2439	//   "parameters": {
2440	//     "appsId": {
2441	//       "description": "Part of `name`. Name of the application to repair. Example: `apps/myapp`",
2442	//       "location": "path",
2443	//       "required": true,
2444	//       "type": "string"
2445	//     }
2446	//   },
2447	//   "path": "v1/apps/{appsId}:repair",
2448	//   "request": {
2449	//     "$ref": "RepairApplicationRequest"
2450	//   },
2451	//   "response": {
2452	//     "$ref": "Operation"
2453	//   },
2454	//   "scopes": [
2455	//     "https://www.googleapis.com/auth/cloud-platform"
2456	//   ]
2457	// }
2458
2459}
2460
2461// method id "appengine.apps.locations.get":
2462
2463type AppsLocationsGetCall struct {
2464	s            *APIService
2465	appsId       string
2466	locationsId  string
2467	urlParams_   gensupport.URLParams
2468	ifNoneMatch_ string
2469	ctx_         context.Context
2470	header_      http.Header
2471}
2472
2473// Get: Get information about a location.
2474func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall {
2475	c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2476	c.appsId = appsId
2477	c.locationsId = locationsId
2478	return c
2479}
2480
2481// Fields allows partial responses to be retrieved. See
2482// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2483// for more information.
2484func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall {
2485	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2486	return c
2487}
2488
2489// IfNoneMatch sets the optional parameter which makes the operation
2490// fail if the object's ETag matches the given value. This is useful for
2491// getting updates only after the object has changed since the last
2492// request. Use googleapi.IsNotModified to check whether the response
2493// error from Do is the result of In-None-Match.
2494func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall {
2495	c.ifNoneMatch_ = entityTag
2496	return c
2497}
2498
2499// Context sets the context to be used in this call's Do method. Any
2500// pending HTTP request will be aborted if the provided context is
2501// canceled.
2502func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall {
2503	c.ctx_ = ctx
2504	return c
2505}
2506
2507// Header returns an http.Header that can be modified by the caller to
2508// add HTTP headers to the request.
2509func (c *AppsLocationsGetCall) Header() http.Header {
2510	if c.header_ == nil {
2511		c.header_ = make(http.Header)
2512	}
2513	return c.header_
2514}
2515
2516func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2517	reqHeaders := make(http.Header)
2518	for k, v := range c.header_ {
2519		reqHeaders[k] = v
2520	}
2521	reqHeaders.Set("User-Agent", c.s.userAgent())
2522	if c.ifNoneMatch_ != "" {
2523		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2524	}
2525	var body io.Reader = nil
2526	c.urlParams_.Set("alt", alt)
2527	c.urlParams_.Set("prettyPrint", "false")
2528	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations/{locationsId}")
2529	urls += "?" + c.urlParams_.Encode()
2530	req, err := http.NewRequest("GET", urls, body)
2531	if err != nil {
2532		return nil, err
2533	}
2534	req.Header = reqHeaders
2535	googleapi.Expand(req.URL, map[string]string{
2536		"appsId":      c.appsId,
2537		"locationsId": c.locationsId,
2538	})
2539	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2540}
2541
2542// Do executes the "appengine.apps.locations.get" call.
2543// Exactly one of *Location or error will be non-nil. Any non-2xx status
2544// code is an error. Response headers are in either
2545// *Location.ServerResponse.Header or (if a response was returned at
2546// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2547// to check whether the returned error was because
2548// http.StatusNotModified was returned.
2549func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2550	gensupport.SetOptions(c.urlParams_, opts...)
2551	res, err := c.doRequest("json")
2552	if res != nil && res.StatusCode == http.StatusNotModified {
2553		if res.Body != nil {
2554			res.Body.Close()
2555		}
2556		return nil, &googleapi.Error{
2557			Code:   res.StatusCode,
2558			Header: res.Header,
2559		}
2560	}
2561	if err != nil {
2562		return nil, err
2563	}
2564	defer googleapi.CloseBody(res)
2565	if err := googleapi.CheckResponse(res); err != nil {
2566		return nil, err
2567	}
2568	ret := &Location{
2569		ServerResponse: googleapi.ServerResponse{
2570			Header:         res.Header,
2571			HTTPStatusCode: res.StatusCode,
2572		},
2573	}
2574	target := &ret
2575	if err := gensupport.DecodeResponse(target, res); err != nil {
2576		return nil, err
2577	}
2578	return ret, nil
2579	// {
2580	//   "description": "Get information about a location.",
2581	//   "httpMethod": "GET",
2582	//   "id": "appengine.apps.locations.get",
2583	//   "parameterOrder": [
2584	//     "appsId",
2585	//     "locationsId"
2586	//   ],
2587	//   "parameters": {
2588	//     "appsId": {
2589	//       "description": "Part of `name`. Resource name for the location.",
2590	//       "location": "path",
2591	//       "required": true,
2592	//       "type": "string"
2593	//     },
2594	//     "locationsId": {
2595	//       "description": "Part of `name`. See documentation of `appsId`.",
2596	//       "location": "path",
2597	//       "required": true,
2598	//       "type": "string"
2599	//     }
2600	//   },
2601	//   "path": "v1/apps/{appsId}/locations/{locationsId}",
2602	//   "response": {
2603	//     "$ref": "Location"
2604	//   },
2605	//   "scopes": [
2606	//     "https://www.googleapis.com/auth/cloud-platform"
2607	//   ]
2608	// }
2609
2610}
2611
2612// method id "appengine.apps.locations.list":
2613
2614type AppsLocationsListCall struct {
2615	s            *APIService
2616	appsId       string
2617	urlParams_   gensupport.URLParams
2618	ifNoneMatch_ string
2619	ctx_         context.Context
2620	header_      http.Header
2621}
2622
2623// List: Lists information about the supported locations for this
2624// service.
2625func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall {
2626	c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2627	c.appsId = appsId
2628	return c
2629}
2630
2631// Filter sets the optional parameter "filter": The standard list
2632// filter.
2633func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall {
2634	c.urlParams_.Set("filter", filter)
2635	return c
2636}
2637
2638// PageSize sets the optional parameter "pageSize": The standard list
2639// page size.
2640func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall {
2641	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2642	return c
2643}
2644
2645// PageToken sets the optional parameter "pageToken": The standard list
2646// page token.
2647func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall {
2648	c.urlParams_.Set("pageToken", pageToken)
2649	return c
2650}
2651
2652// Fields allows partial responses to be retrieved. See
2653// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2654// for more information.
2655func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall {
2656	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2657	return c
2658}
2659
2660// IfNoneMatch sets the optional parameter which makes the operation
2661// fail if the object's ETag matches the given value. This is useful for
2662// getting updates only after the object has changed since the last
2663// request. Use googleapi.IsNotModified to check whether the response
2664// error from Do is the result of In-None-Match.
2665func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall {
2666	c.ifNoneMatch_ = entityTag
2667	return c
2668}
2669
2670// Context sets the context to be used in this call's Do method. Any
2671// pending HTTP request will be aborted if the provided context is
2672// canceled.
2673func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall {
2674	c.ctx_ = ctx
2675	return c
2676}
2677
2678// Header returns an http.Header that can be modified by the caller to
2679// add HTTP headers to the request.
2680func (c *AppsLocationsListCall) Header() http.Header {
2681	if c.header_ == nil {
2682		c.header_ = make(http.Header)
2683	}
2684	return c.header_
2685}
2686
2687func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2688	reqHeaders := make(http.Header)
2689	for k, v := range c.header_ {
2690		reqHeaders[k] = v
2691	}
2692	reqHeaders.Set("User-Agent", c.s.userAgent())
2693	if c.ifNoneMatch_ != "" {
2694		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2695	}
2696	var body io.Reader = nil
2697	c.urlParams_.Set("alt", alt)
2698	c.urlParams_.Set("prettyPrint", "false")
2699	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations")
2700	urls += "?" + c.urlParams_.Encode()
2701	req, err := http.NewRequest("GET", urls, body)
2702	if err != nil {
2703		return nil, err
2704	}
2705	req.Header = reqHeaders
2706	googleapi.Expand(req.URL, map[string]string{
2707		"appsId": c.appsId,
2708	})
2709	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2710}
2711
2712// Do executes the "appengine.apps.locations.list" call.
2713// Exactly one of *ListLocationsResponse or error will be non-nil. Any
2714// non-2xx status code is an error. Response headers are in either
2715// *ListLocationsResponse.ServerResponse.Header or (if a response was
2716// returned at all) in error.(*googleapi.Error).Header. Use
2717// googleapi.IsNotModified to check whether the returned error was
2718// because http.StatusNotModified was returned.
2719func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2720	gensupport.SetOptions(c.urlParams_, opts...)
2721	res, err := c.doRequest("json")
2722	if res != nil && res.StatusCode == http.StatusNotModified {
2723		if res.Body != nil {
2724			res.Body.Close()
2725		}
2726		return nil, &googleapi.Error{
2727			Code:   res.StatusCode,
2728			Header: res.Header,
2729		}
2730	}
2731	if err != nil {
2732		return nil, err
2733	}
2734	defer googleapi.CloseBody(res)
2735	if err := googleapi.CheckResponse(res); err != nil {
2736		return nil, err
2737	}
2738	ret := &ListLocationsResponse{
2739		ServerResponse: googleapi.ServerResponse{
2740			Header:         res.Header,
2741			HTTPStatusCode: res.StatusCode,
2742		},
2743	}
2744	target := &ret
2745	if err := gensupport.DecodeResponse(target, res); err != nil {
2746		return nil, err
2747	}
2748	return ret, nil
2749	// {
2750	//   "description": "Lists information about the supported locations for this service.",
2751	//   "httpMethod": "GET",
2752	//   "id": "appengine.apps.locations.list",
2753	//   "parameterOrder": [
2754	//     "appsId"
2755	//   ],
2756	//   "parameters": {
2757	//     "appsId": {
2758	//       "description": "Part of `name`. The resource that owns the locations collection, if applicable.",
2759	//       "location": "path",
2760	//       "required": true,
2761	//       "type": "string"
2762	//     },
2763	//     "filter": {
2764	//       "description": "The standard list filter.",
2765	//       "location": "query",
2766	//       "type": "string"
2767	//     },
2768	//     "pageSize": {
2769	//       "description": "The standard list page size.",
2770	//       "format": "int32",
2771	//       "location": "query",
2772	//       "type": "integer"
2773	//     },
2774	//     "pageToken": {
2775	//       "description": "The standard list page token.",
2776	//       "location": "query",
2777	//       "type": "string"
2778	//     }
2779	//   },
2780	//   "path": "v1/apps/{appsId}/locations",
2781	//   "response": {
2782	//     "$ref": "ListLocationsResponse"
2783	//   },
2784	//   "scopes": [
2785	//     "https://www.googleapis.com/auth/cloud-platform"
2786	//   ]
2787	// }
2788
2789}
2790
2791// Pages invokes f for each page of results.
2792// A non-nil error returned from f will halt the iteration.
2793// The provided context supersedes any context provided to the Context method.
2794func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2795	c.ctx_ = ctx
2796	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2797	for {
2798		x, err := c.Do()
2799		if err != nil {
2800			return err
2801		}
2802		if err := f(x); err != nil {
2803			return err
2804		}
2805		if x.NextPageToken == "" {
2806			return nil
2807		}
2808		c.PageToken(x.NextPageToken)
2809	}
2810}
2811
2812// method id "appengine.apps.operations.get":
2813
2814type AppsOperationsGetCall struct {
2815	s            *APIService
2816	appsId       string
2817	operationsId string
2818	urlParams_   gensupport.URLParams
2819	ifNoneMatch_ string
2820	ctx_         context.Context
2821	header_      http.Header
2822}
2823
2824// Get: Gets the latest state of a long-running operation. Clients can
2825// use this method to poll the operation result at intervals as
2826// recommended by the API service.
2827func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall {
2828	c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2829	c.appsId = appsId
2830	c.operationsId = operationsId
2831	return c
2832}
2833
2834// Fields allows partial responses to be retrieved. See
2835// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2836// for more information.
2837func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall {
2838	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2839	return c
2840}
2841
2842// IfNoneMatch sets the optional parameter which makes the operation
2843// fail if the object's ETag matches the given value. This is useful for
2844// getting updates only after the object has changed since the last
2845// request. Use googleapi.IsNotModified to check whether the response
2846// error from Do is the result of In-None-Match.
2847func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall {
2848	c.ifNoneMatch_ = entityTag
2849	return c
2850}
2851
2852// Context sets the context to be used in this call's Do method. Any
2853// pending HTTP request will be aborted if the provided context is
2854// canceled.
2855func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
2856	c.ctx_ = ctx
2857	return c
2858}
2859
2860// Header returns an http.Header that can be modified by the caller to
2861// add HTTP headers to the request.
2862func (c *AppsOperationsGetCall) Header() http.Header {
2863	if c.header_ == nil {
2864		c.header_ = make(http.Header)
2865	}
2866	return c.header_
2867}
2868
2869func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
2870	reqHeaders := make(http.Header)
2871	for k, v := range c.header_ {
2872		reqHeaders[k] = v
2873	}
2874	reqHeaders.Set("User-Agent", c.s.userAgent())
2875	if c.ifNoneMatch_ != "" {
2876		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2877	}
2878	var body io.Reader = nil
2879	c.urlParams_.Set("alt", alt)
2880	c.urlParams_.Set("prettyPrint", "false")
2881	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations/{operationsId}")
2882	urls += "?" + c.urlParams_.Encode()
2883	req, err := http.NewRequest("GET", urls, body)
2884	if err != nil {
2885		return nil, err
2886	}
2887	req.Header = reqHeaders
2888	googleapi.Expand(req.URL, map[string]string{
2889		"appsId":       c.appsId,
2890		"operationsId": c.operationsId,
2891	})
2892	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2893}
2894
2895// Do executes the "appengine.apps.operations.get" call.
2896// Exactly one of *Operation or error will be non-nil. Any non-2xx
2897// status code is an error. Response headers are in either
2898// *Operation.ServerResponse.Header or (if a response was returned at
2899// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2900// to check whether the returned error was because
2901// http.StatusNotModified was returned.
2902func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2903	gensupport.SetOptions(c.urlParams_, opts...)
2904	res, err := c.doRequest("json")
2905	if res != nil && res.StatusCode == http.StatusNotModified {
2906		if res.Body != nil {
2907			res.Body.Close()
2908		}
2909		return nil, &googleapi.Error{
2910			Code:   res.StatusCode,
2911			Header: res.Header,
2912		}
2913	}
2914	if err != nil {
2915		return nil, err
2916	}
2917	defer googleapi.CloseBody(res)
2918	if err := googleapi.CheckResponse(res); err != nil {
2919		return nil, err
2920	}
2921	ret := &Operation{
2922		ServerResponse: googleapi.ServerResponse{
2923			Header:         res.Header,
2924			HTTPStatusCode: res.StatusCode,
2925		},
2926	}
2927	target := &ret
2928	if err := gensupport.DecodeResponse(target, res); err != nil {
2929		return nil, err
2930	}
2931	return ret, nil
2932	// {
2933	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
2934	//   "httpMethod": "GET",
2935	//   "id": "appengine.apps.operations.get",
2936	//   "parameterOrder": [
2937	//     "appsId",
2938	//     "operationsId"
2939	//   ],
2940	//   "parameters": {
2941	//     "appsId": {
2942	//       "description": "Part of `name`. The name of the operation resource.",
2943	//       "location": "path",
2944	//       "required": true,
2945	//       "type": "string"
2946	//     },
2947	//     "operationsId": {
2948	//       "description": "Part of `name`. See documentation of `appsId`.",
2949	//       "location": "path",
2950	//       "required": true,
2951	//       "type": "string"
2952	//     }
2953	//   },
2954	//   "path": "v1/apps/{appsId}/operations/{operationsId}",
2955	//   "response": {
2956	//     "$ref": "Operation"
2957	//   },
2958	//   "scopes": [
2959	//     "https://www.googleapis.com/auth/cloud-platform"
2960	//   ]
2961	// }
2962
2963}
2964
2965// method id "appengine.apps.operations.list":
2966
2967type AppsOperationsListCall struct {
2968	s            *APIService
2969	appsId       string
2970	urlParams_   gensupport.URLParams
2971	ifNoneMatch_ string
2972	ctx_         context.Context
2973	header_      http.Header
2974}
2975
2976// List: Lists operations that match the specified filter in the
2977// request. If the server doesn't support this method, it returns
2978// `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services
2979// to override the binding to use different resource name schemes, such
2980// as `users/*/operations`.
2981func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall {
2982	c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2983	c.appsId = appsId
2984	return c
2985}
2986
2987// Filter sets the optional parameter "filter": The standard list
2988// filter.
2989func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall {
2990	c.urlParams_.Set("filter", filter)
2991	return c
2992}
2993
2994// PageSize sets the optional parameter "pageSize": The standard list
2995// page size.
2996func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall {
2997	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2998	return c
2999}
3000
3001// PageToken sets the optional parameter "pageToken": The standard list
3002// page token.
3003func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall {
3004	c.urlParams_.Set("pageToken", pageToken)
3005	return c
3006}
3007
3008// Fields allows partial responses to be retrieved. See
3009// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3010// for more information.
3011func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall {
3012	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3013	return c
3014}
3015
3016// IfNoneMatch sets the optional parameter which makes the operation
3017// fail if the object's ETag matches the given value. This is useful for
3018// getting updates only after the object has changed since the last
3019// request. Use googleapi.IsNotModified to check whether the response
3020// error from Do is the result of In-None-Match.
3021func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall {
3022	c.ifNoneMatch_ = entityTag
3023	return c
3024}
3025
3026// Context sets the context to be used in this call's Do method. Any
3027// pending HTTP request will be aborted if the provided context is
3028// canceled.
3029func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
3030	c.ctx_ = ctx
3031	return c
3032}
3033
3034// Header returns an http.Header that can be modified by the caller to
3035// add HTTP headers to the request.
3036func (c *AppsOperationsListCall) Header() http.Header {
3037	if c.header_ == nil {
3038		c.header_ = make(http.Header)
3039	}
3040	return c.header_
3041}
3042
3043func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
3044	reqHeaders := make(http.Header)
3045	for k, v := range c.header_ {
3046		reqHeaders[k] = v
3047	}
3048	reqHeaders.Set("User-Agent", c.s.userAgent())
3049	if c.ifNoneMatch_ != "" {
3050		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3051	}
3052	var body io.Reader = nil
3053	c.urlParams_.Set("alt", alt)
3054	c.urlParams_.Set("prettyPrint", "false")
3055	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations")
3056	urls += "?" + c.urlParams_.Encode()
3057	req, err := http.NewRequest("GET", urls, body)
3058	if err != nil {
3059		return nil, err
3060	}
3061	req.Header = reqHeaders
3062	googleapi.Expand(req.URL, map[string]string{
3063		"appsId": c.appsId,
3064	})
3065	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3066}
3067
3068// Do executes the "appengine.apps.operations.list" call.
3069// Exactly one of *ListOperationsResponse or error will be non-nil. Any
3070// non-2xx status code is an error. Response headers are in either
3071// *ListOperationsResponse.ServerResponse.Header or (if a response was
3072// returned at all) in error.(*googleapi.Error).Header. Use
3073// googleapi.IsNotModified to check whether the returned error was
3074// because http.StatusNotModified was returned.
3075func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
3076	gensupport.SetOptions(c.urlParams_, opts...)
3077	res, err := c.doRequest("json")
3078	if res != nil && res.StatusCode == http.StatusNotModified {
3079		if res.Body != nil {
3080			res.Body.Close()
3081		}
3082		return nil, &googleapi.Error{
3083			Code:   res.StatusCode,
3084			Header: res.Header,
3085		}
3086	}
3087	if err != nil {
3088		return nil, err
3089	}
3090	defer googleapi.CloseBody(res)
3091	if err := googleapi.CheckResponse(res); err != nil {
3092		return nil, err
3093	}
3094	ret := &ListOperationsResponse{
3095		ServerResponse: googleapi.ServerResponse{
3096			Header:         res.Header,
3097			HTTPStatusCode: res.StatusCode,
3098		},
3099	}
3100	target := &ret
3101	if err := gensupport.DecodeResponse(target, res); err != nil {
3102		return nil, err
3103	}
3104	return ret, nil
3105	// {
3106	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding below allows API services to override the binding to use different resource name schemes, such as `users/*/operations`.",
3107	//   "httpMethod": "GET",
3108	//   "id": "appengine.apps.operations.list",
3109	//   "parameterOrder": [
3110	//     "appsId"
3111	//   ],
3112	//   "parameters": {
3113	//     "appsId": {
3114	//       "description": "Part of `name`. The name of the operation collection.",
3115	//       "location": "path",
3116	//       "required": true,
3117	//       "type": "string"
3118	//     },
3119	//     "filter": {
3120	//       "description": "The standard list filter.",
3121	//       "location": "query",
3122	//       "type": "string"
3123	//     },
3124	//     "pageSize": {
3125	//       "description": "The standard list page size.",
3126	//       "format": "int32",
3127	//       "location": "query",
3128	//       "type": "integer"
3129	//     },
3130	//     "pageToken": {
3131	//       "description": "The standard list page token.",
3132	//       "location": "query",
3133	//       "type": "string"
3134	//     }
3135	//   },
3136	//   "path": "v1/apps/{appsId}/operations",
3137	//   "response": {
3138	//     "$ref": "ListOperationsResponse"
3139	//   },
3140	//   "scopes": [
3141	//     "https://www.googleapis.com/auth/cloud-platform"
3142	//   ]
3143	// }
3144
3145}
3146
3147// Pages invokes f for each page of results.
3148// A non-nil error returned from f will halt the iteration.
3149// The provided context supersedes any context provided to the Context method.
3150func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
3151	c.ctx_ = ctx
3152	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3153	for {
3154		x, err := c.Do()
3155		if err != nil {
3156			return err
3157		}
3158		if err := f(x); err != nil {
3159			return err
3160		}
3161		if x.NextPageToken == "" {
3162			return nil
3163		}
3164		c.PageToken(x.NextPageToken)
3165	}
3166}
3167
3168// method id "appengine.apps.services.delete":
3169
3170type AppsServicesDeleteCall struct {
3171	s          *APIService
3172	appsId     string
3173	servicesId string
3174	urlParams_ gensupport.URLParams
3175	ctx_       context.Context
3176	header_    http.Header
3177}
3178
3179// Delete: Deletes the specified service and all enclosed versions.
3180func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall {
3181	c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3182	c.appsId = appsId
3183	c.servicesId = servicesId
3184	return c
3185}
3186
3187// Fields allows partial responses to be retrieved. See
3188// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3189// for more information.
3190func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall {
3191	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3192	return c
3193}
3194
3195// Context sets the context to be used in this call's Do method. Any
3196// pending HTTP request will be aborted if the provided context is
3197// canceled.
3198func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall {
3199	c.ctx_ = ctx
3200	return c
3201}
3202
3203// Header returns an http.Header that can be modified by the caller to
3204// add HTTP headers to the request.
3205func (c *AppsServicesDeleteCall) Header() http.Header {
3206	if c.header_ == nil {
3207		c.header_ = make(http.Header)
3208	}
3209	return c.header_
3210}
3211
3212func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
3213	reqHeaders := make(http.Header)
3214	for k, v := range c.header_ {
3215		reqHeaders[k] = v
3216	}
3217	reqHeaders.Set("User-Agent", c.s.userAgent())
3218	var body io.Reader = nil
3219	c.urlParams_.Set("alt", alt)
3220	c.urlParams_.Set("prettyPrint", "false")
3221	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}")
3222	urls += "?" + c.urlParams_.Encode()
3223	req, err := http.NewRequest("DELETE", urls, body)
3224	if err != nil {
3225		return nil, err
3226	}
3227	req.Header = reqHeaders
3228	googleapi.Expand(req.URL, map[string]string{
3229		"appsId":     c.appsId,
3230		"servicesId": c.servicesId,
3231	})
3232	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3233}
3234
3235// Do executes the "appengine.apps.services.delete" call.
3236// Exactly one of *Operation or error will be non-nil. Any non-2xx
3237// status code is an error. Response headers are in either
3238// *Operation.ServerResponse.Header or (if a response was returned at
3239// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3240// to check whether the returned error was because
3241// http.StatusNotModified was returned.
3242func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3243	gensupport.SetOptions(c.urlParams_, opts...)
3244	res, err := c.doRequest("json")
3245	if res != nil && res.StatusCode == http.StatusNotModified {
3246		if res.Body != nil {
3247			res.Body.Close()
3248		}
3249		return nil, &googleapi.Error{
3250			Code:   res.StatusCode,
3251			Header: res.Header,
3252		}
3253	}
3254	if err != nil {
3255		return nil, err
3256	}
3257	defer googleapi.CloseBody(res)
3258	if err := googleapi.CheckResponse(res); err != nil {
3259		return nil, err
3260	}
3261	ret := &Operation{
3262		ServerResponse: googleapi.ServerResponse{
3263			Header:         res.Header,
3264			HTTPStatusCode: res.StatusCode,
3265		},
3266	}
3267	target := &ret
3268	if err := gensupport.DecodeResponse(target, res); err != nil {
3269		return nil, err
3270	}
3271	return ret, nil
3272	// {
3273	//   "description": "Deletes the specified service and all enclosed versions.",
3274	//   "httpMethod": "DELETE",
3275	//   "id": "appengine.apps.services.delete",
3276	//   "parameterOrder": [
3277	//     "appsId",
3278	//     "servicesId"
3279	//   ],
3280	//   "parameters": {
3281	//     "appsId": {
3282	//       "description": "Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`.",
3283	//       "location": "path",
3284	//       "required": true,
3285	//       "type": "string"
3286	//     },
3287	//     "servicesId": {
3288	//       "description": "Part of `name`. See documentation of `appsId`.",
3289	//       "location": "path",
3290	//       "required": true,
3291	//       "type": "string"
3292	//     }
3293	//   },
3294	//   "path": "v1/apps/{appsId}/services/{servicesId}",
3295	//   "response": {
3296	//     "$ref": "Operation"
3297	//   },
3298	//   "scopes": [
3299	//     "https://www.googleapis.com/auth/cloud-platform"
3300	//   ]
3301	// }
3302
3303}
3304
3305// method id "appengine.apps.services.get":
3306
3307type AppsServicesGetCall struct {
3308	s            *APIService
3309	appsId       string
3310	servicesId   string
3311	urlParams_   gensupport.URLParams
3312	ifNoneMatch_ string
3313	ctx_         context.Context
3314	header_      http.Header
3315}
3316
3317// Get: Gets the current configuration of the specified service.
3318func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall {
3319	c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3320	c.appsId = appsId
3321	c.servicesId = servicesId
3322	return c
3323}
3324
3325// Fields allows partial responses to be retrieved. See
3326// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3327// for more information.
3328func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall {
3329	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3330	return c
3331}
3332
3333// IfNoneMatch sets the optional parameter which makes the operation
3334// fail if the object's ETag matches the given value. This is useful for
3335// getting updates only after the object has changed since the last
3336// request. Use googleapi.IsNotModified to check whether the response
3337// error from Do is the result of In-None-Match.
3338func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall {
3339	c.ifNoneMatch_ = entityTag
3340	return c
3341}
3342
3343// Context sets the context to be used in this call's Do method. Any
3344// pending HTTP request will be aborted if the provided context is
3345// canceled.
3346func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall {
3347	c.ctx_ = ctx
3348	return c
3349}
3350
3351// Header returns an http.Header that can be modified by the caller to
3352// add HTTP headers to the request.
3353func (c *AppsServicesGetCall) Header() http.Header {
3354	if c.header_ == nil {
3355		c.header_ = make(http.Header)
3356	}
3357	return c.header_
3358}
3359
3360func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) {
3361	reqHeaders := make(http.Header)
3362	for k, v := range c.header_ {
3363		reqHeaders[k] = v
3364	}
3365	reqHeaders.Set("User-Agent", c.s.userAgent())
3366	if c.ifNoneMatch_ != "" {
3367		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3368	}
3369	var body io.Reader = nil
3370	c.urlParams_.Set("alt", alt)
3371	c.urlParams_.Set("prettyPrint", "false")
3372	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}")
3373	urls += "?" + c.urlParams_.Encode()
3374	req, err := http.NewRequest("GET", urls, body)
3375	if err != nil {
3376		return nil, err
3377	}
3378	req.Header = reqHeaders
3379	googleapi.Expand(req.URL, map[string]string{
3380		"appsId":     c.appsId,
3381		"servicesId": c.servicesId,
3382	})
3383	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3384}
3385
3386// Do executes the "appengine.apps.services.get" call.
3387// Exactly one of *Service or error will be non-nil. Any non-2xx status
3388// code is an error. Response headers are in either
3389// *Service.ServerResponse.Header or (if a response was returned at all)
3390// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3391// check whether the returned error was because http.StatusNotModified
3392// was returned.
3393func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
3394	gensupport.SetOptions(c.urlParams_, opts...)
3395	res, err := c.doRequest("json")
3396	if res != nil && res.StatusCode == http.StatusNotModified {
3397		if res.Body != nil {
3398			res.Body.Close()
3399		}
3400		return nil, &googleapi.Error{
3401			Code:   res.StatusCode,
3402			Header: res.Header,
3403		}
3404	}
3405	if err != nil {
3406		return nil, err
3407	}
3408	defer googleapi.CloseBody(res)
3409	if err := googleapi.CheckResponse(res); err != nil {
3410		return nil, err
3411	}
3412	ret := &Service{
3413		ServerResponse: googleapi.ServerResponse{
3414			Header:         res.Header,
3415			HTTPStatusCode: res.StatusCode,
3416		},
3417	}
3418	target := &ret
3419	if err := gensupport.DecodeResponse(target, res); err != nil {
3420		return nil, err
3421	}
3422	return ret, nil
3423	// {
3424	//   "description": "Gets the current configuration of the specified service.",
3425	//   "httpMethod": "GET",
3426	//   "id": "appengine.apps.services.get",
3427	//   "parameterOrder": [
3428	//     "appsId",
3429	//     "servicesId"
3430	//   ],
3431	//   "parameters": {
3432	//     "appsId": {
3433	//       "description": "Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`.",
3434	//       "location": "path",
3435	//       "required": true,
3436	//       "type": "string"
3437	//     },
3438	//     "servicesId": {
3439	//       "description": "Part of `name`. See documentation of `appsId`.",
3440	//       "location": "path",
3441	//       "required": true,
3442	//       "type": "string"
3443	//     }
3444	//   },
3445	//   "path": "v1/apps/{appsId}/services/{servicesId}",
3446	//   "response": {
3447	//     "$ref": "Service"
3448	//   },
3449	//   "scopes": [
3450	//     "https://www.googleapis.com/auth/cloud-platform"
3451	//   ]
3452	// }
3453
3454}
3455
3456// method id "appengine.apps.services.list":
3457
3458type AppsServicesListCall struct {
3459	s            *APIService
3460	appsId       string
3461	urlParams_   gensupport.URLParams
3462	ifNoneMatch_ string
3463	ctx_         context.Context
3464	header_      http.Header
3465}
3466
3467// List: Lists all the services in the application.
3468func (r *AppsServicesService) List(appsId string) *AppsServicesListCall {
3469	c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3470	c.appsId = appsId
3471	return c
3472}
3473
3474// PageSize sets the optional parameter "pageSize": Maximum results to
3475// return per page.
3476func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall {
3477	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3478	return c
3479}
3480
3481// PageToken sets the optional parameter "pageToken": Continuation token
3482// for fetching the next page of results.
3483func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall {
3484	c.urlParams_.Set("pageToken", pageToken)
3485	return c
3486}
3487
3488// Fields allows partial responses to be retrieved. See
3489// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3490// for more information.
3491func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall {
3492	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3493	return c
3494}
3495
3496// IfNoneMatch sets the optional parameter which makes the operation
3497// fail if the object's ETag matches the given value. This is useful for
3498// getting updates only after the object has changed since the last
3499// request. Use googleapi.IsNotModified to check whether the response
3500// error from Do is the result of In-None-Match.
3501func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall {
3502	c.ifNoneMatch_ = entityTag
3503	return c
3504}
3505
3506// Context sets the context to be used in this call's Do method. Any
3507// pending HTTP request will be aborted if the provided context is
3508// canceled.
3509func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall {
3510	c.ctx_ = ctx
3511	return c
3512}
3513
3514// Header returns an http.Header that can be modified by the caller to
3515// add HTTP headers to the request.
3516func (c *AppsServicesListCall) Header() http.Header {
3517	if c.header_ == nil {
3518		c.header_ = make(http.Header)
3519	}
3520	return c.header_
3521}
3522
3523func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) {
3524	reqHeaders := make(http.Header)
3525	for k, v := range c.header_ {
3526		reqHeaders[k] = v
3527	}
3528	reqHeaders.Set("User-Agent", c.s.userAgent())
3529	if c.ifNoneMatch_ != "" {
3530		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3531	}
3532	var body io.Reader = nil
3533	c.urlParams_.Set("alt", alt)
3534	c.urlParams_.Set("prettyPrint", "false")
3535	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services")
3536	urls += "?" + c.urlParams_.Encode()
3537	req, err := http.NewRequest("GET", urls, body)
3538	if err != nil {
3539		return nil, err
3540	}
3541	req.Header = reqHeaders
3542	googleapi.Expand(req.URL, map[string]string{
3543		"appsId": c.appsId,
3544	})
3545	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3546}
3547
3548// Do executes the "appengine.apps.services.list" call.
3549// Exactly one of *ListServicesResponse or error will be non-nil. Any
3550// non-2xx status code is an error. Response headers are in either
3551// *ListServicesResponse.ServerResponse.Header or (if a response was
3552// returned at all) in error.(*googleapi.Error).Header. Use
3553// googleapi.IsNotModified to check whether the returned error was
3554// because http.StatusNotModified was returned.
3555func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
3556	gensupport.SetOptions(c.urlParams_, opts...)
3557	res, err := c.doRequest("json")
3558	if res != nil && res.StatusCode == http.StatusNotModified {
3559		if res.Body != nil {
3560			res.Body.Close()
3561		}
3562		return nil, &googleapi.Error{
3563			Code:   res.StatusCode,
3564			Header: res.Header,
3565		}
3566	}
3567	if err != nil {
3568		return nil, err
3569	}
3570	defer googleapi.CloseBody(res)
3571	if err := googleapi.CheckResponse(res); err != nil {
3572		return nil, err
3573	}
3574	ret := &ListServicesResponse{
3575		ServerResponse: googleapi.ServerResponse{
3576			Header:         res.Header,
3577			HTTPStatusCode: res.StatusCode,
3578		},
3579	}
3580	target := &ret
3581	if err := gensupport.DecodeResponse(target, res); err != nil {
3582		return nil, err
3583	}
3584	return ret, nil
3585	// {
3586	//   "description": "Lists all the services in the application.",
3587	//   "httpMethod": "GET",
3588	//   "id": "appengine.apps.services.list",
3589	//   "parameterOrder": [
3590	//     "appsId"
3591	//   ],
3592	//   "parameters": {
3593	//     "appsId": {
3594	//       "description": "Part of `parent`. Name of the parent Application resource. Example: `apps/myapp`.",
3595	//       "location": "path",
3596	//       "required": true,
3597	//       "type": "string"
3598	//     },
3599	//     "pageSize": {
3600	//       "description": "Maximum results to return per page.",
3601	//       "format": "int32",
3602	//       "location": "query",
3603	//       "type": "integer"
3604	//     },
3605	//     "pageToken": {
3606	//       "description": "Continuation token for fetching the next page of results.",
3607	//       "location": "query",
3608	//       "type": "string"
3609	//     }
3610	//   },
3611	//   "path": "v1/apps/{appsId}/services",
3612	//   "response": {
3613	//     "$ref": "ListServicesResponse"
3614	//   },
3615	//   "scopes": [
3616	//     "https://www.googleapis.com/auth/cloud-platform"
3617	//   ]
3618	// }
3619
3620}
3621
3622// Pages invokes f for each page of results.
3623// A non-nil error returned from f will halt the iteration.
3624// The provided context supersedes any context provided to the Context method.
3625func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
3626	c.ctx_ = ctx
3627	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3628	for {
3629		x, err := c.Do()
3630		if err != nil {
3631			return err
3632		}
3633		if err := f(x); err != nil {
3634			return err
3635		}
3636		if x.NextPageToken == "" {
3637			return nil
3638		}
3639		c.PageToken(x.NextPageToken)
3640	}
3641}
3642
3643// method id "appengine.apps.services.patch":
3644
3645type AppsServicesPatchCall struct {
3646	s          *APIService
3647	appsId     string
3648	servicesId string
3649	service    *Service
3650	urlParams_ gensupport.URLParams
3651	ctx_       context.Context
3652	header_    http.Header
3653}
3654
3655// Patch: Updates the configuration of the specified service.
3656func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall {
3657	c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3658	c.appsId = appsId
3659	c.servicesId = servicesId
3660	c.service = service
3661	return c
3662}
3663
3664// MigrateTraffic sets the optional parameter "migrateTraffic": Set to
3665// `true` to gradually shift traffic from one version to another single
3666// version. By default, traffic is shifted immediately. For gradual
3667// traffic migration, the target version must be located within
3668// instances that are configured for both [warmup
3669// requests](https://cloud.google.com/appengine/docs/admin-api/reference/
3670// rest/v1/apps.services.versions#inboundservicetype) and [automatic
3671// scaling](https://cloud.google.com/appengine/docs/admin-api/reference/r
3672// est/v1/apps.services.versions#automaticscaling). You must specify the
3673// [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/referenc
3674// e/rest/v1/apps.services#shardby) field in the Service resource.
3675// Gradual traffic migration is not supported in the App Engine flexible
3676// environment. For examples, see [Migrating and Splitting
3677// Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-s
3678// plitting-traffic).
3679func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall {
3680	c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic))
3681	return c
3682}
3683
3684// UpdateMask sets the optional parameter "updateMask": Standard field
3685// mask for the set of fields to be updated.
3686func (c *AppsServicesPatchCall) UpdateMask(updateMask string) *AppsServicesPatchCall {
3687	c.urlParams_.Set("updateMask", updateMask)
3688	return c
3689}
3690
3691// Fields allows partial responses to be retrieved. See
3692// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3693// for more information.
3694func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall {
3695	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3696	return c
3697}
3698
3699// Context sets the context to be used in this call's Do method. Any
3700// pending HTTP request will be aborted if the provided context is
3701// canceled.
3702func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall {
3703	c.ctx_ = ctx
3704	return c
3705}
3706
3707// Header returns an http.Header that can be modified by the caller to
3708// add HTTP headers to the request.
3709func (c *AppsServicesPatchCall) Header() http.Header {
3710	if c.header_ == nil {
3711		c.header_ = make(http.Header)
3712	}
3713	return c.header_
3714}
3715
3716func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
3717	reqHeaders := make(http.Header)
3718	for k, v := range c.header_ {
3719		reqHeaders[k] = v
3720	}
3721	reqHeaders.Set("User-Agent", c.s.userAgent())
3722	var body io.Reader = nil
3723	body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
3724	if err != nil {
3725		return nil, err
3726	}
3727	reqHeaders.Set("Content-Type", "application/json")
3728	c.urlParams_.Set("alt", alt)
3729	c.urlParams_.Set("prettyPrint", "false")
3730	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}")
3731	urls += "?" + c.urlParams_.Encode()
3732	req, err := http.NewRequest("PATCH", urls, body)
3733	if err != nil {
3734		return nil, err
3735	}
3736	req.Header = reqHeaders
3737	googleapi.Expand(req.URL, map[string]string{
3738		"appsId":     c.appsId,
3739		"servicesId": c.servicesId,
3740	})
3741	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3742}
3743
3744// Do executes the "appengine.apps.services.patch" call.
3745// Exactly one of *Operation or error will be non-nil. Any non-2xx
3746// status code is an error. Response headers are in either
3747// *Operation.ServerResponse.Header or (if a response was returned at
3748// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3749// to check whether the returned error was because
3750// http.StatusNotModified was returned.
3751func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3752	gensupport.SetOptions(c.urlParams_, opts...)
3753	res, err := c.doRequest("json")
3754	if res != nil && res.StatusCode == http.StatusNotModified {
3755		if res.Body != nil {
3756			res.Body.Close()
3757		}
3758		return nil, &googleapi.Error{
3759			Code:   res.StatusCode,
3760			Header: res.Header,
3761		}
3762	}
3763	if err != nil {
3764		return nil, err
3765	}
3766	defer googleapi.CloseBody(res)
3767	if err := googleapi.CheckResponse(res); err != nil {
3768		return nil, err
3769	}
3770	ret := &Operation{
3771		ServerResponse: googleapi.ServerResponse{
3772			Header:         res.Header,
3773			HTTPStatusCode: res.StatusCode,
3774		},
3775	}
3776	target := &ret
3777	if err := gensupport.DecodeResponse(target, res); err != nil {
3778		return nil, err
3779	}
3780	return ret, nil
3781	// {
3782	//   "description": "Updates the configuration of the specified service.",
3783	//   "httpMethod": "PATCH",
3784	//   "id": "appengine.apps.services.patch",
3785	//   "parameterOrder": [
3786	//     "appsId",
3787	//     "servicesId"
3788	//   ],
3789	//   "parameters": {
3790	//     "appsId": {
3791	//       "description": "Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default`.",
3792	//       "location": "path",
3793	//       "required": true,
3794	//       "type": "string"
3795	//     },
3796	//     "migrateTraffic": {
3797	//       "description": "Set to `true` to gradually shift traffic from one version to another single version. By default, traffic is shifted immediately. For gradual traffic migration, the target version must be located within instances that are configured for both [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).",
3798	//       "location": "query",
3799	//       "type": "boolean"
3800	//     },
3801	//     "servicesId": {
3802	//       "description": "Part of `name`. See documentation of `appsId`.",
3803	//       "location": "path",
3804	//       "required": true,
3805	//       "type": "string"
3806	//     },
3807	//     "updateMask": {
3808	//       "description": "Standard field mask for the set of fields to be updated.",
3809	//       "location": "query",
3810	//       "type": "string"
3811	//     }
3812	//   },
3813	//   "path": "v1/apps/{appsId}/services/{servicesId}",
3814	//   "request": {
3815	//     "$ref": "Service"
3816	//   },
3817	//   "response": {
3818	//     "$ref": "Operation"
3819	//   },
3820	//   "scopes": [
3821	//     "https://www.googleapis.com/auth/cloud-platform"
3822	//   ]
3823	// }
3824
3825}
3826
3827// method id "appengine.apps.services.versions.create":
3828
3829type AppsServicesVersionsCreateCall struct {
3830	s          *APIService
3831	appsId     string
3832	servicesId string
3833	version    *Version
3834	urlParams_ gensupport.URLParams
3835	ctx_       context.Context
3836	header_    http.Header
3837}
3838
3839// Create: Deploys code and resource files to a new version.
3840func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall {
3841	c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3842	c.appsId = appsId
3843	c.servicesId = servicesId
3844	c.version = version
3845	return c
3846}
3847
3848// Fields allows partial responses to be retrieved. See
3849// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3850// for more information.
3851func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall {
3852	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3853	return c
3854}
3855
3856// Context sets the context to be used in this call's Do method. Any
3857// pending HTTP request will be aborted if the provided context is
3858// canceled.
3859func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall {
3860	c.ctx_ = ctx
3861	return c
3862}
3863
3864// Header returns an http.Header that can be modified by the caller to
3865// add HTTP headers to the request.
3866func (c *AppsServicesVersionsCreateCall) Header() http.Header {
3867	if c.header_ == nil {
3868		c.header_ = make(http.Header)
3869	}
3870	return c.header_
3871}
3872
3873func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
3874	reqHeaders := make(http.Header)
3875	for k, v := range c.header_ {
3876		reqHeaders[k] = v
3877	}
3878	reqHeaders.Set("User-Agent", c.s.userAgent())
3879	var body io.Reader = nil
3880	body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
3881	if err != nil {
3882		return nil, err
3883	}
3884	reqHeaders.Set("Content-Type", "application/json")
3885	c.urlParams_.Set("alt", alt)
3886	c.urlParams_.Set("prettyPrint", "false")
3887	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions")
3888	urls += "?" + c.urlParams_.Encode()
3889	req, err := http.NewRequest("POST", urls, body)
3890	if err != nil {
3891		return nil, err
3892	}
3893	req.Header = reqHeaders
3894	googleapi.Expand(req.URL, map[string]string{
3895		"appsId":     c.appsId,
3896		"servicesId": c.servicesId,
3897	})
3898	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3899}
3900
3901// Do executes the "appengine.apps.services.versions.create" call.
3902// Exactly one of *Operation or error will be non-nil. Any non-2xx
3903// status code is an error. Response headers are in either
3904// *Operation.ServerResponse.Header or (if a response was returned at
3905// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3906// to check whether the returned error was because
3907// http.StatusNotModified was returned.
3908func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3909	gensupport.SetOptions(c.urlParams_, opts...)
3910	res, err := c.doRequest("json")
3911	if res != nil && res.StatusCode == http.StatusNotModified {
3912		if res.Body != nil {
3913			res.Body.Close()
3914		}
3915		return nil, &googleapi.Error{
3916			Code:   res.StatusCode,
3917			Header: res.Header,
3918		}
3919	}
3920	if err != nil {
3921		return nil, err
3922	}
3923	defer googleapi.CloseBody(res)
3924	if err := googleapi.CheckResponse(res); err != nil {
3925		return nil, err
3926	}
3927	ret := &Operation{
3928		ServerResponse: googleapi.ServerResponse{
3929			Header:         res.Header,
3930			HTTPStatusCode: res.StatusCode,
3931		},
3932	}
3933	target := &ret
3934	if err := gensupport.DecodeResponse(target, res); err != nil {
3935		return nil, err
3936	}
3937	return ret, nil
3938	// {
3939	//   "description": "Deploys code and resource files to a new version.",
3940	//   "httpMethod": "POST",
3941	//   "id": "appengine.apps.services.versions.create",
3942	//   "parameterOrder": [
3943	//     "appsId",
3944	//     "servicesId"
3945	//   ],
3946	//   "parameters": {
3947	//     "appsId": {
3948	//       "description": "Part of `parent`. Name of the parent resource to create this version under. Example: `apps/myapp/services/default`.",
3949	//       "location": "path",
3950	//       "required": true,
3951	//       "type": "string"
3952	//     },
3953	//     "servicesId": {
3954	//       "description": "Part of `parent`. See documentation of `appsId`.",
3955	//       "location": "path",
3956	//       "required": true,
3957	//       "type": "string"
3958	//     }
3959	//   },
3960	//   "path": "v1/apps/{appsId}/services/{servicesId}/versions",
3961	//   "request": {
3962	//     "$ref": "Version"
3963	//   },
3964	//   "response": {
3965	//     "$ref": "Operation"
3966	//   },
3967	//   "scopes": [
3968	//     "https://www.googleapis.com/auth/cloud-platform"
3969	//   ]
3970	// }
3971
3972}
3973
3974// method id "appengine.apps.services.versions.delete":
3975
3976type AppsServicesVersionsDeleteCall struct {
3977	s          *APIService
3978	appsId     string
3979	servicesId string
3980	versionsId string
3981	urlParams_ gensupport.URLParams
3982	ctx_       context.Context
3983	header_    http.Header
3984}
3985
3986// Delete: Deletes an existing Version resource.
3987func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall {
3988	c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3989	c.appsId = appsId
3990	c.servicesId = servicesId
3991	c.versionsId = versionsId
3992	return c
3993}
3994
3995// Fields allows partial responses to be retrieved. See
3996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3997// for more information.
3998func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall {
3999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4000	return c
4001}
4002
4003// Context sets the context to be used in this call's Do method. Any
4004// pending HTTP request will be aborted if the provided context is
4005// canceled.
4006func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall {
4007	c.ctx_ = ctx
4008	return c
4009}
4010
4011// Header returns an http.Header that can be modified by the caller to
4012// add HTTP headers to the request.
4013func (c *AppsServicesVersionsDeleteCall) Header() http.Header {
4014	if c.header_ == nil {
4015		c.header_ = make(http.Header)
4016	}
4017	return c.header_
4018}
4019
4020func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
4021	reqHeaders := make(http.Header)
4022	for k, v := range c.header_ {
4023		reqHeaders[k] = v
4024	}
4025	reqHeaders.Set("User-Agent", c.s.userAgent())
4026	var body io.Reader = nil
4027	c.urlParams_.Set("alt", alt)
4028	c.urlParams_.Set("prettyPrint", "false")
4029	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
4030	urls += "?" + c.urlParams_.Encode()
4031	req, err := http.NewRequest("DELETE", urls, body)
4032	if err != nil {
4033		return nil, err
4034	}
4035	req.Header = reqHeaders
4036	googleapi.Expand(req.URL, map[string]string{
4037		"appsId":     c.appsId,
4038		"servicesId": c.servicesId,
4039		"versionsId": c.versionsId,
4040	})
4041	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4042}
4043
4044// Do executes the "appengine.apps.services.versions.delete" call.
4045// Exactly one of *Operation or error will be non-nil. Any non-2xx
4046// status code is an error. Response headers are in either
4047// *Operation.ServerResponse.Header or (if a response was returned at
4048// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4049// to check whether the returned error was because
4050// http.StatusNotModified was returned.
4051func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4052	gensupport.SetOptions(c.urlParams_, opts...)
4053	res, err := c.doRequest("json")
4054	if res != nil && res.StatusCode == http.StatusNotModified {
4055		if res.Body != nil {
4056			res.Body.Close()
4057		}
4058		return nil, &googleapi.Error{
4059			Code:   res.StatusCode,
4060			Header: res.Header,
4061		}
4062	}
4063	if err != nil {
4064		return nil, err
4065	}
4066	defer googleapi.CloseBody(res)
4067	if err := googleapi.CheckResponse(res); err != nil {
4068		return nil, err
4069	}
4070	ret := &Operation{
4071		ServerResponse: googleapi.ServerResponse{
4072			Header:         res.Header,
4073			HTTPStatusCode: res.StatusCode,
4074		},
4075	}
4076	target := &ret
4077	if err := gensupport.DecodeResponse(target, res); err != nil {
4078		return nil, err
4079	}
4080	return ret, nil
4081	// {
4082	//   "description": "Deletes an existing Version resource.",
4083	//   "httpMethod": "DELETE",
4084	//   "id": "appengine.apps.services.versions.delete",
4085	//   "parameterOrder": [
4086	//     "appsId",
4087	//     "servicesId",
4088	//     "versionsId"
4089	//   ],
4090	//   "parameters": {
4091	//     "appsId": {
4092	//       "description": "Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`.",
4093	//       "location": "path",
4094	//       "required": true,
4095	//       "type": "string"
4096	//     },
4097	//     "servicesId": {
4098	//       "description": "Part of `name`. See documentation of `appsId`.",
4099	//       "location": "path",
4100	//       "required": true,
4101	//       "type": "string"
4102	//     },
4103	//     "versionsId": {
4104	//       "description": "Part of `name`. See documentation of `appsId`.",
4105	//       "location": "path",
4106	//       "required": true,
4107	//       "type": "string"
4108	//     }
4109	//   },
4110	//   "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
4111	//   "response": {
4112	//     "$ref": "Operation"
4113	//   },
4114	//   "scopes": [
4115	//     "https://www.googleapis.com/auth/cloud-platform"
4116	//   ]
4117	// }
4118
4119}
4120
4121// method id "appengine.apps.services.versions.get":
4122
4123type AppsServicesVersionsGetCall struct {
4124	s            *APIService
4125	appsId       string
4126	servicesId   string
4127	versionsId   string
4128	urlParams_   gensupport.URLParams
4129	ifNoneMatch_ string
4130	ctx_         context.Context
4131	header_      http.Header
4132}
4133
4134// Get: Gets the specified Version resource. By default, only a
4135// `BASIC_VIEW` will be returned. Specify the `FULL_VIEW` parameter to
4136// get the full resource.
4137func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall {
4138	c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4139	c.appsId = appsId
4140	c.servicesId = servicesId
4141	c.versionsId = versionsId
4142	return c
4143}
4144
4145// View sets the optional parameter "view": Controls the set of fields
4146// returned in the `Get` response.
4147//
4148// Possible values:
4149//   "BASIC"
4150//   "FULL"
4151func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall {
4152	c.urlParams_.Set("view", view)
4153	return c
4154}
4155
4156// Fields allows partial responses to be retrieved. See
4157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4158// for more information.
4159func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall {
4160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4161	return c
4162}
4163
4164// IfNoneMatch sets the optional parameter which makes the operation
4165// fail if the object's ETag matches the given value. This is useful for
4166// getting updates only after the object has changed since the last
4167// request. Use googleapi.IsNotModified to check whether the response
4168// error from Do is the result of In-None-Match.
4169func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall {
4170	c.ifNoneMatch_ = entityTag
4171	return c
4172}
4173
4174// Context sets the context to be used in this call's Do method. Any
4175// pending HTTP request will be aborted if the provided context is
4176// canceled.
4177func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall {
4178	c.ctx_ = ctx
4179	return c
4180}
4181
4182// Header returns an http.Header that can be modified by the caller to
4183// add HTTP headers to the request.
4184func (c *AppsServicesVersionsGetCall) Header() http.Header {
4185	if c.header_ == nil {
4186		c.header_ = make(http.Header)
4187	}
4188	return c.header_
4189}
4190
4191func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
4192	reqHeaders := make(http.Header)
4193	for k, v := range c.header_ {
4194		reqHeaders[k] = v
4195	}
4196	reqHeaders.Set("User-Agent", c.s.userAgent())
4197	if c.ifNoneMatch_ != "" {
4198		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4199	}
4200	var body io.Reader = nil
4201	c.urlParams_.Set("alt", alt)
4202	c.urlParams_.Set("prettyPrint", "false")
4203	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
4204	urls += "?" + c.urlParams_.Encode()
4205	req, err := http.NewRequest("GET", urls, body)
4206	if err != nil {
4207		return nil, err
4208	}
4209	req.Header = reqHeaders
4210	googleapi.Expand(req.URL, map[string]string{
4211		"appsId":     c.appsId,
4212		"servicesId": c.servicesId,
4213		"versionsId": c.versionsId,
4214	})
4215	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4216}
4217
4218// Do executes the "appengine.apps.services.versions.get" call.
4219// Exactly one of *Version or error will be non-nil. Any non-2xx status
4220// code is an error. Response headers are in either
4221// *Version.ServerResponse.Header or (if a response was returned at all)
4222// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4223// check whether the returned error was because http.StatusNotModified
4224// was returned.
4225func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) {
4226	gensupport.SetOptions(c.urlParams_, opts...)
4227	res, err := c.doRequest("json")
4228	if res != nil && res.StatusCode == http.StatusNotModified {
4229		if res.Body != nil {
4230			res.Body.Close()
4231		}
4232		return nil, &googleapi.Error{
4233			Code:   res.StatusCode,
4234			Header: res.Header,
4235		}
4236	}
4237	if err != nil {
4238		return nil, err
4239	}
4240	defer googleapi.CloseBody(res)
4241	if err := googleapi.CheckResponse(res); err != nil {
4242		return nil, err
4243	}
4244	ret := &Version{
4245		ServerResponse: googleapi.ServerResponse{
4246			Header:         res.Header,
4247			HTTPStatusCode: res.StatusCode,
4248		},
4249	}
4250	target := &ret
4251	if err := gensupport.DecodeResponse(target, res); err != nil {
4252		return nil, err
4253	}
4254	return ret, nil
4255	// {
4256	//   "description": "Gets the specified Version resource. By default, only a `BASIC_VIEW` will be returned. Specify the `FULL_VIEW` parameter to get the full resource.",
4257	//   "httpMethod": "GET",
4258	//   "id": "appengine.apps.services.versions.get",
4259	//   "parameterOrder": [
4260	//     "appsId",
4261	//     "servicesId",
4262	//     "versionsId"
4263	//   ],
4264	//   "parameters": {
4265	//     "appsId": {
4266	//       "description": "Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`.",
4267	//       "location": "path",
4268	//       "required": true,
4269	//       "type": "string"
4270	//     },
4271	//     "servicesId": {
4272	//       "description": "Part of `name`. See documentation of `appsId`.",
4273	//       "location": "path",
4274	//       "required": true,
4275	//       "type": "string"
4276	//     },
4277	//     "versionsId": {
4278	//       "description": "Part of `name`. See documentation of `appsId`.",
4279	//       "location": "path",
4280	//       "required": true,
4281	//       "type": "string"
4282	//     },
4283	//     "view": {
4284	//       "description": "Controls the set of fields returned in the `Get` response.",
4285	//       "enum": [
4286	//         "BASIC",
4287	//         "FULL"
4288	//       ],
4289	//       "location": "query",
4290	//       "type": "string"
4291	//     }
4292	//   },
4293	//   "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
4294	//   "response": {
4295	//     "$ref": "Version"
4296	//   },
4297	//   "scopes": [
4298	//     "https://www.googleapis.com/auth/cloud-platform"
4299	//   ]
4300	// }
4301
4302}
4303
4304// method id "appengine.apps.services.versions.list":
4305
4306type AppsServicesVersionsListCall struct {
4307	s            *APIService
4308	appsId       string
4309	servicesId   string
4310	urlParams_   gensupport.URLParams
4311	ifNoneMatch_ string
4312	ctx_         context.Context
4313	header_      http.Header
4314}
4315
4316// List: Lists the versions of a service.
4317func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall {
4318	c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4319	c.appsId = appsId
4320	c.servicesId = servicesId
4321	return c
4322}
4323
4324// PageSize sets the optional parameter "pageSize": Maximum results to
4325// return per page.
4326func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall {
4327	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4328	return c
4329}
4330
4331// PageToken sets the optional parameter "pageToken": Continuation token
4332// for fetching the next page of results.
4333func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall {
4334	c.urlParams_.Set("pageToken", pageToken)
4335	return c
4336}
4337
4338// View sets the optional parameter "view": Controls the set of fields
4339// returned in the `List` response.
4340//
4341// Possible values:
4342//   "BASIC"
4343//   "FULL"
4344func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall {
4345	c.urlParams_.Set("view", view)
4346	return c
4347}
4348
4349// Fields allows partial responses to be retrieved. See
4350// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4351// for more information.
4352func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall {
4353	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4354	return c
4355}
4356
4357// IfNoneMatch sets the optional parameter which makes the operation
4358// fail if the object's ETag matches the given value. This is useful for
4359// getting updates only after the object has changed since the last
4360// request. Use googleapi.IsNotModified to check whether the response
4361// error from Do is the result of In-None-Match.
4362func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall {
4363	c.ifNoneMatch_ = entityTag
4364	return c
4365}
4366
4367// Context sets the context to be used in this call's Do method. Any
4368// pending HTTP request will be aborted if the provided context is
4369// canceled.
4370func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall {
4371	c.ctx_ = ctx
4372	return c
4373}
4374
4375// Header returns an http.Header that can be modified by the caller to
4376// add HTTP headers to the request.
4377func (c *AppsServicesVersionsListCall) Header() http.Header {
4378	if c.header_ == nil {
4379		c.header_ = make(http.Header)
4380	}
4381	return c.header_
4382}
4383
4384func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) {
4385	reqHeaders := make(http.Header)
4386	for k, v := range c.header_ {
4387		reqHeaders[k] = v
4388	}
4389	reqHeaders.Set("User-Agent", c.s.userAgent())
4390	if c.ifNoneMatch_ != "" {
4391		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4392	}
4393	var body io.Reader = nil
4394	c.urlParams_.Set("alt", alt)
4395	c.urlParams_.Set("prettyPrint", "false")
4396	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions")
4397	urls += "?" + c.urlParams_.Encode()
4398	req, err := http.NewRequest("GET", urls, body)
4399	if err != nil {
4400		return nil, err
4401	}
4402	req.Header = reqHeaders
4403	googleapi.Expand(req.URL, map[string]string{
4404		"appsId":     c.appsId,
4405		"servicesId": c.servicesId,
4406	})
4407	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4408}
4409
4410// Do executes the "appengine.apps.services.versions.list" call.
4411// Exactly one of *ListVersionsResponse or error will be non-nil. Any
4412// non-2xx status code is an error. Response headers are in either
4413// *ListVersionsResponse.ServerResponse.Header or (if a response was
4414// returned at all) in error.(*googleapi.Error).Header. Use
4415// googleapi.IsNotModified to check whether the returned error was
4416// because http.StatusNotModified was returned.
4417func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) {
4418	gensupport.SetOptions(c.urlParams_, opts...)
4419	res, err := c.doRequest("json")
4420	if res != nil && res.StatusCode == http.StatusNotModified {
4421		if res.Body != nil {
4422			res.Body.Close()
4423		}
4424		return nil, &googleapi.Error{
4425			Code:   res.StatusCode,
4426			Header: res.Header,
4427		}
4428	}
4429	if err != nil {
4430		return nil, err
4431	}
4432	defer googleapi.CloseBody(res)
4433	if err := googleapi.CheckResponse(res); err != nil {
4434		return nil, err
4435	}
4436	ret := &ListVersionsResponse{
4437		ServerResponse: googleapi.ServerResponse{
4438			Header:         res.Header,
4439			HTTPStatusCode: res.StatusCode,
4440		},
4441	}
4442	target := &ret
4443	if err := gensupport.DecodeResponse(target, res); err != nil {
4444		return nil, err
4445	}
4446	return ret, nil
4447	// {
4448	//   "description": "Lists the versions of a service.",
4449	//   "httpMethod": "GET",
4450	//   "id": "appengine.apps.services.versions.list",
4451	//   "parameterOrder": [
4452	//     "appsId",
4453	//     "servicesId"
4454	//   ],
4455	//   "parameters": {
4456	//     "appsId": {
4457	//       "description": "Part of `parent`. Name of the parent Service resource. Example: `apps/myapp/services/default`.",
4458	//       "location": "path",
4459	//       "required": true,
4460	//       "type": "string"
4461	//     },
4462	//     "pageSize": {
4463	//       "description": "Maximum results to return per page.",
4464	//       "format": "int32",
4465	//       "location": "query",
4466	//       "type": "integer"
4467	//     },
4468	//     "pageToken": {
4469	//       "description": "Continuation token for fetching the next page of results.",
4470	//       "location": "query",
4471	//       "type": "string"
4472	//     },
4473	//     "servicesId": {
4474	//       "description": "Part of `parent`. See documentation of `appsId`.",
4475	//       "location": "path",
4476	//       "required": true,
4477	//       "type": "string"
4478	//     },
4479	//     "view": {
4480	//       "description": "Controls the set of fields returned in the `List` response.",
4481	//       "enum": [
4482	//         "BASIC",
4483	//         "FULL"
4484	//       ],
4485	//       "location": "query",
4486	//       "type": "string"
4487	//     }
4488	//   },
4489	//   "path": "v1/apps/{appsId}/services/{servicesId}/versions",
4490	//   "response": {
4491	//     "$ref": "ListVersionsResponse"
4492	//   },
4493	//   "scopes": [
4494	//     "https://www.googleapis.com/auth/cloud-platform"
4495	//   ]
4496	// }
4497
4498}
4499
4500// Pages invokes f for each page of results.
4501// A non-nil error returned from f will halt the iteration.
4502// The provided context supersedes any context provided to the Context method.
4503func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error {
4504	c.ctx_ = ctx
4505	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4506	for {
4507		x, err := c.Do()
4508		if err != nil {
4509			return err
4510		}
4511		if err := f(x); err != nil {
4512			return err
4513		}
4514		if x.NextPageToken == "" {
4515			return nil
4516		}
4517		c.PageToken(x.NextPageToken)
4518	}
4519}
4520
4521// method id "appengine.apps.services.versions.patch":
4522
4523type AppsServicesVersionsPatchCall struct {
4524	s          *APIService
4525	appsId     string
4526	servicesId string
4527	versionsId string
4528	version    *Version
4529	urlParams_ gensupport.URLParams
4530	ctx_       context.Context
4531	header_    http.Header
4532}
4533
4534// Patch: Updates the specified Version resource. You can specify the
4535// following fields depending on the App Engine environment and type of
4536// scaling that the version resource uses: *
4537// [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/r
4538// eference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
4539// : For Version resources that use basic scaling, manual scaling, or
4540// run in the App Engine flexible environment. *
4541// [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/r
4542// eference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)
4543// : For Version resources that run in the App Engine standard
4544// environment. *
4545// [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appe
4546// ngine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.
4547// FIELDS.automatic_scaling): For Version resources that use automatic
4548// scaling and run in the App Engine standard environment. *
4549// [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appe
4550// ngine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.
4551// FIELDS.automatic_scaling): For Version resources that use automatic
4552// scaling and run in the App Engine standard environment.
4553func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall {
4554	c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4555	c.appsId = appsId
4556	c.servicesId = servicesId
4557	c.versionsId = versionsId
4558	c.version = version
4559	return c
4560}
4561
4562// UpdateMask sets the optional parameter "updateMask": Standard field
4563// mask for the set of fields to be updated.
4564func (c *AppsServicesVersionsPatchCall) UpdateMask(updateMask string) *AppsServicesVersionsPatchCall {
4565	c.urlParams_.Set("updateMask", updateMask)
4566	return c
4567}
4568
4569// Fields allows partial responses to be retrieved. See
4570// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4571// for more information.
4572func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall {
4573	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4574	return c
4575}
4576
4577// Context sets the context to be used in this call's Do method. Any
4578// pending HTTP request will be aborted if the provided context is
4579// canceled.
4580func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall {
4581	c.ctx_ = ctx
4582	return c
4583}
4584
4585// Header returns an http.Header that can be modified by the caller to
4586// add HTTP headers to the request.
4587func (c *AppsServicesVersionsPatchCall) Header() http.Header {
4588	if c.header_ == nil {
4589		c.header_ = make(http.Header)
4590	}
4591	return c.header_
4592}
4593
4594func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) {
4595	reqHeaders := make(http.Header)
4596	for k, v := range c.header_ {
4597		reqHeaders[k] = v
4598	}
4599	reqHeaders.Set("User-Agent", c.s.userAgent())
4600	var body io.Reader = nil
4601	body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
4602	if err != nil {
4603		return nil, err
4604	}
4605	reqHeaders.Set("Content-Type", "application/json")
4606	c.urlParams_.Set("alt", alt)
4607	c.urlParams_.Set("prettyPrint", "false")
4608	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}")
4609	urls += "?" + c.urlParams_.Encode()
4610	req, err := http.NewRequest("PATCH", urls, body)
4611	if err != nil {
4612		return nil, err
4613	}
4614	req.Header = reqHeaders
4615	googleapi.Expand(req.URL, map[string]string{
4616		"appsId":     c.appsId,
4617		"servicesId": c.servicesId,
4618		"versionsId": c.versionsId,
4619	})
4620	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4621}
4622
4623// Do executes the "appengine.apps.services.versions.patch" call.
4624// Exactly one of *Operation or error will be non-nil. Any non-2xx
4625// status code is an error. Response headers are in either
4626// *Operation.ServerResponse.Header or (if a response was returned at
4627// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4628// to check whether the returned error was because
4629// http.StatusNotModified was returned.
4630func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4631	gensupport.SetOptions(c.urlParams_, opts...)
4632	res, err := c.doRequest("json")
4633	if res != nil && res.StatusCode == http.StatusNotModified {
4634		if res.Body != nil {
4635			res.Body.Close()
4636		}
4637		return nil, &googleapi.Error{
4638			Code:   res.StatusCode,
4639			Header: res.Header,
4640		}
4641	}
4642	if err != nil {
4643		return nil, err
4644	}
4645	defer googleapi.CloseBody(res)
4646	if err := googleapi.CheckResponse(res); err != nil {
4647		return nil, err
4648	}
4649	ret := &Operation{
4650		ServerResponse: googleapi.ServerResponse{
4651			Header:         res.Header,
4652			HTTPStatusCode: res.StatusCode,
4653		},
4654	}
4655	target := &ret
4656	if err := gensupport.DecodeResponse(target, res); err != nil {
4657		return nil, err
4658	}
4659	return ret, nil
4660	// {
4661	//   "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses: * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment. * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment. * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment. * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.",
4662	//   "httpMethod": "PATCH",
4663	//   "id": "appengine.apps.services.versions.patch",
4664	//   "parameterOrder": [
4665	//     "appsId",
4666	//     "servicesId",
4667	//     "versionsId"
4668	//   ],
4669	//   "parameters": {
4670	//     "appsId": {
4671	//       "description": "Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default/versions/1`.",
4672	//       "location": "path",
4673	//       "required": true,
4674	//       "type": "string"
4675	//     },
4676	//     "servicesId": {
4677	//       "description": "Part of `name`. See documentation of `appsId`.",
4678	//       "location": "path",
4679	//       "required": true,
4680	//       "type": "string"
4681	//     },
4682	//     "updateMask": {
4683	//       "description": "Standard field mask for the set of fields to be updated.",
4684	//       "location": "query",
4685	//       "type": "string"
4686	//     },
4687	//     "versionsId": {
4688	//       "description": "Part of `name`. See documentation of `appsId`.",
4689	//       "location": "path",
4690	//       "required": true,
4691	//       "type": "string"
4692	//     }
4693	//   },
4694	//   "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}",
4695	//   "request": {
4696	//     "$ref": "Version"
4697	//   },
4698	//   "response": {
4699	//     "$ref": "Operation"
4700	//   },
4701	//   "scopes": [
4702	//     "https://www.googleapis.com/auth/cloud-platform"
4703	//   ]
4704	// }
4705
4706}
4707
4708// method id "appengine.apps.services.versions.instances.debug":
4709
4710type AppsServicesVersionsInstancesDebugCall struct {
4711	s                    *APIService
4712	appsId               string
4713	servicesId           string
4714	versionsId           string
4715	instancesId          string
4716	debuginstancerequest *DebugInstanceRequest
4717	urlParams_           gensupport.URLParams
4718	ctx_                 context.Context
4719	header_              http.Header
4720}
4721
4722// Debug: Enables debugging on a VM instance. This allows you to use the
4723// SSH command to connect to the virtual machine where the instance
4724// lives. While in "debug mode", the instance continues to serve live
4725// traffic. You should delete the instance when you are done debugging
4726// and then allow the system to take over and determine if another
4727// instance should be started. Only applicable for instances in App
4728// Engine flexible environment.
4729func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall {
4730	c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4731	c.appsId = appsId
4732	c.servicesId = servicesId
4733	c.versionsId = versionsId
4734	c.instancesId = instancesId
4735	c.debuginstancerequest = debuginstancerequest
4736	return c
4737}
4738
4739// Fields allows partial responses to be retrieved. See
4740// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4741// for more information.
4742func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall {
4743	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4744	return c
4745}
4746
4747// Context sets the context to be used in this call's Do method. Any
4748// pending HTTP request will be aborted if the provided context is
4749// canceled.
4750func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall {
4751	c.ctx_ = ctx
4752	return c
4753}
4754
4755// Header returns an http.Header that can be modified by the caller to
4756// add HTTP headers to the request.
4757func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header {
4758	if c.header_ == nil {
4759		c.header_ = make(http.Header)
4760	}
4761	return c.header_
4762}
4763
4764func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) {
4765	reqHeaders := make(http.Header)
4766	for k, v := range c.header_ {
4767		reqHeaders[k] = v
4768	}
4769	reqHeaders.Set("User-Agent", c.s.userAgent())
4770	var body io.Reader = nil
4771	body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest)
4772	if err != nil {
4773		return nil, err
4774	}
4775	reqHeaders.Set("Content-Type", "application/json")
4776	c.urlParams_.Set("alt", alt)
4777	c.urlParams_.Set("prettyPrint", "false")
4778	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug")
4779	urls += "?" + c.urlParams_.Encode()
4780	req, err := http.NewRequest("POST", urls, body)
4781	if err != nil {
4782		return nil, err
4783	}
4784	req.Header = reqHeaders
4785	googleapi.Expand(req.URL, map[string]string{
4786		"appsId":      c.appsId,
4787		"servicesId":  c.servicesId,
4788		"versionsId":  c.versionsId,
4789		"instancesId": c.instancesId,
4790	})
4791	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4792}
4793
4794// Do executes the "appengine.apps.services.versions.instances.debug" call.
4795// Exactly one of *Operation or error will be non-nil. Any non-2xx
4796// status code is an error. Response headers are in either
4797// *Operation.ServerResponse.Header or (if a response was returned at
4798// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4799// to check whether the returned error was because
4800// http.StatusNotModified was returned.
4801func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4802	gensupport.SetOptions(c.urlParams_, opts...)
4803	res, err := c.doRequest("json")
4804	if res != nil && res.StatusCode == http.StatusNotModified {
4805		if res.Body != nil {
4806			res.Body.Close()
4807		}
4808		return nil, &googleapi.Error{
4809			Code:   res.StatusCode,
4810			Header: res.Header,
4811		}
4812	}
4813	if err != nil {
4814		return nil, err
4815	}
4816	defer googleapi.CloseBody(res)
4817	if err := googleapi.CheckResponse(res); err != nil {
4818		return nil, err
4819	}
4820	ret := &Operation{
4821		ServerResponse: googleapi.ServerResponse{
4822			Header:         res.Header,
4823			HTTPStatusCode: res.StatusCode,
4824		},
4825	}
4826	target := &ret
4827	if err := gensupport.DecodeResponse(target, res); err != nil {
4828		return nil, err
4829	}
4830	return ret, nil
4831	// {
4832	//   "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started. Only applicable for instances in App Engine flexible environment.",
4833	//   "httpMethod": "POST",
4834	//   "id": "appengine.apps.services.versions.instances.debug",
4835	//   "parameterOrder": [
4836	//     "appsId",
4837	//     "servicesId",
4838	//     "versionsId",
4839	//     "instancesId"
4840	//   ],
4841	//   "parameters": {
4842	//     "appsId": {
4843	//       "description": "Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.",
4844	//       "location": "path",
4845	//       "required": true,
4846	//       "type": "string"
4847	//     },
4848	//     "instancesId": {
4849	//       "description": "Part of `name`. See documentation of `appsId`.",
4850	//       "location": "path",
4851	//       "required": true,
4852	//       "type": "string"
4853	//     },
4854	//     "servicesId": {
4855	//       "description": "Part of `name`. See documentation of `appsId`.",
4856	//       "location": "path",
4857	//       "required": true,
4858	//       "type": "string"
4859	//     },
4860	//     "versionsId": {
4861	//       "description": "Part of `name`. See documentation of `appsId`.",
4862	//       "location": "path",
4863	//       "required": true,
4864	//       "type": "string"
4865	//     }
4866	//   },
4867	//   "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug",
4868	//   "request": {
4869	//     "$ref": "DebugInstanceRequest"
4870	//   },
4871	//   "response": {
4872	//     "$ref": "Operation"
4873	//   },
4874	//   "scopes": [
4875	//     "https://www.googleapis.com/auth/cloud-platform"
4876	//   ]
4877	// }
4878
4879}
4880
4881// method id "appengine.apps.services.versions.instances.delete":
4882
4883type AppsServicesVersionsInstancesDeleteCall struct {
4884	s           *APIService
4885	appsId      string
4886	servicesId  string
4887	versionsId  string
4888	instancesId string
4889	urlParams_  gensupport.URLParams
4890	ctx_        context.Context
4891	header_     http.Header
4892}
4893
4894// Delete: Stops a running instance.
4895func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall {
4896	c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4897	c.appsId = appsId
4898	c.servicesId = servicesId
4899	c.versionsId = versionsId
4900	c.instancesId = instancesId
4901	return c
4902}
4903
4904// Fields allows partial responses to be retrieved. See
4905// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4906// for more information.
4907func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall {
4908	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4909	return c
4910}
4911
4912// Context sets the context to be used in this call's Do method. Any
4913// pending HTTP request will be aborted if the provided context is
4914// canceled.
4915func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall {
4916	c.ctx_ = ctx
4917	return c
4918}
4919
4920// Header returns an http.Header that can be modified by the caller to
4921// add HTTP headers to the request.
4922func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header {
4923	if c.header_ == nil {
4924		c.header_ = make(http.Header)
4925	}
4926	return c.header_
4927}
4928
4929func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
4930	reqHeaders := make(http.Header)
4931	for k, v := range c.header_ {
4932		reqHeaders[k] = v
4933	}
4934	reqHeaders.Set("User-Agent", c.s.userAgent())
4935	var body io.Reader = nil
4936	c.urlParams_.Set("alt", alt)
4937	c.urlParams_.Set("prettyPrint", "false")
4938	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
4939	urls += "?" + c.urlParams_.Encode()
4940	req, err := http.NewRequest("DELETE", urls, body)
4941	if err != nil {
4942		return nil, err
4943	}
4944	req.Header = reqHeaders
4945	googleapi.Expand(req.URL, map[string]string{
4946		"appsId":      c.appsId,
4947		"servicesId":  c.servicesId,
4948		"versionsId":  c.versionsId,
4949		"instancesId": c.instancesId,
4950	})
4951	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4952}
4953
4954// Do executes the "appengine.apps.services.versions.instances.delete" call.
4955// Exactly one of *Operation or error will be non-nil. Any non-2xx
4956// status code is an error. Response headers are in either
4957// *Operation.ServerResponse.Header or (if a response was returned at
4958// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4959// to check whether the returned error was because
4960// http.StatusNotModified was returned.
4961func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4962	gensupport.SetOptions(c.urlParams_, opts...)
4963	res, err := c.doRequest("json")
4964	if res != nil && res.StatusCode == http.StatusNotModified {
4965		if res.Body != nil {
4966			res.Body.Close()
4967		}
4968		return nil, &googleapi.Error{
4969			Code:   res.StatusCode,
4970			Header: res.Header,
4971		}
4972	}
4973	if err != nil {
4974		return nil, err
4975	}
4976	defer googleapi.CloseBody(res)
4977	if err := googleapi.CheckResponse(res); err != nil {
4978		return nil, err
4979	}
4980	ret := &Operation{
4981		ServerResponse: googleapi.ServerResponse{
4982			Header:         res.Header,
4983			HTTPStatusCode: res.StatusCode,
4984		},
4985	}
4986	target := &ret
4987	if err := gensupport.DecodeResponse(target, res); err != nil {
4988		return nil, err
4989	}
4990	return ret, nil
4991	// {
4992	//   "description": "Stops a running instance.",
4993	//   "httpMethod": "DELETE",
4994	//   "id": "appengine.apps.services.versions.instances.delete",
4995	//   "parameterOrder": [
4996	//     "appsId",
4997	//     "servicesId",
4998	//     "versionsId",
4999	//     "instancesId"
5000	//   ],
5001	//   "parameters": {
5002	//     "appsId": {
5003	//       "description": "Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.",
5004	//       "location": "path",
5005	//       "required": true,
5006	//       "type": "string"
5007	//     },
5008	//     "instancesId": {
5009	//       "description": "Part of `name`. See documentation of `appsId`.",
5010	//       "location": "path",
5011	//       "required": true,
5012	//       "type": "string"
5013	//     },
5014	//     "servicesId": {
5015	//       "description": "Part of `name`. See documentation of `appsId`.",
5016	//       "location": "path",
5017	//       "required": true,
5018	//       "type": "string"
5019	//     },
5020	//     "versionsId": {
5021	//       "description": "Part of `name`. See documentation of `appsId`.",
5022	//       "location": "path",
5023	//       "required": true,
5024	//       "type": "string"
5025	//     }
5026	//   },
5027	//   "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
5028	//   "response": {
5029	//     "$ref": "Operation"
5030	//   },
5031	//   "scopes": [
5032	//     "https://www.googleapis.com/auth/cloud-platform"
5033	//   ]
5034	// }
5035
5036}
5037
5038// method id "appengine.apps.services.versions.instances.get":
5039
5040type AppsServicesVersionsInstancesGetCall struct {
5041	s            *APIService
5042	appsId       string
5043	servicesId   string
5044	versionsId   string
5045	instancesId  string
5046	urlParams_   gensupport.URLParams
5047	ifNoneMatch_ string
5048	ctx_         context.Context
5049	header_      http.Header
5050}
5051
5052// Get: Gets instance information.
5053func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall {
5054	c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5055	c.appsId = appsId
5056	c.servicesId = servicesId
5057	c.versionsId = versionsId
5058	c.instancesId = instancesId
5059	return c
5060}
5061
5062// Fields allows partial responses to be retrieved. See
5063// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5064// for more information.
5065func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall {
5066	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5067	return c
5068}
5069
5070// IfNoneMatch sets the optional parameter which makes the operation
5071// fail if the object's ETag matches the given value. This is useful for
5072// getting updates only after the object has changed since the last
5073// request. Use googleapi.IsNotModified to check whether the response
5074// error from Do is the result of In-None-Match.
5075func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall {
5076	c.ifNoneMatch_ = entityTag
5077	return c
5078}
5079
5080// Context sets the context to be used in this call's Do method. Any
5081// pending HTTP request will be aborted if the provided context is
5082// canceled.
5083func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall {
5084	c.ctx_ = ctx
5085	return c
5086}
5087
5088// Header returns an http.Header that can be modified by the caller to
5089// add HTTP headers to the request.
5090func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header {
5091	if c.header_ == nil {
5092		c.header_ = make(http.Header)
5093	}
5094	return c.header_
5095}
5096
5097func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) {
5098	reqHeaders := make(http.Header)
5099	for k, v := range c.header_ {
5100		reqHeaders[k] = v
5101	}
5102	reqHeaders.Set("User-Agent", c.s.userAgent())
5103	if c.ifNoneMatch_ != "" {
5104		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5105	}
5106	var body io.Reader = nil
5107	c.urlParams_.Set("alt", alt)
5108	c.urlParams_.Set("prettyPrint", "false")
5109	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}")
5110	urls += "?" + c.urlParams_.Encode()
5111	req, err := http.NewRequest("GET", urls, body)
5112	if err != nil {
5113		return nil, err
5114	}
5115	req.Header = reqHeaders
5116	googleapi.Expand(req.URL, map[string]string{
5117		"appsId":      c.appsId,
5118		"servicesId":  c.servicesId,
5119		"versionsId":  c.versionsId,
5120		"instancesId": c.instancesId,
5121	})
5122	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5123}
5124
5125// Do executes the "appengine.apps.services.versions.instances.get" call.
5126// Exactly one of *Instance or error will be non-nil. Any non-2xx status
5127// code is an error. Response headers are in either
5128// *Instance.ServerResponse.Header or (if a response was returned at
5129// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5130// to check whether the returned error was because
5131// http.StatusNotModified was returned.
5132func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) {
5133	gensupport.SetOptions(c.urlParams_, opts...)
5134	res, err := c.doRequest("json")
5135	if res != nil && res.StatusCode == http.StatusNotModified {
5136		if res.Body != nil {
5137			res.Body.Close()
5138		}
5139		return nil, &googleapi.Error{
5140			Code:   res.StatusCode,
5141			Header: res.Header,
5142		}
5143	}
5144	if err != nil {
5145		return nil, err
5146	}
5147	defer googleapi.CloseBody(res)
5148	if err := googleapi.CheckResponse(res); err != nil {
5149		return nil, err
5150	}
5151	ret := &Instance{
5152		ServerResponse: googleapi.ServerResponse{
5153			Header:         res.Header,
5154			HTTPStatusCode: res.StatusCode,
5155		},
5156	}
5157	target := &ret
5158	if err := gensupport.DecodeResponse(target, res); err != nil {
5159		return nil, err
5160	}
5161	return ret, nil
5162	// {
5163	//   "description": "Gets instance information.",
5164	//   "httpMethod": "GET",
5165	//   "id": "appengine.apps.services.versions.instances.get",
5166	//   "parameterOrder": [
5167	//     "appsId",
5168	//     "servicesId",
5169	//     "versionsId",
5170	//     "instancesId"
5171	//   ],
5172	//   "parameters": {
5173	//     "appsId": {
5174	//       "description": "Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.",
5175	//       "location": "path",
5176	//       "required": true,
5177	//       "type": "string"
5178	//     },
5179	//     "instancesId": {
5180	//       "description": "Part of `name`. See documentation of `appsId`.",
5181	//       "location": "path",
5182	//       "required": true,
5183	//       "type": "string"
5184	//     },
5185	//     "servicesId": {
5186	//       "description": "Part of `name`. See documentation of `appsId`.",
5187	//       "location": "path",
5188	//       "required": true,
5189	//       "type": "string"
5190	//     },
5191	//     "versionsId": {
5192	//       "description": "Part of `name`. See documentation of `appsId`.",
5193	//       "location": "path",
5194	//       "required": true,
5195	//       "type": "string"
5196	//     }
5197	//   },
5198	//   "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}",
5199	//   "response": {
5200	//     "$ref": "Instance"
5201	//   },
5202	//   "scopes": [
5203	//     "https://www.googleapis.com/auth/cloud-platform"
5204	//   ]
5205	// }
5206
5207}
5208
5209// method id "appengine.apps.services.versions.instances.list":
5210
5211type AppsServicesVersionsInstancesListCall struct {
5212	s            *APIService
5213	appsId       string
5214	servicesId   string
5215	versionsId   string
5216	urlParams_   gensupport.URLParams
5217	ifNoneMatch_ string
5218	ctx_         context.Context
5219	header_      http.Header
5220}
5221
5222// List: Lists the instances of a version.
5223func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall {
5224	c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5225	c.appsId = appsId
5226	c.servicesId = servicesId
5227	c.versionsId = versionsId
5228	return c
5229}
5230
5231// PageSize sets the optional parameter "pageSize": Maximum results to
5232// return per page.
5233func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall {
5234	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5235	return c
5236}
5237
5238// PageToken sets the optional parameter "pageToken": Continuation token
5239// for fetching the next page of results.
5240func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall {
5241	c.urlParams_.Set("pageToken", pageToken)
5242	return c
5243}
5244
5245// Fields allows partial responses to be retrieved. See
5246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5247// for more information.
5248func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall {
5249	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5250	return c
5251}
5252
5253// IfNoneMatch sets the optional parameter which makes the operation
5254// fail if the object's ETag matches the given value. This is useful for
5255// getting updates only after the object has changed since the last
5256// request. Use googleapi.IsNotModified to check whether the response
5257// error from Do is the result of In-None-Match.
5258func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall {
5259	c.ifNoneMatch_ = entityTag
5260	return c
5261}
5262
5263// Context sets the context to be used in this call's Do method. Any
5264// pending HTTP request will be aborted if the provided context is
5265// canceled.
5266func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall {
5267	c.ctx_ = ctx
5268	return c
5269}
5270
5271// Header returns an http.Header that can be modified by the caller to
5272// add HTTP headers to the request.
5273func (c *AppsServicesVersionsInstancesListCall) Header() http.Header {
5274	if c.header_ == nil {
5275		c.header_ = make(http.Header)
5276	}
5277	return c.header_
5278}
5279
5280func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) {
5281	reqHeaders := make(http.Header)
5282	for k, v := range c.header_ {
5283		reqHeaders[k] = v
5284	}
5285	reqHeaders.Set("User-Agent", c.s.userAgent())
5286	if c.ifNoneMatch_ != "" {
5287		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5288	}
5289	var body io.Reader = nil
5290	c.urlParams_.Set("alt", alt)
5291	c.urlParams_.Set("prettyPrint", "false")
5292	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances")
5293	urls += "?" + c.urlParams_.Encode()
5294	req, err := http.NewRequest("GET", urls, body)
5295	if err != nil {
5296		return nil, err
5297	}
5298	req.Header = reqHeaders
5299	googleapi.Expand(req.URL, map[string]string{
5300		"appsId":     c.appsId,
5301		"servicesId": c.servicesId,
5302		"versionsId": c.versionsId,
5303	})
5304	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5305}
5306
5307// Do executes the "appengine.apps.services.versions.instances.list" call.
5308// Exactly one of *ListInstancesResponse or error will be non-nil. Any
5309// non-2xx status code is an error. Response headers are in either
5310// *ListInstancesResponse.ServerResponse.Header or (if a response was
5311// returned at all) in error.(*googleapi.Error).Header. Use
5312// googleapi.IsNotModified to check whether the returned error was
5313// because http.StatusNotModified was returned.
5314func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) {
5315	gensupport.SetOptions(c.urlParams_, opts...)
5316	res, err := c.doRequest("json")
5317	if res != nil && res.StatusCode == http.StatusNotModified {
5318		if res.Body != nil {
5319			res.Body.Close()
5320		}
5321		return nil, &googleapi.Error{
5322			Code:   res.StatusCode,
5323			Header: res.Header,
5324		}
5325	}
5326	if err != nil {
5327		return nil, err
5328	}
5329	defer googleapi.CloseBody(res)
5330	if err := googleapi.CheckResponse(res); err != nil {
5331		return nil, err
5332	}
5333	ret := &ListInstancesResponse{
5334		ServerResponse: googleapi.ServerResponse{
5335			Header:         res.Header,
5336			HTTPStatusCode: res.StatusCode,
5337		},
5338	}
5339	target := &ret
5340	if err := gensupport.DecodeResponse(target, res); err != nil {
5341		return nil, err
5342	}
5343	return ret, nil
5344	// {
5345	//   "description": "Lists the instances of a version.",
5346	//   "httpMethod": "GET",
5347	//   "id": "appengine.apps.services.versions.instances.list",
5348	//   "parameterOrder": [
5349	//     "appsId",
5350	//     "servicesId",
5351	//     "versionsId"
5352	//   ],
5353	//   "parameters": {
5354	//     "appsId": {
5355	//       "description": "Part of `parent`. Name of the parent Version resource. Example: `apps/myapp/services/default/versions/v1`.",
5356	//       "location": "path",
5357	//       "required": true,
5358	//       "type": "string"
5359	//     },
5360	//     "pageSize": {
5361	//       "description": "Maximum results to return per page.",
5362	//       "format": "int32",
5363	//       "location": "query",
5364	//       "type": "integer"
5365	//     },
5366	//     "pageToken": {
5367	//       "description": "Continuation token for fetching the next page of results.",
5368	//       "location": "query",
5369	//       "type": "string"
5370	//     },
5371	//     "servicesId": {
5372	//       "description": "Part of `parent`. See documentation of `appsId`.",
5373	//       "location": "path",
5374	//       "required": true,
5375	//       "type": "string"
5376	//     },
5377	//     "versionsId": {
5378	//       "description": "Part of `parent`. See documentation of `appsId`.",
5379	//       "location": "path",
5380	//       "required": true,
5381	//       "type": "string"
5382	//     }
5383	//   },
5384	//   "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances",
5385	//   "response": {
5386	//     "$ref": "ListInstancesResponse"
5387	//   },
5388	//   "scopes": [
5389	//     "https://www.googleapis.com/auth/cloud-platform"
5390	//   ]
5391	// }
5392
5393}
5394
5395// Pages invokes f for each page of results.
5396// A non-nil error returned from f will halt the iteration.
5397// The provided context supersedes any context provided to the Context method.
5398func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error {
5399	c.ctx_ = ctx
5400	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5401	for {
5402		x, err := c.Do()
5403		if err != nil {
5404			return err
5405		}
5406		if err := f(x); err != nil {
5407			return err
5408		}
5409		if x.NextPageToken == "" {
5410			return nil
5411		}
5412		c.PageToken(x.NextPageToken)
5413	}
5414}
5415