1// Copyright 2019 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package appengine provides access to the App Engine Admin API. 8// 9// For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/appengine/v1beta" 16// ... 17// ctx := context.Background() 18// appengineService, err := appengine.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: 27// 28// appengineService, err := appengine.NewService(ctx, option.WithScopes(appengine.CloudPlatformReadOnlyScope)) 29// 30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 31// 32// appengineService, err := appengine.NewService(ctx, option.WithAPIKey("AIza...")) 33// 34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 35// 36// config := &oauth2.Config{...} 37// // ... 38// token, err := config.Exchange(ctx, ...) 39// appengineService, err := appengine.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 40// 41// See https://godoc.org/google.golang.org/api/option/ for details on options. 42package appengine // import "google.golang.org/api/appengine/v1beta" 43 44import ( 45 "bytes" 46 "context" 47 "encoding/json" 48 "errors" 49 "fmt" 50 "io" 51 "net/http" 52 "net/url" 53 "strconv" 54 "strings" 55 56 googleapi "google.golang.org/api/googleapi" 57 gensupport "google.golang.org/api/internal/gensupport" 58 option "google.golang.org/api/option" 59 htransport "google.golang.org/api/transport/http" 60) 61 62// Always reference these packages, just in case the auto-generated code 63// below doesn't. 64var _ = bytes.NewBuffer 65var _ = strconv.Itoa 66var _ = fmt.Sprintf 67var _ = json.NewDecoder 68var _ = io.Copy 69var _ = url.Parse 70var _ = gensupport.MarshalJSON 71var _ = googleapi.Version 72var _ = errors.New 73var _ = strings.Replace 74var _ = context.Canceled 75 76const apiId = "appengine:v1beta" 77const apiName = "appengine" 78const apiVersion = "v1beta" 79const basePath = "https://appengine.googleapis.com/" 80 81// OAuth2 scopes used by this API. 82const ( 83 // View and manage your applications deployed on Google App Engine 84 AppengineAdminScope = "https://www.googleapis.com/auth/appengine.admin" 85 86 // View and manage your data across Google Cloud Platform services 87 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 88 89 // View your data across Google Cloud Platform services 90 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" 91) 92 93// NewService creates a new APIService. 94func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 95 scopesOption := option.WithScopes( 96 "https://www.googleapis.com/auth/appengine.admin", 97 "https://www.googleapis.com/auth/cloud-platform", 98 "https://www.googleapis.com/auth/cloud-platform.read-only", 99 ) 100 // NOTE: prepend, so we don't override user-specified scopes. 101 opts = append([]option.ClientOption{scopesOption}, opts...) 102 client, endpoint, err := htransport.NewClient(ctx, opts...) 103 if err != nil { 104 return nil, err 105 } 106 s, err := New(client) 107 if err != nil { 108 return nil, err 109 } 110 if endpoint != "" { 111 s.BasePath = endpoint 112 } 113 return s, nil 114} 115 116// New creates a new APIService. It uses the provided http.Client for requests. 117// 118// Deprecated: please use NewService instead. 119// To provide a custom HTTP client, use option.WithHTTPClient. 120// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 121func New(client *http.Client) (*APIService, error) { 122 if client == nil { 123 return nil, errors.New("client is nil") 124 } 125 s := &APIService{client: client, BasePath: basePath} 126 s.Apps = NewAppsService(s) 127 return s, nil 128} 129 130type APIService struct { 131 client *http.Client 132 BasePath string // API endpoint base URL 133 UserAgent string // optional additional User-Agent fragment 134 135 Apps *AppsService 136} 137 138func (s *APIService) userAgent() string { 139 if s.UserAgent == "" { 140 return googleapi.UserAgent 141 } 142 return googleapi.UserAgent + " " + s.UserAgent 143} 144 145func NewAppsService(s *APIService) *AppsService { 146 rs := &AppsService{s: s} 147 rs.AuthorizedCertificates = NewAppsAuthorizedCertificatesService(s) 148 rs.AuthorizedDomains = NewAppsAuthorizedDomainsService(s) 149 rs.DomainMappings = NewAppsDomainMappingsService(s) 150 rs.Firewall = NewAppsFirewallService(s) 151 rs.Locations = NewAppsLocationsService(s) 152 rs.Operations = NewAppsOperationsService(s) 153 rs.Services = NewAppsServicesService(s) 154 return rs 155} 156 157type AppsService struct { 158 s *APIService 159 160 AuthorizedCertificates *AppsAuthorizedCertificatesService 161 162 AuthorizedDomains *AppsAuthorizedDomainsService 163 164 DomainMappings *AppsDomainMappingsService 165 166 Firewall *AppsFirewallService 167 168 Locations *AppsLocationsService 169 170 Operations *AppsOperationsService 171 172 Services *AppsServicesService 173} 174 175func NewAppsAuthorizedCertificatesService(s *APIService) *AppsAuthorizedCertificatesService { 176 rs := &AppsAuthorizedCertificatesService{s: s} 177 return rs 178} 179 180type AppsAuthorizedCertificatesService struct { 181 s *APIService 182} 183 184func NewAppsAuthorizedDomainsService(s *APIService) *AppsAuthorizedDomainsService { 185 rs := &AppsAuthorizedDomainsService{s: s} 186 return rs 187} 188 189type AppsAuthorizedDomainsService struct { 190 s *APIService 191} 192 193func NewAppsDomainMappingsService(s *APIService) *AppsDomainMappingsService { 194 rs := &AppsDomainMappingsService{s: s} 195 return rs 196} 197 198type AppsDomainMappingsService struct { 199 s *APIService 200} 201 202func NewAppsFirewallService(s *APIService) *AppsFirewallService { 203 rs := &AppsFirewallService{s: s} 204 rs.IngressRules = NewAppsFirewallIngressRulesService(s) 205 return rs 206} 207 208type AppsFirewallService struct { 209 s *APIService 210 211 IngressRules *AppsFirewallIngressRulesService 212} 213 214func NewAppsFirewallIngressRulesService(s *APIService) *AppsFirewallIngressRulesService { 215 rs := &AppsFirewallIngressRulesService{s: s} 216 return rs 217} 218 219type AppsFirewallIngressRulesService struct { 220 s *APIService 221} 222 223func NewAppsLocationsService(s *APIService) *AppsLocationsService { 224 rs := &AppsLocationsService{s: s} 225 return rs 226} 227 228type AppsLocationsService struct { 229 s *APIService 230} 231 232func NewAppsOperationsService(s *APIService) *AppsOperationsService { 233 rs := &AppsOperationsService{s: s} 234 return rs 235} 236 237type AppsOperationsService struct { 238 s *APIService 239} 240 241func NewAppsServicesService(s *APIService) *AppsServicesService { 242 rs := &AppsServicesService{s: s} 243 rs.Versions = NewAppsServicesVersionsService(s) 244 return rs 245} 246 247type AppsServicesService struct { 248 s *APIService 249 250 Versions *AppsServicesVersionsService 251} 252 253func NewAppsServicesVersionsService(s *APIService) *AppsServicesVersionsService { 254 rs := &AppsServicesVersionsService{s: s} 255 rs.Instances = NewAppsServicesVersionsInstancesService(s) 256 return rs 257} 258 259type AppsServicesVersionsService struct { 260 s *APIService 261 262 Instances *AppsServicesVersionsInstancesService 263} 264 265func NewAppsServicesVersionsInstancesService(s *APIService) *AppsServicesVersionsInstancesService { 266 rs := &AppsServicesVersionsInstancesService{s: s} 267 return rs 268} 269 270type AppsServicesVersionsInstancesService struct { 271 s *APIService 272} 273 274// ApiConfigHandler: Google Cloud Endpoints 275// (https://cloud.google.com/appengine/docs/python/endpoints/) 276// configuration for API handlers. 277type ApiConfigHandler struct { 278 // AuthFailAction: Action to take when users access resources that 279 // require authentication. Defaults to redirect. 280 // 281 // Possible values: 282 // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified. 283 // AUTH_FAIL_ACTION_REDIRECT is assumed. 284 // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to 285 // "accounts.google.com". The user is redirected back to the application 286 // URL after signing in or creating an account. 287 // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP 288 // status code and an error message. 289 AuthFailAction string `json:"authFailAction,omitempty"` 290 291 // Login: Level of login required to access this resource. Defaults to 292 // optional. 293 // 294 // Possible values: 295 // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed. 296 // "LOGIN_OPTIONAL" - Does not require that the user is signed in. 297 // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action 298 // is taken. In addition, if the user is not an administrator for the 299 // application, they are given an error message regardless of 300 // auth_fail_action. If the user is an administrator, the handler 301 // proceeds. 302 // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds 303 // normally. Otherwise, the auth_fail_action is taken. 304 Login string `json:"login,omitempty"` 305 306 // Script: Path to the script from the application root directory. 307 Script string `json:"script,omitempty"` 308 309 // SecurityLevel: Security (HTTPS) enforcement for this URL. 310 // 311 // Possible values: 312 // "SECURE_UNSPECIFIED" - Not specified. 313 // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that 314 // match the handler succeed without redirects. The application can 315 // examine the request to determine which protocol was used, and respond 316 // accordingly. 317 // "SECURE_NEVER" - Requests for a URL that match this handler that 318 // use HTTPS are automatically redirected to the HTTP equivalent URL. 319 // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that 320 // match the handler succeed without redirects. The application can 321 // examine the request to determine which protocol was used and respond 322 // accordingly. 323 // "SECURE_ALWAYS" - Requests for a URL that match this handler that 324 // do not use HTTPS are automatically redirected to the HTTPS URL with 325 // the same path. Query parameters are reserved for the redirect. 326 SecurityLevel string `json:"securityLevel,omitempty"` 327 328 // Url: URL to serve the endpoint at. 329 Url string `json:"url,omitempty"` 330 331 // ForceSendFields is a list of field names (e.g. "AuthFailAction") to 332 // unconditionally include in API requests. By default, fields with 333 // empty values are omitted from API requests. However, any non-pointer, 334 // non-interface field appearing in ForceSendFields will be sent to the 335 // server regardless of whether the field is empty or not. This may be 336 // used to include empty fields in Patch requests. 337 ForceSendFields []string `json:"-"` 338 339 // NullFields is a list of field names (e.g. "AuthFailAction") to 340 // include in API requests with the JSON null value. By default, fields 341 // with empty values are omitted from API requests. However, any field 342 // with an empty value appearing in NullFields will be sent to the 343 // server as null. It is an error if a field in this list has a 344 // non-empty value. This may be used to include null fields in Patch 345 // requests. 346 NullFields []string `json:"-"` 347} 348 349func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) { 350 type NoMethod ApiConfigHandler 351 raw := NoMethod(*s) 352 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 353} 354 355// ApiEndpointHandler: Uses Google Cloud Endpoints to handle requests. 356type ApiEndpointHandler struct { 357 // ScriptPath: Path to the script from the application root directory. 358 ScriptPath string `json:"scriptPath,omitempty"` 359 360 // ForceSendFields is a list of field names (e.g. "ScriptPath") to 361 // unconditionally include in API requests. By default, fields with 362 // empty values are omitted from API requests. However, any non-pointer, 363 // non-interface field appearing in ForceSendFields will be sent to the 364 // server regardless of whether the field is empty or not. This may be 365 // used to include empty fields in Patch requests. 366 ForceSendFields []string `json:"-"` 367 368 // NullFields is a list of field names (e.g. "ScriptPath") to include in 369 // API requests with the JSON null value. By default, fields with empty 370 // values are omitted from API requests. However, any field with an 371 // empty value appearing in NullFields will be sent to the server as 372 // null. It is an error if a field in this list has a non-empty value. 373 // This may be used to include null fields in Patch requests. 374 NullFields []string `json:"-"` 375} 376 377func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) { 378 type NoMethod ApiEndpointHandler 379 raw := NoMethod(*s) 380 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 381} 382 383// Application: An Application resource contains the top-level 384// configuration of an App Engine application. 385type Application struct { 386 // AuthDomain: Google Apps authentication domain that controls which 387 // users can access this application.Defaults to open access for any 388 // Google Account. 389 AuthDomain string `json:"authDomain,omitempty"` 390 391 // CodeBucket: Google Cloud Storage bucket that can be used for storing 392 // files associated with this application. This bucket is associated 393 // with the application and can be used by the gcloud deployment 394 // commands.@OutputOnly 395 CodeBucket string `json:"codeBucket,omitempty"` 396 397 // DefaultBucket: Google Cloud Storage bucket that can be used by this 398 // application to store content.@OutputOnly 399 DefaultBucket string `json:"defaultBucket,omitempty"` 400 401 // DefaultCookieExpiration: Cookie expiration policy for this 402 // application. 403 DefaultCookieExpiration string `json:"defaultCookieExpiration,omitempty"` 404 405 // DefaultHostname: Hostname used to reach this application, as resolved 406 // by App Engine.@OutputOnly 407 DefaultHostname string `json:"defaultHostname,omitempty"` 408 409 // DispatchRules: HTTP path dispatch rules for requests to the 410 // application that do not explicitly target a service or version. Rules 411 // are order-dependent. Up to 20 dispatch rules can be supported. 412 DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"` 413 414 // FeatureSettings: The feature specific settings to be used in the 415 // application. 416 FeatureSettings *FeatureSettings `json:"featureSettings,omitempty"` 417 418 // GcrDomain: The Google Container Registry domain used for storing 419 // managed build docker images for this application. 420 GcrDomain string `json:"gcrDomain,omitempty"` 421 422 Iap *IdentityAwareProxy `json:"iap,omitempty"` 423 424 // Id: Identifier of the Application resource. This identifier is 425 // equivalent to the project ID of the Google Cloud Platform project 426 // where you want to deploy your application. Example: myapp. 427 Id string `json:"id,omitempty"` 428 429 // LocationId: Location from which this application runs. Application 430 // instances run out of the data centers in the specified location, 431 // which is also where all of the application's end user content is 432 // stored.Defaults to us-central.View the list of supported locations 433 // (https://cloud.google.com/appengine/docs/locations). 434 LocationId string `json:"locationId,omitempty"` 435 436 // Name: Full path to the Application resource in the API. Example: 437 // apps/myapp.@OutputOnly 438 Name string `json:"name,omitempty"` 439 440 // ServingStatus: Serving status of this application. 441 // 442 // Possible values: 443 // "UNSPECIFIED" - Serving status is unspecified. 444 // "SERVING" - Application is serving. 445 // "USER_DISABLED" - Application has been disabled by the user. 446 // "SYSTEM_DISABLED" - Application has been disabled by the system. 447 ServingStatus string `json:"servingStatus,omitempty"` 448 449 // ServerResponse contains the HTTP response code and headers from the 450 // server. 451 googleapi.ServerResponse `json:"-"` 452 453 // ForceSendFields is a list of field names (e.g. "AuthDomain") to 454 // unconditionally include in API requests. By default, fields with 455 // empty values are omitted from API requests. However, any non-pointer, 456 // non-interface field appearing in ForceSendFields will be sent to the 457 // server regardless of whether the field is empty or not. This may be 458 // used to include empty fields in Patch requests. 459 ForceSendFields []string `json:"-"` 460 461 // NullFields is a list of field names (e.g. "AuthDomain") to include in 462 // API requests with the JSON null value. By default, fields with empty 463 // values are omitted from API requests. However, any field with an 464 // empty value appearing in NullFields will be sent to the server as 465 // null. It is an error if a field in this list has a non-empty value. 466 // This may be used to include null fields in Patch requests. 467 NullFields []string `json:"-"` 468} 469 470func (s *Application) MarshalJSON() ([]byte, error) { 471 type NoMethod Application 472 raw := NoMethod(*s) 473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 474} 475 476// AuthorizedCertificate: An SSL certificate that a user has been 477// authorized to administer. A user is authorized to administer any 478// certificate that applies to one of their authorized domains. 479type AuthorizedCertificate struct { 480 // CertificateRawData: The SSL certificate serving the 481 // AuthorizedCertificate resource. This must be obtained independently 482 // from a certificate authority. 483 CertificateRawData *CertificateRawData `json:"certificateRawData,omitempty"` 484 485 // DisplayName: The user-specified display name of the certificate. This 486 // is not guaranteed to be unique. Example: My Certificate. 487 DisplayName string `json:"displayName,omitempty"` 488 489 // DomainMappingsCount: Aggregate count of the domain mappings with this 490 // certificate mapped. This count includes domain mappings on 491 // applications for which the user does not have VIEWER permissions.Only 492 // returned by GET or LIST requests when specifically requested by the 493 // view=FULL_CERTIFICATE option.@OutputOnly 494 DomainMappingsCount int64 `json:"domainMappingsCount,omitempty"` 495 496 // DomainNames: Topmost applicable domains of this certificate. This 497 // certificate applies to these domains and their subdomains. Example: 498 // example.com.@OutputOnly 499 DomainNames []string `json:"domainNames,omitempty"` 500 501 // ExpireTime: The time when this certificate expires. To update the 502 // renewal time on this certificate, upload an SSL certificate with a 503 // different expiration time using 504 // AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly 505 ExpireTime string `json:"expireTime,omitempty"` 506 507 // Id: Relative name of the certificate. This is a unique value 508 // autogenerated on AuthorizedCertificate resource creation. Example: 509 // 12345.@OutputOnly 510 Id string `json:"id,omitempty"` 511 512 // ManagedCertificate: Only applicable if this certificate is managed by 513 // App Engine. Managed certificates are tied to the lifecycle of a 514 // DomainMapping and cannot be updated or deleted via the 515 // AuthorizedCertificates API. If this certificate is manually 516 // administered by the user, this field will be empty.@OutputOnly 517 ManagedCertificate *ManagedCertificate `json:"managedCertificate,omitempty"` 518 519 // Name: Full path to the AuthorizedCertificate resource in the API. 520 // Example: apps/myapp/authorizedCertificates/12345.@OutputOnly 521 Name string `json:"name,omitempty"` 522 523 // VisibleDomainMappings: The full paths to user visible Domain Mapping 524 // resources that have this certificate mapped. Example: 525 // apps/myapp/domainMappings/example.com.This may not represent the full 526 // list of mapped domain mappings if the user does not have VIEWER 527 // permissions on all of the applications that have this certificate 528 // mapped. See domain_mappings_count for a complete count.Only returned 529 // by GET or LIST requests when specifically requested by the 530 // view=FULL_CERTIFICATE option.@OutputOnly 531 VisibleDomainMappings []string `json:"visibleDomainMappings,omitempty"` 532 533 // ServerResponse contains the HTTP response code and headers from the 534 // server. 535 googleapi.ServerResponse `json:"-"` 536 537 // ForceSendFields is a list of field names (e.g. "CertificateRawData") 538 // to unconditionally include in API requests. By default, fields with 539 // empty values are omitted from API requests. However, any non-pointer, 540 // non-interface field appearing in ForceSendFields will be sent to the 541 // server regardless of whether the field is empty or not. This may be 542 // used to include empty fields in Patch requests. 543 ForceSendFields []string `json:"-"` 544 545 // NullFields is a list of field names (e.g. "CertificateRawData") to 546 // include in API requests with the JSON null value. By default, fields 547 // with empty values are omitted from API requests. However, any field 548 // with an empty value appearing in NullFields will be sent to the 549 // server as null. It is an error if a field in this list has a 550 // non-empty value. This may be used to include null fields in Patch 551 // requests. 552 NullFields []string `json:"-"` 553} 554 555func (s *AuthorizedCertificate) MarshalJSON() ([]byte, error) { 556 type NoMethod AuthorizedCertificate 557 raw := NoMethod(*s) 558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 559} 560 561// AuthorizedDomain: A domain that a user has been authorized to 562// administer. To authorize use of a domain, verify ownership via 563// Webmaster Central 564// (https://www.google.com/webmasters/verification/home). 565type AuthorizedDomain struct { 566 // Id: Fully qualified domain name of the domain authorized for use. 567 // Example: example.com. 568 Id string `json:"id,omitempty"` 569 570 // Name: Full path to the AuthorizedDomain resource in the API. Example: 571 // apps/myapp/authorizedDomains/example.com.@OutputOnly 572 Name string `json:"name,omitempty"` 573 574 // ForceSendFields is a list of field names (e.g. "Id") to 575 // unconditionally include in API requests. By default, fields with 576 // empty values are omitted from API requests. However, any non-pointer, 577 // non-interface field appearing in ForceSendFields will be sent to the 578 // server regardless of whether the field is empty or not. This may be 579 // used to include empty fields in Patch requests. 580 ForceSendFields []string `json:"-"` 581 582 // NullFields is a list of field names (e.g. "Id") to include in API 583 // requests with the JSON null value. By default, fields with empty 584 // values are omitted from API requests. However, any field with an 585 // empty value appearing in NullFields will be sent to the server as 586 // null. It is an error if a field in this list has a non-empty value. 587 // This may be used to include null fields in Patch requests. 588 NullFields []string `json:"-"` 589} 590 591func (s *AuthorizedDomain) MarshalJSON() ([]byte, error) { 592 type NoMethod AuthorizedDomain 593 raw := NoMethod(*s) 594 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 595} 596 597// AutomaticScaling: Automatic scaling is based on request rate, 598// response latencies, and other application metrics. 599type AutomaticScaling struct { 600 // CoolDownPeriod: The time period that the Autoscaler 601 // (https://cloud.google.com/compute/docs/autoscaler/) should wait 602 // before it starts collecting information from a new instance. This 603 // prevents the autoscaler from collecting information when the instance 604 // is initializing, during which the collected usage would not be 605 // reliable. Only applicable in the App Engine flexible environment. 606 CoolDownPeriod string `json:"coolDownPeriod,omitempty"` 607 608 // CpuUtilization: Target scaling by CPU usage. 609 CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"` 610 611 // CustomMetrics: Target scaling by user-provided metrics. Only 612 // applicable in the App Engine flexible environment. 613 CustomMetrics []*CustomMetric `json:"customMetrics,omitempty"` 614 615 // DiskUtilization: Target scaling by disk usage. 616 DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"` 617 618 // MaxConcurrentRequests: Number of concurrent requests an automatic 619 // scaling instance can accept before the scheduler spawns a new 620 // instance.Defaults to a runtime-specific value. 621 MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"` 622 623 // MaxIdleInstances: Maximum number of idle instances that should be 624 // maintained for this version. 625 MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"` 626 627 // MaxPendingLatency: Maximum amount of time that a request should wait 628 // in the pending queue before starting a new instance to handle it. 629 MaxPendingLatency string `json:"maxPendingLatency,omitempty"` 630 631 // MaxTotalInstances: Maximum number of instances that should be started 632 // to handle requests for this version. 633 MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"` 634 635 // MinIdleInstances: Minimum number of idle instances that should be 636 // maintained for this version. Only applicable for the default version 637 // of a service. 638 MinIdleInstances int64 `json:"minIdleInstances,omitempty"` 639 640 // MinPendingLatency: Minimum amount of time a request should wait in 641 // the pending queue before starting a new instance to handle it. 642 MinPendingLatency string `json:"minPendingLatency,omitempty"` 643 644 // MinTotalInstances: Minimum number of running instances that should be 645 // maintained for this version. 646 MinTotalInstances int64 `json:"minTotalInstances,omitempty"` 647 648 // NetworkUtilization: Target scaling by network usage. 649 NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"` 650 651 // RequestUtilization: Target scaling by request utilization. 652 RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"` 653 654 // StandardSchedulerSettings: Scheduler settings for standard 655 // environment. 656 StandardSchedulerSettings *StandardSchedulerSettings `json:"standardSchedulerSettings,omitempty"` 657 658 // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to 659 // unconditionally include in API requests. By default, fields with 660 // empty values are omitted from API requests. However, any non-pointer, 661 // non-interface field appearing in ForceSendFields will be sent to the 662 // server regardless of whether the field is empty or not. This may be 663 // used to include empty fields in Patch requests. 664 ForceSendFields []string `json:"-"` 665 666 // NullFields is a list of field names (e.g. "CoolDownPeriod") to 667 // include in API requests with the JSON null value. By default, fields 668 // with empty values are omitted from API requests. However, any field 669 // with an empty value appearing in NullFields will be sent to the 670 // server as null. It is an error if a field in this list has a 671 // non-empty value. This may be used to include null fields in Patch 672 // requests. 673 NullFields []string `json:"-"` 674} 675 676func (s *AutomaticScaling) MarshalJSON() ([]byte, error) { 677 type NoMethod AutomaticScaling 678 raw := NoMethod(*s) 679 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 680} 681 682// BasicScaling: A service with basic scaling will create an instance 683// when the application receives a request. The instance will be turned 684// down when the app becomes idle. Basic scaling is ideal for work that 685// is intermittent or driven by user activity. 686type BasicScaling struct { 687 // IdleTimeout: Duration of time after the last request that an instance 688 // must wait before the instance is shut down. 689 IdleTimeout string `json:"idleTimeout,omitempty"` 690 691 // MaxInstances: Maximum number of instances to create for this version. 692 MaxInstances int64 `json:"maxInstances,omitempty"` 693 694 // ForceSendFields is a list of field names (e.g. "IdleTimeout") to 695 // unconditionally include in API requests. By default, fields with 696 // empty values are omitted from API requests. However, any non-pointer, 697 // non-interface field appearing in ForceSendFields will be sent to the 698 // server regardless of whether the field is empty or not. This may be 699 // used to include empty fields in Patch requests. 700 ForceSendFields []string `json:"-"` 701 702 // NullFields is a list of field names (e.g. "IdleTimeout") to include 703 // in API requests with the JSON null value. By default, fields with 704 // empty values are omitted from API requests. However, any field with 705 // an empty value appearing in NullFields will be sent to the server as 706 // null. It is an error if a field in this list has a non-empty value. 707 // This may be used to include null fields in Patch requests. 708 NullFields []string `json:"-"` 709} 710 711func (s *BasicScaling) MarshalJSON() ([]byte, error) { 712 type NoMethod BasicScaling 713 raw := NoMethod(*s) 714 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 715} 716 717// BatchUpdateIngressRulesRequest: Request message for 718// Firewall.BatchUpdateIngressRules. 719type BatchUpdateIngressRulesRequest struct { 720 // IngressRules: A list of FirewallRules to replace the existing set. 721 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 722 723 // ForceSendFields is a list of field names (e.g. "IngressRules") to 724 // unconditionally include in API requests. By default, fields with 725 // empty values are omitted from API requests. However, any non-pointer, 726 // non-interface field appearing in ForceSendFields will be sent to the 727 // server regardless of whether the field is empty or not. This may be 728 // used to include empty fields in Patch requests. 729 ForceSendFields []string `json:"-"` 730 731 // NullFields is a list of field names (e.g. "IngressRules") to include 732 // in API requests with the JSON null value. By default, fields with 733 // empty values are omitted from API requests. However, any field with 734 // an empty value appearing in NullFields will be sent to the server as 735 // null. It is an error if a field in this list has a non-empty value. 736 // This may be used to include null fields in Patch requests. 737 NullFields []string `json:"-"` 738} 739 740func (s *BatchUpdateIngressRulesRequest) MarshalJSON() ([]byte, error) { 741 type NoMethod BatchUpdateIngressRulesRequest 742 raw := NoMethod(*s) 743 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 744} 745 746// BatchUpdateIngressRulesResponse: Response message for 747// Firewall.UpdateAllIngressRules. 748type BatchUpdateIngressRulesResponse struct { 749 // IngressRules: The full list of ingress FirewallRules for this 750 // application. 751 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 752 753 // ServerResponse contains the HTTP response code and headers from the 754 // server. 755 googleapi.ServerResponse `json:"-"` 756 757 // ForceSendFields is a list of field names (e.g. "IngressRules") to 758 // unconditionally include in API requests. By default, fields with 759 // empty values are omitted from API requests. However, any non-pointer, 760 // non-interface field appearing in ForceSendFields will be sent to the 761 // server regardless of whether the field is empty or not. This may be 762 // used to include empty fields in Patch requests. 763 ForceSendFields []string `json:"-"` 764 765 // NullFields is a list of field names (e.g. "IngressRules") to include 766 // in API requests with the JSON null value. By default, fields with 767 // empty values are omitted from API requests. However, any field with 768 // an empty value appearing in NullFields will be sent to the server as 769 // null. It is an error if a field in this list has a non-empty value. 770 // This may be used to include null fields in Patch requests. 771 NullFields []string `json:"-"` 772} 773 774func (s *BatchUpdateIngressRulesResponse) MarshalJSON() ([]byte, error) { 775 type NoMethod BatchUpdateIngressRulesResponse 776 raw := NoMethod(*s) 777 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 778} 779 780// BuildInfo: Google Cloud Build information. 781type BuildInfo struct { 782 // CloudBuildId: The Google Cloud Build id. Example: 783 // "f966068f-08b2-42c8-bdfe-74137dff2bf9" 784 CloudBuildId string `json:"cloudBuildId,omitempty"` 785 786 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 787 // unconditionally include in API requests. By default, fields with 788 // empty values are omitted from API requests. However, any non-pointer, 789 // non-interface field appearing in ForceSendFields will be sent to the 790 // server regardless of whether the field is empty or not. This may be 791 // used to include empty fields in Patch requests. 792 ForceSendFields []string `json:"-"` 793 794 // NullFields is a list of field names (e.g. "CloudBuildId") to include 795 // in API requests with the JSON null value. By default, fields with 796 // empty values are omitted from API requests. However, any field with 797 // an empty value appearing in NullFields will be sent to the server as 798 // null. It is an error if a field in this list has a non-empty value. 799 // This may be used to include null fields in Patch requests. 800 NullFields []string `json:"-"` 801} 802 803func (s *BuildInfo) MarshalJSON() ([]byte, error) { 804 type NoMethod BuildInfo 805 raw := NoMethod(*s) 806 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 807} 808 809// CertificateRawData: An SSL certificate obtained from a certificate 810// authority. 811type CertificateRawData struct { 812 // PrivateKey: Unencrypted PEM encoded RSA private key. This field is 813 // set once on certificate creation and then encrypted. The key size 814 // must be 2048 bits or fewer. Must include the header and footer. 815 // Example: <pre> -----BEGIN RSA PRIVATE KEY----- 816 // <unencrypted_key_value> -----END RSA PRIVATE KEY----- </pre> 817 // @InputOnly 818 PrivateKey string `json:"privateKey,omitempty"` 819 820 // PublicCertificate: PEM encoded x.509 public key certificate. This 821 // field is set once on certificate creation. Must include the header 822 // and footer. Example: <pre> -----BEGIN CERTIFICATE----- 823 // <certificate_value> -----END CERTIFICATE----- </pre> 824 PublicCertificate string `json:"publicCertificate,omitempty"` 825 826 // ForceSendFields is a list of field names (e.g. "PrivateKey") to 827 // unconditionally include in API requests. By default, fields with 828 // empty values are omitted from API requests. However, any non-pointer, 829 // non-interface field appearing in ForceSendFields will be sent to the 830 // server regardless of whether the field is empty or not. This may be 831 // used to include empty fields in Patch requests. 832 ForceSendFields []string `json:"-"` 833 834 // NullFields is a list of field names (e.g. "PrivateKey") to include in 835 // API requests with the JSON null value. By default, fields with empty 836 // values are omitted from API requests. However, any field with an 837 // empty value appearing in NullFields will be sent to the server as 838 // null. It is an error if a field in this list has a non-empty value. 839 // This may be used to include null fields in Patch requests. 840 NullFields []string `json:"-"` 841} 842 843func (s *CertificateRawData) MarshalJSON() ([]byte, error) { 844 type NoMethod CertificateRawData 845 raw := NoMethod(*s) 846 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 847} 848 849// CloudBuildOptions: Options for the build operations performed as a 850// part of the version deployment. Only applicable for App Engine 851// flexible environment when creating a version using source code 852// directly. 853type CloudBuildOptions struct { 854 // AppYamlPath: Path to the yaml file used in deployment, used to 855 // determine runtime configuration details.Required for flexible 856 // environment builds.See 857 // https://cloud.google.com/appengine/docs/standard/python/config/appref 858 // for more details. 859 AppYamlPath string `json:"appYamlPath,omitempty"` 860 861 // CloudBuildTimeout: The Cloud Build timeout used as part of any 862 // dependent builds performed by version creation. Defaults to 10 863 // minutes. 864 CloudBuildTimeout string `json:"cloudBuildTimeout,omitempty"` 865 866 // ForceSendFields is a list of field names (e.g. "AppYamlPath") to 867 // unconditionally include in API requests. By default, fields with 868 // empty values are omitted from API requests. However, any non-pointer, 869 // non-interface field appearing in ForceSendFields will be sent to the 870 // server regardless of whether the field is empty or not. This may be 871 // used to include empty fields in Patch requests. 872 ForceSendFields []string `json:"-"` 873 874 // NullFields is a list of field names (e.g. "AppYamlPath") to include 875 // in API requests with the JSON null value. By default, fields with 876 // empty values are omitted from API requests. However, any field with 877 // an empty value appearing in NullFields will be sent to the server as 878 // null. It is an error if a field in this list has a non-empty value. 879 // This may be used to include null fields in Patch requests. 880 NullFields []string `json:"-"` 881} 882 883func (s *CloudBuildOptions) MarshalJSON() ([]byte, error) { 884 type NoMethod CloudBuildOptions 885 raw := NoMethod(*s) 886 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 887} 888 889// ContainerInfo: Docker image that is used to create a container and 890// start a VM instance for the version that you deploy. Only applicable 891// for instances running in the App Engine flexible environment. 892type ContainerInfo struct { 893 // Image: URI to the hosted container image in Google Container 894 // Registry. The URI must be fully qualified and include a tag or 895 // digest. Examples: "gcr.io/my-project/image:tag" or 896 // "gcr.io/my-project/image@digest" 897 Image string `json:"image,omitempty"` 898 899 // ForceSendFields is a list of field names (e.g. "Image") to 900 // unconditionally include in API requests. By default, fields with 901 // empty values are omitted from API requests. However, any non-pointer, 902 // non-interface field appearing in ForceSendFields will be sent to the 903 // server regardless of whether the field is empty or not. This may be 904 // used to include empty fields in Patch requests. 905 ForceSendFields []string `json:"-"` 906 907 // NullFields is a list of field names (e.g. "Image") to include in API 908 // requests with the JSON null value. By default, fields with empty 909 // values are omitted from API requests. However, any field with an 910 // empty value appearing in NullFields will be sent to the server as 911 // null. It is an error if a field in this list has a non-empty value. 912 // This may be used to include null fields in Patch requests. 913 NullFields []string `json:"-"` 914} 915 916func (s *ContainerInfo) MarshalJSON() ([]byte, error) { 917 type NoMethod ContainerInfo 918 raw := NoMethod(*s) 919 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 920} 921 922// CpuUtilization: Target scaling by CPU usage. 923type CpuUtilization struct { 924 // AggregationWindowLength: Period of time over which CPU utilization is 925 // calculated. 926 AggregationWindowLength string `json:"aggregationWindowLength,omitempty"` 927 928 // TargetUtilization: Target CPU utilization ratio to maintain when 929 // scaling. Must be between 0 and 1. 930 TargetUtilization float64 `json:"targetUtilization,omitempty"` 931 932 // ForceSendFields is a list of field names (e.g. 933 // "AggregationWindowLength") to unconditionally include in API 934 // requests. By default, fields with empty values are omitted from API 935 // requests. However, any non-pointer, non-interface field appearing in 936 // ForceSendFields will be sent to the server regardless of whether the 937 // field is empty or not. This may be used to include empty fields in 938 // Patch requests. 939 ForceSendFields []string `json:"-"` 940 941 // NullFields is a list of field names (e.g. "AggregationWindowLength") 942 // to include in API requests with the JSON null value. By default, 943 // fields with empty values are omitted from API requests. However, any 944 // field with an empty value appearing in NullFields will be sent to the 945 // server as null. It is an error if a field in this list has a 946 // non-empty value. This may be used to include null fields in Patch 947 // requests. 948 NullFields []string `json:"-"` 949} 950 951func (s *CpuUtilization) MarshalJSON() ([]byte, error) { 952 type NoMethod CpuUtilization 953 raw := NoMethod(*s) 954 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 955} 956 957func (s *CpuUtilization) UnmarshalJSON(data []byte) error { 958 type NoMethod CpuUtilization 959 var s1 struct { 960 TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"` 961 *NoMethod 962 } 963 s1.NoMethod = (*NoMethod)(s) 964 if err := json.Unmarshal(data, &s1); err != nil { 965 return err 966 } 967 s.TargetUtilization = float64(s1.TargetUtilization) 968 return nil 969} 970 971// CreateVersionMetadataV1: Metadata for the given 972// google.longrunning.Operation during a 973// google.appengine.v1.CreateVersionRequest. 974type CreateVersionMetadataV1 struct { 975 // CloudBuildId: The Cloud Build ID if one was created as part of the 976 // version create. @OutputOnly 977 CloudBuildId string `json:"cloudBuildId,omitempty"` 978 979 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 980 // unconditionally include in API requests. By default, fields with 981 // empty values are omitted from API requests. However, any non-pointer, 982 // non-interface field appearing in ForceSendFields will be sent to the 983 // server regardless of whether the field is empty or not. This may be 984 // used to include empty fields in Patch requests. 985 ForceSendFields []string `json:"-"` 986 987 // NullFields is a list of field names (e.g. "CloudBuildId") to include 988 // in API requests with the JSON null value. By default, fields with 989 // empty values are omitted from API requests. However, any field with 990 // an empty value appearing in NullFields will be sent to the server as 991 // null. It is an error if a field in this list has a non-empty value. 992 // This may be used to include null fields in Patch requests. 993 NullFields []string `json:"-"` 994} 995 996func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) { 997 type NoMethod CreateVersionMetadataV1 998 raw := NoMethod(*s) 999 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1000} 1001 1002// CreateVersionMetadataV1Alpha: Metadata for the given 1003// google.longrunning.Operation during a 1004// google.appengine.v1alpha.CreateVersionRequest. 1005type CreateVersionMetadataV1Alpha struct { 1006 // CloudBuildId: The Cloud Build ID if one was created as part of the 1007 // version create. @OutputOnly 1008 CloudBuildId string `json:"cloudBuildId,omitempty"` 1009 1010 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 1011 // unconditionally include in API requests. By default, fields with 1012 // empty values are omitted from API requests. However, any non-pointer, 1013 // non-interface field appearing in ForceSendFields will be sent to the 1014 // server regardless of whether the field is empty or not. This may be 1015 // used to include empty fields in Patch requests. 1016 ForceSendFields []string `json:"-"` 1017 1018 // NullFields is a list of field names (e.g. "CloudBuildId") to include 1019 // in API requests with the JSON null value. By default, fields with 1020 // empty values are omitted from API requests. However, any field with 1021 // an empty value appearing in NullFields will be sent to the server as 1022 // null. It is an error if a field in this list has a non-empty value. 1023 // This may be used to include null fields in Patch requests. 1024 NullFields []string `json:"-"` 1025} 1026 1027func (s *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) { 1028 type NoMethod CreateVersionMetadataV1Alpha 1029 raw := NoMethod(*s) 1030 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1031} 1032 1033// CreateVersionMetadataV1Beta: Metadata for the given 1034// google.longrunning.Operation during a 1035// google.appengine.v1beta.CreateVersionRequest. 1036type CreateVersionMetadataV1Beta struct { 1037 // CloudBuildId: The Cloud Build ID if one was created as part of the 1038 // version create. @OutputOnly 1039 CloudBuildId string `json:"cloudBuildId,omitempty"` 1040 1041 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 1042 // unconditionally include in API requests. By default, fields with 1043 // empty values are omitted from API requests. However, any non-pointer, 1044 // non-interface field appearing in ForceSendFields will be sent to the 1045 // server regardless of whether the field is empty or not. This may be 1046 // used to include empty fields in Patch requests. 1047 ForceSendFields []string `json:"-"` 1048 1049 // NullFields is a list of field names (e.g. "CloudBuildId") to include 1050 // in API requests with the JSON null value. By default, fields with 1051 // empty values are omitted from API requests. However, any field with 1052 // an empty value appearing in NullFields will be sent to the server as 1053 // null. It is an error if a field in this list has a non-empty value. 1054 // This may be used to include null fields in Patch requests. 1055 NullFields []string `json:"-"` 1056} 1057 1058func (s *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) { 1059 type NoMethod CreateVersionMetadataV1Beta 1060 raw := NoMethod(*s) 1061 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1062} 1063 1064// CustomMetric: Allows autoscaling based on Stackdriver metrics. 1065type CustomMetric struct { 1066 // Filter: Allows filtering on the metric's fields. 1067 Filter string `json:"filter,omitempty"` 1068 1069 // MetricName: The name of the metric. 1070 MetricName string `json:"metricName,omitempty"` 1071 1072 // SingleInstanceAssignment: May be used instead of target_utilization 1073 // when an instance can handle a specific amount of work/resources and 1074 // the metric value is equal to the current amount of work remaining. 1075 // The autoscaler will try to keep the number of instances equal to the 1076 // metric value divided by single_instance_assignment. 1077 SingleInstanceAssignment float64 `json:"singleInstanceAssignment,omitempty"` 1078 1079 // TargetType: The type of the metric. Must be a string representing a 1080 // Stackdriver metric type e.g. GAGUE, DELTA_PER_SECOND, etc. 1081 TargetType string `json:"targetType,omitempty"` 1082 1083 // TargetUtilization: The target value for the metric. 1084 TargetUtilization float64 `json:"targetUtilization,omitempty"` 1085 1086 // ForceSendFields is a list of field names (e.g. "Filter") to 1087 // unconditionally include in API requests. By default, fields with 1088 // empty values are omitted from API requests. However, any non-pointer, 1089 // non-interface field appearing in ForceSendFields will be sent to the 1090 // server regardless of whether the field is empty or not. This may be 1091 // used to include empty fields in Patch requests. 1092 ForceSendFields []string `json:"-"` 1093 1094 // NullFields is a list of field names (e.g. "Filter") to include in API 1095 // requests with the JSON null value. By default, fields with empty 1096 // values are omitted from API requests. However, any field with an 1097 // empty value appearing in NullFields will be sent to the server as 1098 // null. It is an error if a field in this list has a non-empty value. 1099 // This may be used to include null fields in Patch requests. 1100 NullFields []string `json:"-"` 1101} 1102 1103func (s *CustomMetric) MarshalJSON() ([]byte, error) { 1104 type NoMethod CustomMetric 1105 raw := NoMethod(*s) 1106 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1107} 1108 1109func (s *CustomMetric) UnmarshalJSON(data []byte) error { 1110 type NoMethod CustomMetric 1111 var s1 struct { 1112 SingleInstanceAssignment gensupport.JSONFloat64 `json:"singleInstanceAssignment"` 1113 TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"` 1114 *NoMethod 1115 } 1116 s1.NoMethod = (*NoMethod)(s) 1117 if err := json.Unmarshal(data, &s1); err != nil { 1118 return err 1119 } 1120 s.SingleInstanceAssignment = float64(s1.SingleInstanceAssignment) 1121 s.TargetUtilization = float64(s1.TargetUtilization) 1122 return nil 1123} 1124 1125// DebugInstanceRequest: Request message for Instances.DebugInstance. 1126type DebugInstanceRequest struct { 1127 // SshKey: Public SSH key to add to the instance. 1128 // Examples: 1129 // [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] 1130 // [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh 1131 // {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more 1132 // information, see Adding and Removing SSH Keys 1133 // (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-k 1134 // eys). 1135 SshKey string `json:"sshKey,omitempty"` 1136 1137 // ForceSendFields is a list of field names (e.g. "SshKey") to 1138 // unconditionally include in API requests. By default, fields with 1139 // empty values are omitted from API requests. However, any non-pointer, 1140 // non-interface field appearing in ForceSendFields will be sent to the 1141 // server regardless of whether the field is empty or not. This may be 1142 // used to include empty fields in Patch requests. 1143 ForceSendFields []string `json:"-"` 1144 1145 // NullFields is a list of field names (e.g. "SshKey") to include in API 1146 // requests with the JSON null value. By default, fields with empty 1147 // values are omitted from API requests. However, any field with an 1148 // empty value appearing in NullFields will be sent to the server as 1149 // null. It is an error if a field in this list has a non-empty value. 1150 // This may be used to include null fields in Patch requests. 1151 NullFields []string `json:"-"` 1152} 1153 1154func (s *DebugInstanceRequest) MarshalJSON() ([]byte, error) { 1155 type NoMethod DebugInstanceRequest 1156 raw := NoMethod(*s) 1157 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1158} 1159 1160// Deployment: Code and application artifacts used to deploy a version 1161// to App Engine. 1162type Deployment struct { 1163 // Build: Google Cloud Build build information. Only applicable for 1164 // instances running in the App Engine flexible environment. 1165 Build *BuildInfo `json:"build,omitempty"` 1166 1167 // CloudBuildOptions: Options for any Google Cloud Build builds created 1168 // as a part of this deployment.These options will only be used if a new 1169 // build is created, such as when deploying to the App Engine flexible 1170 // environment using files or zip. 1171 CloudBuildOptions *CloudBuildOptions `json:"cloudBuildOptions,omitempty"` 1172 1173 // Container: The Docker image for the container that runs the version. 1174 // Only applicable for instances running in the App Engine flexible 1175 // environment. 1176 Container *ContainerInfo `json:"container,omitempty"` 1177 1178 // Files: Manifest of the files stored in Google Cloud Storage that are 1179 // included as part of this version. All files must be readable using 1180 // the credentials supplied with this call. 1181 Files map[string]FileInfo `json:"files,omitempty"` 1182 1183 // Zip: The zip file for this deployment, if this is a zip deployment. 1184 Zip *ZipInfo `json:"zip,omitempty"` 1185 1186 // ForceSendFields is a list of field names (e.g. "Build") to 1187 // unconditionally include in API requests. By default, fields with 1188 // empty values are omitted from API requests. However, any non-pointer, 1189 // non-interface field appearing in ForceSendFields will be sent to the 1190 // server regardless of whether the field is empty or not. This may be 1191 // used to include empty fields in Patch requests. 1192 ForceSendFields []string `json:"-"` 1193 1194 // NullFields is a list of field names (e.g. "Build") to include in API 1195 // requests with the JSON null value. By default, fields with empty 1196 // values are omitted from API requests. However, any field with an 1197 // empty value appearing in NullFields will be sent to the server as 1198 // null. It is an error if a field in this list has a non-empty value. 1199 // This may be used to include null fields in Patch requests. 1200 NullFields []string `json:"-"` 1201} 1202 1203func (s *Deployment) MarshalJSON() ([]byte, error) { 1204 type NoMethod Deployment 1205 raw := NoMethod(*s) 1206 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1207} 1208 1209// DiskUtilization: Target scaling by disk usage. Only applicable in the 1210// App Engine flexible environment. 1211type DiskUtilization struct { 1212 // TargetReadBytesPerSecond: Target bytes read per second. 1213 TargetReadBytesPerSecond int64 `json:"targetReadBytesPerSecond,omitempty"` 1214 1215 // TargetReadOpsPerSecond: Target ops read per seconds. 1216 TargetReadOpsPerSecond int64 `json:"targetReadOpsPerSecond,omitempty"` 1217 1218 // TargetWriteBytesPerSecond: Target bytes written per second. 1219 TargetWriteBytesPerSecond int64 `json:"targetWriteBytesPerSecond,omitempty"` 1220 1221 // TargetWriteOpsPerSecond: Target ops written per second. 1222 TargetWriteOpsPerSecond int64 `json:"targetWriteOpsPerSecond,omitempty"` 1223 1224 // ForceSendFields is a list of field names (e.g. 1225 // "TargetReadBytesPerSecond") to unconditionally include in API 1226 // requests. By default, fields with empty values are omitted from API 1227 // requests. However, any non-pointer, non-interface field appearing in 1228 // ForceSendFields will be sent to the server regardless of whether the 1229 // field is empty or not. This may be used to include empty fields in 1230 // Patch requests. 1231 ForceSendFields []string `json:"-"` 1232 1233 // NullFields is a list of field names (e.g. "TargetReadBytesPerSecond") 1234 // to include in API requests with the JSON null value. By default, 1235 // fields with empty values are omitted from API requests. However, any 1236 // field with an empty value appearing in NullFields will be sent to the 1237 // server as null. It is an error if a field in this list has a 1238 // non-empty value. This may be used to include null fields in Patch 1239 // requests. 1240 NullFields []string `json:"-"` 1241} 1242 1243func (s *DiskUtilization) MarshalJSON() ([]byte, error) { 1244 type NoMethod DiskUtilization 1245 raw := NoMethod(*s) 1246 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1247} 1248 1249// DomainMapping: A domain serving an App Engine application. 1250type DomainMapping struct { 1251 // Id: Relative name of the domain serving the application. Example: 1252 // example.com. 1253 Id string `json:"id,omitempty"` 1254 1255 // Name: Full path to the DomainMapping resource in the API. Example: 1256 // apps/myapp/domainMapping/example.com.@OutputOnly 1257 Name string `json:"name,omitempty"` 1258 1259 // ResourceRecords: The resource records required to configure this 1260 // domain mapping. These records must be added to the domain's DNS 1261 // configuration in order to serve the application via this domain 1262 // mapping.@OutputOnly 1263 ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"` 1264 1265 // SslSettings: SSL configuration for this domain. If unconfigured, this 1266 // domain will not serve with SSL. 1267 SslSettings *SslSettings `json:"sslSettings,omitempty"` 1268 1269 // ServerResponse contains the HTTP response code and headers from the 1270 // server. 1271 googleapi.ServerResponse `json:"-"` 1272 1273 // ForceSendFields is a list of field names (e.g. "Id") to 1274 // unconditionally include in API requests. By default, fields with 1275 // empty values are omitted from API requests. However, any non-pointer, 1276 // non-interface field appearing in ForceSendFields will be sent to the 1277 // server regardless of whether the field is empty or not. This may be 1278 // used to include empty fields in Patch requests. 1279 ForceSendFields []string `json:"-"` 1280 1281 // NullFields is a list of field names (e.g. "Id") to include in API 1282 // requests with the JSON null value. By default, fields with empty 1283 // values are omitted from API requests. However, any field with an 1284 // empty value appearing in NullFields will be sent to the server as 1285 // null. It is an error if a field in this list has a non-empty value. 1286 // This may be used to include null fields in Patch requests. 1287 NullFields []string `json:"-"` 1288} 1289 1290func (s *DomainMapping) MarshalJSON() ([]byte, error) { 1291 type NoMethod DomainMapping 1292 raw := NoMethod(*s) 1293 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1294} 1295 1296// Empty: A generic empty message that you can re-use to avoid defining 1297// duplicated empty messages in your APIs. A typical example is to use 1298// it as the request or the response type of an API method. For 1299// instance: 1300// service Foo { 1301// rpc Bar(google.protobuf.Empty) returns 1302// (google.protobuf.Empty); 1303// } 1304// The JSON representation for Empty is empty JSON object {}. 1305type Empty struct { 1306 // ServerResponse contains the HTTP response code and headers from the 1307 // server. 1308 googleapi.ServerResponse `json:"-"` 1309} 1310 1311// EndpointsApiService: Cloud Endpoints 1312// (https://cloud.google.com/endpoints) configuration. The Endpoints API 1313// Service provides tooling for serving Open API and gRPC endpoints via 1314// an NGINX proxy. Only valid for App Engine Flexible environment 1315// deployments.The fields here refer to the name and configuration ID of 1316// a "service" resource in the Service Management API 1317// (https://cloud.google.com/service-management/overview). 1318type EndpointsApiService struct { 1319 // ConfigId: Endpoints service configuration ID as specified by the 1320 // Service Management API. For example "2016-09-19r1".By default, the 1321 // rollout strategy for Endpoints is RolloutStrategy.FIXED. This means 1322 // that Endpoints starts up with a particular configuration ID. When a 1323 // new configuration is rolled out, Endpoints must be given the new 1324 // configuration ID. The config_id field is used to give the 1325 // configuration ID and is required in this case.Endpoints also has a 1326 // rollout strategy called RolloutStrategy.MANAGED. When using this, 1327 // Endpoints fetches the latest configuration and does not need the 1328 // configuration ID. In this case, config_id must be omitted. 1329 ConfigId string `json:"configId,omitempty"` 1330 1331 // DisableTraceSampling: Enable or disable trace sampling. By default, 1332 // this is set to false for enabled. 1333 DisableTraceSampling bool `json:"disableTraceSampling,omitempty"` 1334 1335 // Name: Endpoints service name which is the name of the "service" 1336 // resource in the Service Management API. For example 1337 // "myapi.endpoints.myproject.cloud.goog" 1338 Name string `json:"name,omitempty"` 1339 1340 // RolloutStrategy: Endpoints rollout strategy. If FIXED, config_id must 1341 // be specified. If MANAGED, config_id must be omitted. 1342 // 1343 // Possible values: 1344 // "UNSPECIFIED_ROLLOUT_STRATEGY" - Not specified. Defaults to FIXED. 1345 // "FIXED" - Endpoints service configuration ID will be fixed to the 1346 // configuration ID specified by config_id. 1347 // "MANAGED" - Endpoints service configuration ID will be updated with 1348 // each rollout. 1349 RolloutStrategy string `json:"rolloutStrategy,omitempty"` 1350 1351 // ForceSendFields is a list of field names (e.g. "ConfigId") to 1352 // unconditionally include in API requests. By default, fields with 1353 // empty values are omitted from API requests. However, any non-pointer, 1354 // non-interface field appearing in ForceSendFields will be sent to the 1355 // server regardless of whether the field is empty or not. This may be 1356 // used to include empty fields in Patch requests. 1357 ForceSendFields []string `json:"-"` 1358 1359 // NullFields is a list of field names (e.g. "ConfigId") to include in 1360 // API requests with the JSON null value. By default, fields with empty 1361 // values are omitted from API requests. However, any field with an 1362 // empty value appearing in NullFields will be sent to the server as 1363 // null. It is an error if a field in this list has a non-empty value. 1364 // This may be used to include null fields in Patch requests. 1365 NullFields []string `json:"-"` 1366} 1367 1368func (s *EndpointsApiService) MarshalJSON() ([]byte, error) { 1369 type NoMethod EndpointsApiService 1370 raw := NoMethod(*s) 1371 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1372} 1373 1374// Entrypoint: The entrypoint for the application. 1375type Entrypoint struct { 1376 // Shell: The format should be a shell command that can be fed to bash 1377 // -c. 1378 Shell string `json:"shell,omitempty"` 1379 1380 // ForceSendFields is a list of field names (e.g. "Shell") to 1381 // unconditionally include in API requests. By default, fields with 1382 // empty values are omitted from API requests. However, any non-pointer, 1383 // non-interface field appearing in ForceSendFields will be sent to the 1384 // server regardless of whether the field is empty or not. This may be 1385 // used to include empty fields in Patch requests. 1386 ForceSendFields []string `json:"-"` 1387 1388 // NullFields is a list of field names (e.g. "Shell") to include in API 1389 // requests with the JSON null value. By default, fields with empty 1390 // values are omitted from API requests. However, any field with an 1391 // empty value appearing in NullFields will be sent to the server as 1392 // null. It is an error if a field in this list has a non-empty value. 1393 // This may be used to include null fields in Patch requests. 1394 NullFields []string `json:"-"` 1395} 1396 1397func (s *Entrypoint) MarshalJSON() ([]byte, error) { 1398 type NoMethod Entrypoint 1399 raw := NoMethod(*s) 1400 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1401} 1402 1403// ErrorHandler: Custom static error page to be served when an error 1404// occurs. 1405type ErrorHandler struct { 1406 // ErrorCode: Error condition this handler applies to. 1407 // 1408 // Possible values: 1409 // "ERROR_CODE_UNSPECIFIED" - Not specified. ERROR_CODE_DEFAULT is 1410 // assumed. 1411 // "ERROR_CODE_DEFAULT" - All other error types. 1412 // "ERROR_CODE_OVER_QUOTA" - Application has exceeded a resource 1413 // quota. 1414 // "ERROR_CODE_DOS_API_DENIAL" - Client blocked by the application's 1415 // Denial of Service protection configuration. 1416 // "ERROR_CODE_TIMEOUT" - Deadline reached before the application 1417 // responds. 1418 ErrorCode string `json:"errorCode,omitempty"` 1419 1420 // MimeType: MIME type of file. Defaults to text/html. 1421 MimeType string `json:"mimeType,omitempty"` 1422 1423 // StaticFile: Static file content to be served for this error. 1424 StaticFile string `json:"staticFile,omitempty"` 1425 1426 // ForceSendFields is a list of field names (e.g. "ErrorCode") to 1427 // unconditionally include in API requests. By default, fields with 1428 // empty values are omitted from API requests. However, any non-pointer, 1429 // non-interface field appearing in ForceSendFields will be sent to the 1430 // server regardless of whether the field is empty or not. This may be 1431 // used to include empty fields in Patch requests. 1432 ForceSendFields []string `json:"-"` 1433 1434 // NullFields is a list of field names (e.g. "ErrorCode") to include in 1435 // API requests with the JSON null value. By default, fields with empty 1436 // values are omitted from API requests. However, any field with an 1437 // empty value appearing in NullFields will be sent to the server as 1438 // null. It is an error if a field in this list has a non-empty value. 1439 // This may be used to include null fields in Patch requests. 1440 NullFields []string `json:"-"` 1441} 1442 1443func (s *ErrorHandler) MarshalJSON() ([]byte, error) { 1444 type NoMethod ErrorHandler 1445 raw := NoMethod(*s) 1446 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1447} 1448 1449// FeatureSettings: The feature specific settings to be used in the 1450// application. These define behaviors that are user configurable. 1451type FeatureSettings struct { 1452 // SplitHealthChecks: Boolean value indicating if split health checks 1453 // should be used instead of the legacy health checks. At an app.yaml 1454 // level, this means defaulting to 'readiness_check' and 1455 // 'liveness_check' values instead of 'health_check' ones. Once the 1456 // legacy 'health_check' behavior is deprecated, and this value is 1457 // always true, this setting can be removed. 1458 SplitHealthChecks bool `json:"splitHealthChecks,omitempty"` 1459 1460 // UseContainerOptimizedOs: If true, use Container-Optimized OS 1461 // (https://cloud.google.com/container-optimized-os/) base image for 1462 // VMs, rather than a base Debian image. 1463 UseContainerOptimizedOs bool `json:"useContainerOptimizedOs,omitempty"` 1464 1465 // ForceSendFields is a list of field names (e.g. "SplitHealthChecks") 1466 // to unconditionally include in API requests. By default, fields with 1467 // empty values are omitted from API requests. However, any non-pointer, 1468 // non-interface field appearing in ForceSendFields will be sent to the 1469 // server regardless of whether the field is empty or not. This may be 1470 // used to include empty fields in Patch requests. 1471 ForceSendFields []string `json:"-"` 1472 1473 // NullFields is a list of field names (e.g. "SplitHealthChecks") to 1474 // include in API requests with the JSON null value. By default, fields 1475 // with empty values are omitted from API requests. However, any field 1476 // with an empty value appearing in NullFields will be sent to the 1477 // server as null. It is an error if a field in this list has a 1478 // non-empty value. This may be used to include null fields in Patch 1479 // requests. 1480 NullFields []string `json:"-"` 1481} 1482 1483func (s *FeatureSettings) MarshalJSON() ([]byte, error) { 1484 type NoMethod FeatureSettings 1485 raw := NoMethod(*s) 1486 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1487} 1488 1489// FileInfo: Single source file that is part of the version to be 1490// deployed. Each source file that is deployed must be specified 1491// separately. 1492type FileInfo struct { 1493 // MimeType: The MIME type of the file.Defaults to the value from Google 1494 // Cloud Storage. 1495 MimeType string `json:"mimeType,omitempty"` 1496 1497 // Sha1Sum: The SHA1 hash of the file, in hex. 1498 Sha1Sum string `json:"sha1Sum,omitempty"` 1499 1500 // SourceUrl: URL source to use to fetch this file. Must be a URL to a 1501 // resource in Google Cloud Storage in the form 1502 // 'http(s)://storage.googleapis.com/<bucket>/<object>'. 1503 SourceUrl string `json:"sourceUrl,omitempty"` 1504 1505 // ForceSendFields is a list of field names (e.g. "MimeType") to 1506 // unconditionally include in API requests. By default, fields with 1507 // empty values are omitted from API requests. However, any non-pointer, 1508 // non-interface field appearing in ForceSendFields will be sent to the 1509 // server regardless of whether the field is empty or not. This may be 1510 // used to include empty fields in Patch requests. 1511 ForceSendFields []string `json:"-"` 1512 1513 // NullFields is a list of field names (e.g. "MimeType") to include in 1514 // API requests with the JSON null value. By default, fields with empty 1515 // values are omitted from API requests. However, any field with an 1516 // empty value appearing in NullFields will be sent to the server as 1517 // null. It is an error if a field in this list has a non-empty value. 1518 // This may be used to include null fields in Patch requests. 1519 NullFields []string `json:"-"` 1520} 1521 1522func (s *FileInfo) MarshalJSON() ([]byte, error) { 1523 type NoMethod FileInfo 1524 raw := NoMethod(*s) 1525 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1526} 1527 1528// FirewallRule: A single firewall rule that is evaluated against 1529// incoming traffic and provides an action to take on matched requests. 1530type FirewallRule struct { 1531 // Action: The action to take on matched requests. 1532 // 1533 // Possible values: 1534 // "UNSPECIFIED_ACTION" 1535 // "ALLOW" - Matching requests are allowed. 1536 // "DENY" - Matching requests are denied. 1537 Action string `json:"action,omitempty"` 1538 1539 // Description: An optional string description of this rule. This field 1540 // has a maximum length of 100 characters. 1541 Description string `json:"description,omitempty"` 1542 1543 // Priority: A positive integer between 1, Int32.MaxValue-1 that defines 1544 // the order of rule evaluation. Rules with the lowest priority are 1545 // evaluated first.A default rule at priority Int32.MaxValue matches all 1546 // IPv4 and IPv6 traffic when no previous rule matches. Only the action 1547 // of this rule can be modified by the user. 1548 Priority int64 `json:"priority,omitempty"` 1549 1550 // SourceRange: IP address or range, defined using CIDR notation, of 1551 // requests that this rule applies to. You can use the wildcard 1552 // character "*" to match all IPs equivalent to "0/0" and "::/0" 1553 // together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 1554 // or 2001:0db8:0000:0042:0000:8a2e:0370:7334.<p>Truncation will be 1555 // silently performed on addresses which are not properly truncated. For 1556 // example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. 1557 // Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address 1558 // as 2001:db8::/32. 1559 SourceRange string `json:"sourceRange,omitempty"` 1560 1561 // ServerResponse contains the HTTP response code and headers from the 1562 // server. 1563 googleapi.ServerResponse `json:"-"` 1564 1565 // ForceSendFields is a list of field names (e.g. "Action") to 1566 // unconditionally include in API requests. By default, fields with 1567 // empty values are omitted from API requests. However, any non-pointer, 1568 // non-interface field appearing in ForceSendFields will be sent to the 1569 // server regardless of whether the field is empty or not. This may be 1570 // used to include empty fields in Patch requests. 1571 ForceSendFields []string `json:"-"` 1572 1573 // NullFields is a list of field names (e.g. "Action") to include in API 1574 // requests with the JSON null value. By default, fields with empty 1575 // values are omitted from API requests. However, any field with an 1576 // empty value appearing in NullFields will be sent to the server as 1577 // null. It is an error if a field in this list has a non-empty value. 1578 // This may be used to include null fields in Patch requests. 1579 NullFields []string `json:"-"` 1580} 1581 1582func (s *FirewallRule) MarshalJSON() ([]byte, error) { 1583 type NoMethod FirewallRule 1584 raw := NoMethod(*s) 1585 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1586} 1587 1588// HealthCheck: Health checking configuration for VM instances. 1589// Unhealthy instances are killed and replaced with new instances. Only 1590// applicable for instances in App Engine flexible environment. 1591type HealthCheck struct { 1592 // CheckInterval: Interval between health checks. 1593 CheckInterval string `json:"checkInterval,omitempty"` 1594 1595 // DisableHealthCheck: Whether to explicitly disable health checks for 1596 // this instance. 1597 DisableHealthCheck bool `json:"disableHealthCheck,omitempty"` 1598 1599 // HealthyThreshold: Number of consecutive successful health checks 1600 // required before receiving traffic. 1601 HealthyThreshold int64 `json:"healthyThreshold,omitempty"` 1602 1603 // Host: Host header to send when performing an HTTP health check. 1604 // Example: "myapp.appspot.com" 1605 Host string `json:"host,omitempty"` 1606 1607 // RestartThreshold: Number of consecutive failed health checks required 1608 // before an instance is restarted. 1609 RestartThreshold int64 `json:"restartThreshold,omitempty"` 1610 1611 // Timeout: Time before the health check is considered failed. 1612 Timeout string `json:"timeout,omitempty"` 1613 1614 // UnhealthyThreshold: Number of consecutive failed health checks 1615 // required before removing traffic. 1616 UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` 1617 1618 // ForceSendFields is a list of field names (e.g. "CheckInterval") to 1619 // unconditionally include in API requests. By default, fields with 1620 // empty values are omitted from API requests. However, any non-pointer, 1621 // non-interface field appearing in ForceSendFields will be sent to the 1622 // server regardless of whether the field is empty or not. This may be 1623 // used to include empty fields in Patch requests. 1624 ForceSendFields []string `json:"-"` 1625 1626 // NullFields is a list of field names (e.g. "CheckInterval") to include 1627 // in API requests with the JSON null value. By default, fields with 1628 // empty values are omitted from API requests. However, any field with 1629 // an empty value appearing in NullFields will be sent to the server as 1630 // null. It is an error if a field in this list has a non-empty value. 1631 // This may be used to include null fields in Patch requests. 1632 NullFields []string `json:"-"` 1633} 1634 1635func (s *HealthCheck) MarshalJSON() ([]byte, error) { 1636 type NoMethod HealthCheck 1637 raw := NoMethod(*s) 1638 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1639} 1640 1641// IdentityAwareProxy: Identity-Aware Proxy 1642type IdentityAwareProxy struct { 1643 // Enabled: Whether the serving infrastructure will authenticate and 1644 // authorize all incoming requests.If true, the oauth2_client_id and 1645 // oauth2_client_secret fields must be non-empty. 1646 Enabled bool `json:"enabled,omitempty"` 1647 1648 // Oauth2ClientId: OAuth2 client ID to use for the authentication flow. 1649 Oauth2ClientId string `json:"oauth2ClientId,omitempty"` 1650 1651 // Oauth2ClientInfo: InputOnly OAuth client info required to generate 1652 // client id to be used for IAP. 1653 Oauth2ClientInfo *OAuth2ClientInfo `json:"oauth2ClientInfo,omitempty"` 1654 1655 // Oauth2ClientSecret: OAuth2 client secret to use for the 1656 // authentication flow.For security reasons, this value cannot be 1657 // retrieved via the API. Instead, the SHA-256 hash of the value is 1658 // returned in the oauth2_client_secret_sha256 field.@InputOnly 1659 Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` 1660 1661 // Oauth2ClientSecretSha256: Hex-encoded SHA-256 hash of the client 1662 // secret.@OutputOnly 1663 Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"` 1664 1665 // ForceSendFields is a list of field names (e.g. "Enabled") to 1666 // unconditionally include in API requests. By default, fields with 1667 // empty values are omitted from API requests. However, any non-pointer, 1668 // non-interface field appearing in ForceSendFields will be sent to the 1669 // server regardless of whether the field is empty or not. This may be 1670 // used to include empty fields in Patch requests. 1671 ForceSendFields []string `json:"-"` 1672 1673 // NullFields is a list of field names (e.g. "Enabled") to include in 1674 // API requests with the JSON null value. By default, fields with empty 1675 // values are omitted from API requests. However, any field with an 1676 // empty value appearing in NullFields will be sent to the server as 1677 // null. It is an error if a field in this list has a non-empty value. 1678 // This may be used to include null fields in Patch requests. 1679 NullFields []string `json:"-"` 1680} 1681 1682func (s *IdentityAwareProxy) MarshalJSON() ([]byte, error) { 1683 type NoMethod IdentityAwareProxy 1684 raw := NoMethod(*s) 1685 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1686} 1687 1688// Instance: An Instance resource is the computing unit that App Engine 1689// uses to automatically scale an application. 1690type Instance struct { 1691 // AppEngineRelease: App Engine release this instance is running 1692 // on.@OutputOnly 1693 AppEngineRelease string `json:"appEngineRelease,omitempty"` 1694 1695 // Availability: Availability of the instance.@OutputOnly 1696 // 1697 // Possible values: 1698 // "UNSPECIFIED" 1699 // "RESIDENT" 1700 // "DYNAMIC" 1701 Availability string `json:"availability,omitempty"` 1702 1703 // AverageLatency: Average latency (ms) over the last minute.@OutputOnly 1704 AverageLatency int64 `json:"averageLatency,omitempty"` 1705 1706 // Errors: Number of errors since this instance was started.@OutputOnly 1707 Errors int64 `json:"errors,omitempty"` 1708 1709 // Id: Relative name of the instance within the version. Example: 1710 // instance-1.@OutputOnly 1711 Id string `json:"id,omitempty"` 1712 1713 // MemoryUsage: Total memory in use (bytes).@OutputOnly 1714 MemoryUsage int64 `json:"memoryUsage,omitempty,string"` 1715 1716 // Name: Full path to the Instance resource in the API. Example: 1717 // apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOn 1718 // ly 1719 Name string `json:"name,omitempty"` 1720 1721 // Qps: Average queries per second (QPS) over the last 1722 // minute.@OutputOnly 1723 Qps float64 `json:"qps,omitempty"` 1724 1725 // Requests: Number of requests since this instance was 1726 // started.@OutputOnly 1727 Requests int64 `json:"requests,omitempty"` 1728 1729 // StartTime: Time that this instance was started.@OutputOnly 1730 StartTime string `json:"startTime,omitempty"` 1731 1732 // VmDebugEnabled: Whether this instance is in debug mode. Only 1733 // applicable for instances in App Engine flexible 1734 // environment.@OutputOnly 1735 VmDebugEnabled bool `json:"vmDebugEnabled,omitempty"` 1736 1737 // VmId: Virtual machine ID of this instance. Only applicable for 1738 // instances in App Engine flexible environment.@OutputOnly 1739 VmId string `json:"vmId,omitempty"` 1740 1741 // VmIp: The IP address of this instance. Only applicable for instances 1742 // in App Engine flexible environment.@OutputOnly 1743 VmIp string `json:"vmIp,omitempty"` 1744 1745 // VmName: Name of the virtual machine where this instance lives. Only 1746 // applicable for instances in App Engine flexible 1747 // environment.@OutputOnly 1748 VmName string `json:"vmName,omitempty"` 1749 1750 // VmStatus: Status of the virtual machine where this instance lives. 1751 // Only applicable for instances in App Engine flexible 1752 // environment.@OutputOnly 1753 VmStatus string `json:"vmStatus,omitempty"` 1754 1755 // VmZoneName: Zone where the virtual machine is located. Only 1756 // applicable for instances in App Engine flexible 1757 // environment.@OutputOnly 1758 VmZoneName string `json:"vmZoneName,omitempty"` 1759 1760 // ServerResponse contains the HTTP response code and headers from the 1761 // server. 1762 googleapi.ServerResponse `json:"-"` 1763 1764 // ForceSendFields is a list of field names (e.g. "AppEngineRelease") to 1765 // unconditionally include in API requests. By default, fields with 1766 // empty values are omitted from API requests. However, any non-pointer, 1767 // non-interface field appearing in ForceSendFields will be sent to the 1768 // server regardless of whether the field is empty or not. This may be 1769 // used to include empty fields in Patch requests. 1770 ForceSendFields []string `json:"-"` 1771 1772 // NullFields is a list of field names (e.g. "AppEngineRelease") to 1773 // include in API requests with the JSON null value. By default, fields 1774 // with empty values are omitted from API requests. However, any field 1775 // with an empty value appearing in NullFields will be sent to the 1776 // server as null. It is an error if a field in this list has a 1777 // non-empty value. This may be used to include null fields in Patch 1778 // requests. 1779 NullFields []string `json:"-"` 1780} 1781 1782func (s *Instance) MarshalJSON() ([]byte, error) { 1783 type NoMethod Instance 1784 raw := NoMethod(*s) 1785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1786} 1787 1788func (s *Instance) UnmarshalJSON(data []byte) error { 1789 type NoMethod Instance 1790 var s1 struct { 1791 Qps gensupport.JSONFloat64 `json:"qps"` 1792 *NoMethod 1793 } 1794 s1.NoMethod = (*NoMethod)(s) 1795 if err := json.Unmarshal(data, &s1); err != nil { 1796 return err 1797 } 1798 s.Qps = float64(s1.Qps) 1799 return nil 1800} 1801 1802// Library: Third-party Python runtime library that is required by the 1803// application. 1804type Library struct { 1805 // Name: Name of the library. Example: "django". 1806 Name string `json:"name,omitempty"` 1807 1808 // Version: Version of the library to select, or "latest". 1809 Version string `json:"version,omitempty"` 1810 1811 // ForceSendFields is a list of field names (e.g. "Name") to 1812 // unconditionally include in API requests. By default, fields with 1813 // empty values are omitted from API requests. However, any non-pointer, 1814 // non-interface field appearing in ForceSendFields will be sent to the 1815 // server regardless of whether the field is empty or not. This may be 1816 // used to include empty fields in Patch requests. 1817 ForceSendFields []string `json:"-"` 1818 1819 // NullFields is a list of field names (e.g. "Name") to include in API 1820 // requests with the JSON null value. By default, fields with empty 1821 // values are omitted from API requests. However, any field with an 1822 // empty value appearing in NullFields will be sent to the server as 1823 // null. It is an error if a field in this list has a non-empty value. 1824 // This may be used to include null fields in Patch requests. 1825 NullFields []string `json:"-"` 1826} 1827 1828func (s *Library) MarshalJSON() ([]byte, error) { 1829 type NoMethod Library 1830 raw := NoMethod(*s) 1831 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1832} 1833 1834// ListAuthorizedCertificatesResponse: Response message for 1835// AuthorizedCertificates.ListAuthorizedCertificates. 1836type ListAuthorizedCertificatesResponse struct { 1837 // Certificates: The SSL certificates the user is authorized to 1838 // administer. 1839 Certificates []*AuthorizedCertificate `json:"certificates,omitempty"` 1840 1841 // NextPageToken: Continuation token for fetching the next page of 1842 // results. 1843 NextPageToken string `json:"nextPageToken,omitempty"` 1844 1845 // ServerResponse contains the HTTP response code and headers from the 1846 // server. 1847 googleapi.ServerResponse `json:"-"` 1848 1849 // ForceSendFields is a list of field names (e.g. "Certificates") to 1850 // unconditionally include in API requests. By default, fields with 1851 // empty values are omitted from API requests. However, any non-pointer, 1852 // non-interface field appearing in ForceSendFields will be sent to the 1853 // server regardless of whether the field is empty or not. This may be 1854 // used to include empty fields in Patch requests. 1855 ForceSendFields []string `json:"-"` 1856 1857 // NullFields is a list of field names (e.g. "Certificates") to include 1858 // in API requests with the JSON null value. By default, fields with 1859 // empty values are omitted from API requests. However, any field with 1860 // an empty value appearing in NullFields will be sent to the server as 1861 // null. It is an error if a field in this list has a non-empty value. 1862 // This may be used to include null fields in Patch requests. 1863 NullFields []string `json:"-"` 1864} 1865 1866func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) { 1867 type NoMethod ListAuthorizedCertificatesResponse 1868 raw := NoMethod(*s) 1869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1870} 1871 1872// ListAuthorizedDomainsResponse: Response message for 1873// AuthorizedDomains.ListAuthorizedDomains. 1874type ListAuthorizedDomainsResponse struct { 1875 // Domains: The authorized domains belonging to the user. 1876 Domains []*AuthorizedDomain `json:"domains,omitempty"` 1877 1878 // NextPageToken: Continuation token for fetching the next page of 1879 // results. 1880 NextPageToken string `json:"nextPageToken,omitempty"` 1881 1882 // ServerResponse contains the HTTP response code and headers from the 1883 // server. 1884 googleapi.ServerResponse `json:"-"` 1885 1886 // ForceSendFields is a list of field names (e.g. "Domains") to 1887 // unconditionally include in API requests. By default, fields with 1888 // empty values are omitted from API requests. However, any non-pointer, 1889 // non-interface field appearing in ForceSendFields will be sent to the 1890 // server regardless of whether the field is empty or not. This may be 1891 // used to include empty fields in Patch requests. 1892 ForceSendFields []string `json:"-"` 1893 1894 // NullFields is a list of field names (e.g. "Domains") to include in 1895 // API requests with the JSON null value. By default, fields with empty 1896 // values are omitted from API requests. However, any field with an 1897 // empty value appearing in NullFields will be sent to the server as 1898 // null. It is an error if a field in this list has a non-empty value. 1899 // This may be used to include null fields in Patch requests. 1900 NullFields []string `json:"-"` 1901} 1902 1903func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) { 1904 type NoMethod ListAuthorizedDomainsResponse 1905 raw := NoMethod(*s) 1906 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1907} 1908 1909// ListDomainMappingsResponse: Response message for 1910// DomainMappings.ListDomainMappings. 1911type ListDomainMappingsResponse struct { 1912 // DomainMappings: The domain mappings for the application. 1913 DomainMappings []*DomainMapping `json:"domainMappings,omitempty"` 1914 1915 // NextPageToken: Continuation token for fetching the next page of 1916 // results. 1917 NextPageToken string `json:"nextPageToken,omitempty"` 1918 1919 // ServerResponse contains the HTTP response code and headers from the 1920 // server. 1921 googleapi.ServerResponse `json:"-"` 1922 1923 // ForceSendFields is a list of field names (e.g. "DomainMappings") to 1924 // unconditionally include in API requests. By default, fields with 1925 // empty values are omitted from API requests. However, any non-pointer, 1926 // non-interface field appearing in ForceSendFields will be sent to the 1927 // server regardless of whether the field is empty or not. This may be 1928 // used to include empty fields in Patch requests. 1929 ForceSendFields []string `json:"-"` 1930 1931 // NullFields is a list of field names (e.g. "DomainMappings") to 1932 // include in API requests with the JSON null value. By default, fields 1933 // with empty values are omitted from API requests. However, any field 1934 // with an empty value appearing in NullFields will be sent to the 1935 // server as null. It is an error if a field in this list has a 1936 // non-empty value. This may be used to include null fields in Patch 1937 // requests. 1938 NullFields []string `json:"-"` 1939} 1940 1941func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) { 1942 type NoMethod ListDomainMappingsResponse 1943 raw := NoMethod(*s) 1944 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1945} 1946 1947// ListIngressRulesResponse: Response message for 1948// Firewall.ListIngressRules. 1949type ListIngressRulesResponse struct { 1950 // IngressRules: The ingress FirewallRules for this application. 1951 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 1952 1953 // NextPageToken: Continuation token for fetching the next page of 1954 // results. 1955 NextPageToken string `json:"nextPageToken,omitempty"` 1956 1957 // ServerResponse contains the HTTP response code and headers from the 1958 // server. 1959 googleapi.ServerResponse `json:"-"` 1960 1961 // ForceSendFields is a list of field names (e.g. "IngressRules") to 1962 // unconditionally include in API requests. By default, fields with 1963 // empty values are omitted from API requests. However, any non-pointer, 1964 // non-interface field appearing in ForceSendFields will be sent to the 1965 // server regardless of whether the field is empty or not. This may be 1966 // used to include empty fields in Patch requests. 1967 ForceSendFields []string `json:"-"` 1968 1969 // NullFields is a list of field names (e.g. "IngressRules") to include 1970 // in API requests with the JSON null value. By default, fields with 1971 // empty values are omitted from API requests. However, any field with 1972 // an empty value appearing in NullFields will be sent to the server as 1973 // null. It is an error if a field in this list has a non-empty value. 1974 // This may be used to include null fields in Patch requests. 1975 NullFields []string `json:"-"` 1976} 1977 1978func (s *ListIngressRulesResponse) MarshalJSON() ([]byte, error) { 1979 type NoMethod ListIngressRulesResponse 1980 raw := NoMethod(*s) 1981 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1982} 1983 1984// ListInstancesResponse: Response message for Instances.ListInstances. 1985type ListInstancesResponse struct { 1986 // Instances: The instances belonging to the requested version. 1987 Instances []*Instance `json:"instances,omitempty"` 1988 1989 // NextPageToken: Continuation token for fetching the next page of 1990 // results. 1991 NextPageToken string `json:"nextPageToken,omitempty"` 1992 1993 // ServerResponse contains the HTTP response code and headers from the 1994 // server. 1995 googleapi.ServerResponse `json:"-"` 1996 1997 // ForceSendFields is a list of field names (e.g. "Instances") 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. "Instances") to include in 2006 // API requests with the JSON null value. By default, fields with empty 2007 // values are omitted from API requests. However, any field with an 2008 // empty value appearing in NullFields will be sent to the server as 2009 // null. It is an error if a field in this list has a non-empty value. 2010 // This may be used to include null fields in Patch requests. 2011 NullFields []string `json:"-"` 2012} 2013 2014func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) { 2015 type NoMethod ListInstancesResponse 2016 raw := NoMethod(*s) 2017 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2018} 2019 2020// ListLocationsResponse: The response message for 2021// Locations.ListLocations. 2022type ListLocationsResponse struct { 2023 // Locations: A list of locations that matches the specified filter in 2024 // the request. 2025 Locations []*Location `json:"locations,omitempty"` 2026 2027 // NextPageToken: The standard List next-page token. 2028 NextPageToken string `json:"nextPageToken,omitempty"` 2029 2030 // ServerResponse contains the HTTP response code and headers from the 2031 // server. 2032 googleapi.ServerResponse `json:"-"` 2033 2034 // ForceSendFields is a list of field names (e.g. "Locations") to 2035 // unconditionally include in API requests. By default, fields with 2036 // empty values are omitted from API requests. However, any non-pointer, 2037 // non-interface field appearing in ForceSendFields will be sent to the 2038 // server regardless of whether the field is empty or not. This may be 2039 // used to include empty fields in Patch requests. 2040 ForceSendFields []string `json:"-"` 2041 2042 // NullFields is a list of field names (e.g. "Locations") to include in 2043 // API requests with the JSON null value. By default, fields with empty 2044 // values are omitted from API requests. However, any field with an 2045 // empty value appearing in NullFields will be sent to the server as 2046 // null. It is an error if a field in this list has a non-empty value. 2047 // This may be used to include null fields in Patch requests. 2048 NullFields []string `json:"-"` 2049} 2050 2051func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 2052 type NoMethod ListLocationsResponse 2053 raw := NoMethod(*s) 2054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2055} 2056 2057// ListOperationsResponse: The response message for 2058// Operations.ListOperations. 2059type ListOperationsResponse struct { 2060 // NextPageToken: The standard List next-page token. 2061 NextPageToken string `json:"nextPageToken,omitempty"` 2062 2063 // Operations: A list of operations that matches the specified filter in 2064 // the request. 2065 Operations []*Operation `json:"operations,omitempty"` 2066 2067 // ServerResponse contains the HTTP response code and headers from the 2068 // server. 2069 googleapi.ServerResponse `json:"-"` 2070 2071 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2072 // unconditionally include in API requests. By default, fields with 2073 // empty values are omitted from API requests. However, any non-pointer, 2074 // non-interface field appearing in ForceSendFields will be sent to the 2075 // server regardless of whether the field is empty or not. This may be 2076 // used to include empty fields in Patch requests. 2077 ForceSendFields []string `json:"-"` 2078 2079 // NullFields is a list of field names (e.g. "NextPageToken") to include 2080 // in API requests with the JSON null value. By default, fields with 2081 // empty values are omitted from API requests. However, any field with 2082 // an empty value appearing in NullFields will be sent to the server as 2083 // null. It is an error if a field in this list has a non-empty value. 2084 // This may be used to include null fields in Patch requests. 2085 NullFields []string `json:"-"` 2086} 2087 2088func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 2089 type NoMethod ListOperationsResponse 2090 raw := NoMethod(*s) 2091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2092} 2093 2094// ListServicesResponse: Response message for Services.ListServices. 2095type ListServicesResponse struct { 2096 // NextPageToken: Continuation token for fetching the next page of 2097 // results. 2098 NextPageToken string `json:"nextPageToken,omitempty"` 2099 2100 // Services: The services belonging to the requested application. 2101 Services []*Service `json:"services,omitempty"` 2102 2103 // ServerResponse contains the HTTP response code and headers from the 2104 // server. 2105 googleapi.ServerResponse `json:"-"` 2106 2107 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2108 // unconditionally include in API requests. By default, fields with 2109 // empty values are omitted from API requests. However, any non-pointer, 2110 // non-interface field appearing in ForceSendFields will be sent to the 2111 // server regardless of whether the field is empty or not. This may be 2112 // used to include empty fields in Patch requests. 2113 ForceSendFields []string `json:"-"` 2114 2115 // NullFields is a list of field names (e.g. "NextPageToken") to include 2116 // in API requests with the JSON null value. By default, fields with 2117 // empty values are omitted from API requests. However, any field with 2118 // an empty value appearing in NullFields will be sent to the server as 2119 // null. It is an error if a field in this list has a non-empty value. 2120 // This may be used to include null fields in Patch requests. 2121 NullFields []string `json:"-"` 2122} 2123 2124func (s *ListServicesResponse) MarshalJSON() ([]byte, error) { 2125 type NoMethod ListServicesResponse 2126 raw := NoMethod(*s) 2127 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2128} 2129 2130// ListVersionsResponse: Response message for Versions.ListVersions. 2131type ListVersionsResponse struct { 2132 // NextPageToken: Continuation token for fetching the next page of 2133 // results. 2134 NextPageToken string `json:"nextPageToken,omitempty"` 2135 2136 // Versions: The versions belonging to the requested service. 2137 Versions []*Version `json:"versions,omitempty"` 2138 2139 // ServerResponse contains the HTTP response code and headers from the 2140 // server. 2141 googleapi.ServerResponse `json:"-"` 2142 2143 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2144 // unconditionally include in API requests. By default, fields with 2145 // empty values are omitted from API requests. However, any non-pointer, 2146 // non-interface field appearing in ForceSendFields will be sent to the 2147 // server regardless of whether the field is empty or not. This may be 2148 // used to include empty fields in Patch requests. 2149 ForceSendFields []string `json:"-"` 2150 2151 // NullFields is a list of field names (e.g. "NextPageToken") to include 2152 // in API requests with the JSON null value. By default, fields with 2153 // empty values are omitted from API requests. However, any field with 2154 // an empty value appearing in NullFields will be sent to the server as 2155 // null. It is an error if a field in this list has a non-empty value. 2156 // This may be used to include null fields in Patch requests. 2157 NullFields []string `json:"-"` 2158} 2159 2160func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) { 2161 type NoMethod ListVersionsResponse 2162 raw := NoMethod(*s) 2163 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2164} 2165 2166// LivenessCheck: Health checking configuration for VM instances. 2167// Unhealthy instances are killed and replaced with new instances. 2168type LivenessCheck struct { 2169 // CheckInterval: Interval between health checks. 2170 CheckInterval string `json:"checkInterval,omitempty"` 2171 2172 // FailureThreshold: Number of consecutive failed checks required before 2173 // considering the VM unhealthy. 2174 FailureThreshold int64 `json:"failureThreshold,omitempty"` 2175 2176 // Host: Host header to send when performing a HTTP Liveness check. 2177 // Example: "myapp.appspot.com" 2178 Host string `json:"host,omitempty"` 2179 2180 // InitialDelay: The initial delay before starting to execute the 2181 // checks. 2182 InitialDelay string `json:"initialDelay,omitempty"` 2183 2184 // Path: The request path. 2185 Path string `json:"path,omitempty"` 2186 2187 // SuccessThreshold: Number of consecutive successful checks required 2188 // before considering the VM healthy. 2189 SuccessThreshold int64 `json:"successThreshold,omitempty"` 2190 2191 // Timeout: Time before the check is considered failed. 2192 Timeout string `json:"timeout,omitempty"` 2193 2194 // ForceSendFields is a list of field names (e.g. "CheckInterval") to 2195 // unconditionally include in API requests. By default, fields with 2196 // empty values are omitted from API requests. However, any non-pointer, 2197 // non-interface field appearing in ForceSendFields will be sent to the 2198 // server regardless of whether the field is empty or not. This may be 2199 // used to include empty fields in Patch requests. 2200 ForceSendFields []string `json:"-"` 2201 2202 // NullFields is a list of field names (e.g. "CheckInterval") to include 2203 // in API requests with the JSON null value. By default, fields with 2204 // empty values are omitted from API requests. However, any field with 2205 // an empty value appearing in NullFields will be sent to the server as 2206 // null. It is an error if a field in this list has a non-empty value. 2207 // This may be used to include null fields in Patch requests. 2208 NullFields []string `json:"-"` 2209} 2210 2211func (s *LivenessCheck) MarshalJSON() ([]byte, error) { 2212 type NoMethod LivenessCheck 2213 raw := NoMethod(*s) 2214 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2215} 2216 2217// Location: A resource that represents Google Cloud Platform location. 2218type Location struct { 2219 // DisplayName: The friendly name for this location, typically a nearby 2220 // city name. For example, "Tokyo". 2221 DisplayName string `json:"displayName,omitempty"` 2222 2223 // Labels: Cross-service attributes for the location. For 2224 // example 2225 // {"cloud.googleapis.com/region": "us-east1"} 2226 // 2227 Labels map[string]string `json:"labels,omitempty"` 2228 2229 // LocationId: The canonical id for this location. For example: 2230 // "us-east1". 2231 LocationId string `json:"locationId,omitempty"` 2232 2233 // Metadata: Service-specific metadata. For example the available 2234 // capacity at the given location. 2235 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2236 2237 // Name: Resource name for the location, which may vary between 2238 // implementations. For example: 2239 // "projects/example-project/locations/us-east1" 2240 Name string `json:"name,omitempty"` 2241 2242 // ServerResponse contains the HTTP response code and headers from the 2243 // server. 2244 googleapi.ServerResponse `json:"-"` 2245 2246 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2247 // unconditionally include in API requests. By default, fields with 2248 // empty values are omitted from API requests. However, any non-pointer, 2249 // non-interface field appearing in ForceSendFields will be sent to the 2250 // server regardless of whether the field is empty or not. This may be 2251 // used to include empty fields in Patch requests. 2252 ForceSendFields []string `json:"-"` 2253 2254 // NullFields is a list of field names (e.g. "DisplayName") to include 2255 // in API requests with the JSON null value. By default, fields with 2256 // empty values are omitted from API requests. However, any field with 2257 // an empty value appearing in NullFields will be sent to the server as 2258 // null. It is an error if a field in this list has a non-empty value. 2259 // This may be used to include null fields in Patch requests. 2260 NullFields []string `json:"-"` 2261} 2262 2263func (s *Location) MarshalJSON() ([]byte, error) { 2264 type NoMethod Location 2265 raw := NoMethod(*s) 2266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2267} 2268 2269// LocationMetadata: Metadata for the given 2270// google.cloud.location.Location. 2271type LocationMetadata struct { 2272 // FlexibleEnvironmentAvailable: App Engine flexible environment is 2273 // available in the given location.@OutputOnly 2274 FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"` 2275 2276 // StandardEnvironmentAvailable: App Engine standard environment is 2277 // available in the given location.@OutputOnly 2278 StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"` 2279 2280 // ForceSendFields is a list of field names (e.g. 2281 // "FlexibleEnvironmentAvailable") to unconditionally include in API 2282 // requests. By default, fields with empty values are omitted from API 2283 // requests. However, any non-pointer, non-interface field appearing in 2284 // ForceSendFields will be sent to the server regardless of whether the 2285 // field is empty or not. This may be used to include empty fields in 2286 // Patch requests. 2287 ForceSendFields []string `json:"-"` 2288 2289 // NullFields is a list of field names (e.g. 2290 // "FlexibleEnvironmentAvailable") to include in API requests with the 2291 // JSON null value. By default, fields with empty values are omitted 2292 // from API requests. However, any field with an empty value appearing 2293 // in NullFields will be sent to the server as null. It is an error if a 2294 // field in this list has a non-empty value. This may be used to include 2295 // null fields in Patch requests. 2296 NullFields []string `json:"-"` 2297} 2298 2299func (s *LocationMetadata) MarshalJSON() ([]byte, error) { 2300 type NoMethod LocationMetadata 2301 raw := NoMethod(*s) 2302 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2303} 2304 2305// ManagedCertificate: A certificate managed by App Engine. 2306type ManagedCertificate struct { 2307 // LastRenewalTime: Time at which the certificate was last renewed. The 2308 // renewal process is fully managed. Certificate renewal will 2309 // automatically occur before the certificate expires. Renewal errors 2310 // can be tracked via ManagementStatus.@OutputOnly 2311 LastRenewalTime string `json:"lastRenewalTime,omitempty"` 2312 2313 // Status: Status of certificate management. Refers to the most recent 2314 // certificate acquisition or renewal attempt.@OutputOnly 2315 // 2316 // Possible values: 2317 // "MANAGEMENT_STATUS_UNSPECIFIED" 2318 // "OK" - Certificate was successfully obtained and inserted into the 2319 // serving system. 2320 // "PENDING" - Certificate is under active attempts to acquire or 2321 // renew. 2322 // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to 2323 // an invalid DNS setup and will be retried. Renewal attempts will 2324 // continue to fail until the certificate domain's DNS configuration is 2325 // fixed. The last successfully provisioned certificate may still be 2326 // serving. 2327 // "FAILED_PERMANENT" - All renewal attempts have been exhausted, 2328 // likely due to an invalid DNS setup. 2329 // "FAILED_RETRYING_CAA_FORBIDDEN" - Most recent renewal failed due to 2330 // an explicit CAA record that does not include the in-use CA, Let's 2331 // Encrypt. Renewals will continue to fail until the CAA is 2332 // reconfigured. The last successfully provisioned certificate may still 2333 // be serving. 2334 // "FAILED_RETRYING_CAA_CHECKING" - Most recent renewal failed due to 2335 // a CAA retrieval failure. This means that the domain's DNS provider 2336 // does not properly handle CAA records, failing requests for CAA 2337 // records when no CAA records are defined. Renewals will continue to 2338 // fail until the DNS provider is changed or a CAA record is added for 2339 // the given domain. The last successfully provisioned certificate may 2340 // still be serving. 2341 Status string `json:"status,omitempty"` 2342 2343 // ForceSendFields is a list of field names (e.g. "LastRenewalTime") to 2344 // unconditionally include in API requests. By default, fields with 2345 // empty values are omitted from API requests. However, any non-pointer, 2346 // non-interface field appearing in ForceSendFields will be sent to the 2347 // server regardless of whether the field is empty or not. This may be 2348 // used to include empty fields in Patch requests. 2349 ForceSendFields []string `json:"-"` 2350 2351 // NullFields is a list of field names (e.g. "LastRenewalTime") to 2352 // include in API requests with the JSON null value. By default, fields 2353 // with empty values are omitted from API requests. However, any field 2354 // with an empty value appearing in NullFields will be sent to the 2355 // server as null. It is an error if a field in this list has a 2356 // non-empty value. This may be used to include null fields in Patch 2357 // requests. 2358 NullFields []string `json:"-"` 2359} 2360 2361func (s *ManagedCertificate) MarshalJSON() ([]byte, error) { 2362 type NoMethod ManagedCertificate 2363 raw := NoMethod(*s) 2364 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2365} 2366 2367// ManualScaling: A service with manual scaling runs continuously, 2368// allowing you to perform complex initialization and rely on the state 2369// of its memory over time. 2370type ManualScaling struct { 2371 // Instances: Number of instances to assign to the service at the start. 2372 // This number can later be altered by using the Modules API 2373 // (https://cloud.google.com/appengine/docs/python/modules/functions) 2374 // set_num_instances() function. 2375 Instances int64 `json:"instances,omitempty"` 2376 2377 // ForceSendFields is a list of field names (e.g. "Instances") to 2378 // unconditionally include in API requests. By default, fields with 2379 // empty values are omitted from API requests. However, any non-pointer, 2380 // non-interface field appearing in ForceSendFields will be sent to the 2381 // server regardless of whether the field is empty or not. This may be 2382 // used to include empty fields in Patch requests. 2383 ForceSendFields []string `json:"-"` 2384 2385 // NullFields is a list of field names (e.g. "Instances") to include in 2386 // API requests with the JSON null value. By default, fields with empty 2387 // values are omitted from API requests. However, any field with an 2388 // empty value appearing in NullFields will be sent to the server as 2389 // null. It is an error if a field in this list has a non-empty value. 2390 // This may be used to include null fields in Patch requests. 2391 NullFields []string `json:"-"` 2392} 2393 2394func (s *ManualScaling) MarshalJSON() ([]byte, error) { 2395 type NoMethod ManualScaling 2396 raw := NoMethod(*s) 2397 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2398} 2399 2400// Network: Extra network settings. Only applicable in the App Engine 2401// flexible environment. 2402type Network struct { 2403 // ForwardedPorts: List of ports, or port pairs, to forward from the 2404 // virtual machine to the application container. Only applicable in the 2405 // App Engine flexible environment. 2406 ForwardedPorts []string `json:"forwardedPorts,omitempty"` 2407 2408 // InstanceTag: Tag to apply to the instance during creation. Only 2409 // applicable in the App Engine flexible environment. 2410 InstanceTag string `json:"instanceTag,omitempty"` 2411 2412 // Name: Google Compute Engine network where the virtual machines are 2413 // created. Specify the short name, not the resource path.Defaults to 2414 // default. 2415 Name string `json:"name,omitempty"` 2416 2417 // SessionAffinity: Enable session affinity. Only applicable in the App 2418 // Engine flexible environment. 2419 SessionAffinity bool `json:"sessionAffinity,omitempty"` 2420 2421 // SubnetworkName: Google Cloud Platform sub-network where the virtual 2422 // machines are created. Specify the short name, not the resource 2423 // path.If a subnetwork name is specified, a network name will also be 2424 // required unless it is for the default network. 2425 // If the network that the instance is being created in is a Legacy 2426 // network, then the IP address is allocated from the IPv4Range. 2427 // If the network that the instance is being created in is an auto 2428 // Subnet Mode Network, then only network name should be specified (not 2429 // the subnetwork_name) and the IP address is created from the 2430 // IPCidrRange of the subnetwork that exists in that zone for that 2431 // network. 2432 // If the network that the instance is being created in is a custom 2433 // Subnet Mode Network, then the subnetwork_name must be specified and 2434 // the IP address is created from the IPCidrRange of the subnetwork.If 2435 // specified, the subnetwork must exist in the same region as the App 2436 // Engine flexible environment application. 2437 SubnetworkName string `json:"subnetworkName,omitempty"` 2438 2439 // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to 2440 // unconditionally include in API requests. By default, fields with 2441 // empty values are omitted from API requests. However, any non-pointer, 2442 // non-interface field appearing in ForceSendFields will be sent to the 2443 // server regardless of whether the field is empty or not. This may be 2444 // used to include empty fields in Patch requests. 2445 ForceSendFields []string `json:"-"` 2446 2447 // NullFields is a list of field names (e.g. "ForwardedPorts") to 2448 // include in API requests with the JSON null value. By default, fields 2449 // with empty values are omitted from API requests. However, any field 2450 // with an empty value appearing in NullFields will be sent to the 2451 // server as null. It is an error if a field in this list has a 2452 // non-empty value. This may be used to include null fields in Patch 2453 // requests. 2454 NullFields []string `json:"-"` 2455} 2456 2457func (s *Network) MarshalJSON() ([]byte, error) { 2458 type NoMethod Network 2459 raw := NoMethod(*s) 2460 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2461} 2462 2463// NetworkUtilization: Target scaling by network usage. Only applicable 2464// in the App Engine flexible environment. 2465type NetworkUtilization struct { 2466 // TargetReceivedBytesPerSecond: Target bytes received per second. 2467 TargetReceivedBytesPerSecond int64 `json:"targetReceivedBytesPerSecond,omitempty"` 2468 2469 // TargetReceivedPacketsPerSecond: Target packets received per second. 2470 TargetReceivedPacketsPerSecond int64 `json:"targetReceivedPacketsPerSecond,omitempty"` 2471 2472 // TargetSentBytesPerSecond: Target bytes sent per second. 2473 TargetSentBytesPerSecond int64 `json:"targetSentBytesPerSecond,omitempty"` 2474 2475 // TargetSentPacketsPerSecond: Target packets sent per second. 2476 TargetSentPacketsPerSecond int64 `json:"targetSentPacketsPerSecond,omitempty"` 2477 2478 // ForceSendFields is a list of field names (e.g. 2479 // "TargetReceivedBytesPerSecond") to unconditionally include in API 2480 // requests. By default, fields with empty values are omitted from API 2481 // requests. However, any non-pointer, non-interface field appearing in 2482 // ForceSendFields will be sent to the server regardless of whether the 2483 // field is empty or not. This may be used to include empty fields in 2484 // Patch requests. 2485 ForceSendFields []string `json:"-"` 2486 2487 // NullFields is a list of field names (e.g. 2488 // "TargetReceivedBytesPerSecond") to include in API requests with the 2489 // JSON null value. By default, fields with empty values are omitted 2490 // from API requests. However, any field with an empty value appearing 2491 // in NullFields will be sent to the server as null. It is an error if a 2492 // field in this list has a non-empty value. This may be used to include 2493 // null fields in Patch requests. 2494 NullFields []string `json:"-"` 2495} 2496 2497func (s *NetworkUtilization) MarshalJSON() ([]byte, error) { 2498 type NoMethod NetworkUtilization 2499 raw := NoMethod(*s) 2500 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2501} 2502 2503type OAuth2ClientInfo struct { 2504 // ApplicationName: Application name to be used in OAuth consent screen. 2505 ApplicationName string `json:"applicationName,omitempty"` 2506 2507 // ClientName: Nameof the client to be generated. Optional - If not 2508 // provided, the name will be autogenerated by the backend. 2509 ClientName string `json:"clientName,omitempty"` 2510 2511 // DeveloperEmailAddress: Developer's information to be used in OAuth 2512 // consent screen. 2513 DeveloperEmailAddress string `json:"developerEmailAddress,omitempty"` 2514 2515 // ForceSendFields is a list of field names (e.g. "ApplicationName") to 2516 // unconditionally include in API requests. By default, fields with 2517 // empty values are omitted from API requests. However, any non-pointer, 2518 // non-interface field appearing in ForceSendFields will be sent to the 2519 // server regardless of whether the field is empty or not. This may be 2520 // used to include empty fields in Patch requests. 2521 ForceSendFields []string `json:"-"` 2522 2523 // NullFields is a list of field names (e.g. "ApplicationName") to 2524 // include in API requests with the JSON null value. By default, fields 2525 // with empty values are omitted from API requests. However, any field 2526 // with an empty value appearing in NullFields will be sent to the 2527 // server as null. It is an error if a field in this list has a 2528 // non-empty value. This may be used to include null fields in Patch 2529 // requests. 2530 NullFields []string `json:"-"` 2531} 2532 2533func (s *OAuth2ClientInfo) MarshalJSON() ([]byte, error) { 2534 type NoMethod OAuth2ClientInfo 2535 raw := NoMethod(*s) 2536 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2537} 2538 2539// Operation: This resource represents a long-running operation that is 2540// the result of a network API call. 2541type Operation struct { 2542 // Done: If the value is false, it means the operation is still in 2543 // progress. If true, the operation is completed, and either error or 2544 // response is available. 2545 Done bool `json:"done,omitempty"` 2546 2547 // Error: The error result of the operation in case of failure or 2548 // cancellation. 2549 Error *Status `json:"error,omitempty"` 2550 2551 // Metadata: Service-specific metadata associated with the operation. It 2552 // typically contains progress information and common metadata such as 2553 // create time. Some services might not provide such metadata. Any 2554 // method that returns a long-running operation should document the 2555 // metadata type, if any. 2556 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2557 2558 // Name: The server-assigned name, which is only unique within the same 2559 // service that originally returns it. If you use the default HTTP 2560 // mapping, the name should be a resource name ending with 2561 // operations/{unique_id}. 2562 Name string `json:"name,omitempty"` 2563 2564 // Response: The normal response of the operation in case of success. If 2565 // the original method returns no data on success, such as Delete, the 2566 // response is google.protobuf.Empty. If the original method is standard 2567 // Get/Create/Update, the response should be the resource. For other 2568 // methods, the response should have the type XxxResponse, where Xxx is 2569 // the original method name. For example, if the original method name is 2570 // TakeSnapshot(), the inferred response type is TakeSnapshotResponse. 2571 Response googleapi.RawMessage `json:"response,omitempty"` 2572 2573 // ServerResponse contains the HTTP response code and headers from the 2574 // server. 2575 googleapi.ServerResponse `json:"-"` 2576 2577 // ForceSendFields is a list of field names (e.g. "Done") to 2578 // unconditionally include in API requests. By default, fields with 2579 // empty values are omitted from API requests. However, any non-pointer, 2580 // non-interface field appearing in ForceSendFields will be sent to the 2581 // server regardless of whether the field is empty or not. This may be 2582 // used to include empty fields in Patch requests. 2583 ForceSendFields []string `json:"-"` 2584 2585 // NullFields is a list of field names (e.g. "Done") to include in API 2586 // requests with the JSON null value. By default, fields with empty 2587 // values are omitted from API requests. However, any field with an 2588 // empty value appearing in NullFields will be sent to the server as 2589 // null. It is an error if a field in this list has a non-empty value. 2590 // This may be used to include null fields in Patch requests. 2591 NullFields []string `json:"-"` 2592} 2593 2594func (s *Operation) MarshalJSON() ([]byte, error) { 2595 type NoMethod Operation 2596 raw := NoMethod(*s) 2597 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2598} 2599 2600// OperationMetadataV1: Metadata for the given 2601// google.longrunning.Operation. 2602type OperationMetadataV1 struct { 2603 CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"` 2604 2605 // EndTime: Time that this operation completed.@OutputOnly 2606 EndTime string `json:"endTime,omitempty"` 2607 2608 // EphemeralMessage: Ephemeral message that may change every time the 2609 // operation is polled. @OutputOnly 2610 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2611 2612 // InsertTime: Time that this operation was created.@OutputOnly 2613 InsertTime string `json:"insertTime,omitempty"` 2614 2615 // Method: API method that initiated this operation. Example: 2616 // google.appengine.v1.Versions.CreateVersion.@OutputOnly 2617 Method string `json:"method,omitempty"` 2618 2619 // Target: Name of the resource that this operation is acting on. 2620 // Example: apps/myapp/services/default.@OutputOnly 2621 Target string `json:"target,omitempty"` 2622 2623 // User: User who requested this operation.@OutputOnly 2624 User string `json:"user,omitempty"` 2625 2626 // Warning: Durable messages that persist on every operation poll. 2627 // @OutputOnly 2628 Warning []string `json:"warning,omitempty"` 2629 2630 // ForceSendFields is a list of field names (e.g. 2631 // "CreateVersionMetadata") to unconditionally include in API requests. 2632 // By default, fields with empty values are omitted from API requests. 2633 // However, any non-pointer, non-interface field appearing in 2634 // ForceSendFields will be sent to the server regardless of whether the 2635 // field is empty or not. This may be used to include empty fields in 2636 // Patch requests. 2637 ForceSendFields []string `json:"-"` 2638 2639 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2640 // include in API requests with the JSON null value. By default, fields 2641 // with empty values are omitted from API requests. However, any field 2642 // with an empty value appearing in NullFields will be sent to the 2643 // server as null. It is an error if a field in this list has a 2644 // non-empty value. This may be used to include null fields in Patch 2645 // requests. 2646 NullFields []string `json:"-"` 2647} 2648 2649func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) { 2650 type NoMethod OperationMetadataV1 2651 raw := NoMethod(*s) 2652 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2653} 2654 2655// OperationMetadataV1Alpha: Metadata for the given 2656// google.longrunning.Operation. 2657type OperationMetadataV1Alpha struct { 2658 CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"` 2659 2660 // EndTime: Time that this operation completed.@OutputOnly 2661 EndTime string `json:"endTime,omitempty"` 2662 2663 // EphemeralMessage: Ephemeral message that may change every time the 2664 // operation is polled. @OutputOnly 2665 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2666 2667 // InsertTime: Time that this operation was created.@OutputOnly 2668 InsertTime string `json:"insertTime,omitempty"` 2669 2670 // Method: API method that initiated this operation. Example: 2671 // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly 2672 Method string `json:"method,omitempty"` 2673 2674 // Target: Name of the resource that this operation is acting on. 2675 // Example: apps/myapp/services/default.@OutputOnly 2676 Target string `json:"target,omitempty"` 2677 2678 // User: User who requested this operation.@OutputOnly 2679 User string `json:"user,omitempty"` 2680 2681 // Warning: Durable messages that persist on every operation poll. 2682 // @OutputOnly 2683 Warning []string `json:"warning,omitempty"` 2684 2685 // ForceSendFields is a list of field names (e.g. 2686 // "CreateVersionMetadata") to unconditionally include in API requests. 2687 // By default, fields with empty values are omitted from API requests. 2688 // However, any non-pointer, non-interface field appearing in 2689 // ForceSendFields will be sent to the server regardless of whether the 2690 // field is empty or not. This may be used to include empty fields in 2691 // Patch requests. 2692 ForceSendFields []string `json:"-"` 2693 2694 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2695 // include in API requests with the JSON null value. By default, fields 2696 // with empty values are omitted from API requests. However, any field 2697 // with an empty value appearing in NullFields will be sent to the 2698 // server as null. It is an error if a field in this list has a 2699 // non-empty value. This may be used to include null fields in Patch 2700 // requests. 2701 NullFields []string `json:"-"` 2702} 2703 2704func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) { 2705 type NoMethod OperationMetadataV1Alpha 2706 raw := NoMethod(*s) 2707 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2708} 2709 2710// OperationMetadataV1Beta: Metadata for the given 2711// google.longrunning.Operation. 2712type OperationMetadataV1Beta struct { 2713 CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"` 2714 2715 // EndTime: Time that this operation completed.@OutputOnly 2716 EndTime string `json:"endTime,omitempty"` 2717 2718 // EphemeralMessage: Ephemeral message that may change every time the 2719 // operation is polled. @OutputOnly 2720 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2721 2722 // InsertTime: Time that this operation was created.@OutputOnly 2723 InsertTime string `json:"insertTime,omitempty"` 2724 2725 // Method: API method that initiated this operation. Example: 2726 // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly 2727 Method string `json:"method,omitempty"` 2728 2729 // Target: Name of the resource that this operation is acting on. 2730 // Example: apps/myapp/services/default.@OutputOnly 2731 Target string `json:"target,omitempty"` 2732 2733 // User: User who requested this operation.@OutputOnly 2734 User string `json:"user,omitempty"` 2735 2736 // Warning: Durable messages that persist on every operation poll. 2737 // @OutputOnly 2738 Warning []string `json:"warning,omitempty"` 2739 2740 // ForceSendFields is a list of field names (e.g. 2741 // "CreateVersionMetadata") to unconditionally include in API requests. 2742 // By default, fields with empty values are omitted from API requests. 2743 // However, any non-pointer, non-interface field appearing in 2744 // ForceSendFields will be sent to the server regardless of whether the 2745 // field is empty or not. This may be used to include empty fields in 2746 // Patch requests. 2747 ForceSendFields []string `json:"-"` 2748 2749 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2750 // include in API requests with the JSON null value. By default, fields 2751 // with empty values are omitted from API requests. However, any field 2752 // with an empty value appearing in NullFields will be sent to the 2753 // server as null. It is an error if a field in this list has a 2754 // non-empty value. This may be used to include null fields in Patch 2755 // requests. 2756 NullFields []string `json:"-"` 2757} 2758 2759func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) { 2760 type NoMethod OperationMetadataV1Beta 2761 raw := NoMethod(*s) 2762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2763} 2764 2765// ReadinessCheck: Readiness checking configuration for VM instances. 2766// Unhealthy instances are removed from traffic rotation. 2767type ReadinessCheck struct { 2768 // AppStartTimeout: A maximum time limit on application initialization, 2769 // measured from moment the application successfully replies to a 2770 // healthcheck until it is ready to serve traffic. 2771 AppStartTimeout string `json:"appStartTimeout,omitempty"` 2772 2773 // CheckInterval: Interval between health checks. 2774 CheckInterval string `json:"checkInterval,omitempty"` 2775 2776 // FailureThreshold: Number of consecutive failed checks required before 2777 // removing traffic. 2778 FailureThreshold int64 `json:"failureThreshold,omitempty"` 2779 2780 // Host: Host header to send when performing a HTTP Readiness check. 2781 // Example: "myapp.appspot.com" 2782 Host string `json:"host,omitempty"` 2783 2784 // Path: The request path. 2785 Path string `json:"path,omitempty"` 2786 2787 // SuccessThreshold: Number of consecutive successful checks required 2788 // before receiving traffic. 2789 SuccessThreshold int64 `json:"successThreshold,omitempty"` 2790 2791 // Timeout: Time before the check is considered failed. 2792 Timeout string `json:"timeout,omitempty"` 2793 2794 // ForceSendFields is a list of field names (e.g. "AppStartTimeout") to 2795 // unconditionally include in API requests. By default, fields with 2796 // empty values are omitted from API requests. However, any non-pointer, 2797 // non-interface field appearing in ForceSendFields will be sent to the 2798 // server regardless of whether the field is empty or not. This may be 2799 // used to include empty fields in Patch requests. 2800 ForceSendFields []string `json:"-"` 2801 2802 // NullFields is a list of field names (e.g. "AppStartTimeout") to 2803 // include in API requests with the JSON null value. By default, fields 2804 // with empty values are omitted from API requests. However, any field 2805 // with an empty value appearing in NullFields will be sent to the 2806 // server as null. It is an error if a field in this list has a 2807 // non-empty value. This may be used to include null fields in Patch 2808 // requests. 2809 NullFields []string `json:"-"` 2810} 2811 2812func (s *ReadinessCheck) MarshalJSON() ([]byte, error) { 2813 type NoMethod ReadinessCheck 2814 raw := NoMethod(*s) 2815 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2816} 2817 2818// RepairApplicationRequest: Request message for 2819// 'Applications.RepairApplication'. 2820type RepairApplicationRequest struct { 2821} 2822 2823// RequestUtilization: Target scaling by request utilization. Only 2824// applicable in the App Engine flexible environment. 2825type RequestUtilization struct { 2826 // TargetConcurrentRequests: Target number of concurrent requests. 2827 TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"` 2828 2829 // TargetRequestCountPerSecond: Target requests per second. 2830 TargetRequestCountPerSecond int64 `json:"targetRequestCountPerSecond,omitempty"` 2831 2832 // ForceSendFields is a list of field names (e.g. 2833 // "TargetConcurrentRequests") to unconditionally include in API 2834 // requests. By default, fields with empty values are omitted from API 2835 // requests. However, any non-pointer, non-interface field appearing in 2836 // ForceSendFields will be sent to the server regardless of whether the 2837 // field is empty or not. This may be used to include empty fields in 2838 // Patch requests. 2839 ForceSendFields []string `json:"-"` 2840 2841 // NullFields is a list of field names (e.g. "TargetConcurrentRequests") 2842 // to include in API requests with the JSON null value. By default, 2843 // fields with empty values are omitted from API requests. However, any 2844 // field with an empty value appearing in NullFields will be sent to the 2845 // server as null. It is an error if a field in this list has a 2846 // non-empty value. This may be used to include null fields in Patch 2847 // requests. 2848 NullFields []string `json:"-"` 2849} 2850 2851func (s *RequestUtilization) MarshalJSON() ([]byte, error) { 2852 type NoMethod RequestUtilization 2853 raw := NoMethod(*s) 2854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2855} 2856 2857// ResourceRecord: A DNS resource record. 2858type ResourceRecord struct { 2859 // Name: Relative name of the object affected by this record. Only 2860 // applicable for CNAME records. Example: 'www'. 2861 Name string `json:"name,omitempty"` 2862 2863 // Rrdata: Data for this record. Values vary by record type, as defined 2864 // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). 2865 Rrdata string `json:"rrdata,omitempty"` 2866 2867 // Type: Resource record type. Example: AAAA. 2868 // 2869 // Possible values: 2870 // "A" - An A resource record. Data is an IPv4 address. 2871 // "AAAA" - An AAAA resource record. Data is an IPv6 address. 2872 // "CNAME" - A CNAME resource record. Data is a domain name to be 2873 // aliased. 2874 Type string `json:"type,omitempty"` 2875 2876 // ForceSendFields is a list of field names (e.g. "Name") to 2877 // unconditionally include in API requests. By default, fields with 2878 // empty values are omitted from API requests. However, any non-pointer, 2879 // non-interface field appearing in ForceSendFields will be sent to the 2880 // server regardless of whether the field is empty or not. This may be 2881 // used to include empty fields in Patch requests. 2882 ForceSendFields []string `json:"-"` 2883 2884 // NullFields is a list of field names (e.g. "Name") to include in API 2885 // requests with the JSON null value. By default, fields with empty 2886 // values are omitted from API requests. However, any field with an 2887 // empty value appearing in NullFields will be sent to the server as 2888 // null. It is an error if a field in this list has a non-empty value. 2889 // This may be used to include null fields in Patch requests. 2890 NullFields []string `json:"-"` 2891} 2892 2893func (s *ResourceRecord) MarshalJSON() ([]byte, error) { 2894 type NoMethod ResourceRecord 2895 raw := NoMethod(*s) 2896 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2897} 2898 2899// Resources: Machine resources for a version. 2900type Resources struct { 2901 // Cpu: Number of CPU cores needed. 2902 Cpu float64 `json:"cpu,omitempty"` 2903 2904 // DiskGb: Disk size (GB) needed. 2905 DiskGb float64 `json:"diskGb,omitempty"` 2906 2907 // MemoryGb: Memory (GB) needed. 2908 MemoryGb float64 `json:"memoryGb,omitempty"` 2909 2910 // Volumes: User specified volumes. 2911 Volumes []*Volume `json:"volumes,omitempty"` 2912 2913 // ForceSendFields is a list of field names (e.g. "Cpu") to 2914 // unconditionally include in API requests. By default, fields with 2915 // empty values are omitted from API requests. However, any non-pointer, 2916 // non-interface field appearing in ForceSendFields will be sent to the 2917 // server regardless of whether the field is empty or not. This may be 2918 // used to include empty fields in Patch requests. 2919 ForceSendFields []string `json:"-"` 2920 2921 // NullFields is a list of field names (e.g. "Cpu") to include in API 2922 // requests with the JSON null value. By default, fields with empty 2923 // values are omitted from API requests. However, any field with an 2924 // empty value appearing in NullFields will be sent to the server as 2925 // null. It is an error if a field in this list has a non-empty value. 2926 // This may be used to include null fields in Patch requests. 2927 NullFields []string `json:"-"` 2928} 2929 2930func (s *Resources) MarshalJSON() ([]byte, error) { 2931 type NoMethod Resources 2932 raw := NoMethod(*s) 2933 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2934} 2935 2936func (s *Resources) UnmarshalJSON(data []byte) error { 2937 type NoMethod Resources 2938 var s1 struct { 2939 Cpu gensupport.JSONFloat64 `json:"cpu"` 2940 DiskGb gensupport.JSONFloat64 `json:"diskGb"` 2941 MemoryGb gensupport.JSONFloat64 `json:"memoryGb"` 2942 *NoMethod 2943 } 2944 s1.NoMethod = (*NoMethod)(s) 2945 if err := json.Unmarshal(data, &s1); err != nil { 2946 return err 2947 } 2948 s.Cpu = float64(s1.Cpu) 2949 s.DiskGb = float64(s1.DiskGb) 2950 s.MemoryGb = float64(s1.MemoryGb) 2951 return nil 2952} 2953 2954// ScriptHandler: Executes a script to handle the request that matches 2955// the URL pattern. 2956type ScriptHandler struct { 2957 // ScriptPath: Path to the script from the application root directory. 2958 ScriptPath string `json:"scriptPath,omitempty"` 2959 2960 // ForceSendFields is a list of field names (e.g. "ScriptPath") to 2961 // unconditionally include in API requests. By default, fields with 2962 // empty values are omitted from API requests. However, any non-pointer, 2963 // non-interface field appearing in ForceSendFields will be sent to the 2964 // server regardless of whether the field is empty or not. This may be 2965 // used to include empty fields in Patch requests. 2966 ForceSendFields []string `json:"-"` 2967 2968 // NullFields is a list of field names (e.g. "ScriptPath") to include in 2969 // API requests with the JSON null value. By default, fields with empty 2970 // values are omitted from API requests. However, any field with an 2971 // empty value appearing in NullFields will be sent to the server as 2972 // null. It is an error if a field in this list has a non-empty value. 2973 // This may be used to include null fields in Patch requests. 2974 NullFields []string `json:"-"` 2975} 2976 2977func (s *ScriptHandler) MarshalJSON() ([]byte, error) { 2978 type NoMethod ScriptHandler 2979 raw := NoMethod(*s) 2980 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2981} 2982 2983// Service: A Service resource is a logical component of an application 2984// that can share state and communicate in a secure fashion with other 2985// services. For example, an application that handles customer requests 2986// might include separate services to handle tasks such as backend data 2987// analysis or API requests from mobile devices. Each service has a 2988// collection of versions that define a specific set of code used to 2989// implement the functionality of that service. 2990type Service struct { 2991 // Id: Relative name of the service within the application. Example: 2992 // default.@OutputOnly 2993 Id string `json:"id,omitempty"` 2994 2995 // Name: Full path to the Service resource in the API. Example: 2996 // apps/myapp/services/default.@OutputOnly 2997 Name string `json:"name,omitempty"` 2998 2999 // Split: Mapping that defines fractional HTTP traffic diversion to 3000 // different versions within the service. 3001 Split *TrafficSplit `json:"split,omitempty"` 3002 3003 // ServerResponse contains the HTTP response code and headers from the 3004 // server. 3005 googleapi.ServerResponse `json:"-"` 3006 3007 // ForceSendFields is a list of field names (e.g. "Id") to 3008 // unconditionally include in API requests. By default, fields with 3009 // empty values are omitted from API requests. However, any non-pointer, 3010 // non-interface field appearing in ForceSendFields will be sent to the 3011 // server regardless of whether the field is empty or not. This may be 3012 // used to include empty fields in Patch requests. 3013 ForceSendFields []string `json:"-"` 3014 3015 // NullFields is a list of field names (e.g. "Id") to include in API 3016 // requests with the JSON null value. By default, fields with empty 3017 // values are omitted from API requests. However, any field with an 3018 // empty value appearing in NullFields will be sent to the server as 3019 // null. It is an error if a field in this list has a non-empty value. 3020 // This may be used to include null fields in Patch requests. 3021 NullFields []string `json:"-"` 3022} 3023 3024func (s *Service) MarshalJSON() ([]byte, error) { 3025 type NoMethod Service 3026 raw := NoMethod(*s) 3027 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3028} 3029 3030// SslSettings: SSL configuration for a DomainMapping resource. 3031type SslSettings struct { 3032 // CertificateId: ID of the AuthorizedCertificate resource configuring 3033 // SSL for the application. Clearing this field will remove SSL 3034 // support.By default, a managed certificate is automatically created 3035 // for every domain mapping. To omit SSL support or to configure SSL 3036 // manually, specify SslManagementType.MANUAL on a CREATE or UPDATE 3037 // request. You must be authorized to administer the 3038 // AuthorizedCertificate resource to manually map it to a DomainMapping 3039 // resource. Example: 12345. 3040 CertificateId string `json:"certificateId,omitempty"` 3041 3042 // PendingManagedCertificateId: ID of the managed AuthorizedCertificate 3043 // resource currently being provisioned, if applicable. Until the new 3044 // managed certificate has been successfully provisioned, the previous 3045 // SSL state will be preserved. Once the provisioning process completes, 3046 // the certificate_id field will reflect the new managed certificate and 3047 // this field will be left empty. To remove SSL support while there is 3048 // still a pending managed certificate, clear the certificate_id field 3049 // with an UpdateDomainMappingRequest.@OutputOnly 3050 PendingManagedCertificateId string `json:"pendingManagedCertificateId,omitempty"` 3051 3052 // SslManagementType: SSL management type for this domain. If AUTOMATIC, 3053 // a managed certificate is automatically provisioned. If MANUAL, 3054 // certificate_id must be manually specified in order to configure SSL 3055 // for this domain. 3056 // 3057 // Possible values: 3058 // "AUTOMATIC" - SSL support for this domain is configured 3059 // automatically. The mapped SSL certificate will be automatically 3060 // renewed. 3061 // "MANUAL" - SSL support for this domain is configured manually by 3062 // the user. Either the domain has no SSL support or a user-obtained SSL 3063 // certificate has been explictly mapped to this domain. 3064 SslManagementType string `json:"sslManagementType,omitempty"` 3065 3066 // ForceSendFields is a list of field names (e.g. "CertificateId") to 3067 // unconditionally include in API requests. By default, fields with 3068 // empty values are omitted from API requests. However, any non-pointer, 3069 // non-interface field appearing in ForceSendFields will be sent to the 3070 // server regardless of whether the field is empty or not. This may be 3071 // used to include empty fields in Patch requests. 3072 ForceSendFields []string `json:"-"` 3073 3074 // NullFields is a list of field names (e.g. "CertificateId") to include 3075 // in API requests with the JSON null value. By default, fields with 3076 // empty values are omitted from API requests. However, any field with 3077 // an empty value appearing in NullFields will be sent to the server as 3078 // null. It is an error if a field in this list has a non-empty value. 3079 // This may be used to include null fields in Patch requests. 3080 NullFields []string `json:"-"` 3081} 3082 3083func (s *SslSettings) MarshalJSON() ([]byte, error) { 3084 type NoMethod SslSettings 3085 raw := NoMethod(*s) 3086 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3087} 3088 3089// StandardSchedulerSettings: Scheduler settings for standard 3090// environment. 3091type StandardSchedulerSettings struct { 3092 // MaxInstances: Maximum number of instances to run for this version. 3093 // Set to zero to disable max_instances configuration. 3094 MaxInstances int64 `json:"maxInstances,omitempty"` 3095 3096 // MinInstances: Minimum number of instances to run for this version. 3097 // Set to zero to disable min_instances configuration. 3098 MinInstances int64 `json:"minInstances,omitempty"` 3099 3100 // TargetCpuUtilization: Target CPU utilization ratio to maintain when 3101 // scaling. 3102 TargetCpuUtilization float64 `json:"targetCpuUtilization,omitempty"` 3103 3104 // TargetThroughputUtilization: Target throughput utilization ratio to 3105 // maintain when scaling 3106 TargetThroughputUtilization float64 `json:"targetThroughputUtilization,omitempty"` 3107 3108 // ForceSendFields is a list of field names (e.g. "MaxInstances") to 3109 // unconditionally include in API requests. By default, fields with 3110 // empty values are omitted from API requests. However, any non-pointer, 3111 // non-interface field appearing in ForceSendFields will be sent to the 3112 // server regardless of whether the field is empty or not. This may be 3113 // used to include empty fields in Patch requests. 3114 ForceSendFields []string `json:"-"` 3115 3116 // NullFields is a list of field names (e.g. "MaxInstances") to include 3117 // in API requests with the JSON null value. By default, fields with 3118 // empty values are omitted from API requests. However, any field with 3119 // an empty value appearing in NullFields will be sent to the server as 3120 // null. It is an error if a field in this list has a non-empty value. 3121 // This may be used to include null fields in Patch requests. 3122 NullFields []string `json:"-"` 3123} 3124 3125func (s *StandardSchedulerSettings) MarshalJSON() ([]byte, error) { 3126 type NoMethod StandardSchedulerSettings 3127 raw := NoMethod(*s) 3128 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3129} 3130 3131func (s *StandardSchedulerSettings) UnmarshalJSON(data []byte) error { 3132 type NoMethod StandardSchedulerSettings 3133 var s1 struct { 3134 TargetCpuUtilization gensupport.JSONFloat64 `json:"targetCpuUtilization"` 3135 TargetThroughputUtilization gensupport.JSONFloat64 `json:"targetThroughputUtilization"` 3136 *NoMethod 3137 } 3138 s1.NoMethod = (*NoMethod)(s) 3139 if err := json.Unmarshal(data, &s1); err != nil { 3140 return err 3141 } 3142 s.TargetCpuUtilization = float64(s1.TargetCpuUtilization) 3143 s.TargetThroughputUtilization = float64(s1.TargetThroughputUtilization) 3144 return nil 3145} 3146 3147// StaticFilesHandler: Files served directly to the user for a given 3148// URL, such as images, CSS stylesheets, or JavaScript source files. 3149// Static file handlers describe which files in the application 3150// directory are static files, and which URLs serve them. 3151type StaticFilesHandler struct { 3152 // ApplicationReadable: Whether files should also be uploaded as code 3153 // data. By default, files declared in static file handlers are uploaded 3154 // as static data and are only served to end users; they cannot be read 3155 // by the application. If enabled, uploads are charged against both your 3156 // code and static data storage resource quotas. 3157 ApplicationReadable bool `json:"applicationReadable,omitempty"` 3158 3159 // Expiration: Time a static file served by this handler should be 3160 // cached by web proxies and browsers. 3161 Expiration string `json:"expiration,omitempty"` 3162 3163 // HttpHeaders: HTTP headers to use for all responses from these URLs. 3164 HttpHeaders map[string]string `json:"httpHeaders,omitempty"` 3165 3166 // MimeType: MIME type used to serve all files served by this 3167 // handler.Defaults to file-specific MIME types, which are derived from 3168 // each file's filename extension. 3169 MimeType string `json:"mimeType,omitempty"` 3170 3171 // Path: Path to the static files matched by the URL pattern, from the 3172 // application root directory. The path can refer to text matched in 3173 // groupings in the URL pattern. 3174 Path string `json:"path,omitempty"` 3175 3176 // RequireMatchingFile: Whether this handler should match the request if 3177 // the file referenced by the handler does not exist. 3178 RequireMatchingFile bool `json:"requireMatchingFile,omitempty"` 3179 3180 // UploadPathRegex: Regular expression that matches the file paths for 3181 // all files that should be referenced by this handler. 3182 UploadPathRegex string `json:"uploadPathRegex,omitempty"` 3183 3184 // ForceSendFields is a list of field names (e.g. "ApplicationReadable") 3185 // to unconditionally include in API requests. By default, fields with 3186 // empty values are omitted from API requests. However, any non-pointer, 3187 // non-interface field appearing in ForceSendFields will be sent to the 3188 // server regardless of whether the field is empty or not. This may be 3189 // used to include empty fields in Patch requests. 3190 ForceSendFields []string `json:"-"` 3191 3192 // NullFields is a list of field names (e.g. "ApplicationReadable") to 3193 // include in API requests with the JSON null value. By default, fields 3194 // with empty values are omitted from API requests. However, any field 3195 // with an empty value appearing in NullFields will be sent to the 3196 // server as null. It is an error if a field in this list has a 3197 // non-empty value. This may be used to include null fields in Patch 3198 // requests. 3199 NullFields []string `json:"-"` 3200} 3201 3202func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) { 3203 type NoMethod StaticFilesHandler 3204 raw := NoMethod(*s) 3205 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3206} 3207 3208// Status: The Status type defines a logical error model that is 3209// suitable for different programming environments, including REST APIs 3210// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 3211// Status message contains three pieces of data: error code, error 3212// message, and error details.You can find out more about this error 3213// model and how to work with it in the API Design Guide 3214// (https://cloud.google.com/apis/design/errors). 3215type Status struct { 3216 // Code: The status code, which should be an enum value of 3217 // google.rpc.Code. 3218 Code int64 `json:"code,omitempty"` 3219 3220 // Details: A list of messages that carry the error details. There is a 3221 // common set of message types for APIs to use. 3222 Details []googleapi.RawMessage `json:"details,omitempty"` 3223 3224 // Message: A developer-facing error message, which should be in 3225 // English. Any user-facing error message should be localized and sent 3226 // in the google.rpc.Status.details field, or localized by the client. 3227 Message string `json:"message,omitempty"` 3228 3229 // ForceSendFields is a list of field names (e.g. "Code") to 3230 // unconditionally include in API requests. By default, fields with 3231 // empty values are omitted from API requests. However, any non-pointer, 3232 // non-interface field appearing in ForceSendFields will be sent to the 3233 // server regardless of whether the field is empty or not. This may be 3234 // used to include empty fields in Patch requests. 3235 ForceSendFields []string `json:"-"` 3236 3237 // NullFields is a list of field names (e.g. "Code") to include in API 3238 // requests with the JSON null value. By default, fields with empty 3239 // values are omitted from API requests. However, any field with an 3240 // empty value appearing in NullFields will be sent to the server as 3241 // null. It is an error if a field in this list has a non-empty value. 3242 // This may be used to include null fields in Patch requests. 3243 NullFields []string `json:"-"` 3244} 3245 3246func (s *Status) MarshalJSON() ([]byte, error) { 3247 type NoMethod Status 3248 raw := NoMethod(*s) 3249 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3250} 3251 3252// TrafficSplit: Traffic routing configuration for versions within a 3253// single service. Traffic splits define how traffic directed to the 3254// service is assigned to versions. 3255type TrafficSplit struct { 3256 // Allocations: Mapping from version IDs within the service to 3257 // fractional (0.000, 1] allocations of traffic for that version. Each 3258 // version can be specified only once, but some versions in the service 3259 // may not have any traffic allocation. Services that have traffic 3260 // allocated cannot be deleted until either the service is deleted or 3261 // their traffic allocation is removed. Allocations must sum to 1. Up to 3262 // two decimal place precision is supported for IP-based splits and up 3263 // to three decimal places is supported for cookie-based splits. 3264 Allocations map[string]float64 `json:"allocations,omitempty"` 3265 3266 // ShardBy: Mechanism used to determine which version a request is sent 3267 // to. The traffic selection algorithm will be stable for either type 3268 // until allocations are changed. 3269 // 3270 // Possible values: 3271 // "UNSPECIFIED" - Diversion method unspecified. 3272 // "COOKIE" - Diversion based on a specially named cookie, 3273 // "GOOGAPPUID." The cookie must be set by the application itself or no 3274 // diversion will occur. 3275 // "IP" - Diversion based on applying the modulus operation to a 3276 // fingerprint of the IP address. 3277 // "RANDOM" - Diversion based on weighted random assignment. An 3278 // incoming request is randomly routed to a version in the traffic 3279 // split, with probability proportional to the version's traffic share. 3280 ShardBy string `json:"shardBy,omitempty"` 3281 3282 // ForceSendFields is a list of field names (e.g. "Allocations") to 3283 // unconditionally include in API requests. By default, fields with 3284 // empty values are omitted from API requests. However, any non-pointer, 3285 // non-interface field appearing in ForceSendFields will be sent to the 3286 // server regardless of whether the field is empty or not. This may be 3287 // used to include empty fields in Patch requests. 3288 ForceSendFields []string `json:"-"` 3289 3290 // NullFields is a list of field names (e.g. "Allocations") to include 3291 // in API requests with the JSON null value. By default, fields with 3292 // empty values are omitted from API requests. However, any field with 3293 // an empty value appearing in NullFields will be sent to the server as 3294 // null. It is an error if a field in this list has a non-empty value. 3295 // This may be used to include null fields in Patch requests. 3296 NullFields []string `json:"-"` 3297} 3298 3299func (s *TrafficSplit) MarshalJSON() ([]byte, error) { 3300 type NoMethod TrafficSplit 3301 raw := NoMethod(*s) 3302 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3303} 3304 3305// UrlDispatchRule: Rules to match an HTTP request and dispatch that 3306// request to a service. 3307type UrlDispatchRule struct { 3308 // Domain: Domain name to match against. The wildcard "*" is supported 3309 // if specified before a period: "*.".Defaults to matching all domains: 3310 // "*". 3311 Domain string `json:"domain,omitempty"` 3312 3313 // Path: Pathname within the host. Must start with a "/". A single "*" 3314 // can be included at the end of the path.The sum of the lengths of the 3315 // domain and path may not exceed 100 characters. 3316 Path string `json:"path,omitempty"` 3317 3318 // Service: Resource ID of a service in this application that should 3319 // serve the matched request. The service must already exist. Example: 3320 // default. 3321 Service string `json:"service,omitempty"` 3322 3323 // ForceSendFields is a list of field names (e.g. "Domain") to 3324 // unconditionally include in API requests. By default, fields with 3325 // empty values are omitted from API requests. However, any non-pointer, 3326 // non-interface field appearing in ForceSendFields will be sent to the 3327 // server regardless of whether the field is empty or not. This may be 3328 // used to include empty fields in Patch requests. 3329 ForceSendFields []string `json:"-"` 3330 3331 // NullFields is a list of field names (e.g. "Domain") to include in API 3332 // requests with the JSON null value. By default, fields with empty 3333 // values are omitted from API requests. However, any field with an 3334 // empty value appearing in NullFields will be sent to the server as 3335 // null. It is an error if a field in this list has a non-empty value. 3336 // This may be used to include null fields in Patch requests. 3337 NullFields []string `json:"-"` 3338} 3339 3340func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) { 3341 type NoMethod UrlDispatchRule 3342 raw := NoMethod(*s) 3343 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3344} 3345 3346// UrlMap: URL pattern and description of how the URL should be handled. 3347// App Engine can handle URLs by executing application code or by 3348// serving static files uploaded with the version, such as images, CSS, 3349// or JavaScript. 3350type UrlMap struct { 3351 // ApiEndpoint: Uses API Endpoints to handle requests. 3352 ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"` 3353 3354 // AuthFailAction: Action to take when users access resources that 3355 // require authentication. Defaults to redirect. 3356 // 3357 // Possible values: 3358 // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified. 3359 // AUTH_FAIL_ACTION_REDIRECT is assumed. 3360 // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to 3361 // "accounts.google.com". The user is redirected back to the application 3362 // URL after signing in or creating an account. 3363 // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP 3364 // status code and an error message. 3365 AuthFailAction string `json:"authFailAction,omitempty"` 3366 3367 // Login: Level of login required to access this resource. Not supported 3368 // for Node.js in the App Engine standard environment. 3369 // 3370 // Possible values: 3371 // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed. 3372 // "LOGIN_OPTIONAL" - Does not require that the user is signed in. 3373 // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action 3374 // is taken. In addition, if the user is not an administrator for the 3375 // application, they are given an error message regardless of 3376 // auth_fail_action. If the user is an administrator, the handler 3377 // proceeds. 3378 // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds 3379 // normally. Otherwise, the auth_fail_action is taken. 3380 Login string `json:"login,omitempty"` 3381 3382 // RedirectHttpResponseCode: 30x code to use when performing redirects 3383 // for the secure field. Defaults to 302. 3384 // 3385 // Possible values: 3386 // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is 3387 // assumed. 3388 // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code. 3389 // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code. 3390 // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code. 3391 // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code. 3392 RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"` 3393 3394 // Script: Executes a script to handle the requests that match this URL 3395 // pattern. Only the auto value is supported for Node.js in the App 3396 // Engine standard environment, for example "script": "auto". 3397 Script *ScriptHandler `json:"script,omitempty"` 3398 3399 // SecurityLevel: Security (HTTPS) enforcement for this URL. 3400 // 3401 // Possible values: 3402 // "SECURE_UNSPECIFIED" - Not specified. 3403 // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that 3404 // match the handler succeed without redirects. The application can 3405 // examine the request to determine which protocol was used, and respond 3406 // accordingly. 3407 // "SECURE_NEVER" - Requests for a URL that match this handler that 3408 // use HTTPS are automatically redirected to the HTTP equivalent URL. 3409 // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that 3410 // match the handler succeed without redirects. The application can 3411 // examine the request to determine which protocol was used and respond 3412 // accordingly. 3413 // "SECURE_ALWAYS" - Requests for a URL that match this handler that 3414 // do not use HTTPS are automatically redirected to the HTTPS URL with 3415 // the same path. Query parameters are reserved for the redirect. 3416 SecurityLevel string `json:"securityLevel,omitempty"` 3417 3418 // StaticFiles: Returns the contents of a file, such as an image, as the 3419 // response. 3420 StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"` 3421 3422 // UrlRegex: URL prefix. Uses regular expression syntax, which means 3423 // regexp special characters must be escaped, but should not contain 3424 // groupings. All URLs that begin with this prefix are handled by this 3425 // handler, using the portion of the URL after the prefix as part of the 3426 // file path. 3427 UrlRegex string `json:"urlRegex,omitempty"` 3428 3429 // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to 3430 // unconditionally include in API requests. By default, fields with 3431 // empty values are omitted from API requests. However, any non-pointer, 3432 // non-interface field appearing in ForceSendFields will be sent to the 3433 // server regardless of whether the field is empty or not. This may be 3434 // used to include empty fields in Patch requests. 3435 ForceSendFields []string `json:"-"` 3436 3437 // NullFields is a list of field names (e.g. "ApiEndpoint") to include 3438 // in API requests with the JSON null value. By default, fields with 3439 // empty values are omitted from API requests. However, any field with 3440 // an empty value appearing in NullFields will be sent to the server as 3441 // null. It is an error if a field in this list has a non-empty value. 3442 // This may be used to include null fields in Patch requests. 3443 NullFields []string `json:"-"` 3444} 3445 3446func (s *UrlMap) MarshalJSON() ([]byte, error) { 3447 type NoMethod UrlMap 3448 raw := NoMethod(*s) 3449 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3450} 3451 3452// Version: A Version resource is a specific set of source code and 3453// configuration files that are deployed into a service. 3454type Version struct { 3455 // ApiConfig: Serving configuration for Google Cloud Endpoints 3456 // (https://cloud.google.com/appengine/docs/python/endpoints/).Only 3457 // returned in GET requests if view=FULL is set. 3458 ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"` 3459 3460 // AutomaticScaling: Automatic scaling is based on request rate, 3461 // response latencies, and other application metrics. 3462 AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"` 3463 3464 // BasicScaling: A service with basic scaling will create an instance 3465 // when the application receives a request. The instance will be turned 3466 // down when the app becomes idle. Basic scaling is ideal for work that 3467 // is intermittent or driven by user activity. 3468 BasicScaling *BasicScaling `json:"basicScaling,omitempty"` 3469 3470 // BetaSettings: Metadata settings that are supplied to this version to 3471 // enable beta runtime features. 3472 BetaSettings map[string]string `json:"betaSettings,omitempty"` 3473 3474 // CreateTime: Time that this version was created.@OutputOnly 3475 CreateTime string `json:"createTime,omitempty"` 3476 3477 // CreatedBy: Email address of the user who created this 3478 // version.@OutputOnly 3479 CreatedBy string `json:"createdBy,omitempty"` 3480 3481 // DefaultExpiration: Duration that static files should be cached by web 3482 // proxies and browsers. Only applicable if the corresponding 3483 // StaticFilesHandler 3484 // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 3485 // ta/apps.services.versions#StaticFilesHandler) does not specify its 3486 // own expiration time.Only returned in GET requests if view=FULL is 3487 // set. 3488 DefaultExpiration string `json:"defaultExpiration,omitempty"` 3489 3490 // Deployment: Code and application artifacts that make up this 3491 // version.Only returned in GET requests if view=FULL is set. 3492 Deployment *Deployment `json:"deployment,omitempty"` 3493 3494 // DiskUsageBytes: Total size in bytes of all the files that are 3495 // included in this version and currently hosted on the App Engine 3496 // disk.@OutputOnly 3497 DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"` 3498 3499 // EndpointsApiService: Cloud Endpoints configuration.If 3500 // endpoints_api_service is set, the Cloud Endpoints Extensible Service 3501 // Proxy will be provided to serve the API implemented by the app. 3502 EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"` 3503 3504 // Entrypoint: The entrypoint for the application. 3505 Entrypoint *Entrypoint `json:"entrypoint,omitempty"` 3506 3507 // Env: App Engine execution environment for this version.Defaults to 3508 // standard. 3509 Env string `json:"env,omitempty"` 3510 3511 // EnvVariables: Environment variables available to the application.Only 3512 // returned in GET requests if view=FULL is set. 3513 EnvVariables map[string]string `json:"envVariables,omitempty"` 3514 3515 // ErrorHandlers: Custom static error pages. Limited to 10KB per 3516 // page.Only returned in GET requests if view=FULL is set. 3517 ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"` 3518 3519 // Handlers: An ordered list of URL-matching patterns that should be 3520 // applied to incoming requests. The first matching URL handles the 3521 // request and other request handlers are not attempted.Only returned in 3522 // GET requests if view=FULL is set. 3523 Handlers []*UrlMap `json:"handlers,omitempty"` 3524 3525 // HealthCheck: Configures health checking for instances. Unhealthy 3526 // instances are stopped and replaced with new instances. Only 3527 // applicable in the App Engine flexible environment.Only returned in 3528 // GET requests if view=FULL is set. 3529 HealthCheck *HealthCheck `json:"healthCheck,omitempty"` 3530 3531 // Id: Relative name of the version within the service. Example: v1. 3532 // Version names can contain only lowercase letters, numbers, or 3533 // hyphens. Reserved names: "default", "latest", and any name with the 3534 // prefix "ah-". 3535 Id string `json:"id,omitempty"` 3536 3537 // InboundServices: Before an application can receive email or XMPP 3538 // messages, the application must be configured to enable the service. 3539 // 3540 // Possible values: 3541 // "INBOUND_SERVICE_UNSPECIFIED" - Not specified. 3542 // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail. 3543 // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive 3544 // email-bound notifications. 3545 // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive 3546 // error stanzas. 3547 // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive 3548 // instant messages. 3549 // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive 3550 // user subscription POSTs. 3551 // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive 3552 // a user's chat presence. 3553 // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for 3554 // notifications when a client connects or disconnects from a channel. 3555 // "INBOUND_SERVICE_WARMUP" - Enables warmup requests. 3556 InboundServices []string `json:"inboundServices,omitempty"` 3557 3558 // InstanceClass: Instance class that is used to run this version. Valid 3559 // values are: 3560 // AutomaticScaling: F1, F2, F4, F4_1G 3561 // ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 3562 // for AutomaticScaling and B1 for ManualScaling or BasicScaling. 3563 InstanceClass string `json:"instanceClass,omitempty"` 3564 3565 // Libraries: Configuration for third-party Python runtime libraries 3566 // that are required by the application.Only returned in GET requests if 3567 // view=FULL is set. 3568 Libraries []*Library `json:"libraries,omitempty"` 3569 3570 // LivenessCheck: Configures liveness health checking for instances. 3571 // Unhealthy instances are stopped and replaced with new instancesOnly 3572 // returned in GET requests if view=FULL is set. 3573 LivenessCheck *LivenessCheck `json:"livenessCheck,omitempty"` 3574 3575 // ManualScaling: A service with manual scaling runs continuously, 3576 // allowing you to perform complex initialization and rely on the state 3577 // of its memory over time. 3578 ManualScaling *ManualScaling `json:"manualScaling,omitempty"` 3579 3580 // Name: Full path to the Version resource in the API. Example: 3581 // apps/myapp/services/default/versions/v1.@OutputOnly 3582 Name string `json:"name,omitempty"` 3583 3584 // Network: Extra network settings. Only applicable in the App Engine 3585 // flexible environment. 3586 Network *Network `json:"network,omitempty"` 3587 3588 // NobuildFilesRegex: Files that match this pattern will not be built 3589 // into this version. Only applicable for Go runtimes.Only returned in 3590 // GET requests if view=FULL is set. 3591 NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"` 3592 3593 // ReadinessCheck: Configures readiness health checking for instances. 3594 // Unhealthy instances are not put into the backend traffic 3595 // rotation.Only returned in GET requests if view=FULL is set. 3596 ReadinessCheck *ReadinessCheck `json:"readinessCheck,omitempty"` 3597 3598 // Resources: Machine resources for this version. Only applicable in the 3599 // App Engine flexible environment. 3600 Resources *Resources `json:"resources,omitempty"` 3601 3602 // Runtime: Desired runtime. Example: python27. 3603 Runtime string `json:"runtime,omitempty"` 3604 3605 // RuntimeApiVersion: The version of the API in the given runtime 3606 // environment. Please see the app.yaml reference for valid values at 3607 // https://cloud.google.com/appengine/docs/standard/<language>/config/appref 3608 RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"` 3609 3610 // RuntimeChannel: The channel of the runtime to use. Only available for 3611 // some runtimes. Defaults to the default channel. 3612 RuntimeChannel string `json:"runtimeChannel,omitempty"` 3613 3614 // RuntimeMainExecutablePath: The path or name of the app's main 3615 // executable. 3616 RuntimeMainExecutablePath string `json:"runtimeMainExecutablePath,omitempty"` 3617 3618 // ServingStatus: Current serving status of this version. Only the 3619 // versions with a SERVING status create instances and can be 3620 // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to 3621 // SERVING. 3622 // 3623 // Possible values: 3624 // "SERVING_STATUS_UNSPECIFIED" - Not specified. 3625 // "SERVING" - Currently serving. Instances are created according to 3626 // the scaling settings of the version. 3627 // "STOPPED" - Disabled. No instances will be created and the scaling 3628 // settings are ignored until the state of the version changes to 3629 // SERVING. 3630 ServingStatus string `json:"servingStatus,omitempty"` 3631 3632 // Threadsafe: Whether multiple requests can be dispatched to this 3633 // version at once. 3634 Threadsafe bool `json:"threadsafe,omitempty"` 3635 3636 // VersionUrl: Serving URL for this version. Example: 3637 // "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly 3638 VersionUrl string `json:"versionUrl,omitempty"` 3639 3640 // Vm: Whether to deploy this version in a container on a virtual 3641 // machine. 3642 Vm bool `json:"vm,omitempty"` 3643 3644 // VpcAccessConnector: Enables VPC connectivity for standard apps. 3645 VpcAccessConnector *VpcAccessConnector `json:"vpcAccessConnector,omitempty"` 3646 3647 // Zones: The Google Compute Engine zones that are supported by this 3648 // version in the App Engine flexible environment. Deprecated. 3649 Zones []string `json:"zones,omitempty"` 3650 3651 // ServerResponse contains the HTTP response code and headers from the 3652 // server. 3653 googleapi.ServerResponse `json:"-"` 3654 3655 // ForceSendFields is a list of field names (e.g. "ApiConfig") to 3656 // unconditionally include in API requests. By default, fields with 3657 // empty values are omitted from API requests. However, any non-pointer, 3658 // non-interface field appearing in ForceSendFields will be sent to the 3659 // server regardless of whether the field is empty or not. This may be 3660 // used to include empty fields in Patch requests. 3661 ForceSendFields []string `json:"-"` 3662 3663 // NullFields is a list of field names (e.g. "ApiConfig") to include in 3664 // API requests with the JSON null value. By default, fields with empty 3665 // values are omitted from API requests. However, any field with an 3666 // empty value appearing in NullFields will be sent to the server as 3667 // null. It is an error if a field in this list has a non-empty value. 3668 // This may be used to include null fields in Patch requests. 3669 NullFields []string `json:"-"` 3670} 3671 3672func (s *Version) MarshalJSON() ([]byte, error) { 3673 type NoMethod Version 3674 raw := NoMethod(*s) 3675 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3676} 3677 3678// Volume: Volumes mounted within the app container. Only applicable in 3679// the App Engine flexible environment. 3680type Volume struct { 3681 // Name: Unique name for the volume. 3682 Name string `json:"name,omitempty"` 3683 3684 // SizeGb: Volume size in gigabytes. 3685 SizeGb float64 `json:"sizeGb,omitempty"` 3686 3687 // VolumeType: Underlying volume type, e.g. 'tmpfs'. 3688 VolumeType string `json:"volumeType,omitempty"` 3689 3690 // ForceSendFields is a list of field names (e.g. "Name") to 3691 // unconditionally include in API requests. By default, fields with 3692 // empty values are omitted from API requests. However, any non-pointer, 3693 // non-interface field appearing in ForceSendFields will be sent to the 3694 // server regardless of whether the field is empty or not. This may be 3695 // used to include empty fields in Patch requests. 3696 ForceSendFields []string `json:"-"` 3697 3698 // NullFields is a list of field names (e.g. "Name") to include in API 3699 // requests with the JSON null value. By default, fields with empty 3700 // values are omitted from API requests. However, any field with an 3701 // empty value appearing in NullFields will be sent to the server as 3702 // null. It is an error if a field in this list has a non-empty value. 3703 // This may be used to include null fields in Patch requests. 3704 NullFields []string `json:"-"` 3705} 3706 3707func (s *Volume) MarshalJSON() ([]byte, error) { 3708 type NoMethod Volume 3709 raw := NoMethod(*s) 3710 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3711} 3712 3713func (s *Volume) UnmarshalJSON(data []byte) error { 3714 type NoMethod Volume 3715 var s1 struct { 3716 SizeGb gensupport.JSONFloat64 `json:"sizeGb"` 3717 *NoMethod 3718 } 3719 s1.NoMethod = (*NoMethod)(s) 3720 if err := json.Unmarshal(data, &s1); err != nil { 3721 return err 3722 } 3723 s.SizeGb = float64(s1.SizeGb) 3724 return nil 3725} 3726 3727// VpcAccessConnector: VPC access connector specification. 3728type VpcAccessConnector struct { 3729 // Name: Full Serverless VPC Access Connector name e.g. 3730 // /projects/my-project/locations/us-central1/connectors/c1. 3731 Name string `json:"name,omitempty"` 3732 3733 // ForceSendFields is a list of field names (e.g. "Name") to 3734 // unconditionally include in API requests. By default, fields with 3735 // empty values are omitted from API requests. However, any non-pointer, 3736 // non-interface field appearing in ForceSendFields will be sent to the 3737 // server regardless of whether the field is empty or not. This may be 3738 // used to include empty fields in Patch requests. 3739 ForceSendFields []string `json:"-"` 3740 3741 // NullFields is a list of field names (e.g. "Name") to include in API 3742 // requests with the JSON null value. By default, fields with empty 3743 // values are omitted from API requests. However, any field with an 3744 // empty value appearing in NullFields will be sent to the server as 3745 // null. It is an error if a field in this list has a non-empty value. 3746 // This may be used to include null fields in Patch requests. 3747 NullFields []string `json:"-"` 3748} 3749 3750func (s *VpcAccessConnector) MarshalJSON() ([]byte, error) { 3751 type NoMethod VpcAccessConnector 3752 raw := NoMethod(*s) 3753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3754} 3755 3756// ZipInfo: The zip file information for a zip deployment. 3757type ZipInfo struct { 3758 // FilesCount: An estimate of the number of files in a zip for a zip 3759 // deployment. If set, must be greater than or equal to the actual 3760 // number of files. Used for optimizing performance; if not provided, 3761 // deployment may be slow. 3762 FilesCount int64 `json:"filesCount,omitempty"` 3763 3764 // SourceUrl: URL of the zip file to deploy from. Must be a URL to a 3765 // resource in Google Cloud Storage in the form 3766 // 'http(s)://storage.googleapis.com/<bucket>/<object>'. 3767 SourceUrl string `json:"sourceUrl,omitempty"` 3768 3769 // ForceSendFields is a list of field names (e.g. "FilesCount") to 3770 // unconditionally include in API requests. By default, fields with 3771 // empty values are omitted from API requests. However, any non-pointer, 3772 // non-interface field appearing in ForceSendFields will be sent to the 3773 // server regardless of whether the field is empty or not. This may be 3774 // used to include empty fields in Patch requests. 3775 ForceSendFields []string `json:"-"` 3776 3777 // NullFields is a list of field names (e.g. "FilesCount") to include in 3778 // API requests with the JSON null value. By default, fields with empty 3779 // values are omitted from API requests. However, any field with an 3780 // empty value appearing in NullFields will be sent to the server as 3781 // null. It is an error if a field in this list has a non-empty value. 3782 // This may be used to include null fields in Patch requests. 3783 NullFields []string `json:"-"` 3784} 3785 3786func (s *ZipInfo) MarshalJSON() ([]byte, error) { 3787 type NoMethod ZipInfo 3788 raw := NoMethod(*s) 3789 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3790} 3791 3792// method id "appengine.apps.create": 3793 3794type AppsCreateCall struct { 3795 s *APIService 3796 application *Application 3797 urlParams_ gensupport.URLParams 3798 ctx_ context.Context 3799 header_ http.Header 3800} 3801 3802// Create: Creates an App Engine application for a Google Cloud Platform 3803// project. Required fields: 3804// id - The ID of the target Cloud Platform project. 3805// location - The region 3806// (https://cloud.google.com/appengine/docs/locations) where you want 3807// the App Engine application located.For more information about App 3808// Engine applications, see Managing Projects, Applications, and Billing 3809// (https://cloud.google.com/appengine/docs/standard/python/console/). 3810func (r *AppsService) Create(application *Application) *AppsCreateCall { 3811 c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3812 c.application = application 3813 return c 3814} 3815 3816// Fields allows partial responses to be retrieved. See 3817// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3818// for more information. 3819func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall { 3820 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3821 return c 3822} 3823 3824// Context sets the context to be used in this call's Do method. Any 3825// pending HTTP request will be aborted if the provided context is 3826// canceled. 3827func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall { 3828 c.ctx_ = ctx 3829 return c 3830} 3831 3832// Header returns an http.Header that can be modified by the caller to 3833// add HTTP headers to the request. 3834func (c *AppsCreateCall) Header() http.Header { 3835 if c.header_ == nil { 3836 c.header_ = make(http.Header) 3837 } 3838 return c.header_ 3839} 3840 3841func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) { 3842 reqHeaders := make(http.Header) 3843 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 3844 for k, v := range c.header_ { 3845 reqHeaders[k] = v 3846 } 3847 reqHeaders.Set("User-Agent", c.s.userAgent()) 3848 var body io.Reader = nil 3849 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) 3850 if err != nil { 3851 return nil, err 3852 } 3853 reqHeaders.Set("Content-Type", "application/json") 3854 c.urlParams_.Set("alt", alt) 3855 c.urlParams_.Set("prettyPrint", "false") 3856 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps") 3857 urls += "?" + c.urlParams_.Encode() 3858 req, err := http.NewRequest("POST", urls, body) 3859 if err != nil { 3860 return nil, err 3861 } 3862 req.Header = reqHeaders 3863 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3864} 3865 3866// Do executes the "appengine.apps.create" call. 3867// Exactly one of *Operation or error will be non-nil. Any non-2xx 3868// status code is an error. Response headers are in either 3869// *Operation.ServerResponse.Header or (if a response was returned at 3870// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3871// to check whether the returned error was because 3872// http.StatusNotModified was returned. 3873func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3874 gensupport.SetOptions(c.urlParams_, opts...) 3875 res, err := c.doRequest("json") 3876 if res != nil && res.StatusCode == http.StatusNotModified { 3877 if res.Body != nil { 3878 res.Body.Close() 3879 } 3880 return nil, &googleapi.Error{ 3881 Code: res.StatusCode, 3882 Header: res.Header, 3883 } 3884 } 3885 if err != nil { 3886 return nil, err 3887 } 3888 defer googleapi.CloseBody(res) 3889 if err := googleapi.CheckResponse(res); err != nil { 3890 return nil, err 3891 } 3892 ret := &Operation{ 3893 ServerResponse: googleapi.ServerResponse{ 3894 Header: res.Header, 3895 HTTPStatusCode: res.StatusCode, 3896 }, 3897 } 3898 target := &ret 3899 if err := gensupport.DecodeResponse(target, res); err != nil { 3900 return nil, err 3901 } 3902 return ret, nil 3903 // { 3904 // "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/standard/python/console/).", 3905 // "flatPath": "v1beta/apps", 3906 // "httpMethod": "POST", 3907 // "id": "appengine.apps.create", 3908 // "parameterOrder": [], 3909 // "parameters": {}, 3910 // "path": "v1beta/apps", 3911 // "request": { 3912 // "$ref": "Application" 3913 // }, 3914 // "response": { 3915 // "$ref": "Operation" 3916 // }, 3917 // "scopes": [ 3918 // "https://www.googleapis.com/auth/cloud-platform" 3919 // ] 3920 // } 3921 3922} 3923 3924// method id "appengine.apps.get": 3925 3926type AppsGetCall struct { 3927 s *APIService 3928 appsId string 3929 urlParams_ gensupport.URLParams 3930 ifNoneMatch_ string 3931 ctx_ context.Context 3932 header_ http.Header 3933} 3934 3935// Get: Gets information about an application. 3936func (r *AppsService) Get(appsId string) *AppsGetCall { 3937 c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3938 c.appsId = appsId 3939 return c 3940} 3941 3942// Fields allows partial responses to be retrieved. See 3943// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3944// for more information. 3945func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall { 3946 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3947 return c 3948} 3949 3950// IfNoneMatch sets the optional parameter which makes the operation 3951// fail if the object's ETag matches the given value. This is useful for 3952// getting updates only after the object has changed since the last 3953// request. Use googleapi.IsNotModified to check whether the response 3954// error from Do is the result of In-None-Match. 3955func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall { 3956 c.ifNoneMatch_ = entityTag 3957 return c 3958} 3959 3960// Context sets the context to be used in this call's Do method. Any 3961// pending HTTP request will be aborted if the provided context is 3962// canceled. 3963func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall { 3964 c.ctx_ = ctx 3965 return c 3966} 3967 3968// Header returns an http.Header that can be modified by the caller to 3969// add HTTP headers to the request. 3970func (c *AppsGetCall) Header() http.Header { 3971 if c.header_ == nil { 3972 c.header_ = make(http.Header) 3973 } 3974 return c.header_ 3975} 3976 3977func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) { 3978 reqHeaders := make(http.Header) 3979 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 3980 for k, v := range c.header_ { 3981 reqHeaders[k] = v 3982 } 3983 reqHeaders.Set("User-Agent", c.s.userAgent()) 3984 if c.ifNoneMatch_ != "" { 3985 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3986 } 3987 var body io.Reader = nil 3988 c.urlParams_.Set("alt", alt) 3989 c.urlParams_.Set("prettyPrint", "false") 3990 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}") 3991 urls += "?" + c.urlParams_.Encode() 3992 req, err := http.NewRequest("GET", urls, body) 3993 if err != nil { 3994 return nil, err 3995 } 3996 req.Header = reqHeaders 3997 googleapi.Expand(req.URL, map[string]string{ 3998 "appsId": c.appsId, 3999 }) 4000 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4001} 4002 4003// Do executes the "appengine.apps.get" call. 4004// Exactly one of *Application or error will be non-nil. Any non-2xx 4005// status code is an error. Response headers are in either 4006// *Application.ServerResponse.Header or (if a response was returned at 4007// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4008// to check whether the returned error was because 4009// http.StatusNotModified was returned. 4010func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) { 4011 gensupport.SetOptions(c.urlParams_, opts...) 4012 res, err := c.doRequest("json") 4013 if res != nil && res.StatusCode == http.StatusNotModified { 4014 if res.Body != nil { 4015 res.Body.Close() 4016 } 4017 return nil, &googleapi.Error{ 4018 Code: res.StatusCode, 4019 Header: res.Header, 4020 } 4021 } 4022 if err != nil { 4023 return nil, err 4024 } 4025 defer googleapi.CloseBody(res) 4026 if err := googleapi.CheckResponse(res); err != nil { 4027 return nil, err 4028 } 4029 ret := &Application{ 4030 ServerResponse: googleapi.ServerResponse{ 4031 Header: res.Header, 4032 HTTPStatusCode: res.StatusCode, 4033 }, 4034 } 4035 target := &ret 4036 if err := gensupport.DecodeResponse(target, res); err != nil { 4037 return nil, err 4038 } 4039 return ret, nil 4040 // { 4041 // "description": "Gets information about an application.", 4042 // "flatPath": "v1beta/apps/{appsId}", 4043 // "httpMethod": "GET", 4044 // "id": "appengine.apps.get", 4045 // "parameterOrder": [ 4046 // "appsId" 4047 // ], 4048 // "parameters": { 4049 // "appsId": { 4050 // "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", 4051 // "location": "path", 4052 // "required": true, 4053 // "type": "string" 4054 // } 4055 // }, 4056 // "path": "v1beta/apps/{appsId}", 4057 // "response": { 4058 // "$ref": "Application" 4059 // }, 4060 // "scopes": [ 4061 // "https://www.googleapis.com/auth/appengine.admin", 4062 // "https://www.googleapis.com/auth/cloud-platform", 4063 // "https://www.googleapis.com/auth/cloud-platform.read-only" 4064 // ] 4065 // } 4066 4067} 4068 4069// method id "appengine.apps.patch": 4070 4071type AppsPatchCall struct { 4072 s *APIService 4073 appsId string 4074 application *Application 4075 urlParams_ gensupport.URLParams 4076 ctx_ context.Context 4077 header_ http.Header 4078} 4079 4080// Patch: Updates the specified Application resource. You can update the 4081// following fields: 4082// auth_domain - Google authentication domain for controlling user 4083// access to the application. 4084// default_cookie_expiration - Cookie expiration policy for the 4085// application. 4086func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall { 4087 c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4088 c.appsId = appsId 4089 c.application = application 4090 return c 4091} 4092 4093// UpdateMask sets the optional parameter "updateMask": Standard field 4094// mask for the set of fields to be updated. 4095func (c *AppsPatchCall) UpdateMask(updateMask string) *AppsPatchCall { 4096 c.urlParams_.Set("updateMask", updateMask) 4097 return c 4098} 4099 4100// Fields allows partial responses to be retrieved. See 4101// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4102// for more information. 4103func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall { 4104 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4105 return c 4106} 4107 4108// Context sets the context to be used in this call's Do method. Any 4109// pending HTTP request will be aborted if the provided context is 4110// canceled. 4111func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall { 4112 c.ctx_ = ctx 4113 return c 4114} 4115 4116// Header returns an http.Header that can be modified by the caller to 4117// add HTTP headers to the request. 4118func (c *AppsPatchCall) Header() http.Header { 4119 if c.header_ == nil { 4120 c.header_ = make(http.Header) 4121 } 4122 return c.header_ 4123} 4124 4125func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) { 4126 reqHeaders := make(http.Header) 4127 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4128 for k, v := range c.header_ { 4129 reqHeaders[k] = v 4130 } 4131 reqHeaders.Set("User-Agent", c.s.userAgent()) 4132 var body io.Reader = nil 4133 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) 4134 if err != nil { 4135 return nil, err 4136 } 4137 reqHeaders.Set("Content-Type", "application/json") 4138 c.urlParams_.Set("alt", alt) 4139 c.urlParams_.Set("prettyPrint", "false") 4140 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}") 4141 urls += "?" + c.urlParams_.Encode() 4142 req, err := http.NewRequest("PATCH", urls, body) 4143 if err != nil { 4144 return nil, err 4145 } 4146 req.Header = reqHeaders 4147 googleapi.Expand(req.URL, map[string]string{ 4148 "appsId": c.appsId, 4149 }) 4150 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4151} 4152 4153// Do executes the "appengine.apps.patch" call. 4154// Exactly one of *Operation or error will be non-nil. Any non-2xx 4155// status code is an error. Response headers are in either 4156// *Operation.ServerResponse.Header or (if a response was returned at 4157// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4158// to check whether the returned error was because 4159// http.StatusNotModified was returned. 4160func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4161 gensupport.SetOptions(c.urlParams_, opts...) 4162 res, err := c.doRequest("json") 4163 if res != nil && res.StatusCode == http.StatusNotModified { 4164 if res.Body != nil { 4165 res.Body.Close() 4166 } 4167 return nil, &googleapi.Error{ 4168 Code: res.StatusCode, 4169 Header: res.Header, 4170 } 4171 } 4172 if err != nil { 4173 return nil, err 4174 } 4175 defer googleapi.CloseBody(res) 4176 if err := googleapi.CheckResponse(res); err != nil { 4177 return nil, err 4178 } 4179 ret := &Operation{ 4180 ServerResponse: googleapi.ServerResponse{ 4181 Header: res.Header, 4182 HTTPStatusCode: res.StatusCode, 4183 }, 4184 } 4185 target := &ret 4186 if err := gensupport.DecodeResponse(target, res); err != nil { 4187 return nil, err 4188 } 4189 return ret, nil 4190 // { 4191 // "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain - Google authentication domain for controlling user access to the application.\ndefault_cookie_expiration - Cookie expiration policy for the application.", 4192 // "flatPath": "v1beta/apps/{appsId}", 4193 // "httpMethod": "PATCH", 4194 // "id": "appengine.apps.patch", 4195 // "parameterOrder": [ 4196 // "appsId" 4197 // ], 4198 // "parameters": { 4199 // "appsId": { 4200 // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", 4201 // "location": "path", 4202 // "required": true, 4203 // "type": "string" 4204 // }, 4205 // "updateMask": { 4206 // "description": "Standard field mask for the set of fields to be updated.", 4207 // "format": "google-fieldmask", 4208 // "location": "query", 4209 // "type": "string" 4210 // } 4211 // }, 4212 // "path": "v1beta/apps/{appsId}", 4213 // "request": { 4214 // "$ref": "Application" 4215 // }, 4216 // "response": { 4217 // "$ref": "Operation" 4218 // }, 4219 // "scopes": [ 4220 // "https://www.googleapis.com/auth/cloud-platform" 4221 // ] 4222 // } 4223 4224} 4225 4226// method id "appengine.apps.repair": 4227 4228type AppsRepairCall struct { 4229 s *APIService 4230 appsId string 4231 repairapplicationrequest *RepairApplicationRequest 4232 urlParams_ gensupport.URLParams 4233 ctx_ context.Context 4234 header_ http.Header 4235} 4236 4237// Repair: Recreates the required App Engine features for the specified 4238// App Engine application, for example a Cloud Storage bucket or App 4239// Engine service account. Use this method if you receive an error 4240// message about a missing feature, for example, Error retrieving the 4241// App Engine service account. If you have deleted your App Engine 4242// service account, this will not be able to recreate it. Instead, you 4243// should attempt to use the IAM undelete API if possible at 4244// https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity 4245// Log. 4246func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall { 4247 c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4248 c.appsId = appsId 4249 c.repairapplicationrequest = repairapplicationrequest 4250 return c 4251} 4252 4253// Fields allows partial responses to be retrieved. See 4254// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4255// for more information. 4256func (c *AppsRepairCall) Fields(s ...googleapi.Field) *AppsRepairCall { 4257 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4258 return c 4259} 4260 4261// Context sets the context to be used in this call's Do method. Any 4262// pending HTTP request will be aborted if the provided context is 4263// canceled. 4264func (c *AppsRepairCall) Context(ctx context.Context) *AppsRepairCall { 4265 c.ctx_ = ctx 4266 return c 4267} 4268 4269// Header returns an http.Header that can be modified by the caller to 4270// add HTTP headers to the request. 4271func (c *AppsRepairCall) Header() http.Header { 4272 if c.header_ == nil { 4273 c.header_ = make(http.Header) 4274 } 4275 return c.header_ 4276} 4277 4278func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) { 4279 reqHeaders := make(http.Header) 4280 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4281 for k, v := range c.header_ { 4282 reqHeaders[k] = v 4283 } 4284 reqHeaders.Set("User-Agent", c.s.userAgent()) 4285 var body io.Reader = nil 4286 body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairapplicationrequest) 4287 if err != nil { 4288 return nil, err 4289 } 4290 reqHeaders.Set("Content-Type", "application/json") 4291 c.urlParams_.Set("alt", alt) 4292 c.urlParams_.Set("prettyPrint", "false") 4293 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}:repair") 4294 urls += "?" + c.urlParams_.Encode() 4295 req, err := http.NewRequest("POST", urls, body) 4296 if err != nil { 4297 return nil, err 4298 } 4299 req.Header = reqHeaders 4300 googleapi.Expand(req.URL, map[string]string{ 4301 "appsId": c.appsId, 4302 }) 4303 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4304} 4305 4306// Do executes the "appengine.apps.repair" call. 4307// Exactly one of *Operation or error will be non-nil. Any non-2xx 4308// status code is an error. Response headers are in either 4309// *Operation.ServerResponse.Header or (if a response was returned at 4310// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4311// to check whether the returned error was because 4312// http.StatusNotModified was returned. 4313func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4314 gensupport.SetOptions(c.urlParams_, opts...) 4315 res, err := c.doRequest("json") 4316 if res != nil && res.StatusCode == http.StatusNotModified { 4317 if res.Body != nil { 4318 res.Body.Close() 4319 } 4320 return nil, &googleapi.Error{ 4321 Code: res.StatusCode, 4322 Header: res.Header, 4323 } 4324 } 4325 if err != nil { 4326 return nil, err 4327 } 4328 defer googleapi.CloseBody(res) 4329 if err := googleapi.CheckResponse(res); err != nil { 4330 return nil, err 4331 } 4332 ret := &Operation{ 4333 ServerResponse: googleapi.ServerResponse{ 4334 Header: res.Header, 4335 HTTPStatusCode: res.StatusCode, 4336 }, 4337 } 4338 target := &ret 4339 if err := gensupport.DecodeResponse(target, res); err != nil { 4340 return nil, err 4341 } 4342 return ret, nil 4343 // { 4344 // "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account. If you have deleted your App Engine service account, this will not be able to recreate it. Instead, you should attempt to use the IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B\"name\"%3A\"projects%2F-%2FserviceAccounts%2Funique_id\"%2C\"resource\"%3A%7B%7D%7D . If the deletion was recent, the numeric ID can be found in the Cloud Console Activity Log.", 4345 // "flatPath": "v1beta/apps/{appsId}:repair", 4346 // "httpMethod": "POST", 4347 // "id": "appengine.apps.repair", 4348 // "parameterOrder": [ 4349 // "appsId" 4350 // ], 4351 // "parameters": { 4352 // "appsId": { 4353 // "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", 4354 // "location": "path", 4355 // "required": true, 4356 // "type": "string" 4357 // } 4358 // }, 4359 // "path": "v1beta/apps/{appsId}:repair", 4360 // "request": { 4361 // "$ref": "RepairApplicationRequest" 4362 // }, 4363 // "response": { 4364 // "$ref": "Operation" 4365 // }, 4366 // "scopes": [ 4367 // "https://www.googleapis.com/auth/cloud-platform" 4368 // ] 4369 // } 4370 4371} 4372 4373// method id "appengine.apps.authorizedCertificates.create": 4374 4375type AppsAuthorizedCertificatesCreateCall struct { 4376 s *APIService 4377 appsId string 4378 authorizedcertificate *AuthorizedCertificate 4379 urlParams_ gensupport.URLParams 4380 ctx_ context.Context 4381 header_ http.Header 4382} 4383 4384// Create: Uploads the specified SSL certificate. 4385func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall { 4386 c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4387 c.appsId = appsId 4388 c.authorizedcertificate = authorizedcertificate 4389 return c 4390} 4391 4392// Fields allows partial responses to be retrieved. See 4393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4394// for more information. 4395func (c *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall { 4396 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4397 return c 4398} 4399 4400// Context sets the context to be used in this call's Do method. Any 4401// pending HTTP request will be aborted if the provided context is 4402// canceled. 4403func (c *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall { 4404 c.ctx_ = ctx 4405 return c 4406} 4407 4408// Header returns an http.Header that can be modified by the caller to 4409// add HTTP headers to the request. 4410func (c *AppsAuthorizedCertificatesCreateCall) Header() http.Header { 4411 if c.header_ == nil { 4412 c.header_ = make(http.Header) 4413 } 4414 return c.header_ 4415} 4416 4417func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Response, error) { 4418 reqHeaders := make(http.Header) 4419 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4420 for k, v := range c.header_ { 4421 reqHeaders[k] = v 4422 } 4423 reqHeaders.Set("User-Agent", c.s.userAgent()) 4424 var body io.Reader = nil 4425 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate) 4426 if err != nil { 4427 return nil, err 4428 } 4429 reqHeaders.Set("Content-Type", "application/json") 4430 c.urlParams_.Set("alt", alt) 4431 c.urlParams_.Set("prettyPrint", "false") 4432 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates") 4433 urls += "?" + c.urlParams_.Encode() 4434 req, err := http.NewRequest("POST", urls, body) 4435 if err != nil { 4436 return nil, err 4437 } 4438 req.Header = reqHeaders 4439 googleapi.Expand(req.URL, map[string]string{ 4440 "appsId": c.appsId, 4441 }) 4442 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4443} 4444 4445// Do executes the "appengine.apps.authorizedCertificates.create" call. 4446// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 4447// non-2xx status code is an error. Response headers are in either 4448// *AuthorizedCertificate.ServerResponse.Header or (if a response was 4449// returned at all) in error.(*googleapi.Error).Header. Use 4450// googleapi.IsNotModified to check whether the returned error was 4451// because http.StatusNotModified was returned. 4452func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 4453 gensupport.SetOptions(c.urlParams_, opts...) 4454 res, err := c.doRequest("json") 4455 if res != nil && res.StatusCode == http.StatusNotModified { 4456 if res.Body != nil { 4457 res.Body.Close() 4458 } 4459 return nil, &googleapi.Error{ 4460 Code: res.StatusCode, 4461 Header: res.Header, 4462 } 4463 } 4464 if err != nil { 4465 return nil, err 4466 } 4467 defer googleapi.CloseBody(res) 4468 if err := googleapi.CheckResponse(res); err != nil { 4469 return nil, err 4470 } 4471 ret := &AuthorizedCertificate{ 4472 ServerResponse: googleapi.ServerResponse{ 4473 Header: res.Header, 4474 HTTPStatusCode: res.StatusCode, 4475 }, 4476 } 4477 target := &ret 4478 if err := gensupport.DecodeResponse(target, res); err != nil { 4479 return nil, err 4480 } 4481 return ret, nil 4482 // { 4483 // "description": "Uploads the specified SSL certificate.", 4484 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", 4485 // "httpMethod": "POST", 4486 // "id": "appengine.apps.authorizedCertificates.create", 4487 // "parameterOrder": [ 4488 // "appsId" 4489 // ], 4490 // "parameters": { 4491 // "appsId": { 4492 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 4493 // "location": "path", 4494 // "required": true, 4495 // "type": "string" 4496 // } 4497 // }, 4498 // "path": "v1beta/apps/{appsId}/authorizedCertificates", 4499 // "request": { 4500 // "$ref": "AuthorizedCertificate" 4501 // }, 4502 // "response": { 4503 // "$ref": "AuthorizedCertificate" 4504 // }, 4505 // "scopes": [ 4506 // "https://www.googleapis.com/auth/cloud-platform" 4507 // ] 4508 // } 4509 4510} 4511 4512// method id "appengine.apps.authorizedCertificates.delete": 4513 4514type AppsAuthorizedCertificatesDeleteCall struct { 4515 s *APIService 4516 appsId string 4517 authorizedCertificatesId string 4518 urlParams_ gensupport.URLParams 4519 ctx_ context.Context 4520 header_ http.Header 4521} 4522 4523// Delete: Deletes the specified SSL certificate. 4524func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall { 4525 c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4526 c.appsId = appsId 4527 c.authorizedCertificatesId = authorizedCertificatesId 4528 return c 4529} 4530 4531// Fields allows partial responses to be retrieved. See 4532// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4533// for more information. 4534func (c *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall { 4535 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4536 return c 4537} 4538 4539// Context sets the context to be used in this call's Do method. Any 4540// pending HTTP request will be aborted if the provided context is 4541// canceled. 4542func (c *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall { 4543 c.ctx_ = ctx 4544 return c 4545} 4546 4547// Header returns an http.Header that can be modified by the caller to 4548// add HTTP headers to the request. 4549func (c *AppsAuthorizedCertificatesDeleteCall) Header() http.Header { 4550 if c.header_ == nil { 4551 c.header_ = make(http.Header) 4552 } 4553 return c.header_ 4554} 4555 4556func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { 4557 reqHeaders := make(http.Header) 4558 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4559 for k, v := range c.header_ { 4560 reqHeaders[k] = v 4561 } 4562 reqHeaders.Set("User-Agent", c.s.userAgent()) 4563 var body io.Reader = nil 4564 c.urlParams_.Set("alt", alt) 4565 c.urlParams_.Set("prettyPrint", "false") 4566 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 4567 urls += "?" + c.urlParams_.Encode() 4568 req, err := http.NewRequest("DELETE", urls, body) 4569 if err != nil { 4570 return nil, err 4571 } 4572 req.Header = reqHeaders 4573 googleapi.Expand(req.URL, map[string]string{ 4574 "appsId": c.appsId, 4575 "authorizedCertificatesId": c.authorizedCertificatesId, 4576 }) 4577 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4578} 4579 4580// Do executes the "appengine.apps.authorizedCertificates.delete" call. 4581// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4582// code is an error. Response headers are in either 4583// *Empty.ServerResponse.Header or (if a response was returned at all) 4584// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4585// check whether the returned error was because http.StatusNotModified 4586// was returned. 4587func (c *AppsAuthorizedCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4588 gensupport.SetOptions(c.urlParams_, opts...) 4589 res, err := c.doRequest("json") 4590 if res != nil && res.StatusCode == http.StatusNotModified { 4591 if res.Body != nil { 4592 res.Body.Close() 4593 } 4594 return nil, &googleapi.Error{ 4595 Code: res.StatusCode, 4596 Header: res.Header, 4597 } 4598 } 4599 if err != nil { 4600 return nil, err 4601 } 4602 defer googleapi.CloseBody(res) 4603 if err := googleapi.CheckResponse(res); err != nil { 4604 return nil, err 4605 } 4606 ret := &Empty{ 4607 ServerResponse: googleapi.ServerResponse{ 4608 Header: res.Header, 4609 HTTPStatusCode: res.StatusCode, 4610 }, 4611 } 4612 target := &ret 4613 if err := gensupport.DecodeResponse(target, res); err != nil { 4614 return nil, err 4615 } 4616 return ret, nil 4617 // { 4618 // "description": "Deletes the specified SSL certificate.", 4619 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4620 // "httpMethod": "DELETE", 4621 // "id": "appengine.apps.authorizedCertificates.delete", 4622 // "parameterOrder": [ 4623 // "appsId", 4624 // "authorizedCertificatesId" 4625 // ], 4626 // "parameters": { 4627 // "appsId": { 4628 // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", 4629 // "location": "path", 4630 // "required": true, 4631 // "type": "string" 4632 // }, 4633 // "authorizedCertificatesId": { 4634 // "description": "Part of `name`. See documentation of `appsId`.", 4635 // "location": "path", 4636 // "required": true, 4637 // "type": "string" 4638 // } 4639 // }, 4640 // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4641 // "response": { 4642 // "$ref": "Empty" 4643 // }, 4644 // "scopes": [ 4645 // "https://www.googleapis.com/auth/cloud-platform" 4646 // ] 4647 // } 4648 4649} 4650 4651// method id "appengine.apps.authorizedCertificates.get": 4652 4653type AppsAuthorizedCertificatesGetCall struct { 4654 s *APIService 4655 appsId string 4656 authorizedCertificatesId string 4657 urlParams_ gensupport.URLParams 4658 ifNoneMatch_ string 4659 ctx_ context.Context 4660 header_ http.Header 4661} 4662 4663// Get: Gets the specified SSL certificate. 4664func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall { 4665 c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4666 c.appsId = appsId 4667 c.authorizedCertificatesId = authorizedCertificatesId 4668 return c 4669} 4670 4671// View sets the optional parameter "view": Controls the set of fields 4672// returned in the GET response. 4673// 4674// Possible values: 4675// "BASIC_CERTIFICATE" 4676// "FULL_CERTIFICATE" 4677func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall { 4678 c.urlParams_.Set("view", view) 4679 return c 4680} 4681 4682// Fields allows partial responses to be retrieved. See 4683// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4684// for more information. 4685func (c *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall { 4686 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4687 return c 4688} 4689 4690// IfNoneMatch sets the optional parameter which makes the operation 4691// fail if the object's ETag matches the given value. This is useful for 4692// getting updates only after the object has changed since the last 4693// request. Use googleapi.IsNotModified to check whether the response 4694// error from Do is the result of In-None-Match. 4695func (c *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall { 4696 c.ifNoneMatch_ = entityTag 4697 return c 4698} 4699 4700// Context sets the context to be used in this call's Do method. Any 4701// pending HTTP request will be aborted if the provided context is 4702// canceled. 4703func (c *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall { 4704 c.ctx_ = ctx 4705 return c 4706} 4707 4708// Header returns an http.Header that can be modified by the caller to 4709// add HTTP headers to the request. 4710func (c *AppsAuthorizedCertificatesGetCall) Header() http.Header { 4711 if c.header_ == nil { 4712 c.header_ = make(http.Header) 4713 } 4714 return c.header_ 4715} 4716 4717func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) { 4718 reqHeaders := make(http.Header) 4719 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4720 for k, v := range c.header_ { 4721 reqHeaders[k] = v 4722 } 4723 reqHeaders.Set("User-Agent", c.s.userAgent()) 4724 if c.ifNoneMatch_ != "" { 4725 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4726 } 4727 var body io.Reader = nil 4728 c.urlParams_.Set("alt", alt) 4729 c.urlParams_.Set("prettyPrint", "false") 4730 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 4731 urls += "?" + c.urlParams_.Encode() 4732 req, err := http.NewRequest("GET", urls, body) 4733 if err != nil { 4734 return nil, err 4735 } 4736 req.Header = reqHeaders 4737 googleapi.Expand(req.URL, map[string]string{ 4738 "appsId": c.appsId, 4739 "authorizedCertificatesId": c.authorizedCertificatesId, 4740 }) 4741 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4742} 4743 4744// Do executes the "appengine.apps.authorizedCertificates.get" call. 4745// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 4746// non-2xx status code is an error. Response headers are in either 4747// *AuthorizedCertificate.ServerResponse.Header or (if a response was 4748// returned at all) in error.(*googleapi.Error).Header. Use 4749// googleapi.IsNotModified to check whether the returned error was 4750// because http.StatusNotModified was returned. 4751func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 4752 gensupport.SetOptions(c.urlParams_, opts...) 4753 res, err := c.doRequest("json") 4754 if res != nil && res.StatusCode == http.StatusNotModified { 4755 if res.Body != nil { 4756 res.Body.Close() 4757 } 4758 return nil, &googleapi.Error{ 4759 Code: res.StatusCode, 4760 Header: res.Header, 4761 } 4762 } 4763 if err != nil { 4764 return nil, err 4765 } 4766 defer googleapi.CloseBody(res) 4767 if err := googleapi.CheckResponse(res); err != nil { 4768 return nil, err 4769 } 4770 ret := &AuthorizedCertificate{ 4771 ServerResponse: googleapi.ServerResponse{ 4772 Header: res.Header, 4773 HTTPStatusCode: res.StatusCode, 4774 }, 4775 } 4776 target := &ret 4777 if err := gensupport.DecodeResponse(target, res); err != nil { 4778 return nil, err 4779 } 4780 return ret, nil 4781 // { 4782 // "description": "Gets the specified SSL certificate.", 4783 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4784 // "httpMethod": "GET", 4785 // "id": "appengine.apps.authorizedCertificates.get", 4786 // "parameterOrder": [ 4787 // "appsId", 4788 // "authorizedCertificatesId" 4789 // ], 4790 // "parameters": { 4791 // "appsId": { 4792 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", 4793 // "location": "path", 4794 // "required": true, 4795 // "type": "string" 4796 // }, 4797 // "authorizedCertificatesId": { 4798 // "description": "Part of `name`. See documentation of `appsId`.", 4799 // "location": "path", 4800 // "required": true, 4801 // "type": "string" 4802 // }, 4803 // "view": { 4804 // "description": "Controls the set of fields returned in the GET response.", 4805 // "enum": [ 4806 // "BASIC_CERTIFICATE", 4807 // "FULL_CERTIFICATE" 4808 // ], 4809 // "location": "query", 4810 // "type": "string" 4811 // } 4812 // }, 4813 // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4814 // "response": { 4815 // "$ref": "AuthorizedCertificate" 4816 // }, 4817 // "scopes": [ 4818 // "https://www.googleapis.com/auth/appengine.admin", 4819 // "https://www.googleapis.com/auth/cloud-platform", 4820 // "https://www.googleapis.com/auth/cloud-platform.read-only" 4821 // ] 4822 // } 4823 4824} 4825 4826// method id "appengine.apps.authorizedCertificates.list": 4827 4828type AppsAuthorizedCertificatesListCall struct { 4829 s *APIService 4830 appsId string 4831 urlParams_ gensupport.URLParams 4832 ifNoneMatch_ string 4833 ctx_ context.Context 4834 header_ http.Header 4835} 4836 4837// List: Lists all SSL certificates the user is authorized to 4838// administer. 4839func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall { 4840 c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4841 c.appsId = appsId 4842 return c 4843} 4844 4845// PageSize sets the optional parameter "pageSize": Maximum results to 4846// return per page. 4847func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall { 4848 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4849 return c 4850} 4851 4852// PageToken sets the optional parameter "pageToken": Continuation token 4853// for fetching the next page of results. 4854func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall { 4855 c.urlParams_.Set("pageToken", pageToken) 4856 return c 4857} 4858 4859// View sets the optional parameter "view": Controls the set of fields 4860// returned in the LIST response. 4861// 4862// Possible values: 4863// "BASIC_CERTIFICATE" 4864// "FULL_CERTIFICATE" 4865func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall { 4866 c.urlParams_.Set("view", view) 4867 return c 4868} 4869 4870// Fields allows partial responses to be retrieved. See 4871// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4872// for more information. 4873func (c *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall { 4874 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4875 return c 4876} 4877 4878// IfNoneMatch sets the optional parameter which makes the operation 4879// fail if the object's ETag matches the given value. This is useful for 4880// getting updates only after the object has changed since the last 4881// request. Use googleapi.IsNotModified to check whether the response 4882// error from Do is the result of In-None-Match. 4883func (c *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall { 4884 c.ifNoneMatch_ = entityTag 4885 return c 4886} 4887 4888// Context sets the context to be used in this call's Do method. Any 4889// pending HTTP request will be aborted if the provided context is 4890// canceled. 4891func (c *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall { 4892 c.ctx_ = ctx 4893 return c 4894} 4895 4896// Header returns an http.Header that can be modified by the caller to 4897// add HTTP headers to the request. 4898func (c *AppsAuthorizedCertificatesListCall) Header() http.Header { 4899 if c.header_ == nil { 4900 c.header_ = make(http.Header) 4901 } 4902 return c.header_ 4903} 4904 4905func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) { 4906 reqHeaders := make(http.Header) 4907 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4908 for k, v := range c.header_ { 4909 reqHeaders[k] = v 4910 } 4911 reqHeaders.Set("User-Agent", c.s.userAgent()) 4912 if c.ifNoneMatch_ != "" { 4913 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4914 } 4915 var body io.Reader = nil 4916 c.urlParams_.Set("alt", alt) 4917 c.urlParams_.Set("prettyPrint", "false") 4918 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates") 4919 urls += "?" + c.urlParams_.Encode() 4920 req, err := http.NewRequest("GET", urls, body) 4921 if err != nil { 4922 return nil, err 4923 } 4924 req.Header = reqHeaders 4925 googleapi.Expand(req.URL, map[string]string{ 4926 "appsId": c.appsId, 4927 }) 4928 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4929} 4930 4931// Do executes the "appengine.apps.authorizedCertificates.list" call. 4932// Exactly one of *ListAuthorizedCertificatesResponse or error will be 4933// non-nil. Any non-2xx status code is an error. Response headers are in 4934// either *ListAuthorizedCertificatesResponse.ServerResponse.Header or 4935// (if a response was returned at all) in 4936// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4937// whether the returned error was because http.StatusNotModified was 4938// returned. 4939func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, error) { 4940 gensupport.SetOptions(c.urlParams_, opts...) 4941 res, err := c.doRequest("json") 4942 if res != nil && res.StatusCode == http.StatusNotModified { 4943 if res.Body != nil { 4944 res.Body.Close() 4945 } 4946 return nil, &googleapi.Error{ 4947 Code: res.StatusCode, 4948 Header: res.Header, 4949 } 4950 } 4951 if err != nil { 4952 return nil, err 4953 } 4954 defer googleapi.CloseBody(res) 4955 if err := googleapi.CheckResponse(res); err != nil { 4956 return nil, err 4957 } 4958 ret := &ListAuthorizedCertificatesResponse{ 4959 ServerResponse: googleapi.ServerResponse{ 4960 Header: res.Header, 4961 HTTPStatusCode: res.StatusCode, 4962 }, 4963 } 4964 target := &ret 4965 if err := gensupport.DecodeResponse(target, res); err != nil { 4966 return nil, err 4967 } 4968 return ret, nil 4969 // { 4970 // "description": "Lists all SSL certificates the user is authorized to administer.", 4971 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", 4972 // "httpMethod": "GET", 4973 // "id": "appengine.apps.authorizedCertificates.list", 4974 // "parameterOrder": [ 4975 // "appsId" 4976 // ], 4977 // "parameters": { 4978 // "appsId": { 4979 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 4980 // "location": "path", 4981 // "required": true, 4982 // "type": "string" 4983 // }, 4984 // "pageSize": { 4985 // "description": "Maximum results to return per page.", 4986 // "format": "int32", 4987 // "location": "query", 4988 // "type": "integer" 4989 // }, 4990 // "pageToken": { 4991 // "description": "Continuation token for fetching the next page of results.", 4992 // "location": "query", 4993 // "type": "string" 4994 // }, 4995 // "view": { 4996 // "description": "Controls the set of fields returned in the LIST response.", 4997 // "enum": [ 4998 // "BASIC_CERTIFICATE", 4999 // "FULL_CERTIFICATE" 5000 // ], 5001 // "location": "query", 5002 // "type": "string" 5003 // } 5004 // }, 5005 // "path": "v1beta/apps/{appsId}/authorizedCertificates", 5006 // "response": { 5007 // "$ref": "ListAuthorizedCertificatesResponse" 5008 // }, 5009 // "scopes": [ 5010 // "https://www.googleapis.com/auth/appengine.admin", 5011 // "https://www.googleapis.com/auth/cloud-platform", 5012 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5013 // ] 5014 // } 5015 5016} 5017 5018// Pages invokes f for each page of results. 5019// A non-nil error returned from f will halt the iteration. 5020// The provided context supersedes any context provided to the Context method. 5021func (c *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) error) error { 5022 c.ctx_ = ctx 5023 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5024 for { 5025 x, err := c.Do() 5026 if err != nil { 5027 return err 5028 } 5029 if err := f(x); err != nil { 5030 return err 5031 } 5032 if x.NextPageToken == "" { 5033 return nil 5034 } 5035 c.PageToken(x.NextPageToken) 5036 } 5037} 5038 5039// method id "appengine.apps.authorizedCertificates.patch": 5040 5041type AppsAuthorizedCertificatesPatchCall struct { 5042 s *APIService 5043 appsId string 5044 authorizedCertificatesId string 5045 authorizedcertificate *AuthorizedCertificate 5046 urlParams_ gensupport.URLParams 5047 ctx_ context.Context 5048 header_ http.Header 5049} 5050 5051// Patch: Updates the specified SSL certificate. To renew a certificate 5052// and maintain its existing domain mappings, update certificate_data 5053// with a new certificate. The new certificate must be applicable to the 5054// same domains as the original certificate. The certificate 5055// display_name may also be updated. 5056func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall { 5057 c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5058 c.appsId = appsId 5059 c.authorizedCertificatesId = authorizedCertificatesId 5060 c.authorizedcertificate = authorizedcertificate 5061 return c 5062} 5063 5064// UpdateMask sets the optional parameter "updateMask": Standard field 5065// mask for the set of fields to be updated. Updates are only supported 5066// on the certificate_raw_data and display_name fields. 5067func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall { 5068 c.urlParams_.Set("updateMask", updateMask) 5069 return c 5070} 5071 5072// Fields allows partial responses to be retrieved. See 5073// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5074// for more information. 5075func (c *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall { 5076 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5077 return c 5078} 5079 5080// Context sets the context to be used in this call's Do method. Any 5081// pending HTTP request will be aborted if the provided context is 5082// canceled. 5083func (c *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall { 5084 c.ctx_ = ctx 5085 return c 5086} 5087 5088// Header returns an http.Header that can be modified by the caller to 5089// add HTTP headers to the request. 5090func (c *AppsAuthorizedCertificatesPatchCall) Header() http.Header { 5091 if c.header_ == nil { 5092 c.header_ = make(http.Header) 5093 } 5094 return c.header_ 5095} 5096 5097func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Response, error) { 5098 reqHeaders := make(http.Header) 5099 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 5100 for k, v := range c.header_ { 5101 reqHeaders[k] = v 5102 } 5103 reqHeaders.Set("User-Agent", c.s.userAgent()) 5104 var body io.Reader = nil 5105 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate) 5106 if err != nil { 5107 return nil, err 5108 } 5109 reqHeaders.Set("Content-Type", "application/json") 5110 c.urlParams_.Set("alt", alt) 5111 c.urlParams_.Set("prettyPrint", "false") 5112 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 5113 urls += "?" + c.urlParams_.Encode() 5114 req, err := http.NewRequest("PATCH", urls, body) 5115 if err != nil { 5116 return nil, err 5117 } 5118 req.Header = reqHeaders 5119 googleapi.Expand(req.URL, map[string]string{ 5120 "appsId": c.appsId, 5121 "authorizedCertificatesId": c.authorizedCertificatesId, 5122 }) 5123 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5124} 5125 5126// Do executes the "appengine.apps.authorizedCertificates.patch" call. 5127// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 5128// non-2xx status code is an error. Response headers are in either 5129// *AuthorizedCertificate.ServerResponse.Header or (if a response was 5130// returned at all) in error.(*googleapi.Error).Header. Use 5131// googleapi.IsNotModified to check whether the returned error was 5132// because http.StatusNotModified was returned. 5133func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 5134 gensupport.SetOptions(c.urlParams_, opts...) 5135 res, err := c.doRequest("json") 5136 if res != nil && res.StatusCode == http.StatusNotModified { 5137 if res.Body != nil { 5138 res.Body.Close() 5139 } 5140 return nil, &googleapi.Error{ 5141 Code: res.StatusCode, 5142 Header: res.Header, 5143 } 5144 } 5145 if err != nil { 5146 return nil, err 5147 } 5148 defer googleapi.CloseBody(res) 5149 if err := googleapi.CheckResponse(res); err != nil { 5150 return nil, err 5151 } 5152 ret := &AuthorizedCertificate{ 5153 ServerResponse: googleapi.ServerResponse{ 5154 Header: res.Header, 5155 HTTPStatusCode: res.StatusCode, 5156 }, 5157 } 5158 target := &ret 5159 if err := gensupport.DecodeResponse(target, res); err != nil { 5160 return nil, err 5161 } 5162 return ret, nil 5163 // { 5164 // "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", 5165 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 5166 // "httpMethod": "PATCH", 5167 // "id": "appengine.apps.authorizedCertificates.patch", 5168 // "parameterOrder": [ 5169 // "appsId", 5170 // "authorizedCertificatesId" 5171 // ], 5172 // "parameters": { 5173 // "appsId": { 5174 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", 5175 // "location": "path", 5176 // "required": true, 5177 // "type": "string" 5178 // }, 5179 // "authorizedCertificatesId": { 5180 // "description": "Part of `name`. See documentation of `appsId`.", 5181 // "location": "path", 5182 // "required": true, 5183 // "type": "string" 5184 // }, 5185 // "updateMask": { 5186 // "description": "Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.", 5187 // "format": "google-fieldmask", 5188 // "location": "query", 5189 // "type": "string" 5190 // } 5191 // }, 5192 // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 5193 // "request": { 5194 // "$ref": "AuthorizedCertificate" 5195 // }, 5196 // "response": { 5197 // "$ref": "AuthorizedCertificate" 5198 // }, 5199 // "scopes": [ 5200 // "https://www.googleapis.com/auth/cloud-platform" 5201 // ] 5202 // } 5203 5204} 5205 5206// method id "appengine.apps.authorizedDomains.list": 5207 5208type AppsAuthorizedDomainsListCall struct { 5209 s *APIService 5210 appsId string 5211 urlParams_ gensupport.URLParams 5212 ifNoneMatch_ string 5213 ctx_ context.Context 5214 header_ http.Header 5215} 5216 5217// List: Lists all domains the user is authorized to administer. 5218func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall { 5219 c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5220 c.appsId = appsId 5221 return c 5222} 5223 5224// PageSize sets the optional parameter "pageSize": Maximum results to 5225// return per page. 5226func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall { 5227 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5228 return c 5229} 5230 5231// PageToken sets the optional parameter "pageToken": Continuation token 5232// for fetching the next page of results. 5233func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall { 5234 c.urlParams_.Set("pageToken", pageToken) 5235 return c 5236} 5237 5238// Fields allows partial responses to be retrieved. See 5239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5240// for more information. 5241func (c *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall { 5242 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5243 return c 5244} 5245 5246// IfNoneMatch sets the optional parameter which makes the operation 5247// fail if the object's ETag matches the given value. This is useful for 5248// getting updates only after the object has changed since the last 5249// request. Use googleapi.IsNotModified to check whether the response 5250// error from Do is the result of In-None-Match. 5251func (c *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall { 5252 c.ifNoneMatch_ = entityTag 5253 return c 5254} 5255 5256// Context sets the context to be used in this call's Do method. Any 5257// pending HTTP request will be aborted if the provided context is 5258// canceled. 5259func (c *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall { 5260 c.ctx_ = ctx 5261 return c 5262} 5263 5264// Header returns an http.Header that can be modified by the caller to 5265// add HTTP headers to the request. 5266func (c *AppsAuthorizedDomainsListCall) Header() http.Header { 5267 if c.header_ == nil { 5268 c.header_ = make(http.Header) 5269 } 5270 return c.header_ 5271} 5272 5273func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) { 5274 reqHeaders := make(http.Header) 5275 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 5276 for k, v := range c.header_ { 5277 reqHeaders[k] = v 5278 } 5279 reqHeaders.Set("User-Agent", c.s.userAgent()) 5280 if c.ifNoneMatch_ != "" { 5281 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5282 } 5283 var body io.Reader = nil 5284 c.urlParams_.Set("alt", alt) 5285 c.urlParams_.Set("prettyPrint", "false") 5286 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedDomains") 5287 urls += "?" + c.urlParams_.Encode() 5288 req, err := http.NewRequest("GET", urls, body) 5289 if err != nil { 5290 return nil, err 5291 } 5292 req.Header = reqHeaders 5293 googleapi.Expand(req.URL, map[string]string{ 5294 "appsId": c.appsId, 5295 }) 5296 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5297} 5298 5299// Do executes the "appengine.apps.authorizedDomains.list" call. 5300// Exactly one of *ListAuthorizedDomainsResponse or error will be 5301// non-nil. Any non-2xx status code is an error. Response headers are in 5302// either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a 5303// response was returned at all) in error.(*googleapi.Error).Header. Use 5304// googleapi.IsNotModified to check whether the returned error was 5305// because http.StatusNotModified was returned. 5306func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) { 5307 gensupport.SetOptions(c.urlParams_, opts...) 5308 res, err := c.doRequest("json") 5309 if res != nil && res.StatusCode == http.StatusNotModified { 5310 if res.Body != nil { 5311 res.Body.Close() 5312 } 5313 return nil, &googleapi.Error{ 5314 Code: res.StatusCode, 5315 Header: res.Header, 5316 } 5317 } 5318 if err != nil { 5319 return nil, err 5320 } 5321 defer googleapi.CloseBody(res) 5322 if err := googleapi.CheckResponse(res); err != nil { 5323 return nil, err 5324 } 5325 ret := &ListAuthorizedDomainsResponse{ 5326 ServerResponse: googleapi.ServerResponse{ 5327 Header: res.Header, 5328 HTTPStatusCode: res.StatusCode, 5329 }, 5330 } 5331 target := &ret 5332 if err := gensupport.DecodeResponse(target, res); err != nil { 5333 return nil, err 5334 } 5335 return ret, nil 5336 // { 5337 // "description": "Lists all domains the user is authorized to administer.", 5338 // "flatPath": "v1beta/apps/{appsId}/authorizedDomains", 5339 // "httpMethod": "GET", 5340 // "id": "appengine.apps.authorizedDomains.list", 5341 // "parameterOrder": [ 5342 // "appsId" 5343 // ], 5344 // "parameters": { 5345 // "appsId": { 5346 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5347 // "location": "path", 5348 // "required": true, 5349 // "type": "string" 5350 // }, 5351 // "pageSize": { 5352 // "description": "Maximum results to return per page.", 5353 // "format": "int32", 5354 // "location": "query", 5355 // "type": "integer" 5356 // }, 5357 // "pageToken": { 5358 // "description": "Continuation token for fetching the next page of results.", 5359 // "location": "query", 5360 // "type": "string" 5361 // } 5362 // }, 5363 // "path": "v1beta/apps/{appsId}/authorizedDomains", 5364 // "response": { 5365 // "$ref": "ListAuthorizedDomainsResponse" 5366 // }, 5367 // "scopes": [ 5368 // "https://www.googleapis.com/auth/appengine.admin", 5369 // "https://www.googleapis.com/auth/cloud-platform", 5370 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5371 // ] 5372 // } 5373 5374} 5375 5376// Pages invokes f for each page of results. 5377// A non-nil error returned from f will halt the iteration. 5378// The provided context supersedes any context provided to the Context method. 5379func (c *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error { 5380 c.ctx_ = ctx 5381 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5382 for { 5383 x, err := c.Do() 5384 if err != nil { 5385 return err 5386 } 5387 if err := f(x); err != nil { 5388 return err 5389 } 5390 if x.NextPageToken == "" { 5391 return nil 5392 } 5393 c.PageToken(x.NextPageToken) 5394 } 5395} 5396 5397// method id "appengine.apps.domainMappings.create": 5398 5399type AppsDomainMappingsCreateCall struct { 5400 s *APIService 5401 appsId string 5402 domainmapping *DomainMapping 5403 urlParams_ gensupport.URLParams 5404 ctx_ context.Context 5405 header_ http.Header 5406} 5407 5408// Create: Maps a domain to an application. A user must be authorized to 5409// administer a domain in order to map it to an application. For a list 5410// of available authorized domains, see 5411// AuthorizedDomains.ListAuthorizedDomains. 5412func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall { 5413 c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5414 c.appsId = appsId 5415 c.domainmapping = domainmapping 5416 return c 5417} 5418 5419// OverrideStrategy sets the optional parameter "overrideStrategy": 5420// Whether the domain creation should override any existing mappings for 5421// this domain. By default, overrides are rejected. 5422// 5423// Possible values: 5424// "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY" 5425// "STRICT" 5426// "OVERRIDE" 5427func (c *AppsDomainMappingsCreateCall) OverrideStrategy(overrideStrategy string) *AppsDomainMappingsCreateCall { 5428 c.urlParams_.Set("overrideStrategy", overrideStrategy) 5429 return c 5430} 5431 5432// Fields allows partial responses to be retrieved. See 5433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5434// for more information. 5435func (c *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall { 5436 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5437 return c 5438} 5439 5440// Context sets the context to be used in this call's Do method. Any 5441// pending HTTP request will be aborted if the provided context is 5442// canceled. 5443func (c *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall { 5444 c.ctx_ = ctx 5445 return c 5446} 5447 5448// Header returns an http.Header that can be modified by the caller to 5449// add HTTP headers to the request. 5450func (c *AppsDomainMappingsCreateCall) Header() http.Header { 5451 if c.header_ == nil { 5452 c.header_ = make(http.Header) 5453 } 5454 return c.header_ 5455} 5456 5457func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, error) { 5458 reqHeaders := make(http.Header) 5459 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 5460 for k, v := range c.header_ { 5461 reqHeaders[k] = v 5462 } 5463 reqHeaders.Set("User-Agent", c.s.userAgent()) 5464 var body io.Reader = nil 5465 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 5466 if err != nil { 5467 return nil, err 5468 } 5469 reqHeaders.Set("Content-Type", "application/json") 5470 c.urlParams_.Set("alt", alt) 5471 c.urlParams_.Set("prettyPrint", "false") 5472 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings") 5473 urls += "?" + c.urlParams_.Encode() 5474 req, err := http.NewRequest("POST", urls, body) 5475 if err != nil { 5476 return nil, err 5477 } 5478 req.Header = reqHeaders 5479 googleapi.Expand(req.URL, map[string]string{ 5480 "appsId": c.appsId, 5481 }) 5482 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5483} 5484 5485// Do executes the "appengine.apps.domainMappings.create" call. 5486// Exactly one of *Operation or error will be non-nil. Any non-2xx 5487// status code is an error. Response headers are in either 5488// *Operation.ServerResponse.Header or (if a response was returned at 5489// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5490// to check whether the returned error was because 5491// http.StatusNotModified was returned. 5492func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5493 gensupport.SetOptions(c.urlParams_, opts...) 5494 res, err := c.doRequest("json") 5495 if res != nil && res.StatusCode == http.StatusNotModified { 5496 if res.Body != nil { 5497 res.Body.Close() 5498 } 5499 return nil, &googleapi.Error{ 5500 Code: res.StatusCode, 5501 Header: res.Header, 5502 } 5503 } 5504 if err != nil { 5505 return nil, err 5506 } 5507 defer googleapi.CloseBody(res) 5508 if err := googleapi.CheckResponse(res); err != nil { 5509 return nil, err 5510 } 5511 ret := &Operation{ 5512 ServerResponse: googleapi.ServerResponse{ 5513 Header: res.Header, 5514 HTTPStatusCode: res.StatusCode, 5515 }, 5516 } 5517 target := &ret 5518 if err := gensupport.DecodeResponse(target, res); err != nil { 5519 return nil, err 5520 } 5521 return ret, nil 5522 // { 5523 // "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", 5524 // "flatPath": "v1beta/apps/{appsId}/domainMappings", 5525 // "httpMethod": "POST", 5526 // "id": "appengine.apps.domainMappings.create", 5527 // "parameterOrder": [ 5528 // "appsId" 5529 // ], 5530 // "parameters": { 5531 // "appsId": { 5532 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5533 // "location": "path", 5534 // "required": true, 5535 // "type": "string" 5536 // }, 5537 // "overrideStrategy": { 5538 // "description": "Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.", 5539 // "enum": [ 5540 // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY", 5541 // "STRICT", 5542 // "OVERRIDE" 5543 // ], 5544 // "location": "query", 5545 // "type": "string" 5546 // } 5547 // }, 5548 // "path": "v1beta/apps/{appsId}/domainMappings", 5549 // "request": { 5550 // "$ref": "DomainMapping" 5551 // }, 5552 // "response": { 5553 // "$ref": "Operation" 5554 // }, 5555 // "scopes": [ 5556 // "https://www.googleapis.com/auth/cloud-platform" 5557 // ] 5558 // } 5559 5560} 5561 5562// method id "appengine.apps.domainMappings.delete": 5563 5564type AppsDomainMappingsDeleteCall struct { 5565 s *APIService 5566 appsId string 5567 domainMappingsId string 5568 urlParams_ gensupport.URLParams 5569 ctx_ context.Context 5570 header_ http.Header 5571} 5572 5573// Delete: Deletes the specified domain mapping. A user must be 5574// authorized to administer the associated domain in order to delete a 5575// DomainMapping resource. 5576func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall { 5577 c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5578 c.appsId = appsId 5579 c.domainMappingsId = domainMappingsId 5580 return c 5581} 5582 5583// Fields allows partial responses to be retrieved. See 5584// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5585// for more information. 5586func (c *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall { 5587 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5588 return c 5589} 5590 5591// Context sets the context to be used in this call's Do method. Any 5592// pending HTTP request will be aborted if the provided context is 5593// canceled. 5594func (c *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall { 5595 c.ctx_ = ctx 5596 return c 5597} 5598 5599// Header returns an http.Header that can be modified by the caller to 5600// add HTTP headers to the request. 5601func (c *AppsDomainMappingsDeleteCall) Header() http.Header { 5602 if c.header_ == nil { 5603 c.header_ = make(http.Header) 5604 } 5605 return c.header_ 5606} 5607 5608func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) { 5609 reqHeaders := make(http.Header) 5610 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 5611 for k, v := range c.header_ { 5612 reqHeaders[k] = v 5613 } 5614 reqHeaders.Set("User-Agent", c.s.userAgent()) 5615 var body io.Reader = nil 5616 c.urlParams_.Set("alt", alt) 5617 c.urlParams_.Set("prettyPrint", "false") 5618 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}") 5619 urls += "?" + c.urlParams_.Encode() 5620 req, err := http.NewRequest("DELETE", urls, body) 5621 if err != nil { 5622 return nil, err 5623 } 5624 req.Header = reqHeaders 5625 googleapi.Expand(req.URL, map[string]string{ 5626 "appsId": c.appsId, 5627 "domainMappingsId": c.domainMappingsId, 5628 }) 5629 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5630} 5631 5632// Do executes the "appengine.apps.domainMappings.delete" call. 5633// Exactly one of *Operation or error will be non-nil. Any non-2xx 5634// status code is an error. Response headers are in either 5635// *Operation.ServerResponse.Header or (if a response was returned at 5636// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5637// to check whether the returned error was because 5638// http.StatusNotModified was returned. 5639func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5640 gensupport.SetOptions(c.urlParams_, opts...) 5641 res, err := c.doRequest("json") 5642 if res != nil && res.StatusCode == http.StatusNotModified { 5643 if res.Body != nil { 5644 res.Body.Close() 5645 } 5646 return nil, &googleapi.Error{ 5647 Code: res.StatusCode, 5648 Header: res.Header, 5649 } 5650 } 5651 if err != nil { 5652 return nil, err 5653 } 5654 defer googleapi.CloseBody(res) 5655 if err := googleapi.CheckResponse(res); err != nil { 5656 return nil, err 5657 } 5658 ret := &Operation{ 5659 ServerResponse: googleapi.ServerResponse{ 5660 Header: res.Header, 5661 HTTPStatusCode: res.StatusCode, 5662 }, 5663 } 5664 target := &ret 5665 if err := gensupport.DecodeResponse(target, res); err != nil { 5666 return nil, err 5667 } 5668 return ret, nil 5669 // { 5670 // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", 5671 // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 5672 // "httpMethod": "DELETE", 5673 // "id": "appengine.apps.domainMappings.delete", 5674 // "parameterOrder": [ 5675 // "appsId", 5676 // "domainMappingsId" 5677 // ], 5678 // "parameters": { 5679 // "appsId": { 5680 // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", 5681 // "location": "path", 5682 // "required": true, 5683 // "type": "string" 5684 // }, 5685 // "domainMappingsId": { 5686 // "description": "Part of `name`. See documentation of `appsId`.", 5687 // "location": "path", 5688 // "required": true, 5689 // "type": "string" 5690 // } 5691 // }, 5692 // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 5693 // "response": { 5694 // "$ref": "Operation" 5695 // }, 5696 // "scopes": [ 5697 // "https://www.googleapis.com/auth/cloud-platform" 5698 // ] 5699 // } 5700 5701} 5702 5703// method id "appengine.apps.domainMappings.get": 5704 5705type AppsDomainMappingsGetCall struct { 5706 s *APIService 5707 appsId string 5708 domainMappingsId string 5709 urlParams_ gensupport.URLParams 5710 ifNoneMatch_ string 5711 ctx_ context.Context 5712 header_ http.Header 5713} 5714 5715// Get: Gets the specified domain mapping. 5716func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall { 5717 c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5718 c.appsId = appsId 5719 c.domainMappingsId = domainMappingsId 5720 return c 5721} 5722 5723// Fields allows partial responses to be retrieved. See 5724// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5725// for more information. 5726func (c *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall { 5727 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5728 return c 5729} 5730 5731// IfNoneMatch sets the optional parameter which makes the operation 5732// fail if the object's ETag matches the given value. This is useful for 5733// getting updates only after the object has changed since the last 5734// request. Use googleapi.IsNotModified to check whether the response 5735// error from Do is the result of In-None-Match. 5736func (c *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall { 5737 c.ifNoneMatch_ = entityTag 5738 return c 5739} 5740 5741// Context sets the context to be used in this call's Do method. Any 5742// pending HTTP request will be aborted if the provided context is 5743// canceled. 5744func (c *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall { 5745 c.ctx_ = ctx 5746 return c 5747} 5748 5749// Header returns an http.Header that can be modified by the caller to 5750// add HTTP headers to the request. 5751func (c *AppsDomainMappingsGetCall) Header() http.Header { 5752 if c.header_ == nil { 5753 c.header_ = make(http.Header) 5754 } 5755 return c.header_ 5756} 5757 5758func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) { 5759 reqHeaders := make(http.Header) 5760 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 5761 for k, v := range c.header_ { 5762 reqHeaders[k] = v 5763 } 5764 reqHeaders.Set("User-Agent", c.s.userAgent()) 5765 if c.ifNoneMatch_ != "" { 5766 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5767 } 5768 var body io.Reader = nil 5769 c.urlParams_.Set("alt", alt) 5770 c.urlParams_.Set("prettyPrint", "false") 5771 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}") 5772 urls += "?" + c.urlParams_.Encode() 5773 req, err := http.NewRequest("GET", urls, body) 5774 if err != nil { 5775 return nil, err 5776 } 5777 req.Header = reqHeaders 5778 googleapi.Expand(req.URL, map[string]string{ 5779 "appsId": c.appsId, 5780 "domainMappingsId": c.domainMappingsId, 5781 }) 5782 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5783} 5784 5785// Do executes the "appengine.apps.domainMappings.get" call. 5786// Exactly one of *DomainMapping or error will be non-nil. Any non-2xx 5787// status code is an error. Response headers are in either 5788// *DomainMapping.ServerResponse.Header or (if a response was returned 5789// at all) in error.(*googleapi.Error).Header. Use 5790// googleapi.IsNotModified to check whether the returned error was 5791// because http.StatusNotModified was returned. 5792func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) { 5793 gensupport.SetOptions(c.urlParams_, opts...) 5794 res, err := c.doRequest("json") 5795 if res != nil && res.StatusCode == http.StatusNotModified { 5796 if res.Body != nil { 5797 res.Body.Close() 5798 } 5799 return nil, &googleapi.Error{ 5800 Code: res.StatusCode, 5801 Header: res.Header, 5802 } 5803 } 5804 if err != nil { 5805 return nil, err 5806 } 5807 defer googleapi.CloseBody(res) 5808 if err := googleapi.CheckResponse(res); err != nil { 5809 return nil, err 5810 } 5811 ret := &DomainMapping{ 5812 ServerResponse: googleapi.ServerResponse{ 5813 Header: res.Header, 5814 HTTPStatusCode: res.StatusCode, 5815 }, 5816 } 5817 target := &ret 5818 if err := gensupport.DecodeResponse(target, res); err != nil { 5819 return nil, err 5820 } 5821 return ret, nil 5822 // { 5823 // "description": "Gets the specified domain mapping.", 5824 // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 5825 // "httpMethod": "GET", 5826 // "id": "appengine.apps.domainMappings.get", 5827 // "parameterOrder": [ 5828 // "appsId", 5829 // "domainMappingsId" 5830 // ], 5831 // "parameters": { 5832 // "appsId": { 5833 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", 5834 // "location": "path", 5835 // "required": true, 5836 // "type": "string" 5837 // }, 5838 // "domainMappingsId": { 5839 // "description": "Part of `name`. See documentation of `appsId`.", 5840 // "location": "path", 5841 // "required": true, 5842 // "type": "string" 5843 // } 5844 // }, 5845 // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 5846 // "response": { 5847 // "$ref": "DomainMapping" 5848 // }, 5849 // "scopes": [ 5850 // "https://www.googleapis.com/auth/appengine.admin", 5851 // "https://www.googleapis.com/auth/cloud-platform", 5852 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5853 // ] 5854 // } 5855 5856} 5857 5858// method id "appengine.apps.domainMappings.list": 5859 5860type AppsDomainMappingsListCall struct { 5861 s *APIService 5862 appsId string 5863 urlParams_ gensupport.URLParams 5864 ifNoneMatch_ string 5865 ctx_ context.Context 5866 header_ http.Header 5867} 5868 5869// List: Lists the domain mappings on an application. 5870func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall { 5871 c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5872 c.appsId = appsId 5873 return c 5874} 5875 5876// PageSize sets the optional parameter "pageSize": Maximum results to 5877// return per page. 5878func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall { 5879 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5880 return c 5881} 5882 5883// PageToken sets the optional parameter "pageToken": Continuation token 5884// for fetching the next page of results. 5885func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall { 5886 c.urlParams_.Set("pageToken", pageToken) 5887 return c 5888} 5889 5890// Fields allows partial responses to be retrieved. See 5891// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5892// for more information. 5893func (c *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall { 5894 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5895 return c 5896} 5897 5898// IfNoneMatch sets the optional parameter which makes the operation 5899// fail if the object's ETag matches the given value. This is useful for 5900// getting updates only after the object has changed since the last 5901// request. Use googleapi.IsNotModified to check whether the response 5902// error from Do is the result of In-None-Match. 5903func (c *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall { 5904 c.ifNoneMatch_ = entityTag 5905 return c 5906} 5907 5908// Context sets the context to be used in this call's Do method. Any 5909// pending HTTP request will be aborted if the provided context is 5910// canceled. 5911func (c *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall { 5912 c.ctx_ = ctx 5913 return c 5914} 5915 5916// Header returns an http.Header that can be modified by the caller to 5917// add HTTP headers to the request. 5918func (c *AppsDomainMappingsListCall) Header() http.Header { 5919 if c.header_ == nil { 5920 c.header_ = make(http.Header) 5921 } 5922 return c.header_ 5923} 5924 5925func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) { 5926 reqHeaders := make(http.Header) 5927 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 5928 for k, v := range c.header_ { 5929 reqHeaders[k] = v 5930 } 5931 reqHeaders.Set("User-Agent", c.s.userAgent()) 5932 if c.ifNoneMatch_ != "" { 5933 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5934 } 5935 var body io.Reader = nil 5936 c.urlParams_.Set("alt", alt) 5937 c.urlParams_.Set("prettyPrint", "false") 5938 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings") 5939 urls += "?" + c.urlParams_.Encode() 5940 req, err := http.NewRequest("GET", urls, body) 5941 if err != nil { 5942 return nil, err 5943 } 5944 req.Header = reqHeaders 5945 googleapi.Expand(req.URL, map[string]string{ 5946 "appsId": c.appsId, 5947 }) 5948 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5949} 5950 5951// Do executes the "appengine.apps.domainMappings.list" call. 5952// Exactly one of *ListDomainMappingsResponse or error will be non-nil. 5953// Any non-2xx status code is an error. Response headers are in either 5954// *ListDomainMappingsResponse.ServerResponse.Header or (if a response 5955// was returned at all) in error.(*googleapi.Error).Header. Use 5956// googleapi.IsNotModified to check whether the returned error was 5957// because http.StatusNotModified was returned. 5958func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) { 5959 gensupport.SetOptions(c.urlParams_, opts...) 5960 res, err := c.doRequest("json") 5961 if res != nil && res.StatusCode == http.StatusNotModified { 5962 if res.Body != nil { 5963 res.Body.Close() 5964 } 5965 return nil, &googleapi.Error{ 5966 Code: res.StatusCode, 5967 Header: res.Header, 5968 } 5969 } 5970 if err != nil { 5971 return nil, err 5972 } 5973 defer googleapi.CloseBody(res) 5974 if err := googleapi.CheckResponse(res); err != nil { 5975 return nil, err 5976 } 5977 ret := &ListDomainMappingsResponse{ 5978 ServerResponse: googleapi.ServerResponse{ 5979 Header: res.Header, 5980 HTTPStatusCode: res.StatusCode, 5981 }, 5982 } 5983 target := &ret 5984 if err := gensupport.DecodeResponse(target, res); err != nil { 5985 return nil, err 5986 } 5987 return ret, nil 5988 // { 5989 // "description": "Lists the domain mappings on an application.", 5990 // "flatPath": "v1beta/apps/{appsId}/domainMappings", 5991 // "httpMethod": "GET", 5992 // "id": "appengine.apps.domainMappings.list", 5993 // "parameterOrder": [ 5994 // "appsId" 5995 // ], 5996 // "parameters": { 5997 // "appsId": { 5998 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5999 // "location": "path", 6000 // "required": true, 6001 // "type": "string" 6002 // }, 6003 // "pageSize": { 6004 // "description": "Maximum results to return per page.", 6005 // "format": "int32", 6006 // "location": "query", 6007 // "type": "integer" 6008 // }, 6009 // "pageToken": { 6010 // "description": "Continuation token for fetching the next page of results.", 6011 // "location": "query", 6012 // "type": "string" 6013 // } 6014 // }, 6015 // "path": "v1beta/apps/{appsId}/domainMappings", 6016 // "response": { 6017 // "$ref": "ListDomainMappingsResponse" 6018 // }, 6019 // "scopes": [ 6020 // "https://www.googleapis.com/auth/appengine.admin", 6021 // "https://www.googleapis.com/auth/cloud-platform", 6022 // "https://www.googleapis.com/auth/cloud-platform.read-only" 6023 // ] 6024 // } 6025 6026} 6027 6028// Pages invokes f for each page of results. 6029// A non-nil error returned from f will halt the iteration. 6030// The provided context supersedes any context provided to the Context method. 6031func (c *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) error) error { 6032 c.ctx_ = ctx 6033 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6034 for { 6035 x, err := c.Do() 6036 if err != nil { 6037 return err 6038 } 6039 if err := f(x); err != nil { 6040 return err 6041 } 6042 if x.NextPageToken == "" { 6043 return nil 6044 } 6045 c.PageToken(x.NextPageToken) 6046 } 6047} 6048 6049// method id "appengine.apps.domainMappings.patch": 6050 6051type AppsDomainMappingsPatchCall struct { 6052 s *APIService 6053 appsId string 6054 domainMappingsId string 6055 domainmapping *DomainMapping 6056 urlParams_ gensupport.URLParams 6057 ctx_ context.Context 6058 header_ http.Header 6059} 6060 6061// Patch: Updates the specified domain mapping. To map an SSL 6062// certificate to a domain mapping, update certificate_id to point to an 6063// AuthorizedCertificate resource. A user must be authorized to 6064// administer the associated domain in order to update a DomainMapping 6065// resource. 6066func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall { 6067 c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6068 c.appsId = appsId 6069 c.domainMappingsId = domainMappingsId 6070 c.domainmapping = domainmapping 6071 return c 6072} 6073 6074// UpdateMask sets the optional parameter "updateMask": Standard field 6075// mask for the set of fields to be updated. 6076func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall { 6077 c.urlParams_.Set("updateMask", updateMask) 6078 return c 6079} 6080 6081// Fields allows partial responses to be retrieved. See 6082// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6083// for more information. 6084func (c *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall { 6085 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6086 return c 6087} 6088 6089// Context sets the context to be used in this call's Do method. Any 6090// pending HTTP request will be aborted if the provided context is 6091// canceled. 6092func (c *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall { 6093 c.ctx_ = ctx 6094 return c 6095} 6096 6097// Header returns an http.Header that can be modified by the caller to 6098// add HTTP headers to the request. 6099func (c *AppsDomainMappingsPatchCall) Header() http.Header { 6100 if c.header_ == nil { 6101 c.header_ = make(http.Header) 6102 } 6103 return c.header_ 6104} 6105 6106func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, error) { 6107 reqHeaders := make(http.Header) 6108 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 6109 for k, v := range c.header_ { 6110 reqHeaders[k] = v 6111 } 6112 reqHeaders.Set("User-Agent", c.s.userAgent()) 6113 var body io.Reader = nil 6114 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 6115 if err != nil { 6116 return nil, err 6117 } 6118 reqHeaders.Set("Content-Type", "application/json") 6119 c.urlParams_.Set("alt", alt) 6120 c.urlParams_.Set("prettyPrint", "false") 6121 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}") 6122 urls += "?" + c.urlParams_.Encode() 6123 req, err := http.NewRequest("PATCH", urls, body) 6124 if err != nil { 6125 return nil, err 6126 } 6127 req.Header = reqHeaders 6128 googleapi.Expand(req.URL, map[string]string{ 6129 "appsId": c.appsId, 6130 "domainMappingsId": c.domainMappingsId, 6131 }) 6132 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6133} 6134 6135// Do executes the "appengine.apps.domainMappings.patch" call. 6136// Exactly one of *Operation or error will be non-nil. Any non-2xx 6137// status code is an error. Response headers are in either 6138// *Operation.ServerResponse.Header or (if a response was returned at 6139// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6140// to check whether the returned error was because 6141// http.StatusNotModified was returned. 6142func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6143 gensupport.SetOptions(c.urlParams_, opts...) 6144 res, err := c.doRequest("json") 6145 if res != nil && res.StatusCode == http.StatusNotModified { 6146 if res.Body != nil { 6147 res.Body.Close() 6148 } 6149 return nil, &googleapi.Error{ 6150 Code: res.StatusCode, 6151 Header: res.Header, 6152 } 6153 } 6154 if err != nil { 6155 return nil, err 6156 } 6157 defer googleapi.CloseBody(res) 6158 if err := googleapi.CheckResponse(res); err != nil { 6159 return nil, err 6160 } 6161 ret := &Operation{ 6162 ServerResponse: googleapi.ServerResponse{ 6163 Header: res.Header, 6164 HTTPStatusCode: res.StatusCode, 6165 }, 6166 } 6167 target := &ret 6168 if err := gensupport.DecodeResponse(target, res); err != nil { 6169 return nil, err 6170 } 6171 return ret, nil 6172 // { 6173 // "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.", 6174 // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 6175 // "httpMethod": "PATCH", 6176 // "id": "appengine.apps.domainMappings.patch", 6177 // "parameterOrder": [ 6178 // "appsId", 6179 // "domainMappingsId" 6180 // ], 6181 // "parameters": { 6182 // "appsId": { 6183 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", 6184 // "location": "path", 6185 // "required": true, 6186 // "type": "string" 6187 // }, 6188 // "domainMappingsId": { 6189 // "description": "Part of `name`. See documentation of `appsId`.", 6190 // "location": "path", 6191 // "required": true, 6192 // "type": "string" 6193 // }, 6194 // "updateMask": { 6195 // "description": "Standard field mask for the set of fields to be updated.", 6196 // "format": "google-fieldmask", 6197 // "location": "query", 6198 // "type": "string" 6199 // } 6200 // }, 6201 // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 6202 // "request": { 6203 // "$ref": "DomainMapping" 6204 // }, 6205 // "response": { 6206 // "$ref": "Operation" 6207 // }, 6208 // "scopes": [ 6209 // "https://www.googleapis.com/auth/cloud-platform" 6210 // ] 6211 // } 6212 6213} 6214 6215// method id "appengine.apps.firewall.ingressRules.batchUpdate": 6216 6217type AppsFirewallIngressRulesBatchUpdateCall struct { 6218 s *APIService 6219 appsId string 6220 batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest 6221 urlParams_ gensupport.URLParams 6222 ctx_ context.Context 6223 header_ http.Header 6224} 6225 6226// BatchUpdate: Replaces the entire firewall ruleset in one bulk 6227// operation. This overrides and replaces the rules of an existing 6228// firewall with the new rules.If the final rule does not match traffic 6229// with the '*' wildcard IP range, then an "allow all" rule is 6230// explicitly added to the end of the list. 6231func (r *AppsFirewallIngressRulesService) BatchUpdate(appsId string, batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest) *AppsFirewallIngressRulesBatchUpdateCall { 6232 c := &AppsFirewallIngressRulesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6233 c.appsId = appsId 6234 c.batchupdateingressrulesrequest = batchupdateingressrulesrequest 6235 return c 6236} 6237 6238// Fields allows partial responses to be retrieved. See 6239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6240// for more information. 6241func (c *AppsFirewallIngressRulesBatchUpdateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesBatchUpdateCall { 6242 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6243 return c 6244} 6245 6246// Context sets the context to be used in this call's Do method. Any 6247// pending HTTP request will be aborted if the provided context is 6248// canceled. 6249func (c *AppsFirewallIngressRulesBatchUpdateCall) Context(ctx context.Context) *AppsFirewallIngressRulesBatchUpdateCall { 6250 c.ctx_ = ctx 6251 return c 6252} 6253 6254// Header returns an http.Header that can be modified by the caller to 6255// add HTTP headers to the request. 6256func (c *AppsFirewallIngressRulesBatchUpdateCall) Header() http.Header { 6257 if c.header_ == nil { 6258 c.header_ = make(http.Header) 6259 } 6260 return c.header_ 6261} 6262 6263func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 6264 reqHeaders := make(http.Header) 6265 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 6266 for k, v := range c.header_ { 6267 reqHeaders[k] = v 6268 } 6269 reqHeaders.Set("User-Agent", c.s.userAgent()) 6270 var body io.Reader = nil 6271 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdateingressrulesrequest) 6272 if err != nil { 6273 return nil, err 6274 } 6275 reqHeaders.Set("Content-Type", "application/json") 6276 c.urlParams_.Set("alt", alt) 6277 c.urlParams_.Set("prettyPrint", "false") 6278 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate") 6279 urls += "?" + c.urlParams_.Encode() 6280 req, err := http.NewRequest("POST", urls, body) 6281 if err != nil { 6282 return nil, err 6283 } 6284 req.Header = reqHeaders 6285 googleapi.Expand(req.URL, map[string]string{ 6286 "appsId": c.appsId, 6287 }) 6288 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6289} 6290 6291// Do executes the "appengine.apps.firewall.ingressRules.batchUpdate" call. 6292// Exactly one of *BatchUpdateIngressRulesResponse or error will be 6293// non-nil. Any non-2xx status code is an error. Response headers are in 6294// either *BatchUpdateIngressRulesResponse.ServerResponse.Header or (if 6295// a response was returned at all) in error.(*googleapi.Error).Header. 6296// Use googleapi.IsNotModified to check whether the returned error was 6297// because http.StatusNotModified was returned. 6298func (c *AppsFirewallIngressRulesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateIngressRulesResponse, error) { 6299 gensupport.SetOptions(c.urlParams_, opts...) 6300 res, err := c.doRequest("json") 6301 if res != nil && res.StatusCode == http.StatusNotModified { 6302 if res.Body != nil { 6303 res.Body.Close() 6304 } 6305 return nil, &googleapi.Error{ 6306 Code: res.StatusCode, 6307 Header: res.Header, 6308 } 6309 } 6310 if err != nil { 6311 return nil, err 6312 } 6313 defer googleapi.CloseBody(res) 6314 if err := googleapi.CheckResponse(res); err != nil { 6315 return nil, err 6316 } 6317 ret := &BatchUpdateIngressRulesResponse{ 6318 ServerResponse: googleapi.ServerResponse{ 6319 Header: res.Header, 6320 HTTPStatusCode: res.StatusCode, 6321 }, 6322 } 6323 target := &ret 6324 if err := gensupport.DecodeResponse(target, res); err != nil { 6325 return nil, err 6326 } 6327 return ret, nil 6328 // { 6329 // "description": "Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an \"allow all\" rule is explicitly added to the end of the list.", 6330 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", 6331 // "httpMethod": "POST", 6332 // "id": "appengine.apps.firewall.ingressRules.batchUpdate", 6333 // "parameterOrder": [ 6334 // "appsId" 6335 // ], 6336 // "parameters": { 6337 // "appsId": { 6338 // "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.", 6339 // "location": "path", 6340 // "required": true, 6341 // "type": "string" 6342 // } 6343 // }, 6344 // "path": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", 6345 // "request": { 6346 // "$ref": "BatchUpdateIngressRulesRequest" 6347 // }, 6348 // "response": { 6349 // "$ref": "BatchUpdateIngressRulesResponse" 6350 // }, 6351 // "scopes": [ 6352 // "https://www.googleapis.com/auth/cloud-platform" 6353 // ] 6354 // } 6355 6356} 6357 6358// method id "appengine.apps.firewall.ingressRules.create": 6359 6360type AppsFirewallIngressRulesCreateCall struct { 6361 s *APIService 6362 appsId string 6363 firewallrule *FirewallRule 6364 urlParams_ gensupport.URLParams 6365 ctx_ context.Context 6366 header_ http.Header 6367} 6368 6369// Create: Creates a firewall rule for the application. 6370func (r *AppsFirewallIngressRulesService) Create(appsId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesCreateCall { 6371 c := &AppsFirewallIngressRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6372 c.appsId = appsId 6373 c.firewallrule = firewallrule 6374 return c 6375} 6376 6377// Fields allows partial responses to be retrieved. See 6378// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6379// for more information. 6380func (c *AppsFirewallIngressRulesCreateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesCreateCall { 6381 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6382 return c 6383} 6384 6385// Context sets the context to be used in this call's Do method. Any 6386// pending HTTP request will be aborted if the provided context is 6387// canceled. 6388func (c *AppsFirewallIngressRulesCreateCall) Context(ctx context.Context) *AppsFirewallIngressRulesCreateCall { 6389 c.ctx_ = ctx 6390 return c 6391} 6392 6393// Header returns an http.Header that can be modified by the caller to 6394// add HTTP headers to the request. 6395func (c *AppsFirewallIngressRulesCreateCall) Header() http.Header { 6396 if c.header_ == nil { 6397 c.header_ = make(http.Header) 6398 } 6399 return c.header_ 6400} 6401 6402func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Response, error) { 6403 reqHeaders := make(http.Header) 6404 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 6405 for k, v := range c.header_ { 6406 reqHeaders[k] = v 6407 } 6408 reqHeaders.Set("User-Agent", c.s.userAgent()) 6409 var body io.Reader = nil 6410 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) 6411 if err != nil { 6412 return nil, err 6413 } 6414 reqHeaders.Set("Content-Type", "application/json") 6415 c.urlParams_.Set("alt", alt) 6416 c.urlParams_.Set("prettyPrint", "false") 6417 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules") 6418 urls += "?" + c.urlParams_.Encode() 6419 req, err := http.NewRequest("POST", urls, body) 6420 if err != nil { 6421 return nil, err 6422 } 6423 req.Header = reqHeaders 6424 googleapi.Expand(req.URL, map[string]string{ 6425 "appsId": c.appsId, 6426 }) 6427 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6428} 6429 6430// Do executes the "appengine.apps.firewall.ingressRules.create" call. 6431// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 6432// status code is an error. Response headers are in either 6433// *FirewallRule.ServerResponse.Header or (if a response was returned at 6434// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6435// to check whether the returned error was because 6436// http.StatusNotModified was returned. 6437func (c *AppsFirewallIngressRulesCreateCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 6438 gensupport.SetOptions(c.urlParams_, opts...) 6439 res, err := c.doRequest("json") 6440 if res != nil && res.StatusCode == http.StatusNotModified { 6441 if res.Body != nil { 6442 res.Body.Close() 6443 } 6444 return nil, &googleapi.Error{ 6445 Code: res.StatusCode, 6446 Header: res.Header, 6447 } 6448 } 6449 if err != nil { 6450 return nil, err 6451 } 6452 defer googleapi.CloseBody(res) 6453 if err := googleapi.CheckResponse(res); err != nil { 6454 return nil, err 6455 } 6456 ret := &FirewallRule{ 6457 ServerResponse: googleapi.ServerResponse{ 6458 Header: res.Header, 6459 HTTPStatusCode: res.StatusCode, 6460 }, 6461 } 6462 target := &ret 6463 if err := gensupport.DecodeResponse(target, res); err != nil { 6464 return nil, err 6465 } 6466 return ret, nil 6467 // { 6468 // "description": "Creates a firewall rule for the application.", 6469 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", 6470 // "httpMethod": "POST", 6471 // "id": "appengine.apps.firewall.ingressRules.create", 6472 // "parameterOrder": [ 6473 // "appsId" 6474 // ], 6475 // "parameters": { 6476 // "appsId": { 6477 // "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", 6478 // "location": "path", 6479 // "required": true, 6480 // "type": "string" 6481 // } 6482 // }, 6483 // "path": "v1beta/apps/{appsId}/firewall/ingressRules", 6484 // "request": { 6485 // "$ref": "FirewallRule" 6486 // }, 6487 // "response": { 6488 // "$ref": "FirewallRule" 6489 // }, 6490 // "scopes": [ 6491 // "https://www.googleapis.com/auth/cloud-platform" 6492 // ] 6493 // } 6494 6495} 6496 6497// method id "appengine.apps.firewall.ingressRules.delete": 6498 6499type AppsFirewallIngressRulesDeleteCall struct { 6500 s *APIService 6501 appsId string 6502 ingressRulesId string 6503 urlParams_ gensupport.URLParams 6504 ctx_ context.Context 6505 header_ http.Header 6506} 6507 6508// Delete: Deletes the specified firewall rule. 6509func (r *AppsFirewallIngressRulesService) Delete(appsId string, ingressRulesId string) *AppsFirewallIngressRulesDeleteCall { 6510 c := &AppsFirewallIngressRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6511 c.appsId = appsId 6512 c.ingressRulesId = ingressRulesId 6513 return c 6514} 6515 6516// Fields allows partial responses to be retrieved. See 6517// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6518// for more information. 6519func (c *AppsFirewallIngressRulesDeleteCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesDeleteCall { 6520 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6521 return c 6522} 6523 6524// Context sets the context to be used in this call's Do method. Any 6525// pending HTTP request will be aborted if the provided context is 6526// canceled. 6527func (c *AppsFirewallIngressRulesDeleteCall) Context(ctx context.Context) *AppsFirewallIngressRulesDeleteCall { 6528 c.ctx_ = ctx 6529 return c 6530} 6531 6532// Header returns an http.Header that can be modified by the caller to 6533// add HTTP headers to the request. 6534func (c *AppsFirewallIngressRulesDeleteCall) Header() http.Header { 6535 if c.header_ == nil { 6536 c.header_ = make(http.Header) 6537 } 6538 return c.header_ 6539} 6540 6541func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Response, error) { 6542 reqHeaders := make(http.Header) 6543 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 6544 for k, v := range c.header_ { 6545 reqHeaders[k] = v 6546 } 6547 reqHeaders.Set("User-Agent", c.s.userAgent()) 6548 var body io.Reader = nil 6549 c.urlParams_.Set("alt", alt) 6550 c.urlParams_.Set("prettyPrint", "false") 6551 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 6552 urls += "?" + c.urlParams_.Encode() 6553 req, err := http.NewRequest("DELETE", urls, body) 6554 if err != nil { 6555 return nil, err 6556 } 6557 req.Header = reqHeaders 6558 googleapi.Expand(req.URL, map[string]string{ 6559 "appsId": c.appsId, 6560 "ingressRulesId": c.ingressRulesId, 6561 }) 6562 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6563} 6564 6565// Do executes the "appengine.apps.firewall.ingressRules.delete" call. 6566// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6567// code is an error. Response headers are in either 6568// *Empty.ServerResponse.Header or (if a response was returned at all) 6569// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6570// check whether the returned error was because http.StatusNotModified 6571// was returned. 6572func (c *AppsFirewallIngressRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6573 gensupport.SetOptions(c.urlParams_, opts...) 6574 res, err := c.doRequest("json") 6575 if res != nil && res.StatusCode == http.StatusNotModified { 6576 if res.Body != nil { 6577 res.Body.Close() 6578 } 6579 return nil, &googleapi.Error{ 6580 Code: res.StatusCode, 6581 Header: res.Header, 6582 } 6583 } 6584 if err != nil { 6585 return nil, err 6586 } 6587 defer googleapi.CloseBody(res) 6588 if err := googleapi.CheckResponse(res); err != nil { 6589 return nil, err 6590 } 6591 ret := &Empty{ 6592 ServerResponse: googleapi.ServerResponse{ 6593 Header: res.Header, 6594 HTTPStatusCode: res.StatusCode, 6595 }, 6596 } 6597 target := &ret 6598 if err := gensupport.DecodeResponse(target, res); err != nil { 6599 return nil, err 6600 } 6601 return ret, nil 6602 // { 6603 // "description": "Deletes the specified firewall rule.", 6604 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6605 // "httpMethod": "DELETE", 6606 // "id": "appengine.apps.firewall.ingressRules.delete", 6607 // "parameterOrder": [ 6608 // "appsId", 6609 // "ingressRulesId" 6610 // ], 6611 // "parameters": { 6612 // "appsId": { 6613 // "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.", 6614 // "location": "path", 6615 // "required": true, 6616 // "type": "string" 6617 // }, 6618 // "ingressRulesId": { 6619 // "description": "Part of `name`. See documentation of `appsId`.", 6620 // "location": "path", 6621 // "required": true, 6622 // "type": "string" 6623 // } 6624 // }, 6625 // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6626 // "response": { 6627 // "$ref": "Empty" 6628 // }, 6629 // "scopes": [ 6630 // "https://www.googleapis.com/auth/cloud-platform" 6631 // ] 6632 // } 6633 6634} 6635 6636// method id "appengine.apps.firewall.ingressRules.get": 6637 6638type AppsFirewallIngressRulesGetCall struct { 6639 s *APIService 6640 appsId string 6641 ingressRulesId string 6642 urlParams_ gensupport.URLParams 6643 ifNoneMatch_ string 6644 ctx_ context.Context 6645 header_ http.Header 6646} 6647 6648// Get: Gets the specified firewall rule. 6649func (r *AppsFirewallIngressRulesService) Get(appsId string, ingressRulesId string) *AppsFirewallIngressRulesGetCall { 6650 c := &AppsFirewallIngressRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6651 c.appsId = appsId 6652 c.ingressRulesId = ingressRulesId 6653 return c 6654} 6655 6656// Fields allows partial responses to be retrieved. See 6657// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6658// for more information. 6659func (c *AppsFirewallIngressRulesGetCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesGetCall { 6660 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6661 return c 6662} 6663 6664// IfNoneMatch sets the optional parameter which makes the operation 6665// fail if the object's ETag matches the given value. This is useful for 6666// getting updates only after the object has changed since the last 6667// request. Use googleapi.IsNotModified to check whether the response 6668// error from Do is the result of In-None-Match. 6669func (c *AppsFirewallIngressRulesGetCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesGetCall { 6670 c.ifNoneMatch_ = entityTag 6671 return c 6672} 6673 6674// Context sets the context to be used in this call's Do method. Any 6675// pending HTTP request will be aborted if the provided context is 6676// canceled. 6677func (c *AppsFirewallIngressRulesGetCall) Context(ctx context.Context) *AppsFirewallIngressRulesGetCall { 6678 c.ctx_ = ctx 6679 return c 6680} 6681 6682// Header returns an http.Header that can be modified by the caller to 6683// add HTTP headers to the request. 6684func (c *AppsFirewallIngressRulesGetCall) Header() http.Header { 6685 if c.header_ == nil { 6686 c.header_ = make(http.Header) 6687 } 6688 return c.header_ 6689} 6690 6691func (c *AppsFirewallIngressRulesGetCall) doRequest(alt string) (*http.Response, error) { 6692 reqHeaders := make(http.Header) 6693 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 6694 for k, v := range c.header_ { 6695 reqHeaders[k] = v 6696 } 6697 reqHeaders.Set("User-Agent", c.s.userAgent()) 6698 if c.ifNoneMatch_ != "" { 6699 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6700 } 6701 var body io.Reader = nil 6702 c.urlParams_.Set("alt", alt) 6703 c.urlParams_.Set("prettyPrint", "false") 6704 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 6705 urls += "?" + c.urlParams_.Encode() 6706 req, err := http.NewRequest("GET", urls, body) 6707 if err != nil { 6708 return nil, err 6709 } 6710 req.Header = reqHeaders 6711 googleapi.Expand(req.URL, map[string]string{ 6712 "appsId": c.appsId, 6713 "ingressRulesId": c.ingressRulesId, 6714 }) 6715 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6716} 6717 6718// Do executes the "appengine.apps.firewall.ingressRules.get" call. 6719// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 6720// status code is an error. Response headers are in either 6721// *FirewallRule.ServerResponse.Header or (if a response was returned at 6722// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6723// to check whether the returned error was because 6724// http.StatusNotModified was returned. 6725func (c *AppsFirewallIngressRulesGetCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 6726 gensupport.SetOptions(c.urlParams_, opts...) 6727 res, err := c.doRequest("json") 6728 if res != nil && res.StatusCode == http.StatusNotModified { 6729 if res.Body != nil { 6730 res.Body.Close() 6731 } 6732 return nil, &googleapi.Error{ 6733 Code: res.StatusCode, 6734 Header: res.Header, 6735 } 6736 } 6737 if err != nil { 6738 return nil, err 6739 } 6740 defer googleapi.CloseBody(res) 6741 if err := googleapi.CheckResponse(res); err != nil { 6742 return nil, err 6743 } 6744 ret := &FirewallRule{ 6745 ServerResponse: googleapi.ServerResponse{ 6746 Header: res.Header, 6747 HTTPStatusCode: res.StatusCode, 6748 }, 6749 } 6750 target := &ret 6751 if err := gensupport.DecodeResponse(target, res); err != nil { 6752 return nil, err 6753 } 6754 return ret, nil 6755 // { 6756 // "description": "Gets the specified firewall rule.", 6757 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6758 // "httpMethod": "GET", 6759 // "id": "appengine.apps.firewall.ingressRules.get", 6760 // "parameterOrder": [ 6761 // "appsId", 6762 // "ingressRulesId" 6763 // ], 6764 // "parameters": { 6765 // "appsId": { 6766 // "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.", 6767 // "location": "path", 6768 // "required": true, 6769 // "type": "string" 6770 // }, 6771 // "ingressRulesId": { 6772 // "description": "Part of `name`. See documentation of `appsId`.", 6773 // "location": "path", 6774 // "required": true, 6775 // "type": "string" 6776 // } 6777 // }, 6778 // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6779 // "response": { 6780 // "$ref": "FirewallRule" 6781 // }, 6782 // "scopes": [ 6783 // "https://www.googleapis.com/auth/appengine.admin", 6784 // "https://www.googleapis.com/auth/cloud-platform", 6785 // "https://www.googleapis.com/auth/cloud-platform.read-only" 6786 // ] 6787 // } 6788 6789} 6790 6791// method id "appengine.apps.firewall.ingressRules.list": 6792 6793type AppsFirewallIngressRulesListCall struct { 6794 s *APIService 6795 appsId string 6796 urlParams_ gensupport.URLParams 6797 ifNoneMatch_ string 6798 ctx_ context.Context 6799 header_ http.Header 6800} 6801 6802// List: Lists the firewall rules of an application. 6803func (r *AppsFirewallIngressRulesService) List(appsId string) *AppsFirewallIngressRulesListCall { 6804 c := &AppsFirewallIngressRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6805 c.appsId = appsId 6806 return c 6807} 6808 6809// MatchingAddress sets the optional parameter "matchingAddress": A 6810// valid IP Address. If set, only rules matching this address will be 6811// returned. The first returned rule will be the rule that fires on 6812// requests from this IP. 6813func (c *AppsFirewallIngressRulesListCall) MatchingAddress(matchingAddress string) *AppsFirewallIngressRulesListCall { 6814 c.urlParams_.Set("matchingAddress", matchingAddress) 6815 return c 6816} 6817 6818// PageSize sets the optional parameter "pageSize": Maximum results to 6819// return per page. 6820func (c *AppsFirewallIngressRulesListCall) PageSize(pageSize int64) *AppsFirewallIngressRulesListCall { 6821 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6822 return c 6823} 6824 6825// PageToken sets the optional parameter "pageToken": Continuation token 6826// for fetching the next page of results. 6827func (c *AppsFirewallIngressRulesListCall) PageToken(pageToken string) *AppsFirewallIngressRulesListCall { 6828 c.urlParams_.Set("pageToken", pageToken) 6829 return c 6830} 6831 6832// Fields allows partial responses to be retrieved. See 6833// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6834// for more information. 6835func (c *AppsFirewallIngressRulesListCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesListCall { 6836 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6837 return c 6838} 6839 6840// IfNoneMatch sets the optional parameter which makes the operation 6841// fail if the object's ETag matches the given value. This is useful for 6842// getting updates only after the object has changed since the last 6843// request. Use googleapi.IsNotModified to check whether the response 6844// error from Do is the result of In-None-Match. 6845func (c *AppsFirewallIngressRulesListCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesListCall { 6846 c.ifNoneMatch_ = entityTag 6847 return c 6848} 6849 6850// Context sets the context to be used in this call's Do method. Any 6851// pending HTTP request will be aborted if the provided context is 6852// canceled. 6853func (c *AppsFirewallIngressRulesListCall) Context(ctx context.Context) *AppsFirewallIngressRulesListCall { 6854 c.ctx_ = ctx 6855 return c 6856} 6857 6858// Header returns an http.Header that can be modified by the caller to 6859// add HTTP headers to the request. 6860func (c *AppsFirewallIngressRulesListCall) Header() http.Header { 6861 if c.header_ == nil { 6862 c.header_ = make(http.Header) 6863 } 6864 return c.header_ 6865} 6866 6867func (c *AppsFirewallIngressRulesListCall) doRequest(alt string) (*http.Response, error) { 6868 reqHeaders := make(http.Header) 6869 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 6870 for k, v := range c.header_ { 6871 reqHeaders[k] = v 6872 } 6873 reqHeaders.Set("User-Agent", c.s.userAgent()) 6874 if c.ifNoneMatch_ != "" { 6875 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6876 } 6877 var body io.Reader = nil 6878 c.urlParams_.Set("alt", alt) 6879 c.urlParams_.Set("prettyPrint", "false") 6880 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules") 6881 urls += "?" + c.urlParams_.Encode() 6882 req, err := http.NewRequest("GET", urls, body) 6883 if err != nil { 6884 return nil, err 6885 } 6886 req.Header = reqHeaders 6887 googleapi.Expand(req.URL, map[string]string{ 6888 "appsId": c.appsId, 6889 }) 6890 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6891} 6892 6893// Do executes the "appengine.apps.firewall.ingressRules.list" call. 6894// Exactly one of *ListIngressRulesResponse or error will be non-nil. 6895// Any non-2xx status code is an error. Response headers are in either 6896// *ListIngressRulesResponse.ServerResponse.Header or (if a response was 6897// returned at all) in error.(*googleapi.Error).Header. Use 6898// googleapi.IsNotModified to check whether the returned error was 6899// because http.StatusNotModified was returned. 6900func (c *AppsFirewallIngressRulesListCall) Do(opts ...googleapi.CallOption) (*ListIngressRulesResponse, error) { 6901 gensupport.SetOptions(c.urlParams_, opts...) 6902 res, err := c.doRequest("json") 6903 if res != nil && res.StatusCode == http.StatusNotModified { 6904 if res.Body != nil { 6905 res.Body.Close() 6906 } 6907 return nil, &googleapi.Error{ 6908 Code: res.StatusCode, 6909 Header: res.Header, 6910 } 6911 } 6912 if err != nil { 6913 return nil, err 6914 } 6915 defer googleapi.CloseBody(res) 6916 if err := googleapi.CheckResponse(res); err != nil { 6917 return nil, err 6918 } 6919 ret := &ListIngressRulesResponse{ 6920 ServerResponse: googleapi.ServerResponse{ 6921 Header: res.Header, 6922 HTTPStatusCode: res.StatusCode, 6923 }, 6924 } 6925 target := &ret 6926 if err := gensupport.DecodeResponse(target, res); err != nil { 6927 return nil, err 6928 } 6929 return ret, nil 6930 // { 6931 // "description": "Lists the firewall rules of an application.", 6932 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", 6933 // "httpMethod": "GET", 6934 // "id": "appengine.apps.firewall.ingressRules.list", 6935 // "parameterOrder": [ 6936 // "appsId" 6937 // ], 6938 // "parameters": { 6939 // "appsId": { 6940 // "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", 6941 // "location": "path", 6942 // "required": true, 6943 // "type": "string" 6944 // }, 6945 // "matchingAddress": { 6946 // "description": "A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.", 6947 // "location": "query", 6948 // "type": "string" 6949 // }, 6950 // "pageSize": { 6951 // "description": "Maximum results to return per page.", 6952 // "format": "int32", 6953 // "location": "query", 6954 // "type": "integer" 6955 // }, 6956 // "pageToken": { 6957 // "description": "Continuation token for fetching the next page of results.", 6958 // "location": "query", 6959 // "type": "string" 6960 // } 6961 // }, 6962 // "path": "v1beta/apps/{appsId}/firewall/ingressRules", 6963 // "response": { 6964 // "$ref": "ListIngressRulesResponse" 6965 // }, 6966 // "scopes": [ 6967 // "https://www.googleapis.com/auth/appengine.admin", 6968 // "https://www.googleapis.com/auth/cloud-platform", 6969 // "https://www.googleapis.com/auth/cloud-platform.read-only" 6970 // ] 6971 // } 6972 6973} 6974 6975// Pages invokes f for each page of results. 6976// A non-nil error returned from f will halt the iteration. 6977// The provided context supersedes any context provided to the Context method. 6978func (c *AppsFirewallIngressRulesListCall) Pages(ctx context.Context, f func(*ListIngressRulesResponse) error) error { 6979 c.ctx_ = ctx 6980 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6981 for { 6982 x, err := c.Do() 6983 if err != nil { 6984 return err 6985 } 6986 if err := f(x); err != nil { 6987 return err 6988 } 6989 if x.NextPageToken == "" { 6990 return nil 6991 } 6992 c.PageToken(x.NextPageToken) 6993 } 6994} 6995 6996// method id "appengine.apps.firewall.ingressRules.patch": 6997 6998type AppsFirewallIngressRulesPatchCall struct { 6999 s *APIService 7000 appsId string 7001 ingressRulesId string 7002 firewallrule *FirewallRule 7003 urlParams_ gensupport.URLParams 7004 ctx_ context.Context 7005 header_ http.Header 7006} 7007 7008// Patch: Updates the specified firewall rule. 7009func (r *AppsFirewallIngressRulesService) Patch(appsId string, ingressRulesId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesPatchCall { 7010 c := &AppsFirewallIngressRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7011 c.appsId = appsId 7012 c.ingressRulesId = ingressRulesId 7013 c.firewallrule = firewallrule 7014 return c 7015} 7016 7017// UpdateMask sets the optional parameter "updateMask": Standard field 7018// mask for the set of fields to be updated. 7019func (c *AppsFirewallIngressRulesPatchCall) UpdateMask(updateMask string) *AppsFirewallIngressRulesPatchCall { 7020 c.urlParams_.Set("updateMask", updateMask) 7021 return c 7022} 7023 7024// Fields allows partial responses to be retrieved. See 7025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7026// for more information. 7027func (c *AppsFirewallIngressRulesPatchCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesPatchCall { 7028 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7029 return c 7030} 7031 7032// Context sets the context to be used in this call's Do method. Any 7033// pending HTTP request will be aborted if the provided context is 7034// canceled. 7035func (c *AppsFirewallIngressRulesPatchCall) Context(ctx context.Context) *AppsFirewallIngressRulesPatchCall { 7036 c.ctx_ = ctx 7037 return c 7038} 7039 7040// Header returns an http.Header that can be modified by the caller to 7041// add HTTP headers to the request. 7042func (c *AppsFirewallIngressRulesPatchCall) Header() http.Header { 7043 if c.header_ == nil { 7044 c.header_ = make(http.Header) 7045 } 7046 return c.header_ 7047} 7048 7049func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Response, error) { 7050 reqHeaders := make(http.Header) 7051 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 7052 for k, v := range c.header_ { 7053 reqHeaders[k] = v 7054 } 7055 reqHeaders.Set("User-Agent", c.s.userAgent()) 7056 var body io.Reader = nil 7057 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) 7058 if err != nil { 7059 return nil, err 7060 } 7061 reqHeaders.Set("Content-Type", "application/json") 7062 c.urlParams_.Set("alt", alt) 7063 c.urlParams_.Set("prettyPrint", "false") 7064 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 7065 urls += "?" + c.urlParams_.Encode() 7066 req, err := http.NewRequest("PATCH", urls, body) 7067 if err != nil { 7068 return nil, err 7069 } 7070 req.Header = reqHeaders 7071 googleapi.Expand(req.URL, map[string]string{ 7072 "appsId": c.appsId, 7073 "ingressRulesId": c.ingressRulesId, 7074 }) 7075 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7076} 7077 7078// Do executes the "appengine.apps.firewall.ingressRules.patch" call. 7079// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 7080// status code is an error. Response headers are in either 7081// *FirewallRule.ServerResponse.Header or (if a response was returned at 7082// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7083// to check whether the returned error was because 7084// http.StatusNotModified was returned. 7085func (c *AppsFirewallIngressRulesPatchCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 7086 gensupport.SetOptions(c.urlParams_, opts...) 7087 res, err := c.doRequest("json") 7088 if res != nil && res.StatusCode == http.StatusNotModified { 7089 if res.Body != nil { 7090 res.Body.Close() 7091 } 7092 return nil, &googleapi.Error{ 7093 Code: res.StatusCode, 7094 Header: res.Header, 7095 } 7096 } 7097 if err != nil { 7098 return nil, err 7099 } 7100 defer googleapi.CloseBody(res) 7101 if err := googleapi.CheckResponse(res); err != nil { 7102 return nil, err 7103 } 7104 ret := &FirewallRule{ 7105 ServerResponse: googleapi.ServerResponse{ 7106 Header: res.Header, 7107 HTTPStatusCode: res.StatusCode, 7108 }, 7109 } 7110 target := &ret 7111 if err := gensupport.DecodeResponse(target, res); err != nil { 7112 return nil, err 7113 } 7114 return ret, nil 7115 // { 7116 // "description": "Updates the specified firewall rule.", 7117 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 7118 // "httpMethod": "PATCH", 7119 // "id": "appengine.apps.firewall.ingressRules.patch", 7120 // "parameterOrder": [ 7121 // "appsId", 7122 // "ingressRulesId" 7123 // ], 7124 // "parameters": { 7125 // "appsId": { 7126 // "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.", 7127 // "location": "path", 7128 // "required": true, 7129 // "type": "string" 7130 // }, 7131 // "ingressRulesId": { 7132 // "description": "Part of `name`. See documentation of `appsId`.", 7133 // "location": "path", 7134 // "required": true, 7135 // "type": "string" 7136 // }, 7137 // "updateMask": { 7138 // "description": "Standard field mask for the set of fields to be updated.", 7139 // "format": "google-fieldmask", 7140 // "location": "query", 7141 // "type": "string" 7142 // } 7143 // }, 7144 // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 7145 // "request": { 7146 // "$ref": "FirewallRule" 7147 // }, 7148 // "response": { 7149 // "$ref": "FirewallRule" 7150 // }, 7151 // "scopes": [ 7152 // "https://www.googleapis.com/auth/cloud-platform" 7153 // ] 7154 // } 7155 7156} 7157 7158// method id "appengine.apps.locations.get": 7159 7160type AppsLocationsGetCall struct { 7161 s *APIService 7162 appsId string 7163 locationsId string 7164 urlParams_ gensupport.URLParams 7165 ifNoneMatch_ string 7166 ctx_ context.Context 7167 header_ http.Header 7168} 7169 7170// Get: Gets information about a location. 7171func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall { 7172 c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7173 c.appsId = appsId 7174 c.locationsId = locationsId 7175 return c 7176} 7177 7178// Fields allows partial responses to be retrieved. See 7179// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7180// for more information. 7181func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall { 7182 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7183 return c 7184} 7185 7186// IfNoneMatch sets the optional parameter which makes the operation 7187// fail if the object's ETag matches the given value. This is useful for 7188// getting updates only after the object has changed since the last 7189// request. Use googleapi.IsNotModified to check whether the response 7190// error from Do is the result of In-None-Match. 7191func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall { 7192 c.ifNoneMatch_ = entityTag 7193 return c 7194} 7195 7196// Context sets the context to be used in this call's Do method. Any 7197// pending HTTP request will be aborted if the provided context is 7198// canceled. 7199func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall { 7200 c.ctx_ = ctx 7201 return c 7202} 7203 7204// Header returns an http.Header that can be modified by the caller to 7205// add HTTP headers to the request. 7206func (c *AppsLocationsGetCall) Header() http.Header { 7207 if c.header_ == nil { 7208 c.header_ = make(http.Header) 7209 } 7210 return c.header_ 7211} 7212 7213func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 7214 reqHeaders := make(http.Header) 7215 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 7216 for k, v := range c.header_ { 7217 reqHeaders[k] = v 7218 } 7219 reqHeaders.Set("User-Agent", c.s.userAgent()) 7220 if c.ifNoneMatch_ != "" { 7221 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7222 } 7223 var body io.Reader = nil 7224 c.urlParams_.Set("alt", alt) 7225 c.urlParams_.Set("prettyPrint", "false") 7226 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/locations/{locationsId}") 7227 urls += "?" + c.urlParams_.Encode() 7228 req, err := http.NewRequest("GET", urls, body) 7229 if err != nil { 7230 return nil, err 7231 } 7232 req.Header = reqHeaders 7233 googleapi.Expand(req.URL, map[string]string{ 7234 "appsId": c.appsId, 7235 "locationsId": c.locationsId, 7236 }) 7237 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7238} 7239 7240// Do executes the "appengine.apps.locations.get" call. 7241// Exactly one of *Location or error will be non-nil. Any non-2xx status 7242// code is an error. Response headers are in either 7243// *Location.ServerResponse.Header or (if a response was returned at 7244// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7245// to check whether the returned error was because 7246// http.StatusNotModified was returned. 7247func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 7248 gensupport.SetOptions(c.urlParams_, opts...) 7249 res, err := c.doRequest("json") 7250 if res != nil && res.StatusCode == http.StatusNotModified { 7251 if res.Body != nil { 7252 res.Body.Close() 7253 } 7254 return nil, &googleapi.Error{ 7255 Code: res.StatusCode, 7256 Header: res.Header, 7257 } 7258 } 7259 if err != nil { 7260 return nil, err 7261 } 7262 defer googleapi.CloseBody(res) 7263 if err := googleapi.CheckResponse(res); err != nil { 7264 return nil, err 7265 } 7266 ret := &Location{ 7267 ServerResponse: googleapi.ServerResponse{ 7268 Header: res.Header, 7269 HTTPStatusCode: res.StatusCode, 7270 }, 7271 } 7272 target := &ret 7273 if err := gensupport.DecodeResponse(target, res); err != nil { 7274 return nil, err 7275 } 7276 return ret, nil 7277 // { 7278 // "description": "Gets information about a location.", 7279 // "flatPath": "v1beta/apps/{appsId}/locations/{locationsId}", 7280 // "httpMethod": "GET", 7281 // "id": "appengine.apps.locations.get", 7282 // "parameterOrder": [ 7283 // "appsId", 7284 // "locationsId" 7285 // ], 7286 // "parameters": { 7287 // "appsId": { 7288 // "description": "Part of `name`. Resource name for the location.", 7289 // "location": "path", 7290 // "required": true, 7291 // "type": "string" 7292 // }, 7293 // "locationsId": { 7294 // "description": "Part of `name`. See documentation of `appsId`.", 7295 // "location": "path", 7296 // "required": true, 7297 // "type": "string" 7298 // } 7299 // }, 7300 // "path": "v1beta/apps/{appsId}/locations/{locationsId}", 7301 // "response": { 7302 // "$ref": "Location" 7303 // }, 7304 // "scopes": [ 7305 // "https://www.googleapis.com/auth/appengine.admin", 7306 // "https://www.googleapis.com/auth/cloud-platform", 7307 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7308 // ] 7309 // } 7310 7311} 7312 7313// method id "appengine.apps.locations.list": 7314 7315type AppsLocationsListCall struct { 7316 s *APIService 7317 appsId string 7318 urlParams_ gensupport.URLParams 7319 ifNoneMatch_ string 7320 ctx_ context.Context 7321 header_ http.Header 7322} 7323 7324// List: Lists information about the supported locations for this 7325// service. 7326func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall { 7327 c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7328 c.appsId = appsId 7329 return c 7330} 7331 7332// Filter sets the optional parameter "filter": The standard list 7333// filter. 7334func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall { 7335 c.urlParams_.Set("filter", filter) 7336 return c 7337} 7338 7339// PageSize sets the optional parameter "pageSize": The standard list 7340// page size. 7341func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall { 7342 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7343 return c 7344} 7345 7346// PageToken sets the optional parameter "pageToken": The standard list 7347// page token. 7348func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall { 7349 c.urlParams_.Set("pageToken", pageToken) 7350 return c 7351} 7352 7353// Fields allows partial responses to be retrieved. See 7354// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7355// for more information. 7356func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall { 7357 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7358 return c 7359} 7360 7361// IfNoneMatch sets the optional parameter which makes the operation 7362// fail if the object's ETag matches the given value. This is useful for 7363// getting updates only after the object has changed since the last 7364// request. Use googleapi.IsNotModified to check whether the response 7365// error from Do is the result of In-None-Match. 7366func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall { 7367 c.ifNoneMatch_ = entityTag 7368 return c 7369} 7370 7371// Context sets the context to be used in this call's Do method. Any 7372// pending HTTP request will be aborted if the provided context is 7373// canceled. 7374func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall { 7375 c.ctx_ = ctx 7376 return c 7377} 7378 7379// Header returns an http.Header that can be modified by the caller to 7380// add HTTP headers to the request. 7381func (c *AppsLocationsListCall) Header() http.Header { 7382 if c.header_ == nil { 7383 c.header_ = make(http.Header) 7384 } 7385 return c.header_ 7386} 7387 7388func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) { 7389 reqHeaders := make(http.Header) 7390 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 7391 for k, v := range c.header_ { 7392 reqHeaders[k] = v 7393 } 7394 reqHeaders.Set("User-Agent", c.s.userAgent()) 7395 if c.ifNoneMatch_ != "" { 7396 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7397 } 7398 var body io.Reader = nil 7399 c.urlParams_.Set("alt", alt) 7400 c.urlParams_.Set("prettyPrint", "false") 7401 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/locations") 7402 urls += "?" + c.urlParams_.Encode() 7403 req, err := http.NewRequest("GET", urls, body) 7404 if err != nil { 7405 return nil, err 7406 } 7407 req.Header = reqHeaders 7408 googleapi.Expand(req.URL, map[string]string{ 7409 "appsId": c.appsId, 7410 }) 7411 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7412} 7413 7414// Do executes the "appengine.apps.locations.list" call. 7415// Exactly one of *ListLocationsResponse or error will be non-nil. Any 7416// non-2xx status code is an error. Response headers are in either 7417// *ListLocationsResponse.ServerResponse.Header or (if a response was 7418// returned at all) in error.(*googleapi.Error).Header. Use 7419// googleapi.IsNotModified to check whether the returned error was 7420// because http.StatusNotModified was returned. 7421func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 7422 gensupport.SetOptions(c.urlParams_, opts...) 7423 res, err := c.doRequest("json") 7424 if res != nil && res.StatusCode == http.StatusNotModified { 7425 if res.Body != nil { 7426 res.Body.Close() 7427 } 7428 return nil, &googleapi.Error{ 7429 Code: res.StatusCode, 7430 Header: res.Header, 7431 } 7432 } 7433 if err != nil { 7434 return nil, err 7435 } 7436 defer googleapi.CloseBody(res) 7437 if err := googleapi.CheckResponse(res); err != nil { 7438 return nil, err 7439 } 7440 ret := &ListLocationsResponse{ 7441 ServerResponse: googleapi.ServerResponse{ 7442 Header: res.Header, 7443 HTTPStatusCode: res.StatusCode, 7444 }, 7445 } 7446 target := &ret 7447 if err := gensupport.DecodeResponse(target, res); err != nil { 7448 return nil, err 7449 } 7450 return ret, nil 7451 // { 7452 // "description": "Lists information about the supported locations for this service.", 7453 // "flatPath": "v1beta/apps/{appsId}/locations", 7454 // "httpMethod": "GET", 7455 // "id": "appengine.apps.locations.list", 7456 // "parameterOrder": [ 7457 // "appsId" 7458 // ], 7459 // "parameters": { 7460 // "appsId": { 7461 // "description": "Part of `name`. The resource that owns the locations collection, if applicable.", 7462 // "location": "path", 7463 // "required": true, 7464 // "type": "string" 7465 // }, 7466 // "filter": { 7467 // "description": "The standard list filter.", 7468 // "location": "query", 7469 // "type": "string" 7470 // }, 7471 // "pageSize": { 7472 // "description": "The standard list page size.", 7473 // "format": "int32", 7474 // "location": "query", 7475 // "type": "integer" 7476 // }, 7477 // "pageToken": { 7478 // "description": "The standard list page token.", 7479 // "location": "query", 7480 // "type": "string" 7481 // } 7482 // }, 7483 // "path": "v1beta/apps/{appsId}/locations", 7484 // "response": { 7485 // "$ref": "ListLocationsResponse" 7486 // }, 7487 // "scopes": [ 7488 // "https://www.googleapis.com/auth/appengine.admin", 7489 // "https://www.googleapis.com/auth/cloud-platform", 7490 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7491 // ] 7492 // } 7493 7494} 7495 7496// Pages invokes f for each page of results. 7497// A non-nil error returned from f will halt the iteration. 7498// The provided context supersedes any context provided to the Context method. 7499func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 7500 c.ctx_ = ctx 7501 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7502 for { 7503 x, err := c.Do() 7504 if err != nil { 7505 return err 7506 } 7507 if err := f(x); err != nil { 7508 return err 7509 } 7510 if x.NextPageToken == "" { 7511 return nil 7512 } 7513 c.PageToken(x.NextPageToken) 7514 } 7515} 7516 7517// method id "appengine.apps.operations.get": 7518 7519type AppsOperationsGetCall struct { 7520 s *APIService 7521 appsId string 7522 operationsId string 7523 urlParams_ gensupport.URLParams 7524 ifNoneMatch_ string 7525 ctx_ context.Context 7526 header_ http.Header 7527} 7528 7529// Get: Gets the latest state of a long-running operation. Clients can 7530// use this method to poll the operation result at intervals as 7531// recommended by the API service. 7532func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall { 7533 c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7534 c.appsId = appsId 7535 c.operationsId = operationsId 7536 return c 7537} 7538 7539// Fields allows partial responses to be retrieved. See 7540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7541// for more information. 7542func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall { 7543 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7544 return c 7545} 7546 7547// IfNoneMatch sets the optional parameter which makes the operation 7548// fail if the object's ETag matches the given value. This is useful for 7549// getting updates only after the object has changed since the last 7550// request. Use googleapi.IsNotModified to check whether the response 7551// error from Do is the result of In-None-Match. 7552func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall { 7553 c.ifNoneMatch_ = entityTag 7554 return c 7555} 7556 7557// Context sets the context to be used in this call's Do method. Any 7558// pending HTTP request will be aborted if the provided context is 7559// canceled. 7560func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall { 7561 c.ctx_ = ctx 7562 return c 7563} 7564 7565// Header returns an http.Header that can be modified by the caller to 7566// add HTTP headers to the request. 7567func (c *AppsOperationsGetCall) Header() http.Header { 7568 if c.header_ == nil { 7569 c.header_ = make(http.Header) 7570 } 7571 return c.header_ 7572} 7573 7574func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 7575 reqHeaders := make(http.Header) 7576 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 7577 for k, v := range c.header_ { 7578 reqHeaders[k] = v 7579 } 7580 reqHeaders.Set("User-Agent", c.s.userAgent()) 7581 if c.ifNoneMatch_ != "" { 7582 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7583 } 7584 var body io.Reader = nil 7585 c.urlParams_.Set("alt", alt) 7586 c.urlParams_.Set("prettyPrint", "false") 7587 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/operations/{operationsId}") 7588 urls += "?" + c.urlParams_.Encode() 7589 req, err := http.NewRequest("GET", urls, body) 7590 if err != nil { 7591 return nil, err 7592 } 7593 req.Header = reqHeaders 7594 googleapi.Expand(req.URL, map[string]string{ 7595 "appsId": c.appsId, 7596 "operationsId": c.operationsId, 7597 }) 7598 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7599} 7600 7601// Do executes the "appengine.apps.operations.get" call. 7602// Exactly one of *Operation or error will be non-nil. Any non-2xx 7603// status code is an error. Response headers are in either 7604// *Operation.ServerResponse.Header or (if a response was returned at 7605// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7606// to check whether the returned error was because 7607// http.StatusNotModified was returned. 7608func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7609 gensupport.SetOptions(c.urlParams_, opts...) 7610 res, err := c.doRequest("json") 7611 if res != nil && res.StatusCode == http.StatusNotModified { 7612 if res.Body != nil { 7613 res.Body.Close() 7614 } 7615 return nil, &googleapi.Error{ 7616 Code: res.StatusCode, 7617 Header: res.Header, 7618 } 7619 } 7620 if err != nil { 7621 return nil, err 7622 } 7623 defer googleapi.CloseBody(res) 7624 if err := googleapi.CheckResponse(res); err != nil { 7625 return nil, err 7626 } 7627 ret := &Operation{ 7628 ServerResponse: googleapi.ServerResponse{ 7629 Header: res.Header, 7630 HTTPStatusCode: res.StatusCode, 7631 }, 7632 } 7633 target := &ret 7634 if err := gensupport.DecodeResponse(target, res); err != nil { 7635 return nil, err 7636 } 7637 return ret, nil 7638 // { 7639 // "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.", 7640 // "flatPath": "v1beta/apps/{appsId}/operations/{operationsId}", 7641 // "httpMethod": "GET", 7642 // "id": "appengine.apps.operations.get", 7643 // "parameterOrder": [ 7644 // "appsId", 7645 // "operationsId" 7646 // ], 7647 // "parameters": { 7648 // "appsId": { 7649 // "description": "Part of `name`. The name of the operation resource.", 7650 // "location": "path", 7651 // "required": true, 7652 // "type": "string" 7653 // }, 7654 // "operationsId": { 7655 // "description": "Part of `name`. See documentation of `appsId`.", 7656 // "location": "path", 7657 // "required": true, 7658 // "type": "string" 7659 // } 7660 // }, 7661 // "path": "v1beta/apps/{appsId}/operations/{operationsId}", 7662 // "response": { 7663 // "$ref": "Operation" 7664 // }, 7665 // "scopes": [ 7666 // "https://www.googleapis.com/auth/appengine.admin", 7667 // "https://www.googleapis.com/auth/cloud-platform", 7668 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7669 // ] 7670 // } 7671 7672} 7673 7674// method id "appengine.apps.operations.list": 7675 7676type AppsOperationsListCall struct { 7677 s *APIService 7678 appsId string 7679 urlParams_ gensupport.URLParams 7680 ifNoneMatch_ string 7681 ctx_ context.Context 7682 header_ http.Header 7683} 7684 7685// List: Lists operations that match the specified filter in the 7686// request. If the server doesn't support this method, it returns 7687// UNIMPLEMENTED.NOTE: the name binding allows API services to override 7688// the binding to use different resource name schemes, such as 7689// users/*/operations. To override the binding, API services can add a 7690// binding such as "/v1/{name=users/*}/operations" to their service 7691// configuration. For backwards compatibility, the default name includes 7692// the operations collection id, however overriding users must ensure 7693// the name binding is the parent resource, without the operations 7694// collection id. 7695func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall { 7696 c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7697 c.appsId = appsId 7698 return c 7699} 7700 7701// Filter sets the optional parameter "filter": The standard list 7702// filter. 7703func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall { 7704 c.urlParams_.Set("filter", filter) 7705 return c 7706} 7707 7708// PageSize sets the optional parameter "pageSize": The standard list 7709// page size. 7710func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall { 7711 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7712 return c 7713} 7714 7715// PageToken sets the optional parameter "pageToken": The standard list 7716// page token. 7717func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall { 7718 c.urlParams_.Set("pageToken", pageToken) 7719 return c 7720} 7721 7722// Fields allows partial responses to be retrieved. See 7723// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7724// for more information. 7725func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall { 7726 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7727 return c 7728} 7729 7730// IfNoneMatch sets the optional parameter which makes the operation 7731// fail if the object's ETag matches the given value. This is useful for 7732// getting updates only after the object has changed since the last 7733// request. Use googleapi.IsNotModified to check whether the response 7734// error from Do is the result of In-None-Match. 7735func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall { 7736 c.ifNoneMatch_ = entityTag 7737 return c 7738} 7739 7740// Context sets the context to be used in this call's Do method. Any 7741// pending HTTP request will be aborted if the provided context is 7742// canceled. 7743func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall { 7744 c.ctx_ = ctx 7745 return c 7746} 7747 7748// Header returns an http.Header that can be modified by the caller to 7749// add HTTP headers to the request. 7750func (c *AppsOperationsListCall) Header() http.Header { 7751 if c.header_ == nil { 7752 c.header_ = make(http.Header) 7753 } 7754 return c.header_ 7755} 7756 7757func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) { 7758 reqHeaders := make(http.Header) 7759 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 7760 for k, v := range c.header_ { 7761 reqHeaders[k] = v 7762 } 7763 reqHeaders.Set("User-Agent", c.s.userAgent()) 7764 if c.ifNoneMatch_ != "" { 7765 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7766 } 7767 var body io.Reader = nil 7768 c.urlParams_.Set("alt", alt) 7769 c.urlParams_.Set("prettyPrint", "false") 7770 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/operations") 7771 urls += "?" + c.urlParams_.Encode() 7772 req, err := http.NewRequest("GET", urls, body) 7773 if err != nil { 7774 return nil, err 7775 } 7776 req.Header = reqHeaders 7777 googleapi.Expand(req.URL, map[string]string{ 7778 "appsId": c.appsId, 7779 }) 7780 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7781} 7782 7783// Do executes the "appengine.apps.operations.list" call. 7784// Exactly one of *ListOperationsResponse or error will be non-nil. Any 7785// non-2xx status code is an error. Response headers are in either 7786// *ListOperationsResponse.ServerResponse.Header or (if a response was 7787// returned at all) in error.(*googleapi.Error).Header. Use 7788// googleapi.IsNotModified to check whether the returned error was 7789// because http.StatusNotModified was returned. 7790func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 7791 gensupport.SetOptions(c.urlParams_, opts...) 7792 res, err := c.doRequest("json") 7793 if res != nil && res.StatusCode == http.StatusNotModified { 7794 if res.Body != nil { 7795 res.Body.Close() 7796 } 7797 return nil, &googleapi.Error{ 7798 Code: res.StatusCode, 7799 Header: res.Header, 7800 } 7801 } 7802 if err != nil { 7803 return nil, err 7804 } 7805 defer googleapi.CloseBody(res) 7806 if err := googleapi.CheckResponse(res); err != nil { 7807 return nil, err 7808 } 7809 ret := &ListOperationsResponse{ 7810 ServerResponse: googleapi.ServerResponse{ 7811 Header: res.Header, 7812 HTTPStatusCode: res.StatusCode, 7813 }, 7814 } 7815 target := &ret 7816 if err := gensupport.DecodeResponse(target, res); err != nil { 7817 return nil, err 7818 } 7819 return ret, nil 7820 // { 7821 // "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.", 7822 // "flatPath": "v1beta/apps/{appsId}/operations", 7823 // "httpMethod": "GET", 7824 // "id": "appengine.apps.operations.list", 7825 // "parameterOrder": [ 7826 // "appsId" 7827 // ], 7828 // "parameters": { 7829 // "appsId": { 7830 // "description": "Part of `name`. The name of the operation's parent resource.", 7831 // "location": "path", 7832 // "required": true, 7833 // "type": "string" 7834 // }, 7835 // "filter": { 7836 // "description": "The standard list filter.", 7837 // "location": "query", 7838 // "type": "string" 7839 // }, 7840 // "pageSize": { 7841 // "description": "The standard list page size.", 7842 // "format": "int32", 7843 // "location": "query", 7844 // "type": "integer" 7845 // }, 7846 // "pageToken": { 7847 // "description": "The standard list page token.", 7848 // "location": "query", 7849 // "type": "string" 7850 // } 7851 // }, 7852 // "path": "v1beta/apps/{appsId}/operations", 7853 // "response": { 7854 // "$ref": "ListOperationsResponse" 7855 // }, 7856 // "scopes": [ 7857 // "https://www.googleapis.com/auth/appengine.admin", 7858 // "https://www.googleapis.com/auth/cloud-platform", 7859 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7860 // ] 7861 // } 7862 7863} 7864 7865// Pages invokes f for each page of results. 7866// A non-nil error returned from f will halt the iteration. 7867// The provided context supersedes any context provided to the Context method. 7868func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 7869 c.ctx_ = ctx 7870 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7871 for { 7872 x, err := c.Do() 7873 if err != nil { 7874 return err 7875 } 7876 if err := f(x); err != nil { 7877 return err 7878 } 7879 if x.NextPageToken == "" { 7880 return nil 7881 } 7882 c.PageToken(x.NextPageToken) 7883 } 7884} 7885 7886// method id "appengine.apps.services.delete": 7887 7888type AppsServicesDeleteCall struct { 7889 s *APIService 7890 appsId string 7891 servicesId string 7892 urlParams_ gensupport.URLParams 7893 ctx_ context.Context 7894 header_ http.Header 7895} 7896 7897// Delete: Deletes the specified service and all enclosed versions. 7898func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall { 7899 c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7900 c.appsId = appsId 7901 c.servicesId = servicesId 7902 return c 7903} 7904 7905// Fields allows partial responses to be retrieved. See 7906// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7907// for more information. 7908func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall { 7909 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7910 return c 7911} 7912 7913// Context sets the context to be used in this call's Do method. Any 7914// pending HTTP request will be aborted if the provided context is 7915// canceled. 7916func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall { 7917 c.ctx_ = ctx 7918 return c 7919} 7920 7921// Header returns an http.Header that can be modified by the caller to 7922// add HTTP headers to the request. 7923func (c *AppsServicesDeleteCall) Header() http.Header { 7924 if c.header_ == nil { 7925 c.header_ = make(http.Header) 7926 } 7927 return c.header_ 7928} 7929 7930func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { 7931 reqHeaders := make(http.Header) 7932 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 7933 for k, v := range c.header_ { 7934 reqHeaders[k] = v 7935 } 7936 reqHeaders.Set("User-Agent", c.s.userAgent()) 7937 var body io.Reader = nil 7938 c.urlParams_.Set("alt", alt) 7939 c.urlParams_.Set("prettyPrint", "false") 7940 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}") 7941 urls += "?" + c.urlParams_.Encode() 7942 req, err := http.NewRequest("DELETE", urls, body) 7943 if err != nil { 7944 return nil, err 7945 } 7946 req.Header = reqHeaders 7947 googleapi.Expand(req.URL, map[string]string{ 7948 "appsId": c.appsId, 7949 "servicesId": c.servicesId, 7950 }) 7951 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7952} 7953 7954// Do executes the "appengine.apps.services.delete" call. 7955// Exactly one of *Operation or error will be non-nil. Any non-2xx 7956// status code is an error. Response headers are in either 7957// *Operation.ServerResponse.Header or (if a response was returned at 7958// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7959// to check whether the returned error was because 7960// http.StatusNotModified was returned. 7961func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7962 gensupport.SetOptions(c.urlParams_, opts...) 7963 res, err := c.doRequest("json") 7964 if res != nil && res.StatusCode == http.StatusNotModified { 7965 if res.Body != nil { 7966 res.Body.Close() 7967 } 7968 return nil, &googleapi.Error{ 7969 Code: res.StatusCode, 7970 Header: res.Header, 7971 } 7972 } 7973 if err != nil { 7974 return nil, err 7975 } 7976 defer googleapi.CloseBody(res) 7977 if err := googleapi.CheckResponse(res); err != nil { 7978 return nil, err 7979 } 7980 ret := &Operation{ 7981 ServerResponse: googleapi.ServerResponse{ 7982 Header: res.Header, 7983 HTTPStatusCode: res.StatusCode, 7984 }, 7985 } 7986 target := &ret 7987 if err := gensupport.DecodeResponse(target, res); err != nil { 7988 return nil, err 7989 } 7990 return ret, nil 7991 // { 7992 // "description": "Deletes the specified service and all enclosed versions.", 7993 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", 7994 // "httpMethod": "DELETE", 7995 // "id": "appengine.apps.services.delete", 7996 // "parameterOrder": [ 7997 // "appsId", 7998 // "servicesId" 7999 // ], 8000 // "parameters": { 8001 // "appsId": { 8002 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", 8003 // "location": "path", 8004 // "required": true, 8005 // "type": "string" 8006 // }, 8007 // "servicesId": { 8008 // "description": "Part of `name`. See documentation of `appsId`.", 8009 // "location": "path", 8010 // "required": true, 8011 // "type": "string" 8012 // } 8013 // }, 8014 // "path": "v1beta/apps/{appsId}/services/{servicesId}", 8015 // "response": { 8016 // "$ref": "Operation" 8017 // }, 8018 // "scopes": [ 8019 // "https://www.googleapis.com/auth/cloud-platform" 8020 // ] 8021 // } 8022 8023} 8024 8025// method id "appengine.apps.services.get": 8026 8027type AppsServicesGetCall struct { 8028 s *APIService 8029 appsId string 8030 servicesId string 8031 urlParams_ gensupport.URLParams 8032 ifNoneMatch_ string 8033 ctx_ context.Context 8034 header_ http.Header 8035} 8036 8037// Get: Gets the current configuration of the specified service. 8038func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall { 8039 c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8040 c.appsId = appsId 8041 c.servicesId = servicesId 8042 return c 8043} 8044 8045// Fields allows partial responses to be retrieved. See 8046// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8047// for more information. 8048func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall { 8049 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8050 return c 8051} 8052 8053// IfNoneMatch sets the optional parameter which makes the operation 8054// fail if the object's ETag matches the given value. This is useful for 8055// getting updates only after the object has changed since the last 8056// request. Use googleapi.IsNotModified to check whether the response 8057// error from Do is the result of In-None-Match. 8058func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall { 8059 c.ifNoneMatch_ = entityTag 8060 return c 8061} 8062 8063// Context sets the context to be used in this call's Do method. Any 8064// pending HTTP request will be aborted if the provided context is 8065// canceled. 8066func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall { 8067 c.ctx_ = ctx 8068 return c 8069} 8070 8071// Header returns an http.Header that can be modified by the caller to 8072// add HTTP headers to the request. 8073func (c *AppsServicesGetCall) Header() http.Header { 8074 if c.header_ == nil { 8075 c.header_ = make(http.Header) 8076 } 8077 return c.header_ 8078} 8079 8080func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) { 8081 reqHeaders := make(http.Header) 8082 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8083 for k, v := range c.header_ { 8084 reqHeaders[k] = v 8085 } 8086 reqHeaders.Set("User-Agent", c.s.userAgent()) 8087 if c.ifNoneMatch_ != "" { 8088 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8089 } 8090 var body io.Reader = nil 8091 c.urlParams_.Set("alt", alt) 8092 c.urlParams_.Set("prettyPrint", "false") 8093 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}") 8094 urls += "?" + c.urlParams_.Encode() 8095 req, err := http.NewRequest("GET", urls, body) 8096 if err != nil { 8097 return nil, err 8098 } 8099 req.Header = reqHeaders 8100 googleapi.Expand(req.URL, map[string]string{ 8101 "appsId": c.appsId, 8102 "servicesId": c.servicesId, 8103 }) 8104 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8105} 8106 8107// Do executes the "appengine.apps.services.get" call. 8108// Exactly one of *Service or error will be non-nil. Any non-2xx status 8109// code is an error. Response headers are in either 8110// *Service.ServerResponse.Header or (if a response was returned at all) 8111// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8112// check whether the returned error was because http.StatusNotModified 8113// was returned. 8114func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) { 8115 gensupport.SetOptions(c.urlParams_, opts...) 8116 res, err := c.doRequest("json") 8117 if res != nil && res.StatusCode == http.StatusNotModified { 8118 if res.Body != nil { 8119 res.Body.Close() 8120 } 8121 return nil, &googleapi.Error{ 8122 Code: res.StatusCode, 8123 Header: res.Header, 8124 } 8125 } 8126 if err != nil { 8127 return nil, err 8128 } 8129 defer googleapi.CloseBody(res) 8130 if err := googleapi.CheckResponse(res); err != nil { 8131 return nil, err 8132 } 8133 ret := &Service{ 8134 ServerResponse: googleapi.ServerResponse{ 8135 Header: res.Header, 8136 HTTPStatusCode: res.StatusCode, 8137 }, 8138 } 8139 target := &ret 8140 if err := gensupport.DecodeResponse(target, res); err != nil { 8141 return nil, err 8142 } 8143 return ret, nil 8144 // { 8145 // "description": "Gets the current configuration of the specified service.", 8146 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", 8147 // "httpMethod": "GET", 8148 // "id": "appengine.apps.services.get", 8149 // "parameterOrder": [ 8150 // "appsId", 8151 // "servicesId" 8152 // ], 8153 // "parameters": { 8154 // "appsId": { 8155 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", 8156 // "location": "path", 8157 // "required": true, 8158 // "type": "string" 8159 // }, 8160 // "servicesId": { 8161 // "description": "Part of `name`. See documentation of `appsId`.", 8162 // "location": "path", 8163 // "required": true, 8164 // "type": "string" 8165 // } 8166 // }, 8167 // "path": "v1beta/apps/{appsId}/services/{servicesId}", 8168 // "response": { 8169 // "$ref": "Service" 8170 // }, 8171 // "scopes": [ 8172 // "https://www.googleapis.com/auth/appengine.admin", 8173 // "https://www.googleapis.com/auth/cloud-platform", 8174 // "https://www.googleapis.com/auth/cloud-platform.read-only" 8175 // ] 8176 // } 8177 8178} 8179 8180// method id "appengine.apps.services.list": 8181 8182type AppsServicesListCall struct { 8183 s *APIService 8184 appsId string 8185 urlParams_ gensupport.URLParams 8186 ifNoneMatch_ string 8187 ctx_ context.Context 8188 header_ http.Header 8189} 8190 8191// List: Lists all the services in the application. 8192func (r *AppsServicesService) List(appsId string) *AppsServicesListCall { 8193 c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8194 c.appsId = appsId 8195 return c 8196} 8197 8198// PageSize sets the optional parameter "pageSize": Maximum results to 8199// return per page. 8200func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall { 8201 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8202 return c 8203} 8204 8205// PageToken sets the optional parameter "pageToken": Continuation token 8206// for fetching the next page of results. 8207func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall { 8208 c.urlParams_.Set("pageToken", pageToken) 8209 return c 8210} 8211 8212// Fields allows partial responses to be retrieved. See 8213// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8214// for more information. 8215func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall { 8216 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8217 return c 8218} 8219 8220// IfNoneMatch sets the optional parameter which makes the operation 8221// fail if the object's ETag matches the given value. This is useful for 8222// getting updates only after the object has changed since the last 8223// request. Use googleapi.IsNotModified to check whether the response 8224// error from Do is the result of In-None-Match. 8225func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall { 8226 c.ifNoneMatch_ = entityTag 8227 return c 8228} 8229 8230// Context sets the context to be used in this call's Do method. Any 8231// pending HTTP request will be aborted if the provided context is 8232// canceled. 8233func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall { 8234 c.ctx_ = ctx 8235 return c 8236} 8237 8238// Header returns an http.Header that can be modified by the caller to 8239// add HTTP headers to the request. 8240func (c *AppsServicesListCall) Header() http.Header { 8241 if c.header_ == nil { 8242 c.header_ = make(http.Header) 8243 } 8244 return c.header_ 8245} 8246 8247func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) { 8248 reqHeaders := make(http.Header) 8249 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8250 for k, v := range c.header_ { 8251 reqHeaders[k] = v 8252 } 8253 reqHeaders.Set("User-Agent", c.s.userAgent()) 8254 if c.ifNoneMatch_ != "" { 8255 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8256 } 8257 var body io.Reader = nil 8258 c.urlParams_.Set("alt", alt) 8259 c.urlParams_.Set("prettyPrint", "false") 8260 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services") 8261 urls += "?" + c.urlParams_.Encode() 8262 req, err := http.NewRequest("GET", urls, body) 8263 if err != nil { 8264 return nil, err 8265 } 8266 req.Header = reqHeaders 8267 googleapi.Expand(req.URL, map[string]string{ 8268 "appsId": c.appsId, 8269 }) 8270 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8271} 8272 8273// Do executes the "appengine.apps.services.list" call. 8274// Exactly one of *ListServicesResponse or error will be non-nil. Any 8275// non-2xx status code is an error. Response headers are in either 8276// *ListServicesResponse.ServerResponse.Header or (if a response was 8277// returned at all) in error.(*googleapi.Error).Header. Use 8278// googleapi.IsNotModified to check whether the returned error was 8279// because http.StatusNotModified was returned. 8280func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) { 8281 gensupport.SetOptions(c.urlParams_, opts...) 8282 res, err := c.doRequest("json") 8283 if res != nil && res.StatusCode == http.StatusNotModified { 8284 if res.Body != nil { 8285 res.Body.Close() 8286 } 8287 return nil, &googleapi.Error{ 8288 Code: res.StatusCode, 8289 Header: res.Header, 8290 } 8291 } 8292 if err != nil { 8293 return nil, err 8294 } 8295 defer googleapi.CloseBody(res) 8296 if err := googleapi.CheckResponse(res); err != nil { 8297 return nil, err 8298 } 8299 ret := &ListServicesResponse{ 8300 ServerResponse: googleapi.ServerResponse{ 8301 Header: res.Header, 8302 HTTPStatusCode: res.StatusCode, 8303 }, 8304 } 8305 target := &ret 8306 if err := gensupport.DecodeResponse(target, res); err != nil { 8307 return nil, err 8308 } 8309 return ret, nil 8310 // { 8311 // "description": "Lists all the services in the application.", 8312 // "flatPath": "v1beta/apps/{appsId}/services", 8313 // "httpMethod": "GET", 8314 // "id": "appengine.apps.services.list", 8315 // "parameterOrder": [ 8316 // "appsId" 8317 // ], 8318 // "parameters": { 8319 // "appsId": { 8320 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 8321 // "location": "path", 8322 // "required": true, 8323 // "type": "string" 8324 // }, 8325 // "pageSize": { 8326 // "description": "Maximum results to return per page.", 8327 // "format": "int32", 8328 // "location": "query", 8329 // "type": "integer" 8330 // }, 8331 // "pageToken": { 8332 // "description": "Continuation token for fetching the next page of results.", 8333 // "location": "query", 8334 // "type": "string" 8335 // } 8336 // }, 8337 // "path": "v1beta/apps/{appsId}/services", 8338 // "response": { 8339 // "$ref": "ListServicesResponse" 8340 // }, 8341 // "scopes": [ 8342 // "https://www.googleapis.com/auth/appengine.admin", 8343 // "https://www.googleapis.com/auth/cloud-platform", 8344 // "https://www.googleapis.com/auth/cloud-platform.read-only" 8345 // ] 8346 // } 8347 8348} 8349 8350// Pages invokes f for each page of results. 8351// A non-nil error returned from f will halt the iteration. 8352// The provided context supersedes any context provided to the Context method. 8353func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error { 8354 c.ctx_ = ctx 8355 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8356 for { 8357 x, err := c.Do() 8358 if err != nil { 8359 return err 8360 } 8361 if err := f(x); err != nil { 8362 return err 8363 } 8364 if x.NextPageToken == "" { 8365 return nil 8366 } 8367 c.PageToken(x.NextPageToken) 8368 } 8369} 8370 8371// method id "appengine.apps.services.patch": 8372 8373type AppsServicesPatchCall struct { 8374 s *APIService 8375 appsId string 8376 servicesId string 8377 service *Service 8378 urlParams_ gensupport.URLParams 8379 ctx_ context.Context 8380 header_ http.Header 8381} 8382 8383// Patch: Updates the configuration of the specified service. 8384func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall { 8385 c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8386 c.appsId = appsId 8387 c.servicesId = servicesId 8388 c.service = service 8389 return c 8390} 8391 8392// MigrateTraffic sets the optional parameter "migrateTraffic": Set to 8393// true to gradually shift traffic to one or more versions that you 8394// specify. By default, traffic is shifted immediately. For gradual 8395// traffic migration, the target versions must be located within 8396// instances that are configured for both warmup requests 8397// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 8398// ta/apps.services.versions#InboundServiceType) and automatic scaling 8399// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 8400// ta/apps.services.versions#AutomaticScaling). You must specify the 8401// shardBy 8402// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 8403// ta/apps.services#ShardBy) field in the Service resource. Gradual 8404// traffic migration is not supported in the App Engine flexible 8405// environment. For examples, see Migrating and Splitting Traffic 8406// (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting 8407// -traffic). 8408func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall { 8409 c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic)) 8410 return c 8411} 8412 8413// UpdateMask sets the optional parameter "updateMask": Standard field 8414// mask for the set of fields to be updated. 8415func (c *AppsServicesPatchCall) UpdateMask(updateMask string) *AppsServicesPatchCall { 8416 c.urlParams_.Set("updateMask", updateMask) 8417 return c 8418} 8419 8420// Fields allows partial responses to be retrieved. See 8421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8422// for more information. 8423func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall { 8424 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8425 return c 8426} 8427 8428// Context sets the context to be used in this call's Do method. Any 8429// pending HTTP request will be aborted if the provided context is 8430// canceled. 8431func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall { 8432 c.ctx_ = ctx 8433 return c 8434} 8435 8436// Header returns an http.Header that can be modified by the caller to 8437// add HTTP headers to the request. 8438func (c *AppsServicesPatchCall) Header() http.Header { 8439 if c.header_ == nil { 8440 c.header_ = make(http.Header) 8441 } 8442 return c.header_ 8443} 8444 8445func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) { 8446 reqHeaders := make(http.Header) 8447 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8448 for k, v := range c.header_ { 8449 reqHeaders[k] = v 8450 } 8451 reqHeaders.Set("User-Agent", c.s.userAgent()) 8452 var body io.Reader = nil 8453 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) 8454 if err != nil { 8455 return nil, err 8456 } 8457 reqHeaders.Set("Content-Type", "application/json") 8458 c.urlParams_.Set("alt", alt) 8459 c.urlParams_.Set("prettyPrint", "false") 8460 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}") 8461 urls += "?" + c.urlParams_.Encode() 8462 req, err := http.NewRequest("PATCH", urls, body) 8463 if err != nil { 8464 return nil, err 8465 } 8466 req.Header = reqHeaders 8467 googleapi.Expand(req.URL, map[string]string{ 8468 "appsId": c.appsId, 8469 "servicesId": c.servicesId, 8470 }) 8471 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8472} 8473 8474// Do executes the "appengine.apps.services.patch" call. 8475// Exactly one of *Operation or error will be non-nil. Any non-2xx 8476// status code is an error. Response headers are in either 8477// *Operation.ServerResponse.Header or (if a response was returned at 8478// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8479// to check whether the returned error was because 8480// http.StatusNotModified was returned. 8481func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8482 gensupport.SetOptions(c.urlParams_, opts...) 8483 res, err := c.doRequest("json") 8484 if res != nil && res.StatusCode == http.StatusNotModified { 8485 if res.Body != nil { 8486 res.Body.Close() 8487 } 8488 return nil, &googleapi.Error{ 8489 Code: res.StatusCode, 8490 Header: res.Header, 8491 } 8492 } 8493 if err != nil { 8494 return nil, err 8495 } 8496 defer googleapi.CloseBody(res) 8497 if err := googleapi.CheckResponse(res); err != nil { 8498 return nil, err 8499 } 8500 ret := &Operation{ 8501 ServerResponse: googleapi.ServerResponse{ 8502 Header: res.Header, 8503 HTTPStatusCode: res.StatusCode, 8504 }, 8505 } 8506 target := &ret 8507 if err := gensupport.DecodeResponse(target, res); err != nil { 8508 return nil, err 8509 } 8510 return ret, nil 8511 // { 8512 // "description": "Updates the configuration of the specified service.", 8513 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", 8514 // "httpMethod": "PATCH", 8515 // "id": "appengine.apps.services.patch", 8516 // "parameterOrder": [ 8517 // "appsId", 8518 // "servicesId" 8519 // ], 8520 // "parameters": { 8521 // "appsId": { 8522 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", 8523 // "location": "path", 8524 // "required": true, 8525 // "type": "string" 8526 // }, 8527 // "migrateTraffic": { 8528 // "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/v1beta/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/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).", 8529 // "location": "query", 8530 // "type": "boolean" 8531 // }, 8532 // "servicesId": { 8533 // "description": "Part of `name`. See documentation of `appsId`.", 8534 // "location": "path", 8535 // "required": true, 8536 // "type": "string" 8537 // }, 8538 // "updateMask": { 8539 // "description": "Standard field mask for the set of fields to be updated.", 8540 // "format": "google-fieldmask", 8541 // "location": "query", 8542 // "type": "string" 8543 // } 8544 // }, 8545 // "path": "v1beta/apps/{appsId}/services/{servicesId}", 8546 // "request": { 8547 // "$ref": "Service" 8548 // }, 8549 // "response": { 8550 // "$ref": "Operation" 8551 // }, 8552 // "scopes": [ 8553 // "https://www.googleapis.com/auth/cloud-platform" 8554 // ] 8555 // } 8556 8557} 8558 8559// method id "appengine.apps.services.versions.create": 8560 8561type AppsServicesVersionsCreateCall struct { 8562 s *APIService 8563 appsId string 8564 servicesId string 8565 version *Version 8566 urlParams_ gensupport.URLParams 8567 ctx_ context.Context 8568 header_ http.Header 8569} 8570 8571// Create: Deploys code and resource files to a new version. 8572func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall { 8573 c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8574 c.appsId = appsId 8575 c.servicesId = servicesId 8576 c.version = version 8577 return c 8578} 8579 8580// Fields allows partial responses to be retrieved. See 8581// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8582// for more information. 8583func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall { 8584 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8585 return c 8586} 8587 8588// Context sets the context to be used in this call's Do method. Any 8589// pending HTTP request will be aborted if the provided context is 8590// canceled. 8591func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall { 8592 c.ctx_ = ctx 8593 return c 8594} 8595 8596// Header returns an http.Header that can be modified by the caller to 8597// add HTTP headers to the request. 8598func (c *AppsServicesVersionsCreateCall) Header() http.Header { 8599 if c.header_ == nil { 8600 c.header_ = make(http.Header) 8601 } 8602 return c.header_ 8603} 8604 8605func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) { 8606 reqHeaders := make(http.Header) 8607 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8608 for k, v := range c.header_ { 8609 reqHeaders[k] = v 8610 } 8611 reqHeaders.Set("User-Agent", c.s.userAgent()) 8612 var body io.Reader = nil 8613 body, err := googleapi.WithoutDataWrapper.JSONReader(c.version) 8614 if err != nil { 8615 return nil, err 8616 } 8617 reqHeaders.Set("Content-Type", "application/json") 8618 c.urlParams_.Set("alt", alt) 8619 c.urlParams_.Set("prettyPrint", "false") 8620 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions") 8621 urls += "?" + c.urlParams_.Encode() 8622 req, err := http.NewRequest("POST", urls, body) 8623 if err != nil { 8624 return nil, err 8625 } 8626 req.Header = reqHeaders 8627 googleapi.Expand(req.URL, map[string]string{ 8628 "appsId": c.appsId, 8629 "servicesId": c.servicesId, 8630 }) 8631 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8632} 8633 8634// Do executes the "appengine.apps.services.versions.create" call. 8635// Exactly one of *Operation or error will be non-nil. Any non-2xx 8636// status code is an error. Response headers are in either 8637// *Operation.ServerResponse.Header or (if a response was returned at 8638// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8639// to check whether the returned error was because 8640// http.StatusNotModified was returned. 8641func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8642 gensupport.SetOptions(c.urlParams_, opts...) 8643 res, err := c.doRequest("json") 8644 if res != nil && res.StatusCode == http.StatusNotModified { 8645 if res.Body != nil { 8646 res.Body.Close() 8647 } 8648 return nil, &googleapi.Error{ 8649 Code: res.StatusCode, 8650 Header: res.Header, 8651 } 8652 } 8653 if err != nil { 8654 return nil, err 8655 } 8656 defer googleapi.CloseBody(res) 8657 if err := googleapi.CheckResponse(res); err != nil { 8658 return nil, err 8659 } 8660 ret := &Operation{ 8661 ServerResponse: googleapi.ServerResponse{ 8662 Header: res.Header, 8663 HTTPStatusCode: res.StatusCode, 8664 }, 8665 } 8666 target := &ret 8667 if err := gensupport.DecodeResponse(target, res); err != nil { 8668 return nil, err 8669 } 8670 return ret, nil 8671 // { 8672 // "description": "Deploys code and resource files to a new version.", 8673 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", 8674 // "httpMethod": "POST", 8675 // "id": "appengine.apps.services.versions.create", 8676 // "parameterOrder": [ 8677 // "appsId", 8678 // "servicesId" 8679 // ], 8680 // "parameters": { 8681 // "appsId": { 8682 // "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", 8683 // "location": "path", 8684 // "required": true, 8685 // "type": "string" 8686 // }, 8687 // "servicesId": { 8688 // "description": "Part of `parent`. See documentation of `appsId`.", 8689 // "location": "path", 8690 // "required": true, 8691 // "type": "string" 8692 // } 8693 // }, 8694 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions", 8695 // "request": { 8696 // "$ref": "Version" 8697 // }, 8698 // "response": { 8699 // "$ref": "Operation" 8700 // }, 8701 // "scopes": [ 8702 // "https://www.googleapis.com/auth/cloud-platform" 8703 // ] 8704 // } 8705 8706} 8707 8708// method id "appengine.apps.services.versions.delete": 8709 8710type AppsServicesVersionsDeleteCall struct { 8711 s *APIService 8712 appsId string 8713 servicesId string 8714 versionsId string 8715 urlParams_ gensupport.URLParams 8716 ctx_ context.Context 8717 header_ http.Header 8718} 8719 8720// Delete: Deletes an existing Version resource. 8721func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall { 8722 c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8723 c.appsId = appsId 8724 c.servicesId = servicesId 8725 c.versionsId = versionsId 8726 return c 8727} 8728 8729// Fields allows partial responses to be retrieved. See 8730// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8731// for more information. 8732func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall { 8733 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8734 return c 8735} 8736 8737// Context sets the context to be used in this call's Do method. Any 8738// pending HTTP request will be aborted if the provided context is 8739// canceled. 8740func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall { 8741 c.ctx_ = ctx 8742 return c 8743} 8744 8745// Header returns an http.Header that can be modified by the caller to 8746// add HTTP headers to the request. 8747func (c *AppsServicesVersionsDeleteCall) Header() http.Header { 8748 if c.header_ == nil { 8749 c.header_ = make(http.Header) 8750 } 8751 return c.header_ 8752} 8753 8754func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { 8755 reqHeaders := make(http.Header) 8756 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8757 for k, v := range c.header_ { 8758 reqHeaders[k] = v 8759 } 8760 reqHeaders.Set("User-Agent", c.s.userAgent()) 8761 var body io.Reader = nil 8762 c.urlParams_.Set("alt", alt) 8763 c.urlParams_.Set("prettyPrint", "false") 8764 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 8765 urls += "?" + c.urlParams_.Encode() 8766 req, err := http.NewRequest("DELETE", urls, body) 8767 if err != nil { 8768 return nil, err 8769 } 8770 req.Header = reqHeaders 8771 googleapi.Expand(req.URL, map[string]string{ 8772 "appsId": c.appsId, 8773 "servicesId": c.servicesId, 8774 "versionsId": c.versionsId, 8775 }) 8776 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8777} 8778 8779// Do executes the "appengine.apps.services.versions.delete" call. 8780// Exactly one of *Operation or error will be non-nil. Any non-2xx 8781// status code is an error. Response headers are in either 8782// *Operation.ServerResponse.Header or (if a response was returned at 8783// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8784// to check whether the returned error was because 8785// http.StatusNotModified was returned. 8786func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8787 gensupport.SetOptions(c.urlParams_, opts...) 8788 res, err := c.doRequest("json") 8789 if res != nil && res.StatusCode == http.StatusNotModified { 8790 if res.Body != nil { 8791 res.Body.Close() 8792 } 8793 return nil, &googleapi.Error{ 8794 Code: res.StatusCode, 8795 Header: res.Header, 8796 } 8797 } 8798 if err != nil { 8799 return nil, err 8800 } 8801 defer googleapi.CloseBody(res) 8802 if err := googleapi.CheckResponse(res); err != nil { 8803 return nil, err 8804 } 8805 ret := &Operation{ 8806 ServerResponse: googleapi.ServerResponse{ 8807 Header: res.Header, 8808 HTTPStatusCode: res.StatusCode, 8809 }, 8810 } 8811 target := &ret 8812 if err := gensupport.DecodeResponse(target, res); err != nil { 8813 return nil, err 8814 } 8815 return ret, nil 8816 // { 8817 // "description": "Deletes an existing Version resource.", 8818 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 8819 // "httpMethod": "DELETE", 8820 // "id": "appengine.apps.services.versions.delete", 8821 // "parameterOrder": [ 8822 // "appsId", 8823 // "servicesId", 8824 // "versionsId" 8825 // ], 8826 // "parameters": { 8827 // "appsId": { 8828 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", 8829 // "location": "path", 8830 // "required": true, 8831 // "type": "string" 8832 // }, 8833 // "servicesId": { 8834 // "description": "Part of `name`. See documentation of `appsId`.", 8835 // "location": "path", 8836 // "required": true, 8837 // "type": "string" 8838 // }, 8839 // "versionsId": { 8840 // "description": "Part of `name`. See documentation of `appsId`.", 8841 // "location": "path", 8842 // "required": true, 8843 // "type": "string" 8844 // } 8845 // }, 8846 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 8847 // "response": { 8848 // "$ref": "Operation" 8849 // }, 8850 // "scopes": [ 8851 // "https://www.googleapis.com/auth/cloud-platform" 8852 // ] 8853 // } 8854 8855} 8856 8857// method id "appengine.apps.services.versions.get": 8858 8859type AppsServicesVersionsGetCall struct { 8860 s *APIService 8861 appsId string 8862 servicesId string 8863 versionsId string 8864 urlParams_ gensupport.URLParams 8865 ifNoneMatch_ string 8866 ctx_ context.Context 8867 header_ http.Header 8868} 8869 8870// Get: Gets the specified Version resource. By default, only a 8871// BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get 8872// the full resource. 8873func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall { 8874 c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8875 c.appsId = appsId 8876 c.servicesId = servicesId 8877 c.versionsId = versionsId 8878 return c 8879} 8880 8881// View sets the optional parameter "view": Controls the set of fields 8882// returned in the Get response. 8883// 8884// Possible values: 8885// "BASIC" 8886// "FULL" 8887func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall { 8888 c.urlParams_.Set("view", view) 8889 return c 8890} 8891 8892// Fields allows partial responses to be retrieved. See 8893// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8894// for more information. 8895func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall { 8896 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8897 return c 8898} 8899 8900// IfNoneMatch sets the optional parameter which makes the operation 8901// fail if the object's ETag matches the given value. This is useful for 8902// getting updates only after the object has changed since the last 8903// request. Use googleapi.IsNotModified to check whether the response 8904// error from Do is the result of In-None-Match. 8905func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall { 8906 c.ifNoneMatch_ = entityTag 8907 return c 8908} 8909 8910// Context sets the context to be used in this call's Do method. Any 8911// pending HTTP request will be aborted if the provided context is 8912// canceled. 8913func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall { 8914 c.ctx_ = ctx 8915 return c 8916} 8917 8918// Header returns an http.Header that can be modified by the caller to 8919// add HTTP headers to the request. 8920func (c *AppsServicesVersionsGetCall) Header() http.Header { 8921 if c.header_ == nil { 8922 c.header_ = make(http.Header) 8923 } 8924 return c.header_ 8925} 8926 8927func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) { 8928 reqHeaders := make(http.Header) 8929 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 8930 for k, v := range c.header_ { 8931 reqHeaders[k] = v 8932 } 8933 reqHeaders.Set("User-Agent", c.s.userAgent()) 8934 if c.ifNoneMatch_ != "" { 8935 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8936 } 8937 var body io.Reader = nil 8938 c.urlParams_.Set("alt", alt) 8939 c.urlParams_.Set("prettyPrint", "false") 8940 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 8941 urls += "?" + c.urlParams_.Encode() 8942 req, err := http.NewRequest("GET", urls, body) 8943 if err != nil { 8944 return nil, err 8945 } 8946 req.Header = reqHeaders 8947 googleapi.Expand(req.URL, map[string]string{ 8948 "appsId": c.appsId, 8949 "servicesId": c.servicesId, 8950 "versionsId": c.versionsId, 8951 }) 8952 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8953} 8954 8955// Do executes the "appengine.apps.services.versions.get" call. 8956// Exactly one of *Version or error will be non-nil. Any non-2xx status 8957// code is an error. Response headers are in either 8958// *Version.ServerResponse.Header or (if a response was returned at all) 8959// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8960// check whether the returned error was because http.StatusNotModified 8961// was returned. 8962func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) { 8963 gensupport.SetOptions(c.urlParams_, opts...) 8964 res, err := c.doRequest("json") 8965 if res != nil && res.StatusCode == http.StatusNotModified { 8966 if res.Body != nil { 8967 res.Body.Close() 8968 } 8969 return nil, &googleapi.Error{ 8970 Code: res.StatusCode, 8971 Header: res.Header, 8972 } 8973 } 8974 if err != nil { 8975 return nil, err 8976 } 8977 defer googleapi.CloseBody(res) 8978 if err := googleapi.CheckResponse(res); err != nil { 8979 return nil, err 8980 } 8981 ret := &Version{ 8982 ServerResponse: googleapi.ServerResponse{ 8983 Header: res.Header, 8984 HTTPStatusCode: res.StatusCode, 8985 }, 8986 } 8987 target := &ret 8988 if err := gensupport.DecodeResponse(target, res); err != nil { 8989 return nil, err 8990 } 8991 return ret, nil 8992 // { 8993 // "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.", 8994 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 8995 // "httpMethod": "GET", 8996 // "id": "appengine.apps.services.versions.get", 8997 // "parameterOrder": [ 8998 // "appsId", 8999 // "servicesId", 9000 // "versionsId" 9001 // ], 9002 // "parameters": { 9003 // "appsId": { 9004 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", 9005 // "location": "path", 9006 // "required": true, 9007 // "type": "string" 9008 // }, 9009 // "servicesId": { 9010 // "description": "Part of `name`. See documentation of `appsId`.", 9011 // "location": "path", 9012 // "required": true, 9013 // "type": "string" 9014 // }, 9015 // "versionsId": { 9016 // "description": "Part of `name`. See documentation of `appsId`.", 9017 // "location": "path", 9018 // "required": true, 9019 // "type": "string" 9020 // }, 9021 // "view": { 9022 // "description": "Controls the set of fields returned in the Get response.", 9023 // "enum": [ 9024 // "BASIC", 9025 // "FULL" 9026 // ], 9027 // "location": "query", 9028 // "type": "string" 9029 // } 9030 // }, 9031 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9032 // "response": { 9033 // "$ref": "Version" 9034 // }, 9035 // "scopes": [ 9036 // "https://www.googleapis.com/auth/appengine.admin", 9037 // "https://www.googleapis.com/auth/cloud-platform", 9038 // "https://www.googleapis.com/auth/cloud-platform.read-only" 9039 // ] 9040 // } 9041 9042} 9043 9044// method id "appengine.apps.services.versions.list": 9045 9046type AppsServicesVersionsListCall struct { 9047 s *APIService 9048 appsId string 9049 servicesId string 9050 urlParams_ gensupport.URLParams 9051 ifNoneMatch_ string 9052 ctx_ context.Context 9053 header_ http.Header 9054} 9055 9056// List: Lists the versions of a service. 9057func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall { 9058 c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9059 c.appsId = appsId 9060 c.servicesId = servicesId 9061 return c 9062} 9063 9064// PageSize sets the optional parameter "pageSize": Maximum results to 9065// return per page. 9066func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall { 9067 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9068 return c 9069} 9070 9071// PageToken sets the optional parameter "pageToken": Continuation token 9072// for fetching the next page of results. 9073func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall { 9074 c.urlParams_.Set("pageToken", pageToken) 9075 return c 9076} 9077 9078// View sets the optional parameter "view": Controls the set of fields 9079// returned in the List response. 9080// 9081// Possible values: 9082// "BASIC" 9083// "FULL" 9084func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall { 9085 c.urlParams_.Set("view", view) 9086 return c 9087} 9088 9089// Fields allows partial responses to be retrieved. See 9090// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9091// for more information. 9092func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall { 9093 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9094 return c 9095} 9096 9097// IfNoneMatch sets the optional parameter which makes the operation 9098// fail if the object's ETag matches the given value. This is useful for 9099// getting updates only after the object has changed since the last 9100// request. Use googleapi.IsNotModified to check whether the response 9101// error from Do is the result of In-None-Match. 9102func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall { 9103 c.ifNoneMatch_ = entityTag 9104 return c 9105} 9106 9107// Context sets the context to be used in this call's Do method. Any 9108// pending HTTP request will be aborted if the provided context is 9109// canceled. 9110func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall { 9111 c.ctx_ = ctx 9112 return c 9113} 9114 9115// Header returns an http.Header that can be modified by the caller to 9116// add HTTP headers to the request. 9117func (c *AppsServicesVersionsListCall) Header() http.Header { 9118 if c.header_ == nil { 9119 c.header_ = make(http.Header) 9120 } 9121 return c.header_ 9122} 9123 9124func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) { 9125 reqHeaders := make(http.Header) 9126 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9127 for k, v := range c.header_ { 9128 reqHeaders[k] = v 9129 } 9130 reqHeaders.Set("User-Agent", c.s.userAgent()) 9131 if c.ifNoneMatch_ != "" { 9132 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9133 } 9134 var body io.Reader = nil 9135 c.urlParams_.Set("alt", alt) 9136 c.urlParams_.Set("prettyPrint", "false") 9137 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions") 9138 urls += "?" + c.urlParams_.Encode() 9139 req, err := http.NewRequest("GET", urls, body) 9140 if err != nil { 9141 return nil, err 9142 } 9143 req.Header = reqHeaders 9144 googleapi.Expand(req.URL, map[string]string{ 9145 "appsId": c.appsId, 9146 "servicesId": c.servicesId, 9147 }) 9148 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9149} 9150 9151// Do executes the "appengine.apps.services.versions.list" call. 9152// Exactly one of *ListVersionsResponse or error will be non-nil. Any 9153// non-2xx status code is an error. Response headers are in either 9154// *ListVersionsResponse.ServerResponse.Header or (if a response was 9155// returned at all) in error.(*googleapi.Error).Header. Use 9156// googleapi.IsNotModified to check whether the returned error was 9157// because http.StatusNotModified was returned. 9158func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) { 9159 gensupport.SetOptions(c.urlParams_, opts...) 9160 res, err := c.doRequest("json") 9161 if res != nil && res.StatusCode == http.StatusNotModified { 9162 if res.Body != nil { 9163 res.Body.Close() 9164 } 9165 return nil, &googleapi.Error{ 9166 Code: res.StatusCode, 9167 Header: res.Header, 9168 } 9169 } 9170 if err != nil { 9171 return nil, err 9172 } 9173 defer googleapi.CloseBody(res) 9174 if err := googleapi.CheckResponse(res); err != nil { 9175 return nil, err 9176 } 9177 ret := &ListVersionsResponse{ 9178 ServerResponse: googleapi.ServerResponse{ 9179 Header: res.Header, 9180 HTTPStatusCode: res.StatusCode, 9181 }, 9182 } 9183 target := &ret 9184 if err := gensupport.DecodeResponse(target, res); err != nil { 9185 return nil, err 9186 } 9187 return ret, nil 9188 // { 9189 // "description": "Lists the versions of a service.", 9190 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", 9191 // "httpMethod": "GET", 9192 // "id": "appengine.apps.services.versions.list", 9193 // "parameterOrder": [ 9194 // "appsId", 9195 // "servicesId" 9196 // ], 9197 // "parameters": { 9198 // "appsId": { 9199 // "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", 9200 // "location": "path", 9201 // "required": true, 9202 // "type": "string" 9203 // }, 9204 // "pageSize": { 9205 // "description": "Maximum results to return per page.", 9206 // "format": "int32", 9207 // "location": "query", 9208 // "type": "integer" 9209 // }, 9210 // "pageToken": { 9211 // "description": "Continuation token for fetching the next page of results.", 9212 // "location": "query", 9213 // "type": "string" 9214 // }, 9215 // "servicesId": { 9216 // "description": "Part of `parent`. See documentation of `appsId`.", 9217 // "location": "path", 9218 // "required": true, 9219 // "type": "string" 9220 // }, 9221 // "view": { 9222 // "description": "Controls the set of fields returned in the List response.", 9223 // "enum": [ 9224 // "BASIC", 9225 // "FULL" 9226 // ], 9227 // "location": "query", 9228 // "type": "string" 9229 // } 9230 // }, 9231 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions", 9232 // "response": { 9233 // "$ref": "ListVersionsResponse" 9234 // }, 9235 // "scopes": [ 9236 // "https://www.googleapis.com/auth/appengine.admin", 9237 // "https://www.googleapis.com/auth/cloud-platform", 9238 // "https://www.googleapis.com/auth/cloud-platform.read-only" 9239 // ] 9240 // } 9241 9242} 9243 9244// Pages invokes f for each page of results. 9245// A non-nil error returned from f will halt the iteration. 9246// The provided context supersedes any context provided to the Context method. 9247func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error { 9248 c.ctx_ = ctx 9249 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9250 for { 9251 x, err := c.Do() 9252 if err != nil { 9253 return err 9254 } 9255 if err := f(x); err != nil { 9256 return err 9257 } 9258 if x.NextPageToken == "" { 9259 return nil 9260 } 9261 c.PageToken(x.NextPageToken) 9262 } 9263} 9264 9265// method id "appengine.apps.services.versions.patch": 9266 9267type AppsServicesVersionsPatchCall struct { 9268 s *APIService 9269 appsId string 9270 servicesId string 9271 versionsId string 9272 version *Version 9273 urlParams_ gensupport.URLParams 9274 ctx_ context.Context 9275 header_ http.Header 9276} 9277 9278// Patch: Updates the specified Version resource. You can specify the 9279// following fields depending on the App Engine environment and type of 9280// scaling that the version resource uses:Standard 9281// environment 9282// instance_class 9283// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9284// ta/apps.services.versions#Version.FIELDS.instance_class)automatic 9285// scaling in the standard 9286// environment: 9287// automatic_scaling.min_idle_instances 9288// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9289// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9290// automatic_ 9291// scaling.max_idle_instances 9292// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9293// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9294// automaticS 9295// caling.standard_scheduler_settings.max_instances 9296// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9297// ta/apps.services.versions#StandardSchedulerSettings) 9298// automaticScaling. 9299// standard_scheduler_settings.min_instances 9300// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9301// ta/apps.services.versions#StandardSchedulerSettings) 9302// automaticScaling. 9303// standard_scheduler_settings.target_cpu_utilization 9304// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9305// ta/apps.services.versions#StandardSchedulerSettings) 9306// automaticScaling. 9307// standard_scheduler_settings.target_throughput_utilization 9308// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9309// ta/apps.services.versions#StandardSchedulerSettings)basic scaling or 9310// manual scaling in the standard environment: 9311// serving_status 9312// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9313// ta/apps.services.versions#Version.FIELDS.serving_status)Flexible 9314// environment 9315// serving_status 9316// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9317// ta/apps.services.versions#Version.FIELDS.serving_status)automatic 9318// scaling in the flexible 9319// environment: 9320// automatic_scaling.min_total_instances 9321// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9322// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9323// automatic_ 9324// scaling.max_total_instances 9325// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9326// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9327// automatic_ 9328// scaling.cool_down_period_sec 9329// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9330// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9331// automatic_ 9332// scaling.cpu_utilization.target_utilization 9333// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9334// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9335func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall { 9336 c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9337 c.appsId = appsId 9338 c.servicesId = servicesId 9339 c.versionsId = versionsId 9340 c.version = version 9341 return c 9342} 9343 9344// UpdateMask sets the optional parameter "updateMask": Standard field 9345// mask for the set of fields to be updated. 9346func (c *AppsServicesVersionsPatchCall) UpdateMask(updateMask string) *AppsServicesVersionsPatchCall { 9347 c.urlParams_.Set("updateMask", updateMask) 9348 return c 9349} 9350 9351// Fields allows partial responses to be retrieved. See 9352// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9353// for more information. 9354func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall { 9355 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9356 return c 9357} 9358 9359// Context sets the context to be used in this call's Do method. Any 9360// pending HTTP request will be aborted if the provided context is 9361// canceled. 9362func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall { 9363 c.ctx_ = ctx 9364 return c 9365} 9366 9367// Header returns an http.Header that can be modified by the caller to 9368// add HTTP headers to the request. 9369func (c *AppsServicesVersionsPatchCall) Header() http.Header { 9370 if c.header_ == nil { 9371 c.header_ = make(http.Header) 9372 } 9373 return c.header_ 9374} 9375 9376func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) { 9377 reqHeaders := make(http.Header) 9378 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9379 for k, v := range c.header_ { 9380 reqHeaders[k] = v 9381 } 9382 reqHeaders.Set("User-Agent", c.s.userAgent()) 9383 var body io.Reader = nil 9384 body, err := googleapi.WithoutDataWrapper.JSONReader(c.version) 9385 if err != nil { 9386 return nil, err 9387 } 9388 reqHeaders.Set("Content-Type", "application/json") 9389 c.urlParams_.Set("alt", alt) 9390 c.urlParams_.Set("prettyPrint", "false") 9391 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 9392 urls += "?" + c.urlParams_.Encode() 9393 req, err := http.NewRequest("PATCH", urls, body) 9394 if err != nil { 9395 return nil, err 9396 } 9397 req.Header = reqHeaders 9398 googleapi.Expand(req.URL, map[string]string{ 9399 "appsId": c.appsId, 9400 "servicesId": c.servicesId, 9401 "versionsId": c.versionsId, 9402 }) 9403 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9404} 9405 9406// Do executes the "appengine.apps.services.versions.patch" call. 9407// Exactly one of *Operation or error will be non-nil. Any non-2xx 9408// status code is an error. Response headers are in either 9409// *Operation.ServerResponse.Header or (if a response was returned at 9410// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9411// to check whether the returned error was because 9412// http.StatusNotModified was returned. 9413func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9414 gensupport.SetOptions(c.urlParams_, opts...) 9415 res, err := c.doRequest("json") 9416 if res != nil && res.StatusCode == http.StatusNotModified { 9417 if res.Body != nil { 9418 res.Body.Close() 9419 } 9420 return nil, &googleapi.Error{ 9421 Code: res.StatusCode, 9422 Header: res.Header, 9423 } 9424 } 9425 if err != nil { 9426 return nil, err 9427 } 9428 defer googleapi.CloseBody(res) 9429 if err := googleapi.CheckResponse(res); err != nil { 9430 return nil, err 9431 } 9432 ret := &Operation{ 9433 ServerResponse: googleapi.ServerResponse{ 9434 Header: res.Header, 9435 HTTPStatusCode: res.StatusCode, 9436 }, 9437 } 9438 target := &ret 9439 if err := gensupport.DecodeResponse(target, res); err != nil { 9440 return nil, err 9441 } 9442 return ret, nil 9443 // { 9444 // "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:Standard environment\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class)automatic scaling in the standard environment:\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomaticScaling.standard_scheduler_settings.max_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.min_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_cpu_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)\nautomaticScaling.standard_scheduler_settings.target_throughput_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#StandardSchedulerSettings)basic scaling or manual scaling in the standard environment:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status)Flexible environment\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status)automatic scaling in the flexible environment:\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling)", 9445 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9446 // "httpMethod": "PATCH", 9447 // "id": "appengine.apps.services.versions.patch", 9448 // "parameterOrder": [ 9449 // "appsId", 9450 // "servicesId", 9451 // "versionsId" 9452 // ], 9453 // "parameters": { 9454 // "appsId": { 9455 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", 9456 // "location": "path", 9457 // "required": true, 9458 // "type": "string" 9459 // }, 9460 // "servicesId": { 9461 // "description": "Part of `name`. See documentation of `appsId`.", 9462 // "location": "path", 9463 // "required": true, 9464 // "type": "string" 9465 // }, 9466 // "updateMask": { 9467 // "description": "Standard field mask for the set of fields to be updated.", 9468 // "format": "google-fieldmask", 9469 // "location": "query", 9470 // "type": "string" 9471 // }, 9472 // "versionsId": { 9473 // "description": "Part of `name`. See documentation of `appsId`.", 9474 // "location": "path", 9475 // "required": true, 9476 // "type": "string" 9477 // } 9478 // }, 9479 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9480 // "request": { 9481 // "$ref": "Version" 9482 // }, 9483 // "response": { 9484 // "$ref": "Operation" 9485 // }, 9486 // "scopes": [ 9487 // "https://www.googleapis.com/auth/cloud-platform" 9488 // ] 9489 // } 9490 9491} 9492 9493// method id "appengine.apps.services.versions.instances.debug": 9494 9495type AppsServicesVersionsInstancesDebugCall struct { 9496 s *APIService 9497 appsId string 9498 servicesId string 9499 versionsId string 9500 instancesId string 9501 debuginstancerequest *DebugInstanceRequest 9502 urlParams_ gensupport.URLParams 9503 ctx_ context.Context 9504 header_ http.Header 9505} 9506 9507// Debug: Enables debugging on a VM instance. This allows you to use the 9508// SSH command to connect to the virtual machine where the instance 9509// lives. While in "debug mode", the instance continues to serve live 9510// traffic. You should delete the instance when you are done debugging 9511// and then allow the system to take over and determine if another 9512// instance should be started.Only applicable for instances in App 9513// Engine flexible environment. 9514func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall { 9515 c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9516 c.appsId = appsId 9517 c.servicesId = servicesId 9518 c.versionsId = versionsId 9519 c.instancesId = instancesId 9520 c.debuginstancerequest = debuginstancerequest 9521 return c 9522} 9523 9524// Fields allows partial responses to be retrieved. See 9525// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9526// for more information. 9527func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall { 9528 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9529 return c 9530} 9531 9532// Context sets the context to be used in this call's Do method. Any 9533// pending HTTP request will be aborted if the provided context is 9534// canceled. 9535func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall { 9536 c.ctx_ = ctx 9537 return c 9538} 9539 9540// Header returns an http.Header that can be modified by the caller to 9541// add HTTP headers to the request. 9542func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header { 9543 if c.header_ == nil { 9544 c.header_ = make(http.Header) 9545 } 9546 return c.header_ 9547} 9548 9549func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) { 9550 reqHeaders := make(http.Header) 9551 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9552 for k, v := range c.header_ { 9553 reqHeaders[k] = v 9554 } 9555 reqHeaders.Set("User-Agent", c.s.userAgent()) 9556 var body io.Reader = nil 9557 body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest) 9558 if err != nil { 9559 return nil, err 9560 } 9561 reqHeaders.Set("Content-Type", "application/json") 9562 c.urlParams_.Set("alt", alt) 9563 c.urlParams_.Set("prettyPrint", "false") 9564 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug") 9565 urls += "?" + c.urlParams_.Encode() 9566 req, err := http.NewRequest("POST", urls, body) 9567 if err != nil { 9568 return nil, err 9569 } 9570 req.Header = reqHeaders 9571 googleapi.Expand(req.URL, map[string]string{ 9572 "appsId": c.appsId, 9573 "servicesId": c.servicesId, 9574 "versionsId": c.versionsId, 9575 "instancesId": c.instancesId, 9576 }) 9577 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9578} 9579 9580// Do executes the "appengine.apps.services.versions.instances.debug" call. 9581// Exactly one of *Operation or error will be non-nil. Any non-2xx 9582// status code is an error. Response headers are in either 9583// *Operation.ServerResponse.Header or (if a response was returned at 9584// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9585// to check whether the returned error was because 9586// http.StatusNotModified was returned. 9587func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9588 gensupport.SetOptions(c.urlParams_, opts...) 9589 res, err := c.doRequest("json") 9590 if res != nil && res.StatusCode == http.StatusNotModified { 9591 if res.Body != nil { 9592 res.Body.Close() 9593 } 9594 return nil, &googleapi.Error{ 9595 Code: res.StatusCode, 9596 Header: res.Header, 9597 } 9598 } 9599 if err != nil { 9600 return nil, err 9601 } 9602 defer googleapi.CloseBody(res) 9603 if err := googleapi.CheckResponse(res); err != nil { 9604 return nil, err 9605 } 9606 ret := &Operation{ 9607 ServerResponse: googleapi.ServerResponse{ 9608 Header: res.Header, 9609 HTTPStatusCode: res.StatusCode, 9610 }, 9611 } 9612 target := &ret 9613 if err := gensupport.DecodeResponse(target, res); err != nil { 9614 return nil, err 9615 } 9616 return ret, nil 9617 // { 9618 // "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.", 9619 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", 9620 // "httpMethod": "POST", 9621 // "id": "appengine.apps.services.versions.instances.debug", 9622 // "parameterOrder": [ 9623 // "appsId", 9624 // "servicesId", 9625 // "versionsId", 9626 // "instancesId" 9627 // ], 9628 // "parameters": { 9629 // "appsId": { 9630 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 9631 // "location": "path", 9632 // "required": true, 9633 // "type": "string" 9634 // }, 9635 // "instancesId": { 9636 // "description": "Part of `name`. See documentation of `appsId`.", 9637 // "location": "path", 9638 // "required": true, 9639 // "type": "string" 9640 // }, 9641 // "servicesId": { 9642 // "description": "Part of `name`. See documentation of `appsId`.", 9643 // "location": "path", 9644 // "required": true, 9645 // "type": "string" 9646 // }, 9647 // "versionsId": { 9648 // "description": "Part of `name`. See documentation of `appsId`.", 9649 // "location": "path", 9650 // "required": true, 9651 // "type": "string" 9652 // } 9653 // }, 9654 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", 9655 // "request": { 9656 // "$ref": "DebugInstanceRequest" 9657 // }, 9658 // "response": { 9659 // "$ref": "Operation" 9660 // }, 9661 // "scopes": [ 9662 // "https://www.googleapis.com/auth/cloud-platform" 9663 // ] 9664 // } 9665 9666} 9667 9668// method id "appengine.apps.services.versions.instances.delete": 9669 9670type AppsServicesVersionsInstancesDeleteCall struct { 9671 s *APIService 9672 appsId string 9673 servicesId string 9674 versionsId string 9675 instancesId string 9676 urlParams_ gensupport.URLParams 9677 ctx_ context.Context 9678 header_ http.Header 9679} 9680 9681// Delete: Stops a running instance.The instance will be automatically 9682// recreated based on the scaling settings of the version. If you want 9683// to stop all instances without re-creation (e.g. to avoid getting 9684// billed) use the apps.services.versions.patch 9685// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9686// ta/apps.services.versions/patch) method and change the serving status 9687// of the version to STOPPED. 9688func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall { 9689 c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9690 c.appsId = appsId 9691 c.servicesId = servicesId 9692 c.versionsId = versionsId 9693 c.instancesId = instancesId 9694 return c 9695} 9696 9697// Fields allows partial responses to be retrieved. See 9698// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9699// for more information. 9700func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall { 9701 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9702 return c 9703} 9704 9705// Context sets the context to be used in this call's Do method. Any 9706// pending HTTP request will be aborted if the provided context is 9707// canceled. 9708func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall { 9709 c.ctx_ = ctx 9710 return c 9711} 9712 9713// Header returns an http.Header that can be modified by the caller to 9714// add HTTP headers to the request. 9715func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header { 9716 if c.header_ == nil { 9717 c.header_ = make(http.Header) 9718 } 9719 return c.header_ 9720} 9721 9722func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 9723 reqHeaders := make(http.Header) 9724 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9725 for k, v := range c.header_ { 9726 reqHeaders[k] = v 9727 } 9728 reqHeaders.Set("User-Agent", c.s.userAgent()) 9729 var body io.Reader = nil 9730 c.urlParams_.Set("alt", alt) 9731 c.urlParams_.Set("prettyPrint", "false") 9732 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") 9733 urls += "?" + c.urlParams_.Encode() 9734 req, err := http.NewRequest("DELETE", urls, body) 9735 if err != nil { 9736 return nil, err 9737 } 9738 req.Header = reqHeaders 9739 googleapi.Expand(req.URL, map[string]string{ 9740 "appsId": c.appsId, 9741 "servicesId": c.servicesId, 9742 "versionsId": c.versionsId, 9743 "instancesId": c.instancesId, 9744 }) 9745 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9746} 9747 9748// Do executes the "appengine.apps.services.versions.instances.delete" call. 9749// Exactly one of *Operation or error will be non-nil. Any non-2xx 9750// status code is an error. Response headers are in either 9751// *Operation.ServerResponse.Header or (if a response was returned at 9752// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9753// to check whether the returned error was because 9754// http.StatusNotModified was returned. 9755func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9756 gensupport.SetOptions(c.urlParams_, opts...) 9757 res, err := c.doRequest("json") 9758 if res != nil && res.StatusCode == http.StatusNotModified { 9759 if res.Body != nil { 9760 res.Body.Close() 9761 } 9762 return nil, &googleapi.Error{ 9763 Code: res.StatusCode, 9764 Header: res.Header, 9765 } 9766 } 9767 if err != nil { 9768 return nil, err 9769 } 9770 defer googleapi.CloseBody(res) 9771 if err := googleapi.CheckResponse(res); err != nil { 9772 return nil, err 9773 } 9774 ret := &Operation{ 9775 ServerResponse: googleapi.ServerResponse{ 9776 Header: res.Header, 9777 HTTPStatusCode: res.StatusCode, 9778 }, 9779 } 9780 target := &ret 9781 if err := gensupport.DecodeResponse(target, res); err != nil { 9782 return nil, err 9783 } 9784 return ret, nil 9785 // { 9786 // "description": "Stops a running instance.The instance will be automatically recreated based on the scaling settings of the version. If you want to stop all instances without re-creation (e.g. to avoid getting billed) use the apps.services.versions.patch (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions/patch) method and change the serving status of the version to STOPPED.", 9787 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9788 // "httpMethod": "DELETE", 9789 // "id": "appengine.apps.services.versions.instances.delete", 9790 // "parameterOrder": [ 9791 // "appsId", 9792 // "servicesId", 9793 // "versionsId", 9794 // "instancesId" 9795 // ], 9796 // "parameters": { 9797 // "appsId": { 9798 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 9799 // "location": "path", 9800 // "required": true, 9801 // "type": "string" 9802 // }, 9803 // "instancesId": { 9804 // "description": "Part of `name`. See documentation of `appsId`.", 9805 // "location": "path", 9806 // "required": true, 9807 // "type": "string" 9808 // }, 9809 // "servicesId": { 9810 // "description": "Part of `name`. See documentation of `appsId`.", 9811 // "location": "path", 9812 // "required": true, 9813 // "type": "string" 9814 // }, 9815 // "versionsId": { 9816 // "description": "Part of `name`. See documentation of `appsId`.", 9817 // "location": "path", 9818 // "required": true, 9819 // "type": "string" 9820 // } 9821 // }, 9822 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9823 // "response": { 9824 // "$ref": "Operation" 9825 // }, 9826 // "scopes": [ 9827 // "https://www.googleapis.com/auth/cloud-platform" 9828 // ] 9829 // } 9830 9831} 9832 9833// method id "appengine.apps.services.versions.instances.get": 9834 9835type AppsServicesVersionsInstancesGetCall struct { 9836 s *APIService 9837 appsId string 9838 servicesId string 9839 versionsId string 9840 instancesId string 9841 urlParams_ gensupport.URLParams 9842 ifNoneMatch_ string 9843 ctx_ context.Context 9844 header_ http.Header 9845} 9846 9847// Get: Gets instance information. 9848func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall { 9849 c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9850 c.appsId = appsId 9851 c.servicesId = servicesId 9852 c.versionsId = versionsId 9853 c.instancesId = instancesId 9854 return c 9855} 9856 9857// Fields allows partial responses to be retrieved. See 9858// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9859// for more information. 9860func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall { 9861 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9862 return c 9863} 9864 9865// IfNoneMatch sets the optional parameter which makes the operation 9866// fail if the object's ETag matches the given value. This is useful for 9867// getting updates only after the object has changed since the last 9868// request. Use googleapi.IsNotModified to check whether the response 9869// error from Do is the result of In-None-Match. 9870func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall { 9871 c.ifNoneMatch_ = entityTag 9872 return c 9873} 9874 9875// Context sets the context to be used in this call's Do method. Any 9876// pending HTTP request will be aborted if the provided context is 9877// canceled. 9878func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall { 9879 c.ctx_ = ctx 9880 return c 9881} 9882 9883// Header returns an http.Header that can be modified by the caller to 9884// add HTTP headers to the request. 9885func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header { 9886 if c.header_ == nil { 9887 c.header_ = make(http.Header) 9888 } 9889 return c.header_ 9890} 9891 9892func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) { 9893 reqHeaders := make(http.Header) 9894 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9895 for k, v := range c.header_ { 9896 reqHeaders[k] = v 9897 } 9898 reqHeaders.Set("User-Agent", c.s.userAgent()) 9899 if c.ifNoneMatch_ != "" { 9900 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9901 } 9902 var body io.Reader = nil 9903 c.urlParams_.Set("alt", alt) 9904 c.urlParams_.Set("prettyPrint", "false") 9905 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") 9906 urls += "?" + c.urlParams_.Encode() 9907 req, err := http.NewRequest("GET", urls, body) 9908 if err != nil { 9909 return nil, err 9910 } 9911 req.Header = reqHeaders 9912 googleapi.Expand(req.URL, map[string]string{ 9913 "appsId": c.appsId, 9914 "servicesId": c.servicesId, 9915 "versionsId": c.versionsId, 9916 "instancesId": c.instancesId, 9917 }) 9918 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9919} 9920 9921// Do executes the "appengine.apps.services.versions.instances.get" call. 9922// Exactly one of *Instance or error will be non-nil. Any non-2xx status 9923// code is an error. Response headers are in either 9924// *Instance.ServerResponse.Header or (if a response was returned at 9925// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9926// to check whether the returned error was because 9927// http.StatusNotModified was returned. 9928func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { 9929 gensupport.SetOptions(c.urlParams_, opts...) 9930 res, err := c.doRequest("json") 9931 if res != nil && res.StatusCode == http.StatusNotModified { 9932 if res.Body != nil { 9933 res.Body.Close() 9934 } 9935 return nil, &googleapi.Error{ 9936 Code: res.StatusCode, 9937 Header: res.Header, 9938 } 9939 } 9940 if err != nil { 9941 return nil, err 9942 } 9943 defer googleapi.CloseBody(res) 9944 if err := googleapi.CheckResponse(res); err != nil { 9945 return nil, err 9946 } 9947 ret := &Instance{ 9948 ServerResponse: googleapi.ServerResponse{ 9949 Header: res.Header, 9950 HTTPStatusCode: res.StatusCode, 9951 }, 9952 } 9953 target := &ret 9954 if err := gensupport.DecodeResponse(target, res); err != nil { 9955 return nil, err 9956 } 9957 return ret, nil 9958 // { 9959 // "description": "Gets instance information.", 9960 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9961 // "httpMethod": "GET", 9962 // "id": "appengine.apps.services.versions.instances.get", 9963 // "parameterOrder": [ 9964 // "appsId", 9965 // "servicesId", 9966 // "versionsId", 9967 // "instancesId" 9968 // ], 9969 // "parameters": { 9970 // "appsId": { 9971 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 9972 // "location": "path", 9973 // "required": true, 9974 // "type": "string" 9975 // }, 9976 // "instancesId": { 9977 // "description": "Part of `name`. See documentation of `appsId`.", 9978 // "location": "path", 9979 // "required": true, 9980 // "type": "string" 9981 // }, 9982 // "servicesId": { 9983 // "description": "Part of `name`. See documentation of `appsId`.", 9984 // "location": "path", 9985 // "required": true, 9986 // "type": "string" 9987 // }, 9988 // "versionsId": { 9989 // "description": "Part of `name`. See documentation of `appsId`.", 9990 // "location": "path", 9991 // "required": true, 9992 // "type": "string" 9993 // } 9994 // }, 9995 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9996 // "response": { 9997 // "$ref": "Instance" 9998 // }, 9999 // "scopes": [ 10000 // "https://www.googleapis.com/auth/appengine.admin", 10001 // "https://www.googleapis.com/auth/cloud-platform", 10002 // "https://www.googleapis.com/auth/cloud-platform.read-only" 10003 // ] 10004 // } 10005 10006} 10007 10008// method id "appengine.apps.services.versions.instances.list": 10009 10010type AppsServicesVersionsInstancesListCall struct { 10011 s *APIService 10012 appsId string 10013 servicesId string 10014 versionsId string 10015 urlParams_ gensupport.URLParams 10016 ifNoneMatch_ string 10017 ctx_ context.Context 10018 header_ http.Header 10019} 10020 10021// List: Lists the instances of a version.Tip: To aggregate details 10022// about instances over time, see the Stackdriver Monitoring API 10023// (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeS 10024// eries/list). 10025func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall { 10026 c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10027 c.appsId = appsId 10028 c.servicesId = servicesId 10029 c.versionsId = versionsId 10030 return c 10031} 10032 10033// PageSize sets the optional parameter "pageSize": Maximum results to 10034// return per page. 10035func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall { 10036 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10037 return c 10038} 10039 10040// PageToken sets the optional parameter "pageToken": Continuation token 10041// for fetching the next page of results. 10042func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall { 10043 c.urlParams_.Set("pageToken", pageToken) 10044 return c 10045} 10046 10047// Fields allows partial responses to be retrieved. See 10048// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10049// for more information. 10050func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall { 10051 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10052 return c 10053} 10054 10055// IfNoneMatch sets the optional parameter which makes the operation 10056// fail if the object's ETag matches the given value. This is useful for 10057// getting updates only after the object has changed since the last 10058// request. Use googleapi.IsNotModified to check whether the response 10059// error from Do is the result of In-None-Match. 10060func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall { 10061 c.ifNoneMatch_ = entityTag 10062 return c 10063} 10064 10065// Context sets the context to be used in this call's Do method. Any 10066// pending HTTP request will be aborted if the provided context is 10067// canceled. 10068func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall { 10069 c.ctx_ = ctx 10070 return c 10071} 10072 10073// Header returns an http.Header that can be modified by the caller to 10074// add HTTP headers to the request. 10075func (c *AppsServicesVersionsInstancesListCall) Header() http.Header { 10076 if c.header_ == nil { 10077 c.header_ = make(http.Header) 10078 } 10079 return c.header_ 10080} 10081 10082func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) { 10083 reqHeaders := make(http.Header) 10084 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10085 for k, v := range c.header_ { 10086 reqHeaders[k] = v 10087 } 10088 reqHeaders.Set("User-Agent", c.s.userAgent()) 10089 if c.ifNoneMatch_ != "" { 10090 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10091 } 10092 var body io.Reader = nil 10093 c.urlParams_.Set("alt", alt) 10094 c.urlParams_.Set("prettyPrint", "false") 10095 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances") 10096 urls += "?" + c.urlParams_.Encode() 10097 req, err := http.NewRequest("GET", urls, body) 10098 if err != nil { 10099 return nil, err 10100 } 10101 req.Header = reqHeaders 10102 googleapi.Expand(req.URL, map[string]string{ 10103 "appsId": c.appsId, 10104 "servicesId": c.servicesId, 10105 "versionsId": c.versionsId, 10106 }) 10107 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10108} 10109 10110// Do executes the "appengine.apps.services.versions.instances.list" call. 10111// Exactly one of *ListInstancesResponse or error will be non-nil. Any 10112// non-2xx status code is an error. Response headers are in either 10113// *ListInstancesResponse.ServerResponse.Header or (if a response was 10114// returned at all) in error.(*googleapi.Error).Header. Use 10115// googleapi.IsNotModified to check whether the returned error was 10116// because http.StatusNotModified was returned. 10117func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) { 10118 gensupport.SetOptions(c.urlParams_, opts...) 10119 res, err := c.doRequest("json") 10120 if res != nil && res.StatusCode == http.StatusNotModified { 10121 if res.Body != nil { 10122 res.Body.Close() 10123 } 10124 return nil, &googleapi.Error{ 10125 Code: res.StatusCode, 10126 Header: res.Header, 10127 } 10128 } 10129 if err != nil { 10130 return nil, err 10131 } 10132 defer googleapi.CloseBody(res) 10133 if err := googleapi.CheckResponse(res); err != nil { 10134 return nil, err 10135 } 10136 ret := &ListInstancesResponse{ 10137 ServerResponse: googleapi.ServerResponse{ 10138 Header: res.Header, 10139 HTTPStatusCode: res.StatusCode, 10140 }, 10141 } 10142 target := &ret 10143 if err := gensupport.DecodeResponse(target, res); err != nil { 10144 return nil, err 10145 } 10146 return ret, nil 10147 // { 10148 // "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).", 10149 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", 10150 // "httpMethod": "GET", 10151 // "id": "appengine.apps.services.versions.instances.list", 10152 // "parameterOrder": [ 10153 // "appsId", 10154 // "servicesId", 10155 // "versionsId" 10156 // ], 10157 // "parameters": { 10158 // "appsId": { 10159 // "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", 10160 // "location": "path", 10161 // "required": true, 10162 // "type": "string" 10163 // }, 10164 // "pageSize": { 10165 // "description": "Maximum results to return per page.", 10166 // "format": "int32", 10167 // "location": "query", 10168 // "type": "integer" 10169 // }, 10170 // "pageToken": { 10171 // "description": "Continuation token for fetching the next page of results.", 10172 // "location": "query", 10173 // "type": "string" 10174 // }, 10175 // "servicesId": { 10176 // "description": "Part of `parent`. See documentation of `appsId`.", 10177 // "location": "path", 10178 // "required": true, 10179 // "type": "string" 10180 // }, 10181 // "versionsId": { 10182 // "description": "Part of `parent`. See documentation of `appsId`.", 10183 // "location": "path", 10184 // "required": true, 10185 // "type": "string" 10186 // } 10187 // }, 10188 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", 10189 // "response": { 10190 // "$ref": "ListInstancesResponse" 10191 // }, 10192 // "scopes": [ 10193 // "https://www.googleapis.com/auth/appengine.admin", 10194 // "https://www.googleapis.com/auth/cloud-platform", 10195 // "https://www.googleapis.com/auth/cloud-platform.read-only" 10196 // ] 10197 // } 10198 10199} 10200 10201// Pages invokes f for each page of results. 10202// A non-nil error returned from f will halt the iteration. 10203// The provided context supersedes any context provided to the Context method. 10204func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error { 10205 c.ctx_ = ctx 10206 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10207 for { 10208 x, err := c.Do() 10209 if err != nil { 10210 return err 10211 } 10212 if err := f(x); err != nil { 10213 return err 10214 } 10215 if x.NextPageToken == "" { 10216 return nil 10217 } 10218 c.PageToken(x.NextPageToken) 10219 } 10220} 10221