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