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