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