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