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