1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package appengine provides access to the App Engine Admin API. 8// 9// For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/appengine/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 internaloption "google.golang.org/api/option/internaloption" 60 htransport "google.golang.org/api/transport/http" 61) 62 63// Always reference these packages, just in case the auto-generated code 64// below doesn't. 65var _ = bytes.NewBuffer 66var _ = strconv.Itoa 67var _ = fmt.Sprintf 68var _ = json.NewDecoder 69var _ = io.Copy 70var _ = url.Parse 71var _ = gensupport.MarshalJSON 72var _ = googleapi.Version 73var _ = errors.New 74var _ = strings.Replace 75var _ = context.Canceled 76var _ = internaloption.WithDefaultEndpoint 77 78const apiId = "appengine:v1beta" 79const apiName = "appengine" 80const apiVersion = "v1beta" 81const basePath = "https://appengine.googleapis.com/" 82 83// OAuth2 scopes used by this API. 84const ( 85 // View and manage your applications deployed on Google App Engine 86 AppengineAdminScope = "https://www.googleapis.com/auth/appengine.admin" 87 88 // View and manage your data across Google Cloud Platform services 89 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 90 91 // View your data across Google Cloud Platform services 92 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" 93) 94 95// NewService creates a new APIService. 96func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 97 scopesOption := option.WithScopes( 98 "https://www.googleapis.com/auth/appengine.admin", 99 "https://www.googleapis.com/auth/cloud-platform", 100 "https://www.googleapis.com/auth/cloud-platform.read-only", 101 ) 102 // NOTE: prepend, so we don't override user-specified scopes. 103 opts = append([]option.ClientOption{scopesOption}, opts...) 104 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 105 client, endpoint, err := htransport.NewClient(ctx, opts...) 106 if err != nil { 107 return nil, err 108 } 109 s, err := New(client) 110 if err != nil { 111 return nil, err 112 } 113 if endpoint != "" { 114 s.BasePath = endpoint 115 } 116 return s, nil 117} 118 119// New creates a new APIService. It uses the provided http.Client for requests. 120// 121// Deprecated: please use NewService instead. 122// To provide a custom HTTP client, use option.WithHTTPClient. 123// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 124func New(client *http.Client) (*APIService, error) { 125 if client == nil { 126 return nil, errors.New("client is nil") 127 } 128 s := &APIService{client: client, BasePath: basePath} 129 s.Apps = NewAppsService(s) 130 return s, nil 131} 132 133type APIService struct { 134 client *http.Client 135 BasePath string // API endpoint base URL 136 UserAgent string // optional additional User-Agent fragment 137 138 Apps *AppsService 139} 140 141func (s *APIService) userAgent() string { 142 if s.UserAgent == "" { 143 return googleapi.UserAgent 144 } 145 return googleapi.UserAgent + " " + s.UserAgent 146} 147 148func NewAppsService(s *APIService) *AppsService { 149 rs := &AppsService{s: s} 150 rs.AuthorizedCertificates = NewAppsAuthorizedCertificatesService(s) 151 rs.AuthorizedDomains = NewAppsAuthorizedDomainsService(s) 152 rs.DomainMappings = NewAppsDomainMappingsService(s) 153 rs.Firewall = NewAppsFirewallService(s) 154 rs.Locations = NewAppsLocationsService(s) 155 rs.Operations = NewAppsOperationsService(s) 156 rs.Services = NewAppsServicesService(s) 157 return rs 158} 159 160type AppsService struct { 161 s *APIService 162 163 AuthorizedCertificates *AppsAuthorizedCertificatesService 164 165 AuthorizedDomains *AppsAuthorizedDomainsService 166 167 DomainMappings *AppsDomainMappingsService 168 169 Firewall *AppsFirewallService 170 171 Locations *AppsLocationsService 172 173 Operations *AppsOperationsService 174 175 Services *AppsServicesService 176} 177 178func NewAppsAuthorizedCertificatesService(s *APIService) *AppsAuthorizedCertificatesService { 179 rs := &AppsAuthorizedCertificatesService{s: s} 180 return rs 181} 182 183type AppsAuthorizedCertificatesService struct { 184 s *APIService 185} 186 187func NewAppsAuthorizedDomainsService(s *APIService) *AppsAuthorizedDomainsService { 188 rs := &AppsAuthorizedDomainsService{s: s} 189 return rs 190} 191 192type AppsAuthorizedDomainsService struct { 193 s *APIService 194} 195 196func NewAppsDomainMappingsService(s *APIService) *AppsDomainMappingsService { 197 rs := &AppsDomainMappingsService{s: s} 198 return rs 199} 200 201type AppsDomainMappingsService struct { 202 s *APIService 203} 204 205func NewAppsFirewallService(s *APIService) *AppsFirewallService { 206 rs := &AppsFirewallService{s: s} 207 rs.IngressRules = NewAppsFirewallIngressRulesService(s) 208 return rs 209} 210 211type AppsFirewallService struct { 212 s *APIService 213 214 IngressRules *AppsFirewallIngressRulesService 215} 216 217func NewAppsFirewallIngressRulesService(s *APIService) *AppsFirewallIngressRulesService { 218 rs := &AppsFirewallIngressRulesService{s: s} 219 return rs 220} 221 222type AppsFirewallIngressRulesService struct { 223 s *APIService 224} 225 226func NewAppsLocationsService(s *APIService) *AppsLocationsService { 227 rs := &AppsLocationsService{s: s} 228 return rs 229} 230 231type AppsLocationsService struct { 232 s *APIService 233} 234 235func NewAppsOperationsService(s *APIService) *AppsOperationsService { 236 rs := &AppsOperationsService{s: s} 237 return rs 238} 239 240type AppsOperationsService struct { 241 s *APIService 242} 243 244func NewAppsServicesService(s *APIService) *AppsServicesService { 245 rs := &AppsServicesService{s: s} 246 rs.Versions = NewAppsServicesVersionsService(s) 247 return rs 248} 249 250type AppsServicesService struct { 251 s *APIService 252 253 Versions *AppsServicesVersionsService 254} 255 256func NewAppsServicesVersionsService(s *APIService) *AppsServicesVersionsService { 257 rs := &AppsServicesVersionsService{s: s} 258 rs.Instances = NewAppsServicesVersionsInstancesService(s) 259 return rs 260} 261 262type AppsServicesVersionsService struct { 263 s *APIService 264 265 Instances *AppsServicesVersionsInstancesService 266} 267 268func NewAppsServicesVersionsInstancesService(s *APIService) *AppsServicesVersionsInstancesService { 269 rs := &AppsServicesVersionsInstancesService{s: s} 270 return rs 271} 272 273type AppsServicesVersionsInstancesService struct { 274 s *APIService 275} 276 277// ApiConfigHandler: Google Cloud Endpoints 278// (https://cloud.google.com/appengine/docs/python/endpoints/) 279// configuration for API handlers. 280type ApiConfigHandler struct { 281 // AuthFailAction: Action to take when users access resources that 282 // require authentication. Defaults to redirect. 283 // 284 // Possible values: 285 // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified. 286 // AUTH_FAIL_ACTION_REDIRECT is assumed. 287 // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to 288 // "accounts.google.com". The user is redirected back to the application 289 // URL after signing in or creating an account. 290 // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP 291 // status code and an error message. 292 AuthFailAction string `json:"authFailAction,omitempty"` 293 294 // Login: Level of login required to access this resource. Defaults to 295 // optional. 296 // 297 // Possible values: 298 // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed. 299 // "LOGIN_OPTIONAL" - Does not require that the user is signed in. 300 // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action 301 // is taken. In addition, if the user is not an administrator for the 302 // application, they are given an error message regardless of 303 // auth_fail_action. If the user is an administrator, the handler 304 // proceeds. 305 // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds 306 // normally. Otherwise, the auth_fail_action is taken. 307 Login string `json:"login,omitempty"` 308 309 // Script: Path to the script from the application root directory. 310 Script string `json:"script,omitempty"` 311 312 // SecurityLevel: Security (HTTPS) enforcement for this URL. 313 // 314 // Possible values: 315 // "SECURE_UNSPECIFIED" - Not specified. 316 // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that 317 // match the handler succeed without redirects. The application can 318 // examine the request to determine which protocol was used, and respond 319 // accordingly. 320 // "SECURE_NEVER" - Requests for a URL that match this handler that 321 // use HTTPS are automatically redirected to the HTTP equivalent URL. 322 // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that 323 // match the handler succeed without redirects. The application can 324 // examine the request to determine which protocol was used and respond 325 // accordingly. 326 // "SECURE_ALWAYS" - Requests for a URL that match this handler that 327 // do not use HTTPS are automatically redirected to the HTTPS URL with 328 // the same path. Query parameters are reserved for the redirect. 329 SecurityLevel string `json:"securityLevel,omitempty"` 330 331 // Url: URL to serve the endpoint at. 332 Url string `json:"url,omitempty"` 333 334 // ForceSendFields is a list of field names (e.g. "AuthFailAction") to 335 // unconditionally include in API requests. By default, fields with 336 // empty values are omitted from API requests. However, any non-pointer, 337 // non-interface field appearing in ForceSendFields will be sent to the 338 // server regardless of whether the field is empty or not. This may be 339 // used to include empty fields in Patch requests. 340 ForceSendFields []string `json:"-"` 341 342 // NullFields is a list of field names (e.g. "AuthFailAction") to 343 // include in API requests with the JSON null value. By default, fields 344 // with empty values are omitted from API requests. However, any field 345 // with an empty value appearing in NullFields will be sent to the 346 // server as null. It is an error if a field in this list has a 347 // non-empty value. This may be used to include null fields in Patch 348 // requests. 349 NullFields []string `json:"-"` 350} 351 352func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) { 353 type NoMethod ApiConfigHandler 354 raw := NoMethod(*s) 355 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 356} 357 358// ApiEndpointHandler: Uses Google Cloud Endpoints to handle requests. 359type ApiEndpointHandler struct { 360 // ScriptPath: Path to the script from the application root directory. 361 ScriptPath string `json:"scriptPath,omitempty"` 362 363 // ForceSendFields is a list of field names (e.g. "ScriptPath") to 364 // unconditionally include in API requests. By default, fields with 365 // empty values are omitted from API requests. However, any non-pointer, 366 // non-interface field appearing in ForceSendFields will be sent to the 367 // server regardless of whether the field is empty or not. This may be 368 // used to include empty fields in Patch requests. 369 ForceSendFields []string `json:"-"` 370 371 // NullFields is a list of field names (e.g. "ScriptPath") to include in 372 // API requests with the JSON null value. By default, fields with empty 373 // values are omitted from API requests. However, any field with an 374 // empty value appearing in NullFields will be sent to the server as 375 // null. It is an error if a field in this list has a non-empty value. 376 // This may be used to include null fields in Patch requests. 377 NullFields []string `json:"-"` 378} 379 380func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) { 381 type NoMethod ApiEndpointHandler 382 raw := NoMethod(*s) 383 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 384} 385 386// Application: An Application resource contains the top-level 387// configuration of an App Engine application. 388type Application struct { 389 // AuthDomain: Google Apps authentication domain that controls which 390 // users can access this application.Defaults to open access for any 391 // Google Account. 392 AuthDomain string `json:"authDomain,omitempty"` 393 394 // CodeBucket: Google Cloud Storage bucket that can be used for storing 395 // files associated with this application. This bucket is associated 396 // with the application and can be used by the gcloud deployment 397 // commands.@OutputOnly 398 CodeBucket string `json:"codeBucket,omitempty"` 399 400 // DefaultBucket: Google Cloud Storage bucket that can be used by this 401 // application to store content.@OutputOnly 402 DefaultBucket string `json:"defaultBucket,omitempty"` 403 404 // DefaultCookieExpiration: Cookie expiration policy for this 405 // application. 406 DefaultCookieExpiration string `json:"defaultCookieExpiration,omitempty"` 407 408 // DefaultHostname: Hostname used to reach this application, as resolved 409 // by App Engine.@OutputOnly 410 DefaultHostname string `json:"defaultHostname,omitempty"` 411 412 // DispatchRules: HTTP path dispatch rules for requests to the 413 // application that do not explicitly target a service or version. Rules 414 // are order-dependent. Up to 20 dispatch rules can be supported. 415 DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"` 416 417 // FeatureSettings: The feature specific settings to be used in the 418 // application. 419 FeatureSettings *FeatureSettings `json:"featureSettings,omitempty"` 420 421 // GcrDomain: The Google Container Registry domain used for storing 422 // managed build docker images for this application. 423 GcrDomain string `json:"gcrDomain,omitempty"` 424 425 Iap *IdentityAwareProxy `json:"iap,omitempty"` 426 427 // Id: Identifier of the Application resource. This identifier is 428 // equivalent to the project ID of the Google Cloud Platform project 429 // where you want to deploy your application. Example: myapp. 430 Id string `json:"id,omitempty"` 431 432 // LocationId: Location from which this application runs. Application 433 // instances run out of the data centers in the specified location, 434 // which is also where all of the application's end user content is 435 // stored.Defaults to us-central.View the list of supported locations 436 // (https://cloud.google.com/appengine/docs/locations). 437 LocationId string `json:"locationId,omitempty"` 438 439 // Name: Full path to the Application resource in the API. Example: 440 // apps/myapp.@OutputOnly 441 Name string `json:"name,omitempty"` 442 443 // ServingStatus: Serving status of this application. 444 // 445 // Possible values: 446 // "UNSPECIFIED" - Serving status is unspecified. 447 // "SERVING" - Application is serving. 448 // "USER_DISABLED" - Application has been disabled by the user. 449 // "SYSTEM_DISABLED" - Application has been disabled by the system. 450 ServingStatus string `json:"servingStatus,omitempty"` 451 452 // ServerResponse contains the HTTP response code and headers from the 453 // server. 454 googleapi.ServerResponse `json:"-"` 455 456 // ForceSendFields is a list of field names (e.g. "AuthDomain") to 457 // unconditionally include in API requests. By default, fields with 458 // empty values are omitted from API requests. However, any non-pointer, 459 // non-interface field appearing in ForceSendFields will be sent to the 460 // server regardless of whether the field is empty or not. This may be 461 // used to include empty fields in Patch requests. 462 ForceSendFields []string `json:"-"` 463 464 // NullFields is a list of field names (e.g. "AuthDomain") to include in 465 // API requests with the JSON null value. By default, fields with empty 466 // values are omitted from API requests. However, any field with an 467 // empty value appearing in NullFields will be sent to the server as 468 // null. It is an error if a field in this list has a non-empty value. 469 // This may be used to include null fields in Patch requests. 470 NullFields []string `json:"-"` 471} 472 473func (s *Application) MarshalJSON() ([]byte, error) { 474 type NoMethod Application 475 raw := NoMethod(*s) 476 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 477} 478 479// AuthorizedCertificate: An SSL certificate that a user has been 480// authorized to administer. A user is authorized to administer any 481// certificate that applies to one of their authorized domains. 482type AuthorizedCertificate struct { 483 // CertificateRawData: The SSL certificate serving the 484 // AuthorizedCertificate resource. This must be obtained independently 485 // from a certificate authority. 486 CertificateRawData *CertificateRawData `json:"certificateRawData,omitempty"` 487 488 // DisplayName: The user-specified display name of the certificate. This 489 // is not guaranteed to be unique. Example: My Certificate. 490 DisplayName string `json:"displayName,omitempty"` 491 492 // DomainMappingsCount: Aggregate count of the domain mappings with this 493 // certificate mapped. This count includes domain mappings on 494 // applications for which the user does not have VIEWER permissions.Only 495 // returned by GET or LIST requests when specifically requested by the 496 // view=FULL_CERTIFICATE option.@OutputOnly 497 DomainMappingsCount int64 `json:"domainMappingsCount,omitempty"` 498 499 // DomainNames: Topmost applicable domains of this certificate. This 500 // certificate applies to these domains and their subdomains. Example: 501 // example.com.@OutputOnly 502 DomainNames []string `json:"domainNames,omitempty"` 503 504 // ExpireTime: The time when this certificate expires. To update the 505 // renewal time on this certificate, upload an SSL certificate with a 506 // different expiration time using 507 // AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly 508 ExpireTime string `json:"expireTime,omitempty"` 509 510 // Id: Relative name of the certificate. This is a unique value 511 // autogenerated on AuthorizedCertificate resource creation. Example: 512 // 12345.@OutputOnly 513 Id string `json:"id,omitempty"` 514 515 // ManagedCertificate: Only applicable if this certificate is managed by 516 // App Engine. Managed certificates are tied to the lifecycle of a 517 // DomainMapping and cannot be updated or deleted via the 518 // AuthorizedCertificates API. If this certificate is manually 519 // administered by the user, this field will be empty.@OutputOnly 520 ManagedCertificate *ManagedCertificate `json:"managedCertificate,omitempty"` 521 522 // Name: Full path to the AuthorizedCertificate resource in the API. 523 // Example: apps/myapp/authorizedCertificates/12345.@OutputOnly 524 Name string `json:"name,omitempty"` 525 526 // VisibleDomainMappings: The full paths to user visible Domain Mapping 527 // resources that have this certificate mapped. Example: 528 // apps/myapp/domainMappings/example.com.This may not represent the full 529 // list of mapped domain mappings if the user does not have VIEWER 530 // permissions on all of the applications that have this certificate 531 // mapped. See domain_mappings_count for a complete count.Only returned 532 // by GET or LIST requests when specifically requested by the 533 // view=FULL_CERTIFICATE option.@OutputOnly 534 VisibleDomainMappings []string `json:"visibleDomainMappings,omitempty"` 535 536 // ServerResponse contains the HTTP response code and headers from the 537 // server. 538 googleapi.ServerResponse `json:"-"` 539 540 // ForceSendFields is a list of field names (e.g. "CertificateRawData") 541 // to unconditionally include in API requests. By default, fields with 542 // empty values are omitted from API requests. However, any non-pointer, 543 // non-interface field appearing in ForceSendFields will be sent to the 544 // server regardless of whether the field is empty or not. This may be 545 // used to include empty fields in Patch requests. 546 ForceSendFields []string `json:"-"` 547 548 // NullFields is a list of field names (e.g. "CertificateRawData") to 549 // include in API requests with the JSON null value. By default, fields 550 // with empty values are omitted from API requests. However, any field 551 // with an empty value appearing in NullFields will be sent to the 552 // server as null. It is an error if a field in this list has a 553 // non-empty value. This may be used to include null fields in Patch 554 // requests. 555 NullFields []string `json:"-"` 556} 557 558func (s *AuthorizedCertificate) MarshalJSON() ([]byte, error) { 559 type NoMethod AuthorizedCertificate 560 raw := NoMethod(*s) 561 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 562} 563 564// AuthorizedDomain: A domain that a user has been authorized to 565// administer. To authorize use of a domain, verify ownership via 566// Webmaster Central 567// (https://www.google.com/webmasters/verification/home). 568type AuthorizedDomain struct { 569 // Id: Fully qualified domain name of the domain authorized for use. 570 // Example: example.com. 571 Id string `json:"id,omitempty"` 572 573 // Name: Full path to the AuthorizedDomain resource in the API. Example: 574 // apps/myapp/authorizedDomains/example.com.@OutputOnly 575 Name string `json:"name,omitempty"` 576 577 // ForceSendFields is a list of field names (e.g. "Id") to 578 // unconditionally include in API requests. By default, fields with 579 // empty values are omitted from API requests. However, any non-pointer, 580 // non-interface field appearing in ForceSendFields will be sent to the 581 // server regardless of whether the field is empty or not. This may be 582 // used to include empty fields in Patch requests. 583 ForceSendFields []string `json:"-"` 584 585 // NullFields is a list of field names (e.g. "Id") to include in API 586 // requests with the JSON null value. By default, fields with empty 587 // values are omitted from API requests. However, any field with an 588 // empty value appearing in NullFields will be sent to the server as 589 // null. It is an error if a field in this list has a non-empty value. 590 // This may be used to include null fields in Patch requests. 591 NullFields []string `json:"-"` 592} 593 594func (s *AuthorizedDomain) MarshalJSON() ([]byte, error) { 595 type NoMethod AuthorizedDomain 596 raw := NoMethod(*s) 597 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 598} 599 600// AutomaticScaling: Automatic scaling is based on request rate, 601// response latencies, and other application metrics. 602type AutomaticScaling struct { 603 // CoolDownPeriod: The time period that the Autoscaler 604 // (https://cloud.google.com/compute/docs/autoscaler/) should wait 605 // before it starts collecting information from a new instance. This 606 // prevents the autoscaler from collecting information when the instance 607 // is initializing, during which the collected usage would not be 608 // reliable. Only applicable in the App Engine flexible environment. 609 CoolDownPeriod string `json:"coolDownPeriod,omitempty"` 610 611 // CpuUtilization: Target scaling by CPU usage. 612 CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"` 613 614 // CustomMetrics: Target scaling by user-provided metrics. Only 615 // applicable in the App Engine flexible environment. 616 CustomMetrics []*CustomMetric `json:"customMetrics,omitempty"` 617 618 // DiskUtilization: Target scaling by disk usage. 619 DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"` 620 621 // MaxConcurrentRequests: Number of concurrent requests an automatic 622 // scaling instance can accept before the scheduler spawns a new 623 // instance.Defaults to a runtime-specific value. 624 MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"` 625 626 // MaxIdleInstances: Maximum number of idle instances that should be 627 // maintained for this version. 628 MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"` 629 630 // MaxPendingLatency: Maximum amount of time that a request should wait 631 // in the pending queue before starting a new instance to handle it. 632 MaxPendingLatency string `json:"maxPendingLatency,omitempty"` 633 634 // MaxTotalInstances: Maximum number of instances that should be started 635 // to handle requests for this version. 636 MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"` 637 638 // MinIdleInstances: Minimum number of idle instances that should be 639 // maintained for this version. Only applicable for the default version 640 // of a service. 641 MinIdleInstances int64 `json:"minIdleInstances,omitempty"` 642 643 // MinPendingLatency: Minimum amount of time a request should wait in 644 // the pending queue before starting a new instance to handle it. 645 MinPendingLatency string `json:"minPendingLatency,omitempty"` 646 647 // MinTotalInstances: Minimum number of running instances that should be 648 // maintained for this version. 649 MinTotalInstances int64 `json:"minTotalInstances,omitempty"` 650 651 // NetworkUtilization: Target scaling by network usage. 652 NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"` 653 654 // RequestUtilization: Target scaling by request utilization. 655 RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"` 656 657 // StandardSchedulerSettings: Scheduler settings for standard 658 // environment. 659 StandardSchedulerSettings *StandardSchedulerSettings `json:"standardSchedulerSettings,omitempty"` 660 661 // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to 662 // unconditionally include in API requests. By default, fields with 663 // empty values are omitted from API requests. However, any non-pointer, 664 // non-interface field appearing in ForceSendFields will be sent to the 665 // server regardless of whether the field is empty or not. This may be 666 // used to include empty fields in Patch requests. 667 ForceSendFields []string `json:"-"` 668 669 // NullFields is a list of field names (e.g. "CoolDownPeriod") to 670 // include in API requests with the JSON null value. By default, fields 671 // with empty values are omitted from API requests. However, any field 672 // with an empty value appearing in NullFields will be sent to the 673 // server as null. It is an error if a field in this list has a 674 // non-empty value. This may be used to include null fields in Patch 675 // requests. 676 NullFields []string `json:"-"` 677} 678 679func (s *AutomaticScaling) MarshalJSON() ([]byte, error) { 680 type NoMethod AutomaticScaling 681 raw := NoMethod(*s) 682 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 683} 684 685// BasicScaling: A service with basic scaling will create an instance 686// when the application receives a request. The instance will be turned 687// down when the app becomes idle. Basic scaling is ideal for work that 688// is intermittent or driven by user activity. 689type BasicScaling struct { 690 // IdleTimeout: Duration of time after the last request that an instance 691 // must wait before the instance is shut down. 692 IdleTimeout string `json:"idleTimeout,omitempty"` 693 694 // MaxInstances: Maximum number of instances to create for this version. 695 MaxInstances int64 `json:"maxInstances,omitempty"` 696 697 // ForceSendFields is a list of field names (e.g. "IdleTimeout") to 698 // unconditionally include in API requests. By default, fields with 699 // empty values are omitted from API requests. However, any non-pointer, 700 // non-interface field appearing in ForceSendFields will be sent to the 701 // server regardless of whether the field is empty or not. This may be 702 // used to include empty fields in Patch requests. 703 ForceSendFields []string `json:"-"` 704 705 // NullFields is a list of field names (e.g. "IdleTimeout") to include 706 // in API requests with the JSON null value. By default, fields with 707 // empty values are omitted from API requests. However, any field with 708 // an empty value appearing in NullFields will be sent to the server as 709 // null. It is an error if a field in this list has a non-empty value. 710 // This may be used to include null fields in Patch requests. 711 NullFields []string `json:"-"` 712} 713 714func (s *BasicScaling) MarshalJSON() ([]byte, error) { 715 type NoMethod BasicScaling 716 raw := NoMethod(*s) 717 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 718} 719 720// BatchUpdateIngressRulesRequest: Request message for 721// Firewall.BatchUpdateIngressRules. 722type BatchUpdateIngressRulesRequest struct { 723 // IngressRules: A list of FirewallRules to replace the existing set. 724 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 725 726 // ForceSendFields is a list of field names (e.g. "IngressRules") to 727 // unconditionally include in API requests. By default, fields with 728 // empty values are omitted from API requests. However, any non-pointer, 729 // non-interface field appearing in ForceSendFields will be sent to the 730 // server regardless of whether the field is empty or not. This may be 731 // used to include empty fields in Patch requests. 732 ForceSendFields []string `json:"-"` 733 734 // NullFields is a list of field names (e.g. "IngressRules") to include 735 // in API requests with the JSON null value. By default, fields with 736 // empty values are omitted from API requests. However, any field with 737 // an empty value appearing in NullFields will be sent to the server as 738 // null. It is an error if a field in this list has a non-empty value. 739 // This may be used to include null fields in Patch requests. 740 NullFields []string `json:"-"` 741} 742 743func (s *BatchUpdateIngressRulesRequest) MarshalJSON() ([]byte, error) { 744 type NoMethod BatchUpdateIngressRulesRequest 745 raw := NoMethod(*s) 746 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 747} 748 749// BatchUpdateIngressRulesResponse: Response message for 750// Firewall.UpdateAllIngressRules. 751type BatchUpdateIngressRulesResponse struct { 752 // IngressRules: The full list of ingress FirewallRules for this 753 // application. 754 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 755 756 // ServerResponse contains the HTTP response code and headers from the 757 // server. 758 googleapi.ServerResponse `json:"-"` 759 760 // ForceSendFields is a list of field names (e.g. "IngressRules") to 761 // unconditionally include in API requests. By default, fields with 762 // empty values are omitted from API requests. However, any non-pointer, 763 // non-interface field appearing in ForceSendFields will be sent to the 764 // server regardless of whether the field is empty or not. This may be 765 // used to include empty fields in Patch requests. 766 ForceSendFields []string `json:"-"` 767 768 // NullFields is a list of field names (e.g. "IngressRules") to include 769 // in API requests with the JSON null value. By default, fields with 770 // empty values are omitted from API requests. However, any field with 771 // an empty value appearing in NullFields will be sent to the server as 772 // null. It is an error if a field in this list has a non-empty value. 773 // This may be used to include null fields in Patch requests. 774 NullFields []string `json:"-"` 775} 776 777func (s *BatchUpdateIngressRulesResponse) MarshalJSON() ([]byte, error) { 778 type NoMethod BatchUpdateIngressRulesResponse 779 raw := NoMethod(*s) 780 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 781} 782 783// BuildInfo: Google Cloud Build information. 784type BuildInfo struct { 785 // CloudBuildId: The Google Cloud Build id. Example: 786 // "f966068f-08b2-42c8-bdfe-74137dff2bf9" 787 CloudBuildId string `json:"cloudBuildId,omitempty"` 788 789 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 790 // unconditionally include in API requests. By default, fields with 791 // empty values are omitted from API requests. However, any non-pointer, 792 // non-interface field appearing in ForceSendFields will be sent to the 793 // server regardless of whether the field is empty or not. This may be 794 // used to include empty fields in Patch requests. 795 ForceSendFields []string `json:"-"` 796 797 // NullFields is a list of field names (e.g. "CloudBuildId") to include 798 // in API requests with the JSON null value. By default, fields with 799 // empty values are omitted from API requests. However, any field with 800 // an empty value appearing in NullFields will be sent to the server as 801 // null. It is an error if a field in this list has a non-empty value. 802 // This may be used to include null fields in Patch requests. 803 NullFields []string `json:"-"` 804} 805 806func (s *BuildInfo) MarshalJSON() ([]byte, error) { 807 type NoMethod BuildInfo 808 raw := NoMethod(*s) 809 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 810} 811 812// CertificateRawData: An SSL certificate obtained from a certificate 813// authority. 814type CertificateRawData struct { 815 // PrivateKey: Unencrypted PEM encoded RSA private key. This field is 816 // set once on certificate creation and then encrypted. The key size 817 // must be 2048 bits or fewer. Must include the header and footer. 818 // Example: <pre> -----BEGIN RSA PRIVATE KEY----- 819 // <unencrypted_key_value> -----END RSA PRIVATE KEY----- </pre> 820 // @InputOnly 821 PrivateKey string `json:"privateKey,omitempty"` 822 823 // PublicCertificate: PEM encoded x.509 public key certificate. This 824 // field is set once on certificate creation. Must include the header 825 // and footer. Example: <pre> -----BEGIN CERTIFICATE----- 826 // <certificate_value> -----END CERTIFICATE----- </pre> 827 PublicCertificate string `json:"publicCertificate,omitempty"` 828 829 // ForceSendFields is a list of field names (e.g. "PrivateKey") to 830 // unconditionally include in API requests. By default, fields with 831 // empty values are omitted from API requests. However, any non-pointer, 832 // non-interface field appearing in ForceSendFields will be sent to the 833 // server regardless of whether the field is empty or not. This may be 834 // used to include empty fields in Patch requests. 835 ForceSendFields []string `json:"-"` 836 837 // NullFields is a list of field names (e.g. "PrivateKey") to include in 838 // API requests with the JSON null value. By default, fields with empty 839 // values are omitted from API requests. However, any field with an 840 // empty value appearing in NullFields will be sent to the server as 841 // null. It is an error if a field in this list has a non-empty value. 842 // This may be used to include null fields in Patch requests. 843 NullFields []string `json:"-"` 844} 845 846func (s *CertificateRawData) MarshalJSON() ([]byte, error) { 847 type NoMethod CertificateRawData 848 raw := NoMethod(*s) 849 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 850} 851 852// CloudBuildOptions: Options for the build operations performed as a 853// part of the version deployment. Only applicable for App Engine 854// flexible environment when creating a version using source code 855// directly. 856type CloudBuildOptions struct { 857 // AppYamlPath: Path to the yaml file used in deployment, used to 858 // determine runtime configuration details.Required for flexible 859 // environment builds.See 860 // https://cloud.google.com/appengine/docs/standard/python/config/appref 861 // for more details. 862 AppYamlPath string `json:"appYamlPath,omitempty"` 863 864 // CloudBuildTimeout: The Cloud Build timeout used as part of any 865 // dependent builds performed by version creation. Defaults to 10 866 // minutes. 867 CloudBuildTimeout string `json:"cloudBuildTimeout,omitempty"` 868 869 // ForceSendFields is a list of field names (e.g. "AppYamlPath") to 870 // unconditionally include in API requests. By default, fields with 871 // empty values are omitted from API requests. However, any non-pointer, 872 // non-interface field appearing in ForceSendFields will be sent to the 873 // server regardless of whether the field is empty or not. This may be 874 // used to include empty fields in Patch requests. 875 ForceSendFields []string `json:"-"` 876 877 // NullFields is a list of field names (e.g. "AppYamlPath") to include 878 // in API requests with the JSON null value. By default, fields with 879 // empty values are omitted from API requests. However, any field with 880 // an empty value appearing in NullFields will be sent to the server as 881 // null. It is an error if a field in this list has a non-empty value. 882 // This may be used to include null fields in Patch requests. 883 NullFields []string `json:"-"` 884} 885 886func (s *CloudBuildOptions) MarshalJSON() ([]byte, error) { 887 type NoMethod CloudBuildOptions 888 raw := NoMethod(*s) 889 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 890} 891 892// ContainerInfo: Docker image that is used to create a container and 893// start a VM instance for the version that you deploy. Only applicable 894// for instances running in the App Engine flexible environment. 895type ContainerInfo struct { 896 // Image: URI to the hosted container image in Google Container 897 // Registry. The URI must be fully qualified and include a tag or 898 // digest. Examples: "gcr.io/my-project/image:tag" or 899 // "gcr.io/my-project/image@digest" 900 Image string `json:"image,omitempty"` 901 902 // ForceSendFields is a list of field names (e.g. "Image") to 903 // unconditionally include in API requests. By default, fields with 904 // empty values are omitted from API requests. However, any non-pointer, 905 // non-interface field appearing in ForceSendFields will be sent to the 906 // server regardless of whether the field is empty or not. This may be 907 // used to include empty fields in Patch requests. 908 ForceSendFields []string `json:"-"` 909 910 // NullFields is a list of field names (e.g. "Image") to include in API 911 // requests with the JSON null value. By default, fields with empty 912 // values are omitted from API requests. However, any field with an 913 // empty value appearing in NullFields will be sent to the server as 914 // null. It is an error if a field in this list has a non-empty value. 915 // This may be used to include null fields in Patch requests. 916 NullFields []string `json:"-"` 917} 918 919func (s *ContainerInfo) MarshalJSON() ([]byte, error) { 920 type NoMethod ContainerInfo 921 raw := NoMethod(*s) 922 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 923} 924 925// CpuUtilization: Target scaling by CPU usage. 926type CpuUtilization struct { 927 // AggregationWindowLength: Period of time over which CPU utilization is 928 // calculated. 929 AggregationWindowLength string `json:"aggregationWindowLength,omitempty"` 930 931 // TargetUtilization: Target CPU utilization ratio to maintain when 932 // scaling. Must be between 0 and 1. 933 TargetUtilization float64 `json:"targetUtilization,omitempty"` 934 935 // ForceSendFields is a list of field names (e.g. 936 // "AggregationWindowLength") to unconditionally include in API 937 // requests. By default, fields with empty values are omitted from API 938 // requests. However, any non-pointer, non-interface field appearing in 939 // ForceSendFields will be sent to the server regardless of whether the 940 // field is empty or not. This may be used to include empty fields in 941 // Patch requests. 942 ForceSendFields []string `json:"-"` 943 944 // NullFields is a list of field names (e.g. "AggregationWindowLength") 945 // to include in API requests with the JSON null value. By default, 946 // fields with empty values are omitted from API requests. However, any 947 // field with an empty value appearing in NullFields will be sent to the 948 // server as null. It is an error if a field in this list has a 949 // non-empty value. This may be used to include null fields in Patch 950 // requests. 951 NullFields []string `json:"-"` 952} 953 954func (s *CpuUtilization) MarshalJSON() ([]byte, error) { 955 type NoMethod CpuUtilization 956 raw := NoMethod(*s) 957 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 958} 959 960func (s *CpuUtilization) UnmarshalJSON(data []byte) error { 961 type NoMethod CpuUtilization 962 var s1 struct { 963 TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"` 964 *NoMethod 965 } 966 s1.NoMethod = (*NoMethod)(s) 967 if err := json.Unmarshal(data, &s1); err != nil { 968 return err 969 } 970 s.TargetUtilization = float64(s1.TargetUtilization) 971 return nil 972} 973 974// CreateVersionMetadataV1: Metadata for the given 975// google.longrunning.Operation during a 976// google.appengine.v1.CreateVersionRequest. 977type CreateVersionMetadataV1 struct { 978 // CloudBuildId: The Cloud Build ID if one was created as part of the 979 // version create. @OutputOnly 980 CloudBuildId string `json:"cloudBuildId,omitempty"` 981 982 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 983 // unconditionally include in API requests. By default, fields with 984 // empty values are omitted from API requests. However, any non-pointer, 985 // non-interface field appearing in ForceSendFields will be sent to the 986 // server regardless of whether the field is empty or not. This may be 987 // used to include empty fields in Patch requests. 988 ForceSendFields []string `json:"-"` 989 990 // NullFields is a list of field names (e.g. "CloudBuildId") to include 991 // in API requests with the JSON null value. By default, fields with 992 // empty values are omitted from API requests. However, any field with 993 // an empty value appearing in NullFields will be sent to the server as 994 // null. It is an error if a field in this list has a non-empty value. 995 // This may be used to include null fields in Patch requests. 996 NullFields []string `json:"-"` 997} 998 999func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) { 1000 type NoMethod CreateVersionMetadataV1 1001 raw := NoMethod(*s) 1002 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1003} 1004 1005// CreateVersionMetadataV1Alpha: Metadata for the given 1006// google.longrunning.Operation during a 1007// google.appengine.v1alpha.CreateVersionRequest. 1008type CreateVersionMetadataV1Alpha struct { 1009 // CloudBuildId: The Cloud Build ID if one was created as part of the 1010 // version create. @OutputOnly 1011 CloudBuildId string `json:"cloudBuildId,omitempty"` 1012 1013 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 1014 // unconditionally include in API requests. By default, fields with 1015 // empty values are omitted from API requests. However, any non-pointer, 1016 // non-interface field appearing in ForceSendFields will be sent to the 1017 // server regardless of whether the field is empty or not. This may be 1018 // used to include empty fields in Patch requests. 1019 ForceSendFields []string `json:"-"` 1020 1021 // NullFields is a list of field names (e.g. "CloudBuildId") to include 1022 // in API requests with the JSON null value. By default, fields with 1023 // empty values are omitted from API requests. However, any field with 1024 // an empty value appearing in NullFields will be sent to the server as 1025 // null. It is an error if a field in this list has a non-empty value. 1026 // This may be used to include null fields in Patch requests. 1027 NullFields []string `json:"-"` 1028} 1029 1030func (s *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) { 1031 type NoMethod CreateVersionMetadataV1Alpha 1032 raw := NoMethod(*s) 1033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1034} 1035 1036// CreateVersionMetadataV1Beta: Metadata for the given 1037// google.longrunning.Operation during a 1038// google.appengine.v1beta.CreateVersionRequest. 1039type CreateVersionMetadataV1Beta struct { 1040 // CloudBuildId: The Cloud Build ID if one was created as part of the 1041 // version create. @OutputOnly 1042 CloudBuildId string `json:"cloudBuildId,omitempty"` 1043 1044 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 1045 // unconditionally include in API requests. By default, fields with 1046 // empty values are omitted from API requests. However, any non-pointer, 1047 // non-interface field appearing in ForceSendFields will be sent to the 1048 // server regardless of whether the field is empty or not. This may be 1049 // used to include empty fields in Patch requests. 1050 ForceSendFields []string `json:"-"` 1051 1052 // NullFields is a list of field names (e.g. "CloudBuildId") to include 1053 // in API requests with the JSON null value. By default, fields with 1054 // empty values are omitted from API requests. However, any field with 1055 // an empty value appearing in NullFields will be sent to the server as 1056 // null. It is an error if a field in this list has a non-empty value. 1057 // This may be used to include null fields in Patch requests. 1058 NullFields []string `json:"-"` 1059} 1060 1061func (s *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) { 1062 type NoMethod CreateVersionMetadataV1Beta 1063 raw := NoMethod(*s) 1064 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1065} 1066 1067// CustomMetric: Allows autoscaling based on Stackdriver metrics. 1068type CustomMetric struct { 1069 // Filter: Allows filtering on the metric's fields. 1070 Filter string `json:"filter,omitempty"` 1071 1072 // MetricName: The name of the metric. 1073 MetricName string `json:"metricName,omitempty"` 1074 1075 // SingleInstanceAssignment: May be used instead of target_utilization 1076 // when an instance can handle a specific amount of work/resources and 1077 // the metric value is equal to the current amount of work remaining. 1078 // The autoscaler will try to keep the number of instances equal to the 1079 // metric value divided by single_instance_assignment. 1080 SingleInstanceAssignment float64 `json:"singleInstanceAssignment,omitempty"` 1081 1082 // TargetType: The type of the metric. Must be a string representing a 1083 // Stackdriver metric type e.g. GAGUE, DELTA_PER_SECOND, etc. 1084 TargetType string `json:"targetType,omitempty"` 1085 1086 // TargetUtilization: The target value for the metric. 1087 TargetUtilization float64 `json:"targetUtilization,omitempty"` 1088 1089 // ForceSendFields is a list of field names (e.g. "Filter") to 1090 // unconditionally include in API requests. By default, fields with 1091 // empty values are omitted from API requests. However, any non-pointer, 1092 // non-interface field appearing in ForceSendFields will be sent to the 1093 // server regardless of whether the field is empty or not. This may be 1094 // used to include empty fields in Patch requests. 1095 ForceSendFields []string `json:"-"` 1096 1097 // NullFields is a list of field names (e.g. "Filter") to include in API 1098 // requests with the JSON null value. By default, fields with empty 1099 // values are omitted from API requests. However, any field with an 1100 // empty value appearing in NullFields will be sent to the server as 1101 // null. It is an error if a field in this list has a non-empty value. 1102 // This may be used to include null fields in Patch requests. 1103 NullFields []string `json:"-"` 1104} 1105 1106func (s *CustomMetric) MarshalJSON() ([]byte, error) { 1107 type NoMethod CustomMetric 1108 raw := NoMethod(*s) 1109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1110} 1111 1112func (s *CustomMetric) UnmarshalJSON(data []byte) error { 1113 type NoMethod CustomMetric 1114 var s1 struct { 1115 SingleInstanceAssignment gensupport.JSONFloat64 `json:"singleInstanceAssignment"` 1116 TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"` 1117 *NoMethod 1118 } 1119 s1.NoMethod = (*NoMethod)(s) 1120 if err := json.Unmarshal(data, &s1); err != nil { 1121 return err 1122 } 1123 s.SingleInstanceAssignment = float64(s1.SingleInstanceAssignment) 1124 s.TargetUtilization = float64(s1.TargetUtilization) 1125 return nil 1126} 1127 1128// DebugInstanceRequest: Request message for Instances.DebugInstance. 1129type DebugInstanceRequest struct { 1130 // SshKey: Public SSH key to add to the instance. 1131 // Examples: 1132 // [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] 1133 // [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh 1134 // {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more 1135 // information, see Adding and Removing SSH Keys 1136 // (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-k 1137 // eys). 1138 SshKey string `json:"sshKey,omitempty"` 1139 1140 // ForceSendFields is a list of field names (e.g. "SshKey") to 1141 // unconditionally include in API requests. By default, fields with 1142 // empty values are omitted from API requests. However, any non-pointer, 1143 // non-interface field appearing in ForceSendFields will be sent to the 1144 // server regardless of whether the field is empty or not. This may be 1145 // used to include empty fields in Patch requests. 1146 ForceSendFields []string `json:"-"` 1147 1148 // NullFields is a list of field names (e.g. "SshKey") to include in API 1149 // requests with the JSON null value. By default, fields with empty 1150 // values are omitted from API requests. However, any field with an 1151 // empty value appearing in NullFields will be sent to the server as 1152 // null. It is an error if a field in this list has a non-empty value. 1153 // This may be used to include null fields in Patch requests. 1154 NullFields []string `json:"-"` 1155} 1156 1157func (s *DebugInstanceRequest) MarshalJSON() ([]byte, error) { 1158 type NoMethod DebugInstanceRequest 1159 raw := NoMethod(*s) 1160 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1161} 1162 1163// Deployment: Code and application artifacts used to deploy a version 1164// to App Engine. 1165type Deployment struct { 1166 // Build: Google Cloud Build build information. Only applicable for 1167 // instances running in the App Engine flexible environment. 1168 Build *BuildInfo `json:"build,omitempty"` 1169 1170 // CloudBuildOptions: Options for any Google Cloud Build builds created 1171 // as a part of this deployment.These options will only be used if a new 1172 // build is created, such as when deploying to the App Engine flexible 1173 // environment using files or zip. 1174 CloudBuildOptions *CloudBuildOptions `json:"cloudBuildOptions,omitempty"` 1175 1176 // Container: The Docker image for the container that runs the version. 1177 // Only applicable for instances running in the App Engine flexible 1178 // environment. 1179 Container *ContainerInfo `json:"container,omitempty"` 1180 1181 // Files: Manifest of the files stored in Google Cloud Storage that are 1182 // included as part of this version. All files must be readable using 1183 // the credentials supplied with this call. 1184 Files map[string]FileInfo `json:"files,omitempty"` 1185 1186 // Zip: The zip file for this deployment, if this is a zip deployment. 1187 Zip *ZipInfo `json:"zip,omitempty"` 1188 1189 // ForceSendFields is a list of field names (e.g. "Build") to 1190 // unconditionally include in API requests. By default, fields with 1191 // empty values are omitted from API requests. However, any non-pointer, 1192 // non-interface field appearing in ForceSendFields will be sent to the 1193 // server regardless of whether the field is empty or not. This may be 1194 // used to include empty fields in Patch requests. 1195 ForceSendFields []string `json:"-"` 1196 1197 // NullFields is a list of field names (e.g. "Build") to include in API 1198 // requests with the JSON null value. By default, fields with empty 1199 // values are omitted from API requests. However, any field with an 1200 // empty value appearing in NullFields will be sent to the server as 1201 // null. It is an error if a field in this list has a non-empty value. 1202 // This may be used to include null fields in Patch requests. 1203 NullFields []string `json:"-"` 1204} 1205 1206func (s *Deployment) MarshalJSON() ([]byte, error) { 1207 type NoMethod Deployment 1208 raw := NoMethod(*s) 1209 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1210} 1211 1212// DiskUtilization: Target scaling by disk usage. Only applicable in the 1213// App Engine flexible environment. 1214type DiskUtilization struct { 1215 // TargetReadBytesPerSecond: Target bytes read per second. 1216 TargetReadBytesPerSecond int64 `json:"targetReadBytesPerSecond,omitempty"` 1217 1218 // TargetReadOpsPerSecond: Target ops read per seconds. 1219 TargetReadOpsPerSecond int64 `json:"targetReadOpsPerSecond,omitempty"` 1220 1221 // TargetWriteBytesPerSecond: Target bytes written per second. 1222 TargetWriteBytesPerSecond int64 `json:"targetWriteBytesPerSecond,omitempty"` 1223 1224 // TargetWriteOpsPerSecond: Target ops written per second. 1225 TargetWriteOpsPerSecond int64 `json:"targetWriteOpsPerSecond,omitempty"` 1226 1227 // ForceSendFields is a list of field names (e.g. 1228 // "TargetReadBytesPerSecond") to unconditionally include in API 1229 // requests. By default, fields with empty values are omitted from API 1230 // requests. However, any non-pointer, non-interface field appearing in 1231 // ForceSendFields will be sent to the server regardless of whether the 1232 // field is empty or not. This may be used to include empty fields in 1233 // Patch requests. 1234 ForceSendFields []string `json:"-"` 1235 1236 // NullFields is a list of field names (e.g. "TargetReadBytesPerSecond") 1237 // to include in API requests with the JSON null value. By default, 1238 // fields with empty values are omitted from API requests. However, any 1239 // field with an empty value appearing in NullFields will be sent to the 1240 // server as null. It is an error if a field in this list has a 1241 // non-empty value. This may be used to include null fields in Patch 1242 // requests. 1243 NullFields []string `json:"-"` 1244} 1245 1246func (s *DiskUtilization) MarshalJSON() ([]byte, error) { 1247 type NoMethod DiskUtilization 1248 raw := NoMethod(*s) 1249 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1250} 1251 1252// DomainMapping: A domain serving an App Engine application. 1253type DomainMapping struct { 1254 // Id: Relative name of the domain serving the application. Example: 1255 // example.com. 1256 Id string `json:"id,omitempty"` 1257 1258 // Name: Full path to the DomainMapping resource in the API. Example: 1259 // apps/myapp/domainMapping/example.com.@OutputOnly 1260 Name string `json:"name,omitempty"` 1261 1262 // ResourceRecords: The resource records required to configure this 1263 // domain mapping. These records must be added to the domain's DNS 1264 // configuration in order to serve the application via this domain 1265 // mapping.@OutputOnly 1266 ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"` 1267 1268 // SslSettings: SSL configuration for this domain. If unconfigured, this 1269 // domain will not serve with SSL. 1270 SslSettings *SslSettings `json:"sslSettings,omitempty"` 1271 1272 // ServerResponse contains the HTTP response code and headers from the 1273 // server. 1274 googleapi.ServerResponse `json:"-"` 1275 1276 // ForceSendFields is a list of field names (e.g. "Id") to 1277 // unconditionally include in API requests. By default, fields with 1278 // empty values are omitted from API requests. However, any non-pointer, 1279 // non-interface field appearing in ForceSendFields will be sent to the 1280 // server regardless of whether the field is empty or not. This may be 1281 // used to include empty fields in Patch requests. 1282 ForceSendFields []string `json:"-"` 1283 1284 // NullFields is a list of field names (e.g. "Id") to include in API 1285 // requests with the JSON null value. By default, fields with empty 1286 // values are omitted from API requests. However, any field with an 1287 // empty value appearing in NullFields will be sent to the server as 1288 // null. It is an error if a field in this list has a non-empty value. 1289 // This may be used to include null fields in Patch requests. 1290 NullFields []string `json:"-"` 1291} 1292 1293func (s *DomainMapping) MarshalJSON() ([]byte, error) { 1294 type NoMethod DomainMapping 1295 raw := NoMethod(*s) 1296 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1297} 1298 1299// Empty: A generic empty message that you can re-use to avoid defining 1300// duplicated empty messages in your APIs. A typical example is to use 1301// it as the request or the response type of an API method. For 1302// instance: 1303// service Foo { 1304// rpc Bar(google.protobuf.Empty) returns 1305// (google.protobuf.Empty); 1306// } 1307// The JSON representation for Empty is empty JSON object {}. 1308type Empty struct { 1309 // ServerResponse contains the HTTP response code and headers from the 1310 // server. 1311 googleapi.ServerResponse `json:"-"` 1312} 1313 1314// EndpointsApiService: Cloud Endpoints 1315// (https://cloud.google.com/endpoints) configuration. The Endpoints API 1316// Service provides tooling for serving Open API and gRPC endpoints via 1317// an NGINX proxy. Only valid for App Engine Flexible environment 1318// deployments.The fields here refer to the name and configuration ID of 1319// a "service" resource in the Service Management API 1320// (https://cloud.google.com/service-management/overview). 1321type EndpointsApiService struct { 1322 // ConfigId: Endpoints service configuration ID as specified by the 1323 // Service Management API. For example "2016-09-19r1".By default, the 1324 // rollout strategy for Endpoints is RolloutStrategy.FIXED. This means 1325 // that Endpoints starts up with a particular configuration ID. When a 1326 // new configuration is rolled out, Endpoints must be given the new 1327 // configuration ID. The config_id field is used to give the 1328 // configuration ID and is required in this case.Endpoints also has a 1329 // rollout strategy called RolloutStrategy.MANAGED. When using this, 1330 // Endpoints fetches the latest configuration and does not need the 1331 // configuration ID. In this case, config_id must be omitted. 1332 ConfigId string `json:"configId,omitempty"` 1333 1334 // DisableTraceSampling: Enable or disable trace sampling. By default, 1335 // this is set to false for enabled. 1336 DisableTraceSampling bool `json:"disableTraceSampling,omitempty"` 1337 1338 // Name: Endpoints service name which is the name of the "service" 1339 // resource in the Service Management API. For example 1340 // "myapi.endpoints.myproject.cloud.goog" 1341 Name string `json:"name,omitempty"` 1342 1343 // RolloutStrategy: Endpoints rollout strategy. If FIXED, config_id must 1344 // be specified. If MANAGED, config_id must be omitted. 1345 // 1346 // Possible values: 1347 // "UNSPECIFIED_ROLLOUT_STRATEGY" - Not specified. Defaults to FIXED. 1348 // "FIXED" - Endpoints service configuration ID will be fixed to the 1349 // configuration ID specified by config_id. 1350 // "MANAGED" - Endpoints service configuration ID will be updated with 1351 // each rollout. 1352 RolloutStrategy string `json:"rolloutStrategy,omitempty"` 1353 1354 // ForceSendFields is a list of field names (e.g. "ConfigId") to 1355 // unconditionally include in API requests. By default, fields with 1356 // empty values are omitted from API requests. However, any non-pointer, 1357 // non-interface field appearing in ForceSendFields will be sent to the 1358 // server regardless of whether the field is empty or not. This may be 1359 // used to include empty fields in Patch requests. 1360 ForceSendFields []string `json:"-"` 1361 1362 // NullFields is a list of field names (e.g. "ConfigId") to include in 1363 // API requests with the JSON null value. By default, fields with empty 1364 // values are omitted from API requests. However, any field with an 1365 // empty value appearing in NullFields will be sent to the server as 1366 // null. It is an error if a field in this list has a non-empty value. 1367 // This may be used to include null fields in Patch requests. 1368 NullFields []string `json:"-"` 1369} 1370 1371func (s *EndpointsApiService) MarshalJSON() ([]byte, error) { 1372 type NoMethod EndpointsApiService 1373 raw := NoMethod(*s) 1374 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1375} 1376 1377// Entrypoint: The entrypoint for the application. 1378type Entrypoint struct { 1379 // Shell: The format should be a shell command that can be fed to bash 1380 // -c. 1381 Shell string `json:"shell,omitempty"` 1382 1383 // ForceSendFields is a list of field names (e.g. "Shell") to 1384 // unconditionally include in API requests. By default, fields with 1385 // empty values are omitted from API requests. However, any non-pointer, 1386 // non-interface field appearing in ForceSendFields will be sent to the 1387 // server regardless of whether the field is empty or not. This may be 1388 // used to include empty fields in Patch requests. 1389 ForceSendFields []string `json:"-"` 1390 1391 // NullFields is a list of field names (e.g. "Shell") to include in API 1392 // requests with the JSON null value. By default, fields with empty 1393 // values are omitted from API requests. However, any field with an 1394 // empty value appearing in NullFields will be sent to the server as 1395 // null. It is an error if a field in this list has a non-empty value. 1396 // This may be used to include null fields in Patch requests. 1397 NullFields []string `json:"-"` 1398} 1399 1400func (s *Entrypoint) MarshalJSON() ([]byte, error) { 1401 type NoMethod Entrypoint 1402 raw := NoMethod(*s) 1403 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1404} 1405 1406// ErrorHandler: Custom static error page to be served when an error 1407// occurs. 1408type ErrorHandler struct { 1409 // ErrorCode: Error condition this handler applies to. 1410 // 1411 // Possible values: 1412 // "ERROR_CODE_UNSPECIFIED" - Not specified. ERROR_CODE_DEFAULT is 1413 // assumed. 1414 // "ERROR_CODE_DEFAULT" - All other error types. 1415 // "ERROR_CODE_OVER_QUOTA" - Application has exceeded a resource 1416 // quota. 1417 // "ERROR_CODE_DOS_API_DENIAL" - Client blocked by the application's 1418 // Denial of Service protection configuration. 1419 // "ERROR_CODE_TIMEOUT" - Deadline reached before the application 1420 // responds. 1421 ErrorCode string `json:"errorCode,omitempty"` 1422 1423 // MimeType: MIME type of file. Defaults to text/html. 1424 MimeType string `json:"mimeType,omitempty"` 1425 1426 // StaticFile: Static file content to be served for this error. 1427 StaticFile string `json:"staticFile,omitempty"` 1428 1429 // ForceSendFields is a list of field names (e.g. "ErrorCode") to 1430 // unconditionally include in API requests. By default, fields with 1431 // empty values are omitted from API requests. However, any non-pointer, 1432 // non-interface field appearing in ForceSendFields will be sent to the 1433 // server regardless of whether the field is empty or not. This may be 1434 // used to include empty fields in Patch requests. 1435 ForceSendFields []string `json:"-"` 1436 1437 // NullFields is a list of field names (e.g. "ErrorCode") to include in 1438 // API requests with the JSON null value. By default, fields with empty 1439 // values are omitted from API requests. However, any field with an 1440 // empty value appearing in NullFields will be sent to the server as 1441 // null. It is an error if a field in this list has a non-empty value. 1442 // This may be used to include null fields in Patch requests. 1443 NullFields []string `json:"-"` 1444} 1445 1446func (s *ErrorHandler) MarshalJSON() ([]byte, error) { 1447 type NoMethod ErrorHandler 1448 raw := NoMethod(*s) 1449 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1450} 1451 1452// FeatureSettings: The feature specific settings to be used in the 1453// application. These define behaviors that are user configurable. 1454type FeatureSettings struct { 1455 // SplitHealthChecks: Boolean value indicating if split health checks 1456 // should be used instead of the legacy health checks. At an app.yaml 1457 // level, this means defaulting to 'readiness_check' and 1458 // 'liveness_check' values instead of 'health_check' ones. Once the 1459 // legacy 'health_check' behavior is deprecated, and this value is 1460 // always true, this setting can be removed. 1461 SplitHealthChecks bool `json:"splitHealthChecks,omitempty"` 1462 1463 // UseContainerOptimizedOs: If true, use Container-Optimized OS 1464 // (https://cloud.google.com/container-optimized-os/) base image for 1465 // VMs, rather than a base Debian image. 1466 UseContainerOptimizedOs bool `json:"useContainerOptimizedOs,omitempty"` 1467 1468 // ForceSendFields is a list of field names (e.g. "SplitHealthChecks") 1469 // to unconditionally include in API requests. By default, fields with 1470 // empty values are omitted from API requests. However, any non-pointer, 1471 // non-interface field appearing in ForceSendFields will be sent to the 1472 // server regardless of whether the field is empty or not. This may be 1473 // used to include empty fields in Patch requests. 1474 ForceSendFields []string `json:"-"` 1475 1476 // NullFields is a list of field names (e.g. "SplitHealthChecks") to 1477 // include in API requests with the JSON null value. By default, fields 1478 // with empty values are omitted from API requests. However, any field 1479 // with an empty value appearing in NullFields will be sent to the 1480 // server as null. It is an error if a field in this list has a 1481 // non-empty value. This may be used to include null fields in Patch 1482 // requests. 1483 NullFields []string `json:"-"` 1484} 1485 1486func (s *FeatureSettings) MarshalJSON() ([]byte, error) { 1487 type NoMethod FeatureSettings 1488 raw := NoMethod(*s) 1489 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1490} 1491 1492// FileInfo: Single source file that is part of the version to be 1493// deployed. Each source file that is deployed must be specified 1494// separately. 1495type FileInfo struct { 1496 // MimeType: The MIME type of the file.Defaults to the value from Google 1497 // Cloud Storage. 1498 MimeType string `json:"mimeType,omitempty"` 1499 1500 // Sha1Sum: The SHA1 hash of the file, in hex. 1501 Sha1Sum string `json:"sha1Sum,omitempty"` 1502 1503 // SourceUrl: URL source to use to fetch this file. Must be a URL to a 1504 // resource in Google Cloud Storage in the form 1505 // 'http(s)://storage.googleapis.com/<bucket>/<object>'. 1506 SourceUrl string `json:"sourceUrl,omitempty"` 1507 1508 // ForceSendFields is a list of field names (e.g. "MimeType") to 1509 // unconditionally include in API requests. By default, fields with 1510 // empty values are omitted from API requests. However, any non-pointer, 1511 // non-interface field appearing in ForceSendFields will be sent to the 1512 // server regardless of whether the field is empty or not. This may be 1513 // used to include empty fields in Patch requests. 1514 ForceSendFields []string `json:"-"` 1515 1516 // NullFields is a list of field names (e.g. "MimeType") to include in 1517 // API requests with the JSON null value. By default, fields with empty 1518 // values are omitted from API requests. However, any field with an 1519 // empty value appearing in NullFields will be sent to the server as 1520 // null. It is an error if a field in this list has a non-empty value. 1521 // This may be used to include null fields in Patch requests. 1522 NullFields []string `json:"-"` 1523} 1524 1525func (s *FileInfo) MarshalJSON() ([]byte, error) { 1526 type NoMethod FileInfo 1527 raw := NoMethod(*s) 1528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1529} 1530 1531// FirewallRule: A single firewall rule that is evaluated against 1532// incoming traffic and provides an action to take on matched requests. 1533type FirewallRule struct { 1534 // Action: The action to take on matched requests. 1535 // 1536 // Possible values: 1537 // "UNSPECIFIED_ACTION" 1538 // "ALLOW" - Matching requests are allowed. 1539 // "DENY" - Matching requests are denied. 1540 Action string `json:"action,omitempty"` 1541 1542 // Description: An optional string description of this rule. This field 1543 // has a maximum length of 100 characters. 1544 Description string `json:"description,omitempty"` 1545 1546 // Priority: A positive integer between 1, Int32.MaxValue-1 that defines 1547 // the order of rule evaluation. Rules with the lowest priority are 1548 // evaluated first.A default rule at priority Int32.MaxValue matches all 1549 // IPv4 and IPv6 traffic when no previous rule matches. Only the action 1550 // of this rule can be modified by the user. 1551 Priority int64 `json:"priority,omitempty"` 1552 1553 // SourceRange: IP address or range, defined using CIDR notation, of 1554 // requests that this rule applies to. You can use the wildcard 1555 // character "*" to match all IPs equivalent to "0/0" and "::/0" 1556 // together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 1557 // or 2001:0db8:0000:0042:0000:8a2e:0370:7334.<p>Truncation will be 1558 // silently performed on addresses which are not properly truncated. For 1559 // example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. 1560 // Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address 1561 // as 2001:db8::/32. 1562 SourceRange string `json:"sourceRange,omitempty"` 1563 1564 // ServerResponse contains the HTTP response code and headers from the 1565 // server. 1566 googleapi.ServerResponse `json:"-"` 1567 1568 // ForceSendFields is a list of field names (e.g. "Action") to 1569 // unconditionally include in API requests. By default, fields with 1570 // empty values are omitted from API requests. However, any non-pointer, 1571 // non-interface field appearing in ForceSendFields will be sent to the 1572 // server regardless of whether the field is empty or not. This may be 1573 // used to include empty fields in Patch requests. 1574 ForceSendFields []string `json:"-"` 1575 1576 // NullFields is a list of field names (e.g. "Action") to include in API 1577 // requests with the JSON null value. By default, fields with empty 1578 // values are omitted from API requests. However, any field with an 1579 // empty value appearing in NullFields will be sent to the server as 1580 // null. It is an error if a field in this list has a non-empty value. 1581 // This may be used to include null fields in Patch requests. 1582 NullFields []string `json:"-"` 1583} 1584 1585func (s *FirewallRule) MarshalJSON() ([]byte, error) { 1586 type NoMethod FirewallRule 1587 raw := NoMethod(*s) 1588 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1589} 1590 1591// HealthCheck: Health checking configuration for VM instances. 1592// Unhealthy instances are killed and replaced with new instances. Only 1593// applicable for instances in App Engine flexible environment. 1594type HealthCheck struct { 1595 // CheckInterval: Interval between health checks. 1596 CheckInterval string `json:"checkInterval,omitempty"` 1597 1598 // DisableHealthCheck: Whether to explicitly disable health checks for 1599 // this instance. 1600 DisableHealthCheck bool `json:"disableHealthCheck,omitempty"` 1601 1602 // HealthyThreshold: Number of consecutive successful health checks 1603 // required before receiving traffic. 1604 HealthyThreshold int64 `json:"healthyThreshold,omitempty"` 1605 1606 // Host: Host header to send when performing an HTTP health check. 1607 // Example: "myapp.appspot.com" 1608 Host string `json:"host,omitempty"` 1609 1610 // RestartThreshold: Number of consecutive failed health checks required 1611 // before an instance is restarted. 1612 RestartThreshold int64 `json:"restartThreshold,omitempty"` 1613 1614 // Timeout: Time before the health check is considered failed. 1615 Timeout string `json:"timeout,omitempty"` 1616 1617 // UnhealthyThreshold: Number of consecutive failed health checks 1618 // required before removing traffic. 1619 UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` 1620 1621 // ForceSendFields is a list of field names (e.g. "CheckInterval") to 1622 // unconditionally include in API requests. By default, fields with 1623 // empty values are omitted from API requests. However, any non-pointer, 1624 // non-interface field appearing in ForceSendFields will be sent to the 1625 // server regardless of whether the field is empty or not. This may be 1626 // used to include empty fields in Patch requests. 1627 ForceSendFields []string `json:"-"` 1628 1629 // NullFields is a list of field names (e.g. "CheckInterval") to include 1630 // in API requests with the JSON null value. By default, fields with 1631 // empty values are omitted from API requests. However, any field with 1632 // an empty value appearing in NullFields will be sent to the server as 1633 // null. It is an error if a field in this list has a non-empty value. 1634 // This may be used to include null fields in Patch requests. 1635 NullFields []string `json:"-"` 1636} 1637 1638func (s *HealthCheck) MarshalJSON() ([]byte, error) { 1639 type NoMethod HealthCheck 1640 raw := NoMethod(*s) 1641 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1642} 1643 1644// IdentityAwareProxy: Identity-Aware Proxy 1645type IdentityAwareProxy struct { 1646 // Enabled: Whether the serving infrastructure will authenticate and 1647 // authorize all incoming requests.If true, the oauth2_client_id and 1648 // oauth2_client_secret fields must be non-empty. 1649 Enabled bool `json:"enabled,omitempty"` 1650 1651 // Oauth2ClientId: OAuth2 client ID to use for the authentication flow. 1652 Oauth2ClientId string `json:"oauth2ClientId,omitempty"` 1653 1654 // Oauth2ClientSecret: OAuth2 client secret to use for the 1655 // authentication flow.For security reasons, this value cannot be 1656 // retrieved via the API. Instead, the SHA-256 hash of the value is 1657 // returned in the oauth2_client_secret_sha256 field.@InputOnly 1658 Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` 1659 1660 // Oauth2ClientSecretSha256: Hex-encoded SHA-256 hash of the client 1661 // secret.@OutputOnly 1662 Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"` 1663 1664 // ForceSendFields is a list of field names (e.g. "Enabled") to 1665 // unconditionally include in API requests. By default, fields with 1666 // empty values are omitted from API requests. However, any non-pointer, 1667 // non-interface field appearing in ForceSendFields will be sent to the 1668 // server regardless of whether the field is empty or not. This may be 1669 // used to include empty fields in Patch requests. 1670 ForceSendFields []string `json:"-"` 1671 1672 // NullFields is a list of field names (e.g. "Enabled") to include in 1673 // API requests with the JSON null value. By default, fields with empty 1674 // values are omitted from API requests. However, any field with an 1675 // empty value appearing in NullFields will be sent to the server as 1676 // null. It is an error if a field in this list has a non-empty value. 1677 // This may be used to include null fields in Patch requests. 1678 NullFields []string `json:"-"` 1679} 1680 1681func (s *IdentityAwareProxy) MarshalJSON() ([]byte, error) { 1682 type NoMethod IdentityAwareProxy 1683 raw := NoMethod(*s) 1684 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1685} 1686 1687// Instance: An Instance resource is the computing unit that App Engine 1688// uses to automatically scale an application. 1689type Instance struct { 1690 // AppEngineRelease: App Engine release this instance is running 1691 // on.@OutputOnly 1692 AppEngineRelease string `json:"appEngineRelease,omitempty"` 1693 1694 // Availability: Availability of the instance.@OutputOnly 1695 // 1696 // Possible values: 1697 // "UNSPECIFIED" 1698 // "RESIDENT" 1699 // "DYNAMIC" 1700 Availability string `json:"availability,omitempty"` 1701 1702 // AverageLatency: Average latency (ms) over the last minute.@OutputOnly 1703 AverageLatency int64 `json:"averageLatency,omitempty"` 1704 1705 // Errors: Number of errors since this instance was started.@OutputOnly 1706 Errors int64 `json:"errors,omitempty"` 1707 1708 // Id: Relative name of the instance within the version. Example: 1709 // instance-1.@OutputOnly 1710 Id string `json:"id,omitempty"` 1711 1712 // MemoryUsage: Total memory in use (bytes).@OutputOnly 1713 MemoryUsage int64 `json:"memoryUsage,omitempty,string"` 1714 1715 // Name: Full path to the Instance resource in the API. Example: 1716 // apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOn 1717 // ly 1718 Name string `json:"name,omitempty"` 1719 1720 // Qps: Average queries per second (QPS) over the last 1721 // minute.@OutputOnly 1722 Qps float64 `json:"qps,omitempty"` 1723 1724 // Requests: Number of requests since this instance was 1725 // started.@OutputOnly 1726 Requests int64 `json:"requests,omitempty"` 1727 1728 // StartTime: Time that this instance was started.@OutputOnly 1729 StartTime string `json:"startTime,omitempty"` 1730 1731 // VmDebugEnabled: Whether this instance is in debug mode. Only 1732 // applicable for instances in App Engine flexible 1733 // environment.@OutputOnly 1734 VmDebugEnabled bool `json:"vmDebugEnabled,omitempty"` 1735 1736 // VmId: Virtual machine ID of this instance. Only applicable for 1737 // instances in App Engine flexible environment.@OutputOnly 1738 VmId string `json:"vmId,omitempty"` 1739 1740 // VmIp: The IP address of this instance. Only applicable for instances 1741 // in App Engine flexible environment.@OutputOnly 1742 VmIp string `json:"vmIp,omitempty"` 1743 1744 // VmName: Name of the virtual machine where this instance lives. Only 1745 // applicable for instances in App Engine flexible 1746 // environment.@OutputOnly 1747 VmName string `json:"vmName,omitempty"` 1748 1749 // VmStatus: Status of the virtual machine where this instance lives. 1750 // Only applicable for instances in App Engine flexible 1751 // environment.@OutputOnly 1752 VmStatus string `json:"vmStatus,omitempty"` 1753 1754 // VmZoneName: Zone where the virtual machine is located. Only 1755 // applicable for instances in App Engine flexible 1756 // environment.@OutputOnly 1757 VmZoneName string `json:"vmZoneName,omitempty"` 1758 1759 // ServerResponse contains the HTTP response code and headers from the 1760 // server. 1761 googleapi.ServerResponse `json:"-"` 1762 1763 // ForceSendFields is a list of field names (e.g. "AppEngineRelease") to 1764 // unconditionally include in API requests. By default, fields with 1765 // empty values are omitted from API requests. However, any non-pointer, 1766 // non-interface field appearing in ForceSendFields will be sent to the 1767 // server regardless of whether the field is empty or not. This may be 1768 // used to include empty fields in Patch requests. 1769 ForceSendFields []string `json:"-"` 1770 1771 // NullFields is a list of field names (e.g. "AppEngineRelease") to 1772 // include in API requests with the JSON null value. By default, fields 1773 // with empty values are omitted from API requests. However, any field 1774 // with an empty value appearing in NullFields will be sent to the 1775 // server as null. It is an error if a field in this list has a 1776 // non-empty value. This may be used to include null fields in Patch 1777 // requests. 1778 NullFields []string `json:"-"` 1779} 1780 1781func (s *Instance) MarshalJSON() ([]byte, error) { 1782 type NoMethod Instance 1783 raw := NoMethod(*s) 1784 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1785} 1786 1787func (s *Instance) UnmarshalJSON(data []byte) error { 1788 type NoMethod Instance 1789 var s1 struct { 1790 Qps gensupport.JSONFloat64 `json:"qps"` 1791 *NoMethod 1792 } 1793 s1.NoMethod = (*NoMethod)(s) 1794 if err := json.Unmarshal(data, &s1); err != nil { 1795 return err 1796 } 1797 s.Qps = float64(s1.Qps) 1798 return nil 1799} 1800 1801// Library: Third-party Python runtime library that is required by the 1802// application. 1803type Library struct { 1804 // Name: Name of the library. Example: "django". 1805 Name string `json:"name,omitempty"` 1806 1807 // Version: Version of the library to select, or "latest". 1808 Version string `json:"version,omitempty"` 1809 1810 // ForceSendFields is a list of field names (e.g. "Name") to 1811 // unconditionally include in API requests. By default, fields with 1812 // empty values are omitted from API requests. However, any non-pointer, 1813 // non-interface field appearing in ForceSendFields will be sent to the 1814 // server regardless of whether the field is empty or not. This may be 1815 // used to include empty fields in Patch requests. 1816 ForceSendFields []string `json:"-"` 1817 1818 // NullFields is a list of field names (e.g. "Name") to include in API 1819 // requests with the JSON null value. By default, fields with empty 1820 // values are omitted from API requests. However, any field with an 1821 // empty value appearing in NullFields will be sent to the server as 1822 // null. It is an error if a field in this list has a non-empty value. 1823 // This may be used to include null fields in Patch requests. 1824 NullFields []string `json:"-"` 1825} 1826 1827func (s *Library) MarshalJSON() ([]byte, error) { 1828 type NoMethod Library 1829 raw := NoMethod(*s) 1830 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1831} 1832 1833// ListAuthorizedCertificatesResponse: Response message for 1834// AuthorizedCertificates.ListAuthorizedCertificates. 1835type ListAuthorizedCertificatesResponse struct { 1836 // Certificates: The SSL certificates the user is authorized to 1837 // administer. 1838 Certificates []*AuthorizedCertificate `json:"certificates,omitempty"` 1839 1840 // NextPageToken: Continuation token for fetching the next page of 1841 // results. 1842 NextPageToken string `json:"nextPageToken,omitempty"` 1843 1844 // ServerResponse contains the HTTP response code and headers from the 1845 // server. 1846 googleapi.ServerResponse `json:"-"` 1847 1848 // ForceSendFields is a list of field names (e.g. "Certificates") to 1849 // unconditionally include in API requests. By default, fields with 1850 // empty values are omitted from API requests. However, any non-pointer, 1851 // non-interface field appearing in ForceSendFields will be sent to the 1852 // server regardless of whether the field is empty or not. This may be 1853 // used to include empty fields in Patch requests. 1854 ForceSendFields []string `json:"-"` 1855 1856 // NullFields is a list of field names (e.g. "Certificates") to include 1857 // in API requests with the JSON null value. By default, fields with 1858 // empty values are omitted from API requests. However, any field with 1859 // an empty value appearing in NullFields will be sent to the server as 1860 // null. It is an error if a field in this list has a non-empty value. 1861 // This may be used to include null fields in Patch requests. 1862 NullFields []string `json:"-"` 1863} 1864 1865func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) { 1866 type NoMethod ListAuthorizedCertificatesResponse 1867 raw := NoMethod(*s) 1868 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1869} 1870 1871// ListAuthorizedDomainsResponse: Response message for 1872// AuthorizedDomains.ListAuthorizedDomains. 1873type ListAuthorizedDomainsResponse struct { 1874 // Domains: The authorized domains belonging to the user. 1875 Domains []*AuthorizedDomain `json:"domains,omitempty"` 1876 1877 // NextPageToken: Continuation token for fetching the next page of 1878 // results. 1879 NextPageToken string `json:"nextPageToken,omitempty"` 1880 1881 // ServerResponse contains the HTTP response code and headers from the 1882 // server. 1883 googleapi.ServerResponse `json:"-"` 1884 1885 // ForceSendFields is a list of field names (e.g. "Domains") to 1886 // unconditionally include in API requests. By default, fields with 1887 // empty values are omitted from API requests. However, any non-pointer, 1888 // non-interface field appearing in ForceSendFields will be sent to the 1889 // server regardless of whether the field is empty or not. This may be 1890 // used to include empty fields in Patch requests. 1891 ForceSendFields []string `json:"-"` 1892 1893 // NullFields is a list of field names (e.g. "Domains") to include in 1894 // API requests with the JSON null value. By default, fields with empty 1895 // values are omitted from API requests. However, any field with an 1896 // empty value appearing in NullFields will be sent to the server as 1897 // null. It is an error if a field in this list has a non-empty value. 1898 // This may be used to include null fields in Patch requests. 1899 NullFields []string `json:"-"` 1900} 1901 1902func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) { 1903 type NoMethod ListAuthorizedDomainsResponse 1904 raw := NoMethod(*s) 1905 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1906} 1907 1908// ListDomainMappingsResponse: Response message for 1909// DomainMappings.ListDomainMappings. 1910type ListDomainMappingsResponse struct { 1911 // DomainMappings: The domain mappings for the application. 1912 DomainMappings []*DomainMapping `json:"domainMappings,omitempty"` 1913 1914 // NextPageToken: Continuation token for fetching the next page of 1915 // results. 1916 NextPageToken string `json:"nextPageToken,omitempty"` 1917 1918 // ServerResponse contains the HTTP response code and headers from the 1919 // server. 1920 googleapi.ServerResponse `json:"-"` 1921 1922 // ForceSendFields is a list of field names (e.g. "DomainMappings") to 1923 // unconditionally include in API requests. By default, fields with 1924 // empty values are omitted from API requests. However, any non-pointer, 1925 // non-interface field appearing in ForceSendFields will be sent to the 1926 // server regardless of whether the field is empty or not. This may be 1927 // used to include empty fields in Patch requests. 1928 ForceSendFields []string `json:"-"` 1929 1930 // NullFields is a list of field names (e.g. "DomainMappings") to 1931 // include in API requests with the JSON null value. By default, fields 1932 // with empty values are omitted from API requests. However, any field 1933 // with an empty value appearing in NullFields will be sent to the 1934 // server as null. It is an error if a field in this list has a 1935 // non-empty value. This may be used to include null fields in Patch 1936 // requests. 1937 NullFields []string `json:"-"` 1938} 1939 1940func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) { 1941 type NoMethod ListDomainMappingsResponse 1942 raw := NoMethod(*s) 1943 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1944} 1945 1946// ListIngressRulesResponse: Response message for 1947// Firewall.ListIngressRules. 1948type ListIngressRulesResponse struct { 1949 // IngressRules: The ingress FirewallRules for this application. 1950 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 1951 1952 // NextPageToken: Continuation token for fetching the next page of 1953 // results. 1954 NextPageToken string `json:"nextPageToken,omitempty"` 1955 1956 // ServerResponse contains the HTTP response code and headers from the 1957 // server. 1958 googleapi.ServerResponse `json:"-"` 1959 1960 // ForceSendFields is a list of field names (e.g. "IngressRules") to 1961 // unconditionally include in API requests. By default, fields with 1962 // empty values are omitted from API requests. However, any non-pointer, 1963 // non-interface field appearing in ForceSendFields will be sent to the 1964 // server regardless of whether the field is empty or not. This may be 1965 // used to include empty fields in Patch requests. 1966 ForceSendFields []string `json:"-"` 1967 1968 // NullFields is a list of field names (e.g. "IngressRules") to include 1969 // in API requests with the JSON null value. By default, fields with 1970 // empty values are omitted from API requests. However, any field with 1971 // an empty value appearing in NullFields will be sent to the server as 1972 // null. It is an error if a field in this list has a non-empty value. 1973 // This may be used to include null fields in Patch requests. 1974 NullFields []string `json:"-"` 1975} 1976 1977func (s *ListIngressRulesResponse) MarshalJSON() ([]byte, error) { 1978 type NoMethod ListIngressRulesResponse 1979 raw := NoMethod(*s) 1980 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1981} 1982 1983// ListInstancesResponse: Response message for Instances.ListInstances. 1984type ListInstancesResponse struct { 1985 // Instances: The instances belonging to the requested version. 1986 Instances []*Instance `json:"instances,omitempty"` 1987 1988 // NextPageToken: Continuation token for fetching the next page of 1989 // results. 1990 NextPageToken string `json:"nextPageToken,omitempty"` 1991 1992 // ServerResponse contains the HTTP response code and headers from the 1993 // server. 1994 googleapi.ServerResponse `json:"-"` 1995 1996 // ForceSendFields is a list of field names (e.g. "Instances") to 1997 // unconditionally include in API requests. By default, fields with 1998 // empty values are omitted from API requests. However, any non-pointer, 1999 // non-interface field appearing in ForceSendFields will be sent to the 2000 // server regardless of whether the field is empty or not. This may be 2001 // used to include empty fields in Patch requests. 2002 ForceSendFields []string `json:"-"` 2003 2004 // NullFields is a list of field names (e.g. "Instances") to include in 2005 // API requests with the JSON null value. By default, fields with empty 2006 // values are omitted from API requests. However, any field with an 2007 // empty value appearing in NullFields will be sent to the server as 2008 // null. It is an error if a field in this list has a non-empty value. 2009 // This may be used to include null fields in Patch requests. 2010 NullFields []string `json:"-"` 2011} 2012 2013func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) { 2014 type NoMethod ListInstancesResponse 2015 raw := NoMethod(*s) 2016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2017} 2018 2019// ListLocationsResponse: The response message for 2020// Locations.ListLocations. 2021type ListLocationsResponse struct { 2022 // Locations: A list of locations that matches the specified filter in 2023 // the request. 2024 Locations []*Location `json:"locations,omitempty"` 2025 2026 // NextPageToken: The standard List next-page token. 2027 NextPageToken string `json:"nextPageToken,omitempty"` 2028 2029 // ServerResponse contains the HTTP response code and headers from the 2030 // server. 2031 googleapi.ServerResponse `json:"-"` 2032 2033 // ForceSendFields is a list of field names (e.g. "Locations") to 2034 // unconditionally include in API requests. By default, fields with 2035 // empty values are omitted from API requests. However, any non-pointer, 2036 // non-interface field appearing in ForceSendFields will be sent to the 2037 // server regardless of whether the field is empty or not. This may be 2038 // used to include empty fields in Patch requests. 2039 ForceSendFields []string `json:"-"` 2040 2041 // NullFields is a list of field names (e.g. "Locations") to include in 2042 // API requests with the JSON null value. By default, fields with empty 2043 // values are omitted from API requests. However, any field with an 2044 // empty value appearing in NullFields will be sent to the server as 2045 // null. It is an error if a field in this list has a non-empty value. 2046 // This may be used to include null fields in Patch requests. 2047 NullFields []string `json:"-"` 2048} 2049 2050func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 2051 type NoMethod ListLocationsResponse 2052 raw := NoMethod(*s) 2053 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2054} 2055 2056// ListOperationsResponse: The response message for 2057// Operations.ListOperations. 2058type ListOperationsResponse struct { 2059 // NextPageToken: The standard List next-page token. 2060 NextPageToken string `json:"nextPageToken,omitempty"` 2061 2062 // Operations: A list of operations that matches the specified filter in 2063 // the request. 2064 Operations []*Operation `json:"operations,omitempty"` 2065 2066 // ServerResponse contains the HTTP response code and headers from the 2067 // server. 2068 googleapi.ServerResponse `json:"-"` 2069 2070 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2071 // unconditionally include in API requests. By default, fields with 2072 // empty values are omitted from API requests. However, any non-pointer, 2073 // non-interface field appearing in ForceSendFields will be sent to the 2074 // server regardless of whether the field is empty or not. This may be 2075 // used to include empty fields in Patch requests. 2076 ForceSendFields []string `json:"-"` 2077 2078 // NullFields is a list of field names (e.g. "NextPageToken") to include 2079 // in API requests with the JSON null value. By default, fields with 2080 // empty values are omitted from API requests. However, any field with 2081 // an empty value appearing in NullFields will be sent to the server as 2082 // null. It is an error if a field in this list has a non-empty value. 2083 // This may be used to include null fields in Patch requests. 2084 NullFields []string `json:"-"` 2085} 2086 2087func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 2088 type NoMethod ListOperationsResponse 2089 raw := NoMethod(*s) 2090 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2091} 2092 2093// ListServicesResponse: Response message for Services.ListServices. 2094type ListServicesResponse struct { 2095 // NextPageToken: Continuation token for fetching the next page of 2096 // results. 2097 NextPageToken string `json:"nextPageToken,omitempty"` 2098 2099 // Services: The services belonging to the requested application. 2100 Services []*Service `json:"services,omitempty"` 2101 2102 // ServerResponse contains the HTTP response code and headers from the 2103 // server. 2104 googleapi.ServerResponse `json:"-"` 2105 2106 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2107 // unconditionally include in API requests. By default, fields with 2108 // empty values are omitted from API requests. However, any non-pointer, 2109 // non-interface field appearing in ForceSendFields will be sent to the 2110 // server regardless of whether the field is empty or not. This may be 2111 // used to include empty fields in Patch requests. 2112 ForceSendFields []string `json:"-"` 2113 2114 // NullFields is a list of field names (e.g. "NextPageToken") to include 2115 // in API requests with the JSON null value. By default, fields with 2116 // empty values are omitted from API requests. However, any field with 2117 // an empty value appearing in NullFields will be sent to the server as 2118 // null. It is an error if a field in this list has a non-empty value. 2119 // This may be used to include null fields in Patch requests. 2120 NullFields []string `json:"-"` 2121} 2122 2123func (s *ListServicesResponse) MarshalJSON() ([]byte, error) { 2124 type NoMethod ListServicesResponse 2125 raw := NoMethod(*s) 2126 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2127} 2128 2129// ListVersionsResponse: Response message for Versions.ListVersions. 2130type ListVersionsResponse struct { 2131 // NextPageToken: Continuation token for fetching the next page of 2132 // results. 2133 NextPageToken string `json:"nextPageToken,omitempty"` 2134 2135 // Versions: The versions belonging to the requested service. 2136 Versions []*Version `json:"versions,omitempty"` 2137 2138 // ServerResponse contains the HTTP response code and headers from the 2139 // server. 2140 googleapi.ServerResponse `json:"-"` 2141 2142 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2143 // unconditionally include in API requests. By default, fields with 2144 // empty values are omitted from API requests. However, any non-pointer, 2145 // non-interface field appearing in ForceSendFields will be sent to the 2146 // server regardless of whether the field is empty or not. This may be 2147 // used to include empty fields in Patch requests. 2148 ForceSendFields []string `json:"-"` 2149 2150 // NullFields is a list of field names (e.g. "NextPageToken") to include 2151 // in API requests with the JSON null value. By default, fields with 2152 // empty values are omitted from API requests. However, any field with 2153 // an empty value appearing in NullFields will be sent to the server as 2154 // null. It is an error if a field in this list has a non-empty value. 2155 // This may be used to include null fields in Patch requests. 2156 NullFields []string `json:"-"` 2157} 2158 2159func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) { 2160 type NoMethod ListVersionsResponse 2161 raw := NoMethod(*s) 2162 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2163} 2164 2165// LivenessCheck: Health checking configuration for VM instances. 2166// Unhealthy instances are killed and replaced with new instances. 2167type LivenessCheck struct { 2168 // CheckInterval: Interval between health checks. 2169 CheckInterval string `json:"checkInterval,omitempty"` 2170 2171 // FailureThreshold: Number of consecutive failed checks required before 2172 // considering the VM unhealthy. 2173 FailureThreshold int64 `json:"failureThreshold,omitempty"` 2174 2175 // Host: Host header to send when performing a HTTP Liveness check. 2176 // Example: "myapp.appspot.com" 2177 Host string `json:"host,omitempty"` 2178 2179 // InitialDelay: The initial delay before starting to execute the 2180 // checks. 2181 InitialDelay string `json:"initialDelay,omitempty"` 2182 2183 // Path: The request path. 2184 Path string `json:"path,omitempty"` 2185 2186 // SuccessThreshold: Number of consecutive successful checks required 2187 // before considering the VM healthy. 2188 SuccessThreshold int64 `json:"successThreshold,omitempty"` 2189 2190 // Timeout: Time before the check is considered failed. 2191 Timeout string `json:"timeout,omitempty"` 2192 2193 // ForceSendFields is a list of field names (e.g. "CheckInterval") to 2194 // unconditionally include in API requests. By default, fields with 2195 // empty values are omitted from API requests. However, any non-pointer, 2196 // non-interface field appearing in ForceSendFields will be sent to the 2197 // server regardless of whether the field is empty or not. This may be 2198 // used to include empty fields in Patch requests. 2199 ForceSendFields []string `json:"-"` 2200 2201 // NullFields is a list of field names (e.g. "CheckInterval") to include 2202 // in API requests with the JSON null value. By default, fields with 2203 // empty values are omitted from API requests. However, any field with 2204 // an empty value appearing in NullFields will be sent to the server as 2205 // null. It is an error if a field in this list has a non-empty value. 2206 // This may be used to include null fields in Patch requests. 2207 NullFields []string `json:"-"` 2208} 2209 2210func (s *LivenessCheck) MarshalJSON() ([]byte, error) { 2211 type NoMethod LivenessCheck 2212 raw := NoMethod(*s) 2213 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2214} 2215 2216// Location: A resource that represents Google Cloud Platform location. 2217type Location struct { 2218 // DisplayName: The friendly name for this location, typically a nearby 2219 // city name. For example, "Tokyo". 2220 DisplayName string `json:"displayName,omitempty"` 2221 2222 // Labels: Cross-service attributes for the location. For 2223 // example 2224 // {"cloud.googleapis.com/region": "us-east1"} 2225 // 2226 Labels map[string]string `json:"labels,omitempty"` 2227 2228 // LocationId: The canonical id for this location. For example: 2229 // "us-east1". 2230 LocationId string `json:"locationId,omitempty"` 2231 2232 // Metadata: Service-specific metadata. For example the available 2233 // capacity at the given location. 2234 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2235 2236 // Name: Resource name for the location, which may vary between 2237 // implementations. For example: 2238 // "projects/example-project/locations/us-east1" 2239 Name string `json:"name,omitempty"` 2240 2241 // ServerResponse contains the HTTP response code and headers from the 2242 // server. 2243 googleapi.ServerResponse `json:"-"` 2244 2245 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2246 // unconditionally include in API requests. By default, fields with 2247 // empty values are omitted from API requests. However, any non-pointer, 2248 // non-interface field appearing in ForceSendFields will be sent to the 2249 // server regardless of whether the field is empty or not. This may be 2250 // used to include empty fields in Patch requests. 2251 ForceSendFields []string `json:"-"` 2252 2253 // NullFields is a list of field names (e.g. "DisplayName") to include 2254 // in API requests with the JSON null value. By default, fields with 2255 // empty values are omitted from API requests. However, any field with 2256 // an empty value appearing in NullFields will be sent to the server as 2257 // null. It is an error if a field in this list has a non-empty value. 2258 // This may be used to include null fields in Patch requests. 2259 NullFields []string `json:"-"` 2260} 2261 2262func (s *Location) MarshalJSON() ([]byte, error) { 2263 type NoMethod Location 2264 raw := NoMethod(*s) 2265 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2266} 2267 2268// LocationMetadata: Metadata for the given 2269// google.cloud.location.Location. 2270type LocationMetadata struct { 2271 // FlexibleEnvironmentAvailable: App Engine flexible environment is 2272 // available in the given location.@OutputOnly 2273 FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"` 2274 2275 // StandardEnvironmentAvailable: App Engine standard environment is 2276 // available in the given location.@OutputOnly 2277 StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"` 2278 2279 // ForceSendFields is a list of field names (e.g. 2280 // "FlexibleEnvironmentAvailable") to unconditionally include in API 2281 // requests. By default, fields with empty values are omitted from API 2282 // requests. However, any non-pointer, non-interface field appearing in 2283 // ForceSendFields will be sent to the server regardless of whether the 2284 // field is empty or not. This may be used to include empty fields in 2285 // Patch requests. 2286 ForceSendFields []string `json:"-"` 2287 2288 // NullFields is a list of field names (e.g. 2289 // "FlexibleEnvironmentAvailable") to include in API requests with the 2290 // JSON null value. By default, fields with empty values are omitted 2291 // from API requests. However, any field with an empty value appearing 2292 // in NullFields will be sent to the server as null. It is an error if a 2293 // field in this list has a non-empty value. This may be used to include 2294 // null fields in Patch requests. 2295 NullFields []string `json:"-"` 2296} 2297 2298func (s *LocationMetadata) MarshalJSON() ([]byte, error) { 2299 type NoMethod LocationMetadata 2300 raw := NoMethod(*s) 2301 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2302} 2303 2304// ManagedCertificate: A certificate managed by App Engine. 2305type ManagedCertificate struct { 2306 // LastRenewalTime: Time at which the certificate was last renewed. The 2307 // renewal process is fully managed. Certificate renewal will 2308 // automatically occur before the certificate expires. Renewal errors 2309 // can be tracked via ManagementStatus.@OutputOnly 2310 LastRenewalTime string `json:"lastRenewalTime,omitempty"` 2311 2312 // Status: Status of certificate management. Refers to the most recent 2313 // certificate acquisition or renewal attempt.@OutputOnly 2314 // 2315 // Possible values: 2316 // "MANAGEMENT_STATUS_UNSPECIFIED" 2317 // "OK" - Certificate was successfully obtained and inserted into the 2318 // serving system. 2319 // "PENDING" - Certificate is under active attempts to acquire or 2320 // renew. 2321 // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to 2322 // an invalid DNS setup and will be retried. Renewal attempts will 2323 // continue to fail until the certificate domain's DNS configuration is 2324 // fixed. The last successfully provisioned certificate may still be 2325 // serving. 2326 // "FAILED_PERMANENT" - All renewal attempts have been exhausted, 2327 // likely due to an invalid DNS setup. 2328 // "FAILED_RETRYING_CAA_FORBIDDEN" - Most recent renewal failed due to 2329 // an explicit CAA record that does not include the in-use CA, Let's 2330 // Encrypt. Renewals will continue to fail until the CAA is 2331 // reconfigured. The last successfully provisioned certificate may still 2332 // be serving. 2333 // "FAILED_RETRYING_CAA_CHECKING" - Most recent renewal failed due to 2334 // a CAA retrieval failure. This means that the domain's DNS provider 2335 // does not properly handle CAA records, failing requests for CAA 2336 // records when no CAA records are defined. Renewals will continue to 2337 // fail until the DNS provider is changed or a CAA record is added for 2338 // the given domain. The last successfully provisioned certificate may 2339 // still be serving. 2340 Status string `json:"status,omitempty"` 2341 2342 // ForceSendFields is a list of field names (e.g. "LastRenewalTime") to 2343 // unconditionally include in API requests. By default, fields with 2344 // empty values are omitted from API requests. However, any non-pointer, 2345 // non-interface field appearing in ForceSendFields will be sent to the 2346 // server regardless of whether the field is empty or not. This may be 2347 // used to include empty fields in Patch requests. 2348 ForceSendFields []string `json:"-"` 2349 2350 // NullFields is a list of field names (e.g. "LastRenewalTime") to 2351 // include in API requests with the JSON null value. By default, fields 2352 // with empty values are omitted from API requests. However, any field 2353 // with an empty value appearing in NullFields will be sent to the 2354 // server as null. It is an error if a field in this list has a 2355 // non-empty value. This may be used to include null fields in Patch 2356 // requests. 2357 NullFields []string `json:"-"` 2358} 2359 2360func (s *ManagedCertificate) MarshalJSON() ([]byte, error) { 2361 type NoMethod ManagedCertificate 2362 raw := NoMethod(*s) 2363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2364} 2365 2366// ManualScaling: A service with manual scaling runs continuously, 2367// allowing you to perform complex initialization and rely on the state 2368// of its memory over time. 2369type ManualScaling struct { 2370 // Instances: Number of instances to assign to the service at the start. 2371 // This number can later be altered by using the Modules API 2372 // (https://cloud.google.com/appengine/docs/python/modules/functions) 2373 // set_num_instances() function. 2374 Instances int64 `json:"instances,omitempty"` 2375 2376 // ForceSendFields is a list of field names (e.g. "Instances") to 2377 // unconditionally include in API requests. By default, fields with 2378 // empty values are omitted from API requests. However, any non-pointer, 2379 // non-interface field appearing in ForceSendFields will be sent to the 2380 // server regardless of whether the field is empty or not. This may be 2381 // used to include empty fields in Patch requests. 2382 ForceSendFields []string `json:"-"` 2383 2384 // NullFields is a list of field names (e.g. "Instances") to include in 2385 // API requests with the JSON null value. By default, fields with empty 2386 // values are omitted from API requests. However, any field with an 2387 // empty value appearing in NullFields will be sent to the server as 2388 // null. It is an error if a field in this list has a non-empty value. 2389 // This may be used to include null fields in Patch requests. 2390 NullFields []string `json:"-"` 2391} 2392 2393func (s *ManualScaling) MarshalJSON() ([]byte, error) { 2394 type NoMethod ManualScaling 2395 raw := NoMethod(*s) 2396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2397} 2398 2399// Network: Extra network settings. Only applicable in the App Engine 2400// flexible environment. 2401type Network struct { 2402 // ForwardedPorts: List of ports, or port pairs, to forward from the 2403 // virtual machine to the application container. Only applicable in the 2404 // App Engine flexible environment. 2405 ForwardedPorts []string `json:"forwardedPorts,omitempty"` 2406 2407 // InstanceTag: Tag to apply to the instance during creation. Only 2408 // applicable in the App Engine flexible environment. 2409 InstanceTag string `json:"instanceTag,omitempty"` 2410 2411 // Name: Google Compute Engine network where the virtual machines are 2412 // created. Specify the short name, not the resource path.Defaults to 2413 // default. 2414 Name string `json:"name,omitempty"` 2415 2416 // SessionAffinity: Enable session affinity. Only applicable in the App 2417 // Engine flexible environment. 2418 SessionAffinity bool `json:"sessionAffinity,omitempty"` 2419 2420 // SubnetworkName: Google Cloud Platform sub-network where the virtual 2421 // machines are created. Specify the short name, not the resource 2422 // path.If a subnetwork name is specified, a network name will also be 2423 // required unless it is for the default network. 2424 // If the network that the instance is being created in is a Legacy 2425 // network, then the IP address is allocated from the IPv4Range. 2426 // If the network that the instance is being created in is an auto 2427 // Subnet Mode Network, then only network name should be specified (not 2428 // the subnetwork_name) and the IP address is created from the 2429 // IPCidrRange of the subnetwork that exists in that zone for that 2430 // network. 2431 // If the network that the instance is being created in is a custom 2432 // Subnet Mode Network, then the subnetwork_name must be specified and 2433 // the IP address is created from the IPCidrRange of the subnetwork.If 2434 // specified, the subnetwork must exist in the same region as the App 2435 // Engine flexible environment application. 2436 SubnetworkName string `json:"subnetworkName,omitempty"` 2437 2438 // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to 2439 // unconditionally include in API requests. By default, fields with 2440 // empty values are omitted from API requests. However, any non-pointer, 2441 // non-interface field appearing in ForceSendFields will be sent to the 2442 // server regardless of whether the field is empty or not. This may be 2443 // used to include empty fields in Patch requests. 2444 ForceSendFields []string `json:"-"` 2445 2446 // NullFields is a list of field names (e.g. "ForwardedPorts") to 2447 // include in API requests with the JSON null value. By default, fields 2448 // with empty values are omitted from API requests. However, any field 2449 // with an empty value appearing in NullFields will be sent to the 2450 // server as null. It is an error if a field in this list has a 2451 // non-empty value. This may be used to include null fields in Patch 2452 // requests. 2453 NullFields []string `json:"-"` 2454} 2455 2456func (s *Network) MarshalJSON() ([]byte, error) { 2457 type NoMethod Network 2458 raw := NoMethod(*s) 2459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2460} 2461 2462// NetworkUtilization: Target scaling by network usage. Only applicable 2463// in the App Engine flexible environment. 2464type NetworkUtilization struct { 2465 // TargetReceivedBytesPerSecond: Target bytes received per second. 2466 TargetReceivedBytesPerSecond int64 `json:"targetReceivedBytesPerSecond,omitempty"` 2467 2468 // TargetReceivedPacketsPerSecond: Target packets received per second. 2469 TargetReceivedPacketsPerSecond int64 `json:"targetReceivedPacketsPerSecond,omitempty"` 2470 2471 // TargetSentBytesPerSecond: Target bytes sent per second. 2472 TargetSentBytesPerSecond int64 `json:"targetSentBytesPerSecond,omitempty"` 2473 2474 // TargetSentPacketsPerSecond: Target packets sent per second. 2475 TargetSentPacketsPerSecond int64 `json:"targetSentPacketsPerSecond,omitempty"` 2476 2477 // ForceSendFields is a list of field names (e.g. 2478 // "TargetReceivedBytesPerSecond") to unconditionally include in API 2479 // requests. By default, fields with empty values are omitted from API 2480 // requests. However, any non-pointer, non-interface field appearing in 2481 // ForceSendFields will be sent to the server regardless of whether the 2482 // field is empty or not. This may be used to include empty fields in 2483 // Patch requests. 2484 ForceSendFields []string `json:"-"` 2485 2486 // NullFields is a list of field names (e.g. 2487 // "TargetReceivedBytesPerSecond") to include in API requests with the 2488 // JSON null value. By default, fields with empty values are omitted 2489 // from API requests. However, any field with an empty value appearing 2490 // in NullFields will be sent to the server as null. It is an error if a 2491 // field in this list has a non-empty value. This may be used to include 2492 // null fields in Patch requests. 2493 NullFields []string `json:"-"` 2494} 2495 2496func (s *NetworkUtilization) MarshalJSON() ([]byte, error) { 2497 type NoMethod NetworkUtilization 2498 raw := NoMethod(*s) 2499 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2500} 2501 2502// Operation: This resource represents a long-running operation that is 2503// the result of a network API call. 2504type Operation struct { 2505 // Done: If the value is false, it means the operation is still in 2506 // progress. If true, the operation is completed, and either error or 2507 // response is available. 2508 Done bool `json:"done,omitempty"` 2509 2510 // Error: The error result of the operation in case of failure or 2511 // cancellation. 2512 Error *Status `json:"error,omitempty"` 2513 2514 // Metadata: Service-specific metadata associated with the operation. It 2515 // typically contains progress information and common metadata such as 2516 // create time. Some services might not provide such metadata. Any 2517 // method that returns a long-running operation should document the 2518 // metadata type, if any. 2519 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2520 2521 // Name: The server-assigned name, which is only unique within the same 2522 // service that originally returns it. If you use the default HTTP 2523 // mapping, the name should be a resource name ending with 2524 // operations/{unique_id}. 2525 Name string `json:"name,omitempty"` 2526 2527 // Response: The normal response of the operation in case of success. If 2528 // the original method returns no data on success, such as Delete, the 2529 // response is google.protobuf.Empty. If the original method is standard 2530 // Get/Create/Update, the response should be the resource. For other 2531 // methods, the response should have the type XxxResponse, where Xxx is 2532 // the original method name. For example, if the original method name is 2533 // TakeSnapshot(), the inferred response type is TakeSnapshotResponse. 2534 Response googleapi.RawMessage `json:"response,omitempty"` 2535 2536 // ServerResponse contains the HTTP response code and headers from the 2537 // server. 2538 googleapi.ServerResponse `json:"-"` 2539 2540 // ForceSendFields is a list of field names (e.g. "Done") to 2541 // unconditionally include in API requests. By default, fields with 2542 // empty values are omitted from API requests. However, any non-pointer, 2543 // non-interface field appearing in ForceSendFields will be sent to the 2544 // server regardless of whether the field is empty or not. This may be 2545 // used to include empty fields in Patch requests. 2546 ForceSendFields []string `json:"-"` 2547 2548 // NullFields is a list of field names (e.g. "Done") to include in API 2549 // requests with the JSON null value. By default, fields with empty 2550 // values are omitted from API requests. However, any field with an 2551 // empty value appearing in NullFields will be sent to the server as 2552 // null. It is an error if a field in this list has a non-empty value. 2553 // This may be used to include null fields in Patch requests. 2554 NullFields []string `json:"-"` 2555} 2556 2557func (s *Operation) MarshalJSON() ([]byte, error) { 2558 type NoMethod Operation 2559 raw := NoMethod(*s) 2560 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2561} 2562 2563// OperationMetadataV1: Metadata for the given 2564// google.longrunning.Operation. 2565type OperationMetadataV1 struct { 2566 CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"` 2567 2568 // EndTime: Time that this operation completed.@OutputOnly 2569 EndTime string `json:"endTime,omitempty"` 2570 2571 // EphemeralMessage: Ephemeral message that may change every time the 2572 // operation is polled. @OutputOnly 2573 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2574 2575 // InsertTime: Time that this operation was created.@OutputOnly 2576 InsertTime string `json:"insertTime,omitempty"` 2577 2578 // Method: API method that initiated this operation. Example: 2579 // google.appengine.v1.Versions.CreateVersion.@OutputOnly 2580 Method string `json:"method,omitempty"` 2581 2582 // Target: Name of the resource that this operation is acting on. 2583 // Example: apps/myapp/services/default.@OutputOnly 2584 Target string `json:"target,omitempty"` 2585 2586 // User: User who requested this operation.@OutputOnly 2587 User string `json:"user,omitempty"` 2588 2589 // Warning: Durable messages that persist on every operation poll. 2590 // @OutputOnly 2591 Warning []string `json:"warning,omitempty"` 2592 2593 // ForceSendFields is a list of field names (e.g. 2594 // "CreateVersionMetadata") to unconditionally include in API requests. 2595 // By default, fields with empty values are omitted from API requests. 2596 // However, any non-pointer, non-interface field appearing in 2597 // ForceSendFields will be sent to the server regardless of whether the 2598 // field is empty or not. This may be used to include empty fields in 2599 // Patch requests. 2600 ForceSendFields []string `json:"-"` 2601 2602 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2603 // include in API requests with the JSON null value. By default, fields 2604 // with empty values are omitted from API requests. However, any field 2605 // with an empty value appearing in NullFields will be sent to the 2606 // server as null. It is an error if a field in this list has a 2607 // non-empty value. This may be used to include null fields in Patch 2608 // requests. 2609 NullFields []string `json:"-"` 2610} 2611 2612func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) { 2613 type NoMethod OperationMetadataV1 2614 raw := NoMethod(*s) 2615 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2616} 2617 2618// OperationMetadataV1Alpha: Metadata for the given 2619// google.longrunning.Operation. 2620type OperationMetadataV1Alpha struct { 2621 CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"` 2622 2623 // EndTime: Time that this operation completed.@OutputOnly 2624 EndTime string `json:"endTime,omitempty"` 2625 2626 // EphemeralMessage: Ephemeral message that may change every time the 2627 // operation is polled. @OutputOnly 2628 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2629 2630 // InsertTime: Time that this operation was created.@OutputOnly 2631 InsertTime string `json:"insertTime,omitempty"` 2632 2633 // Method: API method that initiated this operation. Example: 2634 // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly 2635 Method string `json:"method,omitempty"` 2636 2637 // Target: Name of the resource that this operation is acting on. 2638 // Example: apps/myapp/services/default.@OutputOnly 2639 Target string `json:"target,omitempty"` 2640 2641 // User: User who requested this operation.@OutputOnly 2642 User string `json:"user,omitempty"` 2643 2644 // Warning: Durable messages that persist on every operation poll. 2645 // @OutputOnly 2646 Warning []string `json:"warning,omitempty"` 2647 2648 // ForceSendFields is a list of field names (e.g. 2649 // "CreateVersionMetadata") to unconditionally include in API requests. 2650 // By default, fields with empty values are omitted from API requests. 2651 // However, any non-pointer, non-interface field appearing in 2652 // ForceSendFields will be sent to the server regardless of whether the 2653 // field is empty or not. This may be used to include empty fields in 2654 // Patch requests. 2655 ForceSendFields []string `json:"-"` 2656 2657 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2658 // include in API requests with the JSON null value. By default, fields 2659 // with empty values are omitted from API requests. However, any field 2660 // with an empty value appearing in NullFields will be sent to the 2661 // server as null. It is an error if a field in this list has a 2662 // non-empty value. This may be used to include null fields in Patch 2663 // requests. 2664 NullFields []string `json:"-"` 2665} 2666 2667func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) { 2668 type NoMethod OperationMetadataV1Alpha 2669 raw := NoMethod(*s) 2670 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2671} 2672 2673// OperationMetadataV1Beta: Metadata for the given 2674// google.longrunning.Operation. 2675type OperationMetadataV1Beta struct { 2676 CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"` 2677 2678 // EndTime: Time that this operation completed.@OutputOnly 2679 EndTime string `json:"endTime,omitempty"` 2680 2681 // EphemeralMessage: Ephemeral message that may change every time the 2682 // operation is polled. @OutputOnly 2683 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2684 2685 // InsertTime: Time that this operation was created.@OutputOnly 2686 InsertTime string `json:"insertTime,omitempty"` 2687 2688 // Method: API method that initiated this operation. Example: 2689 // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly 2690 Method string `json:"method,omitempty"` 2691 2692 // Target: Name of the resource that this operation is acting on. 2693 // Example: apps/myapp/services/default.@OutputOnly 2694 Target string `json:"target,omitempty"` 2695 2696 // User: User who requested this operation.@OutputOnly 2697 User string `json:"user,omitempty"` 2698 2699 // Warning: Durable messages that persist on every operation poll. 2700 // @OutputOnly 2701 Warning []string `json:"warning,omitempty"` 2702 2703 // ForceSendFields is a list of field names (e.g. 2704 // "CreateVersionMetadata") to unconditionally include in API requests. 2705 // By default, fields with empty values are omitted from API requests. 2706 // However, any non-pointer, non-interface field appearing in 2707 // ForceSendFields will be sent to the server regardless of whether the 2708 // field is empty or not. This may be used to include empty fields in 2709 // Patch requests. 2710 ForceSendFields []string `json:"-"` 2711 2712 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2713 // include in API requests with the JSON null value. By default, fields 2714 // with empty values are omitted from API requests. However, any field 2715 // with an empty value appearing in NullFields will be sent to the 2716 // server as null. It is an error if a field in this list has a 2717 // non-empty value. This may be used to include null fields in Patch 2718 // requests. 2719 NullFields []string `json:"-"` 2720} 2721 2722func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) { 2723 type NoMethod OperationMetadataV1Beta 2724 raw := NoMethod(*s) 2725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2726} 2727 2728// ReadinessCheck: Readiness checking configuration for VM instances. 2729// Unhealthy instances are removed from traffic rotation. 2730type ReadinessCheck struct { 2731 // AppStartTimeout: A maximum time limit on application initialization, 2732 // measured from moment the application successfully replies to a 2733 // healthcheck until it is ready to serve traffic. 2734 AppStartTimeout string `json:"appStartTimeout,omitempty"` 2735 2736 // CheckInterval: Interval between health checks. 2737 CheckInterval string `json:"checkInterval,omitempty"` 2738 2739 // FailureThreshold: Number of consecutive failed checks required before 2740 // removing traffic. 2741 FailureThreshold int64 `json:"failureThreshold,omitempty"` 2742 2743 // Host: Host header to send when performing a HTTP Readiness check. 2744 // Example: "myapp.appspot.com" 2745 Host string `json:"host,omitempty"` 2746 2747 // Path: The request path. 2748 Path string `json:"path,omitempty"` 2749 2750 // SuccessThreshold: Number of consecutive successful checks required 2751 // before receiving traffic. 2752 SuccessThreshold int64 `json:"successThreshold,omitempty"` 2753 2754 // Timeout: Time before the check is considered failed. 2755 Timeout string `json:"timeout,omitempty"` 2756 2757 // ForceSendFields is a list of field names (e.g. "AppStartTimeout") to 2758 // unconditionally include in API requests. By default, fields with 2759 // empty values are omitted from API requests. However, any non-pointer, 2760 // non-interface field appearing in ForceSendFields will be sent to the 2761 // server regardless of whether the field is empty or not. This may be 2762 // used to include empty fields in Patch requests. 2763 ForceSendFields []string `json:"-"` 2764 2765 // NullFields is a list of field names (e.g. "AppStartTimeout") to 2766 // include in API requests with the JSON null value. By default, fields 2767 // with empty values are omitted from API requests. However, any field 2768 // with an empty value appearing in NullFields will be sent to the 2769 // server as null. It is an error if a field in this list has a 2770 // non-empty value. This may be used to include null fields in Patch 2771 // requests. 2772 NullFields []string `json:"-"` 2773} 2774 2775func (s *ReadinessCheck) MarshalJSON() ([]byte, error) { 2776 type NoMethod ReadinessCheck 2777 raw := NoMethod(*s) 2778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2779} 2780 2781// RepairApplicationRequest: Request message for 2782// 'Applications.RepairApplication'. 2783type RepairApplicationRequest struct { 2784} 2785 2786// RequestUtilization: Target scaling by request utilization. Only 2787// applicable in the App Engine flexible environment. 2788type RequestUtilization struct { 2789 // TargetConcurrentRequests: Target number of concurrent requests. 2790 TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"` 2791 2792 // TargetRequestCountPerSecond: Target requests per second. 2793 TargetRequestCountPerSecond int64 `json:"targetRequestCountPerSecond,omitempty"` 2794 2795 // ForceSendFields is a list of field names (e.g. 2796 // "TargetConcurrentRequests") to unconditionally include in API 2797 // requests. By default, fields with empty values are omitted from API 2798 // requests. However, any non-pointer, non-interface field appearing in 2799 // ForceSendFields will be sent to the server regardless of whether the 2800 // field is empty or not. This may be used to include empty fields in 2801 // Patch requests. 2802 ForceSendFields []string `json:"-"` 2803 2804 // NullFields is a list of field names (e.g. "TargetConcurrentRequests") 2805 // to include in API requests with the JSON null value. By default, 2806 // fields with empty values are omitted from API requests. However, any 2807 // field with an empty value appearing in NullFields will be sent to the 2808 // server as null. It is an error if a field in this list has a 2809 // non-empty value. This may be used to include null fields in Patch 2810 // requests. 2811 NullFields []string `json:"-"` 2812} 2813 2814func (s *RequestUtilization) MarshalJSON() ([]byte, error) { 2815 type NoMethod RequestUtilization 2816 raw := NoMethod(*s) 2817 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2818} 2819 2820// ResourceRecord: A DNS resource record. 2821type ResourceRecord struct { 2822 // Name: Relative name of the object affected by this record. Only 2823 // applicable for CNAME records. Example: 'www'. 2824 Name string `json:"name,omitempty"` 2825 2826 // Rrdata: Data for this record. Values vary by record type, as defined 2827 // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). 2828 Rrdata string `json:"rrdata,omitempty"` 2829 2830 // Type: Resource record type. Example: AAAA. 2831 // 2832 // Possible values: 2833 // "A" - An A resource record. Data is an IPv4 address. 2834 // "AAAA" - An AAAA resource record. Data is an IPv6 address. 2835 // "CNAME" - A CNAME resource record. Data is a domain name to be 2836 // aliased. 2837 Type string `json:"type,omitempty"` 2838 2839 // ForceSendFields is a list of field names (e.g. "Name") to 2840 // unconditionally include in API requests. By default, fields with 2841 // empty values are omitted from API requests. However, any non-pointer, 2842 // non-interface field appearing in ForceSendFields will be sent to the 2843 // server regardless of whether the field is empty or not. This may be 2844 // used to include empty fields in Patch requests. 2845 ForceSendFields []string `json:"-"` 2846 2847 // NullFields is a list of field names (e.g. "Name") to include in API 2848 // requests with the JSON null value. By default, fields with empty 2849 // values are omitted from API requests. However, any field with an 2850 // empty value appearing in NullFields will be sent to the server as 2851 // null. It is an error if a field in this list has a non-empty value. 2852 // This may be used to include null fields in Patch requests. 2853 NullFields []string `json:"-"` 2854} 2855 2856func (s *ResourceRecord) MarshalJSON() ([]byte, error) { 2857 type NoMethod ResourceRecord 2858 raw := NoMethod(*s) 2859 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2860} 2861 2862// Resources: Machine resources for a version. 2863type Resources struct { 2864 // Cpu: Number of CPU cores needed. 2865 Cpu float64 `json:"cpu,omitempty"` 2866 2867 // DiskGb: Disk size (GB) needed. 2868 DiskGb float64 `json:"diskGb,omitempty"` 2869 2870 // MemoryGb: Memory (GB) needed. 2871 MemoryGb float64 `json:"memoryGb,omitempty"` 2872 2873 // Volumes: User specified volumes. 2874 Volumes []*Volume `json:"volumes,omitempty"` 2875 2876 // ForceSendFields is a list of field names (e.g. "Cpu") 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. "Cpu") 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 *Resources) MarshalJSON() ([]byte, error) { 2894 type NoMethod Resources 2895 raw := NoMethod(*s) 2896 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2897} 2898 2899func (s *Resources) UnmarshalJSON(data []byte) error { 2900 type NoMethod Resources 2901 var s1 struct { 2902 Cpu gensupport.JSONFloat64 `json:"cpu"` 2903 DiskGb gensupport.JSONFloat64 `json:"diskGb"` 2904 MemoryGb gensupport.JSONFloat64 `json:"memoryGb"` 2905 *NoMethod 2906 } 2907 s1.NoMethod = (*NoMethod)(s) 2908 if err := json.Unmarshal(data, &s1); err != nil { 2909 return err 2910 } 2911 s.Cpu = float64(s1.Cpu) 2912 s.DiskGb = float64(s1.DiskGb) 2913 s.MemoryGb = float64(s1.MemoryGb) 2914 return nil 2915} 2916 2917// ScriptHandler: Executes a script to handle the request that matches 2918// the URL pattern. 2919type ScriptHandler struct { 2920 // ScriptPath: Path to the script from the application root directory. 2921 ScriptPath string `json:"scriptPath,omitempty"` 2922 2923 // ForceSendFields is a list of field names (e.g. "ScriptPath") to 2924 // unconditionally include in API requests. By default, fields with 2925 // empty values are omitted from API requests. However, any non-pointer, 2926 // non-interface field appearing in ForceSendFields will be sent to the 2927 // server regardless of whether the field is empty or not. This may be 2928 // used to include empty fields in Patch requests. 2929 ForceSendFields []string `json:"-"` 2930 2931 // NullFields is a list of field names (e.g. "ScriptPath") to include in 2932 // API requests with the JSON null value. By default, fields with empty 2933 // values are omitted from API requests. However, any field with an 2934 // empty value appearing in NullFields will be sent to the server as 2935 // null. It is an error if a field in this list has a non-empty value. 2936 // This may be used to include null fields in Patch requests. 2937 NullFields []string `json:"-"` 2938} 2939 2940func (s *ScriptHandler) MarshalJSON() ([]byte, error) { 2941 type NoMethod ScriptHandler 2942 raw := NoMethod(*s) 2943 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2944} 2945 2946// Service: A Service resource is a logical component of an application 2947// that can share state and communicate in a secure fashion with other 2948// services. For example, an application that handles customer requests 2949// might include separate services to handle tasks such as backend data 2950// analysis or API requests from mobile devices. Each service has a 2951// collection of versions that define a specific set of code used to 2952// implement the functionality of that service. 2953type Service struct { 2954 // Id: Relative name of the service within the application. Example: 2955 // default.@OutputOnly 2956 Id string `json:"id,omitempty"` 2957 2958 // Name: Full path to the Service resource in the API. Example: 2959 // apps/myapp/services/default.@OutputOnly 2960 Name string `json:"name,omitempty"` 2961 2962 // Split: Mapping that defines fractional HTTP traffic diversion to 2963 // different versions within the service. 2964 Split *TrafficSplit `json:"split,omitempty"` 2965 2966 // ServerResponse contains the HTTP response code and headers from the 2967 // server. 2968 googleapi.ServerResponse `json:"-"` 2969 2970 // ForceSendFields is a list of field names (e.g. "Id") to 2971 // unconditionally include in API requests. By default, fields with 2972 // empty values are omitted from API requests. However, any non-pointer, 2973 // non-interface field appearing in ForceSendFields will be sent to the 2974 // server regardless of whether the field is empty or not. This may be 2975 // used to include empty fields in Patch requests. 2976 ForceSendFields []string `json:"-"` 2977 2978 // NullFields is a list of field names (e.g. "Id") to include in API 2979 // requests with the JSON null value. By default, fields with empty 2980 // values are omitted from API requests. However, any field with an 2981 // empty value appearing in NullFields will be sent to the server as 2982 // null. It is an error if a field in this list has a non-empty value. 2983 // This may be used to include null fields in Patch requests. 2984 NullFields []string `json:"-"` 2985} 2986 2987func (s *Service) MarshalJSON() ([]byte, error) { 2988 type NoMethod Service 2989 raw := NoMethod(*s) 2990 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2991} 2992 2993// SslSettings: SSL configuration for a DomainMapping resource. 2994type SslSettings struct { 2995 // CertificateId: ID of the AuthorizedCertificate resource configuring 2996 // SSL for the application. Clearing this field will remove SSL 2997 // support.By default, a managed certificate is automatically created 2998 // for every domain mapping. To omit SSL support or to configure SSL 2999 // manually, specify SslManagementType.MANUAL on a CREATE or UPDATE 3000 // request. You must be authorized to administer the 3001 // AuthorizedCertificate resource to manually map it to a DomainMapping 3002 // resource. Example: 12345. 3003 CertificateId string `json:"certificateId,omitempty"` 3004 3005 // PendingManagedCertificateId: ID of the managed AuthorizedCertificate 3006 // resource currently being provisioned, if applicable. Until the new 3007 // managed certificate has been successfully provisioned, the previous 3008 // SSL state will be preserved. Once the provisioning process completes, 3009 // the certificate_id field will reflect the new managed certificate and 3010 // this field will be left empty. To remove SSL support while there is 3011 // still a pending managed certificate, clear the certificate_id field 3012 // with an UpdateDomainMappingRequest.@OutputOnly 3013 PendingManagedCertificateId string `json:"pendingManagedCertificateId,omitempty"` 3014 3015 // SslManagementType: SSL management type for this domain. If AUTOMATIC, 3016 // a managed certificate is automatically provisioned. If MANUAL, 3017 // certificate_id must be manually specified in order to configure SSL 3018 // for this domain. 3019 // 3020 // Possible values: 3021 // "AUTOMATIC" - SSL support for this domain is configured 3022 // automatically. The mapped SSL certificate will be automatically 3023 // renewed. 3024 // "MANUAL" - SSL support for this domain is configured manually by 3025 // the user. Either the domain has no SSL support or a user-obtained SSL 3026 // certificate has been explictly mapped to this domain. 3027 SslManagementType string `json:"sslManagementType,omitempty"` 3028 3029 // ForceSendFields is a list of field names (e.g. "CertificateId") to 3030 // unconditionally include in API requests. By default, fields with 3031 // empty values are omitted from API requests. However, any non-pointer, 3032 // non-interface field appearing in ForceSendFields will be sent to the 3033 // server regardless of whether the field is empty or not. This may be 3034 // used to include empty fields in Patch requests. 3035 ForceSendFields []string `json:"-"` 3036 3037 // NullFields is a list of field names (e.g. "CertificateId") to include 3038 // in API requests with the JSON null value. By default, fields with 3039 // empty values are omitted from API requests. However, any field with 3040 // an empty value appearing in NullFields will be sent to the server as 3041 // null. It is an error if a field in this list has a non-empty value. 3042 // This may be used to include null fields in Patch requests. 3043 NullFields []string `json:"-"` 3044} 3045 3046func (s *SslSettings) MarshalJSON() ([]byte, error) { 3047 type NoMethod SslSettings 3048 raw := NoMethod(*s) 3049 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3050} 3051 3052// StandardSchedulerSettings: Scheduler settings for standard 3053// environment. 3054type StandardSchedulerSettings struct { 3055 // MaxInstances: Maximum number of instances to run for this version. 3056 // Set to zero to disable max_instances configuration. 3057 MaxInstances int64 `json:"maxInstances,omitempty"` 3058 3059 // MinInstances: Minimum number of instances to run for this version. 3060 // Set to zero to disable min_instances configuration. 3061 MinInstances int64 `json:"minInstances,omitempty"` 3062 3063 // TargetCpuUtilization: Target CPU utilization ratio to maintain when 3064 // scaling. 3065 TargetCpuUtilization float64 `json:"targetCpuUtilization,omitempty"` 3066 3067 // TargetThroughputUtilization: Target throughput utilization ratio to 3068 // maintain when scaling 3069 TargetThroughputUtilization float64 `json:"targetThroughputUtilization,omitempty"` 3070 3071 // ForceSendFields is a list of field names (e.g. "MaxInstances") to 3072 // unconditionally include in API requests. By default, fields with 3073 // empty values are omitted from API requests. However, any non-pointer, 3074 // non-interface field appearing in ForceSendFields will be sent to the 3075 // server regardless of whether the field is empty or not. This may be 3076 // used to include empty fields in Patch requests. 3077 ForceSendFields []string `json:"-"` 3078 3079 // NullFields is a list of field names (e.g. "MaxInstances") to include 3080 // in API requests with the JSON null value. By default, fields with 3081 // empty values are omitted from API requests. However, any field with 3082 // an empty value appearing in NullFields will be sent to the server as 3083 // null. It is an error if a field in this list has a non-empty value. 3084 // This may be used to include null fields in Patch requests. 3085 NullFields []string `json:"-"` 3086} 3087 3088func (s *StandardSchedulerSettings) MarshalJSON() ([]byte, error) { 3089 type NoMethod StandardSchedulerSettings 3090 raw := NoMethod(*s) 3091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3092} 3093 3094func (s *StandardSchedulerSettings) UnmarshalJSON(data []byte) error { 3095 type NoMethod StandardSchedulerSettings 3096 var s1 struct { 3097 TargetCpuUtilization gensupport.JSONFloat64 `json:"targetCpuUtilization"` 3098 TargetThroughputUtilization gensupport.JSONFloat64 `json:"targetThroughputUtilization"` 3099 *NoMethod 3100 } 3101 s1.NoMethod = (*NoMethod)(s) 3102 if err := json.Unmarshal(data, &s1); err != nil { 3103 return err 3104 } 3105 s.TargetCpuUtilization = float64(s1.TargetCpuUtilization) 3106 s.TargetThroughputUtilization = float64(s1.TargetThroughputUtilization) 3107 return nil 3108} 3109 3110// StaticFilesHandler: Files served directly to the user for a given 3111// URL, such as images, CSS stylesheets, or JavaScript source files. 3112// Static file handlers describe which files in the application 3113// directory are static files, and which URLs serve them. 3114type StaticFilesHandler struct { 3115 // ApplicationReadable: Whether files should also be uploaded as code 3116 // data. By default, files declared in static file handlers are uploaded 3117 // as static data and are only served to end users; they cannot be read 3118 // by the application. If enabled, uploads are charged against both your 3119 // code and static data storage resource quotas. 3120 ApplicationReadable bool `json:"applicationReadable,omitempty"` 3121 3122 // Expiration: Time a static file served by this handler should be 3123 // cached by web proxies and browsers. 3124 Expiration string `json:"expiration,omitempty"` 3125 3126 // HttpHeaders: HTTP headers to use for all responses from these URLs. 3127 HttpHeaders map[string]string `json:"httpHeaders,omitempty"` 3128 3129 // MimeType: MIME type used to serve all files served by this 3130 // handler.Defaults to file-specific MIME types, which are derived from 3131 // each file's filename extension. 3132 MimeType string `json:"mimeType,omitempty"` 3133 3134 // Path: Path to the static files matched by the URL pattern, from the 3135 // application root directory. The path can refer to text matched in 3136 // groupings in the URL pattern. 3137 Path string `json:"path,omitempty"` 3138 3139 // RequireMatchingFile: Whether this handler should match the request if 3140 // the file referenced by the handler does not exist. 3141 RequireMatchingFile bool `json:"requireMatchingFile,omitempty"` 3142 3143 // UploadPathRegex: Regular expression that matches the file paths for 3144 // all files that should be referenced by this handler. 3145 UploadPathRegex string `json:"uploadPathRegex,omitempty"` 3146 3147 // ForceSendFields is a list of field names (e.g. "ApplicationReadable") 3148 // to unconditionally include in API requests. By default, fields with 3149 // empty values are omitted from API requests. However, any non-pointer, 3150 // non-interface field appearing in ForceSendFields will be sent to the 3151 // server regardless of whether the field is empty or not. This may be 3152 // used to include empty fields in Patch requests. 3153 ForceSendFields []string `json:"-"` 3154 3155 // NullFields is a list of field names (e.g. "ApplicationReadable") to 3156 // include in API requests with the JSON null value. By default, fields 3157 // with empty values are omitted from API requests. However, any field 3158 // with an empty value appearing in NullFields will be sent to the 3159 // server as null. It is an error if a field in this list has a 3160 // non-empty value. This may be used to include null fields in Patch 3161 // requests. 3162 NullFields []string `json:"-"` 3163} 3164 3165func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) { 3166 type NoMethod StaticFilesHandler 3167 raw := NoMethod(*s) 3168 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3169} 3170 3171// Status: The Status type defines a logical error model that is 3172// suitable for different programming environments, including REST APIs 3173// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 3174// Status message contains three pieces of data: error code, error 3175// message, and error details.You can find out more about this error 3176// model and how to work with it in the API Design Guide 3177// (https://cloud.google.com/apis/design/errors). 3178type Status struct { 3179 // Code: The status code, which should be an enum value of 3180 // google.rpc.Code. 3181 Code int64 `json:"code,omitempty"` 3182 3183 // Details: A list of messages that carry the error details. There is a 3184 // common set of message types for APIs to use. 3185 Details []googleapi.RawMessage `json:"details,omitempty"` 3186 3187 // Message: A developer-facing error message, which should be in 3188 // English. Any user-facing error message should be localized and sent 3189 // in the google.rpc.Status.details field, or localized by the client. 3190 Message string `json:"message,omitempty"` 3191 3192 // ForceSendFields is a list of field names (e.g. "Code") to 3193 // unconditionally include in API requests. By default, fields with 3194 // empty values are omitted from API requests. However, any non-pointer, 3195 // non-interface field appearing in ForceSendFields will be sent to the 3196 // server regardless of whether the field is empty or not. This may be 3197 // used to include empty fields in Patch requests. 3198 ForceSendFields []string `json:"-"` 3199 3200 // NullFields is a list of field names (e.g. "Code") to include in API 3201 // requests with the JSON null value. By default, fields with empty 3202 // values are omitted from API requests. However, any field with an 3203 // empty value appearing in NullFields will be sent to the server as 3204 // null. It is an error if a field in this list has a non-empty value. 3205 // This may be used to include null fields in Patch requests. 3206 NullFields []string `json:"-"` 3207} 3208 3209func (s *Status) MarshalJSON() ([]byte, error) { 3210 type NoMethod Status 3211 raw := NoMethod(*s) 3212 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3213} 3214 3215// TrafficSplit: Traffic routing configuration for versions within a 3216// single service. Traffic splits define how traffic directed to the 3217// service is assigned to versions. 3218type TrafficSplit struct { 3219 // Allocations: Mapping from version IDs within the service to 3220 // fractional (0.000, 1] allocations of traffic for that version. Each 3221 // version can be specified only once, but some versions in the service 3222 // may not have any traffic allocation. Services that have traffic 3223 // allocated cannot be deleted until either the service is deleted or 3224 // their traffic allocation is removed. Allocations must sum to 1. Up to 3225 // two decimal place precision is supported for IP-based splits and up 3226 // to three decimal places is supported for cookie-based splits. 3227 Allocations map[string]float64 `json:"allocations,omitempty"` 3228 3229 // ShardBy: Mechanism used to determine which version a request is sent 3230 // to. The traffic selection algorithm will be stable for either type 3231 // until allocations are changed. 3232 // 3233 // Possible values: 3234 // "UNSPECIFIED" - Diversion method unspecified. 3235 // "COOKIE" - Diversion based on a specially named cookie, 3236 // "GOOGAPPUID." The cookie must be set by the application itself or no 3237 // diversion will occur. 3238 // "IP" - Diversion based on applying the modulus operation to a 3239 // fingerprint of the IP address. 3240 // "RANDOM" - Diversion based on weighted random assignment. An 3241 // incoming request is randomly routed to a version in the traffic 3242 // split, with probability proportional to the version's traffic share. 3243 ShardBy string `json:"shardBy,omitempty"` 3244 3245 // ForceSendFields is a list of field names (e.g. "Allocations") to 3246 // unconditionally include in API requests. By default, fields with 3247 // empty values are omitted from API requests. However, any non-pointer, 3248 // non-interface field appearing in ForceSendFields will be sent to the 3249 // server regardless of whether the field is empty or not. This may be 3250 // used to include empty fields in Patch requests. 3251 ForceSendFields []string `json:"-"` 3252 3253 // NullFields is a list of field names (e.g. "Allocations") to include 3254 // in API requests with the JSON null value. By default, fields with 3255 // empty values are omitted from API requests. However, any field with 3256 // an empty value appearing in NullFields will be sent to the server as 3257 // null. It is an error if a field in this list has a non-empty value. 3258 // This may be used to include null fields in Patch requests. 3259 NullFields []string `json:"-"` 3260} 3261 3262func (s *TrafficSplit) MarshalJSON() ([]byte, error) { 3263 type NoMethod TrafficSplit 3264 raw := NoMethod(*s) 3265 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3266} 3267 3268// UrlDispatchRule: Rules to match an HTTP request and dispatch that 3269// request to a service. 3270type UrlDispatchRule struct { 3271 // Domain: Domain name to match against. The wildcard "*" is supported 3272 // if specified before a period: "*.".Defaults to matching all domains: 3273 // "*". 3274 Domain string `json:"domain,omitempty"` 3275 3276 // Path: Pathname within the host. Must start with a "/". A single "*" 3277 // can be included at the end of the path.The sum of the lengths of the 3278 // domain and path may not exceed 100 characters. 3279 Path string `json:"path,omitempty"` 3280 3281 // Service: Resource ID of a service in this application that should 3282 // serve the matched request. The service must already exist. Example: 3283 // default. 3284 Service string `json:"service,omitempty"` 3285 3286 // ForceSendFields is a list of field names (e.g. "Domain") to 3287 // unconditionally include in API requests. By default, fields with 3288 // empty values are omitted from API requests. However, any non-pointer, 3289 // non-interface field appearing in ForceSendFields will be sent to the 3290 // server regardless of whether the field is empty or not. This may be 3291 // used to include empty fields in Patch requests. 3292 ForceSendFields []string `json:"-"` 3293 3294 // NullFields is a list of field names (e.g. "Domain") to include in API 3295 // requests with the JSON null value. By default, fields with empty 3296 // values are omitted from API requests. However, any field with an 3297 // empty value appearing in NullFields will be sent to the server as 3298 // null. It is an error if a field in this list has a non-empty value. 3299 // This may be used to include null fields in Patch requests. 3300 NullFields []string `json:"-"` 3301} 3302 3303func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) { 3304 type NoMethod UrlDispatchRule 3305 raw := NoMethod(*s) 3306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3307} 3308 3309// UrlMap: URL pattern and description of how the URL should be handled. 3310// App Engine can handle URLs by executing application code or by 3311// serving static files uploaded with the version, such as images, CSS, 3312// or JavaScript. 3313type UrlMap struct { 3314 // ApiEndpoint: Uses API Endpoints to handle requests. 3315 ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"` 3316 3317 // AuthFailAction: Action to take when users access resources that 3318 // require authentication. Defaults to redirect. 3319 // 3320 // Possible values: 3321 // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified. 3322 // AUTH_FAIL_ACTION_REDIRECT is assumed. 3323 // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to 3324 // "accounts.google.com". The user is redirected back to the application 3325 // URL after signing in or creating an account. 3326 // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP 3327 // status code and an error message. 3328 AuthFailAction string `json:"authFailAction,omitempty"` 3329 3330 // Login: Level of login required to access this resource. Not supported 3331 // for Node.js in the App Engine standard environment. 3332 // 3333 // Possible values: 3334 // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed. 3335 // "LOGIN_OPTIONAL" - Does not require that the user is signed in. 3336 // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action 3337 // is taken. In addition, if the user is not an administrator for the 3338 // application, they are given an error message regardless of 3339 // auth_fail_action. If the user is an administrator, the handler 3340 // proceeds. 3341 // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds 3342 // normally. Otherwise, the auth_fail_action is taken. 3343 Login string `json:"login,omitempty"` 3344 3345 // RedirectHttpResponseCode: 30x code to use when performing redirects 3346 // for the secure field. Defaults to 302. 3347 // 3348 // Possible values: 3349 // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is 3350 // assumed. 3351 // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code. 3352 // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code. 3353 // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code. 3354 // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code. 3355 RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"` 3356 3357 // Script: Executes a script to handle the requests that match this URL 3358 // pattern. Only the auto value is supported for Node.js in the App 3359 // Engine standard environment, for example "script": "auto". 3360 Script *ScriptHandler `json:"script,omitempty"` 3361 3362 // SecurityLevel: Security (HTTPS) enforcement for this URL. 3363 // 3364 // Possible values: 3365 // "SECURE_UNSPECIFIED" - Not specified. 3366 // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that 3367 // match the handler succeed without redirects. The application can 3368 // examine the request to determine which protocol was used, and respond 3369 // accordingly. 3370 // "SECURE_NEVER" - Requests for a URL that match this handler that 3371 // use HTTPS are automatically redirected to the HTTP equivalent URL. 3372 // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that 3373 // match the handler succeed without redirects. The application can 3374 // examine the request to determine which protocol was used and respond 3375 // accordingly. 3376 // "SECURE_ALWAYS" - Requests for a URL that match this handler that 3377 // do not use HTTPS are automatically redirected to the HTTPS URL with 3378 // the same path. Query parameters are reserved for the redirect. 3379 SecurityLevel string `json:"securityLevel,omitempty"` 3380 3381 // StaticFiles: Returns the contents of a file, such as an image, as the 3382 // response. 3383 StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"` 3384 3385 // UrlRegex: URL prefix. Uses regular expression syntax, which means 3386 // regexp special characters must be escaped, but should not contain 3387 // groupings. All URLs that begin with this prefix are handled by this 3388 // handler, using the portion of the URL after the prefix as part of the 3389 // file path. 3390 UrlRegex string `json:"urlRegex,omitempty"` 3391 3392 // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to 3393 // unconditionally include in API requests. By default, fields with 3394 // empty values are omitted from API requests. However, any non-pointer, 3395 // non-interface field appearing in ForceSendFields will be sent to the 3396 // server regardless of whether the field is empty or not. This may be 3397 // used to include empty fields in Patch requests. 3398 ForceSendFields []string `json:"-"` 3399 3400 // NullFields is a list of field names (e.g. "ApiEndpoint") to include 3401 // in API requests with the JSON null value. By default, fields with 3402 // empty values are omitted from API requests. However, any field with 3403 // an empty value appearing in NullFields will be sent to the server as 3404 // null. It is an error if a field in this list has a non-empty value. 3405 // This may be used to include null fields in Patch requests. 3406 NullFields []string `json:"-"` 3407} 3408 3409func (s *UrlMap) MarshalJSON() ([]byte, error) { 3410 type NoMethod UrlMap 3411 raw := NoMethod(*s) 3412 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3413} 3414 3415// Version: A Version resource is a specific set of source code and 3416// configuration files that are deployed into a service. 3417type Version struct { 3418 // ApiConfig: Serving configuration for Google Cloud Endpoints 3419 // (https://cloud.google.com/appengine/docs/python/endpoints/).Only 3420 // returned in GET requests if view=FULL is set. 3421 ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"` 3422 3423 // AutomaticScaling: Automatic scaling is based on request rate, 3424 // response latencies, and other application metrics. 3425 AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"` 3426 3427 // BasicScaling: A service with basic scaling will create an instance 3428 // when the application receives a request. The instance will be turned 3429 // down when the app becomes idle. Basic scaling is ideal for work that 3430 // is intermittent or driven by user activity. 3431 BasicScaling *BasicScaling `json:"basicScaling,omitempty"` 3432 3433 // BetaSettings: Metadata settings that are supplied to this version to 3434 // enable beta runtime features. 3435 BetaSettings map[string]string `json:"betaSettings,omitempty"` 3436 3437 // CreateTime: Time that this version was created.@OutputOnly 3438 CreateTime string `json:"createTime,omitempty"` 3439 3440 // CreatedBy: Email address of the user who created this 3441 // version.@OutputOnly 3442 CreatedBy string `json:"createdBy,omitempty"` 3443 3444 // DefaultExpiration: Duration that static files should be cached by web 3445 // proxies and browsers. Only applicable if the corresponding 3446 // StaticFilesHandler 3447 // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 3448 // ta/apps.services.versions#StaticFilesHandler) does not specify its 3449 // own expiration time.Only returned in GET requests if view=FULL is 3450 // set. 3451 DefaultExpiration string `json:"defaultExpiration,omitempty"` 3452 3453 // Deployment: Code and application artifacts that make up this 3454 // version.Only returned in GET requests if view=FULL is set. 3455 Deployment *Deployment `json:"deployment,omitempty"` 3456 3457 // DiskUsageBytes: Total size in bytes of all the files that are 3458 // included in this version and currently hosted on the App Engine 3459 // disk.@OutputOnly 3460 DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"` 3461 3462 // EndpointsApiService: Cloud Endpoints configuration.If 3463 // endpoints_api_service is set, the Cloud Endpoints Extensible Service 3464 // Proxy will be provided to serve the API implemented by the app. 3465 EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"` 3466 3467 // Entrypoint: The entrypoint for the application. 3468 Entrypoint *Entrypoint `json:"entrypoint,omitempty"` 3469 3470 // Env: App Engine execution environment for this version.Defaults to 3471 // standard. 3472 Env string `json:"env,omitempty"` 3473 3474 // EnvVariables: Environment variables available to the application.Only 3475 // returned in GET requests if view=FULL is set. 3476 EnvVariables map[string]string `json:"envVariables,omitempty"` 3477 3478 // ErrorHandlers: Custom static error pages. Limited to 10KB per 3479 // page.Only returned in GET requests if view=FULL is set. 3480 ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"` 3481 3482 // Handlers: An ordered list of URL-matching patterns that should be 3483 // applied to incoming requests. The first matching URL handles the 3484 // request and other request handlers are not attempted.Only returned in 3485 // GET requests if view=FULL is set. 3486 Handlers []*UrlMap `json:"handlers,omitempty"` 3487 3488 // HealthCheck: Configures health checking for instances. Unhealthy 3489 // instances are stopped and replaced with new instances. Only 3490 // applicable in the App Engine flexible environment.Only returned in 3491 // GET requests if view=FULL is set. 3492 HealthCheck *HealthCheck `json:"healthCheck,omitempty"` 3493 3494 // Id: Relative name of the version within the service. Example: v1. 3495 // Version names can contain only lowercase letters, numbers, or 3496 // hyphens. Reserved names: "default", "latest", and any name with the 3497 // prefix "ah-". 3498 Id string `json:"id,omitempty"` 3499 3500 // InboundServices: Before an application can receive email or XMPP 3501 // messages, the application must be configured to enable the service. 3502 // 3503 // Possible values: 3504 // "INBOUND_SERVICE_UNSPECIFIED" - Not specified. 3505 // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail. 3506 // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive 3507 // email-bound notifications. 3508 // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive 3509 // error stanzas. 3510 // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive 3511 // instant messages. 3512 // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive 3513 // user subscription POSTs. 3514 // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive 3515 // a user's chat presence. 3516 // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for 3517 // notifications when a client connects or disconnects from a channel. 3518 // "INBOUND_SERVICE_WARMUP" - Enables warmup requests. 3519 InboundServices []string `json:"inboundServices,omitempty"` 3520 3521 // InstanceClass: Instance class that is used to run this version. Valid 3522 // values are: 3523 // AutomaticScaling: F1, F2, F4, F4_1G 3524 // ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 3525 // for AutomaticScaling and B1 for ManualScaling or BasicScaling. 3526 InstanceClass string `json:"instanceClass,omitempty"` 3527 3528 // Libraries: Configuration for third-party Python runtime libraries 3529 // that are required by the application.Only returned in GET requests if 3530 // view=FULL is set. 3531 Libraries []*Library `json:"libraries,omitempty"` 3532 3533 // LivenessCheck: Configures liveness health checking for instances. 3534 // Unhealthy instances are stopped and replaced with new instancesOnly 3535 // returned in GET requests if view=FULL is set. 3536 LivenessCheck *LivenessCheck `json:"livenessCheck,omitempty"` 3537 3538 // ManualScaling: A service with manual scaling runs continuously, 3539 // allowing you to perform complex initialization and rely on the state 3540 // of its memory over time. 3541 ManualScaling *ManualScaling `json:"manualScaling,omitempty"` 3542 3543 // Name: Full path to the Version resource in the API. Example: 3544 // apps/myapp/services/default/versions/v1.@OutputOnly 3545 Name string `json:"name,omitempty"` 3546 3547 // Network: Extra network settings. Only applicable in the App Engine 3548 // flexible environment. 3549 Network *Network `json:"network,omitempty"` 3550 3551 // NobuildFilesRegex: Files that match this pattern will not be built 3552 // into this version. Only applicable for Go runtimes.Only returned in 3553 // GET requests if view=FULL is set. 3554 NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"` 3555 3556 // ReadinessCheck: Configures readiness health checking for instances. 3557 // Unhealthy instances are not put into the backend traffic 3558 // rotation.Only returned in GET requests if view=FULL is set. 3559 ReadinessCheck *ReadinessCheck `json:"readinessCheck,omitempty"` 3560 3561 // Resources: Machine resources for this version. Only applicable in the 3562 // App Engine flexible environment. 3563 Resources *Resources `json:"resources,omitempty"` 3564 3565 // Runtime: Desired runtime. Example: python27. 3566 Runtime string `json:"runtime,omitempty"` 3567 3568 // RuntimeApiVersion: The version of the API in the given runtime 3569 // environment. Please see the app.yaml reference for valid values at 3570 // https://cloud.google.com/appengine/docs/standard/<language>/config/appref 3571 RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"` 3572 3573 // RuntimeChannel: The channel of the runtime to use. Only available for 3574 // some runtimes. Defaults to the default channel. 3575 RuntimeChannel string `json:"runtimeChannel,omitempty"` 3576 3577 // RuntimeMainExecutablePath: The path or name of the app's main 3578 // executable. 3579 RuntimeMainExecutablePath string `json:"runtimeMainExecutablePath,omitempty"` 3580 3581 // ServingStatus: Current serving status of this version. Only the 3582 // versions with a SERVING status create instances and can be 3583 // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to 3584 // SERVING. 3585 // 3586 // Possible values: 3587 // "SERVING_STATUS_UNSPECIFIED" - Not specified. 3588 // "SERVING" - Currently serving. Instances are created according to 3589 // the scaling settings of the version. 3590 // "STOPPED" - Disabled. No instances will be created and the scaling 3591 // settings are ignored until the state of the version changes to 3592 // SERVING. 3593 ServingStatus string `json:"servingStatus,omitempty"` 3594 3595 // Threadsafe: Whether multiple requests can be dispatched to this 3596 // version at once. 3597 Threadsafe bool `json:"threadsafe,omitempty"` 3598 3599 // VersionUrl: Serving URL for this version. Example: 3600 // "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly 3601 VersionUrl string `json:"versionUrl,omitempty"` 3602 3603 // Vm: Whether to deploy this version in a container on a virtual 3604 // machine. 3605 Vm bool `json:"vm,omitempty"` 3606 3607 // VpcAccessConnector: Enables VPC connectivity for standard apps. 3608 VpcAccessConnector *VpcAccessConnector `json:"vpcAccessConnector,omitempty"` 3609 3610 // Zones: The Google Compute Engine zones that are supported by this 3611 // version in the App Engine flexible environment. Deprecated. 3612 Zones []string `json:"zones,omitempty"` 3613 3614 // ServerResponse contains the HTTP response code and headers from the 3615 // server. 3616 googleapi.ServerResponse `json:"-"` 3617 3618 // ForceSendFields is a list of field names (e.g. "ApiConfig") to 3619 // unconditionally include in API requests. By default, fields with 3620 // empty values are omitted from API requests. However, any non-pointer, 3621 // non-interface field appearing in ForceSendFields will be sent to the 3622 // server regardless of whether the field is empty or not. This may be 3623 // used to include empty fields in Patch requests. 3624 ForceSendFields []string `json:"-"` 3625 3626 // NullFields is a list of field names (e.g. "ApiConfig") to include in 3627 // API requests with the JSON null value. By default, fields with empty 3628 // values are omitted from API requests. However, any field with an 3629 // empty value appearing in NullFields will be sent to the server as 3630 // null. It is an error if a field in this list has a non-empty value. 3631 // This may be used to include null fields in Patch requests. 3632 NullFields []string `json:"-"` 3633} 3634 3635func (s *Version) MarshalJSON() ([]byte, error) { 3636 type NoMethod Version 3637 raw := NoMethod(*s) 3638 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3639} 3640 3641// Volume: Volumes mounted within the app container. Only applicable in 3642// the App Engine flexible environment. 3643type Volume struct { 3644 // Name: Unique name for the volume. 3645 Name string `json:"name,omitempty"` 3646 3647 // SizeGb: Volume size in gigabytes. 3648 SizeGb float64 `json:"sizeGb,omitempty"` 3649 3650 // VolumeType: Underlying volume type, e.g. 'tmpfs'. 3651 VolumeType string `json:"volumeType,omitempty"` 3652 3653 // ForceSendFields is a list of field names (e.g. "Name") to 3654 // unconditionally include in API requests. By default, fields with 3655 // empty values are omitted from API requests. However, any non-pointer, 3656 // non-interface field appearing in ForceSendFields will be sent to the 3657 // server regardless of whether the field is empty or not. This may be 3658 // used to include empty fields in Patch requests. 3659 ForceSendFields []string `json:"-"` 3660 3661 // NullFields is a list of field names (e.g. "Name") to include in API 3662 // requests with the JSON null value. By default, fields with empty 3663 // values are omitted from API requests. However, any field with an 3664 // empty value appearing in NullFields will be sent to the server as 3665 // null. It is an error if a field in this list has a non-empty value. 3666 // This may be used to include null fields in Patch requests. 3667 NullFields []string `json:"-"` 3668} 3669 3670func (s *Volume) MarshalJSON() ([]byte, error) { 3671 type NoMethod Volume 3672 raw := NoMethod(*s) 3673 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3674} 3675 3676func (s *Volume) UnmarshalJSON(data []byte) error { 3677 type NoMethod Volume 3678 var s1 struct { 3679 SizeGb gensupport.JSONFloat64 `json:"sizeGb"` 3680 *NoMethod 3681 } 3682 s1.NoMethod = (*NoMethod)(s) 3683 if err := json.Unmarshal(data, &s1); err != nil { 3684 return err 3685 } 3686 s.SizeGb = float64(s1.SizeGb) 3687 return nil 3688} 3689 3690// VpcAccessConnector: VPC access connector specification. 3691type VpcAccessConnector struct { 3692 // Name: Full Serverless VPC Access Connector name e.g. 3693 // /projects/my-project/locations/us-central1/connectors/c1. 3694 Name string `json:"name,omitempty"` 3695 3696 // ForceSendFields is a list of field names (e.g. "Name") to 3697 // unconditionally include in API requests. By default, fields with 3698 // empty values are omitted from API requests. However, any non-pointer, 3699 // non-interface field appearing in ForceSendFields will be sent to the 3700 // server regardless of whether the field is empty or not. This may be 3701 // used to include empty fields in Patch requests. 3702 ForceSendFields []string `json:"-"` 3703 3704 // NullFields is a list of field names (e.g. "Name") to include in API 3705 // requests with the JSON null value. By default, fields with empty 3706 // values are omitted from API requests. However, any field with an 3707 // empty value appearing in NullFields will be sent to the server as 3708 // null. It is an error if a field in this list has a non-empty value. 3709 // This may be used to include null fields in Patch requests. 3710 NullFields []string `json:"-"` 3711} 3712 3713func (s *VpcAccessConnector) MarshalJSON() ([]byte, error) { 3714 type NoMethod VpcAccessConnector 3715 raw := NoMethod(*s) 3716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3717} 3718 3719// ZipInfo: The zip file information for a zip deployment. 3720type ZipInfo struct { 3721 // FilesCount: An estimate of the number of files in a zip for a zip 3722 // deployment. If set, must be greater than or equal to the actual 3723 // number of files. Used for optimizing performance; if not provided, 3724 // deployment may be slow. 3725 FilesCount int64 `json:"filesCount,omitempty"` 3726 3727 // SourceUrl: URL of the zip file to deploy from. Must be a URL to a 3728 // resource in Google Cloud Storage in the form 3729 // 'http(s)://storage.googleapis.com/<bucket>/<object>'. 3730 SourceUrl string `json:"sourceUrl,omitempty"` 3731 3732 // ForceSendFields is a list of field names (e.g. "FilesCount") to 3733 // unconditionally include in API requests. By default, fields with 3734 // empty values are omitted from API requests. However, any non-pointer, 3735 // non-interface field appearing in ForceSendFields will be sent to the 3736 // server regardless of whether the field is empty or not. This may be 3737 // used to include empty fields in Patch requests. 3738 ForceSendFields []string `json:"-"` 3739 3740 // NullFields is a list of field names (e.g. "FilesCount") to include in 3741 // API requests with the JSON null value. By default, fields with empty 3742 // values are omitted from API requests. However, any field with an 3743 // empty value appearing in NullFields will be sent to the server as 3744 // null. It is an error if a field in this list has a non-empty value. 3745 // This may be used to include null fields in Patch requests. 3746 NullFields []string `json:"-"` 3747} 3748 3749func (s *ZipInfo) MarshalJSON() ([]byte, error) { 3750 type NoMethod ZipInfo 3751 raw := NoMethod(*s) 3752 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3753} 3754 3755// method id "appengine.apps.create": 3756 3757type AppsCreateCall struct { 3758 s *APIService 3759 application *Application 3760 urlParams_ gensupport.URLParams 3761 ctx_ context.Context 3762 header_ http.Header 3763} 3764 3765// Create: Creates an App Engine application for a Google Cloud Platform 3766// project. Required fields: 3767// id - The ID of the target Cloud Platform project. 3768// location - The region 3769// (https://cloud.google.com/appengine/docs/locations) where you want 3770// the App Engine application located.For more information about App 3771// Engine applications, see Managing Projects, Applications, and Billing 3772// (https://cloud.google.com/appengine/docs/standard/python/console/). 3773func (r *AppsService) Create(application *Application) *AppsCreateCall { 3774 c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3775 c.application = application 3776 return c 3777} 3778 3779// Fields allows partial responses to be retrieved. See 3780// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3781// for more information. 3782func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall { 3783 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3784 return c 3785} 3786 3787// Context sets the context to be used in this call's Do method. Any 3788// pending HTTP request will be aborted if the provided context is 3789// canceled. 3790func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall { 3791 c.ctx_ = ctx 3792 return c 3793} 3794 3795// Header returns an http.Header that can be modified by the caller to 3796// add HTTP headers to the request. 3797func (c *AppsCreateCall) Header() http.Header { 3798 if c.header_ == nil { 3799 c.header_ = make(http.Header) 3800 } 3801 return c.header_ 3802} 3803 3804func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) { 3805 reqHeaders := make(http.Header) 3806 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3807 for k, v := range c.header_ { 3808 reqHeaders[k] = v 3809 } 3810 reqHeaders.Set("User-Agent", c.s.userAgent()) 3811 var body io.Reader = nil 3812 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) 3813 if err != nil { 3814 return nil, err 3815 } 3816 reqHeaders.Set("Content-Type", "application/json") 3817 c.urlParams_.Set("alt", alt) 3818 c.urlParams_.Set("prettyPrint", "false") 3819 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps") 3820 urls += "?" + c.urlParams_.Encode() 3821 req, err := http.NewRequest("POST", urls, body) 3822 if err != nil { 3823 return nil, err 3824 } 3825 req.Header = reqHeaders 3826 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3827} 3828 3829// Do executes the "appengine.apps.create" call. 3830// Exactly one of *Operation or error will be non-nil. Any non-2xx 3831// status code is an error. Response headers are in either 3832// *Operation.ServerResponse.Header or (if a response was returned at 3833// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3834// to check whether the returned error was because 3835// http.StatusNotModified was returned. 3836func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3837 gensupport.SetOptions(c.urlParams_, opts...) 3838 res, err := c.doRequest("json") 3839 if res != nil && res.StatusCode == http.StatusNotModified { 3840 if res.Body != nil { 3841 res.Body.Close() 3842 } 3843 return nil, &googleapi.Error{ 3844 Code: res.StatusCode, 3845 Header: res.Header, 3846 } 3847 } 3848 if err != nil { 3849 return nil, err 3850 } 3851 defer googleapi.CloseBody(res) 3852 if err := googleapi.CheckResponse(res); err != nil { 3853 return nil, err 3854 } 3855 ret := &Operation{ 3856 ServerResponse: googleapi.ServerResponse{ 3857 Header: res.Header, 3858 HTTPStatusCode: res.StatusCode, 3859 }, 3860 } 3861 target := &ret 3862 if err := gensupport.DecodeResponse(target, res); err != nil { 3863 return nil, err 3864 } 3865 return ret, nil 3866 // { 3867 // "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/).", 3868 // "flatPath": "v1beta/apps", 3869 // "httpMethod": "POST", 3870 // "id": "appengine.apps.create", 3871 // "parameterOrder": [], 3872 // "parameters": {}, 3873 // "path": "v1beta/apps", 3874 // "request": { 3875 // "$ref": "Application" 3876 // }, 3877 // "response": { 3878 // "$ref": "Operation" 3879 // }, 3880 // "scopes": [ 3881 // "https://www.googleapis.com/auth/cloud-platform" 3882 // ] 3883 // } 3884 3885} 3886 3887// method id "appengine.apps.get": 3888 3889type AppsGetCall struct { 3890 s *APIService 3891 appsId string 3892 urlParams_ gensupport.URLParams 3893 ifNoneMatch_ string 3894 ctx_ context.Context 3895 header_ http.Header 3896} 3897 3898// Get: Gets information about an application. 3899func (r *AppsService) Get(appsId string) *AppsGetCall { 3900 c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3901 c.appsId = appsId 3902 return c 3903} 3904 3905// Fields allows partial responses to be retrieved. See 3906// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3907// for more information. 3908func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall { 3909 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3910 return c 3911} 3912 3913// IfNoneMatch sets the optional parameter which makes the operation 3914// fail if the object's ETag matches the given value. This is useful for 3915// getting updates only after the object has changed since the last 3916// request. Use googleapi.IsNotModified to check whether the response 3917// error from Do is the result of In-None-Match. 3918func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall { 3919 c.ifNoneMatch_ = entityTag 3920 return c 3921} 3922 3923// Context sets the context to be used in this call's Do method. Any 3924// pending HTTP request will be aborted if the provided context is 3925// canceled. 3926func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall { 3927 c.ctx_ = ctx 3928 return c 3929} 3930 3931// Header returns an http.Header that can be modified by the caller to 3932// add HTTP headers to the request. 3933func (c *AppsGetCall) Header() http.Header { 3934 if c.header_ == nil { 3935 c.header_ = make(http.Header) 3936 } 3937 return c.header_ 3938} 3939 3940func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) { 3941 reqHeaders := make(http.Header) 3942 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 3943 for k, v := range c.header_ { 3944 reqHeaders[k] = v 3945 } 3946 reqHeaders.Set("User-Agent", c.s.userAgent()) 3947 if c.ifNoneMatch_ != "" { 3948 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3949 } 3950 var body io.Reader = nil 3951 c.urlParams_.Set("alt", alt) 3952 c.urlParams_.Set("prettyPrint", "false") 3953 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}") 3954 urls += "?" + c.urlParams_.Encode() 3955 req, err := http.NewRequest("GET", urls, body) 3956 if err != nil { 3957 return nil, err 3958 } 3959 req.Header = reqHeaders 3960 googleapi.Expand(req.URL, map[string]string{ 3961 "appsId": c.appsId, 3962 }) 3963 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3964} 3965 3966// Do executes the "appengine.apps.get" call. 3967// Exactly one of *Application or error will be non-nil. Any non-2xx 3968// status code is an error. Response headers are in either 3969// *Application.ServerResponse.Header or (if a response was returned at 3970// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3971// to check whether the returned error was because 3972// http.StatusNotModified was returned. 3973func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) { 3974 gensupport.SetOptions(c.urlParams_, opts...) 3975 res, err := c.doRequest("json") 3976 if res != nil && res.StatusCode == http.StatusNotModified { 3977 if res.Body != nil { 3978 res.Body.Close() 3979 } 3980 return nil, &googleapi.Error{ 3981 Code: res.StatusCode, 3982 Header: res.Header, 3983 } 3984 } 3985 if err != nil { 3986 return nil, err 3987 } 3988 defer googleapi.CloseBody(res) 3989 if err := googleapi.CheckResponse(res); err != nil { 3990 return nil, err 3991 } 3992 ret := &Application{ 3993 ServerResponse: googleapi.ServerResponse{ 3994 Header: res.Header, 3995 HTTPStatusCode: res.StatusCode, 3996 }, 3997 } 3998 target := &ret 3999 if err := gensupport.DecodeResponse(target, res); err != nil { 4000 return nil, err 4001 } 4002 return ret, nil 4003 // { 4004 // "description": "Gets information about an application.", 4005 // "flatPath": "v1beta/apps/{appsId}", 4006 // "httpMethod": "GET", 4007 // "id": "appengine.apps.get", 4008 // "parameterOrder": [ 4009 // "appsId" 4010 // ], 4011 // "parameters": { 4012 // "appsId": { 4013 // "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", 4014 // "location": "path", 4015 // "required": true, 4016 // "type": "string" 4017 // } 4018 // }, 4019 // "path": "v1beta/apps/{appsId}", 4020 // "response": { 4021 // "$ref": "Application" 4022 // }, 4023 // "scopes": [ 4024 // "https://www.googleapis.com/auth/appengine.admin", 4025 // "https://www.googleapis.com/auth/cloud-platform", 4026 // "https://www.googleapis.com/auth/cloud-platform.read-only" 4027 // ] 4028 // } 4029 4030} 4031 4032// method id "appengine.apps.patch": 4033 4034type AppsPatchCall struct { 4035 s *APIService 4036 appsId string 4037 application *Application 4038 urlParams_ gensupport.URLParams 4039 ctx_ context.Context 4040 header_ http.Header 4041} 4042 4043// Patch: Updates the specified Application resource. You can update the 4044// following fields: 4045// auth_domain - Google authentication domain for controlling user 4046// access to the application. 4047// default_cookie_expiration - Cookie expiration policy for the 4048// application. 4049func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall { 4050 c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4051 c.appsId = appsId 4052 c.application = application 4053 return c 4054} 4055 4056// UpdateMask sets the optional parameter "updateMask": Standard field 4057// mask for the set of fields to be updated. 4058func (c *AppsPatchCall) UpdateMask(updateMask string) *AppsPatchCall { 4059 c.urlParams_.Set("updateMask", updateMask) 4060 return c 4061} 4062 4063// Fields allows partial responses to be retrieved. See 4064// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4065// for more information. 4066func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall { 4067 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4068 return c 4069} 4070 4071// Context sets the context to be used in this call's Do method. Any 4072// pending HTTP request will be aborted if the provided context is 4073// canceled. 4074func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall { 4075 c.ctx_ = ctx 4076 return c 4077} 4078 4079// Header returns an http.Header that can be modified by the caller to 4080// add HTTP headers to the request. 4081func (c *AppsPatchCall) Header() http.Header { 4082 if c.header_ == nil { 4083 c.header_ = make(http.Header) 4084 } 4085 return c.header_ 4086} 4087 4088func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) { 4089 reqHeaders := make(http.Header) 4090 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4091 for k, v := range c.header_ { 4092 reqHeaders[k] = v 4093 } 4094 reqHeaders.Set("User-Agent", c.s.userAgent()) 4095 var body io.Reader = nil 4096 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) 4097 if err != nil { 4098 return nil, err 4099 } 4100 reqHeaders.Set("Content-Type", "application/json") 4101 c.urlParams_.Set("alt", alt) 4102 c.urlParams_.Set("prettyPrint", "false") 4103 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}") 4104 urls += "?" + c.urlParams_.Encode() 4105 req, err := http.NewRequest("PATCH", urls, body) 4106 if err != nil { 4107 return nil, err 4108 } 4109 req.Header = reqHeaders 4110 googleapi.Expand(req.URL, map[string]string{ 4111 "appsId": c.appsId, 4112 }) 4113 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4114} 4115 4116// Do executes the "appengine.apps.patch" call. 4117// Exactly one of *Operation or error will be non-nil. Any non-2xx 4118// status code is an error. Response headers are in either 4119// *Operation.ServerResponse.Header or (if a response was returned at 4120// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4121// to check whether the returned error was because 4122// http.StatusNotModified was returned. 4123func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4124 gensupport.SetOptions(c.urlParams_, opts...) 4125 res, err := c.doRequest("json") 4126 if res != nil && res.StatusCode == http.StatusNotModified { 4127 if res.Body != nil { 4128 res.Body.Close() 4129 } 4130 return nil, &googleapi.Error{ 4131 Code: res.StatusCode, 4132 Header: res.Header, 4133 } 4134 } 4135 if err != nil { 4136 return nil, err 4137 } 4138 defer googleapi.CloseBody(res) 4139 if err := googleapi.CheckResponse(res); err != nil { 4140 return nil, err 4141 } 4142 ret := &Operation{ 4143 ServerResponse: googleapi.ServerResponse{ 4144 Header: res.Header, 4145 HTTPStatusCode: res.StatusCode, 4146 }, 4147 } 4148 target := &ret 4149 if err := gensupport.DecodeResponse(target, res); err != nil { 4150 return nil, err 4151 } 4152 return ret, nil 4153 // { 4154 // "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.", 4155 // "flatPath": "v1beta/apps/{appsId}", 4156 // "httpMethod": "PATCH", 4157 // "id": "appengine.apps.patch", 4158 // "parameterOrder": [ 4159 // "appsId" 4160 // ], 4161 // "parameters": { 4162 // "appsId": { 4163 // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", 4164 // "location": "path", 4165 // "required": true, 4166 // "type": "string" 4167 // }, 4168 // "updateMask": { 4169 // "description": "Standard field mask for the set of fields to be updated.", 4170 // "format": "google-fieldmask", 4171 // "location": "query", 4172 // "type": "string" 4173 // } 4174 // }, 4175 // "path": "v1beta/apps/{appsId}", 4176 // "request": { 4177 // "$ref": "Application" 4178 // }, 4179 // "response": { 4180 // "$ref": "Operation" 4181 // }, 4182 // "scopes": [ 4183 // "https://www.googleapis.com/auth/cloud-platform" 4184 // ] 4185 // } 4186 4187} 4188 4189// method id "appengine.apps.repair": 4190 4191type AppsRepairCall struct { 4192 s *APIService 4193 appsId string 4194 repairapplicationrequest *RepairApplicationRequest 4195 urlParams_ gensupport.URLParams 4196 ctx_ context.Context 4197 header_ http.Header 4198} 4199 4200// Repair: Recreates the required App Engine features for the specified 4201// App Engine application, for example a Cloud Storage bucket or App 4202// Engine service account. Use this method if you receive an error 4203// message about a missing feature, for example, Error retrieving the 4204// App Engine service account. If you have deleted your App Engine 4205// service account, this will not be able to recreate it. Instead, you 4206// should attempt to use the IAM undelete API if possible at 4207// 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 4208// Log. 4209func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall { 4210 c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4211 c.appsId = appsId 4212 c.repairapplicationrequest = repairapplicationrequest 4213 return c 4214} 4215 4216// Fields allows partial responses to be retrieved. See 4217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4218// for more information. 4219func (c *AppsRepairCall) Fields(s ...googleapi.Field) *AppsRepairCall { 4220 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4221 return c 4222} 4223 4224// Context sets the context to be used in this call's Do method. Any 4225// pending HTTP request will be aborted if the provided context is 4226// canceled. 4227func (c *AppsRepairCall) Context(ctx context.Context) *AppsRepairCall { 4228 c.ctx_ = ctx 4229 return c 4230} 4231 4232// Header returns an http.Header that can be modified by the caller to 4233// add HTTP headers to the request. 4234func (c *AppsRepairCall) Header() http.Header { 4235 if c.header_ == nil { 4236 c.header_ = make(http.Header) 4237 } 4238 return c.header_ 4239} 4240 4241func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) { 4242 reqHeaders := make(http.Header) 4243 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4244 for k, v := range c.header_ { 4245 reqHeaders[k] = v 4246 } 4247 reqHeaders.Set("User-Agent", c.s.userAgent()) 4248 var body io.Reader = nil 4249 body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairapplicationrequest) 4250 if err != nil { 4251 return nil, err 4252 } 4253 reqHeaders.Set("Content-Type", "application/json") 4254 c.urlParams_.Set("alt", alt) 4255 c.urlParams_.Set("prettyPrint", "false") 4256 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}:repair") 4257 urls += "?" + c.urlParams_.Encode() 4258 req, err := http.NewRequest("POST", urls, body) 4259 if err != nil { 4260 return nil, err 4261 } 4262 req.Header = reqHeaders 4263 googleapi.Expand(req.URL, map[string]string{ 4264 "appsId": c.appsId, 4265 }) 4266 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4267} 4268 4269// Do executes the "appengine.apps.repair" call. 4270// Exactly one of *Operation or error will be non-nil. Any non-2xx 4271// status code is an error. Response headers are in either 4272// *Operation.ServerResponse.Header or (if a response was returned at 4273// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4274// to check whether the returned error was because 4275// http.StatusNotModified was returned. 4276func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4277 gensupport.SetOptions(c.urlParams_, opts...) 4278 res, err := c.doRequest("json") 4279 if res != nil && res.StatusCode == http.StatusNotModified { 4280 if res.Body != nil { 4281 res.Body.Close() 4282 } 4283 return nil, &googleapi.Error{ 4284 Code: res.StatusCode, 4285 Header: res.Header, 4286 } 4287 } 4288 if err != nil { 4289 return nil, err 4290 } 4291 defer googleapi.CloseBody(res) 4292 if err := googleapi.CheckResponse(res); err != nil { 4293 return nil, err 4294 } 4295 ret := &Operation{ 4296 ServerResponse: googleapi.ServerResponse{ 4297 Header: res.Header, 4298 HTTPStatusCode: res.StatusCode, 4299 }, 4300 } 4301 target := &ret 4302 if err := gensupport.DecodeResponse(target, res); err != nil { 4303 return nil, err 4304 } 4305 return ret, nil 4306 // { 4307 // "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.", 4308 // "flatPath": "v1beta/apps/{appsId}:repair", 4309 // "httpMethod": "POST", 4310 // "id": "appengine.apps.repair", 4311 // "parameterOrder": [ 4312 // "appsId" 4313 // ], 4314 // "parameters": { 4315 // "appsId": { 4316 // "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", 4317 // "location": "path", 4318 // "required": true, 4319 // "type": "string" 4320 // } 4321 // }, 4322 // "path": "v1beta/apps/{appsId}:repair", 4323 // "request": { 4324 // "$ref": "RepairApplicationRequest" 4325 // }, 4326 // "response": { 4327 // "$ref": "Operation" 4328 // }, 4329 // "scopes": [ 4330 // "https://www.googleapis.com/auth/cloud-platform" 4331 // ] 4332 // } 4333 4334} 4335 4336// method id "appengine.apps.authorizedCertificates.create": 4337 4338type AppsAuthorizedCertificatesCreateCall struct { 4339 s *APIService 4340 appsId string 4341 authorizedcertificate *AuthorizedCertificate 4342 urlParams_ gensupport.URLParams 4343 ctx_ context.Context 4344 header_ http.Header 4345} 4346 4347// Create: Uploads the specified SSL certificate. 4348func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall { 4349 c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4350 c.appsId = appsId 4351 c.authorizedcertificate = authorizedcertificate 4352 return c 4353} 4354 4355// Fields allows partial responses to be retrieved. See 4356// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4357// for more information. 4358func (c *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall { 4359 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4360 return c 4361} 4362 4363// Context sets the context to be used in this call's Do method. Any 4364// pending HTTP request will be aborted if the provided context is 4365// canceled. 4366func (c *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall { 4367 c.ctx_ = ctx 4368 return c 4369} 4370 4371// Header returns an http.Header that can be modified by the caller to 4372// add HTTP headers to the request. 4373func (c *AppsAuthorizedCertificatesCreateCall) Header() http.Header { 4374 if c.header_ == nil { 4375 c.header_ = make(http.Header) 4376 } 4377 return c.header_ 4378} 4379 4380func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Response, error) { 4381 reqHeaders := make(http.Header) 4382 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4383 for k, v := range c.header_ { 4384 reqHeaders[k] = v 4385 } 4386 reqHeaders.Set("User-Agent", c.s.userAgent()) 4387 var body io.Reader = nil 4388 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate) 4389 if err != nil { 4390 return nil, err 4391 } 4392 reqHeaders.Set("Content-Type", "application/json") 4393 c.urlParams_.Set("alt", alt) 4394 c.urlParams_.Set("prettyPrint", "false") 4395 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates") 4396 urls += "?" + c.urlParams_.Encode() 4397 req, err := http.NewRequest("POST", urls, body) 4398 if err != nil { 4399 return nil, err 4400 } 4401 req.Header = reqHeaders 4402 googleapi.Expand(req.URL, map[string]string{ 4403 "appsId": c.appsId, 4404 }) 4405 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4406} 4407 4408// Do executes the "appengine.apps.authorizedCertificates.create" call. 4409// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 4410// non-2xx status code is an error. Response headers are in either 4411// *AuthorizedCertificate.ServerResponse.Header or (if a response was 4412// returned at all) in error.(*googleapi.Error).Header. Use 4413// googleapi.IsNotModified to check whether the returned error was 4414// because http.StatusNotModified was returned. 4415func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 4416 gensupport.SetOptions(c.urlParams_, opts...) 4417 res, err := c.doRequest("json") 4418 if res != nil && res.StatusCode == http.StatusNotModified { 4419 if res.Body != nil { 4420 res.Body.Close() 4421 } 4422 return nil, &googleapi.Error{ 4423 Code: res.StatusCode, 4424 Header: res.Header, 4425 } 4426 } 4427 if err != nil { 4428 return nil, err 4429 } 4430 defer googleapi.CloseBody(res) 4431 if err := googleapi.CheckResponse(res); err != nil { 4432 return nil, err 4433 } 4434 ret := &AuthorizedCertificate{ 4435 ServerResponse: googleapi.ServerResponse{ 4436 Header: res.Header, 4437 HTTPStatusCode: res.StatusCode, 4438 }, 4439 } 4440 target := &ret 4441 if err := gensupport.DecodeResponse(target, res); err != nil { 4442 return nil, err 4443 } 4444 return ret, nil 4445 // { 4446 // "description": "Uploads the specified SSL certificate.", 4447 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", 4448 // "httpMethod": "POST", 4449 // "id": "appengine.apps.authorizedCertificates.create", 4450 // "parameterOrder": [ 4451 // "appsId" 4452 // ], 4453 // "parameters": { 4454 // "appsId": { 4455 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 4456 // "location": "path", 4457 // "required": true, 4458 // "type": "string" 4459 // } 4460 // }, 4461 // "path": "v1beta/apps/{appsId}/authorizedCertificates", 4462 // "request": { 4463 // "$ref": "AuthorizedCertificate" 4464 // }, 4465 // "response": { 4466 // "$ref": "AuthorizedCertificate" 4467 // }, 4468 // "scopes": [ 4469 // "https://www.googleapis.com/auth/cloud-platform" 4470 // ] 4471 // } 4472 4473} 4474 4475// method id "appengine.apps.authorizedCertificates.delete": 4476 4477type AppsAuthorizedCertificatesDeleteCall struct { 4478 s *APIService 4479 appsId string 4480 authorizedCertificatesId string 4481 urlParams_ gensupport.URLParams 4482 ctx_ context.Context 4483 header_ http.Header 4484} 4485 4486// Delete: Deletes the specified SSL certificate. 4487func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall { 4488 c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4489 c.appsId = appsId 4490 c.authorizedCertificatesId = authorizedCertificatesId 4491 return c 4492} 4493 4494// Fields allows partial responses to be retrieved. See 4495// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4496// for more information. 4497func (c *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall { 4498 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4499 return c 4500} 4501 4502// Context sets the context to be used in this call's Do method. Any 4503// pending HTTP request will be aborted if the provided context is 4504// canceled. 4505func (c *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall { 4506 c.ctx_ = ctx 4507 return c 4508} 4509 4510// Header returns an http.Header that can be modified by the caller to 4511// add HTTP headers to the request. 4512func (c *AppsAuthorizedCertificatesDeleteCall) Header() http.Header { 4513 if c.header_ == nil { 4514 c.header_ = make(http.Header) 4515 } 4516 return c.header_ 4517} 4518 4519func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { 4520 reqHeaders := make(http.Header) 4521 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4522 for k, v := range c.header_ { 4523 reqHeaders[k] = v 4524 } 4525 reqHeaders.Set("User-Agent", c.s.userAgent()) 4526 var body io.Reader = nil 4527 c.urlParams_.Set("alt", alt) 4528 c.urlParams_.Set("prettyPrint", "false") 4529 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 4530 urls += "?" + c.urlParams_.Encode() 4531 req, err := http.NewRequest("DELETE", urls, body) 4532 if err != nil { 4533 return nil, err 4534 } 4535 req.Header = reqHeaders 4536 googleapi.Expand(req.URL, map[string]string{ 4537 "appsId": c.appsId, 4538 "authorizedCertificatesId": c.authorizedCertificatesId, 4539 }) 4540 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4541} 4542 4543// Do executes the "appengine.apps.authorizedCertificates.delete" call. 4544// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4545// code is an error. Response headers are in either 4546// *Empty.ServerResponse.Header or (if a response was returned at all) 4547// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4548// check whether the returned error was because http.StatusNotModified 4549// was returned. 4550func (c *AppsAuthorizedCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4551 gensupport.SetOptions(c.urlParams_, opts...) 4552 res, err := c.doRequest("json") 4553 if res != nil && res.StatusCode == http.StatusNotModified { 4554 if res.Body != nil { 4555 res.Body.Close() 4556 } 4557 return nil, &googleapi.Error{ 4558 Code: res.StatusCode, 4559 Header: res.Header, 4560 } 4561 } 4562 if err != nil { 4563 return nil, err 4564 } 4565 defer googleapi.CloseBody(res) 4566 if err := googleapi.CheckResponse(res); err != nil { 4567 return nil, err 4568 } 4569 ret := &Empty{ 4570 ServerResponse: googleapi.ServerResponse{ 4571 Header: res.Header, 4572 HTTPStatusCode: res.StatusCode, 4573 }, 4574 } 4575 target := &ret 4576 if err := gensupport.DecodeResponse(target, res); err != nil { 4577 return nil, err 4578 } 4579 return ret, nil 4580 // { 4581 // "description": "Deletes the specified SSL certificate.", 4582 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4583 // "httpMethod": "DELETE", 4584 // "id": "appengine.apps.authorizedCertificates.delete", 4585 // "parameterOrder": [ 4586 // "appsId", 4587 // "authorizedCertificatesId" 4588 // ], 4589 // "parameters": { 4590 // "appsId": { 4591 // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", 4592 // "location": "path", 4593 // "required": true, 4594 // "type": "string" 4595 // }, 4596 // "authorizedCertificatesId": { 4597 // "description": "Part of `name`. See documentation of `appsId`.", 4598 // "location": "path", 4599 // "required": true, 4600 // "type": "string" 4601 // } 4602 // }, 4603 // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4604 // "response": { 4605 // "$ref": "Empty" 4606 // }, 4607 // "scopes": [ 4608 // "https://www.googleapis.com/auth/cloud-platform" 4609 // ] 4610 // } 4611 4612} 4613 4614// method id "appengine.apps.authorizedCertificates.get": 4615 4616type AppsAuthorizedCertificatesGetCall struct { 4617 s *APIService 4618 appsId string 4619 authorizedCertificatesId string 4620 urlParams_ gensupport.URLParams 4621 ifNoneMatch_ string 4622 ctx_ context.Context 4623 header_ http.Header 4624} 4625 4626// Get: Gets the specified SSL certificate. 4627func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall { 4628 c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4629 c.appsId = appsId 4630 c.authorizedCertificatesId = authorizedCertificatesId 4631 return c 4632} 4633 4634// View sets the optional parameter "view": Controls the set of fields 4635// returned in the GET response. 4636// 4637// Possible values: 4638// "BASIC_CERTIFICATE" 4639// "FULL_CERTIFICATE" 4640func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall { 4641 c.urlParams_.Set("view", view) 4642 return c 4643} 4644 4645// Fields allows partial responses to be retrieved. See 4646// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4647// for more information. 4648func (c *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall { 4649 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4650 return c 4651} 4652 4653// IfNoneMatch sets the optional parameter which makes the operation 4654// fail if the object's ETag matches the given value. This is useful for 4655// getting updates only after the object has changed since the last 4656// request. Use googleapi.IsNotModified to check whether the response 4657// error from Do is the result of In-None-Match. 4658func (c *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall { 4659 c.ifNoneMatch_ = entityTag 4660 return c 4661} 4662 4663// Context sets the context to be used in this call's Do method. Any 4664// pending HTTP request will be aborted if the provided context is 4665// canceled. 4666func (c *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall { 4667 c.ctx_ = ctx 4668 return c 4669} 4670 4671// Header returns an http.Header that can be modified by the caller to 4672// add HTTP headers to the request. 4673func (c *AppsAuthorizedCertificatesGetCall) Header() http.Header { 4674 if c.header_ == nil { 4675 c.header_ = make(http.Header) 4676 } 4677 return c.header_ 4678} 4679 4680func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) { 4681 reqHeaders := make(http.Header) 4682 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4683 for k, v := range c.header_ { 4684 reqHeaders[k] = v 4685 } 4686 reqHeaders.Set("User-Agent", c.s.userAgent()) 4687 if c.ifNoneMatch_ != "" { 4688 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4689 } 4690 var body io.Reader = nil 4691 c.urlParams_.Set("alt", alt) 4692 c.urlParams_.Set("prettyPrint", "false") 4693 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 4694 urls += "?" + c.urlParams_.Encode() 4695 req, err := http.NewRequest("GET", urls, body) 4696 if err != nil { 4697 return nil, err 4698 } 4699 req.Header = reqHeaders 4700 googleapi.Expand(req.URL, map[string]string{ 4701 "appsId": c.appsId, 4702 "authorizedCertificatesId": c.authorizedCertificatesId, 4703 }) 4704 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4705} 4706 4707// Do executes the "appengine.apps.authorizedCertificates.get" call. 4708// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 4709// non-2xx status code is an error. Response headers are in either 4710// *AuthorizedCertificate.ServerResponse.Header or (if a response was 4711// returned at all) in error.(*googleapi.Error).Header. Use 4712// googleapi.IsNotModified to check whether the returned error was 4713// because http.StatusNotModified was returned. 4714func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 4715 gensupport.SetOptions(c.urlParams_, opts...) 4716 res, err := c.doRequest("json") 4717 if res != nil && res.StatusCode == http.StatusNotModified { 4718 if res.Body != nil { 4719 res.Body.Close() 4720 } 4721 return nil, &googleapi.Error{ 4722 Code: res.StatusCode, 4723 Header: res.Header, 4724 } 4725 } 4726 if err != nil { 4727 return nil, err 4728 } 4729 defer googleapi.CloseBody(res) 4730 if err := googleapi.CheckResponse(res); err != nil { 4731 return nil, err 4732 } 4733 ret := &AuthorizedCertificate{ 4734 ServerResponse: googleapi.ServerResponse{ 4735 Header: res.Header, 4736 HTTPStatusCode: res.StatusCode, 4737 }, 4738 } 4739 target := &ret 4740 if err := gensupport.DecodeResponse(target, res); err != nil { 4741 return nil, err 4742 } 4743 return ret, nil 4744 // { 4745 // "description": "Gets the specified SSL certificate.", 4746 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4747 // "httpMethod": "GET", 4748 // "id": "appengine.apps.authorizedCertificates.get", 4749 // "parameterOrder": [ 4750 // "appsId", 4751 // "authorizedCertificatesId" 4752 // ], 4753 // "parameters": { 4754 // "appsId": { 4755 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", 4756 // "location": "path", 4757 // "required": true, 4758 // "type": "string" 4759 // }, 4760 // "authorizedCertificatesId": { 4761 // "description": "Part of `name`. See documentation of `appsId`.", 4762 // "location": "path", 4763 // "required": true, 4764 // "type": "string" 4765 // }, 4766 // "view": { 4767 // "description": "Controls the set of fields returned in the GET response.", 4768 // "enum": [ 4769 // "BASIC_CERTIFICATE", 4770 // "FULL_CERTIFICATE" 4771 // ], 4772 // "location": "query", 4773 // "type": "string" 4774 // } 4775 // }, 4776 // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4777 // "response": { 4778 // "$ref": "AuthorizedCertificate" 4779 // }, 4780 // "scopes": [ 4781 // "https://www.googleapis.com/auth/appengine.admin", 4782 // "https://www.googleapis.com/auth/cloud-platform", 4783 // "https://www.googleapis.com/auth/cloud-platform.read-only" 4784 // ] 4785 // } 4786 4787} 4788 4789// method id "appengine.apps.authorizedCertificates.list": 4790 4791type AppsAuthorizedCertificatesListCall struct { 4792 s *APIService 4793 appsId string 4794 urlParams_ gensupport.URLParams 4795 ifNoneMatch_ string 4796 ctx_ context.Context 4797 header_ http.Header 4798} 4799 4800// List: Lists all SSL certificates the user is authorized to 4801// administer. 4802func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall { 4803 c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4804 c.appsId = appsId 4805 return c 4806} 4807 4808// PageSize sets the optional parameter "pageSize": Maximum results to 4809// return per page. 4810func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall { 4811 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4812 return c 4813} 4814 4815// PageToken sets the optional parameter "pageToken": Continuation token 4816// for fetching the next page of results. 4817func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall { 4818 c.urlParams_.Set("pageToken", pageToken) 4819 return c 4820} 4821 4822// View sets the optional parameter "view": Controls the set of fields 4823// returned in the LIST response. 4824// 4825// Possible values: 4826// "BASIC_CERTIFICATE" 4827// "FULL_CERTIFICATE" 4828func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall { 4829 c.urlParams_.Set("view", view) 4830 return c 4831} 4832 4833// Fields allows partial responses to be retrieved. See 4834// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4835// for more information. 4836func (c *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall { 4837 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4838 return c 4839} 4840 4841// IfNoneMatch sets the optional parameter which makes the operation 4842// fail if the object's ETag matches the given value. This is useful for 4843// getting updates only after the object has changed since the last 4844// request. Use googleapi.IsNotModified to check whether the response 4845// error from Do is the result of In-None-Match. 4846func (c *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall { 4847 c.ifNoneMatch_ = entityTag 4848 return c 4849} 4850 4851// Context sets the context to be used in this call's Do method. Any 4852// pending HTTP request will be aborted if the provided context is 4853// canceled. 4854func (c *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall { 4855 c.ctx_ = ctx 4856 return c 4857} 4858 4859// Header returns an http.Header that can be modified by the caller to 4860// add HTTP headers to the request. 4861func (c *AppsAuthorizedCertificatesListCall) Header() http.Header { 4862 if c.header_ == nil { 4863 c.header_ = make(http.Header) 4864 } 4865 return c.header_ 4866} 4867 4868func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) { 4869 reqHeaders := make(http.Header) 4870 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4871 for k, v := range c.header_ { 4872 reqHeaders[k] = v 4873 } 4874 reqHeaders.Set("User-Agent", c.s.userAgent()) 4875 if c.ifNoneMatch_ != "" { 4876 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4877 } 4878 var body io.Reader = nil 4879 c.urlParams_.Set("alt", alt) 4880 c.urlParams_.Set("prettyPrint", "false") 4881 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates") 4882 urls += "?" + c.urlParams_.Encode() 4883 req, err := http.NewRequest("GET", urls, body) 4884 if err != nil { 4885 return nil, err 4886 } 4887 req.Header = reqHeaders 4888 googleapi.Expand(req.URL, map[string]string{ 4889 "appsId": c.appsId, 4890 }) 4891 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4892} 4893 4894// Do executes the "appengine.apps.authorizedCertificates.list" call. 4895// Exactly one of *ListAuthorizedCertificatesResponse or error will be 4896// non-nil. Any non-2xx status code is an error. Response headers are in 4897// either *ListAuthorizedCertificatesResponse.ServerResponse.Header or 4898// (if a response was returned at all) in 4899// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4900// whether the returned error was because http.StatusNotModified was 4901// returned. 4902func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, error) { 4903 gensupport.SetOptions(c.urlParams_, opts...) 4904 res, err := c.doRequest("json") 4905 if res != nil && res.StatusCode == http.StatusNotModified { 4906 if res.Body != nil { 4907 res.Body.Close() 4908 } 4909 return nil, &googleapi.Error{ 4910 Code: res.StatusCode, 4911 Header: res.Header, 4912 } 4913 } 4914 if err != nil { 4915 return nil, err 4916 } 4917 defer googleapi.CloseBody(res) 4918 if err := googleapi.CheckResponse(res); err != nil { 4919 return nil, err 4920 } 4921 ret := &ListAuthorizedCertificatesResponse{ 4922 ServerResponse: googleapi.ServerResponse{ 4923 Header: res.Header, 4924 HTTPStatusCode: res.StatusCode, 4925 }, 4926 } 4927 target := &ret 4928 if err := gensupport.DecodeResponse(target, res); err != nil { 4929 return nil, err 4930 } 4931 return ret, nil 4932 // { 4933 // "description": "Lists all SSL certificates the user is authorized to administer.", 4934 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", 4935 // "httpMethod": "GET", 4936 // "id": "appengine.apps.authorizedCertificates.list", 4937 // "parameterOrder": [ 4938 // "appsId" 4939 // ], 4940 // "parameters": { 4941 // "appsId": { 4942 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 4943 // "location": "path", 4944 // "required": true, 4945 // "type": "string" 4946 // }, 4947 // "pageSize": { 4948 // "description": "Maximum results to return per page.", 4949 // "format": "int32", 4950 // "location": "query", 4951 // "type": "integer" 4952 // }, 4953 // "pageToken": { 4954 // "description": "Continuation token for fetching the next page of results.", 4955 // "location": "query", 4956 // "type": "string" 4957 // }, 4958 // "view": { 4959 // "description": "Controls the set of fields returned in the LIST response.", 4960 // "enum": [ 4961 // "BASIC_CERTIFICATE", 4962 // "FULL_CERTIFICATE" 4963 // ], 4964 // "location": "query", 4965 // "type": "string" 4966 // } 4967 // }, 4968 // "path": "v1beta/apps/{appsId}/authorizedCertificates", 4969 // "response": { 4970 // "$ref": "ListAuthorizedCertificatesResponse" 4971 // }, 4972 // "scopes": [ 4973 // "https://www.googleapis.com/auth/appengine.admin", 4974 // "https://www.googleapis.com/auth/cloud-platform", 4975 // "https://www.googleapis.com/auth/cloud-platform.read-only" 4976 // ] 4977 // } 4978 4979} 4980 4981// Pages invokes f for each page of results. 4982// A non-nil error returned from f will halt the iteration. 4983// The provided context supersedes any context provided to the Context method. 4984func (c *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) error) error { 4985 c.ctx_ = ctx 4986 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 4987 for { 4988 x, err := c.Do() 4989 if err != nil { 4990 return err 4991 } 4992 if err := f(x); err != nil { 4993 return err 4994 } 4995 if x.NextPageToken == "" { 4996 return nil 4997 } 4998 c.PageToken(x.NextPageToken) 4999 } 5000} 5001 5002// method id "appengine.apps.authorizedCertificates.patch": 5003 5004type AppsAuthorizedCertificatesPatchCall struct { 5005 s *APIService 5006 appsId string 5007 authorizedCertificatesId string 5008 authorizedcertificate *AuthorizedCertificate 5009 urlParams_ gensupport.URLParams 5010 ctx_ context.Context 5011 header_ http.Header 5012} 5013 5014// Patch: Updates the specified SSL certificate. To renew a certificate 5015// and maintain its existing domain mappings, update certificate_data 5016// with a new certificate. The new certificate must be applicable to the 5017// same domains as the original certificate. The certificate 5018// display_name may also be updated. 5019func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall { 5020 c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5021 c.appsId = appsId 5022 c.authorizedCertificatesId = authorizedCertificatesId 5023 c.authorizedcertificate = authorizedcertificate 5024 return c 5025} 5026 5027// UpdateMask sets the optional parameter "updateMask": Standard field 5028// mask for the set of fields to be updated. Updates are only supported 5029// on the certificate_raw_data and display_name fields. 5030func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall { 5031 c.urlParams_.Set("updateMask", updateMask) 5032 return c 5033} 5034 5035// Fields allows partial responses to be retrieved. See 5036// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5037// for more information. 5038func (c *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall { 5039 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5040 return c 5041} 5042 5043// Context sets the context to be used in this call's Do method. Any 5044// pending HTTP request will be aborted if the provided context is 5045// canceled. 5046func (c *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall { 5047 c.ctx_ = ctx 5048 return c 5049} 5050 5051// Header returns an http.Header that can be modified by the caller to 5052// add HTTP headers to the request. 5053func (c *AppsAuthorizedCertificatesPatchCall) Header() http.Header { 5054 if c.header_ == nil { 5055 c.header_ = make(http.Header) 5056 } 5057 return c.header_ 5058} 5059 5060func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Response, error) { 5061 reqHeaders := make(http.Header) 5062 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5063 for k, v := range c.header_ { 5064 reqHeaders[k] = v 5065 } 5066 reqHeaders.Set("User-Agent", c.s.userAgent()) 5067 var body io.Reader = nil 5068 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate) 5069 if err != nil { 5070 return nil, err 5071 } 5072 reqHeaders.Set("Content-Type", "application/json") 5073 c.urlParams_.Set("alt", alt) 5074 c.urlParams_.Set("prettyPrint", "false") 5075 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 5076 urls += "?" + c.urlParams_.Encode() 5077 req, err := http.NewRequest("PATCH", urls, body) 5078 if err != nil { 5079 return nil, err 5080 } 5081 req.Header = reqHeaders 5082 googleapi.Expand(req.URL, map[string]string{ 5083 "appsId": c.appsId, 5084 "authorizedCertificatesId": c.authorizedCertificatesId, 5085 }) 5086 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5087} 5088 5089// Do executes the "appengine.apps.authorizedCertificates.patch" call. 5090// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 5091// non-2xx status code is an error. Response headers are in either 5092// *AuthorizedCertificate.ServerResponse.Header or (if a response was 5093// returned at all) in error.(*googleapi.Error).Header. Use 5094// googleapi.IsNotModified to check whether the returned error was 5095// because http.StatusNotModified was returned. 5096func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 5097 gensupport.SetOptions(c.urlParams_, opts...) 5098 res, err := c.doRequest("json") 5099 if res != nil && res.StatusCode == http.StatusNotModified { 5100 if res.Body != nil { 5101 res.Body.Close() 5102 } 5103 return nil, &googleapi.Error{ 5104 Code: res.StatusCode, 5105 Header: res.Header, 5106 } 5107 } 5108 if err != nil { 5109 return nil, err 5110 } 5111 defer googleapi.CloseBody(res) 5112 if err := googleapi.CheckResponse(res); err != nil { 5113 return nil, err 5114 } 5115 ret := &AuthorizedCertificate{ 5116 ServerResponse: googleapi.ServerResponse{ 5117 Header: res.Header, 5118 HTTPStatusCode: res.StatusCode, 5119 }, 5120 } 5121 target := &ret 5122 if err := gensupport.DecodeResponse(target, res); err != nil { 5123 return nil, err 5124 } 5125 return ret, nil 5126 // { 5127 // "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.", 5128 // "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 5129 // "httpMethod": "PATCH", 5130 // "id": "appengine.apps.authorizedCertificates.patch", 5131 // "parameterOrder": [ 5132 // "appsId", 5133 // "authorizedCertificatesId" 5134 // ], 5135 // "parameters": { 5136 // "appsId": { 5137 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", 5138 // "location": "path", 5139 // "required": true, 5140 // "type": "string" 5141 // }, 5142 // "authorizedCertificatesId": { 5143 // "description": "Part of `name`. See documentation of `appsId`.", 5144 // "location": "path", 5145 // "required": true, 5146 // "type": "string" 5147 // }, 5148 // "updateMask": { 5149 // "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.", 5150 // "format": "google-fieldmask", 5151 // "location": "query", 5152 // "type": "string" 5153 // } 5154 // }, 5155 // "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 5156 // "request": { 5157 // "$ref": "AuthorizedCertificate" 5158 // }, 5159 // "response": { 5160 // "$ref": "AuthorizedCertificate" 5161 // }, 5162 // "scopes": [ 5163 // "https://www.googleapis.com/auth/cloud-platform" 5164 // ] 5165 // } 5166 5167} 5168 5169// method id "appengine.apps.authorizedDomains.list": 5170 5171type AppsAuthorizedDomainsListCall struct { 5172 s *APIService 5173 appsId string 5174 urlParams_ gensupport.URLParams 5175 ifNoneMatch_ string 5176 ctx_ context.Context 5177 header_ http.Header 5178} 5179 5180// List: Lists all domains the user is authorized to administer. 5181func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall { 5182 c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5183 c.appsId = appsId 5184 return c 5185} 5186 5187// PageSize sets the optional parameter "pageSize": Maximum results to 5188// return per page. 5189func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall { 5190 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5191 return c 5192} 5193 5194// PageToken sets the optional parameter "pageToken": Continuation token 5195// for fetching the next page of results. 5196func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall { 5197 c.urlParams_.Set("pageToken", pageToken) 5198 return c 5199} 5200 5201// Fields allows partial responses to be retrieved. See 5202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5203// for more information. 5204func (c *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall { 5205 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5206 return c 5207} 5208 5209// IfNoneMatch sets the optional parameter which makes the operation 5210// fail if the object's ETag matches the given value. This is useful for 5211// getting updates only after the object has changed since the last 5212// request. Use googleapi.IsNotModified to check whether the response 5213// error from Do is the result of In-None-Match. 5214func (c *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall { 5215 c.ifNoneMatch_ = entityTag 5216 return c 5217} 5218 5219// Context sets the context to be used in this call's Do method. Any 5220// pending HTTP request will be aborted if the provided context is 5221// canceled. 5222func (c *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall { 5223 c.ctx_ = ctx 5224 return c 5225} 5226 5227// Header returns an http.Header that can be modified by the caller to 5228// add HTTP headers to the request. 5229func (c *AppsAuthorizedDomainsListCall) Header() http.Header { 5230 if c.header_ == nil { 5231 c.header_ = make(http.Header) 5232 } 5233 return c.header_ 5234} 5235 5236func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) { 5237 reqHeaders := make(http.Header) 5238 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5239 for k, v := range c.header_ { 5240 reqHeaders[k] = v 5241 } 5242 reqHeaders.Set("User-Agent", c.s.userAgent()) 5243 if c.ifNoneMatch_ != "" { 5244 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5245 } 5246 var body io.Reader = nil 5247 c.urlParams_.Set("alt", alt) 5248 c.urlParams_.Set("prettyPrint", "false") 5249 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/authorizedDomains") 5250 urls += "?" + c.urlParams_.Encode() 5251 req, err := http.NewRequest("GET", urls, body) 5252 if err != nil { 5253 return nil, err 5254 } 5255 req.Header = reqHeaders 5256 googleapi.Expand(req.URL, map[string]string{ 5257 "appsId": c.appsId, 5258 }) 5259 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5260} 5261 5262// Do executes the "appengine.apps.authorizedDomains.list" call. 5263// Exactly one of *ListAuthorizedDomainsResponse or error will be 5264// non-nil. Any non-2xx status code is an error. Response headers are in 5265// either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a 5266// response was returned at all) in error.(*googleapi.Error).Header. Use 5267// googleapi.IsNotModified to check whether the returned error was 5268// because http.StatusNotModified was returned. 5269func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) { 5270 gensupport.SetOptions(c.urlParams_, opts...) 5271 res, err := c.doRequest("json") 5272 if res != nil && res.StatusCode == http.StatusNotModified { 5273 if res.Body != nil { 5274 res.Body.Close() 5275 } 5276 return nil, &googleapi.Error{ 5277 Code: res.StatusCode, 5278 Header: res.Header, 5279 } 5280 } 5281 if err != nil { 5282 return nil, err 5283 } 5284 defer googleapi.CloseBody(res) 5285 if err := googleapi.CheckResponse(res); err != nil { 5286 return nil, err 5287 } 5288 ret := &ListAuthorizedDomainsResponse{ 5289 ServerResponse: googleapi.ServerResponse{ 5290 Header: res.Header, 5291 HTTPStatusCode: res.StatusCode, 5292 }, 5293 } 5294 target := &ret 5295 if err := gensupport.DecodeResponse(target, res); err != nil { 5296 return nil, err 5297 } 5298 return ret, nil 5299 // { 5300 // "description": "Lists all domains the user is authorized to administer.", 5301 // "flatPath": "v1beta/apps/{appsId}/authorizedDomains", 5302 // "httpMethod": "GET", 5303 // "id": "appengine.apps.authorizedDomains.list", 5304 // "parameterOrder": [ 5305 // "appsId" 5306 // ], 5307 // "parameters": { 5308 // "appsId": { 5309 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5310 // "location": "path", 5311 // "required": true, 5312 // "type": "string" 5313 // }, 5314 // "pageSize": { 5315 // "description": "Maximum results to return per page.", 5316 // "format": "int32", 5317 // "location": "query", 5318 // "type": "integer" 5319 // }, 5320 // "pageToken": { 5321 // "description": "Continuation token for fetching the next page of results.", 5322 // "location": "query", 5323 // "type": "string" 5324 // } 5325 // }, 5326 // "path": "v1beta/apps/{appsId}/authorizedDomains", 5327 // "response": { 5328 // "$ref": "ListAuthorizedDomainsResponse" 5329 // }, 5330 // "scopes": [ 5331 // "https://www.googleapis.com/auth/appengine.admin", 5332 // "https://www.googleapis.com/auth/cloud-platform", 5333 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5334 // ] 5335 // } 5336 5337} 5338 5339// Pages invokes f for each page of results. 5340// A non-nil error returned from f will halt the iteration. 5341// The provided context supersedes any context provided to the Context method. 5342func (c *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error { 5343 c.ctx_ = ctx 5344 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5345 for { 5346 x, err := c.Do() 5347 if err != nil { 5348 return err 5349 } 5350 if err := f(x); err != nil { 5351 return err 5352 } 5353 if x.NextPageToken == "" { 5354 return nil 5355 } 5356 c.PageToken(x.NextPageToken) 5357 } 5358} 5359 5360// method id "appengine.apps.domainMappings.create": 5361 5362type AppsDomainMappingsCreateCall struct { 5363 s *APIService 5364 appsId string 5365 domainmapping *DomainMapping 5366 urlParams_ gensupport.URLParams 5367 ctx_ context.Context 5368 header_ http.Header 5369} 5370 5371// Create: Maps a domain to an application. A user must be authorized to 5372// administer a domain in order to map it to an application. For a list 5373// of available authorized domains, see 5374// AuthorizedDomains.ListAuthorizedDomains. 5375func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall { 5376 c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5377 c.appsId = appsId 5378 c.domainmapping = domainmapping 5379 return c 5380} 5381 5382// OverrideStrategy sets the optional parameter "overrideStrategy": 5383// Whether the domain creation should override any existing mappings for 5384// this domain. By default, overrides are rejected. 5385// 5386// Possible values: 5387// "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY" 5388// "STRICT" 5389// "OVERRIDE" 5390func (c *AppsDomainMappingsCreateCall) OverrideStrategy(overrideStrategy string) *AppsDomainMappingsCreateCall { 5391 c.urlParams_.Set("overrideStrategy", overrideStrategy) 5392 return c 5393} 5394 5395// Fields allows partial responses to be retrieved. See 5396// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5397// for more information. 5398func (c *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall { 5399 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5400 return c 5401} 5402 5403// Context sets the context to be used in this call's Do method. Any 5404// pending HTTP request will be aborted if the provided context is 5405// canceled. 5406func (c *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall { 5407 c.ctx_ = ctx 5408 return c 5409} 5410 5411// Header returns an http.Header that can be modified by the caller to 5412// add HTTP headers to the request. 5413func (c *AppsDomainMappingsCreateCall) Header() http.Header { 5414 if c.header_ == nil { 5415 c.header_ = make(http.Header) 5416 } 5417 return c.header_ 5418} 5419 5420func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, error) { 5421 reqHeaders := make(http.Header) 5422 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5423 for k, v := range c.header_ { 5424 reqHeaders[k] = v 5425 } 5426 reqHeaders.Set("User-Agent", c.s.userAgent()) 5427 var body io.Reader = nil 5428 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 5429 if err != nil { 5430 return nil, err 5431 } 5432 reqHeaders.Set("Content-Type", "application/json") 5433 c.urlParams_.Set("alt", alt) 5434 c.urlParams_.Set("prettyPrint", "false") 5435 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings") 5436 urls += "?" + c.urlParams_.Encode() 5437 req, err := http.NewRequest("POST", urls, body) 5438 if err != nil { 5439 return nil, err 5440 } 5441 req.Header = reqHeaders 5442 googleapi.Expand(req.URL, map[string]string{ 5443 "appsId": c.appsId, 5444 }) 5445 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5446} 5447 5448// Do executes the "appengine.apps.domainMappings.create" call. 5449// Exactly one of *Operation or error will be non-nil. Any non-2xx 5450// status code is an error. Response headers are in either 5451// *Operation.ServerResponse.Header or (if a response was returned at 5452// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5453// to check whether the returned error was because 5454// http.StatusNotModified was returned. 5455func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5456 gensupport.SetOptions(c.urlParams_, opts...) 5457 res, err := c.doRequest("json") 5458 if res != nil && res.StatusCode == http.StatusNotModified { 5459 if res.Body != nil { 5460 res.Body.Close() 5461 } 5462 return nil, &googleapi.Error{ 5463 Code: res.StatusCode, 5464 Header: res.Header, 5465 } 5466 } 5467 if err != nil { 5468 return nil, err 5469 } 5470 defer googleapi.CloseBody(res) 5471 if err := googleapi.CheckResponse(res); err != nil { 5472 return nil, err 5473 } 5474 ret := &Operation{ 5475 ServerResponse: googleapi.ServerResponse{ 5476 Header: res.Header, 5477 HTTPStatusCode: res.StatusCode, 5478 }, 5479 } 5480 target := &ret 5481 if err := gensupport.DecodeResponse(target, res); err != nil { 5482 return nil, err 5483 } 5484 return ret, nil 5485 // { 5486 // "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.", 5487 // "flatPath": "v1beta/apps/{appsId}/domainMappings", 5488 // "httpMethod": "POST", 5489 // "id": "appengine.apps.domainMappings.create", 5490 // "parameterOrder": [ 5491 // "appsId" 5492 // ], 5493 // "parameters": { 5494 // "appsId": { 5495 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5496 // "location": "path", 5497 // "required": true, 5498 // "type": "string" 5499 // }, 5500 // "overrideStrategy": { 5501 // "description": "Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.", 5502 // "enum": [ 5503 // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY", 5504 // "STRICT", 5505 // "OVERRIDE" 5506 // ], 5507 // "location": "query", 5508 // "type": "string" 5509 // } 5510 // }, 5511 // "path": "v1beta/apps/{appsId}/domainMappings", 5512 // "request": { 5513 // "$ref": "DomainMapping" 5514 // }, 5515 // "response": { 5516 // "$ref": "Operation" 5517 // }, 5518 // "scopes": [ 5519 // "https://www.googleapis.com/auth/cloud-platform" 5520 // ] 5521 // } 5522 5523} 5524 5525// method id "appengine.apps.domainMappings.delete": 5526 5527type AppsDomainMappingsDeleteCall struct { 5528 s *APIService 5529 appsId string 5530 domainMappingsId string 5531 urlParams_ gensupport.URLParams 5532 ctx_ context.Context 5533 header_ http.Header 5534} 5535 5536// Delete: Deletes the specified domain mapping. A user must be 5537// authorized to administer the associated domain in order to delete a 5538// DomainMapping resource. 5539func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall { 5540 c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5541 c.appsId = appsId 5542 c.domainMappingsId = domainMappingsId 5543 return c 5544} 5545 5546// Fields allows partial responses to be retrieved. See 5547// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5548// for more information. 5549func (c *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall { 5550 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5551 return c 5552} 5553 5554// Context sets the context to be used in this call's Do method. Any 5555// pending HTTP request will be aborted if the provided context is 5556// canceled. 5557func (c *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall { 5558 c.ctx_ = ctx 5559 return c 5560} 5561 5562// Header returns an http.Header that can be modified by the caller to 5563// add HTTP headers to the request. 5564func (c *AppsDomainMappingsDeleteCall) Header() http.Header { 5565 if c.header_ == nil { 5566 c.header_ = make(http.Header) 5567 } 5568 return c.header_ 5569} 5570 5571func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) { 5572 reqHeaders := make(http.Header) 5573 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5574 for k, v := range c.header_ { 5575 reqHeaders[k] = v 5576 } 5577 reqHeaders.Set("User-Agent", c.s.userAgent()) 5578 var body io.Reader = nil 5579 c.urlParams_.Set("alt", alt) 5580 c.urlParams_.Set("prettyPrint", "false") 5581 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}") 5582 urls += "?" + c.urlParams_.Encode() 5583 req, err := http.NewRequest("DELETE", urls, body) 5584 if err != nil { 5585 return nil, err 5586 } 5587 req.Header = reqHeaders 5588 googleapi.Expand(req.URL, map[string]string{ 5589 "appsId": c.appsId, 5590 "domainMappingsId": c.domainMappingsId, 5591 }) 5592 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5593} 5594 5595// Do executes the "appengine.apps.domainMappings.delete" call. 5596// Exactly one of *Operation or error will be non-nil. Any non-2xx 5597// status code is an error. Response headers are in either 5598// *Operation.ServerResponse.Header or (if a response was returned at 5599// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5600// to check whether the returned error was because 5601// http.StatusNotModified was returned. 5602func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5603 gensupport.SetOptions(c.urlParams_, opts...) 5604 res, err := c.doRequest("json") 5605 if res != nil && res.StatusCode == http.StatusNotModified { 5606 if res.Body != nil { 5607 res.Body.Close() 5608 } 5609 return nil, &googleapi.Error{ 5610 Code: res.StatusCode, 5611 Header: res.Header, 5612 } 5613 } 5614 if err != nil { 5615 return nil, err 5616 } 5617 defer googleapi.CloseBody(res) 5618 if err := googleapi.CheckResponse(res); err != nil { 5619 return nil, err 5620 } 5621 ret := &Operation{ 5622 ServerResponse: googleapi.ServerResponse{ 5623 Header: res.Header, 5624 HTTPStatusCode: res.StatusCode, 5625 }, 5626 } 5627 target := &ret 5628 if err := gensupport.DecodeResponse(target, res); err != nil { 5629 return nil, err 5630 } 5631 return ret, nil 5632 // { 5633 // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", 5634 // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 5635 // "httpMethod": "DELETE", 5636 // "id": "appengine.apps.domainMappings.delete", 5637 // "parameterOrder": [ 5638 // "appsId", 5639 // "domainMappingsId" 5640 // ], 5641 // "parameters": { 5642 // "appsId": { 5643 // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", 5644 // "location": "path", 5645 // "required": true, 5646 // "type": "string" 5647 // }, 5648 // "domainMappingsId": { 5649 // "description": "Part of `name`. See documentation of `appsId`.", 5650 // "location": "path", 5651 // "required": true, 5652 // "type": "string" 5653 // } 5654 // }, 5655 // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 5656 // "response": { 5657 // "$ref": "Operation" 5658 // }, 5659 // "scopes": [ 5660 // "https://www.googleapis.com/auth/cloud-platform" 5661 // ] 5662 // } 5663 5664} 5665 5666// method id "appengine.apps.domainMappings.get": 5667 5668type AppsDomainMappingsGetCall struct { 5669 s *APIService 5670 appsId string 5671 domainMappingsId string 5672 urlParams_ gensupport.URLParams 5673 ifNoneMatch_ string 5674 ctx_ context.Context 5675 header_ http.Header 5676} 5677 5678// Get: Gets the specified domain mapping. 5679func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall { 5680 c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5681 c.appsId = appsId 5682 c.domainMappingsId = domainMappingsId 5683 return c 5684} 5685 5686// Fields allows partial responses to be retrieved. See 5687// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5688// for more information. 5689func (c *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall { 5690 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5691 return c 5692} 5693 5694// IfNoneMatch sets the optional parameter which makes the operation 5695// fail if the object's ETag matches the given value. This is useful for 5696// getting updates only after the object has changed since the last 5697// request. Use googleapi.IsNotModified to check whether the response 5698// error from Do is the result of In-None-Match. 5699func (c *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall { 5700 c.ifNoneMatch_ = entityTag 5701 return c 5702} 5703 5704// Context sets the context to be used in this call's Do method. Any 5705// pending HTTP request will be aborted if the provided context is 5706// canceled. 5707func (c *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall { 5708 c.ctx_ = ctx 5709 return c 5710} 5711 5712// Header returns an http.Header that can be modified by the caller to 5713// add HTTP headers to the request. 5714func (c *AppsDomainMappingsGetCall) Header() http.Header { 5715 if c.header_ == nil { 5716 c.header_ = make(http.Header) 5717 } 5718 return c.header_ 5719} 5720 5721func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) { 5722 reqHeaders := make(http.Header) 5723 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5724 for k, v := range c.header_ { 5725 reqHeaders[k] = v 5726 } 5727 reqHeaders.Set("User-Agent", c.s.userAgent()) 5728 if c.ifNoneMatch_ != "" { 5729 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5730 } 5731 var body io.Reader = nil 5732 c.urlParams_.Set("alt", alt) 5733 c.urlParams_.Set("prettyPrint", "false") 5734 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}") 5735 urls += "?" + c.urlParams_.Encode() 5736 req, err := http.NewRequest("GET", urls, body) 5737 if err != nil { 5738 return nil, err 5739 } 5740 req.Header = reqHeaders 5741 googleapi.Expand(req.URL, map[string]string{ 5742 "appsId": c.appsId, 5743 "domainMappingsId": c.domainMappingsId, 5744 }) 5745 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5746} 5747 5748// Do executes the "appengine.apps.domainMappings.get" call. 5749// Exactly one of *DomainMapping or error will be non-nil. Any non-2xx 5750// status code is an error. Response headers are in either 5751// *DomainMapping.ServerResponse.Header or (if a response was returned 5752// at all) in error.(*googleapi.Error).Header. Use 5753// googleapi.IsNotModified to check whether the returned error was 5754// because http.StatusNotModified was returned. 5755func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) { 5756 gensupport.SetOptions(c.urlParams_, opts...) 5757 res, err := c.doRequest("json") 5758 if res != nil && res.StatusCode == http.StatusNotModified { 5759 if res.Body != nil { 5760 res.Body.Close() 5761 } 5762 return nil, &googleapi.Error{ 5763 Code: res.StatusCode, 5764 Header: res.Header, 5765 } 5766 } 5767 if err != nil { 5768 return nil, err 5769 } 5770 defer googleapi.CloseBody(res) 5771 if err := googleapi.CheckResponse(res); err != nil { 5772 return nil, err 5773 } 5774 ret := &DomainMapping{ 5775 ServerResponse: googleapi.ServerResponse{ 5776 Header: res.Header, 5777 HTTPStatusCode: res.StatusCode, 5778 }, 5779 } 5780 target := &ret 5781 if err := gensupport.DecodeResponse(target, res); err != nil { 5782 return nil, err 5783 } 5784 return ret, nil 5785 // { 5786 // "description": "Gets the specified domain mapping.", 5787 // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 5788 // "httpMethod": "GET", 5789 // "id": "appengine.apps.domainMappings.get", 5790 // "parameterOrder": [ 5791 // "appsId", 5792 // "domainMappingsId" 5793 // ], 5794 // "parameters": { 5795 // "appsId": { 5796 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", 5797 // "location": "path", 5798 // "required": true, 5799 // "type": "string" 5800 // }, 5801 // "domainMappingsId": { 5802 // "description": "Part of `name`. See documentation of `appsId`.", 5803 // "location": "path", 5804 // "required": true, 5805 // "type": "string" 5806 // } 5807 // }, 5808 // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 5809 // "response": { 5810 // "$ref": "DomainMapping" 5811 // }, 5812 // "scopes": [ 5813 // "https://www.googleapis.com/auth/appengine.admin", 5814 // "https://www.googleapis.com/auth/cloud-platform", 5815 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5816 // ] 5817 // } 5818 5819} 5820 5821// method id "appengine.apps.domainMappings.list": 5822 5823type AppsDomainMappingsListCall struct { 5824 s *APIService 5825 appsId string 5826 urlParams_ gensupport.URLParams 5827 ifNoneMatch_ string 5828 ctx_ context.Context 5829 header_ http.Header 5830} 5831 5832// List: Lists the domain mappings on an application. 5833func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall { 5834 c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5835 c.appsId = appsId 5836 return c 5837} 5838 5839// PageSize sets the optional parameter "pageSize": Maximum results to 5840// return per page. 5841func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall { 5842 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5843 return c 5844} 5845 5846// PageToken sets the optional parameter "pageToken": Continuation token 5847// for fetching the next page of results. 5848func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall { 5849 c.urlParams_.Set("pageToken", pageToken) 5850 return c 5851} 5852 5853// Fields allows partial responses to be retrieved. See 5854// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5855// for more information. 5856func (c *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall { 5857 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5858 return c 5859} 5860 5861// IfNoneMatch sets the optional parameter which makes the operation 5862// fail if the object's ETag matches the given value. This is useful for 5863// getting updates only after the object has changed since the last 5864// request. Use googleapi.IsNotModified to check whether the response 5865// error from Do is the result of In-None-Match. 5866func (c *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall { 5867 c.ifNoneMatch_ = entityTag 5868 return c 5869} 5870 5871// Context sets the context to be used in this call's Do method. Any 5872// pending HTTP request will be aborted if the provided context is 5873// canceled. 5874func (c *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall { 5875 c.ctx_ = ctx 5876 return c 5877} 5878 5879// Header returns an http.Header that can be modified by the caller to 5880// add HTTP headers to the request. 5881func (c *AppsDomainMappingsListCall) Header() http.Header { 5882 if c.header_ == nil { 5883 c.header_ = make(http.Header) 5884 } 5885 return c.header_ 5886} 5887 5888func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) { 5889 reqHeaders := make(http.Header) 5890 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5891 for k, v := range c.header_ { 5892 reqHeaders[k] = v 5893 } 5894 reqHeaders.Set("User-Agent", c.s.userAgent()) 5895 if c.ifNoneMatch_ != "" { 5896 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5897 } 5898 var body io.Reader = nil 5899 c.urlParams_.Set("alt", alt) 5900 c.urlParams_.Set("prettyPrint", "false") 5901 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings") 5902 urls += "?" + c.urlParams_.Encode() 5903 req, err := http.NewRequest("GET", urls, body) 5904 if err != nil { 5905 return nil, err 5906 } 5907 req.Header = reqHeaders 5908 googleapi.Expand(req.URL, map[string]string{ 5909 "appsId": c.appsId, 5910 }) 5911 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5912} 5913 5914// Do executes the "appengine.apps.domainMappings.list" call. 5915// Exactly one of *ListDomainMappingsResponse or error will be non-nil. 5916// Any non-2xx status code is an error. Response headers are in either 5917// *ListDomainMappingsResponse.ServerResponse.Header or (if a response 5918// was returned at all) in error.(*googleapi.Error).Header. Use 5919// googleapi.IsNotModified to check whether the returned error was 5920// because http.StatusNotModified was returned. 5921func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) { 5922 gensupport.SetOptions(c.urlParams_, opts...) 5923 res, err := c.doRequest("json") 5924 if res != nil && res.StatusCode == http.StatusNotModified { 5925 if res.Body != nil { 5926 res.Body.Close() 5927 } 5928 return nil, &googleapi.Error{ 5929 Code: res.StatusCode, 5930 Header: res.Header, 5931 } 5932 } 5933 if err != nil { 5934 return nil, err 5935 } 5936 defer googleapi.CloseBody(res) 5937 if err := googleapi.CheckResponse(res); err != nil { 5938 return nil, err 5939 } 5940 ret := &ListDomainMappingsResponse{ 5941 ServerResponse: googleapi.ServerResponse{ 5942 Header: res.Header, 5943 HTTPStatusCode: res.StatusCode, 5944 }, 5945 } 5946 target := &ret 5947 if err := gensupport.DecodeResponse(target, res); err != nil { 5948 return nil, err 5949 } 5950 return ret, nil 5951 // { 5952 // "description": "Lists the domain mappings on an application.", 5953 // "flatPath": "v1beta/apps/{appsId}/domainMappings", 5954 // "httpMethod": "GET", 5955 // "id": "appengine.apps.domainMappings.list", 5956 // "parameterOrder": [ 5957 // "appsId" 5958 // ], 5959 // "parameters": { 5960 // "appsId": { 5961 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5962 // "location": "path", 5963 // "required": true, 5964 // "type": "string" 5965 // }, 5966 // "pageSize": { 5967 // "description": "Maximum results to return per page.", 5968 // "format": "int32", 5969 // "location": "query", 5970 // "type": "integer" 5971 // }, 5972 // "pageToken": { 5973 // "description": "Continuation token for fetching the next page of results.", 5974 // "location": "query", 5975 // "type": "string" 5976 // } 5977 // }, 5978 // "path": "v1beta/apps/{appsId}/domainMappings", 5979 // "response": { 5980 // "$ref": "ListDomainMappingsResponse" 5981 // }, 5982 // "scopes": [ 5983 // "https://www.googleapis.com/auth/appengine.admin", 5984 // "https://www.googleapis.com/auth/cloud-platform", 5985 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5986 // ] 5987 // } 5988 5989} 5990 5991// Pages invokes f for each page of results. 5992// A non-nil error returned from f will halt the iteration. 5993// The provided context supersedes any context provided to the Context method. 5994func (c *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) error) error { 5995 c.ctx_ = ctx 5996 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5997 for { 5998 x, err := c.Do() 5999 if err != nil { 6000 return err 6001 } 6002 if err := f(x); err != nil { 6003 return err 6004 } 6005 if x.NextPageToken == "" { 6006 return nil 6007 } 6008 c.PageToken(x.NextPageToken) 6009 } 6010} 6011 6012// method id "appengine.apps.domainMappings.patch": 6013 6014type AppsDomainMappingsPatchCall struct { 6015 s *APIService 6016 appsId string 6017 domainMappingsId string 6018 domainmapping *DomainMapping 6019 urlParams_ gensupport.URLParams 6020 ctx_ context.Context 6021 header_ http.Header 6022} 6023 6024// Patch: Updates the specified domain mapping. To map an SSL 6025// certificate to a domain mapping, update certificate_id to point to an 6026// AuthorizedCertificate resource. A user must be authorized to 6027// administer the associated domain in order to update a DomainMapping 6028// resource. 6029func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall { 6030 c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6031 c.appsId = appsId 6032 c.domainMappingsId = domainMappingsId 6033 c.domainmapping = domainmapping 6034 return c 6035} 6036 6037// UpdateMask sets the optional parameter "updateMask": Standard field 6038// mask for the set of fields to be updated. 6039func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall { 6040 c.urlParams_.Set("updateMask", updateMask) 6041 return c 6042} 6043 6044// Fields allows partial responses to be retrieved. See 6045// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6046// for more information. 6047func (c *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall { 6048 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6049 return c 6050} 6051 6052// Context sets the context to be used in this call's Do method. Any 6053// pending HTTP request will be aborted if the provided context is 6054// canceled. 6055func (c *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall { 6056 c.ctx_ = ctx 6057 return c 6058} 6059 6060// Header returns an http.Header that can be modified by the caller to 6061// add HTTP headers to the request. 6062func (c *AppsDomainMappingsPatchCall) Header() http.Header { 6063 if c.header_ == nil { 6064 c.header_ = make(http.Header) 6065 } 6066 return c.header_ 6067} 6068 6069func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, error) { 6070 reqHeaders := make(http.Header) 6071 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6072 for k, v := range c.header_ { 6073 reqHeaders[k] = v 6074 } 6075 reqHeaders.Set("User-Agent", c.s.userAgent()) 6076 var body io.Reader = nil 6077 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 6078 if err != nil { 6079 return nil, err 6080 } 6081 reqHeaders.Set("Content-Type", "application/json") 6082 c.urlParams_.Set("alt", alt) 6083 c.urlParams_.Set("prettyPrint", "false") 6084 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}") 6085 urls += "?" + c.urlParams_.Encode() 6086 req, err := http.NewRequest("PATCH", urls, body) 6087 if err != nil { 6088 return nil, err 6089 } 6090 req.Header = reqHeaders 6091 googleapi.Expand(req.URL, map[string]string{ 6092 "appsId": c.appsId, 6093 "domainMappingsId": c.domainMappingsId, 6094 }) 6095 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6096} 6097 6098// Do executes the "appengine.apps.domainMappings.patch" call. 6099// Exactly one of *Operation or error will be non-nil. Any non-2xx 6100// status code is an error. Response headers are in either 6101// *Operation.ServerResponse.Header or (if a response was returned at 6102// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6103// to check whether the returned error was because 6104// http.StatusNotModified was returned. 6105func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6106 gensupport.SetOptions(c.urlParams_, opts...) 6107 res, err := c.doRequest("json") 6108 if res != nil && res.StatusCode == http.StatusNotModified { 6109 if res.Body != nil { 6110 res.Body.Close() 6111 } 6112 return nil, &googleapi.Error{ 6113 Code: res.StatusCode, 6114 Header: res.Header, 6115 } 6116 } 6117 if err != nil { 6118 return nil, err 6119 } 6120 defer googleapi.CloseBody(res) 6121 if err := googleapi.CheckResponse(res); err != nil { 6122 return nil, err 6123 } 6124 ret := &Operation{ 6125 ServerResponse: googleapi.ServerResponse{ 6126 Header: res.Header, 6127 HTTPStatusCode: res.StatusCode, 6128 }, 6129 } 6130 target := &ret 6131 if err := gensupport.DecodeResponse(target, res); err != nil { 6132 return nil, err 6133 } 6134 return ret, nil 6135 // { 6136 // "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.", 6137 // "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 6138 // "httpMethod": "PATCH", 6139 // "id": "appengine.apps.domainMappings.patch", 6140 // "parameterOrder": [ 6141 // "appsId", 6142 // "domainMappingsId" 6143 // ], 6144 // "parameters": { 6145 // "appsId": { 6146 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", 6147 // "location": "path", 6148 // "required": true, 6149 // "type": "string" 6150 // }, 6151 // "domainMappingsId": { 6152 // "description": "Part of `name`. See documentation of `appsId`.", 6153 // "location": "path", 6154 // "required": true, 6155 // "type": "string" 6156 // }, 6157 // "updateMask": { 6158 // "description": "Standard field mask for the set of fields to be updated.", 6159 // "format": "google-fieldmask", 6160 // "location": "query", 6161 // "type": "string" 6162 // } 6163 // }, 6164 // "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", 6165 // "request": { 6166 // "$ref": "DomainMapping" 6167 // }, 6168 // "response": { 6169 // "$ref": "Operation" 6170 // }, 6171 // "scopes": [ 6172 // "https://www.googleapis.com/auth/cloud-platform" 6173 // ] 6174 // } 6175 6176} 6177 6178// method id "appengine.apps.firewall.ingressRules.batchUpdate": 6179 6180type AppsFirewallIngressRulesBatchUpdateCall struct { 6181 s *APIService 6182 appsId string 6183 batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest 6184 urlParams_ gensupport.URLParams 6185 ctx_ context.Context 6186 header_ http.Header 6187} 6188 6189// BatchUpdate: Replaces the entire firewall ruleset in one bulk 6190// operation. This overrides and replaces the rules of an existing 6191// firewall with the new rules.If the final rule does not match traffic 6192// with the '*' wildcard IP range, then an "allow all" rule is 6193// explicitly added to the end of the list. 6194func (r *AppsFirewallIngressRulesService) BatchUpdate(appsId string, batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest) *AppsFirewallIngressRulesBatchUpdateCall { 6195 c := &AppsFirewallIngressRulesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6196 c.appsId = appsId 6197 c.batchupdateingressrulesrequest = batchupdateingressrulesrequest 6198 return c 6199} 6200 6201// Fields allows partial responses to be retrieved. See 6202// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6203// for more information. 6204func (c *AppsFirewallIngressRulesBatchUpdateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesBatchUpdateCall { 6205 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6206 return c 6207} 6208 6209// Context sets the context to be used in this call's Do method. Any 6210// pending HTTP request will be aborted if the provided context is 6211// canceled. 6212func (c *AppsFirewallIngressRulesBatchUpdateCall) Context(ctx context.Context) *AppsFirewallIngressRulesBatchUpdateCall { 6213 c.ctx_ = ctx 6214 return c 6215} 6216 6217// Header returns an http.Header that can be modified by the caller to 6218// add HTTP headers to the request. 6219func (c *AppsFirewallIngressRulesBatchUpdateCall) Header() http.Header { 6220 if c.header_ == nil { 6221 c.header_ = make(http.Header) 6222 } 6223 return c.header_ 6224} 6225 6226func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 6227 reqHeaders := make(http.Header) 6228 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6229 for k, v := range c.header_ { 6230 reqHeaders[k] = v 6231 } 6232 reqHeaders.Set("User-Agent", c.s.userAgent()) 6233 var body io.Reader = nil 6234 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdateingressrulesrequest) 6235 if err != nil { 6236 return nil, err 6237 } 6238 reqHeaders.Set("Content-Type", "application/json") 6239 c.urlParams_.Set("alt", alt) 6240 c.urlParams_.Set("prettyPrint", "false") 6241 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate") 6242 urls += "?" + c.urlParams_.Encode() 6243 req, err := http.NewRequest("POST", urls, body) 6244 if err != nil { 6245 return nil, err 6246 } 6247 req.Header = reqHeaders 6248 googleapi.Expand(req.URL, map[string]string{ 6249 "appsId": c.appsId, 6250 }) 6251 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6252} 6253 6254// Do executes the "appengine.apps.firewall.ingressRules.batchUpdate" call. 6255// Exactly one of *BatchUpdateIngressRulesResponse or error will be 6256// non-nil. Any non-2xx status code is an error. Response headers are in 6257// either *BatchUpdateIngressRulesResponse.ServerResponse.Header or (if 6258// a response was returned at all) in error.(*googleapi.Error).Header. 6259// Use googleapi.IsNotModified to check whether the returned error was 6260// because http.StatusNotModified was returned. 6261func (c *AppsFirewallIngressRulesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateIngressRulesResponse, error) { 6262 gensupport.SetOptions(c.urlParams_, opts...) 6263 res, err := c.doRequest("json") 6264 if res != nil && res.StatusCode == http.StatusNotModified { 6265 if res.Body != nil { 6266 res.Body.Close() 6267 } 6268 return nil, &googleapi.Error{ 6269 Code: res.StatusCode, 6270 Header: res.Header, 6271 } 6272 } 6273 if err != nil { 6274 return nil, err 6275 } 6276 defer googleapi.CloseBody(res) 6277 if err := googleapi.CheckResponse(res); err != nil { 6278 return nil, err 6279 } 6280 ret := &BatchUpdateIngressRulesResponse{ 6281 ServerResponse: googleapi.ServerResponse{ 6282 Header: res.Header, 6283 HTTPStatusCode: res.StatusCode, 6284 }, 6285 } 6286 target := &ret 6287 if err := gensupport.DecodeResponse(target, res); err != nil { 6288 return nil, err 6289 } 6290 return ret, nil 6291 // { 6292 // "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.", 6293 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", 6294 // "httpMethod": "POST", 6295 // "id": "appengine.apps.firewall.ingressRules.batchUpdate", 6296 // "parameterOrder": [ 6297 // "appsId" 6298 // ], 6299 // "parameters": { 6300 // "appsId": { 6301 // "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.", 6302 // "location": "path", 6303 // "required": true, 6304 // "type": "string" 6305 // } 6306 // }, 6307 // "path": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", 6308 // "request": { 6309 // "$ref": "BatchUpdateIngressRulesRequest" 6310 // }, 6311 // "response": { 6312 // "$ref": "BatchUpdateIngressRulesResponse" 6313 // }, 6314 // "scopes": [ 6315 // "https://www.googleapis.com/auth/cloud-platform" 6316 // ] 6317 // } 6318 6319} 6320 6321// method id "appengine.apps.firewall.ingressRules.create": 6322 6323type AppsFirewallIngressRulesCreateCall struct { 6324 s *APIService 6325 appsId string 6326 firewallrule *FirewallRule 6327 urlParams_ gensupport.URLParams 6328 ctx_ context.Context 6329 header_ http.Header 6330} 6331 6332// Create: Creates a firewall rule for the application. 6333func (r *AppsFirewallIngressRulesService) Create(appsId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesCreateCall { 6334 c := &AppsFirewallIngressRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6335 c.appsId = appsId 6336 c.firewallrule = firewallrule 6337 return c 6338} 6339 6340// Fields allows partial responses to be retrieved. See 6341// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6342// for more information. 6343func (c *AppsFirewallIngressRulesCreateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesCreateCall { 6344 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6345 return c 6346} 6347 6348// Context sets the context to be used in this call's Do method. Any 6349// pending HTTP request will be aborted if the provided context is 6350// canceled. 6351func (c *AppsFirewallIngressRulesCreateCall) Context(ctx context.Context) *AppsFirewallIngressRulesCreateCall { 6352 c.ctx_ = ctx 6353 return c 6354} 6355 6356// Header returns an http.Header that can be modified by the caller to 6357// add HTTP headers to the request. 6358func (c *AppsFirewallIngressRulesCreateCall) Header() http.Header { 6359 if c.header_ == nil { 6360 c.header_ = make(http.Header) 6361 } 6362 return c.header_ 6363} 6364 6365func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Response, error) { 6366 reqHeaders := make(http.Header) 6367 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6368 for k, v := range c.header_ { 6369 reqHeaders[k] = v 6370 } 6371 reqHeaders.Set("User-Agent", c.s.userAgent()) 6372 var body io.Reader = nil 6373 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) 6374 if err != nil { 6375 return nil, err 6376 } 6377 reqHeaders.Set("Content-Type", "application/json") 6378 c.urlParams_.Set("alt", alt) 6379 c.urlParams_.Set("prettyPrint", "false") 6380 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules") 6381 urls += "?" + c.urlParams_.Encode() 6382 req, err := http.NewRequest("POST", urls, body) 6383 if err != nil { 6384 return nil, err 6385 } 6386 req.Header = reqHeaders 6387 googleapi.Expand(req.URL, map[string]string{ 6388 "appsId": c.appsId, 6389 }) 6390 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6391} 6392 6393// Do executes the "appengine.apps.firewall.ingressRules.create" call. 6394// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 6395// status code is an error. Response headers are in either 6396// *FirewallRule.ServerResponse.Header or (if a response was returned at 6397// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6398// to check whether the returned error was because 6399// http.StatusNotModified was returned. 6400func (c *AppsFirewallIngressRulesCreateCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 6401 gensupport.SetOptions(c.urlParams_, opts...) 6402 res, err := c.doRequest("json") 6403 if res != nil && res.StatusCode == http.StatusNotModified { 6404 if res.Body != nil { 6405 res.Body.Close() 6406 } 6407 return nil, &googleapi.Error{ 6408 Code: res.StatusCode, 6409 Header: res.Header, 6410 } 6411 } 6412 if err != nil { 6413 return nil, err 6414 } 6415 defer googleapi.CloseBody(res) 6416 if err := googleapi.CheckResponse(res); err != nil { 6417 return nil, err 6418 } 6419 ret := &FirewallRule{ 6420 ServerResponse: googleapi.ServerResponse{ 6421 Header: res.Header, 6422 HTTPStatusCode: res.StatusCode, 6423 }, 6424 } 6425 target := &ret 6426 if err := gensupport.DecodeResponse(target, res); err != nil { 6427 return nil, err 6428 } 6429 return ret, nil 6430 // { 6431 // "description": "Creates a firewall rule for the application.", 6432 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", 6433 // "httpMethod": "POST", 6434 // "id": "appengine.apps.firewall.ingressRules.create", 6435 // "parameterOrder": [ 6436 // "appsId" 6437 // ], 6438 // "parameters": { 6439 // "appsId": { 6440 // "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", 6441 // "location": "path", 6442 // "required": true, 6443 // "type": "string" 6444 // } 6445 // }, 6446 // "path": "v1beta/apps/{appsId}/firewall/ingressRules", 6447 // "request": { 6448 // "$ref": "FirewallRule" 6449 // }, 6450 // "response": { 6451 // "$ref": "FirewallRule" 6452 // }, 6453 // "scopes": [ 6454 // "https://www.googleapis.com/auth/cloud-platform" 6455 // ] 6456 // } 6457 6458} 6459 6460// method id "appengine.apps.firewall.ingressRules.delete": 6461 6462type AppsFirewallIngressRulesDeleteCall struct { 6463 s *APIService 6464 appsId string 6465 ingressRulesId string 6466 urlParams_ gensupport.URLParams 6467 ctx_ context.Context 6468 header_ http.Header 6469} 6470 6471// Delete: Deletes the specified firewall rule. 6472func (r *AppsFirewallIngressRulesService) Delete(appsId string, ingressRulesId string) *AppsFirewallIngressRulesDeleteCall { 6473 c := &AppsFirewallIngressRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6474 c.appsId = appsId 6475 c.ingressRulesId = ingressRulesId 6476 return c 6477} 6478 6479// Fields allows partial responses to be retrieved. See 6480// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6481// for more information. 6482func (c *AppsFirewallIngressRulesDeleteCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesDeleteCall { 6483 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6484 return c 6485} 6486 6487// Context sets the context to be used in this call's Do method. Any 6488// pending HTTP request will be aborted if the provided context is 6489// canceled. 6490func (c *AppsFirewallIngressRulesDeleteCall) Context(ctx context.Context) *AppsFirewallIngressRulesDeleteCall { 6491 c.ctx_ = ctx 6492 return c 6493} 6494 6495// Header returns an http.Header that can be modified by the caller to 6496// add HTTP headers to the request. 6497func (c *AppsFirewallIngressRulesDeleteCall) Header() http.Header { 6498 if c.header_ == nil { 6499 c.header_ = make(http.Header) 6500 } 6501 return c.header_ 6502} 6503 6504func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Response, error) { 6505 reqHeaders := make(http.Header) 6506 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6507 for k, v := range c.header_ { 6508 reqHeaders[k] = v 6509 } 6510 reqHeaders.Set("User-Agent", c.s.userAgent()) 6511 var body io.Reader = nil 6512 c.urlParams_.Set("alt", alt) 6513 c.urlParams_.Set("prettyPrint", "false") 6514 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 6515 urls += "?" + c.urlParams_.Encode() 6516 req, err := http.NewRequest("DELETE", urls, body) 6517 if err != nil { 6518 return nil, err 6519 } 6520 req.Header = reqHeaders 6521 googleapi.Expand(req.URL, map[string]string{ 6522 "appsId": c.appsId, 6523 "ingressRulesId": c.ingressRulesId, 6524 }) 6525 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6526} 6527 6528// Do executes the "appengine.apps.firewall.ingressRules.delete" call. 6529// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6530// code is an error. Response headers are in either 6531// *Empty.ServerResponse.Header or (if a response was returned at all) 6532// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6533// check whether the returned error was because http.StatusNotModified 6534// was returned. 6535func (c *AppsFirewallIngressRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6536 gensupport.SetOptions(c.urlParams_, opts...) 6537 res, err := c.doRequest("json") 6538 if res != nil && res.StatusCode == http.StatusNotModified { 6539 if res.Body != nil { 6540 res.Body.Close() 6541 } 6542 return nil, &googleapi.Error{ 6543 Code: res.StatusCode, 6544 Header: res.Header, 6545 } 6546 } 6547 if err != nil { 6548 return nil, err 6549 } 6550 defer googleapi.CloseBody(res) 6551 if err := googleapi.CheckResponse(res); err != nil { 6552 return nil, err 6553 } 6554 ret := &Empty{ 6555 ServerResponse: googleapi.ServerResponse{ 6556 Header: res.Header, 6557 HTTPStatusCode: res.StatusCode, 6558 }, 6559 } 6560 target := &ret 6561 if err := gensupport.DecodeResponse(target, res); err != nil { 6562 return nil, err 6563 } 6564 return ret, nil 6565 // { 6566 // "description": "Deletes the specified firewall rule.", 6567 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6568 // "httpMethod": "DELETE", 6569 // "id": "appengine.apps.firewall.ingressRules.delete", 6570 // "parameterOrder": [ 6571 // "appsId", 6572 // "ingressRulesId" 6573 // ], 6574 // "parameters": { 6575 // "appsId": { 6576 // "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.", 6577 // "location": "path", 6578 // "required": true, 6579 // "type": "string" 6580 // }, 6581 // "ingressRulesId": { 6582 // "description": "Part of `name`. See documentation of `appsId`.", 6583 // "location": "path", 6584 // "required": true, 6585 // "type": "string" 6586 // } 6587 // }, 6588 // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6589 // "response": { 6590 // "$ref": "Empty" 6591 // }, 6592 // "scopes": [ 6593 // "https://www.googleapis.com/auth/cloud-platform" 6594 // ] 6595 // } 6596 6597} 6598 6599// method id "appengine.apps.firewall.ingressRules.get": 6600 6601type AppsFirewallIngressRulesGetCall struct { 6602 s *APIService 6603 appsId string 6604 ingressRulesId string 6605 urlParams_ gensupport.URLParams 6606 ifNoneMatch_ string 6607 ctx_ context.Context 6608 header_ http.Header 6609} 6610 6611// Get: Gets the specified firewall rule. 6612func (r *AppsFirewallIngressRulesService) Get(appsId string, ingressRulesId string) *AppsFirewallIngressRulesGetCall { 6613 c := &AppsFirewallIngressRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6614 c.appsId = appsId 6615 c.ingressRulesId = ingressRulesId 6616 return c 6617} 6618 6619// Fields allows partial responses to be retrieved. See 6620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6621// for more information. 6622func (c *AppsFirewallIngressRulesGetCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesGetCall { 6623 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6624 return c 6625} 6626 6627// IfNoneMatch sets the optional parameter which makes the operation 6628// fail if the object's ETag matches the given value. This is useful for 6629// getting updates only after the object has changed since the last 6630// request. Use googleapi.IsNotModified to check whether the response 6631// error from Do is the result of In-None-Match. 6632func (c *AppsFirewallIngressRulesGetCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesGetCall { 6633 c.ifNoneMatch_ = entityTag 6634 return c 6635} 6636 6637// Context sets the context to be used in this call's Do method. Any 6638// pending HTTP request will be aborted if the provided context is 6639// canceled. 6640func (c *AppsFirewallIngressRulesGetCall) Context(ctx context.Context) *AppsFirewallIngressRulesGetCall { 6641 c.ctx_ = ctx 6642 return c 6643} 6644 6645// Header returns an http.Header that can be modified by the caller to 6646// add HTTP headers to the request. 6647func (c *AppsFirewallIngressRulesGetCall) Header() http.Header { 6648 if c.header_ == nil { 6649 c.header_ = make(http.Header) 6650 } 6651 return c.header_ 6652} 6653 6654func (c *AppsFirewallIngressRulesGetCall) doRequest(alt string) (*http.Response, error) { 6655 reqHeaders := make(http.Header) 6656 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6657 for k, v := range c.header_ { 6658 reqHeaders[k] = v 6659 } 6660 reqHeaders.Set("User-Agent", c.s.userAgent()) 6661 if c.ifNoneMatch_ != "" { 6662 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6663 } 6664 var body io.Reader = nil 6665 c.urlParams_.Set("alt", alt) 6666 c.urlParams_.Set("prettyPrint", "false") 6667 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 6668 urls += "?" + c.urlParams_.Encode() 6669 req, err := http.NewRequest("GET", urls, body) 6670 if err != nil { 6671 return nil, err 6672 } 6673 req.Header = reqHeaders 6674 googleapi.Expand(req.URL, map[string]string{ 6675 "appsId": c.appsId, 6676 "ingressRulesId": c.ingressRulesId, 6677 }) 6678 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6679} 6680 6681// Do executes the "appengine.apps.firewall.ingressRules.get" call. 6682// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 6683// status code is an error. Response headers are in either 6684// *FirewallRule.ServerResponse.Header or (if a response was returned at 6685// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6686// to check whether the returned error was because 6687// http.StatusNotModified was returned. 6688func (c *AppsFirewallIngressRulesGetCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 6689 gensupport.SetOptions(c.urlParams_, opts...) 6690 res, err := c.doRequest("json") 6691 if res != nil && res.StatusCode == http.StatusNotModified { 6692 if res.Body != nil { 6693 res.Body.Close() 6694 } 6695 return nil, &googleapi.Error{ 6696 Code: res.StatusCode, 6697 Header: res.Header, 6698 } 6699 } 6700 if err != nil { 6701 return nil, err 6702 } 6703 defer googleapi.CloseBody(res) 6704 if err := googleapi.CheckResponse(res); err != nil { 6705 return nil, err 6706 } 6707 ret := &FirewallRule{ 6708 ServerResponse: googleapi.ServerResponse{ 6709 Header: res.Header, 6710 HTTPStatusCode: res.StatusCode, 6711 }, 6712 } 6713 target := &ret 6714 if err := gensupport.DecodeResponse(target, res); err != nil { 6715 return nil, err 6716 } 6717 return ret, nil 6718 // { 6719 // "description": "Gets the specified firewall rule.", 6720 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6721 // "httpMethod": "GET", 6722 // "id": "appengine.apps.firewall.ingressRules.get", 6723 // "parameterOrder": [ 6724 // "appsId", 6725 // "ingressRulesId" 6726 // ], 6727 // "parameters": { 6728 // "appsId": { 6729 // "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.", 6730 // "location": "path", 6731 // "required": true, 6732 // "type": "string" 6733 // }, 6734 // "ingressRulesId": { 6735 // "description": "Part of `name`. See documentation of `appsId`.", 6736 // "location": "path", 6737 // "required": true, 6738 // "type": "string" 6739 // } 6740 // }, 6741 // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6742 // "response": { 6743 // "$ref": "FirewallRule" 6744 // }, 6745 // "scopes": [ 6746 // "https://www.googleapis.com/auth/appengine.admin", 6747 // "https://www.googleapis.com/auth/cloud-platform", 6748 // "https://www.googleapis.com/auth/cloud-platform.read-only" 6749 // ] 6750 // } 6751 6752} 6753 6754// method id "appengine.apps.firewall.ingressRules.list": 6755 6756type AppsFirewallIngressRulesListCall struct { 6757 s *APIService 6758 appsId string 6759 urlParams_ gensupport.URLParams 6760 ifNoneMatch_ string 6761 ctx_ context.Context 6762 header_ http.Header 6763} 6764 6765// List: Lists the firewall rules of an application. 6766func (r *AppsFirewallIngressRulesService) List(appsId string) *AppsFirewallIngressRulesListCall { 6767 c := &AppsFirewallIngressRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6768 c.appsId = appsId 6769 return c 6770} 6771 6772// MatchingAddress sets the optional parameter "matchingAddress": A 6773// valid IP Address. If set, only rules matching this address will be 6774// returned. The first returned rule will be the rule that fires on 6775// requests from this IP. 6776func (c *AppsFirewallIngressRulesListCall) MatchingAddress(matchingAddress string) *AppsFirewallIngressRulesListCall { 6777 c.urlParams_.Set("matchingAddress", matchingAddress) 6778 return c 6779} 6780 6781// PageSize sets the optional parameter "pageSize": Maximum results to 6782// return per page. 6783func (c *AppsFirewallIngressRulesListCall) PageSize(pageSize int64) *AppsFirewallIngressRulesListCall { 6784 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6785 return c 6786} 6787 6788// PageToken sets the optional parameter "pageToken": Continuation token 6789// for fetching the next page of results. 6790func (c *AppsFirewallIngressRulesListCall) PageToken(pageToken string) *AppsFirewallIngressRulesListCall { 6791 c.urlParams_.Set("pageToken", pageToken) 6792 return c 6793} 6794 6795// Fields allows partial responses to be retrieved. See 6796// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6797// for more information. 6798func (c *AppsFirewallIngressRulesListCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesListCall { 6799 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6800 return c 6801} 6802 6803// IfNoneMatch sets the optional parameter which makes the operation 6804// fail if the object's ETag matches the given value. This is useful for 6805// getting updates only after the object has changed since the last 6806// request. Use googleapi.IsNotModified to check whether the response 6807// error from Do is the result of In-None-Match. 6808func (c *AppsFirewallIngressRulesListCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesListCall { 6809 c.ifNoneMatch_ = entityTag 6810 return c 6811} 6812 6813// Context sets the context to be used in this call's Do method. Any 6814// pending HTTP request will be aborted if the provided context is 6815// canceled. 6816func (c *AppsFirewallIngressRulesListCall) Context(ctx context.Context) *AppsFirewallIngressRulesListCall { 6817 c.ctx_ = ctx 6818 return c 6819} 6820 6821// Header returns an http.Header that can be modified by the caller to 6822// add HTTP headers to the request. 6823func (c *AppsFirewallIngressRulesListCall) Header() http.Header { 6824 if c.header_ == nil { 6825 c.header_ = make(http.Header) 6826 } 6827 return c.header_ 6828} 6829 6830func (c *AppsFirewallIngressRulesListCall) doRequest(alt string) (*http.Response, error) { 6831 reqHeaders := make(http.Header) 6832 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6833 for k, v := range c.header_ { 6834 reqHeaders[k] = v 6835 } 6836 reqHeaders.Set("User-Agent", c.s.userAgent()) 6837 if c.ifNoneMatch_ != "" { 6838 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6839 } 6840 var body io.Reader = nil 6841 c.urlParams_.Set("alt", alt) 6842 c.urlParams_.Set("prettyPrint", "false") 6843 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules") 6844 urls += "?" + c.urlParams_.Encode() 6845 req, err := http.NewRequest("GET", urls, body) 6846 if err != nil { 6847 return nil, err 6848 } 6849 req.Header = reqHeaders 6850 googleapi.Expand(req.URL, map[string]string{ 6851 "appsId": c.appsId, 6852 }) 6853 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6854} 6855 6856// Do executes the "appengine.apps.firewall.ingressRules.list" call. 6857// Exactly one of *ListIngressRulesResponse or error will be non-nil. 6858// Any non-2xx status code is an error. Response headers are in either 6859// *ListIngressRulesResponse.ServerResponse.Header or (if a response was 6860// returned at all) in error.(*googleapi.Error).Header. Use 6861// googleapi.IsNotModified to check whether the returned error was 6862// because http.StatusNotModified was returned. 6863func (c *AppsFirewallIngressRulesListCall) Do(opts ...googleapi.CallOption) (*ListIngressRulesResponse, error) { 6864 gensupport.SetOptions(c.urlParams_, opts...) 6865 res, err := c.doRequest("json") 6866 if res != nil && res.StatusCode == http.StatusNotModified { 6867 if res.Body != nil { 6868 res.Body.Close() 6869 } 6870 return nil, &googleapi.Error{ 6871 Code: res.StatusCode, 6872 Header: res.Header, 6873 } 6874 } 6875 if err != nil { 6876 return nil, err 6877 } 6878 defer googleapi.CloseBody(res) 6879 if err := googleapi.CheckResponse(res); err != nil { 6880 return nil, err 6881 } 6882 ret := &ListIngressRulesResponse{ 6883 ServerResponse: googleapi.ServerResponse{ 6884 Header: res.Header, 6885 HTTPStatusCode: res.StatusCode, 6886 }, 6887 } 6888 target := &ret 6889 if err := gensupport.DecodeResponse(target, res); err != nil { 6890 return nil, err 6891 } 6892 return ret, nil 6893 // { 6894 // "description": "Lists the firewall rules of an application.", 6895 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", 6896 // "httpMethod": "GET", 6897 // "id": "appengine.apps.firewall.ingressRules.list", 6898 // "parameterOrder": [ 6899 // "appsId" 6900 // ], 6901 // "parameters": { 6902 // "appsId": { 6903 // "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", 6904 // "location": "path", 6905 // "required": true, 6906 // "type": "string" 6907 // }, 6908 // "matchingAddress": { 6909 // "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.", 6910 // "location": "query", 6911 // "type": "string" 6912 // }, 6913 // "pageSize": { 6914 // "description": "Maximum results to return per page.", 6915 // "format": "int32", 6916 // "location": "query", 6917 // "type": "integer" 6918 // }, 6919 // "pageToken": { 6920 // "description": "Continuation token for fetching the next page of results.", 6921 // "location": "query", 6922 // "type": "string" 6923 // } 6924 // }, 6925 // "path": "v1beta/apps/{appsId}/firewall/ingressRules", 6926 // "response": { 6927 // "$ref": "ListIngressRulesResponse" 6928 // }, 6929 // "scopes": [ 6930 // "https://www.googleapis.com/auth/appengine.admin", 6931 // "https://www.googleapis.com/auth/cloud-platform", 6932 // "https://www.googleapis.com/auth/cloud-platform.read-only" 6933 // ] 6934 // } 6935 6936} 6937 6938// Pages invokes f for each page of results. 6939// A non-nil error returned from f will halt the iteration. 6940// The provided context supersedes any context provided to the Context method. 6941func (c *AppsFirewallIngressRulesListCall) Pages(ctx context.Context, f func(*ListIngressRulesResponse) error) error { 6942 c.ctx_ = ctx 6943 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6944 for { 6945 x, err := c.Do() 6946 if err != nil { 6947 return err 6948 } 6949 if err := f(x); err != nil { 6950 return err 6951 } 6952 if x.NextPageToken == "" { 6953 return nil 6954 } 6955 c.PageToken(x.NextPageToken) 6956 } 6957} 6958 6959// method id "appengine.apps.firewall.ingressRules.patch": 6960 6961type AppsFirewallIngressRulesPatchCall struct { 6962 s *APIService 6963 appsId string 6964 ingressRulesId string 6965 firewallrule *FirewallRule 6966 urlParams_ gensupport.URLParams 6967 ctx_ context.Context 6968 header_ http.Header 6969} 6970 6971// Patch: Updates the specified firewall rule. 6972func (r *AppsFirewallIngressRulesService) Patch(appsId string, ingressRulesId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesPatchCall { 6973 c := &AppsFirewallIngressRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6974 c.appsId = appsId 6975 c.ingressRulesId = ingressRulesId 6976 c.firewallrule = firewallrule 6977 return c 6978} 6979 6980// UpdateMask sets the optional parameter "updateMask": Standard field 6981// mask for the set of fields to be updated. 6982func (c *AppsFirewallIngressRulesPatchCall) UpdateMask(updateMask string) *AppsFirewallIngressRulesPatchCall { 6983 c.urlParams_.Set("updateMask", updateMask) 6984 return c 6985} 6986 6987// Fields allows partial responses to be retrieved. See 6988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6989// for more information. 6990func (c *AppsFirewallIngressRulesPatchCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesPatchCall { 6991 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6992 return c 6993} 6994 6995// Context sets the context to be used in this call's Do method. Any 6996// pending HTTP request will be aborted if the provided context is 6997// canceled. 6998func (c *AppsFirewallIngressRulesPatchCall) Context(ctx context.Context) *AppsFirewallIngressRulesPatchCall { 6999 c.ctx_ = ctx 7000 return c 7001} 7002 7003// Header returns an http.Header that can be modified by the caller to 7004// add HTTP headers to the request. 7005func (c *AppsFirewallIngressRulesPatchCall) Header() http.Header { 7006 if c.header_ == nil { 7007 c.header_ = make(http.Header) 7008 } 7009 return c.header_ 7010} 7011 7012func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Response, error) { 7013 reqHeaders := make(http.Header) 7014 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7015 for k, v := range c.header_ { 7016 reqHeaders[k] = v 7017 } 7018 reqHeaders.Set("User-Agent", c.s.userAgent()) 7019 var body io.Reader = nil 7020 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) 7021 if err != nil { 7022 return nil, err 7023 } 7024 reqHeaders.Set("Content-Type", "application/json") 7025 c.urlParams_.Set("alt", alt) 7026 c.urlParams_.Set("prettyPrint", "false") 7027 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 7028 urls += "?" + c.urlParams_.Encode() 7029 req, err := http.NewRequest("PATCH", urls, body) 7030 if err != nil { 7031 return nil, err 7032 } 7033 req.Header = reqHeaders 7034 googleapi.Expand(req.URL, map[string]string{ 7035 "appsId": c.appsId, 7036 "ingressRulesId": c.ingressRulesId, 7037 }) 7038 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7039} 7040 7041// Do executes the "appengine.apps.firewall.ingressRules.patch" call. 7042// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 7043// status code is an error. Response headers are in either 7044// *FirewallRule.ServerResponse.Header or (if a response was returned at 7045// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7046// to check whether the returned error was because 7047// http.StatusNotModified was returned. 7048func (c *AppsFirewallIngressRulesPatchCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 7049 gensupport.SetOptions(c.urlParams_, opts...) 7050 res, err := c.doRequest("json") 7051 if res != nil && res.StatusCode == http.StatusNotModified { 7052 if res.Body != nil { 7053 res.Body.Close() 7054 } 7055 return nil, &googleapi.Error{ 7056 Code: res.StatusCode, 7057 Header: res.Header, 7058 } 7059 } 7060 if err != nil { 7061 return nil, err 7062 } 7063 defer googleapi.CloseBody(res) 7064 if err := googleapi.CheckResponse(res); err != nil { 7065 return nil, err 7066 } 7067 ret := &FirewallRule{ 7068 ServerResponse: googleapi.ServerResponse{ 7069 Header: res.Header, 7070 HTTPStatusCode: res.StatusCode, 7071 }, 7072 } 7073 target := &ret 7074 if err := gensupport.DecodeResponse(target, res); err != nil { 7075 return nil, err 7076 } 7077 return ret, nil 7078 // { 7079 // "description": "Updates the specified firewall rule.", 7080 // "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 7081 // "httpMethod": "PATCH", 7082 // "id": "appengine.apps.firewall.ingressRules.patch", 7083 // "parameterOrder": [ 7084 // "appsId", 7085 // "ingressRulesId" 7086 // ], 7087 // "parameters": { 7088 // "appsId": { 7089 // "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.", 7090 // "location": "path", 7091 // "required": true, 7092 // "type": "string" 7093 // }, 7094 // "ingressRulesId": { 7095 // "description": "Part of `name`. See documentation of `appsId`.", 7096 // "location": "path", 7097 // "required": true, 7098 // "type": "string" 7099 // }, 7100 // "updateMask": { 7101 // "description": "Standard field mask for the set of fields to be updated.", 7102 // "format": "google-fieldmask", 7103 // "location": "query", 7104 // "type": "string" 7105 // } 7106 // }, 7107 // "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 7108 // "request": { 7109 // "$ref": "FirewallRule" 7110 // }, 7111 // "response": { 7112 // "$ref": "FirewallRule" 7113 // }, 7114 // "scopes": [ 7115 // "https://www.googleapis.com/auth/cloud-platform" 7116 // ] 7117 // } 7118 7119} 7120 7121// method id "appengine.apps.locations.get": 7122 7123type AppsLocationsGetCall struct { 7124 s *APIService 7125 appsId string 7126 locationsId string 7127 urlParams_ gensupport.URLParams 7128 ifNoneMatch_ string 7129 ctx_ context.Context 7130 header_ http.Header 7131} 7132 7133// Get: Gets information about a location. 7134func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall { 7135 c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7136 c.appsId = appsId 7137 c.locationsId = locationsId 7138 return c 7139} 7140 7141// Fields allows partial responses to be retrieved. See 7142// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7143// for more information. 7144func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall { 7145 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7146 return c 7147} 7148 7149// IfNoneMatch sets the optional parameter which makes the operation 7150// fail if the object's ETag matches the given value. This is useful for 7151// getting updates only after the object has changed since the last 7152// request. Use googleapi.IsNotModified to check whether the response 7153// error from Do is the result of In-None-Match. 7154func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall { 7155 c.ifNoneMatch_ = entityTag 7156 return c 7157} 7158 7159// Context sets the context to be used in this call's Do method. Any 7160// pending HTTP request will be aborted if the provided context is 7161// canceled. 7162func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall { 7163 c.ctx_ = ctx 7164 return c 7165} 7166 7167// Header returns an http.Header that can be modified by the caller to 7168// add HTTP headers to the request. 7169func (c *AppsLocationsGetCall) Header() http.Header { 7170 if c.header_ == nil { 7171 c.header_ = make(http.Header) 7172 } 7173 return c.header_ 7174} 7175 7176func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 7177 reqHeaders := make(http.Header) 7178 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7179 for k, v := range c.header_ { 7180 reqHeaders[k] = v 7181 } 7182 reqHeaders.Set("User-Agent", c.s.userAgent()) 7183 if c.ifNoneMatch_ != "" { 7184 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7185 } 7186 var body io.Reader = nil 7187 c.urlParams_.Set("alt", alt) 7188 c.urlParams_.Set("prettyPrint", "false") 7189 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/locations/{locationsId}") 7190 urls += "?" + c.urlParams_.Encode() 7191 req, err := http.NewRequest("GET", urls, body) 7192 if err != nil { 7193 return nil, err 7194 } 7195 req.Header = reqHeaders 7196 googleapi.Expand(req.URL, map[string]string{ 7197 "appsId": c.appsId, 7198 "locationsId": c.locationsId, 7199 }) 7200 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7201} 7202 7203// Do executes the "appengine.apps.locations.get" call. 7204// Exactly one of *Location or error will be non-nil. Any non-2xx status 7205// code is an error. Response headers are in either 7206// *Location.ServerResponse.Header or (if a response was returned at 7207// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7208// to check whether the returned error was because 7209// http.StatusNotModified was returned. 7210func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 7211 gensupport.SetOptions(c.urlParams_, opts...) 7212 res, err := c.doRequest("json") 7213 if res != nil && res.StatusCode == http.StatusNotModified { 7214 if res.Body != nil { 7215 res.Body.Close() 7216 } 7217 return nil, &googleapi.Error{ 7218 Code: res.StatusCode, 7219 Header: res.Header, 7220 } 7221 } 7222 if err != nil { 7223 return nil, err 7224 } 7225 defer googleapi.CloseBody(res) 7226 if err := googleapi.CheckResponse(res); err != nil { 7227 return nil, err 7228 } 7229 ret := &Location{ 7230 ServerResponse: googleapi.ServerResponse{ 7231 Header: res.Header, 7232 HTTPStatusCode: res.StatusCode, 7233 }, 7234 } 7235 target := &ret 7236 if err := gensupport.DecodeResponse(target, res); err != nil { 7237 return nil, err 7238 } 7239 return ret, nil 7240 // { 7241 // "description": "Gets information about a location.", 7242 // "flatPath": "v1beta/apps/{appsId}/locations/{locationsId}", 7243 // "httpMethod": "GET", 7244 // "id": "appengine.apps.locations.get", 7245 // "parameterOrder": [ 7246 // "appsId", 7247 // "locationsId" 7248 // ], 7249 // "parameters": { 7250 // "appsId": { 7251 // "description": "Part of `name`. Resource name for the location.", 7252 // "location": "path", 7253 // "required": true, 7254 // "type": "string" 7255 // }, 7256 // "locationsId": { 7257 // "description": "Part of `name`. See documentation of `appsId`.", 7258 // "location": "path", 7259 // "required": true, 7260 // "type": "string" 7261 // } 7262 // }, 7263 // "path": "v1beta/apps/{appsId}/locations/{locationsId}", 7264 // "response": { 7265 // "$ref": "Location" 7266 // }, 7267 // "scopes": [ 7268 // "https://www.googleapis.com/auth/appengine.admin", 7269 // "https://www.googleapis.com/auth/cloud-platform", 7270 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7271 // ] 7272 // } 7273 7274} 7275 7276// method id "appengine.apps.locations.list": 7277 7278type AppsLocationsListCall struct { 7279 s *APIService 7280 appsId string 7281 urlParams_ gensupport.URLParams 7282 ifNoneMatch_ string 7283 ctx_ context.Context 7284 header_ http.Header 7285} 7286 7287// List: Lists information about the supported locations for this 7288// service. 7289func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall { 7290 c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7291 c.appsId = appsId 7292 return c 7293} 7294 7295// Filter sets the optional parameter "filter": The standard list 7296// filter. 7297func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall { 7298 c.urlParams_.Set("filter", filter) 7299 return c 7300} 7301 7302// PageSize sets the optional parameter "pageSize": The standard list 7303// page size. 7304func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall { 7305 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7306 return c 7307} 7308 7309// PageToken sets the optional parameter "pageToken": The standard list 7310// page token. 7311func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall { 7312 c.urlParams_.Set("pageToken", pageToken) 7313 return c 7314} 7315 7316// Fields allows partial responses to be retrieved. See 7317// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7318// for more information. 7319func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall { 7320 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7321 return c 7322} 7323 7324// IfNoneMatch sets the optional parameter which makes the operation 7325// fail if the object's ETag matches the given value. This is useful for 7326// getting updates only after the object has changed since the last 7327// request. Use googleapi.IsNotModified to check whether the response 7328// error from Do is the result of In-None-Match. 7329func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall { 7330 c.ifNoneMatch_ = entityTag 7331 return c 7332} 7333 7334// Context sets the context to be used in this call's Do method. Any 7335// pending HTTP request will be aborted if the provided context is 7336// canceled. 7337func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall { 7338 c.ctx_ = ctx 7339 return c 7340} 7341 7342// Header returns an http.Header that can be modified by the caller to 7343// add HTTP headers to the request. 7344func (c *AppsLocationsListCall) Header() http.Header { 7345 if c.header_ == nil { 7346 c.header_ = make(http.Header) 7347 } 7348 return c.header_ 7349} 7350 7351func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) { 7352 reqHeaders := make(http.Header) 7353 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7354 for k, v := range c.header_ { 7355 reqHeaders[k] = v 7356 } 7357 reqHeaders.Set("User-Agent", c.s.userAgent()) 7358 if c.ifNoneMatch_ != "" { 7359 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7360 } 7361 var body io.Reader = nil 7362 c.urlParams_.Set("alt", alt) 7363 c.urlParams_.Set("prettyPrint", "false") 7364 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/locations") 7365 urls += "?" + c.urlParams_.Encode() 7366 req, err := http.NewRequest("GET", urls, body) 7367 if err != nil { 7368 return nil, err 7369 } 7370 req.Header = reqHeaders 7371 googleapi.Expand(req.URL, map[string]string{ 7372 "appsId": c.appsId, 7373 }) 7374 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7375} 7376 7377// Do executes the "appengine.apps.locations.list" call. 7378// Exactly one of *ListLocationsResponse or error will be non-nil. Any 7379// non-2xx status code is an error. Response headers are in either 7380// *ListLocationsResponse.ServerResponse.Header or (if a response was 7381// returned at all) in error.(*googleapi.Error).Header. Use 7382// googleapi.IsNotModified to check whether the returned error was 7383// because http.StatusNotModified was returned. 7384func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 7385 gensupport.SetOptions(c.urlParams_, opts...) 7386 res, err := c.doRequest("json") 7387 if res != nil && res.StatusCode == http.StatusNotModified { 7388 if res.Body != nil { 7389 res.Body.Close() 7390 } 7391 return nil, &googleapi.Error{ 7392 Code: res.StatusCode, 7393 Header: res.Header, 7394 } 7395 } 7396 if err != nil { 7397 return nil, err 7398 } 7399 defer googleapi.CloseBody(res) 7400 if err := googleapi.CheckResponse(res); err != nil { 7401 return nil, err 7402 } 7403 ret := &ListLocationsResponse{ 7404 ServerResponse: googleapi.ServerResponse{ 7405 Header: res.Header, 7406 HTTPStatusCode: res.StatusCode, 7407 }, 7408 } 7409 target := &ret 7410 if err := gensupport.DecodeResponse(target, res); err != nil { 7411 return nil, err 7412 } 7413 return ret, nil 7414 // { 7415 // "description": "Lists information about the supported locations for this service.", 7416 // "flatPath": "v1beta/apps/{appsId}/locations", 7417 // "httpMethod": "GET", 7418 // "id": "appengine.apps.locations.list", 7419 // "parameterOrder": [ 7420 // "appsId" 7421 // ], 7422 // "parameters": { 7423 // "appsId": { 7424 // "description": "Part of `name`. The resource that owns the locations collection, if applicable.", 7425 // "location": "path", 7426 // "required": true, 7427 // "type": "string" 7428 // }, 7429 // "filter": { 7430 // "description": "The standard list filter.", 7431 // "location": "query", 7432 // "type": "string" 7433 // }, 7434 // "pageSize": { 7435 // "description": "The standard list page size.", 7436 // "format": "int32", 7437 // "location": "query", 7438 // "type": "integer" 7439 // }, 7440 // "pageToken": { 7441 // "description": "The standard list page token.", 7442 // "location": "query", 7443 // "type": "string" 7444 // } 7445 // }, 7446 // "path": "v1beta/apps/{appsId}/locations", 7447 // "response": { 7448 // "$ref": "ListLocationsResponse" 7449 // }, 7450 // "scopes": [ 7451 // "https://www.googleapis.com/auth/appengine.admin", 7452 // "https://www.googleapis.com/auth/cloud-platform", 7453 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7454 // ] 7455 // } 7456 7457} 7458 7459// Pages invokes f for each page of results. 7460// A non-nil error returned from f will halt the iteration. 7461// The provided context supersedes any context provided to the Context method. 7462func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 7463 c.ctx_ = ctx 7464 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7465 for { 7466 x, err := c.Do() 7467 if err != nil { 7468 return err 7469 } 7470 if err := f(x); err != nil { 7471 return err 7472 } 7473 if x.NextPageToken == "" { 7474 return nil 7475 } 7476 c.PageToken(x.NextPageToken) 7477 } 7478} 7479 7480// method id "appengine.apps.operations.get": 7481 7482type AppsOperationsGetCall struct { 7483 s *APIService 7484 appsId string 7485 operationsId string 7486 urlParams_ gensupport.URLParams 7487 ifNoneMatch_ string 7488 ctx_ context.Context 7489 header_ http.Header 7490} 7491 7492// Get: Gets the latest state of a long-running operation. Clients can 7493// use this method to poll the operation result at intervals as 7494// recommended by the API service. 7495func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall { 7496 c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7497 c.appsId = appsId 7498 c.operationsId = operationsId 7499 return c 7500} 7501 7502// Fields allows partial responses to be retrieved. See 7503// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7504// for more information. 7505func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall { 7506 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7507 return c 7508} 7509 7510// IfNoneMatch sets the optional parameter which makes the operation 7511// fail if the object's ETag matches the given value. This is useful for 7512// getting updates only after the object has changed since the last 7513// request. Use googleapi.IsNotModified to check whether the response 7514// error from Do is the result of In-None-Match. 7515func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall { 7516 c.ifNoneMatch_ = entityTag 7517 return c 7518} 7519 7520// Context sets the context to be used in this call's Do method. Any 7521// pending HTTP request will be aborted if the provided context is 7522// canceled. 7523func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall { 7524 c.ctx_ = ctx 7525 return c 7526} 7527 7528// Header returns an http.Header that can be modified by the caller to 7529// add HTTP headers to the request. 7530func (c *AppsOperationsGetCall) Header() http.Header { 7531 if c.header_ == nil { 7532 c.header_ = make(http.Header) 7533 } 7534 return c.header_ 7535} 7536 7537func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 7538 reqHeaders := make(http.Header) 7539 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7540 for k, v := range c.header_ { 7541 reqHeaders[k] = v 7542 } 7543 reqHeaders.Set("User-Agent", c.s.userAgent()) 7544 if c.ifNoneMatch_ != "" { 7545 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7546 } 7547 var body io.Reader = nil 7548 c.urlParams_.Set("alt", alt) 7549 c.urlParams_.Set("prettyPrint", "false") 7550 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/operations/{operationsId}") 7551 urls += "?" + c.urlParams_.Encode() 7552 req, err := http.NewRequest("GET", urls, body) 7553 if err != nil { 7554 return nil, err 7555 } 7556 req.Header = reqHeaders 7557 googleapi.Expand(req.URL, map[string]string{ 7558 "appsId": c.appsId, 7559 "operationsId": c.operationsId, 7560 }) 7561 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7562} 7563 7564// Do executes the "appengine.apps.operations.get" call. 7565// Exactly one of *Operation or error will be non-nil. Any non-2xx 7566// status code is an error. Response headers are in either 7567// *Operation.ServerResponse.Header or (if a response was returned at 7568// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7569// to check whether the returned error was because 7570// http.StatusNotModified was returned. 7571func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7572 gensupport.SetOptions(c.urlParams_, opts...) 7573 res, err := c.doRequest("json") 7574 if res != nil && res.StatusCode == http.StatusNotModified { 7575 if res.Body != nil { 7576 res.Body.Close() 7577 } 7578 return nil, &googleapi.Error{ 7579 Code: res.StatusCode, 7580 Header: res.Header, 7581 } 7582 } 7583 if err != nil { 7584 return nil, err 7585 } 7586 defer googleapi.CloseBody(res) 7587 if err := googleapi.CheckResponse(res); err != nil { 7588 return nil, err 7589 } 7590 ret := &Operation{ 7591 ServerResponse: googleapi.ServerResponse{ 7592 Header: res.Header, 7593 HTTPStatusCode: res.StatusCode, 7594 }, 7595 } 7596 target := &ret 7597 if err := gensupport.DecodeResponse(target, res); err != nil { 7598 return nil, err 7599 } 7600 return ret, nil 7601 // { 7602 // "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.", 7603 // "flatPath": "v1beta/apps/{appsId}/operations/{operationsId}", 7604 // "httpMethod": "GET", 7605 // "id": "appengine.apps.operations.get", 7606 // "parameterOrder": [ 7607 // "appsId", 7608 // "operationsId" 7609 // ], 7610 // "parameters": { 7611 // "appsId": { 7612 // "description": "Part of `name`. The name of the operation resource.", 7613 // "location": "path", 7614 // "required": true, 7615 // "type": "string" 7616 // }, 7617 // "operationsId": { 7618 // "description": "Part of `name`. See documentation of `appsId`.", 7619 // "location": "path", 7620 // "required": true, 7621 // "type": "string" 7622 // } 7623 // }, 7624 // "path": "v1beta/apps/{appsId}/operations/{operationsId}", 7625 // "response": { 7626 // "$ref": "Operation" 7627 // }, 7628 // "scopes": [ 7629 // "https://www.googleapis.com/auth/appengine.admin", 7630 // "https://www.googleapis.com/auth/cloud-platform", 7631 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7632 // ] 7633 // } 7634 7635} 7636 7637// method id "appengine.apps.operations.list": 7638 7639type AppsOperationsListCall struct { 7640 s *APIService 7641 appsId string 7642 urlParams_ gensupport.URLParams 7643 ifNoneMatch_ string 7644 ctx_ context.Context 7645 header_ http.Header 7646} 7647 7648// List: Lists operations that match the specified filter in the 7649// request. If the server doesn't support this method, it returns 7650// UNIMPLEMENTED.NOTE: the name binding allows API services to override 7651// the binding to use different resource name schemes, such as 7652// users/*/operations. To override the binding, API services can add a 7653// binding such as "/v1/{name=users/*}/operations" to their service 7654// configuration. For backwards compatibility, the default name includes 7655// the operations collection id, however overriding users must ensure 7656// the name binding is the parent resource, without the operations 7657// collection id. 7658func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall { 7659 c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7660 c.appsId = appsId 7661 return c 7662} 7663 7664// Filter sets the optional parameter "filter": The standard list 7665// filter. 7666func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall { 7667 c.urlParams_.Set("filter", filter) 7668 return c 7669} 7670 7671// PageSize sets the optional parameter "pageSize": The standard list 7672// page size. 7673func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall { 7674 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7675 return c 7676} 7677 7678// PageToken sets the optional parameter "pageToken": The standard list 7679// page token. 7680func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall { 7681 c.urlParams_.Set("pageToken", pageToken) 7682 return c 7683} 7684 7685// Fields allows partial responses to be retrieved. See 7686// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7687// for more information. 7688func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall { 7689 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7690 return c 7691} 7692 7693// IfNoneMatch sets the optional parameter which makes the operation 7694// fail if the object's ETag matches the given value. This is useful for 7695// getting updates only after the object has changed since the last 7696// request. Use googleapi.IsNotModified to check whether the response 7697// error from Do is the result of In-None-Match. 7698func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall { 7699 c.ifNoneMatch_ = entityTag 7700 return c 7701} 7702 7703// Context sets the context to be used in this call's Do method. Any 7704// pending HTTP request will be aborted if the provided context is 7705// canceled. 7706func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall { 7707 c.ctx_ = ctx 7708 return c 7709} 7710 7711// Header returns an http.Header that can be modified by the caller to 7712// add HTTP headers to the request. 7713func (c *AppsOperationsListCall) Header() http.Header { 7714 if c.header_ == nil { 7715 c.header_ = make(http.Header) 7716 } 7717 return c.header_ 7718} 7719 7720func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) { 7721 reqHeaders := make(http.Header) 7722 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7723 for k, v := range c.header_ { 7724 reqHeaders[k] = v 7725 } 7726 reqHeaders.Set("User-Agent", c.s.userAgent()) 7727 if c.ifNoneMatch_ != "" { 7728 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7729 } 7730 var body io.Reader = nil 7731 c.urlParams_.Set("alt", alt) 7732 c.urlParams_.Set("prettyPrint", "false") 7733 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/operations") 7734 urls += "?" + c.urlParams_.Encode() 7735 req, err := http.NewRequest("GET", urls, body) 7736 if err != nil { 7737 return nil, err 7738 } 7739 req.Header = reqHeaders 7740 googleapi.Expand(req.URL, map[string]string{ 7741 "appsId": c.appsId, 7742 }) 7743 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7744} 7745 7746// Do executes the "appengine.apps.operations.list" call. 7747// Exactly one of *ListOperationsResponse or error will be non-nil. Any 7748// non-2xx status code is an error. Response headers are in either 7749// *ListOperationsResponse.ServerResponse.Header or (if a response was 7750// returned at all) in error.(*googleapi.Error).Header. Use 7751// googleapi.IsNotModified to check whether the returned error was 7752// because http.StatusNotModified was returned. 7753func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 7754 gensupport.SetOptions(c.urlParams_, opts...) 7755 res, err := c.doRequest("json") 7756 if res != nil && res.StatusCode == http.StatusNotModified { 7757 if res.Body != nil { 7758 res.Body.Close() 7759 } 7760 return nil, &googleapi.Error{ 7761 Code: res.StatusCode, 7762 Header: res.Header, 7763 } 7764 } 7765 if err != nil { 7766 return nil, err 7767 } 7768 defer googleapi.CloseBody(res) 7769 if err := googleapi.CheckResponse(res); err != nil { 7770 return nil, err 7771 } 7772 ret := &ListOperationsResponse{ 7773 ServerResponse: googleapi.ServerResponse{ 7774 Header: res.Header, 7775 HTTPStatusCode: res.StatusCode, 7776 }, 7777 } 7778 target := &ret 7779 if err := gensupport.DecodeResponse(target, res); err != nil { 7780 return nil, err 7781 } 7782 return ret, nil 7783 // { 7784 // "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.", 7785 // "flatPath": "v1beta/apps/{appsId}/operations", 7786 // "httpMethod": "GET", 7787 // "id": "appengine.apps.operations.list", 7788 // "parameterOrder": [ 7789 // "appsId" 7790 // ], 7791 // "parameters": { 7792 // "appsId": { 7793 // "description": "Part of `name`. The name of the operation's parent resource.", 7794 // "location": "path", 7795 // "required": true, 7796 // "type": "string" 7797 // }, 7798 // "filter": { 7799 // "description": "The standard list filter.", 7800 // "location": "query", 7801 // "type": "string" 7802 // }, 7803 // "pageSize": { 7804 // "description": "The standard list page size.", 7805 // "format": "int32", 7806 // "location": "query", 7807 // "type": "integer" 7808 // }, 7809 // "pageToken": { 7810 // "description": "The standard list page token.", 7811 // "location": "query", 7812 // "type": "string" 7813 // } 7814 // }, 7815 // "path": "v1beta/apps/{appsId}/operations", 7816 // "response": { 7817 // "$ref": "ListOperationsResponse" 7818 // }, 7819 // "scopes": [ 7820 // "https://www.googleapis.com/auth/appengine.admin", 7821 // "https://www.googleapis.com/auth/cloud-platform", 7822 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7823 // ] 7824 // } 7825 7826} 7827 7828// Pages invokes f for each page of results. 7829// A non-nil error returned from f will halt the iteration. 7830// The provided context supersedes any context provided to the Context method. 7831func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 7832 c.ctx_ = ctx 7833 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7834 for { 7835 x, err := c.Do() 7836 if err != nil { 7837 return err 7838 } 7839 if err := f(x); err != nil { 7840 return err 7841 } 7842 if x.NextPageToken == "" { 7843 return nil 7844 } 7845 c.PageToken(x.NextPageToken) 7846 } 7847} 7848 7849// method id "appengine.apps.services.delete": 7850 7851type AppsServicesDeleteCall struct { 7852 s *APIService 7853 appsId string 7854 servicesId string 7855 urlParams_ gensupport.URLParams 7856 ctx_ context.Context 7857 header_ http.Header 7858} 7859 7860// Delete: Deletes the specified service and all enclosed versions. 7861func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall { 7862 c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7863 c.appsId = appsId 7864 c.servicesId = servicesId 7865 return c 7866} 7867 7868// Fields allows partial responses to be retrieved. See 7869// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7870// for more information. 7871func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall { 7872 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7873 return c 7874} 7875 7876// Context sets the context to be used in this call's Do method. Any 7877// pending HTTP request will be aborted if the provided context is 7878// canceled. 7879func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall { 7880 c.ctx_ = ctx 7881 return c 7882} 7883 7884// Header returns an http.Header that can be modified by the caller to 7885// add HTTP headers to the request. 7886func (c *AppsServicesDeleteCall) Header() http.Header { 7887 if c.header_ == nil { 7888 c.header_ = make(http.Header) 7889 } 7890 return c.header_ 7891} 7892 7893func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { 7894 reqHeaders := make(http.Header) 7895 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7896 for k, v := range c.header_ { 7897 reqHeaders[k] = v 7898 } 7899 reqHeaders.Set("User-Agent", c.s.userAgent()) 7900 var body io.Reader = nil 7901 c.urlParams_.Set("alt", alt) 7902 c.urlParams_.Set("prettyPrint", "false") 7903 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}") 7904 urls += "?" + c.urlParams_.Encode() 7905 req, err := http.NewRequest("DELETE", urls, body) 7906 if err != nil { 7907 return nil, err 7908 } 7909 req.Header = reqHeaders 7910 googleapi.Expand(req.URL, map[string]string{ 7911 "appsId": c.appsId, 7912 "servicesId": c.servicesId, 7913 }) 7914 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7915} 7916 7917// Do executes the "appengine.apps.services.delete" call. 7918// Exactly one of *Operation or error will be non-nil. Any non-2xx 7919// status code is an error. Response headers are in either 7920// *Operation.ServerResponse.Header or (if a response was returned at 7921// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7922// to check whether the returned error was because 7923// http.StatusNotModified was returned. 7924func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7925 gensupport.SetOptions(c.urlParams_, opts...) 7926 res, err := c.doRequest("json") 7927 if res != nil && res.StatusCode == http.StatusNotModified { 7928 if res.Body != nil { 7929 res.Body.Close() 7930 } 7931 return nil, &googleapi.Error{ 7932 Code: res.StatusCode, 7933 Header: res.Header, 7934 } 7935 } 7936 if err != nil { 7937 return nil, err 7938 } 7939 defer googleapi.CloseBody(res) 7940 if err := googleapi.CheckResponse(res); err != nil { 7941 return nil, err 7942 } 7943 ret := &Operation{ 7944 ServerResponse: googleapi.ServerResponse{ 7945 Header: res.Header, 7946 HTTPStatusCode: res.StatusCode, 7947 }, 7948 } 7949 target := &ret 7950 if err := gensupport.DecodeResponse(target, res); err != nil { 7951 return nil, err 7952 } 7953 return ret, nil 7954 // { 7955 // "description": "Deletes the specified service and all enclosed versions.", 7956 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", 7957 // "httpMethod": "DELETE", 7958 // "id": "appengine.apps.services.delete", 7959 // "parameterOrder": [ 7960 // "appsId", 7961 // "servicesId" 7962 // ], 7963 // "parameters": { 7964 // "appsId": { 7965 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", 7966 // "location": "path", 7967 // "required": true, 7968 // "type": "string" 7969 // }, 7970 // "servicesId": { 7971 // "description": "Part of `name`. See documentation of `appsId`.", 7972 // "location": "path", 7973 // "required": true, 7974 // "type": "string" 7975 // } 7976 // }, 7977 // "path": "v1beta/apps/{appsId}/services/{servicesId}", 7978 // "response": { 7979 // "$ref": "Operation" 7980 // }, 7981 // "scopes": [ 7982 // "https://www.googleapis.com/auth/cloud-platform" 7983 // ] 7984 // } 7985 7986} 7987 7988// method id "appengine.apps.services.get": 7989 7990type AppsServicesGetCall struct { 7991 s *APIService 7992 appsId string 7993 servicesId string 7994 urlParams_ gensupport.URLParams 7995 ifNoneMatch_ string 7996 ctx_ context.Context 7997 header_ http.Header 7998} 7999 8000// Get: Gets the current configuration of the specified service. 8001func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall { 8002 c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8003 c.appsId = appsId 8004 c.servicesId = servicesId 8005 return c 8006} 8007 8008// Fields allows partial responses to be retrieved. See 8009// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8010// for more information. 8011func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall { 8012 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8013 return c 8014} 8015 8016// IfNoneMatch sets the optional parameter which makes the operation 8017// fail if the object's ETag matches the given value. This is useful for 8018// getting updates only after the object has changed since the last 8019// request. Use googleapi.IsNotModified to check whether the response 8020// error from Do is the result of In-None-Match. 8021func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall { 8022 c.ifNoneMatch_ = entityTag 8023 return c 8024} 8025 8026// Context sets the context to be used in this call's Do method. Any 8027// pending HTTP request will be aborted if the provided context is 8028// canceled. 8029func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall { 8030 c.ctx_ = ctx 8031 return c 8032} 8033 8034// Header returns an http.Header that can be modified by the caller to 8035// add HTTP headers to the request. 8036func (c *AppsServicesGetCall) Header() http.Header { 8037 if c.header_ == nil { 8038 c.header_ = make(http.Header) 8039 } 8040 return c.header_ 8041} 8042 8043func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) { 8044 reqHeaders := make(http.Header) 8045 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8046 for k, v := range c.header_ { 8047 reqHeaders[k] = v 8048 } 8049 reqHeaders.Set("User-Agent", c.s.userAgent()) 8050 if c.ifNoneMatch_ != "" { 8051 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8052 } 8053 var body io.Reader = nil 8054 c.urlParams_.Set("alt", alt) 8055 c.urlParams_.Set("prettyPrint", "false") 8056 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}") 8057 urls += "?" + c.urlParams_.Encode() 8058 req, err := http.NewRequest("GET", urls, body) 8059 if err != nil { 8060 return nil, err 8061 } 8062 req.Header = reqHeaders 8063 googleapi.Expand(req.URL, map[string]string{ 8064 "appsId": c.appsId, 8065 "servicesId": c.servicesId, 8066 }) 8067 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8068} 8069 8070// Do executes the "appengine.apps.services.get" call. 8071// Exactly one of *Service or error will be non-nil. Any non-2xx status 8072// code is an error. Response headers are in either 8073// *Service.ServerResponse.Header or (if a response was returned at all) 8074// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8075// check whether the returned error was because http.StatusNotModified 8076// was returned. 8077func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) { 8078 gensupport.SetOptions(c.urlParams_, opts...) 8079 res, err := c.doRequest("json") 8080 if res != nil && res.StatusCode == http.StatusNotModified { 8081 if res.Body != nil { 8082 res.Body.Close() 8083 } 8084 return nil, &googleapi.Error{ 8085 Code: res.StatusCode, 8086 Header: res.Header, 8087 } 8088 } 8089 if err != nil { 8090 return nil, err 8091 } 8092 defer googleapi.CloseBody(res) 8093 if err := googleapi.CheckResponse(res); err != nil { 8094 return nil, err 8095 } 8096 ret := &Service{ 8097 ServerResponse: googleapi.ServerResponse{ 8098 Header: res.Header, 8099 HTTPStatusCode: res.StatusCode, 8100 }, 8101 } 8102 target := &ret 8103 if err := gensupport.DecodeResponse(target, res); err != nil { 8104 return nil, err 8105 } 8106 return ret, nil 8107 // { 8108 // "description": "Gets the current configuration of the specified service.", 8109 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", 8110 // "httpMethod": "GET", 8111 // "id": "appengine.apps.services.get", 8112 // "parameterOrder": [ 8113 // "appsId", 8114 // "servicesId" 8115 // ], 8116 // "parameters": { 8117 // "appsId": { 8118 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", 8119 // "location": "path", 8120 // "required": true, 8121 // "type": "string" 8122 // }, 8123 // "servicesId": { 8124 // "description": "Part of `name`. See documentation of `appsId`.", 8125 // "location": "path", 8126 // "required": true, 8127 // "type": "string" 8128 // } 8129 // }, 8130 // "path": "v1beta/apps/{appsId}/services/{servicesId}", 8131 // "response": { 8132 // "$ref": "Service" 8133 // }, 8134 // "scopes": [ 8135 // "https://www.googleapis.com/auth/appengine.admin", 8136 // "https://www.googleapis.com/auth/cloud-platform", 8137 // "https://www.googleapis.com/auth/cloud-platform.read-only" 8138 // ] 8139 // } 8140 8141} 8142 8143// method id "appengine.apps.services.list": 8144 8145type AppsServicesListCall struct { 8146 s *APIService 8147 appsId string 8148 urlParams_ gensupport.URLParams 8149 ifNoneMatch_ string 8150 ctx_ context.Context 8151 header_ http.Header 8152} 8153 8154// List: Lists all the services in the application. 8155func (r *AppsServicesService) List(appsId string) *AppsServicesListCall { 8156 c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8157 c.appsId = appsId 8158 return c 8159} 8160 8161// PageSize sets the optional parameter "pageSize": Maximum results to 8162// return per page. 8163func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall { 8164 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8165 return c 8166} 8167 8168// PageToken sets the optional parameter "pageToken": Continuation token 8169// for fetching the next page of results. 8170func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall { 8171 c.urlParams_.Set("pageToken", pageToken) 8172 return c 8173} 8174 8175// Fields allows partial responses to be retrieved. See 8176// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8177// for more information. 8178func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall { 8179 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8180 return c 8181} 8182 8183// IfNoneMatch sets the optional parameter which makes the operation 8184// fail if the object's ETag matches the given value. This is useful for 8185// getting updates only after the object has changed since the last 8186// request. Use googleapi.IsNotModified to check whether the response 8187// error from Do is the result of In-None-Match. 8188func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall { 8189 c.ifNoneMatch_ = entityTag 8190 return c 8191} 8192 8193// Context sets the context to be used in this call's Do method. Any 8194// pending HTTP request will be aborted if the provided context is 8195// canceled. 8196func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall { 8197 c.ctx_ = ctx 8198 return c 8199} 8200 8201// Header returns an http.Header that can be modified by the caller to 8202// add HTTP headers to the request. 8203func (c *AppsServicesListCall) Header() http.Header { 8204 if c.header_ == nil { 8205 c.header_ = make(http.Header) 8206 } 8207 return c.header_ 8208} 8209 8210func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) { 8211 reqHeaders := make(http.Header) 8212 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8213 for k, v := range c.header_ { 8214 reqHeaders[k] = v 8215 } 8216 reqHeaders.Set("User-Agent", c.s.userAgent()) 8217 if c.ifNoneMatch_ != "" { 8218 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8219 } 8220 var body io.Reader = nil 8221 c.urlParams_.Set("alt", alt) 8222 c.urlParams_.Set("prettyPrint", "false") 8223 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services") 8224 urls += "?" + c.urlParams_.Encode() 8225 req, err := http.NewRequest("GET", urls, body) 8226 if err != nil { 8227 return nil, err 8228 } 8229 req.Header = reqHeaders 8230 googleapi.Expand(req.URL, map[string]string{ 8231 "appsId": c.appsId, 8232 }) 8233 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8234} 8235 8236// Do executes the "appengine.apps.services.list" call. 8237// Exactly one of *ListServicesResponse or error will be non-nil. Any 8238// non-2xx status code is an error. Response headers are in either 8239// *ListServicesResponse.ServerResponse.Header or (if a response was 8240// returned at all) in error.(*googleapi.Error).Header. Use 8241// googleapi.IsNotModified to check whether the returned error was 8242// because http.StatusNotModified was returned. 8243func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) { 8244 gensupport.SetOptions(c.urlParams_, opts...) 8245 res, err := c.doRequest("json") 8246 if res != nil && res.StatusCode == http.StatusNotModified { 8247 if res.Body != nil { 8248 res.Body.Close() 8249 } 8250 return nil, &googleapi.Error{ 8251 Code: res.StatusCode, 8252 Header: res.Header, 8253 } 8254 } 8255 if err != nil { 8256 return nil, err 8257 } 8258 defer googleapi.CloseBody(res) 8259 if err := googleapi.CheckResponse(res); err != nil { 8260 return nil, err 8261 } 8262 ret := &ListServicesResponse{ 8263 ServerResponse: googleapi.ServerResponse{ 8264 Header: res.Header, 8265 HTTPStatusCode: res.StatusCode, 8266 }, 8267 } 8268 target := &ret 8269 if err := gensupport.DecodeResponse(target, res); err != nil { 8270 return nil, err 8271 } 8272 return ret, nil 8273 // { 8274 // "description": "Lists all the services in the application.", 8275 // "flatPath": "v1beta/apps/{appsId}/services", 8276 // "httpMethod": "GET", 8277 // "id": "appengine.apps.services.list", 8278 // "parameterOrder": [ 8279 // "appsId" 8280 // ], 8281 // "parameters": { 8282 // "appsId": { 8283 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 8284 // "location": "path", 8285 // "required": true, 8286 // "type": "string" 8287 // }, 8288 // "pageSize": { 8289 // "description": "Maximum results to return per page.", 8290 // "format": "int32", 8291 // "location": "query", 8292 // "type": "integer" 8293 // }, 8294 // "pageToken": { 8295 // "description": "Continuation token for fetching the next page of results.", 8296 // "location": "query", 8297 // "type": "string" 8298 // } 8299 // }, 8300 // "path": "v1beta/apps/{appsId}/services", 8301 // "response": { 8302 // "$ref": "ListServicesResponse" 8303 // }, 8304 // "scopes": [ 8305 // "https://www.googleapis.com/auth/appengine.admin", 8306 // "https://www.googleapis.com/auth/cloud-platform", 8307 // "https://www.googleapis.com/auth/cloud-platform.read-only" 8308 // ] 8309 // } 8310 8311} 8312 8313// Pages invokes f for each page of results. 8314// A non-nil error returned from f will halt the iteration. 8315// The provided context supersedes any context provided to the Context method. 8316func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error { 8317 c.ctx_ = ctx 8318 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8319 for { 8320 x, err := c.Do() 8321 if err != nil { 8322 return err 8323 } 8324 if err := f(x); err != nil { 8325 return err 8326 } 8327 if x.NextPageToken == "" { 8328 return nil 8329 } 8330 c.PageToken(x.NextPageToken) 8331 } 8332} 8333 8334// method id "appengine.apps.services.patch": 8335 8336type AppsServicesPatchCall struct { 8337 s *APIService 8338 appsId string 8339 servicesId string 8340 service *Service 8341 urlParams_ gensupport.URLParams 8342 ctx_ context.Context 8343 header_ http.Header 8344} 8345 8346// Patch: Updates the configuration of the specified service. 8347func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall { 8348 c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8349 c.appsId = appsId 8350 c.servicesId = servicesId 8351 c.service = service 8352 return c 8353} 8354 8355// MigrateTraffic sets the optional parameter "migrateTraffic": Set to 8356// true to gradually shift traffic to one or more versions that you 8357// specify. By default, traffic is shifted immediately. For gradual 8358// traffic migration, the target versions must be located within 8359// instances that are configured for both warmup requests 8360// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 8361// ta/apps.services.versions#InboundServiceType) and automatic scaling 8362// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 8363// ta/apps.services.versions#AutomaticScaling). You must specify the 8364// shardBy 8365// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 8366// ta/apps.services#ShardBy) field in the Service resource. Gradual 8367// traffic migration is not supported in the App Engine flexible 8368// environment. For examples, see Migrating and Splitting Traffic 8369// (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting 8370// -traffic). 8371func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall { 8372 c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic)) 8373 return c 8374} 8375 8376// UpdateMask sets the optional parameter "updateMask": Standard field 8377// mask for the set of fields to be updated. 8378func (c *AppsServicesPatchCall) UpdateMask(updateMask string) *AppsServicesPatchCall { 8379 c.urlParams_.Set("updateMask", updateMask) 8380 return c 8381} 8382 8383// Fields allows partial responses to be retrieved. See 8384// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8385// for more information. 8386func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall { 8387 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8388 return c 8389} 8390 8391// Context sets the context to be used in this call's Do method. Any 8392// pending HTTP request will be aborted if the provided context is 8393// canceled. 8394func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall { 8395 c.ctx_ = ctx 8396 return c 8397} 8398 8399// Header returns an http.Header that can be modified by the caller to 8400// add HTTP headers to the request. 8401func (c *AppsServicesPatchCall) Header() http.Header { 8402 if c.header_ == nil { 8403 c.header_ = make(http.Header) 8404 } 8405 return c.header_ 8406} 8407 8408func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) { 8409 reqHeaders := make(http.Header) 8410 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8411 for k, v := range c.header_ { 8412 reqHeaders[k] = v 8413 } 8414 reqHeaders.Set("User-Agent", c.s.userAgent()) 8415 var body io.Reader = nil 8416 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) 8417 if err != nil { 8418 return nil, err 8419 } 8420 reqHeaders.Set("Content-Type", "application/json") 8421 c.urlParams_.Set("alt", alt) 8422 c.urlParams_.Set("prettyPrint", "false") 8423 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}") 8424 urls += "?" + c.urlParams_.Encode() 8425 req, err := http.NewRequest("PATCH", urls, body) 8426 if err != nil { 8427 return nil, err 8428 } 8429 req.Header = reqHeaders 8430 googleapi.Expand(req.URL, map[string]string{ 8431 "appsId": c.appsId, 8432 "servicesId": c.servicesId, 8433 }) 8434 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8435} 8436 8437// Do executes the "appengine.apps.services.patch" call. 8438// Exactly one of *Operation or error will be non-nil. Any non-2xx 8439// status code is an error. Response headers are in either 8440// *Operation.ServerResponse.Header or (if a response was returned at 8441// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8442// to check whether the returned error was because 8443// http.StatusNotModified was returned. 8444func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8445 gensupport.SetOptions(c.urlParams_, opts...) 8446 res, err := c.doRequest("json") 8447 if res != nil && res.StatusCode == http.StatusNotModified { 8448 if res.Body != nil { 8449 res.Body.Close() 8450 } 8451 return nil, &googleapi.Error{ 8452 Code: res.StatusCode, 8453 Header: res.Header, 8454 } 8455 } 8456 if err != nil { 8457 return nil, err 8458 } 8459 defer googleapi.CloseBody(res) 8460 if err := googleapi.CheckResponse(res); err != nil { 8461 return nil, err 8462 } 8463 ret := &Operation{ 8464 ServerResponse: googleapi.ServerResponse{ 8465 Header: res.Header, 8466 HTTPStatusCode: res.StatusCode, 8467 }, 8468 } 8469 target := &ret 8470 if err := gensupport.DecodeResponse(target, res); err != nil { 8471 return nil, err 8472 } 8473 return ret, nil 8474 // { 8475 // "description": "Updates the configuration of the specified service.", 8476 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", 8477 // "httpMethod": "PATCH", 8478 // "id": "appengine.apps.services.patch", 8479 // "parameterOrder": [ 8480 // "appsId", 8481 // "servicesId" 8482 // ], 8483 // "parameters": { 8484 // "appsId": { 8485 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", 8486 // "location": "path", 8487 // "required": true, 8488 // "type": "string" 8489 // }, 8490 // "migrateTraffic": { 8491 // "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).", 8492 // "location": "query", 8493 // "type": "boolean" 8494 // }, 8495 // "servicesId": { 8496 // "description": "Part of `name`. See documentation of `appsId`.", 8497 // "location": "path", 8498 // "required": true, 8499 // "type": "string" 8500 // }, 8501 // "updateMask": { 8502 // "description": "Standard field mask for the set of fields to be updated.", 8503 // "format": "google-fieldmask", 8504 // "location": "query", 8505 // "type": "string" 8506 // } 8507 // }, 8508 // "path": "v1beta/apps/{appsId}/services/{servicesId}", 8509 // "request": { 8510 // "$ref": "Service" 8511 // }, 8512 // "response": { 8513 // "$ref": "Operation" 8514 // }, 8515 // "scopes": [ 8516 // "https://www.googleapis.com/auth/cloud-platform" 8517 // ] 8518 // } 8519 8520} 8521 8522// method id "appengine.apps.services.versions.create": 8523 8524type AppsServicesVersionsCreateCall struct { 8525 s *APIService 8526 appsId string 8527 servicesId string 8528 version *Version 8529 urlParams_ gensupport.URLParams 8530 ctx_ context.Context 8531 header_ http.Header 8532} 8533 8534// Create: Deploys code and resource files to a new version. 8535func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall { 8536 c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8537 c.appsId = appsId 8538 c.servicesId = servicesId 8539 c.version = version 8540 return c 8541} 8542 8543// Fields allows partial responses to be retrieved. See 8544// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8545// for more information. 8546func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall { 8547 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8548 return c 8549} 8550 8551// Context sets the context to be used in this call's Do method. Any 8552// pending HTTP request will be aborted if the provided context is 8553// canceled. 8554func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall { 8555 c.ctx_ = ctx 8556 return c 8557} 8558 8559// Header returns an http.Header that can be modified by the caller to 8560// add HTTP headers to the request. 8561func (c *AppsServicesVersionsCreateCall) Header() http.Header { 8562 if c.header_ == nil { 8563 c.header_ = make(http.Header) 8564 } 8565 return c.header_ 8566} 8567 8568func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) { 8569 reqHeaders := make(http.Header) 8570 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8571 for k, v := range c.header_ { 8572 reqHeaders[k] = v 8573 } 8574 reqHeaders.Set("User-Agent", c.s.userAgent()) 8575 var body io.Reader = nil 8576 body, err := googleapi.WithoutDataWrapper.JSONReader(c.version) 8577 if err != nil { 8578 return nil, err 8579 } 8580 reqHeaders.Set("Content-Type", "application/json") 8581 c.urlParams_.Set("alt", alt) 8582 c.urlParams_.Set("prettyPrint", "false") 8583 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions") 8584 urls += "?" + c.urlParams_.Encode() 8585 req, err := http.NewRequest("POST", urls, body) 8586 if err != nil { 8587 return nil, err 8588 } 8589 req.Header = reqHeaders 8590 googleapi.Expand(req.URL, map[string]string{ 8591 "appsId": c.appsId, 8592 "servicesId": c.servicesId, 8593 }) 8594 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8595} 8596 8597// Do executes the "appengine.apps.services.versions.create" call. 8598// Exactly one of *Operation or error will be non-nil. Any non-2xx 8599// status code is an error. Response headers are in either 8600// *Operation.ServerResponse.Header or (if a response was returned at 8601// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8602// to check whether the returned error was because 8603// http.StatusNotModified was returned. 8604func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8605 gensupport.SetOptions(c.urlParams_, opts...) 8606 res, err := c.doRequest("json") 8607 if res != nil && res.StatusCode == http.StatusNotModified { 8608 if res.Body != nil { 8609 res.Body.Close() 8610 } 8611 return nil, &googleapi.Error{ 8612 Code: res.StatusCode, 8613 Header: res.Header, 8614 } 8615 } 8616 if err != nil { 8617 return nil, err 8618 } 8619 defer googleapi.CloseBody(res) 8620 if err := googleapi.CheckResponse(res); err != nil { 8621 return nil, err 8622 } 8623 ret := &Operation{ 8624 ServerResponse: googleapi.ServerResponse{ 8625 Header: res.Header, 8626 HTTPStatusCode: res.StatusCode, 8627 }, 8628 } 8629 target := &ret 8630 if err := gensupport.DecodeResponse(target, res); err != nil { 8631 return nil, err 8632 } 8633 return ret, nil 8634 // { 8635 // "description": "Deploys code and resource files to a new version.", 8636 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", 8637 // "httpMethod": "POST", 8638 // "id": "appengine.apps.services.versions.create", 8639 // "parameterOrder": [ 8640 // "appsId", 8641 // "servicesId" 8642 // ], 8643 // "parameters": { 8644 // "appsId": { 8645 // "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", 8646 // "location": "path", 8647 // "required": true, 8648 // "type": "string" 8649 // }, 8650 // "servicesId": { 8651 // "description": "Part of `parent`. See documentation of `appsId`.", 8652 // "location": "path", 8653 // "required": true, 8654 // "type": "string" 8655 // } 8656 // }, 8657 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions", 8658 // "request": { 8659 // "$ref": "Version" 8660 // }, 8661 // "response": { 8662 // "$ref": "Operation" 8663 // }, 8664 // "scopes": [ 8665 // "https://www.googleapis.com/auth/cloud-platform" 8666 // ] 8667 // } 8668 8669} 8670 8671// method id "appengine.apps.services.versions.delete": 8672 8673type AppsServicesVersionsDeleteCall struct { 8674 s *APIService 8675 appsId string 8676 servicesId string 8677 versionsId string 8678 urlParams_ gensupport.URLParams 8679 ctx_ context.Context 8680 header_ http.Header 8681} 8682 8683// Delete: Deletes an existing Version resource. 8684func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall { 8685 c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8686 c.appsId = appsId 8687 c.servicesId = servicesId 8688 c.versionsId = versionsId 8689 return c 8690} 8691 8692// Fields allows partial responses to be retrieved. See 8693// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8694// for more information. 8695func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall { 8696 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8697 return c 8698} 8699 8700// Context sets the context to be used in this call's Do method. Any 8701// pending HTTP request will be aborted if the provided context is 8702// canceled. 8703func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall { 8704 c.ctx_ = ctx 8705 return c 8706} 8707 8708// Header returns an http.Header that can be modified by the caller to 8709// add HTTP headers to the request. 8710func (c *AppsServicesVersionsDeleteCall) Header() http.Header { 8711 if c.header_ == nil { 8712 c.header_ = make(http.Header) 8713 } 8714 return c.header_ 8715} 8716 8717func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { 8718 reqHeaders := make(http.Header) 8719 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8720 for k, v := range c.header_ { 8721 reqHeaders[k] = v 8722 } 8723 reqHeaders.Set("User-Agent", c.s.userAgent()) 8724 var body io.Reader = nil 8725 c.urlParams_.Set("alt", alt) 8726 c.urlParams_.Set("prettyPrint", "false") 8727 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 8728 urls += "?" + c.urlParams_.Encode() 8729 req, err := http.NewRequest("DELETE", urls, body) 8730 if err != nil { 8731 return nil, err 8732 } 8733 req.Header = reqHeaders 8734 googleapi.Expand(req.URL, map[string]string{ 8735 "appsId": c.appsId, 8736 "servicesId": c.servicesId, 8737 "versionsId": c.versionsId, 8738 }) 8739 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8740} 8741 8742// Do executes the "appengine.apps.services.versions.delete" call. 8743// Exactly one of *Operation or error will be non-nil. Any non-2xx 8744// status code is an error. Response headers are in either 8745// *Operation.ServerResponse.Header or (if a response was returned at 8746// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8747// to check whether the returned error was because 8748// http.StatusNotModified was returned. 8749func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8750 gensupport.SetOptions(c.urlParams_, opts...) 8751 res, err := c.doRequest("json") 8752 if res != nil && res.StatusCode == http.StatusNotModified { 8753 if res.Body != nil { 8754 res.Body.Close() 8755 } 8756 return nil, &googleapi.Error{ 8757 Code: res.StatusCode, 8758 Header: res.Header, 8759 } 8760 } 8761 if err != nil { 8762 return nil, err 8763 } 8764 defer googleapi.CloseBody(res) 8765 if err := googleapi.CheckResponse(res); err != nil { 8766 return nil, err 8767 } 8768 ret := &Operation{ 8769 ServerResponse: googleapi.ServerResponse{ 8770 Header: res.Header, 8771 HTTPStatusCode: res.StatusCode, 8772 }, 8773 } 8774 target := &ret 8775 if err := gensupport.DecodeResponse(target, res); err != nil { 8776 return nil, err 8777 } 8778 return ret, nil 8779 // { 8780 // "description": "Deletes an existing Version resource.", 8781 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 8782 // "httpMethod": "DELETE", 8783 // "id": "appengine.apps.services.versions.delete", 8784 // "parameterOrder": [ 8785 // "appsId", 8786 // "servicesId", 8787 // "versionsId" 8788 // ], 8789 // "parameters": { 8790 // "appsId": { 8791 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", 8792 // "location": "path", 8793 // "required": true, 8794 // "type": "string" 8795 // }, 8796 // "servicesId": { 8797 // "description": "Part of `name`. See documentation of `appsId`.", 8798 // "location": "path", 8799 // "required": true, 8800 // "type": "string" 8801 // }, 8802 // "versionsId": { 8803 // "description": "Part of `name`. See documentation of `appsId`.", 8804 // "location": "path", 8805 // "required": true, 8806 // "type": "string" 8807 // } 8808 // }, 8809 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 8810 // "response": { 8811 // "$ref": "Operation" 8812 // }, 8813 // "scopes": [ 8814 // "https://www.googleapis.com/auth/cloud-platform" 8815 // ] 8816 // } 8817 8818} 8819 8820// method id "appengine.apps.services.versions.get": 8821 8822type AppsServicesVersionsGetCall struct { 8823 s *APIService 8824 appsId string 8825 servicesId string 8826 versionsId string 8827 urlParams_ gensupport.URLParams 8828 ifNoneMatch_ string 8829 ctx_ context.Context 8830 header_ http.Header 8831} 8832 8833// Get: Gets the specified Version resource. By default, only a 8834// BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get 8835// the full resource. 8836func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall { 8837 c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8838 c.appsId = appsId 8839 c.servicesId = servicesId 8840 c.versionsId = versionsId 8841 return c 8842} 8843 8844// View sets the optional parameter "view": Controls the set of fields 8845// returned in the Get response. 8846// 8847// Possible values: 8848// "BASIC" 8849// "FULL" 8850func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall { 8851 c.urlParams_.Set("view", view) 8852 return c 8853} 8854 8855// Fields allows partial responses to be retrieved. See 8856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8857// for more information. 8858func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall { 8859 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8860 return c 8861} 8862 8863// IfNoneMatch sets the optional parameter which makes the operation 8864// fail if the object's ETag matches the given value. This is useful for 8865// getting updates only after the object has changed since the last 8866// request. Use googleapi.IsNotModified to check whether the response 8867// error from Do is the result of In-None-Match. 8868func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall { 8869 c.ifNoneMatch_ = entityTag 8870 return c 8871} 8872 8873// Context sets the context to be used in this call's Do method. Any 8874// pending HTTP request will be aborted if the provided context is 8875// canceled. 8876func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall { 8877 c.ctx_ = ctx 8878 return c 8879} 8880 8881// Header returns an http.Header that can be modified by the caller to 8882// add HTTP headers to the request. 8883func (c *AppsServicesVersionsGetCall) Header() http.Header { 8884 if c.header_ == nil { 8885 c.header_ = make(http.Header) 8886 } 8887 return c.header_ 8888} 8889 8890func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) { 8891 reqHeaders := make(http.Header) 8892 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8893 for k, v := range c.header_ { 8894 reqHeaders[k] = v 8895 } 8896 reqHeaders.Set("User-Agent", c.s.userAgent()) 8897 if c.ifNoneMatch_ != "" { 8898 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8899 } 8900 var body io.Reader = nil 8901 c.urlParams_.Set("alt", alt) 8902 c.urlParams_.Set("prettyPrint", "false") 8903 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 8904 urls += "?" + c.urlParams_.Encode() 8905 req, err := http.NewRequest("GET", urls, body) 8906 if err != nil { 8907 return nil, err 8908 } 8909 req.Header = reqHeaders 8910 googleapi.Expand(req.URL, map[string]string{ 8911 "appsId": c.appsId, 8912 "servicesId": c.servicesId, 8913 "versionsId": c.versionsId, 8914 }) 8915 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8916} 8917 8918// Do executes the "appengine.apps.services.versions.get" call. 8919// Exactly one of *Version or error will be non-nil. Any non-2xx status 8920// code is an error. Response headers are in either 8921// *Version.ServerResponse.Header or (if a response was returned at all) 8922// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8923// check whether the returned error was because http.StatusNotModified 8924// was returned. 8925func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) { 8926 gensupport.SetOptions(c.urlParams_, opts...) 8927 res, err := c.doRequest("json") 8928 if res != nil && res.StatusCode == http.StatusNotModified { 8929 if res.Body != nil { 8930 res.Body.Close() 8931 } 8932 return nil, &googleapi.Error{ 8933 Code: res.StatusCode, 8934 Header: res.Header, 8935 } 8936 } 8937 if err != nil { 8938 return nil, err 8939 } 8940 defer googleapi.CloseBody(res) 8941 if err := googleapi.CheckResponse(res); err != nil { 8942 return nil, err 8943 } 8944 ret := &Version{ 8945 ServerResponse: googleapi.ServerResponse{ 8946 Header: res.Header, 8947 HTTPStatusCode: res.StatusCode, 8948 }, 8949 } 8950 target := &ret 8951 if err := gensupport.DecodeResponse(target, res); err != nil { 8952 return nil, err 8953 } 8954 return ret, nil 8955 // { 8956 // "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.", 8957 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 8958 // "httpMethod": "GET", 8959 // "id": "appengine.apps.services.versions.get", 8960 // "parameterOrder": [ 8961 // "appsId", 8962 // "servicesId", 8963 // "versionsId" 8964 // ], 8965 // "parameters": { 8966 // "appsId": { 8967 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", 8968 // "location": "path", 8969 // "required": true, 8970 // "type": "string" 8971 // }, 8972 // "servicesId": { 8973 // "description": "Part of `name`. See documentation of `appsId`.", 8974 // "location": "path", 8975 // "required": true, 8976 // "type": "string" 8977 // }, 8978 // "versionsId": { 8979 // "description": "Part of `name`. See documentation of `appsId`.", 8980 // "location": "path", 8981 // "required": true, 8982 // "type": "string" 8983 // }, 8984 // "view": { 8985 // "description": "Controls the set of fields returned in the Get response.", 8986 // "enum": [ 8987 // "BASIC", 8988 // "FULL" 8989 // ], 8990 // "location": "query", 8991 // "type": "string" 8992 // } 8993 // }, 8994 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 8995 // "response": { 8996 // "$ref": "Version" 8997 // }, 8998 // "scopes": [ 8999 // "https://www.googleapis.com/auth/appengine.admin", 9000 // "https://www.googleapis.com/auth/cloud-platform", 9001 // "https://www.googleapis.com/auth/cloud-platform.read-only" 9002 // ] 9003 // } 9004 9005} 9006 9007// method id "appengine.apps.services.versions.list": 9008 9009type AppsServicesVersionsListCall struct { 9010 s *APIService 9011 appsId string 9012 servicesId string 9013 urlParams_ gensupport.URLParams 9014 ifNoneMatch_ string 9015 ctx_ context.Context 9016 header_ http.Header 9017} 9018 9019// List: Lists the versions of a service. 9020func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall { 9021 c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9022 c.appsId = appsId 9023 c.servicesId = servicesId 9024 return c 9025} 9026 9027// PageSize sets the optional parameter "pageSize": Maximum results to 9028// return per page. 9029func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall { 9030 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9031 return c 9032} 9033 9034// PageToken sets the optional parameter "pageToken": Continuation token 9035// for fetching the next page of results. 9036func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall { 9037 c.urlParams_.Set("pageToken", pageToken) 9038 return c 9039} 9040 9041// View sets the optional parameter "view": Controls the set of fields 9042// returned in the List response. 9043// 9044// Possible values: 9045// "BASIC" 9046// "FULL" 9047func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall { 9048 c.urlParams_.Set("view", view) 9049 return c 9050} 9051 9052// Fields allows partial responses to be retrieved. See 9053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9054// for more information. 9055func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall { 9056 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9057 return c 9058} 9059 9060// IfNoneMatch sets the optional parameter which makes the operation 9061// fail if the object's ETag matches the given value. This is useful for 9062// getting updates only after the object has changed since the last 9063// request. Use googleapi.IsNotModified to check whether the response 9064// error from Do is the result of In-None-Match. 9065func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall { 9066 c.ifNoneMatch_ = entityTag 9067 return c 9068} 9069 9070// Context sets the context to be used in this call's Do method. Any 9071// pending HTTP request will be aborted if the provided context is 9072// canceled. 9073func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall { 9074 c.ctx_ = ctx 9075 return c 9076} 9077 9078// Header returns an http.Header that can be modified by the caller to 9079// add HTTP headers to the request. 9080func (c *AppsServicesVersionsListCall) Header() http.Header { 9081 if c.header_ == nil { 9082 c.header_ = make(http.Header) 9083 } 9084 return c.header_ 9085} 9086 9087func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) { 9088 reqHeaders := make(http.Header) 9089 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9090 for k, v := range c.header_ { 9091 reqHeaders[k] = v 9092 } 9093 reqHeaders.Set("User-Agent", c.s.userAgent()) 9094 if c.ifNoneMatch_ != "" { 9095 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9096 } 9097 var body io.Reader = nil 9098 c.urlParams_.Set("alt", alt) 9099 c.urlParams_.Set("prettyPrint", "false") 9100 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions") 9101 urls += "?" + c.urlParams_.Encode() 9102 req, err := http.NewRequest("GET", urls, body) 9103 if err != nil { 9104 return nil, err 9105 } 9106 req.Header = reqHeaders 9107 googleapi.Expand(req.URL, map[string]string{ 9108 "appsId": c.appsId, 9109 "servicesId": c.servicesId, 9110 }) 9111 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9112} 9113 9114// Do executes the "appengine.apps.services.versions.list" call. 9115// Exactly one of *ListVersionsResponse or error will be non-nil. Any 9116// non-2xx status code is an error. Response headers are in either 9117// *ListVersionsResponse.ServerResponse.Header or (if a response was 9118// returned at all) in error.(*googleapi.Error).Header. Use 9119// googleapi.IsNotModified to check whether the returned error was 9120// because http.StatusNotModified was returned. 9121func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) { 9122 gensupport.SetOptions(c.urlParams_, opts...) 9123 res, err := c.doRequest("json") 9124 if res != nil && res.StatusCode == http.StatusNotModified { 9125 if res.Body != nil { 9126 res.Body.Close() 9127 } 9128 return nil, &googleapi.Error{ 9129 Code: res.StatusCode, 9130 Header: res.Header, 9131 } 9132 } 9133 if err != nil { 9134 return nil, err 9135 } 9136 defer googleapi.CloseBody(res) 9137 if err := googleapi.CheckResponse(res); err != nil { 9138 return nil, err 9139 } 9140 ret := &ListVersionsResponse{ 9141 ServerResponse: googleapi.ServerResponse{ 9142 Header: res.Header, 9143 HTTPStatusCode: res.StatusCode, 9144 }, 9145 } 9146 target := &ret 9147 if err := gensupport.DecodeResponse(target, res); err != nil { 9148 return nil, err 9149 } 9150 return ret, nil 9151 // { 9152 // "description": "Lists the versions of a service.", 9153 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", 9154 // "httpMethod": "GET", 9155 // "id": "appengine.apps.services.versions.list", 9156 // "parameterOrder": [ 9157 // "appsId", 9158 // "servicesId" 9159 // ], 9160 // "parameters": { 9161 // "appsId": { 9162 // "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", 9163 // "location": "path", 9164 // "required": true, 9165 // "type": "string" 9166 // }, 9167 // "pageSize": { 9168 // "description": "Maximum results to return per page.", 9169 // "format": "int32", 9170 // "location": "query", 9171 // "type": "integer" 9172 // }, 9173 // "pageToken": { 9174 // "description": "Continuation token for fetching the next page of results.", 9175 // "location": "query", 9176 // "type": "string" 9177 // }, 9178 // "servicesId": { 9179 // "description": "Part of `parent`. See documentation of `appsId`.", 9180 // "location": "path", 9181 // "required": true, 9182 // "type": "string" 9183 // }, 9184 // "view": { 9185 // "description": "Controls the set of fields returned in the List response.", 9186 // "enum": [ 9187 // "BASIC", 9188 // "FULL" 9189 // ], 9190 // "location": "query", 9191 // "type": "string" 9192 // } 9193 // }, 9194 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions", 9195 // "response": { 9196 // "$ref": "ListVersionsResponse" 9197 // }, 9198 // "scopes": [ 9199 // "https://www.googleapis.com/auth/appengine.admin", 9200 // "https://www.googleapis.com/auth/cloud-platform", 9201 // "https://www.googleapis.com/auth/cloud-platform.read-only" 9202 // ] 9203 // } 9204 9205} 9206 9207// Pages invokes f for each page of results. 9208// A non-nil error returned from f will halt the iteration. 9209// The provided context supersedes any context provided to the Context method. 9210func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error { 9211 c.ctx_ = ctx 9212 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9213 for { 9214 x, err := c.Do() 9215 if err != nil { 9216 return err 9217 } 9218 if err := f(x); err != nil { 9219 return err 9220 } 9221 if x.NextPageToken == "" { 9222 return nil 9223 } 9224 c.PageToken(x.NextPageToken) 9225 } 9226} 9227 9228// method id "appengine.apps.services.versions.patch": 9229 9230type AppsServicesVersionsPatchCall struct { 9231 s *APIService 9232 appsId string 9233 servicesId string 9234 versionsId string 9235 version *Version 9236 urlParams_ gensupport.URLParams 9237 ctx_ context.Context 9238 header_ http.Header 9239} 9240 9241// Patch: Updates the specified Version resource. You can specify the 9242// following fields depending on the App Engine environment and type of 9243// scaling that the version resource uses:Standard 9244// environment 9245// instance_class 9246// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9247// ta/apps.services.versions#Version.FIELDS.instance_class)automatic 9248// scaling in the standard 9249// environment: 9250// automatic_scaling.min_idle_instances 9251// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9252// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9253// automatic_ 9254// scaling.max_idle_instances 9255// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9256// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9257// automaticS 9258// caling.standard_scheduler_settings.max_instances 9259// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9260// ta/apps.services.versions#StandardSchedulerSettings) 9261// automaticScaling. 9262// standard_scheduler_settings.min_instances 9263// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9264// ta/apps.services.versions#StandardSchedulerSettings) 9265// automaticScaling. 9266// standard_scheduler_settings.target_cpu_utilization 9267// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9268// ta/apps.services.versions#StandardSchedulerSettings) 9269// automaticScaling. 9270// standard_scheduler_settings.target_throughput_utilization 9271// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9272// ta/apps.services.versions#StandardSchedulerSettings)basic scaling or 9273// manual scaling in the standard environment: 9274// serving_status 9275// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9276// ta/apps.services.versions#Version.FIELDS.serving_status)Flexible 9277// environment 9278// serving_status 9279// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9280// ta/apps.services.versions#Version.FIELDS.serving_status)automatic 9281// scaling in the flexible 9282// environment: 9283// automatic_scaling.min_total_instances 9284// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9285// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9286// automatic_ 9287// scaling.max_total_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.cool_down_period_sec 9292// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9293// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9294// automatic_ 9295// scaling.cpu_utilization.target_utilization 9296// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1be 9297// ta/apps.services.versions#Version.FIELDS.automatic_scaling) 9298func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall { 9299 c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9300 c.appsId = appsId 9301 c.servicesId = servicesId 9302 c.versionsId = versionsId 9303 c.version = version 9304 return c 9305} 9306 9307// UpdateMask sets the optional parameter "updateMask": Standard field 9308// mask for the set of fields to be updated. 9309func (c *AppsServicesVersionsPatchCall) UpdateMask(updateMask string) *AppsServicesVersionsPatchCall { 9310 c.urlParams_.Set("updateMask", updateMask) 9311 return c 9312} 9313 9314// Fields allows partial responses to be retrieved. See 9315// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9316// for more information. 9317func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall { 9318 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9319 return c 9320} 9321 9322// Context sets the context to be used in this call's Do method. Any 9323// pending HTTP request will be aborted if the provided context is 9324// canceled. 9325func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall { 9326 c.ctx_ = ctx 9327 return c 9328} 9329 9330// Header returns an http.Header that can be modified by the caller to 9331// add HTTP headers to the request. 9332func (c *AppsServicesVersionsPatchCall) Header() http.Header { 9333 if c.header_ == nil { 9334 c.header_ = make(http.Header) 9335 } 9336 return c.header_ 9337} 9338 9339func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) { 9340 reqHeaders := make(http.Header) 9341 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9342 for k, v := range c.header_ { 9343 reqHeaders[k] = v 9344 } 9345 reqHeaders.Set("User-Agent", c.s.userAgent()) 9346 var body io.Reader = nil 9347 body, err := googleapi.WithoutDataWrapper.JSONReader(c.version) 9348 if err != nil { 9349 return nil, err 9350 } 9351 reqHeaders.Set("Content-Type", "application/json") 9352 c.urlParams_.Set("alt", alt) 9353 c.urlParams_.Set("prettyPrint", "false") 9354 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 9355 urls += "?" + c.urlParams_.Encode() 9356 req, err := http.NewRequest("PATCH", urls, body) 9357 if err != nil { 9358 return nil, err 9359 } 9360 req.Header = reqHeaders 9361 googleapi.Expand(req.URL, map[string]string{ 9362 "appsId": c.appsId, 9363 "servicesId": c.servicesId, 9364 "versionsId": c.versionsId, 9365 }) 9366 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9367} 9368 9369// Do executes the "appengine.apps.services.versions.patch" call. 9370// Exactly one of *Operation or error will be non-nil. Any non-2xx 9371// status code is an error. Response headers are in either 9372// *Operation.ServerResponse.Header or (if a response was returned at 9373// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9374// to check whether the returned error was because 9375// http.StatusNotModified was returned. 9376func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9377 gensupport.SetOptions(c.urlParams_, opts...) 9378 res, err := c.doRequest("json") 9379 if res != nil && res.StatusCode == http.StatusNotModified { 9380 if res.Body != nil { 9381 res.Body.Close() 9382 } 9383 return nil, &googleapi.Error{ 9384 Code: res.StatusCode, 9385 Header: res.Header, 9386 } 9387 } 9388 if err != nil { 9389 return nil, err 9390 } 9391 defer googleapi.CloseBody(res) 9392 if err := googleapi.CheckResponse(res); err != nil { 9393 return nil, err 9394 } 9395 ret := &Operation{ 9396 ServerResponse: googleapi.ServerResponse{ 9397 Header: res.Header, 9398 HTTPStatusCode: res.StatusCode, 9399 }, 9400 } 9401 target := &ret 9402 if err := gensupport.DecodeResponse(target, res); err != nil { 9403 return nil, err 9404 } 9405 return ret, nil 9406 // { 9407 // "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)", 9408 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9409 // "httpMethod": "PATCH", 9410 // "id": "appengine.apps.services.versions.patch", 9411 // "parameterOrder": [ 9412 // "appsId", 9413 // "servicesId", 9414 // "versionsId" 9415 // ], 9416 // "parameters": { 9417 // "appsId": { 9418 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", 9419 // "location": "path", 9420 // "required": true, 9421 // "type": "string" 9422 // }, 9423 // "servicesId": { 9424 // "description": "Part of `name`. See documentation of `appsId`.", 9425 // "location": "path", 9426 // "required": true, 9427 // "type": "string" 9428 // }, 9429 // "updateMask": { 9430 // "description": "Standard field mask for the set of fields to be updated.", 9431 // "format": "google-fieldmask", 9432 // "location": "query", 9433 // "type": "string" 9434 // }, 9435 // "versionsId": { 9436 // "description": "Part of `name`. See documentation of `appsId`.", 9437 // "location": "path", 9438 // "required": true, 9439 // "type": "string" 9440 // } 9441 // }, 9442 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9443 // "request": { 9444 // "$ref": "Version" 9445 // }, 9446 // "response": { 9447 // "$ref": "Operation" 9448 // }, 9449 // "scopes": [ 9450 // "https://www.googleapis.com/auth/cloud-platform" 9451 // ] 9452 // } 9453 9454} 9455 9456// method id "appengine.apps.services.versions.instances.debug": 9457 9458type AppsServicesVersionsInstancesDebugCall struct { 9459 s *APIService 9460 appsId string 9461 servicesId string 9462 versionsId string 9463 instancesId string 9464 debuginstancerequest *DebugInstanceRequest 9465 urlParams_ gensupport.URLParams 9466 ctx_ context.Context 9467 header_ http.Header 9468} 9469 9470// Debug: Enables debugging on a VM instance. This allows you to use the 9471// SSH command to connect to the virtual machine where the instance 9472// lives. While in "debug mode", the instance continues to serve live 9473// traffic. You should delete the instance when you are done debugging 9474// and then allow the system to take over and determine if another 9475// instance should be started.Only applicable for instances in App 9476// Engine flexible environment. 9477func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall { 9478 c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9479 c.appsId = appsId 9480 c.servicesId = servicesId 9481 c.versionsId = versionsId 9482 c.instancesId = instancesId 9483 c.debuginstancerequest = debuginstancerequest 9484 return c 9485} 9486 9487// Fields allows partial responses to be retrieved. See 9488// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9489// for more information. 9490func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall { 9491 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9492 return c 9493} 9494 9495// Context sets the context to be used in this call's Do method. Any 9496// pending HTTP request will be aborted if the provided context is 9497// canceled. 9498func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall { 9499 c.ctx_ = ctx 9500 return c 9501} 9502 9503// Header returns an http.Header that can be modified by the caller to 9504// add HTTP headers to the request. 9505func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header { 9506 if c.header_ == nil { 9507 c.header_ = make(http.Header) 9508 } 9509 return c.header_ 9510} 9511 9512func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) { 9513 reqHeaders := make(http.Header) 9514 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9515 for k, v := range c.header_ { 9516 reqHeaders[k] = v 9517 } 9518 reqHeaders.Set("User-Agent", c.s.userAgent()) 9519 var body io.Reader = nil 9520 body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest) 9521 if err != nil { 9522 return nil, err 9523 } 9524 reqHeaders.Set("Content-Type", "application/json") 9525 c.urlParams_.Set("alt", alt) 9526 c.urlParams_.Set("prettyPrint", "false") 9527 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug") 9528 urls += "?" + c.urlParams_.Encode() 9529 req, err := http.NewRequest("POST", urls, body) 9530 if err != nil { 9531 return nil, err 9532 } 9533 req.Header = reqHeaders 9534 googleapi.Expand(req.URL, map[string]string{ 9535 "appsId": c.appsId, 9536 "servicesId": c.servicesId, 9537 "versionsId": c.versionsId, 9538 "instancesId": c.instancesId, 9539 }) 9540 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9541} 9542 9543// Do executes the "appengine.apps.services.versions.instances.debug" call. 9544// Exactly one of *Operation or error will be non-nil. Any non-2xx 9545// status code is an error. Response headers are in either 9546// *Operation.ServerResponse.Header or (if a response was returned at 9547// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9548// to check whether the returned error was because 9549// http.StatusNotModified was returned. 9550func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9551 gensupport.SetOptions(c.urlParams_, opts...) 9552 res, err := c.doRequest("json") 9553 if res != nil && res.StatusCode == http.StatusNotModified { 9554 if res.Body != nil { 9555 res.Body.Close() 9556 } 9557 return nil, &googleapi.Error{ 9558 Code: res.StatusCode, 9559 Header: res.Header, 9560 } 9561 } 9562 if err != nil { 9563 return nil, err 9564 } 9565 defer googleapi.CloseBody(res) 9566 if err := googleapi.CheckResponse(res); err != nil { 9567 return nil, err 9568 } 9569 ret := &Operation{ 9570 ServerResponse: googleapi.ServerResponse{ 9571 Header: res.Header, 9572 HTTPStatusCode: res.StatusCode, 9573 }, 9574 } 9575 target := &ret 9576 if err := gensupport.DecodeResponse(target, res); err != nil { 9577 return nil, err 9578 } 9579 return ret, nil 9580 // { 9581 // "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.", 9582 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", 9583 // "httpMethod": "POST", 9584 // "id": "appengine.apps.services.versions.instances.debug", 9585 // "parameterOrder": [ 9586 // "appsId", 9587 // "servicesId", 9588 // "versionsId", 9589 // "instancesId" 9590 // ], 9591 // "parameters": { 9592 // "appsId": { 9593 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 9594 // "location": "path", 9595 // "required": true, 9596 // "type": "string" 9597 // }, 9598 // "instancesId": { 9599 // "description": "Part of `name`. See documentation of `appsId`.", 9600 // "location": "path", 9601 // "required": true, 9602 // "type": "string" 9603 // }, 9604 // "servicesId": { 9605 // "description": "Part of `name`. See documentation of `appsId`.", 9606 // "location": "path", 9607 // "required": true, 9608 // "type": "string" 9609 // }, 9610 // "versionsId": { 9611 // "description": "Part of `name`. See documentation of `appsId`.", 9612 // "location": "path", 9613 // "required": true, 9614 // "type": "string" 9615 // } 9616 // }, 9617 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", 9618 // "request": { 9619 // "$ref": "DebugInstanceRequest" 9620 // }, 9621 // "response": { 9622 // "$ref": "Operation" 9623 // }, 9624 // "scopes": [ 9625 // "https://www.googleapis.com/auth/cloud-platform" 9626 // ] 9627 // } 9628 9629} 9630 9631// method id "appengine.apps.services.versions.instances.delete": 9632 9633type AppsServicesVersionsInstancesDeleteCall struct { 9634 s *APIService 9635 appsId string 9636 servicesId string 9637 versionsId string 9638 instancesId string 9639 urlParams_ gensupport.URLParams 9640 ctx_ context.Context 9641 header_ http.Header 9642} 9643 9644// Delete: Stops a running instance.The instance might be automatically 9645// recreated based on the scaling settings of the version. For more 9646// information, see "How Instances are Managed" (standard environment 9647// (https://cloud.google.com/appengine/docs/standard/python/how-instances 9648// -are-managed) | flexible environment 9649// (https://cloud.google.com/appengine/docs/flexible/python/how-instances 9650// -are-managed)).To ensure that instances are not re-created and avoid 9651// getting billed, you can stop all instances within the target version 9652// by changing the serving status of the version to STOPPED with the 9653// apps.services.versions.patch 9654// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/a 9655// pps.services.versions/patch) method. 9656func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall { 9657 c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9658 c.appsId = appsId 9659 c.servicesId = servicesId 9660 c.versionsId = versionsId 9661 c.instancesId = instancesId 9662 return c 9663} 9664 9665// Fields allows partial responses to be retrieved. See 9666// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9667// for more information. 9668func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall { 9669 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9670 return c 9671} 9672 9673// Context sets the context to be used in this call's Do method. Any 9674// pending HTTP request will be aborted if the provided context is 9675// canceled. 9676func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall { 9677 c.ctx_ = ctx 9678 return c 9679} 9680 9681// Header returns an http.Header that can be modified by the caller to 9682// add HTTP headers to the request. 9683func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header { 9684 if c.header_ == nil { 9685 c.header_ = make(http.Header) 9686 } 9687 return c.header_ 9688} 9689 9690func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 9691 reqHeaders := make(http.Header) 9692 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9693 for k, v := range c.header_ { 9694 reqHeaders[k] = v 9695 } 9696 reqHeaders.Set("User-Agent", c.s.userAgent()) 9697 var body io.Reader = nil 9698 c.urlParams_.Set("alt", alt) 9699 c.urlParams_.Set("prettyPrint", "false") 9700 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") 9701 urls += "?" + c.urlParams_.Encode() 9702 req, err := http.NewRequest("DELETE", urls, body) 9703 if err != nil { 9704 return nil, err 9705 } 9706 req.Header = reqHeaders 9707 googleapi.Expand(req.URL, map[string]string{ 9708 "appsId": c.appsId, 9709 "servicesId": c.servicesId, 9710 "versionsId": c.versionsId, 9711 "instancesId": c.instancesId, 9712 }) 9713 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9714} 9715 9716// Do executes the "appengine.apps.services.versions.instances.delete" call. 9717// Exactly one of *Operation or error will be non-nil. Any non-2xx 9718// status code is an error. Response headers are in either 9719// *Operation.ServerResponse.Header or (if a response was returned at 9720// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9721// to check whether the returned error was because 9722// http.StatusNotModified was returned. 9723func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9724 gensupport.SetOptions(c.urlParams_, opts...) 9725 res, err := c.doRequest("json") 9726 if res != nil && res.StatusCode == http.StatusNotModified { 9727 if res.Body != nil { 9728 res.Body.Close() 9729 } 9730 return nil, &googleapi.Error{ 9731 Code: res.StatusCode, 9732 Header: res.Header, 9733 } 9734 } 9735 if err != nil { 9736 return nil, err 9737 } 9738 defer googleapi.CloseBody(res) 9739 if err := googleapi.CheckResponse(res); err != nil { 9740 return nil, err 9741 } 9742 ret := &Operation{ 9743 ServerResponse: googleapi.ServerResponse{ 9744 Header: res.Header, 9745 HTTPStatusCode: res.StatusCode, 9746 }, 9747 } 9748 target := &ret 9749 if err := gensupport.DecodeResponse(target, res); err != nil { 9750 return nil, err 9751 } 9752 return ret, nil 9753 // { 9754 // "description": "Stops a running instance.The instance might be automatically recreated based on the scaling settings of the version. For more information, see \"How Instances are Managed\" (standard environment (https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) | flexible environment (https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).To ensure that instances are not re-created and avoid getting billed, you can stop all instances within the target version by changing the serving status of the version to STOPPED with the apps.services.versions.patch (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) method.", 9755 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9756 // "httpMethod": "DELETE", 9757 // "id": "appengine.apps.services.versions.instances.delete", 9758 // "parameterOrder": [ 9759 // "appsId", 9760 // "servicesId", 9761 // "versionsId", 9762 // "instancesId" 9763 // ], 9764 // "parameters": { 9765 // "appsId": { 9766 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 9767 // "location": "path", 9768 // "required": true, 9769 // "type": "string" 9770 // }, 9771 // "instancesId": { 9772 // "description": "Part of `name`. See documentation of `appsId`.", 9773 // "location": "path", 9774 // "required": true, 9775 // "type": "string" 9776 // }, 9777 // "servicesId": { 9778 // "description": "Part of `name`. See documentation of `appsId`.", 9779 // "location": "path", 9780 // "required": true, 9781 // "type": "string" 9782 // }, 9783 // "versionsId": { 9784 // "description": "Part of `name`. See documentation of `appsId`.", 9785 // "location": "path", 9786 // "required": true, 9787 // "type": "string" 9788 // } 9789 // }, 9790 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9791 // "response": { 9792 // "$ref": "Operation" 9793 // }, 9794 // "scopes": [ 9795 // "https://www.googleapis.com/auth/cloud-platform" 9796 // ] 9797 // } 9798 9799} 9800 9801// method id "appengine.apps.services.versions.instances.get": 9802 9803type AppsServicesVersionsInstancesGetCall struct { 9804 s *APIService 9805 appsId string 9806 servicesId string 9807 versionsId string 9808 instancesId string 9809 urlParams_ gensupport.URLParams 9810 ifNoneMatch_ string 9811 ctx_ context.Context 9812 header_ http.Header 9813} 9814 9815// Get: Gets instance information. 9816func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall { 9817 c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9818 c.appsId = appsId 9819 c.servicesId = servicesId 9820 c.versionsId = versionsId 9821 c.instancesId = instancesId 9822 return c 9823} 9824 9825// Fields allows partial responses to be retrieved. See 9826// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9827// for more information. 9828func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall { 9829 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9830 return c 9831} 9832 9833// IfNoneMatch sets the optional parameter which makes the operation 9834// fail if the object's ETag matches the given value. This is useful for 9835// getting updates only after the object has changed since the last 9836// request. Use googleapi.IsNotModified to check whether the response 9837// error from Do is the result of In-None-Match. 9838func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall { 9839 c.ifNoneMatch_ = entityTag 9840 return c 9841} 9842 9843// Context sets the context to be used in this call's Do method. Any 9844// pending HTTP request will be aborted if the provided context is 9845// canceled. 9846func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall { 9847 c.ctx_ = ctx 9848 return c 9849} 9850 9851// Header returns an http.Header that can be modified by the caller to 9852// add HTTP headers to the request. 9853func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header { 9854 if c.header_ == nil { 9855 c.header_ = make(http.Header) 9856 } 9857 return c.header_ 9858} 9859 9860func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) { 9861 reqHeaders := make(http.Header) 9862 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9863 for k, v := range c.header_ { 9864 reqHeaders[k] = v 9865 } 9866 reqHeaders.Set("User-Agent", c.s.userAgent()) 9867 if c.ifNoneMatch_ != "" { 9868 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9869 } 9870 var body io.Reader = nil 9871 c.urlParams_.Set("alt", alt) 9872 c.urlParams_.Set("prettyPrint", "false") 9873 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") 9874 urls += "?" + c.urlParams_.Encode() 9875 req, err := http.NewRequest("GET", urls, body) 9876 if err != nil { 9877 return nil, err 9878 } 9879 req.Header = reqHeaders 9880 googleapi.Expand(req.URL, map[string]string{ 9881 "appsId": c.appsId, 9882 "servicesId": c.servicesId, 9883 "versionsId": c.versionsId, 9884 "instancesId": c.instancesId, 9885 }) 9886 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9887} 9888 9889// Do executes the "appengine.apps.services.versions.instances.get" call. 9890// Exactly one of *Instance or error will be non-nil. Any non-2xx status 9891// code is an error. Response headers are in either 9892// *Instance.ServerResponse.Header or (if a response was returned at 9893// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9894// to check whether the returned error was because 9895// http.StatusNotModified was returned. 9896func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { 9897 gensupport.SetOptions(c.urlParams_, opts...) 9898 res, err := c.doRequest("json") 9899 if res != nil && res.StatusCode == http.StatusNotModified { 9900 if res.Body != nil { 9901 res.Body.Close() 9902 } 9903 return nil, &googleapi.Error{ 9904 Code: res.StatusCode, 9905 Header: res.Header, 9906 } 9907 } 9908 if err != nil { 9909 return nil, err 9910 } 9911 defer googleapi.CloseBody(res) 9912 if err := googleapi.CheckResponse(res); err != nil { 9913 return nil, err 9914 } 9915 ret := &Instance{ 9916 ServerResponse: googleapi.ServerResponse{ 9917 Header: res.Header, 9918 HTTPStatusCode: res.StatusCode, 9919 }, 9920 } 9921 target := &ret 9922 if err := gensupport.DecodeResponse(target, res); err != nil { 9923 return nil, err 9924 } 9925 return ret, nil 9926 // { 9927 // "description": "Gets instance information.", 9928 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9929 // "httpMethod": "GET", 9930 // "id": "appengine.apps.services.versions.instances.get", 9931 // "parameterOrder": [ 9932 // "appsId", 9933 // "servicesId", 9934 // "versionsId", 9935 // "instancesId" 9936 // ], 9937 // "parameters": { 9938 // "appsId": { 9939 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 9940 // "location": "path", 9941 // "required": true, 9942 // "type": "string" 9943 // }, 9944 // "instancesId": { 9945 // "description": "Part of `name`. See documentation of `appsId`.", 9946 // "location": "path", 9947 // "required": true, 9948 // "type": "string" 9949 // }, 9950 // "servicesId": { 9951 // "description": "Part of `name`. See documentation of `appsId`.", 9952 // "location": "path", 9953 // "required": true, 9954 // "type": "string" 9955 // }, 9956 // "versionsId": { 9957 // "description": "Part of `name`. See documentation of `appsId`.", 9958 // "location": "path", 9959 // "required": true, 9960 // "type": "string" 9961 // } 9962 // }, 9963 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 9964 // "response": { 9965 // "$ref": "Instance" 9966 // }, 9967 // "scopes": [ 9968 // "https://www.googleapis.com/auth/appengine.admin", 9969 // "https://www.googleapis.com/auth/cloud-platform", 9970 // "https://www.googleapis.com/auth/cloud-platform.read-only" 9971 // ] 9972 // } 9973 9974} 9975 9976// method id "appengine.apps.services.versions.instances.list": 9977 9978type AppsServicesVersionsInstancesListCall struct { 9979 s *APIService 9980 appsId string 9981 servicesId string 9982 versionsId string 9983 urlParams_ gensupport.URLParams 9984 ifNoneMatch_ string 9985 ctx_ context.Context 9986 header_ http.Header 9987} 9988 9989// List: Lists the instances of a version.Tip: To aggregate details 9990// about instances over time, see the Stackdriver Monitoring API 9991// (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeS 9992// eries/list). 9993func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall { 9994 c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9995 c.appsId = appsId 9996 c.servicesId = servicesId 9997 c.versionsId = versionsId 9998 return c 9999} 10000 10001// PageSize sets the optional parameter "pageSize": Maximum results to 10002// return per page. 10003func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall { 10004 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10005 return c 10006} 10007 10008// PageToken sets the optional parameter "pageToken": Continuation token 10009// for fetching the next page of results. 10010func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall { 10011 c.urlParams_.Set("pageToken", pageToken) 10012 return c 10013} 10014 10015// Fields allows partial responses to be retrieved. See 10016// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10017// for more information. 10018func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall { 10019 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10020 return c 10021} 10022 10023// IfNoneMatch sets the optional parameter which makes the operation 10024// fail if the object's ETag matches the given value. This is useful for 10025// getting updates only after the object has changed since the last 10026// request. Use googleapi.IsNotModified to check whether the response 10027// error from Do is the result of In-None-Match. 10028func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall { 10029 c.ifNoneMatch_ = entityTag 10030 return c 10031} 10032 10033// Context sets the context to be used in this call's Do method. Any 10034// pending HTTP request will be aborted if the provided context is 10035// canceled. 10036func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall { 10037 c.ctx_ = ctx 10038 return c 10039} 10040 10041// Header returns an http.Header that can be modified by the caller to 10042// add HTTP headers to the request. 10043func (c *AppsServicesVersionsInstancesListCall) Header() http.Header { 10044 if c.header_ == nil { 10045 c.header_ = make(http.Header) 10046 } 10047 return c.header_ 10048} 10049 10050func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) { 10051 reqHeaders := make(http.Header) 10052 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 10053 for k, v := range c.header_ { 10054 reqHeaders[k] = v 10055 } 10056 reqHeaders.Set("User-Agent", c.s.userAgent()) 10057 if c.ifNoneMatch_ != "" { 10058 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10059 } 10060 var body io.Reader = nil 10061 c.urlParams_.Set("alt", alt) 10062 c.urlParams_.Set("prettyPrint", "false") 10063 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances") 10064 urls += "?" + c.urlParams_.Encode() 10065 req, err := http.NewRequest("GET", urls, body) 10066 if err != nil { 10067 return nil, err 10068 } 10069 req.Header = reqHeaders 10070 googleapi.Expand(req.URL, map[string]string{ 10071 "appsId": c.appsId, 10072 "servicesId": c.servicesId, 10073 "versionsId": c.versionsId, 10074 }) 10075 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10076} 10077 10078// Do executes the "appengine.apps.services.versions.instances.list" call. 10079// Exactly one of *ListInstancesResponse or error will be non-nil. Any 10080// non-2xx status code is an error. Response headers are in either 10081// *ListInstancesResponse.ServerResponse.Header or (if a response was 10082// returned at all) in error.(*googleapi.Error).Header. Use 10083// googleapi.IsNotModified to check whether the returned error was 10084// because http.StatusNotModified was returned. 10085func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) { 10086 gensupport.SetOptions(c.urlParams_, opts...) 10087 res, err := c.doRequest("json") 10088 if res != nil && res.StatusCode == http.StatusNotModified { 10089 if res.Body != nil { 10090 res.Body.Close() 10091 } 10092 return nil, &googleapi.Error{ 10093 Code: res.StatusCode, 10094 Header: res.Header, 10095 } 10096 } 10097 if err != nil { 10098 return nil, err 10099 } 10100 defer googleapi.CloseBody(res) 10101 if err := googleapi.CheckResponse(res); err != nil { 10102 return nil, err 10103 } 10104 ret := &ListInstancesResponse{ 10105 ServerResponse: googleapi.ServerResponse{ 10106 Header: res.Header, 10107 HTTPStatusCode: res.StatusCode, 10108 }, 10109 } 10110 target := &ret 10111 if err := gensupport.DecodeResponse(target, res); err != nil { 10112 return nil, err 10113 } 10114 return ret, nil 10115 // { 10116 // "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).", 10117 // "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", 10118 // "httpMethod": "GET", 10119 // "id": "appengine.apps.services.versions.instances.list", 10120 // "parameterOrder": [ 10121 // "appsId", 10122 // "servicesId", 10123 // "versionsId" 10124 // ], 10125 // "parameters": { 10126 // "appsId": { 10127 // "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", 10128 // "location": "path", 10129 // "required": true, 10130 // "type": "string" 10131 // }, 10132 // "pageSize": { 10133 // "description": "Maximum results to return per page.", 10134 // "format": "int32", 10135 // "location": "query", 10136 // "type": "integer" 10137 // }, 10138 // "pageToken": { 10139 // "description": "Continuation token for fetching the next page of results.", 10140 // "location": "query", 10141 // "type": "string" 10142 // }, 10143 // "servicesId": { 10144 // "description": "Part of `parent`. See documentation of `appsId`.", 10145 // "location": "path", 10146 // "required": true, 10147 // "type": "string" 10148 // }, 10149 // "versionsId": { 10150 // "description": "Part of `parent`. See documentation of `appsId`.", 10151 // "location": "path", 10152 // "required": true, 10153 // "type": "string" 10154 // } 10155 // }, 10156 // "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", 10157 // "response": { 10158 // "$ref": "ListInstancesResponse" 10159 // }, 10160 // "scopes": [ 10161 // "https://www.googleapis.com/auth/appengine.admin", 10162 // "https://www.googleapis.com/auth/cloud-platform", 10163 // "https://www.googleapis.com/auth/cloud-platform.read-only" 10164 // ] 10165 // } 10166 10167} 10168 10169// Pages invokes f for each page of results. 10170// A non-nil error returned from f will halt the iteration. 10171// The provided context supersedes any context provided to the Context method. 10172func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error { 10173 c.ctx_ = ctx 10174 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10175 for { 10176 x, err := c.Do() 10177 if err != nil { 10178 return err 10179 } 10180 if err := f(x); err != nil { 10181 return err 10182 } 10183 if x.NextPageToken == "" { 10184 return nil 10185 } 10186 c.PageToken(x.NextPageToken) 10187 } 10188} 10189