1// Copyright 2021 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package appengine provides access to the App Engine Admin API. 8// 9// For product documentation, see: https://cloud.google.com/appengine/docs/admin-api/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/appengine/v1" 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/v1" 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:v1" 79const apiName = "appengine" 80const apiVersion = "v1" 81const basePath = "https://appengine.googleapis.com/" 82const mtlsBasePath = "https://appengine.mtls.googleapis.com/" 83 84// OAuth2 scopes used by this API. 85const ( 86 // View and manage your applications deployed on Google App Engine 87 AppengineAdminScope = "https://www.googleapis.com/auth/appengine.admin" 88 89 // See, edit, configure, and delete your Google Cloud data and see the 90 // email address for your Google Account. 91 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 92 93 // View your data across Google Cloud services and see the email address 94 // of your Google Account 95 CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" 96) 97 98// NewService creates a new APIService. 99func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) { 100 scopesOption := option.WithScopes( 101 "https://www.googleapis.com/auth/appengine.admin", 102 "https://www.googleapis.com/auth/cloud-platform", 103 "https://www.googleapis.com/auth/cloud-platform.read-only", 104 ) 105 // NOTE: prepend, so we don't override user-specified scopes. 106 opts = append([]option.ClientOption{scopesOption}, opts...) 107 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 108 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 109 client, endpoint, err := htransport.NewClient(ctx, opts...) 110 if err != nil { 111 return nil, err 112 } 113 s, err := New(client) 114 if err != nil { 115 return nil, err 116 } 117 if endpoint != "" { 118 s.BasePath = endpoint 119 } 120 return s, nil 121} 122 123// New creates a new APIService. It uses the provided http.Client for requests. 124// 125// Deprecated: please use NewService instead. 126// To provide a custom HTTP client, use option.WithHTTPClient. 127// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 128func New(client *http.Client) (*APIService, error) { 129 if client == nil { 130 return nil, errors.New("client is nil") 131 } 132 s := &APIService{client: client, BasePath: basePath} 133 s.Apps = NewAppsService(s) 134 return s, nil 135} 136 137type APIService struct { 138 client *http.Client 139 BasePath string // API endpoint base URL 140 UserAgent string // optional additional User-Agent fragment 141 142 Apps *AppsService 143} 144 145func (s *APIService) userAgent() string { 146 if s.UserAgent == "" { 147 return googleapi.UserAgent 148 } 149 return googleapi.UserAgent + " " + s.UserAgent 150} 151 152func NewAppsService(s *APIService) *AppsService { 153 rs := &AppsService{s: s} 154 rs.AuthorizedCertificates = NewAppsAuthorizedCertificatesService(s) 155 rs.AuthorizedDomains = NewAppsAuthorizedDomainsService(s) 156 rs.DomainMappings = NewAppsDomainMappingsService(s) 157 rs.Firewall = NewAppsFirewallService(s) 158 rs.Locations = NewAppsLocationsService(s) 159 rs.Operations = NewAppsOperationsService(s) 160 rs.Services = NewAppsServicesService(s) 161 return rs 162} 163 164type AppsService struct { 165 s *APIService 166 167 AuthorizedCertificates *AppsAuthorizedCertificatesService 168 169 AuthorizedDomains *AppsAuthorizedDomainsService 170 171 DomainMappings *AppsDomainMappingsService 172 173 Firewall *AppsFirewallService 174 175 Locations *AppsLocationsService 176 177 Operations *AppsOperationsService 178 179 Services *AppsServicesService 180} 181 182func NewAppsAuthorizedCertificatesService(s *APIService) *AppsAuthorizedCertificatesService { 183 rs := &AppsAuthorizedCertificatesService{s: s} 184 return rs 185} 186 187type AppsAuthorizedCertificatesService struct { 188 s *APIService 189} 190 191func NewAppsAuthorizedDomainsService(s *APIService) *AppsAuthorizedDomainsService { 192 rs := &AppsAuthorizedDomainsService{s: s} 193 return rs 194} 195 196type AppsAuthorizedDomainsService struct { 197 s *APIService 198} 199 200func NewAppsDomainMappingsService(s *APIService) *AppsDomainMappingsService { 201 rs := &AppsDomainMappingsService{s: s} 202 return rs 203} 204 205type AppsDomainMappingsService struct { 206 s *APIService 207} 208 209func NewAppsFirewallService(s *APIService) *AppsFirewallService { 210 rs := &AppsFirewallService{s: s} 211 rs.IngressRules = NewAppsFirewallIngressRulesService(s) 212 return rs 213} 214 215type AppsFirewallService struct { 216 s *APIService 217 218 IngressRules *AppsFirewallIngressRulesService 219} 220 221func NewAppsFirewallIngressRulesService(s *APIService) *AppsFirewallIngressRulesService { 222 rs := &AppsFirewallIngressRulesService{s: s} 223 return rs 224} 225 226type AppsFirewallIngressRulesService struct { 227 s *APIService 228} 229 230func NewAppsLocationsService(s *APIService) *AppsLocationsService { 231 rs := &AppsLocationsService{s: s} 232 return rs 233} 234 235type AppsLocationsService struct { 236 s *APIService 237} 238 239func NewAppsOperationsService(s *APIService) *AppsOperationsService { 240 rs := &AppsOperationsService{s: s} 241 return rs 242} 243 244type AppsOperationsService struct { 245 s *APIService 246} 247 248func NewAppsServicesService(s *APIService) *AppsServicesService { 249 rs := &AppsServicesService{s: s} 250 rs.Versions = NewAppsServicesVersionsService(s) 251 return rs 252} 253 254type AppsServicesService struct { 255 s *APIService 256 257 Versions *AppsServicesVersionsService 258} 259 260func NewAppsServicesVersionsService(s *APIService) *AppsServicesVersionsService { 261 rs := &AppsServicesVersionsService{s: s} 262 rs.Instances = NewAppsServicesVersionsInstancesService(s) 263 return rs 264} 265 266type AppsServicesVersionsService struct { 267 s *APIService 268 269 Instances *AppsServicesVersionsInstancesService 270} 271 272func NewAppsServicesVersionsInstancesService(s *APIService) *AppsServicesVersionsInstancesService { 273 rs := &AppsServicesVersionsInstancesService{s: s} 274 return rs 275} 276 277type AppsServicesVersionsInstancesService struct { 278 s *APIService 279} 280 281// ApiConfigHandler: Google Cloud Endpoints 282// (https://cloud.google.com/appengine/docs/python/endpoints/) 283// configuration for API handlers. 284type ApiConfigHandler struct { 285 // AuthFailAction: Action to take when users access resources that 286 // require authentication. Defaults to redirect. 287 // 288 // Possible values: 289 // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified. 290 // AUTH_FAIL_ACTION_REDIRECT is assumed. 291 // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to 292 // "accounts.google.com". The user is redirected back to the application 293 // URL after signing in or creating an account. 294 // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP 295 // status code and an error message. 296 AuthFailAction string `json:"authFailAction,omitempty"` 297 298 // Login: Level of login required to access this resource. Defaults to 299 // optional. 300 // 301 // Possible values: 302 // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed. 303 // "LOGIN_OPTIONAL" - Does not require that the user is signed in. 304 // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action 305 // is taken. In addition, if the user is not an administrator for the 306 // application, they are given an error message regardless of 307 // auth_fail_action. If the user is an administrator, the handler 308 // proceeds. 309 // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds 310 // normally. Otherwise, the auth_fail_action is taken. 311 Login string `json:"login,omitempty"` 312 313 // Script: Path to the script from the application root directory. 314 Script string `json:"script,omitempty"` 315 316 // SecurityLevel: Security (HTTPS) enforcement for this URL. 317 // 318 // Possible values: 319 // "SECURE_UNSPECIFIED" - Not specified. 320 // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that 321 // match the handler succeed without redirects. The application can 322 // examine the request to determine which protocol was used, and respond 323 // accordingly. 324 // "SECURE_NEVER" - Requests for a URL that match this handler that 325 // use HTTPS are automatically redirected to the HTTP equivalent URL. 326 // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that 327 // match the handler succeed without redirects. The application can 328 // examine the request to determine which protocol was used and respond 329 // accordingly. 330 // "SECURE_ALWAYS" - Requests for a URL that match this handler that 331 // do not use HTTPS are automatically redirected to the HTTPS URL with 332 // the same path. Query parameters are reserved for the redirect. 333 SecurityLevel string `json:"securityLevel,omitempty"` 334 335 // Url: URL to serve the endpoint at. 336 Url string `json:"url,omitempty"` 337 338 // ForceSendFields is a list of field names (e.g. "AuthFailAction") to 339 // unconditionally include in API requests. By default, fields with 340 // empty or default values are omitted from API requests. However, any 341 // non-pointer, non-interface field appearing in ForceSendFields will be 342 // sent to the server regardless of whether the field is empty or not. 343 // This may be used to include empty fields in Patch requests. 344 ForceSendFields []string `json:"-"` 345 346 // NullFields is a list of field names (e.g. "AuthFailAction") to 347 // include in API requests with the JSON null value. By default, fields 348 // with empty values are omitted from API requests. However, any field 349 // with an empty value appearing in NullFields will be sent to the 350 // server as null. It is an error if a field in this list has a 351 // non-empty value. This may be used to include null fields in Patch 352 // requests. 353 NullFields []string `json:"-"` 354} 355 356func (s *ApiConfigHandler) MarshalJSON() ([]byte, error) { 357 type NoMethod ApiConfigHandler 358 raw := NoMethod(*s) 359 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 360} 361 362// ApiEndpointHandler: Uses Google Cloud Endpoints to handle requests. 363type ApiEndpointHandler struct { 364 // ScriptPath: Path to the script from the application root directory. 365 ScriptPath string `json:"scriptPath,omitempty"` 366 367 // ForceSendFields is a list of field names (e.g. "ScriptPath") to 368 // unconditionally include in API requests. By default, fields with 369 // empty or default values are omitted from API requests. However, any 370 // non-pointer, non-interface field appearing in ForceSendFields will be 371 // sent to the server regardless of whether the field is empty or not. 372 // This may be used to include empty fields in Patch requests. 373 ForceSendFields []string `json:"-"` 374 375 // NullFields is a list of field names (e.g. "ScriptPath") to include in 376 // API requests with the JSON null value. By default, fields with empty 377 // values are omitted from API requests. However, any field with an 378 // empty value appearing in NullFields will be sent to the server as 379 // null. It is an error if a field in this list has a non-empty value. 380 // This may be used to include null fields in Patch requests. 381 NullFields []string `json:"-"` 382} 383 384func (s *ApiEndpointHandler) MarshalJSON() ([]byte, error) { 385 type NoMethod ApiEndpointHandler 386 raw := NoMethod(*s) 387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 388} 389 390// Application: An Application resource contains the top-level 391// configuration of an App Engine application. 392type Application struct { 393 // AuthDomain: Google Apps authentication domain that controls which 394 // users can access this application.Defaults to open access for any 395 // Google Account. 396 AuthDomain string `json:"authDomain,omitempty"` 397 398 // CodeBucket: Google Cloud Storage bucket that can be used for storing 399 // files associated with this application. This bucket is associated 400 // with the application and can be used by the gcloud deployment 401 // commands.@OutputOnly 402 CodeBucket string `json:"codeBucket,omitempty"` 403 404 // DatabaseType: The type of the Cloud Firestore or Cloud Datastore 405 // database associated with this application. 406 // 407 // Possible values: 408 // "DATABASE_TYPE_UNSPECIFIED" - Database type is unspecified. 409 // "CLOUD_DATASTORE" - Cloud Datastore 410 // "CLOUD_FIRESTORE" - Cloud Firestore Native 411 // "CLOUD_DATASTORE_COMPATIBILITY" - Cloud Firestore in Datastore Mode 412 DatabaseType string `json:"databaseType,omitempty"` 413 414 // DefaultBucket: Google Cloud Storage bucket that can be used by this 415 // application to store content.@OutputOnly 416 DefaultBucket string `json:"defaultBucket,omitempty"` 417 418 // DefaultCookieExpiration: Cookie expiration policy for this 419 // application. 420 DefaultCookieExpiration string `json:"defaultCookieExpiration,omitempty"` 421 422 // DefaultHostname: Hostname used to reach this application, as resolved 423 // by App Engine.@OutputOnly 424 DefaultHostname string `json:"defaultHostname,omitempty"` 425 426 // DispatchRules: HTTP path dispatch rules for requests to the 427 // application that do not explicitly target a service or version. Rules 428 // are order-dependent. Up to 20 dispatch rules can be supported. 429 DispatchRules []*UrlDispatchRule `json:"dispatchRules,omitempty"` 430 431 // FeatureSettings: The feature specific settings to be used in the 432 // application. 433 FeatureSettings *FeatureSettings `json:"featureSettings,omitempty"` 434 435 // GcrDomain: The Google Container Registry domain used for storing 436 // managed build docker images for this application. 437 GcrDomain string `json:"gcrDomain,omitempty"` 438 439 Iap *IdentityAwareProxy `json:"iap,omitempty"` 440 441 // Id: Identifier of the Application resource. This identifier is 442 // equivalent to the project ID of the Google Cloud Platform project 443 // where you want to deploy your application. Example: myapp. 444 Id string `json:"id,omitempty"` 445 446 // LocationId: Location from which this application runs. Application 447 // instances run out of the data centers in the specified location, 448 // which is also where all of the application's end user content is 449 // stored.Defaults to us-central.View the list of supported locations 450 // (https://cloud.google.com/appengine/docs/locations). 451 LocationId string `json:"locationId,omitempty"` 452 453 // Name: Full path to the Application resource in the API. Example: 454 // apps/myapp.@OutputOnly 455 Name string `json:"name,omitempty"` 456 457 // ServiceAccount: The service account associated with the application. 458 // This is the app-level default identity. If no identity provided 459 // during create version, Admin API will fallback to this one. 460 ServiceAccount string `json:"serviceAccount,omitempty"` 461 462 // ServingStatus: Serving status of this application. 463 // 464 // Possible values: 465 // "UNSPECIFIED" - Serving status is unspecified. 466 // "SERVING" - Application is serving. 467 // "USER_DISABLED" - Application has been disabled by the user. 468 // "SYSTEM_DISABLED" - Application has been disabled by the system. 469 ServingStatus string `json:"servingStatus,omitempty"` 470 471 // ServerResponse contains the HTTP response code and headers from the 472 // server. 473 googleapi.ServerResponse `json:"-"` 474 475 // ForceSendFields is a list of field names (e.g. "AuthDomain") to 476 // unconditionally include in API requests. By default, fields with 477 // empty or default values are omitted from API requests. However, any 478 // non-pointer, non-interface field appearing in ForceSendFields will be 479 // sent to the server regardless of whether the field is empty or not. 480 // This may be used to include empty fields in Patch requests. 481 ForceSendFields []string `json:"-"` 482 483 // NullFields is a list of field names (e.g. "AuthDomain") to include in 484 // API requests with the JSON null value. By default, fields with empty 485 // values are omitted from API requests. However, any field with an 486 // empty value appearing in NullFields will be sent to the server as 487 // null. It is an error if a field in this list has a non-empty value. 488 // This may be used to include null fields in Patch requests. 489 NullFields []string `json:"-"` 490} 491 492func (s *Application) MarshalJSON() ([]byte, error) { 493 type NoMethod Application 494 raw := NoMethod(*s) 495 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 496} 497 498// AuthorizedCertificate: An SSL certificate that a user has been 499// authorized to administer. A user is authorized to administer any 500// certificate that applies to one of their authorized domains. 501type AuthorizedCertificate struct { 502 // CertificateRawData: The SSL certificate serving the 503 // AuthorizedCertificate resource. This must be obtained independently 504 // from a certificate authority. 505 CertificateRawData *CertificateRawData `json:"certificateRawData,omitempty"` 506 507 // DisplayName: The user-specified display name of the certificate. This 508 // is not guaranteed to be unique. Example: My Certificate. 509 DisplayName string `json:"displayName,omitempty"` 510 511 // DomainMappingsCount: Aggregate count of the domain mappings with this 512 // certificate mapped. This count includes domain mappings on 513 // applications for which the user does not have VIEWER permissions.Only 514 // returned by GET or LIST requests when specifically requested by the 515 // view=FULL_CERTIFICATE option.@OutputOnly 516 DomainMappingsCount int64 `json:"domainMappingsCount,omitempty"` 517 518 // DomainNames: Topmost applicable domains of this certificate. This 519 // certificate applies to these domains and their subdomains. Example: 520 // example.com.@OutputOnly 521 DomainNames []string `json:"domainNames,omitempty"` 522 523 // ExpireTime: The time when this certificate expires. To update the 524 // renewal time on this certificate, upload an SSL certificate with a 525 // different expiration time using 526 // AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly 527 ExpireTime string `json:"expireTime,omitempty"` 528 529 // Id: Relative name of the certificate. This is a unique value 530 // autogenerated on AuthorizedCertificate resource creation. Example: 531 // 12345.@OutputOnly 532 Id string `json:"id,omitempty"` 533 534 // ManagedCertificate: Only applicable if this certificate is managed by 535 // App Engine. Managed certificates are tied to the lifecycle of a 536 // DomainMapping and cannot be updated or deleted via the 537 // AuthorizedCertificates API. If this certificate is manually 538 // administered by the user, this field will be empty.@OutputOnly 539 ManagedCertificate *ManagedCertificate `json:"managedCertificate,omitempty"` 540 541 // Name: Full path to the AuthorizedCertificate resource in the API. 542 // Example: apps/myapp/authorizedCertificates/12345.@OutputOnly 543 Name string `json:"name,omitempty"` 544 545 // VisibleDomainMappings: The full paths to user visible Domain Mapping 546 // resources that have this certificate mapped. Example: 547 // apps/myapp/domainMappings/example.com.This may not represent the full 548 // list of mapped domain mappings if the user does not have VIEWER 549 // permissions on all of the applications that have this certificate 550 // mapped. See domain_mappings_count for a complete count.Only returned 551 // by GET or LIST requests when specifically requested by the 552 // view=FULL_CERTIFICATE option.@OutputOnly 553 VisibleDomainMappings []string `json:"visibleDomainMappings,omitempty"` 554 555 // ServerResponse contains the HTTP response code and headers from the 556 // server. 557 googleapi.ServerResponse `json:"-"` 558 559 // ForceSendFields is a list of field names (e.g. "CertificateRawData") 560 // to unconditionally include in API requests. By default, fields with 561 // empty or default values are omitted from API requests. However, any 562 // non-pointer, non-interface field appearing in ForceSendFields will be 563 // sent to the server regardless of whether the field is empty or not. 564 // This may be used to include empty fields in Patch requests. 565 ForceSendFields []string `json:"-"` 566 567 // NullFields is a list of field names (e.g. "CertificateRawData") to 568 // include in API requests with the JSON null value. By default, fields 569 // with empty values are omitted from API requests. However, any field 570 // with an empty value appearing in NullFields will be sent to the 571 // server as null. It is an error if a field in this list has a 572 // non-empty value. This may be used to include null fields in Patch 573 // requests. 574 NullFields []string `json:"-"` 575} 576 577func (s *AuthorizedCertificate) MarshalJSON() ([]byte, error) { 578 type NoMethod AuthorizedCertificate 579 raw := NoMethod(*s) 580 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 581} 582 583// AuthorizedDomain: A domain that a user has been authorized to 584// administer. To authorize use of a domain, verify ownership via 585// Webmaster Central 586// (https://www.google.com/webmasters/verification/home). 587type AuthorizedDomain struct { 588 // Id: Fully qualified domain name of the domain authorized for use. 589 // Example: example.com. 590 Id string `json:"id,omitempty"` 591 592 // Name: Full path to the AuthorizedDomain resource in the API. Example: 593 // apps/myapp/authorizedDomains/example.com.@OutputOnly 594 Name string `json:"name,omitempty"` 595 596 // ForceSendFields is a list of field names (e.g. "Id") to 597 // unconditionally include in API requests. By default, fields with 598 // empty or default values are omitted from API requests. However, any 599 // non-pointer, non-interface field appearing in ForceSendFields will be 600 // sent to the server regardless of whether the field is empty or not. 601 // This may be used to include empty fields in Patch requests. 602 ForceSendFields []string `json:"-"` 603 604 // NullFields is a list of field names (e.g. "Id") to include in API 605 // requests with the JSON null value. By default, fields with empty 606 // values are omitted from API requests. However, any field with an 607 // empty value appearing in NullFields will be sent to the server as 608 // null. It is an error if a field in this list has a non-empty value. 609 // This may be used to include null fields in Patch requests. 610 NullFields []string `json:"-"` 611} 612 613func (s *AuthorizedDomain) MarshalJSON() ([]byte, error) { 614 type NoMethod AuthorizedDomain 615 raw := NoMethod(*s) 616 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 617} 618 619// AutomaticScaling: Automatic scaling is based on request rate, 620// response latencies, and other application metrics. 621type AutomaticScaling struct { 622 // CoolDownPeriod: The time period that the Autoscaler 623 // (https://cloud.google.com/compute/docs/autoscaler/) should wait 624 // before it starts collecting information from a new instance. This 625 // prevents the autoscaler from collecting information when the instance 626 // is initializing, during which the collected usage would not be 627 // reliable. Only applicable in the App Engine flexible environment. 628 CoolDownPeriod string `json:"coolDownPeriod,omitempty"` 629 630 // CpuUtilization: Target scaling by CPU usage. 631 CpuUtilization *CpuUtilization `json:"cpuUtilization,omitempty"` 632 633 // DiskUtilization: Target scaling by disk usage. 634 DiskUtilization *DiskUtilization `json:"diskUtilization,omitempty"` 635 636 // MaxConcurrentRequests: Number of concurrent requests an automatic 637 // scaling instance can accept before the scheduler spawns a new 638 // instance.Defaults to a runtime-specific value. 639 MaxConcurrentRequests int64 `json:"maxConcurrentRequests,omitempty"` 640 641 // MaxIdleInstances: Maximum number of idle instances that should be 642 // maintained for this version. 643 MaxIdleInstances int64 `json:"maxIdleInstances,omitempty"` 644 645 // MaxPendingLatency: Maximum amount of time that a request should wait 646 // in the pending queue before starting a new instance to handle it. 647 MaxPendingLatency string `json:"maxPendingLatency,omitempty"` 648 649 // MaxTotalInstances: Maximum number of instances that should be started 650 // to handle requests for this version. 651 MaxTotalInstances int64 `json:"maxTotalInstances,omitempty"` 652 653 // MinIdleInstances: Minimum number of idle instances that should be 654 // maintained for this version. Only applicable for the default version 655 // of a service. 656 MinIdleInstances int64 `json:"minIdleInstances,omitempty"` 657 658 // MinPendingLatency: Minimum amount of time a request should wait in 659 // the pending queue before starting a new instance to handle it. 660 MinPendingLatency string `json:"minPendingLatency,omitempty"` 661 662 // MinTotalInstances: Minimum number of running instances that should be 663 // maintained for this version. 664 MinTotalInstances int64 `json:"minTotalInstances,omitempty"` 665 666 // NetworkUtilization: Target scaling by network usage. 667 NetworkUtilization *NetworkUtilization `json:"networkUtilization,omitempty"` 668 669 // RequestUtilization: Target scaling by request utilization. 670 RequestUtilization *RequestUtilization `json:"requestUtilization,omitempty"` 671 672 // StandardSchedulerSettings: Scheduler settings for standard 673 // environment. 674 StandardSchedulerSettings *StandardSchedulerSettings `json:"standardSchedulerSettings,omitempty"` 675 676 // ForceSendFields is a list of field names (e.g. "CoolDownPeriod") to 677 // unconditionally include in API requests. By default, fields with 678 // empty or default values are omitted from API requests. However, any 679 // non-pointer, non-interface field appearing in ForceSendFields will be 680 // sent to the server regardless of whether the field is empty or not. 681 // This may be used to include empty fields in Patch requests. 682 ForceSendFields []string `json:"-"` 683 684 // NullFields is a list of field names (e.g. "CoolDownPeriod") to 685 // include in API requests with the JSON null value. By default, fields 686 // with empty values are omitted from API requests. However, any field 687 // with an empty value appearing in NullFields will be sent to the 688 // server as null. It is an error if a field in this list has a 689 // non-empty value. This may be used to include null fields in Patch 690 // requests. 691 NullFields []string `json:"-"` 692} 693 694func (s *AutomaticScaling) MarshalJSON() ([]byte, error) { 695 type NoMethod AutomaticScaling 696 raw := NoMethod(*s) 697 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 698} 699 700// BasicScaling: A service with basic scaling will create an instance 701// when the application receives a request. The instance will be turned 702// down when the app becomes idle. Basic scaling is ideal for work that 703// is intermittent or driven by user activity. 704type BasicScaling struct { 705 // IdleTimeout: Duration of time after the last request that an instance 706 // must wait before the instance is shut down. 707 IdleTimeout string `json:"idleTimeout,omitempty"` 708 709 // MaxInstances: Maximum number of instances to create for this version. 710 MaxInstances int64 `json:"maxInstances,omitempty"` 711 712 // ForceSendFields is a list of field names (e.g. "IdleTimeout") to 713 // unconditionally include in API requests. By default, fields with 714 // empty or default values are omitted from API requests. However, any 715 // non-pointer, non-interface field appearing in ForceSendFields will be 716 // sent to the server regardless of whether the field is empty or not. 717 // This may be used to include empty fields in Patch requests. 718 ForceSendFields []string `json:"-"` 719 720 // NullFields is a list of field names (e.g. "IdleTimeout") to include 721 // in API requests with the JSON null value. By default, fields with 722 // empty values are omitted from API requests. However, any field with 723 // an empty value appearing in NullFields will be sent to the server as 724 // null. It is an error if a field in this list has a non-empty value. 725 // This may be used to include null fields in Patch requests. 726 NullFields []string `json:"-"` 727} 728 729func (s *BasicScaling) MarshalJSON() ([]byte, error) { 730 type NoMethod BasicScaling 731 raw := NoMethod(*s) 732 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 733} 734 735// BatchUpdateIngressRulesRequest: Request message for 736// Firewall.BatchUpdateIngressRules. 737type BatchUpdateIngressRulesRequest struct { 738 // IngressRules: A list of FirewallRules to replace the existing set. 739 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 740 741 // ForceSendFields is a list of field names (e.g. "IngressRules") to 742 // unconditionally include in API requests. By default, fields with 743 // empty or default values are omitted from API requests. However, any 744 // non-pointer, non-interface field appearing in ForceSendFields will be 745 // sent to the server regardless of whether the field is empty or not. 746 // This may be used to include empty fields in Patch requests. 747 ForceSendFields []string `json:"-"` 748 749 // NullFields is a list of field names (e.g. "IngressRules") to include 750 // in API requests with the JSON null value. By default, fields with 751 // empty values are omitted from API requests. However, any field with 752 // an empty value appearing in NullFields will be sent to the server as 753 // null. It is an error if a field in this list has a non-empty value. 754 // This may be used to include null fields in Patch requests. 755 NullFields []string `json:"-"` 756} 757 758func (s *BatchUpdateIngressRulesRequest) MarshalJSON() ([]byte, error) { 759 type NoMethod BatchUpdateIngressRulesRequest 760 raw := NoMethod(*s) 761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 762} 763 764// BatchUpdateIngressRulesResponse: Response message for 765// Firewall.UpdateAllIngressRules. 766type BatchUpdateIngressRulesResponse struct { 767 // IngressRules: The full list of ingress FirewallRules for this 768 // application. 769 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 770 771 // ServerResponse contains the HTTP response code and headers from the 772 // server. 773 googleapi.ServerResponse `json:"-"` 774 775 // ForceSendFields is a list of field names (e.g. "IngressRules") to 776 // unconditionally include in API requests. By default, fields with 777 // empty or default values are omitted from API requests. However, any 778 // non-pointer, non-interface field appearing in ForceSendFields will be 779 // sent to the server regardless of whether the field is empty or not. 780 // This may be used to include empty fields in Patch requests. 781 ForceSendFields []string `json:"-"` 782 783 // NullFields is a list of field names (e.g. "IngressRules") to include 784 // in API requests with the JSON null value. By default, fields with 785 // empty values are omitted from API requests. However, any field with 786 // an empty value appearing in NullFields will be sent to the server as 787 // null. It is an error if a field in this list has a non-empty value. 788 // This may be used to include null fields in Patch requests. 789 NullFields []string `json:"-"` 790} 791 792func (s *BatchUpdateIngressRulesResponse) MarshalJSON() ([]byte, error) { 793 type NoMethod BatchUpdateIngressRulesResponse 794 raw := NoMethod(*s) 795 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 796} 797 798// CertificateRawData: An SSL certificate obtained from a certificate 799// authority. 800type CertificateRawData struct { 801 // PrivateKey: Unencrypted PEM encoded RSA private key. This field is 802 // set once on certificate creation and then encrypted. The key size 803 // must be 2048 bits or fewer. Must include the header and footer. 804 // Example: -----BEGIN RSA PRIVATE KEY----- -----END RSA PRIVATE 805 // KEY----- @InputOnly 806 PrivateKey string `json:"privateKey,omitempty"` 807 808 // PublicCertificate: PEM encoded x.509 public key certificate. This 809 // field is set once on certificate creation. Must include the header 810 // and footer. Example: -----BEGIN CERTIFICATE----- -----END 811 // CERTIFICATE----- 812 PublicCertificate string `json:"publicCertificate,omitempty"` 813 814 // ForceSendFields is a list of field names (e.g. "PrivateKey") to 815 // unconditionally include in API requests. By default, fields with 816 // empty or default values are omitted from API requests. However, any 817 // non-pointer, non-interface field appearing in ForceSendFields will be 818 // sent to the server regardless of whether the field is empty or not. 819 // This may be used to include empty fields in Patch requests. 820 ForceSendFields []string `json:"-"` 821 822 // NullFields is a list of field names (e.g. "PrivateKey") to include in 823 // API requests with the JSON null value. By default, fields with empty 824 // values are omitted from API requests. However, any field with an 825 // empty value appearing in NullFields will be sent to the server as 826 // null. It is an error if a field in this list has a non-empty value. 827 // This may be used to include null fields in Patch requests. 828 NullFields []string `json:"-"` 829} 830 831func (s *CertificateRawData) MarshalJSON() ([]byte, error) { 832 type NoMethod CertificateRawData 833 raw := NoMethod(*s) 834 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 835} 836 837// CloudBuildOptions: Options for the build operations performed as a 838// part of the version deployment. Only applicable for App Engine 839// flexible environment when creating a version using source code 840// directly. 841type CloudBuildOptions struct { 842 // AppYamlPath: Path to the yaml file used in deployment, used to 843 // determine runtime configuration details.Required for flexible 844 // environment builds.See 845 // https://cloud.google.com/appengine/docs/standard/python/config/appref 846 // for more details. 847 AppYamlPath string `json:"appYamlPath,omitempty"` 848 849 // CloudBuildTimeout: The Cloud Build timeout used as part of any 850 // dependent builds performed by version creation. Defaults to 10 851 // minutes. 852 CloudBuildTimeout string `json:"cloudBuildTimeout,omitempty"` 853 854 // ForceSendFields is a list of field names (e.g. "AppYamlPath") to 855 // unconditionally include in API requests. By default, fields with 856 // empty or default values are omitted from API requests. However, any 857 // non-pointer, non-interface field appearing in ForceSendFields will be 858 // sent to the server regardless of whether the field is empty or not. 859 // This may be used to include empty fields in Patch requests. 860 ForceSendFields []string `json:"-"` 861 862 // NullFields is a list of field names (e.g. "AppYamlPath") to include 863 // in API requests with the JSON null value. By default, fields with 864 // empty values are omitted from API requests. However, any field with 865 // an empty value appearing in NullFields will be sent to the server as 866 // null. It is an error if a field in this list has a non-empty value. 867 // This may be used to include null fields in Patch requests. 868 NullFields []string `json:"-"` 869} 870 871func (s *CloudBuildOptions) MarshalJSON() ([]byte, error) { 872 type NoMethod CloudBuildOptions 873 raw := NoMethod(*s) 874 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 875} 876 877// ContainerInfo: Docker image that is used to create a container and 878// start a VM instance for the version that you deploy. Only applicable 879// for instances running in the App Engine flexible environment. 880type ContainerInfo struct { 881 // Image: URI to the hosted container image in Google Container 882 // Registry. The URI must be fully qualified and include a tag or 883 // digest. Examples: "gcr.io/my-project/image:tag" or 884 // "gcr.io/my-project/image@digest" 885 Image string `json:"image,omitempty"` 886 887 // ForceSendFields is a list of field names (e.g. "Image") to 888 // unconditionally include in API requests. By default, fields with 889 // empty or default values are omitted from API requests. However, any 890 // non-pointer, non-interface field appearing in ForceSendFields will be 891 // sent to the server regardless of whether the field is empty or not. 892 // This may be used to include empty fields in Patch requests. 893 ForceSendFields []string `json:"-"` 894 895 // NullFields is a list of field names (e.g. "Image") to include in API 896 // requests with the JSON null value. By default, fields with empty 897 // values are omitted from API requests. However, any field with an 898 // empty value appearing in NullFields will be sent to the server as 899 // null. It is an error if a field in this list has a non-empty value. 900 // This may be used to include null fields in Patch requests. 901 NullFields []string `json:"-"` 902} 903 904func (s *ContainerInfo) MarshalJSON() ([]byte, error) { 905 type NoMethod ContainerInfo 906 raw := NoMethod(*s) 907 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 908} 909 910// CpuUtilization: Target scaling by CPU usage. 911type CpuUtilization struct { 912 // AggregationWindowLength: Period of time over which CPU utilization is 913 // calculated. 914 AggregationWindowLength string `json:"aggregationWindowLength,omitempty"` 915 916 // TargetUtilization: Target CPU utilization ratio to maintain when 917 // scaling. Must be between 0 and 1. 918 TargetUtilization float64 `json:"targetUtilization,omitempty"` 919 920 // ForceSendFields is a list of field names (e.g. 921 // "AggregationWindowLength") to unconditionally include in API 922 // requests. By default, fields with empty or default values are omitted 923 // from API requests. However, any non-pointer, non-interface field 924 // appearing in ForceSendFields will be sent to the server regardless of 925 // whether the field is empty or not. This may be used to include empty 926 // fields in Patch requests. 927 ForceSendFields []string `json:"-"` 928 929 // NullFields is a list of field names (e.g. "AggregationWindowLength") 930 // to include in API requests with the JSON null value. By default, 931 // fields with empty values are omitted from API requests. However, any 932 // field with an empty value appearing in NullFields will be sent to the 933 // server as null. It is an error if a field in this list has a 934 // non-empty value. This may be used to include null fields in Patch 935 // requests. 936 NullFields []string `json:"-"` 937} 938 939func (s *CpuUtilization) MarshalJSON() ([]byte, error) { 940 type NoMethod CpuUtilization 941 raw := NoMethod(*s) 942 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 943} 944 945func (s *CpuUtilization) UnmarshalJSON(data []byte) error { 946 type NoMethod CpuUtilization 947 var s1 struct { 948 TargetUtilization gensupport.JSONFloat64 `json:"targetUtilization"` 949 *NoMethod 950 } 951 s1.NoMethod = (*NoMethod)(s) 952 if err := json.Unmarshal(data, &s1); err != nil { 953 return err 954 } 955 s.TargetUtilization = float64(s1.TargetUtilization) 956 return nil 957} 958 959// CreateVersionMetadataV1: Metadata for the given 960// google.longrunning.Operation during a 961// google.appengine.v1.CreateVersionRequest. 962type CreateVersionMetadataV1 struct { 963 // CloudBuildId: The Cloud Build ID if one was created as part of the 964 // version create. @OutputOnly 965 CloudBuildId string `json:"cloudBuildId,omitempty"` 966 967 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 968 // unconditionally include in API requests. By default, fields with 969 // empty or default values are omitted from API requests. However, any 970 // non-pointer, non-interface field appearing in ForceSendFields will be 971 // sent to the server regardless of whether the field is empty or not. 972 // This may be used to include empty fields in Patch requests. 973 ForceSendFields []string `json:"-"` 974 975 // NullFields is a list of field names (e.g. "CloudBuildId") to include 976 // in API requests with the JSON null value. By default, fields with 977 // empty values are omitted from API requests. However, any field with 978 // an empty value appearing in NullFields will be sent to the server as 979 // null. It is an error if a field in this list has a non-empty value. 980 // This may be used to include null fields in Patch requests. 981 NullFields []string `json:"-"` 982} 983 984func (s *CreateVersionMetadataV1) MarshalJSON() ([]byte, error) { 985 type NoMethod CreateVersionMetadataV1 986 raw := NoMethod(*s) 987 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 988} 989 990// CreateVersionMetadataV1Alpha: Metadata for the given 991// google.longrunning.Operation during a 992// google.appengine.v1alpha.CreateVersionRequest. 993type CreateVersionMetadataV1Alpha struct { 994 // CloudBuildId: The Cloud Build ID if one was created as part of the 995 // version create. @OutputOnly 996 CloudBuildId string `json:"cloudBuildId,omitempty"` 997 998 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 999 // unconditionally include in API requests. By default, fields with 1000 // empty or default values are omitted from API requests. However, any 1001 // non-pointer, non-interface field appearing in ForceSendFields will be 1002 // sent to the server regardless of whether the field is empty or not. 1003 // This may be used to include empty fields in Patch requests. 1004 ForceSendFields []string `json:"-"` 1005 1006 // NullFields is a list of field names (e.g. "CloudBuildId") to include 1007 // in API requests with the JSON null value. By default, fields with 1008 // empty values are omitted from API requests. However, any field with 1009 // an empty value appearing in NullFields will be sent to the server as 1010 // null. It is an error if a field in this list has a non-empty value. 1011 // This may be used to include null fields in Patch requests. 1012 NullFields []string `json:"-"` 1013} 1014 1015func (s *CreateVersionMetadataV1Alpha) MarshalJSON() ([]byte, error) { 1016 type NoMethod CreateVersionMetadataV1Alpha 1017 raw := NoMethod(*s) 1018 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1019} 1020 1021// CreateVersionMetadataV1Beta: Metadata for the given 1022// google.longrunning.Operation during a 1023// google.appengine.v1beta.CreateVersionRequest. 1024type CreateVersionMetadataV1Beta struct { 1025 // CloudBuildId: The Cloud Build ID if one was created as part of the 1026 // version create. @OutputOnly 1027 CloudBuildId string `json:"cloudBuildId,omitempty"` 1028 1029 // ForceSendFields is a list of field names (e.g. "CloudBuildId") to 1030 // unconditionally include in API requests. By default, fields with 1031 // empty or default values are omitted from API requests. However, any 1032 // non-pointer, non-interface field appearing in ForceSendFields will be 1033 // sent to the server regardless of whether the field is empty or not. 1034 // This may be used to include empty fields in Patch requests. 1035 ForceSendFields []string `json:"-"` 1036 1037 // NullFields is a list of field names (e.g. "CloudBuildId") to include 1038 // in API requests with the JSON null value. By default, fields with 1039 // empty values are omitted from API requests. However, any field with 1040 // an empty value appearing in NullFields will be sent to the server as 1041 // null. It is an error if a field in this list has a non-empty value. 1042 // This may be used to include null fields in Patch requests. 1043 NullFields []string `json:"-"` 1044} 1045 1046func (s *CreateVersionMetadataV1Beta) MarshalJSON() ([]byte, error) { 1047 type NoMethod CreateVersionMetadataV1Beta 1048 raw := NoMethod(*s) 1049 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1050} 1051 1052// DebugInstanceRequest: Request message for Instances.DebugInstance. 1053type DebugInstanceRequest struct { 1054 // SshKey: Public SSH key to add to the instance. Examples: 1055 // [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] [USERNAME]:ssh-rsa 1056 // [KEY_VALUE] google-ssh 1057 // {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more 1058 // information, see Adding and Removing SSH Keys 1059 // (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). 1060 SshKey string `json:"sshKey,omitempty"` 1061 1062 // ForceSendFields is a list of field names (e.g. "SshKey") to 1063 // unconditionally include in API requests. By default, fields with 1064 // empty or default values are omitted from API requests. However, any 1065 // non-pointer, non-interface field appearing in ForceSendFields will be 1066 // sent to the server regardless of whether the field is empty or not. 1067 // This may be used to include empty fields in Patch requests. 1068 ForceSendFields []string `json:"-"` 1069 1070 // NullFields is a list of field names (e.g. "SshKey") to include in API 1071 // requests with the JSON null value. By default, fields with empty 1072 // values are omitted from API requests. However, any field with an 1073 // empty value appearing in NullFields will be sent to the server as 1074 // null. It is an error if a field in this list has a non-empty value. 1075 // This may be used to include null fields in Patch requests. 1076 NullFields []string `json:"-"` 1077} 1078 1079func (s *DebugInstanceRequest) MarshalJSON() ([]byte, error) { 1080 type NoMethod DebugInstanceRequest 1081 raw := NoMethod(*s) 1082 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1083} 1084 1085// Deployment: Code and application artifacts used to deploy a version 1086// to App Engine. 1087type Deployment struct { 1088 // CloudBuildOptions: Options for any Google Cloud Build builds created 1089 // as a part of this deployment.These options will only be used if a new 1090 // build is created, such as when deploying to the App Engine flexible 1091 // environment using files or zip. 1092 CloudBuildOptions *CloudBuildOptions `json:"cloudBuildOptions,omitempty"` 1093 1094 // Container: The Docker image for the container that runs the version. 1095 // Only applicable for instances running in the App Engine flexible 1096 // environment. 1097 Container *ContainerInfo `json:"container,omitempty"` 1098 1099 // Files: Manifest of the files stored in Google Cloud Storage that are 1100 // included as part of this version. All files must be readable using 1101 // the credentials supplied with this call. 1102 Files map[string]FileInfo `json:"files,omitempty"` 1103 1104 // Zip: The zip file for this deployment, if this is a zip deployment. 1105 Zip *ZipInfo `json:"zip,omitempty"` 1106 1107 // ForceSendFields is a list of field names (e.g. "CloudBuildOptions") 1108 // to unconditionally include in API requests. By default, fields with 1109 // empty or default values are omitted from API requests. However, any 1110 // non-pointer, non-interface field appearing in ForceSendFields will be 1111 // sent to the server regardless of whether the field is empty or not. 1112 // This may be used to include empty fields in Patch requests. 1113 ForceSendFields []string `json:"-"` 1114 1115 // NullFields is a list of field names (e.g. "CloudBuildOptions") to 1116 // include in API requests with the JSON null value. By default, fields 1117 // with empty values are omitted from API requests. However, any field 1118 // with an empty value appearing in NullFields will be sent to the 1119 // server as null. It is an error if a field in this list has a 1120 // non-empty value. This may be used to include null fields in Patch 1121 // requests. 1122 NullFields []string `json:"-"` 1123} 1124 1125func (s *Deployment) MarshalJSON() ([]byte, error) { 1126 type NoMethod Deployment 1127 raw := NoMethod(*s) 1128 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1129} 1130 1131// DiskUtilization: Target scaling by disk usage. Only applicable in the 1132// App Engine flexible environment. 1133type DiskUtilization struct { 1134 // TargetReadBytesPerSecond: Target bytes read per second. 1135 TargetReadBytesPerSecond int64 `json:"targetReadBytesPerSecond,omitempty"` 1136 1137 // TargetReadOpsPerSecond: Target ops read per seconds. 1138 TargetReadOpsPerSecond int64 `json:"targetReadOpsPerSecond,omitempty"` 1139 1140 // TargetWriteBytesPerSecond: Target bytes written per second. 1141 TargetWriteBytesPerSecond int64 `json:"targetWriteBytesPerSecond,omitempty"` 1142 1143 // TargetWriteOpsPerSecond: Target ops written per second. 1144 TargetWriteOpsPerSecond int64 `json:"targetWriteOpsPerSecond,omitempty"` 1145 1146 // ForceSendFields is a list of field names (e.g. 1147 // "TargetReadBytesPerSecond") to unconditionally include in API 1148 // requests. By default, fields with empty or default values are omitted 1149 // from API requests. However, any non-pointer, non-interface field 1150 // appearing in ForceSendFields will be sent to the server regardless of 1151 // whether the field is empty or not. This may be used to include empty 1152 // fields in Patch requests. 1153 ForceSendFields []string `json:"-"` 1154 1155 // NullFields is a list of field names (e.g. "TargetReadBytesPerSecond") 1156 // to include in API requests with the JSON null value. By default, 1157 // fields with empty values are omitted from API requests. However, any 1158 // field with an empty value appearing in NullFields will be sent to the 1159 // server as null. It is an error if a field in this list has a 1160 // non-empty value. This may be used to include null fields in Patch 1161 // requests. 1162 NullFields []string `json:"-"` 1163} 1164 1165func (s *DiskUtilization) MarshalJSON() ([]byte, error) { 1166 type NoMethod DiskUtilization 1167 raw := NoMethod(*s) 1168 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1169} 1170 1171// DomainMapping: A domain serving an App Engine application. 1172type DomainMapping struct { 1173 // Id: Relative name of the domain serving the application. Example: 1174 // example.com. 1175 Id string `json:"id,omitempty"` 1176 1177 // Name: Full path to the DomainMapping resource in the API. Example: 1178 // apps/myapp/domainMapping/example.com.@OutputOnly 1179 Name string `json:"name,omitempty"` 1180 1181 // ResourceRecords: The resource records required to configure this 1182 // domain mapping. These records must be added to the domain's DNS 1183 // configuration in order to serve the application via this domain 1184 // mapping.@OutputOnly 1185 ResourceRecords []*ResourceRecord `json:"resourceRecords,omitempty"` 1186 1187 // SslSettings: SSL configuration for this domain. If unconfigured, this 1188 // domain will not serve with SSL. 1189 SslSettings *SslSettings `json:"sslSettings,omitempty"` 1190 1191 // ServerResponse contains the HTTP response code and headers from the 1192 // server. 1193 googleapi.ServerResponse `json:"-"` 1194 1195 // ForceSendFields is a list of field names (e.g. "Id") to 1196 // unconditionally include in API requests. By default, fields with 1197 // empty or default values are omitted from API requests. However, any 1198 // non-pointer, non-interface field appearing in ForceSendFields will be 1199 // sent to the server regardless of whether the field is empty or not. 1200 // This may be used to include empty fields in Patch requests. 1201 ForceSendFields []string `json:"-"` 1202 1203 // NullFields is a list of field names (e.g. "Id") to include in API 1204 // requests with the JSON null value. By default, fields with empty 1205 // values are omitted from API requests. However, any field with an 1206 // empty value appearing in NullFields will be sent to the server as 1207 // null. It is an error if a field in this list has a non-empty value. 1208 // This may be used to include null fields in Patch requests. 1209 NullFields []string `json:"-"` 1210} 1211 1212func (s *DomainMapping) MarshalJSON() ([]byte, error) { 1213 type NoMethod DomainMapping 1214 raw := NoMethod(*s) 1215 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1216} 1217 1218// Empty: A generic empty message that you can re-use to avoid defining 1219// duplicated empty messages in your APIs. A typical example is to use 1220// it as the request or the response type of an API method. For 1221// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 1222// (google.protobuf.Empty); } The JSON representation for Empty is empty 1223// JSON object {}. 1224type Empty struct { 1225 // ServerResponse contains the HTTP response code and headers from the 1226 // server. 1227 googleapi.ServerResponse `json:"-"` 1228} 1229 1230// EndpointsApiService: Cloud Endpoints 1231// (https://cloud.google.com/endpoints) configuration. The Endpoints API 1232// Service provides tooling for serving Open API and gRPC endpoints via 1233// an NGINX proxy. Only valid for App Engine Flexible environment 1234// deployments.The fields here refer to the name and configuration ID of 1235// a "service" resource in the Service Management API 1236// (https://cloud.google.com/service-management/overview). 1237type EndpointsApiService struct { 1238 // ConfigId: Endpoints service configuration ID as specified by the 1239 // Service Management API. For example "2016-09-19r1".By default, the 1240 // rollout strategy for Endpoints is RolloutStrategy.FIXED. This means 1241 // that Endpoints starts up with a particular configuration ID. When a 1242 // new configuration is rolled out, Endpoints must be given the new 1243 // configuration ID. The config_id field is used to give the 1244 // configuration ID and is required in this case.Endpoints also has a 1245 // rollout strategy called RolloutStrategy.MANAGED. When using this, 1246 // Endpoints fetches the latest configuration and does not need the 1247 // configuration ID. In this case, config_id must be omitted. 1248 ConfigId string `json:"configId,omitempty"` 1249 1250 // DisableTraceSampling: Enable or disable trace sampling. By default, 1251 // this is set to false for enabled. 1252 DisableTraceSampling bool `json:"disableTraceSampling,omitempty"` 1253 1254 // Name: Endpoints service name which is the name of the "service" 1255 // resource in the Service Management API. For example 1256 // "myapi.endpoints.myproject.cloud.goog" 1257 Name string `json:"name,omitempty"` 1258 1259 // RolloutStrategy: Endpoints rollout strategy. If FIXED, config_id must 1260 // be specified. If MANAGED, config_id must be omitted. 1261 // 1262 // Possible values: 1263 // "UNSPECIFIED_ROLLOUT_STRATEGY" - Not specified. Defaults to FIXED. 1264 // "FIXED" - Endpoints service configuration ID will be fixed to the 1265 // configuration ID specified by config_id. 1266 // "MANAGED" - Endpoints service configuration ID will be updated with 1267 // each rollout. 1268 RolloutStrategy string `json:"rolloutStrategy,omitempty"` 1269 1270 // ForceSendFields is a list of field names (e.g. "ConfigId") to 1271 // unconditionally include in API requests. By default, fields with 1272 // empty or default values are omitted from API requests. However, any 1273 // non-pointer, non-interface field appearing in ForceSendFields will be 1274 // sent to the server regardless of whether the field is empty or not. 1275 // This may be used to include empty fields in Patch requests. 1276 ForceSendFields []string `json:"-"` 1277 1278 // NullFields is a list of field names (e.g. "ConfigId") to include in 1279 // API requests with the JSON null value. By default, fields with empty 1280 // values are omitted from API requests. However, any field with an 1281 // empty value appearing in NullFields will be sent to the server as 1282 // null. It is an error if a field in this list has a non-empty value. 1283 // This may be used to include null fields in Patch requests. 1284 NullFields []string `json:"-"` 1285} 1286 1287func (s *EndpointsApiService) MarshalJSON() ([]byte, error) { 1288 type NoMethod EndpointsApiService 1289 raw := NoMethod(*s) 1290 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1291} 1292 1293// Entrypoint: The entrypoint for the application. 1294type Entrypoint struct { 1295 // Shell: The format should be a shell command that can be fed to bash 1296 // -c. 1297 Shell string `json:"shell,omitempty"` 1298 1299 // ForceSendFields is a list of field names (e.g. "Shell") to 1300 // unconditionally include in API requests. By default, fields with 1301 // empty or default values are omitted from API requests. However, any 1302 // non-pointer, non-interface field appearing in ForceSendFields will be 1303 // sent to the server regardless of whether the field is empty or not. 1304 // This may be used to include empty fields in Patch requests. 1305 ForceSendFields []string `json:"-"` 1306 1307 // NullFields is a list of field names (e.g. "Shell") to include in API 1308 // requests with the JSON null value. By default, fields with empty 1309 // values are omitted from API requests. However, any field with an 1310 // empty value appearing in NullFields will be sent to the server as 1311 // null. It is an error if a field in this list has a non-empty value. 1312 // This may be used to include null fields in Patch requests. 1313 NullFields []string `json:"-"` 1314} 1315 1316func (s *Entrypoint) MarshalJSON() ([]byte, error) { 1317 type NoMethod Entrypoint 1318 raw := NoMethod(*s) 1319 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1320} 1321 1322// ErrorHandler: Custom static error page to be served when an error 1323// occurs. 1324type ErrorHandler struct { 1325 // ErrorCode: Error condition this handler applies to. 1326 // 1327 // Possible values: 1328 // "ERROR_CODE_UNSPECIFIED" - Not specified. ERROR_CODE_DEFAULT is 1329 // assumed. 1330 // "ERROR_CODE_DEFAULT" - All other error types. 1331 // "ERROR_CODE_OVER_QUOTA" - Application has exceeded a resource 1332 // quota. 1333 // "ERROR_CODE_DOS_API_DENIAL" - Client blocked by the application's 1334 // Denial of Service protection configuration. 1335 // "ERROR_CODE_TIMEOUT" - Deadline reached before the application 1336 // responds. 1337 ErrorCode string `json:"errorCode,omitempty"` 1338 1339 // MimeType: MIME type of file. Defaults to text/html. 1340 MimeType string `json:"mimeType,omitempty"` 1341 1342 // StaticFile: Static file content to be served for this error. 1343 StaticFile string `json:"staticFile,omitempty"` 1344 1345 // ForceSendFields is a list of field names (e.g. "ErrorCode") to 1346 // unconditionally include in API requests. By default, fields with 1347 // empty or default values are omitted from API requests. However, any 1348 // non-pointer, non-interface field appearing in ForceSendFields will be 1349 // sent to the server regardless of whether the field is empty or not. 1350 // This may be used to include empty fields in Patch requests. 1351 ForceSendFields []string `json:"-"` 1352 1353 // NullFields is a list of field names (e.g. "ErrorCode") to include in 1354 // API requests with the JSON null value. By default, fields with empty 1355 // values are omitted from API requests. However, any field with an 1356 // empty value appearing in NullFields will be sent to the server as 1357 // null. It is an error if a field in this list has a non-empty value. 1358 // This may be used to include null fields in Patch requests. 1359 NullFields []string `json:"-"` 1360} 1361 1362func (s *ErrorHandler) MarshalJSON() ([]byte, error) { 1363 type NoMethod ErrorHandler 1364 raw := NoMethod(*s) 1365 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1366} 1367 1368// FeatureSettings: The feature specific settings to be used in the 1369// application. These define behaviors that are user configurable. 1370type FeatureSettings struct { 1371 // SplitHealthChecks: Boolean value indicating if split health checks 1372 // should be used instead of the legacy health checks. At an app.yaml 1373 // level, this means defaulting to 'readiness_check' and 1374 // 'liveness_check' values instead of 'health_check' ones. Once the 1375 // legacy 'health_check' behavior is deprecated, and this value is 1376 // always true, this setting can be removed. 1377 SplitHealthChecks bool `json:"splitHealthChecks,omitempty"` 1378 1379 // UseContainerOptimizedOs: If true, use Container-Optimized OS 1380 // (https://cloud.google.com/container-optimized-os/) base image for 1381 // VMs, rather than a base Debian image. 1382 UseContainerOptimizedOs bool `json:"useContainerOptimizedOs,omitempty"` 1383 1384 // ForceSendFields is a list of field names (e.g. "SplitHealthChecks") 1385 // to unconditionally include in API requests. By default, fields with 1386 // empty or default values are omitted from API requests. However, any 1387 // non-pointer, non-interface field appearing in ForceSendFields will be 1388 // sent to the server regardless of whether the field is empty or not. 1389 // This may be used to include empty fields in Patch requests. 1390 ForceSendFields []string `json:"-"` 1391 1392 // NullFields is a list of field names (e.g. "SplitHealthChecks") to 1393 // include in API requests with the JSON null value. By default, fields 1394 // with empty values are omitted from API requests. However, any field 1395 // with an empty value appearing in NullFields will be sent to the 1396 // server as null. It is an error if a field in this list has a 1397 // non-empty value. This may be used to include null fields in Patch 1398 // requests. 1399 NullFields []string `json:"-"` 1400} 1401 1402func (s *FeatureSettings) MarshalJSON() ([]byte, error) { 1403 type NoMethod FeatureSettings 1404 raw := NoMethod(*s) 1405 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1406} 1407 1408// FileInfo: Single source file that is part of the version to be 1409// deployed. Each source file that is deployed must be specified 1410// separately. 1411type FileInfo struct { 1412 // MimeType: The MIME type of the file.Defaults to the value from Google 1413 // Cloud Storage. 1414 MimeType string `json:"mimeType,omitempty"` 1415 1416 // Sha1Sum: The SHA1 hash of the file, in hex. 1417 Sha1Sum string `json:"sha1Sum,omitempty"` 1418 1419 // SourceUrl: URL source to use to fetch this file. Must be a URL to a 1420 // resource in Google Cloud Storage in the form 1421 // 'http(s)://storage.googleapis.com//'. 1422 SourceUrl string `json:"sourceUrl,omitempty"` 1423 1424 // ForceSendFields is a list of field names (e.g. "MimeType") to 1425 // unconditionally include in API requests. By default, fields with 1426 // empty or default values are omitted from API requests. However, any 1427 // non-pointer, non-interface field appearing in ForceSendFields will be 1428 // sent to the server regardless of whether the field is empty or not. 1429 // This may be used to include empty fields in Patch requests. 1430 ForceSendFields []string `json:"-"` 1431 1432 // NullFields is a list of field names (e.g. "MimeType") to include in 1433 // API requests with the JSON null value. By default, fields with empty 1434 // values are omitted from API requests. However, any field with an 1435 // empty value appearing in NullFields will be sent to the server as 1436 // null. It is an error if a field in this list has a non-empty value. 1437 // This may be used to include null fields in Patch requests. 1438 NullFields []string `json:"-"` 1439} 1440 1441func (s *FileInfo) MarshalJSON() ([]byte, error) { 1442 type NoMethod FileInfo 1443 raw := NoMethod(*s) 1444 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1445} 1446 1447// FirewallRule: A single firewall rule that is evaluated against 1448// incoming traffic and provides an action to take on matched requests. 1449type FirewallRule struct { 1450 // Action: The action to take on matched requests. 1451 // 1452 // Possible values: 1453 // "UNSPECIFIED_ACTION" 1454 // "ALLOW" - Matching requests are allowed. 1455 // "DENY" - Matching requests are denied. 1456 Action string `json:"action,omitempty"` 1457 1458 // Description: An optional string description of this rule. This field 1459 // has a maximum length of 400 characters. 1460 Description string `json:"description,omitempty"` 1461 1462 // Priority: A positive integer between 1, Int32.MaxValue-1 that defines 1463 // the order of rule evaluation. Rules with the lowest priority are 1464 // evaluated first.A default rule at priority Int32.MaxValue matches all 1465 // IPv4 and IPv6 traffic when no previous rule matches. Only the action 1466 // of this rule can be modified by the user. 1467 Priority int64 `json:"priority,omitempty"` 1468 1469 // SourceRange: IP address or range, defined using CIDR notation, of 1470 // requests that this rule applies to. You can use the wildcard 1471 // character "*" to match all IPs equivalent to "0/0" and "::/0" 1472 // together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 or 1473 // 2001:0db8:0000:0042:0000:8a2e:0370:7334. Truncation will be silently 1474 // performed on addresses which are not properly truncated. For example, 1475 // 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. Similarly, 1476 // for IPv6, 2001:db8::1/32 is accepted as the same address as 1477 // 2001:db8::/32. 1478 SourceRange string `json:"sourceRange,omitempty"` 1479 1480 // ServerResponse contains the HTTP response code and headers from the 1481 // server. 1482 googleapi.ServerResponse `json:"-"` 1483 1484 // ForceSendFields is a list of field names (e.g. "Action") to 1485 // unconditionally include in API requests. By default, fields with 1486 // empty or default values are omitted from API requests. However, any 1487 // non-pointer, non-interface field appearing in ForceSendFields will be 1488 // sent to the server regardless of whether the field is empty or not. 1489 // This may be used to include empty fields in Patch requests. 1490 ForceSendFields []string `json:"-"` 1491 1492 // NullFields is a list of field names (e.g. "Action") to include in API 1493 // requests with the JSON null value. By default, fields with empty 1494 // values are omitted from API requests. However, any field with an 1495 // empty value appearing in NullFields will be sent to the server as 1496 // null. It is an error if a field in this list has a non-empty value. 1497 // This may be used to include null fields in Patch requests. 1498 NullFields []string `json:"-"` 1499} 1500 1501func (s *FirewallRule) MarshalJSON() ([]byte, error) { 1502 type NoMethod FirewallRule 1503 raw := NoMethod(*s) 1504 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1505} 1506 1507// GoogleAppengineV1betaLocationMetadata: Metadata for the given 1508// google.cloud.location.Location. 1509type GoogleAppengineV1betaLocationMetadata struct { 1510 // FlexibleEnvironmentAvailable: App Engine flexible environment is 1511 // available in the given location.@OutputOnly 1512 FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"` 1513 1514 // SearchApiAvailable: Output only. Search API 1515 // (https://cloud.google.com/appengine/docs/standard/python/search) is 1516 // available in the given location. 1517 SearchApiAvailable bool `json:"searchApiAvailable,omitempty"` 1518 1519 // StandardEnvironmentAvailable: App Engine standard environment is 1520 // available in the given location.@OutputOnly 1521 StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"` 1522 1523 // ForceSendFields is a list of field names (e.g. 1524 // "FlexibleEnvironmentAvailable") to unconditionally include in API 1525 // requests. By default, fields with empty or default values are omitted 1526 // from API requests. However, any non-pointer, non-interface field 1527 // appearing in ForceSendFields will be sent to the server regardless of 1528 // whether the field is empty or not. This may be used to include empty 1529 // fields in Patch requests. 1530 ForceSendFields []string `json:"-"` 1531 1532 // NullFields is a list of field names (e.g. 1533 // "FlexibleEnvironmentAvailable") to include in API requests with the 1534 // JSON null value. By default, fields with empty values are omitted 1535 // from API requests. However, any field with an empty value appearing 1536 // in NullFields will be sent to the server as null. It is an error if a 1537 // field in this list has a non-empty value. This may be used to include 1538 // null fields in Patch requests. 1539 NullFields []string `json:"-"` 1540} 1541 1542func (s *GoogleAppengineV1betaLocationMetadata) MarshalJSON() ([]byte, error) { 1543 type NoMethod GoogleAppengineV1betaLocationMetadata 1544 raw := NoMethod(*s) 1545 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1546} 1547 1548// GoogleAppengineV2OperationMetadata: Represents the metadata of the 1549// long-running operation. 1550type GoogleAppengineV2OperationMetadata struct { 1551 // ApiVersion: Output only. API version used to start the operation. 1552 ApiVersion string `json:"apiVersion,omitempty"` 1553 1554 // CreateTime: Output only. The time the operation was created. 1555 CreateTime string `json:"createTime,omitempty"` 1556 1557 // EndTime: Output only. The time the operation finished running. 1558 EndTime string `json:"endTime,omitempty"` 1559 1560 // EphemeralMessage: Output only. Ephemeral message that may change 1561 // every time the operation is polled. 1562 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 1563 1564 // RequestedCancellation: Output only. Identifies whether the user has 1565 // requested cancellation of the operation. Operations that have been 1566 // cancelled successfully have Operation.error value with a 1567 // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. 1568 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 1569 1570 // StatusMessage: Output only. Human-readable status of the operation, 1571 // if any. 1572 StatusMessage string `json:"statusMessage,omitempty"` 1573 1574 // Target: Output only. Server-defined resource path for the target of 1575 // the operation. 1576 Target string `json:"target,omitempty"` 1577 1578 // Verb: Output only. Name of the verb executed by the operation. 1579 Verb string `json:"verb,omitempty"` 1580 1581 // Warning: Output only. Durable messages that persist on every 1582 // operation poll. 1583 Warning []string `json:"warning,omitempty"` 1584 1585 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1586 // unconditionally include in API requests. By default, fields with 1587 // empty or default values are omitted from API requests. However, any 1588 // non-pointer, non-interface field appearing in ForceSendFields will be 1589 // sent to the server regardless of whether the field is empty or not. 1590 // This may be used to include empty fields in Patch requests. 1591 ForceSendFields []string `json:"-"` 1592 1593 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1594 // API requests with the JSON null value. By default, fields with empty 1595 // values are omitted from API requests. However, any field with an 1596 // empty value appearing in NullFields will be sent to the server as 1597 // null. It is an error if a field in this list has a non-empty value. 1598 // This may be used to include null fields in Patch requests. 1599 NullFields []string `json:"-"` 1600} 1601 1602func (s *GoogleAppengineV2OperationMetadata) MarshalJSON() ([]byte, error) { 1603 type NoMethod GoogleAppengineV2OperationMetadata 1604 raw := NoMethod(*s) 1605 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1606} 1607 1608// GoogleAppengineV2mainOperationMetadata: Represents the metadata of 1609// the long-running operation. 1610type GoogleAppengineV2mainOperationMetadata struct { 1611 // ApiVersion: Output only. API version used to start the operation. 1612 ApiVersion string `json:"apiVersion,omitempty"` 1613 1614 // CreateTime: Output only. The time the operation was created. 1615 CreateTime string `json:"createTime,omitempty"` 1616 1617 // EndTime: Output only. The time the operation finished running. 1618 EndTime string `json:"endTime,omitempty"` 1619 1620 // EphemeralMessage: Output only. Ephemeral message that may change 1621 // every time the operation is polled. 1622 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 1623 1624 // RequestedCancellation: Output only. Identifies whether the user has 1625 // requested cancellation of the operation. Operations that have been 1626 // cancelled successfully have Operation.error value with a 1627 // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. 1628 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 1629 1630 // StatusMessage: Output only. Human-readable status of the operation, 1631 // if any. 1632 StatusMessage string `json:"statusMessage,omitempty"` 1633 1634 // Target: Output only. Server-defined resource path for the target of 1635 // the operation. 1636 Target string `json:"target,omitempty"` 1637 1638 // Verb: Output only. Name of the verb executed by the operation. 1639 Verb string `json:"verb,omitempty"` 1640 1641 // Warning: Output only. Durable messages that persist on every 1642 // operation poll. 1643 Warning []string `json:"warning,omitempty"` 1644 1645 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1646 // unconditionally include in API requests. By default, fields with 1647 // empty or default values are omitted from API requests. However, any 1648 // non-pointer, non-interface field appearing in ForceSendFields will be 1649 // sent to the server regardless of whether the field is empty or not. 1650 // This may be used to include empty fields in Patch requests. 1651 ForceSendFields []string `json:"-"` 1652 1653 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1654 // API requests with the JSON null value. By default, fields with empty 1655 // values are omitted from API requests. However, any field with an 1656 // empty value appearing in NullFields will be sent to the server as 1657 // null. It is an error if a field in this list has a non-empty value. 1658 // This may be used to include null fields in Patch requests. 1659 NullFields []string `json:"-"` 1660} 1661 1662func (s *GoogleAppengineV2mainOperationMetadata) MarshalJSON() ([]byte, error) { 1663 type NoMethod GoogleAppengineV2mainOperationMetadata 1664 raw := NoMethod(*s) 1665 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1666} 1667 1668// HealthCheck: Health checking configuration for VM instances. 1669// Unhealthy instances are killed and replaced with new instances. Only 1670// applicable for instances in App Engine flexible environment. 1671type HealthCheck struct { 1672 // CheckInterval: Interval between health checks. 1673 CheckInterval string `json:"checkInterval,omitempty"` 1674 1675 // DisableHealthCheck: Whether to explicitly disable health checks for 1676 // this instance. 1677 DisableHealthCheck bool `json:"disableHealthCheck,omitempty"` 1678 1679 // HealthyThreshold: Number of consecutive successful health checks 1680 // required before receiving traffic. 1681 HealthyThreshold int64 `json:"healthyThreshold,omitempty"` 1682 1683 // Host: Host header to send when performing an HTTP health check. 1684 // Example: "myapp.appspot.com" 1685 Host string `json:"host,omitempty"` 1686 1687 // RestartThreshold: Number of consecutive failed health checks required 1688 // before an instance is restarted. 1689 RestartThreshold int64 `json:"restartThreshold,omitempty"` 1690 1691 // Timeout: Time before the health check is considered failed. 1692 Timeout string `json:"timeout,omitempty"` 1693 1694 // UnhealthyThreshold: Number of consecutive failed health checks 1695 // required before removing traffic. 1696 UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` 1697 1698 // ForceSendFields is a list of field names (e.g. "CheckInterval") to 1699 // unconditionally include in API requests. By default, fields with 1700 // empty or default values are omitted from API requests. However, any 1701 // non-pointer, non-interface field appearing in ForceSendFields will be 1702 // sent to the server regardless of whether the field is empty or not. 1703 // This may be used to include empty fields in Patch requests. 1704 ForceSendFields []string `json:"-"` 1705 1706 // NullFields is a list of field names (e.g. "CheckInterval") to include 1707 // in API requests with the JSON null value. By default, fields with 1708 // empty values are omitted from API requests. However, any field with 1709 // an empty value appearing in NullFields will be sent to the server as 1710 // null. It is an error if a field in this list has a non-empty value. 1711 // This may be used to include null fields in Patch requests. 1712 NullFields []string `json:"-"` 1713} 1714 1715func (s *HealthCheck) MarshalJSON() ([]byte, error) { 1716 type NoMethod HealthCheck 1717 raw := NoMethod(*s) 1718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1719} 1720 1721// IdentityAwareProxy: Identity-Aware Proxy 1722type IdentityAwareProxy struct { 1723 // Enabled: Whether the serving infrastructure will authenticate and 1724 // authorize all incoming requests.If true, the oauth2_client_id and 1725 // oauth2_client_secret fields must be non-empty. 1726 Enabled bool `json:"enabled,omitempty"` 1727 1728 // Oauth2ClientId: OAuth2 client ID to use for the authentication flow. 1729 Oauth2ClientId string `json:"oauth2ClientId,omitempty"` 1730 1731 // Oauth2ClientSecret: OAuth2 client secret to use for the 1732 // authentication flow.For security reasons, this value cannot be 1733 // retrieved via the API. Instead, the SHA-256 hash of the value is 1734 // returned in the oauth2_client_secret_sha256 field.@InputOnly 1735 Oauth2ClientSecret string `json:"oauth2ClientSecret,omitempty"` 1736 1737 // Oauth2ClientSecretSha256: Hex-encoded SHA-256 hash of the client 1738 // secret.@OutputOnly 1739 Oauth2ClientSecretSha256 string `json:"oauth2ClientSecretSha256,omitempty"` 1740 1741 // ForceSendFields is a list of field names (e.g. "Enabled") to 1742 // unconditionally include in API requests. By default, fields with 1743 // empty or default values are omitted from API requests. However, any 1744 // non-pointer, non-interface field appearing in ForceSendFields will be 1745 // sent to the server regardless of whether the field is empty or not. 1746 // This may be used to include empty fields in Patch requests. 1747 ForceSendFields []string `json:"-"` 1748 1749 // NullFields is a list of field names (e.g. "Enabled") to include in 1750 // API requests with the JSON null value. By default, fields with empty 1751 // values are omitted from API requests. However, any field with an 1752 // empty value appearing in NullFields will be sent to the server as 1753 // null. It is an error if a field in this list has a non-empty value. 1754 // This may be used to include null fields in Patch requests. 1755 NullFields []string `json:"-"` 1756} 1757 1758func (s *IdentityAwareProxy) MarshalJSON() ([]byte, error) { 1759 type NoMethod IdentityAwareProxy 1760 raw := NoMethod(*s) 1761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1762} 1763 1764// Instance: An Instance resource is the computing unit that App Engine 1765// uses to automatically scale an application. 1766type Instance struct { 1767 // AppEngineRelease: Output only. App Engine release this instance is 1768 // running on. 1769 AppEngineRelease string `json:"appEngineRelease,omitempty"` 1770 1771 // Availability: Output only. Availability of the instance. 1772 // 1773 // Possible values: 1774 // "UNSPECIFIED" 1775 // "RESIDENT" 1776 // "DYNAMIC" 1777 Availability string `json:"availability,omitempty"` 1778 1779 // AverageLatency: Output only. Average latency (ms) over the last 1780 // minute. 1781 AverageLatency int64 `json:"averageLatency,omitempty"` 1782 1783 // Errors: Output only. Number of errors since this instance was 1784 // started. 1785 Errors int64 `json:"errors,omitempty"` 1786 1787 // Id: Output only. Relative name of the instance within the version. 1788 // Example: instance-1. 1789 Id string `json:"id,omitempty"` 1790 1791 // MemoryUsage: Output only. Total memory in use (bytes). 1792 MemoryUsage int64 `json:"memoryUsage,omitempty,string"` 1793 1794 // Name: Output only. Full path to the Instance resource in the API. 1795 // Example: 1796 // apps/myapp/services/default/versions/v1/instances/instance-1. 1797 Name string `json:"name,omitempty"` 1798 1799 // Qps: Output only. Average queries per second (QPS) over the last 1800 // minute. 1801 Qps float64 `json:"qps,omitempty"` 1802 1803 // Requests: Output only. Number of requests since this instance was 1804 // started. 1805 Requests int64 `json:"requests,omitempty"` 1806 1807 // StartTime: Output only. Time that this instance was 1808 // started.@OutputOnly 1809 StartTime string `json:"startTime,omitempty"` 1810 1811 // VmDebugEnabled: Output only. Whether this instance is in debug mode. 1812 // Only applicable for instances in App Engine flexible environment. 1813 VmDebugEnabled bool `json:"vmDebugEnabled,omitempty"` 1814 1815 // VmId: Output only. Virtual machine ID of this instance. Only 1816 // applicable for instances in App Engine flexible environment. 1817 VmId string `json:"vmId,omitempty"` 1818 1819 // VmIp: Output only. The IP address of this instance. Only applicable 1820 // for instances in App Engine flexible environment. 1821 VmIp string `json:"vmIp,omitempty"` 1822 1823 // VmLiveness: Output only. The liveness health check of this instance. 1824 // Only applicable for instances in App Engine flexible environment. 1825 // 1826 // Possible values: 1827 // "LIVENESS_STATE_UNSPECIFIED" - There is no liveness health check 1828 // for the instance. Only applicable for instances in App Engine 1829 // standard environment. 1830 // "UNKNOWN" - The health checking system is aware of the instance but 1831 // its health is not known at the moment. 1832 // "HEALTHY" - The instance is reachable i.e. a connection to the 1833 // application health checking endpoint can be established, and conforms 1834 // to the requirements defined by the health check. 1835 // "UNHEALTHY" - The instance is reachable, but does not conform to 1836 // the requirements defined by the health check. 1837 // "DRAINING" - The instance is being drained. The existing 1838 // connections to the instance have time to complete, but the new ones 1839 // are being refused. 1840 // "TIMEOUT" - The instance is unreachable i.e. a connection to the 1841 // application health checking endpoint cannot be established, or the 1842 // server does not respond within the specified timeout. 1843 VmLiveness string `json:"vmLiveness,omitempty"` 1844 1845 // VmName: Output only. Name of the virtual machine where this instance 1846 // lives. Only applicable for instances in App Engine flexible 1847 // environment. 1848 VmName string `json:"vmName,omitempty"` 1849 1850 // VmStatus: Output only. Status of the virtual machine where this 1851 // instance lives. Only applicable for instances in App Engine flexible 1852 // environment. 1853 VmStatus string `json:"vmStatus,omitempty"` 1854 1855 // VmZoneName: Output only. Zone where the virtual machine is located. 1856 // Only applicable for instances in App Engine flexible environment. 1857 VmZoneName string `json:"vmZoneName,omitempty"` 1858 1859 // ServerResponse contains the HTTP response code and headers from the 1860 // server. 1861 googleapi.ServerResponse `json:"-"` 1862 1863 // ForceSendFields is a list of field names (e.g. "AppEngineRelease") to 1864 // unconditionally include in API requests. By default, fields with 1865 // empty or default values are omitted from API requests. However, any 1866 // non-pointer, non-interface field appearing in ForceSendFields will be 1867 // sent to the server regardless of whether the field is empty or not. 1868 // This may be used to include empty fields in Patch requests. 1869 ForceSendFields []string `json:"-"` 1870 1871 // NullFields is a list of field names (e.g. "AppEngineRelease") to 1872 // include in API requests with the JSON null value. By default, fields 1873 // with empty values are omitted from API requests. However, any field 1874 // with an empty value appearing in NullFields will be sent to the 1875 // server as null. It is an error if a field in this list has a 1876 // non-empty value. This may be used to include null fields in Patch 1877 // requests. 1878 NullFields []string `json:"-"` 1879} 1880 1881func (s *Instance) MarshalJSON() ([]byte, error) { 1882 type NoMethod Instance 1883 raw := NoMethod(*s) 1884 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1885} 1886 1887func (s *Instance) UnmarshalJSON(data []byte) error { 1888 type NoMethod Instance 1889 var s1 struct { 1890 Qps gensupport.JSONFloat64 `json:"qps"` 1891 *NoMethod 1892 } 1893 s1.NoMethod = (*NoMethod)(s) 1894 if err := json.Unmarshal(data, &s1); err != nil { 1895 return err 1896 } 1897 s.Qps = float64(s1.Qps) 1898 return nil 1899} 1900 1901// Library: Third-party Python runtime library that is required by the 1902// application. 1903type Library struct { 1904 // Name: Name of the library. Example: "django". 1905 Name string `json:"name,omitempty"` 1906 1907 // Version: Version of the library to select, or "latest". 1908 Version string `json:"version,omitempty"` 1909 1910 // ForceSendFields is a list of field names (e.g. "Name") to 1911 // unconditionally include in API requests. By default, fields with 1912 // empty or default values are omitted from API requests. However, any 1913 // non-pointer, non-interface field appearing in ForceSendFields will be 1914 // sent to the server regardless of whether the field is empty or not. 1915 // This may be used to include empty fields in Patch requests. 1916 ForceSendFields []string `json:"-"` 1917 1918 // NullFields is a list of field names (e.g. "Name") to include in API 1919 // requests with the JSON null value. By default, fields with empty 1920 // values are omitted from API requests. However, any field with an 1921 // empty value appearing in NullFields will be sent to the server as 1922 // null. It is an error if a field in this list has a non-empty value. 1923 // This may be used to include null fields in Patch requests. 1924 NullFields []string `json:"-"` 1925} 1926 1927func (s *Library) MarshalJSON() ([]byte, error) { 1928 type NoMethod Library 1929 raw := NoMethod(*s) 1930 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1931} 1932 1933// ListAuthorizedCertificatesResponse: Response message for 1934// AuthorizedCertificates.ListAuthorizedCertificates. 1935type ListAuthorizedCertificatesResponse struct { 1936 // Certificates: The SSL certificates the user is authorized to 1937 // administer. 1938 Certificates []*AuthorizedCertificate `json:"certificates,omitempty"` 1939 1940 // NextPageToken: Continuation token for fetching the next page of 1941 // results. 1942 NextPageToken string `json:"nextPageToken,omitempty"` 1943 1944 // ServerResponse contains the HTTP response code and headers from the 1945 // server. 1946 googleapi.ServerResponse `json:"-"` 1947 1948 // ForceSendFields is a list of field names (e.g. "Certificates") to 1949 // unconditionally include in API requests. By default, fields with 1950 // empty or default values are omitted from API requests. However, any 1951 // non-pointer, non-interface field appearing in ForceSendFields will be 1952 // sent to the server regardless of whether the field is empty or not. 1953 // This may be used to include empty fields in Patch requests. 1954 ForceSendFields []string `json:"-"` 1955 1956 // NullFields is a list of field names (e.g. "Certificates") to include 1957 // in API requests with the JSON null value. By default, fields with 1958 // empty values are omitted from API requests. However, any field with 1959 // an empty value appearing in NullFields will be sent to the server as 1960 // null. It is an error if a field in this list has a non-empty value. 1961 // This may be used to include null fields in Patch requests. 1962 NullFields []string `json:"-"` 1963} 1964 1965func (s *ListAuthorizedCertificatesResponse) MarshalJSON() ([]byte, error) { 1966 type NoMethod ListAuthorizedCertificatesResponse 1967 raw := NoMethod(*s) 1968 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1969} 1970 1971// ListAuthorizedDomainsResponse: Response message for 1972// AuthorizedDomains.ListAuthorizedDomains. 1973type ListAuthorizedDomainsResponse struct { 1974 // Domains: The authorized domains belonging to the user. 1975 Domains []*AuthorizedDomain `json:"domains,omitempty"` 1976 1977 // NextPageToken: Continuation token for fetching the next page of 1978 // results. 1979 NextPageToken string `json:"nextPageToken,omitempty"` 1980 1981 // ServerResponse contains the HTTP response code and headers from the 1982 // server. 1983 googleapi.ServerResponse `json:"-"` 1984 1985 // ForceSendFields is a list of field names (e.g. "Domains") to 1986 // unconditionally include in API requests. By default, fields with 1987 // empty or default values are omitted from API requests. However, any 1988 // non-pointer, non-interface field appearing in ForceSendFields will be 1989 // sent to the server regardless of whether the field is empty or not. 1990 // This may be used to include empty fields in Patch requests. 1991 ForceSendFields []string `json:"-"` 1992 1993 // NullFields is a list of field names (e.g. "Domains") to include in 1994 // API requests with the JSON null value. By default, fields with empty 1995 // values are omitted from API requests. However, any field with an 1996 // empty value appearing in NullFields will be sent to the server as 1997 // null. It is an error if a field in this list has a non-empty value. 1998 // This may be used to include null fields in Patch requests. 1999 NullFields []string `json:"-"` 2000} 2001 2002func (s *ListAuthorizedDomainsResponse) MarshalJSON() ([]byte, error) { 2003 type NoMethod ListAuthorizedDomainsResponse 2004 raw := NoMethod(*s) 2005 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2006} 2007 2008// ListDomainMappingsResponse: Response message for 2009// DomainMappings.ListDomainMappings. 2010type ListDomainMappingsResponse struct { 2011 // DomainMappings: The domain mappings for the application. 2012 DomainMappings []*DomainMapping `json:"domainMappings,omitempty"` 2013 2014 // NextPageToken: Continuation token for fetching the next page of 2015 // results. 2016 NextPageToken string `json:"nextPageToken,omitempty"` 2017 2018 // ServerResponse contains the HTTP response code and headers from the 2019 // server. 2020 googleapi.ServerResponse `json:"-"` 2021 2022 // ForceSendFields is a list of field names (e.g. "DomainMappings") to 2023 // unconditionally include in API requests. By default, fields with 2024 // empty or default values are omitted from API requests. However, any 2025 // non-pointer, non-interface field appearing in ForceSendFields will be 2026 // sent to the server regardless of whether the field is empty or not. 2027 // This may be used to include empty fields in Patch requests. 2028 ForceSendFields []string `json:"-"` 2029 2030 // NullFields is a list of field names (e.g. "DomainMappings") to 2031 // include in API requests with the JSON null value. By default, fields 2032 // with empty values are omitted from API requests. However, any field 2033 // with an empty value appearing in NullFields will be sent to the 2034 // server as null. It is an error if a field in this list has a 2035 // non-empty value. This may be used to include null fields in Patch 2036 // requests. 2037 NullFields []string `json:"-"` 2038} 2039 2040func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) { 2041 type NoMethod ListDomainMappingsResponse 2042 raw := NoMethod(*s) 2043 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2044} 2045 2046// ListIngressRulesResponse: Response message for 2047// Firewall.ListIngressRules. 2048type ListIngressRulesResponse struct { 2049 // IngressRules: The ingress FirewallRules for this application. 2050 IngressRules []*FirewallRule `json:"ingressRules,omitempty"` 2051 2052 // NextPageToken: Continuation token for fetching the next page of 2053 // results. 2054 NextPageToken string `json:"nextPageToken,omitempty"` 2055 2056 // ServerResponse contains the HTTP response code and headers from the 2057 // server. 2058 googleapi.ServerResponse `json:"-"` 2059 2060 // ForceSendFields is a list of field names (e.g. "IngressRules") to 2061 // unconditionally include in API requests. By default, fields with 2062 // empty or default values are omitted from API requests. However, any 2063 // non-pointer, non-interface field appearing in ForceSendFields will be 2064 // sent to the server regardless of whether the field is empty or not. 2065 // This may be used to include empty fields in Patch requests. 2066 ForceSendFields []string `json:"-"` 2067 2068 // NullFields is a list of field names (e.g. "IngressRules") to include 2069 // in API requests with the JSON null value. By default, fields with 2070 // empty values are omitted from API requests. However, any field with 2071 // an empty value appearing in NullFields will be sent to the server as 2072 // null. It is an error if a field in this list has a non-empty value. 2073 // This may be used to include null fields in Patch requests. 2074 NullFields []string `json:"-"` 2075} 2076 2077func (s *ListIngressRulesResponse) MarshalJSON() ([]byte, error) { 2078 type NoMethod ListIngressRulesResponse 2079 raw := NoMethod(*s) 2080 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2081} 2082 2083// ListInstancesResponse: Response message for Instances.ListInstances. 2084type ListInstancesResponse struct { 2085 // Instances: The instances belonging to the requested version. 2086 Instances []*Instance `json:"instances,omitempty"` 2087 2088 // NextPageToken: Continuation token for fetching the next page of 2089 // results. 2090 NextPageToken string `json:"nextPageToken,omitempty"` 2091 2092 // ServerResponse contains the HTTP response code and headers from the 2093 // server. 2094 googleapi.ServerResponse `json:"-"` 2095 2096 // ForceSendFields is a list of field names (e.g. "Instances") to 2097 // unconditionally include in API requests. By default, fields with 2098 // empty or default values are omitted from API requests. However, any 2099 // non-pointer, non-interface field appearing in ForceSendFields will be 2100 // sent to the server regardless of whether the field is empty or not. 2101 // This may be used to include empty fields in Patch requests. 2102 ForceSendFields []string `json:"-"` 2103 2104 // NullFields is a list of field names (e.g. "Instances") to include in 2105 // API requests with the JSON null value. By default, fields with empty 2106 // values are omitted from API requests. However, any field with an 2107 // empty value appearing in NullFields will be sent to the server as 2108 // null. It is an error if a field in this list has a non-empty value. 2109 // This may be used to include null fields in Patch requests. 2110 NullFields []string `json:"-"` 2111} 2112 2113func (s *ListInstancesResponse) MarshalJSON() ([]byte, error) { 2114 type NoMethod ListInstancesResponse 2115 raw := NoMethod(*s) 2116 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2117} 2118 2119// ListLocationsResponse: The response message for 2120// Locations.ListLocations. 2121type ListLocationsResponse struct { 2122 // Locations: A list of locations that matches the specified filter in 2123 // the request. 2124 Locations []*Location `json:"locations,omitempty"` 2125 2126 // NextPageToken: The standard List next-page token. 2127 NextPageToken string `json:"nextPageToken,omitempty"` 2128 2129 // ServerResponse contains the HTTP response code and headers from the 2130 // server. 2131 googleapi.ServerResponse `json:"-"` 2132 2133 // ForceSendFields is a list of field names (e.g. "Locations") to 2134 // unconditionally include in API requests. By default, fields with 2135 // empty or default values are omitted from API requests. However, any 2136 // non-pointer, non-interface field appearing in ForceSendFields will be 2137 // sent to the server regardless of whether the field is empty or not. 2138 // This may be used to include empty fields in Patch requests. 2139 ForceSendFields []string `json:"-"` 2140 2141 // NullFields is a list of field names (e.g. "Locations") to include in 2142 // API requests with the JSON null value. By default, fields with empty 2143 // values are omitted from API requests. However, any field with an 2144 // empty value appearing in NullFields will be sent to the server as 2145 // null. It is an error if a field in this list has a non-empty value. 2146 // This may be used to include null fields in Patch requests. 2147 NullFields []string `json:"-"` 2148} 2149 2150func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 2151 type NoMethod ListLocationsResponse 2152 raw := NoMethod(*s) 2153 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2154} 2155 2156// ListOperationsResponse: The response message for 2157// Operations.ListOperations. 2158type ListOperationsResponse struct { 2159 // NextPageToken: The standard List next-page token. 2160 NextPageToken string `json:"nextPageToken,omitempty"` 2161 2162 // Operations: A list of operations that matches the specified filter in 2163 // the request. 2164 Operations []*Operation `json:"operations,omitempty"` 2165 2166 // ServerResponse contains the HTTP response code and headers from the 2167 // server. 2168 googleapi.ServerResponse `json:"-"` 2169 2170 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2171 // unconditionally include in API requests. By default, fields with 2172 // empty or default values are omitted from API requests. However, any 2173 // non-pointer, non-interface field appearing in ForceSendFields will be 2174 // sent to the server regardless of whether the field is empty or not. 2175 // This may be used to include empty fields in Patch requests. 2176 ForceSendFields []string `json:"-"` 2177 2178 // NullFields is a list of field names (e.g. "NextPageToken") to include 2179 // in API requests with the JSON null value. By default, fields with 2180 // empty values are omitted from API requests. However, any field with 2181 // an empty value appearing in NullFields will be sent to the server as 2182 // null. It is an error if a field in this list has a non-empty value. 2183 // This may be used to include null fields in Patch requests. 2184 NullFields []string `json:"-"` 2185} 2186 2187func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 2188 type NoMethod ListOperationsResponse 2189 raw := NoMethod(*s) 2190 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2191} 2192 2193// ListServicesResponse: Response message for Services.ListServices. 2194type ListServicesResponse struct { 2195 // NextPageToken: Continuation token for fetching the next page of 2196 // results. 2197 NextPageToken string `json:"nextPageToken,omitempty"` 2198 2199 // Services: The services belonging to the requested application. 2200 Services []*Service `json:"services,omitempty"` 2201 2202 // ServerResponse contains the HTTP response code and headers from the 2203 // server. 2204 googleapi.ServerResponse `json:"-"` 2205 2206 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2207 // unconditionally include in API requests. By default, fields with 2208 // empty or default values are omitted from API requests. However, any 2209 // non-pointer, non-interface field appearing in ForceSendFields will be 2210 // sent to the server regardless of whether the field is empty or not. 2211 // This may be used to include empty fields in Patch requests. 2212 ForceSendFields []string `json:"-"` 2213 2214 // NullFields is a list of field names (e.g. "NextPageToken") to include 2215 // in API requests with the JSON null value. By default, fields with 2216 // empty values are omitted from API requests. However, any field with 2217 // an empty value appearing in NullFields will be sent to the server as 2218 // null. It is an error if a field in this list has a non-empty value. 2219 // This may be used to include null fields in Patch requests. 2220 NullFields []string `json:"-"` 2221} 2222 2223func (s *ListServicesResponse) MarshalJSON() ([]byte, error) { 2224 type NoMethod ListServicesResponse 2225 raw := NoMethod(*s) 2226 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2227} 2228 2229// ListVersionsResponse: Response message for Versions.ListVersions. 2230type ListVersionsResponse struct { 2231 // NextPageToken: Continuation token for fetching the next page of 2232 // results. 2233 NextPageToken string `json:"nextPageToken,omitempty"` 2234 2235 // Versions: The versions belonging to the requested service. 2236 Versions []*Version `json:"versions,omitempty"` 2237 2238 // ServerResponse contains the HTTP response code and headers from the 2239 // server. 2240 googleapi.ServerResponse `json:"-"` 2241 2242 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2243 // unconditionally include in API requests. By default, fields with 2244 // empty or default values are omitted from API requests. However, any 2245 // non-pointer, non-interface field appearing in ForceSendFields will be 2246 // sent to the server regardless of whether the field is empty or not. 2247 // This may be used to include empty fields in Patch requests. 2248 ForceSendFields []string `json:"-"` 2249 2250 // NullFields is a list of field names (e.g. "NextPageToken") to include 2251 // in API requests with the JSON null value. By default, fields with 2252 // empty values are omitted from API requests. However, any field with 2253 // an empty value appearing in NullFields will be sent to the server as 2254 // null. It is an error if a field in this list has a non-empty value. 2255 // This may be used to include null fields in Patch requests. 2256 NullFields []string `json:"-"` 2257} 2258 2259func (s *ListVersionsResponse) MarshalJSON() ([]byte, error) { 2260 type NoMethod ListVersionsResponse 2261 raw := NoMethod(*s) 2262 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2263} 2264 2265// LivenessCheck: Health checking configuration for VM instances. 2266// Unhealthy instances are killed and replaced with new instances. 2267type LivenessCheck struct { 2268 // CheckInterval: Interval between health checks. 2269 CheckInterval string `json:"checkInterval,omitempty"` 2270 2271 // FailureThreshold: Number of consecutive failed checks required before 2272 // considering the VM unhealthy. 2273 FailureThreshold int64 `json:"failureThreshold,omitempty"` 2274 2275 // Host: Host header to send when performing a HTTP Liveness check. 2276 // Example: "myapp.appspot.com" 2277 Host string `json:"host,omitempty"` 2278 2279 // InitialDelay: The initial delay before starting to execute the 2280 // checks. 2281 InitialDelay string `json:"initialDelay,omitempty"` 2282 2283 // Path: The request path. 2284 Path string `json:"path,omitempty"` 2285 2286 // SuccessThreshold: Number of consecutive successful checks required 2287 // before considering the VM healthy. 2288 SuccessThreshold int64 `json:"successThreshold,omitempty"` 2289 2290 // Timeout: Time before the check is considered failed. 2291 Timeout string `json:"timeout,omitempty"` 2292 2293 // ForceSendFields is a list of field names (e.g. "CheckInterval") to 2294 // unconditionally include in API requests. By default, fields with 2295 // empty or default values are omitted from API requests. However, any 2296 // non-pointer, non-interface field appearing in ForceSendFields will be 2297 // sent to the server regardless of whether the field is empty or not. 2298 // This may be used to include empty fields in Patch requests. 2299 ForceSendFields []string `json:"-"` 2300 2301 // NullFields is a list of field names (e.g. "CheckInterval") to include 2302 // in API requests with the JSON null value. By default, fields with 2303 // empty values are omitted from API requests. However, any field with 2304 // an empty value appearing in NullFields will be sent to the server as 2305 // null. It is an error if a field in this list has a non-empty value. 2306 // This may be used to include null fields in Patch requests. 2307 NullFields []string `json:"-"` 2308} 2309 2310func (s *LivenessCheck) MarshalJSON() ([]byte, error) { 2311 type NoMethod LivenessCheck 2312 raw := NoMethod(*s) 2313 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2314} 2315 2316// Location: A resource that represents Google Cloud Platform location. 2317type Location struct { 2318 // DisplayName: The friendly name for this location, typically a nearby 2319 // city name. For example, "Tokyo". 2320 DisplayName string `json:"displayName,omitempty"` 2321 2322 // Labels: Cross-service attributes for the location. For example 2323 // {"cloud.googleapis.com/region": "us-east1"} 2324 Labels map[string]string `json:"labels,omitempty"` 2325 2326 // LocationId: The canonical id for this location. For example: 2327 // "us-east1". 2328 LocationId string `json:"locationId,omitempty"` 2329 2330 // Metadata: Service-specific metadata. For example the available 2331 // capacity at the given location. 2332 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2333 2334 // Name: Resource name for the location, which may vary between 2335 // implementations. For example: 2336 // "projects/example-project/locations/us-east1" 2337 Name string `json:"name,omitempty"` 2338 2339 // ServerResponse contains the HTTP response code and headers from the 2340 // server. 2341 googleapi.ServerResponse `json:"-"` 2342 2343 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2344 // unconditionally include in API requests. By default, fields with 2345 // empty or default values are omitted from API requests. However, any 2346 // non-pointer, non-interface field appearing in ForceSendFields will be 2347 // sent to the server regardless of whether the field is empty or not. 2348 // This may be used to include empty fields in Patch requests. 2349 ForceSendFields []string `json:"-"` 2350 2351 // NullFields is a list of field names (e.g. "DisplayName") to include 2352 // in API requests with the JSON null value. By default, fields with 2353 // empty values are omitted from API requests. However, any field with 2354 // an empty value appearing in NullFields will be sent to the server as 2355 // null. It is an error if a field in this list has a non-empty value. 2356 // This may be used to include null fields in Patch requests. 2357 NullFields []string `json:"-"` 2358} 2359 2360func (s *Location) MarshalJSON() ([]byte, error) { 2361 type NoMethod Location 2362 raw := NoMethod(*s) 2363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2364} 2365 2366// LocationMetadata: Metadata for the given 2367// google.cloud.location.Location. 2368type LocationMetadata struct { 2369 // FlexibleEnvironmentAvailable: App Engine flexible environment is 2370 // available in the given location.@OutputOnly 2371 FlexibleEnvironmentAvailable bool `json:"flexibleEnvironmentAvailable,omitempty"` 2372 2373 // SearchApiAvailable: Output only. Search API 2374 // (https://cloud.google.com/appengine/docs/standard/python/search) is 2375 // available in the given location. 2376 SearchApiAvailable bool `json:"searchApiAvailable,omitempty"` 2377 2378 // StandardEnvironmentAvailable: App Engine standard environment is 2379 // available in the given location.@OutputOnly 2380 StandardEnvironmentAvailable bool `json:"standardEnvironmentAvailable,omitempty"` 2381 2382 // ForceSendFields is a list of field names (e.g. 2383 // "FlexibleEnvironmentAvailable") to unconditionally include in API 2384 // requests. By default, fields with empty or default values are omitted 2385 // from API requests. However, any non-pointer, non-interface field 2386 // appearing in ForceSendFields will be sent to the server regardless of 2387 // whether the field is empty or not. This may be used to include empty 2388 // fields in Patch requests. 2389 ForceSendFields []string `json:"-"` 2390 2391 // NullFields is a list of field names (e.g. 2392 // "FlexibleEnvironmentAvailable") to include in API requests with the 2393 // JSON null value. By default, fields with empty values are omitted 2394 // from API requests. However, any field with an empty value appearing 2395 // in NullFields will be sent to the server as null. It is an error if a 2396 // field in this list has a non-empty value. This may be used to include 2397 // null fields in Patch requests. 2398 NullFields []string `json:"-"` 2399} 2400 2401func (s *LocationMetadata) MarshalJSON() ([]byte, error) { 2402 type NoMethod LocationMetadata 2403 raw := NoMethod(*s) 2404 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2405} 2406 2407// ManagedCertificate: A certificate managed by App Engine. 2408type ManagedCertificate struct { 2409 // LastRenewalTime: Time at which the certificate was last renewed. The 2410 // renewal process is fully managed. Certificate renewal will 2411 // automatically occur before the certificate expires. Renewal errors 2412 // can be tracked via ManagementStatus.@OutputOnly 2413 LastRenewalTime string `json:"lastRenewalTime,omitempty"` 2414 2415 // Status: Status of certificate management. Refers to the most recent 2416 // certificate acquisition or renewal attempt.@OutputOnly 2417 // 2418 // Possible values: 2419 // "MANAGEMENT_STATUS_UNSPECIFIED" 2420 // "OK" - Certificate was successfully obtained and inserted into the 2421 // serving system. 2422 // "PENDING" - Certificate is under active attempts to acquire or 2423 // renew. 2424 // "FAILED_RETRYING_NOT_VISIBLE" - Most recent renewal failed due to 2425 // an invalid DNS setup and will be retried. Renewal attempts will 2426 // continue to fail until the certificate domain's DNS configuration is 2427 // fixed. The last successfully provisioned certificate may still be 2428 // serving. 2429 // "FAILED_PERMANENT" - All renewal attempts have been exhausted, 2430 // likely due to an invalid DNS setup. 2431 // "FAILED_RETRYING_CAA_FORBIDDEN" - Most recent renewal failed due to 2432 // an explicit CAA record that does not include one of the in-use CAs 2433 // (Google CA and Let's Encrypt). Renewals will continue to fail until 2434 // the CAA is reconfigured. The last successfully provisioned 2435 // certificate may still be serving. 2436 // "FAILED_RETRYING_CAA_CHECKING" - Most recent renewal failed due to 2437 // a CAA retrieval failure. This means that the domain's DNS provider 2438 // does not properly handle CAA records, failing requests for CAA 2439 // records when no CAA records are defined. Renewals will continue to 2440 // fail until the DNS provider is changed or a CAA record is added for 2441 // the given domain. The last successfully provisioned certificate may 2442 // still be serving. 2443 Status string `json:"status,omitempty"` 2444 2445 // ForceSendFields is a list of field names (e.g. "LastRenewalTime") to 2446 // unconditionally include in API requests. By default, fields with 2447 // empty or default values are omitted from API requests. However, any 2448 // non-pointer, non-interface field appearing in ForceSendFields will be 2449 // sent to the server regardless of whether the field is empty or not. 2450 // This may be used to include empty fields in Patch requests. 2451 ForceSendFields []string `json:"-"` 2452 2453 // NullFields is a list of field names (e.g. "LastRenewalTime") to 2454 // include in API requests with the JSON null value. By default, fields 2455 // with empty values are omitted from API requests. However, any field 2456 // with an empty value appearing in NullFields will be sent to the 2457 // server as null. It is an error if a field in this list has a 2458 // non-empty value. This may be used to include null fields in Patch 2459 // requests. 2460 NullFields []string `json:"-"` 2461} 2462 2463func (s *ManagedCertificate) MarshalJSON() ([]byte, error) { 2464 type NoMethod ManagedCertificate 2465 raw := NoMethod(*s) 2466 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2467} 2468 2469// ManualScaling: A service with manual scaling runs continuously, 2470// allowing you to perform complex initialization and rely on the state 2471// of its memory over time. 2472type ManualScaling struct { 2473 // Instances: Number of instances to assign to the service at the start. 2474 // This number can later be altered by using the Modules API 2475 // (https://cloud.google.com/appengine/docs/python/modules/functions) 2476 // set_num_instances() function. 2477 Instances int64 `json:"instances,omitempty"` 2478 2479 // ForceSendFields is a list of field names (e.g. "Instances") to 2480 // unconditionally include in API requests. By default, fields with 2481 // empty or default values are omitted from API requests. However, any 2482 // non-pointer, non-interface field appearing in ForceSendFields will be 2483 // sent to the server regardless of whether the field is empty or not. 2484 // This may be used to include empty fields in Patch requests. 2485 ForceSendFields []string `json:"-"` 2486 2487 // NullFields is a list of field names (e.g. "Instances") to include in 2488 // API requests with the JSON null value. By default, fields with empty 2489 // values are omitted from API requests. However, any field with an 2490 // empty value appearing in NullFields will be sent to the server as 2491 // null. It is an error if a field in this list has a non-empty value. 2492 // This may be used to include null fields in Patch requests. 2493 NullFields []string `json:"-"` 2494} 2495 2496func (s *ManualScaling) MarshalJSON() ([]byte, error) { 2497 type NoMethod ManualScaling 2498 raw := NoMethod(*s) 2499 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2500} 2501 2502// Network: Extra network settings. Only applicable in the App Engine 2503// flexible environment. 2504type Network struct { 2505 // ForwardedPorts: List of ports, or port pairs, to forward from the 2506 // virtual machine to the application container. Only applicable in the 2507 // App Engine flexible environment. 2508 ForwardedPorts []string `json:"forwardedPorts,omitempty"` 2509 2510 // InstanceTag: Tag to apply to the instance during creation. Only 2511 // applicable in the App Engine flexible environment. 2512 InstanceTag string `json:"instanceTag,omitempty"` 2513 2514 // Name: Google Compute Engine network where the virtual machines are 2515 // created. Specify the short name, not the resource path.Defaults to 2516 // default. 2517 Name string `json:"name,omitempty"` 2518 2519 // SessionAffinity: Enable session affinity. Only applicable in the App 2520 // Engine flexible environment. 2521 SessionAffinity bool `json:"sessionAffinity,omitempty"` 2522 2523 // SubnetworkName: Google Cloud Platform sub-network where the virtual 2524 // machines are created. Specify the short name, not the resource 2525 // path.If a subnetwork name is specified, a network name will also be 2526 // required unless it is for the default network. If the network that 2527 // the instance is being created in is a Legacy network, then the IP 2528 // address is allocated from the IPv4Range. If the network that the 2529 // instance is being created in is an auto Subnet Mode Network, then 2530 // only network name should be specified (not the subnetwork_name) and 2531 // the IP address is created from the IPCidrRange of the subnetwork that 2532 // exists in that zone for that network. If the network that the 2533 // instance is being created in is a custom Subnet Mode Network, then 2534 // the subnetwork_name must be specified and the IP address is created 2535 // from the IPCidrRange of the subnetwork.If specified, the subnetwork 2536 // must exist in the same region as the App Engine flexible environment 2537 // application. 2538 SubnetworkName string `json:"subnetworkName,omitempty"` 2539 2540 // ForceSendFields is a list of field names (e.g. "ForwardedPorts") to 2541 // unconditionally include in API requests. By default, fields with 2542 // empty or default values are omitted from API requests. However, any 2543 // non-pointer, non-interface field appearing in ForceSendFields will be 2544 // sent to the server regardless of whether the field is empty or not. 2545 // This may be used to include empty fields in Patch requests. 2546 ForceSendFields []string `json:"-"` 2547 2548 // NullFields is a list of field names (e.g. "ForwardedPorts") to 2549 // include in API requests with the JSON null value. By default, fields 2550 // with empty values are omitted from API requests. However, any field 2551 // with an empty value appearing in NullFields will be sent to the 2552 // server as null. It is an error if a field in this list has a 2553 // non-empty value. This may be used to include null fields in Patch 2554 // requests. 2555 NullFields []string `json:"-"` 2556} 2557 2558func (s *Network) MarshalJSON() ([]byte, error) { 2559 type NoMethod Network 2560 raw := NoMethod(*s) 2561 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2562} 2563 2564// NetworkSettings: A NetworkSettings resource is a container for 2565// ingress settings for a version or service. 2566type NetworkSettings struct { 2567 // IngressTrafficAllowed: The ingress settings for version or service. 2568 // 2569 // Possible values: 2570 // "INGRESS_TRAFFIC_ALLOWED_UNSPECIFIED" - Unspecified 2571 // "INGRESS_TRAFFIC_ALLOWED_ALL" - Allow HTTP traffic from public and 2572 // private sources. 2573 // "INGRESS_TRAFFIC_ALLOWED_INTERNAL_ONLY" - Allow HTTP traffic from 2574 // only private VPC sources. 2575 // "INGRESS_TRAFFIC_ALLOWED_INTERNAL_AND_LB" - Allow HTTP traffic from 2576 // private VPC sources and through load balancers. 2577 IngressTrafficAllowed string `json:"ingressTrafficAllowed,omitempty"` 2578 2579 // ForceSendFields is a list of field names (e.g. 2580 // "IngressTrafficAllowed") to unconditionally include in API requests. 2581 // By default, fields with empty or default values are omitted from API 2582 // requests. However, any non-pointer, non-interface field appearing in 2583 // ForceSendFields will be sent to the server regardless of whether the 2584 // field is empty or not. This may be used to include empty fields in 2585 // Patch requests. 2586 ForceSendFields []string `json:"-"` 2587 2588 // NullFields is a list of field names (e.g. "IngressTrafficAllowed") to 2589 // include in API requests with the JSON null value. By default, fields 2590 // with empty values are omitted from API requests. However, any field 2591 // with an empty value appearing in NullFields will be sent to the 2592 // server as null. It is an error if a field in this list has a 2593 // non-empty value. This may be used to include null fields in Patch 2594 // requests. 2595 NullFields []string `json:"-"` 2596} 2597 2598func (s *NetworkSettings) MarshalJSON() ([]byte, error) { 2599 type NoMethod NetworkSettings 2600 raw := NoMethod(*s) 2601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2602} 2603 2604// NetworkUtilization: Target scaling by network usage. Only applicable 2605// in the App Engine flexible environment. 2606type NetworkUtilization struct { 2607 // TargetReceivedBytesPerSecond: Target bytes received per second. 2608 TargetReceivedBytesPerSecond int64 `json:"targetReceivedBytesPerSecond,omitempty"` 2609 2610 // TargetReceivedPacketsPerSecond: Target packets received per second. 2611 TargetReceivedPacketsPerSecond int64 `json:"targetReceivedPacketsPerSecond,omitempty"` 2612 2613 // TargetSentBytesPerSecond: Target bytes sent per second. 2614 TargetSentBytesPerSecond int64 `json:"targetSentBytesPerSecond,omitempty"` 2615 2616 // TargetSentPacketsPerSecond: Target packets sent per second. 2617 TargetSentPacketsPerSecond int64 `json:"targetSentPacketsPerSecond,omitempty"` 2618 2619 // ForceSendFields is a list of field names (e.g. 2620 // "TargetReceivedBytesPerSecond") to unconditionally include in API 2621 // requests. By default, fields with empty or default values are omitted 2622 // from API requests. However, any non-pointer, non-interface field 2623 // appearing in ForceSendFields will be sent to the server regardless of 2624 // whether the field is empty or not. This may be used to include empty 2625 // fields in Patch requests. 2626 ForceSendFields []string `json:"-"` 2627 2628 // NullFields is a list of field names (e.g. 2629 // "TargetReceivedBytesPerSecond") to include in API requests with the 2630 // JSON null value. By default, fields with empty values are omitted 2631 // from API requests. However, any field with an empty value appearing 2632 // in NullFields will be sent to the server as null. It is an error if a 2633 // field in this list has a non-empty value. This may be used to include 2634 // null fields in Patch requests. 2635 NullFields []string `json:"-"` 2636} 2637 2638func (s *NetworkUtilization) MarshalJSON() ([]byte, error) { 2639 type NoMethod NetworkUtilization 2640 raw := NoMethod(*s) 2641 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2642} 2643 2644// Operation: This resource represents a long-running operation that is 2645// the result of a network API call. 2646type Operation struct { 2647 // Done: If the value is false, it means the operation is still in 2648 // progress. If true, the operation is completed, and either error or 2649 // response is available. 2650 Done bool `json:"done,omitempty"` 2651 2652 // Error: The error result of the operation in case of failure or 2653 // cancellation. 2654 Error *Status `json:"error,omitempty"` 2655 2656 // Metadata: Service-specific metadata associated with the operation. It 2657 // typically contains progress information and common metadata such as 2658 // create time. Some services might not provide such metadata. Any 2659 // method that returns a long-running operation should document the 2660 // metadata type, if any. 2661 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2662 2663 // Name: The server-assigned name, which is only unique within the same 2664 // service that originally returns it. If you use the default HTTP 2665 // mapping, the name should be a resource name ending with 2666 // operations/{unique_id}. 2667 Name string `json:"name,omitempty"` 2668 2669 // Response: The normal response of the operation in case of success. If 2670 // the original method returns no data on success, such as Delete, the 2671 // response is google.protobuf.Empty. If the original method is standard 2672 // Get/Create/Update, the response should be the resource. For other 2673 // methods, the response should have the type XxxResponse, where Xxx is 2674 // the original method name. For example, if the original method name is 2675 // TakeSnapshot(), the inferred response type is TakeSnapshotResponse. 2676 Response googleapi.RawMessage `json:"response,omitempty"` 2677 2678 // ServerResponse contains the HTTP response code and headers from the 2679 // server. 2680 googleapi.ServerResponse `json:"-"` 2681 2682 // ForceSendFields is a list of field names (e.g. "Done") to 2683 // unconditionally include in API requests. By default, fields with 2684 // empty or default values are omitted from API requests. However, any 2685 // non-pointer, non-interface field appearing in ForceSendFields will be 2686 // sent to the server regardless of whether the field is empty or not. 2687 // This may be used to include empty fields in Patch requests. 2688 ForceSendFields []string `json:"-"` 2689 2690 // NullFields is a list of field names (e.g. "Done") to include in API 2691 // requests with the JSON null value. By default, fields with empty 2692 // values are omitted from API requests. However, any field with an 2693 // empty value appearing in NullFields will be sent to the server as 2694 // null. It is an error if a field in this list has a non-empty value. 2695 // This may be used to include null fields in Patch requests. 2696 NullFields []string `json:"-"` 2697} 2698 2699func (s *Operation) MarshalJSON() ([]byte, error) { 2700 type NoMethod Operation 2701 raw := NoMethod(*s) 2702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2703} 2704 2705// OperationMetadataV1: Metadata for the given 2706// google.longrunning.Operation. 2707type OperationMetadataV1 struct { 2708 CreateVersionMetadata *CreateVersionMetadataV1 `json:"createVersionMetadata,omitempty"` 2709 2710 // EndTime: Time that this operation completed.@OutputOnly 2711 EndTime string `json:"endTime,omitempty"` 2712 2713 // EphemeralMessage: Ephemeral message that may change every time the 2714 // operation is polled. @OutputOnly 2715 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2716 2717 // InsertTime: Time that this operation was created.@OutputOnly 2718 InsertTime string `json:"insertTime,omitempty"` 2719 2720 // Method: API method that initiated this operation. Example: 2721 // google.appengine.v1.Versions.CreateVersion.@OutputOnly 2722 Method string `json:"method,omitempty"` 2723 2724 // Target: Name of the resource that this operation is acting on. 2725 // Example: apps/myapp/services/default.@OutputOnly 2726 Target string `json:"target,omitempty"` 2727 2728 // User: User who requested this operation.@OutputOnly 2729 User string `json:"user,omitempty"` 2730 2731 // Warning: Durable messages that persist on every operation poll. 2732 // @OutputOnly 2733 Warning []string `json:"warning,omitempty"` 2734 2735 // ForceSendFields is a list of field names (e.g. 2736 // "CreateVersionMetadata") to unconditionally include in API requests. 2737 // By default, fields with empty or default values are omitted from API 2738 // requests. However, any non-pointer, non-interface field appearing in 2739 // ForceSendFields will be sent to the server regardless of whether the 2740 // field is empty or not. This may be used to include empty fields in 2741 // Patch requests. 2742 ForceSendFields []string `json:"-"` 2743 2744 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2745 // include in API requests with the JSON null value. By default, fields 2746 // with empty values are omitted from API requests. However, any field 2747 // with an empty value appearing in NullFields will be sent to the 2748 // server as null. It is an error if a field in this list has a 2749 // non-empty value. This may be used to include null fields in Patch 2750 // requests. 2751 NullFields []string `json:"-"` 2752} 2753 2754func (s *OperationMetadataV1) MarshalJSON() ([]byte, error) { 2755 type NoMethod OperationMetadataV1 2756 raw := NoMethod(*s) 2757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2758} 2759 2760// OperationMetadataV1Alpha: Metadata for the given 2761// google.longrunning.Operation. 2762type OperationMetadataV1Alpha struct { 2763 CreateVersionMetadata *CreateVersionMetadataV1Alpha `json:"createVersionMetadata,omitempty"` 2764 2765 // EndTime: Time that this operation completed.@OutputOnly 2766 EndTime string `json:"endTime,omitempty"` 2767 2768 // EphemeralMessage: Ephemeral message that may change every time the 2769 // operation is polled. @OutputOnly 2770 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2771 2772 // InsertTime: Time that this operation was created.@OutputOnly 2773 InsertTime string `json:"insertTime,omitempty"` 2774 2775 // Method: API method that initiated this operation. Example: 2776 // google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly 2777 Method string `json:"method,omitempty"` 2778 2779 // Target: Name of the resource that this operation is acting on. 2780 // Example: apps/myapp/services/default.@OutputOnly 2781 Target string `json:"target,omitempty"` 2782 2783 // User: User who requested this operation.@OutputOnly 2784 User string `json:"user,omitempty"` 2785 2786 // Warning: Durable messages that persist on every operation poll. 2787 // @OutputOnly 2788 Warning []string `json:"warning,omitempty"` 2789 2790 // ForceSendFields is a list of field names (e.g. 2791 // "CreateVersionMetadata") to unconditionally include in API requests. 2792 // By default, fields with empty or default values are omitted from API 2793 // requests. However, any non-pointer, non-interface field appearing in 2794 // ForceSendFields will be sent to the server regardless of whether the 2795 // field is empty or not. This may be used to include empty fields in 2796 // Patch requests. 2797 ForceSendFields []string `json:"-"` 2798 2799 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2800 // include in API requests with the JSON null value. By default, fields 2801 // with empty values are omitted from API requests. However, any field 2802 // with an empty value appearing in NullFields will be sent to the 2803 // server as null. It is an error if a field in this list has a 2804 // non-empty value. This may be used to include null fields in Patch 2805 // requests. 2806 NullFields []string `json:"-"` 2807} 2808 2809func (s *OperationMetadataV1Alpha) MarshalJSON() ([]byte, error) { 2810 type NoMethod OperationMetadataV1Alpha 2811 raw := NoMethod(*s) 2812 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2813} 2814 2815// OperationMetadataV1Beta: Metadata for the given 2816// google.longrunning.Operation. 2817type OperationMetadataV1Beta struct { 2818 CreateVersionMetadata *CreateVersionMetadataV1Beta `json:"createVersionMetadata,omitempty"` 2819 2820 // EndTime: Time that this operation completed.@OutputOnly 2821 EndTime string `json:"endTime,omitempty"` 2822 2823 // EphemeralMessage: Ephemeral message that may change every time the 2824 // operation is polled. @OutputOnly 2825 EphemeralMessage string `json:"ephemeralMessage,omitempty"` 2826 2827 // InsertTime: Time that this operation was created.@OutputOnly 2828 InsertTime string `json:"insertTime,omitempty"` 2829 2830 // Method: API method that initiated this operation. Example: 2831 // google.appengine.v1beta.Versions.CreateVersion.@OutputOnly 2832 Method string `json:"method,omitempty"` 2833 2834 // Target: Name of the resource that this operation is acting on. 2835 // Example: apps/myapp/services/default.@OutputOnly 2836 Target string `json:"target,omitempty"` 2837 2838 // User: User who requested this operation.@OutputOnly 2839 User string `json:"user,omitempty"` 2840 2841 // Warning: Durable messages that persist on every operation poll. 2842 // @OutputOnly 2843 Warning []string `json:"warning,omitempty"` 2844 2845 // ForceSendFields is a list of field names (e.g. 2846 // "CreateVersionMetadata") to unconditionally include in API requests. 2847 // By default, fields with empty or default values are omitted from API 2848 // requests. However, any non-pointer, non-interface field appearing in 2849 // ForceSendFields will be sent to the server regardless of whether the 2850 // field is empty or not. This may be used to include empty fields in 2851 // Patch requests. 2852 ForceSendFields []string `json:"-"` 2853 2854 // NullFields is a list of field names (e.g. "CreateVersionMetadata") to 2855 // include in API requests with the JSON null value. By default, fields 2856 // with empty values are omitted from API requests. However, any field 2857 // with an empty value appearing in NullFields will be sent to the 2858 // server as null. It is an error if a field in this list has a 2859 // non-empty value. This may be used to include null fields in Patch 2860 // requests. 2861 NullFields []string `json:"-"` 2862} 2863 2864func (s *OperationMetadataV1Beta) MarshalJSON() ([]byte, error) { 2865 type NoMethod OperationMetadataV1Beta 2866 raw := NoMethod(*s) 2867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2868} 2869 2870// ReadinessCheck: Readiness checking configuration for VM instances. 2871// Unhealthy instances are removed from traffic rotation. 2872type ReadinessCheck struct { 2873 // AppStartTimeout: A maximum time limit on application initialization, 2874 // measured from moment the application successfully replies to a 2875 // healthcheck until it is ready to serve traffic. 2876 AppStartTimeout string `json:"appStartTimeout,omitempty"` 2877 2878 // CheckInterval: Interval between health checks. 2879 CheckInterval string `json:"checkInterval,omitempty"` 2880 2881 // FailureThreshold: Number of consecutive failed checks required before 2882 // removing traffic. 2883 FailureThreshold int64 `json:"failureThreshold,omitempty"` 2884 2885 // Host: Host header to send when performing a HTTP Readiness check. 2886 // Example: "myapp.appspot.com" 2887 Host string `json:"host,omitempty"` 2888 2889 // Path: The request path. 2890 Path string `json:"path,omitempty"` 2891 2892 // SuccessThreshold: Number of consecutive successful checks required 2893 // before receiving traffic. 2894 SuccessThreshold int64 `json:"successThreshold,omitempty"` 2895 2896 // Timeout: Time before the check is considered failed. 2897 Timeout string `json:"timeout,omitempty"` 2898 2899 // ForceSendFields is a list of field names (e.g. "AppStartTimeout") to 2900 // unconditionally include in API requests. By default, fields with 2901 // empty or default values are omitted from API requests. However, any 2902 // non-pointer, non-interface field appearing in ForceSendFields will be 2903 // sent to the server regardless of whether the field is empty or not. 2904 // This may be used to include empty fields in Patch requests. 2905 ForceSendFields []string `json:"-"` 2906 2907 // NullFields is a list of field names (e.g. "AppStartTimeout") to 2908 // include in API requests with the JSON null value. By default, fields 2909 // with empty values are omitted from API requests. However, any field 2910 // with an empty value appearing in NullFields will be sent to the 2911 // server as null. It is an error if a field in this list has a 2912 // non-empty value. This may be used to include null fields in Patch 2913 // requests. 2914 NullFields []string `json:"-"` 2915} 2916 2917func (s *ReadinessCheck) MarshalJSON() ([]byte, error) { 2918 type NoMethod ReadinessCheck 2919 raw := NoMethod(*s) 2920 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2921} 2922 2923// RepairApplicationRequest: Request message for 2924// 'Applications.RepairApplication'. 2925type RepairApplicationRequest struct { 2926} 2927 2928// RequestUtilization: Target scaling by request utilization. Only 2929// applicable in the App Engine flexible environment. 2930type RequestUtilization struct { 2931 // TargetConcurrentRequests: Target number of concurrent requests. 2932 TargetConcurrentRequests int64 `json:"targetConcurrentRequests,omitempty"` 2933 2934 // TargetRequestCountPerSecond: Target requests per second. 2935 TargetRequestCountPerSecond int64 `json:"targetRequestCountPerSecond,omitempty"` 2936 2937 // ForceSendFields is a list of field names (e.g. 2938 // "TargetConcurrentRequests") to unconditionally include in API 2939 // requests. By default, fields with empty or default values are omitted 2940 // from API requests. However, any non-pointer, non-interface field 2941 // appearing in ForceSendFields will be sent to the server regardless of 2942 // whether the field is empty or not. This may be used to include empty 2943 // fields in Patch requests. 2944 ForceSendFields []string `json:"-"` 2945 2946 // NullFields is a list of field names (e.g. "TargetConcurrentRequests") 2947 // to include in API requests with the JSON null value. By default, 2948 // fields with empty values are omitted from API requests. However, any 2949 // field with an empty value appearing in NullFields will be sent to the 2950 // server as null. It is an error if a field in this list has a 2951 // non-empty value. This may be used to include null fields in Patch 2952 // requests. 2953 NullFields []string `json:"-"` 2954} 2955 2956func (s *RequestUtilization) MarshalJSON() ([]byte, error) { 2957 type NoMethod RequestUtilization 2958 raw := NoMethod(*s) 2959 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2960} 2961 2962// ResourceRecord: A DNS resource record. 2963type ResourceRecord struct { 2964 // Name: Relative name of the object affected by this record. Only 2965 // applicable for CNAME records. Example: 'www'. 2966 Name string `json:"name,omitempty"` 2967 2968 // Rrdata: Data for this record. Values vary by record type, as defined 2969 // in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). 2970 Rrdata string `json:"rrdata,omitempty"` 2971 2972 // Type: Resource record type. Example: AAAA. 2973 // 2974 // Possible values: 2975 // "RECORD_TYPE_UNSPECIFIED" - An unknown resource record. 2976 // "A" - An A resource record. Data is an IPv4 address. 2977 // "AAAA" - An AAAA resource record. Data is an IPv6 address. 2978 // "CNAME" - A CNAME resource record. Data is a domain name to be 2979 // aliased. 2980 Type string `json:"type,omitempty"` 2981 2982 // ForceSendFields is a list of field names (e.g. "Name") to 2983 // unconditionally include in API requests. By default, fields with 2984 // empty or default values are omitted from API requests. However, any 2985 // non-pointer, non-interface field appearing in ForceSendFields will be 2986 // sent to the server regardless of whether the field is empty or not. 2987 // This may be used to include empty fields in Patch requests. 2988 ForceSendFields []string `json:"-"` 2989 2990 // NullFields is a list of field names (e.g. "Name") to include in API 2991 // requests with the JSON null value. By default, fields with empty 2992 // values are omitted from API requests. However, any field with an 2993 // empty value appearing in NullFields will be sent to the server as 2994 // null. It is an error if a field in this list has a non-empty value. 2995 // This may be used to include null fields in Patch requests. 2996 NullFields []string `json:"-"` 2997} 2998 2999func (s *ResourceRecord) MarshalJSON() ([]byte, error) { 3000 type NoMethod ResourceRecord 3001 raw := NoMethod(*s) 3002 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3003} 3004 3005// Resources: Machine resources for a version. 3006type Resources struct { 3007 // Cpu: Number of CPU cores needed. 3008 Cpu float64 `json:"cpu,omitempty"` 3009 3010 // DiskGb: Disk size (GB) needed. 3011 DiskGb float64 `json:"diskGb,omitempty"` 3012 3013 // KmsKeyReference: The name of the encryption key that is stored in 3014 // Google Cloud KMS. Only should be used by Cloud Composer to encrypt 3015 // the vm disk 3016 KmsKeyReference string `json:"kmsKeyReference,omitempty"` 3017 3018 // MemoryGb: Memory (GB) needed. 3019 MemoryGb float64 `json:"memoryGb,omitempty"` 3020 3021 // Volumes: User specified volumes. 3022 Volumes []*Volume `json:"volumes,omitempty"` 3023 3024 // ForceSendFields is a list of field names (e.g. "Cpu") to 3025 // unconditionally include in API requests. By default, fields with 3026 // empty or default values are omitted from API requests. However, any 3027 // non-pointer, non-interface field appearing in ForceSendFields will be 3028 // sent to the server regardless of whether the field is empty or not. 3029 // This may be used to include empty fields in Patch requests. 3030 ForceSendFields []string `json:"-"` 3031 3032 // NullFields is a list of field names (e.g. "Cpu") to include in API 3033 // requests with the JSON null value. By default, fields with empty 3034 // values are omitted from API requests. However, any field with an 3035 // empty value appearing in NullFields will be sent to the server as 3036 // null. It is an error if a field in this list has a non-empty value. 3037 // This may be used to include null fields in Patch requests. 3038 NullFields []string `json:"-"` 3039} 3040 3041func (s *Resources) MarshalJSON() ([]byte, error) { 3042 type NoMethod Resources 3043 raw := NoMethod(*s) 3044 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3045} 3046 3047func (s *Resources) UnmarshalJSON(data []byte) error { 3048 type NoMethod Resources 3049 var s1 struct { 3050 Cpu gensupport.JSONFloat64 `json:"cpu"` 3051 DiskGb gensupport.JSONFloat64 `json:"diskGb"` 3052 MemoryGb gensupport.JSONFloat64 `json:"memoryGb"` 3053 *NoMethod 3054 } 3055 s1.NoMethod = (*NoMethod)(s) 3056 if err := json.Unmarshal(data, &s1); err != nil { 3057 return err 3058 } 3059 s.Cpu = float64(s1.Cpu) 3060 s.DiskGb = float64(s1.DiskGb) 3061 s.MemoryGb = float64(s1.MemoryGb) 3062 return nil 3063} 3064 3065// ScriptHandler: Executes a script to handle the request that matches 3066// the URL pattern. 3067type ScriptHandler struct { 3068 // ScriptPath: Path to the script from the application root directory. 3069 ScriptPath string `json:"scriptPath,omitempty"` 3070 3071 // ForceSendFields is a list of field names (e.g. "ScriptPath") to 3072 // unconditionally include in API requests. By default, fields with 3073 // empty or default values are omitted from API requests. However, any 3074 // non-pointer, non-interface field appearing in ForceSendFields will be 3075 // sent to the server regardless of whether the field is empty or not. 3076 // This may be used to include empty fields in Patch requests. 3077 ForceSendFields []string `json:"-"` 3078 3079 // NullFields is a list of field names (e.g. "ScriptPath") to include in 3080 // API requests with the JSON null value. By default, fields with empty 3081 // values are omitted from API requests. However, any field with an 3082 // 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 *ScriptHandler) MarshalJSON() ([]byte, error) { 3089 type NoMethod ScriptHandler 3090 raw := NoMethod(*s) 3091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3092} 3093 3094// Service: A Service resource is a logical component of an application 3095// that can share state and communicate in a secure fashion with other 3096// services. For example, an application that handles customer requests 3097// might include separate services to handle tasks such as backend data 3098// analysis or API requests from mobile devices. Each service has a 3099// collection of versions that define a specific set of code used to 3100// implement the functionality of that service. 3101type Service struct { 3102 // Id: Relative name of the service within the application. Example: 3103 // default.@OutputOnly 3104 Id string `json:"id,omitempty"` 3105 3106 // Name: Full path to the Service resource in the API. Example: 3107 // apps/myapp/services/default.@OutputOnly 3108 Name string `json:"name,omitempty"` 3109 3110 // NetworkSettings: Ingress settings for this service. Will apply to all 3111 // versions. 3112 NetworkSettings *NetworkSettings `json:"networkSettings,omitempty"` 3113 3114 // Split: Mapping that defines fractional HTTP traffic diversion to 3115 // different versions within the service. 3116 Split *TrafficSplit `json:"split,omitempty"` 3117 3118 // ServerResponse contains the HTTP response code and headers from the 3119 // server. 3120 googleapi.ServerResponse `json:"-"` 3121 3122 // ForceSendFields is a list of field names (e.g. "Id") to 3123 // unconditionally include in API requests. By default, fields with 3124 // empty or default values are omitted from API requests. However, any 3125 // non-pointer, non-interface field appearing in ForceSendFields will be 3126 // sent to the server regardless of whether the field is empty or not. 3127 // This may be used to include empty fields in Patch requests. 3128 ForceSendFields []string `json:"-"` 3129 3130 // NullFields is a list of field names (e.g. "Id") to include in API 3131 // requests with the JSON null value. By default, fields with empty 3132 // values are omitted from API requests. However, any field with an 3133 // empty value appearing in NullFields will be sent to the server as 3134 // null. It is an error if a field in this list has a non-empty value. 3135 // This may be used to include null fields in Patch requests. 3136 NullFields []string `json:"-"` 3137} 3138 3139func (s *Service) MarshalJSON() ([]byte, error) { 3140 type NoMethod Service 3141 raw := NoMethod(*s) 3142 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3143} 3144 3145// SslSettings: SSL configuration for a DomainMapping resource. 3146type SslSettings struct { 3147 // CertificateId: ID of the AuthorizedCertificate resource configuring 3148 // SSL for the application. Clearing this field will remove SSL 3149 // support.By default, a managed certificate is automatically created 3150 // for every domain mapping. To omit SSL support or to configure SSL 3151 // manually, specify SslManagementType.MANUAL on a CREATE or UPDATE 3152 // request. You must be authorized to administer the 3153 // AuthorizedCertificate resource to manually map it to a DomainMapping 3154 // resource. Example: 12345. 3155 CertificateId string `json:"certificateId,omitempty"` 3156 3157 // PendingManagedCertificateId: ID of the managed AuthorizedCertificate 3158 // resource currently being provisioned, if applicable. Until the new 3159 // managed certificate has been successfully provisioned, the previous 3160 // SSL state will be preserved. Once the provisioning process completes, 3161 // the certificate_id field will reflect the new managed certificate and 3162 // this field will be left empty. To remove SSL support while there is 3163 // still a pending managed certificate, clear the certificate_id field 3164 // with an UpdateDomainMappingRequest.@OutputOnly 3165 PendingManagedCertificateId string `json:"pendingManagedCertificateId,omitempty"` 3166 3167 // SslManagementType: SSL management type for this domain. If AUTOMATIC, 3168 // a managed certificate is automatically provisioned. If MANUAL, 3169 // certificate_id must be manually specified in order to configure SSL 3170 // for this domain. 3171 // 3172 // Possible values: 3173 // "SSL_MANAGEMENT_TYPE_UNSPECIFIED" - Defaults to AUTOMATIC. 3174 // "AUTOMATIC" - SSL support for this domain is configured 3175 // automatically. The mapped SSL certificate will be automatically 3176 // renewed. 3177 // "MANUAL" - SSL support for this domain is configured manually by 3178 // the user. Either the domain has no SSL support or a user-obtained SSL 3179 // certificate has been explictly mapped to this domain. 3180 SslManagementType string `json:"sslManagementType,omitempty"` 3181 3182 // ForceSendFields is a list of field names (e.g. "CertificateId") to 3183 // unconditionally include in API requests. By default, fields with 3184 // empty or default values are omitted from API requests. However, any 3185 // non-pointer, non-interface field appearing in ForceSendFields will be 3186 // sent to the server regardless of whether the field is empty or not. 3187 // This may be used to include empty fields in Patch requests. 3188 ForceSendFields []string `json:"-"` 3189 3190 // NullFields is a list of field names (e.g. "CertificateId") to include 3191 // in API requests with the JSON null value. By default, fields with 3192 // empty values are omitted from API requests. However, any field with 3193 // an empty value appearing in NullFields will be sent to the server as 3194 // null. It is an error if a field in this list has a non-empty value. 3195 // This may be used to include null fields in Patch requests. 3196 NullFields []string `json:"-"` 3197} 3198 3199func (s *SslSettings) MarshalJSON() ([]byte, error) { 3200 type NoMethod SslSettings 3201 raw := NoMethod(*s) 3202 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3203} 3204 3205// StandardSchedulerSettings: Scheduler settings for standard 3206// environment. 3207type StandardSchedulerSettings struct { 3208 // MaxInstances: Maximum number of instances to run for this version. 3209 // Set to zero to disable max_instances configuration. 3210 MaxInstances int64 `json:"maxInstances,omitempty"` 3211 3212 // MinInstances: Minimum number of instances to run for this version. 3213 // Set to zero to disable min_instances configuration. 3214 MinInstances int64 `json:"minInstances,omitempty"` 3215 3216 // TargetCpuUtilization: Target CPU utilization ratio to maintain when 3217 // scaling. 3218 TargetCpuUtilization float64 `json:"targetCpuUtilization,omitempty"` 3219 3220 // TargetThroughputUtilization: Target throughput utilization ratio to 3221 // maintain when scaling 3222 TargetThroughputUtilization float64 `json:"targetThroughputUtilization,omitempty"` 3223 3224 // ForceSendFields is a list of field names (e.g. "MaxInstances") to 3225 // unconditionally include in API requests. By default, fields with 3226 // empty or default values are omitted from API requests. However, any 3227 // non-pointer, non-interface field appearing in ForceSendFields will be 3228 // sent to the server regardless of whether the field is empty or not. 3229 // This may be used to include empty fields in Patch requests. 3230 ForceSendFields []string `json:"-"` 3231 3232 // NullFields is a list of field names (e.g. "MaxInstances") to include 3233 // in API requests with the JSON null value. By default, fields with 3234 // empty values are omitted from API requests. However, any field with 3235 // an empty value appearing in NullFields will be sent to the server as 3236 // null. It is an error if a field in this list has a non-empty value. 3237 // This may be used to include null fields in Patch requests. 3238 NullFields []string `json:"-"` 3239} 3240 3241func (s *StandardSchedulerSettings) MarshalJSON() ([]byte, error) { 3242 type NoMethod StandardSchedulerSettings 3243 raw := NoMethod(*s) 3244 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3245} 3246 3247func (s *StandardSchedulerSettings) UnmarshalJSON(data []byte) error { 3248 type NoMethod StandardSchedulerSettings 3249 var s1 struct { 3250 TargetCpuUtilization gensupport.JSONFloat64 `json:"targetCpuUtilization"` 3251 TargetThroughputUtilization gensupport.JSONFloat64 `json:"targetThroughputUtilization"` 3252 *NoMethod 3253 } 3254 s1.NoMethod = (*NoMethod)(s) 3255 if err := json.Unmarshal(data, &s1); err != nil { 3256 return err 3257 } 3258 s.TargetCpuUtilization = float64(s1.TargetCpuUtilization) 3259 s.TargetThroughputUtilization = float64(s1.TargetThroughputUtilization) 3260 return nil 3261} 3262 3263// StaticFilesHandler: Files served directly to the user for a given 3264// URL, such as images, CSS stylesheets, or JavaScript source files. 3265// Static file handlers describe which files in the application 3266// directory are static files, and which URLs serve them. 3267type StaticFilesHandler struct { 3268 // ApplicationReadable: Whether files should also be uploaded as code 3269 // data. By default, files declared in static file handlers are uploaded 3270 // as static data and are only served to end users; they cannot be read 3271 // by the application. If enabled, uploads are charged against both your 3272 // code and static data storage resource quotas. 3273 ApplicationReadable bool `json:"applicationReadable,omitempty"` 3274 3275 // Expiration: Time a static file served by this handler should be 3276 // cached by web proxies and browsers. 3277 Expiration string `json:"expiration,omitempty"` 3278 3279 // HttpHeaders: HTTP headers to use for all responses from these URLs. 3280 HttpHeaders map[string]string `json:"httpHeaders,omitempty"` 3281 3282 // MimeType: MIME type used to serve all files served by this 3283 // handler.Defaults to file-specific MIME types, which are derived from 3284 // each file's filename extension. 3285 MimeType string `json:"mimeType,omitempty"` 3286 3287 // Path: Path to the static files matched by the URL pattern, from the 3288 // application root directory. The path can refer to text matched in 3289 // groupings in the URL pattern. 3290 Path string `json:"path,omitempty"` 3291 3292 // RequireMatchingFile: Whether this handler should match the request if 3293 // the file referenced by the handler does not exist. 3294 RequireMatchingFile bool `json:"requireMatchingFile,omitempty"` 3295 3296 // UploadPathRegex: Regular expression that matches the file paths for 3297 // all files that should be referenced by this handler. 3298 UploadPathRegex string `json:"uploadPathRegex,omitempty"` 3299 3300 // ForceSendFields is a list of field names (e.g. "ApplicationReadable") 3301 // to unconditionally include in API requests. By default, fields with 3302 // empty or default values are omitted from API requests. However, any 3303 // non-pointer, non-interface field appearing in ForceSendFields will be 3304 // sent to the server regardless of whether the field is empty or not. 3305 // This may be used to include empty fields in Patch requests. 3306 ForceSendFields []string `json:"-"` 3307 3308 // NullFields is a list of field names (e.g. "ApplicationReadable") to 3309 // include in API requests with the JSON null value. By default, fields 3310 // with empty values are omitted from API requests. However, any field 3311 // with an empty value appearing in NullFields will be sent to the 3312 // server as null. It is an error if a field in this list has a 3313 // non-empty value. This may be used to include null fields in Patch 3314 // requests. 3315 NullFields []string `json:"-"` 3316} 3317 3318func (s *StaticFilesHandler) MarshalJSON() ([]byte, error) { 3319 type NoMethod StaticFilesHandler 3320 raw := NoMethod(*s) 3321 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3322} 3323 3324// Status: The Status type defines a logical error model that is 3325// suitable for different programming environments, including REST APIs 3326// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 3327// Status message contains three pieces of data: error code, error 3328// message, and error details.You can find out more about this error 3329// model and how to work with it in the API Design Guide 3330// (https://cloud.google.com/apis/design/errors). 3331type Status struct { 3332 // Code: The status code, which should be an enum value of 3333 // google.rpc.Code. 3334 Code int64 `json:"code,omitempty"` 3335 3336 // Details: A list of messages that carry the error details. There is a 3337 // common set of message types for APIs to use. 3338 Details []googleapi.RawMessage `json:"details,omitempty"` 3339 3340 // Message: A developer-facing error message, which should be in 3341 // English. Any user-facing error message should be localized and sent 3342 // in the google.rpc.Status.details field, or localized by the client. 3343 Message string `json:"message,omitempty"` 3344 3345 // ForceSendFields is a list of field names (e.g. "Code") to 3346 // unconditionally include in API requests. By default, fields with 3347 // empty or default values are omitted from API requests. However, any 3348 // non-pointer, non-interface field appearing in ForceSendFields will be 3349 // sent to the server regardless of whether the field is empty or not. 3350 // This may be used to include empty fields in Patch requests. 3351 ForceSendFields []string `json:"-"` 3352 3353 // NullFields is a list of field names (e.g. "Code") to include in API 3354 // requests with the JSON null value. By default, fields with empty 3355 // values are omitted from API requests. However, any field with an 3356 // empty value appearing in NullFields will be sent to the server as 3357 // null. It is an error if a field in this list has a non-empty value. 3358 // This may be used to include null fields in Patch requests. 3359 NullFields []string `json:"-"` 3360} 3361 3362func (s *Status) MarshalJSON() ([]byte, error) { 3363 type NoMethod Status 3364 raw := NoMethod(*s) 3365 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3366} 3367 3368// TrafficSplit: Traffic routing configuration for versions within a 3369// single service. Traffic splits define how traffic directed to the 3370// service is assigned to versions. 3371type TrafficSplit struct { 3372 // Allocations: Mapping from version IDs within the service to 3373 // fractional (0.000, 1] allocations of traffic for that version. Each 3374 // version can be specified only once, but some versions in the service 3375 // may not have any traffic allocation. Services that have traffic 3376 // allocated cannot be deleted until either the service is deleted or 3377 // their traffic allocation is removed. Allocations must sum to 1. Up to 3378 // two decimal place precision is supported for IP-based splits and up 3379 // to three decimal places is supported for cookie-based splits. 3380 Allocations map[string]float64 `json:"allocations,omitempty"` 3381 3382 // ShardBy: Mechanism used to determine which version a request is sent 3383 // to. The traffic selection algorithm will be stable for either type 3384 // until allocations are changed. 3385 // 3386 // Possible values: 3387 // "UNSPECIFIED" - Diversion method unspecified. 3388 // "COOKIE" - Diversion based on a specially named cookie, 3389 // "GOOGAPPUID." The cookie must be set by the application itself or no 3390 // diversion will occur. 3391 // "IP" - Diversion based on applying the modulus operation to a 3392 // fingerprint of the IP address. 3393 // "RANDOM" - Diversion based on weighted random assignment. An 3394 // incoming request is randomly routed to a version in the traffic 3395 // split, with probability proportional to the version's traffic share. 3396 ShardBy string `json:"shardBy,omitempty"` 3397 3398 // ForceSendFields is a list of field names (e.g. "Allocations") to 3399 // unconditionally include in API requests. By default, fields with 3400 // empty or default values are omitted from API requests. However, any 3401 // non-pointer, non-interface field appearing in ForceSendFields will be 3402 // sent to the server regardless of whether the field is empty or not. 3403 // This may be used to include empty fields in Patch requests. 3404 ForceSendFields []string `json:"-"` 3405 3406 // NullFields is a list of field names (e.g. "Allocations") to include 3407 // in API requests with the JSON null value. By default, fields with 3408 // empty values are omitted from API requests. However, any field with 3409 // an empty value appearing in NullFields will be sent to the server as 3410 // null. It is an error if a field in this list has a non-empty value. 3411 // This may be used to include null fields in Patch requests. 3412 NullFields []string `json:"-"` 3413} 3414 3415func (s *TrafficSplit) MarshalJSON() ([]byte, error) { 3416 type NoMethod TrafficSplit 3417 raw := NoMethod(*s) 3418 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3419} 3420 3421// UrlDispatchRule: Rules to match an HTTP request and dispatch that 3422// request to a service. 3423type UrlDispatchRule struct { 3424 // Domain: Domain name to match against. The wildcard "*" is supported 3425 // if specified before a period: "*.".Defaults to matching all domains: 3426 // "*". 3427 Domain string `json:"domain,omitempty"` 3428 3429 // Path: Pathname within the host. Must start with a "/". A single "*" 3430 // can be included at the end of the path.The sum of the lengths of the 3431 // domain and path may not exceed 100 characters. 3432 Path string `json:"path,omitempty"` 3433 3434 // Service: Resource ID of a service in this application that should 3435 // serve the matched request. The service must already exist. Example: 3436 // default. 3437 Service string `json:"service,omitempty"` 3438 3439 // ForceSendFields is a list of field names (e.g. "Domain") to 3440 // unconditionally include in API requests. By default, fields with 3441 // empty or default values are omitted from API requests. However, any 3442 // non-pointer, non-interface field appearing in ForceSendFields will be 3443 // sent to the server regardless of whether the field is empty or not. 3444 // This may be used to include empty fields in Patch requests. 3445 ForceSendFields []string `json:"-"` 3446 3447 // NullFields is a list of field names (e.g. "Domain") to include in API 3448 // requests with the JSON null value. By default, fields with empty 3449 // values are omitted from API requests. However, any field with an 3450 // empty value appearing in NullFields will be sent to the server as 3451 // null. It is an error if a field in this list has a non-empty value. 3452 // This may be used to include null fields in Patch requests. 3453 NullFields []string `json:"-"` 3454} 3455 3456func (s *UrlDispatchRule) MarshalJSON() ([]byte, error) { 3457 type NoMethod UrlDispatchRule 3458 raw := NoMethod(*s) 3459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3460} 3461 3462// UrlMap: URL pattern and description of how the URL should be handled. 3463// App Engine can handle URLs by executing application code or by 3464// serving static files uploaded with the version, such as images, CSS, 3465// or JavaScript. 3466type UrlMap struct { 3467 // ApiEndpoint: Uses API Endpoints to handle requests. 3468 ApiEndpoint *ApiEndpointHandler `json:"apiEndpoint,omitempty"` 3469 3470 // AuthFailAction: Action to take when users access resources that 3471 // require authentication. Defaults to redirect. 3472 // 3473 // Possible values: 3474 // "AUTH_FAIL_ACTION_UNSPECIFIED" - Not specified. 3475 // AUTH_FAIL_ACTION_REDIRECT is assumed. 3476 // "AUTH_FAIL_ACTION_REDIRECT" - Redirects user to 3477 // "accounts.google.com". The user is redirected back to the application 3478 // URL after signing in or creating an account. 3479 // "AUTH_FAIL_ACTION_UNAUTHORIZED" - Rejects request with a 401 HTTP 3480 // status code and an error message. 3481 AuthFailAction string `json:"authFailAction,omitempty"` 3482 3483 // Login: Level of login required to access this resource. Not supported 3484 // for Node.js in the App Engine standard environment. 3485 // 3486 // Possible values: 3487 // "LOGIN_UNSPECIFIED" - Not specified. LOGIN_OPTIONAL is assumed. 3488 // "LOGIN_OPTIONAL" - Does not require that the user is signed in. 3489 // "LOGIN_ADMIN" - If the user is not signed in, the auth_fail_action 3490 // is taken. In addition, if the user is not an administrator for the 3491 // application, they are given an error message regardless of 3492 // auth_fail_action. If the user is an administrator, the handler 3493 // proceeds. 3494 // "LOGIN_REQUIRED" - If the user has signed in, the handler proceeds 3495 // normally. Otherwise, the auth_fail_action is taken. 3496 Login string `json:"login,omitempty"` 3497 3498 // RedirectHttpResponseCode: 30x code to use when performing redirects 3499 // for the secure field. Defaults to 302. 3500 // 3501 // Possible values: 3502 // "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" - Not specified. 302 is 3503 // assumed. 3504 // "REDIRECT_HTTP_RESPONSE_CODE_301" - 301 Moved Permanently code. 3505 // "REDIRECT_HTTP_RESPONSE_CODE_302" - 302 Moved Temporarily code. 3506 // "REDIRECT_HTTP_RESPONSE_CODE_303" - 303 See Other code. 3507 // "REDIRECT_HTTP_RESPONSE_CODE_307" - 307 Temporary Redirect code. 3508 RedirectHttpResponseCode string `json:"redirectHttpResponseCode,omitempty"` 3509 3510 // Script: Executes a script to handle the requests that match this URL 3511 // pattern. Only the auto value is supported for Node.js in the App 3512 // Engine standard environment, for example "script": "auto". 3513 Script *ScriptHandler `json:"script,omitempty"` 3514 3515 // SecurityLevel: Security (HTTPS) enforcement for this URL. 3516 // 3517 // Possible values: 3518 // "SECURE_UNSPECIFIED" - Not specified. 3519 // "SECURE_DEFAULT" - Both HTTP and HTTPS requests with URLs that 3520 // match the handler succeed without redirects. The application can 3521 // examine the request to determine which protocol was used, and respond 3522 // accordingly. 3523 // "SECURE_NEVER" - Requests for a URL that match this handler that 3524 // use HTTPS are automatically redirected to the HTTP equivalent URL. 3525 // "SECURE_OPTIONAL" - Both HTTP and HTTPS requests with URLs that 3526 // match the handler succeed without redirects. The application can 3527 // examine the request to determine which protocol was used and respond 3528 // accordingly. 3529 // "SECURE_ALWAYS" - Requests for a URL that match this handler that 3530 // do not use HTTPS are automatically redirected to the HTTPS URL with 3531 // the same path. Query parameters are reserved for the redirect. 3532 SecurityLevel string `json:"securityLevel,omitempty"` 3533 3534 // StaticFiles: Returns the contents of a file, such as an image, as the 3535 // response. 3536 StaticFiles *StaticFilesHandler `json:"staticFiles,omitempty"` 3537 3538 // UrlRegex: URL prefix. Uses regular expression syntax, which means 3539 // regexp special characters must be escaped, but should not contain 3540 // groupings. All URLs that begin with this prefix are handled by this 3541 // handler, using the portion of the URL after the prefix as part of the 3542 // file path. 3543 UrlRegex string `json:"urlRegex,omitempty"` 3544 3545 // ForceSendFields is a list of field names (e.g. "ApiEndpoint") to 3546 // unconditionally include in API requests. By default, fields with 3547 // empty or default values are omitted from API requests. However, any 3548 // non-pointer, non-interface field appearing in ForceSendFields will be 3549 // sent to the server regardless of whether the field is empty or not. 3550 // This may be used to include empty fields in Patch requests. 3551 ForceSendFields []string `json:"-"` 3552 3553 // NullFields is a list of field names (e.g. "ApiEndpoint") to include 3554 // in API requests with the JSON null value. By default, fields with 3555 // empty values are omitted from API requests. However, any field with 3556 // an empty value appearing in NullFields will be sent to the server as 3557 // null. It is an error if a field in this list has a non-empty value. 3558 // This may be used to include null fields in Patch requests. 3559 NullFields []string `json:"-"` 3560} 3561 3562func (s *UrlMap) MarshalJSON() ([]byte, error) { 3563 type NoMethod UrlMap 3564 raw := NoMethod(*s) 3565 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3566} 3567 3568// Version: A Version resource is a specific set of source code and 3569// configuration files that are deployed into a service. 3570type Version struct { 3571 // ApiConfig: Serving configuration for Google Cloud Endpoints 3572 // (https://cloud.google.com/appengine/docs/python/endpoints/).Only 3573 // returned in GET requests if view=FULL is set. 3574 ApiConfig *ApiConfigHandler `json:"apiConfig,omitempty"` 3575 3576 // AutomaticScaling: Automatic scaling is based on request rate, 3577 // response latencies, and other application metrics. Instances are 3578 // dynamically created and destroyed as needed in order to handle 3579 // traffic. 3580 AutomaticScaling *AutomaticScaling `json:"automaticScaling,omitempty"` 3581 3582 // BasicScaling: A service with basic scaling will create an instance 3583 // when the application receives a request. The instance will be turned 3584 // down when the app becomes idle. Basic scaling is ideal for work that 3585 // is intermittent or driven by user activity. 3586 BasicScaling *BasicScaling `json:"basicScaling,omitempty"` 3587 3588 // BetaSettings: Metadata settings that are supplied to this version to 3589 // enable beta runtime features. 3590 BetaSettings map[string]string `json:"betaSettings,omitempty"` 3591 3592 // BuildEnvVariables: Environment variables available to the build 3593 // environment.Only returned in GET requests if view=FULL is set. 3594 BuildEnvVariables map[string]string `json:"buildEnvVariables,omitempty"` 3595 3596 // CreateTime: Time that this version was created.@OutputOnly 3597 CreateTime string `json:"createTime,omitempty"` 3598 3599 // CreatedBy: Email address of the user who created this 3600 // version.@OutputOnly 3601 CreatedBy string `json:"createdBy,omitempty"` 3602 3603 // DefaultExpiration: Duration that static files should be cached by web 3604 // proxies and browsers. Only applicable if the corresponding 3605 // StaticFilesHandler 3606 // (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StaticFilesHandler) 3607 // does not specify its own expiration time.Only returned in GET 3608 // requests if view=FULL is set. 3609 DefaultExpiration string `json:"defaultExpiration,omitempty"` 3610 3611 // Deployment: Code and application artifacts that make up this 3612 // version.Only returned in GET requests if view=FULL is set. 3613 Deployment *Deployment `json:"deployment,omitempty"` 3614 3615 // DiskUsageBytes: Total size in bytes of all the files that are 3616 // included in this version and currently hosted on the App Engine 3617 // disk.@OutputOnly 3618 DiskUsageBytes int64 `json:"diskUsageBytes,omitempty,string"` 3619 3620 // EndpointsApiService: Cloud Endpoints configuration.If 3621 // endpoints_api_service is set, the Cloud Endpoints Extensible Service 3622 // Proxy will be provided to serve the API implemented by the app. 3623 EndpointsApiService *EndpointsApiService `json:"endpointsApiService,omitempty"` 3624 3625 // Entrypoint: The entrypoint for the application. 3626 Entrypoint *Entrypoint `json:"entrypoint,omitempty"` 3627 3628 // Env: App Engine execution environment for this version.Defaults to 3629 // standard. 3630 Env string `json:"env,omitempty"` 3631 3632 // EnvVariables: Environment variables available to the application.Only 3633 // returned in GET requests if view=FULL is set. 3634 EnvVariables map[string]string `json:"envVariables,omitempty"` 3635 3636 // ErrorHandlers: Custom static error pages. Limited to 10KB per 3637 // page.Only returned in GET requests if view=FULL is set. 3638 ErrorHandlers []*ErrorHandler `json:"errorHandlers,omitempty"` 3639 3640 // Handlers: An ordered list of URL-matching patterns that should be 3641 // applied to incoming requests. The first matching URL handles the 3642 // request and other request handlers are not attempted.Only returned in 3643 // GET requests if view=FULL is set. 3644 Handlers []*UrlMap `json:"handlers,omitempty"` 3645 3646 // HealthCheck: Configures health checking for instances. Unhealthy 3647 // instances are stopped and replaced with new instances. Only 3648 // applicable in the App Engine flexible environment.Only returned in 3649 // GET requests if view=FULL is set. 3650 HealthCheck *HealthCheck `json:"healthCheck,omitempty"` 3651 3652 // Id: Relative name of the version within the service. Example: v1. 3653 // Version names can contain only lowercase letters, numbers, or 3654 // hyphens. Reserved names: "default", "latest", and any name with the 3655 // prefix "ah-". 3656 Id string `json:"id,omitempty"` 3657 3658 // InboundServices: Before an application can receive email or XMPP 3659 // messages, the application must be configured to enable the service. 3660 // 3661 // Possible values: 3662 // "INBOUND_SERVICE_UNSPECIFIED" - Not specified. 3663 // "INBOUND_SERVICE_MAIL" - Allows an application to receive mail. 3664 // "INBOUND_SERVICE_MAIL_BOUNCE" - Allows an application to receive 3665 // email-bound notifications. 3666 // "INBOUND_SERVICE_XMPP_ERROR" - Allows an application to receive 3667 // error stanzas. 3668 // "INBOUND_SERVICE_XMPP_MESSAGE" - Allows an application to receive 3669 // instant messages. 3670 // "INBOUND_SERVICE_XMPP_SUBSCRIBE" - Allows an application to receive 3671 // user subscription POSTs. 3672 // "INBOUND_SERVICE_XMPP_PRESENCE" - Allows an application to receive 3673 // a user's chat presence. 3674 // "INBOUND_SERVICE_CHANNEL_PRESENCE" - Registers an application for 3675 // notifications when a client connects or disconnects from a channel. 3676 // "INBOUND_SERVICE_WARMUP" - Enables warmup requests. 3677 InboundServices []string `json:"inboundServices,omitempty"` 3678 3679 // InstanceClass: Instance class that is used to run this version. Valid 3680 // values are: AutomaticScaling: F1, F2, F4, F4_1G ManualScaling or 3681 // BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for 3682 // AutomaticScaling and B1 for ManualScaling or BasicScaling. 3683 InstanceClass string `json:"instanceClass,omitempty"` 3684 3685 // Libraries: Configuration for third-party Python runtime libraries 3686 // that are required by the application.Only returned in GET requests if 3687 // view=FULL is set. 3688 Libraries []*Library `json:"libraries,omitempty"` 3689 3690 // LivenessCheck: Configures liveness health checking for instances. 3691 // Unhealthy instances are stopped and replaced with new instancesOnly 3692 // returned in GET requests if view=FULL is set. 3693 LivenessCheck *LivenessCheck `json:"livenessCheck,omitempty"` 3694 3695 // ManualScaling: A service with manual scaling runs continuously, 3696 // allowing you to perform complex initialization and rely on the state 3697 // of its memory over time. Manually scaled versions are sometimes 3698 // referred to as "backends". 3699 ManualScaling *ManualScaling `json:"manualScaling,omitempty"` 3700 3701 // Name: Full path to the Version resource in the API. Example: 3702 // apps/myapp/services/default/versions/v1.@OutputOnly 3703 Name string `json:"name,omitempty"` 3704 3705 // Network: Extra network settings. Only applicable in the App Engine 3706 // flexible environment. 3707 Network *Network `json:"network,omitempty"` 3708 3709 // NobuildFilesRegex: Files that match this pattern will not be built 3710 // into this version. Only applicable for Go runtimes.Only returned in 3711 // GET requests if view=FULL is set. 3712 NobuildFilesRegex string `json:"nobuildFilesRegex,omitempty"` 3713 3714 // ReadinessCheck: Configures readiness health checking for instances. 3715 // Unhealthy instances are not put into the backend traffic 3716 // rotation.Only returned in GET requests if view=FULL is set. 3717 ReadinessCheck *ReadinessCheck `json:"readinessCheck,omitempty"` 3718 3719 // Resources: Machine resources for this version. Only applicable in the 3720 // App Engine flexible environment. 3721 Resources *Resources `json:"resources,omitempty"` 3722 3723 // Runtime: Desired runtime. Example: python27. 3724 Runtime string `json:"runtime,omitempty"` 3725 3726 // RuntimeApiVersion: The version of the API in the given runtime 3727 // environment. Please see the app.yaml reference for valid values at 3728 // https://cloud.google.com/appengine/docs/standard//config/appref 3729 RuntimeApiVersion string `json:"runtimeApiVersion,omitempty"` 3730 3731 // RuntimeChannel: The channel of the runtime to use. Only available for 3732 // some runtimes. Defaults to the default channel. 3733 RuntimeChannel string `json:"runtimeChannel,omitempty"` 3734 3735 // RuntimeMainExecutablePath: The path or name of the app's main 3736 // executable. 3737 RuntimeMainExecutablePath string `json:"runtimeMainExecutablePath,omitempty"` 3738 3739 // ServiceAccount: The identity that the deployed version will run as. 3740 // Admin API will use the App Engine Appspot service account as default 3741 // if this field is neither provided in app.yaml file nor through CLI 3742 // flag. 3743 ServiceAccount string `json:"serviceAccount,omitempty"` 3744 3745 // ServingStatus: Current serving status of this version. Only the 3746 // versions with a SERVING status create instances and can be 3747 // billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to 3748 // SERVING. 3749 // 3750 // Possible values: 3751 // "SERVING_STATUS_UNSPECIFIED" - Not specified. 3752 // "SERVING" - Currently serving. Instances are created according to 3753 // the scaling settings of the version. 3754 // "STOPPED" - Disabled. No instances will be created and the scaling 3755 // settings are ignored until the state of the version changes to 3756 // SERVING. 3757 ServingStatus string `json:"servingStatus,omitempty"` 3758 3759 // Threadsafe: Whether multiple requests can be dispatched to this 3760 // version at once. 3761 Threadsafe bool `json:"threadsafe,omitempty"` 3762 3763 // VersionUrl: Serving URL for this version. Example: 3764 // "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly 3765 VersionUrl string `json:"versionUrl,omitempty"` 3766 3767 // Vm: Whether to deploy this version in a container on a virtual 3768 // machine. 3769 Vm bool `json:"vm,omitempty"` 3770 3771 // VpcAccessConnector: Enables VPC connectivity for standard apps. 3772 VpcAccessConnector *VpcAccessConnector `json:"vpcAccessConnector,omitempty"` 3773 3774 // Zones: The Google Compute Engine zones that are supported by this 3775 // version in the App Engine flexible environment. Deprecated. 3776 Zones []string `json:"zones,omitempty"` 3777 3778 // ServerResponse contains the HTTP response code and headers from the 3779 // server. 3780 googleapi.ServerResponse `json:"-"` 3781 3782 // ForceSendFields is a list of field names (e.g. "ApiConfig") to 3783 // unconditionally include in API requests. By default, fields with 3784 // empty or default values are omitted from API requests. However, any 3785 // non-pointer, non-interface field appearing in ForceSendFields will be 3786 // sent to the server regardless of whether the field is empty or not. 3787 // This may be used to include empty fields in Patch requests. 3788 ForceSendFields []string `json:"-"` 3789 3790 // NullFields is a list of field names (e.g. "ApiConfig") to include in 3791 // API requests with the JSON null value. By default, fields with empty 3792 // values are omitted from API requests. However, any field with an 3793 // empty value appearing in NullFields will be sent to the server as 3794 // null. It is an error if a field in this list has a non-empty value. 3795 // This may be used to include null fields in Patch requests. 3796 NullFields []string `json:"-"` 3797} 3798 3799func (s *Version) MarshalJSON() ([]byte, error) { 3800 type NoMethod Version 3801 raw := NoMethod(*s) 3802 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3803} 3804 3805// Volume: Volumes mounted within the app container. Only applicable in 3806// the App Engine flexible environment. 3807type Volume struct { 3808 // Name: Unique name for the volume. 3809 Name string `json:"name,omitempty"` 3810 3811 // SizeGb: Volume size in gigabytes. 3812 SizeGb float64 `json:"sizeGb,omitempty"` 3813 3814 // VolumeType: Underlying volume type, e.g. 'tmpfs'. 3815 VolumeType string `json:"volumeType,omitempty"` 3816 3817 // ForceSendFields is a list of field names (e.g. "Name") to 3818 // unconditionally include in API requests. By default, fields with 3819 // empty or default values are omitted from API requests. However, any 3820 // non-pointer, non-interface field appearing in ForceSendFields will be 3821 // sent to the server regardless of whether the field is empty or not. 3822 // This may be used to include empty fields in Patch requests. 3823 ForceSendFields []string `json:"-"` 3824 3825 // NullFields is a list of field names (e.g. "Name") to include in API 3826 // requests with the JSON null value. By default, fields with empty 3827 // values are omitted from API requests. However, any field with an 3828 // empty value appearing in NullFields will be sent to the server as 3829 // null. It is an error if a field in this list has a non-empty value. 3830 // This may be used to include null fields in Patch requests. 3831 NullFields []string `json:"-"` 3832} 3833 3834func (s *Volume) MarshalJSON() ([]byte, error) { 3835 type NoMethod Volume 3836 raw := NoMethod(*s) 3837 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3838} 3839 3840func (s *Volume) UnmarshalJSON(data []byte) error { 3841 type NoMethod Volume 3842 var s1 struct { 3843 SizeGb gensupport.JSONFloat64 `json:"sizeGb"` 3844 *NoMethod 3845 } 3846 s1.NoMethod = (*NoMethod)(s) 3847 if err := json.Unmarshal(data, &s1); err != nil { 3848 return err 3849 } 3850 s.SizeGb = float64(s1.SizeGb) 3851 return nil 3852} 3853 3854// VpcAccessConnector: VPC access connector specification. 3855type VpcAccessConnector struct { 3856 // EgressSetting: The egress setting for the connector, controlling what 3857 // traffic is diverted through it. 3858 // 3859 // Possible values: 3860 // "EGRESS_SETTING_UNSPECIFIED" 3861 // "ALL_TRAFFIC" - Force the use of VPC Access for all egress traffic 3862 // from the function. 3863 // "PRIVATE_IP_RANGES" - Use the VPC Access Connector for private IP 3864 // space from RFC1918. 3865 EgressSetting string `json:"egressSetting,omitempty"` 3866 3867 // Name: Full Serverless VPC Access Connector name e.g. 3868 // /projects/my-project/locations/us-central1/connectors/c1. 3869 Name string `json:"name,omitempty"` 3870 3871 // ForceSendFields is a list of field names (e.g. "EgressSetting") to 3872 // unconditionally include in API requests. By default, fields with 3873 // empty or default values are omitted from API requests. However, any 3874 // non-pointer, non-interface field appearing in ForceSendFields will be 3875 // sent to the server regardless of whether the field is empty or not. 3876 // This may be used to include empty fields in Patch requests. 3877 ForceSendFields []string `json:"-"` 3878 3879 // NullFields is a list of field names (e.g. "EgressSetting") to include 3880 // in API requests with the JSON null value. By default, fields with 3881 // empty values are omitted from API requests. However, any field with 3882 // an empty value appearing in NullFields will be sent to the server as 3883 // null. It is an error if a field in this list has a non-empty value. 3884 // This may be used to include null fields in Patch requests. 3885 NullFields []string `json:"-"` 3886} 3887 3888func (s *VpcAccessConnector) MarshalJSON() ([]byte, error) { 3889 type NoMethod VpcAccessConnector 3890 raw := NoMethod(*s) 3891 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3892} 3893 3894// ZipInfo: The zip file information for a zip deployment. 3895type ZipInfo struct { 3896 // FilesCount: An estimate of the number of files in a zip for a zip 3897 // deployment. If set, must be greater than or equal to the actual 3898 // number of files. Used for optimizing performance; if not provided, 3899 // deployment may be slow. 3900 FilesCount int64 `json:"filesCount,omitempty"` 3901 3902 // SourceUrl: URL of the zip file to deploy from. Must be a URL to a 3903 // resource in Google Cloud Storage in the form 3904 // 'http(s)://storage.googleapis.com//'. 3905 SourceUrl string `json:"sourceUrl,omitempty"` 3906 3907 // ForceSendFields is a list of field names (e.g. "FilesCount") to 3908 // unconditionally include in API requests. By default, fields with 3909 // empty or default values are omitted from API requests. However, any 3910 // non-pointer, non-interface field appearing in ForceSendFields will be 3911 // sent to the server regardless of whether the field is empty or not. 3912 // This may be used to include empty fields in Patch requests. 3913 ForceSendFields []string `json:"-"` 3914 3915 // NullFields is a list of field names (e.g. "FilesCount") to include in 3916 // API requests with the JSON null value. By default, fields with empty 3917 // values are omitted from API requests. However, any field with an 3918 // empty value appearing in NullFields will be sent to the server as 3919 // null. It is an error if a field in this list has a non-empty value. 3920 // This may be used to include null fields in Patch requests. 3921 NullFields []string `json:"-"` 3922} 3923 3924func (s *ZipInfo) MarshalJSON() ([]byte, error) { 3925 type NoMethod ZipInfo 3926 raw := NoMethod(*s) 3927 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3928} 3929 3930// method id "appengine.apps.create": 3931 3932type AppsCreateCall struct { 3933 s *APIService 3934 application *Application 3935 urlParams_ gensupport.URLParams 3936 ctx_ context.Context 3937 header_ http.Header 3938} 3939 3940// Create: Creates an App Engine application for a Google Cloud Platform 3941// project. Required fields: id - The ID of the target Cloud Platform 3942// project. location - The region 3943// (https://cloud.google.com/appengine/docs/locations) where you want 3944// the App Engine application located.For more information about App 3945// Engine applications, see Managing Projects, Applications, and Billing 3946// (https://cloud.google.com/appengine/docs/standard/python/console/). 3947func (r *AppsService) Create(application *Application) *AppsCreateCall { 3948 c := &AppsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3949 c.application = application 3950 return c 3951} 3952 3953// Fields allows partial responses to be retrieved. See 3954// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3955// for more information. 3956func (c *AppsCreateCall) Fields(s ...googleapi.Field) *AppsCreateCall { 3957 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3958 return c 3959} 3960 3961// Context sets the context to be used in this call's Do method. Any 3962// pending HTTP request will be aborted if the provided context is 3963// canceled. 3964func (c *AppsCreateCall) Context(ctx context.Context) *AppsCreateCall { 3965 c.ctx_ = ctx 3966 return c 3967} 3968 3969// Header returns an http.Header that can be modified by the caller to 3970// add HTTP headers to the request. 3971func (c *AppsCreateCall) Header() http.Header { 3972 if c.header_ == nil { 3973 c.header_ = make(http.Header) 3974 } 3975 return c.header_ 3976} 3977 3978func (c *AppsCreateCall) doRequest(alt string) (*http.Response, error) { 3979 reqHeaders := make(http.Header) 3980 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 3981 for k, v := range c.header_ { 3982 reqHeaders[k] = v 3983 } 3984 reqHeaders.Set("User-Agent", c.s.userAgent()) 3985 var body io.Reader = nil 3986 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) 3987 if err != nil { 3988 return nil, err 3989 } 3990 reqHeaders.Set("Content-Type", "application/json") 3991 c.urlParams_.Set("alt", alt) 3992 c.urlParams_.Set("prettyPrint", "false") 3993 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps") 3994 urls += "?" + c.urlParams_.Encode() 3995 req, err := http.NewRequest("POST", urls, body) 3996 if err != nil { 3997 return nil, err 3998 } 3999 req.Header = reqHeaders 4000 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4001} 4002 4003// Do executes the "appengine.apps.create" call. 4004// Exactly one of *Operation or error will be non-nil. Any non-2xx 4005// status code is an error. Response headers are in either 4006// *Operation.ServerResponse.Header or (if a response was returned at 4007// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4008// to check whether the returned error was because 4009// http.StatusNotModified was returned. 4010func (c *AppsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4011 gensupport.SetOptions(c.urlParams_, opts...) 4012 res, err := c.doRequest("json") 4013 if res != nil && res.StatusCode == http.StatusNotModified { 4014 if res.Body != nil { 4015 res.Body.Close() 4016 } 4017 return nil, &googleapi.Error{ 4018 Code: res.StatusCode, 4019 Header: res.Header, 4020 } 4021 } 4022 if err != nil { 4023 return nil, err 4024 } 4025 defer googleapi.CloseBody(res) 4026 if err := googleapi.CheckResponse(res); err != nil { 4027 return nil, err 4028 } 4029 ret := &Operation{ 4030 ServerResponse: googleapi.ServerResponse{ 4031 Header: res.Header, 4032 HTTPStatusCode: res.StatusCode, 4033 }, 4034 } 4035 target := &ret 4036 if err := gensupport.DecodeResponse(target, res); err != nil { 4037 return nil, err 4038 } 4039 return ret, nil 4040 // { 4041 // "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields: id - The ID of the target Cloud Platform project. location - 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/).", 4042 // "flatPath": "v1/apps", 4043 // "httpMethod": "POST", 4044 // "id": "appengine.apps.create", 4045 // "parameterOrder": [], 4046 // "parameters": {}, 4047 // "path": "v1/apps", 4048 // "request": { 4049 // "$ref": "Application" 4050 // }, 4051 // "response": { 4052 // "$ref": "Operation" 4053 // }, 4054 // "scopes": [ 4055 // "https://www.googleapis.com/auth/cloud-platform" 4056 // ] 4057 // } 4058 4059} 4060 4061// method id "appengine.apps.get": 4062 4063type AppsGetCall struct { 4064 s *APIService 4065 appsId string 4066 urlParams_ gensupport.URLParams 4067 ifNoneMatch_ string 4068 ctx_ context.Context 4069 header_ http.Header 4070} 4071 4072// Get: Gets information about an application. 4073// 4074// - appsId: Part of `name`. Name of the Application resource to get. 4075// Example: apps/myapp. 4076func (r *AppsService) Get(appsId string) *AppsGetCall { 4077 c := &AppsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4078 c.appsId = appsId 4079 return c 4080} 4081 4082// Fields allows partial responses to be retrieved. See 4083// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4084// for more information. 4085func (c *AppsGetCall) Fields(s ...googleapi.Field) *AppsGetCall { 4086 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4087 return c 4088} 4089 4090// IfNoneMatch sets the optional parameter which makes the operation 4091// fail if the object's ETag matches the given value. This is useful for 4092// getting updates only after the object has changed since the last 4093// request. Use googleapi.IsNotModified to check whether the response 4094// error from Do is the result of In-None-Match. 4095func (c *AppsGetCall) IfNoneMatch(entityTag string) *AppsGetCall { 4096 c.ifNoneMatch_ = entityTag 4097 return c 4098} 4099 4100// Context sets the context to be used in this call's Do method. Any 4101// pending HTTP request will be aborted if the provided context is 4102// canceled. 4103func (c *AppsGetCall) Context(ctx context.Context) *AppsGetCall { 4104 c.ctx_ = ctx 4105 return c 4106} 4107 4108// Header returns an http.Header that can be modified by the caller to 4109// add HTTP headers to the request. 4110func (c *AppsGetCall) Header() http.Header { 4111 if c.header_ == nil { 4112 c.header_ = make(http.Header) 4113 } 4114 return c.header_ 4115} 4116 4117func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) { 4118 reqHeaders := make(http.Header) 4119 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 4120 for k, v := range c.header_ { 4121 reqHeaders[k] = v 4122 } 4123 reqHeaders.Set("User-Agent", c.s.userAgent()) 4124 if c.ifNoneMatch_ != "" { 4125 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4126 } 4127 var body io.Reader = nil 4128 c.urlParams_.Set("alt", alt) 4129 c.urlParams_.Set("prettyPrint", "false") 4130 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}") 4131 urls += "?" + c.urlParams_.Encode() 4132 req, err := http.NewRequest("GET", urls, body) 4133 if err != nil { 4134 return nil, err 4135 } 4136 req.Header = reqHeaders 4137 googleapi.Expand(req.URL, map[string]string{ 4138 "appsId": c.appsId, 4139 }) 4140 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4141} 4142 4143// Do executes the "appengine.apps.get" call. 4144// Exactly one of *Application or error will be non-nil. Any non-2xx 4145// status code is an error. Response headers are in either 4146// *Application.ServerResponse.Header or (if a response was returned at 4147// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4148// to check whether the returned error was because 4149// http.StatusNotModified was returned. 4150func (c *AppsGetCall) Do(opts ...googleapi.CallOption) (*Application, error) { 4151 gensupport.SetOptions(c.urlParams_, opts...) 4152 res, err := c.doRequest("json") 4153 if res != nil && res.StatusCode == http.StatusNotModified { 4154 if res.Body != nil { 4155 res.Body.Close() 4156 } 4157 return nil, &googleapi.Error{ 4158 Code: res.StatusCode, 4159 Header: res.Header, 4160 } 4161 } 4162 if err != nil { 4163 return nil, err 4164 } 4165 defer googleapi.CloseBody(res) 4166 if err := googleapi.CheckResponse(res); err != nil { 4167 return nil, err 4168 } 4169 ret := &Application{ 4170 ServerResponse: googleapi.ServerResponse{ 4171 Header: res.Header, 4172 HTTPStatusCode: res.StatusCode, 4173 }, 4174 } 4175 target := &ret 4176 if err := gensupport.DecodeResponse(target, res); err != nil { 4177 return nil, err 4178 } 4179 return ret, nil 4180 // { 4181 // "description": "Gets information about an application.", 4182 // "flatPath": "v1/apps/{appsId}", 4183 // "httpMethod": "GET", 4184 // "id": "appengine.apps.get", 4185 // "parameterOrder": [ 4186 // "appsId" 4187 // ], 4188 // "parameters": { 4189 // "appsId": { 4190 // "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", 4191 // "location": "path", 4192 // "required": true, 4193 // "type": "string" 4194 // } 4195 // }, 4196 // "path": "v1/apps/{appsId}", 4197 // "response": { 4198 // "$ref": "Application" 4199 // }, 4200 // "scopes": [ 4201 // "https://www.googleapis.com/auth/appengine.admin", 4202 // "https://www.googleapis.com/auth/cloud-platform", 4203 // "https://www.googleapis.com/auth/cloud-platform.read-only" 4204 // ] 4205 // } 4206 4207} 4208 4209// method id "appengine.apps.patch": 4210 4211type AppsPatchCall struct { 4212 s *APIService 4213 appsId string 4214 application *Application 4215 urlParams_ gensupport.URLParams 4216 ctx_ context.Context 4217 header_ http.Header 4218} 4219 4220// Patch: Updates the specified Application resource. You can update the 4221// following fields: auth_domain - Google authentication domain for 4222// controlling user access to the application. default_cookie_expiration 4223// - Cookie expiration policy for the application. iap - Identity-Aware 4224// Proxy properties for the application. 4225// 4226// - appsId: Part of `name`. Name of the Application resource to update. 4227// Example: apps/myapp. 4228func (r *AppsService) Patch(appsId string, application *Application) *AppsPatchCall { 4229 c := &AppsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4230 c.appsId = appsId 4231 c.application = application 4232 return c 4233} 4234 4235// UpdateMask sets the optional parameter "updateMask": Required. 4236// Standard field mask for the set of fields to be updated. 4237func (c *AppsPatchCall) UpdateMask(updateMask string) *AppsPatchCall { 4238 c.urlParams_.Set("updateMask", updateMask) 4239 return c 4240} 4241 4242// Fields allows partial responses to be retrieved. See 4243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4244// for more information. 4245func (c *AppsPatchCall) Fields(s ...googleapi.Field) *AppsPatchCall { 4246 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4247 return c 4248} 4249 4250// Context sets the context to be used in this call's Do method. Any 4251// pending HTTP request will be aborted if the provided context is 4252// canceled. 4253func (c *AppsPatchCall) Context(ctx context.Context) *AppsPatchCall { 4254 c.ctx_ = ctx 4255 return c 4256} 4257 4258// Header returns an http.Header that can be modified by the caller to 4259// add HTTP headers to the request. 4260func (c *AppsPatchCall) Header() http.Header { 4261 if c.header_ == nil { 4262 c.header_ = make(http.Header) 4263 } 4264 return c.header_ 4265} 4266 4267func (c *AppsPatchCall) doRequest(alt string) (*http.Response, error) { 4268 reqHeaders := make(http.Header) 4269 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 4270 for k, v := range c.header_ { 4271 reqHeaders[k] = v 4272 } 4273 reqHeaders.Set("User-Agent", c.s.userAgent()) 4274 var body io.Reader = nil 4275 body, err := googleapi.WithoutDataWrapper.JSONReader(c.application) 4276 if err != nil { 4277 return nil, err 4278 } 4279 reqHeaders.Set("Content-Type", "application/json") 4280 c.urlParams_.Set("alt", alt) 4281 c.urlParams_.Set("prettyPrint", "false") 4282 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}") 4283 urls += "?" + c.urlParams_.Encode() 4284 req, err := http.NewRequest("PATCH", urls, body) 4285 if err != nil { 4286 return nil, err 4287 } 4288 req.Header = reqHeaders 4289 googleapi.Expand(req.URL, map[string]string{ 4290 "appsId": c.appsId, 4291 }) 4292 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4293} 4294 4295// Do executes the "appengine.apps.patch" call. 4296// Exactly one of *Operation or error will be non-nil. Any non-2xx 4297// status code is an error. Response headers are in either 4298// *Operation.ServerResponse.Header or (if a response was returned at 4299// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4300// to check whether the returned error was because 4301// http.StatusNotModified was returned. 4302func (c *AppsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4303 gensupport.SetOptions(c.urlParams_, opts...) 4304 res, err := c.doRequest("json") 4305 if res != nil && res.StatusCode == http.StatusNotModified { 4306 if res.Body != nil { 4307 res.Body.Close() 4308 } 4309 return nil, &googleapi.Error{ 4310 Code: res.StatusCode, 4311 Header: res.Header, 4312 } 4313 } 4314 if err != nil { 4315 return nil, err 4316 } 4317 defer googleapi.CloseBody(res) 4318 if err := googleapi.CheckResponse(res); err != nil { 4319 return nil, err 4320 } 4321 ret := &Operation{ 4322 ServerResponse: googleapi.ServerResponse{ 4323 Header: res.Header, 4324 HTTPStatusCode: res.StatusCode, 4325 }, 4326 } 4327 target := &ret 4328 if err := gensupport.DecodeResponse(target, res); err != nil { 4329 return nil, err 4330 } 4331 return ret, nil 4332 // { 4333 // "description": "Updates the specified Application resource. You can update the following fields: auth_domain - Google authentication domain for controlling user access to the application. default_cookie_expiration - Cookie expiration policy for the application. iap - Identity-Aware Proxy properties for the application.", 4334 // "flatPath": "v1/apps/{appsId}", 4335 // "httpMethod": "PATCH", 4336 // "id": "appengine.apps.patch", 4337 // "parameterOrder": [ 4338 // "appsId" 4339 // ], 4340 // "parameters": { 4341 // "appsId": { 4342 // "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", 4343 // "location": "path", 4344 // "required": true, 4345 // "type": "string" 4346 // }, 4347 // "updateMask": { 4348 // "description": "Required. Standard field mask for the set of fields to be updated.", 4349 // "format": "google-fieldmask", 4350 // "location": "query", 4351 // "type": "string" 4352 // } 4353 // }, 4354 // "path": "v1/apps/{appsId}", 4355 // "request": { 4356 // "$ref": "Application" 4357 // }, 4358 // "response": { 4359 // "$ref": "Operation" 4360 // }, 4361 // "scopes": [ 4362 // "https://www.googleapis.com/auth/cloud-platform" 4363 // ] 4364 // } 4365 4366} 4367 4368// method id "appengine.apps.repair": 4369 4370type AppsRepairCall struct { 4371 s *APIService 4372 appsId string 4373 repairapplicationrequest *RepairApplicationRequest 4374 urlParams_ gensupport.URLParams 4375 ctx_ context.Context 4376 header_ http.Header 4377} 4378 4379// Repair: Recreates the required App Engine features for the specified 4380// App Engine application, for example a Cloud Storage bucket or App 4381// Engine service account. Use this method if you receive an error 4382// message about a missing feature, for example, Error retrieving the 4383// App Engine service account. If you have deleted your App Engine 4384// service account, this will not be able to recreate it. Instead, you 4385// should attempt to use the IAM undelete API if possible at 4386// 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 4387// . If the deletion was recent, the numeric ID can be found in the 4388// Cloud Console Activity Log. 4389// 4390// - appsId: Part of `name`. Name of the application to repair. Example: 4391// apps/myapp. 4392func (r *AppsService) Repair(appsId string, repairapplicationrequest *RepairApplicationRequest) *AppsRepairCall { 4393 c := &AppsRepairCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4394 c.appsId = appsId 4395 c.repairapplicationrequest = repairapplicationrequest 4396 return c 4397} 4398 4399// Fields allows partial responses to be retrieved. See 4400// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4401// for more information. 4402func (c *AppsRepairCall) Fields(s ...googleapi.Field) *AppsRepairCall { 4403 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4404 return c 4405} 4406 4407// Context sets the context to be used in this call's Do method. Any 4408// pending HTTP request will be aborted if the provided context is 4409// canceled. 4410func (c *AppsRepairCall) Context(ctx context.Context) *AppsRepairCall { 4411 c.ctx_ = ctx 4412 return c 4413} 4414 4415// Header returns an http.Header that can be modified by the caller to 4416// add HTTP headers to the request. 4417func (c *AppsRepairCall) Header() http.Header { 4418 if c.header_ == nil { 4419 c.header_ = make(http.Header) 4420 } 4421 return c.header_ 4422} 4423 4424func (c *AppsRepairCall) doRequest(alt string) (*http.Response, error) { 4425 reqHeaders := make(http.Header) 4426 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 4427 for k, v := range c.header_ { 4428 reqHeaders[k] = v 4429 } 4430 reqHeaders.Set("User-Agent", c.s.userAgent()) 4431 var body io.Reader = nil 4432 body, err := googleapi.WithoutDataWrapper.JSONReader(c.repairapplicationrequest) 4433 if err != nil { 4434 return nil, err 4435 } 4436 reqHeaders.Set("Content-Type", "application/json") 4437 c.urlParams_.Set("alt", alt) 4438 c.urlParams_.Set("prettyPrint", "false") 4439 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}:repair") 4440 urls += "?" + c.urlParams_.Encode() 4441 req, err := http.NewRequest("POST", urls, body) 4442 if err != nil { 4443 return nil, err 4444 } 4445 req.Header = reqHeaders 4446 googleapi.Expand(req.URL, map[string]string{ 4447 "appsId": c.appsId, 4448 }) 4449 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4450} 4451 4452// Do executes the "appengine.apps.repair" call. 4453// Exactly one of *Operation or error will be non-nil. Any non-2xx 4454// status code is an error. Response headers are in either 4455// *Operation.ServerResponse.Header or (if a response was returned at 4456// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4457// to check whether the returned error was because 4458// http.StatusNotModified was returned. 4459func (c *AppsRepairCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4460 gensupport.SetOptions(c.urlParams_, opts...) 4461 res, err := c.doRequest("json") 4462 if res != nil && res.StatusCode == http.StatusNotModified { 4463 if res.Body != nil { 4464 res.Body.Close() 4465 } 4466 return nil, &googleapi.Error{ 4467 Code: res.StatusCode, 4468 Header: res.Header, 4469 } 4470 } 4471 if err != nil { 4472 return nil, err 4473 } 4474 defer googleapi.CloseBody(res) 4475 if err := googleapi.CheckResponse(res); err != nil { 4476 return nil, err 4477 } 4478 ret := &Operation{ 4479 ServerResponse: googleapi.ServerResponse{ 4480 Header: res.Header, 4481 HTTPStatusCode: res.StatusCode, 4482 }, 4483 } 4484 target := &ret 4485 if err := gensupport.DecodeResponse(target, res); err != nil { 4486 return nil, err 4487 } 4488 return ret, nil 4489 // { 4490 // "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.", 4491 // "flatPath": "v1/apps/{appsId}:repair", 4492 // "httpMethod": "POST", 4493 // "id": "appengine.apps.repair", 4494 // "parameterOrder": [ 4495 // "appsId" 4496 // ], 4497 // "parameters": { 4498 // "appsId": { 4499 // "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", 4500 // "location": "path", 4501 // "required": true, 4502 // "type": "string" 4503 // } 4504 // }, 4505 // "path": "v1/apps/{appsId}:repair", 4506 // "request": { 4507 // "$ref": "RepairApplicationRequest" 4508 // }, 4509 // "response": { 4510 // "$ref": "Operation" 4511 // }, 4512 // "scopes": [ 4513 // "https://www.googleapis.com/auth/cloud-platform" 4514 // ] 4515 // } 4516 4517} 4518 4519// method id "appengine.apps.authorizedCertificates.create": 4520 4521type AppsAuthorizedCertificatesCreateCall struct { 4522 s *APIService 4523 appsId string 4524 authorizedcertificate *AuthorizedCertificate 4525 urlParams_ gensupport.URLParams 4526 ctx_ context.Context 4527 header_ http.Header 4528} 4529 4530// Create: Uploads the specified SSL certificate. 4531// 4532// - appsId: Part of `parent`. Name of the parent Application resource. 4533// Example: apps/myapp. 4534func (r *AppsAuthorizedCertificatesService) Create(appsId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesCreateCall { 4535 c := &AppsAuthorizedCertificatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4536 c.appsId = appsId 4537 c.authorizedcertificate = authorizedcertificate 4538 return c 4539} 4540 4541// Fields allows partial responses to be retrieved. See 4542// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4543// for more information. 4544func (c *AppsAuthorizedCertificatesCreateCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesCreateCall { 4545 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4546 return c 4547} 4548 4549// Context sets the context to be used in this call's Do method. Any 4550// pending HTTP request will be aborted if the provided context is 4551// canceled. 4552func (c *AppsAuthorizedCertificatesCreateCall) Context(ctx context.Context) *AppsAuthorizedCertificatesCreateCall { 4553 c.ctx_ = ctx 4554 return c 4555} 4556 4557// Header returns an http.Header that can be modified by the caller to 4558// add HTTP headers to the request. 4559func (c *AppsAuthorizedCertificatesCreateCall) Header() http.Header { 4560 if c.header_ == nil { 4561 c.header_ = make(http.Header) 4562 } 4563 return c.header_ 4564} 4565 4566func (c *AppsAuthorizedCertificatesCreateCall) doRequest(alt string) (*http.Response, error) { 4567 reqHeaders := make(http.Header) 4568 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 4569 for k, v := range c.header_ { 4570 reqHeaders[k] = v 4571 } 4572 reqHeaders.Set("User-Agent", c.s.userAgent()) 4573 var body io.Reader = nil 4574 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate) 4575 if err != nil { 4576 return nil, err 4577 } 4578 reqHeaders.Set("Content-Type", "application/json") 4579 c.urlParams_.Set("alt", alt) 4580 c.urlParams_.Set("prettyPrint", "false") 4581 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates") 4582 urls += "?" + c.urlParams_.Encode() 4583 req, err := http.NewRequest("POST", urls, body) 4584 if err != nil { 4585 return nil, err 4586 } 4587 req.Header = reqHeaders 4588 googleapi.Expand(req.URL, map[string]string{ 4589 "appsId": c.appsId, 4590 }) 4591 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4592} 4593 4594// Do executes the "appengine.apps.authorizedCertificates.create" call. 4595// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 4596// non-2xx status code is an error. Response headers are in either 4597// *AuthorizedCertificate.ServerResponse.Header or (if a response was 4598// returned at all) in error.(*googleapi.Error).Header. Use 4599// googleapi.IsNotModified to check whether the returned error was 4600// because http.StatusNotModified was returned. 4601func (c *AppsAuthorizedCertificatesCreateCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 4602 gensupport.SetOptions(c.urlParams_, opts...) 4603 res, err := c.doRequest("json") 4604 if res != nil && res.StatusCode == http.StatusNotModified { 4605 if res.Body != nil { 4606 res.Body.Close() 4607 } 4608 return nil, &googleapi.Error{ 4609 Code: res.StatusCode, 4610 Header: res.Header, 4611 } 4612 } 4613 if err != nil { 4614 return nil, err 4615 } 4616 defer googleapi.CloseBody(res) 4617 if err := googleapi.CheckResponse(res); err != nil { 4618 return nil, err 4619 } 4620 ret := &AuthorizedCertificate{ 4621 ServerResponse: googleapi.ServerResponse{ 4622 Header: res.Header, 4623 HTTPStatusCode: res.StatusCode, 4624 }, 4625 } 4626 target := &ret 4627 if err := gensupport.DecodeResponse(target, res); err != nil { 4628 return nil, err 4629 } 4630 return ret, nil 4631 // { 4632 // "description": "Uploads the specified SSL certificate.", 4633 // "flatPath": "v1/apps/{appsId}/authorizedCertificates", 4634 // "httpMethod": "POST", 4635 // "id": "appengine.apps.authorizedCertificates.create", 4636 // "parameterOrder": [ 4637 // "appsId" 4638 // ], 4639 // "parameters": { 4640 // "appsId": { 4641 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 4642 // "location": "path", 4643 // "required": true, 4644 // "type": "string" 4645 // } 4646 // }, 4647 // "path": "v1/apps/{appsId}/authorizedCertificates", 4648 // "request": { 4649 // "$ref": "AuthorizedCertificate" 4650 // }, 4651 // "response": { 4652 // "$ref": "AuthorizedCertificate" 4653 // }, 4654 // "scopes": [ 4655 // "https://www.googleapis.com/auth/cloud-platform" 4656 // ] 4657 // } 4658 4659} 4660 4661// method id "appengine.apps.authorizedCertificates.delete": 4662 4663type AppsAuthorizedCertificatesDeleteCall struct { 4664 s *APIService 4665 appsId string 4666 authorizedCertificatesId string 4667 urlParams_ gensupport.URLParams 4668 ctx_ context.Context 4669 header_ http.Header 4670} 4671 4672// Delete: Deletes the specified SSL certificate. 4673// 4674// - appsId: Part of `name`. Name of the resource to delete. Example: 4675// apps/myapp/authorizedCertificates/12345. 4676// - authorizedCertificatesId: Part of `name`. See documentation of 4677// `appsId`. 4678func (r *AppsAuthorizedCertificatesService) Delete(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesDeleteCall { 4679 c := &AppsAuthorizedCertificatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4680 c.appsId = appsId 4681 c.authorizedCertificatesId = authorizedCertificatesId 4682 return c 4683} 4684 4685// Fields allows partial responses to be retrieved. See 4686// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4687// for more information. 4688func (c *AppsAuthorizedCertificatesDeleteCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesDeleteCall { 4689 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4690 return c 4691} 4692 4693// Context sets the context to be used in this call's Do method. Any 4694// pending HTTP request will be aborted if the provided context is 4695// canceled. 4696func (c *AppsAuthorizedCertificatesDeleteCall) Context(ctx context.Context) *AppsAuthorizedCertificatesDeleteCall { 4697 c.ctx_ = ctx 4698 return c 4699} 4700 4701// Header returns an http.Header that can be modified by the caller to 4702// add HTTP headers to the request. 4703func (c *AppsAuthorizedCertificatesDeleteCall) Header() http.Header { 4704 if c.header_ == nil { 4705 c.header_ = make(http.Header) 4706 } 4707 return c.header_ 4708} 4709 4710func (c *AppsAuthorizedCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) { 4711 reqHeaders := make(http.Header) 4712 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 4713 for k, v := range c.header_ { 4714 reqHeaders[k] = v 4715 } 4716 reqHeaders.Set("User-Agent", c.s.userAgent()) 4717 var body io.Reader = nil 4718 c.urlParams_.Set("alt", alt) 4719 c.urlParams_.Set("prettyPrint", "false") 4720 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 4721 urls += "?" + c.urlParams_.Encode() 4722 req, err := http.NewRequest("DELETE", urls, body) 4723 if err != nil { 4724 return nil, err 4725 } 4726 req.Header = reqHeaders 4727 googleapi.Expand(req.URL, map[string]string{ 4728 "appsId": c.appsId, 4729 "authorizedCertificatesId": c.authorizedCertificatesId, 4730 }) 4731 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4732} 4733 4734// Do executes the "appengine.apps.authorizedCertificates.delete" call. 4735// Exactly one of *Empty or error will be non-nil. Any non-2xx status 4736// code is an error. Response headers are in either 4737// *Empty.ServerResponse.Header or (if a response was returned at all) 4738// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4739// check whether the returned error was because http.StatusNotModified 4740// was returned. 4741func (c *AppsAuthorizedCertificatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4742 gensupport.SetOptions(c.urlParams_, opts...) 4743 res, err := c.doRequest("json") 4744 if res != nil && res.StatusCode == http.StatusNotModified { 4745 if res.Body != nil { 4746 res.Body.Close() 4747 } 4748 return nil, &googleapi.Error{ 4749 Code: res.StatusCode, 4750 Header: res.Header, 4751 } 4752 } 4753 if err != nil { 4754 return nil, err 4755 } 4756 defer googleapi.CloseBody(res) 4757 if err := googleapi.CheckResponse(res); err != nil { 4758 return nil, err 4759 } 4760 ret := &Empty{ 4761 ServerResponse: googleapi.ServerResponse{ 4762 Header: res.Header, 4763 HTTPStatusCode: res.StatusCode, 4764 }, 4765 } 4766 target := &ret 4767 if err := gensupport.DecodeResponse(target, res); err != nil { 4768 return nil, err 4769 } 4770 return ret, nil 4771 // { 4772 // "description": "Deletes the specified SSL certificate.", 4773 // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4774 // "httpMethod": "DELETE", 4775 // "id": "appengine.apps.authorizedCertificates.delete", 4776 // "parameterOrder": [ 4777 // "appsId", 4778 // "authorizedCertificatesId" 4779 // ], 4780 // "parameters": { 4781 // "appsId": { 4782 // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", 4783 // "location": "path", 4784 // "required": true, 4785 // "type": "string" 4786 // }, 4787 // "authorizedCertificatesId": { 4788 // "description": "Part of `name`. See documentation of `appsId`.", 4789 // "location": "path", 4790 // "required": true, 4791 // "type": "string" 4792 // } 4793 // }, 4794 // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4795 // "response": { 4796 // "$ref": "Empty" 4797 // }, 4798 // "scopes": [ 4799 // "https://www.googleapis.com/auth/cloud-platform" 4800 // ] 4801 // } 4802 4803} 4804 4805// method id "appengine.apps.authorizedCertificates.get": 4806 4807type AppsAuthorizedCertificatesGetCall struct { 4808 s *APIService 4809 appsId string 4810 authorizedCertificatesId string 4811 urlParams_ gensupport.URLParams 4812 ifNoneMatch_ string 4813 ctx_ context.Context 4814 header_ http.Header 4815} 4816 4817// Get: Gets the specified SSL certificate. 4818// 4819// - appsId: Part of `name`. Name of the resource requested. Example: 4820// apps/myapp/authorizedCertificates/12345. 4821// - authorizedCertificatesId: Part of `name`. See documentation of 4822// `appsId`. 4823func (r *AppsAuthorizedCertificatesService) Get(appsId string, authorizedCertificatesId string) *AppsAuthorizedCertificatesGetCall { 4824 c := &AppsAuthorizedCertificatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4825 c.appsId = appsId 4826 c.authorizedCertificatesId = authorizedCertificatesId 4827 return c 4828} 4829 4830// View sets the optional parameter "view": Controls the set of fields 4831// returned in the GET response. 4832// 4833// Possible values: 4834// "BASIC_CERTIFICATE" - Basic certificate information, including 4835// applicable domains and expiration date. 4836// "FULL_CERTIFICATE" - The information from BASIC_CERTIFICATE, plus 4837// detailed information on the domain mappings that have this 4838// certificate mapped. 4839func (c *AppsAuthorizedCertificatesGetCall) View(view string) *AppsAuthorizedCertificatesGetCall { 4840 c.urlParams_.Set("view", view) 4841 return c 4842} 4843 4844// Fields allows partial responses to be retrieved. See 4845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4846// for more information. 4847func (c *AppsAuthorizedCertificatesGetCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesGetCall { 4848 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4849 return c 4850} 4851 4852// IfNoneMatch sets the optional parameter which makes the operation 4853// fail if the object's ETag matches the given value. This is useful for 4854// getting updates only after the object has changed since the last 4855// request. Use googleapi.IsNotModified to check whether the response 4856// error from Do is the result of In-None-Match. 4857func (c *AppsAuthorizedCertificatesGetCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesGetCall { 4858 c.ifNoneMatch_ = entityTag 4859 return c 4860} 4861 4862// Context sets the context to be used in this call's Do method. Any 4863// pending HTTP request will be aborted if the provided context is 4864// canceled. 4865func (c *AppsAuthorizedCertificatesGetCall) Context(ctx context.Context) *AppsAuthorizedCertificatesGetCall { 4866 c.ctx_ = ctx 4867 return c 4868} 4869 4870// Header returns an http.Header that can be modified by the caller to 4871// add HTTP headers to the request. 4872func (c *AppsAuthorizedCertificatesGetCall) Header() http.Header { 4873 if c.header_ == nil { 4874 c.header_ = make(http.Header) 4875 } 4876 return c.header_ 4877} 4878 4879func (c *AppsAuthorizedCertificatesGetCall) doRequest(alt string) (*http.Response, error) { 4880 reqHeaders := make(http.Header) 4881 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 4882 for k, v := range c.header_ { 4883 reqHeaders[k] = v 4884 } 4885 reqHeaders.Set("User-Agent", c.s.userAgent()) 4886 if c.ifNoneMatch_ != "" { 4887 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4888 } 4889 var body io.Reader = nil 4890 c.urlParams_.Set("alt", alt) 4891 c.urlParams_.Set("prettyPrint", "false") 4892 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 4893 urls += "?" + c.urlParams_.Encode() 4894 req, err := http.NewRequest("GET", urls, body) 4895 if err != nil { 4896 return nil, err 4897 } 4898 req.Header = reqHeaders 4899 googleapi.Expand(req.URL, map[string]string{ 4900 "appsId": c.appsId, 4901 "authorizedCertificatesId": c.authorizedCertificatesId, 4902 }) 4903 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4904} 4905 4906// Do executes the "appengine.apps.authorizedCertificates.get" call. 4907// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 4908// non-2xx status code is an error. Response headers are in either 4909// *AuthorizedCertificate.ServerResponse.Header or (if a response was 4910// returned at all) in error.(*googleapi.Error).Header. Use 4911// googleapi.IsNotModified to check whether the returned error was 4912// because http.StatusNotModified was returned. 4913func (c *AppsAuthorizedCertificatesGetCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 4914 gensupport.SetOptions(c.urlParams_, opts...) 4915 res, err := c.doRequest("json") 4916 if res != nil && res.StatusCode == http.StatusNotModified { 4917 if res.Body != nil { 4918 res.Body.Close() 4919 } 4920 return nil, &googleapi.Error{ 4921 Code: res.StatusCode, 4922 Header: res.Header, 4923 } 4924 } 4925 if err != nil { 4926 return nil, err 4927 } 4928 defer googleapi.CloseBody(res) 4929 if err := googleapi.CheckResponse(res); err != nil { 4930 return nil, err 4931 } 4932 ret := &AuthorizedCertificate{ 4933 ServerResponse: googleapi.ServerResponse{ 4934 Header: res.Header, 4935 HTTPStatusCode: res.StatusCode, 4936 }, 4937 } 4938 target := &ret 4939 if err := gensupport.DecodeResponse(target, res); err != nil { 4940 return nil, err 4941 } 4942 return ret, nil 4943 // { 4944 // "description": "Gets the specified SSL certificate.", 4945 // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4946 // "httpMethod": "GET", 4947 // "id": "appengine.apps.authorizedCertificates.get", 4948 // "parameterOrder": [ 4949 // "appsId", 4950 // "authorizedCertificatesId" 4951 // ], 4952 // "parameters": { 4953 // "appsId": { 4954 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", 4955 // "location": "path", 4956 // "required": true, 4957 // "type": "string" 4958 // }, 4959 // "authorizedCertificatesId": { 4960 // "description": "Part of `name`. See documentation of `appsId`.", 4961 // "location": "path", 4962 // "required": true, 4963 // "type": "string" 4964 // }, 4965 // "view": { 4966 // "description": "Controls the set of fields returned in the GET response.", 4967 // "enum": [ 4968 // "BASIC_CERTIFICATE", 4969 // "FULL_CERTIFICATE" 4970 // ], 4971 // "enumDescriptions": [ 4972 // "Basic certificate information, including applicable domains and expiration date.", 4973 // "The information from BASIC_CERTIFICATE, plus detailed information on the domain mappings that have this certificate mapped." 4974 // ], 4975 // "location": "query", 4976 // "type": "string" 4977 // } 4978 // }, 4979 // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 4980 // "response": { 4981 // "$ref": "AuthorizedCertificate" 4982 // }, 4983 // "scopes": [ 4984 // "https://www.googleapis.com/auth/appengine.admin", 4985 // "https://www.googleapis.com/auth/cloud-platform", 4986 // "https://www.googleapis.com/auth/cloud-platform.read-only" 4987 // ] 4988 // } 4989 4990} 4991 4992// method id "appengine.apps.authorizedCertificates.list": 4993 4994type AppsAuthorizedCertificatesListCall struct { 4995 s *APIService 4996 appsId string 4997 urlParams_ gensupport.URLParams 4998 ifNoneMatch_ string 4999 ctx_ context.Context 5000 header_ http.Header 5001} 5002 5003// List: Lists all SSL certificates the user is authorized to 5004// administer. 5005// 5006// - appsId: Part of `parent`. Name of the parent Application resource. 5007// Example: apps/myapp. 5008func (r *AppsAuthorizedCertificatesService) List(appsId string) *AppsAuthorizedCertificatesListCall { 5009 c := &AppsAuthorizedCertificatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5010 c.appsId = appsId 5011 return c 5012} 5013 5014// PageSize sets the optional parameter "pageSize": Maximum results to 5015// return per page. 5016func (c *AppsAuthorizedCertificatesListCall) PageSize(pageSize int64) *AppsAuthorizedCertificatesListCall { 5017 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5018 return c 5019} 5020 5021// PageToken sets the optional parameter "pageToken": Continuation token 5022// for fetching the next page of results. 5023func (c *AppsAuthorizedCertificatesListCall) PageToken(pageToken string) *AppsAuthorizedCertificatesListCall { 5024 c.urlParams_.Set("pageToken", pageToken) 5025 return c 5026} 5027 5028// View sets the optional parameter "view": Controls the set of fields 5029// returned in the LIST response. 5030// 5031// Possible values: 5032// "BASIC_CERTIFICATE" - Basic certificate information, including 5033// applicable domains and expiration date. 5034// "FULL_CERTIFICATE" - The information from BASIC_CERTIFICATE, plus 5035// detailed information on the domain mappings that have this 5036// certificate mapped. 5037func (c *AppsAuthorizedCertificatesListCall) View(view string) *AppsAuthorizedCertificatesListCall { 5038 c.urlParams_.Set("view", view) 5039 return c 5040} 5041 5042// Fields allows partial responses to be retrieved. See 5043// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5044// for more information. 5045func (c *AppsAuthorizedCertificatesListCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesListCall { 5046 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5047 return c 5048} 5049 5050// IfNoneMatch sets the optional parameter which makes the operation 5051// fail if the object's ETag matches the given value. This is useful for 5052// getting updates only after the object has changed since the last 5053// request. Use googleapi.IsNotModified to check whether the response 5054// error from Do is the result of In-None-Match. 5055func (c *AppsAuthorizedCertificatesListCall) IfNoneMatch(entityTag string) *AppsAuthorizedCertificatesListCall { 5056 c.ifNoneMatch_ = entityTag 5057 return c 5058} 5059 5060// Context sets the context to be used in this call's Do method. Any 5061// pending HTTP request will be aborted if the provided context is 5062// canceled. 5063func (c *AppsAuthorizedCertificatesListCall) Context(ctx context.Context) *AppsAuthorizedCertificatesListCall { 5064 c.ctx_ = ctx 5065 return c 5066} 5067 5068// Header returns an http.Header that can be modified by the caller to 5069// add HTTP headers to the request. 5070func (c *AppsAuthorizedCertificatesListCall) Header() http.Header { 5071 if c.header_ == nil { 5072 c.header_ = make(http.Header) 5073 } 5074 return c.header_ 5075} 5076 5077func (c *AppsAuthorizedCertificatesListCall) doRequest(alt string) (*http.Response, error) { 5078 reqHeaders := make(http.Header) 5079 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 5080 for k, v := range c.header_ { 5081 reqHeaders[k] = v 5082 } 5083 reqHeaders.Set("User-Agent", c.s.userAgent()) 5084 if c.ifNoneMatch_ != "" { 5085 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5086 } 5087 var body io.Reader = nil 5088 c.urlParams_.Set("alt", alt) 5089 c.urlParams_.Set("prettyPrint", "false") 5090 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates") 5091 urls += "?" + c.urlParams_.Encode() 5092 req, err := http.NewRequest("GET", urls, body) 5093 if err != nil { 5094 return nil, err 5095 } 5096 req.Header = reqHeaders 5097 googleapi.Expand(req.URL, map[string]string{ 5098 "appsId": c.appsId, 5099 }) 5100 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5101} 5102 5103// Do executes the "appengine.apps.authorizedCertificates.list" call. 5104// Exactly one of *ListAuthorizedCertificatesResponse or error will be 5105// non-nil. Any non-2xx status code is an error. Response headers are in 5106// either *ListAuthorizedCertificatesResponse.ServerResponse.Header or 5107// (if a response was returned at all) in 5108// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5109// whether the returned error was because http.StatusNotModified was 5110// returned. 5111func (c *AppsAuthorizedCertificatesListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedCertificatesResponse, error) { 5112 gensupport.SetOptions(c.urlParams_, opts...) 5113 res, err := c.doRequest("json") 5114 if res != nil && res.StatusCode == http.StatusNotModified { 5115 if res.Body != nil { 5116 res.Body.Close() 5117 } 5118 return nil, &googleapi.Error{ 5119 Code: res.StatusCode, 5120 Header: res.Header, 5121 } 5122 } 5123 if err != nil { 5124 return nil, err 5125 } 5126 defer googleapi.CloseBody(res) 5127 if err := googleapi.CheckResponse(res); err != nil { 5128 return nil, err 5129 } 5130 ret := &ListAuthorizedCertificatesResponse{ 5131 ServerResponse: googleapi.ServerResponse{ 5132 Header: res.Header, 5133 HTTPStatusCode: res.StatusCode, 5134 }, 5135 } 5136 target := &ret 5137 if err := gensupport.DecodeResponse(target, res); err != nil { 5138 return nil, err 5139 } 5140 return ret, nil 5141 // { 5142 // "description": "Lists all SSL certificates the user is authorized to administer.", 5143 // "flatPath": "v1/apps/{appsId}/authorizedCertificates", 5144 // "httpMethod": "GET", 5145 // "id": "appengine.apps.authorizedCertificates.list", 5146 // "parameterOrder": [ 5147 // "appsId" 5148 // ], 5149 // "parameters": { 5150 // "appsId": { 5151 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5152 // "location": "path", 5153 // "required": true, 5154 // "type": "string" 5155 // }, 5156 // "pageSize": { 5157 // "description": "Maximum results to return per page.", 5158 // "format": "int32", 5159 // "location": "query", 5160 // "type": "integer" 5161 // }, 5162 // "pageToken": { 5163 // "description": "Continuation token for fetching the next page of results.", 5164 // "location": "query", 5165 // "type": "string" 5166 // }, 5167 // "view": { 5168 // "description": "Controls the set of fields returned in the LIST response.", 5169 // "enum": [ 5170 // "BASIC_CERTIFICATE", 5171 // "FULL_CERTIFICATE" 5172 // ], 5173 // "enumDescriptions": [ 5174 // "Basic certificate information, including applicable domains and expiration date.", 5175 // "The information from BASIC_CERTIFICATE, plus detailed information on the domain mappings that have this certificate mapped." 5176 // ], 5177 // "location": "query", 5178 // "type": "string" 5179 // } 5180 // }, 5181 // "path": "v1/apps/{appsId}/authorizedCertificates", 5182 // "response": { 5183 // "$ref": "ListAuthorizedCertificatesResponse" 5184 // }, 5185 // "scopes": [ 5186 // "https://www.googleapis.com/auth/appengine.admin", 5187 // "https://www.googleapis.com/auth/cloud-platform", 5188 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5189 // ] 5190 // } 5191 5192} 5193 5194// Pages invokes f for each page of results. 5195// A non-nil error returned from f will halt the iteration. 5196// The provided context supersedes any context provided to the Context method. 5197func (c *AppsAuthorizedCertificatesListCall) Pages(ctx context.Context, f func(*ListAuthorizedCertificatesResponse) error) error { 5198 c.ctx_ = ctx 5199 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5200 for { 5201 x, err := c.Do() 5202 if err != nil { 5203 return err 5204 } 5205 if err := f(x); err != nil { 5206 return err 5207 } 5208 if x.NextPageToken == "" { 5209 return nil 5210 } 5211 c.PageToken(x.NextPageToken) 5212 } 5213} 5214 5215// method id "appengine.apps.authorizedCertificates.patch": 5216 5217type AppsAuthorizedCertificatesPatchCall struct { 5218 s *APIService 5219 appsId string 5220 authorizedCertificatesId string 5221 authorizedcertificate *AuthorizedCertificate 5222 urlParams_ gensupport.URLParams 5223 ctx_ context.Context 5224 header_ http.Header 5225} 5226 5227// Patch: Updates the specified SSL certificate. To renew a certificate 5228// and maintain its existing domain mappings, update certificate_data 5229// with a new certificate. The new certificate must be applicable to the 5230// same domains as the original certificate. The certificate 5231// display_name may also be updated. 5232// 5233// - appsId: Part of `name`. Name of the resource to update. Example: 5234// apps/myapp/authorizedCertificates/12345. 5235// - authorizedCertificatesId: Part of `name`. See documentation of 5236// `appsId`. 5237func (r *AppsAuthorizedCertificatesService) Patch(appsId string, authorizedCertificatesId string, authorizedcertificate *AuthorizedCertificate) *AppsAuthorizedCertificatesPatchCall { 5238 c := &AppsAuthorizedCertificatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5239 c.appsId = appsId 5240 c.authorizedCertificatesId = authorizedCertificatesId 5241 c.authorizedcertificate = authorizedcertificate 5242 return c 5243} 5244 5245// UpdateMask sets the optional parameter "updateMask": Standard field 5246// mask for the set of fields to be updated. Updates are only supported 5247// on the certificate_raw_data and display_name fields. 5248func (c *AppsAuthorizedCertificatesPatchCall) UpdateMask(updateMask string) *AppsAuthorizedCertificatesPatchCall { 5249 c.urlParams_.Set("updateMask", updateMask) 5250 return c 5251} 5252 5253// Fields allows partial responses to be retrieved. See 5254// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5255// for more information. 5256func (c *AppsAuthorizedCertificatesPatchCall) Fields(s ...googleapi.Field) *AppsAuthorizedCertificatesPatchCall { 5257 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5258 return c 5259} 5260 5261// Context sets the context to be used in this call's Do method. Any 5262// pending HTTP request will be aborted if the provided context is 5263// canceled. 5264func (c *AppsAuthorizedCertificatesPatchCall) Context(ctx context.Context) *AppsAuthorizedCertificatesPatchCall { 5265 c.ctx_ = ctx 5266 return c 5267} 5268 5269// Header returns an http.Header that can be modified by the caller to 5270// add HTTP headers to the request. 5271func (c *AppsAuthorizedCertificatesPatchCall) Header() http.Header { 5272 if c.header_ == nil { 5273 c.header_ = make(http.Header) 5274 } 5275 return c.header_ 5276} 5277 5278func (c *AppsAuthorizedCertificatesPatchCall) doRequest(alt string) (*http.Response, error) { 5279 reqHeaders := make(http.Header) 5280 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 5281 for k, v := range c.header_ { 5282 reqHeaders[k] = v 5283 } 5284 reqHeaders.Set("User-Agent", c.s.userAgent()) 5285 var body io.Reader = nil 5286 body, err := googleapi.WithoutDataWrapper.JSONReader(c.authorizedcertificate) 5287 if err != nil { 5288 return nil, err 5289 } 5290 reqHeaders.Set("Content-Type", "application/json") 5291 c.urlParams_.Set("alt", alt) 5292 c.urlParams_.Set("prettyPrint", "false") 5293 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}") 5294 urls += "?" + c.urlParams_.Encode() 5295 req, err := http.NewRequest("PATCH", urls, body) 5296 if err != nil { 5297 return nil, err 5298 } 5299 req.Header = reqHeaders 5300 googleapi.Expand(req.URL, map[string]string{ 5301 "appsId": c.appsId, 5302 "authorizedCertificatesId": c.authorizedCertificatesId, 5303 }) 5304 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5305} 5306 5307// Do executes the "appengine.apps.authorizedCertificates.patch" call. 5308// Exactly one of *AuthorizedCertificate or error will be non-nil. Any 5309// non-2xx status code is an error. Response headers are in either 5310// *AuthorizedCertificate.ServerResponse.Header or (if a response was 5311// returned at all) in error.(*googleapi.Error).Header. Use 5312// googleapi.IsNotModified to check whether the returned error was 5313// because http.StatusNotModified was returned. 5314func (c *AppsAuthorizedCertificatesPatchCall) Do(opts ...googleapi.CallOption) (*AuthorizedCertificate, error) { 5315 gensupport.SetOptions(c.urlParams_, opts...) 5316 res, err := c.doRequest("json") 5317 if res != nil && res.StatusCode == http.StatusNotModified { 5318 if res.Body != nil { 5319 res.Body.Close() 5320 } 5321 return nil, &googleapi.Error{ 5322 Code: res.StatusCode, 5323 Header: res.Header, 5324 } 5325 } 5326 if err != nil { 5327 return nil, err 5328 } 5329 defer googleapi.CloseBody(res) 5330 if err := googleapi.CheckResponse(res); err != nil { 5331 return nil, err 5332 } 5333 ret := &AuthorizedCertificate{ 5334 ServerResponse: googleapi.ServerResponse{ 5335 Header: res.Header, 5336 HTTPStatusCode: res.StatusCode, 5337 }, 5338 } 5339 target := &ret 5340 if err := gensupport.DecodeResponse(target, res); err != nil { 5341 return nil, err 5342 } 5343 return ret, nil 5344 // { 5345 // "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.", 5346 // "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 5347 // "httpMethod": "PATCH", 5348 // "id": "appengine.apps.authorizedCertificates.patch", 5349 // "parameterOrder": [ 5350 // "appsId", 5351 // "authorizedCertificatesId" 5352 // ], 5353 // "parameters": { 5354 // "appsId": { 5355 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", 5356 // "location": "path", 5357 // "required": true, 5358 // "type": "string" 5359 // }, 5360 // "authorizedCertificatesId": { 5361 // "description": "Part of `name`. See documentation of `appsId`.", 5362 // "location": "path", 5363 // "required": true, 5364 // "type": "string" 5365 // }, 5366 // "updateMask": { 5367 // "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.", 5368 // "format": "google-fieldmask", 5369 // "location": "query", 5370 // "type": "string" 5371 // } 5372 // }, 5373 // "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", 5374 // "request": { 5375 // "$ref": "AuthorizedCertificate" 5376 // }, 5377 // "response": { 5378 // "$ref": "AuthorizedCertificate" 5379 // }, 5380 // "scopes": [ 5381 // "https://www.googleapis.com/auth/cloud-platform" 5382 // ] 5383 // } 5384 5385} 5386 5387// method id "appengine.apps.authorizedDomains.list": 5388 5389type AppsAuthorizedDomainsListCall struct { 5390 s *APIService 5391 appsId string 5392 urlParams_ gensupport.URLParams 5393 ifNoneMatch_ string 5394 ctx_ context.Context 5395 header_ http.Header 5396} 5397 5398// List: Lists all domains the user is authorized to administer. 5399// 5400// - appsId: Part of `parent`. Name of the parent Application resource. 5401// Example: apps/myapp. 5402func (r *AppsAuthorizedDomainsService) List(appsId string) *AppsAuthorizedDomainsListCall { 5403 c := &AppsAuthorizedDomainsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5404 c.appsId = appsId 5405 return c 5406} 5407 5408// PageSize sets the optional parameter "pageSize": Maximum results to 5409// return per page. 5410func (c *AppsAuthorizedDomainsListCall) PageSize(pageSize int64) *AppsAuthorizedDomainsListCall { 5411 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5412 return c 5413} 5414 5415// PageToken sets the optional parameter "pageToken": Continuation token 5416// for fetching the next page of results. 5417func (c *AppsAuthorizedDomainsListCall) PageToken(pageToken string) *AppsAuthorizedDomainsListCall { 5418 c.urlParams_.Set("pageToken", pageToken) 5419 return c 5420} 5421 5422// Fields allows partial responses to be retrieved. See 5423// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5424// for more information. 5425func (c *AppsAuthorizedDomainsListCall) Fields(s ...googleapi.Field) *AppsAuthorizedDomainsListCall { 5426 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5427 return c 5428} 5429 5430// IfNoneMatch sets the optional parameter which makes the operation 5431// fail if the object's ETag matches the given value. This is useful for 5432// getting updates only after the object has changed since the last 5433// request. Use googleapi.IsNotModified to check whether the response 5434// error from Do is the result of In-None-Match. 5435func (c *AppsAuthorizedDomainsListCall) IfNoneMatch(entityTag string) *AppsAuthorizedDomainsListCall { 5436 c.ifNoneMatch_ = entityTag 5437 return c 5438} 5439 5440// Context sets the context to be used in this call's Do method. Any 5441// pending HTTP request will be aborted if the provided context is 5442// canceled. 5443func (c *AppsAuthorizedDomainsListCall) Context(ctx context.Context) *AppsAuthorizedDomainsListCall { 5444 c.ctx_ = ctx 5445 return c 5446} 5447 5448// Header returns an http.Header that can be modified by the caller to 5449// add HTTP headers to the request. 5450func (c *AppsAuthorizedDomainsListCall) Header() http.Header { 5451 if c.header_ == nil { 5452 c.header_ = make(http.Header) 5453 } 5454 return c.header_ 5455} 5456 5457func (c *AppsAuthorizedDomainsListCall) doRequest(alt string) (*http.Response, error) { 5458 reqHeaders := make(http.Header) 5459 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 5460 for k, v := range c.header_ { 5461 reqHeaders[k] = v 5462 } 5463 reqHeaders.Set("User-Agent", c.s.userAgent()) 5464 if c.ifNoneMatch_ != "" { 5465 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5466 } 5467 var body io.Reader = nil 5468 c.urlParams_.Set("alt", alt) 5469 c.urlParams_.Set("prettyPrint", "false") 5470 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/authorizedDomains") 5471 urls += "?" + c.urlParams_.Encode() 5472 req, err := http.NewRequest("GET", urls, body) 5473 if err != nil { 5474 return nil, err 5475 } 5476 req.Header = reqHeaders 5477 googleapi.Expand(req.URL, map[string]string{ 5478 "appsId": c.appsId, 5479 }) 5480 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5481} 5482 5483// Do executes the "appengine.apps.authorizedDomains.list" call. 5484// Exactly one of *ListAuthorizedDomainsResponse or error will be 5485// non-nil. Any non-2xx status code is an error. Response headers are in 5486// either *ListAuthorizedDomainsResponse.ServerResponse.Header or (if a 5487// response was returned at all) in error.(*googleapi.Error).Header. Use 5488// googleapi.IsNotModified to check whether the returned error was 5489// because http.StatusNotModified was returned. 5490func (c *AppsAuthorizedDomainsListCall) Do(opts ...googleapi.CallOption) (*ListAuthorizedDomainsResponse, error) { 5491 gensupport.SetOptions(c.urlParams_, opts...) 5492 res, err := c.doRequest("json") 5493 if res != nil && res.StatusCode == http.StatusNotModified { 5494 if res.Body != nil { 5495 res.Body.Close() 5496 } 5497 return nil, &googleapi.Error{ 5498 Code: res.StatusCode, 5499 Header: res.Header, 5500 } 5501 } 5502 if err != nil { 5503 return nil, err 5504 } 5505 defer googleapi.CloseBody(res) 5506 if err := googleapi.CheckResponse(res); err != nil { 5507 return nil, err 5508 } 5509 ret := &ListAuthorizedDomainsResponse{ 5510 ServerResponse: googleapi.ServerResponse{ 5511 Header: res.Header, 5512 HTTPStatusCode: res.StatusCode, 5513 }, 5514 } 5515 target := &ret 5516 if err := gensupport.DecodeResponse(target, res); err != nil { 5517 return nil, err 5518 } 5519 return ret, nil 5520 // { 5521 // "description": "Lists all domains the user is authorized to administer.", 5522 // "flatPath": "v1/apps/{appsId}/authorizedDomains", 5523 // "httpMethod": "GET", 5524 // "id": "appengine.apps.authorizedDomains.list", 5525 // "parameterOrder": [ 5526 // "appsId" 5527 // ], 5528 // "parameters": { 5529 // "appsId": { 5530 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5531 // "location": "path", 5532 // "required": true, 5533 // "type": "string" 5534 // }, 5535 // "pageSize": { 5536 // "description": "Maximum results to return per page.", 5537 // "format": "int32", 5538 // "location": "query", 5539 // "type": "integer" 5540 // }, 5541 // "pageToken": { 5542 // "description": "Continuation token for fetching the next page of results.", 5543 // "location": "query", 5544 // "type": "string" 5545 // } 5546 // }, 5547 // "path": "v1/apps/{appsId}/authorizedDomains", 5548 // "response": { 5549 // "$ref": "ListAuthorizedDomainsResponse" 5550 // }, 5551 // "scopes": [ 5552 // "https://www.googleapis.com/auth/appengine.admin", 5553 // "https://www.googleapis.com/auth/cloud-platform", 5554 // "https://www.googleapis.com/auth/cloud-platform.read-only" 5555 // ] 5556 // } 5557 5558} 5559 5560// Pages invokes f for each page of results. 5561// A non-nil error returned from f will halt the iteration. 5562// The provided context supersedes any context provided to the Context method. 5563func (c *AppsAuthorizedDomainsListCall) Pages(ctx context.Context, f func(*ListAuthorizedDomainsResponse) error) error { 5564 c.ctx_ = ctx 5565 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5566 for { 5567 x, err := c.Do() 5568 if err != nil { 5569 return err 5570 } 5571 if err := f(x); err != nil { 5572 return err 5573 } 5574 if x.NextPageToken == "" { 5575 return nil 5576 } 5577 c.PageToken(x.NextPageToken) 5578 } 5579} 5580 5581// method id "appengine.apps.domainMappings.create": 5582 5583type AppsDomainMappingsCreateCall struct { 5584 s *APIService 5585 appsId string 5586 domainmapping *DomainMapping 5587 urlParams_ gensupport.URLParams 5588 ctx_ context.Context 5589 header_ http.Header 5590} 5591 5592// Create: Maps a domain to an application. A user must be authorized to 5593// administer a domain in order to map it to an application. For a list 5594// of available authorized domains, see 5595// AuthorizedDomains.ListAuthorizedDomains. 5596// 5597// - appsId: Part of `parent`. Name of the parent Application resource. 5598// Example: apps/myapp. 5599func (r *AppsDomainMappingsService) Create(appsId string, domainmapping *DomainMapping) *AppsDomainMappingsCreateCall { 5600 c := &AppsDomainMappingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5601 c.appsId = appsId 5602 c.domainmapping = domainmapping 5603 return c 5604} 5605 5606// OverrideStrategy sets the optional parameter "overrideStrategy": 5607// Whether the domain creation should override any existing mappings for 5608// this domain. By default, overrides are rejected. 5609// 5610// Possible values: 5611// "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY" - Strategy unspecified. 5612// Defaults to STRICT. 5613// "STRICT" - Overrides not allowed. If a mapping already exists for 5614// the specified domain, the request will return an ALREADY_EXISTS 5615// (409). 5616// "OVERRIDE" - Overrides allowed. If a mapping already exists for the 5617// specified domain, the request will overwrite it. Note that this might 5618// stop another Google product from serving. For example, if the domain 5619// is mapped to another App Engine application, that app will no longer 5620// serve from that domain. 5621func (c *AppsDomainMappingsCreateCall) OverrideStrategy(overrideStrategy string) *AppsDomainMappingsCreateCall { 5622 c.urlParams_.Set("overrideStrategy", overrideStrategy) 5623 return c 5624} 5625 5626// Fields allows partial responses to be retrieved. See 5627// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5628// for more information. 5629func (c *AppsDomainMappingsCreateCall) Fields(s ...googleapi.Field) *AppsDomainMappingsCreateCall { 5630 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5631 return c 5632} 5633 5634// Context sets the context to be used in this call's Do method. Any 5635// pending HTTP request will be aborted if the provided context is 5636// canceled. 5637func (c *AppsDomainMappingsCreateCall) Context(ctx context.Context) *AppsDomainMappingsCreateCall { 5638 c.ctx_ = ctx 5639 return c 5640} 5641 5642// Header returns an http.Header that can be modified by the caller to 5643// add HTTP headers to the request. 5644func (c *AppsDomainMappingsCreateCall) Header() http.Header { 5645 if c.header_ == nil { 5646 c.header_ = make(http.Header) 5647 } 5648 return c.header_ 5649} 5650 5651func (c *AppsDomainMappingsCreateCall) doRequest(alt string) (*http.Response, error) { 5652 reqHeaders := make(http.Header) 5653 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 5654 for k, v := range c.header_ { 5655 reqHeaders[k] = v 5656 } 5657 reqHeaders.Set("User-Agent", c.s.userAgent()) 5658 var body io.Reader = nil 5659 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 5660 if err != nil { 5661 return nil, err 5662 } 5663 reqHeaders.Set("Content-Type", "application/json") 5664 c.urlParams_.Set("alt", alt) 5665 c.urlParams_.Set("prettyPrint", "false") 5666 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings") 5667 urls += "?" + c.urlParams_.Encode() 5668 req, err := http.NewRequest("POST", urls, body) 5669 if err != nil { 5670 return nil, err 5671 } 5672 req.Header = reqHeaders 5673 googleapi.Expand(req.URL, map[string]string{ 5674 "appsId": c.appsId, 5675 }) 5676 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5677} 5678 5679// Do executes the "appengine.apps.domainMappings.create" call. 5680// Exactly one of *Operation or error will be non-nil. Any non-2xx 5681// status code is an error. Response headers are in either 5682// *Operation.ServerResponse.Header or (if a response was returned at 5683// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5684// to check whether the returned error was because 5685// http.StatusNotModified was returned. 5686func (c *AppsDomainMappingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5687 gensupport.SetOptions(c.urlParams_, opts...) 5688 res, err := c.doRequest("json") 5689 if res != nil && res.StatusCode == http.StatusNotModified { 5690 if res.Body != nil { 5691 res.Body.Close() 5692 } 5693 return nil, &googleapi.Error{ 5694 Code: res.StatusCode, 5695 Header: res.Header, 5696 } 5697 } 5698 if err != nil { 5699 return nil, err 5700 } 5701 defer googleapi.CloseBody(res) 5702 if err := googleapi.CheckResponse(res); err != nil { 5703 return nil, err 5704 } 5705 ret := &Operation{ 5706 ServerResponse: googleapi.ServerResponse{ 5707 Header: res.Header, 5708 HTTPStatusCode: res.StatusCode, 5709 }, 5710 } 5711 target := &ret 5712 if err := gensupport.DecodeResponse(target, res); err != nil { 5713 return nil, err 5714 } 5715 return ret, nil 5716 // { 5717 // "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.", 5718 // "flatPath": "v1/apps/{appsId}/domainMappings", 5719 // "httpMethod": "POST", 5720 // "id": "appengine.apps.domainMappings.create", 5721 // "parameterOrder": [ 5722 // "appsId" 5723 // ], 5724 // "parameters": { 5725 // "appsId": { 5726 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 5727 // "location": "path", 5728 // "required": true, 5729 // "type": "string" 5730 // }, 5731 // "overrideStrategy": { 5732 // "description": "Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected.", 5733 // "enum": [ 5734 // "UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY", 5735 // "STRICT", 5736 // "OVERRIDE" 5737 // ], 5738 // "enumDescriptions": [ 5739 // "Strategy unspecified. Defaults to STRICT.", 5740 // "Overrides not allowed. If a mapping already exists for the specified domain, the request will return an ALREADY_EXISTS (409).", 5741 // "Overrides allowed. If a mapping already exists for the specified domain, the request will overwrite it. Note that this might stop another Google product from serving. For example, if the domain is mapped to another App Engine application, that app will no longer serve from that domain." 5742 // ], 5743 // "location": "query", 5744 // "type": "string" 5745 // } 5746 // }, 5747 // "path": "v1/apps/{appsId}/domainMappings", 5748 // "request": { 5749 // "$ref": "DomainMapping" 5750 // }, 5751 // "response": { 5752 // "$ref": "Operation" 5753 // }, 5754 // "scopes": [ 5755 // "https://www.googleapis.com/auth/cloud-platform" 5756 // ] 5757 // } 5758 5759} 5760 5761// method id "appengine.apps.domainMappings.delete": 5762 5763type AppsDomainMappingsDeleteCall struct { 5764 s *APIService 5765 appsId string 5766 domainMappingsId string 5767 urlParams_ gensupport.URLParams 5768 ctx_ context.Context 5769 header_ http.Header 5770} 5771 5772// Delete: Deletes the specified domain mapping. A user must be 5773// authorized to administer the associated domain in order to delete a 5774// DomainMapping resource. 5775// 5776// - appsId: Part of `name`. Name of the resource to delete. Example: 5777// apps/myapp/domainMappings/example.com. 5778// - domainMappingsId: Part of `name`. See documentation of `appsId`. 5779func (r *AppsDomainMappingsService) Delete(appsId string, domainMappingsId string) *AppsDomainMappingsDeleteCall { 5780 c := &AppsDomainMappingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5781 c.appsId = appsId 5782 c.domainMappingsId = domainMappingsId 5783 return c 5784} 5785 5786// Fields allows partial responses to be retrieved. See 5787// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5788// for more information. 5789func (c *AppsDomainMappingsDeleteCall) Fields(s ...googleapi.Field) *AppsDomainMappingsDeleteCall { 5790 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5791 return c 5792} 5793 5794// Context sets the context to be used in this call's Do method. Any 5795// pending HTTP request will be aborted if the provided context is 5796// canceled. 5797func (c *AppsDomainMappingsDeleteCall) Context(ctx context.Context) *AppsDomainMappingsDeleteCall { 5798 c.ctx_ = ctx 5799 return c 5800} 5801 5802// Header returns an http.Header that can be modified by the caller to 5803// add HTTP headers to the request. 5804func (c *AppsDomainMappingsDeleteCall) Header() http.Header { 5805 if c.header_ == nil { 5806 c.header_ = make(http.Header) 5807 } 5808 return c.header_ 5809} 5810 5811func (c *AppsDomainMappingsDeleteCall) doRequest(alt string) (*http.Response, error) { 5812 reqHeaders := make(http.Header) 5813 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 5814 for k, v := range c.header_ { 5815 reqHeaders[k] = v 5816 } 5817 reqHeaders.Set("User-Agent", c.s.userAgent()) 5818 var body io.Reader = nil 5819 c.urlParams_.Set("alt", alt) 5820 c.urlParams_.Set("prettyPrint", "false") 5821 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") 5822 urls += "?" + c.urlParams_.Encode() 5823 req, err := http.NewRequest("DELETE", urls, body) 5824 if err != nil { 5825 return nil, err 5826 } 5827 req.Header = reqHeaders 5828 googleapi.Expand(req.URL, map[string]string{ 5829 "appsId": c.appsId, 5830 "domainMappingsId": c.domainMappingsId, 5831 }) 5832 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5833} 5834 5835// Do executes the "appengine.apps.domainMappings.delete" call. 5836// Exactly one of *Operation or error will be non-nil. Any non-2xx 5837// status code is an error. Response headers are in either 5838// *Operation.ServerResponse.Header or (if a response was returned at 5839// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5840// to check whether the returned error was because 5841// http.StatusNotModified was returned. 5842func (c *AppsDomainMappingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5843 gensupport.SetOptions(c.urlParams_, opts...) 5844 res, err := c.doRequest("json") 5845 if res != nil && res.StatusCode == http.StatusNotModified { 5846 if res.Body != nil { 5847 res.Body.Close() 5848 } 5849 return nil, &googleapi.Error{ 5850 Code: res.StatusCode, 5851 Header: res.Header, 5852 } 5853 } 5854 if err != nil { 5855 return nil, err 5856 } 5857 defer googleapi.CloseBody(res) 5858 if err := googleapi.CheckResponse(res); err != nil { 5859 return nil, err 5860 } 5861 ret := &Operation{ 5862 ServerResponse: googleapi.ServerResponse{ 5863 Header: res.Header, 5864 HTTPStatusCode: res.StatusCode, 5865 }, 5866 } 5867 target := &ret 5868 if err := gensupport.DecodeResponse(target, res); err != nil { 5869 return nil, err 5870 } 5871 return ret, nil 5872 // { 5873 // "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", 5874 // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 5875 // "httpMethod": "DELETE", 5876 // "id": "appengine.apps.domainMappings.delete", 5877 // "parameterOrder": [ 5878 // "appsId", 5879 // "domainMappingsId" 5880 // ], 5881 // "parameters": { 5882 // "appsId": { 5883 // "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", 5884 // "location": "path", 5885 // "required": true, 5886 // "type": "string" 5887 // }, 5888 // "domainMappingsId": { 5889 // "description": "Part of `name`. See documentation of `appsId`.", 5890 // "location": "path", 5891 // "required": true, 5892 // "type": "string" 5893 // } 5894 // }, 5895 // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 5896 // "response": { 5897 // "$ref": "Operation" 5898 // }, 5899 // "scopes": [ 5900 // "https://www.googleapis.com/auth/cloud-platform" 5901 // ] 5902 // } 5903 5904} 5905 5906// method id "appengine.apps.domainMappings.get": 5907 5908type AppsDomainMappingsGetCall struct { 5909 s *APIService 5910 appsId string 5911 domainMappingsId string 5912 urlParams_ gensupport.URLParams 5913 ifNoneMatch_ string 5914 ctx_ context.Context 5915 header_ http.Header 5916} 5917 5918// Get: Gets the specified domain mapping. 5919// 5920// - appsId: Part of `name`. Name of the resource requested. Example: 5921// apps/myapp/domainMappings/example.com. 5922// - domainMappingsId: Part of `name`. See documentation of `appsId`. 5923func (r *AppsDomainMappingsService) Get(appsId string, domainMappingsId string) *AppsDomainMappingsGetCall { 5924 c := &AppsDomainMappingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5925 c.appsId = appsId 5926 c.domainMappingsId = domainMappingsId 5927 return c 5928} 5929 5930// Fields allows partial responses to be retrieved. See 5931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5932// for more information. 5933func (c *AppsDomainMappingsGetCall) Fields(s ...googleapi.Field) *AppsDomainMappingsGetCall { 5934 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5935 return c 5936} 5937 5938// IfNoneMatch sets the optional parameter which makes the operation 5939// fail if the object's ETag matches the given value. This is useful for 5940// getting updates only after the object has changed since the last 5941// request. Use googleapi.IsNotModified to check whether the response 5942// error from Do is the result of In-None-Match. 5943func (c *AppsDomainMappingsGetCall) IfNoneMatch(entityTag string) *AppsDomainMappingsGetCall { 5944 c.ifNoneMatch_ = entityTag 5945 return c 5946} 5947 5948// Context sets the context to be used in this call's Do method. Any 5949// pending HTTP request will be aborted if the provided context is 5950// canceled. 5951func (c *AppsDomainMappingsGetCall) Context(ctx context.Context) *AppsDomainMappingsGetCall { 5952 c.ctx_ = ctx 5953 return c 5954} 5955 5956// Header returns an http.Header that can be modified by the caller to 5957// add HTTP headers to the request. 5958func (c *AppsDomainMappingsGetCall) Header() http.Header { 5959 if c.header_ == nil { 5960 c.header_ = make(http.Header) 5961 } 5962 return c.header_ 5963} 5964 5965func (c *AppsDomainMappingsGetCall) doRequest(alt string) (*http.Response, error) { 5966 reqHeaders := make(http.Header) 5967 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 5968 for k, v := range c.header_ { 5969 reqHeaders[k] = v 5970 } 5971 reqHeaders.Set("User-Agent", c.s.userAgent()) 5972 if c.ifNoneMatch_ != "" { 5973 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5974 } 5975 var body io.Reader = nil 5976 c.urlParams_.Set("alt", alt) 5977 c.urlParams_.Set("prettyPrint", "false") 5978 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") 5979 urls += "?" + c.urlParams_.Encode() 5980 req, err := http.NewRequest("GET", urls, body) 5981 if err != nil { 5982 return nil, err 5983 } 5984 req.Header = reqHeaders 5985 googleapi.Expand(req.URL, map[string]string{ 5986 "appsId": c.appsId, 5987 "domainMappingsId": c.domainMappingsId, 5988 }) 5989 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5990} 5991 5992// Do executes the "appengine.apps.domainMappings.get" call. 5993// Exactly one of *DomainMapping or error will be non-nil. Any non-2xx 5994// status code is an error. Response headers are in either 5995// *DomainMapping.ServerResponse.Header or (if a response was returned 5996// at all) in error.(*googleapi.Error).Header. Use 5997// googleapi.IsNotModified to check whether the returned error was 5998// because http.StatusNotModified was returned. 5999func (c *AppsDomainMappingsGetCall) Do(opts ...googleapi.CallOption) (*DomainMapping, error) { 6000 gensupport.SetOptions(c.urlParams_, opts...) 6001 res, err := c.doRequest("json") 6002 if res != nil && res.StatusCode == http.StatusNotModified { 6003 if res.Body != nil { 6004 res.Body.Close() 6005 } 6006 return nil, &googleapi.Error{ 6007 Code: res.StatusCode, 6008 Header: res.Header, 6009 } 6010 } 6011 if err != nil { 6012 return nil, err 6013 } 6014 defer googleapi.CloseBody(res) 6015 if err := googleapi.CheckResponse(res); err != nil { 6016 return nil, err 6017 } 6018 ret := &DomainMapping{ 6019 ServerResponse: googleapi.ServerResponse{ 6020 Header: res.Header, 6021 HTTPStatusCode: res.StatusCode, 6022 }, 6023 } 6024 target := &ret 6025 if err := gensupport.DecodeResponse(target, res); err != nil { 6026 return nil, err 6027 } 6028 return ret, nil 6029 // { 6030 // "description": "Gets the specified domain mapping.", 6031 // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 6032 // "httpMethod": "GET", 6033 // "id": "appengine.apps.domainMappings.get", 6034 // "parameterOrder": [ 6035 // "appsId", 6036 // "domainMappingsId" 6037 // ], 6038 // "parameters": { 6039 // "appsId": { 6040 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", 6041 // "location": "path", 6042 // "required": true, 6043 // "type": "string" 6044 // }, 6045 // "domainMappingsId": { 6046 // "description": "Part of `name`. See documentation of `appsId`.", 6047 // "location": "path", 6048 // "required": true, 6049 // "type": "string" 6050 // } 6051 // }, 6052 // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 6053 // "response": { 6054 // "$ref": "DomainMapping" 6055 // }, 6056 // "scopes": [ 6057 // "https://www.googleapis.com/auth/appengine.admin", 6058 // "https://www.googleapis.com/auth/cloud-platform", 6059 // "https://www.googleapis.com/auth/cloud-platform.read-only" 6060 // ] 6061 // } 6062 6063} 6064 6065// method id "appengine.apps.domainMappings.list": 6066 6067type AppsDomainMappingsListCall struct { 6068 s *APIService 6069 appsId string 6070 urlParams_ gensupport.URLParams 6071 ifNoneMatch_ string 6072 ctx_ context.Context 6073 header_ http.Header 6074} 6075 6076// List: Lists the domain mappings on an application. 6077// 6078// - appsId: Part of `parent`. Name of the parent Application resource. 6079// Example: apps/myapp. 6080func (r *AppsDomainMappingsService) List(appsId string) *AppsDomainMappingsListCall { 6081 c := &AppsDomainMappingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6082 c.appsId = appsId 6083 return c 6084} 6085 6086// PageSize sets the optional parameter "pageSize": Maximum results to 6087// return per page. 6088func (c *AppsDomainMappingsListCall) PageSize(pageSize int64) *AppsDomainMappingsListCall { 6089 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6090 return c 6091} 6092 6093// PageToken sets the optional parameter "pageToken": Continuation token 6094// for fetching the next page of results. 6095func (c *AppsDomainMappingsListCall) PageToken(pageToken string) *AppsDomainMappingsListCall { 6096 c.urlParams_.Set("pageToken", pageToken) 6097 return c 6098} 6099 6100// Fields allows partial responses to be retrieved. See 6101// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6102// for more information. 6103func (c *AppsDomainMappingsListCall) Fields(s ...googleapi.Field) *AppsDomainMappingsListCall { 6104 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6105 return c 6106} 6107 6108// IfNoneMatch sets the optional parameter which makes the operation 6109// fail if the object's ETag matches the given value. This is useful for 6110// getting updates only after the object has changed since the last 6111// request. Use googleapi.IsNotModified to check whether the response 6112// error from Do is the result of In-None-Match. 6113func (c *AppsDomainMappingsListCall) IfNoneMatch(entityTag string) *AppsDomainMappingsListCall { 6114 c.ifNoneMatch_ = entityTag 6115 return c 6116} 6117 6118// Context sets the context to be used in this call's Do method. Any 6119// pending HTTP request will be aborted if the provided context is 6120// canceled. 6121func (c *AppsDomainMappingsListCall) Context(ctx context.Context) *AppsDomainMappingsListCall { 6122 c.ctx_ = ctx 6123 return c 6124} 6125 6126// Header returns an http.Header that can be modified by the caller to 6127// add HTTP headers to the request. 6128func (c *AppsDomainMappingsListCall) Header() http.Header { 6129 if c.header_ == nil { 6130 c.header_ = make(http.Header) 6131 } 6132 return c.header_ 6133} 6134 6135func (c *AppsDomainMappingsListCall) doRequest(alt string) (*http.Response, error) { 6136 reqHeaders := make(http.Header) 6137 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 6138 for k, v := range c.header_ { 6139 reqHeaders[k] = v 6140 } 6141 reqHeaders.Set("User-Agent", c.s.userAgent()) 6142 if c.ifNoneMatch_ != "" { 6143 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6144 } 6145 var body io.Reader = nil 6146 c.urlParams_.Set("alt", alt) 6147 c.urlParams_.Set("prettyPrint", "false") 6148 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings") 6149 urls += "?" + c.urlParams_.Encode() 6150 req, err := http.NewRequest("GET", urls, body) 6151 if err != nil { 6152 return nil, err 6153 } 6154 req.Header = reqHeaders 6155 googleapi.Expand(req.URL, map[string]string{ 6156 "appsId": c.appsId, 6157 }) 6158 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6159} 6160 6161// Do executes the "appengine.apps.domainMappings.list" call. 6162// Exactly one of *ListDomainMappingsResponse or error will be non-nil. 6163// Any non-2xx status code is an error. Response headers are in either 6164// *ListDomainMappingsResponse.ServerResponse.Header or (if a response 6165// was returned at all) in error.(*googleapi.Error).Header. Use 6166// googleapi.IsNotModified to check whether the returned error was 6167// because http.StatusNotModified was returned. 6168func (c *AppsDomainMappingsListCall) Do(opts ...googleapi.CallOption) (*ListDomainMappingsResponse, error) { 6169 gensupport.SetOptions(c.urlParams_, opts...) 6170 res, err := c.doRequest("json") 6171 if res != nil && res.StatusCode == http.StatusNotModified { 6172 if res.Body != nil { 6173 res.Body.Close() 6174 } 6175 return nil, &googleapi.Error{ 6176 Code: res.StatusCode, 6177 Header: res.Header, 6178 } 6179 } 6180 if err != nil { 6181 return nil, err 6182 } 6183 defer googleapi.CloseBody(res) 6184 if err := googleapi.CheckResponse(res); err != nil { 6185 return nil, err 6186 } 6187 ret := &ListDomainMappingsResponse{ 6188 ServerResponse: googleapi.ServerResponse{ 6189 Header: res.Header, 6190 HTTPStatusCode: res.StatusCode, 6191 }, 6192 } 6193 target := &ret 6194 if err := gensupport.DecodeResponse(target, res); err != nil { 6195 return nil, err 6196 } 6197 return ret, nil 6198 // { 6199 // "description": "Lists the domain mappings on an application.", 6200 // "flatPath": "v1/apps/{appsId}/domainMappings", 6201 // "httpMethod": "GET", 6202 // "id": "appengine.apps.domainMappings.list", 6203 // "parameterOrder": [ 6204 // "appsId" 6205 // ], 6206 // "parameters": { 6207 // "appsId": { 6208 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 6209 // "location": "path", 6210 // "required": true, 6211 // "type": "string" 6212 // }, 6213 // "pageSize": { 6214 // "description": "Maximum results to return per page.", 6215 // "format": "int32", 6216 // "location": "query", 6217 // "type": "integer" 6218 // }, 6219 // "pageToken": { 6220 // "description": "Continuation token for fetching the next page of results.", 6221 // "location": "query", 6222 // "type": "string" 6223 // } 6224 // }, 6225 // "path": "v1/apps/{appsId}/domainMappings", 6226 // "response": { 6227 // "$ref": "ListDomainMappingsResponse" 6228 // }, 6229 // "scopes": [ 6230 // "https://www.googleapis.com/auth/appengine.admin", 6231 // "https://www.googleapis.com/auth/cloud-platform", 6232 // "https://www.googleapis.com/auth/cloud-platform.read-only" 6233 // ] 6234 // } 6235 6236} 6237 6238// Pages invokes f for each page of results. 6239// A non-nil error returned from f will halt the iteration. 6240// The provided context supersedes any context provided to the Context method. 6241func (c *AppsDomainMappingsListCall) Pages(ctx context.Context, f func(*ListDomainMappingsResponse) error) error { 6242 c.ctx_ = ctx 6243 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6244 for { 6245 x, err := c.Do() 6246 if err != nil { 6247 return err 6248 } 6249 if err := f(x); err != nil { 6250 return err 6251 } 6252 if x.NextPageToken == "" { 6253 return nil 6254 } 6255 c.PageToken(x.NextPageToken) 6256 } 6257} 6258 6259// method id "appengine.apps.domainMappings.patch": 6260 6261type AppsDomainMappingsPatchCall struct { 6262 s *APIService 6263 appsId string 6264 domainMappingsId string 6265 domainmapping *DomainMapping 6266 urlParams_ gensupport.URLParams 6267 ctx_ context.Context 6268 header_ http.Header 6269} 6270 6271// Patch: Updates the specified domain mapping. To map an SSL 6272// certificate to a domain mapping, update certificate_id to point to an 6273// AuthorizedCertificate resource. A user must be authorized to 6274// administer the associated domain in order to update a DomainMapping 6275// resource. 6276// 6277// - appsId: Part of `name`. Name of the resource to update. Example: 6278// apps/myapp/domainMappings/example.com. 6279// - domainMappingsId: Part of `name`. See documentation of `appsId`. 6280func (r *AppsDomainMappingsService) Patch(appsId string, domainMappingsId string, domainmapping *DomainMapping) *AppsDomainMappingsPatchCall { 6281 c := &AppsDomainMappingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6282 c.appsId = appsId 6283 c.domainMappingsId = domainMappingsId 6284 c.domainmapping = domainmapping 6285 return c 6286} 6287 6288// UpdateMask sets the optional parameter "updateMask": Required. 6289// Standard field mask for the set of fields to be updated. 6290func (c *AppsDomainMappingsPatchCall) UpdateMask(updateMask string) *AppsDomainMappingsPatchCall { 6291 c.urlParams_.Set("updateMask", updateMask) 6292 return c 6293} 6294 6295// Fields allows partial responses to be retrieved. See 6296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6297// for more information. 6298func (c *AppsDomainMappingsPatchCall) Fields(s ...googleapi.Field) *AppsDomainMappingsPatchCall { 6299 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6300 return c 6301} 6302 6303// Context sets the context to be used in this call's Do method. Any 6304// pending HTTP request will be aborted if the provided context is 6305// canceled. 6306func (c *AppsDomainMappingsPatchCall) Context(ctx context.Context) *AppsDomainMappingsPatchCall { 6307 c.ctx_ = ctx 6308 return c 6309} 6310 6311// Header returns an http.Header that can be modified by the caller to 6312// add HTTP headers to the request. 6313func (c *AppsDomainMappingsPatchCall) Header() http.Header { 6314 if c.header_ == nil { 6315 c.header_ = make(http.Header) 6316 } 6317 return c.header_ 6318} 6319 6320func (c *AppsDomainMappingsPatchCall) doRequest(alt string) (*http.Response, error) { 6321 reqHeaders := make(http.Header) 6322 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 6323 for k, v := range c.header_ { 6324 reqHeaders[k] = v 6325 } 6326 reqHeaders.Set("User-Agent", c.s.userAgent()) 6327 var body io.Reader = nil 6328 body, err := googleapi.WithoutDataWrapper.JSONReader(c.domainmapping) 6329 if err != nil { 6330 return nil, err 6331 } 6332 reqHeaders.Set("Content-Type", "application/json") 6333 c.urlParams_.Set("alt", alt) 6334 c.urlParams_.Set("prettyPrint", "false") 6335 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/domainMappings/{domainMappingsId}") 6336 urls += "?" + c.urlParams_.Encode() 6337 req, err := http.NewRequest("PATCH", urls, body) 6338 if err != nil { 6339 return nil, err 6340 } 6341 req.Header = reqHeaders 6342 googleapi.Expand(req.URL, map[string]string{ 6343 "appsId": c.appsId, 6344 "domainMappingsId": c.domainMappingsId, 6345 }) 6346 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6347} 6348 6349// Do executes the "appengine.apps.domainMappings.patch" call. 6350// Exactly one of *Operation or error will be non-nil. Any non-2xx 6351// status code is an error. Response headers are in either 6352// *Operation.ServerResponse.Header or (if a response was returned at 6353// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6354// to check whether the returned error was because 6355// http.StatusNotModified was returned. 6356func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6357 gensupport.SetOptions(c.urlParams_, opts...) 6358 res, err := c.doRequest("json") 6359 if res != nil && res.StatusCode == http.StatusNotModified { 6360 if res.Body != nil { 6361 res.Body.Close() 6362 } 6363 return nil, &googleapi.Error{ 6364 Code: res.StatusCode, 6365 Header: res.Header, 6366 } 6367 } 6368 if err != nil { 6369 return nil, err 6370 } 6371 defer googleapi.CloseBody(res) 6372 if err := googleapi.CheckResponse(res); err != nil { 6373 return nil, err 6374 } 6375 ret := &Operation{ 6376 ServerResponse: googleapi.ServerResponse{ 6377 Header: res.Header, 6378 HTTPStatusCode: res.StatusCode, 6379 }, 6380 } 6381 target := &ret 6382 if err := gensupport.DecodeResponse(target, res); err != nil { 6383 return nil, err 6384 } 6385 return ret, nil 6386 // { 6387 // "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.", 6388 // "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 6389 // "httpMethod": "PATCH", 6390 // "id": "appengine.apps.domainMappings.patch", 6391 // "parameterOrder": [ 6392 // "appsId", 6393 // "domainMappingsId" 6394 // ], 6395 // "parameters": { 6396 // "appsId": { 6397 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", 6398 // "location": "path", 6399 // "required": true, 6400 // "type": "string" 6401 // }, 6402 // "domainMappingsId": { 6403 // "description": "Part of `name`. See documentation of `appsId`.", 6404 // "location": "path", 6405 // "required": true, 6406 // "type": "string" 6407 // }, 6408 // "updateMask": { 6409 // "description": "Required. Standard field mask for the set of fields to be updated.", 6410 // "format": "google-fieldmask", 6411 // "location": "query", 6412 // "type": "string" 6413 // } 6414 // }, 6415 // "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", 6416 // "request": { 6417 // "$ref": "DomainMapping" 6418 // }, 6419 // "response": { 6420 // "$ref": "Operation" 6421 // }, 6422 // "scopes": [ 6423 // "https://www.googleapis.com/auth/cloud-platform" 6424 // ] 6425 // } 6426 6427} 6428 6429// method id "appengine.apps.firewall.ingressRules.batchUpdate": 6430 6431type AppsFirewallIngressRulesBatchUpdateCall struct { 6432 s *APIService 6433 appsId string 6434 batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest 6435 urlParams_ gensupport.URLParams 6436 ctx_ context.Context 6437 header_ http.Header 6438} 6439 6440// BatchUpdate: Replaces the entire firewall ruleset in one bulk 6441// operation. This overrides and replaces the rules of an existing 6442// firewall with the new rules.If the final rule does not match traffic 6443// with the '*' wildcard IP range, then an "allow all" rule is 6444// explicitly added to the end of the list. 6445// 6446// - appsId: Part of `name`. Name of the Firewall collection to set. 6447// Example: apps/myapp/firewall/ingressRules. 6448func (r *AppsFirewallIngressRulesService) BatchUpdate(appsId string, batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest) *AppsFirewallIngressRulesBatchUpdateCall { 6449 c := &AppsFirewallIngressRulesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6450 c.appsId = appsId 6451 c.batchupdateingressrulesrequest = batchupdateingressrulesrequest 6452 return c 6453} 6454 6455// Fields allows partial responses to be retrieved. See 6456// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6457// for more information. 6458func (c *AppsFirewallIngressRulesBatchUpdateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesBatchUpdateCall { 6459 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6460 return c 6461} 6462 6463// Context sets the context to be used in this call's Do method. Any 6464// pending HTTP request will be aborted if the provided context is 6465// canceled. 6466func (c *AppsFirewallIngressRulesBatchUpdateCall) Context(ctx context.Context) *AppsFirewallIngressRulesBatchUpdateCall { 6467 c.ctx_ = ctx 6468 return c 6469} 6470 6471// Header returns an http.Header that can be modified by the caller to 6472// add HTTP headers to the request. 6473func (c *AppsFirewallIngressRulesBatchUpdateCall) Header() http.Header { 6474 if c.header_ == nil { 6475 c.header_ = make(http.Header) 6476 } 6477 return c.header_ 6478} 6479 6480func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 6481 reqHeaders := make(http.Header) 6482 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 6483 for k, v := range c.header_ { 6484 reqHeaders[k] = v 6485 } 6486 reqHeaders.Set("User-Agent", c.s.userAgent()) 6487 var body io.Reader = nil 6488 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdateingressrulesrequest) 6489 if err != nil { 6490 return nil, err 6491 } 6492 reqHeaders.Set("Content-Type", "application/json") 6493 c.urlParams_.Set("alt", alt) 6494 c.urlParams_.Set("prettyPrint", "false") 6495 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules:batchUpdate") 6496 urls += "?" + c.urlParams_.Encode() 6497 req, err := http.NewRequest("POST", urls, body) 6498 if err != nil { 6499 return nil, err 6500 } 6501 req.Header = reqHeaders 6502 googleapi.Expand(req.URL, map[string]string{ 6503 "appsId": c.appsId, 6504 }) 6505 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6506} 6507 6508// Do executes the "appengine.apps.firewall.ingressRules.batchUpdate" call. 6509// Exactly one of *BatchUpdateIngressRulesResponse or error will be 6510// non-nil. Any non-2xx status code is an error. Response headers are in 6511// either *BatchUpdateIngressRulesResponse.ServerResponse.Header or (if 6512// a response was returned at all) in error.(*googleapi.Error).Header. 6513// Use googleapi.IsNotModified to check whether the returned error was 6514// because http.StatusNotModified was returned. 6515func (c *AppsFirewallIngressRulesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateIngressRulesResponse, error) { 6516 gensupport.SetOptions(c.urlParams_, opts...) 6517 res, err := c.doRequest("json") 6518 if res != nil && res.StatusCode == http.StatusNotModified { 6519 if res.Body != nil { 6520 res.Body.Close() 6521 } 6522 return nil, &googleapi.Error{ 6523 Code: res.StatusCode, 6524 Header: res.Header, 6525 } 6526 } 6527 if err != nil { 6528 return nil, err 6529 } 6530 defer googleapi.CloseBody(res) 6531 if err := googleapi.CheckResponse(res); err != nil { 6532 return nil, err 6533 } 6534 ret := &BatchUpdateIngressRulesResponse{ 6535 ServerResponse: googleapi.ServerResponse{ 6536 Header: res.Header, 6537 HTTPStatusCode: res.StatusCode, 6538 }, 6539 } 6540 target := &ret 6541 if err := gensupport.DecodeResponse(target, res); err != nil { 6542 return nil, err 6543 } 6544 return ret, nil 6545 // { 6546 // "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.", 6547 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate", 6548 // "httpMethod": "POST", 6549 // "id": "appengine.apps.firewall.ingressRules.batchUpdate", 6550 // "parameterOrder": [ 6551 // "appsId" 6552 // ], 6553 // "parameters": { 6554 // "appsId": { 6555 // "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.", 6556 // "location": "path", 6557 // "required": true, 6558 // "type": "string" 6559 // } 6560 // }, 6561 // "path": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate", 6562 // "request": { 6563 // "$ref": "BatchUpdateIngressRulesRequest" 6564 // }, 6565 // "response": { 6566 // "$ref": "BatchUpdateIngressRulesResponse" 6567 // }, 6568 // "scopes": [ 6569 // "https://www.googleapis.com/auth/cloud-platform" 6570 // ] 6571 // } 6572 6573} 6574 6575// method id "appengine.apps.firewall.ingressRules.create": 6576 6577type AppsFirewallIngressRulesCreateCall struct { 6578 s *APIService 6579 appsId string 6580 firewallrule *FirewallRule 6581 urlParams_ gensupport.URLParams 6582 ctx_ context.Context 6583 header_ http.Header 6584} 6585 6586// Create: Creates a firewall rule for the application. 6587// 6588// - appsId: Part of `parent`. Name of the parent Firewall collection in 6589// which to create a new rule. Example: 6590// apps/myapp/firewall/ingressRules. 6591func (r *AppsFirewallIngressRulesService) Create(appsId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesCreateCall { 6592 c := &AppsFirewallIngressRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6593 c.appsId = appsId 6594 c.firewallrule = firewallrule 6595 return c 6596} 6597 6598// Fields allows partial responses to be retrieved. See 6599// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6600// for more information. 6601func (c *AppsFirewallIngressRulesCreateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesCreateCall { 6602 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6603 return c 6604} 6605 6606// Context sets the context to be used in this call's Do method. Any 6607// pending HTTP request will be aborted if the provided context is 6608// canceled. 6609func (c *AppsFirewallIngressRulesCreateCall) Context(ctx context.Context) *AppsFirewallIngressRulesCreateCall { 6610 c.ctx_ = ctx 6611 return c 6612} 6613 6614// Header returns an http.Header that can be modified by the caller to 6615// add HTTP headers to the request. 6616func (c *AppsFirewallIngressRulesCreateCall) Header() http.Header { 6617 if c.header_ == nil { 6618 c.header_ = make(http.Header) 6619 } 6620 return c.header_ 6621} 6622 6623func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Response, error) { 6624 reqHeaders := make(http.Header) 6625 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 6626 for k, v := range c.header_ { 6627 reqHeaders[k] = v 6628 } 6629 reqHeaders.Set("User-Agent", c.s.userAgent()) 6630 var body io.Reader = nil 6631 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) 6632 if err != nil { 6633 return nil, err 6634 } 6635 reqHeaders.Set("Content-Type", "application/json") 6636 c.urlParams_.Set("alt", alt) 6637 c.urlParams_.Set("prettyPrint", "false") 6638 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules") 6639 urls += "?" + c.urlParams_.Encode() 6640 req, err := http.NewRequest("POST", urls, body) 6641 if err != nil { 6642 return nil, err 6643 } 6644 req.Header = reqHeaders 6645 googleapi.Expand(req.URL, map[string]string{ 6646 "appsId": c.appsId, 6647 }) 6648 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6649} 6650 6651// Do executes the "appengine.apps.firewall.ingressRules.create" call. 6652// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 6653// status code is an error. Response headers are in either 6654// *FirewallRule.ServerResponse.Header or (if a response was returned at 6655// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6656// to check whether the returned error was because 6657// http.StatusNotModified was returned. 6658func (c *AppsFirewallIngressRulesCreateCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 6659 gensupport.SetOptions(c.urlParams_, opts...) 6660 res, err := c.doRequest("json") 6661 if res != nil && res.StatusCode == http.StatusNotModified { 6662 if res.Body != nil { 6663 res.Body.Close() 6664 } 6665 return nil, &googleapi.Error{ 6666 Code: res.StatusCode, 6667 Header: res.Header, 6668 } 6669 } 6670 if err != nil { 6671 return nil, err 6672 } 6673 defer googleapi.CloseBody(res) 6674 if err := googleapi.CheckResponse(res); err != nil { 6675 return nil, err 6676 } 6677 ret := &FirewallRule{ 6678 ServerResponse: googleapi.ServerResponse{ 6679 Header: res.Header, 6680 HTTPStatusCode: res.StatusCode, 6681 }, 6682 } 6683 target := &ret 6684 if err := gensupport.DecodeResponse(target, res); err != nil { 6685 return nil, err 6686 } 6687 return ret, nil 6688 // { 6689 // "description": "Creates a firewall rule for the application.", 6690 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules", 6691 // "httpMethod": "POST", 6692 // "id": "appengine.apps.firewall.ingressRules.create", 6693 // "parameterOrder": [ 6694 // "appsId" 6695 // ], 6696 // "parameters": { 6697 // "appsId": { 6698 // "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", 6699 // "location": "path", 6700 // "required": true, 6701 // "type": "string" 6702 // } 6703 // }, 6704 // "path": "v1/apps/{appsId}/firewall/ingressRules", 6705 // "request": { 6706 // "$ref": "FirewallRule" 6707 // }, 6708 // "response": { 6709 // "$ref": "FirewallRule" 6710 // }, 6711 // "scopes": [ 6712 // "https://www.googleapis.com/auth/cloud-platform" 6713 // ] 6714 // } 6715 6716} 6717 6718// method id "appengine.apps.firewall.ingressRules.delete": 6719 6720type AppsFirewallIngressRulesDeleteCall struct { 6721 s *APIService 6722 appsId string 6723 ingressRulesId string 6724 urlParams_ gensupport.URLParams 6725 ctx_ context.Context 6726 header_ http.Header 6727} 6728 6729// Delete: Deletes the specified firewall rule. 6730// 6731// - appsId: Part of `name`. Name of the Firewall resource to delete. 6732// Example: apps/myapp/firewall/ingressRules/100. 6733// - ingressRulesId: Part of `name`. See documentation of `appsId`. 6734func (r *AppsFirewallIngressRulesService) Delete(appsId string, ingressRulesId string) *AppsFirewallIngressRulesDeleteCall { 6735 c := &AppsFirewallIngressRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6736 c.appsId = appsId 6737 c.ingressRulesId = ingressRulesId 6738 return c 6739} 6740 6741// Fields allows partial responses to be retrieved. See 6742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6743// for more information. 6744func (c *AppsFirewallIngressRulesDeleteCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesDeleteCall { 6745 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6746 return c 6747} 6748 6749// Context sets the context to be used in this call's Do method. Any 6750// pending HTTP request will be aborted if the provided context is 6751// canceled. 6752func (c *AppsFirewallIngressRulesDeleteCall) Context(ctx context.Context) *AppsFirewallIngressRulesDeleteCall { 6753 c.ctx_ = ctx 6754 return c 6755} 6756 6757// Header returns an http.Header that can be modified by the caller to 6758// add HTTP headers to the request. 6759func (c *AppsFirewallIngressRulesDeleteCall) Header() http.Header { 6760 if c.header_ == nil { 6761 c.header_ = make(http.Header) 6762 } 6763 return c.header_ 6764} 6765 6766func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Response, error) { 6767 reqHeaders := make(http.Header) 6768 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 6769 for k, v := range c.header_ { 6770 reqHeaders[k] = v 6771 } 6772 reqHeaders.Set("User-Agent", c.s.userAgent()) 6773 var body io.Reader = nil 6774 c.urlParams_.Set("alt", alt) 6775 c.urlParams_.Set("prettyPrint", "false") 6776 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 6777 urls += "?" + c.urlParams_.Encode() 6778 req, err := http.NewRequest("DELETE", urls, body) 6779 if err != nil { 6780 return nil, err 6781 } 6782 req.Header = reqHeaders 6783 googleapi.Expand(req.URL, map[string]string{ 6784 "appsId": c.appsId, 6785 "ingressRulesId": c.ingressRulesId, 6786 }) 6787 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6788} 6789 6790// Do executes the "appengine.apps.firewall.ingressRules.delete" call. 6791// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6792// code is an error. Response headers are in either 6793// *Empty.ServerResponse.Header or (if a response was returned at all) 6794// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6795// check whether the returned error was because http.StatusNotModified 6796// was returned. 6797func (c *AppsFirewallIngressRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6798 gensupport.SetOptions(c.urlParams_, opts...) 6799 res, err := c.doRequest("json") 6800 if res != nil && res.StatusCode == http.StatusNotModified { 6801 if res.Body != nil { 6802 res.Body.Close() 6803 } 6804 return nil, &googleapi.Error{ 6805 Code: res.StatusCode, 6806 Header: res.Header, 6807 } 6808 } 6809 if err != nil { 6810 return nil, err 6811 } 6812 defer googleapi.CloseBody(res) 6813 if err := googleapi.CheckResponse(res); err != nil { 6814 return nil, err 6815 } 6816 ret := &Empty{ 6817 ServerResponse: googleapi.ServerResponse{ 6818 Header: res.Header, 6819 HTTPStatusCode: res.StatusCode, 6820 }, 6821 } 6822 target := &ret 6823 if err := gensupport.DecodeResponse(target, res); err != nil { 6824 return nil, err 6825 } 6826 return ret, nil 6827 // { 6828 // "description": "Deletes the specified firewall rule.", 6829 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6830 // "httpMethod": "DELETE", 6831 // "id": "appengine.apps.firewall.ingressRules.delete", 6832 // "parameterOrder": [ 6833 // "appsId", 6834 // "ingressRulesId" 6835 // ], 6836 // "parameters": { 6837 // "appsId": { 6838 // "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.", 6839 // "location": "path", 6840 // "required": true, 6841 // "type": "string" 6842 // }, 6843 // "ingressRulesId": { 6844 // "description": "Part of `name`. See documentation of `appsId`.", 6845 // "location": "path", 6846 // "required": true, 6847 // "type": "string" 6848 // } 6849 // }, 6850 // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6851 // "response": { 6852 // "$ref": "Empty" 6853 // }, 6854 // "scopes": [ 6855 // "https://www.googleapis.com/auth/cloud-platform" 6856 // ] 6857 // } 6858 6859} 6860 6861// method id "appengine.apps.firewall.ingressRules.get": 6862 6863type AppsFirewallIngressRulesGetCall struct { 6864 s *APIService 6865 appsId string 6866 ingressRulesId string 6867 urlParams_ gensupport.URLParams 6868 ifNoneMatch_ string 6869 ctx_ context.Context 6870 header_ http.Header 6871} 6872 6873// Get: Gets the specified firewall rule. 6874// 6875// - appsId: Part of `name`. Name of the Firewall resource to retrieve. 6876// Example: apps/myapp/firewall/ingressRules/100. 6877// - ingressRulesId: Part of `name`. See documentation of `appsId`. 6878func (r *AppsFirewallIngressRulesService) Get(appsId string, ingressRulesId string) *AppsFirewallIngressRulesGetCall { 6879 c := &AppsFirewallIngressRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6880 c.appsId = appsId 6881 c.ingressRulesId = ingressRulesId 6882 return c 6883} 6884 6885// Fields allows partial responses to be retrieved. See 6886// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6887// for more information. 6888func (c *AppsFirewallIngressRulesGetCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesGetCall { 6889 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6890 return c 6891} 6892 6893// IfNoneMatch sets the optional parameter which makes the operation 6894// fail if the object's ETag matches the given value. This is useful for 6895// getting updates only after the object has changed since the last 6896// request. Use googleapi.IsNotModified to check whether the response 6897// error from Do is the result of In-None-Match. 6898func (c *AppsFirewallIngressRulesGetCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesGetCall { 6899 c.ifNoneMatch_ = entityTag 6900 return c 6901} 6902 6903// Context sets the context to be used in this call's Do method. Any 6904// pending HTTP request will be aborted if the provided context is 6905// canceled. 6906func (c *AppsFirewallIngressRulesGetCall) Context(ctx context.Context) *AppsFirewallIngressRulesGetCall { 6907 c.ctx_ = ctx 6908 return c 6909} 6910 6911// Header returns an http.Header that can be modified by the caller to 6912// add HTTP headers to the request. 6913func (c *AppsFirewallIngressRulesGetCall) Header() http.Header { 6914 if c.header_ == nil { 6915 c.header_ = make(http.Header) 6916 } 6917 return c.header_ 6918} 6919 6920func (c *AppsFirewallIngressRulesGetCall) doRequest(alt string) (*http.Response, error) { 6921 reqHeaders := make(http.Header) 6922 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 6923 for k, v := range c.header_ { 6924 reqHeaders[k] = v 6925 } 6926 reqHeaders.Set("User-Agent", c.s.userAgent()) 6927 if c.ifNoneMatch_ != "" { 6928 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6929 } 6930 var body io.Reader = nil 6931 c.urlParams_.Set("alt", alt) 6932 c.urlParams_.Set("prettyPrint", "false") 6933 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 6934 urls += "?" + c.urlParams_.Encode() 6935 req, err := http.NewRequest("GET", urls, body) 6936 if err != nil { 6937 return nil, err 6938 } 6939 req.Header = reqHeaders 6940 googleapi.Expand(req.URL, map[string]string{ 6941 "appsId": c.appsId, 6942 "ingressRulesId": c.ingressRulesId, 6943 }) 6944 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6945} 6946 6947// Do executes the "appengine.apps.firewall.ingressRules.get" call. 6948// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 6949// status code is an error. Response headers are in either 6950// *FirewallRule.ServerResponse.Header or (if a response was returned at 6951// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6952// to check whether the returned error was because 6953// http.StatusNotModified was returned. 6954func (c *AppsFirewallIngressRulesGetCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 6955 gensupport.SetOptions(c.urlParams_, opts...) 6956 res, err := c.doRequest("json") 6957 if res != nil && res.StatusCode == http.StatusNotModified { 6958 if res.Body != nil { 6959 res.Body.Close() 6960 } 6961 return nil, &googleapi.Error{ 6962 Code: res.StatusCode, 6963 Header: res.Header, 6964 } 6965 } 6966 if err != nil { 6967 return nil, err 6968 } 6969 defer googleapi.CloseBody(res) 6970 if err := googleapi.CheckResponse(res); err != nil { 6971 return nil, err 6972 } 6973 ret := &FirewallRule{ 6974 ServerResponse: googleapi.ServerResponse{ 6975 Header: res.Header, 6976 HTTPStatusCode: res.StatusCode, 6977 }, 6978 } 6979 target := &ret 6980 if err := gensupport.DecodeResponse(target, res); err != nil { 6981 return nil, err 6982 } 6983 return ret, nil 6984 // { 6985 // "description": "Gets the specified firewall rule.", 6986 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 6987 // "httpMethod": "GET", 6988 // "id": "appengine.apps.firewall.ingressRules.get", 6989 // "parameterOrder": [ 6990 // "appsId", 6991 // "ingressRulesId" 6992 // ], 6993 // "parameters": { 6994 // "appsId": { 6995 // "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.", 6996 // "location": "path", 6997 // "required": true, 6998 // "type": "string" 6999 // }, 7000 // "ingressRulesId": { 7001 // "description": "Part of `name`. See documentation of `appsId`.", 7002 // "location": "path", 7003 // "required": true, 7004 // "type": "string" 7005 // } 7006 // }, 7007 // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 7008 // "response": { 7009 // "$ref": "FirewallRule" 7010 // }, 7011 // "scopes": [ 7012 // "https://www.googleapis.com/auth/appengine.admin", 7013 // "https://www.googleapis.com/auth/cloud-platform", 7014 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7015 // ] 7016 // } 7017 7018} 7019 7020// method id "appengine.apps.firewall.ingressRules.list": 7021 7022type AppsFirewallIngressRulesListCall struct { 7023 s *APIService 7024 appsId string 7025 urlParams_ gensupport.URLParams 7026 ifNoneMatch_ string 7027 ctx_ context.Context 7028 header_ http.Header 7029} 7030 7031// List: Lists the firewall rules of an application. 7032// 7033// - appsId: Part of `parent`. Name of the Firewall collection to 7034// retrieve. Example: apps/myapp/firewall/ingressRules. 7035func (r *AppsFirewallIngressRulesService) List(appsId string) *AppsFirewallIngressRulesListCall { 7036 c := &AppsFirewallIngressRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7037 c.appsId = appsId 7038 return c 7039} 7040 7041// MatchingAddress sets the optional parameter "matchingAddress": A 7042// valid IP Address. If set, only rules matching this address will be 7043// returned. The first returned rule will be the rule that fires on 7044// requests from this IP. 7045func (c *AppsFirewallIngressRulesListCall) MatchingAddress(matchingAddress string) *AppsFirewallIngressRulesListCall { 7046 c.urlParams_.Set("matchingAddress", matchingAddress) 7047 return c 7048} 7049 7050// PageSize sets the optional parameter "pageSize": Maximum results to 7051// return per page. 7052func (c *AppsFirewallIngressRulesListCall) PageSize(pageSize int64) *AppsFirewallIngressRulesListCall { 7053 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7054 return c 7055} 7056 7057// PageToken sets the optional parameter "pageToken": Continuation token 7058// for fetching the next page of results. 7059func (c *AppsFirewallIngressRulesListCall) PageToken(pageToken string) *AppsFirewallIngressRulesListCall { 7060 c.urlParams_.Set("pageToken", pageToken) 7061 return c 7062} 7063 7064// Fields allows partial responses to be retrieved. See 7065// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7066// for more information. 7067func (c *AppsFirewallIngressRulesListCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesListCall { 7068 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7069 return c 7070} 7071 7072// IfNoneMatch sets the optional parameter which makes the operation 7073// fail if the object's ETag matches the given value. This is useful for 7074// getting updates only after the object has changed since the last 7075// request. Use googleapi.IsNotModified to check whether the response 7076// error from Do is the result of In-None-Match. 7077func (c *AppsFirewallIngressRulesListCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesListCall { 7078 c.ifNoneMatch_ = entityTag 7079 return c 7080} 7081 7082// Context sets the context to be used in this call's Do method. Any 7083// pending HTTP request will be aborted if the provided context is 7084// canceled. 7085func (c *AppsFirewallIngressRulesListCall) Context(ctx context.Context) *AppsFirewallIngressRulesListCall { 7086 c.ctx_ = ctx 7087 return c 7088} 7089 7090// Header returns an http.Header that can be modified by the caller to 7091// add HTTP headers to the request. 7092func (c *AppsFirewallIngressRulesListCall) Header() http.Header { 7093 if c.header_ == nil { 7094 c.header_ = make(http.Header) 7095 } 7096 return c.header_ 7097} 7098 7099func (c *AppsFirewallIngressRulesListCall) doRequest(alt string) (*http.Response, error) { 7100 reqHeaders := make(http.Header) 7101 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 7102 for k, v := range c.header_ { 7103 reqHeaders[k] = v 7104 } 7105 reqHeaders.Set("User-Agent", c.s.userAgent()) 7106 if c.ifNoneMatch_ != "" { 7107 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7108 } 7109 var body io.Reader = nil 7110 c.urlParams_.Set("alt", alt) 7111 c.urlParams_.Set("prettyPrint", "false") 7112 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules") 7113 urls += "?" + c.urlParams_.Encode() 7114 req, err := http.NewRequest("GET", urls, body) 7115 if err != nil { 7116 return nil, err 7117 } 7118 req.Header = reqHeaders 7119 googleapi.Expand(req.URL, map[string]string{ 7120 "appsId": c.appsId, 7121 }) 7122 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7123} 7124 7125// Do executes the "appengine.apps.firewall.ingressRules.list" call. 7126// Exactly one of *ListIngressRulesResponse or error will be non-nil. 7127// Any non-2xx status code is an error. Response headers are in either 7128// *ListIngressRulesResponse.ServerResponse.Header or (if a response was 7129// returned at all) in error.(*googleapi.Error).Header. Use 7130// googleapi.IsNotModified to check whether the returned error was 7131// because http.StatusNotModified was returned. 7132func (c *AppsFirewallIngressRulesListCall) Do(opts ...googleapi.CallOption) (*ListIngressRulesResponse, error) { 7133 gensupport.SetOptions(c.urlParams_, opts...) 7134 res, err := c.doRequest("json") 7135 if res != nil && res.StatusCode == http.StatusNotModified { 7136 if res.Body != nil { 7137 res.Body.Close() 7138 } 7139 return nil, &googleapi.Error{ 7140 Code: res.StatusCode, 7141 Header: res.Header, 7142 } 7143 } 7144 if err != nil { 7145 return nil, err 7146 } 7147 defer googleapi.CloseBody(res) 7148 if err := googleapi.CheckResponse(res); err != nil { 7149 return nil, err 7150 } 7151 ret := &ListIngressRulesResponse{ 7152 ServerResponse: googleapi.ServerResponse{ 7153 Header: res.Header, 7154 HTTPStatusCode: res.StatusCode, 7155 }, 7156 } 7157 target := &ret 7158 if err := gensupport.DecodeResponse(target, res); err != nil { 7159 return nil, err 7160 } 7161 return ret, nil 7162 // { 7163 // "description": "Lists the firewall rules of an application.", 7164 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules", 7165 // "httpMethod": "GET", 7166 // "id": "appengine.apps.firewall.ingressRules.list", 7167 // "parameterOrder": [ 7168 // "appsId" 7169 // ], 7170 // "parameters": { 7171 // "appsId": { 7172 // "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", 7173 // "location": "path", 7174 // "required": true, 7175 // "type": "string" 7176 // }, 7177 // "matchingAddress": { 7178 // "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.", 7179 // "location": "query", 7180 // "type": "string" 7181 // }, 7182 // "pageSize": { 7183 // "description": "Maximum results to return per page.", 7184 // "format": "int32", 7185 // "location": "query", 7186 // "type": "integer" 7187 // }, 7188 // "pageToken": { 7189 // "description": "Continuation token for fetching the next page of results.", 7190 // "location": "query", 7191 // "type": "string" 7192 // } 7193 // }, 7194 // "path": "v1/apps/{appsId}/firewall/ingressRules", 7195 // "response": { 7196 // "$ref": "ListIngressRulesResponse" 7197 // }, 7198 // "scopes": [ 7199 // "https://www.googleapis.com/auth/appengine.admin", 7200 // "https://www.googleapis.com/auth/cloud-platform", 7201 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7202 // ] 7203 // } 7204 7205} 7206 7207// Pages invokes f for each page of results. 7208// A non-nil error returned from f will halt the iteration. 7209// The provided context supersedes any context provided to the Context method. 7210func (c *AppsFirewallIngressRulesListCall) Pages(ctx context.Context, f func(*ListIngressRulesResponse) error) error { 7211 c.ctx_ = ctx 7212 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7213 for { 7214 x, err := c.Do() 7215 if err != nil { 7216 return err 7217 } 7218 if err := f(x); err != nil { 7219 return err 7220 } 7221 if x.NextPageToken == "" { 7222 return nil 7223 } 7224 c.PageToken(x.NextPageToken) 7225 } 7226} 7227 7228// method id "appengine.apps.firewall.ingressRules.patch": 7229 7230type AppsFirewallIngressRulesPatchCall struct { 7231 s *APIService 7232 appsId string 7233 ingressRulesId string 7234 firewallrule *FirewallRule 7235 urlParams_ gensupport.URLParams 7236 ctx_ context.Context 7237 header_ http.Header 7238} 7239 7240// Patch: Updates the specified firewall rule. 7241// 7242// - appsId: Part of `name`. Name of the Firewall resource to update. 7243// Example: apps/myapp/firewall/ingressRules/100. 7244// - ingressRulesId: Part of `name`. See documentation of `appsId`. 7245func (r *AppsFirewallIngressRulesService) Patch(appsId string, ingressRulesId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesPatchCall { 7246 c := &AppsFirewallIngressRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7247 c.appsId = appsId 7248 c.ingressRulesId = ingressRulesId 7249 c.firewallrule = firewallrule 7250 return c 7251} 7252 7253// UpdateMask sets the optional parameter "updateMask": Standard field 7254// mask for the set of fields to be updated. 7255func (c *AppsFirewallIngressRulesPatchCall) UpdateMask(updateMask string) *AppsFirewallIngressRulesPatchCall { 7256 c.urlParams_.Set("updateMask", updateMask) 7257 return c 7258} 7259 7260// Fields allows partial responses to be retrieved. See 7261// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7262// for more information. 7263func (c *AppsFirewallIngressRulesPatchCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesPatchCall { 7264 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7265 return c 7266} 7267 7268// Context sets the context to be used in this call's Do method. Any 7269// pending HTTP request will be aborted if the provided context is 7270// canceled. 7271func (c *AppsFirewallIngressRulesPatchCall) Context(ctx context.Context) *AppsFirewallIngressRulesPatchCall { 7272 c.ctx_ = ctx 7273 return c 7274} 7275 7276// Header returns an http.Header that can be modified by the caller to 7277// add HTTP headers to the request. 7278func (c *AppsFirewallIngressRulesPatchCall) Header() http.Header { 7279 if c.header_ == nil { 7280 c.header_ = make(http.Header) 7281 } 7282 return c.header_ 7283} 7284 7285func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Response, error) { 7286 reqHeaders := make(http.Header) 7287 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 7288 for k, v := range c.header_ { 7289 reqHeaders[k] = v 7290 } 7291 reqHeaders.Set("User-Agent", c.s.userAgent()) 7292 var body io.Reader = nil 7293 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) 7294 if err != nil { 7295 return nil, err 7296 } 7297 reqHeaders.Set("Content-Type", "application/json") 7298 c.urlParams_.Set("alt", alt) 7299 c.urlParams_.Set("prettyPrint", "false") 7300 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") 7301 urls += "?" + c.urlParams_.Encode() 7302 req, err := http.NewRequest("PATCH", urls, body) 7303 if err != nil { 7304 return nil, err 7305 } 7306 req.Header = reqHeaders 7307 googleapi.Expand(req.URL, map[string]string{ 7308 "appsId": c.appsId, 7309 "ingressRulesId": c.ingressRulesId, 7310 }) 7311 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7312} 7313 7314// Do executes the "appengine.apps.firewall.ingressRules.patch" call. 7315// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx 7316// status code is an error. Response headers are in either 7317// *FirewallRule.ServerResponse.Header or (if a response was returned at 7318// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7319// to check whether the returned error was because 7320// http.StatusNotModified was returned. 7321func (c *AppsFirewallIngressRulesPatchCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { 7322 gensupport.SetOptions(c.urlParams_, opts...) 7323 res, err := c.doRequest("json") 7324 if res != nil && res.StatusCode == http.StatusNotModified { 7325 if res.Body != nil { 7326 res.Body.Close() 7327 } 7328 return nil, &googleapi.Error{ 7329 Code: res.StatusCode, 7330 Header: res.Header, 7331 } 7332 } 7333 if err != nil { 7334 return nil, err 7335 } 7336 defer googleapi.CloseBody(res) 7337 if err := googleapi.CheckResponse(res); err != nil { 7338 return nil, err 7339 } 7340 ret := &FirewallRule{ 7341 ServerResponse: googleapi.ServerResponse{ 7342 Header: res.Header, 7343 HTTPStatusCode: res.StatusCode, 7344 }, 7345 } 7346 target := &ret 7347 if err := gensupport.DecodeResponse(target, res); err != nil { 7348 return nil, err 7349 } 7350 return ret, nil 7351 // { 7352 // "description": "Updates the specified firewall rule.", 7353 // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 7354 // "httpMethod": "PATCH", 7355 // "id": "appengine.apps.firewall.ingressRules.patch", 7356 // "parameterOrder": [ 7357 // "appsId", 7358 // "ingressRulesId" 7359 // ], 7360 // "parameters": { 7361 // "appsId": { 7362 // "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.", 7363 // "location": "path", 7364 // "required": true, 7365 // "type": "string" 7366 // }, 7367 // "ingressRulesId": { 7368 // "description": "Part of `name`. See documentation of `appsId`.", 7369 // "location": "path", 7370 // "required": true, 7371 // "type": "string" 7372 // }, 7373 // "updateMask": { 7374 // "description": "Standard field mask for the set of fields to be updated.", 7375 // "format": "google-fieldmask", 7376 // "location": "query", 7377 // "type": "string" 7378 // } 7379 // }, 7380 // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", 7381 // "request": { 7382 // "$ref": "FirewallRule" 7383 // }, 7384 // "response": { 7385 // "$ref": "FirewallRule" 7386 // }, 7387 // "scopes": [ 7388 // "https://www.googleapis.com/auth/cloud-platform" 7389 // ] 7390 // } 7391 7392} 7393 7394// method id "appengine.apps.locations.get": 7395 7396type AppsLocationsGetCall struct { 7397 s *APIService 7398 appsId string 7399 locationsId string 7400 urlParams_ gensupport.URLParams 7401 ifNoneMatch_ string 7402 ctx_ context.Context 7403 header_ http.Header 7404} 7405 7406// Get: Gets information about a location. 7407// 7408// - appsId: Part of `name`. Resource name for the location. 7409// - locationsId: Part of `name`. See documentation of `appsId`. 7410func (r *AppsLocationsService) Get(appsId string, locationsId string) *AppsLocationsGetCall { 7411 c := &AppsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7412 c.appsId = appsId 7413 c.locationsId = locationsId 7414 return c 7415} 7416 7417// Fields allows partial responses to be retrieved. See 7418// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7419// for more information. 7420func (c *AppsLocationsGetCall) Fields(s ...googleapi.Field) *AppsLocationsGetCall { 7421 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7422 return c 7423} 7424 7425// IfNoneMatch sets the optional parameter which makes the operation 7426// fail if the object's ETag matches the given value. This is useful for 7427// getting updates only after the object has changed since the last 7428// request. Use googleapi.IsNotModified to check whether the response 7429// error from Do is the result of In-None-Match. 7430func (c *AppsLocationsGetCall) IfNoneMatch(entityTag string) *AppsLocationsGetCall { 7431 c.ifNoneMatch_ = entityTag 7432 return c 7433} 7434 7435// Context sets the context to be used in this call's Do method. Any 7436// pending HTTP request will be aborted if the provided context is 7437// canceled. 7438func (c *AppsLocationsGetCall) Context(ctx context.Context) *AppsLocationsGetCall { 7439 c.ctx_ = ctx 7440 return c 7441} 7442 7443// Header returns an http.Header that can be modified by the caller to 7444// add HTTP headers to the request. 7445func (c *AppsLocationsGetCall) Header() http.Header { 7446 if c.header_ == nil { 7447 c.header_ = make(http.Header) 7448 } 7449 return c.header_ 7450} 7451 7452func (c *AppsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 7453 reqHeaders := make(http.Header) 7454 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 7455 for k, v := range c.header_ { 7456 reqHeaders[k] = v 7457 } 7458 reqHeaders.Set("User-Agent", c.s.userAgent()) 7459 if c.ifNoneMatch_ != "" { 7460 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7461 } 7462 var body io.Reader = nil 7463 c.urlParams_.Set("alt", alt) 7464 c.urlParams_.Set("prettyPrint", "false") 7465 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations/{locationsId}") 7466 urls += "?" + c.urlParams_.Encode() 7467 req, err := http.NewRequest("GET", urls, body) 7468 if err != nil { 7469 return nil, err 7470 } 7471 req.Header = reqHeaders 7472 googleapi.Expand(req.URL, map[string]string{ 7473 "appsId": c.appsId, 7474 "locationsId": c.locationsId, 7475 }) 7476 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7477} 7478 7479// Do executes the "appengine.apps.locations.get" call. 7480// Exactly one of *Location or error will be non-nil. Any non-2xx status 7481// code is an error. Response headers are in either 7482// *Location.ServerResponse.Header or (if a response was returned at 7483// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7484// to check whether the returned error was because 7485// http.StatusNotModified was returned. 7486func (c *AppsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 7487 gensupport.SetOptions(c.urlParams_, opts...) 7488 res, err := c.doRequest("json") 7489 if res != nil && res.StatusCode == http.StatusNotModified { 7490 if res.Body != nil { 7491 res.Body.Close() 7492 } 7493 return nil, &googleapi.Error{ 7494 Code: res.StatusCode, 7495 Header: res.Header, 7496 } 7497 } 7498 if err != nil { 7499 return nil, err 7500 } 7501 defer googleapi.CloseBody(res) 7502 if err := googleapi.CheckResponse(res); err != nil { 7503 return nil, err 7504 } 7505 ret := &Location{ 7506 ServerResponse: googleapi.ServerResponse{ 7507 Header: res.Header, 7508 HTTPStatusCode: res.StatusCode, 7509 }, 7510 } 7511 target := &ret 7512 if err := gensupport.DecodeResponse(target, res); err != nil { 7513 return nil, err 7514 } 7515 return ret, nil 7516 // { 7517 // "description": "Gets information about a location.", 7518 // "flatPath": "v1/apps/{appsId}/locations/{locationsId}", 7519 // "httpMethod": "GET", 7520 // "id": "appengine.apps.locations.get", 7521 // "parameterOrder": [ 7522 // "appsId", 7523 // "locationsId" 7524 // ], 7525 // "parameters": { 7526 // "appsId": { 7527 // "description": "Part of `name`. Resource name for the location.", 7528 // "location": "path", 7529 // "required": true, 7530 // "type": "string" 7531 // }, 7532 // "locationsId": { 7533 // "description": "Part of `name`. See documentation of `appsId`.", 7534 // "location": "path", 7535 // "required": true, 7536 // "type": "string" 7537 // } 7538 // }, 7539 // "path": "v1/apps/{appsId}/locations/{locationsId}", 7540 // "response": { 7541 // "$ref": "Location" 7542 // }, 7543 // "scopes": [ 7544 // "https://www.googleapis.com/auth/appengine.admin", 7545 // "https://www.googleapis.com/auth/cloud-platform", 7546 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7547 // ] 7548 // } 7549 7550} 7551 7552// method id "appengine.apps.locations.list": 7553 7554type AppsLocationsListCall struct { 7555 s *APIService 7556 appsId string 7557 urlParams_ gensupport.URLParams 7558 ifNoneMatch_ string 7559 ctx_ context.Context 7560 header_ http.Header 7561} 7562 7563// List: Lists information about the supported locations for this 7564// service. 7565// 7566// - appsId: Part of `name`. The resource that owns the locations 7567// collection, if applicable. 7568func (r *AppsLocationsService) List(appsId string) *AppsLocationsListCall { 7569 c := &AppsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7570 c.appsId = appsId 7571 return c 7572} 7573 7574// Filter sets the optional parameter "filter": A filter to narrow down 7575// results to a preferred subset. The filtering language accepts strings 7576// like "displayName=tokyo", and is documented in more detail in AIP-160 7577// (https://google.aip.dev/160). 7578func (c *AppsLocationsListCall) Filter(filter string) *AppsLocationsListCall { 7579 c.urlParams_.Set("filter", filter) 7580 return c 7581} 7582 7583// PageSize sets the optional parameter "pageSize": The maximum number 7584// of results to return. If not set, the service selects a default. 7585func (c *AppsLocationsListCall) PageSize(pageSize int64) *AppsLocationsListCall { 7586 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7587 return c 7588} 7589 7590// PageToken sets the optional parameter "pageToken": A page token 7591// received from the next_page_token field in the response. Send that 7592// page token to receive the subsequent page. 7593func (c *AppsLocationsListCall) PageToken(pageToken string) *AppsLocationsListCall { 7594 c.urlParams_.Set("pageToken", pageToken) 7595 return c 7596} 7597 7598// Fields allows partial responses to be retrieved. See 7599// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7600// for more information. 7601func (c *AppsLocationsListCall) Fields(s ...googleapi.Field) *AppsLocationsListCall { 7602 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7603 return c 7604} 7605 7606// IfNoneMatch sets the optional parameter which makes the operation 7607// fail if the object's ETag matches the given value. This is useful for 7608// getting updates only after the object has changed since the last 7609// request. Use googleapi.IsNotModified to check whether the response 7610// error from Do is the result of In-None-Match. 7611func (c *AppsLocationsListCall) IfNoneMatch(entityTag string) *AppsLocationsListCall { 7612 c.ifNoneMatch_ = entityTag 7613 return c 7614} 7615 7616// Context sets the context to be used in this call's Do method. Any 7617// pending HTTP request will be aborted if the provided context is 7618// canceled. 7619func (c *AppsLocationsListCall) Context(ctx context.Context) *AppsLocationsListCall { 7620 c.ctx_ = ctx 7621 return c 7622} 7623 7624// Header returns an http.Header that can be modified by the caller to 7625// add HTTP headers to the request. 7626func (c *AppsLocationsListCall) Header() http.Header { 7627 if c.header_ == nil { 7628 c.header_ = make(http.Header) 7629 } 7630 return c.header_ 7631} 7632 7633func (c *AppsLocationsListCall) doRequest(alt string) (*http.Response, error) { 7634 reqHeaders := make(http.Header) 7635 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 7636 for k, v := range c.header_ { 7637 reqHeaders[k] = v 7638 } 7639 reqHeaders.Set("User-Agent", c.s.userAgent()) 7640 if c.ifNoneMatch_ != "" { 7641 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7642 } 7643 var body io.Reader = nil 7644 c.urlParams_.Set("alt", alt) 7645 c.urlParams_.Set("prettyPrint", "false") 7646 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/locations") 7647 urls += "?" + c.urlParams_.Encode() 7648 req, err := http.NewRequest("GET", urls, body) 7649 if err != nil { 7650 return nil, err 7651 } 7652 req.Header = reqHeaders 7653 googleapi.Expand(req.URL, map[string]string{ 7654 "appsId": c.appsId, 7655 }) 7656 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7657} 7658 7659// Do executes the "appengine.apps.locations.list" call. 7660// Exactly one of *ListLocationsResponse or error will be non-nil. Any 7661// non-2xx status code is an error. Response headers are in either 7662// *ListLocationsResponse.ServerResponse.Header or (if a response was 7663// returned at all) in error.(*googleapi.Error).Header. Use 7664// googleapi.IsNotModified to check whether the returned error was 7665// because http.StatusNotModified was returned. 7666func (c *AppsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 7667 gensupport.SetOptions(c.urlParams_, opts...) 7668 res, err := c.doRequest("json") 7669 if res != nil && res.StatusCode == http.StatusNotModified { 7670 if res.Body != nil { 7671 res.Body.Close() 7672 } 7673 return nil, &googleapi.Error{ 7674 Code: res.StatusCode, 7675 Header: res.Header, 7676 } 7677 } 7678 if err != nil { 7679 return nil, err 7680 } 7681 defer googleapi.CloseBody(res) 7682 if err := googleapi.CheckResponse(res); err != nil { 7683 return nil, err 7684 } 7685 ret := &ListLocationsResponse{ 7686 ServerResponse: googleapi.ServerResponse{ 7687 Header: res.Header, 7688 HTTPStatusCode: res.StatusCode, 7689 }, 7690 } 7691 target := &ret 7692 if err := gensupport.DecodeResponse(target, res); err != nil { 7693 return nil, err 7694 } 7695 return ret, nil 7696 // { 7697 // "description": "Lists information about the supported locations for this service.", 7698 // "flatPath": "v1/apps/{appsId}/locations", 7699 // "httpMethod": "GET", 7700 // "id": "appengine.apps.locations.list", 7701 // "parameterOrder": [ 7702 // "appsId" 7703 // ], 7704 // "parameters": { 7705 // "appsId": { 7706 // "description": "Part of `name`. The resource that owns the locations collection, if applicable.", 7707 // "location": "path", 7708 // "required": true, 7709 // "type": "string" 7710 // }, 7711 // "filter": { 7712 // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in AIP-160 (https://google.aip.dev/160).", 7713 // "location": "query", 7714 // "type": "string" 7715 // }, 7716 // "pageSize": { 7717 // "description": "The maximum number of results to return. If not set, the service selects a default.", 7718 // "format": "int32", 7719 // "location": "query", 7720 // "type": "integer" 7721 // }, 7722 // "pageToken": { 7723 // "description": "A page token received from the next_page_token field in the response. Send that page token to receive the subsequent page.", 7724 // "location": "query", 7725 // "type": "string" 7726 // } 7727 // }, 7728 // "path": "v1/apps/{appsId}/locations", 7729 // "response": { 7730 // "$ref": "ListLocationsResponse" 7731 // }, 7732 // "scopes": [ 7733 // "https://www.googleapis.com/auth/appengine.admin", 7734 // "https://www.googleapis.com/auth/cloud-platform", 7735 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7736 // ] 7737 // } 7738 7739} 7740 7741// Pages invokes f for each page of results. 7742// A non-nil error returned from f will halt the iteration. 7743// The provided context supersedes any context provided to the Context method. 7744func (c *AppsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 7745 c.ctx_ = ctx 7746 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 7747 for { 7748 x, err := c.Do() 7749 if err != nil { 7750 return err 7751 } 7752 if err := f(x); err != nil { 7753 return err 7754 } 7755 if x.NextPageToken == "" { 7756 return nil 7757 } 7758 c.PageToken(x.NextPageToken) 7759 } 7760} 7761 7762// method id "appengine.apps.operations.get": 7763 7764type AppsOperationsGetCall struct { 7765 s *APIService 7766 appsId string 7767 operationsId string 7768 urlParams_ gensupport.URLParams 7769 ifNoneMatch_ string 7770 ctx_ context.Context 7771 header_ http.Header 7772} 7773 7774// Get: Gets the latest state of a long-running operation. Clients can 7775// use this method to poll the operation result at intervals as 7776// recommended by the API service. 7777// 7778// - appsId: Part of `name`. The name of the operation resource. 7779// - operationsId: Part of `name`. See documentation of `appsId`. 7780func (r *AppsOperationsService) Get(appsId string, operationsId string) *AppsOperationsGetCall { 7781 c := &AppsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7782 c.appsId = appsId 7783 c.operationsId = operationsId 7784 return c 7785} 7786 7787// Fields allows partial responses to be retrieved. See 7788// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7789// for more information. 7790func (c *AppsOperationsGetCall) Fields(s ...googleapi.Field) *AppsOperationsGetCall { 7791 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7792 return c 7793} 7794 7795// IfNoneMatch sets the optional parameter which makes the operation 7796// fail if the object's ETag matches the given value. This is useful for 7797// getting updates only after the object has changed since the last 7798// request. Use googleapi.IsNotModified to check whether the response 7799// error from Do is the result of In-None-Match. 7800func (c *AppsOperationsGetCall) IfNoneMatch(entityTag string) *AppsOperationsGetCall { 7801 c.ifNoneMatch_ = entityTag 7802 return c 7803} 7804 7805// Context sets the context to be used in this call's Do method. Any 7806// pending HTTP request will be aborted if the provided context is 7807// canceled. 7808func (c *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall { 7809 c.ctx_ = ctx 7810 return c 7811} 7812 7813// Header returns an http.Header that can be modified by the caller to 7814// add HTTP headers to the request. 7815func (c *AppsOperationsGetCall) Header() http.Header { 7816 if c.header_ == nil { 7817 c.header_ = make(http.Header) 7818 } 7819 return c.header_ 7820} 7821 7822func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 7823 reqHeaders := make(http.Header) 7824 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 7825 for k, v := range c.header_ { 7826 reqHeaders[k] = v 7827 } 7828 reqHeaders.Set("User-Agent", c.s.userAgent()) 7829 if c.ifNoneMatch_ != "" { 7830 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7831 } 7832 var body io.Reader = nil 7833 c.urlParams_.Set("alt", alt) 7834 c.urlParams_.Set("prettyPrint", "false") 7835 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations/{operationsId}") 7836 urls += "?" + c.urlParams_.Encode() 7837 req, err := http.NewRequest("GET", urls, body) 7838 if err != nil { 7839 return nil, err 7840 } 7841 req.Header = reqHeaders 7842 googleapi.Expand(req.URL, map[string]string{ 7843 "appsId": c.appsId, 7844 "operationsId": c.operationsId, 7845 }) 7846 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7847} 7848 7849// Do executes the "appengine.apps.operations.get" call. 7850// Exactly one of *Operation or error will be non-nil. Any non-2xx 7851// status code is an error. Response headers are in either 7852// *Operation.ServerResponse.Header or (if a response was returned at 7853// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 7854// to check whether the returned error was because 7855// http.StatusNotModified was returned. 7856func (c *AppsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 7857 gensupport.SetOptions(c.urlParams_, opts...) 7858 res, err := c.doRequest("json") 7859 if res != nil && res.StatusCode == http.StatusNotModified { 7860 if res.Body != nil { 7861 res.Body.Close() 7862 } 7863 return nil, &googleapi.Error{ 7864 Code: res.StatusCode, 7865 Header: res.Header, 7866 } 7867 } 7868 if err != nil { 7869 return nil, err 7870 } 7871 defer googleapi.CloseBody(res) 7872 if err := googleapi.CheckResponse(res); err != nil { 7873 return nil, err 7874 } 7875 ret := &Operation{ 7876 ServerResponse: googleapi.ServerResponse{ 7877 Header: res.Header, 7878 HTTPStatusCode: res.StatusCode, 7879 }, 7880 } 7881 target := &ret 7882 if err := gensupport.DecodeResponse(target, res); err != nil { 7883 return nil, err 7884 } 7885 return ret, nil 7886 // { 7887 // "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.", 7888 // "flatPath": "v1/apps/{appsId}/operations/{operationsId}", 7889 // "httpMethod": "GET", 7890 // "id": "appengine.apps.operations.get", 7891 // "parameterOrder": [ 7892 // "appsId", 7893 // "operationsId" 7894 // ], 7895 // "parameters": { 7896 // "appsId": { 7897 // "description": "Part of `name`. The name of the operation resource.", 7898 // "location": "path", 7899 // "required": true, 7900 // "type": "string" 7901 // }, 7902 // "operationsId": { 7903 // "description": "Part of `name`. See documentation of `appsId`.", 7904 // "location": "path", 7905 // "required": true, 7906 // "type": "string" 7907 // } 7908 // }, 7909 // "path": "v1/apps/{appsId}/operations/{operationsId}", 7910 // "response": { 7911 // "$ref": "Operation" 7912 // }, 7913 // "scopes": [ 7914 // "https://www.googleapis.com/auth/appengine.admin", 7915 // "https://www.googleapis.com/auth/cloud-platform", 7916 // "https://www.googleapis.com/auth/cloud-platform.read-only" 7917 // ] 7918 // } 7919 7920} 7921 7922// method id "appengine.apps.operations.list": 7923 7924type AppsOperationsListCall struct { 7925 s *APIService 7926 appsId string 7927 urlParams_ gensupport.URLParams 7928 ifNoneMatch_ string 7929 ctx_ context.Context 7930 header_ http.Header 7931} 7932 7933// List: Lists operations that match the specified filter in the 7934// request. If the server doesn't support this method, it returns 7935// UNIMPLEMENTED.NOTE: the name binding allows API services to override 7936// the binding to use different resource name schemes, such as 7937// users/*/operations. To override the binding, API services can add a 7938// binding such as "/v1/{name=users/*}/operations" to their service 7939// configuration. For backwards compatibility, the default name includes 7940// the operations collection id, however overriding users must ensure 7941// the name binding is the parent resource, without the operations 7942// collection id. 7943// 7944// - appsId: Part of `name`. The name of the operation's parent 7945// resource. 7946func (r *AppsOperationsService) List(appsId string) *AppsOperationsListCall { 7947 c := &AppsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7948 c.appsId = appsId 7949 return c 7950} 7951 7952// Filter sets the optional parameter "filter": The standard list 7953// filter. 7954func (c *AppsOperationsListCall) Filter(filter string) *AppsOperationsListCall { 7955 c.urlParams_.Set("filter", filter) 7956 return c 7957} 7958 7959// PageSize sets the optional parameter "pageSize": The standard list 7960// page size. 7961func (c *AppsOperationsListCall) PageSize(pageSize int64) *AppsOperationsListCall { 7962 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7963 return c 7964} 7965 7966// PageToken sets the optional parameter "pageToken": The standard list 7967// page token. 7968func (c *AppsOperationsListCall) PageToken(pageToken string) *AppsOperationsListCall { 7969 c.urlParams_.Set("pageToken", pageToken) 7970 return c 7971} 7972 7973// Fields allows partial responses to be retrieved. See 7974// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7975// for more information. 7976func (c *AppsOperationsListCall) Fields(s ...googleapi.Field) *AppsOperationsListCall { 7977 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7978 return c 7979} 7980 7981// IfNoneMatch sets the optional parameter which makes the operation 7982// fail if the object's ETag matches the given value. This is useful for 7983// getting updates only after the object has changed since the last 7984// request. Use googleapi.IsNotModified to check whether the response 7985// error from Do is the result of In-None-Match. 7986func (c *AppsOperationsListCall) IfNoneMatch(entityTag string) *AppsOperationsListCall { 7987 c.ifNoneMatch_ = entityTag 7988 return c 7989} 7990 7991// Context sets the context to be used in this call's Do method. Any 7992// pending HTTP request will be aborted if the provided context is 7993// canceled. 7994func (c *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall { 7995 c.ctx_ = ctx 7996 return c 7997} 7998 7999// Header returns an http.Header that can be modified by the caller to 8000// add HTTP headers to the request. 8001func (c *AppsOperationsListCall) Header() http.Header { 8002 if c.header_ == nil { 8003 c.header_ = make(http.Header) 8004 } 8005 return c.header_ 8006} 8007 8008func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) { 8009 reqHeaders := make(http.Header) 8010 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 8011 for k, v := range c.header_ { 8012 reqHeaders[k] = v 8013 } 8014 reqHeaders.Set("User-Agent", c.s.userAgent()) 8015 if c.ifNoneMatch_ != "" { 8016 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8017 } 8018 var body io.Reader = nil 8019 c.urlParams_.Set("alt", alt) 8020 c.urlParams_.Set("prettyPrint", "false") 8021 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/operations") 8022 urls += "?" + c.urlParams_.Encode() 8023 req, err := http.NewRequest("GET", urls, body) 8024 if err != nil { 8025 return nil, err 8026 } 8027 req.Header = reqHeaders 8028 googleapi.Expand(req.URL, map[string]string{ 8029 "appsId": c.appsId, 8030 }) 8031 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8032} 8033 8034// Do executes the "appengine.apps.operations.list" call. 8035// Exactly one of *ListOperationsResponse or error will be non-nil. Any 8036// non-2xx status code is an error. Response headers are in either 8037// *ListOperationsResponse.ServerResponse.Header or (if a response was 8038// returned at all) in error.(*googleapi.Error).Header. Use 8039// googleapi.IsNotModified to check whether the returned error was 8040// because http.StatusNotModified was returned. 8041func (c *AppsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 8042 gensupport.SetOptions(c.urlParams_, opts...) 8043 res, err := c.doRequest("json") 8044 if res != nil && res.StatusCode == http.StatusNotModified { 8045 if res.Body != nil { 8046 res.Body.Close() 8047 } 8048 return nil, &googleapi.Error{ 8049 Code: res.StatusCode, 8050 Header: res.Header, 8051 } 8052 } 8053 if err != nil { 8054 return nil, err 8055 } 8056 defer googleapi.CloseBody(res) 8057 if err := googleapi.CheckResponse(res); err != nil { 8058 return nil, err 8059 } 8060 ret := &ListOperationsResponse{ 8061 ServerResponse: googleapi.ServerResponse{ 8062 Header: res.Header, 8063 HTTPStatusCode: res.StatusCode, 8064 }, 8065 } 8066 target := &ret 8067 if err := gensupport.DecodeResponse(target, res); err != nil { 8068 return nil, err 8069 } 8070 return ret, nil 8071 // { 8072 // "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.", 8073 // "flatPath": "v1/apps/{appsId}/operations", 8074 // "httpMethod": "GET", 8075 // "id": "appengine.apps.operations.list", 8076 // "parameterOrder": [ 8077 // "appsId" 8078 // ], 8079 // "parameters": { 8080 // "appsId": { 8081 // "description": "Part of `name`. The name of the operation's parent resource.", 8082 // "location": "path", 8083 // "required": true, 8084 // "type": "string" 8085 // }, 8086 // "filter": { 8087 // "description": "The standard list filter.", 8088 // "location": "query", 8089 // "type": "string" 8090 // }, 8091 // "pageSize": { 8092 // "description": "The standard list page size.", 8093 // "format": "int32", 8094 // "location": "query", 8095 // "type": "integer" 8096 // }, 8097 // "pageToken": { 8098 // "description": "The standard list page token.", 8099 // "location": "query", 8100 // "type": "string" 8101 // } 8102 // }, 8103 // "path": "v1/apps/{appsId}/operations", 8104 // "response": { 8105 // "$ref": "ListOperationsResponse" 8106 // }, 8107 // "scopes": [ 8108 // "https://www.googleapis.com/auth/appengine.admin", 8109 // "https://www.googleapis.com/auth/cloud-platform", 8110 // "https://www.googleapis.com/auth/cloud-platform.read-only" 8111 // ] 8112 // } 8113 8114} 8115 8116// Pages invokes f for each page of results. 8117// A non-nil error returned from f will halt the iteration. 8118// The provided context supersedes any context provided to the Context method. 8119func (c *AppsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 8120 c.ctx_ = ctx 8121 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8122 for { 8123 x, err := c.Do() 8124 if err != nil { 8125 return err 8126 } 8127 if err := f(x); err != nil { 8128 return err 8129 } 8130 if x.NextPageToken == "" { 8131 return nil 8132 } 8133 c.PageToken(x.NextPageToken) 8134 } 8135} 8136 8137// method id "appengine.apps.services.delete": 8138 8139type AppsServicesDeleteCall struct { 8140 s *APIService 8141 appsId string 8142 servicesId string 8143 urlParams_ gensupport.URLParams 8144 ctx_ context.Context 8145 header_ http.Header 8146} 8147 8148// Delete: Deletes the specified service and all enclosed versions. 8149// 8150// - appsId: Part of `name`. Name of the resource requested. Example: 8151// apps/myapp/services/default. 8152// - servicesId: Part of `name`. See documentation of `appsId`. 8153func (r *AppsServicesService) Delete(appsId string, servicesId string) *AppsServicesDeleteCall { 8154 c := &AppsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8155 c.appsId = appsId 8156 c.servicesId = servicesId 8157 return c 8158} 8159 8160// Fields allows partial responses to be retrieved. See 8161// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8162// for more information. 8163func (c *AppsServicesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesDeleteCall { 8164 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8165 return c 8166} 8167 8168// Context sets the context to be used in this call's Do method. Any 8169// pending HTTP request will be aborted if the provided context is 8170// canceled. 8171func (c *AppsServicesDeleteCall) Context(ctx context.Context) *AppsServicesDeleteCall { 8172 c.ctx_ = ctx 8173 return c 8174} 8175 8176// Header returns an http.Header that can be modified by the caller to 8177// add HTTP headers to the request. 8178func (c *AppsServicesDeleteCall) Header() http.Header { 8179 if c.header_ == nil { 8180 c.header_ = make(http.Header) 8181 } 8182 return c.header_ 8183} 8184 8185func (c *AppsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { 8186 reqHeaders := make(http.Header) 8187 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 8188 for k, v := range c.header_ { 8189 reqHeaders[k] = v 8190 } 8191 reqHeaders.Set("User-Agent", c.s.userAgent()) 8192 var body io.Reader = nil 8193 c.urlParams_.Set("alt", alt) 8194 c.urlParams_.Set("prettyPrint", "false") 8195 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}") 8196 urls += "?" + c.urlParams_.Encode() 8197 req, err := http.NewRequest("DELETE", urls, body) 8198 if err != nil { 8199 return nil, err 8200 } 8201 req.Header = reqHeaders 8202 googleapi.Expand(req.URL, map[string]string{ 8203 "appsId": c.appsId, 8204 "servicesId": c.servicesId, 8205 }) 8206 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8207} 8208 8209// Do executes the "appengine.apps.services.delete" call. 8210// Exactly one of *Operation or error will be non-nil. Any non-2xx 8211// status code is an error. Response headers are in either 8212// *Operation.ServerResponse.Header or (if a response was returned at 8213// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8214// to check whether the returned error was because 8215// http.StatusNotModified was returned. 8216func (c *AppsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8217 gensupport.SetOptions(c.urlParams_, opts...) 8218 res, err := c.doRequest("json") 8219 if res != nil && res.StatusCode == http.StatusNotModified { 8220 if res.Body != nil { 8221 res.Body.Close() 8222 } 8223 return nil, &googleapi.Error{ 8224 Code: res.StatusCode, 8225 Header: res.Header, 8226 } 8227 } 8228 if err != nil { 8229 return nil, err 8230 } 8231 defer googleapi.CloseBody(res) 8232 if err := googleapi.CheckResponse(res); err != nil { 8233 return nil, err 8234 } 8235 ret := &Operation{ 8236 ServerResponse: googleapi.ServerResponse{ 8237 Header: res.Header, 8238 HTTPStatusCode: res.StatusCode, 8239 }, 8240 } 8241 target := &ret 8242 if err := gensupport.DecodeResponse(target, res); err != nil { 8243 return nil, err 8244 } 8245 return ret, nil 8246 // { 8247 // "description": "Deletes the specified service and all enclosed versions.", 8248 // "flatPath": "v1/apps/{appsId}/services/{servicesId}", 8249 // "httpMethod": "DELETE", 8250 // "id": "appengine.apps.services.delete", 8251 // "parameterOrder": [ 8252 // "appsId", 8253 // "servicesId" 8254 // ], 8255 // "parameters": { 8256 // "appsId": { 8257 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", 8258 // "location": "path", 8259 // "required": true, 8260 // "type": "string" 8261 // }, 8262 // "servicesId": { 8263 // "description": "Part of `name`. See documentation of `appsId`.", 8264 // "location": "path", 8265 // "required": true, 8266 // "type": "string" 8267 // } 8268 // }, 8269 // "path": "v1/apps/{appsId}/services/{servicesId}", 8270 // "response": { 8271 // "$ref": "Operation" 8272 // }, 8273 // "scopes": [ 8274 // "https://www.googleapis.com/auth/cloud-platform" 8275 // ] 8276 // } 8277 8278} 8279 8280// method id "appengine.apps.services.get": 8281 8282type AppsServicesGetCall struct { 8283 s *APIService 8284 appsId string 8285 servicesId string 8286 urlParams_ gensupport.URLParams 8287 ifNoneMatch_ string 8288 ctx_ context.Context 8289 header_ http.Header 8290} 8291 8292// Get: Gets the current configuration of the specified service. 8293// 8294// - appsId: Part of `name`. Name of the resource requested. Example: 8295// apps/myapp/services/default. 8296// - servicesId: Part of `name`. See documentation of `appsId`. 8297func (r *AppsServicesService) Get(appsId string, servicesId string) *AppsServicesGetCall { 8298 c := &AppsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8299 c.appsId = appsId 8300 c.servicesId = servicesId 8301 return c 8302} 8303 8304// Fields allows partial responses to be retrieved. See 8305// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8306// for more information. 8307func (c *AppsServicesGetCall) Fields(s ...googleapi.Field) *AppsServicesGetCall { 8308 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8309 return c 8310} 8311 8312// IfNoneMatch sets the optional parameter which makes the operation 8313// fail if the object's ETag matches the given value. This is useful for 8314// getting updates only after the object has changed since the last 8315// request. Use googleapi.IsNotModified to check whether the response 8316// error from Do is the result of In-None-Match. 8317func (c *AppsServicesGetCall) IfNoneMatch(entityTag string) *AppsServicesGetCall { 8318 c.ifNoneMatch_ = entityTag 8319 return c 8320} 8321 8322// Context sets the context to be used in this call's Do method. Any 8323// pending HTTP request will be aborted if the provided context is 8324// canceled. 8325func (c *AppsServicesGetCall) Context(ctx context.Context) *AppsServicesGetCall { 8326 c.ctx_ = ctx 8327 return c 8328} 8329 8330// Header returns an http.Header that can be modified by the caller to 8331// add HTTP headers to the request. 8332func (c *AppsServicesGetCall) Header() http.Header { 8333 if c.header_ == nil { 8334 c.header_ = make(http.Header) 8335 } 8336 return c.header_ 8337} 8338 8339func (c *AppsServicesGetCall) doRequest(alt string) (*http.Response, error) { 8340 reqHeaders := make(http.Header) 8341 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 8342 for k, v := range c.header_ { 8343 reqHeaders[k] = v 8344 } 8345 reqHeaders.Set("User-Agent", c.s.userAgent()) 8346 if c.ifNoneMatch_ != "" { 8347 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8348 } 8349 var body io.Reader = nil 8350 c.urlParams_.Set("alt", alt) 8351 c.urlParams_.Set("prettyPrint", "false") 8352 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}") 8353 urls += "?" + c.urlParams_.Encode() 8354 req, err := http.NewRequest("GET", urls, body) 8355 if err != nil { 8356 return nil, err 8357 } 8358 req.Header = reqHeaders 8359 googleapi.Expand(req.URL, map[string]string{ 8360 "appsId": c.appsId, 8361 "servicesId": c.servicesId, 8362 }) 8363 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8364} 8365 8366// Do executes the "appengine.apps.services.get" call. 8367// Exactly one of *Service or error will be non-nil. Any non-2xx status 8368// code is an error. Response headers are in either 8369// *Service.ServerResponse.Header or (if a response was returned at all) 8370// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8371// check whether the returned error was because http.StatusNotModified 8372// was returned. 8373func (c *AppsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) { 8374 gensupport.SetOptions(c.urlParams_, opts...) 8375 res, err := c.doRequest("json") 8376 if res != nil && res.StatusCode == http.StatusNotModified { 8377 if res.Body != nil { 8378 res.Body.Close() 8379 } 8380 return nil, &googleapi.Error{ 8381 Code: res.StatusCode, 8382 Header: res.Header, 8383 } 8384 } 8385 if err != nil { 8386 return nil, err 8387 } 8388 defer googleapi.CloseBody(res) 8389 if err := googleapi.CheckResponse(res); err != nil { 8390 return nil, err 8391 } 8392 ret := &Service{ 8393 ServerResponse: googleapi.ServerResponse{ 8394 Header: res.Header, 8395 HTTPStatusCode: res.StatusCode, 8396 }, 8397 } 8398 target := &ret 8399 if err := gensupport.DecodeResponse(target, res); err != nil { 8400 return nil, err 8401 } 8402 return ret, nil 8403 // { 8404 // "description": "Gets the current configuration of the specified service.", 8405 // "flatPath": "v1/apps/{appsId}/services/{servicesId}", 8406 // "httpMethod": "GET", 8407 // "id": "appengine.apps.services.get", 8408 // "parameterOrder": [ 8409 // "appsId", 8410 // "servicesId" 8411 // ], 8412 // "parameters": { 8413 // "appsId": { 8414 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", 8415 // "location": "path", 8416 // "required": true, 8417 // "type": "string" 8418 // }, 8419 // "servicesId": { 8420 // "description": "Part of `name`. See documentation of `appsId`.", 8421 // "location": "path", 8422 // "required": true, 8423 // "type": "string" 8424 // } 8425 // }, 8426 // "path": "v1/apps/{appsId}/services/{servicesId}", 8427 // "response": { 8428 // "$ref": "Service" 8429 // }, 8430 // "scopes": [ 8431 // "https://www.googleapis.com/auth/appengine.admin", 8432 // "https://www.googleapis.com/auth/cloud-platform", 8433 // "https://www.googleapis.com/auth/cloud-platform.read-only" 8434 // ] 8435 // } 8436 8437} 8438 8439// method id "appengine.apps.services.list": 8440 8441type AppsServicesListCall struct { 8442 s *APIService 8443 appsId string 8444 urlParams_ gensupport.URLParams 8445 ifNoneMatch_ string 8446 ctx_ context.Context 8447 header_ http.Header 8448} 8449 8450// List: Lists all the services in the application. 8451// 8452// - appsId: Part of `parent`. Name of the parent Application resource. 8453// Example: apps/myapp. 8454func (r *AppsServicesService) List(appsId string) *AppsServicesListCall { 8455 c := &AppsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8456 c.appsId = appsId 8457 return c 8458} 8459 8460// PageSize sets the optional parameter "pageSize": Maximum results to 8461// return per page. 8462func (c *AppsServicesListCall) PageSize(pageSize int64) *AppsServicesListCall { 8463 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 8464 return c 8465} 8466 8467// PageToken sets the optional parameter "pageToken": Continuation token 8468// for fetching the next page of results. 8469func (c *AppsServicesListCall) PageToken(pageToken string) *AppsServicesListCall { 8470 c.urlParams_.Set("pageToken", pageToken) 8471 return c 8472} 8473 8474// Fields allows partial responses to be retrieved. See 8475// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8476// for more information. 8477func (c *AppsServicesListCall) Fields(s ...googleapi.Field) *AppsServicesListCall { 8478 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8479 return c 8480} 8481 8482// IfNoneMatch sets the optional parameter which makes the operation 8483// fail if the object's ETag matches the given value. This is useful for 8484// getting updates only after the object has changed since the last 8485// request. Use googleapi.IsNotModified to check whether the response 8486// error from Do is the result of In-None-Match. 8487func (c *AppsServicesListCall) IfNoneMatch(entityTag string) *AppsServicesListCall { 8488 c.ifNoneMatch_ = entityTag 8489 return c 8490} 8491 8492// Context sets the context to be used in this call's Do method. Any 8493// pending HTTP request will be aborted if the provided context is 8494// canceled. 8495func (c *AppsServicesListCall) Context(ctx context.Context) *AppsServicesListCall { 8496 c.ctx_ = ctx 8497 return c 8498} 8499 8500// Header returns an http.Header that can be modified by the caller to 8501// add HTTP headers to the request. 8502func (c *AppsServicesListCall) Header() http.Header { 8503 if c.header_ == nil { 8504 c.header_ = make(http.Header) 8505 } 8506 return c.header_ 8507} 8508 8509func (c *AppsServicesListCall) doRequest(alt string) (*http.Response, error) { 8510 reqHeaders := make(http.Header) 8511 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 8512 for k, v := range c.header_ { 8513 reqHeaders[k] = v 8514 } 8515 reqHeaders.Set("User-Agent", c.s.userAgent()) 8516 if c.ifNoneMatch_ != "" { 8517 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8518 } 8519 var body io.Reader = nil 8520 c.urlParams_.Set("alt", alt) 8521 c.urlParams_.Set("prettyPrint", "false") 8522 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services") 8523 urls += "?" + c.urlParams_.Encode() 8524 req, err := http.NewRequest("GET", urls, body) 8525 if err != nil { 8526 return nil, err 8527 } 8528 req.Header = reqHeaders 8529 googleapi.Expand(req.URL, map[string]string{ 8530 "appsId": c.appsId, 8531 }) 8532 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8533} 8534 8535// Do executes the "appengine.apps.services.list" call. 8536// Exactly one of *ListServicesResponse or error will be non-nil. Any 8537// non-2xx status code is an error. Response headers are in either 8538// *ListServicesResponse.ServerResponse.Header or (if a response was 8539// returned at all) in error.(*googleapi.Error).Header. Use 8540// googleapi.IsNotModified to check whether the returned error was 8541// because http.StatusNotModified was returned. 8542func (c *AppsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) { 8543 gensupport.SetOptions(c.urlParams_, opts...) 8544 res, err := c.doRequest("json") 8545 if res != nil && res.StatusCode == http.StatusNotModified { 8546 if res.Body != nil { 8547 res.Body.Close() 8548 } 8549 return nil, &googleapi.Error{ 8550 Code: res.StatusCode, 8551 Header: res.Header, 8552 } 8553 } 8554 if err != nil { 8555 return nil, err 8556 } 8557 defer googleapi.CloseBody(res) 8558 if err := googleapi.CheckResponse(res); err != nil { 8559 return nil, err 8560 } 8561 ret := &ListServicesResponse{ 8562 ServerResponse: googleapi.ServerResponse{ 8563 Header: res.Header, 8564 HTTPStatusCode: res.StatusCode, 8565 }, 8566 } 8567 target := &ret 8568 if err := gensupport.DecodeResponse(target, res); err != nil { 8569 return nil, err 8570 } 8571 return ret, nil 8572 // { 8573 // "description": "Lists all the services in the application.", 8574 // "flatPath": "v1/apps/{appsId}/services", 8575 // "httpMethod": "GET", 8576 // "id": "appengine.apps.services.list", 8577 // "parameterOrder": [ 8578 // "appsId" 8579 // ], 8580 // "parameters": { 8581 // "appsId": { 8582 // "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", 8583 // "location": "path", 8584 // "required": true, 8585 // "type": "string" 8586 // }, 8587 // "pageSize": { 8588 // "description": "Maximum results to return per page.", 8589 // "format": "int32", 8590 // "location": "query", 8591 // "type": "integer" 8592 // }, 8593 // "pageToken": { 8594 // "description": "Continuation token for fetching the next page of results.", 8595 // "location": "query", 8596 // "type": "string" 8597 // } 8598 // }, 8599 // "path": "v1/apps/{appsId}/services", 8600 // "response": { 8601 // "$ref": "ListServicesResponse" 8602 // }, 8603 // "scopes": [ 8604 // "https://www.googleapis.com/auth/appengine.admin", 8605 // "https://www.googleapis.com/auth/cloud-platform", 8606 // "https://www.googleapis.com/auth/cloud-platform.read-only" 8607 // ] 8608 // } 8609 8610} 8611 8612// Pages invokes f for each page of results. 8613// A non-nil error returned from f will halt the iteration. 8614// The provided context supersedes any context provided to the Context method. 8615func (c *AppsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error { 8616 c.ctx_ = ctx 8617 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 8618 for { 8619 x, err := c.Do() 8620 if err != nil { 8621 return err 8622 } 8623 if err := f(x); err != nil { 8624 return err 8625 } 8626 if x.NextPageToken == "" { 8627 return nil 8628 } 8629 c.PageToken(x.NextPageToken) 8630 } 8631} 8632 8633// method id "appengine.apps.services.patch": 8634 8635type AppsServicesPatchCall struct { 8636 s *APIService 8637 appsId string 8638 servicesId string 8639 service *Service 8640 urlParams_ gensupport.URLParams 8641 ctx_ context.Context 8642 header_ http.Header 8643} 8644 8645// Patch: Updates the configuration of the specified service. 8646// 8647// - appsId: Part of `name`. Name of the resource to update. Example: 8648// apps/myapp/services/default. 8649// - servicesId: Part of `name`. See documentation of `appsId`. 8650func (r *AppsServicesService) Patch(appsId string, servicesId string, service *Service) *AppsServicesPatchCall { 8651 c := &AppsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8652 c.appsId = appsId 8653 c.servicesId = servicesId 8654 c.service = service 8655 return c 8656} 8657 8658// MigrateTraffic sets the optional parameter "migrateTraffic": Set to 8659// true to gradually shift traffic to one or more versions that you 8660// specify. By default, traffic is shifted immediately. For gradual 8661// traffic migration, the target versions must be located within 8662// instances that are configured for both warmup requests 8663// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType) 8664// and automatic scaling 8665// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). 8666// You must specify the shardBy 8667// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy) 8668// field in the Service resource. Gradual traffic migration is not 8669// supported in the App Engine flexible environment. For examples, see 8670// Migrating and Splitting Traffic 8671// (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic). 8672func (c *AppsServicesPatchCall) MigrateTraffic(migrateTraffic bool) *AppsServicesPatchCall { 8673 c.urlParams_.Set("migrateTraffic", fmt.Sprint(migrateTraffic)) 8674 return c 8675} 8676 8677// UpdateMask sets the optional parameter "updateMask": Required. 8678// Standard field mask for the set of fields to be updated. 8679func (c *AppsServicesPatchCall) UpdateMask(updateMask string) *AppsServicesPatchCall { 8680 c.urlParams_.Set("updateMask", updateMask) 8681 return c 8682} 8683 8684// Fields allows partial responses to be retrieved. See 8685// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8686// for more information. 8687func (c *AppsServicesPatchCall) Fields(s ...googleapi.Field) *AppsServicesPatchCall { 8688 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8689 return c 8690} 8691 8692// Context sets the context to be used in this call's Do method. Any 8693// pending HTTP request will be aborted if the provided context is 8694// canceled. 8695func (c *AppsServicesPatchCall) Context(ctx context.Context) *AppsServicesPatchCall { 8696 c.ctx_ = ctx 8697 return c 8698} 8699 8700// Header returns an http.Header that can be modified by the caller to 8701// add HTTP headers to the request. 8702func (c *AppsServicesPatchCall) Header() http.Header { 8703 if c.header_ == nil { 8704 c.header_ = make(http.Header) 8705 } 8706 return c.header_ 8707} 8708 8709func (c *AppsServicesPatchCall) doRequest(alt string) (*http.Response, error) { 8710 reqHeaders := make(http.Header) 8711 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 8712 for k, v := range c.header_ { 8713 reqHeaders[k] = v 8714 } 8715 reqHeaders.Set("User-Agent", c.s.userAgent()) 8716 var body io.Reader = nil 8717 body, err := googleapi.WithoutDataWrapper.JSONReader(c.service) 8718 if err != nil { 8719 return nil, err 8720 } 8721 reqHeaders.Set("Content-Type", "application/json") 8722 c.urlParams_.Set("alt", alt) 8723 c.urlParams_.Set("prettyPrint", "false") 8724 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}") 8725 urls += "?" + c.urlParams_.Encode() 8726 req, err := http.NewRequest("PATCH", urls, body) 8727 if err != nil { 8728 return nil, err 8729 } 8730 req.Header = reqHeaders 8731 googleapi.Expand(req.URL, map[string]string{ 8732 "appsId": c.appsId, 8733 "servicesId": c.servicesId, 8734 }) 8735 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8736} 8737 8738// Do executes the "appengine.apps.services.patch" call. 8739// Exactly one of *Operation or error will be non-nil. Any non-2xx 8740// status code is an error. Response headers are in either 8741// *Operation.ServerResponse.Header or (if a response was returned at 8742// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8743// to check whether the returned error was because 8744// http.StatusNotModified was returned. 8745func (c *AppsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8746 gensupport.SetOptions(c.urlParams_, opts...) 8747 res, err := c.doRequest("json") 8748 if res != nil && res.StatusCode == http.StatusNotModified { 8749 if res.Body != nil { 8750 res.Body.Close() 8751 } 8752 return nil, &googleapi.Error{ 8753 Code: res.StatusCode, 8754 Header: res.Header, 8755 } 8756 } 8757 if err != nil { 8758 return nil, err 8759 } 8760 defer googleapi.CloseBody(res) 8761 if err := googleapi.CheckResponse(res); err != nil { 8762 return nil, err 8763 } 8764 ret := &Operation{ 8765 ServerResponse: googleapi.ServerResponse{ 8766 Header: res.Header, 8767 HTTPStatusCode: res.StatusCode, 8768 }, 8769 } 8770 target := &ret 8771 if err := gensupport.DecodeResponse(target, res); err != nil { 8772 return nil, err 8773 } 8774 return ret, nil 8775 // { 8776 // "description": "Updates the configuration of the specified service.", 8777 // "flatPath": "v1/apps/{appsId}/services/{servicesId}", 8778 // "httpMethod": "PATCH", 8779 // "id": "appengine.apps.services.patch", 8780 // "parameterOrder": [ 8781 // "appsId", 8782 // "servicesId" 8783 // ], 8784 // "parameters": { 8785 // "appsId": { 8786 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", 8787 // "location": "path", 8788 // "required": true, 8789 // "type": "string" 8790 // }, 8791 // "migrateTraffic": { 8792 // "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/v1/apps.services.versions#InboundServiceType) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/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).", 8793 // "location": "query", 8794 // "type": "boolean" 8795 // }, 8796 // "servicesId": { 8797 // "description": "Part of `name`. See documentation of `appsId`.", 8798 // "location": "path", 8799 // "required": true, 8800 // "type": "string" 8801 // }, 8802 // "updateMask": { 8803 // "description": "Required. Standard field mask for the set of fields to be updated.", 8804 // "format": "google-fieldmask", 8805 // "location": "query", 8806 // "type": "string" 8807 // } 8808 // }, 8809 // "path": "v1/apps/{appsId}/services/{servicesId}", 8810 // "request": { 8811 // "$ref": "Service" 8812 // }, 8813 // "response": { 8814 // "$ref": "Operation" 8815 // }, 8816 // "scopes": [ 8817 // "https://www.googleapis.com/auth/cloud-platform" 8818 // ] 8819 // } 8820 8821} 8822 8823// method id "appengine.apps.services.versions.create": 8824 8825type AppsServicesVersionsCreateCall struct { 8826 s *APIService 8827 appsId string 8828 servicesId string 8829 version *Version 8830 urlParams_ gensupport.URLParams 8831 ctx_ context.Context 8832 header_ http.Header 8833} 8834 8835// Create: Deploys code and resource files to a new version. 8836// 8837// - appsId: Part of `parent`. Name of the parent resource to create 8838// this version under. Example: apps/myapp/services/default. 8839// - servicesId: Part of `parent`. See documentation of `appsId`. 8840func (r *AppsServicesVersionsService) Create(appsId string, servicesId string, version *Version) *AppsServicesVersionsCreateCall { 8841 c := &AppsServicesVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8842 c.appsId = appsId 8843 c.servicesId = servicesId 8844 c.version = version 8845 return c 8846} 8847 8848// Fields allows partial responses to be retrieved. See 8849// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8850// for more information. 8851func (c *AppsServicesVersionsCreateCall) Fields(s ...googleapi.Field) *AppsServicesVersionsCreateCall { 8852 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8853 return c 8854} 8855 8856// Context sets the context to be used in this call's Do method. Any 8857// pending HTTP request will be aborted if the provided context is 8858// canceled. 8859func (c *AppsServicesVersionsCreateCall) Context(ctx context.Context) *AppsServicesVersionsCreateCall { 8860 c.ctx_ = ctx 8861 return c 8862} 8863 8864// Header returns an http.Header that can be modified by the caller to 8865// add HTTP headers to the request. 8866func (c *AppsServicesVersionsCreateCall) Header() http.Header { 8867 if c.header_ == nil { 8868 c.header_ = make(http.Header) 8869 } 8870 return c.header_ 8871} 8872 8873func (c *AppsServicesVersionsCreateCall) doRequest(alt string) (*http.Response, error) { 8874 reqHeaders := make(http.Header) 8875 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 8876 for k, v := range c.header_ { 8877 reqHeaders[k] = v 8878 } 8879 reqHeaders.Set("User-Agent", c.s.userAgent()) 8880 var body io.Reader = nil 8881 body, err := googleapi.WithoutDataWrapper.JSONReader(c.version) 8882 if err != nil { 8883 return nil, err 8884 } 8885 reqHeaders.Set("Content-Type", "application/json") 8886 c.urlParams_.Set("alt", alt) 8887 c.urlParams_.Set("prettyPrint", "false") 8888 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions") 8889 urls += "?" + c.urlParams_.Encode() 8890 req, err := http.NewRequest("POST", urls, body) 8891 if err != nil { 8892 return nil, err 8893 } 8894 req.Header = reqHeaders 8895 googleapi.Expand(req.URL, map[string]string{ 8896 "appsId": c.appsId, 8897 "servicesId": c.servicesId, 8898 }) 8899 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8900} 8901 8902// Do executes the "appengine.apps.services.versions.create" call. 8903// Exactly one of *Operation or error will be non-nil. Any non-2xx 8904// status code is an error. Response headers are in either 8905// *Operation.ServerResponse.Header or (if a response was returned at 8906// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8907// to check whether the returned error was because 8908// http.StatusNotModified was returned. 8909func (c *AppsServicesVersionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 8910 gensupport.SetOptions(c.urlParams_, opts...) 8911 res, err := c.doRequest("json") 8912 if res != nil && res.StatusCode == http.StatusNotModified { 8913 if res.Body != nil { 8914 res.Body.Close() 8915 } 8916 return nil, &googleapi.Error{ 8917 Code: res.StatusCode, 8918 Header: res.Header, 8919 } 8920 } 8921 if err != nil { 8922 return nil, err 8923 } 8924 defer googleapi.CloseBody(res) 8925 if err := googleapi.CheckResponse(res); err != nil { 8926 return nil, err 8927 } 8928 ret := &Operation{ 8929 ServerResponse: googleapi.ServerResponse{ 8930 Header: res.Header, 8931 HTTPStatusCode: res.StatusCode, 8932 }, 8933 } 8934 target := &ret 8935 if err := gensupport.DecodeResponse(target, res); err != nil { 8936 return nil, err 8937 } 8938 return ret, nil 8939 // { 8940 // "description": "Deploys code and resource files to a new version.", 8941 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", 8942 // "httpMethod": "POST", 8943 // "id": "appengine.apps.services.versions.create", 8944 // "parameterOrder": [ 8945 // "appsId", 8946 // "servicesId" 8947 // ], 8948 // "parameters": { 8949 // "appsId": { 8950 // "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", 8951 // "location": "path", 8952 // "required": true, 8953 // "type": "string" 8954 // }, 8955 // "servicesId": { 8956 // "description": "Part of `parent`. See documentation of `appsId`.", 8957 // "location": "path", 8958 // "required": true, 8959 // "type": "string" 8960 // } 8961 // }, 8962 // "path": "v1/apps/{appsId}/services/{servicesId}/versions", 8963 // "request": { 8964 // "$ref": "Version" 8965 // }, 8966 // "response": { 8967 // "$ref": "Operation" 8968 // }, 8969 // "scopes": [ 8970 // "https://www.googleapis.com/auth/cloud-platform" 8971 // ] 8972 // } 8973 8974} 8975 8976// method id "appengine.apps.services.versions.delete": 8977 8978type AppsServicesVersionsDeleteCall struct { 8979 s *APIService 8980 appsId string 8981 servicesId string 8982 versionsId string 8983 urlParams_ gensupport.URLParams 8984 ctx_ context.Context 8985 header_ http.Header 8986} 8987 8988// Delete: Deletes an existing Version resource. 8989// 8990// - appsId: Part of `name`. Name of the resource requested. Example: 8991// apps/myapp/services/default/versions/v1. 8992// - servicesId: Part of `name`. See documentation of `appsId`. 8993// - versionsId: Part of `name`. See documentation of `appsId`. 8994func (r *AppsServicesVersionsService) Delete(appsId string, servicesId string, versionsId string) *AppsServicesVersionsDeleteCall { 8995 c := &AppsServicesVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8996 c.appsId = appsId 8997 c.servicesId = servicesId 8998 c.versionsId = versionsId 8999 return c 9000} 9001 9002// Fields allows partial responses to be retrieved. See 9003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9004// for more information. 9005func (c *AppsServicesVersionsDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsDeleteCall { 9006 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9007 return c 9008} 9009 9010// Context sets the context to be used in this call's Do method. Any 9011// pending HTTP request will be aborted if the provided context is 9012// canceled. 9013func (c *AppsServicesVersionsDeleteCall) Context(ctx context.Context) *AppsServicesVersionsDeleteCall { 9014 c.ctx_ = ctx 9015 return c 9016} 9017 9018// Header returns an http.Header that can be modified by the caller to 9019// add HTTP headers to the request. 9020func (c *AppsServicesVersionsDeleteCall) Header() http.Header { 9021 if c.header_ == nil { 9022 c.header_ = make(http.Header) 9023 } 9024 return c.header_ 9025} 9026 9027func (c *AppsServicesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { 9028 reqHeaders := make(http.Header) 9029 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 9030 for k, v := range c.header_ { 9031 reqHeaders[k] = v 9032 } 9033 reqHeaders.Set("User-Agent", c.s.userAgent()) 9034 var body io.Reader = nil 9035 c.urlParams_.Set("alt", alt) 9036 c.urlParams_.Set("prettyPrint", "false") 9037 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 9038 urls += "?" + c.urlParams_.Encode() 9039 req, err := http.NewRequest("DELETE", urls, body) 9040 if err != nil { 9041 return nil, err 9042 } 9043 req.Header = reqHeaders 9044 googleapi.Expand(req.URL, map[string]string{ 9045 "appsId": c.appsId, 9046 "servicesId": c.servicesId, 9047 "versionsId": c.versionsId, 9048 }) 9049 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9050} 9051 9052// Do executes the "appengine.apps.services.versions.delete" call. 9053// Exactly one of *Operation or error will be non-nil. Any non-2xx 9054// status code is an error. Response headers are in either 9055// *Operation.ServerResponse.Header or (if a response was returned at 9056// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9057// to check whether the returned error was because 9058// http.StatusNotModified was returned. 9059func (c *AppsServicesVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9060 gensupport.SetOptions(c.urlParams_, opts...) 9061 res, err := c.doRequest("json") 9062 if res != nil && res.StatusCode == http.StatusNotModified { 9063 if res.Body != nil { 9064 res.Body.Close() 9065 } 9066 return nil, &googleapi.Error{ 9067 Code: res.StatusCode, 9068 Header: res.Header, 9069 } 9070 } 9071 if err != nil { 9072 return nil, err 9073 } 9074 defer googleapi.CloseBody(res) 9075 if err := googleapi.CheckResponse(res); err != nil { 9076 return nil, err 9077 } 9078 ret := &Operation{ 9079 ServerResponse: googleapi.ServerResponse{ 9080 Header: res.Header, 9081 HTTPStatusCode: res.StatusCode, 9082 }, 9083 } 9084 target := &ret 9085 if err := gensupport.DecodeResponse(target, res); err != nil { 9086 return nil, err 9087 } 9088 return ret, nil 9089 // { 9090 // "description": "Deletes an existing Version resource.", 9091 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9092 // "httpMethod": "DELETE", 9093 // "id": "appengine.apps.services.versions.delete", 9094 // "parameterOrder": [ 9095 // "appsId", 9096 // "servicesId", 9097 // "versionsId" 9098 // ], 9099 // "parameters": { 9100 // "appsId": { 9101 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", 9102 // "location": "path", 9103 // "required": true, 9104 // "type": "string" 9105 // }, 9106 // "servicesId": { 9107 // "description": "Part of `name`. See documentation of `appsId`.", 9108 // "location": "path", 9109 // "required": true, 9110 // "type": "string" 9111 // }, 9112 // "versionsId": { 9113 // "description": "Part of `name`. See documentation of `appsId`.", 9114 // "location": "path", 9115 // "required": true, 9116 // "type": "string" 9117 // } 9118 // }, 9119 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9120 // "response": { 9121 // "$ref": "Operation" 9122 // }, 9123 // "scopes": [ 9124 // "https://www.googleapis.com/auth/cloud-platform" 9125 // ] 9126 // } 9127 9128} 9129 9130// method id "appengine.apps.services.versions.get": 9131 9132type AppsServicesVersionsGetCall struct { 9133 s *APIService 9134 appsId string 9135 servicesId string 9136 versionsId string 9137 urlParams_ gensupport.URLParams 9138 ifNoneMatch_ string 9139 ctx_ context.Context 9140 header_ http.Header 9141} 9142 9143// Get: Gets the specified Version resource. By default, only a 9144// BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get 9145// the full resource. 9146// 9147// - appsId: Part of `name`. Name of the resource requested. Example: 9148// apps/myapp/services/default/versions/v1. 9149// - servicesId: Part of `name`. See documentation of `appsId`. 9150// - versionsId: Part of `name`. See documentation of `appsId`. 9151func (r *AppsServicesVersionsService) Get(appsId string, servicesId string, versionsId string) *AppsServicesVersionsGetCall { 9152 c := &AppsServicesVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9153 c.appsId = appsId 9154 c.servicesId = servicesId 9155 c.versionsId = versionsId 9156 return c 9157} 9158 9159// View sets the optional parameter "view": Controls the set of fields 9160// returned in the Get response. 9161// 9162// Possible values: 9163// "BASIC" - Basic version information including scaling and inbound 9164// services, but not detailed deployment information. 9165// "FULL" - The information from BASIC, plus detailed information 9166// about the deployment. This format is required when creating 9167// resources, but is not returned in Get or List by default. 9168func (c *AppsServicesVersionsGetCall) View(view string) *AppsServicesVersionsGetCall { 9169 c.urlParams_.Set("view", view) 9170 return c 9171} 9172 9173// Fields allows partial responses to be retrieved. See 9174// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9175// for more information. 9176func (c *AppsServicesVersionsGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsGetCall { 9177 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9178 return c 9179} 9180 9181// IfNoneMatch sets the optional parameter which makes the operation 9182// fail if the object's ETag matches the given value. This is useful for 9183// getting updates only after the object has changed since the last 9184// request. Use googleapi.IsNotModified to check whether the response 9185// error from Do is the result of In-None-Match. 9186func (c *AppsServicesVersionsGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsGetCall { 9187 c.ifNoneMatch_ = entityTag 9188 return c 9189} 9190 9191// Context sets the context to be used in this call's Do method. Any 9192// pending HTTP request will be aborted if the provided context is 9193// canceled. 9194func (c *AppsServicesVersionsGetCall) Context(ctx context.Context) *AppsServicesVersionsGetCall { 9195 c.ctx_ = ctx 9196 return c 9197} 9198 9199// Header returns an http.Header that can be modified by the caller to 9200// add HTTP headers to the request. 9201func (c *AppsServicesVersionsGetCall) Header() http.Header { 9202 if c.header_ == nil { 9203 c.header_ = make(http.Header) 9204 } 9205 return c.header_ 9206} 9207 9208func (c *AppsServicesVersionsGetCall) doRequest(alt string) (*http.Response, error) { 9209 reqHeaders := make(http.Header) 9210 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 9211 for k, v := range c.header_ { 9212 reqHeaders[k] = v 9213 } 9214 reqHeaders.Set("User-Agent", c.s.userAgent()) 9215 if c.ifNoneMatch_ != "" { 9216 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9217 } 9218 var body io.Reader = nil 9219 c.urlParams_.Set("alt", alt) 9220 c.urlParams_.Set("prettyPrint", "false") 9221 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 9222 urls += "?" + c.urlParams_.Encode() 9223 req, err := http.NewRequest("GET", urls, body) 9224 if err != nil { 9225 return nil, err 9226 } 9227 req.Header = reqHeaders 9228 googleapi.Expand(req.URL, map[string]string{ 9229 "appsId": c.appsId, 9230 "servicesId": c.servicesId, 9231 "versionsId": c.versionsId, 9232 }) 9233 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9234} 9235 9236// Do executes the "appengine.apps.services.versions.get" call. 9237// Exactly one of *Version or error will be non-nil. Any non-2xx status 9238// code is an error. Response headers are in either 9239// *Version.ServerResponse.Header or (if a response was returned at all) 9240// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9241// check whether the returned error was because http.StatusNotModified 9242// was returned. 9243func (c *AppsServicesVersionsGetCall) Do(opts ...googleapi.CallOption) (*Version, error) { 9244 gensupport.SetOptions(c.urlParams_, opts...) 9245 res, err := c.doRequest("json") 9246 if res != nil && res.StatusCode == http.StatusNotModified { 9247 if res.Body != nil { 9248 res.Body.Close() 9249 } 9250 return nil, &googleapi.Error{ 9251 Code: res.StatusCode, 9252 Header: res.Header, 9253 } 9254 } 9255 if err != nil { 9256 return nil, err 9257 } 9258 defer googleapi.CloseBody(res) 9259 if err := googleapi.CheckResponse(res); err != nil { 9260 return nil, err 9261 } 9262 ret := &Version{ 9263 ServerResponse: googleapi.ServerResponse{ 9264 Header: res.Header, 9265 HTTPStatusCode: res.StatusCode, 9266 }, 9267 } 9268 target := &ret 9269 if err := gensupport.DecodeResponse(target, res); err != nil { 9270 return nil, err 9271 } 9272 return ret, nil 9273 // { 9274 // "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.", 9275 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9276 // "httpMethod": "GET", 9277 // "id": "appengine.apps.services.versions.get", 9278 // "parameterOrder": [ 9279 // "appsId", 9280 // "servicesId", 9281 // "versionsId" 9282 // ], 9283 // "parameters": { 9284 // "appsId": { 9285 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", 9286 // "location": "path", 9287 // "required": true, 9288 // "type": "string" 9289 // }, 9290 // "servicesId": { 9291 // "description": "Part of `name`. See documentation of `appsId`.", 9292 // "location": "path", 9293 // "required": true, 9294 // "type": "string" 9295 // }, 9296 // "versionsId": { 9297 // "description": "Part of `name`. See documentation of `appsId`.", 9298 // "location": "path", 9299 // "required": true, 9300 // "type": "string" 9301 // }, 9302 // "view": { 9303 // "description": "Controls the set of fields returned in the Get response.", 9304 // "enum": [ 9305 // "BASIC", 9306 // "FULL" 9307 // ], 9308 // "enumDescriptions": [ 9309 // "Basic version information including scaling and inbound services, but not detailed deployment information.", 9310 // "The information from BASIC, plus detailed information about the deployment. This format is required when creating resources, but is not returned in Get or List by default." 9311 // ], 9312 // "location": "query", 9313 // "type": "string" 9314 // } 9315 // }, 9316 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9317 // "response": { 9318 // "$ref": "Version" 9319 // }, 9320 // "scopes": [ 9321 // "https://www.googleapis.com/auth/appengine.admin", 9322 // "https://www.googleapis.com/auth/cloud-platform", 9323 // "https://www.googleapis.com/auth/cloud-platform.read-only" 9324 // ] 9325 // } 9326 9327} 9328 9329// method id "appengine.apps.services.versions.list": 9330 9331type AppsServicesVersionsListCall struct { 9332 s *APIService 9333 appsId string 9334 servicesId string 9335 urlParams_ gensupport.URLParams 9336 ifNoneMatch_ string 9337 ctx_ context.Context 9338 header_ http.Header 9339} 9340 9341// List: Lists the versions of a service. 9342// 9343// - appsId: Part of `parent`. Name of the parent Service resource. 9344// Example: apps/myapp/services/default. 9345// - servicesId: Part of `parent`. See documentation of `appsId`. 9346func (r *AppsServicesVersionsService) List(appsId string, servicesId string) *AppsServicesVersionsListCall { 9347 c := &AppsServicesVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9348 c.appsId = appsId 9349 c.servicesId = servicesId 9350 return c 9351} 9352 9353// PageSize sets the optional parameter "pageSize": Maximum results to 9354// return per page. 9355func (c *AppsServicesVersionsListCall) PageSize(pageSize int64) *AppsServicesVersionsListCall { 9356 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9357 return c 9358} 9359 9360// PageToken sets the optional parameter "pageToken": Continuation token 9361// for fetching the next page of results. 9362func (c *AppsServicesVersionsListCall) PageToken(pageToken string) *AppsServicesVersionsListCall { 9363 c.urlParams_.Set("pageToken", pageToken) 9364 return c 9365} 9366 9367// View sets the optional parameter "view": Controls the set of fields 9368// returned in the List response. 9369// 9370// Possible values: 9371// "BASIC" - Basic version information including scaling and inbound 9372// services, but not detailed deployment information. 9373// "FULL" - The information from BASIC, plus detailed information 9374// about the deployment. This format is required when creating 9375// resources, but is not returned in Get or List by default. 9376func (c *AppsServicesVersionsListCall) View(view string) *AppsServicesVersionsListCall { 9377 c.urlParams_.Set("view", view) 9378 return c 9379} 9380 9381// Fields allows partial responses to be retrieved. See 9382// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9383// for more information. 9384func (c *AppsServicesVersionsListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsListCall { 9385 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9386 return c 9387} 9388 9389// IfNoneMatch sets the optional parameter which makes the operation 9390// fail if the object's ETag matches the given value. This is useful for 9391// getting updates only after the object has changed since the last 9392// request. Use googleapi.IsNotModified to check whether the response 9393// error from Do is the result of In-None-Match. 9394func (c *AppsServicesVersionsListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsListCall { 9395 c.ifNoneMatch_ = entityTag 9396 return c 9397} 9398 9399// Context sets the context to be used in this call's Do method. Any 9400// pending HTTP request will be aborted if the provided context is 9401// canceled. 9402func (c *AppsServicesVersionsListCall) Context(ctx context.Context) *AppsServicesVersionsListCall { 9403 c.ctx_ = ctx 9404 return c 9405} 9406 9407// Header returns an http.Header that can be modified by the caller to 9408// add HTTP headers to the request. 9409func (c *AppsServicesVersionsListCall) Header() http.Header { 9410 if c.header_ == nil { 9411 c.header_ = make(http.Header) 9412 } 9413 return c.header_ 9414} 9415 9416func (c *AppsServicesVersionsListCall) doRequest(alt string) (*http.Response, error) { 9417 reqHeaders := make(http.Header) 9418 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 9419 for k, v := range c.header_ { 9420 reqHeaders[k] = v 9421 } 9422 reqHeaders.Set("User-Agent", c.s.userAgent()) 9423 if c.ifNoneMatch_ != "" { 9424 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9425 } 9426 var body io.Reader = nil 9427 c.urlParams_.Set("alt", alt) 9428 c.urlParams_.Set("prettyPrint", "false") 9429 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions") 9430 urls += "?" + c.urlParams_.Encode() 9431 req, err := http.NewRequest("GET", urls, body) 9432 if err != nil { 9433 return nil, err 9434 } 9435 req.Header = reqHeaders 9436 googleapi.Expand(req.URL, map[string]string{ 9437 "appsId": c.appsId, 9438 "servicesId": c.servicesId, 9439 }) 9440 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9441} 9442 9443// Do executes the "appengine.apps.services.versions.list" call. 9444// Exactly one of *ListVersionsResponse or error will be non-nil. Any 9445// non-2xx status code is an error. Response headers are in either 9446// *ListVersionsResponse.ServerResponse.Header or (if a response was 9447// returned at all) in error.(*googleapi.Error).Header. Use 9448// googleapi.IsNotModified to check whether the returned error was 9449// because http.StatusNotModified was returned. 9450func (c *AppsServicesVersionsListCall) Do(opts ...googleapi.CallOption) (*ListVersionsResponse, error) { 9451 gensupport.SetOptions(c.urlParams_, opts...) 9452 res, err := c.doRequest("json") 9453 if res != nil && res.StatusCode == http.StatusNotModified { 9454 if res.Body != nil { 9455 res.Body.Close() 9456 } 9457 return nil, &googleapi.Error{ 9458 Code: res.StatusCode, 9459 Header: res.Header, 9460 } 9461 } 9462 if err != nil { 9463 return nil, err 9464 } 9465 defer googleapi.CloseBody(res) 9466 if err := googleapi.CheckResponse(res); err != nil { 9467 return nil, err 9468 } 9469 ret := &ListVersionsResponse{ 9470 ServerResponse: googleapi.ServerResponse{ 9471 Header: res.Header, 9472 HTTPStatusCode: res.StatusCode, 9473 }, 9474 } 9475 target := &ret 9476 if err := gensupport.DecodeResponse(target, res); err != nil { 9477 return nil, err 9478 } 9479 return ret, nil 9480 // { 9481 // "description": "Lists the versions of a service.", 9482 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", 9483 // "httpMethod": "GET", 9484 // "id": "appengine.apps.services.versions.list", 9485 // "parameterOrder": [ 9486 // "appsId", 9487 // "servicesId" 9488 // ], 9489 // "parameters": { 9490 // "appsId": { 9491 // "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", 9492 // "location": "path", 9493 // "required": true, 9494 // "type": "string" 9495 // }, 9496 // "pageSize": { 9497 // "description": "Maximum results to return per page.", 9498 // "format": "int32", 9499 // "location": "query", 9500 // "type": "integer" 9501 // }, 9502 // "pageToken": { 9503 // "description": "Continuation token for fetching the next page of results.", 9504 // "location": "query", 9505 // "type": "string" 9506 // }, 9507 // "servicesId": { 9508 // "description": "Part of `parent`. See documentation of `appsId`.", 9509 // "location": "path", 9510 // "required": true, 9511 // "type": "string" 9512 // }, 9513 // "view": { 9514 // "description": "Controls the set of fields returned in the List response.", 9515 // "enum": [ 9516 // "BASIC", 9517 // "FULL" 9518 // ], 9519 // "enumDescriptions": [ 9520 // "Basic version information including scaling and inbound services, but not detailed deployment information.", 9521 // "The information from BASIC, plus detailed information about the deployment. This format is required when creating resources, but is not returned in Get or List by default." 9522 // ], 9523 // "location": "query", 9524 // "type": "string" 9525 // } 9526 // }, 9527 // "path": "v1/apps/{appsId}/services/{servicesId}/versions", 9528 // "response": { 9529 // "$ref": "ListVersionsResponse" 9530 // }, 9531 // "scopes": [ 9532 // "https://www.googleapis.com/auth/appengine.admin", 9533 // "https://www.googleapis.com/auth/cloud-platform", 9534 // "https://www.googleapis.com/auth/cloud-platform.read-only" 9535 // ] 9536 // } 9537 9538} 9539 9540// Pages invokes f for each page of results. 9541// A non-nil error returned from f will halt the iteration. 9542// The provided context supersedes any context provided to the Context method. 9543func (c *AppsServicesVersionsListCall) Pages(ctx context.Context, f func(*ListVersionsResponse) error) error { 9544 c.ctx_ = ctx 9545 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 9546 for { 9547 x, err := c.Do() 9548 if err != nil { 9549 return err 9550 } 9551 if err := f(x); err != nil { 9552 return err 9553 } 9554 if x.NextPageToken == "" { 9555 return nil 9556 } 9557 c.PageToken(x.NextPageToken) 9558 } 9559} 9560 9561// method id "appengine.apps.services.versions.patch": 9562 9563type AppsServicesVersionsPatchCall struct { 9564 s *APIService 9565 appsId string 9566 servicesId string 9567 versionsId string 9568 version *Version 9569 urlParams_ gensupport.URLParams 9570 ctx_ context.Context 9571 header_ http.Header 9572} 9573 9574// Patch: Updates the specified Version resource. You can specify the 9575// following fields depending on the App Engine environment and type of 9576// scaling that the version resource uses:Standard environment 9577// instance_class 9578// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)automatic 9579// scaling in the standard environment: 9580// automatic_scaling.min_idle_instances 9581// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9582// automatic_scaling.max_idle_instances 9583// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9584// automaticScaling.standard_scheduler_settings.max_instances 9585// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) 9586// automaticScaling.standard_scheduler_settings.min_instances 9587// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) 9588// automaticScaling.standard_scheduler_settings.target_cpu_utilization 9589// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) 9590// automaticScaling.standard_scheduler_settings.target_throughput_utiliza 9591// tion 9592// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)basic 9593// scaling or manual scaling in the standard environment: serving_status 9594// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) 9595// manual_scaling.instances 9596// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)Flexible 9597// environment serving_status 9598// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)automatic 9599// scaling in the flexible environment: 9600// automatic_scaling.min_total_instances 9601// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9602// automatic_scaling.max_total_instances 9603// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9604// automatic_scaling.cool_down_period_sec 9605// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) 9606// automatic_scaling.cpu_utilization.target_utilization 9607// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)manual 9608// scaling in the flexible environment: manual_scaling.instances 9609// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling) 9610// 9611// - appsId: Part of `name`. Name of the resource to update. Example: 9612// apps/myapp/services/default/versions/1. 9613// - servicesId: Part of `name`. See documentation of `appsId`. 9614// - versionsId: Part of `name`. See documentation of `appsId`. 9615func (r *AppsServicesVersionsService) Patch(appsId string, servicesId string, versionsId string, version *Version) *AppsServicesVersionsPatchCall { 9616 c := &AppsServicesVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9617 c.appsId = appsId 9618 c.servicesId = servicesId 9619 c.versionsId = versionsId 9620 c.version = version 9621 return c 9622} 9623 9624// UpdateMask sets the optional parameter "updateMask": Standard field 9625// mask for the set of fields to be updated. 9626func (c *AppsServicesVersionsPatchCall) UpdateMask(updateMask string) *AppsServicesVersionsPatchCall { 9627 c.urlParams_.Set("updateMask", updateMask) 9628 return c 9629} 9630 9631// Fields allows partial responses to be retrieved. See 9632// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9633// for more information. 9634func (c *AppsServicesVersionsPatchCall) Fields(s ...googleapi.Field) *AppsServicesVersionsPatchCall { 9635 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9636 return c 9637} 9638 9639// Context sets the context to be used in this call's Do method. Any 9640// pending HTTP request will be aborted if the provided context is 9641// canceled. 9642func (c *AppsServicesVersionsPatchCall) Context(ctx context.Context) *AppsServicesVersionsPatchCall { 9643 c.ctx_ = ctx 9644 return c 9645} 9646 9647// Header returns an http.Header that can be modified by the caller to 9648// add HTTP headers to the request. 9649func (c *AppsServicesVersionsPatchCall) Header() http.Header { 9650 if c.header_ == nil { 9651 c.header_ = make(http.Header) 9652 } 9653 return c.header_ 9654} 9655 9656func (c *AppsServicesVersionsPatchCall) doRequest(alt string) (*http.Response, error) { 9657 reqHeaders := make(http.Header) 9658 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 9659 for k, v := range c.header_ { 9660 reqHeaders[k] = v 9661 } 9662 reqHeaders.Set("User-Agent", c.s.userAgent()) 9663 var body io.Reader = nil 9664 body, err := googleapi.WithoutDataWrapper.JSONReader(c.version) 9665 if err != nil { 9666 return nil, err 9667 } 9668 reqHeaders.Set("Content-Type", "application/json") 9669 c.urlParams_.Set("alt", alt) 9670 c.urlParams_.Set("prettyPrint", "false") 9671 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}") 9672 urls += "?" + c.urlParams_.Encode() 9673 req, err := http.NewRequest("PATCH", urls, body) 9674 if err != nil { 9675 return nil, err 9676 } 9677 req.Header = reqHeaders 9678 googleapi.Expand(req.URL, map[string]string{ 9679 "appsId": c.appsId, 9680 "servicesId": c.servicesId, 9681 "versionsId": c.versionsId, 9682 }) 9683 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9684} 9685 9686// Do executes the "appengine.apps.services.versions.patch" call. 9687// Exactly one of *Operation or error will be non-nil. Any non-2xx 9688// status code is an error. Response headers are in either 9689// *Operation.ServerResponse.Header or (if a response was returned at 9690// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9691// to check whether the returned error was because 9692// http.StatusNotModified was returned. 9693func (c *AppsServicesVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9694 gensupport.SetOptions(c.urlParams_, opts...) 9695 res, err := c.doRequest("json") 9696 if res != nil && res.StatusCode == http.StatusNotModified { 9697 if res.Body != nil { 9698 res.Body.Close() 9699 } 9700 return nil, &googleapi.Error{ 9701 Code: res.StatusCode, 9702 Header: res.Header, 9703 } 9704 } 9705 if err != nil { 9706 return nil, err 9707 } 9708 defer googleapi.CloseBody(res) 9709 if err := googleapi.CheckResponse(res); err != nil { 9710 return nil, err 9711 } 9712 ret := &Operation{ 9713 ServerResponse: googleapi.ServerResponse{ 9714 Header: res.Header, 9715 HTTPStatusCode: res.StatusCode, 9716 }, 9717 } 9718 target := &ret 9719 if err := gensupport.DecodeResponse(target, res); err != nil { 9720 return nil, err 9721 } 9722 return ret, nil 9723 // { 9724 // "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 instance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)automatic scaling in the standard environment: automatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automaticScaling.standard_scheduler_settings.max_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.min_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.target_cpu_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings) automaticScaling.standard_scheduler_settings.target_throughput_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)basic scaling or manual scaling in the standard environment: serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status) manual_scaling.instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)Flexible environment serving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)automatic scaling in the flexible environment: automatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling) automatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)manual scaling in the flexible environment: manual_scaling.instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)", 9725 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9726 // "httpMethod": "PATCH", 9727 // "id": "appengine.apps.services.versions.patch", 9728 // "parameterOrder": [ 9729 // "appsId", 9730 // "servicesId", 9731 // "versionsId" 9732 // ], 9733 // "parameters": { 9734 // "appsId": { 9735 // "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", 9736 // "location": "path", 9737 // "required": true, 9738 // "type": "string" 9739 // }, 9740 // "servicesId": { 9741 // "description": "Part of `name`. See documentation of `appsId`.", 9742 // "location": "path", 9743 // "required": true, 9744 // "type": "string" 9745 // }, 9746 // "updateMask": { 9747 // "description": "Standard field mask for the set of fields to be updated.", 9748 // "format": "google-fieldmask", 9749 // "location": "query", 9750 // "type": "string" 9751 // }, 9752 // "versionsId": { 9753 // "description": "Part of `name`. See documentation of `appsId`.", 9754 // "location": "path", 9755 // "required": true, 9756 // "type": "string" 9757 // } 9758 // }, 9759 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", 9760 // "request": { 9761 // "$ref": "Version" 9762 // }, 9763 // "response": { 9764 // "$ref": "Operation" 9765 // }, 9766 // "scopes": [ 9767 // "https://www.googleapis.com/auth/cloud-platform" 9768 // ] 9769 // } 9770 9771} 9772 9773// method id "appengine.apps.services.versions.instances.debug": 9774 9775type AppsServicesVersionsInstancesDebugCall struct { 9776 s *APIService 9777 appsId string 9778 servicesId string 9779 versionsId string 9780 instancesId string 9781 debuginstancerequest *DebugInstanceRequest 9782 urlParams_ gensupport.URLParams 9783 ctx_ context.Context 9784 header_ http.Header 9785} 9786 9787// Debug: Enables debugging on a VM instance. This allows you to use the 9788// SSH command to connect to the virtual machine where the instance 9789// lives. While in "debug mode", the instance continues to serve live 9790// traffic. You should delete the instance when you are done debugging 9791// and then allow the system to take over and determine if another 9792// instance should be started.Only applicable for instances in App 9793// Engine flexible environment. 9794// 9795// - appsId: Part of `name`. Name of the resource requested. Example: 9796// apps/myapp/services/default/versions/v1/instances/instance-1. 9797// - instancesId: Part of `name`. See documentation of `appsId`. 9798// - servicesId: Part of `name`. See documentation of `appsId`. 9799// - versionsId: Part of `name`. See documentation of `appsId`. 9800func (r *AppsServicesVersionsInstancesService) Debug(appsId string, servicesId string, versionsId string, instancesId string, debuginstancerequest *DebugInstanceRequest) *AppsServicesVersionsInstancesDebugCall { 9801 c := &AppsServicesVersionsInstancesDebugCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9802 c.appsId = appsId 9803 c.servicesId = servicesId 9804 c.versionsId = versionsId 9805 c.instancesId = instancesId 9806 c.debuginstancerequest = debuginstancerequest 9807 return c 9808} 9809 9810// Fields allows partial responses to be retrieved. See 9811// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9812// for more information. 9813func (c *AppsServicesVersionsInstancesDebugCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDebugCall { 9814 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9815 return c 9816} 9817 9818// Context sets the context to be used in this call's Do method. Any 9819// pending HTTP request will be aborted if the provided context is 9820// canceled. 9821func (c *AppsServicesVersionsInstancesDebugCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDebugCall { 9822 c.ctx_ = ctx 9823 return c 9824} 9825 9826// Header returns an http.Header that can be modified by the caller to 9827// add HTTP headers to the request. 9828func (c *AppsServicesVersionsInstancesDebugCall) Header() http.Header { 9829 if c.header_ == nil { 9830 c.header_ = make(http.Header) 9831 } 9832 return c.header_ 9833} 9834 9835func (c *AppsServicesVersionsInstancesDebugCall) doRequest(alt string) (*http.Response, error) { 9836 reqHeaders := make(http.Header) 9837 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 9838 for k, v := range c.header_ { 9839 reqHeaders[k] = v 9840 } 9841 reqHeaders.Set("User-Agent", c.s.userAgent()) 9842 var body io.Reader = nil 9843 body, err := googleapi.WithoutDataWrapper.JSONReader(c.debuginstancerequest) 9844 if err != nil { 9845 return nil, err 9846 } 9847 reqHeaders.Set("Content-Type", "application/json") 9848 c.urlParams_.Set("alt", alt) 9849 c.urlParams_.Set("prettyPrint", "false") 9850 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug") 9851 urls += "?" + c.urlParams_.Encode() 9852 req, err := http.NewRequest("POST", urls, body) 9853 if err != nil { 9854 return nil, err 9855 } 9856 req.Header = reqHeaders 9857 googleapi.Expand(req.URL, map[string]string{ 9858 "appsId": c.appsId, 9859 "servicesId": c.servicesId, 9860 "versionsId": c.versionsId, 9861 "instancesId": c.instancesId, 9862 }) 9863 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9864} 9865 9866// Do executes the "appengine.apps.services.versions.instances.debug" call. 9867// Exactly one of *Operation or error will be non-nil. Any non-2xx 9868// status code is an error. Response headers are in either 9869// *Operation.ServerResponse.Header or (if a response was returned at 9870// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9871// to check whether the returned error was because 9872// http.StatusNotModified was returned. 9873func (c *AppsServicesVersionsInstancesDebugCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 9874 gensupport.SetOptions(c.urlParams_, opts...) 9875 res, err := c.doRequest("json") 9876 if res != nil && res.StatusCode == http.StatusNotModified { 9877 if res.Body != nil { 9878 res.Body.Close() 9879 } 9880 return nil, &googleapi.Error{ 9881 Code: res.StatusCode, 9882 Header: res.Header, 9883 } 9884 } 9885 if err != nil { 9886 return nil, err 9887 } 9888 defer googleapi.CloseBody(res) 9889 if err := googleapi.CheckResponse(res); err != nil { 9890 return nil, err 9891 } 9892 ret := &Operation{ 9893 ServerResponse: googleapi.ServerResponse{ 9894 Header: res.Header, 9895 HTTPStatusCode: res.StatusCode, 9896 }, 9897 } 9898 target := &ret 9899 if err := gensupport.DecodeResponse(target, res); err != nil { 9900 return nil, err 9901 } 9902 return ret, nil 9903 // { 9904 // "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.", 9905 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", 9906 // "httpMethod": "POST", 9907 // "id": "appengine.apps.services.versions.instances.debug", 9908 // "parameterOrder": [ 9909 // "appsId", 9910 // "servicesId", 9911 // "versionsId", 9912 // "instancesId" 9913 // ], 9914 // "parameters": { 9915 // "appsId": { 9916 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 9917 // "location": "path", 9918 // "required": true, 9919 // "type": "string" 9920 // }, 9921 // "instancesId": { 9922 // "description": "Part of `name`. See documentation of `appsId`.", 9923 // "location": "path", 9924 // "required": true, 9925 // "type": "string" 9926 // }, 9927 // "servicesId": { 9928 // "description": "Part of `name`. See documentation of `appsId`.", 9929 // "location": "path", 9930 // "required": true, 9931 // "type": "string" 9932 // }, 9933 // "versionsId": { 9934 // "description": "Part of `name`. See documentation of `appsId`.", 9935 // "location": "path", 9936 // "required": true, 9937 // "type": "string" 9938 // } 9939 // }, 9940 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", 9941 // "request": { 9942 // "$ref": "DebugInstanceRequest" 9943 // }, 9944 // "response": { 9945 // "$ref": "Operation" 9946 // }, 9947 // "scopes": [ 9948 // "https://www.googleapis.com/auth/cloud-platform" 9949 // ] 9950 // } 9951 9952} 9953 9954// method id "appengine.apps.services.versions.instances.delete": 9955 9956type AppsServicesVersionsInstancesDeleteCall struct { 9957 s *APIService 9958 appsId string 9959 servicesId string 9960 versionsId string 9961 instancesId string 9962 urlParams_ gensupport.URLParams 9963 ctx_ context.Context 9964 header_ http.Header 9965} 9966 9967// Delete: Stops a running instance.The instance might be automatically 9968// recreated based on the scaling settings of the version. For more 9969// information, see "How Instances are Managed" (standard environment 9970// (https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) 9971// | flexible environment 9972// (https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).To 9973// ensure that instances are not re-created and avoid getting billed, 9974// you can stop all instances within the target version by changing the 9975// serving status of the version to STOPPED with the 9976// apps.services.versions.patch 9977// (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch) 9978// method. 9979// 9980// - appsId: Part of `name`. Name of the resource requested. Example: 9981// apps/myapp/services/default/versions/v1/instances/instance-1. 9982// - instancesId: Part of `name`. See documentation of `appsId`. 9983// - servicesId: Part of `name`. See documentation of `appsId`. 9984// - versionsId: Part of `name`. See documentation of `appsId`. 9985func (r *AppsServicesVersionsInstancesService) Delete(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesDeleteCall { 9986 c := &AppsServicesVersionsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9987 c.appsId = appsId 9988 c.servicesId = servicesId 9989 c.versionsId = versionsId 9990 c.instancesId = instancesId 9991 return c 9992} 9993 9994// Fields allows partial responses to be retrieved. See 9995// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9996// for more information. 9997func (c *AppsServicesVersionsInstancesDeleteCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesDeleteCall { 9998 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9999 return c 10000} 10001 10002// Context sets the context to be used in this call's Do method. Any 10003// pending HTTP request will be aborted if the provided context is 10004// canceled. 10005func (c *AppsServicesVersionsInstancesDeleteCall) Context(ctx context.Context) *AppsServicesVersionsInstancesDeleteCall { 10006 c.ctx_ = ctx 10007 return c 10008} 10009 10010// Header returns an http.Header that can be modified by the caller to 10011// add HTTP headers to the request. 10012func (c *AppsServicesVersionsInstancesDeleteCall) Header() http.Header { 10013 if c.header_ == nil { 10014 c.header_ = make(http.Header) 10015 } 10016 return c.header_ 10017} 10018 10019func (c *AppsServicesVersionsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 10020 reqHeaders := make(http.Header) 10021 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 10022 for k, v := range c.header_ { 10023 reqHeaders[k] = v 10024 } 10025 reqHeaders.Set("User-Agent", c.s.userAgent()) 10026 var body io.Reader = nil 10027 c.urlParams_.Set("alt", alt) 10028 c.urlParams_.Set("prettyPrint", "false") 10029 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") 10030 urls += "?" + c.urlParams_.Encode() 10031 req, err := http.NewRequest("DELETE", urls, body) 10032 if err != nil { 10033 return nil, err 10034 } 10035 req.Header = reqHeaders 10036 googleapi.Expand(req.URL, map[string]string{ 10037 "appsId": c.appsId, 10038 "servicesId": c.servicesId, 10039 "versionsId": c.versionsId, 10040 "instancesId": c.instancesId, 10041 }) 10042 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10043} 10044 10045// Do executes the "appengine.apps.services.versions.instances.delete" call. 10046// Exactly one of *Operation or error will be non-nil. Any non-2xx 10047// status code is an error. Response headers are in either 10048// *Operation.ServerResponse.Header or (if a response was returned at 10049// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10050// to check whether the returned error was because 10051// http.StatusNotModified was returned. 10052func (c *AppsServicesVersionsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 10053 gensupport.SetOptions(c.urlParams_, opts...) 10054 res, err := c.doRequest("json") 10055 if res != nil && res.StatusCode == http.StatusNotModified { 10056 if res.Body != nil { 10057 res.Body.Close() 10058 } 10059 return nil, &googleapi.Error{ 10060 Code: res.StatusCode, 10061 Header: res.Header, 10062 } 10063 } 10064 if err != nil { 10065 return nil, err 10066 } 10067 defer googleapi.CloseBody(res) 10068 if err := googleapi.CheckResponse(res); err != nil { 10069 return nil, err 10070 } 10071 ret := &Operation{ 10072 ServerResponse: googleapi.ServerResponse{ 10073 Header: res.Header, 10074 HTTPStatusCode: res.StatusCode, 10075 }, 10076 } 10077 target := &ret 10078 if err := gensupport.DecodeResponse(target, res); err != nil { 10079 return nil, err 10080 } 10081 return ret, nil 10082 // { 10083 // "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.", 10084 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 10085 // "httpMethod": "DELETE", 10086 // "id": "appengine.apps.services.versions.instances.delete", 10087 // "parameterOrder": [ 10088 // "appsId", 10089 // "servicesId", 10090 // "versionsId", 10091 // "instancesId" 10092 // ], 10093 // "parameters": { 10094 // "appsId": { 10095 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 10096 // "location": "path", 10097 // "required": true, 10098 // "type": "string" 10099 // }, 10100 // "instancesId": { 10101 // "description": "Part of `name`. See documentation of `appsId`.", 10102 // "location": "path", 10103 // "required": true, 10104 // "type": "string" 10105 // }, 10106 // "servicesId": { 10107 // "description": "Part of `name`. See documentation of `appsId`.", 10108 // "location": "path", 10109 // "required": true, 10110 // "type": "string" 10111 // }, 10112 // "versionsId": { 10113 // "description": "Part of `name`. See documentation of `appsId`.", 10114 // "location": "path", 10115 // "required": true, 10116 // "type": "string" 10117 // } 10118 // }, 10119 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 10120 // "response": { 10121 // "$ref": "Operation" 10122 // }, 10123 // "scopes": [ 10124 // "https://www.googleapis.com/auth/cloud-platform" 10125 // ] 10126 // } 10127 10128} 10129 10130// method id "appengine.apps.services.versions.instances.get": 10131 10132type AppsServicesVersionsInstancesGetCall struct { 10133 s *APIService 10134 appsId string 10135 servicesId string 10136 versionsId string 10137 instancesId string 10138 urlParams_ gensupport.URLParams 10139 ifNoneMatch_ string 10140 ctx_ context.Context 10141 header_ http.Header 10142} 10143 10144// Get: Gets instance information. 10145// 10146// - appsId: Part of `name`. Name of the resource requested. Example: 10147// apps/myapp/services/default/versions/v1/instances/instance-1. 10148// - instancesId: Part of `name`. See documentation of `appsId`. 10149// - servicesId: Part of `name`. See documentation of `appsId`. 10150// - versionsId: Part of `name`. See documentation of `appsId`. 10151func (r *AppsServicesVersionsInstancesService) Get(appsId string, servicesId string, versionsId string, instancesId string) *AppsServicesVersionsInstancesGetCall { 10152 c := &AppsServicesVersionsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10153 c.appsId = appsId 10154 c.servicesId = servicesId 10155 c.versionsId = versionsId 10156 c.instancesId = instancesId 10157 return c 10158} 10159 10160// Fields allows partial responses to be retrieved. See 10161// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10162// for more information. 10163func (c *AppsServicesVersionsInstancesGetCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesGetCall { 10164 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10165 return c 10166} 10167 10168// IfNoneMatch sets the optional parameter which makes the operation 10169// fail if the object's ETag matches the given value. This is useful for 10170// getting updates only after the object has changed since the last 10171// request. Use googleapi.IsNotModified to check whether the response 10172// error from Do is the result of In-None-Match. 10173func (c *AppsServicesVersionsInstancesGetCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesGetCall { 10174 c.ifNoneMatch_ = entityTag 10175 return c 10176} 10177 10178// Context sets the context to be used in this call's Do method. Any 10179// pending HTTP request will be aborted if the provided context is 10180// canceled. 10181func (c *AppsServicesVersionsInstancesGetCall) Context(ctx context.Context) *AppsServicesVersionsInstancesGetCall { 10182 c.ctx_ = ctx 10183 return c 10184} 10185 10186// Header returns an http.Header that can be modified by the caller to 10187// add HTTP headers to the request. 10188func (c *AppsServicesVersionsInstancesGetCall) Header() http.Header { 10189 if c.header_ == nil { 10190 c.header_ = make(http.Header) 10191 } 10192 return c.header_ 10193} 10194 10195func (c *AppsServicesVersionsInstancesGetCall) doRequest(alt string) (*http.Response, error) { 10196 reqHeaders := make(http.Header) 10197 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 10198 for k, v := range c.header_ { 10199 reqHeaders[k] = v 10200 } 10201 reqHeaders.Set("User-Agent", c.s.userAgent()) 10202 if c.ifNoneMatch_ != "" { 10203 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10204 } 10205 var body io.Reader = nil 10206 c.urlParams_.Set("alt", alt) 10207 c.urlParams_.Set("prettyPrint", "false") 10208 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}") 10209 urls += "?" + c.urlParams_.Encode() 10210 req, err := http.NewRequest("GET", urls, body) 10211 if err != nil { 10212 return nil, err 10213 } 10214 req.Header = reqHeaders 10215 googleapi.Expand(req.URL, map[string]string{ 10216 "appsId": c.appsId, 10217 "servicesId": c.servicesId, 10218 "versionsId": c.versionsId, 10219 "instancesId": c.instancesId, 10220 }) 10221 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10222} 10223 10224// Do executes the "appengine.apps.services.versions.instances.get" call. 10225// Exactly one of *Instance or error will be non-nil. Any non-2xx status 10226// code is an error. Response headers are in either 10227// *Instance.ServerResponse.Header or (if a response was returned at 10228// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10229// to check whether the returned error was because 10230// http.StatusNotModified was returned. 10231func (c *AppsServicesVersionsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { 10232 gensupport.SetOptions(c.urlParams_, opts...) 10233 res, err := c.doRequest("json") 10234 if res != nil && res.StatusCode == http.StatusNotModified { 10235 if res.Body != nil { 10236 res.Body.Close() 10237 } 10238 return nil, &googleapi.Error{ 10239 Code: res.StatusCode, 10240 Header: res.Header, 10241 } 10242 } 10243 if err != nil { 10244 return nil, err 10245 } 10246 defer googleapi.CloseBody(res) 10247 if err := googleapi.CheckResponse(res); err != nil { 10248 return nil, err 10249 } 10250 ret := &Instance{ 10251 ServerResponse: googleapi.ServerResponse{ 10252 Header: res.Header, 10253 HTTPStatusCode: res.StatusCode, 10254 }, 10255 } 10256 target := &ret 10257 if err := gensupport.DecodeResponse(target, res); err != nil { 10258 return nil, err 10259 } 10260 return ret, nil 10261 // { 10262 // "description": "Gets instance information.", 10263 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 10264 // "httpMethod": "GET", 10265 // "id": "appengine.apps.services.versions.instances.get", 10266 // "parameterOrder": [ 10267 // "appsId", 10268 // "servicesId", 10269 // "versionsId", 10270 // "instancesId" 10271 // ], 10272 // "parameters": { 10273 // "appsId": { 10274 // "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", 10275 // "location": "path", 10276 // "required": true, 10277 // "type": "string" 10278 // }, 10279 // "instancesId": { 10280 // "description": "Part of `name`. See documentation of `appsId`.", 10281 // "location": "path", 10282 // "required": true, 10283 // "type": "string" 10284 // }, 10285 // "servicesId": { 10286 // "description": "Part of `name`. See documentation of `appsId`.", 10287 // "location": "path", 10288 // "required": true, 10289 // "type": "string" 10290 // }, 10291 // "versionsId": { 10292 // "description": "Part of `name`. See documentation of `appsId`.", 10293 // "location": "path", 10294 // "required": true, 10295 // "type": "string" 10296 // } 10297 // }, 10298 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", 10299 // "response": { 10300 // "$ref": "Instance" 10301 // }, 10302 // "scopes": [ 10303 // "https://www.googleapis.com/auth/appengine.admin", 10304 // "https://www.googleapis.com/auth/cloud-platform", 10305 // "https://www.googleapis.com/auth/cloud-platform.read-only" 10306 // ] 10307 // } 10308 10309} 10310 10311// method id "appengine.apps.services.versions.instances.list": 10312 10313type AppsServicesVersionsInstancesListCall struct { 10314 s *APIService 10315 appsId string 10316 servicesId string 10317 versionsId string 10318 urlParams_ gensupport.URLParams 10319 ifNoneMatch_ string 10320 ctx_ context.Context 10321 header_ http.Header 10322} 10323 10324// List: Lists the instances of a version.Tip: To aggregate details 10325// about instances over time, see the Stackdriver Monitoring API 10326// (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). 10327// 10328// - appsId: Part of `parent`. Name of the parent Version resource. 10329// Example: apps/myapp/services/default/versions/v1. 10330// - servicesId: Part of `parent`. See documentation of `appsId`. 10331// - versionsId: Part of `parent`. See documentation of `appsId`. 10332func (r *AppsServicesVersionsInstancesService) List(appsId string, servicesId string, versionsId string) *AppsServicesVersionsInstancesListCall { 10333 c := &AppsServicesVersionsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10334 c.appsId = appsId 10335 c.servicesId = servicesId 10336 c.versionsId = versionsId 10337 return c 10338} 10339 10340// PageSize sets the optional parameter "pageSize": Maximum results to 10341// return per page. 10342func (c *AppsServicesVersionsInstancesListCall) PageSize(pageSize int64) *AppsServicesVersionsInstancesListCall { 10343 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10344 return c 10345} 10346 10347// PageToken sets the optional parameter "pageToken": Continuation token 10348// for fetching the next page of results. 10349func (c *AppsServicesVersionsInstancesListCall) PageToken(pageToken string) *AppsServicesVersionsInstancesListCall { 10350 c.urlParams_.Set("pageToken", pageToken) 10351 return c 10352} 10353 10354// Fields allows partial responses to be retrieved. See 10355// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10356// for more information. 10357func (c *AppsServicesVersionsInstancesListCall) Fields(s ...googleapi.Field) *AppsServicesVersionsInstancesListCall { 10358 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10359 return c 10360} 10361 10362// IfNoneMatch sets the optional parameter which makes the operation 10363// fail if the object's ETag matches the given value. This is useful for 10364// getting updates only after the object has changed since the last 10365// request. Use googleapi.IsNotModified to check whether the response 10366// error from Do is the result of In-None-Match. 10367func (c *AppsServicesVersionsInstancesListCall) IfNoneMatch(entityTag string) *AppsServicesVersionsInstancesListCall { 10368 c.ifNoneMatch_ = entityTag 10369 return c 10370} 10371 10372// Context sets the context to be used in this call's Do method. Any 10373// pending HTTP request will be aborted if the provided context is 10374// canceled. 10375func (c *AppsServicesVersionsInstancesListCall) Context(ctx context.Context) *AppsServicesVersionsInstancesListCall { 10376 c.ctx_ = ctx 10377 return c 10378} 10379 10380// Header returns an http.Header that can be modified by the caller to 10381// add HTTP headers to the request. 10382func (c *AppsServicesVersionsInstancesListCall) Header() http.Header { 10383 if c.header_ == nil { 10384 c.header_ = make(http.Header) 10385 } 10386 return c.header_ 10387} 10388 10389func (c *AppsServicesVersionsInstancesListCall) doRequest(alt string) (*http.Response, error) { 10390 reqHeaders := make(http.Header) 10391 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 10392 for k, v := range c.header_ { 10393 reqHeaders[k] = v 10394 } 10395 reqHeaders.Set("User-Agent", c.s.userAgent()) 10396 if c.ifNoneMatch_ != "" { 10397 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10398 } 10399 var body io.Reader = nil 10400 c.urlParams_.Set("alt", alt) 10401 c.urlParams_.Set("prettyPrint", "false") 10402 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances") 10403 urls += "?" + c.urlParams_.Encode() 10404 req, err := http.NewRequest("GET", urls, body) 10405 if err != nil { 10406 return nil, err 10407 } 10408 req.Header = reqHeaders 10409 googleapi.Expand(req.URL, map[string]string{ 10410 "appsId": c.appsId, 10411 "servicesId": c.servicesId, 10412 "versionsId": c.versionsId, 10413 }) 10414 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10415} 10416 10417// Do executes the "appengine.apps.services.versions.instances.list" call. 10418// Exactly one of *ListInstancesResponse or error will be non-nil. Any 10419// non-2xx status code is an error. Response headers are in either 10420// *ListInstancesResponse.ServerResponse.Header or (if a response was 10421// returned at all) in error.(*googleapi.Error).Header. Use 10422// googleapi.IsNotModified to check whether the returned error was 10423// because http.StatusNotModified was returned. 10424func (c *AppsServicesVersionsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, error) { 10425 gensupport.SetOptions(c.urlParams_, opts...) 10426 res, err := c.doRequest("json") 10427 if res != nil && res.StatusCode == http.StatusNotModified { 10428 if res.Body != nil { 10429 res.Body.Close() 10430 } 10431 return nil, &googleapi.Error{ 10432 Code: res.StatusCode, 10433 Header: res.Header, 10434 } 10435 } 10436 if err != nil { 10437 return nil, err 10438 } 10439 defer googleapi.CloseBody(res) 10440 if err := googleapi.CheckResponse(res); err != nil { 10441 return nil, err 10442 } 10443 ret := &ListInstancesResponse{ 10444 ServerResponse: googleapi.ServerResponse{ 10445 Header: res.Header, 10446 HTTPStatusCode: res.StatusCode, 10447 }, 10448 } 10449 target := &ret 10450 if err := gensupport.DecodeResponse(target, res); err != nil { 10451 return nil, err 10452 } 10453 return ret, nil 10454 // { 10455 // "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).", 10456 // "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", 10457 // "httpMethod": "GET", 10458 // "id": "appengine.apps.services.versions.instances.list", 10459 // "parameterOrder": [ 10460 // "appsId", 10461 // "servicesId", 10462 // "versionsId" 10463 // ], 10464 // "parameters": { 10465 // "appsId": { 10466 // "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", 10467 // "location": "path", 10468 // "required": true, 10469 // "type": "string" 10470 // }, 10471 // "pageSize": { 10472 // "description": "Maximum results to return per page.", 10473 // "format": "int32", 10474 // "location": "query", 10475 // "type": "integer" 10476 // }, 10477 // "pageToken": { 10478 // "description": "Continuation token for fetching the next page of results.", 10479 // "location": "query", 10480 // "type": "string" 10481 // }, 10482 // "servicesId": { 10483 // "description": "Part of `parent`. See documentation of `appsId`.", 10484 // "location": "path", 10485 // "required": true, 10486 // "type": "string" 10487 // }, 10488 // "versionsId": { 10489 // "description": "Part of `parent`. See documentation of `appsId`.", 10490 // "location": "path", 10491 // "required": true, 10492 // "type": "string" 10493 // } 10494 // }, 10495 // "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", 10496 // "response": { 10497 // "$ref": "ListInstancesResponse" 10498 // }, 10499 // "scopes": [ 10500 // "https://www.googleapis.com/auth/appengine.admin", 10501 // "https://www.googleapis.com/auth/cloud-platform", 10502 // "https://www.googleapis.com/auth/cloud-platform.read-only" 10503 // ] 10504 // } 10505 10506} 10507 10508// Pages invokes f for each page of results. 10509// A non-nil error returned from f will halt the iteration. 10510// The provided context supersedes any context provided to the Context method. 10511func (c *AppsServicesVersionsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error { 10512 c.ctx_ = ctx 10513 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 10514 for { 10515 x, err := c.Do() 10516 if err != nil { 10517 return err 10518 } 10519 if err := f(x); err != nil { 10520 return err 10521 } 10522 if x.NextPageToken == "" { 10523 return nil 10524 } 10525 c.PageToken(x.NextPageToken) 10526 } 10527} 10528